Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpberkland2007-02-27 23:13:33 +0000
committerpberkland2007-02-27 23:13:33 +0000
commit8e7d90cea693ca4de36a350d623615ffeb9cf82d (patch)
tree3a9df8cfbcae9d109a0d61728db42615214aefbd /tests/org.eclipse.wst.jsdt.core.tests.model
parent26dfbcfb33130e23597875cb53a1b22e8a98b645 (diff)
downloadwebtools.jsdt.tests-8e7d90cea693ca4de36a350d623615ffeb9cf82d.tar.gz
webtools.jsdt.tests-8e7d90cea693ca4de36a350d623615ffeb9cf82d.tar.xz
webtools.jsdt.tests-8e7d90cea693ca4de36a350d623615ffeb9cf82d.zip
changes for javaScript
Diffstat (limited to 'tests/org.eclipse.wst.jsdt.core.tests.model')
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverter15Test.java506
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterAST3Test.java798
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterJavadocTest.java104
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterRecoveryTest.java34
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterTest.java8938
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterTest2.java398
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterTestAST3_2.java548
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTModelBridgeTests.java40
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTParserTest.java2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTPositionsTest.java10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/BatchASTCreationTests.java194
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/CompatibilityRulesTests.java96
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ConverterTestSetup.java6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/formatter/FormatterRegressionTests.java1345
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AbstractJavaModelTests.java56
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AbstractJavaSearchTests.java16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AbstractJavadocCompletionModelTest.java2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AccessRestrictionsTests.java58
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AttachSourceTests.java12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AttachedJavadocTests.java2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/BufferTests.java110
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClassFileTests.java26
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClassNameTests.java12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClasspathInitializerTests.java6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClasspathTests.java14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CodeCorrectionTests.java44
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompilationUnitTests.java1088
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionContextTests.java488
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionContextTests_1_5.java48
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionTests.java1749
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionTests2.java200
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionTests_1_5.java1142
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionWithMissingTypesTests.java156
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionWithMissingTypesTests2.java16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionWithMissingTypesTests_1_5.java66
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CopyMoveElementsTests.java874
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CopyMoveResourcesTests.java184
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CopyMoveTests.java2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CreateCompilationUnitTests.java20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CreateImportsTests.java2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CreateMembersTests.java59
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/DeleteTests.java144
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/EncodingTests.java52
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ExclusionPatternsTests.java64
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ExistenceTests.java48
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ExternalJarDeltaTests.java2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/FactoryTests.java12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/GetSourceTests.java52
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/HierarchyOnWorkingCopiesTests.java20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/InclusionPatternsTests.java104
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaConventionTests.java4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaElementDeltaTests.java415
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaLikeExtensionsTests.java4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaModelTests.java28
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaProjectTests.java28
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchBugsTests.java494
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchGenericConstructorTests.java64
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchGenericFieldTests.java296
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchGenericMethodTests.java68
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchGenericTypeTests.java74
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchJavadocTests.java112
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchMultipleProjectsTests.java90
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchScopeTests.java60
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchTests.java1053
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocBugsCompletionModelTest.java120
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocCompletionContextTests.java112
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocCompletionContextTests_1_5.java8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocFieldCompletionModelTest.java48
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocMethodCompletionModelTest.java268
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocPackageCompletionModelTest.java60
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocTextCompletionModelTest.java142
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocTypeCompletionModelTest.java148
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/LocalElementTests.java96
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/MementoTests.java50
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ModifyingResourceTests.java8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/NameLookupTests2.java36
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/OverflowingCacheTests.java2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ReconcilerStatementsRecoveryTests.java46
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ReconcilerTests.java1344
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/RenameTests.java88
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ResolveTests.java2737
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ResolveTests_1_5.java224
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/RootManipulationsTests.java36
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SearchParticipantTests.java4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SearchTests.java80
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SelectionJavadocModelTests.java478
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SnippetCompletionContextTests.java8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SnippetCompletionTests.java4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SortCompilationUnitElementsTests.java204
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ThreadSafetyTests.java4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchyNotificationTests.java120
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchySerializationTests.java18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchyTests.java228
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeResolveTests.java14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyNotInClasspathTests.java28
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyOwnerTests.java162
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopySearchTests.java16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyTests.java382
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingExpressionsTest.java96
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingGroupNodeTest.java4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingInsertBoundTest.java50
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingJavadocTest.java42
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingMethodDeclTest.java74
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingMoveCodeTest.java56
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingStatementsTest.java86
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingTest.java16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingTrackingTest.java14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingTypeDeclTest.java54
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ImportRewriteTest.java40
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/LineCommentOffsetsTest.java22
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingCopyTest.java16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingInsertTest.java18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingMoveTest.java20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingOtherTest.java12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingRemoveTest.java22
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingReplaceTest.java12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/attach.jarbin0 -> 953 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/attach2.jarbin0 -> 1051 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/attach2src.zipbin0 -> 22 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/attachsrc.new.zipbin0 -> 374 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/attachsrc.zipbin0 -> 198 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/b153133.jarbin0 -> 1774 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/full.jarbin0 -> 1096 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/fullsrc.zipbin0 -> 797 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/src.zipbin0 -> 559 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/src/A.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/srcLib/p/X.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test.jarbin0 -> 502 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test2.jarbin0 -> 1134 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test4.jarbin0 -> 1055 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test4_src.zipbin0 -> 609 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test5.jarbin0 -> 1513 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test6.jarbin0 -> 1748 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test6src.zipbin0 -> 556 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/update.jarbin0 -> 783 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc.zipbin0 -> 78240 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/allclasses-frame.html52
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/allclasses-noframe.html52
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/constant-values.html142
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/deprecated-list.html142
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/help-doc.html219
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-1.html141
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-10.html144
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-11.html145
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-12.html150
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-13.html141
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-14.html141
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-15.html141
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-2.html156
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-3.html138
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-4.html144
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-5.html141
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-6.html171
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-7.html147
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-8.html141
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-9.html138
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index.html37
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/overview-frame.html46
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/overview-summary.html156
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/overview-tree.html172
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/Annot.D.html224
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/Annot.html235
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/Annot2.html198
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/E.html362
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/TestClass.html221
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/X.A.html230
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/X.B.html224
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/X.html440
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/Z.html258
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/Annot.D.html140
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/Annot.html140
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/Annot2.html140
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/E.html185
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/TestClass.html140
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/X.A.html140
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/X.B.html140
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/X.html140
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/Z.html140
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/C.html442
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/D.html221
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/class-use/C.html140
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/class-use/D.html201
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/package-frame.html43
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/package-summary.html168
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/package-tree.html154
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/package-use.html166
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/package-frame.html62
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/package-summary.html198
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/package-tree.html166
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/package-use.html166
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/X.html254
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/Y.html256
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/Z.html221
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/class-use/X.html176
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/class-use/Y.html140
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/class-use/Z.html184
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/package-frame.html36
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/package-summary.html162
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/package-tree.html151
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/package-use.html172
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/package-list3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/resources/inherit.gifbin0 -> 57 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/stylesheet.css29
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/lib/test6.jarbin0 -> 7538 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/lib/test6src.zipbin0 -> 3083 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/src/p1/p2/X.js68
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/src/p1/p2/Y.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/lib.jarbin0 -> 2435 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/libSrc.zipbin0 -> 1573 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectArgument1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectException1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectException2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectField1.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectField2.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectFieldType1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectFieldType2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectFieldType3.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectImport1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectImport2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectImport3.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectLocalVariable1.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectLocalVariableType1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectLocalVariableType2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectMethod1.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectMethod2.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectReturnType1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectReturnType2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectSuperClass1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectSuperClass2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectSuperInterface1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectSuperInterface2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/core/compiler/package.html17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser1.rscbin0 -> 23054 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser10.rscbin0 -> 252 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser11.rscbin0 -> 252 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser12.rscbin0 -> 252 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser13.rscbin0 -> 252 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser14.rscbin0 -> 1204 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser15.rscbin0 -> 890 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser16.rscbin0 -> 1866 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser17.rscbin0 -> 671 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser18.rscbin0 -> 7979 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser19.rsc2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser2.rscbin0 -> 21712 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser20.rscbin0 -> 12598 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser21.rscbin0 -> 5368 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser3.rscbin0 -> 1866 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser4.rscbin0 -> 3126 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser5.rscbin0 -> 1866 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser6.rscbin0 -> 866 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser7.rscbin0 -> 218 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser8.rscbin0 -> 598 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser9.rscbin0 -> 15800 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/readableNames.properties296
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/problem/messages.properties465
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/util/messages.properties66
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/core/compiler/CharOperation.js2747
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/core/compiler/IProblem.js983
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/core/compiler/InvalidInputException.js34
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/core/compiler/package.html17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ASTVisitor.js924
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ClassFile.js3040
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/CompilationResult.js433
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/Compiler.js610
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ConfigurableOption.js227
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/DefaultErrorHandlingPolicies.js75
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ICompilerRequestor.js22
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/IDebugRequestor.js42
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/IErrorHandlingPolicy.js28
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/IProblemFactory.js41
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AND_AND_Expression.js269
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ASTNode.js298
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AbstractMethodDeclaration.js421
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AbstractVariableDeclaration.js97
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AllocationExpression.js317
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Annotation.js38
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AnnotationTypeDeclaration.js283
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AnnotationTypeMemberDeclaration.js158
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Argument.js132
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ArrayAllocationExpression.js191
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ArrayInitializer.js209
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ArrayQualifiedTypeReference.js86
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ArrayReference.js213
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ArrayTypeReference.js83
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AssertStatement.js198
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Assignment.js204
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/BinaryExpression.js1764
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Block.js142
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/BranchStatement.js62
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/BreakStatement.js95
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/CaseStatement.js114
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/CastExpression.js420
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/CharLiteral.js101
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ClassLiteralAccess.js105
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Clinit.js248
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/CompilationUnitDeclaration.js323
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/CompoundAssignment.js158
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ConditionalExpression.js416
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ConstructorDeclaration.js467
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ContinueStatement.js100
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/DoStatement.js173
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/DoubleLiteral.js115
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/EmptyStatement.js64
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/EnumConstant.js208
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/EnumDeclaration.js242
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/EqualExpression.js454
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ExplicitConstructorCall.js366
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Expression.js757
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ExtendedStringLiteral.js79
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/FalseLiteral.js67
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/FieldDeclaration.js242
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/FieldReference.js545
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/FloatLiteral.js117
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ForStatement.js325
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ForeachStatement.js393
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/IfStatement.js242
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ImplicitDocTypeReference.js73
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ImportReference.js82
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Initializer.js120
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/InstanceOfExpression.js105
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/IntLiteral.js150
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/IntLiteralMinValue.js27
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Javadoc.js495
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocAllocationExpression.js113
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocArgumentExpression.js98
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocArrayQualifiedTypeReference.js48
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocArraySingleTypeReference.js46
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocFieldReference.js143
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocImportReference.js32
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocMessageSend.js170
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocQualifiedTypeReference.js94
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocReturnStatement.js51
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocSingleNameReference.js58
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocSingleTypeReference.js94
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/LabeledStatement.js129
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Literal.js57
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/LocalDeclaration.js226
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/LongLiteral.js141
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/LongLiteralMinValue.js27
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/MagicLiteral.js29
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/MarkerAnnotation.js42
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/MemberValuePair.js67
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/MessageSend.js399
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/MethodDeclaration.js181
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/NameReference.js64
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/NormalAnnotation.js84
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/NullLiteral.js59
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/NumberLiteral.js36
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/OR_OR_Expression.js272
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/OperatorExpression.js1564
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/OperatorIds.js43
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.js287
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ParameterizedSingleTypeReference.js217
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/PostfixExpression.js77
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/PrefixExpression.js60
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/QualifiedAllocationExpression.js359
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/QualifiedNameReference.js877
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/QualifiedSuperReference.js63
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/QualifiedThisReference.js120
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/QualifiedTypeReference.js115
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Reference.js70
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ReturnStatement.js244
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SingleMemberAnnotation.js69
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SingleNameReference.js689
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SingleTypeReference.js77
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Statement.js79
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/StringLiteral.js120
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/StringLiteralConcatenation.js79
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SubRoutineStatement.js67
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SuperReference.js68
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SwitchStatement.js320
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SynchronizedStatement.js194
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ThisReference.js120
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ThrowStatement.js79
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/TrueLiteral.js70
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/TryStatement.js562
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/TypeDeclaration.js1202
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/TypeParameter.js79
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/TypeReference.js164
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/UnaryExpression.js301
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/WhileStatement.js234
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Wildcard.js112
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/ClassFileConstants.js72
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/ClassFileReader.js827
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/ClassFileStruct.js188
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/ClassFormatException.js131
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/FieldInfo.js318
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/InnerClassInfo.js142
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/MethodInfo.js251
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/AttributeNamesConstants.js25
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/CaseLabel.js81
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/CharArrayCache.js184
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/CodeStream.js5479
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/ConstantPool.js3609
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/DoubleCache.js138
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/ExceptionLabel.js49
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/FieldNameAndTypeCache.js161
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/FloatCache.js138
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/IntegerCache.js155
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/Label.js262
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/LongCache.js155
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/MethodNameAndTypeCache.js162
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/ObjectCache.js152
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/Opcodes.js216
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/QualifiedNamesConstants.js107
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IBinaryField.js39
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IBinaryMethod.js50
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IBinaryNestedType.js38
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IBinaryType.js114
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/ICompilationUnit.js36
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IConstants.js48
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IDependent.js44
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IGenericField.js27
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IGenericMethod.js36
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IGenericType.js32
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/INameEnvironment.js71
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/ISourceField.js47
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/ISourceImport.js45
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/ISourceMethod.js72
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/ISourceType.js108
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/NameEnvironmentAnswer.js79
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/ConditionalFlowInfo.js178
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/ExceptionHandlingFlowContext.js219
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/FinallyFlowContext.js122
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/FlowContext.js493
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/FlowInfo.js144
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/InitializationFlowContext.js97
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/InsideSubRoutineFlowContext.js59
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/LabelFlowContext.js61
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/LoopingFlowContext.js153
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/SwitchFlowContext.js54
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/UnconditionalFlowInfo.js558
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/BooleanConstant.js41
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/ByteConstant.js52
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/CharConstant.js55
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/CompilerOptions.js725
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/Constant.js1611
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/DoubleConstant.js64
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/FloatConstant.js62
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/ITypeRequestor.js37
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/IntConstant.js63
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/LongConstant.js52
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/ReferenceContext.js26
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/ShortConstant.js52
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/StringConstant.js48
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ArrayBinding.js219
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/BaseTypeBinding.js186
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/BaseTypes.js24
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/BinaryTypeBinding.js819
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/Binding.js45
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/BindingIds.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/BlockScope.js825
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ClassScope.js995
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/CompilationUnitScope.js633
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/CompilerModifiers.js42
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/FieldBinding.js228
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ImportBinding.js45
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/InnerEmulationDependency.js22
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/InvocationSite.js28
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/LocalTypeBinding.js177
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/LocalVariableBinding.js110
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/LookupEnvironment.js815
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/MemberTypeBinding.js39
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/MethodBinding.js635
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/MethodScope.js502
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/MethodVerifier.js544
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/MethodVerifier15.js161
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/NestedTypeBinding.js217
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/PackageBinding.js197
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ParameterizedFieldBinding.js59
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.js232
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ParameterizedMethodBinding.js91
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ParameterizedTypeBinding.js787
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ProblemBinding.js55
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ProblemFieldBinding.js41
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ProblemMethodBinding.js42
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ProblemPackageBinding.js32
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ProblemReasons.js28
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ProblemReferenceBinding.js50
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/RawTypeBinding.js170
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ReferenceBinding.js742
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/Scope.js2887
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/SignatureWrapper.js68
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/SourceTypeBinding.js1162
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/Substitution.js23
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/SyntheticAccessMethodBinding.js307
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/SyntheticArgumentBinding.js61
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/SyntheticFieldBinding.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/TagBits.js61
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/TypeBinding.js289
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/TypeConstants.js89
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/TypeIds.js138
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/TypeVariableBinding.js210
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/UnresolvedReferenceBinding.js70
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/UpdatedMethodBinding.js25
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/VariableBinding.js59
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/WildcardBinding.js325
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/AbstractCommentParser.js1234
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/JavadocParser.js632
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/NLSLine.js65
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/Parser.js9112
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/ParserBasicInformation.js35
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredBlock.js330
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredElement.js308
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredField.js169
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredImport.js57
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredInitializer.js237
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredLocalVariable.js108
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredMethod.js447
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredStatement.js54
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredType.js511
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredUnit.js217
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/Scanner.js3587
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/TerminalTokens.js144
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/diagnose/DiagnoseParser.js2295
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/diagnose/LexStream.js270
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/diagnose/RangeUtil.js200
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser1.rscbin0 -> 23054 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser10.rscbin0 -> 252 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser11.rscbin0 -> 252 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser12.rscbin0 -> 252 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser13.rscbin0 -> 252 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser14.rscbin0 -> 1204 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser15.rscbin0 -> 890 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser16.rscbin0 -> 1866 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser17.rscbin0 -> 671 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser18.rscbin0 -> 7979 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser19.rsc2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser2.rscbin0 -> 21712 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser20.rscbin0 -> 12598 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser21.rscbin0 -> 5368 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser3.rscbin0 -> 1866 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser4.rscbin0 -> 3126 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser5.rscbin0 -> 1866 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser6.rscbin0 -> 866 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser7.rscbin0 -> 218 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser8.rscbin0 -> 598 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser9.rscbin0 -> 15800 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/readableNames.properties80
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/AbortCompilation.js75
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/AbortCompilationUnit.js29
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/AbortMethod.js29
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/AbortType.js29
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/DefaultProblem.js227
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/DefaultProblemFactory.js197
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/ProblemHandler.js183
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/ProblemReporter.js4731
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/ProblemSeverities.js25
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/ShouldNotImplement.js24
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/messages.properties465
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/CompoundNameVector.js71
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/FloatUtil.js421
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/HashtableOfInt.js92
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/HashtableOfIntValues.js148
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/HashtableOfLong.js92
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/HashtableOfObject.js146
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/HashtableOfPackage.js96
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/HashtableOfType.js96
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/ObjectVector.js132
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/SimpleLookupTable.js156
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/SimpleNameVector.js96
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/SuffixConstants.js43
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/Util.js523
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/WeakHashSet.js206
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/messages.properties66
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/constructors.jarbin0 -> 1456 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/constructorssrc.zipbin0 -> 615 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/generics.jarbin0 -> 695 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/genericssrc.zipbin0 -> 265 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/lib.jarbin0 -> 392 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/pack.jarbin0 -> 1303 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/same.jarbin0 -> 535 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/B.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CUWithSecondaryType.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/ClassWithComplexName.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/Completion2InterfacesWithSameMethod.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAfterCase1.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAfterCase2.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAfterSupercall1.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAfterSwitch.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAllocationExpressionIsParent1.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAllocationExpressionIsParent4.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAllocationExpressionIsParent5.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAmbiguousFieldName.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAmbiguousFieldName3.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAmbiguousFieldName4.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAmbiguousType.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAmbiguousType2.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionArgumentName.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionArrayAccess1.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionArraysCloneMethod.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAssignmentInMethod1.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAssignmentInMethod2.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAssignmentInMethod3.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAssignmentInMethod4.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicField1.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicKeyword1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicLocalVariable1.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicMethod1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicMethodDeclaration1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicPackage1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicPotentialMethodDeclaration1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicType1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBinaryOperator1.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBinaryOperator2.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBinaryOperator3.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionCaseInsensitive.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionCaseInsensitivePackage.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionCastIsParent1.js27
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionCastIsParent2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionCatchArgumentName2.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionClassLiteralAfterAnonymousType1.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionConditionalExpression1.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionConditionalExpression2.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionConditionalExpression3.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionConstructorForAnonymousType.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionDefaultPackage.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionEmptyToken1.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionEmptyTypeName2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionEmptyTypeName3.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionEndOfCompilationUnit.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionExactNameCaseInsensitive.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionExpectedTypeIsNotValid.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFieldInitializer1.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFieldInitializer2.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFieldInitializer3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFieldInitializer4.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFieldName.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindClass2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindException1.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindException2.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindField1.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindField2.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindField3.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindLocalVariable.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindMethod1.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindMethod2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindMethodInProcess.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindMethodInThis.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindSecondaryType1.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindThisDotField.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionInsideStaticMethod.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionInstanceofOperator1.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionLocalName.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMessageSendIsParent1.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMessageSendIsParent2.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMessageSendIsParent3.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMessageSendIsParent4.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMessageSendIsParent5.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMessageSendIsParent6.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodDeclaration.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodDeclaration10.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodDeclaration6.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodDeclaration7.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodDeclaration8.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodDeclaration9.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodThrowsClause.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodThrowsClause2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionNonEmptyToken1.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionNonStaticFieldRelevance.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionNullRequestor.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionObjectsMethodWithInterfaceReceiver.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionOnStaticMember1.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionOnStaticMember2.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionOutOfBounds.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionRepeatedType.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionReturnInInitializer.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionReturnStatementIsParent1.js27
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionReturnStatementIsParent2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionSameClass.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionThrowStatement.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionType1.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionUnaryOperator1.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionUnaryOperator2.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionUnresolvedEnclosingType.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionUnresolvedFieldType.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionUnresolvedParameterType.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionUnresolvedReturnType.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInInitializer1.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInInitializer2.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInInitializer3.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInInitializer4.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInMethod1.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInMethod2.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInMethod3.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInMethod4.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableName1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableName2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableName3.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableNameUnresolvedType.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVisibilityCheck.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVoidMethod.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionWithBinaryFolder.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/Default.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/SuperClass.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/SuperInterface.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/TEST_FOO_MyClass.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/Test_Bar_MyClass.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/TypeWithConstructor.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX00.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX01.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX02.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX10.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX11.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX12.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX20.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX21.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX22.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/deprecation/Bug127628Type1.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/deprecation/Bug127628Type2.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/org/eclipse/jsdt/core/tests/BasicTestReferences.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/p1/ABC.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/p2/ABC.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/p3/CompletionToplevelType1.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/pack1/PX.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/pack1/pack3/PX.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/pack2/PX.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/q1/CT1.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/q2/CT1.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/z1/z2/Qla1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/z1/z2/qla0/Qla3.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/z1/z2/qla0/Qla4.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/z1/z2/qla0/Wla.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/z1/z2/qla2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract1.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract10.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract11.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract12.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract13.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract14.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract15.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract16.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract2.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract3.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract4.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract5.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract6.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract7.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract8.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract9.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAssert1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAssert2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAssert3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAssert4.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAssert5.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAssert6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordBreak1.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordBreak2.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordBreak3.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordBreak4.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordBreak5.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordBreak6.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase1.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase10.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase2.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase3.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase4.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase5.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase6.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase7.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase8.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase9.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch1.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch10.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch4.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch5.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch6.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch7.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch8.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch9.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass1.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass10.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass11.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass12.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass13.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass14.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass15.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass16.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass17.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass18.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass19.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass2.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass20.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass21.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass22.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass23.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass24.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass3.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass4.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass5.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass6.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass7.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass8.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass9.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordContinue1.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordContinue2.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordContinue3.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordContinue4.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault1.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault10.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault2.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault3.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault4.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault5.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault6.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault7.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault8.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault9.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDo1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDo2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDo3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDo4.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDo5.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDo6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse1.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse4.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse5.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse6.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse7.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse8.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends10.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends4.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends5.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends7.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends8.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends9.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFalse1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFalse2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFalse3.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFalse4.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal1.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal10.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal11.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal12.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal13.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal14.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal15.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal16.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal17.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal18.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal2.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal3.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal4.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal5.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal6.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal7.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal8.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal9.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally1.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally10.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally11.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally12.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally13.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally14.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally4.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally5.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally6.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally7.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally8.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally9.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFor1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFor2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFor3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFor4.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFor5.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFor6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordIf1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordIf2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordIf3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordIf4.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordIf5.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordIf6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImplements1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImplements2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImplements3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImplements4.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImplements5.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImplements6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImport1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImport3.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImport4.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImport5.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImport6.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImport7.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInstanceof1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInstanceof2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInstanceof3.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInstanceof4.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInstanceof5.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInstanceof6.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface1.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface10.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface11.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface12.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface13.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface14.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface15.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface16.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface17.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface18.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface3.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface4.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface5.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface6.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface7.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface8.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface9.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative4.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative5.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative7.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative8.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew10.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew11.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew12.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew13.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew14.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew15.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew16.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew3.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew4.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew5.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew6.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew7.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew8.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew9.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNull1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNull2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNull3.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNull4.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPackage1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPackage3.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPackage4.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPackage5.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPackage6.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPackage7.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate10.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate4.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate5.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate7.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate8.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate9.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected10.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected4.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected5.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected7.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected8.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected9.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic1.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic10.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic11.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic12.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic13.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic14.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic15.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic16.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic17.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic18.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic19.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic20.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic3.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic4.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic5.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic6.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic7.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic8.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic9.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordReturn1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordReturn2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordReturn3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordReturn4.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordReturn5.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordReturn6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic10.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic4.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic5.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic7.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic8.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic9.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp4.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp5.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp7.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp8.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper10.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper11.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper4.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper5.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper7.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper8.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper9.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSwitch1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSwitch2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSwitch3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSwitch4.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSwitch5.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSwitch6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized10.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized11.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized12.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized4.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized5.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized6.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized7.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized8.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized9.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis10.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis11.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis12.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis13.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis14.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis4.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis5.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis6.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis7.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis8.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis9.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrow1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrow2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrow3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrow4.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrow5.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrow6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows1.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows2.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows3.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows4.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows5.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows6.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows7.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows8.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient4.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient5.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient7.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient8.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTrue1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTrue2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTrue3.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTrue4.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTry1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTry2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTry3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTry4.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTry5.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTry6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile4.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile5.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile7.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile8.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile10.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile4.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile5.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile6.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile7.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile8.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile9.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/p/CompletionKeywordImport2.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/p/CompletionKeywordImport8.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/p/CompletionKeywordPackage2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/p/CompletionKeywordPackage8.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0001/Test.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0002/Test.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0003/Test.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0004/Test.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0009/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0010/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0023/Test.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0024/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0025/Test.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0028/Test.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0030/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0032/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0033/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0034/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0035/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0036/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0037/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0038/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0039/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0048/Test.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0049/Test.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0050/Test.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0057/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0060/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0064/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0067/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0068/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0069/Test.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0070/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0072/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0073/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0074/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/test0049.jarbin0 -> 453 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/test0049src.zipbin0 -> 209 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/tmpDoc.jarbin0 -> 550 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/tmpDocDoc.zipbin0 -> 20791 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/tmpDocsrc.zipbin0 -> 221 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/zzz.jarbin0 -> 842 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/zzzsrc.zipbin0 -> 528 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/Hello.js23
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/NO_WORKING.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/Test0157.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/Test0158.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/Test0170.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/Test462.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/codeManipulation/bug.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/examples.oneofeach/ASTPosterChild.js188
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test000/Test.js36
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test001/Test.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test002/Test.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test003/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test004/Test.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test005/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test006/Test.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test007/Test.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test008/Test.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test009/Test.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test010/Test.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test011/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test012/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test013/Test.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test014/X.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test015/Test.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test100/TestB1.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test100/TestB2.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test100/TestD1.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test100/TestD2.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test101/Test.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test102/TestB1.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test102/TestB2.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test102/TestD1.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test102/TestD2.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test103/Test.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test104/TestD1.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test104/TestD2.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test105/TestB1.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test105/TestB2.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test106/Test.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test107/TestB1.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test107/TestB2.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test107/TestD1.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test107/TestD2.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test108/Test.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug48489/TestA.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug48489/TestB.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug48489/TestC.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug48489/TestD.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug48489/TestE.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug50898/G.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug50898/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51226/X1.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51226/X2.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51226/X3.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51226/X4.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51226/X5.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51226/X6.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51241/X.js20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51363/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51476/X1.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51476/X2.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51476/X3.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51478/X1.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51478/X2.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51478/X3.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51508/X.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51600/Test.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51617/Test.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51650/X.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51660/Test.js37
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51770/X.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51911/TestInvalid.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51911/TestValid1.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51911/TestValid2.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51911/TestValid3.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug52908/X.js47
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug52908/Y.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug52908a/Test.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug52908unicode/X.js47
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug52908unicode/Y.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug53075/X.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug53276/TestA.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug53276/TestB.js23
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug53276/TestC.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug53757/Test.js55
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug54424/Test.js25
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug54776/Test.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug55221/a/Test.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug55221/b/Test.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug55221/c/Test.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug55221/d/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug55223/TestA.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug55223/TestB.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug63044/Test.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug65174/Test.js39
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug65253/Test.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug65253/TestD.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug65288/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68017/TestInvalid.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68017/TestValid.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68017/TestWarn1.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68017/TestWarn2.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68025/TestA.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68025/TestB.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68726/TestBug68726conform1.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68726/TestBug68726conform2.js20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68726/TestBug68726negative1.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68726/TestBug68726negative2.js20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69272/TestClassInvalid.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69272/TestClassValid.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69272/TestFieldInvalid.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69272/TestFieldValid.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69272/TestMethInvalid.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69272/TestMethValid.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69275/TestA.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69275/TestB.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69302/TestInvalid.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69302/TestValid1.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69302/TestValid2.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug70892/TestInvalid1.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug70892/TestInvalid2.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug70892/TestValid.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug73348/TestInvalid.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug73348/TestValid.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug77644/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug77644/B.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug77644/C.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/awtui/AboutDialog.js67
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/awtui/Logo.js53
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/awtui/ProgressBar.js84
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/awtui/TestRunner.js539
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/extensions/ActiveTestSuite.js64
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/extensions/ExceptionTestCase.js46
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/extensions/RepeatedTest.js31
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/extensions/TestDecorator.js38
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/extensions/TestSetup.js37
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/Assert.js291
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/AssertionFailedError.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/ComparisonFailure.js68
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/Protectable.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/Test.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/TestCase.js197
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/TestFailure.js57
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/TestListener.js23
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/TestResult.js166
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/TestSuite.js267
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/BaseTestRunner.js323
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/ClassPathTestCollector.js80
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/FailureDetailView.js23
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/LoadingTestCollector.js69
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/ReloadingTestSuiteLoader.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/SimpleTestCollector.js20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/Sorter.js38
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/StandardTestSuiteLoader.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/TestCaseClassLoader.js224
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/TestCollector.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/TestRunListener.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/TestSuiteLoader.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/Version.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/AboutDialog.js81
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/CounterPanel.js110
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/DefaultFailureDetailView.js94
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/FailureRunView.js110
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/ProgressBar.js42
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/StatusLine.js42
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestHierarchyRunView.js72
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestRunContext.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestRunView.js37
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestRunner.js774
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestSelector.js258
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestSuitePanel.js159
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestTreeModel.js184
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/textui/ResultPrinter.js138
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/textui/TestRunner.js189
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/p1/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/p2/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/p3/B.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0001/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0002/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0003/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0004/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0005/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0006/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0007/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0008/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0009/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0010/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0011/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0012/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0013/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0014/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0015/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0016/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0017/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0018/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0019/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0020/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0021/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0022/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0023/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0024/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0025/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0026/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0027/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0028/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0029/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0030/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0031/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0032/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0033/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0034/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0035/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0036/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0037/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0038/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0039/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0040/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0041/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0042/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0043/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0044/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0045/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0046/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0047/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0048/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0049/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0050/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0051/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0052/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0053/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0054/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0055/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0056/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0057/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0058/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0059/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0060/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0061/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0062/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0063/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0064/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0065/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0066/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0067/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0068/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0069/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0070/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0071/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0072/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0073/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0074/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0075/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0076/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0077/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0078/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0079/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0080/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0081/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0082/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0083/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0084/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0085/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0086/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0087/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0088/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0089/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0090/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0091/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0092/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0093/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0094/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0095/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0096/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0097/Test.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0098/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0099/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0100/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0101/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0102/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0103/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0104/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0105/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0106/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0107/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0108/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0109/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0110/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0111/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0112/Test.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0113/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0114/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0115/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0116/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0117/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0118/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0119/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0120/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0121/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0122/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0123/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0124/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0125/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0126/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0127/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0128/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0129/Test.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0130/Test.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0131/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0132/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0133/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0134/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0135/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0136/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0137/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0138/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0139/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0140/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0141/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0142/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0143/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0144/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0145/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0146/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0147/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0148/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0149/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0150/Test.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0151/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0152/Test.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0153/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0154/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0155/Test.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0156/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0159/Test.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0160/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0161/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0162/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0163/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0164/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0165/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0166/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0167/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0168/test1/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0169/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0171/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0172/Test.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0173/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0174/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0175/Test.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0176/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0177/Test.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0178/Test.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0179/Test.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0180/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0181/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0182/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0183/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0184/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0185/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0186/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0187/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0188/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0189/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0190/Test.js23
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0191/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0192/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0193/Test.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0194/Test.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0195/Test.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0196/Test.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0197/Test.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0198/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0199/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0200/Test.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0201/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0202/Test.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0203/Test.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0204/Test.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0205/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0206/Test.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0207/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0208/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0209/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0210/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0211/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0212/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0213/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0214/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0215/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0216/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0217/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0218/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0219/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0220/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0221/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0222/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0223/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0224/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0225/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0226/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0227/Test.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0228/Test.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0229/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0230/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0231/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0232/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0233/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0234/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0235/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0236/Test.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0238/Test.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0239/Test.js23
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0240/Test.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0241/Test.js27
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0242/Test.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0243/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0244/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0245/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0246/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0247/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0248/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0249/Test.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0250/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0251/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0252/Test.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0253/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0254/Test.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0255/Test.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0256/Test.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0257/Test.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0258/Test.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0259/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0260/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0261/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0262/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0263/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0264/Test.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0265/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0266/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0267/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0268/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0269/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0270/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0271/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0272/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0273/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0274/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0275/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0276/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0277/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0278/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0279/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0280/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0281/Test.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0282/Test.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0283/Test.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0284/Test.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0285/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0286/Test.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0287/Test.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0288/Test.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0289/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0290/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0291/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0292/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0293/Test.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0294/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0295/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0296/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0297/Test.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0298/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0299/Test.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0300/Test.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0301/Test.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0302/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0303/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0304/Test.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0307/Test.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0308/Test.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0309/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0310/Test.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0311/Test.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0312/Test.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0313/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0314/Test.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0315/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0317/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0318/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0319/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0320/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0321/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0322/Test.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0323/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0324/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0325/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0326/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0327/Test.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0328/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0329/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0330/Test.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0331/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0332/LocalSelectionTransfer.js88
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0333/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0334/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0335/ExceptionTestCaseTest.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0336/SorterTest.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0337/Test.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0338/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0339/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0341/A.js29
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0342/Test.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0343/Test.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0344/Test.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0345/A.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0346/Test2.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0347/Test2.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0348/Test2.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0349/Test2.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0350/Test2.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0351/Test2.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0352/Test2.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0353/Test.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0354/Test.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0355/Foo.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0356/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0356/X.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0357/A.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0358/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0359/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0360/X.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0361/X.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0362/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0363/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0364/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0365/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0366/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0367/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0368/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0369/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0370/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0371/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0372/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0373/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0374/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0375/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0376/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0377/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0378/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0379/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0380/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0381/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0382/A.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0383/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0384/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0385/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0386/A.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0387/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0388/A.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0389/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0390/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0391/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0392/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0393/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0394/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0395/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0396/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0397/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0398/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0399/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0400/A.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0401/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0402/A.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0403/A.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0404/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0405/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0406/A.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0406_a/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0407/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0408/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0409/A.js102
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0410/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0411/A.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0412/A.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0413/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0414/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0414/B.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0415/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0416/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0417/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0418/A.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0419/A.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0420/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0421/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0422/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0423/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0424/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0425/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0426/A.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0427/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0428/A.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0429/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0430/A.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0431/A.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0432/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0433/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0434/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0435/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0436/A.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0437/A.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0438/D.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0438_a/W.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0439/C.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0439/E.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0440/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0441/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0442/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0443/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0444/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0445/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0446/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0447/A.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0448/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0449/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0450/A.js22
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0451/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0453/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0454/A.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0455/A.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0456/A.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0457/A.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0458/A.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0459/A.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0460/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0461/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0463/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0464/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0465/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0466/Assert.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0467/Assert.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0468/A.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0470/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0471/A.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0473/A.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0474/A.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0475/A.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0476/A.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0477/A.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0478/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0479/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0480/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0481/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0482/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0483/A.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0484/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0485/A.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0486/A.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0487/A.js27
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0488/A.js27
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0489/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0490/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0490/B.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0491/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0492/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0493/A.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0494/A.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0495/A.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0496/A.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0497/A.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0498/A.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0499/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0500/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0501/JavaEditor.js3243
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0502/A.js28
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0503/A.js27
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0504/A.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0505/A.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0506/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0507/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0507/B.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0508/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0509/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0509/B.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0510/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0511/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0512/A.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0513/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0514/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0515/A.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0516/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0517/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0518/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0519/A.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0520/A.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0521/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0522/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0523/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0524/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0525/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0526/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0527/A.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0528/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0529/A.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0530/A.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0531/A.js27
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0532/A.js27
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0533/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0534/A.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0535/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0536/A.js505
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0537/A.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0537/B.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0537/C.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0538/A.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0539/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0541/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0541/B.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0542/A.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0543/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0544/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0545/First.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0545/Second.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0545/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0545/Third.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0546/A.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0547/A.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0548/PaletteStackEditPart.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0549/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0550/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0551/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0552/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0553/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0554/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0554/B.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0555/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0555/B.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0556/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0557/A.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0559/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0560/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0561/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0562/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0563/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0564/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0565/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0566/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0567/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0568/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0569/A.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0570/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0573/X.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0573/Y.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0573/Z.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0574/X.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0575/X.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0578/X.js51
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0579/ParserTask.js91
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0580/DiamondSquareTerrainGenerator.js123
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0582/X.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0595/X.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0595a/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0597/X.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0599/X.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0600/C.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0600/Try.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0602/X.js2890
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0603/X.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0604/X.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0605/X.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0606/X.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0610/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0610/X.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0619/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0629/X.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0630/X.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0631/X.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0653/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0653/X.js22
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0657/A.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0657/X.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/bins/binaries.jarbin0 -> 1847 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/javadoc/b83804/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/javadoc/b83804/package-info.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/javadoc/b83804a/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/javadoc/b83804a/package-info.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/pack/A1.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/pack/A2.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/pack/A3.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/pack/E.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0001/X.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0002/X.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0003/X.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0004/X.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0005/X.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0006/X.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0007/X.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0008/X.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0009/X.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0010/X.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0011/X.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0012/X.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0013/X.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0014/X.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0015/X.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0016/X.js82
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0017/X.js30
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0018/X.js41
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0019/X.js41
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0020/X.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0021/X.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0022/X.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0023/X.js82
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0024/X.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0025/X.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0026/X.js39
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0027/X.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0028/X.js25
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0029/X.js28
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0030/X.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0031/X.js28
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0032/X.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0033/X.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0034/X.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0035/X.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0036/X.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0037/X.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0038/X.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0039/X.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0040/X.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0041/Action.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0041/Controller.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0041/Forward.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0041/ViewProperties.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0041/X.js50
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0042/X.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0043/X.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0044/X.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0045/X.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0046/X.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0047/X.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0048/X.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0049/X.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0050/X.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0051/X.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0052/X.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0053/X.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0054/X.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0055/X.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0056/X.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0057/X.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0058/X.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0059/X.js23
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0063/X.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0064/X.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0065/X.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0067/X.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0068/X.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0069/X.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0070/X.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0071/X.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0072/X.js52
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0073/X.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0074/X.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0076/X.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0077/X.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0081/X.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0082/X.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0083/X.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0084/X.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0085/X.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0088/X.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0103/A.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0103/X.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0104/X.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0104a/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0137/Source.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0137/X.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0139/X.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0139a/C.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0140/Annot.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0140/X.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0147/X.js20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0153/X.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0167/X.js27
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0185/X.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0186/X.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0191/E.js62
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0191/X.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0230/Test.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0230/Test2.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0230/Test3.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0231/Test.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0231/Test2.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0231/Test3.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CreateMembers/src/A.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CreateMembers/src/A2.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CreateMembers/src/Annot.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CreateMembers/src/E.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CreateMembers/src/E2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CreateMembers/src/E3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/src/testBug110576/Test.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/src/testBug66898/Test.js22
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/src/testBug66898b/Test.js22
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/src/testUTF8/Test.js22
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/src/testUTF8BOM/Test.js22
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/testUTF8.jarbin0 -> 1737 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/testUTF8.zipbin0 -> 1038 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test001/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test001/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test002/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test002/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test003/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test003/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test004/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test004/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test005/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test005/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test006/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test006/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test007/A_in.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test007/A_out.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test008/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test008/A_out.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test009/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test009/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test010/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test010/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test011/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test011/A_out.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test012/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test012/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test013/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test013/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test014/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test014/A_out.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test015/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test015/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test016/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test016/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test017/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test017/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test018/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test018/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test019/A_1_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test019/A_1_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test019/A_2_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test019/A_2_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test020/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test020/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test021/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test021/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test022/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test022/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test023/A_in.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test023/A_out.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test024/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test024/A_out.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test025/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test025/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test026/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test026/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test027/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test027/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test028/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test028/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test029/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test029/A_out.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test030/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test030/A_out.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test031/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test031/A_out.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test032/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test032/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test033/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test033/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test034/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test034/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test035/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test035/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test036/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test036/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test037/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test037/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test038/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test038/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test039/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test039/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test040/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test040/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test041/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test041/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test042/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test042/A_out.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test043/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test043/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test044/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test044/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test045/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test045/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test046/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test046/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test047/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test047/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test048/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test048/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test049/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test049/A_out.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test050/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test050/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test051/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test051/A_out.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test052/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test052/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test053/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test053/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test054/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test054/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test055/A_in.js31
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test055/A_out.js32
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test056/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test056/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test057/A_in.js293
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test057/A_out.js289
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test058/A_in.js135
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test058/A_out.js117
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test059/Parser_in.js293
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test059/Parser_out.js289
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test060/Parser_in.js135
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test060/Parser_out.js117
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test061/Parser_in.js135
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test061/Parser_out.js117
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test062/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test062/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test063/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test063/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test064/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test064/A_out.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test065/A_in.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test065/A_out.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test066/A_in.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test066/A_out.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test067/A_in.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test067/A_out.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test068/A_in.js23
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test068/A_out.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test069/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test069/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test070/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test070/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test071/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test071/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test072/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test072/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test073/A_in.js38
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test073/A_out.js31
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test074/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test074/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test075/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test075/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test076/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test076/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test077/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test077/A_out.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test078/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test078/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test079/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test079/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test080/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test080/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test081/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test081/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test082/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test082/A_out.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test083/A_in.js28
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test083/A_out.js26
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test084/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test084/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test085/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test085/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test086/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test086/A_out.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test087/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test087/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test088/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test088/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test089/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test089/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test090/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test090/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test091/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test091/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test092/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test092/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test093/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test093/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test094/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test094/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test095/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test095/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test096/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test096/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test097/A_in.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test097/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test098/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test098/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test099/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test099/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test100/A_in.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test100/A_out.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test101/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test101/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test102/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test102/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test103/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test103/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test104/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test104/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test105/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test105/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test106/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test106/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test107/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test107/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test108/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test108/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test109/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test109/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test110/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test110/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test111/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test111/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test112/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test112/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test113/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test113/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test114/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test114/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test115/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test115/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test116/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test116/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test117/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test117/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test118/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test118/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test119/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test119/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test120/A_in.js22
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test120/A_out.js20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test121/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test121/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test122/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test122/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test123/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test123/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test124/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test124/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test125/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test125/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test126/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test126/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test127/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test127/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test128/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test128/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test129/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test129/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test130/A_in.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test130/A_out.js20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test131/A_in.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test131/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test132/A_in.js94
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test132/A_out.js94
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test133/A_in.js156
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test133/A_out.js144
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test134/A_in.js142
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test134/A_out.js144
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test135/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test135/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test136/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test136/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test137/A_in.js129
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test137/A_out.js119
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test138/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test138/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test139/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test139/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test140/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test140/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test141/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test141/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test142/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test142/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test143/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test143/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test144/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test144/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test145/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test145/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test146/A_in.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test146/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test147/A_in.js40
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test147/A_out.js37
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test148/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test148/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test149/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test149/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test150/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test150/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test151/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test151/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test152/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test152/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test153/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test153/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test154/A_in.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test154/A_out.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test155/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test155/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test156/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test156/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test157/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test157/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test158/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test158/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test159/A_in.js44
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test159/A_out.js44
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test160/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test160/A_out.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test161/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test161/A_out.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test162/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test162/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test163/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test163/A_out.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test164/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test164/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test165/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test165/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test166/A_in.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test166/A_out.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test167/A_in.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test167/A_out.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test168/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test168/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test169/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test169/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test170/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test170/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test171/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test171/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test172/A_in.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test172/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test173/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test173/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test174/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test174/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test175/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test175/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test176/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test176/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test177/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test177/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test178/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test178/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test179/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test179/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test180/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test180/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test181/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test181/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test182/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test182/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test183/A_in.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test183/A_out.js29
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test184/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test184/A_out.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test185/A_in.js31
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test185/A_out.js31
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test186/A_in.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test186/A_out.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test187/A_in.js380
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test187/A_out.js308
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test188/A_in.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test188/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test189/A_in.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test189/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test190/A_in.js50
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test190/A_out.js52
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test191/A_in.js44
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test191/A_out.js43
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test192/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test192/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test193/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test193/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test194/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test194/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test195/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test195/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test196/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test196/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test197/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test197/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test198/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test198/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test199/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test199/A_out.js22
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test200/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test200/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test201/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test201/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test202/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test202/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test203/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test203/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test204/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test204/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test205/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test205/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test206/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test206/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test207/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test207/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test208/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test208/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test209/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test209/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test210/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test210/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test211/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test211/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test212/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test212/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test213/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test213/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test214/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test214/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test215/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test215/A_out.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test216/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test216/A_out.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test217/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test217/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test218/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test218/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test219/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test219/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test220/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test220/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test221/A_in.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test221/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test222/A_in.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test222/A_out.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test223/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test223/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test224/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test224/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test225/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test225/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test226/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test226/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test227/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test227/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test228/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test228/A_out.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test229/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test229/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test230/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test230/A_out.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test231/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test231/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test232/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test232/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test233/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test233/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test234/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test234/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test235/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test235/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test236/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test236/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test237/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test237/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test238/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test238/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test239/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test239/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test240/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test240/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test241/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test241/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test242/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test242/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test243/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test243/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test244/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test244/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test245/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test245/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test246/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test246/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test247/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test247/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test248/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test248/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test249/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test249/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test250/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test250/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test251/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test251/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test252/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test252/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test253/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test253/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test254/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test254/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test255/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test255/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test256/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test256/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test257/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test257/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test258/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test258/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test259/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test259/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test260/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test260/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test261/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test261/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test262/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test262/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test263/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test263/A_out.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test264/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test264/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test265/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test265/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test266/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test266/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test267/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test267/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test268/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test268/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test269/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test269/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test270/A_in.js23
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test270/A_out.js23
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test271/A_in.js23
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test271/A_out.js31
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test272/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test272/A_out.js35
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test273/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test273/A_out.js44
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test274/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test274/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test275/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test275/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test276/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test276/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test277/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test277/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test278/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test278/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test279/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test279/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test280/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test280/A_out.js27
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test281/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test281/A_out.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test282/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test282/A_out.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test283/A_in.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test283/A_out.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test284/A_in.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test284/A_out.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test285/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test285/A_out.js22
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test286/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test286/A_out.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test287/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test287/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test288/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test288/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test289/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test289/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test290/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test290/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test291/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test291/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test292/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test292/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test293/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test293/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test294/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test294/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test295/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test295/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test296/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test296/A_out.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test297/A_in.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test297/A_out.js20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test298/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test298/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test299/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test299/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test300/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test300/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test301/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test301/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test302/A_in.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test302/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test303/A_in.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test303/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test304/A_in.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test304/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test305/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test305/A_out.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test306/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test306/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test307/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test307/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test308/A_in.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test308/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test309/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test309/A_out.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test310/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test310/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test311/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test311/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test312/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test312/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test313/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test313/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test314/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test314/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test319/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test319/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test320/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test320/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test321/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test321/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test322/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test322/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test323/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test323/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test324/A_in.js25
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test324/A_out.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test325/A_in.js25
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test325/A_out.js23
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test326/A_in.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test326/A_out.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test327/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test327/A_out.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test328/A_in.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test328/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test329/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test329/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test330/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test330/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test331/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test331/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test332/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test332/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test333/A_in.js53
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test333/A_out.js55
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test334/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test334/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test335/A_in.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test335/A_out.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test336/A_in.js31
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test336/A_out.js30
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test337/A_in.js339
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test337/A_out.js346
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test338/A_in.js20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test338/A_out.js20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test339/A_in.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test339/A_out.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test340/A_in.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test340/A_out.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test341/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test341/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test342/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test342/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test343/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test343/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test344/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test344/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test345/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test345/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test346/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test346/A_out.js20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test347/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test347/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test348/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test348/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test349/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test349/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test350/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test350/A_out.js23
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test351/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test351/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test352/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test352/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test353/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test353/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test354/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test354/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test355/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test355/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test356/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test356/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test357/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test357/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test358/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test358/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test359/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test359/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test360/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test360/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test361/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test361/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test362/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test362/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test363/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test363/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test364/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test364/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test365/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test365/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test366/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test366/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test367/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test367/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test368/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test368/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test369/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test369/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test370/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test370/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test371/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test371/A_out.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test372/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test372/A_out.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test373/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test373/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test374/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test374/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test375/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test375/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test376/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test376/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test377/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test377/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test378/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test378/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test379/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test379/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test380/A_in.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test380/A_out.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test381/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test381/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test382/A_in.js80
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test382/A_out.js82
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test383/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test383/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test384/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test384/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test385/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test385/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test386/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test386/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test387/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test387/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test388/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test388/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test389/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test389/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test390/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test390/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test391/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test391/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test392/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test392/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test393/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test393/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test394/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test394/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test395/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test395/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test396/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test396/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test397/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test397/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test398/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test398/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test399/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test399/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test400/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test400/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test401/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test401/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test402/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test402/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test403/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test403/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test404/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test404/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test405/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test405/A_out.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test406/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test406/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test407/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test407/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test408/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test408/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test409/A_in.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test409/A_out.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test410/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test410/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test411/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test411/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test412/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test412/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test413/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test413/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test414/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test414/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test415/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test415/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test416/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test416/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test417/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test417/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test418/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test418/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test419/A_in.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test419/A_out.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test420/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test420/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test421/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test421/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test422/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test422/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test423/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test423/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test424/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test424/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test425/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test425/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test426/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test426/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test427/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test427/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test428/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test428/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test429/A_in.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test429/A_out.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test430/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test430/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test431/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test431/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test432/A_in.js838
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test432/A_out.js839
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test432/formatter.xml159
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test433/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test433/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test434/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test434/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test435/A_in.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test435/A_out.js23
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test436/A_in.js33
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test436/A_out.js34
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test437/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test437/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test437/formatter.xml163
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test438/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test438/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test438/formatter.xml163
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test439/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test439/A_out.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test439/formatter.xml162
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test440/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test440/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test441/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test441/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test442/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test442/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test443/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test443/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test444/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test444/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test445/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test445/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test446/A_in.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test446/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test447/test447.zipbin0 -> 1852 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test448/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test448/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test449/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test449/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test450/A_in.js0
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test450/A_out.js0
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test451/test451.zipbin0 -> 2024 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test452/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test452/A_out.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test453/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test453/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test454/test454.zipbin0 -> 1774 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test455/A_in.js49
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test455/A_out.js51
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test456/test456.zipbin0 -> 1760 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test457/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test457/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test458/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test458/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test459/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test459/A_out.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test460/A_in.js31
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test460/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test461/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test461/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test462/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test462/A_out.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test462/formatter.xml182
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test463/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test463/A_out.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test464/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test464/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test465/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test465/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test466/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test466/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test467/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test467/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test468/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test468/A_out.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test469/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test469/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test470/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test470/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test471/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test471/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test472/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test472/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test473/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test473/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test474/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test474/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test475/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test475/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test476/A_in.js30
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test476/A_out.js30
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test478/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test478/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test479/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test479/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test480/A_in.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test480/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test481/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test481/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test482/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test482/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test483/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test483/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test484/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test484/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test485/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test485/A_out.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test486/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test486/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test487/A_in.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test487/A_out.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test488/A_in.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test488/A_out.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test489/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test489/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test490/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test490/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test491/BundleChain_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test491/BundleChain_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test491/formatter.xml181
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test492/Main_in.js1574
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test492/Main_out.js1574
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test492/core_formatting.xml181
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test493/MyClass_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test493/MyClass_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test494/A_in.js26
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test494/A_out.js25
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test494/format.xml180
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test495/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test495/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test496/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test496/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test497/A_in.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test497/A_out.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test498/A_in.js207
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test498/A_out.js205
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test499/A_in.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test499/A_out.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test500/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test500/A_out.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test501/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test501/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test501/formatter.xml183
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test502/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test502/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test503/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test503/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test504/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test504/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test505/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test505/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test506/A_in.js77
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test506/A_out.js87
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test507/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test507/A_out.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test508/A_in.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test508/A_out.js22
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test509/A_in.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test509/A_out.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test510/A_in.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test510/A_out.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test511/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test511/A_out.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test512/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test512/A_out.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test513/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test513/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test514/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test514/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test514/formatter.xml186
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test515/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test515/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test516/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test516/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test517/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test517/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test518/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test518/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test519/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test519/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test520/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test520/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test521/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test521/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test522/A_in.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test522/A_out.js33
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test523/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test523/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test524/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test524/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test525/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test525/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test526/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test526/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test527/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test527/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test528/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test528/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test529/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test529/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test530/A_in.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test530/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test531/A_in.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test531/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test532/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test532/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test533/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test533/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test534/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test534/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test535/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test535/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test536/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test536/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test537/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test537/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test538/A_in.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test538/A_out.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test539/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test539/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test540/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test540/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test541/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test541/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test542/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test542/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test543/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test543/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test544/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test544/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test545/A_in.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test545/A_out.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test546/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test546/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test547/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test547/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test548/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test548/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test549/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test549/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test550/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test550/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test551/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test551/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test552/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test552/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test553/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test553/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test554/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test554/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test555/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test555/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test556/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test556/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test557/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test557/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test558/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test558/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test559/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test559/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test560/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test560/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test561/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test561/A_out.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test562/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test562/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test563/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test563/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test564/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test564/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test565/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test565/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test566/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test566/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test567/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test567/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test568/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test568/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test569/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test569/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test570/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test570/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test571/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test571/A_out.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test572/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test572/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test573/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test573/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test574/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test574/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test575/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test575/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test576/A_in.js41
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test576/A_out.js40
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test577/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test577/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test578/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test578/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test579/A_in.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test579/A_out.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test580/A_in.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test580/A_out.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test581/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test581/A_out.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test582/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test582/A_out.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test583/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test583/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test584/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test584/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test585/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test585/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test586/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test586/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test587/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test587/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test588/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test588/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test589/A_in.js35
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test589/A_out.js34
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test590/A_in.js33
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test590/A_out.js33
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test591/A_in.js33
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test591/A_out.js33
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test592/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test592/A_out.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test593/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test593/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test594/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test594/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test595/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test595/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test596/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test596/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test597/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test597/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test598/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test598/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test599/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test599/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test600/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test600/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test601/A_in.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test601/A_out.js36
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test605/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test605/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test606/A_in.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test606/A_out.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test607/A_in.js70
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test607/A_out.js69
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test608/A_in.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test608/A_out.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test609/A_in.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test609/A_out.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test610/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test610/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test610/formatter.xml246
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test612/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test612/A_out.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test613/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test613/A_out.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test614/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test614/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test615/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test615/A_out.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test616/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test616/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test617/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test617/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test617/formatter.xml246
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test618/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test618/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test619/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test619/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test620/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test620/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test621/A_in.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test621/A_out.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test622/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test622/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test623/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test623/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test624/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test624/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test625/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test625/A_out.js13298
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test626/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test626/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test627/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test627/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test628/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test628/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test629/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test629/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test630/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test630/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test631/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test631/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test632/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test632/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test633/A_in.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test633/A_out.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test634/A_in.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test634/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test635/A_in.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test635/A_out.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test636/A_in.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test636/A_out.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test637/A_in.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test637/A_out.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test638/A_in.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test638/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test639/A_in.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test639/A_out.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test640/A_in.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test640/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test641/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test641/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test642/A_in.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test642/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test642/formatter.prefs248
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test642/formatter.xml251
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test643/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test643/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test644/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test644/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test645/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test645/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test646/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test646/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test647/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test647/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test648/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test648/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test649/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test649/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test650/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test650/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test651/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test651/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test652/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test652/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test653/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test653/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test654/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test654/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test655/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test655/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/NotInClasspath/p/Y.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/otherSrc()/X31997.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/otherSrc()/X92210.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/otherSrc()/Y31997.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/CA.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/D.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/E.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/O.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/Test.js29
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/TypeReferenceAsSingleNameReference.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/W.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/X.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a2/X.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a3/References.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a3/X.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a3/Y.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a3/Z.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a3/b/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a3/b/B.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a4/X.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a5/B.js25
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a6/A.js26
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a7/X.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a8/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a9/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/b1/A.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/b1/B.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/p/A.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/p/X.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/p/Y.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/p/Z.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/p/cls1.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/p/usecls1.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectSrcTests/src/A.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/B.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/lib.jarbin0 -> 783 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/lib142530.jarbin0 -> 316 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/lib148949.jarbin0 -> 308 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/q/A.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/q/readme.txt0
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/x/readme.txt0
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/x/readme2.txt0
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/x/y/Main.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/AbortCompilation.jarbin0 -> 1711 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/AbortCompilation.zipbin0 -> 2522 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/MyJar.jarbin0 -> 2040 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/MyJar.zipbin0 -> 533 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/NotInClasspath/p/Y.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/b111416.jarbin0 -> 846 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/corrupt.jar0
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/otherSrc()/X31997.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/otherSrc()/X92210.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/otherSrc()/Y31997.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/B.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/CA.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/D.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/E.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/InterfaceImplementors.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/MemberTypeReference/Azz.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/MemberTypeReference/B.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/NoReference/A.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/O.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/ObjectMemberTypeReference/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PR_1GGNOTF.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/A.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/B.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/C.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/D.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/E.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/F.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/G.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/H.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/I.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/J.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/K.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceA.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceB.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceC.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceD.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceE.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceF.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceG.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceH.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceI.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceJ.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/Test.js22
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/TypeReferenceAsSingleNameReference.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/TypeReferenceInArray/A.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/TypeReferenceInImport/X.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/VariousTypeReferences/A.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/VariousTypeReferences/B.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/VariousTypeReferences/C.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/VariousTypeReferences/D.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/W.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/X.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a2/X.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a3/References.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a3/X.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a3/Y.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a3/Z.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a3/b/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a3/b/B.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a4/X.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a5/B.js25
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a6/A.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a7/X.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a8/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a9/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b1/A.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b1/B.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b111416/X.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b2/X.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b2/Y.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b2/Z.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b3/X.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b4/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b5/A.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b6/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b7/X.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b8/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b9/Foo.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c1/A.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c1/B.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c1/I.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c10/X.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c11/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c2/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c2/B.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c3/C.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c4/X.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c5/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c6/X.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c7/X.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c7/Y.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c8/X.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c8/Y.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c9/X.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d1/X.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d2/Y.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d2/Z.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d3/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d4/X.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d4/Y.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d5/X.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d5/Y.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d6/X.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d6/Y.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d7/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d8/A.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d8/AA.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d9/p1/A.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d9/p2/B.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e1/A29366.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e2/X.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e3/X31985.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e3/Y31985.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e4/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e5/A1.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e6/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e7/A.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e8/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e9/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/f1/X.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/f2/X.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/f3/X.js24
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j1/JavadocHiddenRef.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j1/JavadocInvalidRef.js20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j1/JavadocSearched.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j1/JavadocValidRef.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j2/Bug47968.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j2/Bug47968s.js30
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j3/Y.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/CC47209.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/CF47209.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/CM47209.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/CT47209.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/FC47209.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/FF47209.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/FM47209.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/FT47209.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/MC47209.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/MF47209.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/MM47209.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/MT47209.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/TC47209.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/TF47209.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/TM47209.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/TT47209.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j5/Bug49994.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j6/Bug54962.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j7/qua/li/fied/Bug54962a.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/net/sf/saxon/om/Navigator.js637
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p/A.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p/I.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p/X.js20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p/Y.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p/Z.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p10/a/b/dom/Y.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p10/a/b/om/X.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p2/Z.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p3/X.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p3/p2/p/X.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p4/A.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p5/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p6/A.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p7/A.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p71267/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p71267/q71267/Test.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p8/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p9/X.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q1/B.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q2/A.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q3/A$B.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q4/C.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q5/AQ.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q6/CD.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q7/AQ.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q8/EclipseTest.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q9/I.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r/A.js20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r2/I.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r2/X.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r3/A21485.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r4/B21485.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r5/XYZ.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r6/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r6/B.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r7/A.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r7/B.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r8/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r9/A.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s1/X.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s1/Y.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s2/X.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s2/Z.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s3/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s4/X.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s5/A.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/sd/AQ.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/wc/X.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/wc1/X.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/wc2/Y.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/wc3/X44884.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test20631.jarbin0 -> 978 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test20631.zipbin0 -> 208 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test24741.jarbin0 -> 1145 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test47909.jarbin0 -> 1093 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test47989.jarbin0 -> 1168 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test48261.jarbin0 -> 1207 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test48725.jarbin0 -> 1240 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/a1/Author.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/a1/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/e1/Team.js29
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/e1/Test.js28
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/m/def/Generic.js20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/m/def/NonGeneric.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/m/ref/R1.js26
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/m/ref/R2.js26
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/m/ref/R3.js26
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/m/ref/R4.js26
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/s/def/Generic.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/s/def/NonGeneric.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/s/ref/R1.js26
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/s/ref/R2.js26
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/s/ref/R3.js26
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/s/ref/R4.js26
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/def/R1.js38
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/def/R2.js38
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/def/R3.js54
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/def/R4.js38
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/ref/RR1.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/ref/RR2.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/ref/RR3.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/ref/RR4.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/def/R1.js38
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/def/R2.js38
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/def/R3.js54
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/def/R4.js38
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/ref/RR1.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/ref/RR2.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/ref/RR3.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/ref/RR4.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/def/GM.js20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/def/GS.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/def/NGM.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/def/NGS.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/ref/R1.js43
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/ref/R2.js43
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/ref/R3.js43
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/ref/R4.js43
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g4/v/ref/R1.js35
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g4/v/ref/R2.js36
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g4/v/ref/R3.js35
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g4/v/ref/R4.js35
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g4/v/ref/R5.js48
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/c/def/Multiple.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/c/def/Single.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/c/ref/RefMultiple.js27
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/c/ref/RefRaw.js22
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/c/ref/RefSingle.js27
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/m/def/Multiple.js32
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/m/def/Single.js32
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/m/ref/RefMultiple.js42
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/m/ref/RefRaw.js26
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/m/ref/RefSingle.js59
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g6/t/def/List.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g6/t/def/Table.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g6/t/ref/Multiple.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g6/t/ref/QualifMultiple.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g6/t/ref/QualifSingle.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g6/t/ref/Single.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/p1/X.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/p1/Y.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/p2/X.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/p2/Y.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/p3/X.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s1/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s1/B.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s1/C.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s1/D.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s1/pack/age/S.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s2/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s2/B.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s2/C.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s2/D.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s2/pack/age/S.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/v1/X.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/JavaSearch15.jarbin0 -> 8077 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b110422.jarbin0 -> 724 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b123679.jarbin0 -> 2782 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b124469.jarbin0 -> 6234 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b124645.jarbin0 -> 6715 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b125178.jarbin0 -> 2098 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b126330.jarbin0 -> 1135 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b128877.jarbin0 -> 1851 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b137984.jarbin0 -> 1688 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b140156.jarbin0 -> 928 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b148215.jarbin0 -> 1675 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b164791.jarbin0 -> 3587 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b166348.jarbin0 -> 955 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b86293.jarbin0 -> 1568 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b87627.jarbin0 -> 1169 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b89848/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b89848/X.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b95152.jarbin0 -> 6646 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/test75816.jarbin0 -> 1169 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/test81556.jarbin0 -> 717 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b108088/B108088.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b108088/Test108088.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b123679/pack/I123679.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b123679/test/Test.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b124645/T_124645.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b124645/test/A_124645.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b124645/test/X_124645.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b124645/xy/X_124645.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b124645/xy/Y_124645.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b127628/Test127628.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b137984/C.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b163984/A.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b163984/B.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b163984/C.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b81556/a/A81556.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b81556/a/B81556.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b81556/a/X81556.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b81556/b/XX81556.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b86380/Annot.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b95794/Test.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchMultipleProjects1/lib/p/X.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchMultipleProjects2/lib/p/Y.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchMultipleProjects2/src/q/Z.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/class-folder/ResolveConstructorCall.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/class-folder/ResolveConstructorCallOfMemberType.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/class-folder/ResolveConstructorCallOfMemberType2.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/class-folder/test0101/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/jj.jarbin0 -> 997 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/jjsrc.zipbin0 -> 428 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/p3.jarbin0 -> 483 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/p3src.zipbin0 -> 328 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/p4.jarbin0 -> 483 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/p4src.zipbin0 -> 328 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveAbstractMethod.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveArgumentName.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveArrayLength.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveArrayParameterInsideParent1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveCatchArgumentName.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveCatchArgumentType1.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveCatchArgumentType2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveClass1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveClass2.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveClass3.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveClass4.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveClass5.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveClass6.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveConstructor.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveConstructorDeclaration.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDeepLocalVariable.js24
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateFieldDeclaration.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateFieldDeclaration3.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateMethodDeclaration.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateMethodDeclaration11.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateMethodDeclaration3.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateMethodDeclaration5.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateMethodDeclaration7.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateMethodDeclaration9.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateTypeDeclaration.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateTypeDeclaration3.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateTypeDeclaration5.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveEmptySelectionOnMethod.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveEndOfFile.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveExplicitSuperConstructorCall.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveExplicitThisConstructorCall.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveField.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveField0.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveFieldDeclaration.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveImport.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveInnerClassAsParamater.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveInterface.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass1.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass2.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass3.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass4.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass5.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass6.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass7.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalConstructor.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalConstructorDeclaration.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalField.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalField2.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalFieldDeclaration.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalMemberTypeDeclaration1.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalMemberTypeDeclaration2.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalMethod.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalMethod2.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalMethodDeclaration.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalName.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalVariable.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMemberTypeDeclaration1.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMemberTypeDeclaration2.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMessageSendOnBaseType.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethod.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethodDeclaration.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethodDeclarationInAnonymous.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethodDeclarationInAnonymous2.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethodDeclarationInAnonymous3.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethodDeclarationInInterface.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethodWithIncorrectParameter.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolvePackage.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolvePartiallyQualifiedType.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveQualifiedName1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveQualifiedName2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveQualifiedName3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveQualifiedName4.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveQualifiedName5.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveQualifiedType.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveTypeDeclaration.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveTypeEmptySelection.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveTypeEmptySelection2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveTypeInComment.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveUnicode.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/SuperClass.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/SuperInterface.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/X1.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/a/b/ImportedClass.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/b120350/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/b120350/X.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/p1/X.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/p1/Y.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/p2/X.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/pp/qq/XX.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0001/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0002/Test.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0003/Test.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0005/Test.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0006/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0007/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0008/Test.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0009/Test.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0010/Test.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0011/Test.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0012/Test.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0013/Test.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0014/Test.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0015/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0016/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0017/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0018/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0019/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0020/Test.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0021/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0022/A.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0022/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0022/X.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0022/Y.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0023/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0024/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0025/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test0023.jarbin0 -> 4537 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test0023src.zipbin0 -> 923 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test25888.jarbin0 -> 1083 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test25888src.zipbin0 -> 286 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test47177.jarbin0 -> 1236 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test47177src.zipbin0 -> 608 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test47214.jarbin0 -> 1126 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/zzz.jarbin0 -> 1621 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/zzzsrc.zipbin0 -> 400 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/SnippetCompletion/class-folder/aa/bb/cc/CClass.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/SnippetCompletion/class-folder/bug132665/Bug132665.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/SnippetCompletion/src/aa/bb/cc/BClass.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/NotInClasspath/e/E.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/lib.jarbin0 -> 6026 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/lib48459/p48459/p2/Y48459.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/lib53095/p53095/X53095.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/cycle/X.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/cycle/Y.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/A.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/Deep.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/I1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/I2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/X.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/Y.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/Z.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p2/I.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p2/I1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p2/I2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p2/I3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p2/X.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p2/Y.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p3/A.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p3/B.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p3/I.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p3/I1.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p4/X.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p48459/p1/X48459.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p48459/p1/Z48459.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p5/X.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p6/A.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p7/A.js37
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p7/X.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p8/X.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p9/X.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q1/X.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q1/Z.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q2/Y.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q3/Z.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q4/X.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q4/Y.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q5/X.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q6/Y.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q6/Z.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q7/X.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/wc/X.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/test144976.jarbin0 -> 1235 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/test49809.jarbin0 -> 682 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/test54043.jarbin0 -> 2263 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/test58440.jarbin0 -> 1620 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/test60365.jarbin0 -> 902 bytes
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyDependent/Dependent.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/a/A.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/b/B.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/c/C.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/d/D.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/e/E.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/i/I1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/i/I2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p/External.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p/MyError.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p/X.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p/other/External.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p2/A.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p2/B.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p3/A.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p3/B.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/I1.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/I2.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/I3.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/I4.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/I5.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/I6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/X.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/Y.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/Z.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p/TypeResolve.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p1/X.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p2/Y.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p3/B.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p4/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p4/B.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p5/A.js10
3953 files changed, 190202 insertions, 15347 deletions
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverter15Test.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverter15Test.java
index 163da20..d684c7b 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverter15Test.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverter15Test.java
@@ -64,7 +64,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0001() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0001", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0001", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -121,7 +121,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0002() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0002", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0002", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -129,7 +129,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0003() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0003", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0003", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -166,7 +166,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0004() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0004", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0004", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -203,7 +203,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0005() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0005", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0005", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -269,12 +269,12 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0006() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0006", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0006", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
CompilationUnit compilationUnit = (CompilationUnit) result;
- final String expectedOutput = "Package annotations must be in file package-info.java";
+ final String expectedOutput = "Package annotations must be in file package-info.js";
assertProblemsSize(compilationUnit, 1, expectedOutput);
PackageDeclaration packageDeclaration = compilationUnit.getPackage();
assertNotNull("No package declaration", packageDeclaration);
@@ -289,7 +289,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0007() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0007", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0007", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -307,7 +307,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
/** @deprecated using deprecated code */
public void test0008() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0008", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0008", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS2, sourceUnit, true);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -319,7 +319,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0009() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0009", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0009", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
char[] source = sourceUnit.getSource().toCharArray();
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -343,7 +343,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0010() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0010", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0010", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
char[] source = sourceUnit.getSource().toCharArray();
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -373,7 +373,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0011() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0011", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0011", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
char[] source = sourceUnit.getSource().toCharArray();
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -404,7 +404,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0012() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0012", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0012", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
char[] source = sourceUnit.getSource().toCharArray();
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -428,7 +428,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0013() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0013", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0013", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
char[] source = sourceUnit.getSource().toCharArray();
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -472,7 +472,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0014() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0014", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0014", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
char[] source = sourceUnit.getSource().toCharArray();
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -508,7 +508,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0015() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0015", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0015", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
char[] source = sourceUnit.getSource().toCharArray();
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -536,7 +536,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0016() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0016", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0016", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
char[] source = sourceUnit.getSource().toCharArray();
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -550,7 +550,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0017() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0017", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0017", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
char[] source = sourceUnit.getSource().toCharArray();
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -597,7 +597,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0018() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0018", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0018", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
char[] source = sourceUnit.getSource().toCharArray();
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -642,7 +642,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0019() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0019", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0019", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
char[] source = sourceUnit.getSource().toCharArray();
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -687,7 +687,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0020() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0020", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0020", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
char[] source = sourceUnit.getSource().toCharArray();
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -709,7 +709,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0021() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0021", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0021", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
char[] source = sourceUnit.getSource().toCharArray();
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -736,7 +736,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0022() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0022", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0022", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
char[] source = sourceUnit.getSource().toCharArray();
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -763,7 +763,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0023() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0023", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0023", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
char[] source = sourceUnit.getSource().toCharArray();
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -784,7 +784,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0024() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0024", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0024", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
char[] source = sourceUnit.getSource().toCharArray();
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -806,7 +806,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0025() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0025", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0025", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
char[] source = sourceUnit.getSource().toCharArray();
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -822,7 +822,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0026() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0026", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0026", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -955,7 +955,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0027() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0027", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0027", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -1037,7 +1037,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0028() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0028", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0028", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -1066,7 +1066,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0029() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0029", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0029", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -1077,7 +1077,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=67790
*/
public void test0030() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0030", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0030", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -1089,7 +1089,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0031() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0031", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0031", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -1097,7 +1097,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0032() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0032", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0032", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -1116,7 +1116,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0033() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0033", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0033", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -1125,7 +1125,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0034() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0034", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0034", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -1137,7 +1137,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=70292
*/
public void test0035() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0035", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0035", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -1149,7 +1149,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=67790
*/
public void test0036() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0036", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0036", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertNotNull(result);
@@ -1172,7 +1172,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=68838
*/
public void test0037() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0037", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0037", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -1230,7 +1230,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=69066
*/
public void test0038() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0038", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0038", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertNotNull(result);
@@ -1299,7 +1299,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=72233
*/
public void test0039() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0039", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0039", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -1311,7 +1311,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=72248
*/
public void test0040() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0040", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0040", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -1338,7 +1338,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=72477
*/
public void test0041() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0041", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0041", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -1350,7 +1350,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=73048
*/
public void test0042() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0042", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0042", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -1377,7 +1377,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=72882
*/
public void test0043() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0043", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0043", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -1400,7 +1400,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=72891
*/
public void test0044() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0044", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0044", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -1439,7 +1439,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=72891
*/
public void test0045() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0045", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0045", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -1466,7 +1466,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=72889
*/
public void test0046() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0046", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0046", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -1493,7 +1493,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=72859
*/
public void test0047() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0047", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0047", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -1505,7 +1505,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=73561
*/
public void test0048() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0048", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0048", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertNotNull(result);
@@ -1535,7 +1535,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=73561
*/
public void test0049() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0049", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0049", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertNotNull(result);
@@ -1565,7 +1565,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Ellipsis
*/
public void test0050() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0050", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0050", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertNotNull(result);
@@ -1592,7 +1592,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Ellipsis
*/
public void test0051() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0051", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0051", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertNotNull(result);
@@ -1619,7 +1619,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=76103
*/
public void test0052() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0052", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0052", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -1631,7 +1631,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=76100
*/
public void test0053() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0053", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0053", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -1647,7 +1647,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=76100
*/
public void test0054() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0054", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0054", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -1663,7 +1663,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=76100
*/
public void test0055() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0055", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0055", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -1679,7 +1679,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
*
*/
public void test0056() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0056", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0056", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -1692,7 +1692,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=77175
*/
public void test0057() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0057", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0057", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -1711,7 +1711,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=77249
*/
public void test0058() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0058", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0058", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, false, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -1727,7 +1727,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=77772
*/
public void test0059() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0059", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0059", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -1740,7 +1740,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* (regression test for 73970 [1.5][dom] overloaded parameterized methods have same method binding key)
*/
public void test0060() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/p/X.js", true/*resolve*/);
ASTNode node = buildAST(
"package p;\n" +
"/*start*/public class X {\n" +
@@ -1773,7 +1773,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* (regression test for 77808 [1.5][dom] type bindings for raw List and List<E> have same key)
*/
public void test0061() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/p/X.js", true/*resolve*/);
ASTNode node = buildAST(
"package p;\n" +
"/*start*/public class X<T> {\n" +
@@ -1789,7 +1789,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Ensures that the type arguments of a parameterized type are included in its binding key.
*/
public void test0062() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/p/X.js", true/*resolve*/);
ASTNode node = buildAST(
"package p;\n" +
"public class X<T> {\n" +
@@ -1806,7 +1806,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=78183
*/
public void test0063() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0063", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0063", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -1840,7 +1840,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=78183
*/
public void test0064() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0064", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0064", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -1874,7 +1874,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=78183
*/
public void test0065() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0065", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0065", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -1911,7 +1911,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* (regression test for 77808 [1.5][dom] type bindings for raw List and List<E> have same key)
*/
public void test0066() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/p/X.js", true/*resolve*/);
ASTNode node = buildAST(
"package p;\n" +
"public class X<T> {\n" +
@@ -1929,7 +1929,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=78649
*/
public void test0067() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0067", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0067", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -1958,7 +1958,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=78649
*/
public void test0068() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0068", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0068", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -1987,7 +1987,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=78934
*/
public void test0069() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0069", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0069", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -2038,7 +2038,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=78934
*/
public void test0070() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0070", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0070", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -2085,7 +2085,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=78930
*/
public void test0071() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0071", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0071", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -2108,7 +2108,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=77645
*/
public void test0072() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15", "src", "test0072", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15", "src", "test0072", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -2187,7 +2187,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=77806
*/
public void test0073() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0073", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0073", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -2220,7 +2220,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=78934
*/
public void test0074() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0074", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0074", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -2271,7 +2271,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=79271
*/
public void test0075() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/p/X.js", true/*resolve*/);
ASTNode node = buildAST(
"package p;\n" +
"import java.util.ArrayList;\n" +
@@ -2288,7 +2288,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=79362
*/
public void test0076() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0076", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0076", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(result);
@@ -2315,7 +2315,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=79362
*/
public void test0077() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0077", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0077", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(result);
@@ -2342,7 +2342,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=79460
*/
public void test0078() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/p/X.js", true/*resolve*/);
ASTNode node = buildAST(
"package p;\n" +
"public class X<T> {\n" +
@@ -2359,7 +2359,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=79460
*/
public void test0079() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/p/X.js", true/*resolve*/);
ASTNode node = buildAST(
"package p;\n" +
"public class X {\n" +
@@ -2388,7 +2388,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=79460
*/
public void test0080() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/p/X.js", true/*resolve*/);
ASTNode node = buildAST(
"package p;\n" +
"public class X {\n" +
@@ -2417,7 +2417,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=79460
*/
public void test0081() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0081", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0081", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -2449,7 +2449,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=78183
*/
public void test0082() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0082", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0082", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -2525,7 +2525,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=79544
*/
public void test0083() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0083", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0083", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -2563,7 +2563,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=79612
*/
public void test0084() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0084", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0084", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -2586,7 +2586,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=79609
*/
public void test0085() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0085", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0085", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -2618,7 +2618,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=79512
*/
public void test0086() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/p/X.js", true/*resolve*/);
ASTNode node = buildAST(
"package p;\n" +
"public class X {\n" +
@@ -2641,7 +2641,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=79775
*/
public void test0087() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/p/X.js", true/*resolve*/);
buildAST(
"package p;\n" +
"public class X<T1> {\n" +
@@ -2662,7 +2662,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=79690
*/
public void test0088() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0088", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0088", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -2696,7 +2696,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* (regression test for 79967 NPE in WildcardBinding.signature with Mark Occurrences in Collections.class)
*/
public void test0089() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/p/X.js", true/*resolve*/);
ASTNode node = buildAST(
"package p;\n" +
"public class X<T> {\n" +
@@ -2717,7 +2717,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=80021
*/
public void test0090() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/p/X.js", true/*resolve*/);
ASTNode result = buildAST(
"package p;\n" +
"public class X {\n" +
@@ -2778,7 +2778,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Check bindings for annotation type declaration
*/
public void test0091() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/p/X.js", true/*resolve*/);
ASTNode node = buildAST(
"package p;\n" +
"@interface X {\n" +
@@ -2806,7 +2806,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=80960
*/
public void test0092() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/p/X.js", true/*resolve*/);
ASTNode node = buildAST(
"import java.util.*;\n" +
"public class X {\n" +
@@ -2843,7 +2843,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
" new <String> Test(null) {};\n" +
" }\n" +
"}";
- this.workingCopy = getWorkingCopy("/Converter15/src/Test.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/Test.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
this.workingCopy);
@@ -2881,7 +2881,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
" this.test= test;\n" +
" }\n" +
"}";
- this.workingCopy = getWorkingCopy("/Converter15/src/ThrowAwayMethod.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/ThrowAwayMethod.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
this.workingCopy,
@@ -2894,7 +2894,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* (regression test for 81134 [dom] [5.0] NPE when creating AST
*/
public void test0095() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
"public class X {\n" +
" /*start*/<T> void foo(NonExisting arg) {\n" +
@@ -2922,7 +2922,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
"@An1(value=\"X\") class A {\n" +
" \n" +
"}";
- this.workingCopy = getWorkingCopy("/Converter15/src/An1.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/An1.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
this.workingCopy);
@@ -2953,7 +2953,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
" \n" +
" }\n" +
"}";
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
this.workingCopy);
@@ -2995,7 +2995,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
String contents =
"class X {\n" +
"}";
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
this.workingCopy);
@@ -3024,7 +3024,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
" String value();\n" +
" }\n" +
"}";
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
this.workingCopy);
@@ -3080,7 +3080,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
" public static final E D = B;\n" +
" public static final String F = \"Hello\";\n" +
"}";
- this.workingCopy = getWorkingCopy("/Converter15/src/E.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/E.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
this.workingCopy);
@@ -3134,7 +3134,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
" assert (true): (\"hello\");\n" +
" }\n" +
"}";
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
this.workingCopy);
@@ -3160,7 +3160,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
"public class X {\n" +
" Object o= new HashMap<?, ?>[0];\n" +
"}";
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
this.workingCopy);
@@ -3180,7 +3180,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=82985
*/
public void test0103() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0103", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0103", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -3260,7 +3260,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=82985
*/
public void test0104() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0104", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0104", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -3283,7 +3283,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
"@interface Ann {}\n" +
"\n" +
"@Ann public class X {}\n";
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
this.workingCopy);
@@ -3314,7 +3314,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
"@interface Ann {}\n" +
"\n" +
"@p.Ann public class X {}\n";
- this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/p/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
this.workingCopy);
@@ -3360,7 +3360,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
" A child() default @A(\"Void\");\n" +
"}\n" +
"@Main(child=@A(\"\")) @A class X {}\n";
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
this.workingCopy);
@@ -3387,7 +3387,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
" abstract Numbers getSquare();\n" +
" }\n" +
"}\n";
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
this.workingCopy);
@@ -3435,7 +3435,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
" String value();\n" +
" int count();\n" +
"}";
- this.workingCopy = getWorkingCopy("/Converter15/src/Annot.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/Annot.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
this.workingCopy);
@@ -3454,7 +3454,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Ensures that the type declaration of a top level type binding is correct.
*/
public void test0110() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
TypeDeclaration type = (TypeDeclaration) buildAST(
"/*start*/public class X {\n" +
"}/*end*/",
@@ -3469,7 +3469,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Ensures that the type declaration of a generic type binding is correct.
*/
public void test0111() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
TypeDeclaration type = (TypeDeclaration) buildAST(
"/*start*/public class X<E> {\n" +
"}/*end*/",
@@ -3484,7 +3484,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Ensures that the type declaration of a parameterized type binding is correct.
*/
public void test0112() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
Type type = (Type) buildAST(
"public class X<E> {\n" +
" /*start*/X<String>/*end*/ field;\n" +
@@ -3501,7 +3501,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Ensures that the type declaration of a raw type binding is correct.
*/
public void test0113() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
Type type = (Type) buildAST(
"public class X<E> {\n" +
" /*start*/X/*end*/ field;\n" +
@@ -3518,7 +3518,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Ensures that the type declaration of a wildcard type binding is correct.
*/
public void test0114() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
Type type = (Type) buildAST(
"public class X<E> {\n" +
" X</*start*/? extends String/*end*/> field;\n" +
@@ -3534,7 +3534,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Ensures that the type declaration of a type variable binding is correct.
*/
public void test0115() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
TypeParameter type = (TypeParameter) buildAST(
"public class X</*start*/E/*end*/> {\n" +
"}",
@@ -3549,7 +3549,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Ensures that the erasure of a top level type binding is correct.
*/
public void test0116() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
TypeDeclaration type = (TypeDeclaration) buildAST(
"/*start*/public class X {\n" +
"}/*end*/",
@@ -3564,7 +3564,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Ensures that the erasure of a generic type binding is correct.
*/
public void test0117() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
TypeDeclaration type = (TypeDeclaration) buildAST(
"/*start*/public class X<E> {\n" +
"}/*end*/",
@@ -3579,7 +3579,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Ensures that the erasure of a parameterized type binding is correct.
*/
public void test0118() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
Type type = (Type) buildAST(
"public class X<E> {\n" +
" /*start*/X<String>/*end*/ field;\n" +
@@ -3595,7 +3595,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Ensures that the erasure of a raw type binding is correct.
*/
public void test0119() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
Type type = (Type) buildAST(
"public class X<E> {\n" +
" /*start*/X/*end*/ field;\n" +
@@ -3612,7 +3612,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Ensures that the erasure of a wildcard type binding is correct.
*/
public void test0120() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
Type type = (Type) buildAST(
"public class X<E> {\n" +
" X</*start*/? extends String/*end*/> field;\n" +
@@ -3628,7 +3628,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Ensures that the erasure of a type variable binding is correct.
*/
public void test0121() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
TypeParameter type = (TypeParameter) buildAST(
"public class X</*start*/E/*end*/> {\n" +
"}",
@@ -3643,7 +3643,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Ensures that the declaration of a non generic method binding is correct.
*/
public void test0122() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
MethodDeclaration method = (MethodDeclaration) buildAST(
"public class X {\n" +
" /*start*/void foo() {\n" +
@@ -3660,7 +3660,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Ensures that the declaration of a generic method binding is correct.
*/
public void test0123() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
MethodDeclaration method = (MethodDeclaration) buildAST(
"public class X {\n" +
" /*start*/<E> void foo() {\n" +
@@ -3677,7 +3677,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Ensures that the declaration of a parameterized method binding is correct.
*/
public void test0124() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
MethodInvocation method = (MethodInvocation) buildAST(
"public class X {\n" +
" <E> void foo() {\n" +
@@ -3697,7 +3697,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* Ensures that the declaration of a raw method binding is correct.
*/
public void test0125() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
MethodInvocation method = (MethodInvocation) buildAST(
"public class X {\n" +
" <E> void foo() {\n" +
@@ -3718,7 +3718,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* is correct.
*/
public void test0126() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
Type type = (Type) buildAST(
"public class X<E> {\n" +
" /*start*/Class<? extends E>/*end*/ field;\n" +
@@ -3732,7 +3732,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=83817
public void test0127() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
"class X<T> {\n" +
" public void method(Number num) {}\n" +
@@ -3769,7 +3769,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=84064
public void test0128() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
final String contents =
"class X {\n" +
" static X x;\n" +
@@ -3809,7 +3809,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=84064
public void test0129() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
final String contents =
"class X {\n" +
" static X x;\n" +
@@ -3850,7 +3850,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=78934
public void test0130() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
final String contents =
"class Outer<A> {\n" +
" class Inner {\n" +
@@ -3922,7 +3922,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=84140
public void test0131() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
" public void bar(String... args){\n" +
@@ -3959,7 +3959,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=84140
public void test0132() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
" public void bar(String[]... args[]){\n" +
@@ -4009,7 +4009,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=84181
public void test0133() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"import java.util.Vector;\n" +
"\n" +
@@ -4037,7 +4037,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=84181
public void test0134() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"import java.util.Vector;\n" +
"\n" +
@@ -4063,7 +4063,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=78934
public void test0135() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"class X {\n" +
" public static X instance= new X();\n" +
@@ -4093,7 +4093,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=78934
public void test0136() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"class X {\n" +
" public static X instance= new X();\n" +
@@ -4124,7 +4124,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=79696
*/
public void test0137() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0137", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0137", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -4150,7 +4150,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=81544
public void test0138() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
final String contents =
"class X {\n" +
" java.util.List<URL> method(java.util.List<URL> list) {\n" +
@@ -4184,7 +4184,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=84358
*/
public void test0139() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0139", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0139", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -4227,7 +4227,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=85215
*/
public void test0140() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0140", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0140", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -4246,7 +4246,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
assertTrue("Not an annotation", typeBinding.isAnnotation());
assertTrue("Not a top level type", typeBinding.isTopLevel());
- sourceUnit = getCompilationUnit("Converter15" , "src", "test0140", "Annot.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ sourceUnit = getCompilationUnit("Converter15" , "src", "test0140", "Annot.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
result = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -4265,7 +4265,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=83100
public void test0141() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
final String contents =
"public class X<T> {\n" +
" int x;\n" +
@@ -4310,7 +4310,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=83100
public void test0142() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
final String contents =
"public class X<T> {\n" +
" public static void main(String[] args) {\n" +
@@ -4341,7 +4341,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=84140
public void test0143() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
" public void bar(String[]... args){\n" +
@@ -4383,7 +4383,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=87171
public void test0144() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X<T> {\n" +
" void foo(T t) {\n" +
@@ -4417,7 +4417,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=87350
public void test0145() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public enum X {\n" +
" RED, GREEN(), BLUE(17), PINK(1) {/*anon*};\n" +
@@ -4439,7 +4439,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=87481
public void test0146() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"import java.util.Iterator;\n" +
"public class X {\n" +
@@ -4479,7 +4479,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=87498
public void test0147() throws CoreException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0147", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0147", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -4488,7 +4488,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=87350
public void test0148() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public enum X {\n" +
" RED, GREEN(), BLUE(17), PINK(1) {/*anon*};\n" +
@@ -4509,7 +4509,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=88252
public void test0149() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
" interface Jpf {\n" +
" @interface Action {\n" +
@@ -4592,7 +4592,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=88224
public void test0150() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
" void foo() {\n" +
@@ -4633,7 +4633,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=88548
public void test0151() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public enum X {\n" +
" RED, GREEN(), BLUE(17);\n" +
@@ -4696,7 +4696,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=88548
public void test0152() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
" public static final int CONST1 = 1;\n" +
@@ -4761,7 +4761,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=88841
public void test0153() throws CoreException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0153", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0153", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -4770,7 +4770,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=87173
public void test0154() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
" public static void main(String[] s) {\n" +
@@ -4790,7 +4790,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=87173
public void test0155() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
" public static int bar() {return 1;}\n" +
@@ -4811,7 +4811,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=87173
public void test0156() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
" public static void main(String[] s) {\n" +
@@ -4831,7 +4831,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=88548
public void test0157() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
" public static void main(String[] s) {\n" +
@@ -4850,7 +4850,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=88548
public void test0158() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
" private static final String CONST = \"Hello World\";\n" +
@@ -4869,7 +4869,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=87173
public void test0159() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
" public static void main(String[] s) {\n" +
@@ -4889,7 +4889,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=87173
public void test0160() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
" public static void main(String[] s) {\n" +
@@ -4927,7 +4927,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=87173
public void test0161() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
" public static void main(String[] s) {\n" +
@@ -4978,7 +4978,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=87173
public void test0162() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
" public static void main(String[] s) {\n" +
@@ -5009,7 +5009,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=86580
public void test0163() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X<T>{\n" +
" void f(T t){}\n" +
@@ -5039,7 +5039,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=86580
public void test0164() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"class X {\n" +
" <U> void foo(U u) {}\n" +
@@ -5069,7 +5069,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=86580
public void test0165() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"class X {\n" +
" <U> void foo(U u) {\n" +
@@ -5098,7 +5098,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=86580
public void test0166() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"class X {\n" +
" {\n" +
@@ -5127,7 +5127,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=88841
public void test0167() throws CoreException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0167", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0167", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -5154,7 +5154,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0168() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
final String contents =
"import java.util.List;\n" +
"public class X {\n" +
@@ -5191,7 +5191,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0169() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
" static class BB<T, S> { }\n" +
@@ -5232,7 +5232,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0170() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
" static class BB<T, S> { }\n" +
@@ -5264,7 +5264,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=92361
*/
public void test0171() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
"\n" +
@@ -5284,7 +5284,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* (regression test for bug 92888 ITypeBinding#isEqualTo(..) is wrong for capture bindings)
*/
public void test0172() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X<T> {\n" +
" private static X<? super Number> num() {\n" +
@@ -5306,7 +5306,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=93093
*/
public void test0173() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"import java.util.Vector;\n" +
"\n" +
@@ -5329,7 +5329,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=88202
*/
public void test0174() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"import java.util.*;\n" +
"\n" +
@@ -5352,7 +5352,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=88202
*/
public void test0175() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"import java.util.*;\n" +
"\n" +
@@ -5373,7 +5373,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=92982
*/
public void test0176() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"import java.util.*;\n" +
"\n" +
@@ -5397,7 +5397,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* (https://bugs.eclipse.org/bugs/show_bug.cgi?id=93275)
*/
public void test0177() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X<T> {\n" +
" Object foo(X<?> list) {\n" +
@@ -5420,7 +5420,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=93075
*/
public void test0178() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"import java.util.Vector;\n" +
"\n" +
@@ -5463,7 +5463,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=93075
*/
public void test0179() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"@interface Test {}\n" +
"public enum X\n" +
@@ -5485,7 +5485,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=92360
*/
public void test0180() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"import java.util.List;\n" +
"public class X {\n" +
@@ -5506,7 +5506,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* (regression test for bug 93408 ITypeBinding#isEqualTo(..) does not resolve type variables)
*/
public void test0181() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X<E> {\n" +
" /*start1*/Y<E>/*end1*/ y;\n" +
@@ -5524,7 +5524,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=95911
*/
public void test0182() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
final String contents =
"import java.util.Map;\n" +
"\n" +
@@ -5555,7 +5555,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=95911
*/
public void test0183() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
final String contents =
"import java.util.Map;\n" +
"\n" +
@@ -5584,7 +5584,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=97841
*/
public void test0184() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
final String contents =
"public class X {\n" +
" java.util.Map<String, Number> map= new java.util.Map<String, Number>() {\n" +
@@ -5612,7 +5612,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=98086
*/
public void test0185() throws JavaModelException {
- final ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0185", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ final ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0185", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
assertEquals("Wrong setting", JavaCore.WARNING, sourceUnit.getJavaProject().getOption(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION, true));
final ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -5624,7 +5624,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=98086
*/
public void test0186() throws JavaModelException {
- final ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0186", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ final ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0186", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
assertEquals("Wrong setting", JavaCore.WARNING, sourceUnit.getJavaProject().getOption(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION, true));
final ASTNode result = runJLS3Conversion(sourceUnit, true, true);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -5638,7 +5638,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* (regression test for bug 98259 NPE computing ITypeBinding#getKey())
*/
public void test0187() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
final String contents =
"public class X {\n" +
" <T> /*start*/Y<T>/*end*/ foo() {\n" +
@@ -5661,7 +5661,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=98473
*/
public void test0188() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
final String contents =
"import java.util.List;\n" +
"\n" +
@@ -5688,17 +5688,17 @@ public class ASTConverter15Test extends ConverterTestSetup {
try {
IJavaProject project = createJavaProject("P1", new String[] {""}, new String[] {"CONVERTER_JCL15_LIB"}, "", "1.5");
addLibrary(project, "lib.jar", "src.zip", new String[] {
- "/P1/p/I1.java",
+ "/P1/p/I1.js",
"package p;\n" +
"public class I1<E> {\n" +
"}",
- "/P1/p/I2.java",
+ "/P1/p/I2.js",
"package p;\n" +
"public interface I2<K, V> {\n" +
" interface I3<K,V> {}\n" +
" I1<I2.I3<K, V>> foo();\n" +
"}",
- "/P1/p/X.java",
+ "/P1/p/X.js",
"package p;\n" +
"public class X<K,V> implements I2<K,V> {\n" +
" public I1<I2.I3<K,V>> foo() {\n" +
@@ -5706,7 +5706,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
" } \n" +
"}"
}, "1.5");
- this.workingCopy = getWorkingCopy("/P1/p1/Y.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/P1/p1/Y.js", true/*resolve*/);
ASTNode node = buildAST(
"package p1;\n" +
"import p.*;\n" +
@@ -5732,7 +5732,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=99355
public void test0190() throws CoreException, IOException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
final String contents =
"class Container<T> {\n" +
" private final T m_t;\n" +
@@ -5786,7 +5786,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=99510
public void test0191() throws CoreException, IOException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0191", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0191", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode node = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No node", node);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
@@ -5815,7 +5815,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// Wrong ParameterizedTypeBinding yields null type declaration result
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=100584
public void test0192() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X<E> {\n" +
" public static class InnerClass {\n" +
@@ -5840,7 +5840,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=104492
public void test0193() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
" public static void main(String[] args) {\n" +
@@ -5868,7 +5868,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=104492
public void test0194() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
" public static void main(String[] args) {\n" +
@@ -5896,7 +5896,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=106834
public void test0195() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
" <S extends Number, T> void take(S e, T f) {}\n" +
@@ -5939,7 +5939,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* (regression test for bug 104879 BindingKey#internalToSignature() returns invalid signature for local type
*/
public void test0196() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
"public class X {\n" +
" void foo() {\n" +
@@ -5970,11 +5970,11 @@ public class ASTConverter15Test extends ConverterTestSetup {
String classesPath = folder.getLocation().toOSString();
Map options = new HashMap();
String[] pathsAndContents = new String[] {
- "p/Bin.java",
+ "p/Bin.js",
"package p;\n" +
"public class Bin {\n" +
"}",
- "p/BinSub.java",
+ "p/BinSub.js",
"package p;\n" +
"public class BinSub extends Bin {\n" +
"}",
@@ -5983,7 +5983,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
folder.refreshLocal(IResource.DEPTH_INFINITE, null);
// folder.getFolder("p").getFile("Bin.class").delete(false, null);
Util.delete(folder.getFolder("p").getFile("Bin.class"));
- this.workingCopy = getWorkingCopy("/P/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/P/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
" void bar() throws p.BinSub {\n" +
@@ -6003,7 +6003,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=110773
*/
public void test0198() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
"public class X<E> {\n" +
" class B { }\n" +
@@ -6044,7 +6044,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=110657
*/
public void test0199() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
final String source = "public class X {\n" +
" public static void main(String[] args) {\n" +
" byte[] b1 = new byte[0];\n" +
@@ -6078,7 +6078,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=110657
*/
public void test0200() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
final String source = "public class X {\n" +
" public static void main(String[] args) {\n" +
" byte[] b1 = new byte[0];\n" +
@@ -6108,7 +6108,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=110657
*/
public void test0201() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
final String source = "public class X {\n" +
" public static void main(String[] args) {\n" +
" byte[] b1 = new byte[0];\n" +
@@ -6140,7 +6140,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=110657
*/
public void test0202() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
final String source = "public class X {\n" +
" public static void main(String[] args) {\n" +
" byte[] b1 = new byte[0];\n" +
@@ -6180,7 +6180,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=80472
*/
public void test0203() throws CoreException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
final String source = "class X<T> {\n" +
" X<T> list= this;\n" +
" X<? super T> list2= this;\n" +
@@ -6218,7 +6218,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* (regression test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=83064)
*/
public void test0204() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X<T> {\n" +
" static class Y {\n" +
@@ -6236,7 +6236,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* (regression test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=83064)
*/
public void test0205() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X<E> {\n" +
" @I(12)\n" +
@@ -6253,7 +6253,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=120263
*/
public void test0206() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
" public @interface Annot {\n" +
@@ -6292,7 +6292,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=124716
*/
public void test0207() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
" void m() {\n" +
@@ -6322,7 +6322,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=125807
*/
public void test0208() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"@Override(x= 1)\n" +
"public class X { }";
@@ -6351,7 +6351,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
public void test0209() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/test/V.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/test/V.js", true/*resolve*/);
String contents =
"package test;\n" +
"import pack.*;\n" +
@@ -6396,7 +6396,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
assertEquals("Wrong type", IBinding.PACKAGE, binding.getKind());
}
public void test0210() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", false);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", false);
String contents =
"public class X {\n" +
" void foo(Object r) {\n" +
@@ -6434,7 +6434,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
" void foo(java.util.List<?> tab[]) {\n" +
" }\n" +
"}";
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -6462,7 +6462,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
" void foo(java.util.List<?> tab[][]) {\n" +
" }\n" +
"}";
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -6492,7 +6492,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
" return strings.length;\n" +
" }\n" +
"}";
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -6520,7 +6520,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=104293
*/
public void test0214() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
" \n" +
@@ -6574,7 +6574,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=104293
*/
public void test0215() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
" static <T> T identity(T t) { return t; }\n" +
@@ -6771,7 +6771,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=104293
*/
public void test0216() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"class Y<T> {\n" +
" <T> Class foo(T t) {\n" +
@@ -6832,7 +6832,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=110799
*/
public void test0217() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"class Generic<E> {\n" +
"}\n" +
@@ -6881,7 +6881,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=140318
*/
public void test0218() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"import java.util.List;\n" +
"\n" +
@@ -6918,7 +6918,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=140318
*/
public void test0219() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"import java.util.List;\n" +
"\n" +
@@ -6958,7 +6958,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* updated for https://bugs.eclipse.org/bugs/show_bug.cgi?id=143001
*/
public void test0220() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
" void bar(String[] c) {\n" +
@@ -7009,7 +7009,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=147875
*/
public void test0221() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"import p1.p2.MyEnum;\n" +
"public class X {\n" +
@@ -7031,7 +7031,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=148797
*/
public void test0222() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
" public void a() {\n" +
@@ -7067,7 +7067,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=153303
*/
public void test0223() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
" @Zork\n" +
@@ -7092,7 +7092,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=153303
*/
public void test0224() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"@Zork\n" +
"public class X {\n" +
@@ -7115,7 +7115,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=153303
*/
public void test0225() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
" public void foo(@Zork String s) {\n" +
@@ -7142,7 +7142,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=153303
*/
public void test0226() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/p/package-info.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/p/package-info.js", true/*resolve*/);
String contents =
"@Zork package p;";
ASTNode node = buildAST(
@@ -7160,7 +7160,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=155115
public void test0227() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"import anno.Anno;\n" +
"import binary.B;\n" +
@@ -7232,7 +7232,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=157403
*/
public void test0228() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"@interface Ann {\n" +
" int foo();\n" +
@@ -7277,7 +7277,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=160089
*/
public void test0229() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"import java.util.List;\n" +
"import java.util.Collection;\n" +
@@ -7337,7 +7337,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=156352
*/
public void test0230() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0230", "Test3.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0230", "Test3.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IType type = sourceUnit.getType("Test3");//$NON-NLS-1$
assertNotNull("Should not be null", type);
@@ -7359,7 +7359,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=156352
*/
public void test0231() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0231", "Test3.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0231", "Test3.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IType type = sourceUnit.getType("Test3");//$NON-NLS-1$
assertNotNull("Should not be null", type);
@@ -7406,7 +7406,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
" return null;\n" +
" }\n" +
"}";
- this.workingCopy = getWorkingCopy("/Converter15/src/A.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/A.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -7461,7 +7461,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
" return null;\n" +
" }\n" +
"}";
- this.workingCopy = getWorkingCopy("/Converter15/src/A.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/A.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -7492,7 +7492,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=169744
*/
public void test0234() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"class B {\n" +
" <T> int m() {\n" +
@@ -7523,7 +7523,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=172633
*/
public void test0235() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/test0235/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/test0235/X.js", true/*resolve*/);
String contents =
"package test0235;\n" +
"public class X implements I {\n" +
@@ -7555,7 +7555,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=172633
*/
public void test0236() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X implements Runnable, Zork {\n" +
" public void run() {}\n" +
@@ -7583,7 +7583,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=173338
*/
public void test0237() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/test0237/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/test0237/X.js", true/*resolve*/);
String contents =
"package test0237;\n" +
"public class X {\n" +
@@ -7613,7 +7613,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=173338
*/
public void test0238() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/test0238/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/test0238/X.js", true/*resolve*/);
String contents =
"package test0238;\n" +
"public class X extends A {\n" +
@@ -7640,7 +7640,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=173338
*/
public void test0239() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/test0239/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/test0239/X.js", true/*resolve*/);
String contents =
"package test0239;\n" +
"public class X extends A {\n" +
@@ -7667,7 +7667,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=107001
*/
public void test0240() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X<T> {}";
ASTNode node = buildAST(
@@ -7693,7 +7693,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=107001
*/
public void test0241() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
" <T> void foo() {}\n" +
@@ -7721,7 +7721,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=107001
*/
public void test0242() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
" <T> X() {}\n" +
@@ -7749,7 +7749,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=107001
*/
public void test0243() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/p/X.js", true/*resolve*/);
String contents =
"package p;\n" +
"public class X<U,V> {\n" +
@@ -7776,7 +7776,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=173849
public void test0244() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/xy/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/xy/X.js", true/*resolve*/);
String contents =
"package xy;\n" +
"\n" +
@@ -7807,7 +7807,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=173849
public void test0245() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/xy/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/xy/X.js", true/*resolve*/);
String contents =
"package xy;\n" +
"\n" +
@@ -7838,7 +7838,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=173849
public void test0246() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/xy/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/xy/X.js", true/*resolve*/);
String contents =
"package xy;\n" +
"\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterAST3Test.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterAST3Test.java
index bbc45ce..7f3f533 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterAST3Test.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterAST3Test.java
@@ -39,7 +39,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
}
public void test0001() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0001", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0001", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
@@ -108,7 +108,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Test allocation expression: new Object() ==> ClassInstanceCreation
*/
public void test0002() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0002", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0002", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -123,7 +123,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Test allocation expression: new java.lang.Object() ==> ClassInstanceCreation
*/
public void test0003() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0003", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0003", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -144,7 +144,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Test allocation expression: new java.lang.Exception("ERROR") ==> ClassInstanceCreation
*/
public void test0004() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0004", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0004", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -168,7 +168,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Test allocation expression: new java.lang.Object() {} ==> ClassInstanceCreation
*/
public void test0005() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0005", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0005", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -195,7 +195,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Test allocation expression: new java.lang.Runnable() { public void run() {}} ==> ClassInstanceCreation
*/
public void test0006() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0006", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0006", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -225,7 +225,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Test allocation expression: new Test().new D() ==> ClassInstanceCreation
*/
public void test0007() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0007", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0007", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -246,7 +246,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Test allocation expression: new int[] {1, 2, 3, 4} ==> ArrayCreation
*/
public void test0008() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0008", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0008", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -267,7 +267,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Test allocation expression: new int[][] {{1}, {2}} ==> ArrayCreation
*/
public void test0009() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0009", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0009", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -290,7 +290,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Test allocation expression: new int[3] ==> ArrayCreation
*/
public void test0010() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0010", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0010", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -306,7 +306,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Test allocation expression: new int[3][] ==> ArrayCreation
*/
public void test0011() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0011", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0011", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -322,7 +322,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Test allocation expression: new int[][] {{},{}} ==> ArrayCreation
*/
public void test0012() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0012", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0012", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -343,7 +343,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* int i; ==> VariableDeclarationFragment
*/
public void test0013() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0013", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0013", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -360,7 +360,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* int i = 0; ==> VariableDeclarationFragment
*/
public void test0014() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0014", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0014", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -379,7 +379,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* i = 1; ==> ExpressionStatement(Assignment)
*/
public void test0015() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0015", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0015", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -397,7 +397,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* i += 2; ==> ExpressionStatement(Assignment)
*/
public void test0016() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0016", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0016", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -415,7 +415,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* i -= 2; ==> ExpressionStatement(Assignment)
*/
public void test0017() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0017", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0017", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -433,7 +433,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* i *= 2; ==> ExpressionStatement(Assignment)
*/
public void test0018() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0018", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0018", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -451,7 +451,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* i /= 2; ==> ExpressionStatement(Assignment)
*/
public void test0019() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0019", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0019", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -469,7 +469,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* i &= 2 ==> ExpressionStatement(Assignment)
*/
public void test0020() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0020", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0020", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -487,7 +487,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* i |= 2; ==> ExpressionStatement(Assignment)
*/
public void test0021() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0021", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0021", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -505,7 +505,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* i ^= 2; ==> ExpressionStatement(Assignment)
*/
public void test0022() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0022", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0022", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -523,7 +523,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* i %= 2; ==> ExpressionStatement(Assignment)
*/
public void test0023() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0023", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0023", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -541,7 +541,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* i <<= 2; ==> ExpressionStatement(Assignment)
*/
public void test0024() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0024", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0024", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -559,7 +559,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* i >>= 2; ==> ExpressionStatement(Assignment)
*/
public void test0025() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0025", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0025", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -577,7 +577,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* i >>>= 2; ==> ExpressionStatement(Assignment)
*/
public void test0026() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0026", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0026", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -595,7 +595,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* --i; ==> ExpressionStatement(PrefixExpression)
*/
public void test0027() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0027", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0027", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -612,7 +612,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* --i; ==> ExpressionStatement(PrefixExpression)
*/
public void test0028() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0028", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0028", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -629,7 +629,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* i--; ==> ExpressionStatement(PostfixExpression)
*/
public void test0029() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0029", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0029", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -646,7 +646,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* i++; ==> ExpressionStatement(PostfixExpression)
*/
public void test0030() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0030", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0030", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -663,7 +663,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* (String) o; ==> ExpressionStatement(CastExpression)
*/
public void test0031() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0031", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0031", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -684,7 +684,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* (int) d; ==> ExpressionStatement(CastExpression)
*/
public void test0032() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0032", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0032", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -705,7 +705,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* (float) d; ==> ExpressionStatement(CastExpression)
*/
public void test0033() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0033", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0033", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -728,7 +728,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* (byte) d; ==> ExpressionStatement(CastExpression)
*/
public void test0034() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0034", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0034", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -751,7 +751,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* (short) d; ==> ExpressionStatement(CastExpression)
*/
public void test0035() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0035", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0035", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -774,7 +774,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* (long) d; ==> ExpressionStatement(CastExpression)
*/
public void test0036() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0036", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0036", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -797,7 +797,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* (char) i; ==> ExpressionStatement(CastExpression)
*/
public void test0037() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0037", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0037", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -820,7 +820,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* int.class; ==> ExpressionStatement(TypeLiteral)
*/
public void test0038() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0038", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0038", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -842,7 +842,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* void.class; ==> ExpressionStatement(TypeLiteral)
*/
public void test0039() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0039", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0039", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -864,7 +864,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* double.class; ==> ExpressionStatement(TypeLiteral)
*/
public void test0040() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0040", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0040", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -886,7 +886,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* long.class; ==> ExpressionStatement(TypeLiteral)
*/
public void test0041() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0041", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0041", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -908,7 +908,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* false ==> BooleanLiteral
*/
public void test0042() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0042", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0042", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -922,7 +922,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* true ==> BooleanLiteral
*/
public void test0043() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0043", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0043", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -936,7 +936,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* null ==> NullLiteral
*/
public void test0044() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0044", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0044", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -950,7 +950,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* CharLiteral ==> CharacterLiteral
*/
public void test0045() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0045", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0045", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -965,7 +965,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* DoubleLiteral ==> NumberLiteral
*/
public void test0046() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0046", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0046", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -979,7 +979,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* FloatLiteral ==> NumberLiteral
*/
public void test0047() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0047", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0047", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -993,7 +993,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* IntLiteral ==> NumberLiteral
*/
public void test0048() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0048", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0048", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -1007,7 +1007,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* IntLiteralMinValue ==> NumberLiteral
*/
public void test0049() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0049", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0049", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -1021,7 +1021,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* LongLiteral ==> NumberLiteral
*/
public void test0050() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0050", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0050", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -1035,7 +1035,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* LongLiteral ==> NumberLiteral (negative value)
*/
public void test0051() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0051", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0051", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -1052,7 +1052,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* LongLiteralMinValue ==> NumberLiteral
*/
public void test0052() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0052", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0052", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -1066,7 +1066,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* ExtendedStringLiteral ==> StringLiteral
*/
public void test0053() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0053", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0053", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -1091,7 +1091,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* AND_AND_Expression ==> InfixExpression
*/
public void test0054() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0054", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0054", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -1115,7 +1115,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* OR_OR_Expression ==> InfixExpression
*/
public void test0055() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0055", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0055", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -1139,7 +1139,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* EqualExpression ==> InfixExpression
*/
public void test0056() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0056", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0056", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -1163,7 +1163,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* BinaryExpression (+) ==> InfixExpression
*/
public void test0057() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0057", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0057", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -1187,7 +1187,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* BinaryExpression (-) ==> InfixExpression
*/
public void test0058() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0058", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0058", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -1211,7 +1211,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* BinaryExpression (*) ==> InfixExpression
*/
public void test0059() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0059", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0059", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -1235,7 +1235,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* BinaryExpression (/) ==> InfixExpression
*/
public void test0060() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0060", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0060", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -1259,7 +1259,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* BinaryExpression (%) ==> InfixExpression
*/
public void test0061() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0061", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0061", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -1283,7 +1283,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* BinaryExpression (^) ==> InfixExpression
*/
public void test0062() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0062", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0062", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -1307,7 +1307,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* BinaryExpression (&) ==> InfixExpression
*/
public void test0063() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0063", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0063", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -1331,7 +1331,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* BinaryExpression (|) ==> InfixExpression
*/
public void test0064() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0064", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0064", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -1355,7 +1355,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* BinaryExpression (<) ==> InfixExpression
*/
public void test0065() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0065", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0065", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -1379,7 +1379,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* BinaryExpression (<=) ==> InfixExpression
*/
public void test0066() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0066", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0066", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -1403,7 +1403,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* BinaryExpression (>) ==> InfixExpression
*/
public void test0067() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0067", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0067", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -1427,7 +1427,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* BinaryExpression (>=) ==> InfixExpression
*/
public void test0068() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0068", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0068", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -1451,7 +1451,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* BinaryExpression (!=) ==> InfixExpression
*/
public void test0069() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0069", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0069", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -1475,7 +1475,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* InstanceofExpression ==> InfixExpression
*/
public void test0070() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0070", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0070", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -1498,7 +1498,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* InstanceofExpression ==> InfixExpression
*/
public void test0071() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0071", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0071", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -1528,7 +1528,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* UnaryExpression (!) ==> PrefixExpression
*/
public void test0072() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0072", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0072", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -1550,7 +1550,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* UnaryExpression (~) ==> PrefixExpression
*/
public void test0073() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0073", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0073", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -1572,7 +1572,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* UnaryExpression (+) ==> PrefixExpression
*/
public void test0074() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0074", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0074", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -1595,7 +1595,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* UnaryExpression (-) ==> PrefixExpression
*/
public void test0075() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0075", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0075", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -1619,7 +1619,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* ConditionalExpression ==> ConditionalExpression
*/
public void test0076() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0076", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0076", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -1646,7 +1646,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* ConditionalExpression ==> ConditionalExpression
*/
public void test0077() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0077", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0077", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -1673,7 +1673,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* MessageSend ==> SuperMethodInvocation
*/
public void test0078() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0078", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0078", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -1689,7 +1689,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* MessageSend ==> SuperMethodInvocation
*/
public void test0079() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0079", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0079", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -1706,7 +1706,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* MessageSend ==> MethodInvocation
*/
public void test0080() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0080", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0080", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -1723,7 +1723,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* MessageSend ==> MethodInvocation
*/
public void test0081() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0081", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0081", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -1741,7 +1741,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* ForStatement ==> ForStatement
*/
public void test0082() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0082", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0082", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -1756,7 +1756,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* ForStatement ==> ForStatement
*/
public void test0083() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0083", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0083", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -1786,7 +1786,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* ForStatement ==> ForStatement
*/
public void test0084() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0084", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0084", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -1818,7 +1818,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* ForStatement ==> ForStatement
*/
public void test0085() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0085", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0085", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -1845,7 +1845,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* ForStatement ==> ForStatement
*/
public void test0086() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0086", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0086", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -1869,7 +1869,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* ForStatement ==> ForStatement
*/
public void test0087() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0087", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0087", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -1888,7 +1888,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* LocalDeclaration ==> VariableDeclarationStatement
*/
public void test0088() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0088", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0088", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -1908,7 +1908,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* LocalDeclaration ==> VariableDeclarationStatement
*/
public void test0089() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0089", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0089", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -1936,7 +1936,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* LocalDeclaration ==> VariableDeclarationStatement
*/
public void test0090() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0090", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0090", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -1959,7 +1959,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Argument ==> SingleVariableDeclaration
*/
public void test0091() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0091", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0091", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
MethodDeclaration method = (MethodDeclaration)((TypeDeclaration) ((CompilationUnit) result).types().get(0)).bodyDeclarations().get(0);
@@ -1976,7 +1976,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Argument ==> SingleVariableDeclaration
*/
public void test0092() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0092", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0092", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
MethodDeclaration method = (MethodDeclaration)((TypeDeclaration) ((CompilationUnit) result).types().get(0)).bodyDeclarations().get(0);
@@ -1995,7 +1995,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Break ==> BreakStatement
*/
public void test0093() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0093", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0093", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2011,7 +2011,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Continue ==> ContinueStatement
*/
public void test0094() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0094", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0094", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2027,7 +2027,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Continue with Label ==> ContinueStatement
*/
public void test0095() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0095", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0095", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
LabeledStatement labeledStatement = (LabeledStatement) getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2044,7 +2044,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Break + label ==> BreakStatement
*/
public void test0096() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0096", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0096", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
LabeledStatement labeledStatement = (LabeledStatement) getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2061,7 +2061,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* SwitchStatement ==> SwitchStatement
*/
public void test0097() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0097", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0097", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2125,7 +2125,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* EmptyStatement ==> EmptyStatement
*/
public void test0098() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0098", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0098", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2139,7 +2139,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* DoStatement ==> DoStatement
*/
public void test0099() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0099", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0099", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2159,7 +2159,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* WhileStatement ==> WhileStatement
*/
public void test0100() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0100", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0100", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2175,7 +2175,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* WhileStatement ==> WhileStatement
*/
public void test0101() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0101", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0101", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2191,7 +2191,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* ExtendedStringLiteral ==> StringLiteral
*/
public void test0102() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0102", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0102", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -2215,7 +2215,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* ExtendedStringLiteral ==> StringLiteral
*/
public void test0103() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0103", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0103", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -2242,7 +2242,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* ExtendedStringLiteral ==> StringLiteral
*/
public void test0104() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0104", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0104", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -2269,7 +2269,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* NumberLiteral ==> InfixExpression
*/
public void test0105() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0105", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0105", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -2296,7 +2296,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* NumberLiteral ==> InfixExpression
*/
public void test0106() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0106", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0106", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -2332,7 +2332,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* NumberLiteral ==> InfixExpression
*/
public void test0107() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0107", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0107", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -2359,7 +2359,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* NumberLiteral ==> InfixExpression
*/
public void test0108() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0108", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0108", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -2386,7 +2386,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* NumberLiteral ==> InfixExpression
*/
public void test0109() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0109", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0109", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -2422,7 +2422,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* ReturnStatement ==> ReturnStatement
*/
public void test0110() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0110", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0110", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2439,7 +2439,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* ReturnStatement ==> ReturnStatement
*/
public void test0111() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0111", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0111", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2456,7 +2456,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* SynchronizedStatement ==> SynchronizedStatement
*/
public void test0112() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0112", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0112", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2474,7 +2474,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* TryStatement ==> TryStatement
*/
public void test0113() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0113", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0113", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2501,7 +2501,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* TryStatement ==> TryStatement
*/
public void test0114() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0114", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0114", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2526,7 +2526,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* TryStatement ==> TryStatement
*/
public void test0115() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0115", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0115", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2558,7 +2558,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* ThrowStatement ==> ThrowStatement
*/
public void test0116() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0116", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0116", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2573,7 +2573,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* ThrowStatement ==> ThrowStatement
*/
public void test0117() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0117", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0117", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2588,7 +2588,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* ThrowStatement ==> ThrowStatement
*/
public void test0118() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0118", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0118", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2603,7 +2603,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* IfStatement ==> IfStatement
*/
public void test0119() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0119", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0119", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2619,7 +2619,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* IfStatement ==> IfStatement
*/
public void test0120() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0120", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0120", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2638,7 +2638,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* IfStatement ==> IfStatement
*/
public void test0121() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0121", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0121", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2657,7 +2657,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* IfStatement ==> IfStatement
*/
public void test0122() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0122", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0122", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2677,7 +2677,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* IfStatement ==> IfStatement
*/
public void test0123() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0123", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0123", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2704,7 +2704,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Multiple local declaration => VariabledeclarationStatement
*/
public void test0124() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0124", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0124", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2744,7 +2744,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Multiple local declaration => VariabledeclarationStatement
*/
public void test0125() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0125", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0125", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2784,7 +2784,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* ForStatement
*/
public void test0126() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0126", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0126", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2812,7 +2812,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* ForStatement
*/
public void test0127() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0127", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0127", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2840,7 +2840,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* ForStatement
*/
public void test0128() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0128", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0128", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2868,7 +2868,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* FieldDeclaration
*/
public void test0129() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0129", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0129", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -2889,7 +2889,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* FieldDeclaration
*/
public void test0130() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0130", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0130", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -2931,7 +2931,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Argument with final modifier
*/
public void test0131() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0131", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0131", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -2955,7 +2955,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* @deprecated marking deprecated since using deprecated code
*/
public void test0132() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0132", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0132", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -2970,7 +2970,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check javadoc for MethodDeclaration
*/
public void test0133() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0133", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0133", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -2985,7 +2985,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check javadoc for MethodDeclaration
*/
public void test0134() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0134", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0134", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -3001,7 +3001,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* @deprecated marking deprecated since using deprecated code
*/
public void test0135() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0135", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0135", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -3015,7 +3015,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check javadoc for FieldDeclaration
*/
public void test0136() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0136", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0136", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -3030,7 +3030,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check javadoc for FieldDeclaration
*/
public void test0137() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0137", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0137", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -3045,7 +3045,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check javadoc for TypeDeclaration
*/
public void test0138() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0138", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0138", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0);
@@ -3063,7 +3063,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check javadoc for TypeDeclaration
*/
public void test0139() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0139", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0139", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0);
@@ -3082,7 +3082,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* @deprecated marking deprecated since using deprecated code
*/
public void test0140() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0140", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0140", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0);
@@ -3103,7 +3103,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* @deprecated marking deprecated since using deprecated code
*/
public void test0141() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0141", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0141", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -3121,7 +3121,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check javadoc for MemberTypeDeclaration
*/
public void test0142() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0142", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0142", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -3136,7 +3136,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check javadoc for MemberTypeDeclaration
*/
public void test0143() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0143", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0143", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -3151,7 +3151,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check javadoc for MemberTypeDeclaration
*/
public void test0144() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0144", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0144", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -3166,7 +3166,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Checking initializers
*/
public void test0145() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0145", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0145", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -3178,7 +3178,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Checking initializers
*/
public void test0146() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0146", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0146", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -3191,7 +3191,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* @deprecated marking deprecated since using deprecated code
*/
public void test0147() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0147", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0147", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -3211,7 +3211,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* @deprecated marking deprecated since using deprecated code
*/
public void test0148() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0148", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0148", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -3230,7 +3230,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Checking initializers
*/
public void test0149() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0149", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0149", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -3244,7 +3244,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Checking syntax error
*/
public void test0150() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0150", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0150", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -3260,7 +3260,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Checking syntax error
*/
public void test0151() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0151", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0151", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The compilation unit is malformed", !isMalformed(result)); //$NON-NLS-1$
@@ -3270,7 +3270,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Checking syntax error
*/
public void test0152() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0152", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0152", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The compilation unit is malformed", !isMalformed(result)); //$NON-NLS-1$
@@ -3289,7 +3289,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Checking syntax error
*/
public void test0153() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0153", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0153", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The compilation unit is malformed", !isMalformed(result)); //$NON-NLS-1$
@@ -3303,7 +3303,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Checking binding of package declaration
*/
public void test0154() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0154", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0154", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -3321,7 +3321,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Checking arguments positions
*/
public void test0155() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0155", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0155", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
@@ -3343,7 +3343,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Checking arguments positions
*/
public void test0156() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0156", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0156", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
@@ -3367,7 +3367,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check canonic binding for fields
*/
public void test0157() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "Test0157.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "Test0157.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -3405,7 +3405,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check canonic bindings for fields
*/
public void test0158() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "Test0158.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "Test0158.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -3443,7 +3443,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Define an anonymous type
*/
public void test0159() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0159", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0159", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -3453,7 +3453,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check bindings for multiple field declarations
*/
public void test0160() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0160", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0160", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -3514,7 +3514,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* - getSuperclass()
*/
public void test0161() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0161", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0161", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -3573,7 +3573,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* - getSuperclass()
*/
public void test0162() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0162", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0162", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -3609,7 +3609,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Test binding for anonymous declaration: new java.lang.Object() {}
*/
public void test0163() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0163", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0163", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
@@ -3644,7 +3644,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Test binding for member type declaration
*/
public void test0164() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0164", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0164", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -3678,7 +3678,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Test binding for local type declaration
*/
public void test0165() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0165", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0165", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -3714,7 +3714,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Multiple local declaration => VariabledeclarationStatement
*/
public void test0166() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0166", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0166", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
@@ -3783,7 +3783,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check source position for new Test[1+2].length.
*/
public void test0167() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0167", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0167", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -3803,7 +3803,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check package binding: test0168.test
*/
public void test0168() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0168.test1", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0168.test1", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -3830,7 +3830,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check package binding: test0169
*/
public void test0169() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0169", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0169", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -3856,7 +3856,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check package binding: test0170
*/
public void test0170() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "Test0170.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "Test0170.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -3881,7 +3881,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check package binding: test0171
*/
public void test0171() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0171", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0171", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -3914,7 +3914,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check method binding
*/
public void test0172() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0172", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0172", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -4021,7 +4021,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* i++; IVariableBinding
*/
public void test0173() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0173", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0173", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -4051,7 +4051,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* i++; IVariableBinding (field)
*/
public void test0174() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0174", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0174", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 1, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -4080,7 +4080,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* int i = 0; Test IntBinding for the field declaration and the 0 literal
*/
public void test0175() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0175", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0175", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0);
assertTrue("VariableDeclarationStatement", node2 instanceof FieldDeclaration); //$NON-NLS-1$
@@ -4100,7 +4100,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* ThisReference
*/
public void test0176() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0176", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0176", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
assertTrue("Return statement", node2 instanceof ReturnStatement); //$NON-NLS-1$
@@ -4123,7 +4123,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* i++; IVariableBinding
*/
public void test0177() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0177", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0177", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 1, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -4153,7 +4153,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* SuperReference
*/
public void test0178() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0178", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0178", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 1, 0, 0);
assertTrue("Return statement", node2 instanceof ReturnStatement); //$NON-NLS-1$
@@ -4171,7 +4171,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Allocation expression
*/
public void test0179() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0179", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0179", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
@@ -4190,7 +4190,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Allocation expression
*/
public void test0180() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0180", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0180", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
@@ -4211,7 +4211,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Allocation expression
*/
public void test0181() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0181", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0181", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
@@ -4231,7 +4231,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* BinaryExpression
*/
public void test0182() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0182", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0182", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -4249,7 +4249,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* BinaryExpression
*/
public void test0183() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0183", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0183", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -4267,7 +4267,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* BinaryExpression
*/
public void test0184() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0184", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0184", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -4285,7 +4285,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* BinaryExpression
*/
public void test0185() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0185", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0185", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -4303,7 +4303,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* BinaryExpression
*/
public void test0186() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0186", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0186", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -4321,7 +4321,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* BinaryExpression
*/
public void test0187() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0187", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0187", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -4339,7 +4339,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* BinaryExpression
*/
public void test0188() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0188", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0188", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -4357,7 +4357,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* BinaryExpression
*/
public void test0189() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0189", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0189", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -4375,7 +4375,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* BinaryExpression
*/
public void test0190() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0190", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0190", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 2, 1);
@@ -4393,7 +4393,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* BinaryExpression
*/
public void test0191() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0191", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0191", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -4417,7 +4417,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Initializer
*/
public void test0192() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0192", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0192", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -4438,7 +4438,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Initializer
*/
public void test0193() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0193", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0193", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
@@ -4460,7 +4460,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Initializer
*/
public void test0194() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0194", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0194", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
@@ -4483,7 +4483,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Initializer
*/
public void test0195() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0195", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0195", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 1, 0, 1);
@@ -4507,7 +4507,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Initializer
*/
public void test0196() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0196", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0196", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 2);
@@ -4528,7 +4528,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Initializer
*/
public void test0197() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0197", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0197", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType());
@@ -4554,7 +4554,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Initializer
*/
public void test0198() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0198", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0198", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -4580,7 +4580,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Initializer
*/
public void test0199() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0199", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0199", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -4609,7 +4609,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Initializer
*/
public void test0200() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0200", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0200", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 1, 0, 0);
@@ -4639,7 +4639,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Position inside for statement: PR 3300
*/
public void test0201() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0201", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0201", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -4655,7 +4655,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* PR 7386
*/
public void test0202() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0202", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0202", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0);
@@ -4677,7 +4677,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* PR 7386
*/
public void test0203() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0203", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0203", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0);
@@ -4703,7 +4703,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* PR 7386
*/
public void test0204() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0204", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0204", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0);
@@ -4737,7 +4737,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Local class end position when trailing comment
*/
public void test0205() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0205", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0205", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -4752,7 +4752,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* QualifiedName
*/
public void test0206() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0206", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0206", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 5, 0);
@@ -4825,7 +4825,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* @deprecated marking deprecated since using deprecated code
*/
public void test0207() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0207", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0207", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -4840,7 +4840,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check javadoc for MethodDeclaration
*/
public void test0208() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0208", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0208", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -4855,7 +4855,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check javadoc for MethodDeclaration
*/
public void test0209() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0209", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0209", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -4871,7 +4871,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* @deprecated marking deprecated since using deprecated code
*/
public void test0210() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0210", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0210", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -4885,7 +4885,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check javadoc for FieldDeclaration
*/
public void test0211() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0211", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0211", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -4900,7 +4900,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check javadoc for FieldDeclaration
*/
public void test0212() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0212", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0212", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -4915,7 +4915,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check javadoc for TypeDeclaration
*/
public void test0213() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0213", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0213", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0);
@@ -4933,7 +4933,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check javadoc for TypeDeclaration
*/
public void test0214() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0214", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0214", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0);
@@ -4952,7 +4952,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* @deprecated marking deprecated since using deprecated code
*/
public void test0215() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0215", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0215", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0);
@@ -4973,7 +4973,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* @deprecated marking deprecated since using deprecated code
*/
public void test0216() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0216", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0216", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -4991,7 +4991,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check javadoc for MemberTypeDeclaration
*/
public void test0217() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0217", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0217", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -5006,7 +5006,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check javadoc for MemberTypeDeclaration
*/
public void test0218() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0218", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0218", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -5021,7 +5021,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check javadoc for MemberTypeDeclaration
*/
public void test0219() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0219", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0219", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -5036,7 +5036,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Checking initializers
*/
public void test0220() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0220", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0220", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -5048,7 +5048,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Checking initializers
*/
public void test0221() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0221", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0221", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -5061,7 +5061,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* @deprecated marking deprecated since using deprecated code
*/
public void test0222() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0222", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0222", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -5081,7 +5081,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* @deprecated marking deprecated since using deprecated code
*/
public void test0223() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0223", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0223", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -5100,7 +5100,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Checking initializers
*/
public void test0224() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0224", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0224", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -5114,7 +5114,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Continue ==> ContinueStatement
*/
public void test0225() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0225", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0225", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
LabeledStatement labeledStatement = (LabeledStatement) getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -5133,7 +5133,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Break + label ==> BreakStatement
*/
public void test0226() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0226", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0226", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
LabeledStatement labeledStatement = (LabeledStatement) getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -5152,7 +5152,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* QualifiedName
*/
public void test0227() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0227", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0227", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 3, 2, 0);
@@ -5239,7 +5239,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* QualifiedName as TypeReference
*/
public void test0228() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0228", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0228", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
@@ -5267,7 +5267,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* MethodInvocation
*/
public void test0229() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0229", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0229", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -5297,7 +5297,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* MethodInvocation
*/
public void test0230() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0230", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0230", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
@@ -5322,7 +5322,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* MethodInvocation
*/
public void test0231() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0231", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0231", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -5358,7 +5358,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* MethodInvocation
*/
public void test0232() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0232", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0232", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
@@ -5389,7 +5389,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Checking that only syntax errors are reported for the MALFORMED tag
*/
public void test0233() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0233", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0233", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The compilation unit is malformed", !isMalformed(result)); //$NON-NLS-1$
@@ -5405,7 +5405,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Checking that null is returned for a resolveBinding if the type is unknown
*/
public void test0234() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0234", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0234", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -5426,7 +5426,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Checking that null is returned for a resolveBinding if the type is unknown
*/
public void test0235() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0235", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0235", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -5447,7 +5447,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=9452
*/
public void test0237() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "junit.framework", "TestCase.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "junit.framework", "TestCase.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -5457,7 +5457,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check ThisExpression
*/
public void test0238() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0238", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0238", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
char[] source = sourceUnit.getSource().toCharArray();
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -5492,7 +5492,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check ThisExpression
*/
public void test0239() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0239", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0239", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -5530,7 +5530,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check FieldAccess
*/
public void test0240() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0240", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0240", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -5571,7 +5571,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check order of body declarations
*/
public void test0241() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0241", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0241", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -5607,7 +5607,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check ThisExpression
*/
public void test0242() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0242", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0242", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -5649,7 +5649,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10570
*/
public void test0243() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0243", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0243", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -5668,7 +5668,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10570
*/
public void test0244() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0244", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0244", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -5688,7 +5688,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=10587
*/
public void test0245() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0245", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0245", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -5713,7 +5713,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Test binding resolution for import declaration
*/
public void test0246() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0246", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0246", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -5741,7 +5741,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Test binding resolution for import declaration
*/
public void test0247() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0247", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0247", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -5759,7 +5759,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10592
*/
public void test0248() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0248", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0248", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -5782,7 +5782,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10592
*/
public void test0249() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0249", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0249", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -5810,7 +5810,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10592
*/
public void test0250() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0250", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0250", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -5833,7 +5833,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check qualified name resolution for static fields
*/
public void test0251() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0251", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0251", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -5864,7 +5864,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check binding for anonymous class
*/
public void test0252() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0252", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0252", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -5886,7 +5886,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check binding for allocation expression
*/
public void test0253() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0253", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0253", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -5907,7 +5907,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check binding for allocation expression
*/
public void test0254() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0254", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0254", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -5927,7 +5927,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check binding for allocation expression
*/
public void test0255() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0255", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0255", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -5952,7 +5952,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check binding for allocation expression
*/
public void test0256() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0256", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0256", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -5983,7 +5983,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check binding for allocation expression
*/
public void test0257() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0257", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0257", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -6008,7 +6008,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check binding for allocation expression
*/
public void test0258() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0258", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0258", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -6039,7 +6039,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10663
*/
public void test0259() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0259", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0259", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -6049,7 +6049,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10592
*/
public void test0260() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0260", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0260", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -6078,7 +6078,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10679
*/
public void test0261() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0261", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0261", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -6097,7 +6097,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10676
*/
public void test0262() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0262", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0262", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -6127,7 +6127,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10700
*/
public void test0263() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0263", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0263", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -6151,7 +6151,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10699
*/
public void test0264() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0264", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0264", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6187,7 +6187,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10698
*/
public void test0265() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0265", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0265", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -6197,7 +6197,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10759
*/
public void test0266() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0266", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0266", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6224,7 +6224,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10759
*/
public void test0267() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0267", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0267", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6251,7 +6251,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10759
*/
public void test0268() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0268", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0268", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6277,7 +6277,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10759
*/
public void test0269() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0269", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0269", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6303,7 +6303,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10759
*/
public void test0270() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0270", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0270", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6325,7 +6325,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10759
*/
public void test0271() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0271", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0271", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6351,7 +6351,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10843
*/
public void test0272() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0272", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0272", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6369,7 +6369,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10843
*/
public void test0273() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0273", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0273", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6393,7 +6393,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10843
*/
public void test0274() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0274", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0274", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6417,7 +6417,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10843
*/
public void test0275() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0275", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0275", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6435,7 +6435,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10798
*/
public void test0276() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0276", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0276", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6460,7 +6460,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10798
*/
public void test0277() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0277", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0277", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6483,7 +6483,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10861
*/
public void test0278() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0278", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0278", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6507,7 +6507,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10861
*/
public void test0279() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0279", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0279", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6532,7 +6532,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* Check well known types
*/
public void test0280() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0280", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0280", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -6618,7 +6618,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
*/
public void test0281() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0281", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0281", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6639,7 +6639,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
*/
public void test0282() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0282", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0282", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6660,7 +6660,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
*/
public void test0283() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0283", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0283", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6681,7 +6681,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
*/
public void test0284() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0284", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0284", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6702,7 +6702,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
*/
public void test0285() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0285", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0285", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6723,7 +6723,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
*/
public void test0286() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0286", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0286", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6744,7 +6744,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
*/
public void test0287() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0287", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0287", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6765,7 +6765,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
*/
public void test0288() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0288", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0288", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6786,7 +6786,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
*/
public void test0289() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0289", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0289", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6807,7 +6807,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
*/
public void test0290() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0290", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0290", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6828,7 +6828,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10898
*/
public void test0291() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0291", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0291", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -6841,7 +6841,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10913
*/
public void test0292() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0292", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0292", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -6872,7 +6872,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10935
*/
public void test0293() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0293", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0293", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6908,7 +6908,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10984
*/
public void test0294() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0294", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0294", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6940,7 +6940,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10986
*/
public void test0295() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0295", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0295", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -6962,7 +6962,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10984
*/
public void test0296() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0296", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0296", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6994,7 +6994,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=11037
*/
public void test0297() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0297", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0297", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
runConversion(AST.JLS3, sourceUnit, false);
}
@@ -7002,7 +7002,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10984
*/
public void test0298() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0298", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0298", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -7020,7 +7020,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=11104
*/
public void test0299() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0299", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0299", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -7045,7 +7045,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=11104
*/
public void test0300() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0300", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0300", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -7067,7 +7067,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=11104
*/
public void test0301() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0301", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0301", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -7088,7 +7088,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=11106
*/
public void test0302() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0302", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0302", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -7108,7 +7108,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=11129
*/
public void test0303() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0303", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0303", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -7135,7 +7135,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=11151
*/
public void test0304() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0304", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0304", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -7160,7 +7160,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
" public void foo(int arg) {}\n" + //$NON-NLS-1$
"}").toCharArray(); //$NON-NLS-1$
IJavaProject project = getJavaProject("Converter"); //$NON-NLS-1$
- ASTNode result = runConversion(AST.JLS3, source, "Test.java", project, true); //$NON-NLS-1$
+ ASTNode result = runConversion(AST.JLS3, source, "Test.js", project, true); //$NON-NLS-1$
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7185,7 +7185,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
" public void foo(int arg) {}\n" + //$NON-NLS-1$
"}").toCharArray(); //$NON-NLS-1$
IJavaProject project = getJavaProject("Converter"); //$NON-NLS-1$
- ASTNode result = runConversion(AST.JLS3, source, "Object.java", project, true); //$NON-NLS-1$
+ ASTNode result = runConversion(AST.JLS3, source, "Object.js", project, true); //$NON-NLS-1$
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7204,7 +7204,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=11371
*/
public void test0307() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0307", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0307", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -7226,7 +7226,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=11371
*/
public void test0308() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0308", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0308", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -7251,7 +7251,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=11380
*/
public void test0309() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0309", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0309", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -7274,7 +7274,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=11380
*/
public void test0310() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0310", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0310", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -7298,7 +7298,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=11638
*/
public void test0311() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0311", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0311", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -7347,7 +7347,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* declaring node.
*/
public void test0312() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0312", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0312", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -7392,7 +7392,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=11659
*/
public void test0313() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0313", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0313", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -7423,7 +7423,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=12326
*/
public void test0314() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0314", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0314", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
assertNotNull("No result", result); //$NON-NLS-1$
@@ -7440,7 +7440,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=12326
*/
public void test0315() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0315", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0315", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -7477,7 +7477,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=12454
*/
public void test0316() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "Hello.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "Hello.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No result", result); //$NON-NLS-1$
assertTrue("Not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -7490,7 +7490,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=12781
*/
public void test0317() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0317", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0317", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -7528,7 +7528,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=13233
*/
public void test0318() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0318", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0318", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -7541,7 +7541,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=13807
*/
public void test0319() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0319", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0319", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -7574,7 +7574,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=13807
*/
public void test0320() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0320", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0320", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -7599,7 +7599,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=13807
*/
public void test0321() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0321", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0321", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -7632,7 +7632,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=13231
*/
public void test0322() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0322", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0322", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -7656,7 +7656,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=14198
*/
public void test0323() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0323", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0323", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -7683,7 +7683,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=14198
*/
public void test0324() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0324", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0324", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -7710,7 +7710,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=14198
*/
public void test0325() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0325", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0325", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -7737,7 +7737,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=14217
*/
public void test0326() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0326", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0326", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
char[] source = sourceUnit.getSource().toCharArray();
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -7754,7 +7754,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=14198
*/
public void test0327() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0327", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0327", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -7782,7 +7782,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=13807
*/
public void test0328() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0328", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0328", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -7823,7 +7823,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=13807
*/
public void test0329() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0329", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0329", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -7864,7 +7864,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=14313
*/
public void test0330() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0330", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0330", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -7897,7 +7897,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=14322
*/
public void test0331() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0331", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0331", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -7924,7 +7924,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=14403
*/
public void test0332() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0332", "LocalSelectionTransfer.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0332", "LocalSelectionTransfer.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -7934,7 +7934,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=13807
*/
public void test0333() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0333", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0333", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -7973,7 +7973,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=13807
*/
public void test0334() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0334", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0334", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8024,7 +8024,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=14526
*/
public void test0335() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0335", "ExceptionTestCaseTest.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0335", "ExceptionTestCaseTest.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -8058,7 +8058,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=14526
*/
public void test0336() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0336", "SorterTest.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0336", "SorterTest.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -8090,7 +8090,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=14602
*/
public void test0337() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0337", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0337", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8112,7 +8112,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=14852
*/
public void test0338() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0338", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0338", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -8134,7 +8134,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=15061
*/
public void test0339() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0339", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0339", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8171,7 +8171,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=14852
*/
public void test0340() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "p3", "B.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "p3", "B.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -8225,7 +8225,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=15804
*/
public void test0341() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0341", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0341", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8300,7 +8300,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* @deprecated marked deprecated to suppress JDOM-related deprecation warnings
*/
public void test0342() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0342", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0342", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IDOMCompilationUnit dcompUnit = new DOMFactory().createCompilationUnit(sourceUnit.getSource(), sourceUnit.getElementName());
assertNotNull("dcompUnit is null", dcompUnit); //$NON-NLS-1$
@@ -8343,7 +8343,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=16051
*/
public void test0343() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0343", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0343", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8368,7 +8368,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
String compiler_source = null;
String compiler_compliance = null;
try {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0344", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0344", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
project = sourceUnit.getJavaProject();
pb_assert = project.getOption(JavaCore.COMPILER_PB_ASSERT_IDENTIFIER, true);
compiler_source = project.getOption(JavaCore.COMPILER_SOURCE, true);
@@ -8394,7 +8394,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=17922
*/
public void test0345() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0345", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0345", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -8447,7 +8447,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=18138
*/
public void test0346() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0346", "Test2.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0346", "Test2.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8483,7 +8483,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=18138
*/
public void test0347() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0347", "Test2.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0347", "Test2.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8509,7 +8509,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=18138
*/
public void test0348() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0348", "Test2.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0348", "Test2.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8535,7 +8535,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=18138
*/
public void test0349() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0349", "Test2.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0349", "Test2.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8561,7 +8561,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=18138
*/
public void test0350() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0350", "Test2.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0350", "Test2.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8587,7 +8587,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=18169
*/
public void test0351() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0351", "Test2.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0351", "Test2.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8620,7 +8620,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=18169
*/
public void test0352() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0352", "Test2.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0352", "Test2.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8653,7 +8653,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=18042
*/
public void test0353() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0353", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0353", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8688,7 +8688,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=19851
*/
public void test0354() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0354", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0354", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -8700,7 +8700,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=20520
*/
public void test0355() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0355", "Foo.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0355", "Foo.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -8724,7 +8724,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=20865
*/
public void test0356() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0356", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0356", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -8756,7 +8756,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=21757
*/
public void test0357() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0357", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0357", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8775,7 +8775,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=21768
*/
public void test0358() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0358", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0358", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8794,7 +8794,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=21768
*/
public void test0359() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0359", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0359", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8813,7 +8813,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=21916
*/
public void test0360() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0360", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0360", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -8831,7 +8831,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=21916
*/
public void test0361() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0361", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0361", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -8848,7 +8848,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=21916
*/
public void test0362() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0362", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0362", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -8902,7 +8902,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=22939
*/
public void test0363() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0363", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0363", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8926,7 +8926,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=11529
*/
public void test0364() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0364", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0364", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8950,7 +8950,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=11529
*/
public void test0365() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0365", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0365", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -8975,7 +8975,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23048
*/
public void test0366() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0366", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0366", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8996,7 +8996,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23048
*/
public void test0367() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0367", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0367", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -9017,7 +9017,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23048
*/
public void test0368() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0368", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0368", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -9038,7 +9038,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23048
*/
public void test0369() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0369", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0369", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -9059,7 +9059,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* DoStatement ==> DoStatement
*/
public void test0370() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0370", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0370", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -9080,7 +9080,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23048
*/
public void test0371() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0371", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0371", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -9101,7 +9101,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23048
*/
public void test0372() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0372", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0372", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -9122,7 +9122,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23118
*/
public void test0373() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0373", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0373", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -9148,7 +9148,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23118
*/
public void test0374() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0374", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0374", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -9174,7 +9174,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23052
*/
public void test0375() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0375", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0375", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -9192,7 +9192,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=22939
*/
public void test0376() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0376", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0376", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -9216,7 +9216,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23050
*/
public void test0377() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0377", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0377", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -9238,7 +9238,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=22161
*/
public void test0378() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0378", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0378", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -9257,7 +9257,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=22161
*/
public void test0379() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0379", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0379", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -9272,7 +9272,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=22054
*/
public void test0380() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0380", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0380", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -9300,7 +9300,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23054
*/
public void test0381() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0381", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0381", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -9318,7 +9318,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=22154
*/
public void test0382() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0382", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0382", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -9336,7 +9336,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=22154
*/
public void test0383() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0383", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0383", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -9354,7 +9354,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=22154
*/
public void test0384() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0384", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0384", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -9372,7 +9372,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23117
*/
public void test0385() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0385", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0385", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -9384,7 +9384,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23259
*/
public void test0386() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0386", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0386", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -9409,7 +9409,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=22939
*/
public void test0387() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0387", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0387", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -9433,7 +9433,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=22154
*/
public void test0388() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0388", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0388", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -9452,7 +9452,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=22154
*/
public void test0389() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0389", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0389", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -9471,7 +9471,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=22154
*/
public void test0390() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0390", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0390", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -9491,7 +9491,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=22154
*/
public void test0391() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0391", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0391", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -9511,7 +9511,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=22154
*/
public void test0392() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0392", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0392", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -9531,7 +9531,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23284
*/
public void test0393() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0393", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0393", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -9561,7 +9561,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23284
*/
public void test0394() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0394", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0394", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -9585,7 +9585,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23284
*/
public void test0395() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0395", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0395", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -9615,7 +9615,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23284
*/
public void test0396() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0396", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0396", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -9647,7 +9647,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23284
*/
public void test0397() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0397", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0397", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -9679,7 +9679,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23362
*/
public void test0398() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0398", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0398", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -9705,7 +9705,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=22306
*/
public void test0399() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0399", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0399", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull(node);
@@ -9721,7 +9721,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=22306
*/
public void test0400() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0400", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0400", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterJavadocTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterJavadocTest.java
index bc40ad9..9d9187a 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterJavadocTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterJavadocTest.java
@@ -1505,7 +1505,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
*/
public void test011() throws JavaModelException {
problems = new StringBuffer();
- sourceUnit = getCompilationUnit("Converter" , "src", "javadoc.test011", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ sourceUnit = getCompilationUnit("Converter" , "src", "javadoc.test011", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assumeNotNull("No compilation unit", result);
}
@@ -1630,7 +1630,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=54776"
*/
public void testBug54776() throws JavaModelException {
- sourceUnit = getCompilationUnit("Converter" , "src", "javadoc.testBug54776", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ sourceUnit = getCompilationUnit("Converter" , "src", "javadoc.testBug54776", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, false);
final CompilationUnit compilUnit = (CompilationUnit) result;
assumeEquals(prefix+"Wrong number of problems", 0, compilUnit.getProblems().length); //$NON-NLS-1$
@@ -1663,7 +1663,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=55221"
*/
public void testBug55221a() throws JavaModelException {
- sourceUnit = getCompilationUnit("Converter" , "src", "javadoc.testBug55221.a", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ sourceUnit = getCompilationUnit("Converter" , "src", "javadoc.testBug55221.a", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, false);
final CompilationUnit compilUnit = (CompilationUnit) result;
assumeEquals(prefix+"Wrong number of problems", 0, compilUnit.getProblems().length); //$NON-NLS-1$
@@ -1700,7 +1700,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
assumeEquals("Method declaration "+method+" does not start at the right position", commentStart, method.getStartPosition());
}
public void testBug55221b() throws JavaModelException {
- sourceUnit = getCompilationUnit("Converter" , "src", "javadoc.testBug55221.b", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ sourceUnit = getCompilationUnit("Converter" , "src", "javadoc.testBug55221.b", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, false);
final CompilationUnit compilUnit = (CompilationUnit) result;
assumeEquals(prefix+"Wrong number of problems", 0, compilUnit.getProblems().length); //$NON-NLS-1$
@@ -1737,7 +1737,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
assumeEquals("Method declaration "+method+" does not start at the right position", commentStart, method.getStartPosition());
}
public void testBug55221c() throws JavaModelException {
- sourceUnit = getCompilationUnit("Converter" , "src", "javadoc.testBug55221.c", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ sourceUnit = getCompilationUnit("Converter" , "src", "javadoc.testBug55221.c", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, false);
final CompilationUnit compilUnit = (CompilationUnit) result;
assumeEquals(prefix+"Wrong number of problems", 0, compilUnit.getProblems().length); //$NON-NLS-1$
@@ -1779,7 +1779,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
}
/** @deprecated using deprecated code */
public void testBug55221d() throws JavaModelException {
- sourceUnit = getCompilationUnit("Converter" , "src", "javadoc.testBug55221.d", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ sourceUnit = getCompilationUnit("Converter" , "src", "javadoc.testBug55221.d", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, false);
final CompilationUnit compilUnit = (CompilationUnit) result;
assumeEquals(prefix+"Wrong number of problems", 0, compilUnit.getProblems().length); //$NON-NLS-1$
@@ -1807,7 +1807,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
}
public void testBug55223a() throws JavaModelException {
// stopOnFailure = false;
- sourceUnit = getCompilationUnit("Converter" , "src", "javadoc.testBug55223", "TestA.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ sourceUnit = getCompilationUnit("Converter" , "src", "javadoc.testBug55223", "TestA.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, false);
final CompilationUnit compilUnit = (CompilationUnit) result;
assumeEquals(prefix+"Wrong number of problems", 0, compilUnit.getProblems().length); //$NON-NLS-1$
@@ -1846,7 +1846,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
}
/** @deprecated using deprecated code */
public void testBug55223b() throws JavaModelException {
- sourceUnit = getCompilationUnit("Converter" , "src", "javadoc.testBug55223", "TestB.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ sourceUnit = getCompilationUnit("Converter" , "src", "javadoc.testBug55223", "TestB.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, false);
final CompilationUnit compilUnit = (CompilationUnit) result;
assumeEquals(prefix+"Wrong number of problems", 0, compilUnit.getProblems().length); //$NON-NLS-1$
@@ -1885,7 +1885,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=50898"
*/
public void testBug50898() throws JavaModelException {
- ICompilationUnit unit = getCompilationUnit("Converter" , "src", "javadoc.testBug50898", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit unit = getCompilationUnit("Converter" , "src", "javadoc.testBug50898", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
packageBinding = false;
verifyComments(unit);
}
@@ -1928,7 +1928,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=51363"
*/
public void testBug51363() throws JavaModelException {
- sourceUnit = getCompilationUnit("Converter" , "src", "javadoc.testBug51363", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ sourceUnit = getCompilationUnit("Converter" , "src", "javadoc.testBug51363", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, false);
final CompilationUnit unit = (CompilationUnit) result;
assumeEquals(prefix+"Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
@@ -2009,7 +2009,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=53075"
*/
public void testBug53075() throws JavaModelException {
- ICompilationUnit unit = getCompilationUnit("Converter" , "src", "javadoc.testBug53075", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit unit = getCompilationUnit("Converter" , "src", "javadoc.testBug53075", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
boolean pb = packageBinding;
packageBinding = false;
CompilationUnit compilUnit = verifyComments(unit);
@@ -2098,7 +2098,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
*/
public void testBug51660() throws JavaModelException {
stopOnFailure = false;
- ICompilationUnit unit = getCompilationUnit("Converter" , "src", "javadoc.testBug51660", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit unit = getCompilationUnit("Converter" , "src", "javadoc.testBug51660", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit compilUnit = verifyComments(unit);
if (docCommentSupport.equals(JavaCore.ENABLED)) {
String[] tagNames = {
@@ -2305,7 +2305,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
public void testBug79809() throws JavaModelException {
workingCopies = new ICompilationUnit[1];
astLevel = AST.JLS3;
- workingCopies[0] = getWorkingCopy("/Converter/src/javadoc/b79809/Test.java",
+ workingCopies[0] = getWorkingCopy("/Converter/src/javadoc/b79809/Test.js",
"package javadoc.b79809;\n" +
"/**\n" +
" * @param <E> Class type parameter\n" +
@@ -2323,7 +2323,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
public void testBug79809b() throws JavaModelException {
workingCopies = new ICompilationUnit[1];
astLevel = AST.JLS3;
- workingCopies[0] = getWorkingCopy("/Converter/src/javadoc/b79809/Test.java",
+ workingCopies[0] = getWorkingCopy("/Converter/src/javadoc/b79809/Test.js",
"package javadoc.b79809;\n" +
"\n" +
"/**\n" +
@@ -2345,7 +2345,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
public void testBug79904() throws JavaModelException {
workingCopies = new ICompilationUnit[1];
astLevel = AST.JLS3;
- workingCopies[0] = getWorkingCopy("/Converter/src/javadoc/b79904/Test.java",
+ workingCopies[0] = getWorkingCopy("/Converter/src/javadoc/b79904/Test.js",
"package javadoc.b79904;\n" +
"/**\n" +
" * @param <E>\n" +
@@ -2368,7 +2368,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
public void testBug80221() throws JavaModelException {
workingCopies = new ICompilationUnit[1];
astLevel = AST.JLS3;
- workingCopies[0] = getWorkingCopy("/Converter/src/javadoc/b80221/Test.java",
+ workingCopies[0] = getWorkingCopy("/Converter/src/javadoc/b80221/Test.js",
"package javadoc.b80221;\n" +
"public class Test {\n" +
" /**\n" +
@@ -2389,7 +2389,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
public void testBug80257() throws JavaModelException {
workingCopies = new ICompilationUnit[1];
astLevel = AST.JLS3;
- workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b80257/Test.java",
+ workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b80257/Test.js",
"package javadoc.b80257;\n" +
"import java.util.*;\n" +
"public class Test {\n" +
@@ -2443,15 +2443,15 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
public void testBug83804() throws CoreException, JavaModelException {
astLevel = AST.JLS3;
workingCopies = new ICompilationUnit[2];
- workingCopies[0] = getCompilationUnit("Converter15", "src", "javadoc.b83804", "package-info.java");
- workingCopies[1] = getCompilationUnit("Converter15", "src", "javadoc.b83804", "Test.java");
+ workingCopies[0] = getCompilationUnit("Converter15", "src", "javadoc.b83804", "package-info.js");
+ workingCopies[1] = getCompilationUnit("Converter15", "src", "javadoc.b83804", "Test.js");
verifyWorkingCopiesComments();
}
public void testBug83804a() throws CoreException, JavaModelException {
astLevel = AST.JLS3;
workingCopies = new ICompilationUnit[2];
- workingCopies[0] = getCompilationUnit("Converter15", "src", "javadoc.b83804a", "package-info.java");
- workingCopies[1] = getCompilationUnit("Converter15", "src", "javadoc.b83804a", "Test.java");
+ workingCopies[0] = getCompilationUnit("Converter15", "src", "javadoc.b83804a", "package-info.js");
+ workingCopies[1] = getCompilationUnit("Converter15", "src", "javadoc.b83804a", "Test.js");
verifyWorkingCopiesComments();
}
@@ -2462,7 +2462,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
public void testBug84049() throws JavaModelException {
workingCopies = new ICompilationUnit[1];
astLevel = AST.JLS3;
- workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b84049/Test.java",
+ workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b84049/Test.js",
"package javadoc.b84049;\n" +
"public class Test {\n" +
" /**\n" +
@@ -2498,7 +2498,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
public void testBug87845() throws JavaModelException {
workingCopies = new ICompilationUnit[1];
astLevel = AST.JLS3;
- workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b87845/Test.java",
+ workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b87845/Test.js",
"package javadoc.b87845;\n" +
"public class Test {\n" +
" public void foo(int a, int b) {} \n" +
@@ -2573,7 +2573,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
public void testBug93880_15a() throws JavaModelException {
workingCopies = new ICompilationUnit[1];
astLevel = AST.JLS3;
- workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b93880/Test.java",
+ workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b93880/Test.js",
"/**\n" +
" * Javadoc\n" +
" */\n" +
@@ -2597,7 +2597,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
public void testBug93880_15b() throws JavaModelException {
workingCopies = new ICompilationUnit[1];
astLevel = AST.JLS3;
- workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b93880/package-info.java",
+ workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b93880/package-info.js",
"/**\n" +
" * Javadoc for all package\n" +
" */\n" +
@@ -2619,7 +2619,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
public void testBug93880_15c() throws JavaModelException {
workingCopies = new ICompilationUnit[1];
astLevel = AST.JLS3;
- workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b93880/package-info.java",
+ workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b93880/package-info.js",
"/**\n" +
" * Javadoc for all package\n" +
" */\n" +
@@ -2641,7 +2641,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
public void testBug93880_15d() throws JavaModelException {
workingCopies = new ICompilationUnit[1];
astLevel = AST.JLS3;
- workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b93880/package-info.java",
+ workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b93880/package-info.js",
"/**\n" +
" * Javadoc for all package\n" +
" */\n" +
@@ -2665,7 +2665,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
public void testBug93880_15e() throws JavaModelException {
workingCopies = new ICompilationUnit[1];
astLevel = AST.JLS3;
- workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b93880/package-info.java",
+ workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b93880/package-info.js",
"/* (non-javadoc)\n" +
" * No comment\n" +
" */\n" +
@@ -2689,7 +2689,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
public void testBug93880_14a() throws JavaModelException {
workingCopies = new ICompilationUnit[1];
astLevel = AST.JLS3;
- workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b93880/Test.java",
+ workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b93880/Test.js",
"/**\n" +
" * Javadoc\n" +
" */\n" +
@@ -2710,7 +2710,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
public void testBug93880_14b() throws JavaModelException {
workingCopies = new ICompilationUnit[1];
astLevel = AST.JLS3;
- workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b93880/package-info.java",
+ workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b93880/package-info.js",
"/**\n" +
" * Javadoc for all package\n" +
" */\n" +
@@ -2729,7 +2729,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
public void testBug93880_14c() throws JavaModelException {
workingCopies = new ICompilationUnit[1];
astLevel = AST.JLS3;
- workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b93880/package-info.java",
+ workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b93880/package-info.js",
"/**\n" +
" * Javadoc for all package\n" +
" */\n" +
@@ -2748,7 +2748,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
public void testBug93880_14d() throws JavaModelException {
workingCopies = new ICompilationUnit[1];
astLevel = AST.JLS3;
- workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b93880/package-info.java",
+ workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b93880/package-info.js",
"/**\n" +
" * Javadoc for all package\n" +
" */\n" +
@@ -2769,7 +2769,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
public void testBug93880_14e() throws JavaModelException {
workingCopies = new ICompilationUnit[1];
astLevel = AST.JLS3;
- workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b93880/package-info.java",
+ workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b93880/package-info.js",
"/* (non-javadoc)\n" +
" * No comment\n" +
" */\n" +
@@ -2795,7 +2795,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
public void testBug94150() throws JavaModelException {
workingCopies = new ICompilationUnit[1];
astLevel = AST.JLS3;
- workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b94150/Category.java",
+ workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b94150/Category.js",
"package javadoc.b94150;\n" +
"public enum Category {\n" +
" /**\n" +
@@ -2835,7 +2835,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
*/
public void testBug99507() throws JavaModelException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b99507/X.java",
+ workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b99507/X.js",
"package javadoc.b99507;\n" +
"public class X {\n" +
"}\n" +
@@ -2857,7 +2857,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
*/
public void testBug100041() throws JavaModelException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b100041/X.java",
+ workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b100041/X.js",
"package javadoc.b100041;\n" +
"class X {\n" +
" static Object object;\n" +
@@ -2899,7 +2899,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
}
public void testBug100041b() throws JavaModelException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b100041/X.java",
+ workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b100041/X.js",
"package javadoc.b100041;\n" +
"class X {\n" +
" static Object object;\n" +
@@ -2934,7 +2934,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
}
public void testBug100041c() throws JavaModelException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b100041/Z.java",
+ workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b100041/Z.js",
"package javadoc.b100041;\n" +
"public class Z {\n" +
" /** C1 */\n" +
@@ -3019,7 +3019,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
public void testBug103304() throws JavaModelException {
this.packageBinding = false; // do NOT verify that qualification only can be package name
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b103304/Test.java",
+ workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b103304/Test.js",
"package javadoc.b103304;\n" +
"interface IAFAState {\n" +
" public class ValidationException extends Exception {\n" +
@@ -3065,7 +3065,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
public void testBug106581() throws JavaModelException {
workingCopies = new ICompilationUnit[1];
astLevel = AST.JLS3;
- workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b106581/A.java",
+ workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b106581/A.js",
"package javadoc.b106581;\n" +
"public class A {\n" +
" /**\n" +
@@ -3100,7 +3100,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
public void testBug108622() throws JavaModelException {
workingCopies = new ICompilationUnit[1];
astLevel = AST.JLS3;
- workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b108622/Test.java",
+ workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b108622/Test.js",
"package javadoc.b108622;\n" +
"/**\n" +
" * \n" +
@@ -3149,7 +3149,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
public void testBug113108a() throws JavaModelException {
workingCopies = new ICompilationUnit[1];
astLevel = AST.JLS3;
- workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b113108/Test.java",
+ workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b113108/Test.js",
"package javadoc.b113108;\n" +
"/** C0 */\n" +
"public class Test {\n" +
@@ -3186,7 +3186,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
public void testBug113108b() throws JavaModelException {
workingCopies = new ICompilationUnit[1];
astLevel = AST.JLS3;
- workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b113108/Test.java",
+ workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b113108/Test.js",
"package javadoc.b113108;\n" +
"/** C0 */\n" +
"public class Test {\n" +
@@ -3223,7 +3223,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
public void testBug113108c() throws JavaModelException {
workingCopies = new ICompilationUnit[1];
astLevel = AST.JLS3;
- workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b113108/Test.java",
+ workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b113108/Test.js",
"package javadoc.b113108;\n" +
"/** C0 */\n" +
"public class Test {\n" +
@@ -3265,7 +3265,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
public void testBug125676() throws JavaModelException {
workingCopies = new ICompilationUnit[3];
astLevel = AST.JLS3;
- workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b125676/A.java",
+ workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b125676/A.js",
"package javadoc.b125676;\n" +
"public class A {\n" +
" /**\n" +
@@ -3279,7 +3279,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
" int READ_ACCESSES = 4;\n" +
"}\n"
);
- workingCopies[1] = getWorkingCopy("/Converter15/src/javadoc/b125676/B.java",
+ workingCopies[1] = getWorkingCopy("/Converter15/src/javadoc/b125676/B.js",
"package javadoc.b125676;\n" +
"public class B {\n" +
" /**\n" +
@@ -3303,7 +3303,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
"\n" +
"}\n"
);
- workingCopies[2] = getWorkingCopy("/Converter15/src/javadoc/b125676/C.java",
+ workingCopies[2] = getWorkingCopy("/Converter15/src/javadoc/b125676/C.js",
"package javadoc.b125676;\n" +
"public class C { \n" +
" /**\n" +
@@ -3328,7 +3328,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
public void testBug125903() throws JavaModelException {
workingCopies = new ICompilationUnit[1];
astLevel = AST.JLS3;
- workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b125903/Test.java",
+ workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b125903/Test.js",
"package javadoc.b125903;\n" +
"/**\n" +
" * {@ link java.lang.String}\n" +
@@ -3362,7 +3362,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
*/
public void testBug130752() throws JavaModelException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b130752/Test.java",
+ workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b130752/Test.js",
"/* Ceci n'est pas\n" +
" * une ligne. */\n" +
"package javadoc.b130752;\n" +
@@ -3381,7 +3381,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
}
public void testBug130752b() throws JavaModelException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b130752/Test.java",
+ workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b130752/Test.js",
"// Line comment\n" +
"package javadoc.b130752;\n" +
"public class Test {\n" +
@@ -3399,7 +3399,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
}
public void testBug130752c() throws JavaModelException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b130752/Test.java",
+ workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b130752/Test.js",
"/** Javadoc comment */\n" +
"package javadoc.b130752;\n" +
"public class Test {\n" +
@@ -3423,7 +3423,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
*/
public void testBug165525() throws JavaModelException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b165525/Test.java",
+ workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b165525/Test.js",
"package javadoc.b165525;\n" +
"public enum Test {\n" +
" ENUM_CONST_1(\"String constant 1\") //$NON-NLS-1$\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterRecoveryTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterRecoveryTest.java
index 5f51e94..d29e1a2 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterRecoveryTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterRecoveryTest.java
@@ -59,7 +59,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
public void test0001() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Converter/src/test/X.java",
+ "/Converter/src/test/X.js",
"package test;\n"+
"\n"+
"public class X {\n"+
@@ -126,7 +126,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
public void test0002() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Converter/src/test/X.java",
+ "/Converter/src/test/X.js",
"package test;\n"+
"\n"+
"public class X {\n"+
@@ -193,7 +193,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
public void test0003() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Converter/src/test/X.java",
+ "/Converter/src/test/X.js",
"package test;\n"+
"\n"+
"public class X {\n"+
@@ -262,7 +262,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
public void test0004() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Converter/src/test/X.java",
+ "/Converter/src/test/X.js",
"package test;\n"+
"\n"+
"public class X {\n"+
@@ -305,7 +305,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
public void test0005() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Converter/src/test/X.java",
+ "/Converter/src/test/X.js",
"package test;\n"+
"\n"+
"public class X {\n"+
@@ -362,7 +362,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
public void test0006() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Converter/src/test/X.java",
+ "/Converter/src/test/X.js",
"package test;\n"+
"\n"+
"public class X {\n"+
@@ -408,7 +408,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
public void test0007() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Converter/src/test/X.java",
+ "/Converter/src/test/X.js",
"package test;\n"+
"\n"+
"public class X {\n"+
@@ -461,7 +461,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
public void test0008() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Converter/src/test/X.java",
+ "/Converter/src/test/X.js",
"package test;\n"+
"\n"+
"public class X {\n"+
@@ -522,7 +522,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
public void test0009() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Converter/src/test/X.java",
+ "/Converter/src/test/X.js",
"package test;\n"+
"\n"+
"public class X {\n"+
@@ -575,7 +575,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
public void test0010() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Converter/src/test/X.java",
+ "/Converter/src/test/X.js",
"package test;\n"+
"\n"+
"public class X {\n"+
@@ -628,7 +628,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
public void test0011() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Converter/src/test/X.java",
+ "/Converter/src/test/X.js",
"package test;\n"+
"\n"+
"public class X {\n"+
@@ -681,7 +681,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
public void test0012() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Converter/src/test/X.java",
+ "/Converter/src/test/X.js",
"package test;\n"+
"\n"+
"public class X {\n"+
@@ -727,7 +727,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
public void test0013() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Converter/src/test/X.java",
+ "/Converter/src/test/X.js",
"package test;\n"+
"\n"+
"public class X {\n"+
@@ -777,7 +777,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
public void test0014() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Converter/src/test/X.java",
+ "/Converter/src/test/X.js",
"package test;\n"+
"\n"+
"public class X {\n"+
@@ -822,7 +822,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
public void test0015() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Converter/src/test/X.java",
+ "/Converter/src/test/X.js",
"package test;\n"+
"\n"+
"public class X {\n"+
@@ -867,7 +867,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
public void test0016() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Converter/src/test/X.java",
+ "/Converter/src/test/X.js",
"package test;\n"+
"\n"+
"public class X {\n"+
@@ -911,7 +911,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
public void test0017() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Converter/src/test/X.java",
+ "/Converter/src/test/X.js",
"package test;\n"+
"\n"+
"public class X {\n"+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterTest.java
index cd3e96d..4a2e16a 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterTest.java
@@ -16,10 +16,10 @@ import java.util.*;
import junit.framework.Test;
import org.eclipse.core.runtime.Preferences;
-import org.eclipse.wst.jsdt.core.*;
import org.eclipse.wst.jsdt.core.dom.*;
import org.eclipse.wst.jsdt.core.jdom.*;
import org.eclipse.wst.jsdt.core.util.IModifierConstants;
+import org.eclipse.wst.jsdt.core.*;
public class ASTConverterTest extends ConverterTestSetup {
@@ -39,43 +39,109 @@ public class ASTConverterTest extends ConverterTestSetup {
public static Test suite() {
return buildModelTestSuite(ASTConverterTest.class);
}
-
+
+ public void test00() throws JavaModelException {
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0166", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ASTNode result = runConversion(sourceUnit, true);
+ ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
+ assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+ VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+ List fragments = variableDeclarationStatement.fragments();
+ assertTrue("Fragment list is not 4 ", fragments.size() == 4); //$NON-NLS-1$
+ VariableDeclarationFragment fragment1 = (VariableDeclarationFragment) fragments.get(0);
+ IVariableBinding binding1 = fragment1.resolveBinding();
+ assertNotNull("Binding is null", binding1); //$NON-NLS-1$
+ assertEquals("wrong name for binding1", "x", binding1.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("wrong modifier for binding1", 0, binding1.getModifiers()); //$NON-NLS-1$
+ assertTrue("a field", !binding1.isField()); //$NON-NLS-1$
+// assertNull("declaring class is not null", binding1.getDeclaringClass()); //$NON-NLS-1$
+ ITypeBinding typeBinding1 = binding1.getType();
+ assertNotNull("typeBinding1 is null", typeBinding1); //$NON-NLS-1$
+// assertTrue("typeBinding1 is not a primitive type", typeBinding1.isPrimitive()); //$NON-NLS-1$
+// assertTrue("typeBinding1 is not canonical", typeBinding1 == binding1.getType()); //$NON-NLS-1$
+ VariableDeclarationFragment fragment2 = (VariableDeclarationFragment) fragments.get(1);
+ IVariableBinding binding2 = fragment2.resolveBinding();
+ assertNotNull("Binding is null", binding2); //$NON-NLS-1$
+ assertEquals("wrong name for binding2", "z", binding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("wrong modifier for binding2", 0, binding2.getModifiers()); //$NON-NLS-1$
+ assertTrue("a field", !binding2.isField()); //$NON-NLS-1$
+// assertNull("declaring class is not null", binding2.getDeclaringClass()); //$NON-NLS-1$
+ ITypeBinding typeBinding2 = binding2.getType();
+ assertNotNull("typeBinding2 is null", typeBinding2); //$NON-NLS-1$
+// assertTrue("typeBinding2 is not an array type", typeBinding2.isArray()); //$NON-NLS-1$
+// assertTrue("typeBinding2 is not canonical", typeBinding2 == binding2.getType()); //$NON-NLS-1$
+// assertTrue("primitive type is not canonical", typeBinding1 == typeBinding2.getElementType()); //$NON-NLS-1$
+// assertEquals("dimension is 1", 1, typeBinding2.getDimensions()); //$NON-NLS-1$
+// assertEquals("it is not int[]", "int[]", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ VariableDeclarationFragment fragment3 = (VariableDeclarationFragment) fragments.get(2);
+ IVariableBinding binding3 = fragment3.resolveBinding();
+ assertNotNull("Binding is null", binding3); //$NON-NLS-1$
+ assertEquals("wrong name for binding3", "i", binding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("wrong modifier for binding3", 0, binding3.getModifiers()); //$NON-NLS-1$
+ assertTrue("a field", !binding3.isField()); //$NON-NLS-1$
+// assertNull("declaring class is not null", binding3.getDeclaringClass()); //$NON-NLS-1$
+ ITypeBinding typeBinding3 = binding3.getType();
+ assertNotNull("typeBinding3 is null", typeBinding3); //$NON-NLS-1$
+// assertTrue("typeBinding3 is not an primitive type", typeBinding3.isPrimitive()); //$NON-NLS-1$
+// assertTrue("typeBinding3 is not canonical", typeBinding3 == binding3.getType()); //$NON-NLS-1$
+// assertTrue("primitive type is not canonical", typeBinding1 == typeBinding3); //$NON-NLS-1$
+ assertEquals("dimension is 0", 0, typeBinding3.getDimensions()); //$NON-NLS-1$
+ assertEquals("it is not the primitive type any", "any", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ VariableDeclarationFragment fragment4 = (VariableDeclarationFragment) fragments.get(3);
+ IVariableBinding binding4 = fragment4.resolveBinding();
+ assertNotNull("Binding is null", binding4); //$NON-NLS-1$
+ assertEquals("wrong name for binding4", "j", binding4.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("wrong modifier for binding4", 0, binding4.getModifiers()); //$NON-NLS-1$
+ assertTrue("a field", !binding4.isField()); //$NON-NLS-1$
+ assertNull("declaring class is not null", binding4.getDeclaringClass()); //$NON-NLS-1$
+ ITypeBinding typeBinding4 = binding4.getType();
+ assertNotNull("typeBinding4 is null", typeBinding4); //$NON-NLS-1$
+// assertTrue("typeBinding4 is not an array type", typeBinding4.isArray()); //$NON-NLS-1$
+// assertTrue("typeBinding4 is not canonical", typeBinding4 == binding4.getType()); //$NON-NLS-1$
+// assertTrue("primitive type is not canonical", typeBinding1 == typeBinding4.getElementType()); //$NON-NLS-1$
+// assertEquals("dimension is 2", 2, typeBinding4.getDimensions()); //$NON-NLS-1$
+// assertEquals("it is not int[][]", "int[][]", typeBinding4.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertTrue("ids in the wrong order", binding1.getVariableId() < binding2.getVariableId()); //$NON-NLS-1$
+ assertTrue("ids in the wrong order", binding2.getVariableId() < binding3.getVariableId()); //$NON-NLS-1$
+ assertTrue("ids in the wrong order", binding3.getVariableId() < binding4.getVariableId()); //$NON-NLS-1$
+ }
+
/** @deprecated using deprecated code */
public void test0001() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0001", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0001", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
// check that we have the right tree
CompilationUnit unit = this.ast.newCompilationUnit();
- PackageDeclaration packageDeclaration = this.ast.newPackageDeclaration();
- packageDeclaration.setName(this.ast.newSimpleName("test0001"));//$NON-NLS-1$
- unit.setPackage(packageDeclaration);
- ImportDeclaration importDeclaration = this.ast.newImportDeclaration();
- QualifiedName name =
- this.ast.newQualifiedName(
- this.ast.newSimpleName("java"),//$NON-NLS-1$
- this.ast.newSimpleName("util"));//$NON-NLS-1$
- importDeclaration.setName(name);
- importDeclaration.setOnDemand(true);
- unit.imports().add(importDeclaration);
- TypeDeclaration type = this.ast.newTypeDeclaration();
- type.setInterface(false);
- type.setModifiers(Modifier.PUBLIC);
- type.setName(this.ast.newSimpleName("Test"));//$NON-NLS-1$
+// PackageDeclaration packageDeclaration = this.ast.newPackageDeclaration();
+// packageDeclaration.setName(this.ast.newSimpleName("test0001"));//$NON-NLS-1$
+// unit.setPackage(packageDeclaration);
+// ImportDeclaration importDeclaration = this.ast.newImportDeclaration();
+// QualifiedName name =
+// this.ast.newQualifiedName(
+// this.ast.newSimpleName("java"),//$NON-NLS-1$
+// this.ast.newSimpleName("util"));//$NON-NLS-1$
+// importDeclaration.setName(name);
+// importDeclaration.setOnDemand(true);
+// unit.imports().add(importDeclaration);
+// TypeDeclaration type = this.ast.newTypeDeclaration();
+// type.setInterface(false);
+// type.setModifiers(Modifier.PUBLIC);
+// type.setName(this.ast.newSimpleName("Test"));//$NON-NLS-1$
MethodDeclaration methodDeclaration = this.ast.newMethodDeclaration();
methodDeclaration.setConstructor(false);
- methodDeclaration.setModifiers(Modifier.PUBLIC | Modifier.STATIC);
+// methodDeclaration.setModifiers(Modifier.PUBLIC | Modifier.STATIC);
methodDeclaration.setName(this.ast.newSimpleName("main"));//$NON-NLS-1$
- methodDeclaration.setReturnType(this.ast.newPrimitiveType(PrimitiveType.VOID));
+// methodDeclaration.setReturnType(this.ast.newPrimitiveType(PrimitiveType.VOID));
SingleVariableDeclaration variableDeclaration = this.ast.newSingleVariableDeclaration();
- variableDeclaration.setModifiers(Modifier.NONE);
- variableDeclaration.setType(this.ast.newArrayType(this.ast.newSimpleType(this.ast.newSimpleName("String"))));//$NON-NLS-1$
+// variableDeclaration.setModifiers(Modifier.NONE);
+// variableDeclaration.setType(this.ast.newArrayType(this.ast.newSimpleType(this.ast.newSimpleName("String"))));//$NON-NLS-1$
variableDeclaration.setName(this.ast.newSimpleName("args"));//$NON-NLS-1$
methodDeclaration.parameters().add(variableDeclaration);
org.eclipse.wst.jsdt.core.dom.Block block = this.ast.newBlock();
MethodInvocation methodInvocation = this.ast.newMethodInvocation();
- name =
+ QualifiedName name =
this.ast.newQualifiedName(
this.ast.newSimpleName("System"),//$NON-NLS-1$
this.ast.newSimpleName("out"));//$NON-NLS-1$
@@ -93,17 +159,13 @@ public class ASTConverterTest extends ConverterTestSetup {
ExpressionStatement expressionStatement = this.ast.newExpressionStatement(methodInvocation);
block.statements().add(expressionStatement);
methodDeclaration.setBody(block);
- type.bodyDeclarations().add(methodDeclaration);
- unit.types().add(type);
+ unit.statements().add(methodDeclaration);
assertTrue("Both AST trees should be identical", result.subtreeMatch(new ASTMatcher(), unit));//$NON-NLS-1$
String expected =
- "package test0001;\n" +
- "import java.util.*;\n" +
- "public class Test {\n" +
- " public static void main(String[] args) {\n" +
+ " function main(args) {\n" +
" System.out.println(\"Hello\" + \" world\");\n" +
" }\n" +
- "}";
+ "";
checkSourceRange(result, expected, source);
}
@@ -112,13 +174,13 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0002() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0002", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0002", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation();
- classInstanceCreation.setName(this.ast.newSimpleName("Object")); //$NON-NLS-1$
+ classInstanceCreation.setMember(this.ast.newSimpleName("Object")); //$NON-NLS-1$
assertTrue("Both AST trees should be identical", classInstanceCreation.subtreeMatch(new ASTMatcher(), expression)); //$NON-NLS-1$
checkSourceRange(expression, "new Object()", source); //$NON-NLS-1$
}
@@ -128,19 +190,23 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0003() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0003", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0003", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation();
- QualifiedName name =
- this.ast.newQualifiedName(
- this.ast.newQualifiedName(
- this.ast.newSimpleName("java"), //$NON-NLS-1$
- this.ast.newSimpleName("lang")), //$NON-NLS-1$
- this.ast.newSimpleName("Object"));//$NON-NLS-1$
- classInstanceCreation.setName(name);
+
+ FieldAccess expr = this.ast.newFieldAccess();
+ expr.setName(this.ast.newSimpleName("Object"));
+
+ FieldAccess expr2 = this.ast.newFieldAccess();
+ expr2.setName(this.ast.newSimpleName("lang"));
+ expr2.setExpression(this.ast.newSimpleName("java"));
+
+ expr.setExpression(expr2);
+
+ classInstanceCreation.setMember(expr);
assertTrue("Both AST trees should be identical", classInstanceCreation.subtreeMatch(new ASTMatcher(), expression)); //$NON-NLS-1$
checkSourceRange(expression, "new java.lang.Object()", source); //$NON-NLS-1$
}
@@ -150,19 +216,23 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0004() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0004", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0004", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation();
- QualifiedName name =
- this.ast.newQualifiedName(
- this.ast.newQualifiedName(
- this.ast.newSimpleName("java"), //$NON-NLS-1$
- this.ast.newSimpleName("lang")), //$NON-NLS-1$
- this.ast.newSimpleName("Exception"));//$NON-NLS-1$
- classInstanceCreation.setName(name);
+
+ FieldAccess expr = this.ast.newFieldAccess();
+ expr.setName(this.ast.newSimpleName("Exception"));
+
+ FieldAccess expr2 = this.ast.newFieldAccess();
+ expr2.setName(this.ast.newSimpleName("lang"));
+ expr2.setExpression(this.ast.newSimpleName("java"));
+
+ expr.setExpression(expr2);
+
+ classInstanceCreation.setMember(expr);
StringLiteral literal = this.ast.newStringLiteral();
literal.setLiteralValue("ERROR"); //$NON-NLS-1$
classInstanceCreation.arguments().add(literal);
@@ -170,119 +240,114 @@ public class ASTConverterTest extends ConverterTestSetup {
checkSourceRange(expression, "new java.lang.Exception(\"ERROR\")", source); //$NON-NLS-1$
}
- /**
- * Test allocation expression: new java.lang.Object() {} ==> ClassInstanceCreation
- * @deprecated using deprecated code
- */
- public void test0005() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0005", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
- assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
- ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation();
- QualifiedName name =
- this.ast.newQualifiedName(
- this.ast.newQualifiedName(
- this.ast.newSimpleName("java"), //$NON-NLS-1$
- this.ast.newSimpleName("lang")), //$NON-NLS-1$
- this.ast.newSimpleName("Object"));//$NON-NLS-1$
- classInstanceCreation.setName(name);
- AnonymousClassDeclaration anonymousClassDeclaration = this.ast.newAnonymousClassDeclaration();
- classInstanceCreation.setAnonymousClassDeclaration(anonymousClassDeclaration);
- assertTrue("Both AST trees should be identical", classInstanceCreation.subtreeMatch(new ASTMatcher(), expression)); //$NON-NLS-1$
- checkSourceRange(expression, "new java.lang.Object() {}", source); //$NON-NLS-1$
- ClassInstanceCreation classInstanceCreation2 = (ClassInstanceCreation) expression;
- Name name2 = classInstanceCreation2.getName();
- checkSourceRange(name2, "java.lang.Object", source); //$NON-NLS-1$
- }
-
+// /**
+// * Test allocation expression: new java.lang.Object() {} ==> ClassInstanceCreation
+// * @deprecated using deprecated code
+// */
+// public void test0005() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0005", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
+// assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+// ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation();
+// QualifiedName name =
+// this.ast.newQualifiedName(
+// this.ast.newQualifiedName(
+// this.ast.newSimpleName("java"), //$NON-NLS-1$
+// this.ast.newSimpleName("lang")), //$NON-NLS-1$
+// this.ast.newSimpleName("Object"));//$NON-NLS-1$
+// classInstanceCreation.setName(name);
+// AnonymousClassDeclaration anonymousClassDeclaration = this.ast.newAnonymousClassDeclaration();
+// classInstanceCreation.setAnonymousClassDeclaration(anonymousClassDeclaration);
+// assertTrue("Both AST trees should be identical", classInstanceCreation.subtreeMatch(new ASTMatcher(), expression)); //$NON-NLS-1$
+// checkSourceRange(expression, "new java.lang.Object() {}", source); //$NON-NLS-1$
+// ClassInstanceCreation classInstanceCreation2 = (ClassInstanceCreation) expression;
+// Name name2 = classInstanceCreation2.getName();
+// checkSourceRange(name2, "java.lang.Object", source); //$NON-NLS-1$
+// }
+//
- /**
- * Test allocation expression: new java.lang.Runnable() { public void run() {}} ==> ClassInstanceCreation
- * @deprecated using deprecated code
- */
- public void test0006() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0006", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
- assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
- ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation();
- QualifiedName name =
- this.ast.newQualifiedName(
- this.ast.newQualifiedName(
- this.ast.newSimpleName("java"), //$NON-NLS-1$
- this.ast.newSimpleName("lang")), //$NON-NLS-1$
- this.ast.newSimpleName("Runnable"));//$NON-NLS-1$
- classInstanceCreation.setName(name);
- MethodDeclaration methodDeclaration = this.ast.newMethodDeclaration();
- methodDeclaration.setBody(this.ast.newBlock());
- methodDeclaration.setConstructor(false);
- methodDeclaration.setModifiers(Modifier.PUBLIC);
- methodDeclaration.setName(this.ast.newSimpleName("run"));//$NON-NLS-1$
- methodDeclaration.setReturnType(this.ast.newPrimitiveType(PrimitiveType.VOID));
- AnonymousClassDeclaration anonymousClassDeclaration = this.ast.newAnonymousClassDeclaration();
- anonymousClassDeclaration.bodyDeclarations().add(methodDeclaration);
- classInstanceCreation.setAnonymousClassDeclaration(anonymousClassDeclaration);
- assertTrue("Both AST trees should be identical", classInstanceCreation.subtreeMatch(new ASTMatcher(), expression)); //$NON-NLS-1$
- checkSourceRange(expression, "new java.lang.Runnable() { public void run() {}}", source); //$NON-NLS-1$
- }
-
- /**
- * Test allocation expression: new Test().new D() ==> ClassInstanceCreation
- * @deprecated using deprecated code
- */
- public void test0007() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0007", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
- assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
- ExpressionStatement expressionStatement = (ExpressionStatement) node;
- ASTNode expression = (ASTNode) ((MethodInvocation) expressionStatement.getExpression()).arguments().get(0);
- assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
- ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation();
- classInstanceCreation.setName(this.ast.newSimpleName("D")); //$NON-NLS-1$
- ClassInstanceCreation classInstanceCreationExpression = this.ast.newClassInstanceCreation();
- classInstanceCreationExpression.setName(this.ast.newSimpleName("Test")); //$NON-NLS-1$
- classInstanceCreation.setExpression(classInstanceCreationExpression);
- assertTrue("Both AST trees should be identical", classInstanceCreation.subtreeMatch(new ASTMatcher(), expression)); //$NON-NLS-1$
- checkSourceRange(expression, "new Test().new D()", source); //$NON-NLS-1$
- }
+// /**
+// * Test allocation expression: new java.lang.Runnable() { public void run() {}} ==> ClassInstanceCreation
+// * @deprecated using deprecated code
+// */
+// public void test0006() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0006", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
+// assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+// ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation();
+// QualifiedName name =
+// this.ast.newQualifiedName(
+// this.ast.newQualifiedName(
+// this.ast.newSimpleName("java"), //$NON-NLS-1$
+// this.ast.newSimpleName("lang")), //$NON-NLS-1$
+// this.ast.newSimpleName("Runnable"));//$NON-NLS-1$
+// classInstanceCreation.setName(name);
+// MethodDeclaration methodDeclaration = this.ast.newMethodDeclaration();
+// methodDeclaration.setBody(this.ast.newBlock());
+// methodDeclaration.setConstructor(false);
+// methodDeclaration.setModifiers(Modifier.PUBLIC);
+// methodDeclaration.setName(this.ast.newSimpleName("run"));//$NON-NLS-1$
+// methodDeclaration.setReturnType(this.ast.newPrimitiveType(PrimitiveType.VOID));
+// AnonymousClassDeclaration anonymousClassDeclaration = this.ast.newAnonymousClassDeclaration();
+// anonymousClassDeclaration.bodyDeclarations().add(methodDeclaration);
+// classInstanceCreation.setAnonymousClassDeclaration(anonymousClassDeclaration);
+// assertTrue("Both AST trees should be identical", classInstanceCreation.subtreeMatch(new ASTMatcher(), expression)); //$NON-NLS-1$
+// checkSourceRange(expression, "new java.lang.Runnable() { public void run() {}}", source); //$NON-NLS-1$
+// }
+//
+// /**
+// * Test allocation expression: new Test().new D() ==> ClassInstanceCreation
+// * @deprecated using deprecated code
+// */
+// public void test0007() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0007", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
+// assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
+// ExpressionStatement expressionStatement = (ExpressionStatement) node;
+// ASTNode expression = (ASTNode) ((MethodInvocation) expressionStatement.getExpression()).arguments().get(0);
+// assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+// ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation();
+// classInstanceCreation.setName(this.ast.newSimpleName("D")); //$NON-NLS-1$
+// ClassInstanceCreation classInstanceCreationExpression = this.ast.newClassInstanceCreation();
+// classInstanceCreationExpression.setName(this.ast.newSimpleName("Test")); //$NON-NLS-1$
+// classInstanceCreation.setExpression(classInstanceCreationExpression);
+// assertTrue("Both AST trees should be identical", classInstanceCreation.subtreeMatch(new ASTMatcher(), expression)); //$NON-NLS-1$
+// checkSourceRange(expression, "new Test().new D()", source); //$NON-NLS-1$
+// }
/**
* Test allocation expression: new int[] {1, 2, 3, 4} ==> ArrayCreation
*/
public void test0008() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0008", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0008", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
- ArrayCreation arrayCreation = this.ast.newArrayCreation();
- arrayCreation.setType(this.ast.newArrayType(this.ast.newPrimitiveType(PrimitiveType.INT), 1));
ArrayInitializer arrayInitializer = this.ast.newArrayInitializer();
arrayInitializer.expressions().add(this.ast.newNumberLiteral("1"));//$NON-NLS-1$
arrayInitializer.expressions().add(this.ast.newNumberLiteral("2"));//$NON-NLS-1$
arrayInitializer.expressions().add(this.ast.newNumberLiteral("3"));//$NON-NLS-1$
arrayInitializer.expressions().add(this.ast.newNumberLiteral("4"));//$NON-NLS-1$
- arrayCreation.setInitializer(arrayInitializer);
- assertTrue("Both AST trees should be identical", arrayCreation.subtreeMatch(new ASTMatcher(), expression)); //$NON-NLS-1$
- checkSourceRange(expression, "new int[] {1, 2, 3, 4}", source); //$NON-NLS-1$
+ assertTrue("Both AST trees should be identical", arrayInitializer.subtreeMatch(new ASTMatcher(), expression)); //$NON-NLS-1$
+ checkSourceRange(expression, "[1, 2, 3, 4]", source); //$NON-NLS-1$
}
/**
* Test allocation expression: new int[][] {{1}, {2}} ==> ArrayCreation
*/
public void test0009() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0009", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0009", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
- ArrayCreation arrayCreation = this.ast.newArrayCreation();
- arrayCreation.setType(this.ast.newArrayType(this.ast.newPrimitiveType(PrimitiveType.INT), 2));
ArrayInitializer arrayInitializer = this.ast.newArrayInitializer();
ArrayInitializer innerArrayInitializer = this.ast.newArrayInitializer();
innerArrayInitializer.expressions().add(this.ast.newNumberLiteral("1"));//$NON-NLS-1$
@@ -290,70 +355,69 @@ public class ASTConverterTest extends ConverterTestSetup {
innerArrayInitializer = this.ast.newArrayInitializer();
innerArrayInitializer.expressions().add(this.ast.newNumberLiteral("2"));//$NON-NLS-1$
arrayInitializer.expressions().add(innerArrayInitializer);
- arrayCreation.setInitializer(arrayInitializer);
- assertTrue("Both AST trees should be identical", arrayCreation.subtreeMatch(new ASTMatcher(), expression)); //$NON-NLS-1$
- checkSourceRange(expression, "new int[][] {{1}, {2}}", source); //$NON-NLS-1$
- }
-
- /**
- * Test allocation expression: new int[3] ==> ArrayCreation
- */
- public void test0010() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0010", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
- assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
- ArrayCreation arrayCreation = this.ast.newArrayCreation();
- arrayCreation.setType(this.ast.newArrayType(this.ast.newPrimitiveType(PrimitiveType.INT), 1));
- arrayCreation.dimensions().add(this.ast.newNumberLiteral("3")); //$NON-NLS-1$
- assertTrue("Both AST trees should be identical", arrayCreation.subtreeMatch(new ASTMatcher(), expression)); //$NON-NLS-1$
- checkSourceRange(expression, "new int[3]", source); //$NON-NLS-1$
- }
-
- /**
- * Test allocation expression: new int[3][] ==> ArrayCreation
- */
- public void test0011() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0011", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
- assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
- ArrayCreation arrayCreation = this.ast.newArrayCreation();
- arrayCreation.setType(this.ast.newArrayType(this.ast.newPrimitiveType(PrimitiveType.INT), 2));
- arrayCreation.dimensions().add(this.ast.newNumberLiteral("3")); //$NON-NLS-1$
- assertTrue("Both AST trees should be identical", arrayCreation.subtreeMatch(new ASTMatcher(), expression)); //$NON-NLS-1$
- checkSourceRange(expression, "new int[3][]", source); //$NON-NLS-1$
- }
-
- /**
- * Test allocation expression: new int[][] {{},{}} ==> ArrayCreation
- */
- public void test0012() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0012", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
- assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
- ArrayCreation arrayCreation = this.ast.newArrayCreation();
- arrayCreation.setType(this.ast.newArrayType(this.ast.newPrimitiveType(PrimitiveType.INT), 2));
- ArrayInitializer arrayInitializer = this.ast.newArrayInitializer();
- ArrayInitializer innerArrayInitializer = this.ast.newArrayInitializer();
- arrayInitializer.expressions().add(innerArrayInitializer);
- innerArrayInitializer = this.ast.newArrayInitializer();
- arrayInitializer.expressions().add(innerArrayInitializer);
- arrayCreation.setInitializer(arrayInitializer);
- assertTrue("Both AST trees should be identical", arrayCreation.subtreeMatch(new ASTMatcher(), expression)); //$NON-NLS-1$
- checkSourceRange(expression, "new int[][] {{}, {}}", source); //$NON-NLS-1$
- }
+ assertTrue("Both AST trees should be identical", arrayInitializer.subtreeMatch(new ASTMatcher(), expression)); //$NON-NLS-1$
+ checkSourceRange(expression, "[[1], [2]]", source); //$NON-NLS-1$
+ }
+
+// /**
+// * Test allocation expression: new int[3] ==> ArrayCreation
+// */
+// public void test0010() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0010", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
+// assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+// ArrayCreation arrayCreation = this.ast.newArrayCreation();
+// arrayCreation.setType(this.ast.newArrayType(this.ast.newPrimitiveType(PrimitiveType.INT), 1));
+// arrayCreation.dimensions().add(this.ast.newNumberLiteral("3")); //$NON-NLS-1$
+// assertTrue("Both AST trees should be identical", arrayCreation.subtreeMatch(new ASTMatcher(), expression)); //$NON-NLS-1$
+// checkSourceRange(expression, "new int[3]", source); //$NON-NLS-1$
+// }
+//
+// /**
+// * Test allocation expression: new int[3][] ==> ArrayCreation
+// */
+// public void test0011() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0011", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
+// assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+// ArrayCreation arrayCreation = this.ast.newArrayCreation();
+// arrayCreation.setType(this.ast.newArrayType(this.ast.newPrimitiveType(PrimitiveType.INT), 2));
+// arrayCreation.dimensions().add(this.ast.newNumberLiteral("3")); //$NON-NLS-1$
+// assertTrue("Both AST trees should be identical", arrayCreation.subtreeMatch(new ASTMatcher(), expression)); //$NON-NLS-1$
+// checkSourceRange(expression, "new int[3][]", source); //$NON-NLS-1$
+// }
+//
+// /**
+// * Test allocation expression: new int[][] {{},{}} ==> ArrayCreation
+// */
+// public void test0012() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0012", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
+// assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+// ArrayCreation arrayCreation = this.ast.newArrayCreation();
+// arrayCreation.setType(this.ast.newArrayType(this.ast.newPrimitiveType(PrimitiveType.INT), 2));
+// ArrayInitializer arrayInitializer = this.ast.newArrayInitializer();
+// ArrayInitializer innerArrayInitializer = this.ast.newArrayInitializer();
+// arrayInitializer.expressions().add(innerArrayInitializer);
+// innerArrayInitializer = this.ast.newArrayInitializer();
+// arrayInitializer.expressions().add(innerArrayInitializer);
+// arrayCreation.setInitializer(arrayInitializer);
+// assertTrue("Both AST trees should be identical", arrayCreation.subtreeMatch(new ASTMatcher(), expression)); //$NON-NLS-1$
+// checkSourceRange(expression, "new int[][] {{}, {}}", source); //$NON-NLS-1$
+// }
/**
* int i; ==> VariableDeclarationFragment
* @deprecated using deprecated code
*/
public void test0013() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0013", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0013", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -362,9 +426,9 @@ public class ASTConverterTest extends ConverterTestSetup {
variableDeclarationFragment.setName(this.ast.newSimpleName("i")); //$NON-NLS-1$
VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "int i;", source); //$NON-NLS-1$
+ checkSourceRange(node, "var i;", source); //$NON-NLS-1$
}
/**
@@ -372,7 +436,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0014() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0014", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0014", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -382,17 +446,17 @@ public class ASTConverterTest extends ConverterTestSetup {
variableDeclarationFragment.setInitializer(this.ast.newNumberLiteral("0"));//$NON-NLS-1$
VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "int i = 0;", source); //$NON-NLS-1$
+ checkSourceRange(node, "var i = 0;", source); //$NON-NLS-1$
}
/**
* i = 1; ==> ExpressionStatement(Assignment)
*/
public void test0015() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0015", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0015", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -410,7 +474,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* i += 2; ==> ExpressionStatement(Assignment)
*/
public void test0016() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0016", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0016", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -428,7 +492,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* i -= 2; ==> ExpressionStatement(Assignment)
*/
public void test0017() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0017", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0017", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -446,7 +510,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* i *= 2; ==> ExpressionStatement(Assignment)
*/
public void test0018() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0018", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0018", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -464,7 +528,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* i /= 2; ==> ExpressionStatement(Assignment)
*/
public void test0019() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0019", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0019", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -482,7 +546,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* i &= 2 ==> ExpressionStatement(Assignment)
*/
public void test0020() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0020", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0020", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -500,7 +564,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* i |= 2; ==> ExpressionStatement(Assignment)
*/
public void test0021() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0021", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0021", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -518,7 +582,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* i ^= 2; ==> ExpressionStatement(Assignment)
*/
public void test0022() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0022", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0022", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -536,7 +600,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* i %= 2; ==> ExpressionStatement(Assignment)
*/
public void test0023() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0023", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0023", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -554,7 +618,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* i <<= 2; ==> ExpressionStatement(Assignment)
*/
public void test0024() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0024", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0024", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -572,7 +636,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* i >>= 2; ==> ExpressionStatement(Assignment)
*/
public void test0025() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0025", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0025", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -590,7 +654,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* i >>>= 2; ==> ExpressionStatement(Assignment)
*/
public void test0026() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0026", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0026", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -608,7 +672,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* --i; ==> ExpressionStatement(PrefixExpression)
*/
public void test0027() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0027", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0027", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -625,7 +689,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* --i; ==> ExpressionStatement(PrefixExpression)
*/
public void test0028() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0028", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0028", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -642,7 +706,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* i--; ==> ExpressionStatement(PostfixExpression)
*/
public void test0029() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0029", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0029", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -659,7 +723,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* i++; ==> ExpressionStatement(PostfixExpression)
*/
public void test0030() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0030", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0030", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -672,278 +736,278 @@ public class ASTConverterTest extends ConverterTestSetup {
checkSourceRange(node, "i++;", source); //$NON-NLS-1$
}
- /**
- * (String) o; ==> ExpressionStatement(CastExpression)
- * @deprecated using deprecated code
- */
- public void test0031() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0031", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
- variableDeclarationFragment.setName(this.ast.newSimpleName("s")); //$NON-NLS-1$
- CastExpression castExpression = this.ast.newCastExpression();
- castExpression.setExpression(this.ast.newSimpleName("o"));//$NON-NLS-1$
- castExpression.setType(this.ast.newSimpleType(this.ast.newSimpleName("String")));//$NON-NLS-1$
- variableDeclarationFragment.setInitializer(castExpression);
- VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
- statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newSimpleType(this.ast.newSimpleName("String")));//$NON-NLS-1$
- assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "String s = (String) o;", source); //$NON-NLS-1$
- }
-
- /**
- * (int) d; ==> ExpressionStatement(CastExpression)
- * @deprecated using deprecated code
- */
- public void test0032() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0032", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
- variableDeclarationFragment.setName(this.ast.newSimpleName("i")); //$NON-NLS-1$
- CastExpression castExpression = this.ast.newCastExpression();
- castExpression.setExpression(this.ast.newSimpleName("d"));//$NON-NLS-1$
- castExpression.setType(this.ast.newPrimitiveType(PrimitiveType.INT));//$NON-NLS-1$
- variableDeclarationFragment.setInitializer(castExpression);
- VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
- statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));//$NON-NLS-1$
- assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "int i = (int) d;", source); //$NON-NLS-1$
- }
-
- /**
- * (float) d; ==> ExpressionStatement(CastExpression)
- * @deprecated using deprecated code
- */
- public void test0033() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0033", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
-
- VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
- variableDeclarationFragment.setName(this.ast.newSimpleName("f")); //$NON-NLS-1$
- CastExpression castExpression = this.ast.newCastExpression();
- castExpression.setExpression(this.ast.newSimpleName("d"));//$NON-NLS-1$
- castExpression.setType(this.ast.newPrimitiveType(PrimitiveType.FLOAT));//$NON-NLS-1$
- variableDeclarationFragment.setInitializer(castExpression);
- VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
- statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.FLOAT));//$NON-NLS-1$
-
- assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "float f = (float) d;", source); //$NON-NLS-1$
- }
-
- /**
- * (byte) d; ==> ExpressionStatement(CastExpression)
- * @deprecated using deprecated code
- */
- public void test0034() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0034", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
-
- VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
- variableDeclarationFragment.setName(this.ast.newSimpleName("b")); //$NON-NLS-1$
- CastExpression castExpression = this.ast.newCastExpression();
- castExpression.setExpression(this.ast.newSimpleName("d"));//$NON-NLS-1$
- castExpression.setType(this.ast.newPrimitiveType(PrimitiveType.BYTE));//$NON-NLS-1$
- variableDeclarationFragment.setInitializer(castExpression);
- VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
- statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.BYTE));//$NON-NLS-1$
-
- assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "byte b = (byte) d;", source); //$NON-NLS-1$
- }
-
- /**
- * (short) d; ==> ExpressionStatement(CastExpression)
- * @deprecated using deprecated code
- */
- public void test0035() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0035", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
-
- VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
- variableDeclarationFragment.setName(this.ast.newSimpleName("s")); //$NON-NLS-1$
- CastExpression castExpression = this.ast.newCastExpression();
- castExpression.setExpression(this.ast.newSimpleName("d"));//$NON-NLS-1$
- castExpression.setType(this.ast.newPrimitiveType(PrimitiveType.SHORT));//$NON-NLS-1$
- variableDeclarationFragment.setInitializer(castExpression);
- VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
- statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.SHORT));//$NON-NLS-1$
-
- assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "short s = (short) d;", source); //$NON-NLS-1$
- }
-
- /**
- * (long) d; ==> ExpressionStatement(CastExpression)
- * @deprecated using deprecated code
- */
- public void test0036() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0036", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
-
- VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
- variableDeclarationFragment.setName(this.ast.newSimpleName("l")); //$NON-NLS-1$
- CastExpression castExpression = this.ast.newCastExpression();
- castExpression.setExpression(this.ast.newSimpleName("d"));//$NON-NLS-1$
- castExpression.setType(this.ast.newPrimitiveType(PrimitiveType.LONG));//$NON-NLS-1$
- variableDeclarationFragment.setInitializer(castExpression);
- VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
- statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.LONG));//$NON-NLS-1$
-
- assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "long l = (long) d;", source); //$NON-NLS-1$
- }
-
- /**
- * (char) i; ==> ExpressionStatement(CastExpression)
- * @deprecated using deprecated code
- */
- public void test0037() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0037", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
-
- VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
- variableDeclarationFragment.setName(this.ast.newSimpleName("c")); //$NON-NLS-1$
- CastExpression castExpression = this.ast.newCastExpression();
- castExpression.setExpression(this.ast.newSimpleName("i"));//$NON-NLS-1$
- castExpression.setType(this.ast.newPrimitiveType(PrimitiveType.CHAR));//$NON-NLS-1$
- variableDeclarationFragment.setInitializer(castExpression);
- VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
- statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.CHAR));//$NON-NLS-1$
-
- assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "char c = (char) i;", source); //$NON-NLS-1$
- }
-
- /**
- * int.class; ==> ExpressionStatement(TypeLiteral)
- * @deprecated using deprecated code
- */
- public void test0038() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0038", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
-
- VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
- variableDeclarationFragment.setName(this.ast.newSimpleName("c")); //$NON-NLS-1$
- TypeLiteral typeLiteral = this.ast.newTypeLiteral();
- typeLiteral.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
- variableDeclarationFragment.setInitializer(typeLiteral);
- VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
- statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newSimpleType(this.ast.newSimpleName("Class")));//$NON-NLS-1$
-
- assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(((VariableDeclarationFragment)((VariableDeclarationStatement)node).fragments().get(0)).getInitializer(), "int.class", source); //$NON-NLS-1$
- }
-
- /**
- * void.class; ==> ExpressionStatement(TypeLiteral)
- * @deprecated using deprecated code
- */
- public void test0039() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0039", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
-
- VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
- variableDeclarationFragment.setName(this.ast.newSimpleName("c")); //$NON-NLS-1$
- TypeLiteral typeLiteral = this.ast.newTypeLiteral();
- typeLiteral.setType(this.ast.newPrimitiveType(PrimitiveType.VOID));
- variableDeclarationFragment.setInitializer(typeLiteral);
- VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
- statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newSimpleType(this.ast.newSimpleName("Class")));//$NON-NLS-1$
-
- assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(((VariableDeclarationFragment)((VariableDeclarationStatement)node).fragments().get(0)).getInitializer(), "void.class", source); //$NON-NLS-1$
- }
-
- /**
- * double.class; ==> ExpressionStatement(TypeLiteral)
- * @deprecated using deprecated code
- */
- public void test0040() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0040", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
-
- VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
- variableDeclarationFragment.setName(this.ast.newSimpleName("c")); //$NON-NLS-1$
- TypeLiteral typeLiteral = this.ast.newTypeLiteral();
- typeLiteral.setType(this.ast.newPrimitiveType(PrimitiveType.DOUBLE));
- variableDeclarationFragment.setInitializer(typeLiteral);
- VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
- statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newSimpleType(this.ast.newSimpleName("Class")));//$NON-NLS-1$
-
- assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(((VariableDeclarationFragment)((VariableDeclarationStatement)node).fragments().get(0)).getInitializer(), "double.class", source); //$NON-NLS-1$
- }
-
- /**
- * long.class; ==> ExpressionStatement(TypeLiteral)
- * @deprecated using deprecated code
- */
- public void test0041() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0041", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
-
- VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
- variableDeclarationFragment.setName(this.ast.newSimpleName("c")); //$NON-NLS-1$
- TypeLiteral typeLiteral = this.ast.newTypeLiteral();
- typeLiteral.setType(this.ast.newPrimitiveType(PrimitiveType.LONG));
- variableDeclarationFragment.setInitializer(typeLiteral);
- VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
- statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newSimpleType(this.ast.newSimpleName("Class")));//$NON-NLS-1$
-
- assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(((VariableDeclarationFragment)((VariableDeclarationStatement)node).fragments().get(0)).getInitializer(), "long.class", source); //$NON-NLS-1$
- }
+// /**
+// * (String) o; ==> ExpressionStatement(CastExpression)
+// * @deprecated using deprecated code
+// */
+// public void test0031() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0031", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+// variableDeclarationFragment.setName(this.ast.newSimpleName("s")); //$NON-NLS-1$
+// CastExpression castExpression = this.ast.newCastExpression();
+// castExpression.setExpression(this.ast.newSimpleName("o"));//$NON-NLS-1$
+// castExpression.setType(this.ast.newSimpleType(this.ast.newSimpleName("String")));//$NON-NLS-1$
+// variableDeclarationFragment.setInitializer(castExpression);
+// VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+// statement.setModifiers(Modifier.NONE);
+// statement.setType(this.ast.newSimpleType(this.ast.newSimpleName("String")));//$NON-NLS-1$
+// assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
+// checkSourceRange(node, "String s = (String) o;", source); //$NON-NLS-1$
+// }
+//
+// /**
+// * (int) d; ==> ExpressionStatement(CastExpression)
+// * @deprecated using deprecated code
+// */
+// public void test0032() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0032", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+// variableDeclarationFragment.setName(this.ast.newSimpleName("i")); //$NON-NLS-1$
+// CastExpression castExpression = this.ast.newCastExpression();
+// castExpression.setExpression(this.ast.newSimpleName("d"));//$NON-NLS-1$
+// castExpression.setType(this.ast.newPrimitiveType(PrimitiveType.INT));//$NON-NLS-1$
+// variableDeclarationFragment.setInitializer(castExpression);
+// VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+// statement.setModifiers(Modifier.NONE);
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));//$NON-NLS-1$
+// assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
+// checkSourceRange(node, "int i = (int) d;", source); //$NON-NLS-1$
+// }
+//
+// /**
+// * (float) d; ==> ExpressionStatement(CastExpression)
+// * @deprecated using deprecated code
+// */
+// public void test0033() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0033", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+//
+// VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+// variableDeclarationFragment.setName(this.ast.newSimpleName("f")); //$NON-NLS-1$
+// CastExpression castExpression = this.ast.newCastExpression();
+// castExpression.setExpression(this.ast.newSimpleName("d"));//$NON-NLS-1$
+// castExpression.setType(this.ast.newPrimitiveType(PrimitiveType.FLOAT));//$NON-NLS-1$
+// variableDeclarationFragment.setInitializer(castExpression);
+// VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+// statement.setModifiers(Modifier.NONE);
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.FLOAT));//$NON-NLS-1$
+//
+// assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
+// checkSourceRange(node, "float f = (float) d;", source); //$NON-NLS-1$
+// }
+//
+// /**
+// * (byte) d; ==> ExpressionStatement(CastExpression)
+// * @deprecated using deprecated code
+// */
+// public void test0034() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0034", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+//
+// VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+// variableDeclarationFragment.setName(this.ast.newSimpleName("b")); //$NON-NLS-1$
+// CastExpression castExpression = this.ast.newCastExpression();
+// castExpression.setExpression(this.ast.newSimpleName("d"));//$NON-NLS-1$
+// castExpression.setType(this.ast.newPrimitiveType(PrimitiveType.BYTE));//$NON-NLS-1$
+// variableDeclarationFragment.setInitializer(castExpression);
+// VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+// statement.setModifiers(Modifier.NONE);
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.BYTE));//$NON-NLS-1$
+//
+// assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
+// checkSourceRange(node, "byte b = (byte) d;", source); //$NON-NLS-1$
+// }
+//
+// /**
+// * (short) d; ==> ExpressionStatement(CastExpression)
+// * @deprecated using deprecated code
+// */
+// public void test0035() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0035", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+//
+// VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+// variableDeclarationFragment.setName(this.ast.newSimpleName("s")); //$NON-NLS-1$
+// CastExpression castExpression = this.ast.newCastExpression();
+// castExpression.setExpression(this.ast.newSimpleName("d"));//$NON-NLS-1$
+// castExpression.setType(this.ast.newPrimitiveType(PrimitiveType.SHORT));//$NON-NLS-1$
+// variableDeclarationFragment.setInitializer(castExpression);
+// VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+// statement.setModifiers(Modifier.NONE);
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.SHORT));//$NON-NLS-1$
+//
+// assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
+// checkSourceRange(node, "short s = (short) d;", source); //$NON-NLS-1$
+// }
+//
+// /**
+// * (long) d; ==> ExpressionStatement(CastExpression)
+// * @deprecated using deprecated code
+// */
+// public void test0036() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0036", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+//
+// VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+// variableDeclarationFragment.setName(this.ast.newSimpleName("l")); //$NON-NLS-1$
+// CastExpression castExpression = this.ast.newCastExpression();
+// castExpression.setExpression(this.ast.newSimpleName("d"));//$NON-NLS-1$
+// castExpression.setType(this.ast.newPrimitiveType(PrimitiveType.LONG));//$NON-NLS-1$
+// variableDeclarationFragment.setInitializer(castExpression);
+// VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+// statement.setModifiers(Modifier.NONE);
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.LONG));//$NON-NLS-1$
+//
+// assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
+// checkSourceRange(node, "long l = (long) d;", source); //$NON-NLS-1$
+// }
+//
+// /**
+// * (char) i; ==> ExpressionStatement(CastExpression)
+// * @deprecated using deprecated code
+// */
+// public void test0037() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0037", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+//
+// VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+// variableDeclarationFragment.setName(this.ast.newSimpleName("c")); //$NON-NLS-1$
+// CastExpression castExpression = this.ast.newCastExpression();
+// castExpression.setExpression(this.ast.newSimpleName("i"));//$NON-NLS-1$
+// castExpression.setType(this.ast.newPrimitiveType(PrimitiveType.CHAR));//$NON-NLS-1$
+// variableDeclarationFragment.setInitializer(castExpression);
+// VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+// statement.setModifiers(Modifier.NONE);
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.CHAR));//$NON-NLS-1$
+//
+// assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
+// checkSourceRange(node, "char c = (char) i;", source); //$NON-NLS-1$
+// }
+//
+// /**
+// * int.class; ==> ExpressionStatement(TypeLiteral)
+// * @deprecated using deprecated code
+// */
+// public void test0038() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0038", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+//
+// VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+// variableDeclarationFragment.setName(this.ast.newSimpleName("c")); //$NON-NLS-1$
+// TypeLiteral typeLiteral = this.ast.newTypeLiteral();
+// typeLiteral.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+// variableDeclarationFragment.setInitializer(typeLiteral);
+// VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+// statement.setModifiers(Modifier.NONE);
+// statement.setType(this.ast.newSimpleType(this.ast.newSimpleName("Class")));//$NON-NLS-1$
+//
+// assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
+// checkSourceRange(((VariableDeclarationFragment)((VariableDeclarationStatement)node).fragments().get(0)).getInitializer(), "int.class", source); //$NON-NLS-1$
+// }
+//
+// /**
+// * void.class; ==> ExpressionStatement(TypeLiteral)
+// * @deprecated using deprecated code
+// */
+// public void test0039() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0039", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+//
+// VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+// variableDeclarationFragment.setName(this.ast.newSimpleName("c")); //$NON-NLS-1$
+// TypeLiteral typeLiteral = this.ast.newTypeLiteral();
+// typeLiteral.setType(this.ast.newPrimitiveType(PrimitiveType.VOID));
+// variableDeclarationFragment.setInitializer(typeLiteral);
+// VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+// statement.setModifiers(Modifier.NONE);
+// statement.setType(this.ast.newSimpleType(this.ast.newSimpleName("Class")));//$NON-NLS-1$
+//
+// assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
+// checkSourceRange(((VariableDeclarationFragment)((VariableDeclarationStatement)node).fragments().get(0)).getInitializer(), "void.class", source); //$NON-NLS-1$
+// }
+//
+// /**
+// * double.class; ==> ExpressionStatement(TypeLiteral)
+// * @deprecated using deprecated code
+// */
+// public void test0040() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0040", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+//
+// VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+// variableDeclarationFragment.setName(this.ast.newSimpleName("c")); //$NON-NLS-1$
+// TypeLiteral typeLiteral = this.ast.newTypeLiteral();
+// typeLiteral.setType(this.ast.newPrimitiveType(PrimitiveType.DOUBLE));
+// variableDeclarationFragment.setInitializer(typeLiteral);
+// VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+// statement.setModifiers(Modifier.NONE);
+// statement.setType(this.ast.newSimpleType(this.ast.newSimpleName("Class")));//$NON-NLS-1$
+//
+// assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
+// checkSourceRange(((VariableDeclarationFragment)((VariableDeclarationStatement)node).fragments().get(0)).getInitializer(), "double.class", source); //$NON-NLS-1$
+// }
+//
+// /**
+// * long.class; ==> ExpressionStatement(TypeLiteral)
+// * @deprecated using deprecated code
+// */
+// public void test0041() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0041", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+//
+// VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+// variableDeclarationFragment.setName(this.ast.newSimpleName("c")); //$NON-NLS-1$
+// TypeLiteral typeLiteral = this.ast.newTypeLiteral();
+// typeLiteral.setType(this.ast.newPrimitiveType(PrimitiveType.LONG));
+// variableDeclarationFragment.setInitializer(typeLiteral);
+// VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+// statement.setModifiers(Modifier.NONE);
+// statement.setType(this.ast.newSimpleType(this.ast.newSimpleName("Class")));//$NON-NLS-1$
+//
+// assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
+// checkSourceRange(((VariableDeclarationFragment)((VariableDeclarationStatement)node).fragments().get(0)).getInitializer(), "long.class", source); //$NON-NLS-1$
+// }
/**
* false ==> BooleanLiteral
*/
public void test0042() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0042", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0042", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -957,7 +1021,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* true ==> BooleanLiteral
*/
public void test0043() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0043", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0043", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -971,7 +1035,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* null ==> NullLiteral
*/
public void test0044() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0044", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0044", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -985,7 +1049,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* CharLiteral ==> CharacterLiteral
*/
public void test0045() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0045", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0045", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -1000,7 +1064,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* DoubleLiteral ==> NumberLiteral
*/
public void test0046() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0046", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0046", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -1014,7 +1078,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* FloatLiteral ==> NumberLiteral
*/
public void test0047() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0047", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0047", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -1028,7 +1092,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* IntLiteral ==> NumberLiteral
*/
public void test0048() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0048", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0048", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -1042,7 +1106,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* IntLiteralMinValue ==> NumberLiteral
*/
public void test0049() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0049", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0049", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -1056,7 +1120,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* LongLiteral ==> NumberLiteral
*/
public void test0050() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0050", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0050", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -1070,7 +1134,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* LongLiteral ==> NumberLiteral (negative value)
*/
public void test0051() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0051", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0051", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -1087,7 +1151,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* LongLiteralMinValue ==> NumberLiteral
*/
public void test0052() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0052", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0052", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -1101,7 +1165,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* ExtendedStringLiteral ==> StringLiteral
*/
public void test0053() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0053", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0053", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -1127,7 +1191,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0054() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0054", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0054", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -1142,10 +1206,10 @@ public class ASTConverterTest extends ConverterTestSetup {
variableDeclarationFragment.setInitializer(infixExpression);
VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "boolean b3 = b && b2;", source); //$NON-NLS-1$
+ checkSourceRange(node, "var b3 = b && b2;", source); //$NON-NLS-1$
}
/**
@@ -1153,7 +1217,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0055() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0055", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0055", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -1168,10 +1232,10 @@ public class ASTConverterTest extends ConverterTestSetup {
variableDeclarationFragment.setInitializer(infixExpression);
VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "boolean b3 = b || b2;", source); //$NON-NLS-1$
+ checkSourceRange(node, "var b3 = b || b2;", source); //$NON-NLS-1$
}
/**
@@ -1179,7 +1243,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0056() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0056", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0056", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -1194,10 +1258,10 @@ public class ASTConverterTest extends ConverterTestSetup {
variableDeclarationFragment.setInitializer(infixExpression);
VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "boolean b3 = b == b2;", source); //$NON-NLS-1$
+ checkSourceRange(node, "var b3 = b == b2;", source); //$NON-NLS-1$
}
/**
@@ -1205,7 +1269,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0057() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0057", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0057", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -1220,10 +1284,10 @@ public class ASTConverterTest extends ConverterTestSetup {
variableDeclarationFragment.setInitializer(infixExpression);
VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "int n = i + j;", source); //$NON-NLS-1$
+ checkSourceRange(node, "var n = i + j;", source); //$NON-NLS-1$
}
/**
@@ -1231,7 +1295,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0058() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0058", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0058", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -1246,10 +1310,10 @@ public class ASTConverterTest extends ConverterTestSetup {
variableDeclarationFragment.setInitializer(infixExpression);
VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "int n = i - j;", source); //$NON-NLS-1$
+ checkSourceRange(node, "var n = i - j;", source); //$NON-NLS-1$
}
/**
@@ -1257,7 +1321,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0059() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0059", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0059", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -1272,10 +1336,10 @@ public class ASTConverterTest extends ConverterTestSetup {
variableDeclarationFragment.setInitializer(infixExpression);
VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "int n = i * j;", source); //$NON-NLS-1$
+ checkSourceRange(node, "var n = i * j;", source); //$NON-NLS-1$
}
/**
@@ -1283,7 +1347,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0060() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0060", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0060", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -1298,10 +1362,10 @@ public class ASTConverterTest extends ConverterTestSetup {
variableDeclarationFragment.setInitializer(infixExpression);
VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "int n = i / j;", source); //$NON-NLS-1$
+ checkSourceRange(node, "var n = i / j;", source); //$NON-NLS-1$
}
/**
@@ -1309,7 +1373,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0061() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0061", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0061", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -1324,10 +1388,10 @@ public class ASTConverterTest extends ConverterTestSetup {
variableDeclarationFragment.setInitializer(infixExpression);
VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "int n = i % j;", source); //$NON-NLS-1$
+ checkSourceRange(node, "var n = i % j;", source); //$NON-NLS-1$
}
/**
@@ -1335,7 +1399,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0062() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0062", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0062", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -1350,10 +1414,10 @@ public class ASTConverterTest extends ConverterTestSetup {
variableDeclarationFragment.setInitializer(infixExpression);
VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "int n = i ^ j;", source); //$NON-NLS-1$
+ checkSourceRange(node, "var n = i ^ j;", source); //$NON-NLS-1$
}
/**
@@ -1361,7 +1425,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0063() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0063", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0063", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -1376,10 +1440,10 @@ public class ASTConverterTest extends ConverterTestSetup {
variableDeclarationFragment.setInitializer(infixExpression);
VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "int n = i & j;", source); //$NON-NLS-1$
+ checkSourceRange(node, "var n = i & j;", source); //$NON-NLS-1$
}
/**
@@ -1387,7 +1451,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0064() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0064", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0064", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -1402,10 +1466,10 @@ public class ASTConverterTest extends ConverterTestSetup {
variableDeclarationFragment.setInitializer(infixExpression);
VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "int n = i | j;", source); //$NON-NLS-1$
+ checkSourceRange(node, "var n = i | j;", source); //$NON-NLS-1$
}
/**
@@ -1413,7 +1477,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0065() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0065", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0065", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -1428,10 +1492,10 @@ public class ASTConverterTest extends ConverterTestSetup {
variableDeclarationFragment.setInitializer(infixExpression);
VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "boolean b2 = b < b1;", source); //$NON-NLS-1$
+ checkSourceRange(node, "var b2 = b < b1;", source); //$NON-NLS-1$
}
/**
@@ -1439,7 +1503,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0066() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0066", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0066", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -1454,10 +1518,10 @@ public class ASTConverterTest extends ConverterTestSetup {
variableDeclarationFragment.setInitializer(infixExpression);
VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "boolean b2 = b <= b1;", source); //$NON-NLS-1$
+ checkSourceRange(node, "var b2 = b <= b1;", source); //$NON-NLS-1$
}
/**
@@ -1465,7 +1529,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0067() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0067", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0067", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -1480,10 +1544,10 @@ public class ASTConverterTest extends ConverterTestSetup {
variableDeclarationFragment.setInitializer(infixExpression);
VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "boolean b2 = b > b1;", source); //$NON-NLS-1$
+ checkSourceRange(node, "var b2 = b > b1;", source); //$NON-NLS-1$
}
/**
@@ -1491,7 +1555,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0068() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0068", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0068", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -1506,10 +1570,10 @@ public class ASTConverterTest extends ConverterTestSetup {
variableDeclarationFragment.setInitializer(infixExpression);
VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "boolean b2 = b >= b1;", source); //$NON-NLS-1$
+ checkSourceRange(node, "var b2 = b >= b1;", source); //$NON-NLS-1$
}
/**
@@ -1517,7 +1581,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0069() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0069", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0069", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -1532,10 +1596,10 @@ public class ASTConverterTest extends ConverterTestSetup {
variableDeclarationFragment.setInitializer(infixExpression);
VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "boolean b2 = b != b1;", source); //$NON-NLS-1$
+ checkSourceRange(node, "var b2 = b != b1;", source); //$NON-NLS-1$
}
/**
@@ -1543,64 +1607,65 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0070() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0070", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0070", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
variableDeclarationFragment.setName(this.ast.newSimpleName("b")); //$NON-NLS-1$
- InstanceofExpression instanceOfExpression = this.ast.newInstanceofExpression();
+ InfixExpression instanceOfExpression = this.ast.newInfixExpression();
instanceOfExpression.setLeftOperand(this.ast.newSimpleName("o"));//$NON-NLS-1$
- SimpleType simpleType = this.ast.newSimpleType(this.ast.newSimpleName("Integer"));//$NON-NLS-1$
- instanceOfExpression.setRightOperand(simpleType);
+ instanceOfExpression.setOperator(InfixExpression.Operator.INSTANCEOF);
+// SimpleType simpleType = this.ast.newSimpleType(this.ast.newSimpleName("Integer"));//$NON-NLS-1$
+ instanceOfExpression.setRightOperand(this.ast.newSimpleName("Number"));
variableDeclarationFragment.setInitializer(instanceOfExpression);
VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "boolean b = o instanceof Integer;", source); //$NON-NLS-1$
+ checkSourceRange(node, "var b = o instanceof Number;", source); //$NON-NLS-1$
}
- /**
- * InstanceofExpression ==> InfixExpression
- * @deprecated using deprecated code
- */
- public void test0071() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0071", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
-
- VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
- variableDeclarationFragment.setName(this.ast.newSimpleName("b")); //$NON-NLS-1$
- InstanceofExpression instanceOfExpression = this.ast.newInstanceofExpression();
- instanceOfExpression.setLeftOperand(this.ast.newSimpleName("o")); //$NON-NLS-1$
- QualifiedName name =
- this.ast.newQualifiedName(
- this.ast.newQualifiedName(
- this.ast.newSimpleName("java"), //$NON-NLS-1$
- this.ast.newSimpleName("lang")), //$NON-NLS-1$
- this.ast.newSimpleName("Integer")); //$NON-NLS-1$
- Type type = ast.newSimpleType(name);
- instanceOfExpression.setRightOperand(type);
- variableDeclarationFragment.setInitializer(instanceOfExpression);
- VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
- statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
-
- assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "boolean b = o instanceof java.lang.Integer;", source); //$NON-NLS-1$
- }
+// /**
+// * InstanceofExpression ==> InfixExpression
+// * @deprecated using deprecated code
+// */
+// public void test0071() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0071", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+//
+// VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+// variableDeclarationFragment.setName(this.ast.newSimpleName("b")); //$NON-NLS-1$
+// InstanceofExpression instanceOfExpression = this.ast.newInstanceofExpression();
+// instanceOfExpression.setLeftOperand(this.ast.newSimpleName("o")); //$NON-NLS-1$
+// QualifiedName name =
+// this.ast.newQualifiedName(
+// this.ast.newQualifiedName(
+// this.ast.newSimpleName("java"), //$NON-NLS-1$
+// this.ast.newSimpleName("lang")), //$NON-NLS-1$
+// this.ast.newSimpleName("Integer")); //$NON-NLS-1$
+// Type type = ast.newSimpleType(name);
+// instanceOfExpression.setRightOperand(type);
+// variableDeclarationFragment.setInitializer(instanceOfExpression);
+// VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+// statement.setModifiers(Modifier.NONE);
+//// statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
+//
+// assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
+// checkSourceRange(node, "var b = o instanceof java.lang.Integer;", source); //$NON-NLS-1$
+// }
/**
* UnaryExpression (!) ==> PrefixExpression
* @deprecated using deprecated code
*/
public void test0072() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0072", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0072", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -1613,10 +1678,10 @@ public class ASTConverterTest extends ConverterTestSetup {
variableDeclarationFragment.setInitializer(prefixExpression);
VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "boolean b1 = !b;", source); //$NON-NLS-1$
+ checkSourceRange(node, "var b1 = !b;", source); //$NON-NLS-1$
}
/**
@@ -1624,7 +1689,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0073() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0073", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0073", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -1637,10 +1702,10 @@ public class ASTConverterTest extends ConverterTestSetup {
variableDeclarationFragment.setInitializer(prefixExpression);
VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "int n = ~i;", source); //$NON-NLS-1$
+ checkSourceRange(node, "var n = ~i;", source); //$NON-NLS-1$
}
/**
@@ -1648,7 +1713,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0074() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0074", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0074", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -1662,10 +1727,10 @@ public class ASTConverterTest extends ConverterTestSetup {
variableDeclarationFragment.setInitializer(prefixExpression);
VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "int i = +2;", source); //$NON-NLS-1$
+ checkSourceRange(node, "var i = +2;", source); //$NON-NLS-1$
}
/**
@@ -1673,7 +1738,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0075() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0075", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0075", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -1687,11 +1752,11 @@ public class ASTConverterTest extends ConverterTestSetup {
variableDeclarationFragment.setInitializer(prefixExpression);
VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "int i = -2;", source); //$NON-NLS-1$
+ checkSourceRange(node, "var i = -2;", source); //$NON-NLS-1$
}
/**
@@ -1699,7 +1764,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0076() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0076", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0076", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -1718,9 +1783,9 @@ public class ASTConverterTest extends ConverterTestSetup {
variableDeclarationFragment.setInitializer(conditionalExpression);
VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "boolean b = args != null ? true : false;", source); //$NON-NLS-1$
+ checkSourceRange(node, "var b = args != null ? true : false;", source); //$NON-NLS-1$
}
/**
@@ -1728,7 +1793,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0077() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0077", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0077", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -1737,59 +1802,63 @@ public class ASTConverterTest extends ConverterTestSetup {
variableDeclarationFragment.setName(this.ast.newSimpleName("i")); //$NON-NLS-1$
ConditionalExpression conditionalExpression = this.ast.newConditionalExpression();
conditionalExpression.setExpression(this.ast.newBooleanLiteral(true));
- QualifiedName name =
- this.ast.newQualifiedName(
- this.ast.newSimpleName("args"), //$NON-NLS-1$
- this.ast.newSimpleName("length")); //$NON-NLS-1$
- conditionalExpression.setThenExpression(name);
+// QualifiedName name =
+// this.ast.newQualifiedName(
+// this.ast.newSimpleName("args"), //$NON-NLS-1$
+// this.ast.newSimpleName("length")); //$NON-NLS-1$
+// conditionalExpression.setThenExpression(name);
+ FieldAccess fieldAccess=this.ast.newFieldAccess();
+ fieldAccess.setExpression(this.ast.newSimpleName("args"));
+ fieldAccess.setName(this.ast.newSimpleName("length"));
+ conditionalExpression.setThenExpression(fieldAccess);
conditionalExpression.setElseExpression(this.ast.newNumberLiteral("0"));//$NON-NLS-1$
variableDeclarationFragment.setInitializer(conditionalExpression);
VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
statement.setModifiers(Modifier.NONE);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
-
- assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "int i = true ? args.length: 0;", source); //$NON-NLS-1$
- }
-
- /**
- * MessageSend ==> SuperMethodInvocation
- */
- public void test0078() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0078", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- SuperMethodInvocation superMethodInvocation = this.ast.newSuperMethodInvocation();
- superMethodInvocation.setName(this.ast.newSimpleName("bar")); //$NON-NLS-1$
- ExpressionStatement statement = this.ast.newExpressionStatement(superMethodInvocation);
- assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "super.bar();", source); //$NON-NLS-1$
- }
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
- /**
- * MessageSend ==> SuperMethodInvocation
- */
- public void test0079() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0079", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- SuperMethodInvocation superMethodInvocation = this.ast.newSuperMethodInvocation();
- superMethodInvocation.setName(this.ast.newSimpleName("bar")); //$NON-NLS-1$
- superMethodInvocation.arguments().add(this.ast.newNumberLiteral("4"));//$NON-NLS-1$
- ExpressionStatement statement = this.ast.newExpressionStatement(superMethodInvocation);
assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "super.bar(4);", source); //$NON-NLS-1$
+ checkSourceRange(node, "var i = true ? args.length: 0;", source); //$NON-NLS-1$
}
+//
+// /**
+// * MessageSend ==> SuperMethodInvocation
+// */
+// public void test0078() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0078", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// SuperMethodInvocation superMethodInvocation = this.ast.newSuperMethodInvocation();
+// superMethodInvocation.setName(this.ast.newSimpleName("bar")); //$NON-NLS-1$
+// ExpressionStatement statement = this.ast.newExpressionStatement(superMethodInvocation);
+// assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
+// checkSourceRange(node, "super.bar();", source); //$NON-NLS-1$
+// }
+//
+// /**
+// * MessageSend ==> SuperMethodInvocation
+// */
+// public void test0079() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0079", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// SuperMethodInvocation superMethodInvocation = this.ast.newSuperMethodInvocation();
+// superMethodInvocation.setName(this.ast.newSimpleName("bar")); //$NON-NLS-1$
+// superMethodInvocation.arguments().add(this.ast.newNumberLiteral("4"));//$NON-NLS-1$
+// ExpressionStatement statement = this.ast.newExpressionStatement(superMethodInvocation);
+// assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
+// checkSourceRange(node, "super.bar(4);", source); //$NON-NLS-1$
+// }
/**
* MessageSend ==> MethodInvocation
*/
public void test0080() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0080", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0080", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -1806,7 +1875,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* MessageSend ==> MethodInvocation
*/
public void test0081() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0081", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0081", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -1824,7 +1893,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* ForStatement ==> ForStatement
*/
public void test0082() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0082", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0082", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -1840,7 +1909,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0083() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0083", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0083", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -1851,7 +1920,7 @@ public class ASTConverterTest extends ConverterTestSetup {
variableDeclarationFragment.setInitializer(this.ast.newNumberLiteral("0"));//$NON-NLS-1$
VariableDeclarationExpression variableDeclarationExpression = this.ast.newVariableDeclarationExpression(variableDeclarationFragment);
variableDeclarationExpression.setModifiers(Modifier.NONE);
- variableDeclarationExpression.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+// variableDeclarationExpression.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
forStatement.initializers().add(variableDeclarationExpression);
PostfixExpression postfixExpression = this.ast.newPostfixExpression();
postfixExpression.setOperand(this.ast.newSimpleName("i"));//$NON-NLS-1$
@@ -1864,7 +1933,7 @@ public class ASTConverterTest extends ConverterTestSetup {
infixExpression.setRightOperand(this.ast.newNumberLiteral("10")); //$NON-NLS-1$
forStatement.setExpression(infixExpression);
assertTrue("Both AST trees should be identical", forStatement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "for (int i = 0; i < 10; i++) {}", source); //$NON-NLS-1$
+ checkSourceRange(node, "for (var i = 0; i < 10; i++) {}", source); //$NON-NLS-1$
}
/**
@@ -1872,7 +1941,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0084() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0084", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0084", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -1884,7 +1953,7 @@ public class ASTConverterTest extends ConverterTestSetup {
VariableDeclarationExpression variableDeclarationExpression = this.ast.newVariableDeclarationExpression(variableDeclarationFragment);
variableDeclarationExpression.setModifiers(Modifier.NONE);
- variableDeclarationExpression.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+// variableDeclarationExpression.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
forStatement.initializers().add(variableDeclarationExpression);
PostfixExpression postfixExpression = this.ast.newPostfixExpression();
@@ -1898,7 +1967,7 @@ public class ASTConverterTest extends ConverterTestSetup {
forStatement.setExpression(infixExpression);
forStatement.setBody(this.ast.newEmptyStatement());
assertTrue("Both AST trees should be identical", forStatement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "for (int i = 0; i < 10; i++);", source); //$NON-NLS-1$
+ checkSourceRange(node, "for (var i = 0; i < 10; i++);", source); //$NON-NLS-1$
}
/**
@@ -1906,7 +1975,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0085() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0085", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0085", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -1918,7 +1987,7 @@ public class ASTConverterTest extends ConverterTestSetup {
VariableDeclarationExpression variableDeclarationExpression = this.ast.newVariableDeclarationExpression(variableDeclarationFragment);
variableDeclarationExpression.setModifiers(Modifier.NONE);
- variableDeclarationExpression.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+// variableDeclarationExpression.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
forStatement.initializers().add(variableDeclarationExpression);
PostfixExpression postfixExpression = this.ast.newPostfixExpression();
@@ -1927,14 +1996,14 @@ public class ASTConverterTest extends ConverterTestSetup {
forStatement.updaters().add(postfixExpression);
forStatement.setBody(this.ast.newEmptyStatement());
assertTrue("Both AST trees should be identical", forStatement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "for (int i = 0;; i++);", source); //$NON-NLS-1$
+ checkSourceRange(node, "for (var i = 0;; i++);", source); //$NON-NLS-1$
}
/**
* ForStatement ==> ForStatement
*/
public void test0086() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0086", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0086", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -1958,7 +2027,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* ForStatement ==> ForStatement
*/
public void test0087() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0087", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0087", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -1978,7 +2047,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0088() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0088", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0088", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -1988,49 +2057,49 @@ public class ASTConverterTest extends ConverterTestSetup {
variableDeclarationFragment.setName(this.ast.newSimpleName("i")); //$NON-NLS-1$
VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
- statement.setModifiers(Modifier.NONE);
-
- assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "int i;", source); //$NON-NLS-1$
- }
-
- /**
- * LocalDeclaration ==> VariableDeclarationStatement
- * @deprecated using deprecated code
- */
- public void test0089() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0089", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
-
- VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
- variableDeclarationFragment.setName(this.ast.newSimpleName("s")); //$NON-NLS-1$
-
- VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
- QualifiedName name =
- this.ast.newQualifiedName(
- this.ast.newQualifiedName(
- this.ast.newSimpleName("java"),//$NON-NLS-1$
- this.ast.newSimpleName("lang")//$NON-NLS-1$
- ),
- this.ast.newSimpleName("String") //$NON-NLS-1$
- );
- statement.setType(this.ast.newSimpleType(name));
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
statement.setModifiers(Modifier.NONE);
assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "java.lang.String s;", source); //$NON-NLS-1$
- }
+ checkSourceRange(node, "var i;", source); //$NON-NLS-1$
+ }
+
+// /**
+// * LocalDeclaration ==> VariableDeclarationStatement
+// * @deprecated using deprecated code
+// */
+// public void test0089() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0089", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+//
+// VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+// variableDeclarationFragment.setName(this.ast.newSimpleName("s")); //$NON-NLS-1$
+//
+// VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+// QualifiedName name =
+// this.ast.newQualifiedName(
+// this.ast.newQualifiedName(
+// this.ast.newSimpleName("java"),//$NON-NLS-1$
+// this.ast.newSimpleName("lang")//$NON-NLS-1$
+// ),
+// this.ast.newSimpleName("String") //$NON-NLS-1$
+// );
+// statement.setType(this.ast.newSimpleType(name));
+// statement.setModifiers(Modifier.NONE);
+//
+// assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
+// checkSourceRange(node, "java.lang.String s;", source); //$NON-NLS-1$
+// }
/**
* LocalDeclaration ==> VariableDeclarationStatement
* @deprecated using deprecated code
*/
public void test0090() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0090", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0090", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2044,10 +2113,10 @@ public class ASTConverterTest extends ConverterTestSetup {
variableDeclarationFragment.setName(this.ast.newSimpleName("tab")); //$NON-NLS-1$
VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
- statement.setType(this.ast.newArrayType(this.ast.newPrimitiveType(PrimitiveType.INT), 1));
+// statement.setType(this.ast.newArrayType(this.ast.newPrimitiveType(PrimitiveType.INT), 1));
statement.setModifiers(Modifier.NONE);
assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "int[] tab = {1, 2};", source); //$NON-NLS-1$
+ checkSourceRange(node, "var tab = [1, 2];", source); //$NON-NLS-1$
}
/**
@@ -2055,45 +2124,45 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0091() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0091", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0091", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
- MethodDeclaration method = (MethodDeclaration)((TypeDeclaration) ((CompilationUnit) result).types().get(0)).bodyDeclarations().get(0);
+ MethodDeclaration method = (MethodDeclaration) ((CompilationUnit) result).statements().get(0);
SingleVariableDeclaration node = (SingleVariableDeclaration) method.parameters().get(0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
SingleVariableDeclaration variableDeclaration = this.ast.newSingleVariableDeclaration();
variableDeclaration.setModifiers(Modifier.NONE);
- variableDeclaration.setType(this.ast.newSimpleType(this.ast.newSimpleName("String")));//$NON-NLS-1$
+// variableDeclaration.setType(this.ast.newSimpleType(this.ast.newSimpleName("String")));//$NON-NLS-1$
variableDeclaration.setName(this.ast.newSimpleName("s")); //$NON-NLS-1$
assertTrue("Both AST trees should be identical", variableDeclaration.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "String s", source); //$NON-NLS-1$
+ checkSourceRange(node, "s", source); //$NON-NLS-1$
}
/**
* Argument ==> SingleVariableDeclaration
* @deprecated using deprecated code
*/
- public void test0092() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0092", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- MethodDeclaration method = (MethodDeclaration)((TypeDeclaration) ((CompilationUnit) result).types().get(0)).bodyDeclarations().get(0);
- SingleVariableDeclaration node = (SingleVariableDeclaration) method.parameters().get(0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- SingleVariableDeclaration variableDeclaration = this.ast.newSingleVariableDeclaration();
- variableDeclaration.setModifiers(Modifier.FINAL);
- variableDeclaration.setType(this.ast.newSimpleType(this.ast.newSimpleName("String")));//$NON-NLS-1$
- variableDeclaration.setName(this.ast.newSimpleName("s")); //$NON-NLS-1$
- assertTrue("Both AST trees should be identical", variableDeclaration.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "final String s", source); //$NON-NLS-1$
- assertEquals("Wrong dimension", 0, node.getExtraDimensions()); //$NON-NLS-1$
- }
+// public void test0092() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0092", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// MethodDeclaration method = (MethodDeclaration)((TypeDeclaration) ((CompilationUnit) result).types().get(0)).bodyDeclarations().get(0);
+// SingleVariableDeclaration node = (SingleVariableDeclaration) method.parameters().get(0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// SingleVariableDeclaration variableDeclaration = this.ast.newSingleVariableDeclaration();
+// variableDeclaration.setModifiers(Modifier.FINAL);
+// variableDeclaration.setType(this.ast.newSimpleType(this.ast.newSimpleName("String")));//$NON-NLS-1$
+// variableDeclaration.setName(this.ast.newSimpleName("s")); //$NON-NLS-1$
+// assertTrue("Both AST trees should be identical", variableDeclaration.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
+// checkSourceRange(node, "final String s", source); //$NON-NLS-1$
+// assertEquals("Wrong dimension", 0, node.getExtraDimensions()); //$NON-NLS-1$
+// }
/**
* Break ==> BreakStatement
*/
public void test0093() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0093", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0093", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2109,7 +2178,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* Continue ==> ContinueStatement
*/
public void test0094() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0094", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0094", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2125,7 +2194,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* Continue with Label ==> ContinueStatement
*/
public void test0095() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0095", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0095", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
LabeledStatement labeledStatement = (LabeledStatement) getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2142,7 +2211,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* Break + label ==> BreakStatement
*/
public void test0096() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0096", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0096", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
LabeledStatement labeledStatement = (LabeledStatement) getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2159,7 +2228,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* SwitchStatement ==> SwitchStatement
*/
public void test0097() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0097", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0097", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2174,11 +2243,15 @@ public class ASTConverterTest extends ConverterTestSetup {
_case.setExpression(this.ast.newNumberLiteral("2"));//$NON-NLS-1$
switchStatement.statements().add(_case);
MethodInvocation methodInvocation = this.ast.newMethodInvocation();
- QualifiedName name =
- this.ast.newQualifiedName(
- this.ast.newSimpleName("System"),//$NON-NLS-1$
- this.ast.newSimpleName("out"));//$NON-NLS-1$
- methodInvocation.setExpression(name);
+// QualifiedName name =
+// this.ast.newQualifiedName(
+// this.ast.newSimpleName("System"),//$NON-NLS-1$
+// this.ast.newSimpleName("out"));//$NON-NLS-1$
+// methodInvocation.setExpression(name);
+ FieldAccess fieldAccess = this.ast.newFieldAccess();
+ fieldAccess.setExpression(this.ast.newSimpleName("System"));
+ fieldAccess.setName(this.ast.newSimpleName("out"));
+ methodInvocation.setExpression(fieldAccess);
methodInvocation.setName(this.ast.newSimpleName("println")); //$NON-NLS-1$
methodInvocation.arguments().add(this.ast.newNumberLiteral("2"));//$NON-NLS-1$
ExpressionStatement expressionStatement = this.ast.newExpressionStatement(methodInvocation);
@@ -2188,11 +2261,15 @@ public class ASTConverterTest extends ConverterTestSetup {
_case.setExpression(null);
switchStatement.statements().add(_case);
methodInvocation = this.ast.newMethodInvocation();
- name =
- this.ast.newQualifiedName(
- this.ast.newSimpleName("System"),//$NON-NLS-1$
- this.ast.newSimpleName("out"));//$NON-NLS-1$
- methodInvocation.setExpression(name);
+// name =
+// this.ast.newQualifiedName(
+// this.ast.newSimpleName("System"),//$NON-NLS-1$
+// this.ast.newSimpleName("out"));//$NON-NLS-1$
+// methodInvocation.setExpression(name);
+ fieldAccess = this.ast.newFieldAccess();
+ fieldAccess.setExpression(this.ast.newSimpleName("System"));
+ fieldAccess.setName(this.ast.newSimpleName("out"));
+ methodInvocation.setExpression(fieldAccess);
methodInvocation.setName(this.ast.newSimpleName("println")); //$NON-NLS-1$
StringLiteral literal = this.ast.newStringLiteral();
literal.setLiteralValue("default"); //$NON-NLS-1$
@@ -2223,7 +2300,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* EmptyStatement ==> EmptyStatement
*/
public void test0098() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0098", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0098", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2237,7 +2314,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* DoStatement ==> DoStatement
*/
public void test0099() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0099", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0099", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2257,7 +2334,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* WhileStatement ==> WhileStatement
*/
public void test0100() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0100", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0100", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2273,7 +2350,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* WhileStatement ==> WhileStatement
*/
public void test0101() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0101", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0101", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2289,7 +2366,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* ExtendedStringLiteral ==> StringLiteral
*/
public void test0102() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0102", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0102", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -2313,7 +2390,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* ExtendedStringLiteral ==> StringLiteral
*/
public void test0103() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0103", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0103", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -2340,7 +2417,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* ExtendedStringLiteral ==> StringLiteral
*/
public void test0104() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0104", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0104", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -2367,7 +2444,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* NumberLiteral ==> InfixExpression
*/
public void test0105() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0105", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0105", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -2394,7 +2471,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* NumberLiteral ==> InfixExpression
*/
public void test0106() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0106", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0106", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -2430,7 +2507,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* NumberLiteral ==> InfixExpression
*/
public void test0107() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0107", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0107", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -2457,7 +2534,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* NumberLiteral ==> InfixExpression
*/
public void test0108() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0108", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0108", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -2484,7 +2561,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* NumberLiteral ==> InfixExpression
*/
public void test0109() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0109", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0109", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -2520,7 +2597,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* ReturnStatement ==> ReturnStatement
*/
public void test0110() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0110", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0110", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2537,7 +2614,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* ReturnStatement ==> ReturnStatement
*/
public void test0111() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0111", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0111", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2550,30 +2627,30 @@ public class ASTConverterTest extends ConverterTestSetup {
checkSourceRange(node, "return 2\\u003B", source);//$NON-NLS-1$
}
- /**
- * SynchronizedStatement ==> SynchronizedStatement
- */
- public void test0112() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0112", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- SynchronizedStatement synchronizedStatement = this.ast.newSynchronizedStatement();
- synchronizedStatement.setExpression(this.ast.newThisExpression());
- synchronizedStatement.setBody(this.ast.newBlock());
- assertTrue("Both AST trees should be identical", synchronizedStatement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- String expectedSource = "synchronized(this) {\n" +//$NON-NLS-1$
- " }"; //$NON-NLS-1$
- checkSourceRange(node, expectedSource, source);
- }
+// /**
+// * SynchronizedStatement ==> SynchronizedStatement
+// */
+// public void test0112() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0112", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// SynchronizedStatement synchronizedStatement = this.ast.newSynchronizedStatement();
+// synchronizedStatement.setExpression(this.ast.newThisExpression());
+// synchronizedStatement.setBody(this.ast.newBlock());
+// assertTrue("Both AST trees should be identical", synchronizedStatement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
+// String expectedSource = "synchronized(this) {\n" +//$NON-NLS-1$
+// " }"; //$NON-NLS-1$
+// checkSourceRange(node, expectedSource, source);
+// }
/**
* TryStatement ==> TryStatement
* @deprecated using deprecated code
*/
public void test0113() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0113", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0113", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2586,12 +2663,12 @@ public class ASTConverterTest extends ConverterTestSetup {
SingleVariableDeclaration exceptionVariable = this.ast.newSingleVariableDeclaration();
exceptionVariable.setModifiers(Modifier.NONE);
exceptionVariable.setName(this.ast.newSimpleName("e"));//$NON-NLS-1$
- exceptionVariable.setType(this.ast.newSimpleType(this.ast.newSimpleName("Exception")));//$NON-NLS-1$
+// exceptionVariable.setType(this.ast.newSimpleType(this.ast.newSimpleName("Exception")));//$NON-NLS-1$
catchBlock.setException(exceptionVariable);
tryStatement.catchClauses().add(catchBlock);
assertTrue("Both AST trees should be identical", tryStatement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
String expectedSource = "try {\n" +//$NON-NLS-1$
- " } catch(Exception e) {\n" +//$NON-NLS-1$
+ " } catch( e) {\n" +//$NON-NLS-1$
" } finally {\n" +//$NON-NLS-1$
" }"; //$NON-NLS-1$
checkSourceRange(node, expectedSource, source);
@@ -2602,7 +2679,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0114() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0114", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0114", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2614,12 +2691,12 @@ public class ASTConverterTest extends ConverterTestSetup {
SingleVariableDeclaration exceptionVariable = this.ast.newSingleVariableDeclaration();
exceptionVariable.setModifiers(Modifier.NONE);
exceptionVariable.setName(this.ast.newSimpleName("e"));//$NON-NLS-1$
- exceptionVariable.setType(this.ast.newSimpleType(this.ast.newSimpleName("Exception")));//$NON-NLS-1$
+// exceptionVariable.setType(this.ast.newSimpleType(this.ast.newSimpleName("Exception")));//$NON-NLS-1$
catchBlock.setException(exceptionVariable);
tryStatement.catchClauses().add(catchBlock);
assertTrue("Both AST trees should be identical", tryStatement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
String expectedSource = "try {\n" +//$NON-NLS-1$
- " } catch(Exception e) {\n" +//$NON-NLS-1$
+ " } catch(e) {\n" +//$NON-NLS-1$
" }"; //$NON-NLS-1$
checkSourceRange(node, expectedSource, source);
}
@@ -2629,7 +2706,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0115() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0115", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0115", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2647,13 +2724,13 @@ public class ASTConverterTest extends ConverterTestSetup {
SingleVariableDeclaration exceptionVariable = this.ast.newSingleVariableDeclaration();
exceptionVariable.setModifiers(Modifier.NONE);
exceptionVariable.setName(this.ast.newSimpleName("e"));//$NON-NLS-1$
- exceptionVariable.setType(this.ast.newSimpleType(this.ast.newSimpleName("Exception")));//$NON-NLS-1$
+// exceptionVariable.setType(this.ast.newSimpleType(this.ast.newSimpleName("Exception")));//$NON-NLS-1$
catchBlock.setException(exceptionVariable);
tryStatement.catchClauses().add(catchBlock);
assertTrue("Both AST trees should be identical", tryStatement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
String expectedSource = "try {\n" +//$NON-NLS-1$
" return 2;\n" +//$NON-NLS-1$
- " } catch(Exception e) {\n" +//$NON-NLS-1$
+ " } catch(e) {\n" +//$NON-NLS-1$
" }"; //$NON-NLS-1$
checkSourceRange(node, expectedSource, source);
}
@@ -2662,7 +2739,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* ThrowStatement ==> ThrowStatement
*/
public void test0116() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0116", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0116", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2677,7 +2754,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* ThrowStatement ==> ThrowStatement
*/
public void test0117() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0117", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0117", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2692,7 +2769,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* ThrowStatement ==> ThrowStatement
*/
public void test0118() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0118", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0118", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2707,7 +2784,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* IfStatement ==> IfStatement
*/
public void test0119() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0119", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0119", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2723,7 +2800,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* IfStatement ==> IfStatement
*/
public void test0120() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0120", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0120", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2742,7 +2819,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* IfStatement ==> IfStatement
*/
public void test0121() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0121", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0121", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2761,7 +2838,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* IfStatement ==> IfStatement
*/
public void test0122() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0122", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0122", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2781,7 +2858,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* IfStatement ==> IfStatement
*/
public void test0123() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0123", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0123", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2808,152 +2885,152 @@ public class ASTConverterTest extends ConverterTestSetup {
* Multiple local declaration => VariabledeclarationStatement
* @deprecated using deprecated code
*/
- public void test0124() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0124", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- VariableDeclarationFragment fragment = this.ast.newVariableDeclarationFragment();
- fragment.setName(this.ast.newSimpleName("x"));//$NON-NLS-1$
- NumberLiteral literal = this.ast.newNumberLiteral();
- literal.setToken("10");//$NON-NLS-1$
- fragment.setInitializer(literal);
- fragment.setExtraDimensions(0);
- VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(fragment);
- fragment = this.ast.newVariableDeclarationFragment();
- fragment.setName(this.ast.newSimpleName("z"));//$NON-NLS-1$
- fragment.setInitializer(this.ast.newNullLiteral());
- fragment.setExtraDimensions(1);
- statement.fragments().add(fragment);
- fragment = this.ast.newVariableDeclarationFragment();
- fragment.setName(this.ast.newSimpleName("i"));//$NON-NLS-1$
- fragment.setExtraDimensions(0);
- statement.fragments().add(fragment);
- fragment = this.ast.newVariableDeclarationFragment();
- fragment.setName(this.ast.newSimpleName("j"));//$NON-NLS-1$
- fragment.setExtraDimensions(2);
- statement.fragments().add(fragment);
- statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
- statement.setModifiers(Modifier.NONE);
- assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- VariableDeclarationFragment[] fragments = (VariableDeclarationFragment[])((VariableDeclarationStatement) node).fragments().toArray(new VariableDeclarationFragment[4]);
- assertTrue("fragments.length != 4", fragments.length == 4); //$NON-NLS-1$
- checkSourceRange(fragments[0], "x= 10", source);//$NON-NLS-1$
- checkSourceRange(fragments[1], "z[] = null", source);//$NON-NLS-1$
- checkSourceRange(fragments[2], "i", source);//$NON-NLS-1$
- checkSourceRange(fragments[3], "j[][]", source);//$NON-NLS-1$
- checkSourceRange(node, "int x= 10, z[] = null, i, j[][];", source);//$NON-NLS-1$
- }
-
- /**
- * Multiple local declaration => VariabledeclarationStatement
- * @deprecated using deprecated code
- */
- public void test0125() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0125", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- VariableDeclarationFragment fragment = this.ast.newVariableDeclarationFragment();
- fragment.setName(this.ast.newSimpleName("x"));//$NON-NLS-1$
- NumberLiteral literal = this.ast.newNumberLiteral();
- literal.setToken("10");//$NON-NLS-1$
- fragment.setInitializer(literal);
- fragment.setExtraDimensions(0);
- VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(fragment);
- fragment = this.ast.newVariableDeclarationFragment();
- fragment.setName(this.ast.newSimpleName("z"));//$NON-NLS-1$
- fragment.setInitializer(this.ast.newNullLiteral());
- fragment.setExtraDimensions(1);
- statement.fragments().add(fragment);
- fragment = this.ast.newVariableDeclarationFragment();
- fragment.setName(this.ast.newSimpleName("i"));//$NON-NLS-1$
- fragment.setExtraDimensions(0);
- statement.fragments().add(fragment);
- fragment = this.ast.newVariableDeclarationFragment();
- fragment.setName(this.ast.newSimpleName("j"));//$NON-NLS-1$
- fragment.setExtraDimensions(2);
- statement.fragments().add(fragment);
- statement.setType(this.ast.newArrayType(this.ast.newPrimitiveType(PrimitiveType.INT), 1));
- statement.setModifiers(Modifier.NONE);
- assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "int[] x= 10, z[] = null, i, j[][];", source); //$NON-NLS-1$
- VariableDeclarationFragment[] fragments = (VariableDeclarationFragment[])((VariableDeclarationStatement) node).fragments().toArray(new VariableDeclarationFragment[4]);
- assertTrue("fragments.length != 4", fragments.length == 4); //$NON-NLS-1$
- checkSourceRange(fragments[0], "x= 10", source);//$NON-NLS-1$
- checkSourceRange(fragments[1], "z[] = null", source);//$NON-NLS-1$
- checkSourceRange(fragments[2], "i", source);//$NON-NLS-1$
- checkSourceRange(fragments[3], "j[][]", source);//$NON-NLS-1$
- }
-
- /**
- * ForStatement
- * @deprecated using deprecated code
- */
- public void test0126() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0126", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- ForStatement forStatement = this.ast.newForStatement();
- VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
- variableDeclarationFragment.setName(this.ast.newSimpleName("tab")); //$NON-NLS-1$
- variableDeclarationFragment.setInitializer(this.ast.newNullLiteral());//$NON-NLS-1$
- variableDeclarationFragment.setExtraDimensions(1);
- VariableDeclarationExpression variableDeclarationExpression = this.ast.newVariableDeclarationExpression(variableDeclarationFragment);
- variableDeclarationExpression.setModifiers(Modifier.NONE);
- variableDeclarationExpression.setType(this.ast.newArrayType(this.ast.newSimpleType(this.ast.newSimpleName("String")), 1));//$NON-NLS-1$
- forStatement.initializers().add(variableDeclarationExpression);
- PrefixExpression prefixExpression = this.ast.newPrefixExpression();
- prefixExpression.setOperand(this.ast.newSimpleName("i"));//$NON-NLS-1$
- prefixExpression.setOperator(PrefixExpression.Operator.INCREMENT);
- forStatement.updaters().add(prefixExpression);
- forStatement.setBody(this.ast.newBlock());
- assertTrue("Both AST trees should be identical", forStatement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "for (String[] tab[] = null;; ++i) {}", source); //$NON-NLS-1$
- checkSourceRange((ASTNode) ((ForStatement) node).updaters().get(0), "++i", source); //$NON-NLS-1$
- checkSourceRange((ASTNode) ((ForStatement) node).initializers().get(0), "String[] tab[] = null", source); //$NON-NLS-1$
- }
-
- /**
- * ForStatement
- * @deprecated using deprecated code
- */
- public void test0127() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0127", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- ForStatement forStatement = this.ast.newForStatement();
- VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
- variableDeclarationFragment.setName(this.ast.newSimpleName("tab")); //$NON-NLS-1$
- variableDeclarationFragment.setInitializer(this.ast.newNullLiteral());//$NON-NLS-1$
- variableDeclarationFragment.setExtraDimensions(1);
- VariableDeclarationExpression variableDeclarationExpression = this.ast.newVariableDeclarationExpression(variableDeclarationFragment);
- variableDeclarationExpression.setModifiers(Modifier.NONE);
- variableDeclarationExpression.setType(this.ast.newSimpleType(this.ast.newSimpleName("String")));//$NON-NLS-1$
- forStatement.initializers().add(variableDeclarationExpression);
- PrefixExpression prefixExpression = this.ast.newPrefixExpression();
- prefixExpression.setOperand(this.ast.newSimpleName("i"));//$NON-NLS-1$
- prefixExpression.setOperator(PrefixExpression.Operator.INCREMENT);
- forStatement.updaters().add(prefixExpression);
- forStatement.setBody(this.ast.newBlock());
- assertTrue("Both AST trees should be identical", forStatement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "for (String tab[] = null;; ++i) {}", source); //$NON-NLS-1$
- checkSourceRange((ASTNode) ((ForStatement) node).updaters().get(0), "++i", source); //$NON-NLS-1$
- checkSourceRange((ASTNode) ((ForStatement) node).initializers().get(0), "String tab[] = null", source); //$NON-NLS-1$
- }
-
+// public void test0124() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0124", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// VariableDeclarationFragment fragment = this.ast.newVariableDeclarationFragment();
+// fragment.setName(this.ast.newSimpleName("x"));//$NON-NLS-1$
+// NumberLiteral literal = this.ast.newNumberLiteral();
+// literal.setToken("10");//$NON-NLS-1$
+// fragment.setInitializer(literal);
+// fragment.setExtraDimensions(0);
+// VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(fragment);
+// fragment = this.ast.newVariableDeclarationFragment();
+// fragment.setName(this.ast.newSimpleName("z"));//$NON-NLS-1$
+// fragment.setInitializer(this.ast.newNullLiteral());
+// fragment.setExtraDimensions(1);
+// statement.fragments().add(fragment);
+// fragment = this.ast.newVariableDeclarationFragment();
+// fragment.setName(this.ast.newSimpleName("i"));//$NON-NLS-1$
+// fragment.setExtraDimensions(0);
+// statement.fragments().add(fragment);
+// fragment = this.ast.newVariableDeclarationFragment();
+// fragment.setName(this.ast.newSimpleName("j"));//$NON-NLS-1$
+// fragment.setExtraDimensions(2);
+// statement.fragments().add(fragment);
+// statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+// statement.setModifiers(Modifier.NONE);
+// assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
+// VariableDeclarationFragment[] fragments = (VariableDeclarationFragment[])((VariableDeclarationStatement) node).fragments().toArray(new VariableDeclarationFragment[4]);
+// assertTrue("fragments.length != 4", fragments.length == 4); //$NON-NLS-1$
+// checkSourceRange(fragments[0], "x= 10", source);//$NON-NLS-1$
+// checkSourceRange(fragments[1], "z[] = null", source);//$NON-NLS-1$
+// checkSourceRange(fragments[2], "i", source);//$NON-NLS-1$
+// checkSourceRange(fragments[3], "j[][]", source);//$NON-NLS-1$
+// checkSourceRange(node, "int x= 10, z[] = null, i, j[][];", source);//$NON-NLS-1$
+// }
+//
+// /**
+// * Multiple local declaration => VariabledeclarationStatement
+// * @deprecated using deprecated code
+// */
+// public void test0125() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0125", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// VariableDeclarationFragment fragment = this.ast.newVariableDeclarationFragment();
+// fragment.setName(this.ast.newSimpleName("x"));//$NON-NLS-1$
+// NumberLiteral literal = this.ast.newNumberLiteral();
+// literal.setToken("10");//$NON-NLS-1$
+// fragment.setInitializer(literal);
+// fragment.setExtraDimensions(0);
+// VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(fragment);
+// fragment = this.ast.newVariableDeclarationFragment();
+// fragment.setName(this.ast.newSimpleName("z"));//$NON-NLS-1$
+// fragment.setInitializer(this.ast.newNullLiteral());
+// fragment.setExtraDimensions(1);
+// statement.fragments().add(fragment);
+// fragment = this.ast.newVariableDeclarationFragment();
+// fragment.setName(this.ast.newSimpleName("i"));//$NON-NLS-1$
+// fragment.setExtraDimensions(0);
+// statement.fragments().add(fragment);
+// fragment = this.ast.newVariableDeclarationFragment();
+// fragment.setName(this.ast.newSimpleName("j"));//$NON-NLS-1$
+// fragment.setExtraDimensions(2);
+// statement.fragments().add(fragment);
+// statement.setType(this.ast.newArrayType(this.ast.newPrimitiveType(PrimitiveType.INT), 1));
+// statement.setModifiers(Modifier.NONE);
+// assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
+// checkSourceRange(node, "int[] x= 10, z[] = null, i, j[][];", source); //$NON-NLS-1$
+// VariableDeclarationFragment[] fragments = (VariableDeclarationFragment[])((VariableDeclarationStatement) node).fragments().toArray(new VariableDeclarationFragment[4]);
+// assertTrue("fragments.length != 4", fragments.length == 4); //$NON-NLS-1$
+// checkSourceRange(fragments[0], "x= 10", source);//$NON-NLS-1$
+// checkSourceRange(fragments[1], "z[] = null", source);//$NON-NLS-1$
+// checkSourceRange(fragments[2], "i", source);//$NON-NLS-1$
+// checkSourceRange(fragments[3], "j[][]", source);//$NON-NLS-1$
+// }
+//
+// /**
+// * ForStatement
+// * @deprecated using deprecated code
+// */
+// public void test0126() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0126", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// ForStatement forStatement = this.ast.newForStatement();
+// VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+// variableDeclarationFragment.setName(this.ast.newSimpleName("tab")); //$NON-NLS-1$
+// variableDeclarationFragment.setInitializer(this.ast.newNullLiteral());//$NON-NLS-1$
+// variableDeclarationFragment.setExtraDimensions(1);
+// VariableDeclarationExpression variableDeclarationExpression = this.ast.newVariableDeclarationExpression(variableDeclarationFragment);
+// variableDeclarationExpression.setModifiers(Modifier.NONE);
+// variableDeclarationExpression.setType(this.ast.newArrayType(this.ast.newSimpleType(this.ast.newSimpleName("String")), 1));//$NON-NLS-1$
+// forStatement.initializers().add(variableDeclarationExpression);
+// PrefixExpression prefixExpression = this.ast.newPrefixExpression();
+// prefixExpression.setOperand(this.ast.newSimpleName("i"));//$NON-NLS-1$
+// prefixExpression.setOperator(PrefixExpression.Operator.INCREMENT);
+// forStatement.updaters().add(prefixExpression);
+// forStatement.setBody(this.ast.newBlock());
+// assertTrue("Both AST trees should be identical", forStatement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
+// checkSourceRange(node, "for (String[] tab[] = null;; ++i) {}", source); //$NON-NLS-1$
+// checkSourceRange((ASTNode) ((ForStatement) node).updaters().get(0), "++i", source); //$NON-NLS-1$
+// checkSourceRange((ASTNode) ((ForStatement) node).initializers().get(0), "String[] tab[] = null", source); //$NON-NLS-1$
+// }
+//
+// /**
+// * ForStatement
+// * @deprecated using deprecated code
+// */
+// public void test0127() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0127", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// ForStatement forStatement = this.ast.newForStatement();
+// VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+// variableDeclarationFragment.setName(this.ast.newSimpleName("tab")); //$NON-NLS-1$
+// variableDeclarationFragment.setInitializer(this.ast.newNullLiteral());//$NON-NLS-1$
+// variableDeclarationFragment.setExtraDimensions(1);
+// VariableDeclarationExpression variableDeclarationExpression = this.ast.newVariableDeclarationExpression(variableDeclarationFragment);
+// variableDeclarationExpression.setModifiers(Modifier.NONE);
+// variableDeclarationExpression.setType(this.ast.newSimpleType(this.ast.newSimpleName("String")));//$NON-NLS-1$
+// forStatement.initializers().add(variableDeclarationExpression);
+// PrefixExpression prefixExpression = this.ast.newPrefixExpression();
+// prefixExpression.setOperand(this.ast.newSimpleName("i"));//$NON-NLS-1$
+// prefixExpression.setOperator(PrefixExpression.Operator.INCREMENT);
+// forStatement.updaters().add(prefixExpression);
+// forStatement.setBody(this.ast.newBlock());
+// assertTrue("Both AST trees should be identical", forStatement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
+// checkSourceRange(node, "for (String tab[] = null;; ++i) {}", source); //$NON-NLS-1$
+// checkSourceRange((ASTNode) ((ForStatement) node).updaters().get(0), "++i", source); //$NON-NLS-1$
+// checkSourceRange((ASTNode) ((ForStatement) node).initializers().get(0), "String tab[] = null", source); //$NON-NLS-1$
+// }
+//
/**
* ForStatement
* @deprecated using deprecated code
*/
public void test0128() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0128", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0128", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2962,10 +3039,10 @@ public class ASTConverterTest extends ConverterTestSetup {
VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
variableDeclarationFragment.setName(this.ast.newSimpleName("tab")); //$NON-NLS-1$
variableDeclarationFragment.setInitializer(this.ast.newNullLiteral());//$NON-NLS-1$
- variableDeclarationFragment.setExtraDimensions(1);
+// variableDeclarationFragment.setExtraDimensions(1);
VariableDeclarationExpression variableDeclarationExpression = this.ast.newVariableDeclarationExpression(variableDeclarationFragment);
variableDeclarationExpression.setModifiers(Modifier.NONE);
- variableDeclarationExpression.setType(this.ast.newSimpleType(this.ast.newSimpleName("String")));//$NON-NLS-1$
+// variableDeclarationExpression.setType(this.ast.newSimpleType(this.ast.newSimpleName("String")));//$NON-NLS-1$
forStatement.initializers().add(variableDeclarationExpression);
PostfixExpression postfixExpression = this.ast.newPostfixExpression();
postfixExpression.setOperand(this.ast.newSimpleName("i"));//$NON-NLS-1$
@@ -2973,107 +3050,111 @@ public class ASTConverterTest extends ConverterTestSetup {
forStatement.updaters().add(postfixExpression);
forStatement.setBody(this.ast.newBlock());
assertTrue("Both AST trees should be identical", forStatement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "for (String tab[] = null;; i++/**/) {}", source); //$NON-NLS-1$
+ checkSourceRange(node, "for (var tab = null;; i++/**/) {}", source); //$NON-NLS-1$
checkSourceRange((ASTNode) ((ForStatement) node).updaters().get(0), "i++", source); //$NON-NLS-1$
- checkSourceRange((ASTNode) ((ForStatement) node).initializers().get(0), "String tab[] = null", source); //$NON-NLS-1$
+ checkSourceRange((ASTNode) ((ForStatement) node).initializers().get(0), "var tab = null", source); //$NON-NLS-1$
}
/**
- * FieldDeclaration
+ * VariableDeclarationStatement
* @deprecated using deprecated code
*/
public void test0129() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0129", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0129", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- assertTrue("The node is not a FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
- VariableDeclarationFragment frag = (VariableDeclarationFragment) ((FieldDeclaration) node).fragments().get(0);
+ assertTrue("The node is not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+ VariableDeclarationFragment frag = (VariableDeclarationFragment) ((VariableDeclarationStatement) node).fragments().get(0);
assertTrue("Not a declaration", frag.getName().isDeclaration()); //$NON-NLS-1$
+
VariableDeclarationFragment fragment = this.ast.newVariableDeclarationFragment();
fragment.setName(this.ast.newSimpleName("i")); //$NON-NLS-1$
- fragment.setExtraDimensions(0);
- FieldDeclaration fieldDeclaration = this.ast.newFieldDeclaration(fragment);
- fieldDeclaration.setModifiers(Modifier.NONE);
- fieldDeclaration.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
- assertTrue("Both AST trees should be identical", fieldDeclaration.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "int i;", source); //$NON-NLS-1$
+
+
+ VariableDeclarationStatement var = this.ast.newVariableDeclarationStatement(fragment);
+// fragment.setExtraDimensions(0);
+// VariableDeclarationStatement fieldDeclaration = this.ast.newVariableDeclarationStatement(fragment);
+// fieldDeclaration.setModifiers(Modifier.NONE);
+// fieldDeclaration.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+ assertTrue("Both AST trees should be identical", var.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
+ checkSourceRange(node, "var i;", source); //$NON-NLS-1$
}
/**
- * FieldDeclaration
+ * VariableDeclarationStatement
* @deprecated using deprecated code
*/
public void test0130() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0130", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0130", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- assertTrue("The node is not a FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+ assertTrue("The node is not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
VariableDeclarationFragment fragment = this.ast.newVariableDeclarationFragment();
fragment.setName(this.ast.newSimpleName("x")); //$NON-NLS-1$
NumberLiteral literal = this.ast.newNumberLiteral();
literal.setToken("10"); //$NON-NLS-1$
fragment.setInitializer(literal);
- fragment.setExtraDimensions(0);
- FieldDeclaration fieldDeclaration = this.ast.newFieldDeclaration(fragment);
- fieldDeclaration.setModifiers(Modifier.PUBLIC);
- fieldDeclaration.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+// fragment.setExtraDimensions(0);
+ VariableDeclarationStatement variableDeclaration = this.ast.newVariableDeclarationStatement(fragment);
+// variableDeclaration.setModifiers(Modifier.PUBLIC);
+// fieldDeclaration.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
fragment = this.ast.newVariableDeclarationFragment();
fragment.setName(this.ast.newSimpleName("y"));//$NON-NLS-1$
- fragment.setExtraDimensions(1);
+// fragment.setExtraDimensions(1);
fragment.setInitializer(this.ast.newNullLiteral());
- fieldDeclaration.fragments().add(fragment);
+ variableDeclaration.fragments().add(fragment);
fragment = this.ast.newVariableDeclarationFragment();
fragment.setName(this.ast.newSimpleName("i"));//$NON-NLS-1$
- fragment.setExtraDimensions(0);
- fieldDeclaration.fragments().add(fragment);
+// fragment.setExtraDimensions(0);
+ variableDeclaration.fragments().add(fragment);
fragment = this.ast.newVariableDeclarationFragment();
fragment.setName(this.ast.newSimpleName("j"));//$NON-NLS-1$
- fragment.setExtraDimensions(2);
- fieldDeclaration.fragments().add(fragment);
- assertTrue("Both AST trees should be identical", fieldDeclaration.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "public int x= 10, y[] = null, i, j[][];", source); //$NON-NLS-1$
- VariableDeclarationFragment[] fragments = (VariableDeclarationFragment[])((FieldDeclaration) node).fragments().toArray(new VariableDeclarationFragment[4]);
+// fragment.setExtraDimensions(2);
+ variableDeclaration.fragments().add(fragment);
+ assertTrue("Both AST trees should be identical", variableDeclaration.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
+ checkSourceRange(node, "var x= 10, y = null, i, j;", source); //$NON-NLS-1$
+ VariableDeclarationFragment[] fragments = (VariableDeclarationFragment[])((VariableDeclarationStatement) node).fragments().toArray(new VariableDeclarationFragment[4]);
assertTrue("fragments.length != 4", fragments.length == 4); //$NON-NLS-1$
checkSourceRange(fragments[0], "x= 10", source);//$NON-NLS-1$
- checkSourceRange(fragments[1], "y[] = null", source);//$NON-NLS-1$
+ checkSourceRange(fragments[1], "y = null", source);//$NON-NLS-1$
checkSourceRange(fragments[2], "i", source);//$NON-NLS-1$
- checkSourceRange(fragments[3], "j[][]", source);//$NON-NLS-1$
- }
-
- /**
- * Argument with final modifier
- * @deprecated using deprecated code
- */
- public void test0131() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0131", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- assertTrue("The node is not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
- assertTrue("Not a declaration", ((MethodDeclaration) node).getName().isDeclaration()); //$NON-NLS-1$
- List parameters = ((MethodDeclaration) node).parameters();
- assertTrue("Parameters.length != 1", parameters.size() == 1); //$NON-NLS-1$
- SingleVariableDeclaration arg = (SingleVariableDeclaration) ((MethodDeclaration) node).parameters().get(0);
- SingleVariableDeclaration singleVariableDeclaration = this.ast.newSingleVariableDeclaration();
- singleVariableDeclaration.setModifiers(Modifier.FINAL);
- singleVariableDeclaration.setName(this.ast.newSimpleName("i")); //$NON-NLS-1$
- singleVariableDeclaration.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
- assertTrue("Both AST trees should be identical", singleVariableDeclaration.subtreeMatch(new ASTMatcher(), arg)); //$NON-NLS-1$
- checkSourceRange(node, "void foo(final int i) {}", source); //$NON-NLS-1$
- checkSourceRange(arg, "final int i", source); //$NON-NLS-1$
- }
+ checkSourceRange(fragments[3], "j", source);//$NON-NLS-1$
+ }
+
+// /**
+// * Argument with final modifier
+// * @deprecated using deprecated code
+// */
+// public void test0131() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0131", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// assertTrue("The node is not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
+// assertTrue("Not a declaration", ((MethodDeclaration) node).getName().isDeclaration()); //$NON-NLS-1$
+// List parameters = ((MethodDeclaration) node).parameters();
+// assertTrue("Parameters.length != 1", parameters.size() == 1); //$NON-NLS-1$
+// SingleVariableDeclaration arg = (SingleVariableDeclaration) ((MethodDeclaration) node).parameters().get(0);
+// SingleVariableDeclaration singleVariableDeclaration = this.ast.newSingleVariableDeclaration();
+// singleVariableDeclaration.setModifiers(Modifier.FINAL);
+// singleVariableDeclaration.setName(this.ast.newSimpleName("i")); //$NON-NLS-1$
+// singleVariableDeclaration.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+// assertTrue("Both AST trees should be identical", singleVariableDeclaration.subtreeMatch(new ASTMatcher(), arg)); //$NON-NLS-1$
+// checkSourceRange(node, "void foo(final int i) {}", source); //$NON-NLS-1$
+// checkSourceRange(arg, "final int i", source); //$NON-NLS-1$
+// }
/**
* Check javadoc for MethodDeclaration
* @deprecated marking deprecated since using deprecated code
*/
public void test0132() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0132", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0132", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -3083,7 +3164,7 @@ public class ASTConverterTest extends ConverterTestSetup {
Javadoc javadoc = this.ast.newJavadoc();
javadoc.setComment("/** JavaDoc Comment*/");//$NON-NLS-1$*/
assertTrue("Both AST trees should be identical", javadoc.subtreeMatch(new ASTMatcher(), actualJavadoc));//$NON-NLS-1$
- checkSourceRange(node, "/** JavaDoc Comment*/\n void foo(final int i) {}", source); //$NON-NLS-1$
+ checkSourceRange(node, "/** JavaDoc Comment*/\n function foo(i) {}", source); //$NON-NLS-1$
checkSourceRange(actualJavadoc, "/** JavaDoc Comment*/", source); //$NON-NLS-1$
}
@@ -3091,7 +3172,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* Check javadoc for MethodDeclaration
*/
public void test0133() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0133", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0133", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -3099,14 +3180,14 @@ public class ASTConverterTest extends ConverterTestSetup {
assertTrue("The node is not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
Javadoc actualJavadoc = ((MethodDeclaration) node).getJavadoc();
assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
- checkSourceRange(node, "void foo(final int i) {}", source); //$NON-NLS-1$
+ checkSourceRange(node, "function foo(i) {}", source); //$NON-NLS-1$
}
/**
* Check javadoc for MethodDeclaration
*/
public void test0134() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0134", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0134", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -3114,309 +3195,309 @@ public class ASTConverterTest extends ConverterTestSetup {
assertTrue("The node is not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
Javadoc actualJavadoc = ((MethodDeclaration) node).getJavadoc();
assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
- checkSourceRange(node, "void foo(final int i) {}", source); //$NON-NLS-1$
+ checkSourceRange(node, "function foo( i) {}", source); //$NON-NLS-1$
}
/**
- * Check javadoc for FieldDeclaration
+ * Check javadoc for VariableDeclarationStatement
* @deprecated marking deprecated since using deprecated code
*/
public void test0135() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0135", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0135", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- assertTrue("The node is not a FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
- Javadoc actualJavadoc = ((FieldDeclaration) node).getJavadoc();
+ assertTrue("The node is not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+ Javadoc actualJavadoc = ((VariableDeclarationStatement) node).getJavadoc();
Javadoc javadoc = this.ast.newJavadoc();
javadoc.setComment("/** JavaDoc Comment*/");//$NON-NLS-1$*/
assertTrue("Both AST trees should be identical", javadoc.subtreeMatch(new ASTMatcher(), actualJavadoc));//$NON-NLS-1$
- checkSourceRange(node, "/** JavaDoc Comment*/\n int i;", source); //$NON-NLS-1$
+ checkSourceRange(node, "/** JavaDoc Comment*/\n var i;", source); //$NON-NLS-1$
}
/**
- * Check javadoc for FieldDeclaration
+ * Check javadoc for VariableDeclarationStatement
*/
public void test0136() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0136", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0136", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- assertTrue("The node is not a FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
- Javadoc actualJavadoc = ((FieldDeclaration) node).getJavadoc();
+ assertTrue("The node is not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+ Javadoc actualJavadoc = ((VariableDeclarationStatement) node).getJavadoc();
assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
- checkSourceRange(node, "int i;", source); //$NON-NLS-1$
+ checkSourceRange(node, "var i;", source); //$NON-NLS-1$
}
/**
- * Check javadoc for FieldDeclaration
+ * Check javadoc for VariableDeclarationStatement
*/
public void test0137() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0137", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- assertTrue("The node is not a FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
- Javadoc actualJavadoc = ((FieldDeclaration) node).getJavadoc();
- assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
- checkSourceRange(node, "int i;", source); //$NON-NLS-1$
- }
-
- /**
- * Check javadoc for TypeDeclaration
- */
- public void test0138() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0138", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
- Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
- assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
- String expectedContents = "public class Test {\n" +//$NON-NLS-1$
- " int i;\n" +//$NON-NLS-1$
- "}";//$NON-NLS-1$
- checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
- }
-
- /**
- * Check javadoc for TypeDeclaration
- */
- public void test0139() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0139", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
- Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
- assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
- String expectedContents = "public class Test {\n" +//$NON-NLS-1$
- " int i;\n" +//$NON-NLS-1$
- "}";//$NON-NLS-1$
- checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
- }
-
- /**
- * Check javadoc for TypeDeclaration
- * @deprecated marking deprecated since using deprecated code
- */
- public void test0140() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0140", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
- Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
- Javadoc javadoc = this.ast.newJavadoc();
- javadoc.setComment("/** JavaDoc Comment*/");//$NON-NLS-1$*/
- assertTrue("Both AST trees should be identical", javadoc.subtreeMatch(new ASTMatcher(), actualJavadoc));//$NON-NLS-1$
- String expectedContents =
- "/** JavaDoc Comment*/\n" + //$NON-NLS-1$
- "public class Test {\n" +//$NON-NLS-1$
- " int i;\n" +//$NON-NLS-1$
- "}";//$NON-NLS-1$
- checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
- checkSourceRange(actualJavadoc, "/** JavaDoc Comment*/", source); //$NON-NLS-1$
- }
-
- /**
- * Check javadoc for MemberTypeDeclaration
- * @deprecated marking deprecated since using deprecated code
- */
- public void test0141() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0141", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
- Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
- Javadoc javadoc = this.ast.newJavadoc();
- javadoc.setComment("/** JavaDoc Comment*/");//$NON-NLS-1$*/
- assertTrue("Both AST trees should be identical", javadoc.subtreeMatch(new ASTMatcher(), actualJavadoc));//$NON-NLS-1$
- String expectedContents =
- "/** JavaDoc Comment*/\n" + //$NON-NLS-1$
- " class B {}";//$NON-NLS-1$
- checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
- checkSourceRange(actualJavadoc, "/** JavaDoc Comment*/", source); //$NON-NLS-1$
- }
-
- /**
- * Check javadoc for MemberTypeDeclaration
- */
- public void test0142() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0142", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
- Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
- assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
- checkSourceRange(node, "class B {}", source); //$NON-NLS-1$
- }
-
- /**
- * Check javadoc for MemberTypeDeclaration
- */
- public void test0143() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0143", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
- Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
- assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
- checkSourceRange(node, "public static class B {}", source); //$NON-NLS-1$
- }
-
- /**
- * Check javadoc for MemberTypeDeclaration
- */
- public void test0144() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0144", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0137", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
- Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
+ assertTrue("The node is not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+ Javadoc actualJavadoc = ((VariableDeclarationStatement) node).getJavadoc();
assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
- checkSourceRange(node, "public static class B {}", source); //$NON-NLS-1$
- }
-
- /**
- * Checking initializers
- */
- public void test0145() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0145", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- checkSourceRange(node, "{}", source); //$NON-NLS-1$
- }
-
- /**
- * Checking initializers
- */
- public void test0146() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0146", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- checkSourceRange(node, "static {}", source); //$NON-NLS-1$
- }
-
- /**
- * Checking initializers
- * @deprecated marking deprecated since using deprecated code
- */
- public void test0147() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0147", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
- assertNotNull("Javadoc comment should no be null", actualJavadoc); //$NON-NLS-1$
- Javadoc javadoc = this.ast.newJavadoc();
- javadoc.setComment("/** JavaDoc Comment*/");//$NON-NLS-1$*/
- assertTrue("Both AST trees should be identical", javadoc.subtreeMatch(new ASTMatcher(), actualJavadoc));//$NON-NLS-1$
- String expectedContents =
- "/** JavaDoc Comment*/\n" + //$NON-NLS-1$
- " static {}";//$NON-NLS-1$
- checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
- checkSourceRange(actualJavadoc, "/** JavaDoc Comment*/", source); //$NON-NLS-1$
-
- }
-
- /**
- * Checking initializers
- * @deprecated marking deprecated since using deprecated code
- */
- public void test0148() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0148", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
- assertNotNull("Javadoc comment should not be null", actualJavadoc); //$NON-NLS-1$
- Javadoc javadoc = this.ast.newJavadoc();
- javadoc.setComment("/** JavaDoc Comment*/");//$NON-NLS-1$*/
- assertTrue("Both AST trees should be identical", javadoc.subtreeMatch(new ASTMatcher(), actualJavadoc));//$NON-NLS-1$
- String expectedContents =
- "/** JavaDoc Comment*/\n" + //$NON-NLS-1$
- " {}";//$NON-NLS-1$
- checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
- checkSourceRange(actualJavadoc, "/** JavaDoc Comment*/", source); //$NON-NLS-1$
-
- }
-
- /**
- * Checking initializers
- */
- public void test0149() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0149", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
- assertNull("Javadoc comment should be null", actualJavadoc); //$NON-NLS-1$
- checkSourceRange(node, "{}", source); //$NON-NLS-1$
- }
+ checkSourceRange(node, "var i;", source); //$NON-NLS-1$
+ }
+
+// /**
+// * Check javadoc for TypeDeclaration
+// */
+// public void test0138() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0138", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+// Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
+// assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
+// String expectedContents = "public class Test {\n" +//$NON-NLS-1$
+// " int i;\n" +//$NON-NLS-1$
+// "}";//$NON-NLS-1$
+// checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
+// }
+//
+// /**
+// * Check javadoc for TypeDeclaration
+// */
+// public void test0139() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0139", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+// Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
+// assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
+// String expectedContents = "public class Test {\n" +//$NON-NLS-1$
+// " int i;\n" +//$NON-NLS-1$
+// "}";//$NON-NLS-1$
+// checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
+// }
+//
+// /**
+// * Check javadoc for TypeDeclaration
+// * @deprecated marking deprecated since using deprecated code
+// */
+// public void test0140() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0140", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+// Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
+// Javadoc javadoc = this.ast.newJavadoc();
+// javadoc.setComment("/** JavaDoc Comment*/");//$NON-NLS-1$*/
+// assertTrue("Both AST trees should be identical", javadoc.subtreeMatch(new ASTMatcher(), actualJavadoc));//$NON-NLS-1$
+// String expectedContents =
+// "/** JavaDoc Comment*/\n" + //$NON-NLS-1$
+// "public class Test {\n" +//$NON-NLS-1$
+// " int i;\n" +//$NON-NLS-1$
+// "}";//$NON-NLS-1$
+// checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
+// checkSourceRange(actualJavadoc, "/** JavaDoc Comment*/", source); //$NON-NLS-1$
+// }
+
+// /**
+// * Check javadoc for MemberTypeDeclaration
+// * @deprecated marking deprecated since using deprecated code
+// */
+// public void test0141() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0141", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+// Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
+// Javadoc javadoc = this.ast.newJavadoc();
+// javadoc.setComment("/** JavaDoc Comment*/");//$NON-NLS-1$*/
+// assertTrue("Both AST trees should be identical", javadoc.subtreeMatch(new ASTMatcher(), actualJavadoc));//$NON-NLS-1$
+// String expectedContents =
+// "/** JavaDoc Comment*/\n" + //$NON-NLS-1$
+// " class B {}";//$NON-NLS-1$
+// checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
+// checkSourceRange(actualJavadoc, "/** JavaDoc Comment*/", source); //$NON-NLS-1$
+// }
+//
+// /**
+// * Check javadoc for MemberTypeDeclaration
+// */
+// public void test0142() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0142", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+// Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
+// assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
+// checkSourceRange(node, "class B {}", source); //$NON-NLS-1$
+// }
+//
+// /**
+// * Check javadoc for MemberTypeDeclaration
+// */
+// public void test0143() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0143", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+// Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
+// assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
+// checkSourceRange(node, "public static class B {}", source); //$NON-NLS-1$
+// }
+//
+// /**
+// * Check javadoc for MemberTypeDeclaration
+// */
+// public void test0144() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0144", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+// Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
+// assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
+// checkSourceRange(node, "public static class B {}", source); //$NON-NLS-1$
+// }
+
+// /**
+// * Checking initializers
+// */
+// public void test0145() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0145", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// checkSourceRange(node, "{}", source); //$NON-NLS-1$
+// }
+//
+// /**
+// * Checking initializers
+// */
+// public void test0146() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0146", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// checkSourceRange(node, "static {}", source); //$NON-NLS-1$
+// }
+//
+// /**
+// * Checking initializers
+// * @deprecated marking deprecated since using deprecated code
+// */
+// public void test0147() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0147", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
+// assertNotNull("Javadoc comment should no be null", actualJavadoc); //$NON-NLS-1$
+// Javadoc javadoc = this.ast.newJavadoc();
+// javadoc.setComment("/** JavaDoc Comment*/");//$NON-NLS-1$*/
+// assertTrue("Both AST trees should be identical", javadoc.subtreeMatch(new ASTMatcher(), actualJavadoc));//$NON-NLS-1$
+// String expectedContents =
+// "/** JavaDoc Comment*/\n" + //$NON-NLS-1$
+// " static {}";//$NON-NLS-1$
+// checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
+// checkSourceRange(actualJavadoc, "/** JavaDoc Comment*/", source); //$NON-NLS-1$
+//
+// }
+//
+// /**
+// * Checking initializers
+// * @deprecated marking deprecated since using deprecated code
+// */
+// public void test0148() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0148", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
+// assertNotNull("Javadoc comment should not be null", actualJavadoc); //$NON-NLS-1$
+// Javadoc javadoc = this.ast.newJavadoc();
+// javadoc.setComment("/** JavaDoc Comment*/");//$NON-NLS-1$*/
+// assertTrue("Both AST trees should be identical", javadoc.subtreeMatch(new ASTMatcher(), actualJavadoc));//$NON-NLS-1$
+// String expectedContents =
+// "/** JavaDoc Comment*/\n" + //$NON-NLS-1$
+// " {}";//$NON-NLS-1$
+// checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
+// checkSourceRange(actualJavadoc, "/** JavaDoc Comment*/", source); //$NON-NLS-1$
+//
+// }
+//
+// /**
+// * Checking initializers
+// */
+// public void test0149() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0149", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
+// assertNull("Javadoc comment should be null", actualJavadoc); //$NON-NLS-1$
+// checkSourceRange(node, "{}", source); //$NON-NLS-1$
+// }
/**
* Checking syntax error
*/
public void test0150() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0150", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0150", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, false);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertTrue("The compilation unit is malformed", !isMalformed(unit)); //$NON-NLS-1$
- assertTrue("The package declaration is not malformed", isMalformed(unit.getPackage())); //$NON-NLS-1$
- List imports = unit.imports();
- assertTrue("The imports list size is not one", imports.size() == 1); //$NON-NLS-1$
- assertTrue("The first import is malformed", !isMalformed((ASTNode) imports.get(0))); //$NON-NLS-1$
+// assertTrue("The package declaration is not malformed", isMalformed(unit.getPackage())); //$NON-NLS-1$
+// List imports = unit.imports();
+// assertTrue("The imports list size is not one", imports.size() == 1); //$NON-NLS-1$
+// assertTrue("The first import is malformed", !isMalformed((ASTNode) imports.get(0))); //$NON-NLS-1$
}
- /**
- * Checking syntax error
- */
- public void test0151() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0151", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, false);
- assertNotNull("Expression should not be null", result); //$NON-NLS-1$
- assertTrue("The compilation unit is malformed", !isMalformed(result)); //$NON-NLS-1$
- }
+// /**
+// * Checking syntax error
+// */
+// public void test0151() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0151", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, false);
+// assertNotNull("Expression should not be null", result); //$NON-NLS-1$
+// assertTrue("The compilation unit is malformed", !isMalformed(result)); //$NON-NLS-1$
+// }
/**
* Checking syntax error
*/
public void test0152() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0152", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0152", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, false);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The compilation unit is malformed", !isMalformed(result)); //$NON-NLS-1$
- ASTNode node = getASTNode((CompilationUnit) result, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- assertTrue("The type is malformed", !isMalformed(node)); //$NON-NLS-1$
- node = getASTNode((CompilationUnit) result, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- assertTrue("The field is not malformed", isMalformed(node)); //$NON-NLS-1$
- node = getASTNode((CompilationUnit) result, 0, 1);
+// ASTNode node = getASTNode((CompilationUnit) result, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// assertTrue("The type is malformed", !isMalformed(node)); //$NON-NLS-1$
+ ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// assertTrue("The field is not malformed", isMalformed(node)); //$NON-NLS-1$
+// node = getASTNode((CompilationUnit) result, 0, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("The method is not malformed", isMalformed(node)); //$NON-NLS-1$
}
@@ -3425,7 +3506,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* Checking syntax error
*/
public void test0153() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0153", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0153", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, false);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The compilation unit is malformed", !isMalformed(result)); //$NON-NLS-1$
@@ -3434,30 +3515,30 @@ public class ASTConverterTest extends ConverterTestSetup {
assertTrue("The method is not original", isOriginal(node)); //$NON-NLS-1$
assertTrue("The method is not malformed", isMalformed(node)); //$NON-NLS-1$
}
-
- /**
- * Checking binding of package declaration
- */
- public void test0154() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0154", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("Expression should not be null", result); //$NON-NLS-1$
- assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- IBinding binding = compilationUnit.getPackage().getName().resolveBinding();
- assertNotNull("The package binding is null", binding); //$NON-NLS-1$
- assertTrue("The binding is not a package binding", binding instanceof IPackageBinding); //$NON-NLS-1$
- IPackageBinding packageBinding = (IPackageBinding) binding;
- assertEquals("The package name is incorrect", "test0154", packageBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- IBinding binding2 = compilationUnit.getPackage().getName().resolveBinding();
- assertTrue("The package binding is not canonical", binding == binding2); //$NON-NLS-1$
- }
+//
+// /**
+// * Checking binding of package declaration
+// */
+// public void test0154() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0154", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("Expression should not be null", result); //$NON-NLS-1$
+// assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// IBinding binding = compilationUnit.getPackage().getName().resolveBinding();
+// assertNotNull("The package binding is null", binding); //$NON-NLS-1$
+// assertTrue("The binding is not a package binding", binding instanceof IPackageBinding); //$NON-NLS-1$
+// IPackageBinding packageBinding = (IPackageBinding) binding;
+// assertEquals("The package name is incorrect", "test0154", packageBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// IBinding binding2 = compilationUnit.getPackage().getName().resolveBinding();
+// assertTrue("The package binding is not canonical", binding == binding2); //$NON-NLS-1$
+// }
/**
* Checking arguments positions
*/
public void test0155() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0155", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0155", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
@@ -3469,17 +3550,17 @@ public class ASTConverterTest extends ConverterTestSetup {
assertTrue("The parameters size is different from 2", parameters.size() == 2); //$NON-NLS-1$
Object parameter = parameters.get(0);
assertTrue("The parameter is not a SingleVariableDeclaration", parameter instanceof SingleVariableDeclaration); //$NON-NLS-1$
- checkSourceRange((ASTNode) parameter, "int i", source); //$NON-NLS-1$
+ checkSourceRange((ASTNode) parameter, "i", source); //$NON-NLS-1$
parameter = parameters.get(1);
assertTrue("The parameter is not a SingleVariableDeclaration", parameter instanceof SingleVariableDeclaration); //$NON-NLS-1$
- checkSourceRange((ASTNode) parameter, "final boolean b", source); //$NON-NLS-1$
+ checkSourceRange((ASTNode) parameter, "b", source); //$NON-NLS-1$
}
/**
* Checking arguments positions
*/
public void test0156() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0156", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0156", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
@@ -3491,7 +3572,7 @@ public class ASTConverterTest extends ConverterTestSetup {
assertTrue("The parameters size is different from 1", parameters.size() == 1); //$NON-NLS-1$
Object parameter = parameters.get(0);
assertTrue("The parameter is not a SingleVariableDeclaration", parameter instanceof SingleVariableDeclaration); //$NON-NLS-1$
- checkSourceRange((ASTNode) parameter, "int i", source); //$NON-NLS-1$
+ checkSourceRange((ASTNode) parameter, "i", source); //$NON-NLS-1$
Block block = methodDecl.getBody();
List statements = block.statements();
assertTrue("The statements size is different from 2", statements.size() == 2); //$NON-NLS-1$
@@ -3503,65 +3584,65 @@ public class ASTConverterTest extends ConverterTestSetup {
* Check canonic binding for fields
*/
public void test0157() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "Test0157.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "Test0157.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
- List types = compilationUnit.types();
- assertTrue("The types list is empty", types.size() != 0); //$NON-NLS-1$
- TypeDeclaration typeDeclaration = (TypeDeclaration) types.get(0);
- ITypeBinding typeBinding = typeDeclaration.resolveBinding();
- assertNotNull("Type binding is null", typeBinding); //$NON-NLS-1$
- assertTrue("The type binding is canonical", typeBinding == typeDeclaration.resolveBinding()); //$NON-NLS-1$
- List bodyDeclarations = typeDeclaration.bodyDeclarations();
- assertTrue("The body declaration list is empty", bodyDeclarations.size() != 0); //$NON-NLS-1$
- BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
- assertTrue("This is not a field", bodyDeclaration instanceof FieldDeclaration); //$NON-NLS-1$
- FieldDeclaration fieldDeclaration = (FieldDeclaration) bodyDeclaration;
+ List statements = compilationUnit.statements();
+ assertTrue("The types list is empty", statements.size() != 0); //$NON-NLS-1$
+// TypeDeclaration typeDeclaration = (TypeDeclaration) types.get(0);
+// ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+// assertNotNull("Type binding is null", typeBinding); //$NON-NLS-1$
+// assertTrue("The type binding is canonical", typeBinding == typeDeclaration.resolveBinding()); //$NON-NLS-1$
+// List bodyDeclarations = typeDeclaration.bodyDeclarations();
+// assertTrue("The body declaration list is empty", bodyDeclarations.size() != 0); //$NON-NLS-1$
+ Statement bodyDeclaration = (Statement) statements.get(0);
+ assertTrue("This is not a field", bodyDeclaration instanceof VariableDeclarationStatement); //$NON-NLS-1$
+ VariableDeclarationStatement fieldDeclaration = (VariableDeclarationStatement) bodyDeclaration;
List variableFragments = fieldDeclaration.fragments();
assertTrue("The fragment list is empty", variableFragments.size() != 0); //$NON-NLS-1$
VariableDeclarationFragment fragment = (VariableDeclarationFragment) variableFragments.get(0);
IVariableBinding variableBinding = fragment.resolveBinding();
assertNotNull("the field binding is null", variableBinding); //$NON-NLS-1$
assertTrue("The field binding is not canonical", variableBinding == fragment.resolveBinding()); //$NON-NLS-1$
- typeBinding = variableBinding.getType();
- assertTrue("The type is not an array type", typeBinding.isArray()); //$NON-NLS-1$
+ ITypeBinding typeBinding = variableBinding.getType();
+// assertTrue("The type is not an array type", typeBinding.isArray()); //$NON-NLS-1$
assertTrue("The type binding for the field is not canonical", typeBinding == variableBinding.getType()); //$NON-NLS-1$
SimpleName name = fragment.getName();
assertTrue("is a declaration", name.isDeclaration()); //$NON-NLS-1$
IBinding binding = name.resolveBinding();
assertNotNull("No binding", binding); //$NON-NLS-1$
assertEquals("wrong type", IBinding.VARIABLE, binding.getKind()); //$NON-NLS-1$
- assertTrue("not a field", ((IVariableBinding) binding).isField()); //$NON-NLS-1$
+ assertTrue("is a field", !((IVariableBinding) binding).isField()); //$NON-NLS-1$
}
/**
* Check canonic bindings for fields
*/
public void test0158() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "Test0158.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "Test0158.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
- List types = compilationUnit.types();
- assertTrue("The types list is empty", types.size() != 0); //$NON-NLS-1$
- TypeDeclaration typeDeclaration = (TypeDeclaration) types.get(0);
- ITypeBinding typeBinding = typeDeclaration.resolveBinding();
- assertNotNull("Type binding is null", typeBinding); //$NON-NLS-1$
- assertTrue("The type binding is canonical", typeBinding == typeDeclaration.resolveBinding()); //$NON-NLS-1$
- SimpleName simpleName = typeDeclaration.getName();
- assertTrue("is a declaration", simpleName.isDeclaration()); //$NON-NLS-1$
- IBinding binding = simpleName.resolveBinding();
- assertNotNull("No binding", binding); //$NON-NLS-1$
- assertEquals("wrong type", IBinding.TYPE, binding.getKind()); //$NON-NLS-1$
- assertEquals("wrong name", simpleName.getIdentifier(), binding.getName()); //$NON-NLS-1$
- List bodyDeclarations = typeDeclaration.bodyDeclarations();
- assertTrue("The body declaration list is empty", bodyDeclarations.size() != 0); //$NON-NLS-1$
- BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
- assertTrue("This is not a field", bodyDeclaration instanceof FieldDeclaration); //$NON-NLS-1$
- FieldDeclaration fieldDeclaration = (FieldDeclaration) bodyDeclaration;
+ List statements = compilationUnit.statements();
+ assertTrue("The types list is empty", statements.size() != 0); //$NON-NLS-1$
+// TypeDeclaration typeDeclaration = (TypeDeclaration) types.get(0);
+// ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+// assertNotNull("Type binding is null", typeBinding); //$NON-NLS-1$
+// assertTrue("The type binding is canonical", typeBinding == typeDeclaration.resolveBinding()); //$NON-NLS-1$
+// SimpleName simpleName = typeDeclaration.getName();
+// assertTrue("is a declaration", simpleName.isDeclaration()); //$NON-NLS-1$
+// IBinding binding = simpleName.resolveBinding();
+// assertNotNull("No binding", binding); //$NON-NLS-1$
+// assertEquals("wrong type", IBinding.TYPE, binding.getKind()); //$NON-NLS-1$
+// assertEquals("wrong name", simpleName.getIdentifier(), binding.getName()); //$NON-NLS-1$
+// List bodyDeclarations = typeDeclaration.bodyDeclarations();
+// assertTrue("The body declaration list is empty", bodyDeclarations.size() != 0); //$NON-NLS-1$
+ Statement bodyDeclaration = (Statement) statements.get(0);
+ assertTrue("This is not a field", bodyDeclaration instanceof VariableDeclarationStatement); //$NON-NLS-1$
+ VariableDeclarationStatement fieldDeclaration = (VariableDeclarationStatement) bodyDeclaration;
List variableFragments = fieldDeclaration.fragments();
assertTrue("The fragment list is empty", variableFragments.size() != 0); //$NON-NLS-1$
VariableDeclarationFragment fragment = (VariableDeclarationFragment) variableFragments.get(0);
@@ -3569,41 +3650,41 @@ public class ASTConverterTest extends ConverterTestSetup {
assertNotNull("the field binding is null", variableBinding); //$NON-NLS-1$
assertTrue("The field binding is not canonical", variableBinding == fragment.resolveBinding()); //$NON-NLS-1$
ITypeBinding typeBinding2 = variableBinding.getType();
- assertTrue("The type is not an array type", typeBinding2.isArray()); //$NON-NLS-1$
+// assertTrue("The type is not an array type", typeBinding2.isArray()); //$NON-NLS-1$
assertTrue("The type binding for the field is not canonical", typeBinding2 == variableBinding.getType()); //$NON-NLS-1$
- assertTrue("The type binding for the field is not canonical with the declaration type binding", typeBinding == typeBinding2.getElementType()); //$NON-NLS-1$
+// assertTrue("The type binding for the field is not canonical with the declaration type binding", typeBinding == typeBinding2.getElementType()); //$NON-NLS-1$
}
- /**
- * Define an anonymous type
- */
- public void test0159() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0159", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("Expression should not be null", result); //$NON-NLS-1$
- assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- }
+// /**
+// * Define an anonymous type
+// */
+// public void test0159() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0159", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("Expression should not be null", result); //$NON-NLS-1$
+// assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// }
/**
* Check bindings for multiple field declarations
*/
public void test0160() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0160", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0160", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
- List types = compilationUnit.types();
- assertTrue("The types list is empty", types.size() != 0); //$NON-NLS-1$
- TypeDeclaration typeDeclaration = (TypeDeclaration) types.get(0);
- ITypeBinding typeBinding = typeDeclaration.resolveBinding();
- assertNotNull("Type binding is null", typeBinding); //$NON-NLS-1$
- assertTrue("The type binding is canonical", typeBinding == typeDeclaration.resolveBinding()); //$NON-NLS-1$
- List bodyDeclarations = typeDeclaration.bodyDeclarations();
- assertTrue("The body declaration list is empty", bodyDeclarations.size() != 0); //$NON-NLS-1$
- BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
- assertTrue("This is not a field", bodyDeclaration instanceof FieldDeclaration); //$NON-NLS-1$
- FieldDeclaration fieldDeclaration = (FieldDeclaration) bodyDeclaration;
+ List statements = compilationUnit.statements();
+ assertTrue("The statements list is empty", statements.size() != 0); //$NON-NLS-1$
+// TypeDeclaration typeDeclaration = (TypeDeclaration) types.get(0);
+// ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+// assertNotNull("Type binding is null", typeBinding); //$NON-NLS-1$
+// assertTrue("The type binding is canonical", typeBinding == typeDeclaration.resolveBinding()); //$NON-NLS-1$
+// List bodyDeclarations = typeDeclaration.bodyDeclarations();
+// assertTrue("The body declaration list is empty", bodyDeclarations.size() != 0); //$NON-NLS-1$
+ Statement bodyDeclaration = (Statement) statements.get(0);
+ assertTrue("This is not a field", bodyDeclaration instanceof VariableDeclarationStatement); //$NON-NLS-1$
+ VariableDeclarationStatement fieldDeclaration = (VariableDeclarationStatement) bodyDeclaration;
List variableFragments = fieldDeclaration.fragments();
assertTrue("The fragment list size is not 2", variableFragments.size() == 2); //$NON-NLS-1$
VariableDeclarationFragment fragment = (VariableDeclarationFragment) variableFragments.get(0);
@@ -3613,8 +3694,8 @@ public class ASTConverterTest extends ConverterTestSetup {
ITypeBinding type1 = variableBinding1.getType();
assertNotNull("The type is null", type1); //$NON-NLS-1$
assertTrue("The field type is canonical", type1 == variableBinding1.getType()); //$NON-NLS-1$
- assertTrue("The type is not an array type",type1.isArray()); //$NON-NLS-1$
- assertTrue("The type dimension is 1", type1.getDimensions() == 1); //$NON-NLS-1$
+// assertTrue("The type is not an array type",type1.isArray()); //$NON-NLS-1$
+// assertTrue("The type dimension is 1", type1.getDimensions() == 1); //$NON-NLS-1$
fragment = (VariableDeclarationFragment) variableFragments.get(1);
IVariableBinding variableBinding2 = fragment.resolveBinding();
assertNotNull("the field binding is null", variableBinding2); //$NON-NLS-1$
@@ -3623,234 +3704,234 @@ public class ASTConverterTest extends ConverterTestSetup {
type2 = variableBinding2.getType();
assertNotNull("The type is null", type2); //$NON-NLS-1$
assertTrue("The field type is canonical", type2 == variableBinding2.getType()); //$NON-NLS-1$
- assertTrue("The type is not an array type",type2.isArray()); //$NON-NLS-1$
- assertTrue("The type dimension is 2", type2.getDimensions() == 2); //$NON-NLS-1$
- assertTrue("Element type is canonical", type1.getElementType() == type2.getElementType()); //$NON-NLS-1$
+// assertTrue("The type is not an array type",type2.isArray()); //$NON-NLS-1$
+// assertTrue("The type dimension is 2", type2.getDimensions() == 2); //$NON-NLS-1$
+// assertTrue("Element type is canonical", type1.getElementType() == type2.getElementType()); //$NON-NLS-1$
assertTrue("type1.id < type2.id", variableBinding1.getVariableId() < variableBinding2.getVariableId()); //$NON-NLS-1$
}
-
- /**
- * Check ITypeBinding APIs:
- * - getModifiers()
- * - getElementType() when it is not an array type
- * - getDimensions() when it is not an array type
- * - getDeclaringClass()
- * - getDeclaringName()
- * - getName()
- * - isNested()
- * - isAnonymous()
- * - isLocal()
- * - isMember()
- * - isArray()
- * - getDeclaredMethods() => returns binding for default constructor
- * - isPrimitive()
- * - isTopLevel()
- * - getSuperclass()
- */
- public void test0161() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0161", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("Expression should not be null", result); //$NON-NLS-1$
- assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- List types = compilationUnit.types();
- assertTrue("The types list is empty", types.size() != 0); //$NON-NLS-1$
- TypeDeclaration typeDeclaration = (TypeDeclaration) types.get(0);
- ITypeBinding typeBinding = typeDeclaration.resolveBinding();
- assertNotNull("The type binding should not be null", typeBinding); //$NON-NLS-1$
- assertEquals("The modifier is PUBLIC", Modifier.PUBLIC, typeBinding.getModifiers()); //$NON-NLS-1$
- assertNull("There is no element type", typeBinding.getElementType()); //$NON-NLS-1$
- assertEquals("There is no dimension", 0, typeBinding.getDimensions()); //$NON-NLS-1$
- assertNull("This is not a member type", typeBinding.getDeclaringClass()); //$NON-NLS-1$
- IMethodBinding[] methods = typeBinding.getDeclaredMethods();
- assertEquals("Contains the default constructor", 1, methods.length); //$NON-NLS-1$
- assertEquals("The name is not Test", "Test", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("An anonymous class", !typeBinding.isAnonymous()); //$NON-NLS-1$
- assertTrue("A local class", !typeBinding.isLocal()); //$NON-NLS-1$
- assertTrue("A nested class", !typeBinding.isNested()); //$NON-NLS-1$
- assertTrue("A member class", !typeBinding.isMember()); //$NON-NLS-1$
- assertTrue("An array", !typeBinding.isArray()); //$NON-NLS-1$
- assertTrue("Not a class", typeBinding.isClass()); //$NON-NLS-1$
- assertTrue("An interface", !typeBinding.isInterface()); //$NON-NLS-1$
- assertTrue("Not from source", typeBinding.isFromSource()); //$NON-NLS-1$
- assertTrue("Is nested", typeBinding.isTopLevel()); //$NON-NLS-1$
- assertTrue("A primitive type", !typeBinding.isPrimitive()); //$NON-NLS-1$
- ITypeBinding superclass = typeBinding.getSuperclass();
- assertNotNull("No superclass", superclass); //$NON-NLS-1$
- assertTrue("From source", !superclass.isFromSource()); //$NON-NLS-1$
- ITypeBinding supersuperclass = superclass.getSuperclass();
- assertNull("No superclass for java.lang.Object", supersuperclass); //$NON-NLS-1$
- ITypeBinding[] interfaces = typeBinding.getInterfaces();
- assertNotNull("No interfaces", interfaces); //$NON-NLS-1$
- assertEquals("More then one super interface", 1, interfaces.length); //$NON-NLS-1$
- assertTrue("is not an interface", interfaces[0].isInterface()); //$NON-NLS-1$
- assertTrue("From source", !interfaces[0].isFromSource()); //$NON-NLS-1$
- assertEquals("Has fields", 0, typeBinding.getDeclaredFields().length); //$NON-NLS-1$
- }
-
- /**
- * Check ITypeBinding APIs:
- * - getModifiers()
- * - getElementType() when it is not an array type
- * - getDimensions() when it is not an array type
- * - getDeclaringClass()
- * - getDeclaringName()
- * - getName()
- * - isNested()
- * - isAnonymous()
- * - isLocal()
- * - isMember()
- * - isArray()
- * - getDeclaredMethods() => returns binding for default constructor
- * - isPrimitive()
- * - isTopLevel()
- * - getSuperclass()
- */
- public void test0162() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0162", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("Expression should not be null", result); //$NON-NLS-1$
- assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- List types = compilationUnit.types();
- assertTrue("The types list is empty", types.size() != 0); //$NON-NLS-1$
- TypeDeclaration typeDeclaration = (TypeDeclaration) types.get(0);
- ITypeBinding typeBinding = typeDeclaration.resolveBinding();
- assertNotNull("The type binding should not be null", typeBinding); //$NON-NLS-1$
- assertEquals("The modifier is PUBLIC", Modifier.PUBLIC, typeBinding.getModifiers()); //$NON-NLS-1$
- assertNull("There is no element type", typeBinding.getElementType()); //$NON-NLS-1$
- assertEquals("There is no dimension", 0, typeBinding.getDimensions()); //$NON-NLS-1$
- assertNull("This is not a member type", typeBinding.getDeclaringClass()); //$NON-NLS-1$
- IMethodBinding[] methods = typeBinding.getDeclaredMethods();
- assertEquals("Contains no methos", 0, methods.length); //$NON-NLS-1$
- assertEquals("The name is not Test", "Test", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("An anonymous class", !typeBinding.isAnonymous()); //$NON-NLS-1$
- assertTrue("A local class", !typeBinding.isLocal()); //$NON-NLS-1$
- assertTrue("A nested class", !typeBinding.isNested()); //$NON-NLS-1$
- assertTrue("A member class", !typeBinding.isMember()); //$NON-NLS-1$
- assertTrue("An array", !typeBinding.isArray()); //$NON-NLS-1$
- assertTrue("A class", !typeBinding.isClass()); //$NON-NLS-1$
- assertTrue("Not an interface", typeBinding.isInterface()); //$NON-NLS-1$
- assertTrue("Not from source", typeBinding.isFromSource()); //$NON-NLS-1$
- assertTrue("Is nested", typeBinding.isTopLevel()); //$NON-NLS-1$
- assertTrue("A primitive type", !typeBinding.isPrimitive()); //$NON-NLS-1$
- ITypeBinding superclass = typeBinding.getSuperclass();
- assertNull("No superclass", superclass); //$NON-NLS-1$
- assertEquals("Has fields", 0, typeBinding.getDeclaredFields().length); //$NON-NLS-1$
- }
-
- /**
- * Test binding for anonymous declaration: new java.lang.Object() {}
- */
- public void test0163() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0163", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
- assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
- assertTrue("Not an anonymous type declaration", expression instanceof ClassInstanceCreation); //$NON-NLS-1$
- ClassInstanceCreation anonymousClass = (ClassInstanceCreation) expression;
- ITypeBinding typeBinding = anonymousClass.resolveTypeBinding();
- assertNotNull("No binding", typeBinding); //$NON-NLS-1$
- assertTrue("Not an anonymous class", typeBinding.isAnonymous()); //$NON-NLS-1$
- assertEquals("The modifier is not default", Modifier.NONE, typeBinding.getModifiers()); //$NON-NLS-1$
- assertNull("There is no element type", typeBinding.getElementType()); //$NON-NLS-1$
- assertEquals("There is no dimension", 0, typeBinding.getDimensions()); //$NON-NLS-1$
- assertNotNull("This is a member type", typeBinding.getDeclaringClass()); //$NON-NLS-1$
- assertEquals("The name is not empty", "", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- IMethodBinding[] methods = typeBinding.getDeclaredMethods();
- assertEquals("Contains the default constructor", 1, methods.length); //$NON-NLS-1$
- assertTrue("Not a local class", typeBinding.isLocal()); //$NON-NLS-1$
- assertTrue("Not a nested class", typeBinding.isNested()); //$NON-NLS-1$
- assertTrue("A member class", !typeBinding.isMember()); //$NON-NLS-1$
- assertTrue("An array", !typeBinding.isArray()); //$NON-NLS-1$
- assertTrue("Not a class", typeBinding.isClass()); //$NON-NLS-1$
- assertTrue("An interface", !typeBinding.isInterface()); //$NON-NLS-1$
- assertTrue("Not from source", typeBinding.isFromSource()); //$NON-NLS-1$
- assertTrue("Is a top level", !typeBinding.isTopLevel()); //$NON-NLS-1$
- assertTrue("A primitive type", !typeBinding.isPrimitive()); //$NON-NLS-1$
- assertEquals("wrong qualified name", "", typeBinding.getQualifiedName()); //$NON-NLS-1$ //$NON-NLS-2$
- ITypeBinding superclass = typeBinding.getSuperclass();
- assertNotNull("No superclass", superclass); //$NON-NLS-1$
- assertEquals("Has fields", 0, typeBinding.getDeclaredFields().length); //$NON-NLS-1$
- }
-
- /**
- * Test binding for member type declaration
- */
- public void test0164() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0164", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- assertTrue("Not an type declaration", node instanceof TypeDeclaration); //$NON-NLS-1$
- TypeDeclaration typeDeclaration = (TypeDeclaration) node;
- ITypeBinding typeBinding = typeDeclaration.resolveBinding();
- assertNotNull("No binding", typeBinding); //$NON-NLS-1$
- assertTrue("An anonymous class", !typeBinding.isAnonymous()); //$NON-NLS-1$
- assertEquals("The modifier is not default", Modifier.PRIVATE, typeBinding.getModifiers()); //$NON-NLS-1$
- assertNull("There is no element type", typeBinding.getElementType()); //$NON-NLS-1$
- assertEquals("There is no dimension", 0, typeBinding.getDimensions()); //$NON-NLS-1$
- assertNotNull("This is not a member type", typeBinding.getDeclaringClass()); //$NON-NLS-1$
- assertEquals("The name is not 'B'", "B", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- IMethodBinding[] methods = typeBinding.getDeclaredMethods();
- assertEquals("Contains the default constructor", 1, methods.length); //$NON-NLS-1$
- assertTrue("A local class", !typeBinding.isLocal()); //$NON-NLS-1$
- assertTrue("Not a nested class", typeBinding.isNested()); //$NON-NLS-1$
- assertTrue("Not a member class", typeBinding.isMember()); //$NON-NLS-1$
- assertTrue("An array", !typeBinding.isArray()); //$NON-NLS-1$
- assertTrue("Not a class", typeBinding.isClass()); //$NON-NLS-1$
- assertTrue("An interface", !typeBinding.isInterface()); //$NON-NLS-1$
- assertTrue("Not from source", typeBinding.isFromSource()); //$NON-NLS-1$
- assertTrue("Is a top level", !typeBinding.isTopLevel()); //$NON-NLS-1$
- assertTrue("A primitive type", !typeBinding.isPrimitive()); //$NON-NLS-1$
- ITypeBinding superclass = typeBinding.getSuperclass();
- assertNotNull("No superclass", superclass); //$NON-NLS-1$
- assertEquals("Has fields", 0, typeBinding.getDeclaredFields().length); //$NON-NLS-1$
- }
-
- /**
- * Test binding for local type declaration
- * @deprecated using deprecated code
- */
- public void test0165() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0165", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- assertTrue("Not an type declaration", node instanceof TypeDeclarationStatement); //$NON-NLS-1$
- TypeDeclarationStatement statement = (TypeDeclarationStatement) node;
- TypeDeclaration typeDeclaration = statement.getTypeDeclaration();
- ITypeBinding typeBinding = typeDeclaration.resolveBinding();
- assertNotNull("No binding", typeBinding); //$NON-NLS-1$
- assertTrue("An anonymous class", !typeBinding.isAnonymous()); //$NON-NLS-1$
- assertEquals("The modifier is not default", Modifier.NONE, typeBinding.getModifiers()); //$NON-NLS-1$
- assertNull("There is no element type", typeBinding.getElementType()); //$NON-NLS-1$
- assertEquals("There is no dimension", 0, typeBinding.getDimensions()); //$NON-NLS-1$
- assertNotNull("This is not a member type", typeBinding.getDeclaringClass()); //$NON-NLS-1$
- assertEquals("The name is not 'C'", "C", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- IMethodBinding[] methods = typeBinding.getDeclaredMethods();
- assertEquals("Contains the default constructor", 1, methods.length); //$NON-NLS-1$
- assertTrue("Not a local class", typeBinding.isLocal()); //$NON-NLS-1$
- assertTrue("Not a nested class", typeBinding.isNested()); //$NON-NLS-1$
- assertTrue("A member class", !typeBinding.isMember()); //$NON-NLS-1$
- assertTrue("An array", !typeBinding.isArray()); //$NON-NLS-1$
- assertTrue("Not a class", typeBinding.isClass()); //$NON-NLS-1$
- assertTrue("An interface", !typeBinding.isInterface()); //$NON-NLS-1$
- assertTrue("Not from source", typeBinding.isFromSource()); //$NON-NLS-1$
- assertTrue("Is a top level", !typeBinding.isTopLevel()); //$NON-NLS-1$
- assertTrue("A primitive type", !typeBinding.isPrimitive()); //$NON-NLS-1$
- assertEquals("wrong qualified name", "", typeBinding.getQualifiedName()); //$NON-NLS-1$ //$NON-NLS-2$
- ITypeBinding superclass = typeBinding.getSuperclass();
- assertNotNull("No superclass", superclass); //$NON-NLS-1$
- assertEquals("Has fields", 0, typeBinding.getDeclaredFields().length); //$NON-NLS-1$
- }
+//
+// /**
+// * Check ITypeBinding APIs:
+// * - getModifiers()
+// * - getElementType() when it is not an array type
+// * - getDimensions() when it is not an array type
+// * - getDeclaringClass()
+// * - getDeclaringName()
+// * - getName()
+// * - isNested()
+// * - isAnonymous()
+// * - isLocal()
+// * - isMember()
+// * - isArray()
+// * - getDeclaredMethods() => returns binding for default constructor
+// * - isPrimitive()
+// * - isTopLevel()
+// * - getSuperclass()
+// */
+// public void test0161() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0161", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("Expression should not be null", result); //$NON-NLS-1$
+// assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// List types = compilationUnit.types();
+// assertTrue("The types list is empty", types.size() != 0); //$NON-NLS-1$
+// TypeDeclaration typeDeclaration = (TypeDeclaration) types.get(0);
+// ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+// assertNotNull("The type binding should not be null", typeBinding); //$NON-NLS-1$
+// assertEquals("The modifier is PUBLIC", Modifier.PUBLIC, typeBinding.getModifiers()); //$NON-NLS-1$
+// assertNull("There is no element type", typeBinding.getElementType()); //$NON-NLS-1$
+// assertEquals("There is no dimension", 0, typeBinding.getDimensions()); //$NON-NLS-1$
+// assertNull("This is not a member type", typeBinding.getDeclaringClass()); //$NON-NLS-1$
+// IMethodBinding[] methods = typeBinding.getDeclaredMethods();
+// assertEquals("Contains the default constructor", 1, methods.length); //$NON-NLS-1$
+// assertEquals("The name is not Test", "Test", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// assertTrue("An anonymous class", !typeBinding.isAnonymous()); //$NON-NLS-1$
+// assertTrue("A local class", !typeBinding.isLocal()); //$NON-NLS-1$
+// assertTrue("A nested class", !typeBinding.isNested()); //$NON-NLS-1$
+// assertTrue("A member class", !typeBinding.isMember()); //$NON-NLS-1$
+// assertTrue("An array", !typeBinding.isArray()); //$NON-NLS-1$
+// assertTrue("Not a class", typeBinding.isClass()); //$NON-NLS-1$
+// assertTrue("An interface", !typeBinding.isInterface()); //$NON-NLS-1$
+// assertTrue("Not from source", typeBinding.isFromSource()); //$NON-NLS-1$
+// assertTrue("Is nested", typeBinding.isTopLevel()); //$NON-NLS-1$
+// assertTrue("A primitive type", !typeBinding.isPrimitive()); //$NON-NLS-1$
+// ITypeBinding superclass = typeBinding.getSuperclass();
+// assertNotNull("No superclass", superclass); //$NON-NLS-1$
+// assertTrue("From source", !superclass.isFromSource()); //$NON-NLS-1$
+// ITypeBinding supersuperclass = superclass.getSuperclass();
+// assertNull("No superclass for java.lang.Object", supersuperclass); //$NON-NLS-1$
+// ITypeBinding[] interfaces = typeBinding.getInterfaces();
+// assertNotNull("No interfaces", interfaces); //$NON-NLS-1$
+// assertEquals("More then one super interface", 1, interfaces.length); //$NON-NLS-1$
+// assertTrue("is not an interface", interfaces[0].isInterface()); //$NON-NLS-1$
+// assertTrue("From source", !interfaces[0].isFromSource()); //$NON-NLS-1$
+// assertEquals("Has fields", 0, typeBinding.getDeclaredFields().length); //$NON-NLS-1$
+// }
+//
+// /**
+// * Check ITypeBinding APIs:
+// * - getModifiers()
+// * - getElementType() when it is not an array type
+// * - getDimensions() when it is not an array type
+// * - getDeclaringClass()
+// * - getDeclaringName()
+// * - getName()
+// * - isNested()
+// * - isAnonymous()
+// * - isLocal()
+// * - isMember()
+// * - isArray()
+// * - getDeclaredMethods() => returns binding for default constructor
+// * - isPrimitive()
+// * - isTopLevel()
+// * - getSuperclass()
+// */
+// public void test0162() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0162", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("Expression should not be null", result); //$NON-NLS-1$
+// assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// List types = compilationUnit.types();
+// assertTrue("The types list is empty", types.size() != 0); //$NON-NLS-1$
+// TypeDeclaration typeDeclaration = (TypeDeclaration) types.get(0);
+// ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+// assertNotNull("The type binding should not be null", typeBinding); //$NON-NLS-1$
+// assertEquals("The modifier is PUBLIC", Modifier.PUBLIC, typeBinding.getModifiers()); //$NON-NLS-1$
+// assertNull("There is no element type", typeBinding.getElementType()); //$NON-NLS-1$
+// assertEquals("There is no dimension", 0, typeBinding.getDimensions()); //$NON-NLS-1$
+// assertNull("This is not a member type", typeBinding.getDeclaringClass()); //$NON-NLS-1$
+// IMethodBinding[] methods = typeBinding.getDeclaredMethods();
+// assertEquals("Contains no methos", 0, methods.length); //$NON-NLS-1$
+// assertEquals("The name is not Test", "Test", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// assertTrue("An anonymous class", !typeBinding.isAnonymous()); //$NON-NLS-1$
+// assertTrue("A local class", !typeBinding.isLocal()); //$NON-NLS-1$
+// assertTrue("A nested class", !typeBinding.isNested()); //$NON-NLS-1$
+// assertTrue("A member class", !typeBinding.isMember()); //$NON-NLS-1$
+// assertTrue("An array", !typeBinding.isArray()); //$NON-NLS-1$
+// assertTrue("A class", !typeBinding.isClass()); //$NON-NLS-1$
+// assertTrue("Not an interface", typeBinding.isInterface()); //$NON-NLS-1$
+// assertTrue("Not from source", typeBinding.isFromSource()); //$NON-NLS-1$
+// assertTrue("Is nested", typeBinding.isTopLevel()); //$NON-NLS-1$
+// assertTrue("A primitive type", !typeBinding.isPrimitive()); //$NON-NLS-1$
+// ITypeBinding superclass = typeBinding.getSuperclass();
+// assertNull("No superclass", superclass); //$NON-NLS-1$
+// assertEquals("Has fields", 0, typeBinding.getDeclaredFields().length); //$NON-NLS-1$
+// }
+//
+// /**
+// * Test binding for anonymous declaration: new java.lang.Object() {}
+// */
+// public void test0163() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0163", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
+// assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+// assertTrue("Not an anonymous type declaration", expression instanceof ClassInstanceCreation); //$NON-NLS-1$
+// ClassInstanceCreation anonymousClass = (ClassInstanceCreation) expression;
+// ITypeBinding typeBinding = anonymousClass.resolveTypeBinding();
+// assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+// assertTrue("Not an anonymous class", typeBinding.isAnonymous()); //$NON-NLS-1$
+// assertEquals("The modifier is not default", Modifier.NONE, typeBinding.getModifiers()); //$NON-NLS-1$
+// assertNull("There is no element type", typeBinding.getElementType()); //$NON-NLS-1$
+// assertEquals("There is no dimension", 0, typeBinding.getDimensions()); //$NON-NLS-1$
+// assertNotNull("This is a member type", typeBinding.getDeclaringClass()); //$NON-NLS-1$
+// assertEquals("The name is not empty", "", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// IMethodBinding[] methods = typeBinding.getDeclaredMethods();
+// assertEquals("Contains the default constructor", 1, methods.length); //$NON-NLS-1$
+// assertTrue("Not a local class", typeBinding.isLocal()); //$NON-NLS-1$
+// assertTrue("Not a nested class", typeBinding.isNested()); //$NON-NLS-1$
+// assertTrue("A member class", !typeBinding.isMember()); //$NON-NLS-1$
+// assertTrue("An array", !typeBinding.isArray()); //$NON-NLS-1$
+// assertTrue("Not a class", typeBinding.isClass()); //$NON-NLS-1$
+// assertTrue("An interface", !typeBinding.isInterface()); //$NON-NLS-1$
+// assertTrue("Not from source", typeBinding.isFromSource()); //$NON-NLS-1$
+// assertTrue("Is a top level", !typeBinding.isTopLevel()); //$NON-NLS-1$
+// assertTrue("A primitive type", !typeBinding.isPrimitive()); //$NON-NLS-1$
+// assertEquals("wrong qualified name", "", typeBinding.getQualifiedName()); //$NON-NLS-1$ //$NON-NLS-2$
+// ITypeBinding superclass = typeBinding.getSuperclass();
+// assertNotNull("No superclass", superclass); //$NON-NLS-1$
+// assertEquals("Has fields", 0, typeBinding.getDeclaredFields().length); //$NON-NLS-1$
+// }
+//
+// /**
+// * Test binding for member type declaration
+// */
+// public void test0164() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0164", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// assertTrue("Not an type declaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+// TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+// ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+// assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+// assertTrue("An anonymous class", !typeBinding.isAnonymous()); //$NON-NLS-1$
+// assertEquals("The modifier is not default", Modifier.PRIVATE, typeBinding.getModifiers()); //$NON-NLS-1$
+// assertNull("There is no element type", typeBinding.getElementType()); //$NON-NLS-1$
+// assertEquals("There is no dimension", 0, typeBinding.getDimensions()); //$NON-NLS-1$
+// assertNotNull("This is not a member type", typeBinding.getDeclaringClass()); //$NON-NLS-1$
+// assertEquals("The name is not 'B'", "B", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// IMethodBinding[] methods = typeBinding.getDeclaredMethods();
+// assertEquals("Contains the default constructor", 1, methods.length); //$NON-NLS-1$
+// assertTrue("A local class", !typeBinding.isLocal()); //$NON-NLS-1$
+// assertTrue("Not a nested class", typeBinding.isNested()); //$NON-NLS-1$
+// assertTrue("Not a member class", typeBinding.isMember()); //$NON-NLS-1$
+// assertTrue("An array", !typeBinding.isArray()); //$NON-NLS-1$
+// assertTrue("Not a class", typeBinding.isClass()); //$NON-NLS-1$
+// assertTrue("An interface", !typeBinding.isInterface()); //$NON-NLS-1$
+// assertTrue("Not from source", typeBinding.isFromSource()); //$NON-NLS-1$
+// assertTrue("Is a top level", !typeBinding.isTopLevel()); //$NON-NLS-1$
+// assertTrue("A primitive type", !typeBinding.isPrimitive()); //$NON-NLS-1$
+// ITypeBinding superclass = typeBinding.getSuperclass();
+// assertNotNull("No superclass", superclass); //$NON-NLS-1$
+// assertEquals("Has fields", 0, typeBinding.getDeclaredFields().length); //$NON-NLS-1$
+// }
+//
+// /**
+// * Test binding for local type declaration
+// * @deprecated using deprecated code
+// */
+// public void test0165() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0165", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// assertTrue("Not an type declaration", node instanceof TypeDeclarationStatement); //$NON-NLS-1$
+// TypeDeclarationStatement statement = (TypeDeclarationStatement) node;
+// TypeDeclaration typeDeclaration = statement.getTypeDeclaration();
+// ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+// assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+// assertTrue("An anonymous class", !typeBinding.isAnonymous()); //$NON-NLS-1$
+// assertEquals("The modifier is not default", Modifier.NONE, typeBinding.getModifiers()); //$NON-NLS-1$
+// assertNull("There is no element type", typeBinding.getElementType()); //$NON-NLS-1$
+// assertEquals("There is no dimension", 0, typeBinding.getDimensions()); //$NON-NLS-1$
+// assertNotNull("This is not a member type", typeBinding.getDeclaringClass()); //$NON-NLS-1$
+// assertEquals("The name is not 'C'", "C", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// IMethodBinding[] methods = typeBinding.getDeclaredMethods();
+// assertEquals("Contains the default constructor", 1, methods.length); //$NON-NLS-1$
+// assertTrue("Not a local class", typeBinding.isLocal()); //$NON-NLS-1$
+// assertTrue("Not a nested class", typeBinding.isNested()); //$NON-NLS-1$
+// assertTrue("A member class", !typeBinding.isMember()); //$NON-NLS-1$
+// assertTrue("An array", !typeBinding.isArray()); //$NON-NLS-1$
+// assertTrue("Not a class", typeBinding.isClass()); //$NON-NLS-1$
+// assertTrue("An interface", !typeBinding.isInterface()); //$NON-NLS-1$
+// assertTrue("Not from source", typeBinding.isFromSource()); //$NON-NLS-1$
+// assertTrue("Is a top level", !typeBinding.isTopLevel()); //$NON-NLS-1$
+// assertTrue("A primitive type", !typeBinding.isPrimitive()); //$NON-NLS-1$
+// assertEquals("wrong qualified name", "", typeBinding.getQualifiedName()); //$NON-NLS-1$ //$NON-NLS-2$
+// ITypeBinding superclass = typeBinding.getSuperclass();
+// assertNotNull("No superclass", superclass); //$NON-NLS-1$
+// assertEquals("Has fields", 0, typeBinding.getDeclaredFields().length); //$NON-NLS-1$
+// }
/**
* Multiple local declaration => VariabledeclarationStatement
*/
public void test0166() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0166", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0166", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
@@ -3863,39 +3944,39 @@ public class ASTConverterTest extends ConverterTestSetup {
assertEquals("wrong name for binding1", "x", binding1.getName()); //$NON-NLS-1$ //$NON-NLS-2$
assertEquals("wrong modifier for binding1", 0, binding1.getModifiers()); //$NON-NLS-1$
assertTrue("a field", !binding1.isField()); //$NON-NLS-1$
- assertNull("declaring class is not null", binding1.getDeclaringClass()); //$NON-NLS-1$
+// assertNull("declaring class is not null", binding1.getDeclaringClass()); //$NON-NLS-1$
ITypeBinding typeBinding1 = binding1.getType();
assertNotNull("typeBinding1 is null", typeBinding1); //$NON-NLS-1$
- assertTrue("typeBinding1 is not a primitive type", typeBinding1.isPrimitive()); //$NON-NLS-1$
- assertTrue("typeBinding1 is not canonical", typeBinding1 == binding1.getType()); //$NON-NLS-1$
+// assertTrue("typeBinding1 is not a primitive type", typeBinding1.isPrimitive()); //$NON-NLS-1$
+// assertTrue("typeBinding1 is not canonical", typeBinding1 == binding1.getType()); //$NON-NLS-1$
VariableDeclarationFragment fragment2 = (VariableDeclarationFragment) fragments.get(1);
IVariableBinding binding2 = fragment2.resolveBinding();
assertNotNull("Binding is null", binding2); //$NON-NLS-1$
assertEquals("wrong name for binding2", "z", binding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
assertEquals("wrong modifier for binding2", 0, binding2.getModifiers()); //$NON-NLS-1$
assertTrue("a field", !binding2.isField()); //$NON-NLS-1$
- assertNull("declaring class is not null", binding2.getDeclaringClass()); //$NON-NLS-1$
+// assertNull("declaring class is not null", binding2.getDeclaringClass()); //$NON-NLS-1$
ITypeBinding typeBinding2 = binding2.getType();
assertNotNull("typeBinding2 is null", typeBinding2); //$NON-NLS-1$
- assertTrue("typeBinding2 is not an array type", typeBinding2.isArray()); //$NON-NLS-1$
- assertTrue("typeBinding2 is not canonical", typeBinding2 == binding2.getType()); //$NON-NLS-1$
- assertTrue("primitive type is not canonical", typeBinding1 == typeBinding2.getElementType()); //$NON-NLS-1$
- assertEquals("dimension is 1", 1, typeBinding2.getDimensions()); //$NON-NLS-1$
- assertEquals("it is not int[]", "int[]", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// assertTrue("typeBinding2 is not an array type", typeBinding2.isArray()); //$NON-NLS-1$
+// assertTrue("typeBinding2 is not canonical", typeBinding2 == binding2.getType()); //$NON-NLS-1$
+// assertTrue("primitive type is not canonical", typeBinding1 == typeBinding2.getElementType()); //$NON-NLS-1$
+// assertEquals("dimension is 1", 1, typeBinding2.getDimensions()); //$NON-NLS-1$
+// assertEquals("it is not int[]", "int[]", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
VariableDeclarationFragment fragment3 = (VariableDeclarationFragment) fragments.get(2);
IVariableBinding binding3 = fragment3.resolveBinding();
assertNotNull("Binding is null", binding3); //$NON-NLS-1$
assertEquals("wrong name for binding3", "i", binding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
assertEquals("wrong modifier for binding3", 0, binding3.getModifiers()); //$NON-NLS-1$
assertTrue("a field", !binding3.isField()); //$NON-NLS-1$
- assertNull("declaring class is not null", binding3.getDeclaringClass()); //$NON-NLS-1$
+// assertNull("declaring class is not null", binding3.getDeclaringClass()); //$NON-NLS-1$
ITypeBinding typeBinding3 = binding3.getType();
assertNotNull("typeBinding3 is null", typeBinding3); //$NON-NLS-1$
- assertTrue("typeBinding3 is not an primitive type", typeBinding3.isPrimitive()); //$NON-NLS-1$
- assertTrue("typeBinding3 is not canonical", typeBinding3 == binding3.getType()); //$NON-NLS-1$
- assertTrue("primitive type is not canonical", typeBinding1 == typeBinding3); //$NON-NLS-1$
+// assertTrue("typeBinding3 is not an primitive type", typeBinding3.isPrimitive()); //$NON-NLS-1$
+// assertTrue("typeBinding3 is not canonical", typeBinding3 == binding3.getType()); //$NON-NLS-1$
+// assertTrue("primitive type is not canonical", typeBinding1 == typeBinding3); //$NON-NLS-1$
assertEquals("dimension is 0", 0, typeBinding3.getDimensions()); //$NON-NLS-1$
- assertEquals("it is not the primitive type int", "int", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("it is not the primitive type any", "any", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
VariableDeclarationFragment fragment4 = (VariableDeclarationFragment) fragments.get(3);
IVariableBinding binding4 = fragment4.resolveBinding();
assertNotNull("Binding is null", binding4); //$NON-NLS-1$
@@ -3905,167 +3986,167 @@ public class ASTConverterTest extends ConverterTestSetup {
assertNull("declaring class is not null", binding4.getDeclaringClass()); //$NON-NLS-1$
ITypeBinding typeBinding4 = binding4.getType();
assertNotNull("typeBinding4 is null", typeBinding4); //$NON-NLS-1$
- assertTrue("typeBinding4 is not an array type", typeBinding4.isArray()); //$NON-NLS-1$
- assertTrue("typeBinding4 is not canonical", typeBinding4 == binding4.getType()); //$NON-NLS-1$
- assertTrue("primitive type is not canonical", typeBinding1 == typeBinding4.getElementType()); //$NON-NLS-1$
- assertEquals("dimension is 2", 2, typeBinding4.getDimensions()); //$NON-NLS-1$
- assertEquals("it is not int[][]", "int[][]", typeBinding4.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// assertTrue("typeBinding4 is not an array type", typeBinding4.isArray()); //$NON-NLS-1$
+// assertTrue("typeBinding4 is not canonical", typeBinding4 == binding4.getType()); //$NON-NLS-1$
+// assertTrue("primitive type is not canonical", typeBinding1 == typeBinding4.getElementType()); //$NON-NLS-1$
+// assertEquals("dimension is 2", 2, typeBinding4.getDimensions()); //$NON-NLS-1$
+// assertEquals("it is not int[][]", "int[][]", typeBinding4.getName()); //$NON-NLS-1$ //$NON-NLS-2$
assertTrue("ids in the wrong order", binding1.getVariableId() < binding2.getVariableId()); //$NON-NLS-1$
assertTrue("ids in the wrong order", binding2.getVariableId() < binding3.getVariableId()); //$NON-NLS-1$
assertTrue("ids in the wrong order", binding3.getVariableId() < binding4.getVariableId()); //$NON-NLS-1$
}
+//
+// /**
+// * Check source position for new Test[1+2].length.
+// */
+// public void test0167() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0167", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// assertTrue("Instance of VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+// VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+// List fragments = variableDeclarationStatement.fragments();
+// assertTrue("fragment list size is not 1", fragments.size() == 1); //$NON-NLS-1$
+// VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+// Expression initialization = fragment.getInitializer();
+// assertNotNull("No initialization", initialization); //$NON-NLS-1$
+// assertTrue("Not a FieldAccess", initialization instanceof FieldAccess); //$NON-NLS-1$
+// checkSourceRange(initialization, "new Test[1+2].length", source); //$NON-NLS-1$
+// }
+//
+// /**
+// * Check package binding: test0168.test
+// */
+// public void test0168() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0168.test1", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("Expression should not be null", result); //$NON-NLS-1$
+// assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// List types = compilationUnit.types();
+// assertTrue("The types list is empty", types.size() != 0); //$NON-NLS-1$
+// TypeDeclaration typeDeclaration = (TypeDeclaration) types.get(0);
+// ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+// assertNotNull("Binding not null", typeBinding); //$NON-NLS-1$
+// IPackageBinding packageBinding = typeBinding.getPackage();
+// assertNotNull("No package binding", packageBinding); //$NON-NLS-1$
+// assertEquals("wrong name", "test0168.test1", packageBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// String[] components = packageBinding.getNameComponents();
+// assertNotNull("no components", components); //$NON-NLS-1$
+// assertTrue("components size != 2", components.length == 2); //$NON-NLS-1$
+// assertEquals("wrong component name", "test0168", components[0]); //$NON-NLS-1$ //$NON-NLS-2$
+// assertEquals("wrong component name", "test1", components[1]); //$NON-NLS-1$ //$NON-NLS-2$
+// assertEquals("wrong type", IBinding.PACKAGE, packageBinding.getKind()); //$NON-NLS-1$
+// assertTrue("Unnamed package", !packageBinding.isUnnamed()); //$NON-NLS-1$
+// assertTrue("Package binding is not canonical", packageBinding == typeBinding.getPackage()); //$NON-NLS-1$
+// }
- /**
- * Check source position for new Test[1+2].length.
- */
- public void test0167() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0167", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- assertTrue("Instance of VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
- VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
- List fragments = variableDeclarationStatement.fragments();
- assertTrue("fragment list size is not 1", fragments.size() == 1); //$NON-NLS-1$
- VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
- Expression initialization = fragment.getInitializer();
- assertNotNull("No initialization", initialization); //$NON-NLS-1$
- assertTrue("Not a FieldAccess", initialization instanceof FieldAccess); //$NON-NLS-1$
- checkSourceRange(initialization, "new Test[1+2].length", source); //$NON-NLS-1$
- }
-
- /**
- * Check package binding: test0168.test
- */
- public void test0168() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0168.test1", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("Expression should not be null", result); //$NON-NLS-1$
- assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- List types = compilationUnit.types();
- assertTrue("The types list is empty", types.size() != 0); //$NON-NLS-1$
- TypeDeclaration typeDeclaration = (TypeDeclaration) types.get(0);
- ITypeBinding typeBinding = typeDeclaration.resolveBinding();
- assertNotNull("Binding not null", typeBinding); //$NON-NLS-1$
- IPackageBinding packageBinding = typeBinding.getPackage();
- assertNotNull("No package binding", packageBinding); //$NON-NLS-1$
- assertEquals("wrong name", "test0168.test1", packageBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- String[] components = packageBinding.getNameComponents();
- assertNotNull("no components", components); //$NON-NLS-1$
- assertTrue("components size != 2", components.length == 2); //$NON-NLS-1$
- assertEquals("wrong component name", "test0168", components[0]); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("wrong component name", "test1", components[1]); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("wrong type", IBinding.PACKAGE, packageBinding.getKind()); //$NON-NLS-1$
- assertTrue("Unnamed package", !packageBinding.isUnnamed()); //$NON-NLS-1$
- assertTrue("Package binding is not canonical", packageBinding == typeBinding.getPackage()); //$NON-NLS-1$
- }
-
- /**
- * Check package binding: test0169
- */
- public void test0169() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0169", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("Expression should not be null", result); //$NON-NLS-1$
- assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- List types = compilationUnit.types();
- assertTrue("The types list is empty", types.size() != 0); //$NON-NLS-1$
- TypeDeclaration typeDeclaration = (TypeDeclaration) types.get(0);
- ITypeBinding typeBinding = typeDeclaration.resolveBinding();
- assertNotNull("Binding not null", typeBinding); //$NON-NLS-1$
- IPackageBinding packageBinding = typeBinding.getPackage();
- assertNotNull("No package binding", packageBinding); //$NON-NLS-1$
- assertEquals("wrong name", "test0169", packageBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- String[] components = packageBinding.getNameComponents();
- assertNotNull("no components", components); //$NON-NLS-1$
- assertTrue("components size != 1", components.length == 1); //$NON-NLS-1$
- assertEquals("wrong component name", "test0169", components[0]); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("wrong type", IBinding.PACKAGE, packageBinding.getKind()); //$NON-NLS-1$
- assertTrue("Unnamed package", !packageBinding.isUnnamed()); //$NON-NLS-1$
- assertTrue("Package binding is not canonical", packageBinding == typeBinding.getPackage()); //$NON-NLS-1$
- }
+// /**
+// * Check package binding: test0169
+// */
+// public void test0169() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0169", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("Expression should not be null", result); //$NON-NLS-1$
+// assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// List types = compilationUnit.types();
+// assertTrue("The types list is empty", types.size() != 0); //$NON-NLS-1$
+// TypeDeclaration typeDeclaration = (TypeDeclaration) types.get(0);
+// ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+// assertNotNull("Binding not null", typeBinding); //$NON-NLS-1$
+// IPackageBinding packageBinding = typeBinding.getPackage();
+// assertNotNull("No package binding", packageBinding); //$NON-NLS-1$
+// assertEquals("wrong name", "test0169", packageBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// String[] components = packageBinding.getNameComponents();
+// assertNotNull("no components", components); //$NON-NLS-1$
+// assertTrue("components size != 1", components.length == 1); //$NON-NLS-1$
+// assertEquals("wrong component name", "test0169", components[0]); //$NON-NLS-1$ //$NON-NLS-2$
+// assertEquals("wrong type", IBinding.PACKAGE, packageBinding.getKind()); //$NON-NLS-1$
+// assertTrue("Unnamed package", !packageBinding.isUnnamed()); //$NON-NLS-1$
+// assertTrue("Package binding is not canonical", packageBinding == typeBinding.getPackage()); //$NON-NLS-1$
+// }
- /**
- * Check package binding: test0170
- */
- public void test0170() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "Test0170.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("Expression should not be null", result); //$NON-NLS-1$
- assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- List types = compilationUnit.types();
- assertTrue("The types list is empty", types.size() != 0); //$NON-NLS-1$
- TypeDeclaration typeDeclaration = (TypeDeclaration) types.get(0);
- ITypeBinding typeBinding = typeDeclaration.resolveBinding();
- assertNotNull("Binding not null", typeBinding); //$NON-NLS-1$
- IPackageBinding packageBinding = typeBinding.getPackage();
- assertNotNull("No package binding", packageBinding); //$NON-NLS-1$
- assertEquals("wrong name", "", packageBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- String[] components = packageBinding.getNameComponents();
- assertNotNull("no components", components); //$NON-NLS-1$
- assertTrue("components size != 0", components.length == 0); //$NON-NLS-1$
- assertEquals("wrong type", IBinding.PACKAGE, packageBinding.getKind()); //$NON-NLS-1$
- assertTrue("Not an unnamed package", packageBinding.isUnnamed()); //$NON-NLS-1$
- assertTrue("Package binding is not canonical", packageBinding == typeBinding.getPackage()); //$NON-NLS-1$
- }
-
- /**
- * Check package binding: test0171
- */
- public void test0171() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0171", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("Expression should not be null", result); //$NON-NLS-1$
- assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- List types = compilationUnit.types();
- assertTrue("The types list is empty", types.size() == 2); //$NON-NLS-1$
- TypeDeclaration typeDeclaration = (TypeDeclaration) types.get(0);
- ITypeBinding typeBinding = typeDeclaration.resolveBinding();
- assertNotNull("Binding not null", typeBinding); //$NON-NLS-1$
- IPackageBinding packageBinding = typeBinding.getPackage();
- assertNotNull("No package binding", packageBinding); //$NON-NLS-1$
- assertEquals("wrong name", "test0171", packageBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- String[] components = packageBinding.getNameComponents();
- assertNotNull("no components", components); //$NON-NLS-1$
- assertTrue("components size != 1", components.length == 1); //$NON-NLS-1$
- assertEquals("wrong component name", "test0171", components[0]); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("wrong type", IBinding.PACKAGE, packageBinding.getKind()); //$NON-NLS-1$
- assertTrue("Unnamed package", !packageBinding.isUnnamed()); //$NON-NLS-1$
- assertTrue("Package binding is not canonical", packageBinding == typeBinding.getPackage()); //$NON-NLS-1$
-
- typeDeclaration = (TypeDeclaration) types.get(1);
- typeBinding = typeDeclaration.resolveBinding();
- assertNotNull("Binding not null", typeBinding); //$NON-NLS-1$
- IPackageBinding packageBinding2 = typeBinding.getPackage();
- assertNotNull("No package binding", packageBinding); //$NON-NLS-1$
- assertTrue("Package binding is not canonical", packageBinding == packageBinding2); //$NON-NLS-1$
- }
+// /**
+// * Check package binding: test0170
+// */
+// public void test0170() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "Test0170.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("Expression should not be null", result); //$NON-NLS-1$
+// assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// List types = compilationUnit.types();
+// assertTrue("The types list is empty", types.size() != 0); //$NON-NLS-1$
+// TypeDeclaration typeDeclaration = (TypeDeclaration) types.get(0);
+// ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+// assertNotNull("Binding not null", typeBinding); //$NON-NLS-1$
+// IPackageBinding packageBinding = typeBinding.getPackage();
+// assertNotNull("No package binding", packageBinding); //$NON-NLS-1$
+// assertEquals("wrong name", "", packageBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// String[] components = packageBinding.getNameComponents();
+// assertNotNull("no components", components); //$NON-NLS-1$
+// assertTrue("components size != 0", components.length == 0); //$NON-NLS-1$
+// assertEquals("wrong type", IBinding.PACKAGE, packageBinding.getKind()); //$NON-NLS-1$
+// assertTrue("Not an unnamed package", packageBinding.isUnnamed()); //$NON-NLS-1$
+// assertTrue("Package binding is not canonical", packageBinding == typeBinding.getPackage()); //$NON-NLS-1$
+// }
+//
+// /**
+// * Check package binding: test0171
+// */
+// public void test0171() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0171", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("Expression should not be null", result); //$NON-NLS-1$
+// assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// List types = compilationUnit.types();
+// assertTrue("The types list is empty", types.size() == 2); //$NON-NLS-1$
+// TypeDeclaration typeDeclaration = (TypeDeclaration) types.get(0);
+// ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+// assertNotNull("Binding not null", typeBinding); //$NON-NLS-1$
+// IPackageBinding packageBinding = typeBinding.getPackage();
+// assertNotNull("No package binding", packageBinding); //$NON-NLS-1$
+// assertEquals("wrong name", "test0171", packageBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// String[] components = packageBinding.getNameComponents();
+// assertNotNull("no components", components); //$NON-NLS-1$
+// assertTrue("components size != 1", components.length == 1); //$NON-NLS-1$
+// assertEquals("wrong component name", "test0171", components[0]); //$NON-NLS-1$ //$NON-NLS-2$
+// assertEquals("wrong type", IBinding.PACKAGE, packageBinding.getKind()); //$NON-NLS-1$
+// assertTrue("Unnamed package", !packageBinding.isUnnamed()); //$NON-NLS-1$
+// assertTrue("Package binding is not canonical", packageBinding == typeBinding.getPackage()); //$NON-NLS-1$
+//
+// typeDeclaration = (TypeDeclaration) types.get(1);
+// typeBinding = typeDeclaration.resolveBinding();
+// assertNotNull("Binding not null", typeBinding); //$NON-NLS-1$
+// IPackageBinding packageBinding2 = typeBinding.getPackage();
+// assertNotNull("No package binding", packageBinding); //$NON-NLS-1$
+// assertTrue("Package binding is not canonical", packageBinding == packageBinding2); //$NON-NLS-1$
+// }
/**
* Check method binding
*/
public void test0172() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0172", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0172", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
- List types = compilationUnit.types();
- assertTrue("The types list is empty", types.size() != 0); //$NON-NLS-1$
- TypeDeclaration typeDeclaration = (TypeDeclaration) types.get(0);
- ITypeBinding typeBinding = typeDeclaration.resolveBinding();
- assertNotNull("Binding not null", typeBinding); //$NON-NLS-1$
- IMethodBinding[] methods = typeBinding.getDeclaredMethods();
- assertNotNull("No methods", methods);
- assertEquals("methods.length != 4", 4, methods.length); //$NON-NLS-1$
- List bodyDeclarations = typeDeclaration.bodyDeclarations();
- assertEquals("body declaration size != 3", 3, bodyDeclarations.size()); //$NON-NLS-1$
- MethodDeclaration method1 = (MethodDeclaration) bodyDeclarations.get(0);
+ List statements = compilationUnit.statements();
+ assertTrue("The statements list is empty", statements.size() != 0); //$NON-NLS-1$
+// TypeDeclaration typeDeclaration = (TypeDeclaration) statements.get(0);
+// ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+// assertNotNull("Binding not null", typeBinding); //$NON-NLS-1$
+// IMethodBinding[] methods = null;// typeBinding.getDeclaredMethods();
+// assertNotNull("No methods", methods);
+// assertEquals("methods.length != 4", 4, methods.length); //$NON-NLS-1$
+// List bodyDeclarations = typeDeclaration.bodyDeclarations();
+ assertEquals("statements size != 3", 3, statements.size()); //$NON-NLS-1$
+ MethodDeclaration method1 = (MethodDeclaration) statements.get(0);
IMethodBinding methodBinding1 = method1.resolveBinding();
assertNotNull("No method binding for foo", methodBinding1); //$NON-NLS-1$
SimpleName simpleName = method1.getName();
@@ -4074,81 +4155,81 @@ public class ASTConverterTest extends ConverterTestSetup {
assertNotNull("No binding", binding); //$NON-NLS-1$
assertEquals("wrong name", binding.getName(), simpleName.getIdentifier()); //$NON-NLS-1$
// search method foo
- IMethodBinding methodBinding = null;
- loop: for (int i = 0, max = methods.length; i < max; i++) {
- IMethodBinding currentMethod = methods[i];
- if ("foo".equals(currentMethod.getName())) {
- methodBinding = currentMethod;
- break loop;
- }
- }
- assertNotNull("Cannot be null", methodBinding);
- assertTrue("Canonical method binding", methodBinding1 == methodBinding); //$NON-NLS-1$
- assertTrue("declaring class is canonical", typeBinding == methodBinding1.getDeclaringClass()); //$NON-NLS-1$
- ITypeBinding[] exceptionTypes = methodBinding1.getExceptionTypes();
- assertNotNull("No exception types", exceptionTypes); //$NON-NLS-1$
- assertEquals("One exception", 1, exceptionTypes.length); //$NON-NLS-1$
- assertEquals("wrong name for exception", "IOException", exceptionTypes[0].getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("wrong modifier", Modifier.NONE, methodBinding1.getModifiers()); //$NON-NLS-1$
+// IMethodBinding methodBinding = null;
+// loop: for (int i = 0, max = methods.length; i < max; i++) {
+// IMethodBinding currentMethod = methods[i];
+// if ("foo".equals(currentMethod.getName())) {
+// methodBinding = currentMethod;
+// break loop;
+// }
+// }
+// assertNotNull("Cannot be null", methodBinding);
+// assertTrue("Canonical method binding", methodBinding1 == methodBinding); //$NON-NLS-1$
+// assertTrue("declaring class is canonical", typeBinding == methodBinding1.getDeclaringClass()); //$NON-NLS-1$
+// ITypeBinding[] exceptionTypes = methodBinding1.getExceptionTypes();
+// assertNotNull("No exception types", exceptionTypes); //$NON-NLS-1$
+// assertEquals("One exception", 1, exceptionTypes.length); //$NON-NLS-1$
+// assertEquals("wrong name for exception", "IOException", exceptionTypes[0].getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("wrong modifier", Modifier.PUBLIC, methodBinding1.getModifiers()); //$NON-NLS-1$
assertEquals("wrong name for method", "foo", methodBinding1.getName()); //$NON-NLS-1$ //$NON-NLS-2$
ITypeBinding[] parameters = methodBinding1.getParameterTypes();
assertNotNull("No parameters", parameters); //$NON-NLS-1$
assertEquals("wrong size", 1, parameters.length); //$NON-NLS-1$
- assertEquals("wrong type", "int[]", parameters[0].getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// assertEquals("wrong type", "int[]", parameters[0].getName()); //$NON-NLS-1$ //$NON-NLS-2$
assertEquals("wrong return type", "void", methodBinding1.getReturnType().getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("A constructor", !methodBinding1.isConstructor()); //$NON-NLS-1$
+// assertTrue("A constructor", !methodBinding1.isConstructor()); //$NON-NLS-1$
- MethodDeclaration method2 = (MethodDeclaration) bodyDeclarations.get(1);
+ MethodDeclaration method2 = (MethodDeclaration) statements.get(1);
IMethodBinding methodBinding2 = method2.resolveBinding();
assertNotNull("No method binding for main", methodBinding2); //$NON-NLS-1$
- methodBinding = null;
- loop: for (int i = 0, max = methods.length; i < max; i++) {
- IMethodBinding currentMethod = methods[i];
- if ("main".equals(currentMethod.getName())) {
- methodBinding = currentMethod;
- break loop;
- }
- }
- assertNotNull("Cannot be null", methodBinding);
- assertTrue("Canonical method binding", methodBinding2 == methodBinding); //$NON-NLS-1$
- assertTrue("declaring class is canonical", typeBinding == methodBinding2.getDeclaringClass()); //$NON-NLS-1$
- ITypeBinding[] exceptionTypes2 = methodBinding2.getExceptionTypes();
- assertNotNull("No exception types", exceptionTypes2); //$NON-NLS-1$
- assertEquals("No exception", 0, exceptionTypes2.length); //$NON-NLS-1$
- assertEquals("wrong modifier", Modifier.PUBLIC | Modifier.STATIC, methodBinding2.getModifiers()); //$NON-NLS-1$
+// methodBinding = null;
+// loop: for (int i = 0, max = methods.length; i < max; i++) {
+// IMethodBinding currentMethod = methods[i];
+// if ("main".equals(currentMethod.getName())) {
+// methodBinding = currentMethod;
+// break loop;
+// }
+// }
+// assertNotNull("Cannot be null", methodBinding);
+// assertTrue("Canonical method binding", methodBinding2 == methodBinding); //$NON-NLS-1$
+// assertTrue("declaring class is canonical", typeBinding == methodBinding2.getDeclaringClass()); //$NON-NLS-1$
+// ITypeBinding[] exceptionTypes2 = methodBinding2.getExceptionTypes();
+// assertNotNull("No exception types", exceptionTypes2); //$NON-NLS-1$
+// assertEquals("No exception", 0, exceptionTypes2.length); //$NON-NLS-1$
+// assertEquals("wrong modifier", Modifier.PUBLIC | Modifier.STATIC, methodBinding2.getModifiers()); //$NON-NLS-1$
assertEquals("wrong name for method", "main", methodBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
ITypeBinding[] parameters2 = methodBinding2.getParameterTypes();
assertNotNull("No parameters", parameters2); //$NON-NLS-1$
assertEquals("wrong size", 1, parameters2.length); //$NON-NLS-1$
- assertEquals("wrong type for parameter2[0]", "String[]", parameters2[0].getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// assertEquals("wrong type for parameter2[0]", "String[]", parameters2[0].getName()); //$NON-NLS-1$ //$NON-NLS-2$
assertEquals("wrong return type", "void", methodBinding2.getReturnType().getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("A constructor", !methodBinding2.isConstructor()); //$NON-NLS-1$
+// assertTrue("A constructor", !methodBinding2.isConstructor()); //$NON-NLS-1$
- MethodDeclaration method3 = (MethodDeclaration) bodyDeclarations.get(2);
+ MethodDeclaration method3 = (MethodDeclaration) statements.get(2);
IMethodBinding methodBinding3 = method3.resolveBinding();
assertNotNull("No method binding for main", methodBinding3); //$NON-NLS-1$
- methodBinding = null;
- loop: for (int i = 0, max = methods.length; i < max; i++) {
- IMethodBinding currentMethod = methods[i];
- if ("bar".equals(currentMethod.getName())) {
- methodBinding = currentMethod;
- break loop;
- }
- }
- assertNotNull("Cannot be null", methodBinding);
- assertTrue("Canonical method binding", methodBinding3 == methodBinding); //$NON-NLS-1$
- assertTrue("declaring class is canonical", typeBinding == methodBinding3.getDeclaringClass()); //$NON-NLS-1$
- ITypeBinding[] exceptionTypes3 = methodBinding3.getExceptionTypes();
- assertNotNull("No exception types", exceptionTypes3); //$NON-NLS-1$
- assertEquals("No exception", 1, exceptionTypes3.length); //$NON-NLS-1$
- assertEquals("wrong modifier", Modifier.PRIVATE, methodBinding3.getModifiers()); //$NON-NLS-1$
+// methodBinding = null;
+// loop: for (int i = 0, max = methods.length; i < max; i++) {
+// IMethodBinding currentMethod = methods[i];
+// if ("bar".equals(currentMethod.getName())) {
+// methodBinding = currentMethod;
+// break loop;
+// }
+// }
+// assertNotNull("Cannot be null", methodBinding);
+// assertTrue("Canonical method binding", methodBinding3 == methodBinding); //$NON-NLS-1$
+// assertTrue("declaring class is canonical", typeBinding == methodBinding3.getDeclaringClass()); //$NON-NLS-1$
+// ITypeBinding[] exceptionTypes3 = methodBinding3.getExceptionTypes();
+// assertNotNull("No exception types", exceptionTypes3); //$NON-NLS-1$
+// assertEquals("No exception", 1, exceptionTypes3.length); //$NON-NLS-1$
+// assertEquals("wrong modifier", Modifier.PRIVATE, methodBinding3.getModifiers()); //$NON-NLS-1$
assertEquals("wrong name for method", "bar", methodBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
ITypeBinding[] parameters3 = methodBinding3.getParameterTypes();
assertNotNull("No parameters", parameters3); //$NON-NLS-1$
assertEquals("wrong size", 1, parameters3.length); //$NON-NLS-1$
- assertEquals("wrong type", "String", parameters3[0].getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("wrong return type", "String", methodBinding3.getReturnType().getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("A constructor", !methodBinding3.isConstructor()); //$NON-NLS-1$
+ assertEquals("wrong type", "any", parameters3[0].getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("wrong return type", "any", methodBinding3.getReturnType().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// assertTrue("A constructor", !methodBinding3.isConstructor()); //$NON-NLS-1$
assertTrue("The binding is not canonical", parameters3[0] == methodBinding3.getReturnType()); //$NON-NLS-1$
}
@@ -4156,7 +4237,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* i++; IVariableBinding
*/
public void test0173() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0173", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0173", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -4186,7 +4267,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* i++; IVariableBinding (field)
*/
public void test0174() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0174", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0174", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 1, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -4202,8 +4283,8 @@ public class ASTConverterTest extends ConverterTestSetup {
assertNotNull("No binding", binding); //$NON-NLS-1$
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0);
- assertTrue("FieldDeclaration", node2 instanceof FieldDeclaration); //$NON-NLS-1$
- FieldDeclaration fieldDeclaration = (FieldDeclaration) node2;
+ assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
+ VariableDeclarationStatement fieldDeclaration = (VariableDeclarationStatement) node2;
List fragments = fieldDeclaration.fragments();
assertTrue("No fragment", fragments.size() == 1); //$NON-NLS-1$
VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
@@ -4215,50 +4296,50 @@ public class ASTConverterTest extends ConverterTestSetup {
* int i = 0; Test IntBinding for the field declaration and the 0 literal
*/
public void test0175() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0175", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0175", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0);
- assertTrue("VariableDeclarationStatement", node2 instanceof FieldDeclaration); //$NON-NLS-1$
- FieldDeclaration fieldDeclaration = (FieldDeclaration) node2;
+ assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
+ VariableDeclarationStatement fieldDeclaration = (VariableDeclarationStatement) node2;
List fragments = fieldDeclaration.fragments();
assertTrue("No fragment", fragments.size() == 1); //$NON-NLS-1$
VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
IVariableBinding variableBinding = fragment.resolveBinding();
ITypeBinding typeBinding = fragment.getInitializer().resolveTypeBinding();
assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
- assertTrue("Not a primitive type", typeBinding.isPrimitive()); //$NON-NLS-1$
- assertEquals("Not int", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue(variableBinding.getType() == typeBinding);
+// assertTrue("Not a primitive type", typeBinding.isPrimitive()); //$NON-NLS-1$
+ assertEquals("Not Number", "Number", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// assertTrue(variableBinding.getType() == typeBinding);
}
- /**
- * ThisReference
- */
- public void test0176() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0176", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
- assertTrue("Return statement", node2 instanceof ReturnStatement); //$NON-NLS-1$
- ReturnStatement returnStatement = (ReturnStatement) node2;
- assertTrue("Not a field access", returnStatement.getExpression() instanceof FieldAccess); //$NON-NLS-1$
- FieldAccess fieldAccess = (FieldAccess) returnStatement.getExpression();
- ITypeBinding typeBinding = fieldAccess.resolveTypeBinding();
- assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
- assertTrue("Not a primitive type", typeBinding.isPrimitive()); //$NON-NLS-1$
- assertEquals("Not int", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- Expression expr = fieldAccess.getExpression();
- assertTrue("Not a this expression", expr instanceof ThisExpression); //$NON-NLS-1$
- ThisExpression thisExpression = (ThisExpression) expr;
- ITypeBinding typeBinding2 = thisExpression.resolveTypeBinding();
- assertNotNull("No type binding2", typeBinding2); //$NON-NLS-1$
- assertEquals("Not Test", "Test", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
+// /**
+// * ThisReference
+// */
+// public void test0176() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0176", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
+// assertTrue("Return statement", node2 instanceof ReturnStatement); //$NON-NLS-1$
+// ReturnStatement returnStatement = (ReturnStatement) node2;
+// assertTrue("Not a field access", returnStatement.getExpression() instanceof FieldAccess); //$NON-NLS-1$
+// FieldAccess fieldAccess = (FieldAccess) returnStatement.getExpression();
+// ITypeBinding typeBinding = fieldAccess.resolveTypeBinding();
+// assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+// assertTrue("Not a primitive type", typeBinding.isPrimitive()); //$NON-NLS-1$
+// assertEquals("Not int", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// Expression expr = fieldAccess.getExpression();
+// assertTrue("Not a this expression", expr instanceof ThisExpression); //$NON-NLS-1$
+// ThisExpression thisExpression = (ThisExpression) expr;
+// ITypeBinding typeBinding2 = thisExpression.resolveTypeBinding();
+// assertNotNull("No type binding2", typeBinding2); //$NON-NLS-1$
+// assertEquals("Not Test", "Test", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
/**
* i++; IVariableBinding
*/
public void test0177() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0177", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0177", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 1, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -4280,33 +4361,33 @@ public class ASTConverterTest extends ConverterTestSetup {
assertTrue("No fragment", fragments.size() == 1); //$NON-NLS-1$
VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
IVariableBinding variableBinding = fragment.resolveBinding();
- assertEquals("return type is not int", "int", variableBinding.getType().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("return type is not Number", "Number", variableBinding.getType().getName()); //$NON-NLS-1$ //$NON-NLS-2$
assertTrue(variableBinding == binding);
}
-
- /**
- * SuperReference
- */
- public void test0178() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0178", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- ASTNode node2 = getASTNode((CompilationUnit) result, 1, 0, 0);
- assertTrue("Return statement", node2 instanceof ReturnStatement); //$NON-NLS-1$
- ReturnStatement returnStatement = (ReturnStatement) node2;
- Expression expr = returnStatement.getExpression();
- assertTrue("Not a field access", expr instanceof SuperFieldAccess); //$NON-NLS-1$
- SuperFieldAccess fieldAccess = (SuperFieldAccess) expr;
- ITypeBinding typeBinding = fieldAccess.resolveTypeBinding();
- assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
- assertTrue("Not a primitive type", typeBinding.isPrimitive()); //$NON-NLS-1$
- assertEquals("Not int", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
+//
+// /**
+// * SuperReference
+// */
+// public void test0178() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0178", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// ASTNode node2 = getASTNode((CompilationUnit) result, 1, 0, 0);
+// assertTrue("Return statement", node2 instanceof ReturnStatement); //$NON-NLS-1$
+// ReturnStatement returnStatement = (ReturnStatement) node2;
+// Expression expr = returnStatement.getExpression();
+// assertTrue("Not a field access", expr instanceof SuperFieldAccess); //$NON-NLS-1$
+// SuperFieldAccess fieldAccess = (SuperFieldAccess) expr;
+// ITypeBinding typeBinding = fieldAccess.resolveTypeBinding();
+// assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+// assertTrue("Not a primitive type", typeBinding.isPrimitive()); //$NON-NLS-1$
+// assertEquals("Not int", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
/**
* Allocation expression
*/
public void test0179() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0179", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0179", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
@@ -4321,52 +4402,52 @@ public class ASTConverterTest extends ConverterTestSetup {
assertTrue(variableBinding.getType() == typeBinding);
}
- /**
- * Allocation expression
- */
- public void test0180() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0180", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
- assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
- VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
- List fragments = variableDeclarationStatement.fragments();
- assertTrue("No fragment", fragments.size() == 1); //$NON-NLS-1$
- VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
- IVariableBinding variableBinding = fragment.resolveBinding();
- Expression initialization = fragment.getInitializer();
- assertTrue("No an array creation", initialization instanceof ArrayCreation); //$NON-NLS-1$
- ITypeBinding typeBinding = initialization.resolveTypeBinding();
- assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
- assertTrue("Not an array", typeBinding.isArray()); //$NON-NLS-1$
- assertTrue(variableBinding.getType() == typeBinding);
- }
-
- /**
- * Allocation expression
- */
- public void test0181() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0181", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
- assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
- VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
- List fragments = variableDeclarationStatement.fragments();
- assertTrue("No fragment", fragments.size() == 1); //$NON-NLS-1$
- VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
- IVariableBinding variableBinding = fragment.resolveBinding();
- Expression initialization = fragment.getInitializer();
- ITypeBinding typeBinding = initialization.resolveTypeBinding();
- assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
- assertTrue("Not an array", typeBinding.isArray()); //$NON-NLS-1$
- assertTrue(variableBinding.getType() == typeBinding);
- }
+// /**
+// * Allocation expression
+// */
+// public void test0180() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0180", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
+// assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
+// VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
+// List fragments = variableDeclarationStatement.fragments();
+// assertTrue("No fragment", fragments.size() == 1); //$NON-NLS-1$
+// VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+// IVariableBinding variableBinding = fragment.resolveBinding();
+// Expression initialization = fragment.getInitializer();
+// assertTrue("No an array creation", initialization instanceof ArrayCreation); //$NON-NLS-1$
+// ITypeBinding typeBinding = initialization.resolveTypeBinding();
+// assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+// assertTrue("Not an array", typeBinding.isArray()); //$NON-NLS-1$
+// assertTrue(variableBinding.getType() == typeBinding);
+// }
+//
+// /**
+// * Allocation expression
+// */
+// public void test0181() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0181", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
+// assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
+// VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
+// List fragments = variableDeclarationStatement.fragments();
+// assertTrue("No fragment", fragments.size() == 1); //$NON-NLS-1$
+// VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+// IVariableBinding variableBinding = fragment.resolveBinding();
+// Expression initialization = fragment.getInitializer();
+// ITypeBinding typeBinding = initialization.resolveTypeBinding();
+// assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+// assertTrue("Not an array", typeBinding.isArray()); //$NON-NLS-1$
+// assertTrue(variableBinding.getType() == typeBinding);
+// }
/**
* BinaryExpression
*/
public void test0182() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0182", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0182", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -4384,7 +4465,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* BinaryExpression
*/
public void test0183() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0183", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0183", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -4402,7 +4483,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* BinaryExpression
*/
public void test0184() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0184", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0184", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -4420,7 +4501,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* BinaryExpression
*/
public void test0185() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0185", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0185", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -4438,7 +4519,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* BinaryExpression
*/
public void test0186() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0186", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0186", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -4456,7 +4537,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* BinaryExpression
*/
public void test0187() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0187", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0187", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -4474,7 +4555,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* BinaryExpression
*/
public void test0188() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0188", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0188", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 2);
@@ -4492,7 +4573,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* BinaryExpression
*/
public void test0189() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0189", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0189", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -4505,30 +4586,30 @@ public class ASTConverterTest extends ConverterTestSetup {
assertEquals("Not a boolean", "boolean", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
checkSourceRange(expr, "i < 10", source); //$NON-NLS-1$
}
-
- /**
- * BinaryExpression
- */
- public void test0190() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0190", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- ASTNode node2 = getASTNode((CompilationUnit) result, 0, 2, 1);
- assertTrue("IfStatement", node2 instanceof IfStatement); //$NON-NLS-1$
- IfStatement statement = (IfStatement) node2;
- Expression expr = statement.getExpression();
- assertNotNull("No condition", expr); //$NON-NLS-1$
- ITypeBinding typeBinding = expr.resolveTypeBinding();
- assertNotNull("No binding", typeBinding); //$NON-NLS-1$
- assertEquals("Not a boolean", "boolean", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- checkSourceRange(expr, "scanner.x < selection.start && selection.start < scanner.y", source); //$NON-NLS-1$
- }
+//
+// /**
+// * BinaryExpression
+// */
+// public void test0190() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0190", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// ASTNode node2 = getASTNode((CompilationUnit) result, 0, 2, 1);
+// assertTrue("IfStatement", node2 instanceof IfStatement); //$NON-NLS-1$
+// IfStatement statement = (IfStatement) node2;
+// Expression expr = statement.getExpression();
+// assertNotNull("No condition", expr); //$NON-NLS-1$
+// ITypeBinding typeBinding = expr.resolveTypeBinding();
+// assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+// assertEquals("Not a boolean", "boolean", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// checkSourceRange(expr, "scanner.x < selection.start && selection.start < scanner.y", source); //$NON-NLS-1$
+// }
/**
* BinaryExpression
*/
public void test0191() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0191", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0191", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -4552,7 +4633,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* Initializer
*/
public void test0192() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0192", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0192", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -4569,127 +4650,127 @@ public class ASTConverterTest extends ConverterTestSetup {
checkSourceRange(initialization, "0", source); //$NON-NLS-1$
}
- /**
- * Initializer
- */
- public void test0193() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0193", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
- assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
- VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
- List fragments = variableDeclarationStatement.fragments();
- assertTrue("No fragment", fragments.size() == 1); //$NON-NLS-1$
- VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
- IVariableBinding variableBinding = fragment.resolveBinding();
- Expression initialization = fragment.getInitializer();
- ITypeBinding typeBinding = initialization.resolveTypeBinding();
- assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
- assertTrue(variableBinding.getType() == typeBinding);
- checkSourceRange(initialization, "new Inner()", source); //$NON-NLS-1$
- assertEquals("Wrong type", "Inner", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Initializer
- */
- public void test0194() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0194", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
- assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
- VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
- List fragments = variableDeclarationStatement.fragments();
- assertTrue("No fragment", fragments.size() == 1); //$NON-NLS-1$
- VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
- IVariableBinding variableBinding = fragment.resolveBinding();
- Expression initialization = fragment.getInitializer();
- ITypeBinding typeBinding = initialization.resolveTypeBinding();
- assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
- assertTrue(variableBinding.getType() == typeBinding);
- checkSourceRange(initialization, "new Inner[10]", source); //$NON-NLS-1$
- assertTrue("Not an array", typeBinding.isArray()); //$NON-NLS-1$
- assertEquals("Wrong type", "Inner[]", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Initializer
- */
- public void test0195() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0195", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- ASTNode node2 = getASTNode((CompilationUnit) result, 1, 0, 1);
- assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
- ExpressionStatement expressionStatement = (ExpressionStatement) node2;
- Expression ex = expressionStatement.getExpression();
- assertTrue("MethodInvocation", ex instanceof MethodInvocation); //$NON-NLS-1$
- MethodInvocation methodInvocation = (MethodInvocation) ex;
- checkSourceRange(methodInvocation, "a.useFile(/*]*/a.getFile()/*[*/)", source); //$NON-NLS-1$
- List list = methodInvocation.arguments();
- assertTrue("Parameter list not empty", list.size() == 1); //$NON-NLS-1$
- Expression parameter = (Expression) list.get(0);
- assertTrue("Not a method invocation", parameter instanceof MethodInvocation); //$NON-NLS-1$
- ITypeBinding typeBinding = parameter.resolveTypeBinding();
- assertNotNull("No binding", typeBinding); //$NON-NLS-1$
- assertEquals("Not a boolean", "File", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- checkSourceRange(parameter, "a.getFile()", source); //$NON-NLS-1$
- }
-
- /**
- * Initializer
- */
- public void test0196() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0196", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 2);
- assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
- ExpressionStatement expressionStatement = (ExpressionStatement) node2;
- Expression ex = expressionStatement.getExpression();
- assertTrue("Assignment", ex instanceof Assignment); //$NON-NLS-1$
- Assignment statement = (Assignment) ex;
- Expression rightExpr = statement.getRightHandSide();
- assertTrue("Not an instanceof expression", rightExpr instanceof InstanceofExpression); //$NON-NLS-1$
- ITypeBinding typeBinding = rightExpr.resolveTypeBinding();
- assertNotNull("No binding", typeBinding); //$NON-NLS-1$
- assertEquals("wrong type", "boolean", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- checkSourceRange(rightExpr, "inner instanceof Inner", source); //$NON-NLS-1$
- }
-
- /**
- * Initializer
- */
- public void test0197() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0197", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType());
- CompilationUnit unit = (CompilationUnit) result;
- assertProblemsSize(unit, 0);
- ASTNode node2 = getASTNode(unit, 1, 0, 1);
- assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
- ExpressionStatement expressionStatement = (ExpressionStatement) node2;
- Expression ex = expressionStatement.getExpression();
- assertTrue("MethodInvocation", ex instanceof MethodInvocation); //$NON-NLS-1$
- MethodInvocation methodInvocation = (MethodInvocation) ex;
- checkSourceRange(methodInvocation, "a.getFile()/*[*/.getName()", source); //$NON-NLS-1$
- Expression receiver = methodInvocation.getExpression();
- assertTrue("Not a method invocation", receiver instanceof MethodInvocation); //$NON-NLS-1$
- MethodInvocation methodInvocation2 = (MethodInvocation) receiver;
- ITypeBinding typeBinding = methodInvocation2.resolveTypeBinding();
- assertNotNull("No binding", typeBinding); //$NON-NLS-1$
- assertEquals("Wrong name", "File", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- checkSourceRange(methodInvocation2, "a.getFile()", source); //$NON-NLS-1$
- }
+// /**
+// * Initializer
+// */
+// public void test0193() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0193", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
+// assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
+// VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
+// List fragments = variableDeclarationStatement.fragments();
+// assertTrue("No fragment", fragments.size() == 1); //$NON-NLS-1$
+// VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+// IVariableBinding variableBinding = fragment.resolveBinding();
+// Expression initialization = fragment.getInitializer();
+// ITypeBinding typeBinding = initialization.resolveTypeBinding();
+// assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+// assertTrue(variableBinding.getType() == typeBinding);
+// checkSourceRange(initialization, "new Inner()", source); //$NON-NLS-1$
+// assertEquals("Wrong type", "Inner", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
+//
+// /**
+// * Initializer
+// */
+// public void test0194() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0194", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
+// assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
+// VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
+// List fragments = variableDeclarationStatement.fragments();
+// assertTrue("No fragment", fragments.size() == 1); //$NON-NLS-1$
+// VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+// IVariableBinding variableBinding = fragment.resolveBinding();
+// Expression initialization = fragment.getInitializer();
+// ITypeBinding typeBinding = initialization.resolveTypeBinding();
+// assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+// assertTrue(variableBinding.getType() == typeBinding);
+// checkSourceRange(initialization, "new Inner[10]", source); //$NON-NLS-1$
+// assertTrue("Not an array", typeBinding.isArray()); //$NON-NLS-1$
+// assertEquals("Wrong type", "Inner[]", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
+
+// /**
+// * Initializer
+// */
+// public void test0195() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0195", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// ASTNode node2 = getASTNode((CompilationUnit) result, 1, 0, 1);
+// assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
+// ExpressionStatement expressionStatement = (ExpressionStatement) node2;
+// Expression ex = expressionStatement.getExpression();
+// assertTrue("MethodInvocation", ex instanceof MethodInvocation); //$NON-NLS-1$
+// MethodInvocation methodInvocation = (MethodInvocation) ex;
+// checkSourceRange(methodInvocation, "a.useFile(/*]*/a.getFile()/*[*/)", source); //$NON-NLS-1$
+// List list = methodInvocation.arguments();
+// assertTrue("Parameter list not empty", list.size() == 1); //$NON-NLS-1$
+// Expression parameter = (Expression) list.get(0);
+// assertTrue("Not a method invocation", parameter instanceof MethodInvocation); //$NON-NLS-1$
+// ITypeBinding typeBinding = parameter.resolveTypeBinding();
+// assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+// assertEquals("Not a boolean", "File", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// checkSourceRange(parameter, "a.getFile()", source); //$NON-NLS-1$
+// }
+
+// /**
+// * Initializer
+// */
+// public void test0196() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0196", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 2);
+// assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
+// ExpressionStatement expressionStatement = (ExpressionStatement) node2;
+// Expression ex = expressionStatement.getExpression();
+// assertTrue("Assignment", ex instanceof Assignment); //$NON-NLS-1$
+// Assignment statement = (Assignment) ex;
+// Expression rightExpr = statement.getRightHandSide();
+// assertTrue("Not an instanceof expression", rightExpr instanceof InstanceofExpression); //$NON-NLS-1$
+// ITypeBinding typeBinding = rightExpr.resolveTypeBinding();
+// assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+// assertEquals("wrong type", "boolean", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// checkSourceRange(rightExpr, "inner instanceof Inner", source); //$NON-NLS-1$
+// }
+//
+// /**
+// * Initializer
+// */
+// public void test0197() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0197", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType());
+// CompilationUnit unit = (CompilationUnit) result;
+// assertProblemsSize(unit, 0);
+// ASTNode node2 = getASTNode(unit, 1, 0, 1);
+// assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
+// ExpressionStatement expressionStatement = (ExpressionStatement) node2;
+// Expression ex = expressionStatement.getExpression();
+// assertTrue("MethodInvocation", ex instanceof MethodInvocation); //$NON-NLS-1$
+// MethodInvocation methodInvocation = (MethodInvocation) ex;
+// checkSourceRange(methodInvocation, "a.getFile()/*[*/.getName()", source); //$NON-NLS-1$
+// Expression receiver = methodInvocation.getExpression();
+// assertTrue("Not a method invocation", receiver instanceof MethodInvocation); //$NON-NLS-1$
+// MethodInvocation methodInvocation2 = (MethodInvocation) receiver;
+// ITypeBinding typeBinding = methodInvocation2.resolveTypeBinding();
+// assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+// assertEquals("Wrong name", "File", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// checkSourceRange(methodInvocation2, "a.getFile()", source); //$NON-NLS-1$
+// }
/**
* Initializer
*/
public void test0198() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0198", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0198", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -4707,7 +4788,7 @@ public class ASTConverterTest extends ConverterTestSetup {
assertEquals("A multiplication", InfixExpression.Operator.TIMES, infixExpression3.getOperator()); //$NON-NLS-1$
ITypeBinding typeBinding = infixExpression3.resolveTypeBinding();
assertNotNull("No binding", typeBinding); //$NON-NLS-1$
- assertEquals("Not int", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("Not Number", "Number", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
checkSourceRange(infixExpression3, "20 * 30", source); //$NON-NLS-1$
}
@@ -4715,7 +4796,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* Initializer
*/
public void test0199() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0199", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0199", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -4736,45 +4817,45 @@ public class ASTConverterTest extends ConverterTestSetup {
assertEquals("A multiplication", InfixExpression.Operator.TIMES, infixExpression3.getOperator()); //$NON-NLS-1$
ITypeBinding typeBinding = infixExpression3.resolveTypeBinding();
assertNotNull("No binding", typeBinding); //$NON-NLS-1$
- assertEquals("Not int", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("Not Number", "Number", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
checkSourceRange(infixExpression3, "10 * 30", source); //$NON-NLS-1$
}
-
- /**
- * Initializer
- */
- public void test0200() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0200", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- ASTNode node2 = getASTNode((CompilationUnit) result, 1, 0, 0);
- assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
- VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
- List fragments = variableDeclarationStatement.fragments();
- assertTrue("No fragment", fragments.size() == 1); //$NON-NLS-1$
- VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
- Expression initialization = fragment.getInitializer();
- assertTrue("Not an infixExpression", initialization instanceof FieldAccess); //$NON-NLS-1$
- FieldAccess fieldAccess = (FieldAccess) initialization;
- Expression receiver = fieldAccess.getExpression();
- assertTrue("ArrayCreation", receiver instanceof ArrayCreation); //$NON-NLS-1$
- ArrayCreation arrayCreation = (ArrayCreation) receiver;
- List dimensions = arrayCreation.dimensions();
- assertEquals("Wrong dimension", 1, dimensions.size()); //$NON-NLS-1$
- Expression dim = (Expression) dimensions.get(0);
- assertTrue("InfixExpression", dim instanceof InfixExpression); //$NON-NLS-1$
- InfixExpression infixExpression = (InfixExpression) dim;
- ITypeBinding typeBinding = infixExpression.resolveTypeBinding();
- assertNotNull("No binding", typeBinding); //$NON-NLS-1$
- assertEquals("Not int", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- checkSourceRange(infixExpression, "1 + 2", source); //$NON-NLS-1$
- }
+//
+// /**
+// * Initializer
+// */
+// public void test0200() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0200", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// ASTNode node2 = getASTNode((CompilationUnit) result, 1, 0, 0);
+// assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
+// VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
+// List fragments = variableDeclarationStatement.fragments();
+// assertTrue("No fragment", fragments.size() == 1); //$NON-NLS-1$
+// VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+// Expression initialization = fragment.getInitializer();
+// assertTrue("Not an infixExpression", initialization instanceof FieldAccess); //$NON-NLS-1$
+// FieldAccess fieldAccess = (FieldAccess) initialization;
+// Expression receiver = fieldAccess.getExpression();
+// assertTrue("ArrayCreation", receiver instanceof ArrayCreation); //$NON-NLS-1$
+// ArrayCreation arrayCreation = (ArrayCreation) receiver;
+// List dimensions = arrayCreation.dimensions();
+// assertEquals("Wrong dimension", 1, dimensions.size()); //$NON-NLS-1$
+// Expression dim = (Expression) dimensions.get(0);
+// assertTrue("InfixExpression", dim instanceof InfixExpression); //$NON-NLS-1$
+// InfixExpression infixExpression = (InfixExpression) dim;
+// ITypeBinding typeBinding = infixExpression.resolveTypeBinding();
+// assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+// assertEquals("Not int", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// checkSourceRange(infixExpression, "1 + 2", source); //$NON-NLS-1$
+// }
/**
* Position inside for statement: PR 3300
*/
public void test0201() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0201", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0201", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -4783,20 +4864,20 @@ public class ASTConverterTest extends ConverterTestSetup {
List initializers = forStatement.initializers();
assertTrue("wrong size", initializers.size() == 1); //$NON-NLS-1$
Expression init = (Expression) initializers.get(0);
- checkSourceRange(init, "int i= 0", source); //$NON-NLS-1$
+ checkSourceRange(init, "var i= 0", source); //$NON-NLS-1$
}
/**
* PR 7386
*/
public void test0202() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0202", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0202", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0);
- assertTrue("FieldDeclaration", node2 instanceof FieldDeclaration); //$NON-NLS-1$
- FieldDeclaration fieldDeclaration = (FieldDeclaration) node2;
- checkSourceRange(fieldDeclaration, "int f= (2);", source); //$NON-NLS-1$
+ assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
+ VariableDeclarationStatement fieldDeclaration = (VariableDeclarationStatement) node2;
+ checkSourceRange(fieldDeclaration, "var f= (2);", source); //$NON-NLS-1$
List fragments = fieldDeclaration.fragments();
assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
@@ -4805,20 +4886,20 @@ public class ASTConverterTest extends ConverterTestSetup {
checkSourceRange(initialization, "(2)", source); //$NON-NLS-1$
ITypeBinding typeBinding = initialization.resolveTypeBinding();
assertNotNull("no binding", typeBinding); //$NON-NLS-1$
- assertEquals("not int", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("not Number", "Number", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
}
/**
* PR 7386
*/
public void test0203() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0203", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0203", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0);
- assertTrue("FieldDeclaration", node2 instanceof FieldDeclaration); //$NON-NLS-1$
- FieldDeclaration fieldDeclaration = (FieldDeclaration) node2;
- checkSourceRange(fieldDeclaration, "int f= (2);", source); //$NON-NLS-1$
+ assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
+ VariableDeclarationStatement fieldDeclaration = (VariableDeclarationStatement) node2;
+ checkSourceRange(fieldDeclaration, "var f= (2);", source); //$NON-NLS-1$
List fragments = fieldDeclaration.fragments();
assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
@@ -4830,21 +4911,21 @@ public class ASTConverterTest extends ConverterTestSetup {
checkSourceRange(expr, "2", source); //$NON-NLS-1$
ITypeBinding typeBinding = expr.resolveTypeBinding();
assertNotNull("no binding", typeBinding); //$NON-NLS-1$
- assertEquals("not int", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("type binding is canonical", typeBinding == parenthesizedExpression.resolveTypeBinding()); //$NON-NLS-1$
+ assertEquals("not Number", "Number", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// assertTrue("type binding is canonical", typeBinding == parenthesizedExpression.resolveTypeBinding()); //$NON-NLS-1$
}
/**
* PR 7386
*/
public void test0204() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0204", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0204", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0);
- assertTrue("FieldDeclaration", node2 instanceof FieldDeclaration); //$NON-NLS-1$
- FieldDeclaration fieldDeclaration = (FieldDeclaration) node2;
- checkSourceRange(fieldDeclaration, "int f= ((2));", source); //$NON-NLS-1$
+ assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
+ VariableDeclarationStatement fieldDeclaration = (VariableDeclarationStatement) node2;
+ checkSourceRange(fieldDeclaration, "var f= ((2));", source); //$NON-NLS-1$
List fragments = fieldDeclaration.fragments();
assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
@@ -4860,108 +4941,108 @@ public class ASTConverterTest extends ConverterTestSetup {
checkSourceRange(expr, "2", source); //$NON-NLS-1$
ITypeBinding typeBinding = expr.resolveTypeBinding();
assertNotNull("no binding", typeBinding); //$NON-NLS-1$
- assertEquals("not int", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("not Number", "Number", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
typeBinding = parenthesizedExpression.resolveTypeBinding();
assertNotNull("no binding", typeBinding); //$NON-NLS-1$
- assertEquals("not int", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("type binding is canonical", typeBinding == parenthesizedExpression2.resolveTypeBinding()); //$NON-NLS-1$
- }
-
-
- /**
- * Local class end position when trailing comment
- * @deprecated using deprecated code
- */
- public void test0205() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0205", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
- assertTrue("TypeDeclarationStatement", node2 instanceof TypeDeclarationStatement); //$NON-NLS-1$
- TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) node2;
- TypeDeclaration typeDeclaration = typeDeclarationStatement.getTypeDeclaration();
- assertEquals("wrong name", "AA", typeDeclaration.getName().getIdentifier()); //$NON-NLS-1$ //$NON-NLS-2$
- checkSourceRange(typeDeclaration, "class AA extends Test {}", source); //$NON-NLS-1$
+ assertEquals("not Number", "Number", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// assertTrue("type binding is canonical", typeBinding == parenthesizedExpression2.resolveTypeBinding()); //$NON-NLS-1$
}
- /**
- * QualifiedName
- */
- public void test0206() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0206", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- ASTNode node2 = getASTNode((CompilationUnit) result, 0, 5, 0);
- assertTrue("ReturnStatement", node2 instanceof ReturnStatement); //$NON-NLS-1$
- ReturnStatement returnStatement = (ReturnStatement) node2;
- Expression expr = returnStatement.getExpression();
- assertTrue("Not a qualifiedName", expr instanceof QualifiedName); //$NON-NLS-1$
- QualifiedName qualifiedName = (QualifiedName) expr;
- ITypeBinding typeBinding = expr.resolveTypeBinding();
- assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
- assertEquals("Not an int (typeBinding)", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- checkSourceRange(qualifiedName, "field1.field2.field3.field4.i", source); //$NON-NLS-1$
- assertTrue("Not a simple name", qualifiedName.getName().isSimpleName()); //$NON-NLS-1$
- SimpleName simpleName = qualifiedName.getName();
- assertTrue("a declaration", !simpleName.isDeclaration()); //$NON-NLS-1$
- checkSourceRange(simpleName, "i", source); //$NON-NLS-1$
- ITypeBinding typeBinding2 = simpleName.resolveTypeBinding();
- assertNotNull("No typebinding2", typeBinding2); //$NON-NLS-1$
- assertEquals("Not an int (typeBinding2)", "int", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- IBinding binding = simpleName.resolveBinding();
- assertNotNull("No binding", binding); //$NON-NLS-1$
- assertTrue("VariableBinding", binding instanceof IVariableBinding); //$NON-NLS-1$
- IVariableBinding variableBinding = (IVariableBinding) binding;
- assertEquals("Not Test", "Test", variableBinding.getDeclaringClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Not default", Modifier.PUBLIC, variableBinding.getModifiers()); //$NON-NLS-1$
- Name qualifierName = qualifiedName.getQualifier();
- assertTrue("Not a qualified name", qualifierName.isQualifiedName()); //$NON-NLS-1$
- checkSourceRange(qualifierName, "field1.field2.field3.field4", source); //$NON-NLS-1$
- ITypeBinding typeBinding5 = qualifierName.resolveTypeBinding();
- assertNotNull("No binding5", typeBinding5); //$NON-NLS-1$
- assertEquals("Not Test", "Test", typeBinding5.getName()); //$NON-NLS-1$ //$NON-NLS-2$
-
- qualifiedName = (QualifiedName) qualifierName;
- simpleName = qualifiedName.getName();
- checkSourceRange(simpleName, "field4", source); //$NON-NLS-1$
- ITypeBinding typeBinding6 = simpleName.resolveTypeBinding();
- assertNotNull("No binding6", typeBinding6); //$NON-NLS-1$
- assertEquals("Not Test", "Test", typeBinding6.getName()); //$NON-NLS-1$ //$NON-NLS-2$
-
- qualifierName = qualifiedName.getQualifier();
- assertTrue("Not a qualified name", qualifierName.isQualifiedName()); //$NON-NLS-1$
- checkSourceRange(qualifierName, "field1.field2.field3", source); //$NON-NLS-1$
- ITypeBinding typeBinding7 = qualifierName.resolveTypeBinding();
- assertNotNull("No binding7", typeBinding7); //$NON-NLS-1$
- assertEquals("Not Test", "Test", typeBinding7.getName()); //$NON-NLS-1$ //$NON-NLS-2$
-
- qualifiedName = (QualifiedName) qualifierName;
- simpleName = qualifiedName.getName();
- checkSourceRange(simpleName, "field3", source); //$NON-NLS-1$
- qualifierName = qualifiedName.getQualifier();
- assertTrue("Not a qualified name", qualifierName.isQualifiedName()); //$NON-NLS-1$
- checkSourceRange(qualifierName, "field1.field2", source); //$NON-NLS-1$
- ITypeBinding typeBinding3 = qualifierName.resolveTypeBinding();
- assertNotNull("No binding3", typeBinding3); //$NON-NLS-1$
- assertEquals("Not Test", "Test", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- qualifiedName = (QualifiedName) qualifierName;
- simpleName = qualifiedName.getName();
- checkSourceRange(simpleName, "field2", source); //$NON-NLS-1$
- qualifierName = qualifiedName.getQualifier();
- assertTrue("Not a simple name", qualifierName.isSimpleName()); //$NON-NLS-1$
- assertTrue("a declaration", !((SimpleName)qualifierName).isDeclaration()); //$NON-NLS-1$
- checkSourceRange(qualifierName, "field1", source); //$NON-NLS-1$
- ITypeBinding typeBinding4 = qualifierName.resolveTypeBinding();
- assertNotNull("No binding4", typeBinding4); //$NON-NLS-1$
- assertEquals("Not Test", "Test", typeBinding4.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
+// /**
+// * Local class end position when trailing comment
+// * @deprecated using deprecated code
+// */
+// public void test0205() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0205", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
+// assertTrue("TypeDeclarationStatement", node2 instanceof TypeDeclarationStatement); //$NON-NLS-1$
+// TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) node2;
+// TypeDeclaration typeDeclaration = typeDeclarationStatement.getTypeDeclaration();
+// assertEquals("wrong name", "AA", typeDeclaration.getName().getIdentifier()); //$NON-NLS-1$ //$NON-NLS-2$
+// checkSourceRange(typeDeclaration, "class AA extends Test {}", source); //$NON-NLS-1$
+// }
+
+// /**
+// * QualifiedName
+// */
+// public void test0206() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0206", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// ASTNode node2 = getASTNode((CompilationUnit) result, 0, 5, 0);
+// assertTrue("ReturnStatement", node2 instanceof ReturnStatement); //$NON-NLS-1$
+// ReturnStatement returnStatement = (ReturnStatement) node2;
+// Expression expr = returnStatement.getExpression();
+// assertTrue("Not a qualifiedName", expr instanceof QualifiedName); //$NON-NLS-1$
+// QualifiedName qualifiedName = (QualifiedName) expr;
+// ITypeBinding typeBinding = expr.resolveTypeBinding();
+// assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+// assertEquals("Not an int (typeBinding)", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// checkSourceRange(qualifiedName, "field1.field2.field3.field4.i", source); //$NON-NLS-1$
+// assertTrue("Not a simple name", qualifiedName.getName().isSimpleName()); //$NON-NLS-1$
+// SimpleName simpleName = qualifiedName.getName();
+// assertTrue("a declaration", !simpleName.isDeclaration()); //$NON-NLS-1$
+// checkSourceRange(simpleName, "i", source); //$NON-NLS-1$
+// ITypeBinding typeBinding2 = simpleName.resolveTypeBinding();
+// assertNotNull("No typebinding2", typeBinding2); //$NON-NLS-1$
+// assertEquals("Not an int (typeBinding2)", "int", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// IBinding binding = simpleName.resolveBinding();
+// assertNotNull("No binding", binding); //$NON-NLS-1$
+// assertTrue("VariableBinding", binding instanceof IVariableBinding); //$NON-NLS-1$
+// IVariableBinding variableBinding = (IVariableBinding) binding;
+// assertEquals("Not Test", "Test", variableBinding.getDeclaringClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// assertEquals("Not default", Modifier.PUBLIC, variableBinding.getModifiers()); //$NON-NLS-1$
+// Name qualifierName = qualifiedName.getQualifier();
+// assertTrue("Not a qualified name", qualifierName.isQualifiedName()); //$NON-NLS-1$
+// checkSourceRange(qualifierName, "field1.field2.field3.field4", source); //$NON-NLS-1$
+// ITypeBinding typeBinding5 = qualifierName.resolveTypeBinding();
+// assertNotNull("No binding5", typeBinding5); //$NON-NLS-1$
+// assertEquals("Not Test", "Test", typeBinding5.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+//
+// qualifiedName = (QualifiedName) qualifierName;
+// simpleName = qualifiedName.getName();
+// checkSourceRange(simpleName, "field4", source); //$NON-NLS-1$
+// ITypeBinding typeBinding6 = simpleName.resolveTypeBinding();
+// assertNotNull("No binding6", typeBinding6); //$NON-NLS-1$
+// assertEquals("Not Test", "Test", typeBinding6.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+//
+// qualifierName = qualifiedName.getQualifier();
+// assertTrue("Not a qualified name", qualifierName.isQualifiedName()); //$NON-NLS-1$
+// checkSourceRange(qualifierName, "field1.field2.field3", source); //$NON-NLS-1$
+// ITypeBinding typeBinding7 = qualifierName.resolveTypeBinding();
+// assertNotNull("No binding7", typeBinding7); //$NON-NLS-1$
+// assertEquals("Not Test", "Test", typeBinding7.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+//
+// qualifiedName = (QualifiedName) qualifierName;
+// simpleName = qualifiedName.getName();
+// checkSourceRange(simpleName, "field3", source); //$NON-NLS-1$
+// qualifierName = qualifiedName.getQualifier();
+// assertTrue("Not a qualified name", qualifierName.isQualifiedName()); //$NON-NLS-1$
+// checkSourceRange(qualifierName, "field1.field2", source); //$NON-NLS-1$
+// ITypeBinding typeBinding3 = qualifierName.resolveTypeBinding();
+// assertNotNull("No binding3", typeBinding3); //$NON-NLS-1$
+// assertEquals("Not Test", "Test", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// qualifiedName = (QualifiedName) qualifierName;
+// simpleName = qualifiedName.getName();
+// checkSourceRange(simpleName, "field2", source); //$NON-NLS-1$
+// qualifierName = qualifiedName.getQualifier();
+// assertTrue("Not a simple name", qualifierName.isSimpleName()); //$NON-NLS-1$
+// assertTrue("a declaration", !((SimpleName)qualifierName).isDeclaration()); //$NON-NLS-1$
+// checkSourceRange(qualifierName, "field1", source); //$NON-NLS-1$
+// ITypeBinding typeBinding4 = qualifierName.resolveTypeBinding();
+// assertNotNull("No binding4", typeBinding4); //$NON-NLS-1$
+// assertEquals("Not Test", "Test", typeBinding4.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
+//
/**
* Check javadoc for MethodDeclaration
* @deprecated marking deprecated since using deprecated code
*/
public void test0207() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0207", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0207", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -4971,7 +5052,7 @@ public class ASTConverterTest extends ConverterTestSetup {
Javadoc javadoc = this.ast.newJavadoc();
javadoc.setComment("/** JavaDoc Comment*/");//$NON-NLS-1$*/
assertTrue("Both AST trees should be identical", javadoc.subtreeMatch(new ASTMatcher(), actualJavadoc));//$NON-NLS-1$
- checkSourceRange(node, "/** JavaDoc Comment*/\n void foo(final int i) {}", source); //$NON-NLS-1$
+ checkSourceRange(node, "/** JavaDoc Comment*/\n function foo( i) {}", source); //$NON-NLS-1$
checkSourceRange(actualJavadoc, "/** JavaDoc Comment*/", source); //$NON-NLS-1$
}
@@ -4979,7 +5060,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* Check javadoc for MethodDeclaration
*/
public void test0208() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0208", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0208", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -4987,14 +5068,14 @@ public class ASTConverterTest extends ConverterTestSetup {
assertTrue("The node is not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
Javadoc actualJavadoc = ((MethodDeclaration) node).getJavadoc();
assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
- checkSourceRange(node, "void foo(final int i) {}", source); //$NON-NLS-1$
+ checkSourceRange(node, "function foo( i) {}", source); //$NON-NLS-1$
}
/**
* Check javadoc for MethodDeclaration
*/
public void test0209() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0209", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0209", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -5002,273 +5083,273 @@ public class ASTConverterTest extends ConverterTestSetup {
assertTrue("The node is not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
Javadoc actualJavadoc = ((MethodDeclaration) node).getJavadoc();
assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
- checkSourceRange(node, "void foo(final int i) {}", source); //$NON-NLS-1$
+ checkSourceRange(node, "function foo( i) {}", source); //$NON-NLS-1$
}
/**
- * Check javadoc for FieldDeclaration
+ * Check javadoc for VariableDeclarationStatement
* @deprecated marking deprecated since using deprecated code
*/
public void test0210() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0210", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0210", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- assertTrue("The node is not a FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
- Javadoc actualJavadoc = ((FieldDeclaration) node).getJavadoc();
+ assertTrue("The node is not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+ Javadoc actualJavadoc = ((VariableDeclarationStatement) node).getJavadoc();
Javadoc javadoc = this.ast.newJavadoc();
javadoc.setComment("/** JavaDoc Comment*/");//$NON-NLS-1$*/
assertTrue("Both AST trees should be identical", javadoc.subtreeMatch(new ASTMatcher(), actualJavadoc));//$NON-NLS-1$
- checkSourceRange(node, "/** JavaDoc Comment*/\n int i;", source); //$NON-NLS-1$
+ checkSourceRange(node, "/** JavaDoc Comment*/\n var i;", source); //$NON-NLS-1$
}
/**
- * Check javadoc for FieldDeclaration
+ * Check javadoc for VariableDeclarationStatement
*/
public void test0211() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0211", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0211", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- assertTrue("The node is not a FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
- Javadoc actualJavadoc = ((FieldDeclaration) node).getJavadoc();
+ assertTrue("The node is not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+ Javadoc actualJavadoc = ((VariableDeclarationStatement) node).getJavadoc();
assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
- checkSourceRange(node, "int i;", source); //$NON-NLS-1$
+ checkSourceRange(node, "var i;", source); //$NON-NLS-1$
}
/**
- * Check javadoc for FieldDeclaration
+ * Check javadoc for VariableDeclarationStatement
*/
public void test0212() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0212", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0212", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- assertTrue("The node is not a FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
- Javadoc actualJavadoc = ((FieldDeclaration) node).getJavadoc();
+ assertTrue("The node is not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+ Javadoc actualJavadoc = ((VariableDeclarationStatement) node).getJavadoc();
assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
- checkSourceRange(node, "int i;", source); //$NON-NLS-1$
+ checkSourceRange(node, "var i;", source); //$NON-NLS-1$
}
/**
* Check javadoc for TypeDeclaration
*/
public void test0213() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0213", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
- Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
- assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
- String expectedContents = "public class Test {\n" +//$NON-NLS-1$
- " int i;\n" +//$NON-NLS-1$
- "}";//$NON-NLS-1$
- checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
- }
-
- /**
- * Check javadoc for TypeDeclaration
- */
- public void test0214() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0214", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0213", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0);
+ ASTNode node = getASTNode((CompilationUnit) result, 0,0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
- Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
+ assertTrue("The node is not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+ Javadoc actualJavadoc = ((VariableDeclarationStatement) node).getJavadoc();
assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
- String expectedContents = "public class Test {\n" +//$NON-NLS-1$
- " int i;\n" +//$NON-NLS-1$
- "}";//$NON-NLS-1$
- checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
- }
-
- /**
- * Check javadoc for TypeDeclaration
- * @deprecated marking deprecated since using deprecated code
- */
- public void test0215() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0215", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
- Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
- Javadoc javadoc = this.ast.newJavadoc();
- javadoc.setComment("/** JavaDoc Comment*/");//$NON-NLS-1$*/
- assertTrue("Both AST trees should be identical", javadoc.subtreeMatch(new ASTMatcher(), actualJavadoc));//$NON-NLS-1$
- String expectedContents =
- "/** JavaDoc Comment*/\n" + //$NON-NLS-1$
- "public class Test {\n" +//$NON-NLS-1$
- " int i;\n" +//$NON-NLS-1$
- "}";//$NON-NLS-1$
- checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
- checkSourceRange(actualJavadoc, "/** JavaDoc Comment*/", source); //$NON-NLS-1$
- }
-
- /**
- * Check javadoc for MemberTypeDeclaration
- * @deprecated marking deprecated since using deprecated code
- */
- public void test0216() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0216", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
- Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
- Javadoc javadoc = this.ast.newJavadoc();
- javadoc.setComment("/** JavaDoc Comment*/");//$NON-NLS-1$*/
- assertTrue("Both AST trees should be identical", javadoc.subtreeMatch(new ASTMatcher(), actualJavadoc));//$NON-NLS-1$
- String expectedContents =
- "/** JavaDoc Comment*/\n" + //$NON-NLS-1$
- " class B {}";//$NON-NLS-1$
- checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
- checkSourceRange(actualJavadoc, "/** JavaDoc Comment*/", source); //$NON-NLS-1$
- }
-
- /**
- * Check javadoc for MemberTypeDeclaration
- */
- public void test0217() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0217", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
- Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
- assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
- checkSourceRange(node, "class B {}", source); //$NON-NLS-1$
- }
-
- /**
- * Check javadoc for MemberTypeDeclaration
- */
- public void test0218() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0218", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
- Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
- assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
- checkSourceRange(node, "public static class B {}", source); //$NON-NLS-1$
- }
-
- /**
- * Check javadoc for MemberTypeDeclaration
- */
- public void test0219() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0219", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
- Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
- assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
- checkSourceRange(node, "public static class B {}", source); //$NON-NLS-1$
- }
-
- /**
- * Checking initializers
- */
- public void test0220() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0220", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- checkSourceRange(node, "{}", source); //$NON-NLS-1$
- }
-
- /**
- * Checking initializers
- */
- public void test0221() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0221", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- checkSourceRange(node, "static {}", source); //$NON-NLS-1$
- }
-
- /**
- * Checking initializers
- * @deprecated marking deprecated since using deprecated code
- */
- public void test0222() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0222", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
- assertNotNull("Javadoc comment should no be null", actualJavadoc); //$NON-NLS-1$
- Javadoc javadoc = this.ast.newJavadoc();
- javadoc.setComment("/** JavaDoc Comment*/");//$NON-NLS-1$*/
- assertTrue("Both AST trees should be identical", javadoc.subtreeMatch(new ASTMatcher(), actualJavadoc));//$NON-NLS-1$
- String expectedContents =
- "/** JavaDoc Comment*/\n" + //$NON-NLS-1$
- " static {}";//$NON-NLS-1$
- checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
- checkSourceRange(actualJavadoc, "/** JavaDoc Comment*/", source); //$NON-NLS-1$
-
- }
-
- /**
- * Checking initializers
- * @deprecated marking deprecated since using deprecated code
- */
- public void test0223() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0223", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
- assertNotNull("Javadoc comment should not be null", actualJavadoc); //$NON-NLS-1$
- Javadoc javadoc = this.ast.newJavadoc();
- javadoc.setComment("/** JavaDoc Comment*/");//$NON-NLS-1$*/
- assertTrue("Both AST trees should be identical", javadoc.subtreeMatch(new ASTMatcher(), actualJavadoc));//$NON-NLS-1$
- String expectedContents =
- "/** JavaDoc Comment*/\n" + //$NON-NLS-1$
- " {}";//$NON-NLS-1$
- checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
- checkSourceRange(actualJavadoc, "/** JavaDoc Comment*/", source); //$NON-NLS-1$
-
- }
-
- /**
- * Checking initializers
- */
- public void test0224() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0224", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
- assertNotNull("Expression should not be null", node); //$NON-NLS-1$
- Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
- assertNull("Javadoc comment should be null", actualJavadoc); //$NON-NLS-1$
- checkSourceRange(node, "{}", source); //$NON-NLS-1$
- }
+ String expectedContents = "" +//$NON-NLS-1$
+ "var i;" +//$NON-NLS-1$
+ "";//$NON-NLS-1$
+ checkSourceRange(node, expectedContents, source); //$NON-NLS-1$ }
+ }
+
+// /**
+// * Check javadoc for TypeDeclaration
+// */
+// public void test0214() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0214", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+// Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
+// assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
+// String expectedContents = "public class Test {\n" +//$NON-NLS-1$
+// " int i;\n" +//$NON-NLS-1$
+// "}";//$NON-NLS-1$
+// checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
+// }
+//
+// /**
+// * Check javadoc for TypeDeclaration
+// * @deprecated marking deprecated since using deprecated code
+// */
+// public void test0215() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0215", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+// Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
+// Javadoc javadoc = this.ast.newJavadoc();
+// javadoc.setComment("/** JavaDoc Comment*/");//$NON-NLS-1$*/
+// assertTrue("Both AST trees should be identical", javadoc.subtreeMatch(new ASTMatcher(), actualJavadoc));//$NON-NLS-1$
+// String expectedContents =
+// "/** JavaDoc Comment*/\n" + //$NON-NLS-1$
+// "public class Test {\n" +//$NON-NLS-1$
+// " int i;\n" +//$NON-NLS-1$
+// "}";//$NON-NLS-1$
+// checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
+// checkSourceRange(actualJavadoc, "/** JavaDoc Comment*/", source); //$NON-NLS-1$
+// }
+
+// /**
+// * Check javadoc for MemberTypeDeclaration
+// * @deprecated marking deprecated since using deprecated code
+// */
+// public void test0216() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0216", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+// Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
+// Javadoc javadoc = this.ast.newJavadoc();
+// javadoc.setComment("/** JavaDoc Comment*/");//$NON-NLS-1$*/
+// assertTrue("Both AST trees should be identical", javadoc.subtreeMatch(new ASTMatcher(), actualJavadoc));//$NON-NLS-1$
+// String expectedContents =
+// "/** JavaDoc Comment*/\n" + //$NON-NLS-1$
+// " class B {}";//$NON-NLS-1$
+// checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
+// checkSourceRange(actualJavadoc, "/** JavaDoc Comment*/", source); //$NON-NLS-1$
+// }
+//
+// /**
+// * Check javadoc for MemberTypeDeclaration
+// */
+// public void test0217() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0217", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+// Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
+// assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
+// checkSourceRange(node, "class B {}", source); //$NON-NLS-1$
+// }
+//
+// /**
+// * Check javadoc for MemberTypeDeclaration
+// */
+// public void test0218() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0218", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+// Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
+// assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
+// checkSourceRange(node, "public static class B {}", source); //$NON-NLS-1$
+// }
+
+// /**
+// * Check javadoc for MemberTypeDeclaration
+// */
+// public void test0219() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0219", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+// Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
+// assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
+// checkSourceRange(node, "public static class B {}", source); //$NON-NLS-1$
+// }
+//
+// /**
+// * Checking initializers
+// */
+// public void test0220() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0220", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// checkSourceRange(node, "{}", source); //$NON-NLS-1$
+// }
+
+// /**
+// * Checking initializers
+// */
+// public void test0221() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0221", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// checkSourceRange(node, "static {}", source); //$NON-NLS-1$
+// }
+
+// /**
+// * Checking initializers
+// * @deprecated marking deprecated since using deprecated code
+// */
+// public void test0222() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0222", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
+// assertNotNull("Javadoc comment should no be null", actualJavadoc); //$NON-NLS-1$
+// Javadoc javadoc = this.ast.newJavadoc();
+// javadoc.setComment("/** JavaDoc Comment*/");//$NON-NLS-1$*/
+// assertTrue("Both AST trees should be identical", javadoc.subtreeMatch(new ASTMatcher(), actualJavadoc));//$NON-NLS-1$
+// String expectedContents =
+// "/** JavaDoc Comment*/\n" + //$NON-NLS-1$
+// " static {}";//$NON-NLS-1$
+// checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
+// checkSourceRange(actualJavadoc, "/** JavaDoc Comment*/", source); //$NON-NLS-1$
+//
+// }
+
+// /**
+// * Checking initializers
+// * @deprecated marking deprecated since using deprecated code
+// */
+// public void test0223() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0223", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
+// assertNotNull("Javadoc comment should not be null", actualJavadoc); //$NON-NLS-1$
+// Javadoc javadoc = this.ast.newJavadoc();
+// javadoc.setComment("/** JavaDoc Comment*/");//$NON-NLS-1$*/
+// assertTrue("Both AST trees should be identical", javadoc.subtreeMatch(new ASTMatcher(), actualJavadoc));//$NON-NLS-1$
+// String expectedContents =
+// "/** JavaDoc Comment*/\n" + //$NON-NLS-1$
+// " {}";//$NON-NLS-1$
+// checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
+// checkSourceRange(actualJavadoc, "/** JavaDoc Comment*/", source); //$NON-NLS-1$
+//
+// }
+
+// /**
+// * Checking initializers
+// */
+// public void test0224() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0224", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+// assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+// Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
+// assertNull("Javadoc comment should be null", actualJavadoc); //$NON-NLS-1$
+// checkSourceRange(node, "{}", source); //$NON-NLS-1$
+// }
/**
* Continue ==> ContinueStatement
*/
public void test0225() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0225", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0225", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
LabeledStatement labeledStatement = (LabeledStatement) getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -5287,7 +5368,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* Break + label ==> BreakStatement
*/
public void test0226() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0226", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0226", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
LabeledStatement labeledStatement = (LabeledStatement) getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -5302,285 +5383,285 @@ public class ASTConverterTest extends ConverterTestSetup {
checkSourceRange(statement.getLabel(), "label", source); //$NON-NLS-1$
}
- /**
- * QualifiedName
- */
- public void test0227() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0227", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- ASTNode node2 = getASTNode((CompilationUnit) result, 3, 2, 0);
- assertTrue("ReturnStatement", node2 instanceof ReturnStatement); //$NON-NLS-1$
- ReturnStatement returnStatement = (ReturnStatement) node2;
- Expression expr = returnStatement.getExpression();
- assertTrue("Not a qualifiedName", expr instanceof QualifiedName); //$NON-NLS-1$
- QualifiedName qualifiedName = (QualifiedName) expr;
- ITypeBinding typeBinding = expr.resolveTypeBinding();
- assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
- assertEquals("Not an long (typeBinding)", "long", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- checkSourceRange(qualifiedName, "field.fB.fA.j", source); //$NON-NLS-1$
-
- SimpleName simpleName = qualifiedName.getName();
- checkSourceRange(simpleName, "j", source); //$NON-NLS-1$
- ITypeBinding typeBinding2 = simpleName.resolveTypeBinding();
- assertEquals("Not an long (typeBinding2)", "long", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- IBinding binding = simpleName.resolveBinding();
- assertNotNull("No binding", binding); //$NON-NLS-1$
- assertTrue("VariableBinding", binding instanceof IVariableBinding); //$NON-NLS-1$
- IVariableBinding variableBinding = (IVariableBinding) binding;
- assertEquals("Not A", "A", variableBinding.getDeclaringClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Not default", Modifier.NONE, variableBinding.getModifiers()); //$NON-NLS-1$
- assertEquals("wrong name", "j", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
-
- Name qualifierName = qualifiedName.getQualifier();
- assertTrue("Not a qualified name", qualifierName.isQualifiedName()); //$NON-NLS-1$
- checkSourceRange(qualifierName, "field.fB.fA", source); //$NON-NLS-1$
- qualifiedName = (QualifiedName) qualifierName;
- ITypeBinding typeBinding3 = qualifiedName.resolveTypeBinding();
- assertNotNull("No type binding3", typeBinding3); //$NON-NLS-1$
- assertEquals("Not an A", "A", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- simpleName = qualifiedName.getName();
- checkSourceRange(simpleName, "fA", source); //$NON-NLS-1$
- ITypeBinding typeBinding4 = simpleName.resolveTypeBinding();
- assertNotNull("No typeBinding4", typeBinding4); //$NON-NLS-1$
- assertEquals("Not an A", "A", typeBinding4.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- IBinding binding2 = qualifiedName.resolveBinding();
- assertNotNull("No binding2", binding2); //$NON-NLS-1$
- assertTrue("VariableBinding", binding2 instanceof IVariableBinding); //$NON-NLS-1$
- IVariableBinding variableBinding2 = (IVariableBinding) binding2;
- assertEquals("Not B", "B", variableBinding2.getDeclaringClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Not default", Modifier.NONE, variableBinding2.getModifiers()); //$NON-NLS-1$
- assertEquals("wrong name", "fA", variableBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
-
- qualifierName = qualifiedName.getQualifier();
- assertTrue("Not a qualified name", qualifierName.isQualifiedName()); //$NON-NLS-1$
- checkSourceRange(qualifierName, "field.fB", source); //$NON-NLS-1$
- qualifiedName = (QualifiedName) qualifierName;
- ITypeBinding typeBinding5 = qualifiedName.resolveTypeBinding();
- assertNotNull("No typeBinding5", typeBinding5); //$NON-NLS-1$
- assertEquals("Not a B", "B", typeBinding5.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- simpleName = qualifiedName.getName();
- checkSourceRange(simpleName, "fB", source); //$NON-NLS-1$
- ITypeBinding typeBinding6 = simpleName.resolveTypeBinding();
- assertNotNull("No typebinding6", typeBinding6); //$NON-NLS-1$
- assertEquals("not a B", "B", typeBinding6.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- IBinding binding3 = qualifiedName.resolveBinding();
- assertNotNull("No binding2", binding3); //$NON-NLS-1$
- assertTrue("VariableBinding", binding3 instanceof IVariableBinding); //$NON-NLS-1$
- IVariableBinding variableBinding3 = (IVariableBinding) binding3;
- assertEquals("Not C", "C", variableBinding3.getDeclaringClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Not default", Modifier.NONE, variableBinding3.getModifiers()); //$NON-NLS-1$
- assertEquals("wrong name", "fB", variableBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
-
- qualifierName = qualifiedName.getQualifier();
- assertTrue("Not a simple name", qualifierName.isSimpleName()); //$NON-NLS-1$
- checkSourceRange(qualifierName, "field", source); //$NON-NLS-1$
- simpleName = (SimpleName) qualifierName;
- ITypeBinding typeBinding7 = simpleName.resolveTypeBinding();
- assertNotNull("No typeBinding7", typeBinding7); //$NON-NLS-1$
- assertEquals("Not a C", "C", typeBinding7.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- IBinding binding4 = simpleName.resolveBinding();
- assertNotNull("No binding4", binding4); //$NON-NLS-1$
- assertTrue("VariableBinding", binding4 instanceof IVariableBinding); //$NON-NLS-1$
- IVariableBinding variableBinding4 = (IVariableBinding) binding4;
- assertEquals("Not Test", "Test", variableBinding4.getDeclaringClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Not public", Modifier.PUBLIC, variableBinding4.getModifiers()); //$NON-NLS-1$
- assertEquals("wrong name", "field", variableBinding4.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("wrong return type", "C", variableBinding4.getType().getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * QualifiedName as TypeReference
- */
- public void test0228() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0228", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
- assertTrue("ReturnStatement", node2 instanceof ReturnStatement); //$NON-NLS-1$
- ReturnStatement returnStatement = (ReturnStatement) node2;
- Expression expr = returnStatement.getExpression();
- checkSourceRange(expr, "test0228.Test.foo()", source); //$NON-NLS-1$
- assertTrue("MethodInvocation", expr instanceof MethodInvocation); //$NON-NLS-1$
- MethodInvocation methodInvocation = (MethodInvocation) expr;
- Expression qualifier = methodInvocation.getExpression();
- assertNotNull("no qualifier", qualifier); //$NON-NLS-1$
- assertTrue("QualifiedName", qualifier instanceof QualifiedName); //$NON-NLS-1$
- QualifiedName qualifiedName = (QualifiedName) qualifier;
- checkSourceRange(qualifiedName, "test0228.Test", source); //$NON-NLS-1$
- ITypeBinding typeBinding = qualifiedName.resolveTypeBinding();
- assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
- assertEquals("Wrong type", "Test", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- IBinding binding = qualifiedName.resolveBinding();
- assertNotNull("No binding", binding); //$NON-NLS-1$
- assertEquals("Not a type", IBinding.TYPE, binding.getKind()); //$NON-NLS-1$
-
- }
-
- /**
- * MethodInvocation
- */
- public void test0229() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0229", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
- assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
- ExpressionStatement expressionStatement = (ExpressionStatement) node2;
- Expression expr = expressionStatement.getExpression();
- assertTrue("MethodInvocation", expr instanceof MethodInvocation); //$NON-NLS-1$
- checkSourceRange(expr, "System.err.println()", source); //$NON-NLS-1$
- MethodInvocation methodInvocation = (MethodInvocation) expr;
- Expression qualifier = methodInvocation.getExpression();
- assertTrue("QualifiedName", qualifier instanceof QualifiedName); //$NON-NLS-1$
- QualifiedName qualifiedName = (QualifiedName) qualifier;
- ITypeBinding typeBinding = qualifier.resolveTypeBinding();
- assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
- assertEquals("Wrong name", "PrintStream", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- IBinding binding = qualifiedName.resolveBinding();
- assertNotNull("No binding", binding); //$NON-NLS-1$
- assertTrue("VariableBinding", binding instanceof IVariableBinding); //$NON-NLS-1$
- IVariableBinding variableBinding = (IVariableBinding) binding;
- assertEquals("wrong name", "err", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- SimpleName methodName = methodInvocation.getName();
- IBinding binding2 = methodName.resolveBinding();
- assertNotNull("No binding2", binding2); //$NON-NLS-1$
- }
+// /**
+// * QualifiedName
+// */
+// public void test0227() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0227", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// ASTNode node2 = getASTNode((CompilationUnit) result, 3, 2, 0);
+// assertTrue("ReturnStatement", node2 instanceof ReturnStatement); //$NON-NLS-1$
+// ReturnStatement returnStatement = (ReturnStatement) node2;
+// Expression expr = returnStatement.getExpression();
+// assertTrue("Not a qualifiedName", expr instanceof QualifiedName); //$NON-NLS-1$
+// QualifiedName qualifiedName = (QualifiedName) expr;
+// ITypeBinding typeBinding = expr.resolveTypeBinding();
+// assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+// assertEquals("Not an long (typeBinding)", "long", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// checkSourceRange(qualifiedName, "field.fB.fA.j", source); //$NON-NLS-1$
+//
+// SimpleName simpleName = qualifiedName.getName();
+// checkSourceRange(simpleName, "j", source); //$NON-NLS-1$
+// ITypeBinding typeBinding2 = simpleName.resolveTypeBinding();
+// assertEquals("Not an long (typeBinding2)", "long", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// IBinding binding = simpleName.resolveBinding();
+// assertNotNull("No binding", binding); //$NON-NLS-1$
+// assertTrue("VariableBinding", binding instanceof IVariableBinding); //$NON-NLS-1$
+// IVariableBinding variableBinding = (IVariableBinding) binding;
+// assertEquals("Not A", "A", variableBinding.getDeclaringClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// assertEquals("Not default", Modifier.NONE, variableBinding.getModifiers()); //$NON-NLS-1$
+// assertEquals("wrong name", "j", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+//
+// Name qualifierName = qualifiedName.getQualifier();
+// assertTrue("Not a qualified name", qualifierName.isQualifiedName()); //$NON-NLS-1$
+// checkSourceRange(qualifierName, "field.fB.fA", source); //$NON-NLS-1$
+// qualifiedName = (QualifiedName) qualifierName;
+// ITypeBinding typeBinding3 = qualifiedName.resolveTypeBinding();
+// assertNotNull("No type binding3", typeBinding3); //$NON-NLS-1$
+// assertEquals("Not an A", "A", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// simpleName = qualifiedName.getName();
+// checkSourceRange(simpleName, "fA", source); //$NON-NLS-1$
+// ITypeBinding typeBinding4 = simpleName.resolveTypeBinding();
+// assertNotNull("No typeBinding4", typeBinding4); //$NON-NLS-1$
+// assertEquals("Not an A", "A", typeBinding4.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// IBinding binding2 = qualifiedName.resolveBinding();
+// assertNotNull("No binding2", binding2); //$NON-NLS-1$
+// assertTrue("VariableBinding", binding2 instanceof IVariableBinding); //$NON-NLS-1$
+// IVariableBinding variableBinding2 = (IVariableBinding) binding2;
+// assertEquals("Not B", "B", variableBinding2.getDeclaringClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// assertEquals("Not default", Modifier.NONE, variableBinding2.getModifiers()); //$NON-NLS-1$
+// assertEquals("wrong name", "fA", variableBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+//
+// qualifierName = qualifiedName.getQualifier();
+// assertTrue("Not a qualified name", qualifierName.isQualifiedName()); //$NON-NLS-1$
+// checkSourceRange(qualifierName, "field.fB", source); //$NON-NLS-1$
+// qualifiedName = (QualifiedName) qualifierName;
+// ITypeBinding typeBinding5 = qualifiedName.resolveTypeBinding();
+// assertNotNull("No typeBinding5", typeBinding5); //$NON-NLS-1$
+// assertEquals("Not a B", "B", typeBinding5.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// simpleName = qualifiedName.getName();
+// checkSourceRange(simpleName, "fB", source); //$NON-NLS-1$
+// ITypeBinding typeBinding6 = simpleName.resolveTypeBinding();
+// assertNotNull("No typebinding6", typeBinding6); //$NON-NLS-1$
+// assertEquals("not a B", "B", typeBinding6.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// IBinding binding3 = qualifiedName.resolveBinding();
+// assertNotNull("No binding2", binding3); //$NON-NLS-1$
+// assertTrue("VariableBinding", binding3 instanceof IVariableBinding); //$NON-NLS-1$
+// IVariableBinding variableBinding3 = (IVariableBinding) binding3;
+// assertEquals("Not C", "C", variableBinding3.getDeclaringClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// assertEquals("Not default", Modifier.NONE, variableBinding3.getModifiers()); //$NON-NLS-1$
+// assertEquals("wrong name", "fB", variableBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+//
+// qualifierName = qualifiedName.getQualifier();
+// assertTrue("Not a simple name", qualifierName.isSimpleName()); //$NON-NLS-1$
+// checkSourceRange(qualifierName, "field", source); //$NON-NLS-1$
+// simpleName = (SimpleName) qualifierName;
+// ITypeBinding typeBinding7 = simpleName.resolveTypeBinding();
+// assertNotNull("No typeBinding7", typeBinding7); //$NON-NLS-1$
+// assertEquals("Not a C", "C", typeBinding7.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// IBinding binding4 = simpleName.resolveBinding();
+// assertNotNull("No binding4", binding4); //$NON-NLS-1$
+// assertTrue("VariableBinding", binding4 instanceof IVariableBinding); //$NON-NLS-1$
+// IVariableBinding variableBinding4 = (IVariableBinding) binding4;
+// assertEquals("Not Test", "Test", variableBinding4.getDeclaringClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// assertEquals("Not public", Modifier.PUBLIC, variableBinding4.getModifiers()); //$NON-NLS-1$
+// assertEquals("wrong name", "field", variableBinding4.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// assertEquals("wrong return type", "C", variableBinding4.getType().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
+//
+// /**
+// * QualifiedName as TypeReference
+// */
+// public void test0228() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0228", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
+// assertTrue("ReturnStatement", node2 instanceof ReturnStatement); //$NON-NLS-1$
+// ReturnStatement returnStatement = (ReturnStatement) node2;
+// Expression expr = returnStatement.getExpression();
+// checkSourceRange(expr, "test0228.Test.foo()", source); //$NON-NLS-1$
+// assertTrue("MethodInvocation", expr instanceof MethodInvocation); //$NON-NLS-1$
+// MethodInvocation methodInvocation = (MethodInvocation) expr;
+// Expression qualifier = methodInvocation.getExpression();
+// assertNotNull("no qualifier", qualifier); //$NON-NLS-1$
+// assertTrue("QualifiedName", qualifier instanceof QualifiedName); //$NON-NLS-1$
+// QualifiedName qualifiedName = (QualifiedName) qualifier;
+// checkSourceRange(qualifiedName, "test0228.Test", source); //$NON-NLS-1$
+// ITypeBinding typeBinding = qualifiedName.resolveTypeBinding();
+// assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+// assertEquals("Wrong type", "Test", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// IBinding binding = qualifiedName.resolveBinding();
+// assertNotNull("No binding", binding); //$NON-NLS-1$
+// assertEquals("Not a type", IBinding.TYPE, binding.getKind()); //$NON-NLS-1$
+//
+// }
+
+// /**
+// * MethodInvocation
+// */
+// public void test0229() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0229", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
+// assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
+// ExpressionStatement expressionStatement = (ExpressionStatement) node2;
+// Expression expr = expressionStatement.getExpression();
+// assertTrue("MethodInvocation", expr instanceof MethodInvocation); //$NON-NLS-1$
+// checkSourceRange(expr, "System.err.println()", source); //$NON-NLS-1$
+// MethodInvocation methodInvocation = (MethodInvocation) expr;
+// Expression qualifier = methodInvocation.getExpression();
+// assertTrue("QualifiedName", qualifier instanceof QualifiedName); //$NON-NLS-1$
+// QualifiedName qualifiedName = (QualifiedName) qualifier;
+// ITypeBinding typeBinding = qualifier.resolveTypeBinding();
+// assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+// assertEquals("Wrong name", "PrintStream", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// IBinding binding = qualifiedName.resolveBinding();
+// assertNotNull("No binding", binding); //$NON-NLS-1$
+// assertTrue("VariableBinding", binding instanceof IVariableBinding); //$NON-NLS-1$
+// IVariableBinding variableBinding = (IVariableBinding) binding;
+// assertEquals("wrong name", "err", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// SimpleName methodName = methodInvocation.getName();
+// IBinding binding2 = methodName.resolveBinding();
+// assertNotNull("No binding2", binding2); //$NON-NLS-1$
+// }
- /**
- * MethodInvocation
- */
- public void test0230() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0230", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
- assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
- ExpressionStatement expressionStatement = (ExpressionStatement) node2;
- Expression expr = expressionStatement.getExpression();
- assertTrue("MethodInvocation", expr instanceof MethodInvocation); //$NON-NLS-1$
- checkSourceRange(expr, "err.println()", source); //$NON-NLS-1$
- MethodInvocation methodInvocation = (MethodInvocation) expr;
- Expression qualifier = methodInvocation.getExpression();
- assertTrue("SimpleName", qualifier instanceof SimpleName); //$NON-NLS-1$
- SimpleName name = (SimpleName) qualifier;
- IBinding binding = name.resolveBinding();
- assertNotNull("No binding", binding); //$NON-NLS-1$
- assertEquals("Wrong name", "err", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- ITypeBinding typeBinding = name.resolveTypeBinding();
- assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
- assertEquals("Wron type name", "PrintStream", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
+// /**
+// * MethodInvocation
+// */
+// public void test0230() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0230", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
+// assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
+// ExpressionStatement expressionStatement = (ExpressionStatement) node2;
+// Expression expr = expressionStatement.getExpression();
+// assertTrue("MethodInvocation", expr instanceof MethodInvocation); //$NON-NLS-1$
+// checkSourceRange(expr, "err.println()", source); //$NON-NLS-1$
+// MethodInvocation methodInvocation = (MethodInvocation) expr;
+// Expression qualifier = methodInvocation.getExpression();
+// assertTrue("SimpleName", qualifier instanceof SimpleName); //$NON-NLS-1$
+// SimpleName name = (SimpleName) qualifier;
+// IBinding binding = name.resolveBinding();
+// assertNotNull("No binding", binding); //$NON-NLS-1$
+// assertEquals("Wrong name", "err", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// ITypeBinding typeBinding = name.resolveTypeBinding();
+// assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+// assertEquals("Wron type name", "PrintStream", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
- /**
- * MethodInvocation
- */
- public void test0231() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0231", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
- assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
- ExpressionStatement expressionStatement = (ExpressionStatement) node2;
- Expression expr = expressionStatement.getExpression();
- assertTrue("MethodInvocation", expr instanceof MethodInvocation); //$NON-NLS-1$
- checkSourceRange(expr, "System.err.println()", source); //$NON-NLS-1$
- MethodInvocation methodInvocation = (MethodInvocation) expr;
- Expression qualifier = methodInvocation.getExpression();
- assertTrue("QualifiedName", qualifier instanceof QualifiedName); //$NON-NLS-1$
- QualifiedName qualifiedName = (QualifiedName) qualifier;
- ITypeBinding typeBinding = qualifier.resolveTypeBinding();
- assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
- assertEquals("Wrong name", "PrintStream", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- IBinding binding = qualifiedName.resolveBinding();
- assertNotNull("No binding", binding); //$NON-NLS-1$
- assertTrue("VariableBinding", binding instanceof IVariableBinding); //$NON-NLS-1$
- IVariableBinding variableBinding = (IVariableBinding) binding;
- assertEquals("wrong name", "err", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- SimpleName methodName = methodInvocation.getName();
- IBinding binding2 = methodName.resolveBinding();
- assertNotNull("No binding2", binding2); //$NON-NLS-1$
- Name name = qualifiedName.getQualifier();
- assertTrue("SimpleName", name.isSimpleName()); //$NON-NLS-1$
- SimpleName simpleName = (SimpleName) name;
- ITypeBinding typeBinding2 = simpleName.resolveTypeBinding();
- assertNotNull("No typeBinding2", typeBinding2); //$NON-NLS-1$
- assertEquals("wrong type name", "System", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * MethodInvocation
- */
- public void test0232() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0232", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
- assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
- VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
- List fragments = variableDeclarationStatement.fragments();
- assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
- VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
- Expression initialization = variableDeclarationFragment.getInitializer();
- ITypeBinding typeBinding = initialization.resolveTypeBinding();
- assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
- assertTrue("Not a primitive type", typeBinding.isPrimitive()); //$NON-NLS-1$
- assertEquals("wrong name", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("QualifiedName", initialization instanceof QualifiedName); //$NON-NLS-1$
- QualifiedName qualifiedName = (QualifiedName) initialization;
- SimpleName simpleName = qualifiedName.getName();
- ITypeBinding typeBinding2 = simpleName.resolveTypeBinding();
- assertNotNull("No type binding", typeBinding2); //$NON-NLS-1$
- assertTrue("Not a primitive type", typeBinding2.isPrimitive()); //$NON-NLS-1$
- assertEquals("wrong name", "int", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- IBinding binding = simpleName.resolveBinding();
- assertNotNull("No binding", binding); //$NON-NLS-1$
- assertTrue("IVariableBinding", binding instanceof IVariableBinding); //$NON-NLS-1$
- IVariableBinding variableBinding = (IVariableBinding) binding;
- assertNull("No declaring class", variableBinding.getDeclaringClass()); //$NON-NLS-1$
- }
+// /**
+// * MethodInvocation
+// */
+// public void test0231() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0231", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
+// assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
+// ExpressionStatement expressionStatement = (ExpressionStatement) node2;
+// Expression expr = expressionStatement.getExpression();
+// assertTrue("MethodInvocation", expr instanceof MethodInvocation); //$NON-NLS-1$
+// checkSourceRange(expr, "System.err.println()", source); //$NON-NLS-1$
+// MethodInvocation methodInvocation = (MethodInvocation) expr;
+// Expression qualifier = methodInvocation.getExpression();
+// assertTrue("QualifiedName", qualifier instanceof QualifiedName); //$NON-NLS-1$
+// QualifiedName qualifiedName = (QualifiedName) qualifier;
+// ITypeBinding typeBinding = qualifier.resolveTypeBinding();
+// assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+// assertEquals("Wrong name", "PrintStream", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// IBinding binding = qualifiedName.resolveBinding();
+// assertNotNull("No binding", binding); //$NON-NLS-1$
+// assertTrue("VariableBinding", binding instanceof IVariableBinding); //$NON-NLS-1$
+// IVariableBinding variableBinding = (IVariableBinding) binding;
+// assertEquals("wrong name", "err", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// SimpleName methodName = methodInvocation.getName();
+// IBinding binding2 = methodName.resolveBinding();
+// assertNotNull("No binding2", binding2); //$NON-NLS-1$
+// Name name = qualifiedName.getQualifier();
+// assertTrue("SimpleName", name.isSimpleName()); //$NON-NLS-1$
+// SimpleName simpleName = (SimpleName) name;
+// ITypeBinding typeBinding2 = simpleName.resolveTypeBinding();
+// assertNotNull("No typeBinding2", typeBinding2); //$NON-NLS-1$
+// assertEquals("wrong type name", "System", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
+
+// /**
+// * MethodInvocation
+// */
+// public void test0232() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0232", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
+// assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
+// VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
+// List fragments = variableDeclarationStatement.fragments();
+// assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
+// VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+// Expression initialization = variableDeclarationFragment.getInitializer();
+// ITypeBinding typeBinding = initialization.resolveTypeBinding();
+// assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+// assertTrue("Not a primitive type", typeBinding.isPrimitive()); //$NON-NLS-1$
+// assertEquals("wrong name", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// assertTrue("QualifiedName", initialization instanceof QualifiedName); //$NON-NLS-1$
+// QualifiedName qualifiedName = (QualifiedName) initialization;
+// SimpleName simpleName = qualifiedName.getName();
+// ITypeBinding typeBinding2 = simpleName.resolveTypeBinding();
+// assertNotNull("No type binding", typeBinding2); //$NON-NLS-1$
+// assertTrue("Not a primitive type", typeBinding2.isPrimitive()); //$NON-NLS-1$
+// assertEquals("wrong name", "int", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// IBinding binding = simpleName.resolveBinding();
+// assertNotNull("No binding", binding); //$NON-NLS-1$
+// assertTrue("IVariableBinding", binding instanceof IVariableBinding); //$NON-NLS-1$
+// IVariableBinding variableBinding = (IVariableBinding) binding;
+// assertNull("No declaring class", variableBinding.getDeclaringClass()); //$NON-NLS-1$
+// }
- /**
- * Checking that only syntax errors are reported for the MALFORMED tag
- */
- public void test0233() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0233", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("Expression should not be null", result); //$NON-NLS-1$
- assertTrue("The compilation unit is malformed", !isMalformed(result)); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit unit = (CompilationUnit) result;
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
- assertTrue("The fiels is not malformed", !isMalformed(node)); //$NON-NLS-1$
- assertEquals("No problem found", 1, unit.getMessages().length); //$NON-NLS-1$
- assertEquals("No problem found", 1, unit.getProblems().length); //$NON-NLS-1$
- }
-
- /**
- * Checking that null is returned for a resolveBinding if the type is unknown
- */
- public void test0234() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0234", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
- assertTrue("The fiels is not malformed", !isMalformed(node)); //$NON-NLS-1$
- CompilationUnit unit = (CompilationUnit) result;
- assertEquals("No problem found", 1, unit.getMessages().length); //$NON-NLS-1$
- assertEquals("No problem found", 1, unit.getProblems().length); //$NON-NLS-1$
- assertTrue("FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
- FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
- List fragments = fieldDeclaration.fragments();
- assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
- VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
- IVariableBinding variableBinding = fragment.resolveBinding();
- assertNull("binding not null", variableBinding); //$NON-NLS-1$
- }
+// /**
+// * Checking that only syntax errors are reported for the MALFORMED tag
+// */
+// public void test0233() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0233", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("Expression should not be null", result); //$NON-NLS-1$
+// assertTrue("The compilation unit is malformed", !isMalformed(result)); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit unit = (CompilationUnit) result;
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+// assertTrue("The fiels is not malformed", !isMalformed(node)); //$NON-NLS-1$
+// assertEquals("No problem found", 1, unit.getMessages().length); //$NON-NLS-1$
+// assertEquals("No problem found", 1, unit.getProblems().length); //$NON-NLS-1$
+// }
+//
+// /**
+// * Checking that null is returned for a resolveBinding if the type is unknown
+// */
+// public void test0234() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0234", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+// assertTrue("The fiels is not malformed", !isMalformed(node)); //$NON-NLS-1$
+// CompilationUnit unit = (CompilationUnit) result;
+// assertEquals("No problem found", 1, unit.getMessages().length); //$NON-NLS-1$
+// assertEquals("No problem found", 1, unit.getProblems().length); //$NON-NLS-1$
+// assertTrue("VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+// VariableDeclarationStatement fieldDeclaration = (VariableDeclarationStatement) node;
+// List fragments = fieldDeclaration.fragments();
+// assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
+// VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+// IVariableBinding variableBinding = fragment.resolveBinding();
+// assertNull("binding not null", variableBinding); //$NON-NLS-1$
+// }
/**
* Checking that null is returned for a resolveBinding if the type is unknown
*/
public void test0235() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0235", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0235", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -5588,8 +5669,8 @@ public class ASTConverterTest extends ConverterTestSetup {
CompilationUnit unit = (CompilationUnit) result;
assertEquals("problems found", 0, unit.getMessages().length); //$NON-NLS-1$
assertEquals("problems found", 0, unit.getProblems().length); //$NON-NLS-1$
- assertTrue("FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
- FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+ assertTrue("VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+ VariableDeclarationStatement fieldDeclaration = (VariableDeclarationStatement) node;
List fragments = fieldDeclaration.fragments();
assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
@@ -5601,10 +5682,10 @@ public class ASTConverterTest extends ConverterTestSetup {
* Test the removal of a IField inside a CU that has an initializer
*/
public void test0236() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0236", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- IType type = sourceUnit.getType("Test"); //$NON-NLS-1$
- assertNotNull("No type", type); //$NON-NLS-1$
- IField field = type.getField("i"); //$NON-NLS-1$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0236", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// IType type = sourceUnit.getType("Test"); //$NON-NLS-1$
+// assertNotNull("No type", type); //$NON-NLS-1$
+ IField field = sourceUnit.getField("i"); //$NON-NLS-1$
assertNotNull("No field", field); //$NON-NLS-1$
field.delete(true, null);
}
@@ -5613,213 +5694,213 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=9452
*/
public void test0237() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "junit.framework", "TestCase.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "junit.framework", "TestCase.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
}
- /**
- * Check ThisExpression
- * @deprecated using deprecated code
- */
- public void test0238() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0238", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- char[] source = sourceUnit.getSource().toCharArray();
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
- assertTrue("Not a type declaration statement", node instanceof TypeDeclarationStatement); //$NON-NLS-1$
- TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) node;
- TypeDeclaration typeDecl = typeDeclarationStatement.getTypeDeclaration();
- Object o = typeDecl.bodyDeclarations().get(0);
- assertTrue("Not a method", o instanceof MethodDeclaration); //$NON-NLS-1$
- MethodDeclaration methodDecl = (MethodDeclaration) o;
- Block block = methodDecl.getBody();
- List statements = block.statements();
- assertEquals("Not 1", 1, statements.size()); //$NON-NLS-1$
- Statement stmt = (Statement) statements.get(0);
- assertTrue("Not a return statement", stmt instanceof ReturnStatement); //$NON-NLS-1$
- ReturnStatement returnStatement = (ReturnStatement) stmt;
- Expression expr = returnStatement.getExpression();
- assertTrue("Not a method invocation", expr instanceof MethodInvocation); //$NON-NLS-1$
- MethodInvocation methodInvocation = (MethodInvocation) expr;
- checkSourceRange(methodInvocation, "Test.this.bar()", source); //$NON-NLS-1$
- Expression qualifier = methodInvocation.getExpression();
- assertTrue("Not a ThisExpression", qualifier instanceof ThisExpression); //$NON-NLS-1$
- ThisExpression thisExpression = (ThisExpression) qualifier;
- Name name = thisExpression.getQualifier();
- IBinding binding = name.resolveBinding();
- assertNotNull("No binding", binding); //$NON-NLS-1$
- assertEquals("wrong name", "Test", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Check ThisExpression
- * @deprecated using deprecated code
- */
- public void test0239() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0239", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- ASTNode node = getASTNode((CompilationUnit) result, 1, 0, 0);
- assertTrue("Not a type declaration statement", node instanceof TypeDeclarationStatement); //$NON-NLS-1$
- TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) node;
- TypeDeclaration typeDecl = typeDeclarationStatement.getTypeDeclaration();
- Object o = typeDecl.bodyDeclarations().get(0);
- assertTrue("Not a method", o instanceof MethodDeclaration); //$NON-NLS-1$
- MethodDeclaration methodDecl = (MethodDeclaration) o;
- Block block = methodDecl.getBody();
- List statements = block.statements();
- assertEquals("Not 1", 1, statements.size()); //$NON-NLS-1$
- Statement stmt = (Statement) statements.get(0);
- assertTrue("Not a return statement", stmt instanceof ReturnStatement); //$NON-NLS-1$
- ReturnStatement returnStatement = (ReturnStatement) stmt;
- Expression expr = returnStatement.getExpression();
- assertTrue("Not a SuperMethodInvocation", expr instanceof SuperMethodInvocation); //$NON-NLS-1$
- SuperMethodInvocation superMethodInvocation = (SuperMethodInvocation) expr;
- Name name = superMethodInvocation.getQualifier();
- IBinding binding = name.resolveBinding();
- assertNotNull("No binding", binding); //$NON-NLS-1$
- assertTrue("A type binding", binding instanceof ITypeBinding); //$NON-NLS-1$
- assertEquals("Not Test", "Test", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- Name methodName = superMethodInvocation.getName();
- IBinding binding2 = methodName.resolveBinding();
- assertNotNull("No binding2", binding2); //$NON-NLS-1$
- assertTrue("No an IMethodBinding", binding2 instanceof IMethodBinding); //$NON-NLS-1$
- IMethodBinding methodBinding = (IMethodBinding) binding2;
- assertEquals("Not bar", "bar", methodBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Not T", "T", methodBinding.getDeclaringClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
+// /**
+// * Check ThisExpression
+// * @deprecated using deprecated code
+// */
+// public void test0238() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0238", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// char[] source = sourceUnit.getSource().toCharArray();
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
+// assertTrue("Not a type declaration statement", node instanceof TypeDeclarationStatement); //$NON-NLS-1$
+// TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) node;
+// TypeDeclaration typeDecl = typeDeclarationStatement.getTypeDeclaration();
+// Object o = typeDecl.bodyDeclarations().get(0);
+// assertTrue("Not a method", o instanceof MethodDeclaration); //$NON-NLS-1$
+// MethodDeclaration methodDecl = (MethodDeclaration) o;
+// Block block = methodDecl.getBody();
+// List statements = block.statements();
+// assertEquals("Not 1", 1, statements.size()); //$NON-NLS-1$
+// Statement stmt = (Statement) statements.get(0);
+// assertTrue("Not a return statement", stmt instanceof ReturnStatement); //$NON-NLS-1$
+// ReturnStatement returnStatement = (ReturnStatement) stmt;
+// Expression expr = returnStatement.getExpression();
+// assertTrue("Not a method invocation", expr instanceof MethodInvocation); //$NON-NLS-1$
+// MethodInvocation methodInvocation = (MethodInvocation) expr;
+// checkSourceRange(methodInvocation, "Test.this.bar()", source); //$NON-NLS-1$
+// Expression qualifier = methodInvocation.getExpression();
+// assertTrue("Not a ThisExpression", qualifier instanceof ThisExpression); //$NON-NLS-1$
+// ThisExpression thisExpression = (ThisExpression) qualifier;
+// Name name = thisExpression.getQualifier();
+// IBinding binding = name.resolveBinding();
+// assertNotNull("No binding", binding); //$NON-NLS-1$
+// assertEquals("wrong name", "Test", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
+//
+// /**
+// * Check ThisExpression
+// * @deprecated using deprecated code
+// */
+// public void test0239() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0239", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// ASTNode node = getASTNode((CompilationUnit) result, 1, 0, 0);
+// assertTrue("Not a type declaration statement", node instanceof TypeDeclarationStatement); //$NON-NLS-1$
+// TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) node;
+// TypeDeclaration typeDecl = typeDeclarationStatement.getTypeDeclaration();
+// Object o = typeDecl.bodyDeclarations().get(0);
+// assertTrue("Not a method", o instanceof MethodDeclaration); //$NON-NLS-1$
+// MethodDeclaration methodDecl = (MethodDeclaration) o;
+// Block block = methodDecl.getBody();
+// List statements = block.statements();
+// assertEquals("Not 1", 1, statements.size()); //$NON-NLS-1$
+// Statement stmt = (Statement) statements.get(0);
+// assertTrue("Not a return statement", stmt instanceof ReturnStatement); //$NON-NLS-1$
+// ReturnStatement returnStatement = (ReturnStatement) stmt;
+// Expression expr = returnStatement.getExpression();
+// assertTrue("Not a SuperMethodInvocation", expr instanceof SuperMethodInvocation); //$NON-NLS-1$
+// SuperMethodInvocation superMethodInvocation = (SuperMethodInvocation) expr;
+// Name name = superMethodInvocation.getQualifier();
+// IBinding binding = name.resolveBinding();
+// assertNotNull("No binding", binding); //$NON-NLS-1$
+// assertTrue("A type binding", binding instanceof ITypeBinding); //$NON-NLS-1$
+// assertEquals("Not Test", "Test", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// Name methodName = superMethodInvocation.getName();
+// IBinding binding2 = methodName.resolveBinding();
+// assertNotNull("No binding2", binding2); //$NON-NLS-1$
+// assertTrue("No an IMethodBinding", binding2 instanceof IMethodBinding); //$NON-NLS-1$
+// IMethodBinding methodBinding = (IMethodBinding) binding2;
+// assertEquals("Not bar", "bar", methodBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// assertEquals("Not T", "T", methodBinding.getDeclaringClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
- /**
- * Check FieldAccess
- * @deprecated using deprecated code
- */
- public void test0240() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0240", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
- assertTrue("Not a type declaration statement", node instanceof TypeDeclarationStatement); //$NON-NLS-1$
- TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) node;
- TypeDeclaration typeDecl = typeDeclarationStatement.getTypeDeclaration();
- Object o = typeDecl.bodyDeclarations().get(0);
- assertTrue("Not a method", o instanceof MethodDeclaration); //$NON-NLS-1$
- MethodDeclaration methodDecl = (MethodDeclaration) o;
- Block block = methodDecl.getBody();
- List statements = block.statements();
- assertEquals("Not 1", 1, statements.size()); //$NON-NLS-1$
- Statement stmt = (Statement) statements.get(0);
- assertTrue("Not a return statement", stmt instanceof ReturnStatement); //$NON-NLS-1$
- ReturnStatement returnStatement = (ReturnStatement) stmt;
- Expression expr = returnStatement.getExpression();
- assertTrue("Not a field access", expr instanceof FieldAccess); //$NON-NLS-1$
- FieldAccess fieldAccess = (FieldAccess) expr;
- Expression qualifier = fieldAccess.getExpression();
- assertTrue("Not a ThisExpression", qualifier instanceof ThisExpression); //$NON-NLS-1$
- ThisExpression thisExpression = (ThisExpression) qualifier;
- Name name = thisExpression.getQualifier();
- IBinding binding = name.resolveBinding();
- assertNotNull("No binding", binding); //$NON-NLS-1$
- assertEquals("Not Test", "Test", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- Name fieldName = fieldAccess.getName();
- IBinding binding2 = fieldName.resolveBinding();
- assertNotNull("No binding2", binding2); //$NON-NLS-1$
- assertEquals("Wrong name", "f", binding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Wrong modifier", Modifier.PUBLIC, binding2.getModifiers()); //$NON-NLS-1$
- ITypeBinding typeBinding = fieldName.resolveTypeBinding();
- assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
- assertEquals("Not int", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
+// /**
+// * Check FieldAccess
+// * @deprecated using deprecated code
+// */
+// public void test0240() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0240", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
+// assertTrue("Not a type declaration statement", node instanceof TypeDeclarationStatement); //$NON-NLS-1$
+// TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) node;
+// TypeDeclaration typeDecl = typeDeclarationStatement.getTypeDeclaration();
+// Object o = typeDecl.bodyDeclarations().get(0);
+// assertTrue("Not a method", o instanceof MethodDeclaration); //$NON-NLS-1$
+// MethodDeclaration methodDecl = (MethodDeclaration) o;
+// Block block = methodDecl.getBody();
+// List statements = block.statements();
+// assertEquals("Not 1", 1, statements.size()); //$NON-NLS-1$
+// Statement stmt = (Statement) statements.get(0);
+// assertTrue("Not a return statement", stmt instanceof ReturnStatement); //$NON-NLS-1$
+// ReturnStatement returnStatement = (ReturnStatement) stmt;
+// Expression expr = returnStatement.getExpression();
+// assertTrue("Not a field access", expr instanceof FieldAccess); //$NON-NLS-1$
+// FieldAccess fieldAccess = (FieldAccess) expr;
+// Expression qualifier = fieldAccess.getExpression();
+// assertTrue("Not a ThisExpression", qualifier instanceof ThisExpression); //$NON-NLS-1$
+// ThisExpression thisExpression = (ThisExpression) qualifier;
+// Name name = thisExpression.getQualifier();
+// IBinding binding = name.resolveBinding();
+// assertNotNull("No binding", binding); //$NON-NLS-1$
+// assertEquals("Not Test", "Test", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// Name fieldName = fieldAccess.getName();
+// IBinding binding2 = fieldName.resolveBinding();
+// assertNotNull("No binding2", binding2); //$NON-NLS-1$
+// assertEquals("Wrong name", "f", binding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// assertEquals("Wrong modifier", Modifier.PUBLIC, binding2.getModifiers()); //$NON-NLS-1$
+// ITypeBinding typeBinding = fieldName.resolveTypeBinding();
+// assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+// assertEquals("Not int", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
+//
/**
* Check order of body declarations
*/
public void test0241() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0241", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0241", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- ASTNode node = getASTNode((CompilationUnit) result, 0);
- assertTrue("Not a type declaration", node instanceof TypeDeclaration); //$NON-NLS-1$
- assertTrue("Not a declaration", ((TypeDeclaration) node).getName().isDeclaration()); //$NON-NLS-1$
- assertEquals("Wrong size", 11, ((TypeDeclaration)node).bodyDeclarations().size()); //$NON-NLS-1$
- node = getASTNode((CompilationUnit) result, 0, 0);
- assertTrue("Not a field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+// ASTNode node = getASTNode((CompilationUnit) result, 0);
+// assertTrue("Not a type declaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+// assertTrue("Not a declaration", ((TypeDeclaration) node).getName().isDeclaration()); //$NON-NLS-1$
+// assertEquals("Wrong size", 11, ((TypeDeclaration)node).bodyDeclarations().size()); //$NON-NLS-1$
+ ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+ assertTrue("Not a field declaration", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
node = getASTNode((CompilationUnit) result, 0, 1);
assertTrue("Not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
+// node = getASTNode((CompilationUnit) result, 0, 2);
+// assertTrue("Not a Type declaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+// node = getASTNode((CompilationUnit) result, 0, 3);
+// assertTrue("Not a Type declaration", node instanceof TypeDeclaration); //$NON-NLS-1$
node = getASTNode((CompilationUnit) result, 0, 2);
- assertTrue("Not a Type declaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+ assertTrue("Not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
node = getASTNode((CompilationUnit) result, 0, 3);
- assertTrue("Not a Type declaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+ assertTrue("Not a field declaration", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
node = getASTNode((CompilationUnit) result, 0, 4);
assertTrue("Not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
node = getASTNode((CompilationUnit) result, 0, 5);
- assertTrue("Not a field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+ assertTrue("Not a field declaration", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
node = getASTNode((CompilationUnit) result, 0, 6);
- assertTrue("Not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
+ assertTrue("Not a field declaration", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
node = getASTNode((CompilationUnit) result, 0, 7);
- assertTrue("Not a field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
- node = getASTNode((CompilationUnit) result, 0, 8);
- assertTrue("Not a field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
- node = getASTNode((CompilationUnit) result, 0, 9);
assertTrue("Not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
- node = getASTNode((CompilationUnit) result, 0, 10);
- assertTrue("Not a Type declaration", node instanceof TypeDeclaration); //$NON-NLS-1$
- }
-
- /**
- * Check ThisExpression
- * @deprecated using deprecated code
- */
- public void test0242() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0242", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- ASTNode node = getASTNode((CompilationUnit) result, 1, 0, 0);
- assertTrue("Not a type declaration statement", node instanceof TypeDeclarationStatement); //$NON-NLS-1$
- TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) node;
- TypeDeclaration typeDecl = typeDeclarationStatement.getTypeDeclaration();
- Object o = typeDecl.bodyDeclarations().get(0);
- assertTrue("Not a method", o instanceof MethodDeclaration); //$NON-NLS-1$
- MethodDeclaration methodDecl = (MethodDeclaration) o;
- Block block = methodDecl.getBody();
- List statements = block.statements();
- assertEquals("Not 1", 1, statements.size()); //$NON-NLS-1$
- Statement stmt = (Statement) statements.get(0);
- assertTrue("Not a return statement", stmt instanceof ReturnStatement); //$NON-NLS-1$
- ReturnStatement returnStatement = (ReturnStatement) stmt;
- Expression expr = returnStatement.getExpression();
- assertTrue("Not a SuperFieldAccess", expr instanceof SuperFieldAccess); //$NON-NLS-1$
- SuperFieldAccess superFieldAccess = (SuperFieldAccess) expr;
- Name name = superFieldAccess.getQualifier();
- IBinding binding = name.resolveBinding();
- assertNotNull("No binding", binding); //$NON-NLS-1$
- assertTrue("A type binding", binding instanceof ITypeBinding); //$NON-NLS-1$
- assertEquals("Not Test", "Test", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- Name fieldName = superFieldAccess.getName();
- IBinding binding2 = fieldName.resolveBinding();
- assertNotNull("No binding2", binding2); //$NON-NLS-1$
- assertTrue("No an IVariableBinding", binding2 instanceof IVariableBinding); //$NON-NLS-1$
- IVariableBinding variableBinding = (IVariableBinding) binding2;
- assertEquals("Not f", "f", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Not T", "T", variableBinding.getDeclaringClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
- ITypeBinding typeBinding2 = fieldName.resolveTypeBinding();
- assertNotNull("No type binding", typeBinding2); //$NON-NLS-1$
- assertEquals("Not int", "int", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
+// node = getASTNode((CompilationUnit) result, 0, 10);
+// assertTrue("Not a Type declaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+ }
+
+// /**
+// * Check ThisExpression
+// * @deprecated using deprecated code
+// */
+// public void test0242() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0242", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// ASTNode node = getASTNode((CompilationUnit) result, 1, 0, 0);
+// assertTrue("Not a type declaration statement", node instanceof TypeDeclarationStatement); //$NON-NLS-1$
+// TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) node;
+// TypeDeclaration typeDecl = typeDeclarationStatement.getTypeDeclaration();
+// Object o = typeDecl.bodyDeclarations().get(0);
+// assertTrue("Not a method", o instanceof MethodDeclaration); //$NON-NLS-1$
+// MethodDeclaration methodDecl = (MethodDeclaration) o;
+// Block block = methodDecl.getBody();
+// List statements = block.statements();
+// assertEquals("Not 1", 1, statements.size()); //$NON-NLS-1$
+// Statement stmt = (Statement) statements.get(0);
+// assertTrue("Not a return statement", stmt instanceof ReturnStatement); //$NON-NLS-1$
+// ReturnStatement returnStatement = (ReturnStatement) stmt;
+// Expression expr = returnStatement.getExpression();
+// assertTrue("Not a SuperFieldAccess", expr instanceof SuperFieldAccess); //$NON-NLS-1$
+// SuperFieldAccess superFieldAccess = (SuperFieldAccess) expr;
+// Name name = superFieldAccess.getQualifier();
+// IBinding binding = name.resolveBinding();
+// assertNotNull("No binding", binding); //$NON-NLS-1$
+// assertTrue("A type binding", binding instanceof ITypeBinding); //$NON-NLS-1$
+// assertEquals("Not Test", "Test", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// Name fieldName = superFieldAccess.getName();
+// IBinding binding2 = fieldName.resolveBinding();
+// assertNotNull("No binding2", binding2); //$NON-NLS-1$
+// assertTrue("No an IVariableBinding", binding2 instanceof IVariableBinding); //$NON-NLS-1$
+// IVariableBinding variableBinding = (IVariableBinding) binding2;
+// assertEquals("Not f", "f", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// assertEquals("Not T", "T", variableBinding.getDeclaringClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// ITypeBinding typeBinding2 = fieldName.resolveTypeBinding();
+// assertNotNull("No type binding", typeBinding2); //$NON-NLS-1$
+// assertEquals("Not int", "int", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
/**
* Check catch clause positions:
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10570
*/
public void test0243() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0243", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0243", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -5830,7 +5911,7 @@ public class ASTConverterTest extends ConverterTestSetup {
List catchClauses = tryStatement.catchClauses();
assertEquals("wrong size", 1, catchClauses.size()); //$NON-NLS-1$
CatchClause catchClause = (CatchClause) catchClauses.get(0);
- checkSourceRange(catchClause, "catch (Exception e){m();}", source); //$NON-NLS-1$
+ checkSourceRange(catchClause, "catch (e){m();}", source); //$NON-NLS-1$
}
/**
@@ -5838,7 +5919,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10570
*/
public void test0244() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0244", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0244", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -5847,18 +5928,18 @@ public class ASTConverterTest extends ConverterTestSetup {
assertTrue("Not a try statement", node instanceof TryStatement); //$NON-NLS-1$
TryStatement tryStatement = (TryStatement) node;
List catchClauses = tryStatement.catchClauses();
- assertEquals("wrong size", 2, catchClauses.size()); //$NON-NLS-1$
+ assertEquals("wrong size", 1, catchClauses.size()); //$NON-NLS-1$
CatchClause catchClause = (CatchClause) catchClauses.get(0);
- checkSourceRange(catchClause, "catch (RuntimeException e){m();}", source); //$NON-NLS-1$
- catchClause = (CatchClause) catchClauses.get(1);
- checkSourceRange(catchClause, "catch(Exception e) {}", source); //$NON-NLS-1$
+ checkSourceRange(catchClause, "catch (e){m();}", source); //$NON-NLS-1$
+// catchClause = (CatchClause) catchClauses.get(1);
+// checkSourceRange(catchClause, "catch(e) {}", source); //$NON-NLS-1$
}
/**
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=10587
*/
public void test0245() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0245", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0245", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -5873,63 +5954,63 @@ public class ASTConverterTest extends ConverterTestSetup {
assertTrue("Not a variable binding", binding instanceof IVariableBinding); //$NON-NLS-1$
IVariableBinding variableBinding = (IVariableBinding) binding;
assertEquals("Not i", "i", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Not int", "int", variableBinding.getType().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("Not Number", "Number", variableBinding.getType().getName()); //$NON-NLS-1$ //$NON-NLS-2$
ASTNode declaringNode = unit.findDeclaringNode(variableBinding);
assertNotNull("No declaring node", declaringNode); //$NON-NLS-1$
assertTrue("Not a VariableDeclarationFragment", declaringNode instanceof VariableDeclarationFragment); //$NON-NLS-1$
}
- /**
- * Test binding resolution for import declaration
- */
- public void test0246() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0246", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit unit = (CompilationUnit) result;
- List imports = unit.imports();
- assertEquals("wrong imports size", 2, imports.size()); //$NON-NLS-1$
- ImportDeclaration importDeclaration = (ImportDeclaration) imports.get(0);
- assertTrue("Not on demand", importDeclaration.isOnDemand()); //$NON-NLS-1$
- checkSourceRange(importDeclaration, "import java.util.*;", source); //$NON-NLS-1$
- IBinding binding = importDeclaration.resolveBinding();
- assertNotNull("No binding", binding); //$NON-NLS-1$
- assertEquals("Wrong type", IBinding.PACKAGE, binding.getKind()); //$NON-NLS-1$
- assertEquals("Wrong name", "java.util", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- importDeclaration = (ImportDeclaration) imports.get(1);
- assertTrue("On demand", !importDeclaration.isOnDemand()); //$NON-NLS-1$
- checkSourceRange(importDeclaration, "import java.io.IOException;", source); //$NON-NLS-1$
- binding = importDeclaration.resolveBinding();
- assertNotNull("No binding", binding); //$NON-NLS-1$
- assertEquals("Wrong type", IBinding.TYPE, binding.getKind()); //$NON-NLS-1$
- assertEquals("Wrong name", "IOException", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Test binding resolution for import declaration
- */
- public void test0247() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0247", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit unit = (CompilationUnit) result;
- PackageDeclaration packageDeclaration = unit.getPackage();
- checkSourceRange(packageDeclaration, "package test0247;", source); //$NON-NLS-1$
- IPackageBinding binding = packageDeclaration.resolveBinding();
- assertNotNull("No binding", binding); //$NON-NLS-1$
- assertEquals("Wrong type", IBinding.PACKAGE, binding.getKind()); //$NON-NLS-1$
- assertEquals("Wrong name", "test0247", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
+// /**
+// * Test binding resolution for import declaration
+// */
+// public void test0246() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0246", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit unit = (CompilationUnit) result;
+// List imports = unit.imports();
+// assertEquals("wrong imports size", 2, imports.size()); //$NON-NLS-1$
+// ImportDeclaration importDeclaration = (ImportDeclaration) imports.get(0);
+// assertTrue("Not on demand", importDeclaration.isOnDemand()); //$NON-NLS-1$
+// checkSourceRange(importDeclaration, "import java.util.*;", source); //$NON-NLS-1$
+// IBinding binding = importDeclaration.resolveBinding();
+// assertNotNull("No binding", binding); //$NON-NLS-1$
+// assertEquals("Wrong type", IBinding.PACKAGE, binding.getKind()); //$NON-NLS-1$
+// assertEquals("Wrong name", "java.util", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// importDeclaration = (ImportDeclaration) imports.get(1);
+// assertTrue("On demand", !importDeclaration.isOnDemand()); //$NON-NLS-1$
+// checkSourceRange(importDeclaration, "import java.io.IOException;", source); //$NON-NLS-1$
+// binding = importDeclaration.resolveBinding();
+// assertNotNull("No binding", binding); //$NON-NLS-1$
+// assertEquals("Wrong type", IBinding.TYPE, binding.getKind()); //$NON-NLS-1$
+// assertEquals("Wrong name", "IOException", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
+//
+// /**
+// * Test binding resolution for import declaration
+// */
+// public void test0247() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0247", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit unit = (CompilationUnit) result;
+// PackageDeclaration packageDeclaration = unit.getPackage();
+// checkSourceRange(packageDeclaration, "package test0247;", source); //$NON-NLS-1$
+// IPackageBinding binding = packageDeclaration.resolveBinding();
+// assertNotNull("No binding", binding); //$NON-NLS-1$
+// assertEquals("Wrong type", IBinding.PACKAGE, binding.getKind()); //$NON-NLS-1$
+// assertEquals("Wrong name", "test0247", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
/**
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10592
*/
public void test0248() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0248", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0248", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -5945,118 +6026,118 @@ public class ASTConverterTest extends ConverterTestSetup {
assertTrue("Not a variable binding", binding instanceof IVariableBinding); //$NON-NLS-1$
IVariableBinding variableBinding = (IVariableBinding) binding;
assertEquals("Wrong name", "i", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Wrong type", "int", variableBinding.getType().getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=10592
- */
- public void test0249() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0249", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- ASTNode node = getASTNode((CompilationUnit) result, 0, 2, 1);
- assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
- ExpressionStatement expressionStatement = (ExpressionStatement) node;
- Expression expression = expressionStatement.getExpression();
- assertTrue("Not an assignment", expression instanceof Assignment); //$NON-NLS-1$
- Assignment assignment = (Assignment) expression;
- Expression leftHandSide = assignment.getLeftHandSide();
- assertTrue("Not a qualified name", leftHandSide instanceof QualifiedName); //$NON-NLS-1$
- QualifiedName qualifiedName = (QualifiedName) leftHandSide;
- Name simpleName = qualifiedName.getName();
- IBinding binding = simpleName.resolveBinding();
- assertNotNull("no binding", binding); //$NON-NLS-1$
- assertTrue("Not a IVariableBinding", binding instanceof IVariableBinding); //$NON-NLS-1$
- IVariableBinding variableBinding = (IVariableBinding) binding;
- assertEquals("Wrong name", "k", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Wrong modifier", Modifier.STATIC, variableBinding.getModifiers()); //$NON-NLS-1$
- assertEquals("Wrong type", "int", variableBinding.getType().getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Wrong declaring class name", "j", variableBinding.getDeclaringClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=10592
- */
- public void test0250() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0250", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
- assertTrue("Not a method declaration", node instanceof MethodDeclaration); //$NON-NLS-1$
- MethodDeclaration methodDeclaration = (MethodDeclaration) node;
- List parameters = methodDeclaration.parameters();
- assertEquals("wrong size", 2, parameters.size()); //$NON-NLS-1$
- SingleVariableDeclaration singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(0);
- Name name = singleVariableDeclaration.getName();
- IBinding binding = name.resolveBinding();
- assertNotNull("No binding", binding); //$NON-NLS-1$
- assertTrue("Not a variable binding", binding instanceof IVariableBinding); //$NON-NLS-1$
- IVariableBinding variableBinding = (IVariableBinding) binding;
- assertEquals("Wrong name", "i", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Wrong type", "int", variableBinding.getType().getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Check qualified name resolution for static fields
- */
- public void test0251() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0251", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
- assertTrue("Not a ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
- ExpressionStatement expressionStatement = (ExpressionStatement) node;
- Expression expression = expressionStatement.getExpression();
- assertTrue("Not a method invocation", expression instanceof MethodInvocation); //$NON-NLS-1$
- MethodInvocation methodInvocation = (MethodInvocation) expression;
- checkSourceRange(methodInvocation, "java.lang.System.out.println()", source); //$NON-NLS-1$
- Expression qualifier = methodInvocation.getExpression();
- assertTrue("Not a qualified name", qualifier instanceof QualifiedName); //$NON-NLS-1$
- checkSourceRange(qualifier, "java.lang.System.out", source); //$NON-NLS-1$
- QualifiedName qualifiedName = (QualifiedName) qualifier;
- Name typeName = qualifiedName.getQualifier();
- assertTrue("Not a QualifiedName", typeName instanceof QualifiedName); //$NON-NLS-1$
- QualifiedName qualifiedTypeName = (QualifiedName) typeName;
- IBinding binding = qualifiedTypeName.getName().resolveBinding();
- assertNotNull("No binding", binding); //$NON-NLS-1$
- assertEquals("Wrong name", "System", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- binding = qualifiedTypeName.getQualifier().resolveBinding();
- assertNotNull("No binding2", binding); //$NON-NLS-1$
- assertEquals("Wrong type binding", IBinding.PACKAGE, binding.getKind()); //$NON-NLS-1$
- }
-
- /**
- * Check binding for anonymous class
- */
- public void test0252() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0252", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
- assertTrue("Not a return statement", node instanceof ReturnStatement); //$NON-NLS-1$
- ReturnStatement returnStatement = (ReturnStatement) node;
- Expression expression = returnStatement.getExpression();
- assertTrue("Not a classinstancecreation", expression instanceof ClassInstanceCreation); //$NON-NLS-1$
- ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
- IMethodBinding methodBinding = classInstanceCreation.resolveConstructorBinding();
- assertNotNull("No methodBinding", methodBinding); //$NON-NLS-1$
- assertTrue("Not a constructor", methodBinding.isConstructor()); //$NON-NLS-1$
- assertTrue("Not an anonymous class", methodBinding.getDeclaringClass().isAnonymous()); //$NON-NLS-1$
- assertEquals("Not an anonymous class of java.lang.Object", "Object", methodBinding.getDeclaringClass().getSuperclass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Not an anonymous class of java.lang.Object", "java.lang", methodBinding.getDeclaringClass().getSuperclass().getPackage().getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
+ assertEquals("Wrong type", "any", variableBinding.getType().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=10592
+// */
+// public void test0249() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0249", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 2, 1);
+// assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
+// ExpressionStatement expressionStatement = (ExpressionStatement) node;
+// Expression expression = expressionStatement.getExpression();
+// assertTrue("Not an assignment", expression instanceof Assignment); //$NON-NLS-1$
+// Assignment assignment = (Assignment) expression;
+// Expression leftHandSide = assignment.getLeftHandSide();
+// assertTrue("Not a qualified name", leftHandSide instanceof QualifiedName); //$NON-NLS-1$
+// QualifiedName qualifiedName = (QualifiedName) leftHandSide;
+// Name simpleName = qualifiedName.getName();
+// IBinding binding = simpleName.resolveBinding();
+// assertNotNull("no binding", binding); //$NON-NLS-1$
+// assertTrue("Not a IVariableBinding", binding instanceof IVariableBinding); //$NON-NLS-1$
+// IVariableBinding variableBinding = (IVariableBinding) binding;
+// assertEquals("Wrong name", "k", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// assertEquals("Wrong modifier", Modifier.STATIC, variableBinding.getModifiers()); //$NON-NLS-1$
+// assertEquals("Wrong type", "int", variableBinding.getType().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// assertEquals("Wrong declaring class name", "j", variableBinding.getDeclaringClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
+//
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=10592
+// */
+// public void test0250() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0250", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+// assertTrue("Not a method declaration", node instanceof MethodDeclaration); //$NON-NLS-1$
+// MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+// List parameters = methodDeclaration.parameters();
+// assertEquals("wrong size", 2, parameters.size()); //$NON-NLS-1$
+// SingleVariableDeclaration singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(0);
+// Name name = singleVariableDeclaration.getName();
+// IBinding binding = name.resolveBinding();
+// assertNotNull("No binding", binding); //$NON-NLS-1$
+// assertTrue("Not a variable binding", binding instanceof IVariableBinding); //$NON-NLS-1$
+// IVariableBinding variableBinding = (IVariableBinding) binding;
+// assertEquals("Wrong name", "i", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// assertEquals("Wrong type", "int", variableBinding.getType().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
+//
+// /**
+// * Check qualified name resolution for static fields
+// */
+// public void test0251() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0251", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
+// assertTrue("Not a ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
+// ExpressionStatement expressionStatement = (ExpressionStatement) node;
+// Expression expression = expressionStatement.getExpression();
+// assertTrue("Not a method invocation", expression instanceof MethodInvocation); //$NON-NLS-1$
+// MethodInvocation methodInvocation = (MethodInvocation) expression;
+// checkSourceRange(methodInvocation, "java.lang.System.out.println()", source); //$NON-NLS-1$
+// Expression qualifier = methodInvocation.getExpression();
+// assertTrue("Not a qualified name", qualifier instanceof QualifiedName); //$NON-NLS-1$
+// checkSourceRange(qualifier, "java.lang.System.out", source); //$NON-NLS-1$
+// QualifiedName qualifiedName = (QualifiedName) qualifier;
+// Name typeName = qualifiedName.getQualifier();
+// assertTrue("Not a QualifiedName", typeName instanceof QualifiedName); //$NON-NLS-1$
+// QualifiedName qualifiedTypeName = (QualifiedName) typeName;
+// IBinding binding = qualifiedTypeName.getName().resolveBinding();
+// assertNotNull("No binding", binding); //$NON-NLS-1$
+// assertEquals("Wrong name", "System", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// binding = qualifiedTypeName.getQualifier().resolveBinding();
+// assertNotNull("No binding2", binding); //$NON-NLS-1$
+// assertEquals("Wrong type binding", IBinding.PACKAGE, binding.getKind()); //$NON-NLS-1$
+// }
+//
+// /**
+// * Check binding for anonymous class
+// */
+// public void test0252() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0252", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
+// assertTrue("Not a return statement", node instanceof ReturnStatement); //$NON-NLS-1$
+// ReturnStatement returnStatement = (ReturnStatement) node;
+// Expression expression = returnStatement.getExpression();
+// assertTrue("Not a classinstancecreation", expression instanceof ClassInstanceCreation); //$NON-NLS-1$
+// ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
+// IMethodBinding methodBinding = classInstanceCreation.resolveConstructorBinding();
+// assertNotNull("No methodBinding", methodBinding); //$NON-NLS-1$
+// assertTrue("Not a constructor", methodBinding.isConstructor()); //$NON-NLS-1$
+// assertTrue("Not an anonymous class", methodBinding.getDeclaringClass().isAnonymous()); //$NON-NLS-1$
+// assertEquals("Not an anonymous class of java.lang.Object", "Object", methodBinding.getDeclaringClass().getSuperclass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// assertEquals("Not an anonymous class of java.lang.Object", "java.lang", methodBinding.getDeclaringClass().getSuperclass().getPackage().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
/**
* Check binding for allocation expression
*/
public void test0253() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0253", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0253", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -6069,186 +6150,186 @@ public class ASTConverterTest extends ConverterTestSetup {
IMethodBinding methodBinding = classInstanceCreation.resolveConstructorBinding();
assertNotNull("No methodBinding", methodBinding); //$NON-NLS-1$
assertTrue("Not a constructor", methodBinding.isConstructor()); //$NON-NLS-1$
- assertEquals("Wrong size", 1, methodBinding.getParameterTypes().length); //$NON-NLS-1$
- assertEquals("Wrong type", "String", methodBinding.getParameterTypes()[0].getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Check binding for allocation expression
- */
- public void test0254() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0254", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- ASTNode node = getASTNode((CompilationUnit) result, 0, 1, 0);
- assertTrue("Not a return statement", node instanceof ReturnStatement); //$NON-NLS-1$
- ReturnStatement returnStatement = (ReturnStatement) node;
- Expression expression = returnStatement.getExpression();
- assertTrue("Not a class instance creation", expression instanceof ClassInstanceCreation); //$NON-NLS-1$
- ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
- IMethodBinding binding = classInstanceCreation.resolveConstructorBinding();
- assertNotNull("No binding", binding); //$NON-NLS-1$
- assertEquals("wrong type", "C", binding.getDeclaringClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
-
- /**
- * Check binding for allocation expression
- */
- public void test0255() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0255", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
- assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
- ExpressionStatement expressionStatement = (ExpressionStatement) node;
- Expression expression = expressionStatement.getExpression();
- assertTrue("Not a MethodInvocation", expression instanceof MethodInvocation); //$NON-NLS-1$
- MethodInvocation methodInvocation = (MethodInvocation) expression;
- List arguments = methodInvocation.arguments();
- assertEquals("wrong size", 1, arguments.size()); //$NON-NLS-1$
- Expression expression2 = (Expression) arguments.get(0);
- assertTrue("Not a CastExpression", expression2 instanceof CastExpression); //$NON-NLS-1$
- CastExpression castExpression = (CastExpression) expression2;
- Type type = castExpression.getType();
- ITypeBinding binding = type.resolveBinding();
- assertNotNull("No binding", binding); //$NON-NLS-1$
- assertTrue("Not an array type", binding.isArray()); //$NON-NLS-1$
- }
-
- /**
- * Check binding for allocation expression
- */
- public void test0256() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0256", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
- assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
- ExpressionStatement expressionStatement = (ExpressionStatement) node;
- Expression expression = expressionStatement.getExpression();
- assertTrue("Not a MethodInvocation", expression instanceof MethodInvocation); //$NON-NLS-1$
- MethodInvocation methodInvocation = (MethodInvocation) expression;
- List arguments = methodInvocation.arguments();
- assertEquals("wrong size", 1, arguments.size()); //$NON-NLS-1$
- Expression expression2 = (Expression) arguments.get(0);
- assertTrue("Not a CastExpression", expression2 instanceof CastExpression); //$NON-NLS-1$
- CastExpression castExpression = (CastExpression) expression2;
- Type type = castExpression.getType();
- assertTrue("Not a simple type", type.isSimpleType()); //$NON-NLS-1$
- SimpleType simpleType = (SimpleType) type;
- ITypeBinding binding = type.resolveBinding();
- assertNotNull("No binding", binding); //$NON-NLS-1$
- assertTrue("Not a class", binding.isClass()); //$NON-NLS-1$
- Name name = simpleType.getName();
- IBinding binding2 = name.resolveBinding();
- assertNotNull("No binding2", binding2); //$NON-NLS-1$
- assertEquals("Wrong type", "Object", binding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Check binding for allocation expression
- */
- public void test0257() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0257", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
- assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
- ExpressionStatement expressionStatement = (ExpressionStatement) node;
- Expression expression = expressionStatement.getExpression();
- assertTrue("Not a MethodInvocation", expression instanceof MethodInvocation); //$NON-NLS-1$
- MethodInvocation methodInvocation = (MethodInvocation) expression;
- List arguments = methodInvocation.arguments();
- assertEquals("wrong size", 1, arguments.size()); //$NON-NLS-1$
- Expression expression2 = (Expression) arguments.get(0);
- assertTrue("Not a CastExpression", expression2 instanceof CastExpression); //$NON-NLS-1$
- CastExpression castExpression = (CastExpression) expression2;
- Type type = castExpression.getType();
- assertTrue("Not a primitive type", type.isPrimitiveType()); //$NON-NLS-1$
- PrimitiveType primitiveType = (PrimitiveType) type;
- assertEquals("Not int", PrimitiveType.INT, primitiveType.getPrimitiveTypeCode()); //$NON-NLS-1$
- }
-
- /**
- * Check binding for allocation expression
- */
- public void test0258() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0258", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
- assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
- ExpressionStatement expressionStatement = (ExpressionStatement) node;
- Expression expression = expressionStatement.getExpression();
- assertTrue("Not a MethodInvocation", expression instanceof MethodInvocation); //$NON-NLS-1$
- MethodInvocation methodInvocation = (MethodInvocation) expression;
- List arguments = methodInvocation.arguments();
- assertEquals("wrong size", 1, arguments.size()); //$NON-NLS-1$
- Expression expression2 = (Expression) arguments.get(0);
- assertTrue("Not a CastExpression", expression2 instanceof CastExpression); //$NON-NLS-1$
- CastExpression castExpression = (CastExpression) expression2;
- Type type = castExpression.getType();
- assertTrue("Not a simple type", type.isSimpleType()); //$NON-NLS-1$
- SimpleType simpleType = (SimpleType) type;
- ITypeBinding binding = type.resolveBinding();
- assertNotNull("No binding", binding); //$NON-NLS-1$
- assertTrue("Not a class", binding.isClass()); //$NON-NLS-1$
- Name name = simpleType.getName();
- IBinding binding2 = name.resolveBinding();
- assertNotNull("No binding2", binding2); //$NON-NLS-1$
- assertEquals("Wrong type", "Object", binding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
+// assertEquals("Wrong size", 1, methodBinding.getParameterTypes().length); //$NON-NLS-1$
+// assertEquals("Wrong type", "String", methodBinding.getParameterTypes()[0].getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+// /**
+// * Check binding for allocation expression
+// */
+// public void test0254() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0254", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 1, 0);
+// assertTrue("Not a return statement", node instanceof ReturnStatement); //$NON-NLS-1$
+// ReturnStatement returnStatement = (ReturnStatement) node;
+// Expression expression = returnStatement.getExpression();
+// assertTrue("Not a class instance creation", expression instanceof ClassInstanceCreation); //$NON-NLS-1$
+// ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
+// IMethodBinding binding = classInstanceCreation.resolveConstructorBinding();
+// assertNotNull("No binding", binding); //$NON-NLS-1$
+// assertEquals("wrong type", "C", binding.getDeclaringClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
+
+
+// /**
+// * Check binding for allocation expression
+// */
+// public void test0255() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0255", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
+// assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
+// ExpressionStatement expressionStatement = (ExpressionStatement) node;
+// Expression expression = expressionStatement.getExpression();
+// assertTrue("Not a MethodInvocation", expression instanceof MethodInvocation); //$NON-NLS-1$
+// MethodInvocation methodInvocation = (MethodInvocation) expression;
+// List arguments = methodInvocation.arguments();
+// assertEquals("wrong size", 1, arguments.size()); //$NON-NLS-1$
+// Expression expression2 = (Expression) arguments.get(0);
+// assertTrue("Not a CastExpression", expression2 instanceof CastExpression); //$NON-NLS-1$
+// CastExpression castExpression = (CastExpression) expression2;
+// Type type = castExpression.getType();
+// ITypeBinding binding = type.resolveBinding();
+// assertNotNull("No binding", binding); //$NON-NLS-1$
+// assertTrue("Not an array type", binding.isArray()); //$NON-NLS-1$
+// }
+
+// /**
+// * Check binding for allocation expression
+// */
+// public void test0256() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0256", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
+// assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
+// ExpressionStatement expressionStatement = (ExpressionStatement) node;
+// Expression expression = expressionStatement.getExpression();
+// assertTrue("Not a MethodInvocation", expression instanceof MethodInvocation); //$NON-NLS-1$
+// MethodInvocation methodInvocation = (MethodInvocation) expression;
+// List arguments = methodInvocation.arguments();
+// assertEquals("wrong size", 1, arguments.size()); //$NON-NLS-1$
+// Expression expression2 = (Expression) arguments.get(0);
+// assertTrue("Not a CastExpression", expression2 instanceof CastExpression); //$NON-NLS-1$
+// CastExpression castExpression = (CastExpression) expression2;
+// Type type = castExpression.getType();
+// assertTrue("Not a simple type", type.isSimpleType()); //$NON-NLS-1$
+// SimpleType simpleType = (SimpleType) type;
+// ITypeBinding binding = type.resolveBinding();
+// assertNotNull("No binding", binding); //$NON-NLS-1$
+// assertTrue("Not a class", binding.isClass()); //$NON-NLS-1$
+// Name name = simpleType.getName();
+// IBinding binding2 = name.resolveBinding();
+// assertNotNull("No binding2", binding2); //$NON-NLS-1$
+// assertEquals("Wrong type", "Object", binding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
+//
+// /**
+// * Check binding for allocation expression
+// */
+// public void test0257() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0257", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
+// assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
+// ExpressionStatement expressionStatement = (ExpressionStatement) node;
+// Expression expression = expressionStatement.getExpression();
+// assertTrue("Not a MethodInvocation", expression instanceof MethodInvocation); //$NON-NLS-1$
+// MethodInvocation methodInvocation = (MethodInvocation) expression;
+// List arguments = methodInvocation.arguments();
+// assertEquals("wrong size", 1, arguments.size()); //$NON-NLS-1$
+// Expression expression2 = (Expression) arguments.get(0);
+// assertTrue("Not a CastExpression", expression2 instanceof CastExpression); //$NON-NLS-1$
+// CastExpression castExpression = (CastExpression) expression2;
+// Type type = castExpression.getType();
+// assertTrue("Not a primitive type", type.isPrimitiveType()); //$NON-NLS-1$
+// PrimitiveType primitiveType = (PrimitiveType) type;
+// assertEquals("Not int", PrimitiveType.INT, primitiveType.getPrimitiveTypeCode()); //$NON-NLS-1$
+// }
+
+// /**
+// * Check binding for allocation expression
+// */
+// public void test0258() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0258", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
+// assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
+// ExpressionStatement expressionStatement = (ExpressionStatement) node;
+// Expression expression = expressionStatement.getExpression();
+// assertTrue("Not a MethodInvocation", expression instanceof MethodInvocation); //$NON-NLS-1$
+// MethodInvocation methodInvocation = (MethodInvocation) expression;
+// List arguments = methodInvocation.arguments();
+// assertEquals("wrong size", 1, arguments.size()); //$NON-NLS-1$
+// Expression expression2 = (Expression) arguments.get(0);
+// assertTrue("Not a CastExpression", expression2 instanceof CastExpression); //$NON-NLS-1$
+// CastExpression castExpression = (CastExpression) expression2;
+// Type type = castExpression.getType();
+// assertTrue("Not a simple type", type.isSimpleType()); //$NON-NLS-1$
+// SimpleType simpleType = (SimpleType) type;
+// ITypeBinding binding = type.resolveBinding();
+// assertNotNull("No binding", binding); //$NON-NLS-1$
+// assertTrue("Not a class", binding.isClass()); //$NON-NLS-1$
+// Name name = simpleType.getName();
+// IBinding binding2 = name.resolveBinding();
+// assertNotNull("No binding2", binding2); //$NON-NLS-1$
+// assertEquals("Wrong type", "Object", binding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
/**
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10663
*/
public void test0259() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0259", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- }
-
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=10592
- */
- public void test0260() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0260", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
- assertTrue("Not a method declaration", node instanceof MethodDeclaration); //$NON-NLS-1$
- MethodDeclaration methodDeclaration = (MethodDeclaration) node;
- List parameters = methodDeclaration.parameters();
- assertEquals("wrong size", 2, parameters.size()); //$NON-NLS-1$
- SingleVariableDeclaration singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(0);
- IBinding binding = singleVariableDeclaration.resolveBinding();
- assertNotNull("No binding", binding); //$NON-NLS-1$
- Name name = singleVariableDeclaration.getName();
- assertTrue("Not a simple name", name instanceof SimpleName); //$NON-NLS-1$
- SimpleName simpleName = (SimpleName) name;
- assertEquals("Wrong name", "i", simpleName.getIdentifier()); //$NON-NLS-1$ //$NON-NLS-2$
- IBinding binding2 = name.resolveBinding();
- assertNotNull("No binding", binding2); //$NON-NLS-1$
- assertTrue("binding == binding2", binding == binding2); //$NON-NLS-1$
- assertTrue("Not a variable binding", binding2 instanceof IVariableBinding); //$NON-NLS-1$
- IVariableBinding variableBinding = (IVariableBinding) binding2;
- assertEquals("Wrong name", "i", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Wrong type", "int", variableBinding.getType().getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0259", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ASTNode result = runConversion(sourceUnit, true);
+ assertNotNull("No compilation unit", result); //$NON-NLS-1$
+ assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+ }
+//
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=10592
+// */
+// public void test0260() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0260", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+// assertTrue("Not a method declaration", node instanceof MethodDeclaration); //$NON-NLS-1$
+// MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+// List parameters = methodDeclaration.parameters();
+// assertEquals("wrong size", 2, parameters.size()); //$NON-NLS-1$
+// SingleVariableDeclaration singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(0);
+// IBinding binding = singleVariableDeclaration.resolveBinding();
+// assertNotNull("No binding", binding); //$NON-NLS-1$
+// Name name = singleVariableDeclaration.getName();
+// assertTrue("Not a simple name", name instanceof SimpleName); //$NON-NLS-1$
+// SimpleName simpleName = (SimpleName) name;
+// assertEquals("Wrong name", "i", simpleName.getIdentifier()); //$NON-NLS-1$ //$NON-NLS-2$
+// IBinding binding2 = name.resolveBinding();
+// assertNotNull("No binding", binding2); //$NON-NLS-1$
+// assertTrue("binding == binding2", binding == binding2); //$NON-NLS-1$
+// assertTrue("Not a variable binding", binding2 instanceof IVariableBinding); //$NON-NLS-1$
+// IVariableBinding variableBinding = (IVariableBinding) binding2;
+// assertEquals("Wrong name", "i", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// assertEquals("Wrong type", "int", variableBinding.getType().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
/**
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10679
*/
public void test0261() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0261", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0261", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -6267,7 +6348,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10676
*/
public void test0262() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0262", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0262", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -6297,7 +6378,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10700
*/
public void test0263() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0263", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0263", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -6320,208 +6401,208 @@ public class ASTConverterTest extends ConverterTestSetup {
/**
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10699
*/
- public void test0264() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0264", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
- assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
- VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
- List fragments = variableDeclarationStatement.fragments();
- assertEquals("Wrong fragment size", 1, fragments.size()); //$NON-NLS-1$
- VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
- Expression expression = variableDeclarationFragment.getInitializer();
- assertTrue("Not a classinstancecreation", expression instanceof ClassInstanceCreation); //$NON-NLS-1$
- ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
- AnonymousClassDeclaration anonymousClassDeclaration = classInstanceCreation.getAnonymousClassDeclaration();
- assertNotNull("No anonymousclassdeclaration", anonymousClassDeclaration); //$NON-NLS-1$
- String expectedSourceRange =
- "{\n"+ //$NON-NLS-1$
- " void m(int k){\n"+ //$NON-NLS-1$
- " k= i;\n"+ //$NON-NLS-1$
- " }\n"+ //$NON-NLS-1$
- " }"; //$NON-NLS-1$
- checkSourceRange(anonymousClassDeclaration, expectedSourceRange, source);
- List bodyDeclarations = anonymousClassDeclaration.bodyDeclarations();
- assertEquals("Wrong size", 1, bodyDeclarations.size()); //$NON-NLS-1$
- BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
- assertTrue("Not a method declaration", bodyDeclaration instanceof MethodDeclaration); //$NON-NLS-1$
- MethodDeclaration methodDeclaration = (MethodDeclaration) bodyDeclaration;
- assertEquals("Wrong name", "m", methodDeclaration.getName().getIdentifier()); //$NON-NLS-1$ //$NON-NLS-2$
- }
+// public void test0264() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0264", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+// assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+// VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+// List fragments = variableDeclarationStatement.fragments();
+// assertEquals("Wrong fragment size", 1, fragments.size()); //$NON-NLS-1$
+// VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+// Expression expression = variableDeclarationFragment.getInitializer();
+// assertTrue("Not a classinstancecreation", expression instanceof ClassInstanceCreation); //$NON-NLS-1$
+// ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
+// AnonymousClassDeclaration anonymousClassDeclaration = classInstanceCreation.getAnonymousClassDeclaration();
+// assertNotNull("No anonymousclassdeclaration", anonymousClassDeclaration); //$NON-NLS-1$
+// String expectedSourceRange =
+// "{\n"+ //$NON-NLS-1$
+// " void m(int k){\n"+ //$NON-NLS-1$
+// " k= i;\n"+ //$NON-NLS-1$
+// " }\n"+ //$NON-NLS-1$
+// " }"; //$NON-NLS-1$
+// checkSourceRange(anonymousClassDeclaration, expectedSourceRange, source);
+// List bodyDeclarations = anonymousClassDeclaration.bodyDeclarations();
+// assertEquals("Wrong size", 1, bodyDeclarations.size()); //$NON-NLS-1$
+// BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+// assertTrue("Not a method declaration", bodyDeclaration instanceof MethodDeclaration); //$NON-NLS-1$
+// MethodDeclaration methodDeclaration = (MethodDeclaration) bodyDeclaration;
+// assertEquals("Wrong name", "m", methodDeclaration.getName().getIdentifier()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
/**
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10698
*/
public void test0265() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0265", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- }
-
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=10759
- */
- public void test0266() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0266", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
- assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
- VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
- Type type = variableDeclarationStatement.getType();
- checkSourceRange(type, "Inner\\u005b]", source); //$NON-NLS-1$
- assertTrue("Not an array type", type.isArrayType()); //$NON-NLS-1$
- ArrayType arrayType = (ArrayType) type;
- Type type2 = arrayType.getElementType();
- assertTrue("Not a simple type", type2.isSimpleType()); //$NON-NLS-1$
- SimpleType simpleType = (SimpleType) type2;
- checkSourceRange(simpleType, "Inner", source); //$NON-NLS-1$
- Name name = simpleType.getName();
- assertTrue("not a simple name", name.isSimpleName()); //$NON-NLS-1$
- SimpleName simpleName = (SimpleName) name;
- checkSourceRange(simpleName, "Inner", source); //$NON-NLS-1$
- }
-
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=10759
- */
- public void test0267() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0267", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
- assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
- VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
- Type type = variableDeclarationStatement.getType();
- checkSourceRange(type, "Inner[]", source); //$NON-NLS-1$
- assertTrue("Not an array type", type.isArrayType()); //$NON-NLS-1$
- ArrayType arrayType = (ArrayType) type;
- Type type2 = arrayType.getElementType();
- assertTrue("Not a simple type", type2.isSimpleType()); //$NON-NLS-1$
- SimpleType simpleType = (SimpleType) type2;
- checkSourceRange(simpleType, "Inner", source); //$NON-NLS-1$
- Name name = simpleType.getName();
- assertTrue("not a simple name", name.isSimpleName()); //$NON-NLS-1$
- SimpleName simpleName = (SimpleName) name;
- checkSourceRange(simpleName, "Inner", source); //$NON-NLS-1$
- }
-
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=10759
- */
- public void test0268() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0268", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
- assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
- VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
- Type type = variableDeclarationStatement.getType();
- checkSourceRange(type, "test0268.Test.Inner[]", source); //$NON-NLS-1$
- assertTrue("Not an array type", type.isArrayType()); //$NON-NLS-1$
- ArrayType arrayType = (ArrayType) type;
- Type type2 = arrayType.getElementType();
- assertTrue("Not a simple type", type2.isSimpleType()); //$NON-NLS-1$
- SimpleType simpleType = (SimpleType) type2;
- checkSourceRange(simpleType, "test0268.Test.Inner", source); //$NON-NLS-1$
- Name name = simpleType.getName();
- assertTrue("not a qualified name", name.isQualifiedName()); //$NON-NLS-1$
- checkSourceRange(name, "test0268.Test.Inner", source); //$NON-NLS-1$
- }
-
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=10759
- */
- public void test0269() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0269", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
- assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
- VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
- Type type = variableDeclarationStatement.getType();
- checkSourceRange(type, "test0269.Test.Inner[/**/]", source); //$NON-NLS-1$
- assertTrue("Not an array type", type.isArrayType()); //$NON-NLS-1$
- ArrayType arrayType = (ArrayType) type;
- Type type2 = arrayType.getElementType();
- assertTrue("Not a simple type", type2.isSimpleType()); //$NON-NLS-1$
- SimpleType simpleType = (SimpleType) type2;
- checkSourceRange(simpleType, "test0269.Test.Inner", source); //$NON-NLS-1$
- Name name = simpleType.getName();
- assertTrue("not a qualified name", name.isQualifiedName()); //$NON-NLS-1$
- checkSourceRange(name, "test0269.Test.Inner", source); //$NON-NLS-1$
- }
-
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=10759
- */
- public void test0270() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0270", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
- assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
- VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
- Type type = variableDeclarationStatement.getType();
- checkSourceRange(type, "test0270.Test.Inner", source); //$NON-NLS-1$
- assertTrue("Not a simple type", type.isSimpleType()); //$NON-NLS-1$
- SimpleType simpleType = (SimpleType) type;
- Name name = simpleType.getName();
- assertTrue("not a qualified name", name.isQualifiedName()); //$NON-NLS-1$
- checkSourceRange(name, "test0270.Test.Inner", source); //$NON-NLS-1$
- }
-
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=10759
- */
- public void test0271() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0271", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
- assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
- VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
- Type type = variableDeclarationStatement.getType();
- checkSourceRange(type, "test0271.Test.Inner[]", source); //$NON-NLS-1$
- assertTrue("Not an array type", type.isArrayType()); //$NON-NLS-1$
- ArrayType arrayType = (ArrayType) type;
- Type type2 = arrayType.getElementType();
- assertTrue("Not a simple type", type2.isSimpleType()); //$NON-NLS-1$
- SimpleType simpleType = (SimpleType) type2;
- checkSourceRange(simpleType, "test0271.Test.Inner", source); //$NON-NLS-1$
- Name name = simpleType.getName();
- assertTrue("not a qualified name", name.isQualifiedName()); //$NON-NLS-1$
- checkSourceRange(name, "test0271.Test.Inner", source); //$NON-NLS-1$
- }
-
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0265", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ASTNode result = runConversion(sourceUnit, true);
+ assertNotNull("No compilation unit", result); //$NON-NLS-1$
+ assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+ }
+
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=10759
+// */
+// public void test0266() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0266", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
+// assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+// VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+// Type type = variableDeclarationStatement.getType();
+// checkSourceRange(type, "Inner\\u005b]", source); //$NON-NLS-1$
+// assertTrue("Not an array type", type.isArrayType()); //$NON-NLS-1$
+// ArrayType arrayType = (ArrayType) type;
+// Type type2 = arrayType.getElementType();
+// assertTrue("Not a simple type", type2.isSimpleType()); //$NON-NLS-1$
+// SimpleType simpleType = (SimpleType) type2;
+// checkSourceRange(simpleType, "Inner", source); //$NON-NLS-1$
+// Name name = simpleType.getName();
+// assertTrue("not a simple name", name.isSimpleName()); //$NON-NLS-1$
+// SimpleName simpleName = (SimpleName) name;
+// checkSourceRange(simpleName, "Inner", source); //$NON-NLS-1$
+// }
+//
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=10759
+// */
+// public void test0267() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0267", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
+// assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+// VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+// Type type = variableDeclarationStatement.getType();
+// checkSourceRange(type, "Inner[]", source); //$NON-NLS-1$
+// assertTrue("Not an array type", type.isArrayType()); //$NON-NLS-1$
+// ArrayType arrayType = (ArrayType) type;
+// Type type2 = arrayType.getElementType();
+// assertTrue("Not a simple type", type2.isSimpleType()); //$NON-NLS-1$
+// SimpleType simpleType = (SimpleType) type2;
+// checkSourceRange(simpleType, "Inner", source); //$NON-NLS-1$
+// Name name = simpleType.getName();
+// assertTrue("not a simple name", name.isSimpleName()); //$NON-NLS-1$
+// SimpleName simpleName = (SimpleName) name;
+// checkSourceRange(simpleName, "Inner", source); //$NON-NLS-1$
+// }
+//
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=10759
+// */
+// public void test0268() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0268", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
+// assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+// VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+// Type type = variableDeclarationStatement.getType();
+// checkSourceRange(type, "test0268.Test.Inner[]", source); //$NON-NLS-1$
+// assertTrue("Not an array type", type.isArrayType()); //$NON-NLS-1$
+// ArrayType arrayType = (ArrayType) type;
+// Type type2 = arrayType.getElementType();
+// assertTrue("Not a simple type", type2.isSimpleType()); //$NON-NLS-1$
+// SimpleType simpleType = (SimpleType) type2;
+// checkSourceRange(simpleType, "test0268.Test.Inner", source); //$NON-NLS-1$
+// Name name = simpleType.getName();
+// assertTrue("not a qualified name", name.isQualifiedName()); //$NON-NLS-1$
+// checkSourceRange(name, "test0268.Test.Inner", source); //$NON-NLS-1$
+// }
+//
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=10759
+// */
+// public void test0269() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0269", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
+// assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+// VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+// Type type = variableDeclarationStatement.getType();
+// checkSourceRange(type, "test0269.Test.Inner[/**/]", source); //$NON-NLS-1$
+// assertTrue("Not an array type", type.isArrayType()); //$NON-NLS-1$
+// ArrayType arrayType = (ArrayType) type;
+// Type type2 = arrayType.getElementType();
+// assertTrue("Not a simple type", type2.isSimpleType()); //$NON-NLS-1$
+// SimpleType simpleType = (SimpleType) type2;
+// checkSourceRange(simpleType, "test0269.Test.Inner", source); //$NON-NLS-1$
+// Name name = simpleType.getName();
+// assertTrue("not a qualified name", name.isQualifiedName()); //$NON-NLS-1$
+// checkSourceRange(name, "test0269.Test.Inner", source); //$NON-NLS-1$
+// }
+//
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=10759
+// */
+// public void test0270() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0270", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
+// assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+// VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+// Type type = variableDeclarationStatement.getType();
+// checkSourceRange(type, "test0270.Test.Inner", source); //$NON-NLS-1$
+// assertTrue("Not a simple type", type.isSimpleType()); //$NON-NLS-1$
+// SimpleType simpleType = (SimpleType) type;
+// Name name = simpleType.getName();
+// assertTrue("not a qualified name", name.isQualifiedName()); //$NON-NLS-1$
+// checkSourceRange(name, "test0270.Test.Inner", source); //$NON-NLS-1$
+// }
+//
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=10759
+// */
+// public void test0271() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0271", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
+// assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+// VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+// Type type = variableDeclarationStatement.getType();
+// checkSourceRange(type, "test0271.Test.Inner[]", source); //$NON-NLS-1$
+// assertTrue("Not an array type", type.isArrayType()); //$NON-NLS-1$
+// ArrayType arrayType = (ArrayType) type;
+// Type type2 = arrayType.getElementType();
+// assertTrue("Not a simple type", type2.isSimpleType()); //$NON-NLS-1$
+// SimpleType simpleType = (SimpleType) type2;
+// checkSourceRange(simpleType, "test0271.Test.Inner", source); //$NON-NLS-1$
+// Name name = simpleType.getName();
+// assertTrue("not a qualified name", name.isQualifiedName()); //$NON-NLS-1$
+// checkSourceRange(name, "test0271.Test.Inner", source); //$NON-NLS-1$
+// }
+//
/**
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10843
*/
public void test0272() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0272", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0272", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6530,7 +6611,7 @@ public class ASTConverterTest extends ConverterTestSetup {
ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
assertTrue("Not a For statement", node instanceof ForStatement); //$NON-NLS-1$
ForStatement forStatement = (ForStatement) node;
- checkSourceRange(forStatement, "for (int i= 0; i < 10; i++) foo();", source); //$NON-NLS-1$
+ checkSourceRange(forStatement, "for (var i= 0; i < 10; i++) foo();", source); //$NON-NLS-1$
Statement action = forStatement.getBody();
checkSourceRange(action, "foo();", source); //$NON-NLS-1$
}
@@ -6539,7 +6620,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10843
*/
public void test0273() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0273", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0273", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6548,7 +6629,7 @@ public class ASTConverterTest extends ConverterTestSetup {
ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
assertTrue("Not a For statement", node instanceof ForStatement); //$NON-NLS-1$
ForStatement forStatement = (ForStatement) node;
- checkSourceRange(forStatement, "for (int i= 0; i < 10; i++) { foo(); }", source); //$NON-NLS-1$
+ checkSourceRange(forStatement, "for (var i= 0; i < 10; i++) { foo(); }", source); //$NON-NLS-1$
Statement action = forStatement.getBody();
checkSourceRange(action, "{ foo(); }", source); //$NON-NLS-1$
assertTrue("Not a block", action instanceof Block); //$NON-NLS-1$
@@ -6563,7 +6644,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10843
*/
public void test0274() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0274", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0274", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6587,7 +6668,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10843
*/
public void test0275() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0275", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0275", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6605,7 +6686,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10798
*/
public void test0276() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0276", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0276", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6615,7 +6696,7 @@ public class ASTConverterTest extends ConverterTestSetup {
assertTrue("Not a method declaration", node instanceof MethodDeclaration); //$NON-NLS-1$
MethodDeclaration methodDeclaration = (MethodDeclaration) node;
String expectedSource =
- "public void foo() {\n" + //$NON-NLS-1$
+ "function foo() {\n" + //$NON-NLS-1$
" foo();\n" + //$NON-NLS-1$
" }"; //$NON-NLS-1$
checkSourceRange(methodDeclaration, expectedSource, source);
@@ -6630,7 +6711,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10798
*/
public void test0277() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0277", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0277", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -6640,7 +6721,7 @@ public class ASTConverterTest extends ConverterTestSetup {
assertTrue("Not a method declaration", node instanceof MethodDeclaration); //$NON-NLS-1$
MethodDeclaration methodDeclaration = (MethodDeclaration) node;
String expectedSource =
- "public void foo() {\n" + //$NON-NLS-1$
+ "function foo() {\n" + //$NON-NLS-1$
" }"; //$NON-NLS-1$
checkSourceRange(methodDeclaration, expectedSource, source);
expectedSource =
@@ -6649,155 +6730,155 @@ public class ASTConverterTest extends ConverterTestSetup {
checkSourceRange(methodDeclaration.getBody(), expectedSource, source);
}
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=10861
- */
- public void test0278() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0278", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- ASTNode node = getASTNode(compilationUnit, 0, 0);
- assertTrue("Not a Field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
- FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
- checkSourceRange(fieldDeclaration, "Class c = java.lang.String.class;", source); //$NON-NLS-1$
- List fragments = fieldDeclaration.fragments();
- assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
- VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
- Expression expression = variableDeclarationFragment.getInitializer();
- assertTrue("Not a type literal", expression instanceof TypeLiteral); //$NON-NLS-1$
- ITypeBinding typeBinding = expression.resolveTypeBinding();
- assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
- assertEquals("Wrong name", "Class", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=10861
- */
- public void test0279() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0279", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- ASTNode node = getASTNode(compilationUnit, 0, 0,0);
- assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
- VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
- checkSourceRange(variableDeclarationStatement, "Class c = java.lang.String.class;", source); //$NON-NLS-1$
- List fragments = variableDeclarationStatement.fragments();
- assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
- VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
- Expression expression = variableDeclarationFragment.getInitializer();
- assertTrue("Not a type literal", expression instanceof TypeLiteral); //$NON-NLS-1$
- ITypeBinding typeBinding = expression.resolveTypeBinding();
- assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
- assertEquals("Wrong name", "Class", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=10861
+// */
+// public void test0278() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0278", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// ASTNode node = getASTNode(compilationUnit, 0, 0);
+// assertTrue("Not a Field declaration", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+// VariableDeclarationStatement fieldDeclaration = (VariableDeclarationStatement) node;
+// checkSourceRange(fieldDeclaration, "Class c = java.lang.String.class;", source); //$NON-NLS-1$
+// List fragments = fieldDeclaration.fragments();
+// assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
+// VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+// Expression expression = variableDeclarationFragment.getInitializer();
+// assertTrue("Not a type literal", expression instanceof TypeLiteral); //$NON-NLS-1$
+// ITypeBinding typeBinding = expression.resolveTypeBinding();
+// assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+// assertEquals("Wrong name", "Class", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
+//
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=10861
+// */
+// public void test0279() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0279", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// ASTNode node = getASTNode(compilationUnit, 0, 0,0);
+// assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+// VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+// checkSourceRange(variableDeclarationStatement, "Class c = java.lang.String.class;", source); //$NON-NLS-1$
+// List fragments = variableDeclarationStatement.fragments();
+// assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
+// VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+// Expression expression = variableDeclarationFragment.getInitializer();
+// assertTrue("Not a type literal", expression instanceof TypeLiteral); //$NON-NLS-1$
+// ITypeBinding typeBinding = expression.resolveTypeBinding();
+// assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+// assertEquals("Wrong name", "Class", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
/**
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10865
* Check well known types
*/
public void test0280() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0280", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0280", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
AST newAst = result.getAST();
- ITypeBinding typeBinding = newAst.resolveWellKnownType("boolean"); //$NON-NLS-1$
- assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
- assertEquals("Wrong name", "boolean", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- typeBinding = newAst.resolveWellKnownType("char"); //$NON-NLS-1$
- assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
- assertEquals("Wrong name", "char", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- typeBinding = newAst.resolveWellKnownType("byte"); //$NON-NLS-1$
- assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
- assertEquals("Wrong name", "byte", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- typeBinding = newAst.resolveWellKnownType("short"); //$NON-NLS-1$
- assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
- assertEquals("Wrong name", "short", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- typeBinding = newAst.resolveWellKnownType("int"); //$NON-NLS-1$
+ ITypeBinding typeBinding = newAst.resolveWellKnownType("Boolean"); //$NON-NLS-1$
assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
- assertEquals("Wrong name", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- typeBinding = newAst.resolveWellKnownType("long"); //$NON-NLS-1$
- assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
- assertEquals("Wrong name", "long", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- typeBinding = newAst.resolveWellKnownType("float"); //$NON-NLS-1$
- assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
- assertEquals("Wrong name", "float", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- typeBinding = newAst.resolveWellKnownType("double"); //$NON-NLS-1$
- assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
- assertEquals("Wrong name", "double", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- typeBinding = newAst.resolveWellKnownType("void"); //$NON-NLS-1$
- assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
- assertEquals("Wrong name", "void", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- typeBinding = newAst.resolveWellKnownType("java.lang.Object"); //$NON-NLS-1$
- assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
- assertEquals("Wrong name", "Object", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- typeBinding = newAst.resolveWellKnownType("java.lang.String"); //$NON-NLS-1$
+ assertEquals("Wrong name", "Boolean", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ typeBinding = newAst.resolveWellKnownType("String"); //$NON-NLS-1$
assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
assertEquals("Wrong name", "String", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- typeBinding = newAst.resolveWellKnownType("java.lang.StringBuffer"); //$NON-NLS-1$
- assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
- assertEquals("Wrong name", "StringBuffer", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- typeBinding = newAst.resolveWellKnownType("java.lang.Throwable"); //$NON-NLS-1$
- assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
- assertEquals("Wrong name", "Throwable", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- typeBinding = newAst.resolveWellKnownType("java.lang.Exception"); //$NON-NLS-1$
- assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
- assertEquals("Wrong name", "Exception", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- typeBinding = newAst.resolveWellKnownType("java.lang.RuntimeException"); //$NON-NLS-1$
+ typeBinding = newAst.resolveWellKnownType("Number"); //$NON-NLS-1$
assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
- assertEquals("Wrong name", "RuntimeException", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- typeBinding = newAst.resolveWellKnownType("java.lang.Error"); //$NON-NLS-1$
- assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
- assertEquals("Wrong name", "Error", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- typeBinding = newAst.resolveWellKnownType("java.lang.Class"); //$NON-NLS-1$
- assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
- assertEquals("Wrong name", "Class", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- typeBinding = newAst.resolveWellKnownType("java.lang.Runnable"); //$NON-NLS-1$
- assertNull("typeBinding not null", typeBinding); //$NON-NLS-1$
- typeBinding = newAst.resolveWellKnownType("java.lang.Cloneable"); //$NON-NLS-1$
- assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
- typeBinding = newAst.resolveWellKnownType("java.io.Serializable"); //$NON-NLS-1$
- assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
- typeBinding = newAst.resolveWellKnownType("java.lang.Boolean"); //$NON-NLS-1$
- assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
- typeBinding = newAst.resolveWellKnownType("java.lang.Byte"); //$NON-NLS-1$
- assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
- typeBinding = newAst.resolveWellKnownType("java.lang.Character"); //$NON-NLS-1$
- assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
- typeBinding = newAst.resolveWellKnownType("java.lang.Double"); //$NON-NLS-1$
- assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
- typeBinding = newAst.resolveWellKnownType("java.lang.Float"); //$NON-NLS-1$
- assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
- typeBinding = newAst.resolveWellKnownType("java.lang.Integer"); //$NON-NLS-1$
- assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
- typeBinding = newAst.resolveWellKnownType("java.lang.Long"); //$NON-NLS-1$
- assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
- typeBinding = newAst.resolveWellKnownType("java.lang.Short"); //$NON-NLS-1$
- assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
- typeBinding = newAst.resolveWellKnownType("java.lang.Void"); //$NON-NLS-1$
- assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
+ assertEquals("Wrong name", "Number", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// typeBinding = newAst.resolveWellKnownType("short"); //$NON-NLS-1$
+// assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+// assertEquals("Wrong name", "short", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// typeBinding = newAst.resolveWellKnownType("int"); //$NON-NLS-1$
+// assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+// assertEquals("Wrong name", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// typeBinding = newAst.resolveWellKnownType("long"); //$NON-NLS-1$
+// assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+// assertEquals("Wrong name", "long", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// typeBinding = newAst.resolveWellKnownType("float"); //$NON-NLS-1$
+// assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+// assertEquals("Wrong name", "float", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// typeBinding = newAst.resolveWellKnownType("double"); //$NON-NLS-1$
+// assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+// assertEquals("Wrong name", "double", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// typeBinding = newAst.resolveWellKnownType("void"); //$NON-NLS-1$
+// assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+// assertEquals("Wrong name", "void", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// typeBinding = newAst.resolveWellKnownType("java.lang.Object"); //$NON-NLS-1$
+// assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+// assertEquals("Wrong name", "Object", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// typeBinding = newAst.resolveWellKnownType("java.lang.String"); //$NON-NLS-1$
+// assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+// assertEquals("Wrong name", "String", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// typeBinding = newAst.resolveWellKnownType("java.lang.StringBuffer"); //$NON-NLS-1$
+// assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+// assertEquals("Wrong name", "StringBuffer", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// typeBinding = newAst.resolveWellKnownType("java.lang.Throwable"); //$NON-NLS-1$
+// assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+// assertEquals("Wrong name", "Throwable", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// typeBinding = newAst.resolveWellKnownType("java.lang.Exception"); //$NON-NLS-1$
+// assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+// assertEquals("Wrong name", "Exception", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// typeBinding = newAst.resolveWellKnownType("java.lang.RuntimeException"); //$NON-NLS-1$
+// assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+// assertEquals("Wrong name", "RuntimeException", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// typeBinding = newAst.resolveWellKnownType("java.lang.Error"); //$NON-NLS-1$
+// assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+// assertEquals("Wrong name", "Error", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// typeBinding = newAst.resolveWellKnownType("java.lang.Class"); //$NON-NLS-1$
+// assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+// assertEquals("Wrong name", "Class", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// typeBinding = newAst.resolveWellKnownType("java.lang.Runnable"); //$NON-NLS-1$
+// assertNull("typeBinding not null", typeBinding); //$NON-NLS-1$
+// typeBinding = newAst.resolveWellKnownType("java.lang.Cloneable"); //$NON-NLS-1$
+// assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
+// typeBinding = newAst.resolveWellKnownType("java.io.Serializable"); //$NON-NLS-1$
+// assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
+// typeBinding = newAst.resolveWellKnownType("java.lang.Boolean"); //$NON-NLS-1$
+// assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
+// typeBinding = newAst.resolveWellKnownType("java.lang.Byte"); //$NON-NLS-1$
+// assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
+// typeBinding = newAst.resolveWellKnownType("java.lang.Character"); //$NON-NLS-1$
+// assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
+// typeBinding = newAst.resolveWellKnownType("java.lang.Double"); //$NON-NLS-1$
+// assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
+// typeBinding = newAst.resolveWellKnownType("java.lang.Float"); //$NON-NLS-1$
+// assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
+// typeBinding = newAst.resolveWellKnownType("java.lang.Integer"); //$NON-NLS-1$
+// assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
+// typeBinding = newAst.resolveWellKnownType("java.lang.Long"); //$NON-NLS-1$
+// assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
+// typeBinding = newAst.resolveWellKnownType("java.lang.Short"); //$NON-NLS-1$
+// assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
+// typeBinding = newAst.resolveWellKnownType("java.lang.Void"); //$NON-NLS-1$
+// assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
}
/**
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
*/
public void test0281() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0281", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0281", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 0);
- assertTrue("Not a Field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
- FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
- checkSourceRange(fieldDeclaration, "Object o= /*]*/new Object()/*[*/;", source); //$NON-NLS-1$
+ assertTrue("Not a VariableDeclarationStatement declaration", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+ VariableDeclarationStatement fieldDeclaration = (VariableDeclarationStatement) node;
+ checkSourceRange(fieldDeclaration, "var o= /*]*/new Object()/*[*/;", source); //$NON-NLS-1$
List fragments = fieldDeclaration.fragments();
assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
@@ -6809,16 +6890,16 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
*/
public void test0282() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0282", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0282", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 0);
- assertTrue("Not a Field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
- FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
- checkSourceRange(fieldDeclaration, "boolean b = /*]*/true/*[*/;", source); //$NON-NLS-1$
+ assertTrue("Not a VariableDeclarationStatement declaration", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+ VariableDeclarationStatement fieldDeclaration = (VariableDeclarationStatement) node;
+ checkSourceRange(fieldDeclaration, "var b = /*]*/true/*[*/;", source); //$NON-NLS-1$
List fragments = fieldDeclaration.fragments();
assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
@@ -6830,16 +6911,16 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
*/
public void test0283() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0283", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0283", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 0);
- assertTrue("Not a Field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
- FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
- checkSourceRange(fieldDeclaration, "char c = /*]*/'c'/*[*/;", source); //$NON-NLS-1$
+ assertTrue("Not a VariableDeclarationStatement declaration", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+ VariableDeclarationStatement fieldDeclaration = (VariableDeclarationStatement) node;
+ checkSourceRange(fieldDeclaration, "var c = /*]*/'c'/*[*/;", source); //$NON-NLS-1$
List fragments = fieldDeclaration.fragments();
assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
@@ -6851,16 +6932,16 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
*/
public void test0284() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0284", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0284", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 0);
- assertTrue("Not a Field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
- FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
- checkSourceRange(fieldDeclaration, "Object o = /*]*/null/*[*/;", source); //$NON-NLS-1$
+ assertTrue("Not a Field declaration", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+ VariableDeclarationStatement fieldDeclaration = (VariableDeclarationStatement) node;
+ checkSourceRange(fieldDeclaration, "var o = /*]*/null/*[*/;", source); //$NON-NLS-1$
List fragments = fieldDeclaration.fragments();
assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
@@ -6868,41 +6949,41 @@ public class ASTConverterTest extends ConverterTestSetup {
checkSourceRange(expression, "null", source); //$NON-NLS-1$
}
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
- */
- public void test0285() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0285", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- ASTNode node = getASTNode(compilationUnit, 0, 0);
- assertTrue("Not a Field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
- FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
- checkSourceRange(fieldDeclaration, "Object o = /*]*/Object.class/*[*/;", source); //$NON-NLS-1$
- List fragments = fieldDeclaration.fragments();
- assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
- VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
- Expression expression = variableDeclarationFragment.getInitializer();
- checkSourceRange(expression, "Object.class", source); //$NON-NLS-1$
- }
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
+// */
+// public void test0285() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0285", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// ASTNode node = getASTNode(compilationUnit, 0, 0);
+// assertTrue("Not a Field declaration", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+// VariableDeclarationStatement fieldDeclaration = (VariableDeclarationStatement) node;
+// checkSourceRange(fieldDeclaration, "var o = /*]*/Object.class/*[*/;", source); //$NON-NLS-1$
+// List fragments = fieldDeclaration.fragments();
+// assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
+// VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+// Expression expression = variableDeclarationFragment.getInitializer();
+// checkSourceRange(expression, "Object.class", source); //$NON-NLS-1$
+// }
/**
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
*/
public void test0286() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0286", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0286", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 0);
- assertTrue("Not a Field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
- FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
- checkSourceRange(fieldDeclaration, "int i = /**/(2)/**/;", source); //$NON-NLS-1$
+ assertTrue("Not a Field declaration", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+ VariableDeclarationStatement fieldDeclaration = (VariableDeclarationStatement) node;
+ checkSourceRange(fieldDeclaration, "var i = /**/(2)/**/;", source); //$NON-NLS-1$
List fragments = fieldDeclaration.fragments();
assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
@@ -6914,104 +6995,104 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
*/
public void test0287() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0287", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0287", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 0);
- assertTrue("Not a Field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
- FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
- checkSourceRange(fieldDeclaration, "String[] tab = /**/new String[3]/**/;", source); //$NON-NLS-1$
+ assertTrue("Not a VariableDeclarationStatement declaration", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+ VariableDeclarationStatement fieldDeclaration = (VariableDeclarationStatement) node;
+ checkSourceRange(fieldDeclaration, "var tab = /**/new String/**/;", source); //$NON-NLS-1$
List fragments = fieldDeclaration.fragments();
assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
Expression expression = variableDeclarationFragment.getInitializer();
- checkSourceRange(expression, "new String[3]", source); //$NON-NLS-1$
+ checkSourceRange(expression, "new String", source); //$NON-NLS-1$
}
/**
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
*/
public void test0288() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0288", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0288", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 0);
- assertTrue("Not a Field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
- FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
- checkSourceRange(fieldDeclaration, "String[] tab = /**/{ }/**/;", source); //$NON-NLS-1$
+ assertTrue("Not a VariableDeclarationStatement declaration", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+ VariableDeclarationStatement fieldDeclaration = (VariableDeclarationStatement) node;
+ checkSourceRange(fieldDeclaration, "var tab = /**/[]/**/;", source); //$NON-NLS-1$
List fragments = fieldDeclaration.fragments();
assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
Expression expression = variableDeclarationFragment.getInitializer();
- checkSourceRange(expression, "{ }", source); //$NON-NLS-1$
+ checkSourceRange(expression, "[]", source); //$NON-NLS-1$
}
/**
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
*/
public void test0289() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0289", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0289", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 1);
- assertTrue("Not a Field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
- FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
- checkSourceRange(fieldDeclaration, "String s = /**/tab1[0]/**/;", source); //$NON-NLS-1$
+ assertTrue("Not a VariableDeclarationStatement declaration", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+ VariableDeclarationStatement fieldDeclaration = (VariableDeclarationStatement) node;
+ checkSourceRange(fieldDeclaration, "var s = /**/tab1[0]/**/;", source); //$NON-NLS-1$
List fragments = fieldDeclaration.fragments();
assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
Expression expression = variableDeclarationFragment.getInitializer();
checkSourceRange(expression, "tab1[0]", source); //$NON-NLS-1$
}
-
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
- */
- public void test0290() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0290", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- ASTNode node = getASTNode(compilationUnit, 0, 0);
- assertTrue("Not a Field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
- FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
- checkSourceRange(fieldDeclaration, "Object o = /*]*/new java.lang.Object()/*[*/;", source); //$NON-NLS-1$
- List fragments = fieldDeclaration.fragments();
- assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
- VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
- Expression expression = variableDeclarationFragment.getInitializer();
- checkSourceRange(expression, "new java.lang.Object()", source); //$NON-NLS-1$
- }
-
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=10898
- */
- public void test0291() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0291", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit unit = (CompilationUnit) result;
- assertEquals("no errors", 1, unit.getMessages().length); //$NON-NLS-1$
- assertEquals("no errors", 1, unit.getProblems().length); //$NON-NLS-1$
- }
+//
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
+// */
+// public void test0290() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0290", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// ASTNode node = getASTNode(compilationUnit, 0, 0);
+// assertTrue("Not a Field declaration", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+// VariableDeclarationStatement fieldDeclaration = (VariableDeclarationStatement) node;
+// checkSourceRange(fieldDeclaration, "var o = /*]*/new java.lang.Object()/*[*/;", source); //$NON-NLS-1$
+// List fragments = fieldDeclaration.fragments();
+// assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
+// VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+// Expression expression = variableDeclarationFragment.getInitializer();
+// checkSourceRange(expression, "new java.lang.Object()", source); //$NON-NLS-1$
+// }
+//
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=10898
+// */
+// public void test0291() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0291", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit unit = (CompilationUnit) result;
+// assertEquals("no errors", 1, unit.getMessages().length); //$NON-NLS-1$
+// assertEquals("no errors", 1, unit.getProblems().length); //$NON-NLS-1$
+// }
/**
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10913
*/
public void test0292() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0292", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0292", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -7020,65 +7101,65 @@ public class ASTConverterTest extends ConverterTestSetup {
assertTrue("Not a return statement", node instanceof ReturnStatement); //$NON-NLS-1$
ReturnStatement returnStatement = (ReturnStatement) node;
Expression expression = returnStatement.getExpression();
- assertTrue("Not a qualifiedName", expression instanceof QualifiedName); //$NON-NLS-1$
- QualifiedName qualifiedName = (QualifiedName) expression;
- SimpleName simpleName = qualifiedName.getName();
+ assertTrue("Not a FieldAccess", expression instanceof FieldAccess); //$NON-NLS-1$
+ FieldAccess fieldAccess = (FieldAccess) expression;
+ SimpleName simpleName = fieldAccess.getName();
assertEquals("Wrong name", "x", simpleName.getIdentifier()); //$NON-NLS-1$ //$NON-NLS-2$
IBinding binding = simpleName.resolveBinding();
assertNotNull("NO binding", binding); //$NON-NLS-1$
assertTrue("Not a variable binding", binding instanceof IVariableBinding); //$NON-NLS-1$
assertEquals("wrong name", "x", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- Name name = qualifiedName.getQualifier();
- assertTrue("Not a simpleName", name instanceof SimpleName); //$NON-NLS-1$
- SimpleName simpleName2 = (SimpleName) name;
+ Expression expr = fieldAccess.getExpression();
+ assertTrue("Not a simpleName", expr instanceof SimpleName); //$NON-NLS-1$
+ SimpleName simpleName2 = (SimpleName) expr;
IBinding binding2 = simpleName2.resolveBinding();
assertNotNull("No binding2", binding2); //$NON-NLS-1$
assertTrue("Not a type binding", binding2 instanceof ITypeBinding); //$NON-NLS-1$
assertEquals("Wrong name", "Test", binding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
}
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=10933
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=10935
- */
- public void test0293() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0293", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
- VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
- List fragments = variableDeclarationStatement.fragments();
- assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
- VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
- Expression expression = variableDeclarationFragment.getInitializer();
- assertTrue("Not a class instance creation", expression instanceof ClassInstanceCreation); //$NON-NLS-1$
- ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
- AnonymousClassDeclaration anonymousClassDeclaration = classInstanceCreation.getAnonymousClassDeclaration();
- assertNotNull("No body", anonymousClassDeclaration); //$NON-NLS-1$
- String expectedSource =
- "{\n" + //$NON-NLS-1$
- " public void run() {\n" + //$NON-NLS-1$
- " /*]*/foo();/*[*/\n" + //$NON-NLS-1$
- " }\n" + //$NON-NLS-1$
- " }"; //$NON-NLS-1$
- checkSourceRange(anonymousClassDeclaration, expectedSource, source);
- expectedSource =
- "run= new Runnable() {\n" + //$NON-NLS-1$
- " public void run() {\n" + //$NON-NLS-1$
- " /*]*/foo();/*[*/\n" + //$NON-NLS-1$
- " }\n" + //$NON-NLS-1$
- " }"; //$NON-NLS-1$
- checkSourceRange(variableDeclarationFragment, expectedSource, source);
- }
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=10933
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=10935
+// */
+// public void test0293() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0293", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+// VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+// List fragments = variableDeclarationStatement.fragments();
+// assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
+// VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+// Expression expression = variableDeclarationFragment.getInitializer();
+// assertTrue("Not a class instance creation", expression instanceof ClassInstanceCreation); //$NON-NLS-1$
+// ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
+// AnonymousClassDeclaration anonymousClassDeclaration = classInstanceCreation.getAnonymousClassDeclaration();
+// assertNotNull("No body", anonymousClassDeclaration); //$NON-NLS-1$
+// String expectedSource =
+// "{\n" + //$NON-NLS-1$
+// " public void run() {\n" + //$NON-NLS-1$
+// " /*]*/foo();/*[*/\n" + //$NON-NLS-1$
+// " }\n" + //$NON-NLS-1$
+// " }"; //$NON-NLS-1$
+// checkSourceRange(anonymousClassDeclaration, expectedSource, source);
+// expectedSource =
+// "run= new Runnable() {\n" + //$NON-NLS-1$
+// " public void run() {\n" + //$NON-NLS-1$
+// " /*]*/foo();/*[*/\n" + //$NON-NLS-1$
+// " }\n" + //$NON-NLS-1$
+// " }"; //$NON-NLS-1$
+// checkSourceRange(variableDeclarationFragment, expectedSource, source);
+// }
/**
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10984
*/
public void test0294() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0294", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0294", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -7088,7 +7169,7 @@ public class ASTConverterTest extends ConverterTestSetup {
assertTrue("Not a method declaration", node instanceof MethodDeclaration); //$NON-NLS-1$
MethodDeclaration methodDeclaration = (MethodDeclaration) node;
String expectedSource =
- "public void fails() {\n" + //$NON-NLS-1$
+ "function fails() {\n" + //$NON-NLS-1$
" foo()\n" + //$NON-NLS-1$
" }"; //$NON-NLS-1$
checkSourceRange(methodDeclaration, expectedSource, source);
@@ -7110,13 +7191,13 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10986
*/
public void test0295() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0295", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0295", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
- assertEquals("Wrong size", 2, compilationUnit.getMessages().length); //$NON-NLS-1$
- assertEquals("Wrong size", 2, compilationUnit.getProblems().length); //$NON-NLS-1$
+// assertEquals("Wrong size", 2, compilationUnit.getMessages().length); //$NON-NLS-1$
+// assertEquals("Wrong size", 2, compilationUnit.getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
ExpressionStatement expressionStatement = (ExpressionStatement) node;
@@ -7124,7 +7205,7 @@ public class ASTConverterTest extends ConverterTestSetup {
assertTrue("not a method invocation", expression instanceof MethodInvocation); //$NON-NLS-1$
MethodInvocation methodInvocation = (MethodInvocation) expression;
ITypeBinding typeBinding = methodInvocation.resolveTypeBinding();
- assertNull("type binding is not null", typeBinding); //$NON-NLS-1$
+ assertNotNull("type binding is null", typeBinding); //$NON-NLS-1$
}
@@ -7132,7 +7213,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10984
*/
public void test0296() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0296", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0296", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -7142,7 +7223,7 @@ public class ASTConverterTest extends ConverterTestSetup {
assertTrue("Not a method declaration", node instanceof MethodDeclaration); //$NON-NLS-1$
MethodDeclaration methodDeclaration = (MethodDeclaration) node;
String expectedSource =
- "public void fails() {\n" + //$NON-NLS-1$
+ "function fails() {\n" + //$NON-NLS-1$
" foo()\n" + //$NON-NLS-1$
" }"; //$NON-NLS-1$
checkSourceRange(methodDeclaration, expectedSource, source);
@@ -7164,42 +7245,42 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=11037
*/
public void test0297() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0297", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0297", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
runConversion(sourceUnit, false);
}
-
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=10984
- */
- public void test0298() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0298", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, false);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
- assertTrue("Not a ReturnStatement", node instanceof ReturnStatement); //$NON-NLS-1$
- ReturnStatement returnStatement = (ReturnStatement) node;
- Expression expression = returnStatement.getExpression();
- checkSourceRange(expression, "a().length != 3", source); //$NON-NLS-1$
- }
+//
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=10984
+// */
+// public void test0298() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0298", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, false);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+// assertTrue("Not a ReturnStatement", node instanceof ReturnStatement); //$NON-NLS-1$
+// ReturnStatement returnStatement = (ReturnStatement) node;
+// Expression expression = returnStatement.getExpression();
+// checkSourceRange(expression, "a().length != 3", source); //$NON-NLS-1$
+// }
/**
* http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
* http://dev.eclipse.org/bugs/show_bug.cgi?id=11104
*/
public void test0299() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0299", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0299", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 0);
- assertTrue("Not a Field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
- FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
- checkSourceRange(fieldDeclaration, "int i = (/**/2/**/);", source); //$NON-NLS-1$
+ assertTrue("Not a Field declaration", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+ VariableDeclarationStatement fieldDeclaration = (VariableDeclarationStatement) node;
+ checkSourceRange(fieldDeclaration, "var i = (/**/2/**/);", source); //$NON-NLS-1$
List fragments = fieldDeclaration.fragments();
assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
@@ -7215,16 +7296,16 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=11104
*/
public void test0300() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0300", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0300", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 0);
- assertTrue("Not a Field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
- FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
- checkSourceRange(fieldDeclaration, "boolean b = /**/true/**/;", source); //$NON-NLS-1$
+ assertTrue("Not a Field declaration", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+ VariableDeclarationStatement fieldDeclaration = (VariableDeclarationStatement) node;
+ checkSourceRange(fieldDeclaration, "var b = /**/true/**/;", source); //$NON-NLS-1$
List fragments = fieldDeclaration.fragments();
assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
@@ -7237,16 +7318,16 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=11104
*/
public void test0301() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0301", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0301", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 0);
- assertTrue("Not a Field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
- FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
- checkSourceRange(fieldDeclaration, "Object o = /**/null/**/;", source); //$NON-NLS-1$
+ assertTrue("Not a Field declaration", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+ VariableDeclarationStatement fieldDeclaration = (VariableDeclarationStatement) node;
+ checkSourceRange(fieldDeclaration, "var o = /**/null/**/;", source); //$NON-NLS-1$
List fragments = fieldDeclaration.fragments();
assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
@@ -7258,7 +7339,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=11106
*/
public void test0302() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0302", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0302", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -7278,7 +7359,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=11129
*/
public void test0303() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0303", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0303", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -7290,22 +7371,22 @@ public class ASTConverterTest extends ConverterTestSetup {
assertTrue("Not an Assignement", expression2 instanceof Assignment); //$NON-NLS-1$
Assignment assignment = (Assignment) expression2;
Expression expression = assignment.getRightHandSide();
- assertTrue("Not a CastExpression", expression instanceof CastExpression); //$NON-NLS-1$
- CastExpression castExpression = (CastExpression) expression;
- ITypeBinding typeBinding = castExpression.resolveTypeBinding();
+// assertTrue("Not a CastExpression", expression instanceof CastExpression); //$NON-NLS-1$
+// CastExpression castExpression = (CastExpression) expression;
+ ITypeBinding typeBinding = expression.resolveTypeBinding();
assertNotNull("No binding", typeBinding); //$NON-NLS-1$
- assertEquals("Wrong name", "char", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- Type type = castExpression.getType();
- ITypeBinding typeBinding2 = type.resolveBinding();
- assertNotNull("No binding2", typeBinding2); //$NON-NLS-1$
- assertEquals("Wrong name", "char", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("Wrong name", "Number", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// Type type = castExpression.getType();
+// ITypeBinding typeBinding2 = type.resolveBinding();
+// assertNotNull("No binding2", typeBinding2); //$NON-NLS-1$
+// assertEquals("Wrong name", "char", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
}
/**
* http://dev.eclipse.org/bugs/show_bug.cgi?id=11151
*/
public void test0304() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0304", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0304", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -7313,115 +7394,111 @@ public class ASTConverterTest extends ConverterTestSetup {
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 0);
assertTrue("not a method declaration", node instanceof MethodDeclaration); //$NON-NLS-1$
- checkSourceRange(node, "public void foo(int arg);", source); //$NON-NLS-1$
+ checkSourceRange(node, "function foo(arg);", source); //$NON-NLS-1$
MethodDeclaration methodDeclaration = (MethodDeclaration) node;
Block block = methodDeclaration.getBody();
assertNull("Has a body", block); //$NON-NLS-1$
}
-
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=11125
- */
- public void test0305() {
- char[] source =
- ("package test0305;\n" + //$NON-NLS-1$
- "\n" + //$NON-NLS-1$
- "class Test {\n" + //$NON-NLS-1$
- " public void foo(int arg) {}\n" + //$NON-NLS-1$
- "}").toCharArray(); //$NON-NLS-1$
- IJavaProject project = getJavaProject("Converter"); //$NON-NLS-1$
- ASTNode result = runConversion(source, "Test.java", project, true); //$NON-NLS-1$
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- ASTNode node = getASTNode(compilationUnit, 0);
- assertTrue("not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
- TypeDeclaration typeDeclaration = (TypeDeclaration) node;
- ITypeBinding typeBinding = typeDeclaration.resolveBinding();
- assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
- assertEquals("Wrong name", "Test", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Wrong package", "test0305", typeBinding.getPackage().getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Not an interface", typeBinding.isClass()); //$NON-NLS-1$
- }
-
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=11125
- */
- public void test0306() {
- char[] source =
- ("package java.lang;\n" + //$NON-NLS-1$
- "\n" + //$NON-NLS-1$
- "class Object {\n" + //$NON-NLS-1$
- " public void foo(int arg) {}\n" + //$NON-NLS-1$
- "}").toCharArray(); //$NON-NLS-1$
- IJavaProject project = getJavaProject("Converter"); //$NON-NLS-1$
- ASTNode result = runConversion(source, "Object.java", project, true); //$NON-NLS-1$
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- ASTNode node = getASTNode(compilationUnit, 0);
- assertTrue("not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
- TypeDeclaration typeDeclaration = (TypeDeclaration) node;
- ITypeBinding typeBinding = typeDeclaration.resolveBinding();
- assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
- assertEquals("Wrong name", "Object", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Wrong package", "java.lang", typeBinding.getPackage().getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Not an interface", typeBinding.isClass()); //$NON-NLS-1$
- assertEquals("Wrong size", 2, typeBinding.getDeclaredMethods().length); //$NON-NLS-1$
- }
-
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=11371
- */
- public void test0307() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0307", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
- assertTrue("not a method declaration", node instanceof MethodDeclaration); //$NON-NLS-1$
- MethodDeclaration methodDeclaration = (MethodDeclaration) node;
- Block block = methodDeclaration.getBody();
- assertNotNull("No body", block); //$NON-NLS-1$
- List statements = block.statements();
- assertEquals("wrong size", 1, statements.size()); //$NON-NLS-1$
- Statement statement = (Statement) statements.get(0);
- assertTrue("Not a super constructor invocation", statement instanceof SuperConstructorInvocation); //$NON-NLS-1$
- checkSourceRange(statement, "super(10);", source);
- }
-
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=11371
- */
- public void test0308() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0308", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
- assertTrue("not a method declaration", node instanceof MethodDeclaration); //$NON-NLS-1$
- MethodDeclaration methodDeclaration = (MethodDeclaration) node;
- Block block = methodDeclaration.getBody();
- assertNotNull("No body", block); //$NON-NLS-1$
- List statements = block.statements();
- assertEquals("wrong size", 1, statements.size()); //$NON-NLS-1$
- Statement statement = (Statement) statements.get(0);
- assertTrue("Not a super constructor invocation", statement instanceof SuperConstructorInvocation); //$NON-NLS-1$
- SuperConstructorInvocation superConstructorInvocation = (SuperConstructorInvocation) statement;
- IMethodBinding methodBinding = superConstructorInvocation.resolveConstructorBinding();
- assertNotNull("No methodBinding", methodBinding); //$NON-NLS-1$
- IMethodBinding methodBinding2 = methodDeclaration.resolveBinding();
- assertNotNull("No methodBinding2", methodBinding2); //$NON-NLS-1$
- }
+//
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=11125
+// */
+// public void test0305() {
+// char[] source =
+// ("" + //$NON-NLS-1$
+// " function foo(arg) {}\n" + //$NON-NLS-1$
+// "").toCharArray(); //$NON-NLS-1$
+// IJavaProject project = getJavaProject("Converter"); //$NON-NLS-1$
+// ASTNode result = runConversion(source, "Test.js", project, true); //$NON-NLS-1$
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// ASTNode node = getASTNode(compilationUnit, 0);
+// assertTrue("not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+// TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+// ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+// assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+//// assertEquals("Wrong name", "Test", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+//// assertEquals("Wrong package", "test0305", typeBinding.getPackage().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+//// assertTrue("Not an interface", typeBinding.isClass()); //$NON-NLS-1$
+// }
+
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=11125
+// */
+// public void test0306() {
+// char[] source =
+// ("" + //$NON-NLS-1$
+// " function foo(arg) {}\n" + //$NON-NLS-1$
+// "").toCharArray(); //$NON-NLS-1$
+// IJavaProject project = getJavaProject("Converter"); //$NON-NLS-1$
+// ASTNode result = runConversion(source, "Object.js", project, true); //$NON-NLS-1$
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// ASTNode node = getASTNode(compilationUnit, 0);
+// assertTrue("not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+// TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+// ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+// assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+//// assertEquals("Wrong name", "Object", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+//// assertEquals("Wrong package", "java.lang", typeBinding.getPackage().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+//// assertTrue("Not an interface", typeBinding.isClass()); //$NON-NLS-1$
+// assertEquals("Wrong size", 2, typeBinding.getDeclaredMethods().length); //$NON-NLS-1$
+// }
+//
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=11371
+// */
+// public void test0307() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0307", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
+// assertTrue("not a method declaration", node instanceof MethodDeclaration); //$NON-NLS-1$
+// MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+// Block block = methodDeclaration.getBody();
+// assertNotNull("No body", block); //$NON-NLS-1$
+// List statements = block.statements();
+// assertEquals("wrong size", 1, statements.size()); //$NON-NLS-1$
+// Statement statement = (Statement) statements.get(0);
+// assertTrue("Not a super constructor invocation", statement instanceof SuperConstructorInvocation); //$NON-NLS-1$
+// checkSourceRange(statement, "super(10);", source);
+// }
+//
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=11371
+// */
+// public void test0308() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0308", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
+// assertTrue("not a method declaration", node instanceof MethodDeclaration); //$NON-NLS-1$
+// MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+// Block block = methodDeclaration.getBody();
+// assertNotNull("No body", block); //$NON-NLS-1$
+// List statements = block.statements();
+// assertEquals("wrong size", 1, statements.size()); //$NON-NLS-1$
+// Statement statement = (Statement) statements.get(0);
+// assertTrue("Not a super constructor invocation", statement instanceof SuperConstructorInvocation); //$NON-NLS-1$
+// SuperConstructorInvocation superConstructorInvocation = (SuperConstructorInvocation) statement;
+// IMethodBinding methodBinding = superConstructorInvocation.resolveConstructorBinding();
+// assertNotNull("No methodBinding", methodBinding); //$NON-NLS-1$
+// IMethodBinding methodBinding2 = methodDeclaration.resolveBinding();
+// assertNotNull("No methodBinding2", methodBinding2); //$NON-NLS-1$
+// }
/**
* http://dev.eclipse.org/bugs/show_bug.cgi?id=11380
*/
public void test0309() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0309", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0309", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -7437,132 +7514,132 @@ public class ASTConverterTest extends ConverterTestSetup {
ConditionalExpression conditionalExpression = (ConditionalExpression) expression;
ITypeBinding typeBinding = conditionalExpression.resolveTypeBinding();
assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
- assertEquals("wrong name", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("wrong name", "Number", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
}
/**
* http://dev.eclipse.org/bugs/show_bug.cgi?id=11380
*/
public void test0310() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0310", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0310", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 0);
- assertTrue("not a FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
- FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+ assertTrue("not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+ VariableDeclarationStatement fieldDeclaration = (VariableDeclarationStatement) node;
List fragments = fieldDeclaration.fragments();
assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
Expression expression = variableDeclarationFragment.getInitializer();
- assertTrue("Not a qualified name", expression instanceof QualifiedName); //$NON-NLS-1$
- QualifiedName qualifiedName = (QualifiedName) expression;
- Name qualifier = qualifiedName.getQualifier();
+ assertTrue("Not a fieldAccess", expression instanceof FieldAccess); //$NON-NLS-1$
+ FieldAccess fieldAccess = (FieldAccess) expression;
+ SimpleName qualifier = (SimpleName)fieldAccess.getExpression();
IBinding binding = qualifier.resolveBinding();
assertNotNull("No binding", binding); //$NON-NLS-1$
assertEquals("wrong name", "I", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
}
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=11638
- */
- public void test0311() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0311", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- ASTNode node = getASTNode(compilationUnit, 0, 0, 1);
- assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
- VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
- List fragments = variableDeclarationStatement.fragments();
- assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
- VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
- Expression expression = variableDeclarationFragment.getInitializer();
- assertTrue("not a class instance creation", expression instanceof ClassInstanceCreation); //$NON-NLS-1$
- ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
- AnonymousClassDeclaration anonymousClassDeclaration = classInstanceCreation.getAnonymousClassDeclaration();
- assertNotNull("No body", anonymousClassDeclaration); //$NON-NLS-1$
- List bodyDeclarations = anonymousClassDeclaration.bodyDeclarations();
- assertEquals("wrong size for body declarations", 1, bodyDeclarations.size()); //$NON-NLS-1$
- BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
- assertTrue("Not a method declaration", bodyDeclaration instanceof MethodDeclaration); //$NON-NLS-1$
- MethodDeclaration methodDeclaration = (MethodDeclaration) bodyDeclaration;
- Block block = methodDeclaration.getBody();
- assertNotNull("no body", block); //$NON-NLS-1$
- List statements = block.statements();
- assertEquals("Wrong size for statements", 1, statements.size()); //$NON-NLS-1$
- Statement statement = (Statement) statements.get(0);
- assertTrue("not a variable declaration statement", statement instanceof VariableDeclarationStatement); //$NON-NLS-1$
- VariableDeclarationStatement variableDeclarationStatement2 = (VariableDeclarationStatement) statement;
- List fragments2 = variableDeclarationStatement2.fragments();
- assertEquals("wrong size for fragments2", 1, fragments2.size()); //$NON-NLS-1$
- VariableDeclarationFragment variableDeclarationFragment2 = (VariableDeclarationFragment) fragments2.get(0);
- Expression expression2 = variableDeclarationFragment2.getInitializer();
- assertTrue("Not a name", expression2 instanceof Name); //$NON-NLS-1$
- Name name = (Name) expression2;
- checkSourceRange(name, "j", source); //$NON-NLS-1$
- IBinding binding = name.resolveBinding();
- ASTNode declaringNode = compilationUnit.findDeclaringNode(binding);
- assertNotNull("No declaring node", declaringNode); //$NON-NLS-1$
- checkSourceRange(declaringNode, "int j", source); //$NON-NLS-1$
- assertTrue("Not a single variable declaration", declaringNode instanceof SingleVariableDeclaration); //$NON-NLS-1$
- }
-
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=11638
- * There is a error in this source. A is unresolved. Then there is no
- * declaring node.
- */
- public void test0312() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0312", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- ASTNode node = getASTNode(compilationUnit, 0, 0, 1);
- assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
- VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
- List fragments = variableDeclarationStatement.fragments();
- assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
- VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
- Expression expression = variableDeclarationFragment.getInitializer();
- assertTrue("not a class instance creation", expression instanceof ClassInstanceCreation); //$NON-NLS-1$
- ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
- AnonymousClassDeclaration anonymousClassDeclaration = classInstanceCreation.getAnonymousClassDeclaration();
- assertNotNull("No body", anonymousClassDeclaration); //$NON-NLS-1$
- List bodyDeclarations = anonymousClassDeclaration.bodyDeclarations();
- assertEquals("wrong size for body declarations", 1, bodyDeclarations.size()); //$NON-NLS-1$
- BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
- assertTrue("Not a method declaration", bodyDeclaration instanceof MethodDeclaration); //$NON-NLS-1$
- MethodDeclaration methodDeclaration = (MethodDeclaration) bodyDeclaration;
- Block block = methodDeclaration.getBody();
- assertNotNull("no body", block); //$NON-NLS-1$
- List statements = block.statements();
- assertEquals("Wrong size for statements", 1, statements.size()); //$NON-NLS-1$
- Statement statement = (Statement) statements.get(0);
- assertTrue("not a variable declaration statement", statement instanceof VariableDeclarationStatement); //$NON-NLS-1$
- VariableDeclarationStatement variableDeclarationStatement2 = (VariableDeclarationStatement) statement;
- List fragments2 = variableDeclarationStatement2.fragments();
- assertEquals("wrong size for fragments2", 1, fragments2.size()); //$NON-NLS-1$
- VariableDeclarationFragment variableDeclarationFragment2 = (VariableDeclarationFragment) fragments2.get(0);
- Expression expression2 = variableDeclarationFragment2.getInitializer();
- assertTrue("Not a name", expression2 instanceof Name); //$NON-NLS-1$
- Name name = (Name) expression2;
- checkSourceRange(name, "j", source); //$NON-NLS-1$
- IBinding binding = name.resolveBinding();
- ASTNode declaringNode = compilationUnit.findDeclaringNode(binding);
- assertNull("No declaring node is available", declaringNode); //$NON-NLS-1$
- }
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=11638
+// */
+// public void test0311() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0311", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// ASTNode node = getASTNode(compilationUnit, 0, 0, 1);
+// assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+// VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+// List fragments = variableDeclarationStatement.fragments();
+// assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
+// VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+// Expression expression = variableDeclarationFragment.getInitializer();
+// assertTrue("not a class instance creation", expression instanceof ClassInstanceCreation); //$NON-NLS-1$
+// ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
+// AnonymousClassDeclaration anonymousClassDeclaration = classInstanceCreation.getAnonymousClassDeclaration();
+// assertNotNull("No body", anonymousClassDeclaration); //$NON-NLS-1$
+// List bodyDeclarations = anonymousClassDeclaration.bodyDeclarations();
+// assertEquals("wrong size for body declarations", 1, bodyDeclarations.size()); //$NON-NLS-1$
+// BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+// assertTrue("Not a method declaration", bodyDeclaration instanceof MethodDeclaration); //$NON-NLS-1$
+// MethodDeclaration methodDeclaration = (MethodDeclaration) bodyDeclaration;
+// Block block = methodDeclaration.getBody();
+// assertNotNull("no body", block); //$NON-NLS-1$
+// List statements = block.statements();
+// assertEquals("Wrong size for statements", 1, statements.size()); //$NON-NLS-1$
+// Statement statement = (Statement) statements.get(0);
+// assertTrue("not a variable declaration statement", statement instanceof VariableDeclarationStatement); //$NON-NLS-1$
+// VariableDeclarationStatement variableDeclarationStatement2 = (VariableDeclarationStatement) statement;
+// List fragments2 = variableDeclarationStatement2.fragments();
+// assertEquals("wrong size for fragments2", 1, fragments2.size()); //$NON-NLS-1$
+// VariableDeclarationFragment variableDeclarationFragment2 = (VariableDeclarationFragment) fragments2.get(0);
+// Expression expression2 = variableDeclarationFragment2.getInitializer();
+// assertTrue("Not a name", expression2 instanceof Name); //$NON-NLS-1$
+// Name name = (Name) expression2;
+// checkSourceRange(name, "j", source); //$NON-NLS-1$
+// IBinding binding = name.resolveBinding();
+// ASTNode declaringNode = compilationUnit.findDeclaringNode(binding);
+// assertNotNull("No declaring node", declaringNode); //$NON-NLS-1$
+// checkSourceRange(declaringNode, "var j", source); //$NON-NLS-1$
+// assertTrue("Not a single variable declaration", declaringNode instanceof SingleVariableDeclaration); //$NON-NLS-1$
+// }
+
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=11638
+// * There is a error in this source. A is unresolved. Then there is no
+// * declaring node.
+// */
+// public void test0312() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0312", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// ASTNode node = getASTNode(compilationUnit, 0, 0, 1);
+// assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+// VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+// List fragments = variableDeclarationStatement.fragments();
+// assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
+// VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+// Expression expression = variableDeclarationFragment.getInitializer();
+// assertTrue("not a class instance creation", expression instanceof ClassInstanceCreation); //$NON-NLS-1$
+// ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
+// AnonymousClassDeclaration anonymousClassDeclaration = classInstanceCreation.getAnonymousClassDeclaration();
+// assertNotNull("No body", anonymousClassDeclaration); //$NON-NLS-1$
+// List bodyDeclarations = anonymousClassDeclaration.bodyDeclarations();
+// assertEquals("wrong size for body declarations", 1, bodyDeclarations.size()); //$NON-NLS-1$
+// BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+// assertTrue("Not a method declaration", bodyDeclaration instanceof MethodDeclaration); //$NON-NLS-1$
+// MethodDeclaration methodDeclaration = (MethodDeclaration) bodyDeclaration;
+// Block block = methodDeclaration.getBody();
+// assertNotNull("no body", block); //$NON-NLS-1$
+// List statements = block.statements();
+// assertEquals("Wrong size for statements", 1, statements.size()); //$NON-NLS-1$
+// Statement statement = (Statement) statements.get(0);
+// assertTrue("not a variable declaration statement", statement instanceof VariableDeclarationStatement); //$NON-NLS-1$
+// VariableDeclarationStatement variableDeclarationStatement2 = (VariableDeclarationStatement) statement;
+// List fragments2 = variableDeclarationStatement2.fragments();
+// assertEquals("wrong size for fragments2", 1, fragments2.size()); //$NON-NLS-1$
+// VariableDeclarationFragment variableDeclarationFragment2 = (VariableDeclarationFragment) fragments2.get(0);
+// Expression expression2 = variableDeclarationFragment2.getInitializer();
+// assertTrue("Not a name", expression2 instanceof Name); //$NON-NLS-1$
+// Name name = (Name) expression2;
+// checkSourceRange(name, "j", source); //$NON-NLS-1$
+// IBinding binding = name.resolveBinding();
+// ASTNode declaringNode = compilationUnit.findDeclaringNode(binding);
+// assertNull("No declaring node is available", declaringNode); //$NON-NLS-1$
+// }
/**
* http://dev.eclipse.org/bugs/show_bug.cgi?id=11659
*/
public void test0313() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0313", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0313", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -7586,14 +7663,14 @@ public class ASTConverterTest extends ConverterTestSetup {
assertNotNull("No binding", binding); //$NON-NLS-1$
ASTNode astNode = compilationUnit.findDeclaringNode(binding);
assertNotNull("No declaring node", astNode); //$NON-NLS-1$
- checkSourceRange(astNode, "int i", source); //$NON-NLS-1$
+ checkSourceRange(astNode, "i", source); //$NON-NLS-1$
}
/**
* http://dev.eclipse.org/bugs/show_bug.cgi?id=12326
*/
public void test0314() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0314", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0314", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
assertNotNull("No result", result); //$NON-NLS-1$
@@ -7601,7 +7678,7 @@ public class ASTConverterTest extends ConverterTestSetup {
CompilationUnit compilationUnit = (CompilationUnit) result;
assertEquals("Wrong line number", 1, compilationUnit.getLineNumber(0)); //$NON-NLS-1$
// ensure that last character is on the last line
- assertEquals("Wrong line number", 3, compilationUnit.getLineNumber(source.length - 1)); //$NON-NLS-1$
+ assertEquals("Wrong line number", 1, compilationUnit.getLineNumber(source.length - 1)); //$NON-NLS-1$
// source.length is beyond the size of the compilation unit source
assertEquals("Wrong line number", -1, compilationUnit.getLineNumber(source.length)); //$NON-NLS-1$
}
@@ -7610,7 +7687,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=12326
*/
public void test0315() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0315", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0315", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -7620,47 +7697,48 @@ public class ASTConverterTest extends ConverterTestSetup {
assertTrue("Not a Return statement", node instanceof ReturnStatement); //$NON-NLS-1$
ReturnStatement returnStatement = (ReturnStatement) node;
Expression expression = returnStatement.getExpression();
- assertTrue("Not an instanceof expression", expression instanceof InstanceofExpression); //$NON-NLS-1$
- InstanceofExpression instanceOfExpression = (InstanceofExpression) expression;
- Type rightOperand = instanceOfExpression.getRightOperand();
- assertTrue("Not a simpleType", rightOperand instanceof SimpleType); //$NON-NLS-1$
- SimpleType simpleType = (SimpleType) rightOperand;
- Name n = simpleType.getName();
- assertTrue("Not a qualified name", n instanceof QualifiedName); //$NON-NLS-1$
- QualifiedName name = (QualifiedName) n;
- checkSourceRange(name, "java.io.Serializable", source); //$NON-NLS-1$
- ITypeBinding typeBinding = name.resolveTypeBinding();
+ assertTrue("Not an InfixExpression expression", expression instanceof InfixExpression); //$NON-NLS-1$
+ InfixExpression instanceOfExpression = (InfixExpression) expression;
+ Expression rightOperand = instanceOfExpression.getRightOperand();
+ assertTrue("Not a SimpleName", rightOperand instanceof SimpleName); //$NON-NLS-1$
+ SimpleName simpleType = (SimpleName) rightOperand;
+ assertTrue("wrong operator",instanceOfExpression.getOperator().equals(InfixExpression.Operator.INSTANCEOF));
+// Name n = simpleType.getName();
+// assertTrue("Not a qualified name", n instanceof QualifiedName); //$NON-NLS-1$
+// QualifiedName name = (QualifiedName) n;
+ checkSourceRange(simpleType, "String", source); //$NON-NLS-1$
+ ITypeBinding typeBinding = simpleType.resolveTypeBinding();
assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
- assertEquals("Wrong name", "Serializable", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- Name qualifier = name.getQualifier();
- assertTrue("Not a qualified name", qualifier instanceof QualifiedName); //$NON-NLS-1$
- ITypeBinding typeBinding2 = qualifier.resolveTypeBinding();
- assertNull("typebinding2 is not null", typeBinding2); //$NON-NLS-1$
- IBinding binding = qualifier.resolveBinding();
- assertNotNull("no binding", binding); //$NON-NLS-1$
- assertEquals("Wrong type", IBinding.PACKAGE, binding.getKind()); //$NON-NLS-1$
- IPackageBinding pBinding = (IPackageBinding) binding;
- assertEquals("Wrong name", "java.io", pBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("Wrong name", "String", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// Name qualifier = name.getQualifier();
+// assertTrue("Not a qualified name", qualifier instanceof QualifiedName); //$NON-NLS-1$
+// ITypeBinding typeBinding2 = qualifier.resolveTypeBinding();
+// assertNull("typebinding2 is not null", typeBinding2); //$NON-NLS-1$
+// IBinding binding = qualifier.resolveBinding();
+// assertNotNull("no binding", binding); //$NON-NLS-1$
+// assertEquals("Wrong type", IBinding.PACKAGE, binding.getKind()); //$NON-NLS-1$
+// IPackageBinding pBinding = (IPackageBinding) binding;
+// assertEquals("Wrong name", "java.io", pBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
}
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=12454
- */
- public void test0316() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "Hello.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No result", result); //$NON-NLS-1$
- assertTrue("Not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- assertEquals("Wrong size", 1, compilationUnit.getMessages().length); //$NON-NLS-1$
- assertEquals("Wrong size", 1, compilationUnit.getProblems().length); //$NON-NLS-1$
- }
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=12454
+// */
+// public void test0316() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "Hello.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No result", result); //$NON-NLS-1$
+// assertTrue("Not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// assertEquals("Wrong size", 1, compilationUnit.getMessages().length); //$NON-NLS-1$
+// assertEquals("Wrong size", 1, compilationUnit.getProblems().length); //$NON-NLS-1$
+// }
/**
* http://dev.eclipse.org/bugs/show_bug.cgi?id=12781
*/
public void test0317() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0317", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0317", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -7669,8 +7747,9 @@ public class ASTConverterTest extends ConverterTestSetup {
assertTrue("Not a return statement", node instanceof ReturnStatement); //$NON-NLS-1$
ReturnStatement returnStatement = (ReturnStatement) node;
Expression expression = returnStatement.getExpression();
- assertTrue("not an instanceof expression", expression instanceof InstanceofExpression); //$NON-NLS-1$
- InstanceofExpression instanceOfExpression = (InstanceofExpression) expression;
+ assertTrue("not an InfixExpression expression", expression instanceof InfixExpression); //$NON-NLS-1$
+ InfixExpression instanceOfExpression = (InfixExpression) expression;
+ assertTrue("wrong operator",instanceOfExpression.getOperator().equals(InfixExpression.Operator.INSTANCEOF));
Expression left = instanceOfExpression.getLeftOperand();
assertTrue("Not a Name", left instanceof Name); //$NON-NLS-1$
Name name = (Name) left;
@@ -7679,26 +7758,26 @@ public class ASTConverterTest extends ConverterTestSetup {
assertEquals("wrong name", "x", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
ITypeBinding typeBinding = name.resolveTypeBinding();
assertNotNull("No typebinding", typeBinding); //$NON-NLS-1$
- assertEquals("wrong type", "Object", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- Type right = instanceOfExpression.getRightOperand();
- assertTrue("Not a simpleType", right instanceof SimpleType); //$NON-NLS-1$
- SimpleType simpleType = (SimpleType) right;
- name = simpleType.getName();
+ assertEquals("wrong type", "any", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ Expression right = instanceOfExpression.getRightOperand();
+ assertTrue("Not a simpleName", right instanceof SimpleName); //$NON-NLS-1$
+ SimpleName simpleType = (SimpleName) right;
+ name = simpleType;//.getName();
assertTrue("Not a simpleName", name instanceof SimpleName); //$NON-NLS-1$
SimpleName simpleName = (SimpleName) name;
IBinding binding2 = simpleName.resolveBinding();
assertNotNull("No binding2", binding2); //$NON-NLS-1$
- assertEquals("Wrong name", "Vector", binding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("Wrong name", "Boolean", binding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
ITypeBinding typeBinding2 = simpleName.resolveTypeBinding();
assertNotNull("No typeBinding2", typeBinding2); //$NON-NLS-1$
- assertEquals("Wrong name", "Vector", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("Wrong name", "Boolean", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
}
/**
* http://dev.eclipse.org/bugs/show_bug.cgi?id=13233
*/
public void test0318() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0318", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0318", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -7711,7 +7790,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=13807
*/
public void test0319() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0319", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0319", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -7723,28 +7802,28 @@ public class ASTConverterTest extends ConverterTestSetup {
assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
Expression expression = variableDeclarationFragment.getInitializer();
- assertTrue("Not an array creation", expression instanceof ArrayCreation); //$NON-NLS-1$
- ArrayCreation arrayCreation = (ArrayCreation) expression;
+ assertTrue("Not an array creation", expression instanceof ArrayInitializer); //$NON-NLS-1$
+ ArrayInitializer arrayCreation = (ArrayInitializer) expression;
ITypeBinding typeBinding = arrayCreation.resolveTypeBinding();
assertNotNull("no type binding", typeBinding); //$NON-NLS-1$
- assertEquals("wrong name", "Object[]", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- ArrayType arrayType = arrayCreation.getType();
- ITypeBinding typeBinding2 = arrayType.resolveBinding();
- assertNotNull("no type binding2", typeBinding2); //$NON-NLS-1$
- assertEquals("wrong name", "Object[]", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- Type type = arrayType.getElementType();
- assertTrue("Not a simple type", type instanceof SimpleType); //$NON-NLS-1$
- SimpleType simpleType = (SimpleType) type;
- ITypeBinding typeBinding3 = simpleType.resolveBinding();
- assertNotNull("no type binding3", typeBinding3); //$NON-NLS-1$
- assertEquals("wrong name", "Object", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("wrong name", "any[]", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// ArrayType arrayType = arrayCreation.getType();
+// ITypeBinding typeBinding2 = arrayType.resolveBinding();
+// assertNotNull("no type binding2", typeBinding2); //$NON-NLS-1$
+// assertEquals("wrong name", "Object[]", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// Type type = arrayType.getElementType();
+// assertTrue("Not a simple type", type instanceof SimpleType); //$NON-NLS-1$
+// SimpleType simpleType = (SimpleType) type;
+// ITypeBinding typeBinding3 = simpleType.resolveBinding();
+// assertNotNull("no type binding3", typeBinding3); //$NON-NLS-1$
+// assertEquals("wrong name", "Object", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
}
/**
* http://dev.eclipse.org/bugs/show_bug.cgi?id=13807
*/
public void test0320() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0320", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0320", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -7753,63 +7832,74 @@ public class ASTConverterTest extends ConverterTestSetup {
ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
- Type type = variableDeclarationStatement.getType();
- checkSourceRange(type, "int[]", source); //$NON-NLS-1$
- assertTrue("Not an array type", type.isArrayType()); //$NON-NLS-1$
- ArrayType arrayType = (ArrayType) type;
- ITypeBinding typeBinding = arrayType.resolveBinding();
- assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
- Type elementType = arrayType.getElementType();
- assertTrue("Not a simple type", elementType.isPrimitiveType()); //$NON-NLS-1$
- ITypeBinding typeBinding2 = elementType.resolveBinding();
- assertNotNull("No type binding2", typeBinding2); //$NON-NLS-1$
- }
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=13807
- */
- public void test0321() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0321", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
- assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
- VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
- Type type = variableDeclarationStatement.getType();
- assertTrue("Not an array type", type.isArrayType()); //$NON-NLS-1$
- ArrayType arrayType = (ArrayType) type;
- ITypeBinding typeBinding = arrayType.resolveBinding();
- checkSourceRange(type, "java.lang.Object[][]", source); //$NON-NLS-1$
- assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
- Type elementType = arrayType.getComponentType();
- ITypeBinding typeBinding2 = elementType.resolveBinding();
- assertNotNull("No type binding2", typeBinding2); //$NON-NLS-1$
- assertEquals("wrong dimension", 1, typeBinding2.getDimensions()); //$NON-NLS-1$
- assertEquals("wrong name", "Object[]", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Not an array type", elementType.isArrayType()); //$NON-NLS-1$
- Type elementType2 = ((ArrayType) elementType).getComponentType();
- assertTrue("Not a simple type", elementType2.isSimpleType()); //$NON-NLS-1$
- ITypeBinding typeBinding3 = elementType2.resolveBinding();
- assertNotNull("No type binding3", typeBinding3); //$NON-NLS-1$
- assertEquals("wrong dimension", 0, typeBinding3.getDimensions()); //$NON-NLS-1$
- assertEquals("wrong name", "Object", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
+ List fragments = variableDeclarationStatement.fragments();
+ assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
+ VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+
+
+ IVariableBinding binding = variableDeclarationFragment.resolveBinding();
+ ITypeBinding typeBinding = binding.getType();
+ assertNotNull("no type binding", typeBinding); //$NON-NLS-1$
+ assertEquals("wrong name", "Number[]", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+
+// Type type = variableDeclarationStatement.getType();
+// checkSourceRange(type, "int[]", source); //$NON-NLS-1$
+// assertTrue("Not an array type", type.isArrayType()); //$NON-NLS-1$
+// ArrayType arrayType = (ArrayType) type;
+// ITypeBinding typeBinding = arrayType.resolveBinding();
+// assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+// Type elementType = arrayType.getElementType();
+// assertTrue("Not a simple type", elementType.isPrimitiveType()); //$NON-NLS-1$
+// ITypeBinding typeBinding2 = elementType.resolveBinding();
+// assertNotNull("No type binding2", typeBinding2); //$NON-NLS-1$
+ }
+
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=13807
+// */
+// public void test0321() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0321", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+// assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+// VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+// Type type = variableDeclarationStatement.getType();
+// assertTrue("Not an array type", type.isArrayType()); //$NON-NLS-1$
+// ArrayType arrayType = (ArrayType) type;
+// ITypeBinding typeBinding = arrayType.resolveBinding();
+// checkSourceRange(type, "java.lang.Object[][]", source); //$NON-NLS-1$
+// assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+// Type elementType = arrayType.getComponentType();
+// ITypeBinding typeBinding2 = elementType.resolveBinding();
+// assertNotNull("No type binding2", typeBinding2); //$NON-NLS-1$
+// assertEquals("wrong dimension", 1, typeBinding2.getDimensions()); //$NON-NLS-1$
+// assertEquals("wrong name", "Object[]", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// assertTrue("Not an array type", elementType.isArrayType()); //$NON-NLS-1$
+// Type elementType2 = ((ArrayType) elementType).getComponentType();
+// assertTrue("Not a simple type", elementType2.isSimpleType()); //$NON-NLS-1$
+// ITypeBinding typeBinding3 = elementType2.resolveBinding();
+// assertNotNull("No type binding3", typeBinding3); //$NON-NLS-1$
+// assertEquals("wrong dimension", 0, typeBinding3.getDimensions()); //$NON-NLS-1$
+// assertEquals("wrong name", "Object", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
/**
* http://dev.eclipse.org/bugs/show_bug.cgi?id=13231
*/
public void test0322() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0322", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0322", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 0);
- assertTrue("Not a FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
- FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+ assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+ VariableDeclarationStatement fieldDeclaration = (VariableDeclarationStatement) node;
List fragments = fieldDeclaration.fragments();
assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
@@ -7826,61 +7916,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=14198
*/
public void test0323() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0323", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- ASTNode node = getASTNode(compilationUnit, 0, 0, 1);
- assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
- ExpressionStatement expressionStatement = (ExpressionStatement) node;
- Expression expression2 = expressionStatement.getExpression();
- assertTrue("Not an Assignement", expression2 instanceof Assignment); //$NON-NLS-1$
- Assignment assignment = (Assignment) expression2;
- Expression expression = assignment.getRightHandSide();
- assertTrue("Not a CastExpression", expression instanceof CastExpression); //$NON-NLS-1$
- CastExpression castExpression = (CastExpression) expression;
- ITypeBinding typeBinding = castExpression.resolveTypeBinding();
- assertNotNull("No binding", typeBinding); //$NON-NLS-1$
- assertEquals("Wrong name", "Object", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- Type type = castExpression.getType();
- ITypeBinding typeBinding2 = type.resolveBinding();
- assertNotNull("No binding2", typeBinding2); //$NON-NLS-1$
- assertEquals("Wrong name", "Object", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=14198
- */
- public void test0324() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0324", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- ASTNode node = getASTNode(compilationUnit, 0, 0, 1);
- assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
- ExpressionStatement expressionStatement = (ExpressionStatement) node;
- Expression expression2 = expressionStatement.getExpression();
- assertTrue("Not an Assignement", expression2 instanceof Assignment); //$NON-NLS-1$
- Assignment assignment = (Assignment) expression2;
- Expression expression = assignment.getRightHandSide();
- assertTrue("Not a CastExpression", expression instanceof CastExpression); //$NON-NLS-1$
- CastExpression castExpression = (CastExpression) expression;
- ITypeBinding typeBinding = castExpression.resolveTypeBinding();
- assertNotNull("No binding", typeBinding); //$NON-NLS-1$
- assertEquals("Wrong name", "Object[]", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- Type type = castExpression.getType();
- ITypeBinding typeBinding2 = type.resolveBinding();
- assertNotNull("No binding2", typeBinding2); //$NON-NLS-1$
- assertEquals("Wrong name", "Object[]", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=14198
- */
- public void test0325() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0325", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0323", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -7892,22 +7928,76 @@ public class ASTConverterTest extends ConverterTestSetup {
assertTrue("Not an Assignement", expression2 instanceof Assignment); //$NON-NLS-1$
Assignment assignment = (Assignment) expression2;
Expression expression = assignment.getRightHandSide();
- assertTrue("Not a CastExpression", expression instanceof CastExpression); //$NON-NLS-1$
- CastExpression castExpression = (CastExpression) expression;
- ITypeBinding typeBinding = castExpression.resolveTypeBinding();
- assertNotNull("No binding", typeBinding); //$NON-NLS-1$
- assertEquals("Wrong name", "int[]", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- Type type = castExpression.getType();
- ITypeBinding typeBinding2 = type.resolveBinding();
- assertNotNull("No binding2", typeBinding2); //$NON-NLS-1$
- assertEquals("Wrong name", "int[]", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// assertTrue("Not a CastExpression", expression instanceof CastExpression); //$NON-NLS-1$
+// CastExpression castExpression = (CastExpression) expression;
+// ITypeBinding typeBinding = castExpression.resolveTypeBinding();
+// assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+// assertEquals("Wrong name", "any", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// Type type = castExpression.getType();
+// ITypeBinding typeBinding2 = type.resolveBinding();
+// assertNotNull("No binding2", typeBinding2); //$NON-NLS-1$
+// assertEquals("Wrong name", "any", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
}
+//// /**
+//// * http://dev.eclipse.org/bugs/show_bug.cgi?id=14198
+//// */
+//// public void test0324() throws JavaModelException {
+//// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0324", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+//// ASTNode result = runConversion(sourceUnit, true);
+//// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+//// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+//// CompilationUnit compilationUnit = (CompilationUnit) result;
+//// ASTNode node = getASTNode(compilationUnit, 0, 0, 1);
+//// assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
+//// ExpressionStatement expressionStatement = (ExpressionStatement) node;
+//// Expression expression2 = expressionStatement.getExpression();
+//// assertTrue("Not an Assignement", expression2 instanceof Assignment); //$NON-NLS-1$
+//// Assignment assignment = (Assignment) expression2;
+//// Expression expression = assignment.getRightHandSide();
+//// assertTrue("Not a CastExpression", expression instanceof CastExpression); //$NON-NLS-1$
+//// CastExpression castExpression = (CastExpression) expression;
+//// ITypeBinding typeBinding = castExpression.resolveTypeBinding();
+//// assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+//// assertEquals("Wrong name", "Object[]", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+//// Type type = castExpression.getType();
+//// ITypeBinding typeBinding2 = type.resolveBinding();
+//// assertNotNull("No binding2", typeBinding2); //$NON-NLS-1$
+//// assertEquals("Wrong name", "Object[]", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+//// }
+//
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=14198
+// */
+// public void test0325() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0325", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// ASTNode node = getASTNode(compilationUnit, 0, 0, 1);
+// assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
+// ExpressionStatement expressionStatement = (ExpressionStatement) node;
+// Expression expression2 = expressionStatement.getExpression();
+// assertTrue("Not an Assignement", expression2 instanceof Assignment); //$NON-NLS-1$
+// Assignment assignment = (Assignment) expression2;
+// Expression expression = assignment.getRightHandSide();
+// assertTrue("Not a CastExpression", expression instanceof CastExpression); //$NON-NLS-1$
+// CastExpression castExpression = (CastExpression) expression;
+// ITypeBinding typeBinding = castExpression.resolveTypeBinding();
+// assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+// assertEquals("Wrong name", "int[]", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// Type type = castExpression.getType();
+// ITypeBinding typeBinding2 = type.resolveBinding();
+// assertNotNull("No binding2", typeBinding2); //$NON-NLS-1$
+// assertEquals("Wrong name", "int[]", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
+//
/**
* http://dev.eclipse.org/bugs/show_bug.cgi?id=14217
*/
public void test0326() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0326", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0326", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
char[] source = sourceUnit.getSource().toCharArray();
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -7920,154 +8010,154 @@ public class ASTConverterTest extends ConverterTestSetup {
checkSourceRange(expressionStatement, "a().f= a();", source); //$NON-NLS-1$
}
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=14198
- */
- public void test0327() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0327", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- assertEquals("Wrong number of errors", 2, compilationUnit.getProblems().length); //$NON-NLS-1$<
- ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
- assertTrue("Not an VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
- VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
- List fragments = variableDeclarationStatement.fragments();
- assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
- VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
- Expression expression = variableDeclarationFragment.getInitializer();
- assertTrue("Not a CastExpression", expression instanceof CastExpression); //$NON-NLS-1$
- CastExpression castExpression = (CastExpression) expression;
- ITypeBinding typeBinding = castExpression.resolveTypeBinding();
- assertNotNull("No typebinding", typeBinding); //$NON-NLS-1$
- assertEquals("Wrong name", "String", typeBinding.getName());
- Type type = castExpression.getType();
- ITypeBinding typeBinding2 = type.resolveBinding();
- assertNotNull("No binding2", typeBinding2); //$NON-NLS-1$
- assertEquals("Wrong name", "String", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=13807
- */
- public void test0328() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0328", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
- assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
- VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
- Type type = variableDeclarationStatement.getType();
- checkSourceRange(type, "java.lang.Object[]", source); //$NON-NLS-1$
- assertTrue("Not an array type", type.isArrayType()); //$NON-NLS-1$
- ArrayType arrayType = (ArrayType) type;
- ITypeBinding typeBinding = arrayType.resolveBinding();
- assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
- assertEquals("wrong name", "Object[]", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- Type elementType = arrayType.getElementType();
- assertTrue("Not a simple type", elementType.isSimpleType()); //$NON-NLS-1$
- ITypeBinding typeBinding2 = elementType.resolveBinding();
- assertNotNull("No type binding2", typeBinding2); //$NON-NLS-1$
- assertEquals("wrong name", "Object", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- List fragments = variableDeclarationStatement.fragments();
- assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
- VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
- Expression expression = variableDeclarationFragment.getInitializer();
- assertTrue("Not a array creation", expression instanceof ArrayCreation); //$NON-NLS-1$
- ITypeBinding typeBinding3 = expression.resolveTypeBinding();
- assertNotNull("No typeBinding3", typeBinding3); //$NON-NLS-1$
- assertEquals("wrong name", "Object[]", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- ArrayCreation arrayCreation = (ArrayCreation) expression;
- ArrayInitializer arrayInitializer = arrayCreation.getInitializer();
- assertNotNull("not array initializer", arrayInitializer); //$NON-NLS-1$
- ITypeBinding typeBinding4 = arrayInitializer.resolveTypeBinding();
- assertNotNull("No typeBinding4", typeBinding3); //$NON-NLS-1$
- assertEquals("wrong name", "Object[]", typeBinding4.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=14198
+// */
+// public void test0327() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0327", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// assertEquals("Wrong number of errors", 2, compilationUnit.getProblems().length); //$NON-NLS-1$<
+// ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+// assertTrue("Not an VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+// VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+// List fragments = variableDeclarationStatement.fragments();
+// assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
+// VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+// Expression expression = variableDeclarationFragment.getInitializer();
+// assertTrue("Not a CastExpression", expression instanceof CastExpression); //$NON-NLS-1$
+// CastExpression castExpression = (CastExpression) expression;
+// ITypeBinding typeBinding = castExpression.resolveTypeBinding();
+// assertNotNull("No typebinding", typeBinding); //$NON-NLS-1$
+// assertEquals("Wrong name", "String", typeBinding.getName());
+// Type type = castExpression.getType();
+// ITypeBinding typeBinding2 = type.resolveBinding();
+// assertNotNull("No binding2", typeBinding2); //$NON-NLS-1$
+// assertEquals("Wrong name", "String", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
+//
/**
* http://dev.eclipse.org/bugs/show_bug.cgi?id=13807
*/
- public void test0329() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0329", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
- assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
- VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
- Type type = variableDeclarationStatement.getType();
- checkSourceRange(type, "java.lang.Object[]", source); //$NON-NLS-1$
- assertTrue("Not an array type", type.isArrayType()); //$NON-NLS-1$
- ArrayType arrayType = (ArrayType) type;
- ITypeBinding typeBinding = arrayType.resolveBinding();
- assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
- assertEquals("wrong name", "Object[]", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- Type elementType = arrayType.getElementType();
- assertTrue("Not a simple type", elementType.isSimpleType()); //$NON-NLS-1$
- ITypeBinding typeBinding2 = elementType.resolveBinding();
- assertNotNull("No type binding2", typeBinding2); //$NON-NLS-1$
- assertEquals("wrong name", "Object", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- List fragments = variableDeclarationStatement.fragments();
- assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
- VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
- Expression expression = variableDeclarationFragment.getInitializer();
- assertTrue("Not a array creation", expression instanceof ArrayCreation); //$NON-NLS-1$
- ITypeBinding typeBinding3 = expression.resolveTypeBinding();
- assertNotNull("No typeBinding3", typeBinding3); //$NON-NLS-1$
- assertEquals("wrong name", "Object[]", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- ArrayCreation arrayCreation = (ArrayCreation) expression;
- ArrayInitializer arrayInitializer = arrayCreation.getInitializer();
- assertNotNull("not array initializer", arrayInitializer); //$NON-NLS-1$
- ITypeBinding typeBinding4 = arrayInitializer.resolveTypeBinding();
- assertNotNull("No typeBinding4", typeBinding3); //$NON-NLS-1$
- assertEquals("wrong name", "Object[]", typeBinding4.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=14313
- */
- public void test0330() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0330", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- assertEquals("wrong size", 2, compilationUnit.getMessages().length); //$NON-NLS-1$
- assertEquals("wrong size", 2, compilationUnit.getProblems().length); //$NON-NLS-1$
- ASTNode node = getASTNode(compilationUnit, 0);
- assertTrue("Not a type declaration", node.getNodeType() == ASTNode.TYPE_DECLARATION); //$NON-NLS-1$
- TypeDeclaration typeDeclaration = (TypeDeclaration) node;
- ITypeBinding typeBinding = typeDeclaration.resolveBinding();
- assertNotNull("no type binding", typeBinding); //$NON-NLS-1$
- IMethodBinding[] methods = typeBinding.getDeclaredMethods();
- assertEquals("wrong size", 1, methods.length); //$NON-NLS-1$
- assertTrue("not a constructor", methods[0].isConstructor()); //$NON-NLS-1$
- assertTrue("wrong name", !methods[0].getName().equals("foo")); //$NON-NLS-1$ //$NON-NLS-2$
- node = getASTNode(compilationUnit, 0, 0);
- assertTrue("Not a methodDeclaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
- MethodDeclaration methodDeclaration = (MethodDeclaration) node;
- IMethodBinding methodBinding = methodDeclaration.resolveBinding();
- assertNull("method binding not null", methodBinding); //$NON-NLS-1$
- node = getASTNode(compilationUnit, 0, 0, 0);
- assertTrue("Not a return statement", node.getNodeType() == ASTNode.RETURN_STATEMENT); //$NON-NLS-1$
- ReturnStatement returnStatement = (ReturnStatement) node;
- Expression expression = returnStatement.getExpression();
- ITypeBinding typeBinding2 = expression.resolveTypeBinding();
- assertNotNull("no type binding2", typeBinding2); //$NON-NLS-1$
- }
+// public void test0328() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0328", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+// assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+// VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+// Type type = variableDeclarationStatement.getType();
+// checkSourceRange(type, "java.lang.Object[]", source); //$NON-NLS-1$
+// assertTrue("Not an array type", type.isArrayType()); //$NON-NLS-1$
+// ArrayType arrayType = (ArrayType) type;
+// ITypeBinding typeBinding = arrayType.resolveBinding();
+// assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+// assertEquals("wrong name", "Object[]", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// Type elementType = arrayType.getElementType();
+// assertTrue("Not a simple type", elementType.isSimpleType()); //$NON-NLS-1$
+// ITypeBinding typeBinding2 = elementType.resolveBinding();
+// assertNotNull("No type binding2", typeBinding2); //$NON-NLS-1$
+// assertEquals("wrong name", "Object", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// List fragments = variableDeclarationStatement.fragments();
+// assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
+// VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+// Expression expression = variableDeclarationFragment.getInitializer();
+// assertTrue("Not a array creation", expression instanceof ArrayCreation); //$NON-NLS-1$
+// ITypeBinding typeBinding3 = expression.resolveTypeBinding();
+// assertNotNull("No typeBinding3", typeBinding3); //$NON-NLS-1$
+// assertEquals("wrong name", "Object[]", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// ArrayCreation arrayCreation = (ArrayCreation) expression;
+// ArrayInitializer arrayInitializer = arrayCreation.getInitializer();
+// assertNotNull("not array initializer", arrayInitializer); //$NON-NLS-1$
+// ITypeBinding typeBinding4 = arrayInitializer.resolveTypeBinding();
+// assertNotNull("No typeBinding4", typeBinding3); //$NON-NLS-1$
+// assertEquals("wrong name", "Object[]", typeBinding4.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
+
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=13807
+// */
+// public void test0329() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0329", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+// assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+// VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+// Type type = variableDeclarationStatement.getType();
+// checkSourceRange(type, "java.lang.Object[]", source); //$NON-NLS-1$
+// assertTrue("Not an array type", type.isArrayType()); //$NON-NLS-1$
+// ArrayType arrayType = (ArrayType) type;
+// ITypeBinding typeBinding = arrayType.resolveBinding();
+// assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+// assertEquals("wrong name", "Object[]", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// Type elementType = arrayType.getElementType();
+// assertTrue("Not a simple type", elementType.isSimpleType()); //$NON-NLS-1$
+// ITypeBinding typeBinding2 = elementType.resolveBinding();
+// assertNotNull("No type binding2", typeBinding2); //$NON-NLS-1$
+// assertEquals("wrong name", "Object", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// List fragments = variableDeclarationStatement.fragments();
+// assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
+// VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+// Expression expression = variableDeclarationFragment.getInitializer();
+// assertTrue("Not a array creation", expression instanceof ArrayCreation); //$NON-NLS-1$
+// ITypeBinding typeBinding3 = expression.resolveTypeBinding();
+// assertNotNull("No typeBinding3", typeBinding3); //$NON-NLS-1$
+// assertEquals("wrong name", "Object[]", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// ArrayCreation arrayCreation = (ArrayCreation) expression;
+// ArrayInitializer arrayInitializer = arrayCreation.getInitializer();
+// assertNotNull("not array initializer", arrayInitializer); //$NON-NLS-1$
+// ITypeBinding typeBinding4 = arrayInitializer.resolveTypeBinding();
+// assertNotNull("No typeBinding4", typeBinding3); //$NON-NLS-1$
+// assertEquals("wrong name", "Object[]", typeBinding4.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
+
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=14313
+// */
+// public void test0330() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0330", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// assertEquals("wrong size", 2, compilationUnit.getMessages().length); //$NON-NLS-1$
+// assertEquals("wrong size", 2, compilationUnit.getProblems().length); //$NON-NLS-1$
+// ASTNode node = getASTNode(compilationUnit, 0);
+// assertTrue("Not a type declaration", node.getNodeType() == ASTNode.TYPE_DECLARATION); //$NON-NLS-1$
+// TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+// ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+// assertNotNull("no type binding", typeBinding); //$NON-NLS-1$
+// IMethodBinding[] methods = typeBinding.getDeclaredMethods();
+// assertEquals("wrong size", 1, methods.length); //$NON-NLS-1$
+// assertTrue("not a constructor", methods[0].isConstructor()); //$NON-NLS-1$
+// assertTrue("wrong name", !methods[0].getName().equals("foo")); //$NON-NLS-1$ //$NON-NLS-2$
+// node = getASTNode(compilationUnit, 0, 0);
+// assertTrue("Not a methodDeclaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+// MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+// IMethodBinding methodBinding = methodDeclaration.resolveBinding();
+// assertNull("method binding not null", methodBinding); //$NON-NLS-1$
+// node = getASTNode(compilationUnit, 0, 0, 0);
+// assertTrue("Not a return statement", node.getNodeType() == ASTNode.RETURN_STATEMENT); //$NON-NLS-1$
+// ReturnStatement returnStatement = (ReturnStatement) node;
+// Expression expression = returnStatement.getExpression();
+// ITypeBinding typeBinding2 = expression.resolveTypeBinding();
+// assertNotNull("no type binding2", typeBinding2); //$NON-NLS-1$
+// }
/**
* http://dev.eclipse.org/bugs/show_bug.cgi?id=14322
*/
public void test0331() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0331", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0331", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -8090,217 +8180,217 @@ public class ASTConverterTest extends ConverterTestSetup {
assertEquals("wrong name", "length", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
}
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=14403
- */
- public void test0332() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0332", "LocalSelectionTransfer.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- }
-
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=13807
- */
- public void test0333() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0333", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
- assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
- VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
- List fragments = variableDeclarationStatement.fragments();
- assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
- VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
- Expression expression = variableDeclarationFragment.getInitializer();
- assertTrue("Not an array creation", expression instanceof ArrayCreation); //$NON-NLS-1$
- ArrayCreation arrayCreation = (ArrayCreation) expression;
- ITypeBinding typeBinding = arrayCreation.resolveTypeBinding();
- assertNotNull("no type binding", typeBinding); //$NON-NLS-1$
- assertEquals("wrong name", "Object[][]", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- ArrayType arrayType = arrayCreation.getType();
- ITypeBinding typeBinding2 = arrayType.resolveBinding();
- assertNotNull("no type binding2", typeBinding2); //$NON-NLS-1$
- assertEquals("wrong name", "Object[][]", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- Type type = arrayType.getElementType();
- assertTrue("Not a simple type", type instanceof SimpleType); //$NON-NLS-1$
- SimpleType simpleType = (SimpleType) type;
- ITypeBinding typeBinding3 = simpleType.resolveBinding();
- assertNotNull("no type binding3", typeBinding3); //$NON-NLS-1$
- assertEquals("wrong name", "Object", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- type = arrayType.getComponentType();
- assertTrue("Not an array type", type instanceof ArrayType); //$NON-NLS-1$
- ArrayType arrayType2 = (ArrayType) type;
- ITypeBinding typeBinding4 = arrayType2.resolveBinding();
- assertNotNull("no type binding4", typeBinding4); //$NON-NLS-1$
- assertEquals("wrong name", "Object[]", typeBinding4.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=13807
- */
- public void test0334() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0334", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
- assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
- VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
- List fragments = variableDeclarationStatement.fragments();
- assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
- VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
- Expression expression = variableDeclarationFragment.getInitializer();
- assertTrue("Not an array creation", expression instanceof ArrayCreation); //$NON-NLS-1$
- ArrayCreation arrayCreation = (ArrayCreation) expression;
- ITypeBinding typeBinding = arrayCreation.resolveTypeBinding();
- assertNotNull("no type binding", typeBinding); //$NON-NLS-1$
- assertEquals("wrong name", "Object[][][]", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- ArrayType arrayType = arrayCreation.getType();
- checkSourceRange(arrayType, "Object[10][][]", source); //$NON-NLS-1$
- ITypeBinding typeBinding2 = arrayType.resolveBinding();
- assertNotNull("no type binding2", typeBinding2); //$NON-NLS-1$
- assertEquals("wrong name", "Object[][][]", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- Type type = arrayType.getElementType();
- assertTrue("Not a simple type", type instanceof SimpleType); //$NON-NLS-1$
- SimpleType simpleType = (SimpleType) type;
- checkSourceRange(simpleType, "Object", source); //$NON-NLS-1$
- ITypeBinding typeBinding3 = simpleType.resolveBinding();
- assertNotNull("no type binding3", typeBinding3); //$NON-NLS-1$
- assertEquals("wrong name", "Object", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- type = arrayType.getComponentType();
- assertTrue("Not an array type", type instanceof ArrayType); //$NON-NLS-1$
- ArrayType arrayType2 = (ArrayType) type;
- checkSourceRange(arrayType2, "Object[10][]", source); //$NON-NLS-1$
- ITypeBinding typeBinding4 = arrayType2.resolveBinding();
- assertNotNull("no type binding4", typeBinding4); //$NON-NLS-1$
- assertEquals("wrong name", "Object[][]", typeBinding4.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- type = arrayType2.getComponentType();
- assertTrue("Not an array type", type instanceof ArrayType); //$NON-NLS-1$
- ArrayType arrayType3 = (ArrayType) type;
- ITypeBinding typeBinding5 = arrayType3.resolveBinding();
- assertNotNull("no type binding5", typeBinding5); //$NON-NLS-1$
- assertEquals("wrong name", "Object[]", typeBinding5.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- checkSourceRange(arrayType3, "Object[10]", source); //$NON-NLS-1$
- }
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=14403
+// */
+// public void test0332() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0332", "LocalSelectionTransfer.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// }
+//
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=13807
+// */
+// public void test0333() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0333", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+// assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+// VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+// List fragments = variableDeclarationStatement.fragments();
+// assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
+// VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+// Expression expression = variableDeclarationFragment.getInitializer();
+// assertTrue("Not an array creation", expression instanceof ArrayCreation); //$NON-NLS-1$
+// ArrayCreation arrayCreation = (ArrayCreation) expression;
+// ITypeBinding typeBinding = arrayCreation.resolveTypeBinding();
+// assertNotNull("no type binding", typeBinding); //$NON-NLS-1$
+// assertEquals("wrong name", "Object[][]", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// ArrayType arrayType = arrayCreation.getType();
+// ITypeBinding typeBinding2 = arrayType.resolveBinding();
+// assertNotNull("no type binding2", typeBinding2); //$NON-NLS-1$
+// assertEquals("wrong name", "Object[][]", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// Type type = arrayType.getElementType();
+// assertTrue("Not a simple type", type instanceof SimpleType); //$NON-NLS-1$
+// SimpleType simpleType = (SimpleType) type;
+// ITypeBinding typeBinding3 = simpleType.resolveBinding();
+// assertNotNull("no type binding3", typeBinding3); //$NON-NLS-1$
+// assertEquals("wrong name", "Object", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// type = arrayType.getComponentType();
+// assertTrue("Not an array type", type instanceof ArrayType); //$NON-NLS-1$
+// ArrayType arrayType2 = (ArrayType) type;
+// ITypeBinding typeBinding4 = arrayType2.resolveBinding();
+// assertNotNull("no type binding4", typeBinding4); //$NON-NLS-1$
+// assertEquals("wrong name", "Object[]", typeBinding4.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
+
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=13807
+// */
+// public void test0334() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0334", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+// assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+// VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+// List fragments = variableDeclarationStatement.fragments();
+// assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
+// VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+// Expression expression = variableDeclarationFragment.getInitializer();
+// assertTrue("Not an array creation", expression instanceof ArrayCreation); //$NON-NLS-1$
+// ArrayCreation arrayCreation = (ArrayCreation) expression;
+// ITypeBinding typeBinding = arrayCreation.resolveTypeBinding();
+// assertNotNull("no type binding", typeBinding); //$NON-NLS-1$
+// assertEquals("wrong name", "Object[][][]", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// ArrayType arrayType = arrayCreation.getType();
+// checkSourceRange(arrayType, "Object[10][][]", source); //$NON-NLS-1$
+// ITypeBinding typeBinding2 = arrayType.resolveBinding();
+// assertNotNull("no type binding2", typeBinding2); //$NON-NLS-1$
+// assertEquals("wrong name", "Object[][][]", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// Type type = arrayType.getElementType();
+// assertTrue("Not a simple type", type instanceof SimpleType); //$NON-NLS-1$
+// SimpleType simpleType = (SimpleType) type;
+// checkSourceRange(simpleType, "Object", source); //$NON-NLS-1$
+// ITypeBinding typeBinding3 = simpleType.resolveBinding();
+// assertNotNull("no type binding3", typeBinding3); //$NON-NLS-1$
+// assertEquals("wrong name", "Object", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// type = arrayType.getComponentType();
+// assertTrue("Not an array type", type instanceof ArrayType); //$NON-NLS-1$
+// ArrayType arrayType2 = (ArrayType) type;
+// checkSourceRange(arrayType2, "Object[10][]", source); //$NON-NLS-1$
+// ITypeBinding typeBinding4 = arrayType2.resolveBinding();
+// assertNotNull("no type binding4", typeBinding4); //$NON-NLS-1$
+// assertEquals("wrong name", "Object[][]", typeBinding4.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// type = arrayType2.getComponentType();
+// assertTrue("Not an array type", type instanceof ArrayType); //$NON-NLS-1$
+// ArrayType arrayType3 = (ArrayType) type;
+// ITypeBinding typeBinding5 = arrayType3.resolveBinding();
+// assertNotNull("no type binding5", typeBinding5); //$NON-NLS-1$
+// assertEquals("wrong name", "Object[]", typeBinding5.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// checkSourceRange(arrayType3, "Object[10]", source); //$NON-NLS-1$
+// }
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=14526
- * @deprecated using deprecated code
- */
- public void test0335() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0335", "ExceptionTestCaseTest.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- ASTNode node = getASTNode(compilationUnit, 0);
- assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
- assertEquals("errors found", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
- assertNotNull("not null", node); //$NON-NLS-1$
- assertTrue("not a type declaration", node instanceof TypeDeclaration); //$NON-NLS-1$
- TypeDeclaration typeDeclaration = (TypeDeclaration) node;
- Name name = typeDeclaration.getSuperclass();
- assertNotNull("no super class", name); //$NON-NLS-1$
- assertTrue("not a qualified name", name.isQualifiedName()); //$NON-NLS-1$
- QualifiedName qualifiedName = (QualifiedName) name;
- name = qualifiedName.getQualifier();
- assertTrue("not a qualified name", name.isQualifiedName()); //$NON-NLS-1$
- qualifiedName = (QualifiedName) name;
- name = qualifiedName.getQualifier();
- assertTrue("not a simple name", name.isSimpleName()); //$NON-NLS-1$
- SimpleName simpleName = (SimpleName) name;
- IBinding binding = simpleName.resolveBinding();
- assertNotNull("no binding", binding); //$NON-NLS-1$
- assertEquals("wrong type", IBinding.PACKAGE, binding.getKind()); //$NON-NLS-1$
- assertEquals("wrong name", "junit", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=14526
- * @deprecated using deprecated code
- */
- public void test0336() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0336", "SorterTest.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- ASTNode node = getASTNode(compilationUnit, 0, 0);
- assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
- assertEquals("errors found", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
- assertNotNull("not null", node); //$NON-NLS-1$
- assertTrue("not a type declaration", node instanceof TypeDeclaration); //$NON-NLS-1$
- TypeDeclaration typeDeclaration = (TypeDeclaration) node;
- List superInterfaces = typeDeclaration.superInterfaces();
- assertEquals("wrong size", 1, superInterfaces.size()); //$NON-NLS-1$
- Name name = (Name) superInterfaces.get(0);
- assertTrue("not a qualified name", name.isQualifiedName()); //$NON-NLS-1$
- QualifiedName qualifiedName = (QualifiedName) name;
- name = qualifiedName.getQualifier();
- assertTrue("not a simple name", name.isSimpleName()); //$NON-NLS-1$
- SimpleName simpleName = (SimpleName) name;
- IBinding binding = simpleName.resolveBinding();
- assertNotNull("no binding", binding); //$NON-NLS-1$
- assertEquals("wrong type", IBinding.TYPE, binding.getKind()); //$NON-NLS-1$
- assertEquals("wrong name", "Sorter", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=14526
+// * @deprecated using deprecated code
+// */
+// public void test0335() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0335", "ExceptionTestCaseTest.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// ASTNode node = getASTNode(compilationUnit, 0);
+// assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+// assertEquals("errors found", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
+// assertNotNull("not null", node); //$NON-NLS-1$
+// assertTrue("not a type declaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+// TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+// Name name = typeDeclaration.getSuperclass();
+// assertNotNull("no super class", name); //$NON-NLS-1$
+// assertTrue("not a qualified name", name.isQualifiedName()); //$NON-NLS-1$
+// QualifiedName qualifiedName = (QualifiedName) name;
+// name = qualifiedName.getQualifier();
+// assertTrue("not a qualified name", name.isQualifiedName()); //$NON-NLS-1$
+// qualifiedName = (QualifiedName) name;
+// name = qualifiedName.getQualifier();
+// assertTrue("not a simple name", name.isSimpleName()); //$NON-NLS-1$
+// SimpleName simpleName = (SimpleName) name;
+// IBinding binding = simpleName.resolveBinding();
+// assertNotNull("no binding", binding); //$NON-NLS-1$
+// assertEquals("wrong type", IBinding.PACKAGE, binding.getKind()); //$NON-NLS-1$
+// assertEquals("wrong name", "junit", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
+
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=14526
+// * @deprecated using deprecated code
+// */
+// public void test0336() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0336", "SorterTest.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// ASTNode node = getASTNode(compilationUnit, 0, 0);
+// assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+// assertEquals("errors found", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
+// assertNotNull("not null", node); //$NON-NLS-1$
+// assertTrue("not a type declaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+// TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+// List superInterfaces = typeDeclaration.superInterfaces();
+// assertEquals("wrong size", 1, superInterfaces.size()); //$NON-NLS-1$
+// Name name = (Name) superInterfaces.get(0);
+// assertTrue("not a qualified name", name.isQualifiedName()); //$NON-NLS-1$
+// QualifiedName qualifiedName = (QualifiedName) name;
+// name = qualifiedName.getQualifier();
+// assertTrue("not a simple name", name.isSimpleName()); //$NON-NLS-1$
+// SimpleName simpleName = (SimpleName) name;
+// IBinding binding = simpleName.resolveBinding();
+// assertNotNull("no binding", binding); //$NON-NLS-1$
+// assertEquals("wrong type", IBinding.TYPE, binding.getKind()); //$NON-NLS-1$
+// assertEquals("wrong name", "Sorter", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=14602
- */
- public void test0337() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0337", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- ASTNode node = getASTNode(compilationUnit, 0, 0);
- assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
- assertNotNull("not null", node); //$NON-NLS-1$
- assertTrue("not a field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
- FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
- List fragments = fieldDeclaration.fragments();
- assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
- VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
- checkSourceRange(variableDeclarationFragment, "message= Test.m(\"s\", new String[]{\"g\"})", source); //$NON-NLS-1$
- checkSourceRange(fieldDeclaration, "String message= Test.m(\"s\", new String[]{\"g\"});", source); //$NON-NLS-1$
- }
-
- /**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=14852
- */
- public void test0338() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0338", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(sourceUnit, true);
- assertNotNull("No compilation unit", result); //$NON-NLS-1$
- assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
- CompilationUnit compilationUnit = (CompilationUnit) result;
- ASTNode node = getASTNode(compilationUnit, 0, 0);
- assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
- assertNotNull("not null", node); //$NON-NLS-1$
- assertTrue("not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
- MethodDeclaration methodDeclaration = (MethodDeclaration) node;
- List thrownExceptions = methodDeclaration.thrownExceptions();
- assertEquals("Wrong size", 1, thrownExceptions.size()); //$NON-NLS-1$
- Name name = (Name) thrownExceptions.get(0);
- IBinding binding = name.resolveBinding();
- assertEquals("wrong type", IBinding.TYPE, binding.getKind()); //$NON-NLS-1$
- assertEquals("wrong name", "IOException", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=14602
+// */
+// public void test0337() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0337", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// char[] source = sourceUnit.getSource().toCharArray();
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// ASTNode node = getASTNode(compilationUnit, 0, 0);
+// assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+// assertNotNull("not null", node); //$NON-NLS-1$
+// assertTrue("not a field declaration", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+// VariableDeclarationStatement fieldDeclaration = (VariableDeclarationStatement) node;
+// List fragments = fieldDeclaration.fragments();
+// assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
+// VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+// checkSourceRange(variableDeclarationFragment, "message= Test.m(\"s\", new String[]{\"g\"})", source); //$NON-NLS-1$
+// checkSourceRange(fieldDeclaration, "String message= Test.m(\"s\", new String[]{\"g\"});", source); //$NON-NLS-1$
+// }
+
+// /**
+// * http://dev.eclipse.org/bugs/show_bug.cgi?id=14852
+// */
+// public void test0338() throws JavaModelException {
+// ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0338", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+// ASTNode result = runConversion(sourceUnit, true);
+// assertNotNull("No compilation unit", result); //$NON-NLS-1$
+// assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+// CompilationUnit compilationUnit = (CompilationUnit) result;
+// ASTNode node = getASTNode(compilationUnit, 0, 0);
+// assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+// assertNotNull("not null", node); //$NON-NLS-1$
+// assertTrue("not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
+// MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+// List thrownExceptions = methodDeclaration.thrownExceptions();
+// assertEquals("Wrong size", 1, thrownExceptions.size()); //$NON-NLS-1$
+// Name name = (Name) thrownExceptions.get(0);
+// IBinding binding = name.resolveBinding();
+// assertEquals("wrong type", IBinding.TYPE, binding.getKind()); //$NON-NLS-1$
+// assertEquals("wrong name", "IOException", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+// }
/**
* http://dev.eclipse.org/bugs/show_bug.cgi?id=15061
*/
public void test0339() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0339", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0339", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8314,12 +8404,12 @@ public class ASTConverterTest extends ConverterTestSetup {
List bodyDeclarations = typeDeclaration.bodyDeclarations();
assertEquals("wrong size", 1, bodyDeclarations.size()); //$NON-NLS-1$
MethodDeclaration methodDeclaration = (MethodDeclaration) bodyDeclarations.get(0);
- checkSourceRange(methodDeclaration, "int doQuery(boolean x);", source); //$NON-NLS-1$
+ checkSourceRange(methodDeclaration, "function doQuery(boolean x);", source); //$NON-NLS-1$
node = getASTNode(compilationUnit, 0, 1);
assertNotNull("not null", node); //$NON-NLS-1$
assertTrue("not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
String expectedSource =
- "public void setX(boolean x) {\n" + //$NON-NLS-1$
+ "function setX( x) {\n" + //$NON-NLS-1$
" {\n" + //$NON-NLS-1$
" z\n" + //$NON-NLS-1$
" }\n" + //$NON-NLS-1$
@@ -8337,7 +8427,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=14852
*/
public void test0340() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "p3", "B.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "p3", "B.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -8391,7 +8481,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=15804
*/
public void test0341() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0341", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0341", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8466,7 +8556,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated marked deprecated to suppress JDOM-related deprecation warnings
*/
public void test0342() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0342", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0342", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IDOMCompilationUnit dcompUnit = new DOMFactory().createCompilationUnit(sourceUnit.getSource(), sourceUnit.getElementName());
assertNotNull("dcompUnit is null", dcompUnit); //$NON-NLS-1$
@@ -8509,7 +8599,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=16051
*/
public void test0343() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0343", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0343", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8534,7 +8624,7 @@ public class ASTConverterTest extends ConverterTestSetup {
String compiler_source = null;
String compiler_compliance = null;
try {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0344", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0344", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
preferences = JavaCore.getPlugin().getPluginPreferences();
pb_assert = preferences.getString(JavaCore.COMPILER_PB_ASSERT_IDENTIFIER);
compiler_source = preferences.getString(JavaCore.COMPILER_SOURCE);
@@ -8562,7 +8652,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=17922
*/
public void test0345() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0345", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0345", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -8571,7 +8661,7 @@ public class ASTConverterTest extends ConverterTestSetup {
ASTNode node = getASTNode(compilationUnit, 0, 0);
assertNotNull("not null", node); //$NON-NLS-1$
assertTrue("Not an field declaration", node.getNodeType() == ASTNode.FIELD_DECLARATION); //$NON-NLS-1$
- FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+ VariableDeclarationStatement fieldDeclaration = (VariableDeclarationStatement) node;
List fragments = fieldDeclaration.fragments();
assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
@@ -8615,7 +8705,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=18138
*/
public void test0346() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0346", "Test2.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0346", "Test2.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8651,7 +8741,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=18138
*/
public void test0347() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0347", "Test2.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0347", "Test2.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8677,7 +8767,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=18138
*/
public void test0348() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0348", "Test2.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0348", "Test2.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8703,7 +8793,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=18138
*/
public void test0349() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0349", "Test2.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0349", "Test2.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8713,7 +8803,7 @@ public class ASTConverterTest extends ConverterTestSetup {
ASTNode node = getASTNode(compilationUnit, 0, 0);
assertNotNull("not null", node); //$NON-NLS-1$
assertTrue("Not an field declaration", node.getNodeType() == ASTNode.FIELD_DECLARATION); //$NON-NLS-1$
- FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+ VariableDeclarationStatement fieldDeclaration = (VariableDeclarationStatement) node;
Type type = fieldDeclaration.getType();
checkSourceRange(type, "Vector[][]", source); //$NON-NLS-1$
assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$
@@ -8729,7 +8819,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=18138
*/
public void test0350() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0350", "Test2.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0350", "Test2.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8739,7 +8829,7 @@ public class ASTConverterTest extends ConverterTestSetup {
ASTNode node = getASTNode(compilationUnit, 0, 0);
assertNotNull("not null", node); //$NON-NLS-1$
assertTrue("Not an field declaration", node.getNodeType() == ASTNode.FIELD_DECLARATION); //$NON-NLS-1$
- FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+ VariableDeclarationStatement fieldDeclaration = (VariableDeclarationStatement) node;
Type type = fieldDeclaration.getType();
checkSourceRange(type, "Vector", source); //$NON-NLS-1$
assertTrue("not a simple type", type.isSimpleType()); //$NON-NLS-1$
@@ -8755,7 +8845,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=18169
*/
public void test0351() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0351", "Test2.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0351", "Test2.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8769,9 +8859,9 @@ public class ASTConverterTest extends ConverterTestSetup {
List parameters = methodDeclaration.parameters();
assertEquals("wrong size", 2, parameters.size()); //$NON-NLS-1$
SingleVariableDeclaration singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(0);
- checkSourceRange(singleVariableDeclaration, "int a", source); //$NON-NLS-1$
+ checkSourceRange(singleVariableDeclaration, "var a", source); //$NON-NLS-1$
singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(1);
- checkSourceRange(singleVariableDeclaration, "int[] b", source); //$NON-NLS-1$
+ checkSourceRange(singleVariableDeclaration, "var b", source); //$NON-NLS-1$
node = getASTNode(compilationUnit, 0, 1);
assertNotNull("not null", node); //$NON-NLS-1$
assertTrue("Not an method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
@@ -8779,16 +8869,16 @@ public class ASTConverterTest extends ConverterTestSetup {
parameters = methodDeclaration.parameters();
assertEquals("wrong size", 2, parameters.size()); //$NON-NLS-1$
singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(0);
- checkSourceRange(singleVariableDeclaration, "int a", source); //$NON-NLS-1$
+ checkSourceRange(singleVariableDeclaration, "var a", source); //$NON-NLS-1$
singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(1);
- checkSourceRange(singleVariableDeclaration, "int b[]", source); //$NON-NLS-1$
+ checkSourceRange(singleVariableDeclaration, "var b", source); //$NON-NLS-1$
}
/**
* http://dev.eclipse.org/bugs/show_bug.cgi?id=18169
*/
public void test0352() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0352", "Test2.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0352", "Test2.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8802,9 +8892,9 @@ public class ASTConverterTest extends ConverterTestSetup {
List parameters = methodDeclaration.parameters();
assertEquals("wrong size", 2, parameters.size()); //$NON-NLS-1$
SingleVariableDeclaration singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(0);
- checkSourceRange(singleVariableDeclaration, "final int a", source); //$NON-NLS-1$
+ checkSourceRange(singleVariableDeclaration, "var a", source); //$NON-NLS-1$
singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(1);
- checkSourceRange(singleVariableDeclaration, "final int[] b", source); //$NON-NLS-1$
+ checkSourceRange(singleVariableDeclaration, "var b", source); //$NON-NLS-1$
node = getASTNode(compilationUnit, 0, 1);
assertNotNull("not null", node); //$NON-NLS-1$
assertTrue("Not an method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
@@ -8812,16 +8902,16 @@ public class ASTConverterTest extends ConverterTestSetup {
parameters = methodDeclaration.parameters();
assertEquals("wrong size", 2, parameters.size()); //$NON-NLS-1$
singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(0);
- checkSourceRange(singleVariableDeclaration, "final int a", source); //$NON-NLS-1$
+ checkSourceRange(singleVariableDeclaration, "vara", source); //$NON-NLS-1$
singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(1);
- checkSourceRange(singleVariableDeclaration, "final int b[]", source); //$NON-NLS-1$
+ checkSourceRange(singleVariableDeclaration, "var b", source); //$NON-NLS-1$
}
/**
* http://dev.eclipse.org/bugs/show_bug.cgi?id=18042
*/
public void test0353() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0353", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0353", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8856,7 +8946,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=19851
*/
public void test0354() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0354", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0354", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -8868,7 +8958,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=20520
*/
public void test0355() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0355", "Foo.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0355", "Foo.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -8892,7 +8982,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=20865
*/
public void test0356() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0356", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0356", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -8911,7 +9001,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=21757
*/
public void test0357() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0357", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0357", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8930,7 +9020,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=21768
*/
public void test0358() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0358", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0358", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8949,7 +9039,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=21768
*/
public void test0359() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0359", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0359", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -8968,7 +9058,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=21916
*/
public void test0360() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0360", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0360", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -8986,7 +9076,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=21916
*/
public void test0361() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0361", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0361", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -9004,7 +9094,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0362() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0362", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0362", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -9023,7 +9113,7 @@ public class ASTConverterTest extends ConverterTestSetup {
VariableDeclarationExpression variableDeclarationExpression = this.ast.newVariableDeclarationExpression(iFragment);
variableDeclarationExpression.setModifiers(Modifier.NONE);
- variableDeclarationExpression.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+// variableDeclarationExpression.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
variableDeclarationExpression.fragments().add(jFragment);
variableDeclarationExpression.fragments().add(kFragment);
forStatement.initializers().add(variableDeclarationExpression);
@@ -9052,14 +9142,14 @@ public class ASTConverterTest extends ConverterTestSetup {
forStatement.setExpression(infixExpression);
assertTrue("Both AST trees should be identical", forStatement.subtreeMatch(new ASTMatcher(), node)); //$NON-NLS-1$
- checkSourceRange(node, "for (int i=0, j=0, k=0; i<10 ; i++, j++, k++) {}", source); //$NON-NLS-1$
+ checkSourceRange(node, "for (var i=0, j=0, k=0; i<10 ; i++, j++, k++) {}", source); //$NON-NLS-1$
}
/**
* http://dev.eclipse.org/bugs/show_bug.cgi?id=22939
*/
public void test0363() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0363", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0363", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -9083,7 +9173,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=11529
*/
public void test0364() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0364", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0364", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -9097,7 +9187,7 @@ public class ASTConverterTest extends ConverterTestSetup {
List fragments = variableDeclarationStatement.fragments();
assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
- checkSourceRange(variableDeclarationStatement, "int local;", source); //$NON-NLS-1$
+ checkSourceRange(variableDeclarationStatement, "var local;", source); //$NON-NLS-1$
SimpleName simpleName = variableDeclarationFragment.getName();
IBinding binding = simpleName.resolveBinding();
assertNotNull("No binding", binding); //$NON-NLS-1$
@@ -9107,7 +9197,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=11529
*/
public void test0365() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0365", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0365", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -9132,7 +9222,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23048
*/
public void test0366() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0366", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0366", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -9143,7 +9233,7 @@ public class ASTConverterTest extends ConverterTestSetup {
assertNotNull(node);
assertTrue("Not a for statement", node.getNodeType() == ASTNode.FOR_STATEMENT); //$NON-NLS-1$
ForStatement forStatement = (ForStatement) node;
- checkSourceRange(forStatement, "for (int i = 0; i < 5; ++i);", source); //$NON-NLS-1$
+ checkSourceRange(forStatement, "for (var i = 0; i < 5; ++i);", source); //$NON-NLS-1$
Statement statement = forStatement.getBody();
assertTrue("Not an empty statement", statement.getNodeType() == ASTNode.EMPTY_STATEMENT); //$NON-NLS-1$
checkSourceRange(statement, ";", source); //$NON-NLS-1$
@@ -9153,7 +9243,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23048
*/
public void test0367() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0367", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0367", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -9174,7 +9264,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23048
*/
public void test0368() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0368", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0368", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -9195,7 +9285,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23048
*/
public void test0369() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0369", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0369", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -9216,7 +9306,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* DoStatement ==> DoStatement
*/
public void test0370() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0370", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0370", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -9237,7 +9327,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23048
*/
public void test0371() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0371", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0371", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -9258,7 +9348,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23048
*/
public void test0372() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0372", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0372", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -9279,7 +9369,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23118
*/
public void test0373() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0373", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0373", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -9305,7 +9395,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23118
*/
public void test0374() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0374", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0374", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -9331,7 +9421,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23052
*/
public void test0375() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0375", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0375", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -9349,7 +9439,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=22939
*/
public void test0376() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0376", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0376", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -9373,7 +9463,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23050
*/
public void test0377() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0377", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0377", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -9395,7 +9485,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=22161
*/
public void test0378() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0378", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0378", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -9415,7 +9505,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0379() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0379", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0379", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
@@ -9430,7 +9520,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=22054
*/
public void test0380() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0380", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0380", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -9458,7 +9548,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23054
*/
public void test0381() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0381", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0381", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -9476,7 +9566,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=22154
*/
public void test0382() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0382", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0382", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -9494,7 +9584,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=22154
*/
public void test0383() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0383", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0383", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -9512,7 +9602,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=22154
*/
public void test0384() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0384", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0384", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -9530,7 +9620,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23117
*/
public void test0385() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0385", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0385", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -9542,7 +9632,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23259
*/
public void test0386() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0386", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0386", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -9567,7 +9657,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=22939
*/
public void test0387() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0387", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0387", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -9591,7 +9681,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=22154
*/
public void test0388() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0388", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0388", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -9610,7 +9700,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=22154
*/
public void test0389() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0389", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0389", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -9630,7 +9720,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0390() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0390", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0390", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -9651,7 +9741,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0391() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0391", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0391", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -9672,7 +9762,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0392() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0392", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0392", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -9693,7 +9783,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0393() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0393", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0393", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -9724,7 +9814,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0394() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0394", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0394", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -9749,7 +9839,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0395() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0395", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0395", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
@@ -9779,7 +9869,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23284
*/
public void test0396() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0396", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0396", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -9810,7 +9900,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23284
*/
public void test0397() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0397", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0397", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -9841,7 +9931,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23362
*/
public void test0398() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0398", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0398", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -9867,7 +9957,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=22306
*/
public void test0399() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0399", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0399", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull(node);
@@ -9883,7 +9973,7 @@ public class ASTConverterTest extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=22306
*/
public void test0400() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0400", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0400", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterTest2.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterTest2.java
index 1104b75..aa40ff7 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterTest2.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterTest2.java
@@ -53,7 +53,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0401() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0401", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0401", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull(node);
@@ -78,7 +78,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23464
*/
public void test0402() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0402", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0402", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 1, 0, 0);
@@ -92,7 +92,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23597
*/
public void test0403() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0403", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0403", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 1, 0, 1);
assertEquals("Wrong number of problems", 1, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
@@ -126,7 +126,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23597
*/
public void test0404() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0404", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0404", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertEquals("Wrong number of problems", 1, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
@@ -157,7 +157,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23597
*/
public void test0405() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0405", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0405", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 1, 0, 1);
assertEquals("Wrong number of problems", 1, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
@@ -188,7 +188,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23597
*/
public void test0406() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0406", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0406", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
CompilationUnit unit = (CompilationUnit) result;
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -221,7 +221,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23162
*/
public void test0407() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0407", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0407", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertEquals("Wrong number of problems", 0, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -253,7 +253,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0408() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0408", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0408", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertEquals("Wrong number of problems", 0, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -287,7 +287,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
try {
newOptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4);
JavaCore.setOptions(newOptions);
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0409", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0409", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -375,7 +375,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* Test for message on jdt-core-dev
*/
public void test0410() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0410", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0410", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertEquals("Wrong number of problems", 0, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -392,7 +392,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* Test for message on jdt-core-dev
*/
public void test0411() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0411", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0411", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertEquals("Wrong number of problems", 0, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -409,7 +409,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=23901
*/
public void test0412() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0412", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0412", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -439,7 +439,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=20881
*/
public void test0413() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0413", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0413", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -460,7 +460,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0414() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0414", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0414", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -485,7 +485,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
ASTNode declaringNode2 = unit.findDeclaringNode(typeBinding2);
assertNotNull("No declaring node", declaringNode2); //$NON-NLS-1$
- ICompilationUnit sourceUnit2 = getCompilationUnit("Converter" , "src", "test0414", "B.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit2 = getCompilationUnit("Converter" , "src", "test0414", "B.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
result = runConversion(sourceUnit2, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -502,7 +502,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24268
*/
public void test0415() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0415", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0415", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -525,7 +525,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24324
*/
public void test0416() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0416", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0416", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -558,7 +558,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24347
*/
public void test0417() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0417", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0417", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -583,7 +583,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24406
*/
public void test0418() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0418", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0418", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -604,7 +604,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24449
*/
public void test0419() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0419", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0419", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -626,7 +626,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24453
*/
public void test0420() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0420", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0420", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -653,7 +653,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24453
*/
public void test0421() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0421", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0421", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -681,7 +681,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24453
*/
public void test0422() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0422", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0422", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -709,7 +709,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24453
*/
public void test0423() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0423", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0423", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -736,7 +736,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24453
*/
public void test0424() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0424", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0424", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -760,7 +760,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24453
*/
public void test0425() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0425", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0425", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -788,7 +788,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24449
*/
public void test0426() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0426", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0426", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -809,7 +809,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24449
*/
public void test0427() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0427", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0427", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -834,7 +834,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24449
*/
public void test0428() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0428", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0428", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -859,7 +859,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24449
*/
public void test0429() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0429", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0429", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -884,7 +884,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24499
*/
public void test0430() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0430", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0430", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -908,7 +908,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24500
*/
public void test0431() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0431", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0431", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -929,7 +929,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24501
*/
public void test0432() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0432", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0432", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -951,7 +951,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24501
*/
public void test0433() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0433", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0433", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -980,7 +980,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24501
*/
public void test0434() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0434", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0434", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -1004,7 +1004,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24501
*/
public void test0435() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0435", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0435", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -1028,7 +1028,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24502
*/
public void test0436() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0436", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0436", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -1054,7 +1054,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24502
*/
public void test0437() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0437", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0437", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -1076,7 +1076,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24511
*/
public void test0438() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0438", "D.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0438", "D.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -1092,7 +1092,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24502
*/
public void test0439() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0439", "E.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0439", "E.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -1112,7 +1112,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24622
*/
public void test0440() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0440", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0440", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -1152,7 +1152,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24622
*/
public void test0441() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0441", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0441", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -1180,7 +1180,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24622
*/
public void test0442() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0442", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0442", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -1210,7 +1210,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24623
*/
public void test0443() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0443", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0443", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -1228,7 +1228,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24623
*/
public void test0444() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0444", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0444", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -1252,7 +1252,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24773
*/
public void test0445() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0445", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0445", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -1263,7 +1263,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=25018
*/
public void test0446() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0446", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0446", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -1274,7 +1274,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=25124
*/
public void test0447() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0447", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0447", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -1286,7 +1286,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0448() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0448", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0448", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -1306,7 +1306,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* Check that the implicit super constructor call is not there
*/
public void test0449() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0449", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0449", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -1324,7 +1324,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=26452
*/
public void test0450() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0450", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0450", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -1412,7 +1412,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0451() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0451", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0451", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -1430,7 +1430,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=27204
*/
public void test0452() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "NO_WORKING.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "NO_WORKING.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, false);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -1446,7 +1446,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=27173
*/
public void test0453() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0453", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0453", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -1465,7 +1465,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=28296
*/
public void test0454() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0454", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0454", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -1490,7 +1490,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=28682
*/
public void test0455() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0455", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0455", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -1518,7 +1518,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=28682
*/
public void test0456() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0456", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0456", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -1539,7 +1539,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=28682
*/
public void test0457() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0457", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0457", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -1566,7 +1566,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=28682
*/
public void test0458() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0458", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0458", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -1595,7 +1595,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=28682
*/
public void test0459() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0459", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0459", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -1624,7 +1624,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=28869
*/
public void test0460() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0460", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0460", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -1638,7 +1638,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=28824
*/
public void test0461() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0461", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0461", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, false);
char[] source = sourceUnit.getSource().toCharArray();
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -1675,7 +1675,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=32338
*/
public void test0462() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "Test462.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "Test462.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -1694,7 +1694,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=33450
*/
public void test0463() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0463", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0463", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, false);
CompilationUnit compilationUnit = (CompilationUnit) result;
char[] source = sourceUnit.getSource().toCharArray();
@@ -1715,7 +1715,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=33039
*/
public void test0464() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0464", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0464", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
@@ -1737,7 +1737,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=33831
*/
public void test0465() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0465", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0465", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
@@ -1769,7 +1769,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
try {
newOptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4);
JavaCore.setOptions(newOptions);
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0466", "Assert.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0466", "Assert.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
char[] source = sourceUnit.getSource().toCharArray();
@@ -1793,7 +1793,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
try {
newOptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4);
JavaCore.setOptions(newOptions);
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0467", "Assert.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0467", "Assert.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
char[] source = sourceUnit.getSource().toCharArray();
@@ -1818,7 +1818,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=36772
*/
public void test0468() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0468", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0468", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
@@ -1857,7 +1857,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=36895
*/
public void test0469() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "codeManipulation", "bug.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "codeManipulation", "bug.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 2, 0);
@@ -1873,7 +1873,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=37381
*/
public void test0470() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0470", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0470", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -1900,7 +1900,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=38447
*/
public void test0471() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0471", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0471", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -1922,7 +1922,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=38447
*/
public void test0472() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "junit.textui", "ResultPrinter.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "junit.textui", "ResultPrinter.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
assertEquals("No error", 2, compilationUnit.getProblems().length); //$NON-NLS-1$
@@ -1944,7 +1944,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
newOptions.put(JavaCore.COMPILER_PB_ASSERT_IDENTIFIER, JavaCore.ERROR);
JavaCore.setOptions(newOptions);
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0473", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0473", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -1965,7 +1965,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=39259
*/
public void test0474() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0474", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0474", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -1989,7 +1989,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=39259
*/
public void test0475() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0475", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0475", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -2013,7 +2013,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=39259
*/
public void test0476() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0476", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0476", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -2038,7 +2038,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=39327
*/
public void test0477() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0477", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0477", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -2059,7 +2059,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
*/
public void test0478() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0478", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0478", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IType[] types = sourceUnit.getTypes();
assertNotNull(types);
assertEquals("wrong size", 2, types.length);
@@ -2108,7 +2108,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
*/
public void test0479() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0479", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0479", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IType[] types = sourceUnit.getTypes();
assertNotNull(types);
assertEquals("wrong size", 2, types.length);
@@ -2147,7 +2147,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
*/
public void test0480() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0480", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0480", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IType[] types = sourceUnit.getTypes();
assertNotNull(types);
assertEquals("wrong size", 1, types.length);
@@ -2175,7 +2175,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
*/
public void test0481() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0481", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0481", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IType[] types = sourceUnit.getTypes();
assertNotNull(types);
assertEquals("wrong size", 1, types.length);
@@ -2212,7 +2212,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
*/
public void test0482() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0482", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0482", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IType[] types = sourceUnit.getTypes();
assertNotNull(types);
assertEquals("wrong size", 1, types.length);
@@ -2254,7 +2254,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
*/
public void test0483() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0483", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0483", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IType[] types = sourceUnit.getTypes();
assertNotNull(types);
assertEquals("wrong size", 1, types.length);
@@ -2296,7 +2296,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
*/
public void test0484() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0482", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0482", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IType[] types = sourceUnit.getTypes();
assertNotNull(types);
assertEquals("wrong size", 1, types.length);
@@ -2327,7 +2327,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
*/
public void test0485() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0482", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0482", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IType[] types = sourceUnit.getTypes();
assertNotNull(types);
assertEquals("wrong size", 1, types.length);
@@ -2358,7 +2358,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
*/
public void test0486() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0486", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0486", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IType[] types = sourceUnit.getTypes();
assertNotNull(types);
assertEquals("wrong size", 1, types.length);
@@ -2389,7 +2389,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
*/
public void test0487() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0487", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0487", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IType[] types = sourceUnit.getTypes();
assertNotNull(types);
assertEquals("wrong size", 1, types.length);
@@ -2462,7 +2462,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
*/
public void test0488() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0488", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0488", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IType[] types = sourceUnit.getTypes();
assertNotNull(types);
assertEquals("wrong size", 1, types.length);
@@ -2534,7 +2534,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=40804
*/
public void test0489() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0489", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0489", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -2550,7 +2550,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=40804
*/
public void test0490() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0490", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0490", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -2566,7 +2566,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
try {
newOptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4);
JavaCore.setOptions(newOptions);
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0491", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0491", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -2592,7 +2592,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
try {
newOptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4);
JavaCore.setOptions(newOptions);
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0492", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0492", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -2612,7 +2612,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=42839
*/
public void test0493() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0493", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0493", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -2638,7 +2638,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=42839
*/
public void test0494() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0494", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0494", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -2668,7 +2668,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=42839
*/
public void test0495() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0495", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0495", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -2698,7 +2698,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=42839
*/
public void test0496() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0496", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0496", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -2732,7 +2732,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=42839
*/
public void test0497() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0497", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0497", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -2753,7 +2753,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
/**
*/
public void test0498() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0498", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0498", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
}
@@ -2762,7 +2762,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=45199
*/
public void test0499() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0499", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0499", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -2794,7 +2794,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* @throws JavaModelException
*/
public void test0500() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0500", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0500", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IJavaProject project = sourceUnit.getJavaProject();
Map originalOptions = project.getOptions(false);
try {
@@ -2814,7 +2814,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46012
*/
public void test0501() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0501", "JavaEditor.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0501", "JavaEditor.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, false);
assertNotNull(result);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -2824,7 +2824,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46013
*/
public void test0502a() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(sourceUnit, true);
// 'i' in initializer
@@ -2838,7 +2838,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46013
*/
public void test0502b() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(sourceUnit, true);
// 'j' in 'then' block in initializer
@@ -2854,7 +2854,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46013
*/
public void test0502c() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(sourceUnit, true);
// 'i' in 'foo()'
@@ -2868,7 +2868,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46013
*/
public void test0502d() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(sourceUnit, true);
// 'j' in 'then' block in 'foo()'
@@ -2884,7 +2884,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46013
*/
public void test0502e() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(sourceUnit, true);
// 'j' in 'else' block in 'foo()'
@@ -2900,7 +2900,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46013
*/
public void test0502f() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(sourceUnit, true);
// first 'new Object(){...}' in 'foo()'
@@ -2916,7 +2916,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0502g() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(sourceUnit, true);
// 'B' in 'foo()'
@@ -2930,7 +2930,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46013
*/
public void test0502h() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(sourceUnit, true);
// second 'new Object(){...}' in 'foo()'
@@ -2946,7 +2946,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0502i() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(sourceUnit, true);
// 'field' in 'B' in 'foo()'
@@ -2963,7 +2963,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0502j() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(sourceUnit, true);
// 'bar()' in 'B' in 'foo()'
@@ -2978,7 +2978,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46057
*/
public void test0503a() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(sourceUnit, true);
// top level type A
@@ -2991,7 +2991,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46057
*/
public void test0503b() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(sourceUnit, true);
// member type B in A
@@ -3005,7 +3005,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0503c() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(sourceUnit, true);
// local type E in foo() in A
@@ -3019,7 +3019,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46057
*/
public void test0503d() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(sourceUnit, true);
// anonymous type new Object() {...} in foo() in A
@@ -3034,7 +3034,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46057
*/
public void test0503e() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(sourceUnit, true);
// type F in anonymous type new Object() {...} in foo() in A
@@ -3051,7 +3051,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0503f() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(sourceUnit, true);
// local type C in bar() in B in A
@@ -3066,7 +3066,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46057
*/
public void test0503g() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(sourceUnit, true);
// anonymous type new Object() {...} in bar() in B in A
@@ -3082,7 +3082,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46057
*/
public void test0503h() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(sourceUnit, true);
// type D in anonymous type new Object() {...} in bar() in B in A
@@ -3100,7 +3100,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0503i() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(sourceUnit, true);
// unreachable type G in foo() in A
@@ -3116,7 +3116,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=47396
*/
public void test0504() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0504", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0504", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -3134,7 +3134,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=47396
*/
public void test0505() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0505", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0505", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -3152,7 +3152,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=46699
*/
public void test0506() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0506", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0506", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
ASTNode node = getASTNode(unit, 0, 0, 0);
@@ -3172,7 +3172,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=46699
*/
public void test0507() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0507", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0507", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
ASTNode node = getASTNode(unit, 0, 0, 0);
@@ -3192,7 +3192,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=46699
*/
public void test0508() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0508", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0508", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
ASTNode node = getASTNode(unit, 0, 1, 0);
@@ -3212,7 +3212,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=46699
*/
public void test0509() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0509", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0509", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
ASTNode node = getASTNode(unit, 0, 0, 0);
@@ -3232,7 +3232,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=46699
*/
public void test0510() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0510", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0510", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
ASTNode node = getASTNode(unit, 0, 0, 0);
@@ -3252,7 +3252,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=46699
*/
public void test0511() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0511", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0511", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
ASTNode node = getASTNode(unit, 0, 0, 0);
@@ -3272,7 +3272,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=47326
*/
public void test0512() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0512", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0512", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
@@ -3289,7 +3289,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=49429
*/
public void test0513() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0513", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0513", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
@@ -3299,7 +3299,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=48502
*/
public void test0514() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0514", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0514", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
@@ -3309,7 +3309,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=49204
*/
public void test0515() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0515", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0515", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
@@ -3334,7 +3334,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0516() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0516", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0516", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
final CompilationUnit unit = (CompilationUnit) result;
@@ -3369,7 +3369,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0517() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0517", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0517", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
final CompilationUnit unit = (CompilationUnit) result;
@@ -3406,7 +3406,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0518() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0518", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0518", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
final CompilationUnit unit = (CompilationUnit) result;
@@ -3441,7 +3441,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0519() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0519", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0519", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
final CompilationUnit unit = (CompilationUnit) result;
@@ -3477,7 +3477,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0520() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0520", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0520", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
final CompilationUnit unit = (CompilationUnit) result;
@@ -3511,7 +3511,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0521() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0521", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0521", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
// count the number of time isCanceled() is called when converting this source unit
WorkingCopyOwner owner = new WorkingCopyOwner() {};
@@ -3944,7 +3944,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
*/
public void test0532() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0488", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0488", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IType[] types = sourceUnit.getTypes();
assertNotNull(types);
assertEquals("wrong size", 1, types.length);
@@ -4025,7 +4025,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0533() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0533", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0533", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
final CompilationUnit unit = (CompilationUnit) result;
@@ -4050,7 +4050,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0534() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0534", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0534", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
final CompilationUnit unit = (CompilationUnit) result;
@@ -4075,7 +4075,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0535() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0535", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0535", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
final CompilationUnit unit = (CompilationUnit) result;
@@ -4099,7 +4099,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=47396
*/
public void test0536() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0536", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0536", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, false);
assertNotNull("No compilation unit", result);
}
@@ -4107,7 +4107,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=51089
*/
public void test0537a() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0537", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0537", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, false);
assertNotNull("No compilation unit", result);
}
@@ -4115,7 +4115,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=51089
*/
public void test0537b() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0537", "B.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0537", "B.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, false);
assertNotNull("No compilation unit", result);
}
@@ -4123,7 +4123,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=51089
*/
public void test0537c() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0537", "C.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0537", "C.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, false);
assertNotNull("No compilation unit", result);
}
@@ -4132,7 +4132,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0538a() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
try {
sourceUnit.becomeWorkingCopy(null, null);
sourceUnit.getBuffer().setContents(
@@ -4153,7 +4153,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* Ensures that no AST is created during reconcile if not requested.
*/
public void test0538b() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
try {
sourceUnit.becomeWorkingCopy(null, null);
sourceUnit.getBuffer().setContents(
@@ -4173,7 +4173,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0538c() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
try {
sourceUnit.becomeWorkingCopy(null, null);
CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, false, null, null);
@@ -4188,7 +4188,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0538d() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
try {
ReconcilerTests.ProblemRequestor pbRequestor = new ReconcilerTests.ProblemRequestor();
sourceUnit.becomeWorkingCopy(pbRequestor, null);
@@ -4218,7 +4218,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0538e() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
try {
ReconcilerTests.ProblemRequestor pbRequestor = new ReconcilerTests.ProblemRequestor();
sourceUnit.becomeWorkingCopy(pbRequestor, null);
@@ -4242,7 +4242,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0538f() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
try {
ReconcilerTests.ProblemRequestor pbRequestor = new ReconcilerTests.ProblemRequestor();
sourceUnit.becomeWorkingCopy(pbRequestor, null);
@@ -4272,7 +4272,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0538g() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
try {
ReconcilerTests.ProblemRequestor pbRequestor = new ReconcilerTests.ProblemRequestor();
sourceUnit.becomeWorkingCopy(pbRequestor, null);
@@ -4302,7 +4302,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0538h() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
try {
ReconcilerTests.ProblemRequestor pbRequestor = new ReconcilerTests.ProblemRequestor() {
public boolean isActive() {
@@ -4327,7 +4327,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=53477
*/
public void test0539() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0539", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0539", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
final CompilationUnit unit = (CompilationUnit) result;
@@ -4368,7 +4368,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
options.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4);
options.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_4);
options.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_4);
- ASTNode result = runConversion(source, "Test.java", project, options, true); //$NON-NLS-1$
+ ASTNode result = runConversion(source, "Test.js", project, options, true); //$NON-NLS-1$
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -4387,7 +4387,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=56697
*/
public void test0541() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0541", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0541", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
@@ -4415,7 +4415,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=55004
*/
public void test0542() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0542", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0542", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
@@ -4584,7 +4584,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=58436
*/
public void test0543() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0543", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0543", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
@@ -4595,7 +4595,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=51500
*/
public void test0544() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0544", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0544", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
@@ -4612,7 +4612,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=59843
*/
public void test0545() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0545", "First.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0545", "First.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
@@ -4622,7 +4622,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
ITypeBinding typeBinding = typeDeclaration.resolveBinding();
assertEquals("Wrong key", "Ltest0545/First$Test;", typeBinding.getKey());
- sourceUnit = getCompilationUnit("Converter", "src", "test0545", "Second.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ sourceUnit = getCompilationUnit("Converter", "src", "test0545", "Second.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
result = runConversion(sourceUnit, true);
unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
@@ -4632,7 +4632,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
typeBinding = typeDeclaration.resolveBinding();
assertEquals("Wrong key", "Ltest0545/Second$Test;", typeBinding.getKey());
- sourceUnit = getCompilationUnit("Converter", "src", "test0545", "Third.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ sourceUnit = getCompilationUnit("Converter", "src", "test0545", "Third.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
result = runConversion(sourceUnit, true);
unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
@@ -4643,7 +4643,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
assertEquals("Wrong key", "Ltest0545/Third$Test;", typeBinding.getKey());
- sourceUnit = getCompilationUnit("Converter", "src", "test0545", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ sourceUnit = getCompilationUnit("Converter", "src", "test0545", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
result = runConversion(sourceUnit, true);
unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
@@ -4659,7 +4659,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0546() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0546", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0546", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
@@ -4703,7 +4703,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0547() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0547", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0547", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
@@ -4728,7 +4728,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=60581
*/
public void test0548() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0548", "PaletteStackEditPart.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0548", "PaletteStackEditPart.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, false);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
}
@@ -4737,7 +4737,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=48502
*/
public void test0549() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0549", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0549", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, false);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
}
@@ -4746,7 +4746,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=48502
*/
public void test0550() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0550", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0550", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, false);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
}
@@ -4755,7 +4755,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=60848
*/
public void test0551() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0551", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0551", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
@@ -4767,7 +4767,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
}
public void test0552() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0552", "Test.java");
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0552", "Test.js");
char[] source = sourceUnit.getSource().toCharArray();
CompilationUnit result = (CompilationUnit) runConversion(sourceUnit, true);
assertEquals("Got errors", 0, result.getProblems().length);
@@ -4799,7 +4799,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=61946
*/
public void test0553() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0553", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0553", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -4821,7 +4821,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=61946
*/
public void test0554() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0554", "B.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0554", "B.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
@@ -4850,7 +4850,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=61946
*/
public void test0555() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0555", "B.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0555", "B.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
@@ -4879,7 +4879,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=62463
*/
public void test0556() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0556", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0556", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
@@ -4904,7 +4904,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=62463
*/
public void test0557() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0557", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0557", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
@@ -4948,7 +4948,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=65562
*/
public void test0559() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0559", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0559", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
@@ -4976,7 +4976,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=65562
*/
public void test0560() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0560", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0560", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
@@ -5004,7 +5004,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=65562
*/
public void test0561() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0561", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0561", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
@@ -5032,7 +5032,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=65562
*/
public void test0562() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0562", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0562", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
@@ -5060,7 +5060,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=65562
*/
public void test0563() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0563", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0563", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
@@ -5087,7 +5087,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=65562
*/
public void test0564() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0564", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0564", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
@@ -5114,7 +5114,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=65562
*/
public void test0565() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0565", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0565", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
@@ -5141,7 +5141,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=69349
*/
public void test0566() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0566", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0566", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
@@ -5157,7 +5157,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=69349
*/
public void test0567() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0567", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0567", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
@@ -5174,7 +5174,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0569() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0569", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0569", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -5206,7 +5206,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
public void test0570() throws CoreException {
ICompilationUnit workingCopy = null;
try {
- workingCopy = getWorkingCopy("/Converter/src/X.java", true);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true);
CompilationUnit unit = (CompilationUnit) buildAST(
"import java.util.List;\n" +
"public class X{\n" +
@@ -5238,7 +5238,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
" public class Y {\n" +
" }\n" +
"}";
- addLibrary(p, "test0571.jar", "test0571.zip", new String[] {"X.java", source }, "1.4");
+ addLibrary(p, "test0571.jar", "test0571.zip", new String[] {"X.js", source }, "1.4");
IClassFile classFile = getClassFile("P", "/P/test0571.jar", "", "X$Y.class");
CompilationUnit unit = (CompilationUnit) runConversion(AST.JLS3, classFile, 0, true);
IProblem[] problems = unit.getProblems();
@@ -5257,7 +5257,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
public void test0572() throws CoreException {
ICompilationUnit workingCopy = null;
try {
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
AnonymousClassDeclaration type = (AnonymousClassDeclaration) buildAST(
"public class X {\n" +
" void foo() {\n" +
@@ -5284,7 +5284,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
public void test0573() throws CoreException {
ICompilationUnit workingCopy = null;
try {
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
CompilationUnit cu = (CompilationUnit) buildAST(
"public class X {\n" +
"}",
@@ -5302,7 +5302,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
public void test0574() throws CoreException {
ICompilationUnit workingCopy = null;
try {
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode string = buildAST(
"public class X {\n" +
" String s = /*start*/\"a\" + \"b\"/*end*/;\n" +
@@ -5322,7 +5322,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
public void test0575() throws JavaModelException {
ICompilationUnit workingCopy = null;
try {
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
" /*start1*/String foo(String o) {return null;}/*end1*/\n" +
@@ -5345,7 +5345,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
try {
IJavaProject project = createJavaProject("P1", new String[] {""}, new String[] {"CONVERTER_JCL15_LIB"}, "", "1.5");
addLibrary(project, "lib.jar", "src.zip", new String[] {
- "/P1/p/X.java",
+ "/P1/p/X.js",
"package p;\n" +
"public class X<T> {\n" +
" /*start*/public class Member {\n" +
@@ -5374,7 +5374,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
ICompilationUnit workingCopy = null;
try {
workingCopy = getWorkingCopy(
- "/Converter/src/X.java",
+ "/Converter/src/X.js",
"public class X {\n" +
" String s = /*start*/\"a\" + \"b\"/*end*/;\n" +
"}",
@@ -5394,7 +5394,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
ICompilationUnit workingCopy = null;
try {
IClasspathEntry[] classpath = new IClasspathEntry[] {JavaCore.newLibraryEntry(getConverterJCLPath(), null, null)};
- workingCopy = newExternalWorkingCopy("External.java", classpath, new ProblemRequestor(), "");
+ workingCopy = newExternalWorkingCopy("External.js", classpath, new ProblemRequestor(), "");
String contents =
"public class External {\n"+
@@ -5420,7 +5420,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
ICompilationUnit workingCopy = null;
try {
workingCopy = getWorkingCopy(
- "/Converter/src/X.java",
+ "/Converter/src/X.js",
"public class X {\n" +
" /*start*/void foo(Object/*first arg*/ arg1, Object arg2) {\n" +
" }/*end*/\n" +
@@ -5437,7 +5437,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
}
public void test0606() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0606", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0606", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -5459,7 +5459,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
ICompilationUnit workingCopy = null;
try {
workingCopy = getWorkingCopy(
- "/Converter/src/X.java",
+ "/Converter/src/X.js",
"public class X {\n" +
" void foo() {\n" +
" #\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterTestAST3_2.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterTestAST3_2.java
index 6583309..6b31825 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterTestAST3_2.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterTestAST3_2.java
@@ -123,7 +123,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=22560
*/
public void test0401() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0401", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0401", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull(node);
@@ -148,7 +148,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23464
*/
public void test0402() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0402", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0402", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 1, 0, 0);
@@ -162,7 +162,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23597
*/
public void test0403() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0403", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0403", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 1, 0, 1);
assertEquals("Wrong number of problems", 1, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
@@ -196,7 +196,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23597
*/
public void test0404() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0404", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0404", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertEquals("Wrong number of problems", 1, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
@@ -227,7 +227,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23597
*/
public void test0405() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0405", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0405", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 1, 0, 1);
assertEquals("Wrong number of problems", 1, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
@@ -258,7 +258,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23597
*/
public void test0406() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0406", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0406", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
CompilationUnit unit = (CompilationUnit) result;
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -291,7 +291,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23162
*/
public void test0407() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0407", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0407", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertEquals("Wrong number of problems", 0, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -322,7 +322,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=23162
*/
public void test0408() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0408", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0408", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertEquals("Wrong number of problems", 0, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -356,7 +356,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
try {
newOptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4);
JavaCore.setOptions(newOptions);
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0409", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0409", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -444,7 +444,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* Test for message on jdt-core-dev
*/
public void test0410() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0410", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0410", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertEquals("Wrong number of problems", 0, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -461,7 +461,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* Test for message on jdt-core-dev
*/
public void test0411() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0411", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0411", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertEquals("Wrong number of problems", 0, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -478,7 +478,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=23901
*/
public void test0412() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0412", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0412", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -508,7 +508,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=20881
*/
public void test0413() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0413", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0413", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -528,7 +528,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=23734
*/
public void test0414() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0414", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0414", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -553,7 +553,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
ASTNode declaringNode2 = unit.findDeclaringNode(typeBinding2);
assertNotNull("No declaring node", declaringNode2); //$NON-NLS-1$
- ICompilationUnit sourceUnit2 = getCompilationUnit("Converter" , "src", "test0414", "B.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit2 = getCompilationUnit("Converter" , "src", "test0414", "B.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
result = runConversion(AST.JLS3, sourceUnit2, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -570,7 +570,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24268
*/
public void test0415() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0415", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0415", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -593,7 +593,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24324
*/
public void test0416() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0416", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0416", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -626,7 +626,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24347
*/
public void test0417() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0417", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0417", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -651,7 +651,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24406
*/
public void test0418() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0418", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0418", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -672,7 +672,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24449
*/
public void test0419() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0419", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0419", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -694,7 +694,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24453
*/
public void test0420() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0420", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0420", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -721,7 +721,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24453
*/
public void test0421() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0421", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0421", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -749,7 +749,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24453
*/
public void test0422() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0422", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0422", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -777,7 +777,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24453
*/
public void test0423() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0423", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0423", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -804,7 +804,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24453
*/
public void test0424() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0424", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0424", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -828,7 +828,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24453
*/
public void test0425() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0425", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0425", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -856,7 +856,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24449
*/
public void test0426() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0426", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0426", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -877,7 +877,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24449
*/
public void test0427() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0427", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0427", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -902,7 +902,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24449
*/
public void test0428() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0428", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0428", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -927,7 +927,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24449
*/
public void test0429() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0429", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0429", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -952,7 +952,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24499
*/
public void test0430() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0430", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0430", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -976,7 +976,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24500
*/
public void test0431() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0431", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0431", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -997,7 +997,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24501
*/
public void test0432() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0432", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0432", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -1019,7 +1019,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24501
*/
public void test0433() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0433", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0433", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -1048,7 +1048,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24501
*/
public void test0434() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0434", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0434", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -1072,7 +1072,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24501
*/
public void test0435() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0435", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0435", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -1096,7 +1096,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24502
*/
public void test0436() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0436", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0436", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -1122,7 +1122,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24502
*/
public void test0437() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0437", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0437", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -1144,7 +1144,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24511
*/
public void test0438() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0438", "D.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0438", "D.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -1160,7 +1160,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24502
*/
public void test0439() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0439", "E.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0439", "E.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -1180,7 +1180,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24622
*/
public void test0440() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0440", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0440", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -1220,7 +1220,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24622
*/
public void test0441() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0441", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0441", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -1248,7 +1248,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24622
*/
public void test0442() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0442", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0442", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -1278,7 +1278,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24623
*/
public void test0443() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0443", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0443", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -1302,7 +1302,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24623
*/
public void test0444() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0444", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0444", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -1326,7 +1326,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24773
*/
public void test0445() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0445", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0445", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -1337,7 +1337,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=25018
*/
public void test0446() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0446", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0446", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -1348,7 +1348,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=25124
*/
public void test0447() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0447", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0447", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -1359,7 +1359,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=25330
*/
public void test0448() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0448", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0448", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -1378,7 +1378,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* Check that the implicit super constructor call is not there
*/
public void test0449() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0449", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0449", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -1396,7 +1396,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=26452
*/
public void test0450() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0450", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0450", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -1483,7 +1483,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=24916
*/
public void test0451() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0451", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0451", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -1501,7 +1501,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=27204
*/
public void test0452() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "NO_WORKING.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "NO_WORKING.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -1517,7 +1517,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=27173
*/
public void test0453() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0453", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0453", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -1536,7 +1536,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=28296
*/
public void test0454() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0454", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0454", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -1561,7 +1561,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=28682
*/
public void test0455() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0455", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0455", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -1589,7 +1589,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=28682
*/
public void test0456() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0456", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0456", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -1610,7 +1610,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=28682
*/
public void test0457() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0457", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0457", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -1637,7 +1637,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=28682
*/
public void test0458() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0458", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0458", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -1666,7 +1666,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=28682
*/
public void test0459() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0459", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0459", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -1695,7 +1695,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=28869
*/
public void test0460() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0460", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0460", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -1709,7 +1709,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=28824
*/
public void test0461() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0461", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0461", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
char[] source = sourceUnit.getSource().toCharArray();
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -1746,7 +1746,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=32338
*/
public void test0462() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "Test462.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "Test462.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -1765,7 +1765,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=33450
*/
public void test0463() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0463", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0463", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
CompilationUnit compilationUnit = (CompilationUnit) result;
char[] source = sourceUnit.getSource().toCharArray();
@@ -1786,7 +1786,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=33039
*/
public void test0464() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0464", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0464", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
@@ -1808,7 +1808,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=33831
*/
public void test0465() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0465", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0465", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
@@ -1840,7 +1840,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
try {
newOptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4);
JavaCore.setOptions(newOptions);
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0466", "Assert.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0466", "Assert.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
char[] source = sourceUnit.getSource().toCharArray();
@@ -1864,7 +1864,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
try {
newOptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4);
JavaCore.setOptions(newOptions);
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0467", "Assert.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0467", "Assert.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
char[] source = sourceUnit.getSource().toCharArray();
@@ -1889,7 +1889,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=36772
*/
public void test0468() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0468", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0468", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
@@ -1928,7 +1928,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=36895
*/
public void test0469() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "codeManipulation", "bug.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "codeManipulation", "bug.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 2, 0);
@@ -1944,7 +1944,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=37381
*/
public void test0470() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0470", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0470", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -1971,7 +1971,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=38447
*/
public void test0471() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0471", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0471", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -1993,7 +1993,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=38447
*/
public void test0472() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "junit.textui", "ResultPrinter.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "junit.textui", "ResultPrinter.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
assertEquals("No error", 2, compilationUnit.getProblems().length); //$NON-NLS-1$
@@ -2015,7 +2015,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
newOptions.put(JavaCore.COMPILER_PB_ASSERT_IDENTIFIER, JavaCore.ERROR);
JavaCore.setOptions(newOptions);
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0473", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0473", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -2036,7 +2036,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=39259
*/
public void test0474() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0474", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0474", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -2060,7 +2060,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=39259
*/
public void test0475() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0475", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0475", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -2084,7 +2084,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=39259
*/
public void test0476() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0476", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0476", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -2109,7 +2109,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=39327
*/
public void test0477() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0477", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0477", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -2130,7 +2130,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
*/
public void test0478() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0478", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0478", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IType[] types = sourceUnit.getTypes();
assertNotNull(types);
assertEquals("wrong size", 2, types.length);
@@ -2179,7 +2179,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
*/
public void test0479() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0479", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0479", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IType[] types = sourceUnit.getTypes();
assertNotNull(types);
assertEquals("wrong size", 2, types.length);
@@ -2218,7 +2218,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
*/
public void test0480() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0480", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0480", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IType[] types = sourceUnit.getTypes();
assertNotNull(types);
assertEquals("wrong size", 1, types.length);
@@ -2246,7 +2246,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
*/
public void test0481() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0481", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0481", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IType[] types = sourceUnit.getTypes();
assertNotNull(types);
assertEquals("wrong size", 1, types.length);
@@ -2283,7 +2283,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
*/
public void test0482() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0482", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0482", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IType[] types = sourceUnit.getTypes();
assertNotNull(types);
assertEquals("wrong size", 1, types.length);
@@ -2325,7 +2325,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
*/
public void test0483() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0483", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0483", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IType[] types = sourceUnit.getTypes();
assertNotNull(types);
assertEquals("wrong size", 1, types.length);
@@ -2367,7 +2367,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
*/
public void test0484() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0482", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0482", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IType[] types = sourceUnit.getTypes();
assertNotNull(types);
assertEquals("wrong size", 1, types.length);
@@ -2398,7 +2398,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
*/
public void test0485() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0482", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0482", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IType[] types = sourceUnit.getTypes();
assertNotNull(types);
assertEquals("wrong size", 1, types.length);
@@ -2429,7 +2429,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
*/
public void test0486() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0486", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0486", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IType[] types = sourceUnit.getTypes();
assertNotNull(types);
assertEquals("wrong size", 1, types.length);
@@ -2460,7 +2460,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
*/
public void test0487() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0487", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0487", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IType[] types = sourceUnit.getTypes();
assertNotNull(types);
assertEquals("wrong size", 1, types.length);
@@ -2533,7 +2533,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
*/
public void test0488() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0488", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0488", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IType[] types = sourceUnit.getTypes();
assertNotNull(types);
assertEquals("wrong size", 1, types.length);
@@ -2605,7 +2605,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=40804
*/
public void test0489() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0489", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0489", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -2621,7 +2621,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=40804
*/
public void test0490() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0490", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0490", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -2637,7 +2637,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
try {
newOptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4);
JavaCore.setOptions(newOptions);
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0491", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0491", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -2663,7 +2663,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
try {
newOptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4);
JavaCore.setOptions(newOptions);
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0492", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0492", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -2683,7 +2683,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=42839
*/
public void test0493() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0493", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0493", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -2709,7 +2709,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=42839
*/
public void test0494() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0494", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0494", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -2739,7 +2739,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=42839
*/
public void test0495() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0495", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0495", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -2769,7 +2769,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=42839
*/
public void test0496() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0496", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0496", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -2803,7 +2803,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=42839
*/
public void test0497() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0497", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0497", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -2824,7 +2824,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
/**
*/
public void test0498() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0498", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0498", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
}
@@ -2833,7 +2833,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=45199
*/
public void test0499() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0499", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0499", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -2865,7 +2865,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* @throws JavaModelException
*/
public void test0500() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0500", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0500", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IJavaProject project = sourceUnit.getJavaProject();
Map originalOptions = project.getOptions(false);
try {
@@ -2885,7 +2885,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46012
*/
public void test0501() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0501", "JavaEditor.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0501", "JavaEditor.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
assertNotNull(result);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -2895,7 +2895,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46013
*/
public void test0502a() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
// 'i' in initializer
@@ -2909,7 +2909,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46013
*/
public void test0502b() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
// 'j' in 'then' block in initializer
@@ -2925,7 +2925,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46013
*/
public void test0502c() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
// 'i' in 'foo()'
@@ -2939,7 +2939,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46013
*/
public void test0502d() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
// 'j' in 'then' block in 'foo()'
@@ -2955,7 +2955,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46013
*/
public void test0502e() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
// 'j' in 'else' block in 'foo()'
@@ -2971,7 +2971,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46013
*/
public void test0502f() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
// first 'new Object(){...}' in 'foo()'
@@ -2986,7 +2986,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46013
*/
public void test0502g() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
// 'B' in 'foo()'
@@ -3000,7 +3000,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46013
*/
public void test0502h() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
// second 'new Object(){...}' in 'foo()'
@@ -3015,7 +3015,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46013
*/
public void test0502i() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
// 'field' in 'B' in 'foo()'
@@ -3033,7 +3033,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46013
*/
public void test0502j() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
// 'bar()' in 'B' in 'foo()'
@@ -3050,7 +3050,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46057
*/
public void test0503a() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
// top level type A
@@ -3063,7 +3063,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46057
*/
public void test0503b() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
// member type B in A
@@ -3076,7 +3076,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46057
*/
public void test0503c() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
// local type E in foo() in A
@@ -3090,7 +3090,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46057
*/
public void test0503d() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
// anonymous type new Object() {...} in foo() in A
@@ -3105,7 +3105,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46057
*/
public void test0503e() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
// type F in anonymous type new Object() {...} in foo() in A
@@ -3121,7 +3121,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46057
*/
public void test0503f() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
// local type C in bar() in B in A
@@ -3136,7 +3136,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46057
*/
public void test0503g() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
// anonymous type new Object() {...} in bar() in B in A
@@ -3152,7 +3152,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46057
*/
public void test0503h() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
// type D in anonymous type new Object() {...} in bar() in B in A
@@ -3169,7 +3169,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=46057
*/
public void test0503i() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
// unreachable type G in foo() in A
@@ -3185,7 +3185,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=47396
*/
public void test0504() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0504", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0504", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -3203,7 +3203,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=47396
*/
public void test0505() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0505", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0505", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -3221,7 +3221,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=46699
*/
public void test0506() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0506", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0506", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
ASTNode node = getASTNode(unit, 0, 0, 0);
@@ -3241,7 +3241,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=46699
*/
public void test0507() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0507", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0507", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
ASTNode node = getASTNode(unit, 0, 0, 0);
@@ -3261,7 +3261,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=46699
*/
public void test0508() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0508", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0508", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
ASTNode node = getASTNode(unit, 0, 1, 0);
@@ -3281,7 +3281,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=46699
*/
public void test0509() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0509", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0509", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
ASTNode node = getASTNode(unit, 0, 0, 0);
@@ -3301,7 +3301,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=46699
*/
public void test0510() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0510", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0510", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
ASTNode node = getASTNode(unit, 0, 0, 0);
@@ -3321,7 +3321,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=46699
*/
public void test0511() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0511", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0511", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
ASTNode node = getASTNode(unit, 0, 0, 0);
@@ -3341,7 +3341,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=47326
*/
public void test0512() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0512", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0512", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
@@ -3358,7 +3358,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=49429
*/
public void test0513() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0513", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0513", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
@@ -3369,7 +3369,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=48502
*/
public void test0514() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0514", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0514", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
@@ -3379,7 +3379,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=49204
*/
public void test0515() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0515", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0515", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
@@ -3403,7 +3403,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=48489
*/
public void test0516() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0516", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0516", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
final CompilationUnit unit = (CompilationUnit) result;
@@ -3437,7 +3437,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=48489
*/
public void test0517() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0517", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0517", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
final CompilationUnit unit = (CompilationUnit) result;
@@ -3473,7 +3473,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=48489
*/
public void test0518() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0518", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0518", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
final CompilationUnit unit = (CompilationUnit) result;
@@ -3507,7 +3507,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=48489
*/
public void test0519() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0519", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0519", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
final CompilationUnit unit = (CompilationUnit) result;
@@ -3542,7 +3542,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=48489
*/
public void test0520() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0520", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0520", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
final CompilationUnit unit = (CompilationUnit) result;
@@ -3576,7 +3576,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0521() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0521", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0521", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
// count the number of time isCanceled() is called when converting this source unit
WorkingCopyOwner owner = new WorkingCopyOwner() {};
@@ -4009,7 +4009,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
*/
public void test0532() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0488", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0488", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IType[] types = sourceUnit.getTypes();
assertNotNull(types);
assertEquals("wrong size", 1, types.length);
@@ -4090,7 +4090,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0533() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0533", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0533", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
final CompilationUnit unit = (CompilationUnit) result;
@@ -4115,7 +4115,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0534() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0534", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0534", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
final CompilationUnit unit = (CompilationUnit) result;
@@ -4140,7 +4140,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0535() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0535", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0535", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
final CompilationUnit unit = (CompilationUnit) result;
@@ -4164,7 +4164,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=47396
*/
public void test0536() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0536", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0536", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
assertNotNull("No compilation unit", result);
}
@@ -4172,7 +4172,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=51089
*/
public void test0537a() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0537", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0537", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
assertNotNull("No compilation unit", result);
}
@@ -4180,7 +4180,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=51089
*/
public void test0537b() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0537", "B.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0537", "B.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
assertNotNull("No compilation unit", result);
}
@@ -4188,7 +4188,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=51089
*/
public void test0537c() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0537", "C.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0537", "C.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
assertNotNull("No compilation unit", result);
}
@@ -4197,7 +4197,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0538a() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
try {
sourceUnit.becomeWorkingCopy(null, null);
sourceUnit.getBuffer().setContents(
@@ -4218,7 +4218,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* Ensures that no AST is created during reconcile if not requested.
*/
public void test0538b() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
try {
sourceUnit.becomeWorkingCopy(null, null);
sourceUnit.getBuffer().setContents(
@@ -4238,7 +4238,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0538c() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
try {
sourceUnit.becomeWorkingCopy(null, null);
CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, false, null, null);
@@ -4253,7 +4253,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0538d() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
try {
ReconcilerTests.ProblemRequestor pbRequestor = new ReconcilerTests.ProblemRequestor();
sourceUnit.becomeWorkingCopy(pbRequestor, null);
@@ -4283,7 +4283,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0538e() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
try {
ReconcilerTests.ProblemRequestor pbRequestor = new ReconcilerTests.ProblemRequestor();
sourceUnit.becomeWorkingCopy(pbRequestor, null);
@@ -4307,7 +4307,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0538f() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
try {
ReconcilerTests.ProblemRequestor pbRequestor = new ReconcilerTests.ProblemRequestor();
sourceUnit.becomeWorkingCopy(pbRequestor, null);
@@ -4337,7 +4337,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0538g() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
try {
ReconcilerTests.ProblemRequestor pbRequestor = new ReconcilerTests.ProblemRequestor();
sourceUnit.becomeWorkingCopy(pbRequestor, null);
@@ -4367,7 +4367,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* @deprecated using deprecated code
*/
public void test0538h() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
try {
ReconcilerTests.ProblemRequestor pbRequestor = new ReconcilerTests.ProblemRequestor() {
public boolean isActive() {
@@ -4392,7 +4392,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=53477
*/
public void test0539() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0539", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0539", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
final CompilationUnit unit = (CompilationUnit) result;
@@ -4433,7 +4433,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
options.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4);
options.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_4);
options.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_4);
- ASTNode result = runConversion(AST.JLS3, source, "Test.java", project, options, true); //$NON-NLS-1$
+ ASTNode result = runConversion(AST.JLS3, source, "Test.js", project, options, true); //$NON-NLS-1$
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -4452,7 +4452,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=56697
*/
public void test0541() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0541", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0541", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
@@ -4480,7 +4480,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=55004
*/
public void test0542() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0542", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0542", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
@@ -4649,7 +4649,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=58436
*/
public void test0543() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0543", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0543", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
@@ -4660,7 +4660,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=51500
*/
public void test0544() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0544", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0544", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
@@ -4677,7 +4677,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=59843
*/
public void test0545() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0545", "First.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0545", "First.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
@@ -4687,7 +4687,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
ITypeBinding typeBinding = typeDeclaration.resolveBinding();
assertEquals("Wrong key", "Ltest0545/First$Test;", typeBinding.getKey());
- sourceUnit = getCompilationUnit("Converter", "src", "test0545", "Second.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ sourceUnit = getCompilationUnit("Converter", "src", "test0545", "Second.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
result = runConversion(AST.JLS3, sourceUnit, true);
unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
@@ -4697,7 +4697,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
typeBinding = typeDeclaration.resolveBinding();
assertEquals("Wrong key", "Ltest0545/Second$Test;", typeBinding.getKey());
- sourceUnit = getCompilationUnit("Converter", "src", "test0545", "Third.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ sourceUnit = getCompilationUnit("Converter", "src", "test0545", "Third.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
result = runConversion(AST.JLS3, sourceUnit, true);
unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
@@ -4708,7 +4708,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
assertEquals("Wrong key", "Ltest0545/Third$Test;", typeBinding.getKey());
- sourceUnit = getCompilationUnit("Converter", "src", "test0545", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ sourceUnit = getCompilationUnit("Converter", "src", "test0545", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
result = runConversion(AST.JLS3, sourceUnit, true);
unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
@@ -4723,7 +4723,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=59848
*/
public void test0546() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0546", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0546", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
@@ -4766,7 +4766,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=60078
*/
public void test0547() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0547", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0547", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
@@ -4791,7 +4791,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=60581
*/
public void test0548() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0548", "PaletteStackEditPart.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0548", "PaletteStackEditPart.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
}
@@ -4800,7 +4800,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=48502
*/
public void test0549() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0549", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0549", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
}
@@ -4809,7 +4809,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=48502
*/
public void test0550() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0550", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0550", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
}
@@ -4818,7 +4818,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=60848
*/
public void test0551() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0551", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0551", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
@@ -4830,7 +4830,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
}
public void test0552() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0552", "Test.java");
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0552", "Test.js");
char[] source = sourceUnit.getSource().toCharArray();
CompilationUnit result = (CompilationUnit) runConversion(AST.JLS3, sourceUnit, true);
assertEquals("Got errors", 0, result.getProblems().length);
@@ -4862,7 +4862,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=61946
*/
public void test0553() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0553", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0553", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -4884,7 +4884,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=61946
*/
public void test0554() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0554", "B.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0554", "B.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
@@ -4913,7 +4913,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=61946
*/
public void test0555() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0555", "B.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0555", "B.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
@@ -4942,7 +4942,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=62463
*/
public void test0556() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0556", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0556", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
@@ -4967,7 +4967,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=62463
*/
public void test0557() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0557", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0557", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
@@ -5011,7 +5011,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=65562
*/
public void test0559() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0559", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0559", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
@@ -5039,7 +5039,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=65562
*/
public void test0560() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0560", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0560", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
@@ -5067,7 +5067,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=65562
*/
public void test0561() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0561", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0561", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
@@ -5095,7 +5095,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=65562
*/
public void test0562() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0562", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0562", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
@@ -5123,7 +5123,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=65562
*/
public void test0563() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0563", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0563", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
@@ -5150,7 +5150,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=65562
*/
public void test0564() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0564", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0564", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
@@ -5177,7 +5177,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=65562
*/
public void test0565() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0565", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0565", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
@@ -5204,7 +5204,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=69349
*/
public void test0566() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0566", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0566", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
@@ -5220,7 +5220,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=69349
*/
public void test0567() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0567", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0567", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
@@ -5236,7 +5236,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=70398
*/
public void test0568() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0568", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0568", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
}
@@ -5245,7 +5245,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=70398
*/
public void test0570() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0570", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0570", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -5291,7 +5291,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=77968
*/
public void test0573() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0573", "Z.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0573", "Z.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
String source = sourceUnit.getSource();
int pos = source.indexOf("his.ba");
ASTNode result = runConversion(AST.JLS3, sourceUnit, pos, true);
@@ -5312,7 +5312,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=78735
*/
public void test0574() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0574", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0574", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -5341,7 +5341,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=78735
*/
public void test0575() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0575", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0575", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -5378,7 +5378,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=77645
*/
public void test0578() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0578", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0578", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -5456,7 +5456,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* @deprecated
*/
public void test0579() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0579", "ParserTask.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0579", "ParserTask.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = AST.parseCompilationUnit(sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -5472,7 +5472,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0580() throws JavaModelException {
ICompilationUnit workingCopy = null;
try {
- workingCopy = getWorkingCopy("/Converter/src/p/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/p/X.js", true/*resolve*/);
String source = "package p;\n" +
"public class X {\n" +
" d String[][]tab;\n" +
@@ -5505,7 +5505,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0581() throws JavaModelException {
ICompilationUnit workingCopy = null;
try {
- workingCopy = getWorkingCopy("/Converter/src/p/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/p/X.js", true/*resolve*/);
ASTNode node = buildAST(
"package p;\n" +
"public class X {\n" +
@@ -5539,7 +5539,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
// TODO (jerome) remove this test as it has nothing to do on ASTConverterTest and it is a dup of ExistenceTests#testMethodWithInvalidParameter()
public void test0582() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0582", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0582", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
IType[] types = sourceUnit.getTypes();
assertEquals("wrong size", 1, types.length);
IType type = types[0];
@@ -5563,7 +5563,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" return \'\\000\';\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy);
@@ -5595,7 +5595,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" return \'\\u0020\';\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy);
@@ -5627,7 +5627,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" return \'\\b\';\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy);
@@ -5659,7 +5659,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" return \'\\t\';\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy);
@@ -5691,7 +5691,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" return \'\\n\';\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy);
@@ -5723,7 +5723,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" return \'\\f\';\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy);
@@ -5755,7 +5755,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" return \'\\r\';\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy);
@@ -5787,7 +5787,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" return \'\\\"\';\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy);
@@ -5819,7 +5819,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" return \'\\'\';\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy);
@@ -5851,7 +5851,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" return \'\\\\\';\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy);
@@ -5883,7 +5883,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" return \'\\077\';\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy);
@@ -5915,7 +5915,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" return \'\\777\';\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -5937,7 +5937,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=82985
*/
public void test0595() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0595", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0595", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
@@ -5968,7 +5968,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" }\n" +
" }\n" +
"}\n";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy);
@@ -6020,7 +6020,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=83210
*/
public void test0597() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0597", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0597", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode node = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(node);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
@@ -6065,7 +6065,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" return /*start*/1 + 2 + ++i/*end*/;\n" +
" }\n" +
"}\n";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy);
@@ -6081,7 +6081,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=86541
*/
public void test0599() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0599", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0599", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode node = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(node);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
@@ -6103,7 +6103,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=87777
*/
public void test0600() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0600", "Try.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0600", "Try.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode node = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(node);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
@@ -6117,7 +6117,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
MethodInvocation methodInvocation = (MethodInvocation) expression;
IMethodBinding methodBinding = methodInvocation.resolveMethodBinding().getMethodDeclaration();
- sourceUnit = getCompilationUnit("Converter" , "src", "test0600", "C.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ sourceUnit = getCompilationUnit("Converter" , "src", "test0600", "C.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
node = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(node);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
@@ -6148,7 +6148,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" }\n" +
" };\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy);
@@ -6202,7 +6202,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=70526
*/
public void test0602() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0602", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0602", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode node = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(node);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
@@ -6221,7 +6221,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=91098
*/
public void test0603() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0603", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0603", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode node = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(node);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
@@ -6246,7 +6246,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=91098
*/
public void test0604() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0604", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0604", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode node = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(node);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
@@ -6272,7 +6272,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* check resolvedType binding from variable ref (of array type)
*/
public void test0605() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0605", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0605", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode node = runJLS3Conversion(sourceUnit, true, false);
assertNotNull(node);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
@@ -6345,7 +6345,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" System.out.println(i+s);\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy);
@@ -6403,7 +6403,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" }\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy);
@@ -6432,7 +6432,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" System.out.println(i);\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy);
@@ -6452,7 +6452,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=98088
*/
public void test0610() throws JavaModelException {
- final ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0610", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ final ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0610", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
final ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -6480,7 +6480,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" System.out.println(declarationLevel);\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy);
@@ -6509,7 +6509,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" void foo(boolean[]value) {\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy);
@@ -6550,7 +6550,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" }\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -6603,7 +6603,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
try {
String contents =
"class T { void m() { for (i=0, j=0; i<10; i++, j++) ; }}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", false/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", false/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -6638,7 +6638,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" }\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy);
@@ -6682,7 +6682,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
"class X {\n" +
" boolean val = true && false && true && false && true;\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy);
@@ -6718,7 +6718,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
"class X {\n" +
" boolean val = true || false || true || false || true;\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy);
@@ -6754,7 +6754,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
"public class X {\n" +
" String f = \"\" + \"\" - 1;\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", false/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", false/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -6793,7 +6793,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=109646
*/
public void test0619() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0619", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0619", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
final CompilationUnit unit = (CompilationUnit) result;
@@ -6840,7 +6840,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" System.out.println((int) \'\\377\');\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", false/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", false/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -6906,7 +6906,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" }\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", false/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", false/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -6946,7 +6946,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" System.out.println((int) \'\\040\');\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", false/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", false/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -6992,7 +6992,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" }\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -7031,7 +7031,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
try {
String contents =
"public class X extend {}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -7068,7 +7068,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" public void foo(int arg) {}\n" + //$NON-NLS-1$
"}").toCharArray(); //$NON-NLS-1$
IJavaProject project = getJavaProject("Converter"); //$NON-NLS-1$
- ASTNode result = runConversion(AST.JLS3, source, "Test.java", project); //$NON-NLS-1$
+ ASTNode result = runConversion(AST.JLS3, source, "Test.js", project); //$NON-NLS-1$
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7090,7 +7090,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" public void foo(int arg) {}\n" + //$NON-NLS-1$
"}").toCharArray(); //$NON-NLS-1$
IJavaProject project = getJavaProject("Converter"); //$NON-NLS-1$
- ASTNode result = runConversion(AST.JLS3, source, "Object.java", project); //$NON-NLS-1$
+ ASTNode result = runConversion(AST.JLS3, source, "Object.js", project); //$NON-NLS-1$
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7118,7 +7118,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" void xx() {}\n" +
" };\n" + " }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -7184,7 +7184,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=126598
*/
public void test0629() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0629", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0629", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true, true);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
@@ -7204,7 +7204,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=126598
*/
public void test0630() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0630", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0630", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true, true);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7216,7 +7216,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=126598
*/
public void test0631() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0631", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0631", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(AST.JLS3, sourceUnit, true, true);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
@@ -7250,7 +7250,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" }\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -7343,7 +7343,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" void foo(Object tab[]) {\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -7377,7 +7377,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" void foo(java.lang.Object tab[]) {\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -7414,7 +7414,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" }\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -7451,7 +7451,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
"public class X {\n" +
" int i = (1);\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -7487,7 +7487,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" }\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -7530,7 +7530,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" Object loc = null;\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -7574,7 +7574,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
ICompilationUnit workingCopy = null;
try {
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
String contents =
"public class X {\n" +
" /*start*/Integer/*end*/ field;\n" +
@@ -7599,7 +7599,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" p.x;\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -7634,7 +7634,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" a[0];\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -7669,7 +7669,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" int x =;\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -7706,7 +7706,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" Object.equ;\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -7759,7 +7759,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" };\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -7790,7 +7790,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" };\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -7823,7 +7823,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" int i = a[0];\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -7859,7 +7859,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" int i = a[0\\u005D;\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -7895,7 +7895,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" int[] i = new int[0];\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -7931,7 +7931,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" int[] i = new int[0\\u005D;\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -7982,7 +7982,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" return null;\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -8002,7 +8002,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* TODO (olivier) renable if the bindings are available
*/
public void _test0653() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0653", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0653", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType());
CompilationUnit unit = (CompilationUnit) result;
@@ -8040,7 +8040,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" return null;\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -8192,8 +8192,8 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
// http://dev.eclipse.org/bugs/show_bug.cgi?id=160198
public void test0657() throws JavaModelException {
- ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0657", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ICompilationUnit sourceUnit2 = getCompilationUnit("Converter" , "src", "test0657", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0657", "X.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ICompilationUnit sourceUnit2 = getCompilationUnit("Converter" , "src", "test0657", "A.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
class TestASTRequestor extends ASTRequestor {
public ArrayList asts = new ArrayList();
public void acceptAST(ICompilationUnit source, CompilationUnit compilationUnit) {
@@ -8277,7 +8277,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
parser.setSource(source.toCharArray());
parser.setProject(javaProject);
parser.setResolveBindings(true);
- parser.setUnitName("Object.java");
+ parser.setUnitName("Object.js");
ASTNode result = parser.createAST (null);
assertNotNull("no result", result);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType());
@@ -8315,7 +8315,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" x.toString();\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -8371,7 +8371,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" }\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -8426,7 +8426,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" }\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -8492,7 +8492,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" }\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -8568,7 +8568,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" }\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
@@ -8633,7 +8633,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" l.foo();\n" +
" }\n" +
"}";
- workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+ workingCopy = getWorkingCopy("/Converter/src/X.js", true/*resolve*/);
ASTNode node = buildAST(
contents,
workingCopy,
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTModelBridgeTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTModelBridgeTests.java
index f7bf522..a5688f0 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTModelBridgeTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTModelBridgeTests.java
@@ -91,13 +91,13 @@ public class ASTModelBridgeTests extends AbstractASTTests {
"lib.jar",
"libsrc.zip",
new String[] {
- "p/Y.java",
+ "p/Y.js",
"package p;\n" +
"public class Y<T> {\n" +
" public Y(T t) {\n" +
" }\n" +
"}",
- "p/Z.java",
+ "p/Z.js",
"package p;\n" +
"public class Z {\n" +
" /*start*/class Member {\n" +
@@ -106,7 +106,7 @@ public class ASTModelBridgeTests extends AbstractASTTests {
" new Member() {};\n" +
" }\n" +
"}",
- "p/W.java",
+ "p/W.js",
"package p;\n" +
"public class W {\n" +
" class Member {\n" +
@@ -114,11 +114,11 @@ public class ASTModelBridgeTests extends AbstractASTTests {
" }/*end*/\n" +
" }\n" +
"}",
- "p/ABC.java",
+ "p/ABC.js",
"package p;\n" +
"public class ABC {\n" +
"}",
- "Z.java",
+ "Z.js",
"public class Z {\n" +
" /*start*/class Member {\n" +
" }/*end*/\n" +
@@ -128,7 +128,7 @@ public class ASTModelBridgeTests extends AbstractASTTests {
"}"
},
"1.5");
- this.workingCopy = getCompilationUnit("/P/src/X.java").getWorkingCopy(
+ this.workingCopy = getCompilationUnit("/P/src/X.js").getWorkingCopy(
new WorkingCopyOwner() {},
new IProblemRequestor() {
public void acceptProblem(IProblem problem) {}
@@ -320,7 +320,7 @@ public class ASTModelBridgeTests extends AbstractASTTests {
//search for references to p.ABC after adding references in exactly 1 file
try {
createFile(
- "/P/src/Test.java",
+ "/P/src/Test.js",
"import p.ABC;\n" +
"public class Test extends ABC {\n" +
"}"
@@ -328,7 +328,7 @@ public class ASTModelBridgeTests extends AbstractASTTests {
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {getPackageFragmentRoot("/P/src")});
search(classFile.getType(), IJavaSearchConstants.REFERENCES, scope, new AbstractJavaSearchTests.JavaSearchResultCollector());
} finally {
- deleteFile("/P/src/Test.java");
+ deleteFile("/P/src/Test.js");
}
String source = classFile.getSource();
@@ -363,12 +363,12 @@ public class ASTModelBridgeTests extends AbstractASTTests {
createJavaProject("P1", new String[] {""}, new String[] {"JCL15_LIB"}, "", "1.5");
createFile(
- "/P1/X.java",
+ "/P1/X.js",
"public class X {\n" +
" /*start*/String/*end*/ field;\n" +
"}"
);
- ASTNode node = buildAST(getCompilationUnit("/P1/X.java"));
+ ASTNode node = buildAST(getCompilationUnit("/P1/X.js"));
IBinding binding = ((Type) node).resolveBinding();
IJavaElement element = binding.getJavaElement();
assertElementEquals(
@@ -438,14 +438,14 @@ public class ASTModelBridgeTests extends AbstractASTTests {
WorkingCopyOwner owner = new WorkingCopyOwner() {};
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" public void foo(int i, String s) {\n" +
" }\n" +
"}",
owner, false);
this.workingCopies[1] = getWorkingCopy(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y extends X {\n" +
" void bar() {\n" +
" new Y() {};\n" +
@@ -453,7 +453,7 @@ public class ASTModelBridgeTests extends AbstractASTTests {
"}",
owner, false);
this.workingCopies[2] = getWorkingCopy(
- "/P/src/I.java",
+ "/P/src/I.js",
"public interface I {\n" +
" int BAR;\n" +
"}",
@@ -828,7 +828,7 @@ public class ASTModelBridgeTests extends AbstractASTTests {
* and coming from a binding key resolution is correct.
*/
public void testLocalType2() throws CoreException {
- String filePath = "/P/src/Z.java";
+ String filePath = "/P/src/Z.js";
try {
String contents =
"public class Z {\n" +
@@ -1008,7 +1008,7 @@ public class ASTModelBridgeTests extends AbstractASTTests {
ICompilationUnit otherWorkingCopy = null;
try {
otherWorkingCopy = getWorkingCopy(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
" void foo(int i, String[] args, java.lang.Class clazz) {}\n" +
"}",
@@ -1194,7 +1194,7 @@ public class ASTModelBridgeTests extends AbstractASTTests {
try {
// use a compilation unit instead of a working copy to use the ASTParser instead of reconcile
createFile(
- "/P/src/Test.java",
+ "/P/src/Test.js",
"public class X {\n" +
" void test() {\n" +
" new Object() {\n" +
@@ -1205,7 +1205,7 @@ public class ASTModelBridgeTests extends AbstractASTTests {
" }\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("/P/src/Test.java");
+ ICompilationUnit cu = getCompilationUnit("/P/src/Test.js");
ASTNode node = buildAST(null/*use existing contents*/, cu, false/*don't report errors*/, true/*statement recovery*/);
IBinding binding = ((MethodDeclaration) node).resolveBinding();
@@ -1218,7 +1218,7 @@ public class ASTModelBridgeTests extends AbstractASTTests {
);
assertTrue("Element should exist", element.exists());
} finally {
- deleteFile("/P/src/Test.java");
+ deleteFile("/P/src/Test.js");
}
}
@@ -1354,7 +1354,7 @@ public class ASTModelBridgeTests extends AbstractASTTests {
public void testTopLevelType2() throws CoreException {
try {
createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
"}"
);
@@ -1372,7 +1372,7 @@ public class ASTModelBridgeTests extends AbstractASTTests {
);
assertTrue("Element should exist", element.exists());
} finally {
- deleteFile("/P/src/Y.java");
+ deleteFile("/P/src/Y.js");
}
}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTParserTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTParserTest.java
index f397a57..946c2c4 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTParserTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTParserTest.java
@@ -103,7 +103,7 @@ public class ASTParserTest extends org.eclipse.wst.jsdt.core.tests.junit.extensi
parser.setWorkingCopyOwner(null);
parser.setUnitName(null);
- parser.setUnitName("Foo.java"); //$NON-NLS-1$
+ parser.setUnitName("Foo.js"); //$NON-NLS-1$
parser.setProject(null);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTPositionsTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTPositionsTest.java
index 70e485f..90fb2f1 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTPositionsTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTPositionsTest.java
@@ -64,7 +64,7 @@ public class ASTPositionsTest extends ConverterTestSetup {
}
public void test001() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
final String contents =
"import java.util.Map;\r\n" +
"public class X {\r\n" +
@@ -89,7 +89,7 @@ public class ASTPositionsTest extends ConverterTestSetup {
}
public void test002() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
final String contents =
"import java.util.Map;\n" +
"public class X {\n" +
@@ -105,7 +105,7 @@ public class ASTPositionsTest extends ConverterTestSetup {
}
public void test003() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
final String contents =
"import java.util.Map;\r" +
"public class X {\r" +
@@ -121,7 +121,7 @@ public class ASTPositionsTest extends ConverterTestSetup {
}
public void test004() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"package pack1;\npublic class X {}";
ASTNode node = buildAST(
@@ -135,7 +135,7 @@ public class ASTPositionsTest extends ConverterTestSetup {
}
public void test005() throws JavaModelException {
- this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+ this.workingCopy = getWorkingCopy("/Converter15/src/X.js", true/*resolve*/);
String contents =
"package pack1;public class X {}";
ASTNode node = buildAST(
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/BatchASTCreationTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/BatchASTCreationTests.java
index 143aa90..8878e54 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/BatchASTCreationTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/BatchASTCreationTests.java
@@ -180,7 +180,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
ICompilationUnit[] dummyWorkingCopies = null;
try {
dummyWorkingCopies = createWorkingCopies(new String[] {
- "/P/Test.java",
+ "/P/Test.js",
"public class Test {\n" +
"}"
});
@@ -251,11 +251,11 @@ public class BatchASTCreationTests extends AbstractASTTests {
*/
public void test001() throws CoreException {
this.workingCopies = createWorkingCopies(new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X extends Y {\n" +
"}",
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"public class Y {\n" +
"}",
@@ -280,11 +280,11 @@ public class BatchASTCreationTests extends AbstractASTTests {
*/
public void test002() throws CoreException {
MarkerInfo[] markerInfos = createMarkerInfos(new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X extends /*start*/Y/*end*/ {\n" +
"}",
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"/*start*/public class Y {\n" +
"}/*end*/",
@@ -320,13 +320,13 @@ public class BatchASTCreationTests extends AbstractASTTests {
ICompilationUnit[] otherWorkingCopies = null;
try {
this.workingCopies = createWorkingCopies(new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X extends Y {\n" +
"}",
});
otherWorkingCopies = createWorkingCopies(new String[] {
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"public class Y {\n" +
"}",
@@ -353,7 +353,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test004() throws CoreException {
assertRequestedBindingFound(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"/*start*/package p1;/*end*/\n" +
"public class X {\n" +
"}",
@@ -367,11 +367,11 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test005() throws CoreException {
assertRequestedBindingFound(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"/*start*/public class X extends Y {\n" +
"}/*end*/",
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"public class Y {\n" +
"}",
@@ -385,11 +385,11 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test006() throws CoreException {
assertRequestedBindingFound(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X extends Y {\n" +
"}",
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"/*start*/public class Y {\n" +
"}/*end*/",
@@ -403,7 +403,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test007() throws CoreException {
assertRequestedBindingFound(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" /*start*/class Member {\n" +
@@ -419,7 +419,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test008() throws CoreException {
assertRequestedBindingFound(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" class Member1 {\n" +
@@ -436,7 +436,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test009() throws CoreException {
assertRequestedBindingFound(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" void foo() {\n" +
@@ -453,7 +453,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test010() throws CoreException {
assertRequestedBindingFound(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" void foo() {\n" +
@@ -471,7 +471,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test011() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}",
@@ -485,11 +485,11 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test012() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X extends Y {\n" +
"}",
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"public class Y {\n" +
"}",
@@ -503,11 +503,11 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test013() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X extends Y {\n" +
"}",
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"public class Y {\n" +
"}",
@@ -521,7 +521,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test014() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" class Member {\n" +
@@ -537,7 +537,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test015() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" class Member1 {\n" +
@@ -555,7 +555,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test016() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" void foo() {\n" +
@@ -573,7 +573,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test017() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" void foo() {\n" +
@@ -591,7 +591,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test018() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" void foo() {\n" +
@@ -607,7 +607,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test019() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" void foo(Object o) {\n" +
@@ -623,7 +623,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test020() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" X(Object o) {\n" +
@@ -639,7 +639,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test021() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" int field;\n" +
@@ -661,7 +661,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test023() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}",
@@ -682,7 +682,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test025() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" class Y {\n" +
@@ -705,7 +705,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test026() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X<T> {\n" +
"}",
@@ -719,15 +719,15 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test027() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X<T extends Y & I, U extends Y> {\n" +
"}",
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"public class Y {\n" +
"}",
- "/P/p1/I.java",
+ "/P/p1/I.js",
"package p1;\n" +
"public interface I {\n" +
"}",
@@ -741,7 +741,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test028() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X<T> {\n" +
" X<String> field;\n" +
@@ -756,7 +756,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test029() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X<T,U> {\n" +
" class Y<V> {\n" +
@@ -773,7 +773,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test030() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X<T,U> {\n" +
" X field;\n" +
@@ -788,7 +788,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test031() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X<T,U> {\n" +
" class Y<V> {\n" +
@@ -805,7 +805,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test032() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" <T> void foo() {\n" +
@@ -821,7 +821,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test033() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" void foo() {\n" +
@@ -838,7 +838,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test034() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" void foo() {\n" +
@@ -860,7 +860,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test035() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X<T> {\n" +
" void foo(T t) {\n" +
@@ -879,7 +879,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test036() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X<T> {\n" +
" <U> void foo(T t, U u) {\n" +
@@ -899,7 +899,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test037() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X<T> {\n" +
" <U> void foo(T t, U u) {\n" +
@@ -918,7 +918,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test038() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X<T> {\n" +
" void foo() {\n" +
@@ -937,7 +937,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test039() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X<T> {\n" +
" void foo() {\n" +
@@ -956,7 +956,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test040() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X<T> {\n" +
" void foo() {\n" +
@@ -975,7 +975,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test041() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X<T, U, V, W> {\n" +
" void foo() {\n" +
@@ -995,7 +995,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
ICompilationUnit workingCopy = null;
try {
workingCopy = getWorkingCopy(
- "/P/X.java",
+ "/P/X.js",
"public class X {\n" +
" int field;\n" +
"}"
@@ -1029,7 +1029,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test043() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X<T> {\n" +
" X<? super T> field;\n" +
@@ -1045,7 +1045,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test044() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X<E> {\n" +
" Class<? extends E> field;\n" +
@@ -1061,11 +1061,11 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test045() throws CoreException {
ITypeBinding[] bindings = createTypeBindings(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}",
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"public class Y<E> {\n" +
"}"
@@ -1158,7 +1158,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
try {
createFolder("/P/p1");
createFile(
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}\n" +
@@ -1178,7 +1178,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
try {
createFolder("/P/p1");
createFile(
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}\n" +
@@ -1200,7 +1200,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test054() throws CoreException {
assertRequestedBindingFound(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" void foo() {\n" +
@@ -1223,7 +1223,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test055() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X<T> {\n" +
" <U> void foo(U u) {\n" +
@@ -1245,7 +1245,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
try {
IJavaProject project = createJavaProject("BinaryProject", new String[0], new String[] {"JCL15_LIB"}, "", "1.5");
addLibrary(project, "lib.jar", "src.zip", new String[] {
- "/BinaryProject/p/X.java",
+ "/BinaryProject/p/X.js",
"package p;\n" +
"public class X<K, V> {\n" +
" public class Y<K1, V1> {\n" +
@@ -1283,7 +1283,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test058() throws CoreException {
assertRequestedBindingFound(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" </*start*/T/*end*/> void foo(T t) {\n" +
@@ -1299,7 +1299,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test059() throws CoreException {
assertRequestedBindingFound(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X<T> {\n" +
" Object foo(X<?> list) {\n" +
@@ -1320,7 +1320,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test060() throws CoreException {
assertRequestedBindingFound(
new String[] {
- "/P/xy/Cap.java",
+ "/P/xy/Cap.js",
"package xy;\n" +
"import java.util.Vector;\n" +
"public class Cap {\n" +
@@ -1329,7 +1329,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
" /*start*/v.get(0)/*end*/;\n" +
" }\n" +
"}",
- "/P/java/util/Vector.java",
+ "/P/java/util/Vector.js",
"package java.util;\n" +
"public class Vector<T> {\n" +
" public T get(int i) {\n" +
@@ -1347,7 +1347,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test061() throws CoreException {
assertRequestedBindingFound(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" /*start*/<T> X() {\n" +
@@ -1365,7 +1365,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test062() throws CoreException {
assertRequestedBindingFound(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" <T> /*start*/T[]/*end*/ foo(T[] a) {\n" +
@@ -1384,7 +1384,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test063() throws CoreException {
assertRequestedBindingFound(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" public static <T extends Y<? super T>> void foo(Z<T> z) {\n" +
@@ -1414,7 +1414,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test064() throws CoreException {
assertRequestedBindingsFound(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"/*start1*/public class X {\n" +
" Object o= null;\n" +
@@ -1423,7 +1423,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
" /*start2*/o = field/*end2*/;\n" +
" }\n" +
"}/*end1*/\n",
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"public class Y<T> {\n" +
"}",
@@ -1442,7 +1442,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test065() throws CoreException {
assertRequestedBindingFound(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" <T> void foo(/*start*/Y<T>/*end*/ y) {\n" +
@@ -1464,7 +1464,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
ICompilationUnit ownedWorkingcopy = null;
try {
// primary working copy with no method foo()
- primaryWorkingCopy = getCompilationUnit("/P/p1/X.java");
+ primaryWorkingCopy = getCompilationUnit("/P/p1/X.js");
primaryWorkingCopy.becomeWorkingCopy(null/*no pb requestor*/, null/*no progress*/);
primaryWorkingCopy.getBuffer().setContents(
"package p1;\n" +
@@ -1475,7 +1475,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
// working copy for the test's owner with a method foo()
ownedWorkingcopy = getWorkingCopy(
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" void foo() {}\n" +
@@ -1487,7 +1487,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
// create bindings
assertRequestedBindingFound(
new String[] {
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"public class Y {\n" +
" void bar() {\n" +
@@ -1510,7 +1510,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void test067() throws CoreException {
ITypeBinding[] bindings = createTypeBindings(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X<K, V> {\n" +
" public class Y<K1, V1> {\n" +
@@ -1533,13 +1533,13 @@ public class BatchASTCreationTests extends AbstractASTTests {
try {
IJavaProject project = createJavaProject("P1", new String[] {""}, new String[] {"JCL15_LIB"}, "", "1.5");
addLibrary(project, "lib.jar", "src.zip", new String[] {
- "/P1/p/X.java",
+ "/P1/p/X.js",
"package p;\n" +
"public class X<K, V> {\n" +
" public static class Member<K1, V1> {\n" +
" }\n" +
"}",
- "/P1/p/Y.java",
+ "/P1/p/Y.js",
"package p;\n" +
"public class Y {\n" +
" void foo(X.Member x) {\n" +
@@ -1548,7 +1548,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
}, "1.5");
assertRequestedBindingFound(
new String[] {
- "/P1/p1/Z.java",
+ "/P1/p1/Z.js",
"package p1;\n" +
"public class Z extends p.Y {\n" +
" /*start*/p.X.Member/*end*/ field;\n" +
@@ -1567,13 +1567,13 @@ public class BatchASTCreationTests extends AbstractASTTests {
*/
public void test069() throws CoreException {
this.workingCopies = createWorkingCopies(new String[] {
- "/P/pkg/RefAnnoAndClassWithAnno.java",
+ "/P/pkg/RefAnnoAndClassWithAnno.js",
"package pkg;\n" +
"public class RefMyAnnoAndClassWithAnno {\n" +
" final Class anno = MyAnno.class;\n" +
" final Class withAnno = ClassWithAnnotation.class;\n" +
"}",
- "/P/pkg/MyAnno.java",
+ "/P/pkg/MyAnno.js",
"package pkg;\n" +
"public @interface MyAnno {\n" +
" public enum EnumColor{\n" +
@@ -1581,7 +1581,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
" }\n" +
" EnumColor aEnum();\n" +
"}",
- "/P/pkg/ClassWithAnnotation.java",
+ "/P/pkg/ClassWithAnnotation.js",
"package pkg;\n" +
"import pkg.MyAnno.EnumColor;\n" +
"@MyAnno(aEnum = EnumColor.BLUE)\n" +
@@ -1602,11 +1602,11 @@ public class BatchASTCreationTests extends AbstractASTTests {
*/
public void test070() throws CoreException {
MarkerInfo[] markerInfos = createMarkerInfos(new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X extends /*start*/Y/*end*/ {\n" +
"}",
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"public class Y {\n" +
" static final int CONST = 2 + 3;\n" +
@@ -1630,11 +1630,11 @@ public class BatchASTCreationTests extends AbstractASTTests {
*/
public void test071() throws CoreException {
final MarkerInfo[] markerInfos = createMarkerInfos(new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X extends /*start*/Y/*end*/ {\n" +
"}",
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"public class Y {\n" +
" static final int CONST = 2 + 3;\n" +
@@ -1665,7 +1665,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
public void _test072() throws CoreException {
IVariableBinding[] bindings = createVariableBindings(
new String[] {
- "/P/X.java",
+ "/P/X.js",
"public class X {\n" +
" void m() {\n" +
" Object o;\n" +
@@ -1687,7 +1687,7 @@ public void test073() throws CoreException, IOException {
IJavaProject project = createJavaProject("P072", new String[] {}, Util.getJavaClassLibs(), "", "1.5");
ICompilationUnit compilationUnits[] = new ICompilationUnit[3];
compilationUnits[0] = getWorkingCopy(
- "P072/X.java",
+ "P072/X.js",
"public class X {\n" +
" @Override" +
" public boolean equals(Object o) {\n" +
@@ -1695,11 +1695,11 @@ public void test073() throws CoreException, IOException {
" }\n" +
"}");
compilationUnits[1] = getWorkingCopy(
- "P072/Y.java",
+ "P072/Y.js",
"public class Y extends X {\n" +
"}");
compilationUnits[2] = getWorkingCopy(
- "P072/Z.java",
+ "P072/Z.js",
"public class Z {\n" +
" Y m;\n" +
" boolean foo(Object p) {\n" +
@@ -1726,7 +1726,7 @@ public void test073() throws CoreException, IOException {
public void test074_Bug155003() throws CoreException {
assertBindingCreated(
new String[] {
- "/P/X.java",
+ "/P/X.js",
"public class X {\n" +
" public void foo() throws InterruptedException, IllegalMonitorStateException {\n" +
" }\n" +
@@ -1744,7 +1744,7 @@ public void test074_Bug155003() throws CoreException {
" /*start*/foo()/*end*/;\n" +
" }\n" +
"}";
- this.workingCopies = createWorkingCopies(new String[] { "/P/X.java", content }, true /*resolve*/);
+ this.workingCopies = createWorkingCopies(new String[] { "/P/X.js", content }, true /*resolve*/);
ASTNode node = buildAST(content, this.workingCopies[0]);
assertEquals("Invalid node type!", ASTNode.METHOD_INVOCATION, node.getNodeType());
IBinding binding = resolveBinding(node);
@@ -1764,7 +1764,7 @@ public void test075_Bug155003() throws CoreException {
" /*start*/foo(this)/*end*/;\n" +
" }\n" +
"}";
- this.workingCopies = createWorkingCopies(new String[] { "/P/X.java", content }, true /*resolve*/);
+ this.workingCopies = createWorkingCopies(new String[] { "/P/X.js", content }, true /*resolve*/);
ASTNode node = buildAST(content, this.workingCopies[0]);
assertEquals("Invalid node type!", ASTNode.METHOD_INVOCATION, node.getNodeType());
IBinding binding = resolveBinding(node);
@@ -1784,7 +1784,7 @@ public void test076_Bug155003() throws CoreException {
" /*start*/bar(\"\", \"\")/*end*/;\n" +
" }\n" +
"}";
- this.workingCopies = createWorkingCopies(new String[] { "/P/X.java", content }, true /*resolve*/);
+ this.workingCopies = createWorkingCopies(new String[] { "/P/X.js", content }, true /*resolve*/);
ASTNode node = buildAST(content, this.workingCopies[0]);
assertEquals("Invalid node type!", ASTNode.METHOD_INVOCATION, node.getNodeType());
IBinding binding = resolveBinding(node);
@@ -1816,7 +1816,7 @@ public void test077_Bug163647() throws CoreException {
" public void foo() throws CloneNotSupportedException, IllegalMonitorStateException, InterruptedException {\n" +
" }\n" +
"}";
- this.workingCopies = createWorkingCopies(new String[] { "/P/Test.java", content }, true /*resolve*/);
+ this.workingCopies = createWorkingCopies(new String[] { "/P/Test.js", content }, true /*resolve*/);
ASTNode node = buildAST(content, this.workingCopies[0]);
assertEquals("Invalid node type!", ASTNode.METHOD_INVOCATION, node.getNodeType());
IBinding binding = resolveBinding(node);
@@ -1834,7 +1834,7 @@ public void test078() throws CoreException, IOException {
IJavaProject project = createJavaProject("P078", new String[] {}, Util.getJavaClassLibs(), "", "1.5");
ICompilationUnit compilationUnits[] = new ICompilationUnit[1];
compilationUnits[0] = getWorkingCopy(
- "P078/Test.java",
+ "P078/Test.js",
"import java.util.*;\n" +
"public class Test {\n" +
" public interface ExtraIterator<T> extends Iterator {\n" +
@@ -1889,7 +1889,7 @@ public void test079() throws CoreException, IOException {
try {
IJavaProject project = createJavaProject("P079", new String[] {"src"}, Util.getJavaClassLibs(), "bin", "1.5");
createFolder("/P079/src/test");
- createFile("/P079/src/test/Test.java",
+ createFile("/P079/src/test/Test.js",
"package test;\n" +
"import java.util.*;\n" +
"interface ExtraIterator<T> extends Iterator {\n" +
@@ -1908,7 +1908,7 @@ public void test079() throws CoreException, IOException {
" }\n" +
"}");
ICompilationUnit compilationUnits[] = new ICompilationUnit[1];
- compilationUnits[0] = getCompilationUnit("P079", "src", "test", "Test.java");
+ compilationUnits[0] = getCompilationUnit("P079", "src", "test", "Test.js");
ASTParser parser = ASTParser.newParser(AST.JLS3);
parser.setResolveBindings(true);
parser.setProject(project);
@@ -1945,7 +1945,7 @@ public void test080() throws CoreException, IOException {
try {
IJavaProject project = createJavaProject(projectName, new String[] {"src"}, Util.getJavaClassLibs(), "bin", "1.5");
createFolder("/" + projectName + "/src/test");
- createFile("/" + projectName + "/src/test/Test.java",
+ createFile("/" + projectName + "/src/test/Test.js",
"package test;\n" +
"import java.util.*;\n" +
"public class Test {\n" +
@@ -1966,7 +1966,7 @@ public void test080() throws CoreException, IOException {
" }\n" +
"}");
ICompilationUnit compilationUnits[] = new ICompilationUnit[1];
- compilationUnits[0] = getCompilationUnit(projectName, "src", "test", "Test.java");
+ compilationUnits[0] = getCompilationUnit(projectName, "src", "test", "Test.js");
ASTParser parser = ASTParser.newParser(AST.JLS3);
parser.setResolveBindings(true);
parser.setProject(project);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/CompatibilityRulesTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/CompatibilityRulesTests.java
index 10834fe..3dac291 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/CompatibilityRulesTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/CompatibilityRulesTests.java
@@ -56,11 +56,11 @@ public class CompatibilityRulesTests extends AbstractASTTests {
public void test001() throws JavaModelException {
ITypeBinding[] bindings = createTypeBindings(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}",
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"public class Y extends X {\n" +
"}",
@@ -78,7 +78,7 @@ public class CompatibilityRulesTests extends AbstractASTTests {
public void test002() throws JavaModelException {
ITypeBinding[] bindings = createTypeBindings(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}",
@@ -95,11 +95,11 @@ public class CompatibilityRulesTests extends AbstractASTTests {
public void test003() throws JavaModelException {
ITypeBinding[] bindings = createTypeBindings(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}",
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"public class Y extends X {\n" +
"}",
@@ -117,11 +117,11 @@ public class CompatibilityRulesTests extends AbstractASTTests {
public void test004() throws JavaModelException {
ITypeBinding[] bindings = createTypeBindings(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}",
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"public class Y {\n" +
"}",
@@ -165,11 +165,11 @@ public class CompatibilityRulesTests extends AbstractASTTests {
public void test007() throws JavaModelException {
ITypeBinding[] bindings = createTypeBindings(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}",
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"public class Y extends X {\n" +
"}",
@@ -187,7 +187,7 @@ public class CompatibilityRulesTests extends AbstractASTTests {
public void test008() throws JavaModelException {
ITypeBinding[] bindings = createTypeBindings(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}",
@@ -204,11 +204,11 @@ public class CompatibilityRulesTests extends AbstractASTTests {
public void test009() throws JavaModelException {
ITypeBinding[] bindings = createTypeBindings(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}",
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"public class Y extends X {\n" +
"}",
@@ -226,11 +226,11 @@ public class CompatibilityRulesTests extends AbstractASTTests {
public void test010() throws JavaModelException {
ITypeBinding[] bindings = createTypeBindings(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}",
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"public class Y {\n" +
"}",
@@ -280,11 +280,11 @@ public class CompatibilityRulesTests extends AbstractASTTests {
public void test013() throws JavaModelException {
ITypeBinding[] bindings = createTypeBindings(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}",
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"public class Y extends X {\n" +
"}",
@@ -302,7 +302,7 @@ public class CompatibilityRulesTests extends AbstractASTTests {
public void test014() throws JavaModelException {
ITypeBinding[] bindings = createTypeBindings(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}",
@@ -319,11 +319,11 @@ public class CompatibilityRulesTests extends AbstractASTTests {
public void test015() throws JavaModelException {
ITypeBinding[] bindings = createTypeBindings(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}",
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"public class Y extends X {\n" +
"}",
@@ -341,11 +341,11 @@ public class CompatibilityRulesTests extends AbstractASTTests {
public void test016() throws JavaModelException {
ITypeBinding[] bindings = createTypeBindings(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}",
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"public class Y {\n" +
"}",
@@ -389,13 +389,13 @@ public class CompatibilityRulesTests extends AbstractASTTests {
public void test019() throws JavaModelException {
IMethodBinding[] bindings = createMethodBindings(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" void foo() {\n" +
" }\n" +
"}",
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"public class Y extends X {\n" +
" void foo() {\n" +
@@ -415,13 +415,13 @@ public class CompatibilityRulesTests extends AbstractASTTests {
public void test020() throws JavaModelException {
IMethodBinding[] bindings = createMethodBindings(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" void foo() {\n" +
" }\n" +
"}",
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"public class Y extends X {\n" +
" void foo() {\n" +
@@ -441,13 +441,13 @@ public class CompatibilityRulesTests extends AbstractASTTests {
public void test021() throws JavaModelException {
IMethodBinding[] bindings = createMethodBindings(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" void foo() {\n" +
" }\n" +
"}",
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"public class Y {\n" +
" void foo() {\n" +
@@ -469,7 +469,7 @@ public class CompatibilityRulesTests extends AbstractASTTests {
public void test022() throws JavaModelException {
ICompilationUnit workingCopy = null;
try {
- workingCopy = getWorkingCopy("/P/p1/X.java", true/*compute problems to get bindings*/);
+ workingCopy = getWorkingCopy("/P/p1/X.js", true/*compute problems to get bindings*/);
ASTNode node = buildAST(
"package p1;\n" +
"public class X {\n" +
@@ -492,7 +492,7 @@ public class CompatibilityRulesTests extends AbstractASTTests {
public void test023() throws JavaModelException {
ITypeBinding[] bindings = createTypeBindings(
new String[] {
- "/P/java/lang/Integer.java",
+ "/P/java/lang/Integer.js",
"package java.lang;\n" +
"public class Integer {\n" +
"}",
@@ -523,7 +523,7 @@ public class CompatibilityRulesTests extends AbstractASTTests {
public void test025() throws JavaModelException {
IMethodBinding[] bindings = createMethodBindings(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" void foo() {\n" +
@@ -542,13 +542,13 @@ public class CompatibilityRulesTests extends AbstractASTTests {
public void test026() throws JavaModelException {
IMethodBinding[] bindings = createMethodBindings(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" String foo(Object o) {\n" +
" }\n" +
"}",
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"public class Y extends X {\n" +
" String foo(Object o) {\n" +
@@ -568,19 +568,19 @@ public class CompatibilityRulesTests extends AbstractASTTests {
public void test027() throws JavaModelException {
IMethodBinding[] bindings = createMethodBindings(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X<T> {\n" +
" Z<T> foo(Z<T> o) {\n" +
" }\n" +
"}",
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"public class Y extends X {\n" +
" Z foo(Z o) {\n" +
" }\n" +
"}",
- "/P/p1/Z.java",
+ "/P/p1/Z.js",
"package p1;\n" +
"public class Z<T> {\n" +
"}",
@@ -598,13 +598,13 @@ public class CompatibilityRulesTests extends AbstractASTTests {
public void test028() throws JavaModelException {
IMethodBinding[] bindings = createMethodBindings(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" void foo() {\n" +
" }\n" +
"}",
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"public class Y {\n" +
" void bar() {\n" +
@@ -624,13 +624,13 @@ public class CompatibilityRulesTests extends AbstractASTTests {
public void test029() throws JavaModelException {
IMethodBinding[] bindings = createMethodBindings(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" void foo() {\n" +
" }\n" +
"}",
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"public class Y extends X {\n" +
" void bar() {\n" +
@@ -651,13 +651,13 @@ public class CompatibilityRulesTests extends AbstractASTTests {
public void test030() throws JavaModelException {
IMethodBinding[] bindings = createMethodBindings(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X<T> {\n" +
" void foo(T t) {\n" +
" }\n" +
"}",
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"public class Y extends X<String> {\n" +
" void foo(String s) {\n" +
@@ -678,7 +678,7 @@ public class CompatibilityRulesTests extends AbstractASTTests {
public void test031() throws JavaModelException {
IMethodBinding[] bindings = createMethodBindings(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" void foo() {\n" +
@@ -706,13 +706,13 @@ public class CompatibilityRulesTests extends AbstractASTTests {
IJavaProject project = createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, "", "1.4");
IMethodBinding[] bindings = createMethodBindings(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" Object foo() {\n" +
" }\n" +
"}",
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"public class Y extends X {\n" +
" String foo() {\n" +
@@ -737,13 +737,13 @@ public class CompatibilityRulesTests extends AbstractASTTests {
public void test033() throws JavaModelException {
IMethodBinding[] bindings = createMethodBindings(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" private void foo() {\n" +
" }\n" +
"}",
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"public class Y extends X {\n" +
" void foo() {\n" +
@@ -764,13 +764,13 @@ public class CompatibilityRulesTests extends AbstractASTTests {
public void test034() throws JavaModelException {
IMethodBinding[] bindings = createMethodBindings(
new String[] {
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" void foo() {\n" +
" }\n" +
"}",
- "/P/p2/Y.java",
+ "/P/p2/Y.js",
"package p2;\n" +
"public class Y extends p1.X {\n" +
" void foo() {\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ConverterTestSetup.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ConverterTestSetup.java
index 02f4ce9..40ff7b5 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ConverterTestSetup.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ConverterTestSetup.java
@@ -22,6 +22,7 @@ import org.eclipse.wst.jsdt.core.IJavaProject;
import org.eclipse.wst.jsdt.core.JavaCore;
import org.eclipse.wst.jsdt.core.JavaModelException;
import org.eclipse.wst.jsdt.core.compiler.IProblem;
+import org.eclipse.wst.jsdt.core.compiler.libraries.SystemLibraries;
import org.eclipse.wst.jsdt.core.dom.*;
import org.eclipse.wst.jsdt.core.tests.util.Util;
@@ -43,7 +44,8 @@ public abstract class ConverterTestSetup extends AbstractASTTests {
}
protected IPath getConverterJCLPath(String compliance) {
- return new Path(getExternalPath() + "converterJclMin" + compliance + ".jar"); //$NON-NLS-1$
+// return new Path(getExternalPath() + "converterJclMin" + compliance + ".jar"); //$NON-NLS-1$
+ return new Path(SystemLibraries.getLibraryPath("system.js"));
}
protected IPath getConverterJCLSourcePath() {
@@ -512,7 +514,7 @@ public abstract class ConverterTestSetup extends AbstractASTTests {
}
protected ASTNode getASTNode(org.eclipse.wst.jsdt.core.dom.CompilationUnit unit, int typeIndex, int bodyIndex) {
- return (ASTNode) ((AbstractTypeDeclaration)unit.types().get(typeIndex)).bodyDeclarations().get(bodyIndex);
+ return (ASTNode) unit.statements().get(bodyIndex);
}
protected ASTNode getASTNode(org.eclipse.wst.jsdt.core.dom.CompilationUnit unit, int typeIndex) {
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/formatter/FormatterRegressionTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/formatter/FormatterRegressionTests.java
index b64a5b1..8617088 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/formatter/FormatterRegressionTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/formatter/FormatterRegressionTests.java
@@ -266,101 +266,106 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
return result;
}
+ public void test000() {
+ runTest("test002", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+
public void test001() {
- runTest("test001", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test001", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test002() {
- runTest("test002", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public void test003() {
- runTest("test003", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public void test004() {
- runTest("test004", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
- }
- public void test005() {
- runTest("test005", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public void test006() {
- runTest("test006", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public void test007() {
- runTest("test007", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public void test008() {
- runTest("test008", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
- }
+ runTest("test002", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+// public void test003() {
+// runTest("test003", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
+// }
+//
+// public void test004() {
+// runTest("test004", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
+// }
+// public void test005() {
+// runTest("test005", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
+// }
+//
+// public void test006() {
+// runTest("test006", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
+// }
+//
+// public void test007() {
+// runTest("test007", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
+// }
+//
+// public void test008() {
+// runTest("test008", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
+// }
public void test009() {
- runTest("test009", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test009", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test010() {
- runTest("test010", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test010", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test011() {
- runTest("test011", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test011", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test012() {
- runTest("test012", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test012", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test013() {
- runTest("test013", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test013", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test014() {
- runTest("test014", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test014", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test015() {
- runTest("test015", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test015", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test016() {
- runTest("test016", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test016", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test017() {
- runTest("test017", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test017", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test018() {
- runTest("test018", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test018", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test019() {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test019", "A_1.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test019", "A_1.js");//$NON-NLS-1$ //$NON-NLS-2$
preferences.tab_char = DefaultCodeFormatterOptions.SPACE;
codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test019", "A_2.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test019", "A_2.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test020() {
- runTest("test020", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test020", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test021() {
- runTest("test021", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test021", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test022() {
- runTest("test022", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test022", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test023() {
- runTest("test023", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test023", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test024() {
@@ -369,23 +374,23 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.keep_then_statement_on_same_line = true;
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test024", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test024", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test025() {
- runTest("test025", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test025", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test026() {
- runTest("test026", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test026", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test027() {
- runTest("test027", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test027", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test028() {
- runTest("test028", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test028", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test029() {
@@ -396,7 +401,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
preferences.compact_else_if = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter,"test029", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter,"test029", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test030() {
@@ -406,47 +411,47 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.keep_then_statement_on_same_line = true;
preferences.keep_guardian_clause_on_one_line = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test030", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test030", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test031() {
- runTest("test031", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test031", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test032() {
- runTest("test032", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test032", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test033() {
- runTest("test033", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test033", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test034() {
- runTest("test034", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test034", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test035() {
- runTest("test035", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test035", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test036() {
- runTest("test036", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test036", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test037() {
- runTest("test037", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test037", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test038() {
- runTest("test038", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test038", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test039() {
- runTest("test039", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test039", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test040() {
- runTest("test040", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test040", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test041() {
@@ -454,7 +459,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
preferences.insert_new_line_in_empty_type_declaration = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test041", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test041", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test042() {
@@ -463,7 +468,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_new_line_in_empty_type_declaration = false;
preferences.insert_space_before_opening_brace_in_block = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test042", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test042", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test043() {
@@ -471,15 +476,15 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
preferences.insert_new_line_in_empty_type_declaration = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test043", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test043", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test044() {
- runTest("test044", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test044", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test045() {
- runTest("test045", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test045", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test046() {
@@ -488,7 +493,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_space_after_assignment_operator = false;
preferences.insert_space_before_assignment_operator = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test046", "A.java", CodeFormatter.K_EXPRESSION);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test046", "A.js", CodeFormatter.K_EXPRESSION);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test047() {
@@ -497,7 +502,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_space_after_assignment_operator = true;
preferences.insert_space_before_assignment_operator = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test047", "A.java", CodeFormatter.K_STATEMENTS, 2);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test047", "A.js", CodeFormatter.K_STATEMENTS, 2);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test048() {
@@ -506,7 +511,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_space_after_assignment_operator = true;
preferences.insert_space_before_assignment_operator = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test048", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test048", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test049() {
@@ -515,7 +520,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_space_after_assignment_operator = true;
preferences.insert_space_before_assignment_operator = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test049", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test049", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test050() {
@@ -525,7 +530,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_space_before_unary_operator = false;
preferences.insert_space_after_unary_operator = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test050", "A.java", CodeFormatter.K_EXPRESSION);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test050", "A.js", CodeFormatter.K_EXPRESSION);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test051() {
@@ -534,23 +539,23 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_space_after_assignment_operator = true;
preferences.insert_space_before_assignment_operator = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test051", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test051", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test052() {
- runTest("test052", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test052", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test053() {
- runTest("test053", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test053", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test054() {
- runTest("test054", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test054", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test055() {
- runTest("test055", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test055", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test056() {
@@ -561,7 +566,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.keep_else_statement_on_same_line = true;
preferences.keep_guardian_clause_on_one_line = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test056", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test056", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test057() {
@@ -576,7 +581,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.number_of_empty_lines_to_preserve = 0;
preferences.align_type_members_on_columns = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test057", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test057", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test058() {
@@ -593,7 +598,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.number_of_empty_lines_to_preserve = 0;
preferences.blank_lines_between_import_groups = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test058", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test058", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test059() {
@@ -601,7 +606,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.number_of_empty_lines_to_preserve = 0;
preferences.align_type_members_on_columns = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test059", "Parser.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test059", "Parser.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test060() {
@@ -612,7 +617,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.blank_lines_between_import_groups = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
//long time = System.currentTimeMillis();
- runTest(codeFormatter, "test060", "Parser.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test060", "Parser.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test061() {
@@ -622,7 +627,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.blank_lines_between_import_groups = 0;
preferences.align_type_members_on_columns = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test061", "Parser.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test061", "Parser.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test062() {
@@ -631,28 +636,28 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_space_after_assignment_operator = true;
preferences.insert_space_before_assignment_operator = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test062", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test062", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test063() {
- runTest("test063", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test063", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test064() {
- runTest("test064", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test064", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// Line break inside an array initializer (line comment)
public void test065() {
- runTest("test065", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test065", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test066() {
- runTest("test066", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test066", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test067() {
- runTest("test067", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest("test067", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 3181
@@ -665,7 +670,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
preferences.number_of_empty_lines_to_preserve = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test068", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test068", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 3327
@@ -676,7 +681,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.blank_lines_before_first_class_body_declaration = 1;
preferences.blank_lines_before_method = 1;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test069", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test069", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// 5691
@@ -684,7 +689,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.SPACE;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test070", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test070", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test071() {
@@ -694,7 +699,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.brace_position_for_type_declaration = DefaultCodeFormatterConstants.NEXT_LINE;
preferences.align_type_members_on_columns = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test071", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test071", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 7224
@@ -703,7 +708,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
preferences.number_of_empty_lines_to_preserve = 1;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test072", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test072", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 7439
@@ -715,7 +720,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.keep_then_statement_on_same_line = true;
preferences.keep_guardian_clause_on_one_line = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test073", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test073", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 12321
@@ -731,7 +736,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.keep_then_statement_on_same_line = false;
preferences.keep_else_statement_on_same_line = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test074", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test074", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 14659
@@ -747,7 +752,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
preferences.page_width = 57;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test075", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test075", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 16231
@@ -759,7 +764,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test076", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test076", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 16233
@@ -774,7 +779,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test077", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test077", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 17349
@@ -784,7 +789,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.brace_position_for_type_declaration = DefaultCodeFormatterConstants.NEXT_LINE;
preferences.brace_position_for_block = DefaultCodeFormatterConstants.NEXT_LINE;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test078", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test078", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 19811
@@ -793,7 +798,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
preferences.number_of_empty_lines_to_preserve = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test079", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test079", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 19811
@@ -809,7 +814,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
preferences.continuation_indentation = 2;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test080", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test080", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 19811
@@ -821,7 +826,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test081", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test081", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 19999
@@ -830,7 +835,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
preferences.number_of_empty_lines_to_preserve = 2;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test082", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test082", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 20721
@@ -839,7 +844,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.number_of_empty_lines_to_preserve = 0;
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test083", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test083", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 21943
@@ -854,7 +859,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.keep_then_statement_on_same_line = true;
preferences.keep_guardian_clause_on_one_line = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test084", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test084", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 21943
@@ -869,7 +874,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.keep_then_statement_on_same_line = true;
preferences.keep_guardian_clause_on_one_line = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test085", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test085", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 22313
@@ -886,7 +891,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_space_before_binary_operator = false;
preferences.insert_space_after_binary_operator = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test086", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test086", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 23144
@@ -895,7 +900,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
preferences.keep_simple_if_on_one_line = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test087", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test087", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 23144
@@ -906,7 +911,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.keep_guardian_clause_on_one_line = false;
preferences.keep_then_statement_on_same_line = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test088", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test088", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 24200
@@ -916,7 +921,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_space_after_opening_paren_in_parenthesized_expression = true;
preferences.insert_space_before_closing_paren_in_parenthesized_expression = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test089", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test089", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 24200
@@ -926,7 +931,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_space_after_opening_bracket_in_array_reference = true;
preferences.insert_space_before_closing_bracket_in_array_reference = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test090", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test090", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 25559
@@ -936,7 +941,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_space_after_assignment_operator = false;
preferences.insert_space_before_assignment_operator = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test091", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test091", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 25559
@@ -946,7 +951,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_space_after_binary_operator = false;
preferences.insert_space_before_binary_operator = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test092", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test092", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 25559
@@ -955,7 +960,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
preferences.insert_space_after_closing_paren_in_cast = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test093", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test093", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 25559
@@ -966,7 +971,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_space_before_assignment_operator = false;
preferences.insert_space_after_comma_in_method_invocation_arguments = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test094", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test094", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 27196
@@ -977,7 +982,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.indent_statements_compare_to_block = false;
preferences.indent_statements_compare_to_body = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test095", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test095", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 28098
@@ -985,7 +990,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test096", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test096", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 34897
@@ -995,7 +1000,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_space_after_opening_paren_in_method_invocation = true;
preferences.insert_space_before_closing_paren_in_method_invocation = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test097", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test097", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 35173
@@ -1005,7 +1010,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.brace_position_for_anonymous_type_declaration = DefaultCodeFormatterConstants.NEXT_LINE;
preferences.brace_position_for_method_declaration = DefaultCodeFormatterConstants.NEXT_LINE;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test098", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test098", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 35433
@@ -1017,7 +1022,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_space_after_semicolon_in_for = false;
preferences.put_empty_statement_on_new_line = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test099", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test099", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test100() {
@@ -1028,7 +1033,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_space_before_closing_brace_in_array_initializer = true;
preferences.number_of_empty_lines_to_preserve = 1;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test100", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test100", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 36832
@@ -1036,7 +1041,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test101", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test101", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 37057
@@ -1046,7 +1051,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.number_of_empty_lines_to_preserve = 1;
preferences.line_separator = "\n";//$NON-NLS-1$
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test102", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test102", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 37106
@@ -1054,7 +1059,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test103", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test103", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 37657
@@ -1069,7 +1074,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_new_line_before_finally_in_try_statement = true;
preferences.insert_new_line_before_while_in_do_statement = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test104", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test104", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 38151
@@ -1079,7 +1084,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.brace_position_for_method_declaration = DefaultCodeFormatterConstants.NEXT_LINE;
preferences.brace_position_for_type_declaration = DefaultCodeFormatterConstants.NEXT_LINE;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test105", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test105", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 39603
@@ -1087,7 +1092,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test106", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test106", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 39607
@@ -1097,7 +1102,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.keep_then_statement_on_same_line = false;
preferences.keep_simple_if_on_one_line = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test107", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test107", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 40777
@@ -1105,7 +1110,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test108", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test108", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test109() {
@@ -1113,7 +1118,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
preferences.blank_lines_before_package = 2;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test109", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test109", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test110() {
@@ -1121,7 +1126,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
preferences.blank_lines_before_package = 1;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test110", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test110", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test111() {
@@ -1131,7 +1136,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.blank_lines_before_first_class_body_declaration = 1;
preferences.blank_lines_before_new_chunk = 1;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test111", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test111", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test112() {
@@ -1141,7 +1146,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.blank_lines_before_first_class_body_declaration = 1;
preferences.blank_lines_before_new_chunk = 1;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test112", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test112", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test113() {
@@ -1152,7 +1157,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test113", "A.java");//$NON-NLS-1$ //$NON-NLS-2
+ runTest(codeFormatter, "test113", "A.js");//$NON-NLS-1$ //$NON-NLS-2
}
// bug 14659
@@ -1171,7 +1176,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.SPACE;
preferences.page_width = 57;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test114", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test114", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 14659
@@ -1187,7 +1192,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
preferences.page_width = 57;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test115", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test115", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
// bug 14659
@@ -1203,7 +1208,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
preferences.page_width = 57;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test116", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test116", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
// JDT/UI tests
@@ -1211,7 +1216,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test117", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test117", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
// JDT/UI tests
@@ -1219,7 +1224,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test118", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test118", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// JDT/UI tests
@@ -1227,7 +1232,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test119", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test119", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
// JDT/UI tests
@@ -1236,7 +1241,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.number_of_empty_lines_to_preserve = 0;
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test120", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test120", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// JDT/UI tests
@@ -1244,7 +1249,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test121", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test121", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
// probing statements
@@ -1252,7 +1257,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test122", "A.java", CodeFormatter.K_UNKNOWN);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test122", "A.js", CodeFormatter.K_UNKNOWN);//$NON-NLS-1$ //$NON-NLS-2$
}
// probing compilation unit
@@ -1260,7 +1265,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test123", "A.java", CodeFormatter.K_UNKNOWN);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test123", "A.js", CodeFormatter.K_UNKNOWN);//$NON-NLS-1$ //$NON-NLS-2$
}
// probing class body declarations
@@ -1276,7 +1281,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
preferences.page_width = 57;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test124", "A.java", CodeFormatter.K_UNKNOWN);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test124", "A.js", CodeFormatter.K_UNKNOWN);//$NON-NLS-1$ //$NON-NLS-2$
}
// probing expression
@@ -1287,7 +1292,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_space_before_unary_operator = false;
preferences.insert_space_after_unary_operator = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test125", "A.java", CodeFormatter.K_UNKNOWN);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test125", "A.js", CodeFormatter.K_UNKNOWN);//$NON-NLS-1$ //$NON-NLS-2$
}
// probing unrecognized source
@@ -1295,7 +1300,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test126", "A.java", CodeFormatter.K_UNKNOWN, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test126", "A.js", CodeFormatter.K_UNKNOWN, true);//$NON-NLS-1$ //$NON-NLS-2$
}
// probing unrecognized source
@@ -1303,7 +1308,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test127", "A.java", CodeFormatter.K_UNKNOWN);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test127", "A.js", CodeFormatter.K_UNKNOWN);//$NON-NLS-1$ //$NON-NLS-2$
}
// probing unrecognized source
@@ -1311,14 +1316,14 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test128", "A.java", CodeFormatter.K_UNKNOWN, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test128", "A.js", CodeFormatter.K_UNKNOWN, true);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test129() {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test129", "A.java", CodeFormatter.K_STATEMENTS, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test129", "A.js", CodeFormatter.K_STATEMENTS, true);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test130() {
@@ -1326,7 +1331,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.number_of_empty_lines_to_preserve = 0;
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test130", "A.java", CodeFormatter.K_COMPILATION_UNIT, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test130", "A.js", CodeFormatter.K_COMPILATION_UNIT, true);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test131() {
@@ -1334,14 +1339,14 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.number_of_empty_lines_to_preserve = 0;
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test131", "A.java", CodeFormatter.K_COMPILATION_UNIT, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test131", "A.js", CodeFormatter.K_COMPILATION_UNIT, true);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test132() {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test132", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test132", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS, true);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test133() {
@@ -1350,14 +1355,14 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.blank_lines_between_import_groups = 0;
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test133", "A.java", CodeFormatter.K_COMPILATION_UNIT, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test133", "A.js", CodeFormatter.K_COMPILATION_UNIT, true);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test134() {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test134", "A.java", CodeFormatter.K_COMPILATION_UNIT, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test134", "A.js", CodeFormatter.K_COMPILATION_UNIT, true);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test135() {
@@ -1373,14 +1378,14 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_SWITCH, DefaultCodeFormatterConstants.NEXT_LINE);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test135", "A.java", CodeFormatter.K_STATEMENTS, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test135", "A.js", CodeFormatter.K_STATEMENTS, true);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test136() {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test136", "A.java", CodeFormatter.K_COMPILATION_UNIT, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test136", "A.js", CodeFormatter.K_COMPILATION_UNIT, true);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test137() {
@@ -1388,28 +1393,28 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.number_of_empty_lines_to_preserve = 0;
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test137", "A.java", CodeFormatter.K_COMPILATION_UNIT, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test137", "A.js", CodeFormatter.K_COMPILATION_UNIT, true);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test138() {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test138", "A.java", CodeFormatter.K_STATEMENTS, 2, true, 8, 37);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test138", "A.js", CodeFormatter.K_STATEMENTS, 2, true, 8, 37);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test139() {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test139", "A.java", CodeFormatter.K_STATEMENTS, 0, true, 0, 5);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test139", "A.js", CodeFormatter.K_STATEMENTS, 0, true, 0, 5);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test140() {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.SPACE;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test140", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test140", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test141() {
@@ -1418,42 +1423,42 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.indent_switchstatements_compare_to_cases = false;
preferences.indent_switchstatements_compare_to_switch = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test141", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test141", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test142() {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test142", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS, 1);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test142", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS, 1);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test143() {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test143", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS, 1);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test143", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS, 1);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test144() {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test144", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test144", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test145() {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test145", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test145", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test146() {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test146", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test146", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test147() {
@@ -1462,42 +1467,42 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_space_before_assignment_operator = false;
preferences.number_of_empty_lines_to_preserve = 1;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test147", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test147", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test148() {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test148", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test148", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test149() {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test149", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test149", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test150() {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test150", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test150", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test151() {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test151", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test151", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test152() {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test152", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test152", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test153() {
@@ -1505,13 +1510,13 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
preferences.align_type_members_on_columns = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test153", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test153", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test154() {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test154", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test154", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test155() {
@@ -1519,7 +1524,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.SPACE;
preferences.tab_size = 4;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test155", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test155", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=44036
@@ -1528,26 +1533,26 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.SPACE;
preferences.tab_size = 4;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test156", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test156", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test157() {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test157", "A.java", CodeFormatter.K_STATEMENTS, 0, true, 11, 7);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test157", "A.js", CodeFormatter.K_STATEMENTS, 0, true, 11, 7);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test158() {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test158", "A.java", CodeFormatter.K_STATEMENTS, 0, true, 11, 8);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test158", "A.js", CodeFormatter.K_STATEMENTS, 0, true, 11, 8);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test159() {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.number_of_empty_lines_to_preserve = 1;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test159", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test159", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/*
@@ -1562,7 +1567,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.compact_else_if = true;
preferences.number_of_empty_lines_to_preserve = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test160", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test160", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/*
@@ -1577,7 +1582,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_new_line_before_while_in_do_statement = false;
preferences.compact_else_if = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test161", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test161", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/*
@@ -1592,7 +1597,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_new_line_before_while_in_do_statement = true;
preferences.compact_else_if = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test162", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test162", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/*
@@ -1607,7 +1612,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_new_line_before_while_in_do_statement = true;
preferences.compact_else_if = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test163", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test163", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -1616,7 +1621,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
public void test164() {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test164", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test164", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test165() {
@@ -1624,7 +1629,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.number_of_empty_lines_to_preserve = 0;
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test165", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test165", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -1635,7 +1640,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.number_of_empty_lines_to_preserve = 0;
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test166", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test166", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -1645,7 +1650,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test167", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test167", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -1655,7 +1660,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test169", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test169", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -1665,7 +1670,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test170", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test170", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -1686,7 +1691,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_new_line_before_finally_in_try_statement = true;
preferences.insert_new_line_before_while_in_do_statement = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test171", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test171", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -1707,7 +1712,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_new_line_before_finally_in_try_statement = true;
preferences.insert_new_line_before_while_in_do_statement = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test172", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test172", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -1722,7 +1727,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_new_line_in_empty_method_body = false;
preferences.insert_new_line_in_empty_block = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test173", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test173", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -1736,7 +1741,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_new_line_in_empty_method_body = false;
preferences.insert_new_line_in_empty_block = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test174", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test174", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -1751,7 +1756,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_new_line_in_empty_method_body = false;
preferences.insert_new_line_in_empty_block = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test175", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test175", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -1765,7 +1770,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_new_line_in_empty_method_body = true;
preferences.insert_new_line_in_empty_block = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test176", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test176", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -1779,7 +1784,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_new_line_in_empty_method_body = false;
preferences.insert_new_line_in_empty_block = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test177", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test177", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -1793,7 +1798,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_new_line_in_empty_method_body = false;
preferences.insert_new_line_in_empty_block = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test178", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test178", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -1807,7 +1812,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_new_line_in_empty_method_body = false;
preferences.insert_new_line_in_empty_block = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test179", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test179", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -1821,7 +1826,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_new_line_in_empty_method_body = false;
preferences.insert_new_line_in_empty_block = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test180", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test180", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -1832,7 +1837,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.number_of_empty_lines_to_preserve = 0;
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test181", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test181", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -1843,7 +1848,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
preferences.number_of_empty_lines_to_preserve = 1;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test182", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test182", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -1854,7 +1859,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
preferences.number_of_empty_lines_to_preserve = 1;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test183", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test183", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -1864,7 +1869,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test184", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test184", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -1874,7 +1879,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test185", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test185", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -1883,7 +1888,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test186", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test186", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -1895,7 +1900,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.blank_lines_between_import_groups = 0;
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test187", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test187", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -1905,7 +1910,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test188", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test188", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -1915,7 +1920,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test189", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test189", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -1926,7 +1931,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test190", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test190", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -1935,7 +1940,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.number_of_empty_lines_to_preserve = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test191", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test191", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test192() {
@@ -1948,7 +1953,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.number_of_empty_lines_to_preserve = 0;
preferences.align_type_members_on_columns = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test192", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test192", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
public void test193() {
@@ -1964,7 +1969,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_SWITCH, DefaultCodeFormatterConstants.END_OF_LINE);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test193", "A.java", CodeFormatter.K_STATEMENTS, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test193", "A.js", CodeFormatter.K_STATEMENTS, true);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test194() {
@@ -1980,7 +1985,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_SWITCH, DefaultCodeFormatterConstants.NEXT_LINE);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test194", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test194", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS, true);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test195() {
@@ -1996,7 +2001,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_SWITCH, DefaultCodeFormatterConstants.END_OF_LINE);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test195", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test195", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS, true);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test196() {
@@ -2013,7 +2018,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test196", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test196", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS, true);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test197() {
@@ -2030,7 +2035,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test197", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test197", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS, true);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test198() {
@@ -2047,7 +2052,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test198", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test198", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS, true);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test199() {
@@ -2064,7 +2069,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test199", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test199", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS, true);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test201() {
@@ -2081,7 +2086,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test201", "A.java", CodeFormatter.K_STATEMENTS, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test201", "A.js", CodeFormatter.K_STATEMENTS, true);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -2102,7 +2107,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test202", "A.java", CodeFormatter.K_STATEMENTS, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test202", "A.js", CodeFormatter.K_STATEMENTS, true);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -2123,7 +2128,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test203", "A.java", CodeFormatter.K_STATEMENTS, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test203", "A.js", CodeFormatter.K_STATEMENTS, true);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test204() {
@@ -2140,7 +2145,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test204", "A.java", CodeFormatter.K_STATEMENTS, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test204", "A.js", CodeFormatter.K_STATEMENTS, true);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test205() {
@@ -2158,7 +2163,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_NUMBER_OF_EMPTY_LINES_TO_PRESERVE, "1");//$NON-NLS-1$
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test205", "A.java", CodeFormatter.K_STATEMENTS, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test205", "A.js", CodeFormatter.K_STATEMENTS, true);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test206() {
@@ -2175,7 +2180,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test206", "A.java", CodeFormatter.K_STATEMENTS, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test206", "A.js", CodeFormatter.K_STATEMENTS, true);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test207() {
@@ -2192,7 +2197,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test207", "A.java", CodeFormatter.K_STATEMENTS, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test207", "A.js", CodeFormatter.K_STATEMENTS, true);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test208() {
@@ -2209,7 +2214,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test208", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test208", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS, true);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test209() {
@@ -2227,7 +2232,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_NUMBER_OF_EMPTY_LINES_TO_PRESERVE, "1");//$NON-NLS-1$
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test209", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test209", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS, true);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test210() {
@@ -2245,7 +2250,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_NUMBER_OF_EMPTY_LINES_TO_PRESERVE, "1");//$NON-NLS-1$
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test210", "A.java", CodeFormatter.K_COMPILATION_UNIT, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test210", "A.js", CodeFormatter.K_COMPILATION_UNIT, true);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test211() {
@@ -2263,7 +2268,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_NUMBER_OF_EMPTY_LINES_TO_PRESERVE, "1");//$NON-NLS-1$
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test211", "A.java", CodeFormatter.K_COMPILATION_UNIT, 1);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test211", "A.js", CodeFormatter.K_COMPILATION_UNIT, 1);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test212() {
@@ -2280,7 +2285,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test212", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test212", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test213() {
@@ -2297,7 +2302,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test213", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test213", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test214() {
@@ -2314,7 +2319,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test214", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test214", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test215() {
@@ -2331,7 +2336,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test215", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test215", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test216() {
@@ -2348,7 +2353,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test216", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test216", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test217() {
@@ -2365,7 +2370,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test217", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test217", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test218() {
@@ -2382,7 +2387,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test218", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS, 1);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test218", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS, 1);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test219() {
@@ -2399,7 +2404,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test219", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS, 1);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test219", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS, 1);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test220() {
@@ -2416,7 +2421,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test220", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS, 1);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test220", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS, 1);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test221() {
@@ -2433,7 +2438,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test221", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test221", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test222() {
@@ -2450,7 +2455,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test222", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test222", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test223() {
Hashtable options = new Hashtable();
@@ -2466,7 +2471,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test223", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test223", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test224() {
@@ -2483,7 +2488,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test224", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test224", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test225() {
@@ -2500,7 +2505,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test225", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test225", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test226() {
@@ -2517,7 +2522,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test226", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test226", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test227() {
@@ -2534,7 +2539,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test227", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test227", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test228() {
@@ -2551,7 +2556,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test228", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test228", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test229() {
@@ -2568,7 +2573,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test229", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test229", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test230() {
@@ -2585,7 +2590,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test230", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test230", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test231() {
@@ -2602,7 +2607,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test231", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test231", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test232() {
@@ -2619,7 +2624,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test232", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test232", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test233() {
@@ -2636,7 +2641,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test233", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS, 1);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test233", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS, 1);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test234() {
@@ -2653,7 +2658,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test234", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test234", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test235() {
@@ -2670,7 +2675,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test235", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test235", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test236() {
@@ -2687,7 +2692,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test236", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test236", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test237() {
@@ -2705,7 +2710,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test237", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test237", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test238() {
@@ -2723,7 +2728,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test238", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test238", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test239() {
@@ -2741,7 +2746,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test239", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test239", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test240() {
@@ -2759,7 +2764,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test240", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test240", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test241() {
@@ -2777,7 +2782,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test241", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test241", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test242() {
@@ -2795,7 +2800,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test242", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test242", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test243() {
@@ -2813,7 +2818,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test243", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test243", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test244() {
@@ -2831,7 +2836,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test244", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test244", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test245() {
@@ -2849,7 +2854,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test245", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test245", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test246() {
@@ -2867,7 +2872,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test246", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test246", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test247() {
@@ -2885,7 +2890,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test247", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test247", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test248() {
@@ -2903,7 +2908,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test248", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test248", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test249() {
@@ -2921,7 +2926,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test249", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test249", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test250() {
@@ -2939,7 +2944,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test250", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test250", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test251() {
@@ -2957,7 +2962,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test251", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test251", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test252() {
@@ -2975,7 +2980,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test252", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test252", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test253() {
@@ -2993,7 +2998,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test253", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test253", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test254() {
@@ -3011,7 +3016,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test254", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test254", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test255() {
@@ -3029,7 +3034,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test255", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test255", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test256() {
@@ -3047,7 +3052,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test256", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test256", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test257() {
@@ -3065,7 +3070,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test257", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test257", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test258() {
@@ -3083,7 +3088,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test258", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test258", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test259() {
@@ -3101,7 +3106,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test259", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test259", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test260() {
@@ -3119,7 +3124,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test260", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test260", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test261() {
@@ -3137,7 +3142,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test261", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test261", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test262() {
@@ -3155,7 +3160,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test262", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test262", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test263() {
@@ -3173,7 +3178,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test263", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test263", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test264() {
@@ -3191,7 +3196,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test264", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test264", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test265() {
@@ -3209,7 +3214,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test265", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test265", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test266() {
@@ -3227,7 +3232,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test266", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test266", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test267() {
@@ -3245,7 +3250,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test267", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test267", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test268() {
@@ -3263,7 +3268,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test268", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test268", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test269() {
@@ -3281,7 +3286,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test269", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test269", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test270() {
@@ -3299,7 +3304,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test270", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test270", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test271() {
@@ -3317,7 +3322,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test271", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test271", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test272() {
@@ -3336,7 +3341,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test272", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test272", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test273() {
@@ -3355,7 +3360,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test273", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test273", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test274() {
@@ -3373,7 +3378,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test274", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test274", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test275() {
@@ -3391,7 +3396,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test275", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test275", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test276() {
@@ -3409,7 +3414,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test276", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test276", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test277() {
@@ -3427,7 +3432,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test277", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test277", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test278() {
@@ -3445,7 +3450,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test278", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test278", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test279() {
@@ -3463,7 +3468,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test279", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test279", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test280() {
@@ -3481,7 +3486,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test280", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test280", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test281() {
@@ -3499,7 +3504,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test281", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test281", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test282() {
@@ -3517,7 +3522,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test282", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test282", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test283() {
@@ -3535,7 +3540,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test283", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test283", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test284() {
@@ -3553,7 +3558,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test284", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test284", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test285() {
@@ -3571,7 +3576,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test285", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test285", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test286() {
@@ -3589,7 +3594,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test286", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test286", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test287() {
@@ -3607,7 +3612,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test287", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test287", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test288() {
@@ -3625,7 +3630,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test288", "A.java", CodeFormatter.K_STATEMENTS, 1);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test288", "A.js", CodeFormatter.K_STATEMENTS, 1);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test289() {
@@ -3643,7 +3648,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test289", "A.java", CodeFormatter.K_STATEMENTS, 1);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test289", "A.js", CodeFormatter.K_STATEMENTS, 1);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test290() {
@@ -3661,7 +3666,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test290", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test290", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test291() {
@@ -3679,7 +3684,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test291", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test291", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test292() {
@@ -3697,7 +3702,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test292", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test292", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test293() {
@@ -3715,7 +3720,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test293", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test293", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test294() {
@@ -3733,7 +3738,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test294", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test294", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test295() {
@@ -3751,7 +3756,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test295", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test295", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test296() {
@@ -3769,7 +3774,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test296", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test296", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test297() {
@@ -3790,7 +3795,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
preferences.number_of_empty_lines_to_preserve = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test297", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test297", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test298() {
@@ -3809,7 +3814,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_LINE_SPLIT, "80");
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test298", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test298", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test299() {
@@ -3828,7 +3833,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_LINE_SPLIT, "80");
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test299", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test299", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test300() {
@@ -3846,7 +3851,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test300", "A.java", CodeFormatter.K_EXPRESSION, 2);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test300", "A.js", CodeFormatter.K_EXPRESSION, 2);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test301() {
@@ -3865,7 +3870,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_CLOSING_PAREN_IN_CAST, JavaCore.DO_NOT_INSERT);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test301", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test301", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test302() {
@@ -3884,7 +3889,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
preferences.number_of_empty_lines_to_preserve = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test302", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test302", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test303() {
@@ -3895,7 +3900,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.indent_switchstatements_compare_to_switch = true;
preferences.indent_breaks_compare_to_cases = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test303", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test303", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test304() {
@@ -3906,7 +3911,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.indent_switchstatements_compare_to_switch = true;
preferences.indent_breaks_compare_to_cases = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test304", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test304", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test305() {
@@ -3917,7 +3922,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.indent_switchstatements_compare_to_switch = true;
preferences.indent_breaks_compare_to_cases = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test305", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test305", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test306() {
@@ -3927,7 +3932,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.indent_switchstatements_compare_to_switch = true;
preferences.indent_breaks_compare_to_cases = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test306", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test306", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test307() {
@@ -3937,7 +3942,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.indent_switchstatements_compare_to_switch = true;
preferences.indent_breaks_compare_to_cases = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test307", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test307", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test308() {
@@ -3948,7 +3953,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.indent_switchstatements_compare_to_switch = false;
preferences.indent_breaks_compare_to_cases = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test308", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test308", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test309() {
@@ -3959,7 +3964,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.indent_switchstatements_compare_to_switch = false;
preferences.indent_breaks_compare_to_cases = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test309", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test309", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test310() {
@@ -3967,14 +3972,14 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.number_of_empty_lines_to_preserve = 0;
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test310", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test310", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test311() {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test311", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test311", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test312() {
@@ -3982,7 +3987,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.number_of_empty_lines_to_preserve = 0;
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test312", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test312", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test313() {
@@ -4000,7 +4005,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test313", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test313", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test314() {
@@ -4018,7 +4023,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test314", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test314", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test315() {
@@ -4100,7 +4105,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_new_line_in_empty_method_body = false;
preferences.insert_new_line_in_empty_block = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test319", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test319", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test320() {
@@ -4112,7 +4117,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_new_line_in_empty_method_body = false;
preferences.insert_new_line_in_empty_block = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test320", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test320", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test321() {
@@ -4124,7 +4129,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_new_line_in_empty_method_body = false;
preferences.insert_new_line_in_empty_block = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test321", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test321", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test322() {
@@ -4136,7 +4141,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_new_line_in_empty_method_body = false;
preferences.insert_new_line_in_empty_block = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test322", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test322", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test323() {
@@ -4148,7 +4153,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_new_line_in_empty_method_body = false;
preferences.insert_new_line_in_empty_block = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test323", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test323", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4158,7 +4163,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.number_of_empty_lines_to_preserve = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test324", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test324", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4168,7 +4173,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.number_of_empty_lines_to_preserve = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test325", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test325", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4177,7 +4182,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
public void test326() {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test326", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test326", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4187,7 +4192,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test327", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test327", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4197,7 +4202,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test328", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test328", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4207,7 +4212,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test329", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test329", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4218,7 +4223,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
preferences.keep_empty_array_initializer_on_one_line = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test330", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test330", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4228,7 +4233,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test331", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test331", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4238,7 +4243,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test332", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test332", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4249,7 +4254,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
preferences.number_of_empty_lines_to_preserve = 5;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test333", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test333", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4260,7 +4265,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
preferences.put_empty_statement_on_new_line = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test334", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test334", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4271,7 +4276,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.number_of_empty_lines_to_preserve = 0;
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test335", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test335", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4293,7 +4298,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
preferences.number_of_empty_lines_to_preserve = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test336", "A.java", CodeFormatter.K_STATEMENTS, 8);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test336", "A.js", CodeFormatter.K_STATEMENTS, 8);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4304,7 +4309,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
preferences.number_of_empty_lines_to_preserve = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test337", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test337", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4314,7 +4319,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test338", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test338", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4324,7 +4329,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test339", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test339", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4334,7 +4339,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test340", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test340", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4347,7 +4352,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_space_after_assignment_operator = false;
preferences.insert_space_after_binary_operator = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test341", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test341", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4358,7 +4363,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
preferences.insert_space_after_comma_in_multiple_local_declarations = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test342", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test342", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4369,7 +4374,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
preferences.insert_space_after_comma_in_multiple_field_declarations = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test343", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test343", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4380,7 +4385,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
preferences.insert_space_after_comma_in_multiple_field_declarations = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test344", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test344", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4391,7 +4396,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
preferences.insert_space_after_comma_in_multiple_local_declarations = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test345", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test345", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4409,7 +4414,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.blank_lines_before_first_class_body_declaration = 1;
preferences.insert_new_line_in_empty_method_body = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test347", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test347", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4426,7 +4431,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.blank_lines_before_first_class_body_declaration = 1;
preferences.insert_new_line_in_empty_method_body = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test348", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test348", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4438,7 +4443,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_size = 4;
preferences.blank_lines_before_first_class_body_declaration = 1;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test349", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test349", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4447,7 +4452,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
public void test350() {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test350", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test350", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4456,7 +4461,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
public void test351() {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test351", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test351", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4467,7 +4472,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.SPACE;
preferences.tab_size = 4;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test352", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test352", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4476,7 +4481,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
public void test353() {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test353", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test353", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4487,7 +4492,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_PUT_EMPTY_STATEMENT_ON_NEW_LINE, DefaultCodeFormatterConstants.FALSE);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test354", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test354", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4498,7 +4503,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_PUT_EMPTY_STATEMENT_ON_NEW_LINE, DefaultCodeFormatterConstants.TRUE);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test355", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test355", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4510,7 +4515,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BINARY_EXPRESSION, DefaultCodeFormatterConstants.createAlignmentValue(false, DefaultCodeFormatterConstants.WRAP_COMPACT, DefaultCodeFormatterConstants.INDENT_DEFAULT));
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test356", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test356", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4522,7 +4527,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_PREFIX_OPERATOR, JavaCore.INSERT);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test357", "A.java", CodeFormatter.K_EXPRESSION);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test357", "A.js", CodeFormatter.K_EXPRESSION);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4534,7 +4539,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_PREFIX_OPERATOR, JavaCore.DO_NOT_INSERT);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test358", "A.java", CodeFormatter.K_EXPRESSION);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test358", "A.js", CodeFormatter.K_EXPRESSION);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4545,7 +4550,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test359", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test359", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4557,7 +4562,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_NUMBER_OF_EMPTY_LINES_TO_PRESERVE, "2");
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test360", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test360", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4569,7 +4574,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_NUMBER_OF_EMPTY_LINES_TO_PRESERVE, "1");
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test361", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test361", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4587,7 +4592,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
preferences.page_width = 57;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test362", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test362", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4597,7 +4602,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test363", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test363", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4609,7 +4614,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_space_after_comma_in_for_inits = false;
preferences.insert_space_after_comma_in_for_increments = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test364", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test364", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4621,7 +4626,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_space_after_comma_in_for_inits = false;
preferences.insert_space_after_comma_in_for_increments = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test365", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test365", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4633,7 +4638,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_space_after_comma_in_for_inits = true;
preferences.insert_space_before_comma_in_for_inits = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test366", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test366", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4647,7 +4652,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_space_after_comma_in_multiple_local_declarations = false;
preferences.insert_space_before_comma_in_multiple_local_declarations = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test367", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test367", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4658,7 +4663,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_NUMBER_OF_EMPTY_LINES_TO_PRESERVE, "1");
options.put(DefaultCodeFormatterConstants.FORMATTER_BLANK_LINES_BEFORE_METHOD, "0");
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(new DefaultCodeFormatterOptions(options));
- runTest(codeFormatter, "test368", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test368", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4670,7 +4675,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_BLANK_LINES_BEFORE_METHOD, "1");
options.put(DefaultCodeFormatterConstants.FORMATTER_BLANK_LINES_BEFORE_FIRST_CLASS_BODY_DECLARATION, "1");
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(new DefaultCodeFormatterOptions(options));
- runTest(codeFormatter, "test369", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test369", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4682,7 +4687,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_BLANK_LINES_BEFORE_METHOD, "1");
options.put(DefaultCodeFormatterConstants.FORMATTER_BLANK_LINES_BEFORE_FIRST_CLASS_BODY_DECLARATION, "1");
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(new DefaultCodeFormatterOptions(options));
- runTest(codeFormatter, "test370", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test370", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4693,7 +4698,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_NUMBER_OF_EMPTY_LINES_TO_PRESERVE, "1");
options.put(DefaultCodeFormatterConstants.FORMATTER_BLANK_LINES_BEFORE_METHOD, "0");
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(new DefaultCodeFormatterOptions(options));
- runTest(codeFormatter, "test371", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test371", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4704,7 +4709,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_NUMBER_OF_EMPTY_LINES_TO_PRESERVE, "1");
options.put(DefaultCodeFormatterConstants.FORMATTER_BLANK_LINES_BEFORE_METHOD, "0");
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(new DefaultCodeFormatterOptions(options));
- runTest(codeFormatter, "test372", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test372", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4716,7 +4721,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_BLANK_LINES_BEFORE_METHOD, "1");
options.put(DefaultCodeFormatterConstants.FORMATTER_BLANK_LINES_BEFORE_FIRST_CLASS_BODY_DECLARATION, "1");
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(new DefaultCodeFormatterOptions(options));
- runTest(codeFormatter, "test373", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test373", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4731,7 +4736,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_OPENING_BRACE_IN_ARRAY_INITIALIZER, JavaCore.INSERT);
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_BEFORE_CLOSING_BRACE_IN_ARRAY_INITIALIZER, JavaCore.INSERT);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(new DefaultCodeFormatterOptions(options));
- runTest(codeFormatter, "test374", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test374", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4746,7 +4751,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_OPENING_BRACE_IN_ARRAY_INITIALIZER, JavaCore.INSERT);
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_BEFORE_CLOSING_BRACE_IN_ARRAY_INITIALIZER, JavaCore.INSERT);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(new DefaultCodeFormatterOptions(options));
- runTest(codeFormatter, "test375", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test375", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4761,7 +4766,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_OPENING_BRACE_IN_ARRAY_INITIALIZER, JavaCore.DO_NOT_INSERT);
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_BEFORE_CLOSING_BRACE_IN_ARRAY_INITIALIZER, JavaCore.DO_NOT_INSERT);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(new DefaultCodeFormatterOptions(options));
- runTest(codeFormatter, "test376", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test376", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4776,7 +4781,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_OPENING_BRACE_IN_ARRAY_INITIALIZER, JavaCore.INSERT);
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_BEFORE_CLOSING_BRACE_IN_ARRAY_INITIALIZER, JavaCore.DO_NOT_INSERT);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(new DefaultCodeFormatterOptions(options));
- runTest(codeFormatter, "test377", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test377", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4791,7 +4796,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_OPENING_BRACE_IN_ARRAY_INITIALIZER, JavaCore.INSERT);
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_BEFORE_CLOSING_BRACE_IN_ARRAY_INITIALIZER, JavaCore.INSERT);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(new DefaultCodeFormatterOptions(options));
- runTest(codeFormatter, "test378", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test378", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4806,7 +4811,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_OPENING_BRACE_IN_ARRAY_INITIALIZER, JavaCore.INSERT);
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_BEFORE_CLOSING_BRACE_IN_ARRAY_INITIALIZER, JavaCore.INSERT);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(new DefaultCodeFormatterOptions(options));
- runTest(codeFormatter, "test379", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test379", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4831,7 +4836,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
preferences.number_of_empty_lines_to_preserve = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test380", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test380", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4843,7 +4848,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_BLANK_LINES_BEFORE_METHOD, "1");
options.put(DefaultCodeFormatterConstants.FORMATTER_BLANK_LINES_BEFORE_FIRST_CLASS_BODY_DECLARATION, "0");
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(new DefaultCodeFormatterOptions(options));
- runTest(codeFormatter, "test381", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test381", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4853,7 +4858,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
Map options = DefaultCodeFormatterConstants.getEclipse21Settings();
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(new DefaultCodeFormatterOptions(options));
- runTest(codeFormatter, "test382", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test382", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4866,7 +4871,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_size = 4;
preferences.blank_lines_before_first_class_body_declaration = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test383", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test383", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4881,7 +4886,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.SPACE;
preferences.tab_size = 4;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test384", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test384", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4899,7 +4904,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.SPACE;
preferences.tab_size = 4;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test385", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test385", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4915,7 +4920,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.SPACE;
preferences.tab_size = 4;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test386", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test386", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4932,7 +4937,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.SPACE;
preferences.tab_size = 4;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test387", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test387", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4952,7 +4957,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_new_line_before_closing_brace_in_array_initializer = true;
preferences.blank_lines_before_first_class_body_declaration = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test388", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test388", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4973,7 +4978,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.blank_lines_before_first_class_body_declaration = 0;
preferences.tab_size = 4;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test389", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test389", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -4994,7 +4999,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.blank_lines_before_first_class_body_declaration = 0;
preferences.tab_size = 4;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test390", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test390", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5015,7 +5020,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_new_line_before_closing_brace_in_array_initializer = true;
preferences.tab_size = 4;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test391", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test391", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5036,7 +5041,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_new_line_before_closing_brace_in_array_initializer = true;
preferences.tab_size = 4;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test392", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test392", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5057,7 +5062,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_new_line_after_opening_brace_in_array_initializer = true;
preferences.insert_new_line_before_closing_brace_in_array_initializer = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test393", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test393", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5068,7 +5073,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
preferences.number_of_empty_lines_to_preserve = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test394", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test394", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5080,7 +5085,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_space_before_opening_paren_in_method_declaration = true;
preferences.number_of_empty_lines_to_preserve = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test395", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test395", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5092,7 +5097,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_space_before_semicolon_in_for = true;
preferences.number_of_empty_lines_to_preserve = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test396", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test396", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5105,7 +5110,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.blank_lines_after_package = 0;
preferences.number_of_empty_lines_to_preserve = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test397", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test397", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5118,7 +5123,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.blank_lines_before_package = 0;
preferences.blank_lines_after_package = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test398", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test398", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5130,7 +5135,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.blank_lines_before_package = 1;
preferences.blank_lines_after_package = 1;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test399", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test399", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5142,7 +5147,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_BLANK_LINES_AFTER_PACKAGE, "2");
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test400", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test400", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5154,7 +5159,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_KEEP_EMPTY_ARRAY_INITIALIZER_ON_ONE_LINE, DefaultCodeFormatterConstants.TRUE);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test401", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test401", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5166,7 +5171,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BETWEEN_EMPTY_BRACES_IN_ARRAY_INITIALIZER, JavaCore.DO_NOT_INSERT);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test402", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test402", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5178,7 +5183,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_METHOD_INVOCATION, JavaCore.INSERT);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test403", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test403", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5192,7 +5197,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BETWEEN_EMPTY_PARENS_IN_METHOD_DECLARATION, JavaCore.DO_NOT_INSERT);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test404", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test404", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5205,7 +5210,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.SPACE;
preferences.tab_size = 4;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test405", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test405", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5219,7 +5224,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BETWEEN_EMPTY_PARENS_IN_METHOD_DECLARATION, JavaCore.INSERT);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test406", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test406", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5232,7 +5237,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.SPACE;
preferences.blank_lines_before_first_class_body_declaration = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test407", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test407", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5245,7 +5250,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.SPACE;
preferences.blank_lines_before_first_class_body_declaration = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test408", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test408", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5260,7 +5265,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.brace_position_for_block = DefaultCodeFormatterConstants.NEXT_LINE;
preferences.brace_position_for_switch = DefaultCodeFormatterConstants.NEXT_LINE;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test409", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test409", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5271,7 +5276,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
preferences.blank_lines_between_type_declarations = 1;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test410", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test410", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5282,7 +5287,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
preferences.blank_lines_between_type_declarations = 2;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test411", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test411", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5292,7 +5297,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
Map options = DefaultCodeFormatterConstants.getEclipse21Settings();
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test412", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test412", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5303,7 +5308,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
preferences.blank_lines_between_type_declarations = 1;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test413", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test413", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5313,7 +5318,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
Map options = DefaultCodeFormatterConstants.getEclipse21Settings();
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test414", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test414", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5324,7 +5329,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
preferences.blank_lines_between_type_declarations = 1;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test415", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test415", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5335,7 +5340,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
preferences.blank_lines_between_type_declarations = 1;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test416", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test416", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5346,7 +5351,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
preferences.insert_space_before_opening_paren_in_constructor_declaration = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test417", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test417", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5358,7 +5363,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_space_before_opening_paren_in_constructor_declaration = true;
preferences.insert_space_before_opening_paren_in_method_declaration = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test418", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test418", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5372,7 +5377,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test419", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test419", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5383,7 +5388,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
preferences.align_type_members_on_columns = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test420", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test420", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5397,7 +5402,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BETWEEN_EMPTY_PARENS_IN_METHOD_DECLARATION, JavaCore.DO_NOT_INSERT);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test421", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test421", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5414,7 +5419,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.blank_lines_before_first_class_body_declaration = 1;
preferences.tab_size = 4;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test422", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test422", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5425,7 +5430,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_TYPE_DECLARATION, DefaultCodeFormatterConstants.END_OF_LINE);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test423", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test423", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5436,7 +5441,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_TYPE_DECLARATION, DefaultCodeFormatterConstants.NEXT_LINE_ON_WRAP);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test424", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test424", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5447,7 +5452,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_TYPE_DECLARATION, DefaultCodeFormatterConstants.NEXT_LINE_ON_WRAP);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test425", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test425", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5460,7 +5465,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
preferences.number_of_empty_lines_to_preserve = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test426", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test426", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5473,7 +5478,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
preferences.number_of_empty_lines_to_preserve = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test427", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test427", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5486,7 +5491,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
preferences.number_of_empty_lines_to_preserve = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test428", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test428", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5498,7 +5503,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
preferences.number_of_empty_lines_to_preserve = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test429", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test429", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5510,7 +5515,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
preferences.number_of_empty_lines_to_preserve = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test430", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test430", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5522,7 +5527,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
preferences.number_of_empty_lines_to_preserve = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test431", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test431", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5534,7 +5539,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
assertNotNull("No preferences", options);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test432", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test432", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5544,7 +5549,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
Map options = DefaultCodeFormatterConstants.getEclipse21Settings();
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test433", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test433", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5564,7 +5569,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_space_after_opening_paren_in_method_invocation = true;
preferences.insert_space_before_closing_paren_in_method_invocation = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test434", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test434", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5580,7 +5585,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.SPACE;
preferences.tab_size = 4;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test435", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test435", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5597,7 +5602,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.SPACE;
preferences.tab_size = 4;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test436", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test436", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5609,7 +5614,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
assertNotNull("No preferences", options);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test437", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test437", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5621,7 +5626,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
assertNotNull("No preferences", options);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test438", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test438", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5633,7 +5638,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
assertNotNull("No preferences", options);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test439", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test439", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
@@ -5645,7 +5650,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_PUT_EMPTY_STATEMENT_ON_NEW_LINE, DefaultCodeFormatterConstants.FALSE);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test440", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test440", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5656,7 +5661,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_PUT_EMPTY_STATEMENT_ON_NEW_LINE, DefaultCodeFormatterConstants.FALSE);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test441", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test441", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5667,7 +5672,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_PUT_EMPTY_STATEMENT_ON_NEW_LINE, DefaultCodeFormatterConstants.FALSE);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test442", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test442", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5682,7 +5687,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_BEFORE_WHILE_IN_DO_STATEMENT, JavaCore.INSERT);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test443", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test443", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5693,7 +5698,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_PUT_EMPTY_STATEMENT_ON_NEW_LINE, DefaultCodeFormatterConstants.FALSE);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test444", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test444", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5704,7 +5709,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_PUT_EMPTY_STATEMENT_ON_NEW_LINE, DefaultCodeFormatterConstants.FALSE);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test445", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test445", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5715,7 +5720,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
preferences.number_of_empty_lines_to_preserve = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test446", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test446", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5727,9 +5732,9 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
assertNotNull("No preferences", options);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- String input = getZipEntryContents(resourcePath, getIn("Format.java"));
+ String input = getZipEntryContents(resourcePath, getIn("Format.js"));
assertNotNull("No input", input);
- String output = getZipEntryContents(resourcePath, getOut("Format.java"));
+ String output = getZipEntryContents(resourcePath, getOut("Format.js"));
assertNotNull("No output", output);
int start = input.indexOf("private");
int end = input.indexOf(";");
@@ -5748,7 +5753,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_space_after_opening_bracket_in_array_allocation_expression = true;
preferences.insert_space_before_closing_bracket_in_array_allocation_expression = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test448", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test448", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5763,7 +5768,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_space_after_opening_bracket_in_array_allocation_expression = true;
preferences.insert_space_before_closing_bracket_in_array_allocation_expression = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test449", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test449", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5773,7 +5778,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
Map options = DefaultCodeFormatterConstants.getEclipse21Settings();
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test450", "A.java", CodeFormatter.K_UNKNOWN, 0, false, 0, 0);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test450", "A.js", CodeFormatter.K_UNKNOWN, 0, false, 0, 0);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5785,9 +5790,9 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
assertNotNull("No preferences", options);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- String input = getZipEntryContents(resourcePath, getIn("Format.java"));
+ String input = getZipEntryContents(resourcePath, getIn("Format.js"));
assertNotNull("No input", input);
- String output = getZipEntryContents(resourcePath, getOut("Format.java"));
+ String output = getZipEntryContents(resourcePath, getOut("Format.js"));
assertNotNull("No output", output);
int start = input.indexOf("private");
int end = input.indexOf(";");
@@ -5803,7 +5808,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_BLANK_LINES_AFTER_PACKAGE, "2");
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test452", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test452", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5816,7 +5821,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.SPACE;
preferences.tab_size = 4;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test453", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test453", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5829,9 +5834,9 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
assertNotNull("No preferences", options);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- String input = getZipEntryContents(resourcePath, getIn("A.java"));
+ String input = getZipEntryContents(resourcePath, getIn("A.js"));
assertNotNull("No input", input);
- String output = getZipEntryContents(resourcePath, getOut("A.java"));
+ String output = getZipEntryContents(resourcePath, getOut("A.js"));
assertNotNull("No output", output);
int start = input.indexOf("launch.setAttribute");
int end = input.indexOf(";", start + 1);
@@ -5846,7 +5851,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_NUMBER_OF_EMPTY_LINES_TO_PRESERVE, "1");//$NON-NLS-1$
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test455", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test455", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5859,9 +5864,9 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
preferences.number_of_empty_lines_to_preserve = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- String input = getZipEntryContents(resourcePath, getIn("A.java"));
+ String input = getZipEntryContents(resourcePath, getIn("A.js"));
assertNotNull("No input", input);
- String output = getZipEntryContents(resourcePath, getOut("A.java"));
+ String output = getZipEntryContents(resourcePath, getOut("A.js"));
assertNotNull("No output", output);
int start = input.indexOf("launch.setAttribute");
int end = input.indexOf(";", start + 1);
@@ -5875,7 +5880,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
Map options = DefaultCodeFormatterConstants.getEclipse21Settings();
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test457", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test457", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5883,7 +5888,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
*/
public void test458() {
CodeFormatter codeFormatter = ToolFactory.createCodeFormatter(null);
- runTest(codeFormatter, "test458", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test458", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5907,7 +5912,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
));
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test459", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test459", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5924,7 +5929,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
));
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test460", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test460", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5934,7 +5939,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
Map options = DefaultCodeFormatterConstants.getEclipse21Settings();
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test461", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test461", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5953,7 +5958,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterConstants.INDENT_DEFAULT));
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test462", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test462", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5970,7 +5975,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
preferences.number_of_empty_lines_to_preserve = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test463", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test463", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -5992,7 +5997,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test464", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test464", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6015,7 +6020,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterConstants.INDENT_BY_ONE));
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test465", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test465", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6038,7 +6043,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterConstants.INDENT_BY_ONE));
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test466", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test466", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6061,7 +6066,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterConstants.INDENT_BY_ONE));
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test467", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test467", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6077,7 +6082,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test468", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test468", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6093,7 +6098,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test469", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test469", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6107,7 +6112,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.SPACE;
preferences.tab_size = 4;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test470", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test470", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6122,7 +6127,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_KEEP_EMPTY_ARRAY_INITIALIZER_ON_ONE_LINE, DefaultCodeFormatterConstants.TRUE);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test471", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test471", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6137,7 +6142,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_KEEP_EMPTY_ARRAY_INITIALIZER_ON_ONE_LINE, DefaultCodeFormatterConstants.TRUE);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test472", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test472", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6152,7 +6157,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_KEEP_EMPTY_ARRAY_INITIALIZER_ON_ONE_LINE, DefaultCodeFormatterConstants.TRUE);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test473", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test473", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6167,7 +6172,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_KEEP_EMPTY_ARRAY_INITIALIZER_ON_ONE_LINE, DefaultCodeFormatterConstants.TRUE);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test474", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test474", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6183,7 +6188,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_KEEP_EMPTY_ARRAY_INITIALIZER_ON_ONE_LINE, DefaultCodeFormatterConstants.TRUE);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test475", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test475", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6214,7 +6219,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_BINARY_OPERATOR, JavaCore.INSERT);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test476", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test476", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6288,7 +6293,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, options);
- runTest(codeFormatter, "test478", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test478", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6298,7 +6303,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
Map options = DefaultCodeFormatterConstants.getEclipse21Settings();
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test479", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test479", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6309,7 +6314,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
preferences.number_of_empty_lines_to_preserve = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test480", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test480", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6319,7 +6324,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
Map options = DefaultCodeFormatterConstants.getEclipse21Settings();
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test481", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test481", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6330,7 +6335,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_CLOSING_BRACE_IN_BLOCK, JavaCore.DO_NOT_INSERT);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test482", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test482", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6341,7 +6346,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_CLOSING_BRACE_IN_BLOCK, JavaCore.DO_NOT_INSERT);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test483", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test483", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6352,7 +6357,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_NUMBER_OF_EMPTY_LINES_TO_PRESERVE, "1");//$NON-NLS-1$
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test484", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test484", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6363,7 +6368,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_NUMBER_OF_EMPTY_LINES_TO_PRESERVE, "1");//$NON-NLS-1$
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test485", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test485", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6379,14 +6384,14 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_ANONYMOUS_TYPE_DECLARATION, DefaultCodeFormatterConstants.NEXT_LINE);//$NON-NLS-1$
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test486", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test486", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test487() {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test487", "A.java", CodeFormatter.K_COMPILATION_UNIT, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test487", "A.js", CodeFormatter.K_COMPILATION_UNIT, true);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test488() {
@@ -6395,7 +6400,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test488", "A.java", CodeFormatter.K_COMPILATION_UNIT, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test488", "A.js", CodeFormatter.K_COMPILATION_UNIT, true);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test489() {
@@ -6406,7 +6411,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test489", "A.java", CodeFormatter.K_COMPILATION_UNIT, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test489", "A.js", CodeFormatter.K_COMPILATION_UNIT, true);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6422,7 +6427,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test490", "A.java", CodeFormatter.K_COMPILATION_UNIT, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test490", "A.js", CodeFormatter.K_COMPILATION_UNIT, true);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6434,7 +6439,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
assertNotNull("No preferences", options);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test491", "BundleChain.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test491", "BundleChain.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6447,7 +6452,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(JavaCore.COMPILER_PB_NON_NLS_STRING_LITERAL, JavaCore.ERROR);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, options);
- runTest(codeFormatter, "test492", "Main.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test492", "Main.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6461,7 +6466,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_BLANK_LINES_BEFORE_IMPORTS, "1");
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test493", "MyClass.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test493", "MyClass.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6473,7 +6478,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
assertNotNull("No preferences", options);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, options);
- runTest(codeFormatter, "test494", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test494", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6486,7 +6491,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.SPACE;
preferences.tab_size = 4;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test495", "A.java", CodeFormatter.K_COMPILATION_UNIT, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test495", "A.js", CodeFormatter.K_COMPILATION_UNIT, true);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6501,7 +6506,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.keep_guardian_clause_on_one_line = true;
preferences.blank_lines_before_first_class_body_declaration = 1;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test496", "A.java", CodeFormatter.K_COMPILATION_UNIT, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test496", "A.js", CodeFormatter.K_COMPILATION_UNIT, true);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test497() {
@@ -6511,7 +6516,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.blank_lines_before_first_class_body_declaration = 1;
preferences.tab_size = 4;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test497", "A.java", CodeFormatter.K_COMPILATION_UNIT, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test497", "A.js", CodeFormatter.K_COMPILATION_UNIT, true);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test498() {
@@ -6522,7 +6527,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.keep_guardian_clause_on_one_line = true;
preferences.tab_size = 4;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test498", "A.java", CodeFormatter.K_COMPILATION_UNIT, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test498", "A.js", CodeFormatter.K_COMPILATION_UNIT, true);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test499() {
@@ -6532,14 +6537,14 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.SPACE;
preferences.tab_size = 4;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test499", "A.java", CodeFormatter.K_COMPILATION_UNIT, true);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test499", "A.js", CodeFormatter.K_COMPILATION_UNIT, true);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test500() {
Map options = DefaultCodeFormatterConstants.getEclipse21Settings();
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test500", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test500", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6551,7 +6556,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
assertNotNull("No preferences", options);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test501", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test501", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6563,7 +6568,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_size = 4;
preferences.tab_char = DefaultCodeFormatterOptions.SPACE;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test502", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test502", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6579,7 +6584,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test503", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test503", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6603,7 +6608,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test504", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test504", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -6630,7 +6635,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test505", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test505", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -6657,7 +6662,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test506", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test506", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -6684,7 +6689,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test507", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test507", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -6711,7 +6716,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test508", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test508", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -6730,7 +6735,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_new_line_at_end_of_file_if_missing = true;
preferences.number_of_empty_lines_to_preserve = 0;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter,"test509", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter,"test509", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6746,7 +6751,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_new_line_at_end_of_file_if_missing = false;
preferences.number_of_empty_lines_to_preserve = 1;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter,"test510", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter,"test510", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6762,7 +6767,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_new_line_at_end_of_file_if_missing = false;
preferences.number_of_empty_lines_to_preserve = 1;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter,"test511", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter,"test511", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6778,7 +6783,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_new_line_at_end_of_file_if_missing = true;
preferences.number_of_empty_lines_to_preserve = 1;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter,"test512", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter,"test512", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6802,7 +6807,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test513", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test513", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -6818,7 +6823,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(JavaCore.COMPILER_PB_NON_NLS_STRING_LITERAL, JavaCore.ERROR);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, options);
- runTest(codeFormatter, "test514", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test514", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -6842,7 +6847,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test515", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test515", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -6871,7 +6876,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test516", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test516", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -6900,7 +6905,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test517", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test517", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -6929,7 +6934,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test518", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test518", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -6958,7 +6963,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test519", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test519", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -6985,7 +6990,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test520", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test520", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -7012,7 +7017,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test521", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test521", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -7039,7 +7044,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test522", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test522", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -7069,7 +7074,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test523", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test523", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -7099,7 +7104,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test524", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test524", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -7129,7 +7134,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test525", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test525", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -7159,7 +7164,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test526", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test526", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -7186,7 +7191,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test527", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test527", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -7213,7 +7218,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test528", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test528", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -7240,7 +7245,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test529", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test529", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -7267,7 +7272,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test530", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test530", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -7294,7 +7299,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test531", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test531", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -7321,7 +7326,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test532", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test532", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -7348,7 +7353,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test533", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test533", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -7375,7 +7380,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test534", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test534", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -7402,7 +7407,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test535", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test535", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -7431,7 +7436,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test536", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test536", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -7460,7 +7465,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test537", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test537", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -7473,7 +7478,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getJavaConventionsSettings());
preferences.tab_size = 4;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter,"test538", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter,"test538", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -7496,7 +7501,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test539", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test539", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -7522,7 +7527,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test540", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test540", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -7549,7 +7554,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test541", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test541", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -7560,7 +7565,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
preferences.tab_size = 4;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test542", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test542", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
public void test543() {
@@ -7568,7 +7573,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_size = 4;
preferences.tab_char = DefaultCodeFormatterOptions.SPACE;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test543", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test543", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -7594,7 +7599,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test544", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test544", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -7621,7 +7626,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test545", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test545", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -7636,7 +7641,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_size = 4;
preferences.tab_char = DefaultCodeFormatterOptions.SPACE;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test546", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test546", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -7648,9 +7653,9 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.SPACE;
preferences.tab_size = 4;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test547", "A.java", CodeFormatter.K_MULTI_LINE_COMMENT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test547", "A.js", CodeFormatter.K_MULTI_LINE_COMMENT, false);//$NON-NLS-1$ //$NON-NLS-2$
- runTest(codeFormatter, "test547", "A.java", CodeFormatter.K_UNKNOWN, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test547", "A.js", CodeFormatter.K_UNKNOWN, false);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -7662,9 +7667,9 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.SPACE;
preferences.tab_size = 4;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test548", "A.java", CodeFormatter.K_JAVA_DOC, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test548", "A.js", CodeFormatter.K_JAVA_DOC, false);//$NON-NLS-1$ //$NON-NLS-2$
- runTest(codeFormatter, "test548", "A.java", CodeFormatter.K_UNKNOWN, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test548", "A.js", CodeFormatter.K_UNKNOWN, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=73104
@@ -7675,7 +7680,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.indentation_size = 4;
preferences.tab_size = 8;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test549", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test549", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=73104
@@ -7686,7 +7691,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.indentation_size = 4;
preferences.tab_size = 8;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test550", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test550", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=73104
@@ -7707,7 +7712,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_size = 8;
preferences.page_width = 57;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test551", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test551", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=73104
@@ -7728,7 +7733,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_size = 8;
preferences.page_width = 57;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test552", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test552", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -7740,9 +7745,9 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.SPACE;
preferences.tab_size = 4;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test553", "A.java", CodeFormatter.K_SINGLE_LINE_COMMENT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test553", "A.js", CodeFormatter.K_SINGLE_LINE_COMMENT, false);//$NON-NLS-1$ //$NON-NLS-2$
- runTest(codeFormatter, "test553", "A.java", CodeFormatter.K_UNKNOWN, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test553", "A.js", CodeFormatter.K_UNKNOWN, false);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -7754,9 +7759,9 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.SPACE;
preferences.tab_size = 4;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test554", "A.java", CodeFormatter.K_SINGLE_LINE_COMMENT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test554", "A.js", CodeFormatter.K_SINGLE_LINE_COMMENT, false);//$NON-NLS-1$ //$NON-NLS-2$
- runTest(codeFormatter, "test554", "A.java", CodeFormatter.K_UNKNOWN, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test554", "A.js", CodeFormatter.K_UNKNOWN, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=73104
@@ -7767,7 +7772,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.indentation_size = 4;
preferences.tab_size = 8;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test555", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test555", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
/*
@@ -7779,7 +7784,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.tab_char = DefaultCodeFormatterOptions.SPACE;
preferences.tab_size = 4;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test556", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test556", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
/*
@@ -7793,7 +7798,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.keep_empty_array_initializer_on_one_line = true;
preferences.insert_space_between_empty_braces_in_array_initializer = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test557", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test557", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=89302
@@ -7817,7 +7822,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test558", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test558", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -7844,7 +7849,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test559", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test559", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -7862,7 +7867,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.brace_position_for_block = DefaultCodeFormatterConstants.NEXT_LINE;
preferences.keep_empty_array_initializer_on_one_line = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test560", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test560", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=81497
@@ -7877,7 +7882,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.brace_position_for_block = DefaultCodeFormatterConstants.NEXT_LINE;
preferences.keep_empty_array_initializer_on_one_line = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test561", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test561", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=89318
@@ -7900,7 +7905,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test562", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test562", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -7927,7 +7932,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test563", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test563", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -7945,7 +7950,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.brace_position_for_block = DefaultCodeFormatterConstants.NEXT_LINE;
preferences.keep_empty_array_initializer_on_one_line = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test564", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test564", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
/*// https://bugs.eclipse.org/bugs/show_bug.cgi?id=49896
@@ -7958,7 +7963,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.use_tabs_only_for_leading_indentations = true;
preferences.tab_char = DefaultCodeFormatterOptions.TAB;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test565", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test565", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}*/
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=73658
@@ -7982,7 +7987,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test566", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test566", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -7998,7 +8003,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.use_tabs_only_for_leading_indentations = true;
preferences.page_width = 35;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test567", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test567", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=49896
@@ -8014,7 +8019,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.use_tabs_only_for_leading_indentations = true;
preferences.page_width = 35;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test568", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test568", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=49896
@@ -8030,7 +8035,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.use_tabs_only_for_leading_indentations = false;
preferences.page_width = 40;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test569", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test569", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=77809
@@ -8053,7 +8058,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test570", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test570", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -8079,7 +8084,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test571", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test571", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -8092,7 +8097,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_space_after_opening_brace_in_array_initializer = false;
preferences.insert_space_before_closing_brace_in_array_initializer = false;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test572", "A.java", CodeFormatter.K_STATEMENTS, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test572", "A.js", CodeFormatter.K_STATEMENTS, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=90213
@@ -8100,7 +8105,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings();
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test573", "A.java", CodeFormatter.K_STATEMENTS, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test573", "A.js", CodeFormatter.K_STATEMENTS, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=91238
@@ -8108,7 +8113,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings();
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test574", "A.java", CodeFormatter.K_JAVA_DOC, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test574", "A.js", CodeFormatter.K_JAVA_DOC, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=77809
@@ -8128,7 +8133,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test575", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test575", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -8151,7 +8156,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test576", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test576", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -8162,7 +8167,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings();
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test577", "A.java", CodeFormatter.K_UNKNOWN, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test577", "A.js", CodeFormatter.K_UNKNOWN, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=98037
@@ -8170,7 +8175,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings();
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test578", "A.java", CodeFormatter.K_UNKNOWN, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test578", "A.js", CodeFormatter.K_UNKNOWN, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=98139
@@ -8178,7 +8183,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings();
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test579", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test579", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=98139
@@ -8186,7 +8191,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings();
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test580", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test580", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=99084
@@ -8206,7 +8211,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test581", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test581", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -8230,7 +8235,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test582", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test582", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -8253,7 +8258,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test583", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test583", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -8280,7 +8285,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test584", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test584", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -8307,7 +8312,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test585", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test585", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -8334,7 +8339,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test586", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test586", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -8361,7 +8366,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test587", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test587", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -8384,7 +8389,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test588", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test588", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -8395,7 +8400,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings();
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test589", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test589", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=103706
@@ -8404,7 +8409,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_EMPTY_LINES, DefaultCodeFormatterConstants.TRUE);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test590", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test590", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=103706
@@ -8413,7 +8418,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_EMPTY_LINES, DefaultCodeFormatterConstants.FALSE);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test591", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test591", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=98089
@@ -8431,7 +8436,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_METHOD_INVOCATION, JavaCore.INSERT);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test592", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test592", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=71766
@@ -8443,7 +8448,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterConstants.createAlignmentValue(false, DefaultCodeFormatterConstants.WRAP_NO_SPLIT, DefaultCodeFormatterConstants.INDENT_DEFAULT));
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test593", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test593", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=71766
public void test594() {
@@ -8452,7 +8457,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterConstants.createAlignmentValue(false, DefaultCodeFormatterConstants.WRAP_COMPACT, DefaultCodeFormatterConstants.INDENT_DEFAULT));
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test594", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test594", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=71766
public void test595() {
@@ -8461,7 +8466,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterConstants.createAlignmentValue(false, DefaultCodeFormatterConstants.WRAP_COMPACT, DefaultCodeFormatterConstants.INDENT_DEFAULT));
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test595", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test595", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=71766
public void test596() {
@@ -8470,7 +8475,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterConstants.createAlignmentValue(false, DefaultCodeFormatterConstants.WRAP_COMPACT, DefaultCodeFormatterConstants.INDENT_DEFAULT));
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test596", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test596", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=87193
public void test597() {
@@ -8482,7 +8487,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_LINE_SPLIT, "60");
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test597", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test597", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=87193
public void test598() {
@@ -8494,7 +8499,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_LINE_SPLIT, "60");
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test598", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test598", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=87193
public void test599() {
@@ -8507,14 +8512,14 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_LINE_SPLIT, "60");
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test599", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test599", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// test Scribe2.hasNLSTag()
public void test600() {
Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings();
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test600", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test600", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// Binary expression
public void _test601() {
@@ -8526,7 +8531,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_LINE_SPLIT, "60");
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test601", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test601", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=108916
public void test605() {
@@ -8551,7 +8556,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test605", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test605", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -8562,21 +8567,21 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_PARENTHESIZED_EXPRESSION_IN_RETURN, JavaCore.DO_NOT_INSERT);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test606", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test606", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=111270
public void test607() {
Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings();
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test607", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test607", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=111270
public void _test608() {
Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings();
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test608", "A.java", CodeFormatter.K_JAVA_DOC, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test608", "A.js", CodeFormatter.K_JAVA_DOC, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=116858
public void test609() {
@@ -8585,7 +8590,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.indent_switchstatements_compare_to_cases = true;
preferences.indent_switchstatements_compare_to_switch = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test609", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test609", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=122914
@@ -8596,7 +8601,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
assertNotNull("No preferences", options);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test610", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test610", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -8688,7 +8693,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test612", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test612", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -8714,7 +8719,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test613", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test613", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -8724,21 +8729,21 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings();
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test614", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test614", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=128848
public void test615() {
Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings();
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test615", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test615", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=128848
public void test616() {
Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings();
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test616", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test616", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=131013
public void test617() {
@@ -8752,21 +8757,21 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterConstants.INDENT_ON_COLUMN));
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test617", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test617", "A.js", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=137224
public void test618() {
Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings();
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test618", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test618", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=137224
public void test619() {
Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings();
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test619", "A.java", CodeFormatter.K_CLASS_BODY_DECLARATIONS, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test619", "A.js", CodeFormatter.K_CLASS_BODY_DECLARATIONS, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=139291
public void test620() {
@@ -8786,7 +8791,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test620", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test620", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -8809,7 +8814,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test621", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test621", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -8831,7 +8836,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test622", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test622", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -8853,7 +8858,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test623", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test623", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -8875,7 +8880,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test624", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test624", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -8891,7 +8896,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
DefaultCodeFormatterConstants.INDENT_DEFAULT));
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test625", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test625", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=152725
public void test626() {
@@ -8910,7 +8915,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_6);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_6);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test626", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test626", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -8934,7 +8939,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test627", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test627", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -8957,7 +8962,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test628", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test628", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -8980,7 +8985,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions);
- runTest(codeFormatter, "test629", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test629", "A.js", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$
} finally {
JavaCore.setOptions(javaCoreOptions);
}
@@ -8993,7 +8998,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
preferences.insert_space_before_closing_paren_in_parenthesized_expression = true;
preferences.insert_space_before_parenthesized_expression_in_throw = true;
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test630", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test630", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=158267
@@ -9004,7 +9009,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_PARENTHESIZED_EXPRESSION_IN_THROW, JavaCore.INSERT);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test631", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test631", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=158267
@@ -9016,7 +9021,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_PARENTHESIZED_EXPRESSION_IN_THROW, JavaCore.DO_NOT_INSERT);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test632", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test632", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=165210
@@ -9025,7 +9030,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_BLANK_LINES_BETWEEN_IMPORT_GROUPS, "3");
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test633", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test633", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=165210
@@ -9034,7 +9039,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_BLANK_LINES_BETWEEN_IMPORT_GROUPS, "1");
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test634", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test634", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=165210
@@ -9044,7 +9049,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_BLANK_LINES_AFTER_IMPORTS, "0");
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test635", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test635", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=165210
@@ -9053,7 +9058,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_BLANK_LINES_BETWEEN_IMPORT_GROUPS, "3");
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test636", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test636", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=165210
@@ -9062,7 +9067,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_BLANK_LINES_BETWEEN_IMPORT_GROUPS, "2");
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test637", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test637", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=165210
@@ -9071,7 +9076,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_BLANK_LINES_BETWEEN_IMPORT_GROUPS, "1");
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test638", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test638", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=165210
@@ -9080,7 +9085,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_BLANK_LINES_BETWEEN_IMPORT_GROUPS, "2");
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test639", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test639", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=165210
@@ -9089,7 +9094,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_BLANK_LINES_BETWEEN_IMPORT_GROUPS, "1");
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test640", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test640", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=168109
@@ -9102,7 +9107,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE, "4");
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test641", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test641", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=166962
@@ -9112,7 +9117,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
assertNotNull("No preferences", options);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test642", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test642", "A.js", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=171634
public void test643() {
@@ -9120,7 +9125,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AT_END_OF_FILE_IF_MISSING, JavaCore.INSERT);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test643", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test643", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=171634
public void test644() {
@@ -9128,7 +9133,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AT_END_OF_FILE_IF_MISSING, JavaCore.INSERT);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test644", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test644", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=171634
public void test645() {
@@ -9136,7 +9141,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AT_END_OF_FILE_IF_MISSING, JavaCore.INSERT);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test645", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test645", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=171634
public void test646() {
@@ -9144,7 +9149,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AT_END_OF_FILE_IF_MISSING, JavaCore.DO_NOT_INSERT);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test646", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test646", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=171634
public void test647() {
@@ -9152,7 +9157,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AT_END_OF_FILE_IF_MISSING, JavaCore.DO_NOT_INSERT);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test647", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test647", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=171634
public void test648() {
@@ -9161,7 +9166,7 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_NUMBER_OF_EMPTY_LINES_TO_PRESERVE, "0");
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test648", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test648", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=171634
public void test649() {
@@ -9170,48 +9175,48 @@ public class FormatterRegressionTests extends AbstractJavaModelTests {
options.put(DefaultCodeFormatterConstants.FORMATTER_NUMBER_OF_EMPTY_LINES_TO_PRESERVE, "0");
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test649", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test649", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=172848
public void test650() {
final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings();
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test650", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test650", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=172848
public void test651() {
final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings();
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test651", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test651", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=172848
public void test652() {
final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings();
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test652", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test652", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=172848
public void test653() {
final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings();
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test653", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test653", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=172848
public void test654() {
final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings();
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test654", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test654", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=172848
public void test655() {
final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings();
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test655", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+ runTest(codeFormatter, "test655", "A.js");//$NON-NLS-1$ //$NON-NLS-2$
}
}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AbstractJavaModelTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AbstractJavaModelTests.java
index 148877e..4024171 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AbstractJavaModelTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AbstractJavaModelTests.java
@@ -23,6 +23,7 @@ import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.wst.jsdt.core.*;
import org.eclipse.wst.jsdt.core.compiler.CharOperation;
import org.eclipse.wst.jsdt.core.compiler.IProblem;
+import org.eclipse.wst.jsdt.core.compiler.libraries.SystemLibraries;
import org.eclipse.wst.jsdt.core.dom.ASTNode;
import org.eclipse.wst.jsdt.core.dom.CompilationUnit;
import org.eclipse.wst.jsdt.core.search.*;
@@ -104,7 +105,7 @@ public abstract class AbstractJavaModelTests extends SuiteOfTestCases {
copy[deltas.length]= ev.getDelta();
deltas= copy;
- new Throwable("Caller of IElementChangedListener#elementChanged").printStackTrace(new PrintStream(this.stackTraces));
+// new Throwable("Caller of IElementChangedListener#elementChanged").printStackTrace(new PrintStream(this.stackTraces));
}
public CompilationUnit getCompilationUnitAST(ICompilationUnit workingCopy) {
for (int i=0, length= this.deltas.length; i<length; i++) {
@@ -251,24 +252,35 @@ public abstract class AbstractJavaModelTests extends SuiteOfTestCases {
protected void addLibrary(IJavaProject javaProject, String jarName, String sourceZipName, String[] pathAndContents, String compliance) throws CoreException, IOException {
addLibrary(javaProject, jarName, sourceZipName, pathAndContents, null, null, compliance);
}
- protected void addLibrary(IJavaProject javaProject, String jarName, String sourceZipName, String[] pathAndContents, String[] librariesInclusionPatterns, String[] librariesExclusionPatterns, String compliance) throws CoreException, IOException {
+ protected void addLibrary(IJavaProject javaProject, String libraryPath, String sourceZipName, String[] pathAndContents, String[] librariesInclusionPatterns, String[] librariesExclusionPatterns, String compliance) throws CoreException, IOException {
IProject project = javaProject.getProject();
String projectLocation = project.getLocation().toOSString();
- String jarPath = projectLocation + File.separator + jarName;
- String sourceZipPath = projectLocation + File.separator + sourceZipName;
- org.eclipse.wst.jsdt.core.tests.util.Util.createJar(pathAndContents, jarPath, compliance);
- org.eclipse.wst.jsdt.core.tests.util.Util.createSourceZip(pathAndContents, sourceZipPath);
- project.refreshLocal(IResource.DEPTH_INFINITE, null);
- String projectPath = '/' + project.getName() + '/';
- addLibraryEntry(
- javaProject,
- new Path(projectPath + jarName),
- new Path(projectPath + sourceZipName),
- null,
- toIPathArray(librariesInclusionPatterns),
- toIPathArray(librariesExclusionPatterns),
- true
- );
+ boolean projectbased=libraryPath==null;
+ if (projectbased)
+ libraryPath=projectLocation;
+
+ for (int i = 0; i < pathAndContents.length; i+=2) {
+
+ String jarPath = libraryPath + File.separator + pathAndContents[i];
+ org.eclipse.wst.jsdt.core.tests.util.Util.createFile(jarPath, pathAndContents[i+1]);
+ if (projectbased)
+ project.refreshLocal(IResource.DEPTH_INFINITE, null);
+ String projectPath = '/' + project.getName() + '/';
+ Path path = (projectbased) ?
+ new Path(projectPath + pathAndContents[i]) :
+ new Path(jarPath);
+ addLibraryEntry(
+ javaProject,
+ path,
+ null,
+ null,
+ toIPathArray(librariesInclusionPatterns),
+ toIPathArray(librariesExclusionPatterns),
+ true
+ );
+
+ }
+
}
protected void addLibraryEntry(String path, boolean exported) throws JavaModelException {
addLibraryEntry(this.currentProject, new Path(path), null, null, null, null, exported);
@@ -685,7 +697,7 @@ public abstract class AbstractJavaModelTests extends SuiteOfTestCases {
}
public boolean convertToIndependantLineDelimiter(File file) {
- return file.getName().endsWith(".java");
+ return file.getName().endsWith(".js");
}
/**
@@ -1357,19 +1369,21 @@ public abstract class AbstractJavaModelTests extends SuiteOfTestCases {
* Returns the IPath to the external java class library (e.g. jclMin.jar)
*/
protected IPath getExternalJCLPath(String compliance) {
- return new Path(getExternalJCLPathString(compliance));
+ return new Path(getExternalJCLPathString(compliance));
}
/**
* Returns the java.io path to the external java class library (e.g. jclMin.jar)
*/
protected String getExternalJCLPathString() {
- return getExternalJCLPathString("");
+ return SystemLibraries.getLibraryPath("system.js");
+// return getExternalJCLPathString("");
}
/**
* Returns the java.io path to the external java class library (e.g. jclMin.jar)
*/
protected String getExternalJCLPathString(String compliance) {
- return getExternalPath() + "jclMin" + compliance + ".jar";
+ return SystemLibraries.getLibraryPath("system.js");
+// return getExternalPath() + "jclMin" + compliance + ".jar";
}
/**
* Returns the IPath to the root source of the external java class library (e.g. "src")
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AbstractJavaSearchTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AbstractJavaSearchTests.java
index 64314a4..f92bf37 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AbstractJavaSearchTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AbstractJavaSearchTests.java
@@ -115,11 +115,12 @@ public class AbstractJavaSearchTests extends AbstractJavaModelTests implements I
if (parent instanceof IInitializer) {
IInitializer initializer = (IInitializer)parent;
append(initializer);
- } else { // IMethod
+ line.append(".");
+ } else if (parent instanceof IMethod){ // IMethod
IMethod method = (IMethod)parent;
append(method);
+ line.append(".");
}
- line.append(".");
line.append(localVar.getElementName());
unit = (ICompilationUnit)localVar.getAncestor(IJavaElement.COMPILATION_UNIT);
} else if (element instanceof ITypeParameter) {
@@ -246,13 +247,16 @@ public class AbstractJavaSearchTests extends AbstractJavaModelTests implements I
line.append("{}");
}
private void append(IMethod method) throws JavaModelException {
- if (!method.isConstructor()) {
+ if (!method.isConstructor() && method.getReturnType()!=null) {
line.append(Signature.toString(method.getReturnType()));
line.append(" ");
}
- append(method.getDeclaringType());
- if (!method.isConstructor()) {
+ if (method.getDeclaringType()!=null)
+ {
+ append(method.getDeclaringType());
line.append(".");
+ }
+ if (!method.isConstructor()) {
line.append(method.getElementName());
}
line.append("(");
@@ -514,7 +518,7 @@ protected JavaSearchResultCollector resultCollector;
}
}
IJavaSearchScope getJavaSearchScope() {
- return SearchEngine.createJavaSearchScope(new IJavaProject[] {getJavaProject("JavaSearch")});
+ return SearchEngine.createJavaSearchScope(new IJavaProject[] {getJavaProject("JSSearch")});
}
IJavaSearchScope getJavaSearchScope15() {
return SearchEngine.createJavaSearchScope(new IJavaProject[] {getJavaProject("JavaSearch15")});
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AbstractJavadocCompletionModelTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AbstractJavadocCompletionModelTest.java
index a9891b0..ae6c9ad 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AbstractJavadocCompletionModelTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AbstractJavadocCompletionModelTest.java
@@ -483,7 +483,7 @@ public abstract class AbstractJavadocCompletionModelTest extends AbstractJavaMod
String fileName = (typeName.length() <= 3) ? typeName : typeName.substring(0, typeName.length()-3);
fileName = fileName + testName.substring(4);
names[i][1] = fileName;
- names[i][2] = packageDir.getAbsolutePath()+"\\"+fileName+".java";
+ names[i][2] = packageDir.getAbsolutePath()+"\\"+fileName+".js";
}
// Write modified contents
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AccessRestrictionsTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AccessRestrictionsTests.java
index d444587..8d20b04 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AccessRestrictionsTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AccessRestrictionsTests.java
@@ -72,7 +72,7 @@ public void test001() throws CoreException {
"bin");
this.problemRequestor = new ProblemRequestor();
x1 = getWorkingCopy(
- "/P1/src/p/X1.java",
+ "/P1/src/p/X1.js",
"package p;\n" +
"public class X1 {\n" +
" void foo() {\n" +
@@ -86,7 +86,7 @@ public void test001() throws CoreException {
"----------\n"
);
x2 = getWorkingCopy(
- "/P1/src/p/X2.java",
+ "/P1/src/p/X2.js",
"package p;\n" +
"public class X2 extends X1 {\n" +
" void bar() {\n" +
@@ -112,7 +112,7 @@ public void test001() throws CoreException {
"}";
this.problemRequestor = new ProblemRequestor(src);
z = getWorkingCopy(
- "/P2/src/p/Z.java",
+ "/P2/src/p/Z.js",
src,
owner,
this.problemRequestor);
@@ -136,7 +136,7 @@ public void test001() throws CoreException {
"}";
this.problemRequestor = new ProblemRequestor(src);
y = getWorkingCopy(
- "/P2/src/p/Y.java",
+ "/P2/src/p/Y.js",
src,
owner,
this.problemRequestor);
@@ -179,7 +179,7 @@ public void test002() throws CoreException {
"bin");
this.problemRequestor = new ProblemRequestor();
x1 = getWorkingCopy(
- "/P1/src/p/X1.java",
+ "/P1/src/p/X1.js",
"package p;\n" +
"public class X1 {\n" +
" int m1;\n" +
@@ -192,7 +192,7 @@ public void test002() throws CoreException {
"----------\n"
);
x2 = getWorkingCopy(
- "/P1/src/p/X2.java",
+ "/P1/src/p/X2.js",
"package p;\n" +
"public class X2 extends X1 {\n" +
" char m2;\n" +
@@ -221,7 +221,7 @@ public void test002() throws CoreException {
"}";
this.problemRequestor = new ProblemRequestor(src);
y = getWorkingCopy(
- "/P2/src/p/Y.java",
+ "/P2/src/p/Y.js",
src,
owner,
this.problemRequestor);
@@ -262,7 +262,7 @@ public void test003() throws CoreException {
"bin");
this.problemRequestor = new ProblemRequestor();
x1 = getWorkingCopy(
- "/P1/src/p/X1.java",
+ "/P1/src/p/X1.js",
"package p;\n" +
"public class X1 {\n" +
" class C1 {\n" +
@@ -279,7 +279,7 @@ public void test003() throws CoreException {
"----------\n"
);
x2 = getWorkingCopy(
- "/P1/src/p/X2.java",
+ "/P1/src/p/X2.js",
"package p;\n" +
"public class X2 extends X1 {\n" +
" class C2 {}\n" +
@@ -317,7 +317,7 @@ public void test003() throws CoreException {
"}";
this.problemRequestor = new ProblemRequestor(src);
y = getWorkingCopy(
- "/P2/src/p/Y.java",
+ "/P2/src/p/Y.js",
src,
owner,
this.problemRequestor);
@@ -380,7 +380,7 @@ public void test004() throws CoreException {
"bin");
this.problemRequestor = new ProblemRequestor();
x1 = getWorkingCopy(
- "/P1/src/p/X1.java",
+ "/P1/src/p/X1.js",
"package p;\n" +
"public class X1 {\n" +
" class C1 {}\n" +
@@ -406,7 +406,7 @@ public void test004() throws CoreException {
"}";
this.problemRequestor = new ProblemRequestor(src);
z = getWorkingCopy(
- "/P2/src/p/Z.java",
+ "/P2/src/p/Z.js",
src,
owner,
this.problemRequestor);
@@ -452,7 +452,7 @@ public void test005() throws CoreException {
"bin");
this.problemRequestor = new ProblemRequestor();
x1 = getWorkingCopy(
- "/P1/src/p/X1.java",
+ "/P1/src/p/X1.js",
"package p;\n" +
"public class X1 {\n" +
" public void foo() {\n" +
@@ -466,7 +466,7 @@ public void test005() throws CoreException {
"----------\n"
);
i1 = getWorkingCopy(
- "/P1/src/q/I1.java",
+ "/P1/src/q/I1.js",
"package q;\n" +
"interface I1 {\n" +
" void foo();\n" +
@@ -479,7 +479,7 @@ public void test005() throws CoreException {
"----------\n"
);
x2 = getWorkingCopy(
- "/P1/src/q/X2.java",
+ "/P1/src/q/X2.js",
"package q;\n" +
"public class X2 extends p.X1 {\n" +
" public void bar() {\n" +
@@ -514,7 +514,7 @@ public void test005() throws CoreException {
"}";
this.problemRequestor = new ProblemRequestor(src);
y = getWorkingCopy(
- "/P2/src/r/Y.java",
+ "/P2/src/r/Y.js",
src,
owner,
this.problemRequestor);
@@ -559,7 +559,7 @@ public void test006() throws CoreException {
p1.setOption(JavaCore.COMPILER_PB_RAW_TYPE_REFERENCE, JavaCore.IGNORE);
this.problemRequestor = new ProblemRequestor();
x = getWorkingCopy(
- "/P1/src/p/X.java",
+ "/P1/src/p/X.js",
"package p;\n" +
"public class X<T> {\n" +
" T m;\n" +
@@ -593,7 +593,7 @@ public void test006() throws CoreException {
"}";
this.problemRequestor = new ProblemRequestor(src);
y = getWorkingCopy(
- "/P2/src/p/Y.java",
+ "/P2/src/p/Y.js",
src,
owner,
this.problemRequestor);
@@ -651,7 +651,7 @@ public void test007() throws CoreException {
p1.setOption(JavaCore.COMPILER_PB_RAW_TYPE_REFERENCE, JavaCore.IGNORE);
this.problemRequestor = new ProblemRequestor();
x = getWorkingCopy(
- "/P1/src/p/X.java",
+ "/P1/src/p/X.js",
"package p;\n" +
"public class X<T extends String> {\n" +
" T m;\n" +
@@ -688,7 +688,7 @@ public void test007() throws CoreException {
"}";
this.problemRequestor = new ProblemRequestor(src);
y = getWorkingCopy(
- "/P2/src/p/Y.java",
+ "/P2/src/p/Y.js",
src,
owner,
this.problemRequestor);
@@ -746,7 +746,7 @@ public void test008() throws CoreException {
p1.setOption(JavaCore.COMPILER_PB_RAW_TYPE_REFERENCE, JavaCore.IGNORE);
this.problemRequestor = new ProblemRequestor();
x1 = getWorkingCopy(
- "/P1/src/p/X1.java",
+ "/P1/src/p/X1.js",
"package p;\n" +
"public class X1<T> {\n" +
" void foo() {\n" +
@@ -760,7 +760,7 @@ public void test008() throws CoreException {
"----------\n"
);
x2 = getWorkingCopy(
- "/P1/src/p/X2.java",
+ "/P1/src/p/X2.js",
"package p;\n" +
"public class X2 extends X1 {\n" +
" void bar() {\n" +
@@ -792,7 +792,7 @@ public void test008() throws CoreException {
"}";
this.problemRequestor = new ProblemRequestor(src);
y = getWorkingCopy(
- "/P2/src/p/Y.java",
+ "/P2/src/p/Y.js",
src,
owner,
this.problemRequestor);
@@ -836,7 +836,7 @@ public void test009() throws CoreException {
p1.setOption(JavaCore.COMPILER_PB_RAW_TYPE_REFERENCE, JavaCore.IGNORE);
this.problemRequestor = new ProblemRequestor();
x1 = getWorkingCopy(
- "/P1/src/p/X1.java",
+ "/P1/src/p/X1.js",
"package p;\n" +
"public class X1<T> {\n" +
" int m1;\n" +
@@ -849,7 +849,7 @@ public void test009() throws CoreException {
"----------\n"
);
x2 = getWorkingCopy(
- "/P1/src/p/X2.java",
+ "/P1/src/p/X2.js",
"package p;\n" +
"public class X2 extends X1 {\n" +
" char m2;\n" +
@@ -881,7 +881,7 @@ public void test009() throws CoreException {
"}";
this.problemRequestor = new ProblemRequestor(src);
y = getWorkingCopy(
- "/P2/src/p/Y.java",
+ "/P2/src/p/Y.js",
src,
owner,
this.problemRequestor);
@@ -925,7 +925,7 @@ public void test010() throws CoreException {
p1.setOption(JavaCore.COMPILER_PB_RAW_TYPE_REFERENCE, JavaCore.IGNORE);
this.problemRequestor = new ProblemRequestor();
x1 = getWorkingCopy(
- "/P1/src/p/X1.java",
+ "/P1/src/p/X1.js",
"package p;\n" +
"public class X1<T> {\n" +
" class C1 {\n" +
@@ -942,7 +942,7 @@ public void test010() throws CoreException {
"----------\n"
);
x2 = getWorkingCopy(
- "/P1/src/p/X2.java",
+ "/P1/src/p/X2.js",
"package p;\n" +
"public class X2 extends X1 {\n" +
" class C2 {}\n" +
@@ -984,7 +984,7 @@ public void test010() throws CoreException {
"}";
this.problemRequestor = new ProblemRequestor(src);
y = getWorkingCopy(
- "/P2/src/p/Y.java",
+ "/P2/src/p/Y.js",
src,
owner,
this.problemRequestor);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AttachSourceTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AttachSourceTests.java
index 8f50a6d..79d192c 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AttachSourceTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AttachSourceTests.java
@@ -77,7 +77,7 @@ public void setUpSuite() throws Exception {
}
private void setUpGenericJar() throws IOException, CoreException {
String[] pathAndContents = new String[] {
- "generic/X.java",
+ "generic/X.js",
"package generic;\n" +
"public class X<T> {\n" +
" void foo(X<T> x) {\n" +
@@ -113,7 +113,7 @@ private void setUpGenericJar() throws IOException, CoreException {
}
private void setUpInnerClassesJar() throws IOException, CoreException {
String[] pathAndContents = new String[] {
- "inner/X.java",
+ "inner/X.js",
"package inner;\n" +
"public class X {\n" +
" void foo() {\n" +
@@ -304,7 +304,7 @@ public void testClassFileInOutput() throws CoreException {
}
/**
* Retrieves the source code for "A.class", which is
- * the entire CU for "A.java".
+ * the entire CU for "A.js".
*/
public void testClassRetrieval() throws JavaModelException {
IClassFile objectCF = this.pkgFragmentRoot.getPackageFragment("x.y").getClassFile("A.class");
@@ -629,7 +629,7 @@ public void testProjectAsClassFolder1() throws CoreException {
createJavaProject("P1");
createFolder("/P1/p");
createFile(
- "/P1/p/X.java",
+ "/P1/p/X.js",
"package p;\n" +
"public class X {\n" +
"}"
@@ -661,7 +661,7 @@ public void testProjectAsClassFolder2() throws CoreException {
try {
createJavaProject("P1");
createFile(
- "/P1/X.java",
+ "/P1/X.js",
"public class X {\n" +
"}"
);
@@ -690,7 +690,7 @@ public void testProjectAsSourceAttachment() throws CoreException {
try {
IJavaProject javaProject = createJavaProject("Test", new String[]{""}, new String[]{"/AttachSourceTests/test.jar"}, "");
createFolder("/Test/test1");
- createFile("/Test/test1/Test.java",
+ createFile("/Test/test1/Test.js",
"package test1;\n" +
"\n" +
"public class Test {}");
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AttachedJavadocTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AttachedJavadocTests.java
index 6933870..ea7847d 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AttachedJavadocTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AttachedJavadocTests.java
@@ -466,7 +466,7 @@ public class AttachedJavadocTests extends ModifyingResourceTests {
// ensure no side-effect
ProblemRequestor problemRequestor = new ProblemRequestor();
workingCopy = getWorkingCopy(
- "/AttachedJavadocProject/src/Test.java",
+ "/AttachedJavadocProject/src/Test.js",
"import p2.Y;\n" +
"public class Test extends Y { }",
new WorkingCopyOwner() {},
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/BufferTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/BufferTests.java
index 94118d2..b764c01 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/BufferTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/BufferTests.java
@@ -17,6 +17,7 @@ import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.wst.jsdt.core.*;
+
import junit.framework.Test;
public class BufferTests extends ModifyingResourceTests implements IBufferChangedListener {
@@ -76,7 +77,7 @@ public static Test suite() {
*/
public void testAppend() throws CoreException {
IBuffer buffer = this.createBuffer(
- "P/x/y/A.java",
+ "P/x/y/A.js",
"package x.y;\n" +
"public class A {\n" +
"}"
@@ -105,8 +106,9 @@ public void testAppendReadOnly() throws CoreException {
IBuffer buffer = null;
try {
createJavaProject("P1", new String[] {}, new String[] {"JCL_LIB,JCL_SRC,JCL_SRCROOT"}, "");
- IClassFile classFile = getClassFile("P1", getExternalJCLPathString(), "java.lang", "String.class");
- buffer = classFile.getBuffer();
+// IClassFile classFile = getClassFile("P1", getExternalJCLPathString(), "", "system.js");
+ ICompilationUnit unit=getCompilationUnit("P1", getExternalJCLPathString(), "", "system.js");
+ buffer = unit.getBuffer();
buffer.addBufferChangedListener(this);
this.events = new ArrayList();
buffer.append("\nclass B {}");
@@ -129,7 +131,7 @@ public void testAppendReadOnly() throws CoreException {
}
public void testClose() throws CoreException {
IBuffer buffer = this.createBuffer(
- "P/x/y/A.java",
+ "P/x/y/A.js",
"package x.y;\n" +
"public class A {\n" +
"}"
@@ -148,17 +150,17 @@ public void testClose() throws CoreException {
*/
public void testGetUnderlyingResource() throws CoreException {
IBuffer buffer = this.createBuffer(
- "P/x/y/A.java",
+ "P/x/y/A.js",
"package x.y;\n" +
"public class A {\n" +
"}"
);
ICompilationUnit copy = null;
try {
- IFile file = this.getFile("P/x/y/A.java");
+ IFile file = this.getFile("P/x/y/A.js");
assertEquals("Unexpected underlying resource", file, buffer.getUnderlyingResource());
- copy = this.getCompilationUnit("P/x/y/A.java").getWorkingCopy(null);
+ copy = this.getCompilationUnit("P/x/y/A.js").getWorkingCopy(null);
assertEquals("Unexpected underlying resource 2", file, copy.getBuffer().getUnderlyingResource());
} finally {
this.deleteBuffer(buffer);
@@ -172,7 +174,7 @@ public void testGetUnderlyingResource() throws CoreException {
*/
public void testDeleteBeginning() throws CoreException {
IBuffer buffer = this.createBuffer(
- "P/x/y/A.java",
+ "P/x/y/A.js",
"package x.y;\n" +
"public class A {\n" +
"}"
@@ -196,7 +198,7 @@ public void testDeleteBeginning() throws CoreException {
*/
public void testDeleteMiddle() throws CoreException {
IBuffer buffer = this.createBuffer(
- "P/x/y/A.java",
+ "P/x/y/A.js",
"package x.y;\n" +
"public class A {\n" +
"}"
@@ -222,7 +224,7 @@ public void testDeleteMiddle() throws CoreException {
*/
public void testDeleteEnd() throws CoreException {
IBuffer buffer = this.createBuffer(
- "P/x/y/A.java",
+ "P/x/y/A.js",
"package x.y;\n" +
"public class A {\n" +
"}"
@@ -246,7 +248,7 @@ public void testDeleteEnd() throws CoreException {
*/
public void testGetChar() throws CoreException {
IBuffer buffer = this.createBuffer(
- "P/x/y/A.java",
+ "P/x/y/A.js",
"package x.y;\n" +
"public class A {\n" +
"}"
@@ -263,7 +265,7 @@ public void testGetChar() throws CoreException {
*/
public void testGetChar2() throws CoreException {
IBuffer buffer = this.createBuffer(
- "P/x/y/A.java",
+ "P/x/y/A.js",
"package x.y;\n" +
"public class A {\n" +
"}"
@@ -280,7 +282,7 @@ public void testGetChar2() throws CoreException {
*/
public void testGetLength() throws CoreException {
IBuffer buffer = this.createBuffer(
- "P/x/y/A.java",
+ "P/x/y/A.js",
"package x.y;\n" +
"public class A {\n" +
"}"
@@ -296,7 +298,7 @@ public void testGetLength() throws CoreException {
*/
public void testGetText() throws CoreException {
IBuffer buffer = this.createBuffer(
- "P/x/y/A.java",
+ "P/x/y/A.js",
"package x.y;\n" +
"public class A {\n" +
"}"
@@ -314,7 +316,7 @@ public void testGetText() throws CoreException {
*/
public void testInsertBeginning() throws CoreException {
IBuffer buffer = this.createBuffer(
- "P/x/y/A.java",
+ "P/x/y/A.js",
"package x.y;\n" +
"public class A {\n" +
"}"
@@ -340,7 +342,7 @@ public void testInsertBeginning() throws CoreException {
*/
public void testReplaceBeginning() throws CoreException {
IBuffer buffer = this.createBuffer(
- "P/x/y/A.java",
+ "P/x/y/A.js",
"package x.y;\n" +
"public class A {\n" +
"}"
@@ -365,7 +367,7 @@ public void testReplaceBeginning() throws CoreException {
*/
public void testReplaceMiddle() throws CoreException {
IBuffer buffer = this.createBuffer(
- "P/x/y/A.java",
+ "P/x/y/A.js",
"package x.y;\n" +
"public class A {\n" +
"}"
@@ -391,7 +393,7 @@ public void testReplaceMiddle() throws CoreException {
*/
public void testReplaceEnd() throws CoreException {
IBuffer buffer = this.createBuffer(
- "P/x/y/A.java",
+ "P/x/y/A.js",
"package x.y;\n" +
"public class A {\n" +
"}"
@@ -418,7 +420,7 @@ public void testReplaceEnd() throws CoreException {
*/
public void testInsertMiddle() throws CoreException {
IBuffer buffer = this.createBuffer(
- "P/x/y/A.java",
+ "P/x/y/A.js",
"package x.y;\n" +
"public class A {\n" +
"}"
@@ -445,7 +447,7 @@ public void testInsertMiddle() throws CoreException {
*/
public void testInsertEnd() throws CoreException {
IBuffer buffer = this.createBuffer(
- "P/x/y/A.java",
+ "P/x/y/A.js",
"package x.y;\n" +
"public class A {\n" +
"}"
@@ -469,40 +471,40 @@ public void testInsertEnd() throws CoreException {
}
}
-/**
- * Tests replacing text within a buffer using a create import
- * (regression test for PR #1G7A0WI).
- */
-public void testCreateImport() throws CoreException {
- IFile file = this.createFile(
- "P/x/y/A.java",
- "package x.y;\n" +
- "public class A {\n" +
- "}"
- );
- ICompilationUnit copy = null;
- IBuffer buffer = null;
- try {
- copy = this.getCompilationUnit("P/x/y/A.java").getWorkingCopy(null);
- buffer = copy.getBuffer();
- buffer.addBufferChangedListener(this);
- this.events = new ArrayList();
- copy.createImport("java.io.IOException", null, null);
- assertBufferEvents(
- "(12, 0) import java.io.IOException;\n" +
- "(12, 0) \n" +
- "\n"
- ); // A.java has a \n line delimiter
- } finally {
- if (buffer != null) {
- buffer.removeBufferChangedListener(this);
- }
- if (copy != null) {
- copy.discardWorkingCopy();
- }
- deleteResource(file);
- }
-}
+///**
+// * Tests replacing text within a buffer using a create import
+// * (regression test for PR #1G7A0WI).
+// */
+//public void testCreateImport() throws CoreException {
+// IFile file = this.createFile(
+// "P/x/y/A.js",
+// "package x.y;\n" +
+// "public class A {\n" +
+// "}"
+// );
+// ICompilationUnit copy = null;
+// IBuffer buffer = null;
+// try {
+// copy = this.getCompilationUnit("P/x/y/A.js").getWorkingCopy(null);
+// buffer = copy.getBuffer();
+// buffer.addBufferChangedListener(this);
+// this.events = new ArrayList();
+// copy.createImport("java.io.IOException", null, null);
+// assertBufferEvents(
+// "(12, 0) import java.io.IOException;\n" +
+// "(12, 0) \n" +
+// "\n"
+// ); // A.js has a \n line delimiter
+// } finally {
+// if (buffer != null) {
+// buffer.removeBufferChangedListener(this);
+// }
+// if (copy != null) {
+// copy.discardWorkingCopy();
+// }
+// deleteResource(file);
+// }
+//}
/**
* Verify the buffer changed event.
* The given text must contain '\n' line separators.
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClassFileTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClassFileTests.java
index 71436ce..0b31243 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClassFileTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClassFileTests.java
@@ -47,11 +47,11 @@ public void setUpSuite() throws Exception {
super.setUpSuite();
IJavaProject javaProject = createJavaProject("P");
String[] pathAndContents = new String[] {
- "nongeneric/A.java",
+ "nongeneric/A.js",
"package nongeneric;\n" +
"public class A {\n" +
"}",
- "generic/X.java",
+ "generic/X.js",
"package generic;\n" +
"public class X<T> {\n" +
" <U extends Exception> X<T> foo(X<T> x) throws RuntimeException, U {\n" +
@@ -61,40 +61,40 @@ public void setUpSuite() throws Exception {
" return value;\n" +
" }\n" +
"}",
- "generic/Y.java",
+ "generic/Y.js",
"package generic;\n" +
"public class Y<K, L> {\n" +
"}",
- "generic/Z.java",
+ "generic/Z.js",
"package generic;\n" +
"public class Z<T extends Object & I<? super T>> {\n" +
"}",
- "generic/I.java",
+ "generic/I.js",
"package generic;\n" +
"public interface I<T> {\n" +
"}",
- "generic/W.java",
+ "generic/W.js",
"package generic;\n" +
"public class W<T extends X<T> , U extends T> {\n" +
"}",
- "generic/V.java",
+ "generic/V.js",
"package generic;\n" +
"public class V extends X<Thread> implements I<String> {\n" +
"}",
- "varargs/X.java",
+ "varargs/X.js",
"package varargs;\n" +
"public class X {\n" +
" void foo(String s, Object ... others) {\n" +
" }\n" +
"}",
- "workingcopy/X.java",
+ "workingcopy/X.js",
"package workingcopy;\n" +
"public class X {\n" +
" void foo() {\n" +
" System.out.println();\n" +
" }\n" +
"}",
- "workingcopy/Y.java",
+ "workingcopy/Y.js",
"package workingcopy;\n" +
"public class Y<W> {\n" +
" <T> T foo(T t, String... args) {\n" +
@@ -123,7 +123,7 @@ protected void tearDown() throws Exception {
private IClassFile createClassFile(String contents) throws CoreException, IOException {
IJavaProject project = getJavaProject("P");
- addLibrary(project, "lib2.jar", "src2.zip", new String[] {"p/X.java", contents}, "1.5");
+ addLibrary(project, "lib2.jar", "src2.zip", new String[] {"p/X.js", contents}, "1.5");
this.classFile = project.getPackageFragmentRoot(getFile("/P/lib2.jar")).getPackageFragment("p").getClassFile("X.class");
return this.classFile;
}
@@ -828,7 +828,7 @@ public void testWorkingCopy08() throws CoreException {
);
this.workingCopy.makeConsistent(null);
- ICompilationUnit cu = getCompilationUnit("/P/Y.java");
+ ICompilationUnit cu = getCompilationUnit("/P/Y.js");
ICompilationUnit copy = null;
try {
ProblemRequestor problemRequestor = new ProblemRequestor();
@@ -863,7 +863,7 @@ public void testWorkingCopy09() throws CoreException {
this.workingCopy.getBuffer().setContents( "");
this.workingCopy.makeConsistent(null);
- ICompilationUnit cu = getCompilationUnit("/P/Y.java");
+ ICompilationUnit cu = getCompilationUnit("/P/Y.js");
ICompilationUnit copy = null;
try {
ProblemRequestor problemRequestor = new ProblemRequestor();
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClassNameTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClassNameTests.java
index e6fe0c7..eb3f40d 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClassNameTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClassNameTests.java
@@ -55,7 +55,7 @@ protected void setUp() throws Exception {
TEST_PROJECT = createJavaProject("TestProject", sourceFolders, new String[] {"JCL_LIB"}, "bin");
createFolder("/TestProject/src0/org/eclipse/jdt/core/test0");
createFile(
- "/TestProject/src0/org/eclipse/jdt/core/test0/Foo.java",
+ "/TestProject/src0/org/eclipse/jdt/core/test0/Foo.js",
"package org.eclipse.wst.jsdt.core.test0;\n" +
"public class Foo {\n" +
" class InFoo {}\n" +
@@ -65,7 +65,7 @@ protected void setUp() throws Exception {
"}\n"
);
createFile(
- "/TestProject/src1/Foo.java",
+ "/TestProject/src1/Foo.js",
"public class Foo {\n" +
" class InFoo {}\n" +
"}\n" +
@@ -76,7 +76,7 @@ protected void setUp() throws Exception {
int length = SF_LENGTH - 1;
createFolder("/TestProject/src"+length+"/org/eclipse/jdt/core/test"+length);
createFile(
- "/TestProject/src"+length+"/org/eclipse/jdt/core/test"+length+"/Foo.java",
+ "/TestProject/src"+length+"/org/eclipse/jdt/core/test"+length+"/Foo.js",
"package org.eclipse.wst.jsdt.core.test"+length+";\n" +
"public class Foo {\n" +
"}\n" +
@@ -84,7 +84,7 @@ protected void setUp() throws Exception {
"}\n"
);
createFile(
- "/TestProject/src"+length+"/org/eclipse/jdt/core/test"+length+"/Test.java",
+ "/TestProject/src"+length+"/org/eclipse/jdt/core/test"+length+"/Test.js",
"package org.eclipse.wst.jsdt.core.test"+length+";\n" +
"public class Test {\n" +
" public static void main(String[] args) {\n" +
@@ -546,7 +546,7 @@ public void testFindTypeWithDot() throws JavaModelException, CoreException {
IJavaProject javaProject = createJavaProject("P", new String[] {""}, "");
this.createFolder("/P/p");
this.createFile(
- "/P/p/X.java",
+ "/P/p/X.js",
"package p;\n" +
"public class X {\n" +
" public class Y {\n" +
@@ -1111,7 +1111,7 @@ public void testFindSecondaryType_Bug72179() throws JavaModelException, CoreExce
IJavaProject javaProject = createJavaProject("P", new String[] {""}, "");
createFolder("/P/p1");
createFile(
- "/P/p1/jc.java",
+ "/P/p1/jc.js",
"package p1;\n" +
"class jc008{}\n" +
"class jc009{}\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClasspathInitializerTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClasspathInitializerTests.java
index 911d581..fbaf82d 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClasspathInitializerTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClasspathInitializerTests.java
@@ -255,7 +255,7 @@ public void testContainerInitializer04() throws CoreException {
simulateExitRestart();
startDeltas();
- createFile("/P2/X.java", "public class X {}");
+ createFile("/P2/X.js", "public class X {}");
assertEquals("Should not get exception", null, initializer.exception);
@@ -291,7 +291,7 @@ public void testContainerInitializer05() throws CoreException {
startDeltas();
// will trigger classpath resolution (with null container value)
- createFile("/P1/X.java", "public class X {}");
+ createFile("/P1/X.js", "public class X {}");
assertDeltas(
"Unexpected delta on startup",
"P1[*]: {CHILDREN}\n" +
@@ -355,7 +355,7 @@ public void testContainerInitializer06() throws CoreException {
simulateExitRestart();
startDeltas();
- workingCopy = getCompilationUnit("/P2/src/X.java");
+ workingCopy = getCompilationUnit("/P2/src/X.js");
workingCopy.becomeWorkingCopy(null, null);
assertDeltas(
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClasspathTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClasspathTests.java
index 8489365..db7b18c 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClasspathTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClasspathTests.java
@@ -352,7 +352,7 @@ public void testClasspathForceReload() throws CoreException {
public void testClasspathCreateLibraryEntry() throws CoreException {
try {
IJavaProject proj = this.createJavaProject("P", new String[] {"src"}, "bin");
- this.createFile("P/src/X.java", "public class X {}");
+ this.createFile("P/src/X.js", "public class X {}");
this.createFile("P/src/X.class", "");
IFolder rootFolder = proj.getProject().getFolder(new Path("src"));
@@ -2016,8 +2016,8 @@ public void testEncodeDecodeEntry02() {
"</classpathentry>\n",
JavaCore.newSourceEntry(
new Path("/P/src"),
- new IPath[] {new Path("**/Y.java")},
- new IPath[] {new Path("**/X.java")},
+ new IPath[] {new Path("**/Y.js")},
+ new IPath[] {new Path("**/X.js")},
new Path("/P/bin"),
new IClasspathAttribute[] {JavaCore.newClasspathAttribute("attrName", "some value")})
);
@@ -2050,7 +2050,7 @@ public void testEncodeDecodeEntry04() {
new Path("/P/lib.jar"),
new Path("/P/src.zip"),
new Path("root"),
- new IAccessRule[] {JavaCore.newAccessRule(new Path("**/A*.java"), IAccessRule.K_ACCESSIBLE)},
+ new IAccessRule[] {JavaCore.newAccessRule(new Path("**/A*.js"), IAccessRule.K_ACCESSIBLE)},
new IClasspathAttribute[] {JavaCore.newClasspathAttribute("attr1", "val1")},
true)
);
@@ -2073,7 +2073,7 @@ public void testEncodeDecodeEntry05() {
new Path("/P/lib.jar"),
new Path("/P/src.zip"),
new Path("root"),
- new IAccessRule[] {JavaCore.newAccessRule(new Path("**/A*.java"), IAccessRule.K_ACCESSIBLE | IAccessRule.IGNORE_IF_BETTER)},
+ new IAccessRule[] {JavaCore.newAccessRule(new Path("**/A*.js"), IAccessRule.K_ACCESSIBLE | IAccessRule.IGNORE_IF_BETTER)},
new IClasspathAttribute[] {JavaCore.newClasspathAttribute("attr1", "val1")},
true)
);
@@ -3258,11 +3258,11 @@ public void testNoResourceChange03() throws CoreException {
try {
IJavaProject project = createJavaProject("P", new String[] {"src1"}, "bin");
createFile(
- "/P/src1/X.java",
+ "/P/src1/X.js",
"public class X {\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("/P/src1/X.java");
+ ICompilationUnit cu = getCompilationUnit("/P/src1/X.js");
cu.open(null);
IClasspathEntry[] newClasspath = createClasspath("P", new String[] {"/P/src2", ""});
project.setRawClasspath(newClasspath, false/*cannot modify resources*/, null/*no progress*/);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CodeCorrectionTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CodeCorrectionTests.java
index a3dff41..71258be 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CodeCorrectionTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CodeCorrectionTests.java
@@ -132,7 +132,7 @@ public static Test suite() {
public void testCorrectFieldType1() throws JavaModelException {
CorrectionEngine engine = new CorrectionEngine(JavaCore.getOptions());
CodeCorrectionTestsRequestor requestor = new CodeCorrectionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectFieldType1.java");
+ ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectFieldType1.js");
IMarker[] markers = getMarkers(cu);
assertTrue("should have one problem",markers.length == 1);
engine.computeCorrections(markers[0], null, 0, requestor);
@@ -161,7 +161,7 @@ public void testCorrectFieldType1() throws JavaModelException {
public void testCorrectFieldType2() throws JavaModelException {
CorrectionEngine engine = new CorrectionEngine(JavaCore.getOptions());
CodeCorrectionTestsRequestor requestor = new CodeCorrectionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectFieldType2.java");
+ ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectFieldType2.js");
IMarker[] markers = getMarkers(cu);
assertTrue("should have one problem",markers.length == 1);
engine.computeCorrections(markers[0], null, 0, requestor);
@@ -190,7 +190,7 @@ public void testCorrectFieldType2() throws JavaModelException {
public void testCorrectFieldType3() throws CoreException {
CorrectionEngine engine = new CorrectionEngine(JavaCore.getOptions());
CodeCorrectionTestsRequestor requestor = new CodeCorrectionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectFieldType3.java");
+ ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectFieldType3.js");
IMarker marker = getMarker(cu, "AClassz cannot be resolved to a type");
assertTrue("Marker not found", marker != null);
try {
@@ -222,7 +222,7 @@ public void testCorrectFieldType3() throws CoreException {
public void testCorrectLocalVariableType1() throws JavaModelException {
CorrectionEngine engine = new CorrectionEngine(JavaCore.getOptions());
CodeCorrectionTestsRequestor requestor = new CodeCorrectionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectLocalVariableType1.java");
+ ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectLocalVariableType1.js");
IMarker[] markers = getMarkers(cu);
assertTrue("should have one problem",markers.length == 1);
engine.computeCorrections(markers[0], null, 0, requestor);
@@ -251,7 +251,7 @@ public void testCorrectLocalVariableType1() throws JavaModelException {
public void testCorrectLocalVariableType2() throws JavaModelException {
CorrectionEngine engine = new CorrectionEngine(JavaCore.getOptions());
CodeCorrectionTestsRequestor requestor = new CodeCorrectionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectLocalVariableType2.java");
+ ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectLocalVariableType2.js");
IMarker[] markers = getMarkers(cu);
assertTrue("should have one problem",markers.length == 1);
engine.computeCorrections(markers[0], null, 0, requestor);
@@ -280,7 +280,7 @@ public void testCorrectLocalVariableType2() throws JavaModelException {
public void testCorrectImport1() throws JavaModelException {
CorrectionEngine engine = new CorrectionEngine(JavaCore.getOptions());
CodeCorrectionTestsRequestor requestor = new CodeCorrectionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectImport1.java");
+ ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectImport1.js");
IMarker[] markers = getMarkers(cu);
assertTrue("should have one problem",markers.length == 1);
engine.computeCorrections(markers[0], null, 0, requestor);
@@ -309,7 +309,7 @@ public void testCorrectImport1() throws JavaModelException {
public void testCorrectImport2() throws JavaModelException {
CorrectionEngine engine = new CorrectionEngine(JavaCore.getOptions());
CodeCorrectionTestsRequestor requestor = new CodeCorrectionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectImport2.java");
+ ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectImport2.js");
IMarker[] markers = getMarkers(cu);
assertTrue("should have one problem",markers.length == 1);
engine.computeCorrections(markers[0], null, 0, requestor);
@@ -338,7 +338,7 @@ public void testCorrectImport2() throws JavaModelException {
public void testCorrectImport3() throws JavaModelException {
CorrectionEngine engine = new CorrectionEngine(JavaCore.getOptions());
CodeCorrectionTestsRequestor requestor = new CodeCorrectionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectImport3.java");
+ ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectImport3.js");
IMarker[] markers = getMarkers(cu);
assertTrue("should have one problem",markers.length == 1);
engine.computeCorrections(markers[0], null, 0, requestor);
@@ -367,7 +367,7 @@ public void testCorrectImport3() throws JavaModelException {
public void testCorrectSuperClass1() throws JavaModelException {
CorrectionEngine engine = new CorrectionEngine(JavaCore.getOptions());
CodeCorrectionTestsRequestor requestor = new CodeCorrectionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectSuperClass1.java");
+ ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectSuperClass1.js");
IMarker[] markers = getMarkers(cu);
assertTrue("should have one problem",markers.length == 1);
engine.computeCorrections(markers[0], null, 0, requestor);
@@ -396,7 +396,7 @@ public void testCorrectSuperClass1() throws JavaModelException {
public void testCorrectSuperClass2() throws JavaModelException {
CorrectionEngine engine = new CorrectionEngine(JavaCore.getOptions());
CodeCorrectionTestsRequestor requestor = new CodeCorrectionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectSuperClass2.java");
+ ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectSuperClass2.js");
IMarker[] markers = getMarkers(cu);
assertTrue("should have one problem",markers.length == 1);
engine.computeCorrections(markers[0], null, 0, requestor);
@@ -425,7 +425,7 @@ public void testCorrectSuperClass2() throws JavaModelException {
public void testCorrectSuperInterface1() throws JavaModelException {
CorrectionEngine engine = new CorrectionEngine(JavaCore.getOptions());
CodeCorrectionTestsRequestor requestor = new CodeCorrectionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectSuperInterface1.java");
+ ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectSuperInterface1.js");
IMarker[] markers = getMarkers(cu);
assertTrue("should have one problem",markers.length == 1);
engine.computeCorrections(markers[0], null, 0, requestor);
@@ -454,7 +454,7 @@ public void testCorrectSuperInterface1() throws JavaModelException {
public void testCorrectSuperInterface2() throws JavaModelException {
CorrectionEngine engine = new CorrectionEngine(JavaCore.getOptions());
CodeCorrectionTestsRequestor requestor = new CodeCorrectionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectSuperInterface2.java");
+ ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectSuperInterface2.js");
IMarker[] markers = getMarkers(cu);
assertTrue("should have one problem",markers.length == 1);
engine.computeCorrections(markers[0], null, 0, requestor);
@@ -480,7 +480,7 @@ public void testCorrectSuperInterface2() throws JavaModelException {
public void testCorrectException1() throws JavaModelException {
CorrectionEngine engine = new CorrectionEngine(JavaCore.getOptions());
CodeCorrectionTestsRequestor requestor = new CodeCorrectionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectException1.java");
+ ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectException1.js");
IMarker[] markers = getMarkers(cu);
assertTrue("should have one problem",markers.length == 1);
engine.computeCorrections(markers[0], null, 0, requestor);
@@ -509,7 +509,7 @@ public void testCorrectException1() throws JavaModelException {
public void testCorrectException2() throws JavaModelException {
CorrectionEngine engine = new CorrectionEngine(JavaCore.getOptions());
CodeCorrectionTestsRequestor requestor = new CodeCorrectionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectException2.java");
+ ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectException2.js");
IMarker[] markers = getMarkers(cu);
assertTrue("should have one problem",markers.length == 1);
engine.computeCorrections(markers[0], null, 0, requestor);
@@ -535,7 +535,7 @@ public void testCorrectException2() throws JavaModelException {
public void testCorrectMethod1() throws JavaModelException {
CorrectionEngine engine = new CorrectionEngine(JavaCore.getOptions());
CodeCorrectionTestsRequestor requestor = new CodeCorrectionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectMethod1.java");
+ ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectMethod1.js");
IMarker[] markers = getMarkers(cu);
assertTrue("should have one problem",markers.length == 1);
engine.computeCorrections(markers[0], null, 0, requestor);
@@ -561,7 +561,7 @@ public void testCorrectMethod1() throws JavaModelException {
public void testCorrectMethod2() throws JavaModelException {
CorrectionEngine engine = new CorrectionEngine(JavaCore.getOptions());
CodeCorrectionTestsRequestor requestor = new CodeCorrectionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectMethod2.java");
+ ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectMethod2.js");
IMarker[] markers = getMarkers(cu);
assertTrue("should have one problem",markers.length == 1);
engine.computeCorrections(markers[0], null, 0, requestor);
@@ -587,7 +587,7 @@ public void testCorrectMethod2() throws JavaModelException {
public void testCorrectField1() throws JavaModelException {
CorrectionEngine engine = new CorrectionEngine(JavaCore.getOptions());
CodeCorrectionTestsRequestor requestor = new CodeCorrectionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectField1.java");
+ ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectField1.js");
IMarker[] markers = getMarkers(cu);
assertTrue("should have one problem",markers.length == 1);
engine.computeCorrections(markers[0], null, 0, requestor);
@@ -613,7 +613,7 @@ public void testCorrectField1() throws JavaModelException {
public void testCorrectField2() throws JavaModelException {
CorrectionEngine engine = new CorrectionEngine(JavaCore.getOptions());
CodeCorrectionTestsRequestor requestor = new CodeCorrectionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectField2.java");
+ ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectField2.js");
IMarker[] markers = getMarkers(cu);
assertTrue("should have one problem",markers.length == 1);
engine.computeCorrections(markers[0], null, 0, requestor);
@@ -639,7 +639,7 @@ public void testCorrectField2() throws JavaModelException {
public void testCorrectLocalVariable1() throws JavaModelException {
CorrectionEngine engine = new CorrectionEngine(JavaCore.getOptions());
CodeCorrectionTestsRequestor requestor = new CodeCorrectionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectLocalVariable1.java");
+ ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectLocalVariable1.js");
IMarker[] markers = getMarkers(cu);
assertTrue("should have one problem",markers.length == 1);
engine.computeCorrections(markers[0], null, 0, requestor);
@@ -665,7 +665,7 @@ public void testCorrectLocalVariable1() throws JavaModelException {
public void testCorrectArgument1() throws JavaModelException {
CorrectionEngine engine = new CorrectionEngine(JavaCore.getOptions());
CodeCorrectionTestsRequestor requestor = new CodeCorrectionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectArgument1.java");
+ ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectArgument1.js");
IMarker[] markers = getMarkers(cu);
assertTrue("should have one problem",markers.length == 1);
engine.computeCorrections(markers[0], null, 0, requestor);
@@ -691,7 +691,7 @@ public void testCorrectArgument1() throws JavaModelException {
public void testCorrectReturnType1() throws JavaModelException {
CorrectionEngine engine = new CorrectionEngine(JavaCore.getOptions());
CodeCorrectionTestsRequestor requestor = new CodeCorrectionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectReturnType1.java");
+ ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectReturnType1.js");
IMarker[] markers = getMarkers(cu);
assertTrue("should have one problem",markers.length == 1);
engine.computeCorrections(markers[0], null, 0, requestor);
@@ -720,7 +720,7 @@ public void testCorrectReturnType1() throws JavaModelException {
public void testCorrectReturnType2() throws JavaModelException {
CorrectionEngine engine = new CorrectionEngine(JavaCore.getOptions());
CodeCorrectionTestsRequestor requestor = new CodeCorrectionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectReturnType2.java");
+ ICompilationUnit cu= getCompilationUnit("CodeCorrection", "src", "", "CorrectReturnType2.js");
IMarker[] markers = getMarkers(cu);
assertTrue("should have one problem",markers.length == 1);
engine.computeCorrections(markers[0], null, 0, requestor);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompilationUnitTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompilationUnitTests.java
index b660201..1c34f01 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompilationUnitTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompilationUnitTests.java
@@ -13,9 +13,9 @@ package org.eclipse.wst.jsdt.core.tests.model;
import java.io.IOException;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.wst.jsdt.core.*;
import org.eclipse.wst.jsdt.internal.core.*;
import org.eclipse.wst.jsdt.internal.core.util.Util;
+import org.eclipse.wst.jsdt.core.*;
import junit.framework.Test;
@@ -33,60 +33,31 @@ public void setUpSuite() throws Exception {
this.testProject = createJavaProject("P", new String[] {"src"}, new String[] {getExternalJCLPathString()}, "bin", "1.5");
createFolder("/P/src/p");
createFile(
- "/P/src/p/X.java",
+ "/P/src/p/X.js",
"\n\n" + // package now includes comment (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=93880)
// => need some empty line at beginning to be able to have cu without any other element (see testGetElementAt())
"/* some comment */" +
- "package p;\n" +
- "import p2.*;\n" +
- "import p3.Z;\n" +
- "public class X implements Runnable {\n" +
- " public int f1;\n" +
+ " var f1=1;\n" +
" /** @deprecated\n */" +
- " protected Object f2;\n" +
- " private X f3;\n" +
- " java.lang.String f4;\n" +
- " int f5, f6, f7;\n" +
- " @Deprecated\n" +
- " int f8;\n" +
- " public class Inner {\n" +
- " class InnerInner {\n" +
- " }\n" +
+ " var f2;\n" +
+ " var f3;\n" +
+ " var f4;\n" +
+ " var f5, f6, f7;\n" +
+ " // @Deprecated\n" +
+ " var f8;\n" +
+ " function foo( y) {\n" +
" }\n" +
- " public void foo(Y y) throws IOException {\n" +
- " }\n" +
- " protected static Object bar() {\n" +
+ " function bar() {\n" +
" }\n" +
" /** @deprecated\n */" +
- " private int fred() {\n" +
- " }\n" +
- " @Deprecated\n" +
- " private void fred2() {\n" +
- " }\n" +
- " void testIsVarArgs(String s, Object ... args) {\n" +
+ " function fred() {\n" +
" }\n" +
- " X(String... s) {\n" +
+ " // @Deprecated\n" +
+ " function fred2() {\n" +
" }\n" +
- "}\n" +
- "/** @deprecated\n */" +
- "interface I {\n" +
- " int run();\n" +
- "}\n" +
- "interface I2<E> {\n" +
- "}\n" +
- "@Deprecated\n" +
- "interface I3 {\n" +
- "}\n" +
- "class Y<E> implements I2<E> {\n" +
- "}\n" +
- "enum Colors {\n" +
- " BLUE, WHITE, RED;\n" +
- "}\n" +
- "@interface /*c*/ Annot {\n" +
- " String field();\n" +
- "}"
+ ""
);
- this.cu = getCompilationUnit("/P/src/p/X.java");
+ this.cu = getCompilationUnit("/P/src/p/X.js");
}
// Use this static initializer to specify subset for tests
@@ -111,7 +82,7 @@ public void tearDownSuite() throws Exception {
}
private ICompilationUnit createWorkingCopy(String source) throws JavaModelException {
- this.workingCopy = getCompilationUnit("/P/src/p/Y.java").getWorkingCopy(new WorkingCopyOwner(){}, null, null);
+ this.workingCopy = getCompilationUnit("/P/src/p/Y.js").getWorkingCopy(new WorkingCopyOwner(){}, null, null);
this.workingCopy.getBuffer().setContents(source);
this.workingCopy.makeConsistent(null);
return workingCopy;
@@ -127,9 +98,48 @@ private ICompilationUnit createWorkingCopy(String source) throws JavaModelExcept
* and org.eclipse.wst.jsdt.internal.compiler.parser.JavadocParser#checkDeprecation(int)
*/
private ICompilationUnit createWorkingCopyComputingProblems(String source) throws JavaModelException {
- this.workingCopy = getWorkingCopy("/P/src/p/Y.java", source, true);
+ this.workingCopy = getWorkingCopy("/P/src/p/Y.js", source, true);
return this.workingCopy;
}
+
+
+public void test00Class() throws CoreException {
+ try {
+
+ String source =
+ "MyClass.prototype.someMethod = MyClass_someMethod;\n" +
+ "function MyClass()\n" +
+ "{\n" +
+ "this.field1=0;\n" +
+ "}\n" +
+ "function MyClass_someMethod()\n" +
+ "{\n" +
+ "}";
+ createFile("/P/src/X.js", source);
+ final ICompilationUnit compilationUnit = getCompilationUnit("/P/src/X.js");
+ IType type = compilationUnit.getType("MyClass");
+ assertTrue("Type not defined", type.exists());
+
+ IField[] fields= type.getFields();
+ assertEquals("Wrong number of fields returned", 1, fields.length);
+ assertEquals("Incorrect name for the field", "field1", fields[0].getElementName());
+ assertTrue("Field should exist " , fields[0].exists());
+
+ IMethod[] methods= type.getMethods();
+ assertEquals("Wrong number of methods returned", 2, methods.length);
+ assertEquals("Incorrect name for the method", "someMethod", methods[0].getElementName());
+ assertTrue("Field should exist " ,methods[0].exists());
+
+
+ } finally {
+ deleteFile("/P/src/X.js");
+ }
+}
+
+
+
+
+
/**
* Calls methods that do nothing to ensure code coverage
*/
@@ -155,26 +165,26 @@ public void testCommitWorkingCopy() {
* Ensure that the deprecated flag is correctly reported
* (regression test fo bug 23207 Flags.isDeprecated(IMethod.getFlags()) doesn't work)
*/
-public void testDeprecatedFlag01() throws JavaModelException {
- IType type = this.cu.getType("X");
- assertTrue("Type X should not be deprecated", !Flags.isDeprecated(type.getFlags()));
-}
-
+//public void testDeprecatedFlag01() throws JavaModelException {
+// IType type = this.cu.getType("X");
+// assertTrue("Type X should not be deprecated", !Flags.isDeprecated(type.getFlags()));
+//}
+//
/*
* Ensure that the deprecated flag is correctly reported
* (regression test fo bug 23207 Flags.isDeprecated(IMethod.getFlags()) doesn't work)
*/
-public void testDeprecatedFlag02() throws JavaModelException {
- IType type = this.cu.getType("I");
- assertTrue("Type I should be deprecated", Flags.isDeprecated(type.getFlags()));
-}
+//public void testDeprecatedFlag02() throws JavaModelException {
+// IType type = this.cu.getType("I");
+// assertTrue("Type I should be deprecated", Flags.isDeprecated(type.getFlags()));
+//}
/*
* Ensure that the deprecated flag is correctly reported
* (regression test fo bug 23207 Flags.isDeprecated(IMethod.getFlags()) doesn't work)
*/
public void testDeprecatedFlag03() throws JavaModelException {
- IField field = this.cu.getType("X").getField("f1");
+ IField field = this.cu.getField("f1");
assertTrue("Field f1 should not be deprecated", !Flags.isDeprecated(field.getFlags()));
}
@@ -183,7 +193,7 @@ public void testDeprecatedFlag03() throws JavaModelException {
* (regression test fo bug 23207 Flags.isDeprecated(IMethod.getFlags()) doesn't work)
*/
public void testDeprecatedFlag04() throws JavaModelException {
- IField field = this.cu.getType("X").getField("f2");
+ IField field = this.cu.getField("f2");
assertTrue("Field f2 should be deprecated", Flags.isDeprecated(field.getFlags()));
}
@@ -192,7 +202,7 @@ public void testDeprecatedFlag04() throws JavaModelException {
* (regression test fo bug 23207 Flags.isDeprecated(IMethod.getFlags()) doesn't work)
*/
public void testDeprecatedFlag05() throws JavaModelException {
- IMethod method = this.cu.getType("X").getMethod("bar", new String[]{});
+ IMethod method = this.cu.getMethod("bar", new String[]{});
assertTrue("Method bar should not be deprecated", !Flags.isDeprecated(method.getFlags()));
}
@@ -201,7 +211,7 @@ public void testDeprecatedFlag05() throws JavaModelException {
* (regression test fo bug 23207 Flags.isDeprecated(IMethod.getFlags()) doesn't work)
*/
public void testDeprecatedFlag06() throws JavaModelException {
- IMethod method = this.cu.getType("X").getMethod("fred", new String[]{});
+ IMethod method = this.cu.getMethod("fred", new String[]{});
assertTrue("Method fred should be deprecated", Flags.isDeprecated(method.getFlags()));
}
@@ -233,26 +243,6 @@ public void testDeprecatedFlag09() throws JavaModelException {
}
/*
- * Ensures that the primary type of a cu can be found.
- */
-public void testFindPrimaryType1() throws JavaModelException {
- ICompilationUnit unit = getCompilationUnit("/P/src/p/X.java");
- assertElementEquals(
- "Unexpected primary type",
- "X [in X.java [in p [in src [in P]]]]",
- unit.findPrimaryType());
-}
-
-/*
- * Ensures that findPrimaryType() doesn't throw an exception if the cu name is invalid.
- * (regression test for bug 120865 ICompilationUnit.findPrimaryType(..) should not throw internal AFE)
- */
-public void testFindPrimaryType2() throws JavaModelException {
- ICompilationUnit unit = getPackage("/P/src/p").getCompilationUnit("A.B.java");
- assertNull("Unexpected primary type", unit.findPrimaryType());
-}
-
-/*
* Ensures that the categories for a class are correct.
*/
public void testGetCategories01() throws CoreException {
@@ -567,9 +557,9 @@ public void testGetChildrenForCategory01() throws CoreException {
IJavaElement[] children = workingCopy.getType("Y").getChildrenForCategory("test");
assertElementsEqual(
"Unexpected children",
- "field [in Y [in [Working copy] Y.java [in p [in src [in P]]]]]\n" +
- "foo1() [in Y [in [Working copy] Y.java [in p [in src [in P]]]]]\n" +
- "foo2() [in Y [in [Working copy] Y.java [in p [in src [in P]]]]]",
+ "field [in Y [in [Working copy] Y.js [in p [in src [in P]]]]]\n" +
+ "foo1() [in Y [in [Working copy] Y.js [in p [in src [in P]]]]]\n" +
+ "foo2() [in Y [in [Working copy] Y.js [in p [in src [in P]]]]]",
children);
}
@@ -597,8 +587,8 @@ public void testGetChildrenForCategory02() throws CoreException {
IJavaElement[] children = workingCopy.getType("Y").getChildrenForCategory("test1");
assertElementsEqual(
"Unexpected children",
- "Member [in Y [in [Working copy] Y.java [in p [in src [in P]]]]]\n" +
- "foo1() [in Y [in [Working copy] Y.java [in p [in src [in P]]]]]",
+ "Member [in Y [in [Working copy] Y.js [in p [in src [in P]]]]]\n" +
+ "foo1() [in Y [in [Working copy] Y.js [in p [in src [in P]]]]]",
children);
}
public void testGetChildrenForCategory03() throws CoreException, IOException {
@@ -626,29 +616,29 @@ public void testGetChildrenForCategory03() throws CoreException, IOException {
IJavaElement[] tests = this.workingCopy.getType("Y").getChildrenForCategory("test");
assertElementsEqual(
"Unexpected children",
- "field [in Y [in [Working copy] Y.java [in p [in src [in P]]]]]\n" +
- "foo1() [in Y [in [Working copy] Y.java [in p [in src [in P]]]]]\n" +
- "foo2() [in Y [in [Working copy] Y.java [in p [in src [in P]]]]]",
+ "field [in Y [in [Working copy] Y.js [in p [in src [in P]]]]]\n" +
+ "foo1() [in Y [in [Working copy] Y.js [in p [in src [in P]]]]]\n" +
+ "foo2() [in Y [in [Working copy] Y.js [in p [in src [in P]]]]]",
tests);
IJavaElement[] methods = this.workingCopy.getType("Y").getChildrenForCategory("methods");
assertElementsEqual(
"Unexpected children",
- "foo1() [in Y [in [Working copy] Y.java [in p [in src [in P]]]]]\n" +
- "foo2() [in Y [in [Working copy] Y.java [in p [in src [in P]]]]]\n" +
- "foo3() [in Y [in [Working copy] Y.java [in p [in src [in P]]]]]",
+ "foo1() [in Y [in [Working copy] Y.js [in p [in src [in P]]]]]\n" +
+ "foo2() [in Y [in [Working copy] Y.js [in p [in src [in P]]]]]\n" +
+ "foo3() [in Y [in [Working copy] Y.js [in p [in src [in P]]]]]",
methods);
IJavaElement[] others = this.workingCopy.getType("Y").getChildrenForCategory("other");
assertElementsEqual(
"Unexpected children",
- "foo3() [in Y [in [Working copy] Y.java [in p [in src [in P]]]]]",
+ "foo3() [in Y [in [Working copy] Y.js [in p [in src [in P]]]]]",
others);
IJavaElement[] all = this.workingCopy.getType("Y").getChildrenForCategory("all");
assertElementsEqual(
"Unexpected children",
- "field [in Y [in [Working copy] Y.java [in p [in src [in P]]]]]\n" +
- "foo1() [in Y [in [Working copy] Y.java [in p [in src [in P]]]]]\n" +
- "foo2() [in Y [in [Working copy] Y.java [in p [in src [in P]]]]]\n" +
- "foo3() [in Y [in [Working copy] Y.java [in p [in src [in P]]]]]",
+ "field [in Y [in [Working copy] Y.js [in p [in src [in P]]]]]\n" +
+ "foo1() [in Y [in [Working copy] Y.js [in p [in src [in P]]]]]\n" +
+ "foo2() [in Y [in [Working copy] Y.js [in p [in src [in P]]]]]\n" +
+ "foo3() [in Y [in [Working copy] Y.js [in p [in src [in P]]]]]",
all);
}
@@ -657,7 +647,7 @@ public void testGetChildrenForCategory03() throws CoreException, IOException {
* for a <code>CompilationUnit</code> that is not present
*/
public void testGetContentsForNotPresent() {
- CompilationUnit compilationUnit = (CompilationUnit)getCompilationUnit("/P/src/p/Absent.java");
+ CompilationUnit compilationUnit = (CompilationUnit)getCompilationUnit("/P/src/p/Absent.js");
assertSourceEquals("Unexpected contents for non present cu", "", new String(compilationUnit.getContents()));
}
@@ -665,36 +655,36 @@ public void testGetContentsForNotPresent() {
* Tests Java element retrieval via source position
*/
public void testGetElementAt() throws JavaModelException {
- IType type = this.cu.getType("X");
- ISourceRange sourceRange= type.getSourceRange();
+ IField field = this.cu.getField( "f2");
+ ISourceRange sourceRange= field.getSourceRange();
//ensure that we are into the body of the type
IJavaElement element=
- this.cu.getElementAt(sourceRange.getOffset() + type.getElementName().length() + 1);
- assertTrue("Should have found a type", element instanceof IType);
+ this.cu.getElementAt(sourceRange.getOffset() + field.getElementName().length() + 1);
+ assertTrue("Should have found a type", element instanceof IField);
assertEquals(
- "Should have found X",
- "X",
+ "Should have found f2",
+ "f2",
element.getElementName());
//ensure that null is returned if there is no element other than the compilation
//unit itself at the given position
element= this.cu.getElementAt(this.cu.getSourceRange().getOffset() + 1);
assertEquals("Should have not found any element", null, element);
}
-/**
- * Tests import declararion retrieval via source position.
- * (regression test for bug 14331 ICompilationUnit.getElementAt dos not find import decl)
- */
-public void testGetElementAt2() throws JavaModelException {
- IImportContainer container = this.cu.getImportContainer();
- ISourceRange sourceRange= container.getSourceRange();
- //ensure that we are inside the import container
- IJavaElement element= this.cu.getElementAt(sourceRange.getOffset() + 1);
- assertTrue("Should have found an import", element instanceof IImportDeclaration);
- assertEquals(
- "Import not found",
- "p2.*",
- element.getElementName());
-}
+///**
+// * Tests import declararion retrieval via source position.
+// * (regression test for bug 14331 ICompilationUnit.getElementAt dos not find import decl)
+// */
+//public void testGetElementAt2() throws JavaModelException {
+// IImportContainer container = this.cu.getImportContainer();
+// ISourceRange sourceRange= container.getSourceRange();
+// //ensure that we are inside the import container
+// IJavaElement element= this.cu.getElementAt(sourceRange.getOffset() + 1);
+// assertTrue("Should have found an import", element instanceof IImportDeclaration);
+// assertEquals(
+// "Import not found",
+// "p2.*",
+// element.getElementName());
+//}
/*
* Ensures that the right field is returnd in a muti-declaration field.
*/
@@ -703,7 +693,7 @@ public void testGetElementAt3() throws JavaModelException {
IJavaElement element= this.cu.getElementAt(fieldPos);
assertEquals(
"Unexpected field found",
- this.cu.getType("X").getField("f5"),
+ this.cu.getField("f5"),
element);
}
/*
@@ -714,7 +704,7 @@ public void testGetElementAt4() throws JavaModelException {
IJavaElement element= this.cu.getElementAt(fieldPos);
assertEquals(
"Unexpected field found",
- this.cu.getType("X").getField("f6"),
+ this.cu.getField("f6"),
element);
}
/*
@@ -725,131 +715,133 @@ public void testGetElementAt5() throws JavaModelException {
IJavaElement element= this.cu.getElementAt(fieldPos);
assertEquals(
"Unexpected field found",
- this.cu.getType("X").getField("f7"),
+ this.cu.getField("f7"),
element);
}
/*
* Ensures that the right field is returned in a muti-declaration field.
*/
public void testGetElementAt6() throws JavaModelException {
- int fieldPos = this.cu.getSource().indexOf("int f5");
+ int fieldPos = this.cu.getSource().indexOf("var f5");
IJavaElement element= this.cu.getElementAt(fieldPos);
assertEquals(
"Unexpected field found",
- this.cu.getType("X").getField("f5"),
- element);
-}
-/*
- * Ensures that the right type is returnd if an annotation type as a comment in its header.
- */
-public void testGetElementAt7() throws JavaModelException {
- int fieldPos = this.cu.getSource().indexOf("Annot");
- IJavaElement element= this.cu.getElementAt(fieldPos);
- assertEquals(
- "Unexpected type found",
- this.cu.getType("Annot"),
+ this.cu.getField("f5"),
element);
}
+///*
+// * Ensures that the right type is returnd if an annotation type as a comment in its header.
+// */
+//public void testGetElementAt7() throws JavaModelException {
+// int fieldPos = this.cu.getSource().indexOf("Annot");
+// IJavaElement element= this.cu.getElementAt(fieldPos);
+// assertEquals(
+// "Unexpected type found",
+// this.cu.getType("Annot"),
+// element);
+//}
/**
* Ensures that correct number of fields with the correct names, modifiers, signatures
* and declaring types exist in a type.
*/
public void testGetFields() throws JavaModelException {
- IType type = this.cu.getType("X");
- IField[] fields= type.getFields();
+// IType type = this.cu.getType("X");
+ IField[] fields= this.cu.getFields();
String[] fieldNames = new String[] {"f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8"};
String[] flags = new String[] {"public", "protected", "private", "", "", "", "", ""};
String[] signatures = new String[] {"I", "QObject;", "QX;", "Qjava.lang.String;", "I", "I", "I", "I"};
assertEquals("Wrong number of fields returned", fieldNames.length, fields.length);
for (int i = 0; i < fields.length; i++) {
assertEquals("Incorrect name for the " + i + " field", fieldNames[i], fields[i].getElementName());
- String mod= Flags.toString(fields[i].getFlags());
- assertEquals("Unexpected modifier for " + fields[i].getElementName(), flags[i], mod);
- assertEquals("Unexpected type signature for " + fields[i].getElementName(), signatures[i], fields[i].getTypeSignature());
- assertEquals("Unexpected declaring type for " + fields[i].getElementName(), type, fields[i].getDeclaringType());
+// String mod= Flags.toString(fields[i].getFlags());
+// assertEquals("Unexpected modifier for " + fields[i].getElementName(), flags[i], mod);
+// assertEquals("Unexpected type signature for " + fields[i].getElementName(), signatures[i], fields[i].getTypeSignature());
+// assertEquals("Unexpected declaring type for " + fields[i].getElementName(), type, fields[i].getDeclaringType());
assertTrue("Field should exist " + fields[i], fields[i].exists());
}
}
-/**
- * Ensure that import declaration handles are returned from the
- * compilation unit.
- * Checks non-existant handle, on demand and not.
- */
-public void testGetImport() {
- IImportDeclaration imprt = this.cu.getImport("java.lang");
- assertTrue("Import should not exist " + imprt, !imprt.exists());
-
- imprt = this.cu.getImport("p2.*");
- assertTrue("Import should exist " + imprt, imprt.exists());
-
- imprt = this.cu.getImport("p3.Z");
- assertTrue("Import should exist " + imprt, imprt.exists());
-}
-/**
- * Ensures that correct number of imports with the correct names
- * exist in "GraphicsTest" compilation unit.
- */
-public void testGetImports() throws JavaModelException {
- IImportDeclaration[] imprts = this.cu.getImports();
- IImportContainer container= this.cu.getImportContainer();
- String[] importNames = new String[] {"p2.*", "p3.Z"};
-
- assertEquals("Wrong number of imports returned", importNames.length, imprts.length);
- for (int i = 0; i < imprts.length; i++) {
- assertTrue("Incorrect name for the type in this position: " + imprts[i].getElementName(), imprts[i].getElementName().equals(importNames[i]));
- assertTrue("Import does not exist " + imprts[i], imprts[i].exists());
- if (i == 0) {
- assertTrue("Import is not on demand " + imprts[i], imprts[i].isOnDemand());
- assertTrue("Import should be non-static " + imprts[i], imprts[i].getFlags() == Flags.AccDefault);
- } else {
- assertTrue("Import is on demand " + imprts[i], !imprts[i].isOnDemand());
- assertTrue("Import should be non-static " + imprts[i], imprts[i].getFlags() == Flags.AccDefault);
- }
- assertTrue("Container import does not equal import", container.getImport(imprts[i].getElementName()).equals(imprts[i]));
- }
-
- assertTrue("Import container must exist and have children", container.exists() && container.hasChildren());
- ISourceRange containerRange= container.getSourceRange();
- assertEquals(
- "Offset container range not correct",
- imprts[0].getSourceRange().getOffset(),
- containerRange.getOffset());
- assertEquals(
- "Length container range not correct",
- imprts[imprts.length-1].getSourceRange().getOffset() + imprts[imprts.length-1].getSourceRange().getLength(),
- containerRange.getOffset() + containerRange.getLength());
- assertSourceEquals("Source not correct",
- "import p2.*;\n" +
- "import p3.Z;",
- container.getSource());
-
-}
+///**
+// * Ensure that import declaration handles are returned from the
+// * compilation unit.
+// * Checks non-existant handle, on demand and not.
+// */
+//public void testGetImport() {
+// IImportDeclaration imprt = this.cu.getImport("java.lang");
+// assertTrue("Import should not exist " + imprt, !imprt.exists());
+//
+// imprt = this.cu.getImport("p2.*");
+// assertTrue("Import should exist " + imprt, imprt.exists());
+//
+// imprt = this.cu.getImport("p3.Z");
+// assertTrue("Import should exist " + imprt, imprt.exists());
+//}
+///**
+// * Ensures that correct number of imports with the correct names
+// * exist in "GraphicsTest" compilation unit.
+// */
+//public void testGetImports() throws JavaModelException {
+// IImportDeclaration[] imprts = this.cu.getImports();
+// IImportContainer container= this.cu.getImportContainer();
+// String[] importNames = new String[] {"p2.*", "p3.Z"};
+//
+// assertEquals("Wrong number of imports returned", importNames.length, imprts.length);
+// for (int i = 0; i < imprts.length; i++) {
+// assertTrue("Incorrect name for the type in this position: " + imprts[i].getElementName(), imprts[i].getElementName().equals(importNames[i]));
+// assertTrue("Import does not exist " + imprts[i], imprts[i].exists());
+// if (i == 0) {
+// assertTrue("Import is not on demand " + imprts[i], imprts[i].isOnDemand());
+// assertTrue("Import should be non-static " + imprts[i], imprts[i].getFlags() == Flags.AccDefault);
+// } else {
+// assertTrue("Import is on demand " + imprts[i], !imprts[i].isOnDemand());
+// assertTrue("Import should be non-static " + imprts[i], imprts[i].getFlags() == Flags.AccDefault);
+// }
+// assertTrue("Container import does not equal import", container.getImport(imprts[i].getElementName()).equals(imprts[i]));
+// }
+//
+// assertTrue("Import container must exist and have children", container.exists() && container.hasChildren());
+// ISourceRange containerRange= container.getSourceRange();
+// assertEquals(
+// "Offset container range not correct",
+// imprts[0].getSourceRange().getOffset(),
+// containerRange.getOffset());
+// assertEquals(
+// "Length container range not correct",
+// imprts[imprts.length-1].getSourceRange().getOffset() + imprts[imprts.length-1].getSourceRange().getLength(),
+// containerRange.getOffset() + containerRange.getLength());
+// assertSourceEquals("Source not correct",
+// "import p2.*;\n" +
+// "import p3.Z;",
+// container.getSource());
+//
+//}
/**
* Ensure that type handles are returned from the
* compilation unit for an inner type.
*/
-public void testGetInnerTypes() throws JavaModelException {
- IType type1 = cu.getType("X");
- assertTrue("X type should have children", type1.hasChildren());
- assertTrue("X type superclass name should be null", type1.getSuperclassName() == null);
- String[] superinterfaceNames= type1.getSuperInterfaceNames();
- assertEquals("X type should have one superinterface", 1, superinterfaceNames.length);
- assertEquals("Unexpected super interface name", "Runnable", superinterfaceNames[0]);
- assertEquals("Fully qualified name of the type is incorrect", "p.X", type1.getFullyQualifiedName());
- IType type2 = type1.getType("Inner");
- superinterfaceNames = type2.getSuperInterfaceNames();
- assertEquals("X$Inner type should not have a superinterface", 0, superinterfaceNames.length);
- assertEquals("Fully qualified name of the inner type is incorrect", "p.X$Inner", type2.getFullyQualifiedName());
- assertEquals("Declaring type of the inner type is incorrect", type1, type2.getDeclaringType());
- IType type3 = type2.getType("InnerInner");
- assertTrue("InnerInner type should not have children", !type3.hasChildren());
-}
+//public void testGetInnerTypes() throws JavaModelException {
+// IType type1 = cu.getType("X");
+// assertTrue("X type should have children", type1.hasChildren());
+// assertTrue("X type superclass name should be null", type1.getSuperclassName() == null);
+// String[] superinterfaceNames= type1.getSuperInterfaceNames();
+// assertEquals("X type should have one superinterface", 1, superinterfaceNames.length);
+// assertEquals("Unexpected super interface name", "Runnable", superinterfaceNames[0]);
+// assertEquals("Fully qualified name of the type is incorrect", "p.X", type1.getFullyQualifiedName());
+// IType type2 = type1.getType("Inner");
+// superinterfaceNames = type2.getSuperInterfaceNames();
+// assertEquals("X$Inner type should not have a superinterface", 0, superinterfaceNames.length);
+// assertEquals("Fully qualified name of the inner type is incorrect", "p.X$Inner", type2.getFullyQualifiedName());
+// assertEquals("Declaring type of the inner type is incorrect", type1, type2.getDeclaringType());
+// IType type3 = type2.getType("InnerInner");
+// assertTrue("InnerInner type should not have children", !type3.hasChildren());
+//}
/*
* Ensures that the key for a top level type is correct
*/
public void testGetKey1() {
- IType type = this.cu.getType("X");
- assertEquals("Lp/X;", type.getKey());
+// IType type = this.cu.getType("X");
+// assertEquals("Lp/X;", type.getKey());
+ IField type = this.cu.getField("f2");
+ assertEquals("Up/X.js;.f2", type.getKey());
}
/*
* Ensures that the key for a member type is correct
@@ -876,71 +868,71 @@ public void testGetKey4() {
* Ensures that a method has the correct return type, parameters and exceptions.
*/
public void testGetMethod1() throws JavaModelException {
- IType type = this.cu.getType("X");
- IMethod foo = type.getMethod("foo", new String[]{"QY;"});
- String[] exceptionTypes= foo.getExceptionTypes();
- assertEquals("Wrong number of exception types", 1, exceptionTypes.length);
- assertEquals("Unxepected exception type", "QIOException;", exceptionTypes[0]);
- assertEquals("Wrong return type", "V", foo.getReturnType());
+// IType type = this.cu.getType("X");
+ IMethod foo = this.cu.getMethod("foo", new String[]{null});
+// String[] exceptionTypes= foo.getExceptionTypes();
+// assertEquals("Wrong number of exception types", 1, exceptionTypes.length);
+// assertEquals("Unxepected exception type", "QIOException;", exceptionTypes[0]);
+// assertEquals("Wrong return type", "V", foo.getReturnType());
String[] parameterNames = foo.getParameterNames();
assertEquals("Wrong number of parameter names", 1, parameterNames.length);
assertEquals("Unexpected parameter name", "y", parameterNames[0]);
}
-/**
- * Ensures that a method has the correct AccVarargs flag set.
- */
-public void testGetMethod2() throws JavaModelException {
- IType type = this.cu.getType("X");
- IMethod method = type.getMethod("testIsVarArgs", new String[]{"QString;", "[QObject;"});
- assertTrue("Should have the AccVarargs flag set", Flags.isVarargs(method.getFlags()));
-}
-/**
- * Ensures that a constructor has the correct AccVarargs flag set.
- * (regression test for bug 77422 [1.5] ArrayIndexOutOfBoundsException with vararg constructor of generic superclass)
- */
-public void testGetMethod3() throws JavaModelException {
- IType type = this.cu.getType("X");
- IMethod method = type.getMethod("X", new String[]{"[QString;"});
- assertTrue("Should have the AccVarargs flag set", Flags.isVarargs(method.getFlags()));
-}
+///**
+// * Ensures that a method has the correct AccVarargs flag set.
+// */
+//public void testGetMethod2() throws JavaModelException {
+// IType type = this.cu.getType("X");
+// IMethod method = type.getMethod("testIsVarArgs", new String[]{"QString;", "[QObject;"});
+// assertTrue("Should have the AccVarargs flag set", Flags.isVarargs(method.getFlags()));
+//}
+///**
+// * Ensures that a constructor has the correct AccVarargs flag set.
+// * (regression test for bug 77422 [1.5] ArrayIndexOutOfBoundsException with vararg constructor of generic superclass)
+// */
+//public void testGetMethod3() throws JavaModelException {
+// IType type = this.cu.getType("X");
+// IMethod method = type.getMethod("X", new String[]{"[QString;"});
+// assertTrue("Should have the AccVarargs flag set", Flags.isVarargs(method.getFlags()));
+//}
/**
* Ensures that correct number of methods with the correct names and modifiers
* exist in a type.
*/
public void testGetMethods() throws JavaModelException {
- IType type = this.cu.getType("X");
- IMethod[] methods= type.getMethods();
- String[] methodNames = new String[] {"foo", "bar", "fred", "fred2", "testIsVarArgs", "X"};
- String[] flags = new String[] {"public", "protected static", "private", "private", "", ""};
+// IType type = this.cu.getType("X");
+ IMethod[] methods= this.cu.getMethods();
+ String[] methodNames = new String[] {"foo", "bar", "fred", "fred2"};
+ String[] flags = new String[] {"public", "protected static", "private", "private"};
assertEquals("Wrong number of methods returned", methodNames.length, methods.length);
for (int i = 0; i < methods.length; i++) {
assertEquals("Incorrect name for the " + i + " method", methodNames[i], methods[i].getElementName());
int modifiers = methods[i].getFlags() & ~Flags.AccVarargs;
- String mod= Flags.toString(modifiers);
- assertEquals("Unexpected modifier for " + methods[i].getElementName(), flags[i], mod);
+// String mod= Flags.toString(modifiers);
+// assertEquals("Unexpected modifier for " + methods[i].getElementName(), flags[i], mod);
assertTrue("Method does not exist " + methods[i], methods[i].exists());
}
}
-/**
- * Ensures that correct modifiers are reported for a method in an interface.
- */
-public void testCheckInterfaceMethodModifiers() throws JavaModelException {
- IType type = this.cu.getType("I");
- IMethod method = type.getMethod("run", new String[0]);
- String expectedModifiers = "";
- String modifiers = Flags.toString(method.getFlags() & ~Flags.AccVarargs);
- assertEquals("Expected modifier for " + method.getElementName(), expectedModifiers, modifiers);
-}
-/*
- * Ensures that IType#getSuperInterfaceTypeSignatures() is correct for a source type.
- */
-public void testGetSuperInterfaceTypeSignatures() throws JavaModelException {
- IType type = this.cu.getType("Y");
- assertStringsEqual(
- "Unexpected signatures",
- "QI2<QE;>;\n",
- type.getSuperInterfaceTypeSignatures());
-}
+///**
+// * Ensures that correct modifiers are reported for a method in an interface.
+// */
+//public void testCheckInterfaceMethodModifiers() throws JavaModelException {
+// IType type = this.cu.getType("I");
+// IMethod method = type.getMethod("run", new String[0]);
+// String expectedModifiers = "";
+// String modifiers = Flags.toString(method.getFlags() & ~Flags.AccVarargs);
+// assertEquals("Expected modifier for " + method.getElementName(), expectedModifiers, modifiers);
+//}
+///*
+// * Ensures that IType#getSuperInterfaceTypeSignatures() is correct for a source type.
+// */
+//public void testGetSuperInterfaceTypeSignatures() throws JavaModelException {
+// IType type = this.cu.getType("Y");
+// assertStringsEqual(
+// "Unexpected signatures",
+// "QI2<QE;>;\n",
+// type.getSuperInterfaceTypeSignatures());
+//}
/**
* Ensure that the same element is returned for the primary element of a
* compilation unit.
@@ -952,86 +944,86 @@ public void testGetPrimary() {
assertEquals("Primary for a compilation unit should be the same", this.cu, primary);
}
-/*
- * Ensures that the occurrence count for an initializer is correct
- */
-public void testGetOccurrenceCount01() {
- IInitializer initializer = this.cu.getType("X").getInitializer(2);
- assertEquals("Unexpected occurrence count", 2, initializer.getOccurrenceCount());
-}
-/*
- * Ensures that the occurrence count for an anonymous type is correct
- */
-public void testGetOccurrenceCount02() {
- IType type = this.cu.getType("X").getMethod("foo", new String[]{"QY;"}).getType("", 3);
- assertEquals("Unexpected occurrence count", 3, type.getOccurrenceCount());
-}
-/**
- * Ensures that correct number of package declarations with the correct names
- * exist a compilation unit.
- */
-public void testGetPackages() throws JavaModelException {
- IPackageDeclaration[] packages = this.cu.getPackageDeclarations();
- String packageName = "p";
- assertEquals("Wrong number of packages returned", 1, packages.length);
- assertEquals("Wrong package declaration returned: ", packageName, packages[0].getElementName());
-}
+///////*
+////// * Ensures that the occurrence count for an initializer is correct
+////// */
+//////public void testGetOccurrenceCount01() {
+////// IInitializer initializer = this.cu.getType("X").getInitializer(2);
+////// assertEquals("Unexpected occurrence count", 2, initializer.getOccurrenceCount());
+//////}
+/////*
+//// * Ensures that the occurrence count for an anonymous type is correct
+//// */
+////public void testGetOccurrenceCount02() {
+//// IType type = this.cu.getType("X").getMethod("foo", new String[]{"QY;"}).getType("", 3);
+//// assertEquals("Unexpected occurrence count", 3, type.getOccurrenceCount());
+////}
+///**
+// * Ensures that correct number of package declarations with the correct names
+// * exist a compilation unit.
+// */
+//public void testGetPackages() throws JavaModelException {
+// IPackageDeclaration[] packages = this.cu.getPackageDeclarations();
+// String packageName = "p";
+// assertEquals("Wrong number of packages returned", 1, packages.length);
+// assertEquals("Wrong package declaration returned: ", packageName, packages[0].getElementName());
+//}
/**
* Ensure that type handles are returned from the
* compilation unit.
* Checks non-existant handle and existing handles.
*/
public void testGetType() {
- IType type = this.cu.getType("someType");
+ IField type = this.cu.getField("someType");
assertTrue("Type should not exist " + type, !type.exists());
- type = this.cu.getType("X");
+ type = this.cu.getField("f2");
assertTrue("Type should exist " + type, type.exists());
- type = this.cu.getType("I"); // secondary type
- assertTrue("Type should exist " + type, type.exists());
-}
-/**
- * Ensures that correct number of types with the correct names and modifiers
- * exist in a compilation unit.
- */
-public void testGetTypes() throws JavaModelException {
- IType[] types = this.cu.getTypes();
- String[] typeNames = new String[] {"X", "I", "I2", "I3", "Y", "Colors", "Annot"};
- String[] flags = new String[] {"public", "", "", "", "", "", ""};
- boolean[] isClass = new boolean[] {true, false, false, false, true, false, false};
- boolean[] isInterface = new boolean[] {false, true, true, true, false, false, true};
- boolean[] isAnnotation = new boolean[] {false, false, false, false, false, false, true};
- boolean[] isEnum = new boolean[] {false, false, false, false, false, true, false};
- String[] superclassName = new String[] {null, null, null, null, null, null, null};
- String[] superclassType = new String[] {null, null, null, null, null, null, null};
- String[][] superInterfaceNames = new String[][] {
- new String[] {"Runnable"}, new String[0], new String[0], new String[0], new String[] {"I2<E>"}, new String[0], new String[0]
- };
- String[][] superInterfaceTypes = new String[][] {
- new String[] {"QRunnable;"}, new String[0], new String[0], new String[0], new String[] {"QI2<QE;>;"}, new String[0], new String[0]
- };
- String[][] formalTypeParameters = new String[][] {
- new String[0], new String[0], new String[] {"E"}, new String[0], new String[] {"E"}, new String[0], new String[0]
- };
-
- assertEquals("Wrong number of types returned", typeNames.length, types.length);
- for (int i = 0; i < types.length; i++) {
- assertEquals("Incorrect name for the " + i + " type", typeNames[i], types[i].getElementName());
- String mod= Flags.toString(types[i].getFlags());
- assertEquals("Unexpected modifier for " + types[i].getElementName(), flags[i], mod);
- assertTrue("Type does not exist " + types[i], types[i].exists());
- assertEquals("Incorrect isClass for the " + i + " type", isClass[i], types[i].isClass());
- assertEquals("Incorrect isInterface for the " + i + " type", isInterface[i], types[i].isInterface());
- assertEquals("Incorrect isAnnotation for the " + i + " type", isAnnotation[i], types[i].isAnnotation());
- assertEquals("Incorrect isEnum for the " + i + " type", isEnum[i], types[i].isEnum());
- assertEquals("Incorrect superclassName for the " + i + " type", superclassName[i], types[i].getSuperclassName());
- assertEquals("Incorrect superclassType for the " + i + " type", superclassType[i], types[i].getSuperclassTypeSignature());
- assertEquals("Incorrect superInterfaceNames for the " + i + " type", superInterfaceNames[i].length, types[i].getSuperInterfaceNames().length);
- assertEquals("Incorrect superInterfaceTypes for the " + i + " type", superInterfaceTypes[i].length, types[i].getSuperInterfaceTypeSignatures().length);
- assertEquals("Incorrect formalTypeParameters for the " + i + " type", formalTypeParameters[i].length, types[i].getTypeParameters().length);
- }
-}
+// type = this.cu.getType("I"); // secondary type
+// assertTrue("Type should exist " + type, type.exists());
+}
+///**
+// * Ensures that correct number of types with the correct names and modifiers
+// * exist in a compilation unit.
+// */
+//public void testGetTypes() throws JavaModelException {
+// IType[] types = this.cu.getTypes();
+// String[] typeNames = new String[] {"X", "I", "I2", "I3", "Y", "Colors", "Annot"};
+// String[] flags = new String[] {"public", "", "", "", "", "", ""};
+// boolean[] isClass = new boolean[] {true, false, false, false, true, false, false};
+// boolean[] isInterface = new boolean[] {false, true, true, true, false, false, true};
+// boolean[] isAnnotation = new boolean[] {false, false, false, false, false, false, true};
+// boolean[] isEnum = new boolean[] {false, false, false, false, false, true, false};
+// String[] superclassName = new String[] {null, null, null, null, null, null, null};
+// String[] superclassType = new String[] {null, null, null, null, null, null, null};
+// String[][] superInterfaceNames = new String[][] {
+// new String[] {"Runnable"}, new String[0], new String[0], new String[0], new String[] {"I2<E>"}, new String[0], new String[0]
+// };
+// String[][] superInterfaceTypes = new String[][] {
+// new String[] {"QRunnable;"}, new String[0], new String[0], new String[0], new String[] {"QI2<QE;>;"}, new String[0], new String[0]
+// };
+// String[][] formalTypeParameters = new String[][] {
+// new String[0], new String[0], new String[] {"E"}, new String[0], new String[] {"E"}, new String[0], new String[0]
+// };
+//
+// assertEquals("Wrong number of types returned", typeNames.length, types.length);
+// for (int i = 0; i < types.length; i++) {
+// assertEquals("Incorrect name for the " + i + " type", typeNames[i], types[i].getElementName());
+// String mod= Flags.toString(types[i].getFlags());
+// assertEquals("Unexpected modifier for " + types[i].getElementName(), flags[i], mod);
+// assertTrue("Type does not exist " + types[i], types[i].exists());
+// assertEquals("Incorrect isClass for the " + i + " type", isClass[i], types[i].isClass());
+// assertEquals("Incorrect isInterface for the " + i + " type", isInterface[i], types[i].isInterface());
+// assertEquals("Incorrect isAnnotation for the " + i + " type", isAnnotation[i], types[i].isAnnotation());
+// assertEquals("Incorrect isEnum for the " + i + " type", isEnum[i], types[i].isEnum());
+// assertEquals("Incorrect superclassName for the " + i + " type", superclassName[i], types[i].getSuperclassName());
+// assertEquals("Incorrect superclassType for the " + i + " type", superclassType[i], types[i].getSuperclassTypeSignature());
+// assertEquals("Incorrect superInterfaceNames for the " + i + " type", superInterfaceNames[i].length, types[i].getSuperInterfaceNames().length);
+// assertEquals("Incorrect superInterfaceTypes for the " + i + " type", superInterfaceTypes[i].length, types[i].getSuperInterfaceTypeSignatures().length);
+// assertEquals("Incorrect formalTypeParameters for the " + i + " type", formalTypeParameters[i].length, types[i].getTypeParameters().length);
+// }
+//}
/**
* Ensures that a compilation unit has children.
*/
@@ -1049,34 +1041,34 @@ public void testHasResourceChanged() {
"A compilation unit's resource should not have changed",
!this.cu.hasResourceChanged());
}
-/*
- * Ensures that hasChildren doesn't return true for an import container that doesn't exist
- * (regression test for bug 76761 [model] ImportContainer.hasChildren() should not return true
- */
-public void testImportContainerHasChildren() throws JavaModelException {
- IImportContainer importContainer = getCompilationUnit("/Test/DoesNotExist.java").getImportContainer();
- boolean gotException = false;
- try {
- importContainer.hasChildren();
- } catch (JavaModelException e) {
- gotException = e.isDoesNotExist();
- }
- assertTrue("Should get a not present exception", gotException);
-}
-/*
- * Ensures that isEnumConstant returns true for a field representing an enum constant.
- */
-public void testIsEnumConstant1() throws JavaModelException {
- IField field = this.cu.getType("Colors").getField("BLUE");
- assertTrue("Colors#BLUE should be an enum constant", field.isEnumConstant());
-}
-/*
- * Ensures that isEnumConstant returns false for a field that is not representing an enum constant.
- */
-public void testIsEnumConstant2() throws JavaModelException {
- IField field = this.cu.getType("X").getField("f1");
- assertTrue("X#f1 should not be an enum constant", !field.isEnumConstant());
-}
+///*
+// * Ensures that hasChildren doesn't return true for an import container that doesn't exist
+// * (regression test for bug 76761 [model] ImportContainer.hasChildren() should not return true
+// */
+//public void testImportContainerHasChildren() throws JavaModelException {
+// IImportContainer importContainer = getCompilationUnit("/Test/DoesNotExist.js").getImportContainer();
+// boolean gotException = false;
+// try {
+// importContainer.hasChildren();
+// } catch (JavaModelException e) {
+// gotException = e.isDoesNotExist();
+// }
+// assertTrue("Should get a not present exception", gotException);
+//}
+///*
+// * Ensures that isEnumConstant returns true for a field representing an enum constant.
+// */
+//public void testIsEnumConstant1() throws JavaModelException {
+// IField field = this.cu.getType("Colors").getField("BLUE");
+// assertTrue("Colors#BLUE should be an enum constant", field.isEnumConstant());
+//}
+///*
+// * Ensures that isEnumConstant returns false for a field that is not representing an enum constant.
+// */
+//public void testIsEnumConstant2() throws JavaModelException {
+// IField field = this.cu.getType("X").getField("f1");
+// assertTrue("X#f1 should not be an enum constant", !field.isEnumConstant());
+//}
/*
* Ensure that the utility method Util.#getNameWithoutJavaLikeExtension(String) works as expected
* (regression test for bug 107735 StringIndexOutOfBoundsException in Util.getNameWithoutJavaLikeExtension())
@@ -1090,41 +1082,41 @@ public void testNameWithoutJavaLikeExtension() {
* false to #exists() and #isOpen()
*/
public void testNotPresent1() {
- ICompilationUnit compilationUnit = ((IPackageFragment)this.cu.getParent()).getCompilationUnit("DoesNotExist.java");
- assertTrue("CU should not be open", !compilationUnit.isOpen());
- assertTrue("CU should not exist", !compilationUnit.exists());
- assertTrue("CU should still not be open", !compilationUnit.isOpen());
-}
-/**
- * Ensures that a compilation unit that does not exist
- * (because it is a child of a jar package fragment)
- * responds false to #exists() and #isOpen()
- * (regression test for PR #1G2RKD2)
- */
-public void testNotPresent2() throws CoreException {
- ICompilationUnit compilationUnit = getPackageFragment("P", getExternalJCLPathString(), "java.lang").getCompilationUnit("DoesNotExist.java");
+ ICompilationUnit compilationUnit = ((IPackageFragment)this.cu.getParent()).getCompilationUnit("DoesNotExist.js");
assertTrue("CU should not be open", !compilationUnit.isOpen());
assertTrue("CU should not exist", !compilationUnit.exists());
assertTrue("CU should still not be open", !compilationUnit.isOpen());
}
+///**
+// * Ensures that a compilation unit that does not exist
+// * (because it is a child of a jar package fragment)
+// * responds false to #exists() and #isOpen()
+// * (regression test for PR #1G2RKD2)
+// */
+//public void testNotPresent2() throws CoreException {
+// ICompilationUnit compilationUnit = getPackageFragment("P", getExternalJCLPathString(), "java.lang").getCompilationUnit("DoesNotExist.js");
+// assertTrue("CU should not be open", !compilationUnit.isOpen());
+// assertTrue("CU should not exist", !compilationUnit.exists());
+// assertTrue("CU should still not be open", !compilationUnit.isOpen());
+//}
/*
* Ensure that the absence of visibility flags is correctly reported as package default
* (regression test fo bug 127213 Flags class missing methods)
*/
public void testPackageDefaultFlag1() throws JavaModelException {
- IField field = this.cu.getType("X").getField("f4");
+ IField field = this.cu.getField("f4");
assertTrue("X#f4 should be package default", Flags.isPackageDefault(field.getFlags()));
}
-/*
- * Ensure that the presence of a visibility flags is correctly reported as non package default
- * (regression test fo bug 127213 Flags class missing methods)
- */
-public void testPackageDefaultFlag2() throws JavaModelException {
- IType type = this.cu.getType("X");
- assertTrue("X should not be package default", !Flags.isPackageDefault(type.getFlags()));
-}
+///*
+// * Ensure that the presence of a visibility flags is correctly reported as non package default
+// * (regression test fo bug 127213 Flags class missing methods)
+// */
+//public void testPackageDefaultFlag2() throws JavaModelException {
+// IType type = this.cu.getType("X");
+// assertTrue("X should not be package default", !Flags.isPackageDefault(type.getFlags()));
+//}
/*
* Ensure that the presence of a visibility flags as well as the deprecated flag is correctly reported as non package default
@@ -1156,188 +1148,169 @@ public void testStructureKnownForCU() throws JavaModelException {
public void testStructureUnknownForCU() throws CoreException {
try {
this.createFile(
- "/P/src/p/Invalid.java",
+ "/P/src/p/Invalid.js",
"@#D(03");
- ICompilationUnit badCU = getCompilationUnit("/P/src/p/Invalid.java");
+ ICompilationUnit badCU = getCompilationUnit("/P/src/p/Invalid.js");
assertTrue("Structure is known for an invalid CU", !badCU.isStructureKnown());
} finally {
- this.deleteFile("/P/src/p/Invalid.java");
+ this.deleteFile("/P/src/p/Invalid.js");
}
}
-/*
- * Ensure that the super flags is correctly reported
- * (regression test fo bug 127213 Flags class missing methods)
- */
-public void testSuperFlag1() throws JavaModelException {
- assertTrue("Should contain super flag", Flags.isSuper(Flags.AccSuper));
-}
+///*
+// * Ensure that the super flags is correctly reported
+// * (regression test fo bug 127213 Flags class missing methods)
+// */
+//public void testSuperFlag1() throws JavaModelException {
+// assertTrue("Should contain super flag", Flags.isSuper(Flags.AccSuper));
+//}
+//
+///*
+// * Ensure that the super flags is correctly reported
+// * (regression test fo bug 127213 Flags class missing methods)
+// */
+//public void testSuperFlag2() throws JavaModelException {
+// assertTrue("Should not contain super flag", !Flags.isSuper(Flags.AccDefault));
+//}
-/*
- * Ensure that the super flags is correctly reported
- * (regression test fo bug 127213 Flags class missing methods)
- */
-public void testSuperFlag2() throws JavaModelException {
- assertTrue("Should not contain super flag", !Flags.isSuper(Flags.AccDefault));
-}
-
-/*
- * Verify fix for bug 73884: [1.5] Unexpected error for class implementing generic interface
- * (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=73884)
- */
-public void testBug73884() throws CoreException {
- try {
- String cuSource =
- "package p;\n" +
- "public interface I<T> {\n" +
- "}";
- createFile("/P/src/p/I.java", cuSource);
- ITypeParameter[] typeParameters = getCompilationUnit("/P/src/p/I.java").getType("I").getTypeParameters();
- assertTypeParametersEqual(
- "T\n",
- typeParameters);
- } finally {
- deleteFile("/P/src/p/I.java");
- }
-}
+///*
+// * Verify fix for bug 73884: [1.5] Unexpected error for class implementing generic interface
+// * (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=73884)
+// */
+//public void testBug73884() throws CoreException {
+// try {
+// String cuSource =
+// "package p;\n" +
+// "public interface I<T> {\n" +
+// "}";
+// createFile("/P/src/p/I.js", cuSource);
+// ITypeParameter[] typeParameters = getCompilationUnit("/P/src/p/I.js").getType("I").getTypeParameters();
+// assertTypeParametersEqual(
+// "T\n",
+// typeParameters);
+// } finally {
+// deleteFile("/P/src/p/I.js");
+// }
+//}
-/*
- * Ensure that the type parameters for a type are correct.
- */
-public void testTypeParameter1() throws CoreException {
- createWorkingCopy(
- "package p;\n" +
- "public class Y<T> {\n" +
- "}"
- );
- ITypeParameter[] typeParameters = workingCopy.getType("Y").getTypeParameters();
- assertTypeParametersEqual(
- "T\n",
- typeParameters);
-}
-
-/*
- * Ensure that the type parameters for a type are correct.
- */
-public void testTypeParameter2() throws CoreException {
- createWorkingCopy(
- "package p;\n" +
- "public class Y<T, U> {\n" +
- "}"
- );
- ITypeParameter[] typeParameters = workingCopy.getType("Y").getTypeParameters();
- assertTypeParametersEqual(
- "T\n" +
- "U\n",
- typeParameters);
-}
-
-/*
- * Ensure that the type parameters for a type are correct.
- */
-public void testTypeParameter3() throws CoreException {
- createWorkingCopy(
- "package p;\n" +
- "public class Y<T extends List> {\n" +
- "}"
- );
- ITypeParameter[] typeParameters = workingCopy.getType("Y").getTypeParameters();
- assertTypeParametersEqual(
- "T extends List\n",
- typeParameters);
-}
-
-/*
- * Ensure that the type parameters for a type are correct.
- */
-public void testTypeParameter4() throws CoreException {
- createWorkingCopy(
- "package p;\n" +
- "public class Y<T extends List & Runnable & Comparable> {\n" +
- "}"
- );
- ITypeParameter[] typeParameters = workingCopy.getType("Y").getTypeParameters();
- assertTypeParametersEqual(
- "T extends List & Runnable & Comparable\n",
- typeParameters);
-}
-
-/*
- * Ensure that the type parameters for a method are correct.
- * (regression test for bug 75658 [1.5] SourceElementParser do not compute correctly bounds of type parameter)
- */
-public void testTypeParameter5() throws CoreException {
- createWorkingCopy(
- "package p;\n" +
- "public class Y {\n" +
- " <T extends List, U extends X & Runnable> void foo() {\n" +
- " }\n" +
- "}"
- );
- ITypeParameter[] typeParameters = workingCopy.getType("Y").getMethod("foo", new String[]{}).getTypeParameters();
- assertTypeParametersEqual(
- "T extends List\n" +
- "U extends X & Runnable\n",
- typeParameters);
-}
-
-/*
- * Verify fix for bug 78275: [recovery] NPE in GoToNextPreviousMemberAction with syntax error
- * (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=78275)
- */
-public void testBug78275() throws CoreException {
- try {
- String cuSource =
- "public class X {\n" +
- " void a() {\n" +
- " }\n" +
- " }\n" +
- " void m() {}\n" +
- "}\n";
- createFile("/P/src/X.java", cuSource);
- IType type = getCompilationUnit("/P/src/X.java").getType("X");
- IInitializer[] initializers = type.getInitializers();
- assertEquals("Invalid number of initializers", 1, initializers.length);
- assertTrue("Invalid length for initializer", initializers[0].getSourceRange().getLength() > 0);
- } finally {
- deleteFile("/P/src/X.java");
- }
-}
+///*
+// * Ensure that the type parameters for a type are correct.
+// */
+//public void testTypeParameter1() throws CoreException {
+// createWorkingCopy(
+// "package p;\n" +
+// "public class Y<T> {\n" +
+// "}"
+// );
+// ITypeParameter[] typeParameters = workingCopy.getType("Y").getTypeParameters();
+// assertTypeParametersEqual(
+// "T\n",
+// typeParameters);
+//}
+//
+///*
+// * Ensure that the type parameters for a type are correct.
+// */
+//public void testTypeParameter2() throws CoreException {
+// createWorkingCopy(
+// "package p;\n" +
+// "public class Y<T, U> {\n" +
+// "}"
+// );
+// ITypeParameter[] typeParameters = workingCopy.getType("Y").getTypeParameters();
+// assertTypeParametersEqual(
+// "T\n" +
+// "U\n",
+// typeParameters);
+//}
+//
+///*
+// * Ensure that the type parameters for a type are correct.
+// */
+//public void testTypeParameter3() throws CoreException {
+// createWorkingCopy(
+// "package p;\n" +
+// "public class Y<T extends List> {\n" +
+// "}"
+// );
+// ITypeParameter[] typeParameters = workingCopy.getType("Y").getTypeParameters();
+// assertTypeParametersEqual(
+// "T extends List\n",
+// typeParameters);
+//}
+//
+///*
+// * Ensure that the type parameters for a type are correct.
+// */
+//public void testTypeParameter4() throws CoreException {
+// createWorkingCopy(
+// "package p;\n" +
+// "public class Y<T extends List & Runnable & Comparable> {\n" +
+// "}"
+// );
+// ITypeParameter[] typeParameters = workingCopy.getType("Y").getTypeParameters();
+// assertTypeParametersEqual(
+// "T extends List & Runnable & Comparable\n",
+// typeParameters);
+//}
+//
+///*
+// * Ensure that the type parameters for a method are correct.
+// * (regression test for bug 75658 [1.5] SourceElementParser do not compute correctly bounds of type parameter)
+// */
+//public void testTypeParameter5() throws CoreException {
+// createWorkingCopy(
+// "package p;\n" +
+// "public class Y {\n" +
+// " <T extends List, U extends X & Runnable> void foo() {\n" +
+// " }\n" +
+// "}"
+// );
+// ITypeParameter[] typeParameters = workingCopy.getType("Y").getMethod("foo", new String[]{}).getTypeParameters();
+// assertTypeParametersEqual(
+// "T extends List\n" +
+// "U extends X & Runnable\n",
+// typeParameters);
+//}
+//
+///*
+// * Verify fix for bug 78275: [recovery] NPE in GoToNextPreviousMemberAction with syntax error
+// * (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=78275)
+// */
+//public void testBug78275() throws CoreException {
+// try {
+// String cuSource =
+// " function a() {\n" +
+// " }\n" +
+// " }\n" +
+// " function m() {}\n" +
+// "";
+// createFile("/P/src/X.js", cuSource);
+// IType type = getCompilationUnit("/P/src/X.js").getType("X");
+// IInitializer[] initializers = type.getInitializers();
+// assertEquals("Invalid number of initializers", 1, initializers.length);
+// assertTrue("Invalid length for initializer", initializers[0].getSourceRange().getLength() > 0);
+// } finally {
+// deleteFile("/P/src/X.js");
+// }
+//}
public void test110172() throws CoreException {
try {
String source =
- "/**\n" +
- " * Class X javadoc \n" +
- " */\n" +
- "public class X {\n" +
- " /**\n" +
- " * Javadoc for initializer\n" +
- " */\n" +
- " static {\n" +
- " }\n" +
- " \n" +
" /**\n" +
" * Javadoc for field f \n" +
" */\n" +
- " public int f;\n" +
+ " var f;\n" +
" \n" +
" /**\n" +
" * Javadoc for method foo\n" +
" */\n" +
- " public void foo(int i, long l, String s) {\n" +
+ " function foo( i, l, s) {\n" +
" }\n" +
" \n" +
" /**\n" +
" * Javadoc for member type A\n" +
" */\n" +
- " public class A {\n" +
- " }\n" +
- "\n" +
- " /**\n" +
- " * Javadoc for constructor X(int)\n" +
- " */\n" +
- " X(int i) {\n" +
- " }\n" +
" \n" +
" /**\n" +
" * Javadoc for f3\n" +
@@ -1348,27 +1321,20 @@ public void test110172() throws CoreException {
" /**\n" +
" * Real javadoc for f3\n" +
" */\n" +
- " public String f3;\n" +
+ " var f3;\n" +
" \n" +
- " public int f2;\n" +
+ " var f2;\n" +
" \n" +
- " public void foo2() {\n" +
+ " function foo2() {\n" +
" }\n" +
" \n" +
- " public class B {\n" +
- " }\n" +
"\n" +
- " X() {\n" +
- " }\n" +
- " \n" +
- " {\n" +
- " }\n" +
- "}";
- createFile("/P/src/X.java", source);
- IType type = getCompilationUnit("/P/src/X.java").getType("X");
- IJavaElement[] members = type.getChildren();
+ "";
+ createFile("/P/src/X.js", source);
+// IType type = getCompilationUnit("/P/src/X.js").getType("X");
+ IJavaElement[] members = getCompilationUnit("/P/src/X.js").getChildren();
final int length = members.length;
- assertEquals("Wrong number", 11, length);
+ assertEquals("Wrong number", 5, length);
for (int i = 0; i < length; i++) {
final IJavaElement element = members[i];
assertTrue(element instanceof IMember);
@@ -1433,7 +1399,7 @@ public void test110172() throws CoreException {
}
}
} finally {
- deleteFile("/P/src/X.java");
+ deleteFile("/P/src/X.js");
}
}
public void test120902() throws CoreException {
@@ -1442,11 +1408,11 @@ public void test120902() throws CoreException {
"/**\r\n" +
" * Toy\r\n" +
" */\r\n" +
- "public class X {\r\n" +
+ "function foo() {\r\n" +
"}";
- createFile("/P/src/X.java", source);
- final ICompilationUnit compilationUnit = getCompilationUnit("/P/src/X.java");
- IType type = compilationUnit.getType("X");
+ createFile("/P/src/X.js", source);
+ final ICompilationUnit compilationUnit = getCompilationUnit("/P/src/X.js");
+ IMethod type = compilationUnit.getMethod("foo",null);
ISourceRange javadocRange = type.getJavadocRange();
assertNotNull("No source range", javadocRange);
compilationUnit.getBuffer().setContents("");
@@ -1457,7 +1423,7 @@ public void test120902() throws CoreException {
assertFalse("Should not happen", true);
}
} finally {
- deleteFile("/P/src/X.java");
+ deleteFile("/P/src/X.js");
}
}
}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionContextTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionContextTests.java
index 0cf43d4..5a19431 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionContextTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionContextTests.java
@@ -10,9 +10,9 @@
*******************************************************************************/
package org.eclipse.wst.jsdt.core.tests.model;
-import org.eclipse.wst.jsdt.core.*;
import org.eclipse.wst.jsdt.internal.codeassist.RelevanceConstants;
+import org.eclipse.wst.jsdt.core.*;
import junit.framework.*;
@@ -36,9 +36,8 @@ public static Test suite() {
public void test0001() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0001/X.java",
- "package test0001;\n" +
- "public class X {\n" +
+ "/Completion/src3/test0001/X.js",
+ "function X(){\n" +
" ZZZZ\n" +
"}");
@@ -61,9 +60,8 @@ public void test0001() throws JavaModelException {
public void test0002() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0002/X.java",
- "package test0002;\n" +
- "public class X {\n" +
+ "/Completion/src3/test0002/X.js",
+ "function X() {\n" +
" ZZZZ\n" +
"}");
@@ -86,9 +84,8 @@ public void test0002() throws JavaModelException {
public void test0003() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0003/X.java",
- "package test0003;\n" +
- "public class X {\n" +
+ "/Completion/src3/test0003/X.js",
+ "function X() {\n" +
" ZZZZ\n" +
"}");
@@ -111,9 +108,8 @@ public void test0003() throws JavaModelException {
public void test0004() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0004/X.java",
- "package test0004;\n" +
- "public class X {\n" +
+ "/Completion/src3/test0004/X.js",
+ "function X() {\n" +
" /**/\n" +
"}");
@@ -133,89 +129,87 @@ public void test0004() throws JavaModelException {
"expectedTypesKeys=null",
result.context);
}
-public void test0005() throws JavaModelException {
- this.workingCopies = new ICompilationUnit[1];
- this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0005/X.java",
- "package test0005;\n" +
- "public class X {\n" +
- " ZZZZ foo()\n" +
- "}");
-
- String str = this.workingCopies[0].getSource();
- int tokenStart = str.lastIndexOf("ZZZZ");
- int tokenEnd = tokenStart + "ZZZZ".length() - 1;
- int cursorLocation = str.lastIndexOf("ZZZZ") + "ZZZZ".length();
-
- CompletionResult result = contextComplete(this.workingCopies[0], cursorLocation);
-
- assertResults(
- "completion offset="+(cursorLocation)+"\n" +
- "completion range=["+(tokenStart)+", "+(tokenEnd)+"]\n" +
- "completion token=\"ZZZZ\"\n" +
- "completion token kind=TOKEN_KIND_NAME\n" +
- "expectedTypesSignatures=null\n" +
- "expectedTypesKeys=null",
- result.context);
-}
-public void test0006() throws JavaModelException {
- this.workingCopies = new ICompilationUnit[1];
- this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0006/X.java",
- "package test0006;\n" +
- "public class X {\n" +
- " ZZZZ foo()\n" +
- "}");
-
- String str = this.workingCopies[0].getSource();
- int tokenStart = str.lastIndexOf("ZZZZ");
- int tokenEnd = tokenStart + "ZZZZ".length() - 1;
- int cursorLocation = str.lastIndexOf("ZZZZ");
-
- CompletionResult result = contextComplete(this.workingCopies[0], cursorLocation);
-
- assertResults(
- "completion offset="+(cursorLocation)+"\n" +
- "completion range=["+(tokenStart)+", "+(tokenEnd)+"]\n" +
- "completion token=\"\"\n" +
- "completion token kind=TOKEN_KIND_NAME\n" +
- "expectedTypesSignatures=null\n" +
- "expectedTypesKeys=null",
- result.context);
-}
-public void test0007() throws JavaModelException {
- this.workingCopies = new ICompilationUnit[1];
- this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0007/X.java",
- "package test0007;\n" +
- "public class X {\n" +
- " ZZZZ foo()\n" +
- "}");
-
- String str = this.workingCopies[0].getSource();
- int tokenStart = str.lastIndexOf("ZZZZ");
- int tokenEnd = tokenStart + "ZZZZ".length() - 1;
- int cursorLocation = str.lastIndexOf("ZZZZ") + "ZZ".length();
-
- CompletionResult result = contextComplete(this.workingCopies[0], cursorLocation);
-
- assertResults(
- "completion offset="+(cursorLocation)+"\n" +
- "completion range=["+(tokenStart)+", "+(tokenEnd)+"]\n" +
- "completion token=\"ZZ\"\n" +
- "completion token kind=TOKEN_KIND_NAME\n" +
- "expectedTypesSignatures=null\n" +
- "expectedTypesKeys=null",
- result.context);
-}
+//public void test0005() throws JavaModelException {
+// this.workingCopies = new ICompilationUnit[1];
+// this.workingCopies[0] = getWorkingCopy(
+// "/Completion/src3/test0005/X.js",
+// "package test0005;\n" +
+// "public class X {\n" +
+// " ZZZZ foo()\n" +
+// "}");
+//
+// String str = this.workingCopies[0].getSource();
+// int tokenStart = str.lastIndexOf("ZZZZ");
+// int tokenEnd = tokenStart + "ZZZZ".length() - 1;
+// int cursorLocation = str.lastIndexOf("ZZZZ") + "ZZZZ".length();
+//
+// CompletionResult result = contextComplete(this.workingCopies[0], cursorLocation);
+//
+// assertResults(
+// "completion offset="+(cursorLocation)+"\n" +
+// "completion range=["+(tokenStart)+", "+(tokenEnd)+"]\n" +
+// "completion token=\"ZZZZ\"\n" +
+// "completion token kind=TOKEN_KIND_NAME\n" +
+// "expectedTypesSignatures=null\n" +
+// "expectedTypesKeys=null",
+// result.context);
+//}
+//public void test0006() throws JavaModelException {
+// this.workingCopies = new ICompilationUnit[1];
+// this.workingCopies[0] = getWorkingCopy(
+// "/Completion/src3/test0006/X.js",
+// "package test0006;\n" +
+// "public class X {\n" +
+// " ZZZZ foo()\n" +
+// "}");
+//
+// String str = this.workingCopies[0].getSource();
+// int tokenStart = str.lastIndexOf("ZZZZ");
+// int tokenEnd = tokenStart + "ZZZZ".length() - 1;
+// int cursorLocation = str.lastIndexOf("ZZZZ");
+//
+// CompletionResult result = contextComplete(this.workingCopies[0], cursorLocation);
+//
+// assertResults(
+// "completion offset="+(cursorLocation)+"\n" +
+// "completion range=["+(tokenStart)+", "+(tokenEnd)+"]\n" +
+// "completion token=\"\"\n" +
+// "completion token kind=TOKEN_KIND_NAME\n" +
+// "expectedTypesSignatures=null\n" +
+// "expectedTypesKeys=null",
+// result.context);
+//}
+//public void test0007() throws JavaModelException {
+// this.workingCopies = new ICompilationUnit[1];
+// this.workingCopies[0] = getWorkingCopy(
+// "/Completion/src3/test0007/X.js",
+// "package test0007;\n" +
+// "public class X {\n" +
+// " ZZZZ foo()\n" +
+// "}");
+//
+// String str = this.workingCopies[0].getSource();
+// int tokenStart = str.lastIndexOf("ZZZZ");
+// int tokenEnd = tokenStart + "ZZZZ".length() - 1;
+// int cursorLocation = str.lastIndexOf("ZZZZ") + "ZZ".length();
+//
+// CompletionResult result = contextComplete(this.workingCopies[0], cursorLocation);
+//
+// assertResults(
+// "completion offset="+(cursorLocation)+"\n" +
+// "completion range=["+(tokenStart)+", "+(tokenEnd)+"]\n" +
+// "completion token=\"ZZ\"\n" +
+// "completion token kind=TOKEN_KIND_NAME\n" +
+// "expectedTypesSignatures=null\n" +
+// "expectedTypesKeys=null",
+// result.context);
+//}
public void test0008() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0008/X.java",
- "package test0008;\n" +
- "public class X {\n" +
- " /**/ foo()\n" +
- "}");
+ "/Completion/src3/test0008/X.js",
+ " /**/ function foo()\n" +
+ "");
String str = this.workingCopies[0].getSource();
int tokenStart = str.lastIndexOf("/**/") + "/**/".length();
@@ -233,37 +227,37 @@ public void test0008() throws JavaModelException {
"expectedTypesKeys=null",
result.context);
}
-public void test0009() throws JavaModelException {
- this.workingCopies = new ICompilationUnit[1];
- this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0009/X.java",
- "package test0009;\n" +
- "public class X {\n" +
- " void foo() {\n" +
- " ZZZZ\n" +
- " }\n" +
- "}");
-
- String str = this.workingCopies[0].getSource();
- int tokenStart = str.lastIndexOf("ZZZZ");
- int tokenEnd = tokenStart + "ZZZZ".length() - 1;
- int cursorLocation = str.lastIndexOf("ZZZZ") + "ZZZZ".length();
-
- CompletionResult result = contextComplete(this.workingCopies[0], cursorLocation);
-
- assertResults(
- "completion offset="+(cursorLocation)+"\n" +
- "completion range=["+(tokenStart)+", "+(tokenEnd)+"]\n" +
- "completion token=\"ZZZZ\"\n" +
- "completion token kind=TOKEN_KIND_NAME\n" +
- "expectedTypesSignatures=null\n" +
- "expectedTypesKeys=null",
- result.context);
-}
+//public void test0009() throws JavaModelException {
+// this.workingCopies = new ICompilationUnit[1];
+// this.workingCopies[0] = getWorkingCopy(
+// "/Completion/src3/test0009/X.js",
+// "package test0009;\n" +
+// "public class X {\n" +
+// " void foo() {\n" +
+// " ZZZZ\n" +
+// " }\n" +
+// "}");
+//
+// String str = this.workingCopies[0].getSource();
+// int tokenStart = str.lastIndexOf("ZZZZ");
+// int tokenEnd = tokenStart + "ZZZZ".length() - 1;
+// int cursorLocation = str.lastIndexOf("ZZZZ") + "ZZZZ".length();
+//
+// CompletionResult result = contextComplete(this.workingCopies[0], cursorLocation);
+//
+// assertResults(
+// "completion offset="+(cursorLocation)+"\n" +
+// "completion range=["+(tokenStart)+", "+(tokenEnd)+"]\n" +
+// "completion token=\"ZZZZ\"\n" +
+// "completion token kind=TOKEN_KIND_NAME\n" +
+// "expectedTypesSignatures=null\n" +
+// "expectedTypesKeys=null",
+// result.context);
+//}
public void test0010() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0010/X.java",
+ "/Completion/src3/test0010/X.js",
"package test0010;\n" +
"public class X {\n" +
" void foo() {\n" +
@@ -290,7 +284,7 @@ public void test0010() throws JavaModelException {
public void test0011() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0011/X.java",
+ "/Completion/src3/test0011/X.js",
"package test0011;\n" +
"public class X {\n" +
" void foo() {\n" +
@@ -317,7 +311,7 @@ public void test0011() throws JavaModelException {
public void test0012() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0012/X.java",
+ "/Completion/src3/test0012/X.js",
"package test0012;\n" +
"public class X {\n" +
" void foo() {\n" +
@@ -344,7 +338,7 @@ public void test0012() throws JavaModelException {
public void test0013() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0013/X.java",
+ "/Completion/src3/test0013/X.js",
"package test0013;\n" +
"public class X extends ZZZZ {\n" +
"}");
@@ -368,7 +362,7 @@ public void test0013() throws JavaModelException {
public void test0014() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0014/X.java",
+ "/Completion/src3/test0014/X.js",
"package test0014;\n" +
"public class X extends ZZZZ {\n" +
"}");
@@ -392,7 +386,7 @@ public void test0014() throws JavaModelException {
public void test0015() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0015/X.java",
+ "/Completion/src3/test0015/X.js",
"package test0015;\n" +
"public class X extends ZZZZ {\n" +
"}");
@@ -416,7 +410,7 @@ public void test0015() throws JavaModelException {
public void test0016() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0016/X.java",
+ "/Completion/src3/test0016/X.js",
"package test0016;\n" +
"public class X extends /**/ {\n" +
"}");
@@ -440,14 +434,14 @@ public void test0016() throws JavaModelException {
public void test0017() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test0017/YYYY.java",
+ "/Completion/src3/test0017/YYYY.js",
"package test0017;\n" +
"public class YYYY {\n" +
" public class ZZZZ {\n" +
" }\n" +
"}");
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0017/X.java",
+ "/Completion/src3/test0017/X.js",
"package test0017;\n" +
"public class X {\n" +
" void foo() {\n" +
@@ -474,14 +468,14 @@ public void test0017() throws JavaModelException {
public void test0018() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test0018/YYYY.java",
+ "/Completion/src3/test0018/YYYY.js",
"package test0018;\n" +
"public class YYYY {\n" +
" public class ZZZZ {\n" +
" }\n" +
"}");
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0018/X.java",
+ "/Completion/src3/test0018/X.js",
"package test0018;\n" +
"public class X {\n" +
" void foo() {\n" +
@@ -508,14 +502,14 @@ public void test0018() throws JavaModelException {
public void test0019() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test0019/YYYY.java",
+ "/Completion/src3/test0019/YYYY.js",
"package test0019;\n" +
"public class YYYY {\n" +
" public class ZZZZ {\n" +
" }\n" +
"}");
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0019/X.java",
+ "/Completion/src3/test0019/X.js",
"package test0019;\n" +
"public class X {\n" +
" void foo() {\n" +
@@ -542,14 +536,14 @@ public void test0019() throws JavaModelException {
public void test0020() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test0020/YYYY.java",
+ "/Completion/src3/test0020/YYYY.js",
"package test0020;\n" +
"public class YYYY {\n" +
" public class ZZZZ {\n" +
" }\n" +
"}");
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0020/X.java",
+ "/Completion/src3/test0020/X.js",
"package test0020;\n" +
"public class X {\n" +
" void foo() {\n" +
@@ -576,7 +570,7 @@ public void test0020() throws JavaModelException {
public void test0021() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0021/X.java",
+ "/Completion/src3/test0021/X.js",
"package test0021;\n" +
"public class X {\n" +
" void foo() {\n" +
@@ -603,7 +597,7 @@ public void test0021() throws JavaModelException {
public void test0022() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0022/X.java",
+ "/Completion/src3/test0022/X.js",
"package test0022;\n" +
"public class X {\n" +
" void foo() {\n" +
@@ -630,7 +624,7 @@ public void test0022() throws JavaModelException {
public void test0023() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0023/X.java",
+ "/Completion/src3/test0023/X.js",
"package test0023;\n" +
"public class X {\n" +
" void foo() {\n" +
@@ -657,7 +651,7 @@ public void test0023() throws JavaModelException {
public void test0024() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0024/X.java",
+ "/Completion/src3/test0024/X.js",
"package test0024;\n" +
"public class X {\n" +
" void foo() {\n" +
@@ -684,7 +678,7 @@ public void test0024() throws JavaModelException {
public void test0025() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0025/X.java",
+ "/Completion/src3/test0025/X.js",
"package test0025;\n" +
"public class X {\n" +
" Object var;\n" +
@@ -712,7 +706,7 @@ public void test0025() throws JavaModelException {
public void test0026() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0026/X.java",
+ "/Completion/src3/test0026/X.js",
"package test0026;\n" +
"public class X {\n" +
" Object var;\n" +
@@ -742,7 +736,7 @@ public void test0026() throws JavaModelException {
public void test0027() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0027/X.java",
+ "/Completion/src3/test0027/X.js",
"package test0027;\n" +
"public class X {\n" +
" Object var;\n" +
@@ -770,7 +764,7 @@ public void test0027() throws JavaModelException {
public void test0028() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0028/X.java",
+ "/Completion/src3/test0028/X.js",
"package test0028;\n" +
"public class X {\n" +
" Object var;\n" +
@@ -798,14 +792,14 @@ public void test0028() throws JavaModelException {
public void test0029() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test0029/YYYY.java",
+ "/Completion/src3/test0029/YYYY.js",
"package test0029;\n" +
"public class YYYY {\n" +
" public class ZZZZ {\n" +
" }\n" +
"}");
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0029/X.java",
+ "/Completion/src3/test0029/X.js",
"package test0029;\n" +
"public class X extends YYYY.ZZZZ {\n" +
"}");
@@ -829,14 +823,14 @@ public void test0029() throws JavaModelException {
public void test0030() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test0030/YYYY.java",
+ "/Completion/src3/test0030/YYYY.js",
"package test0030;\n" +
"public class YYYY {\n" +
" public class ZZZZ {\n" +
" }\n" +
"}");
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0030/X.java",
+ "/Completion/src3/test0030/X.js",
"package test0030;\n" +
"public class X extends YYYY.ZZZZ {\n" +
"}");
@@ -862,14 +856,14 @@ public void test0030() throws JavaModelException {
public void test0031() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test0031/YYYY.java",
+ "/Completion/src3/test0031/YYYY.js",
"package test0031;\n" +
"public class YYYY {\n" +
" public class ZZZZ {\n" +
" }\n" +
"}");
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0031/X.java",
+ "/Completion/src3/test0031/X.js",
"package test0031;\n" +
"public class X extends YYYY.ZZZZ {\n" +
"}");
@@ -893,14 +887,14 @@ public void test0031() throws JavaModelException {
public void test0032() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test0032/YYYY.java",
+ "/Completion/src3/test0032/YYYY.js",
"package test0032;\n" +
"public class YYYY {\n" +
" public class ZZZZ {\n" +
" }\n" +
"}");
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0032/X.java",
+ "/Completion/src3/test0032/X.js",
"package test0032;\n" +
"public class X extends YYYY. {\n" +
"}");
@@ -924,7 +918,7 @@ public void test0032() throws JavaModelException {
public void test0033() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0033/X.java",
+ "/Completion/src3/test0033/X.js",
"package test0033;\n" +
"public class X extends test0033.ZZZZ {\n" +
"}");
@@ -948,7 +942,7 @@ public void test0033() throws JavaModelException {
public void test0034() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0034/X.java",
+ "/Completion/src3/test0034/X.js",
"package test0034;\n" +
"public class X extends test0034.ZZZZ {\n" +
"}");
@@ -972,7 +966,7 @@ public void test0034() throws JavaModelException {
public void test0035() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0035/X.java",
+ "/Completion/src3/test0035/X.js",
"package test0035;\n" +
"public class X extends test0035.ZZZZ {\n" +
"}");
@@ -996,7 +990,7 @@ public void test0035() throws JavaModelException {
public void test0036() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0036/X.java",
+ "/Completion/src3/test0036/X.js",
"package test0036;\n" +
"public class X extends test0036. {\n" +
"}");
@@ -1020,7 +1014,7 @@ public void test0036() throws JavaModelException {
public void test0037() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0037/X.java",
+ "/Completion/src3/test0037/X.js",
"package test0037;\n" +
"public class X {\n" +
" X ZZZZ;\n" +
@@ -1048,7 +1042,7 @@ public void test0037() throws JavaModelException {
public void test0038() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0038/X.java",
+ "/Completion/src3/test0038/X.js",
"package test0038;\n" +
"public class X {\n" +
" X ZZZZ;\n" +
@@ -1076,7 +1070,7 @@ public void test0038() throws JavaModelException {
public void test0039() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0039/X.java",
+ "/Completion/src3/test0039/X.js",
"package test0039;\n" +
"public class X {\n" +
" X ZZZZ;\n" +
@@ -1104,7 +1098,7 @@ public void test0039() throws JavaModelException {
public void test0040() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0040/X.java",
+ "/Completion/src3/test0040/X.js",
"package test0040;\n" +
"public class X {\n" +
" X ZZZZ;\n" +
@@ -1132,7 +1126,7 @@ public void test0040() throws JavaModelException {
public void test0041() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0041/X.java",
+ "/Completion/src3/test0041/X.js",
"package test0041;\n" +
"public class X {\n" +
" X ZZZZ;\n" +
@@ -1160,7 +1154,7 @@ public void test0041() throws JavaModelException {
public void test0042() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0042/X.java",
+ "/Completion/src3/test0042/X.js",
"package test0042;\n" +
"public class X {\n" +
" X ZZZZ;\n" +
@@ -1188,7 +1182,7 @@ public void test0042() throws JavaModelException {
public void test0043() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0043/X.java",
+ "/Completion/src3/test0043/X.js",
"package test0043;\n" +
"public class X {\n" +
" X ZZZZ;\n" +
@@ -1216,7 +1210,7 @@ public void test0043() throws JavaModelException {
public void test0044() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0044/X.java",
+ "/Completion/src3/test0044/X.js",
"package test0044;\n" +
"public class X {\n" +
" X ZZZZ;\n" +
@@ -1244,7 +1238,7 @@ public void test0044() throws JavaModelException {
public void test0045() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0045/X.java",
+ "/Completion/src3/test0045/X.js",
"package test0045;\n" +
"public class X {\n" +
" void ZZZZ(){\n" +
@@ -1270,7 +1264,7 @@ public void test0045() throws JavaModelException {
public void test0046() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0046/X.java",
+ "/Completion/src3/test0046/X.js",
"package test0046;\n" +
"public class X {\n" +
" void ZZZZ(){\n" +
@@ -1296,7 +1290,7 @@ public void test0046() throws JavaModelException {
public void test0047() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0047/X.java",
+ "/Completion/src3/test0047/X.js",
"package test0047;\n" +
"public class X {\n" +
" void ZZZZ(){\n" +
@@ -1322,7 +1316,7 @@ public void test0047() throws JavaModelException {
public void test0048() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0048/X.java",
+ "/Completion/src3/test0048/X.js",
"package test0048;\n" +
"public class X {\n" +
" void (){\n" +
@@ -1348,7 +1342,7 @@ public void test0048() throws JavaModelException {
public void test0049() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0049/X.java",
+ "/Completion/src3/test0049/X.js",
"package test0049;\n" +
"public class X {\n" +
" int ZZZZ;\n" +
@@ -1373,7 +1367,7 @@ public void test0049() throws JavaModelException {
public void test0050() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0050/X.java",
+ "/Completion/src3/test0050/X.js",
"package test0050;\n" +
"public class X {\n" +
" int ZZZZ;\n" +
@@ -1398,7 +1392,7 @@ public void test0050() throws JavaModelException {
public void test0051() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0051/X.java",
+ "/Completion/src3/test0051/X.js",
"package test0051;\n" +
"public class X {\n" +
" int ZZZZ;\n" +
@@ -1423,7 +1417,7 @@ public void test0051() throws JavaModelException {
public void test0052() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0052/X.java",
+ "/Completion/src3/test0052/X.js",
"package test0052;\n" +
"public class X {\n" +
" int ;\n" +
@@ -1448,7 +1442,7 @@ public void test0052() throws JavaModelException {
public void test0053() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0053/X.java",
+ "/Completion/src3/test0053/X.js",
"package test0053;\n" +
"public class X {\n" +
" {int ZZZZ;}\n" +
@@ -1473,7 +1467,7 @@ public void test0053() throws JavaModelException {
public void test0054() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0054/X.java",
+ "/Completion/src3/test0054/X.js",
"package test0054;\n" +
"public class X {\n" +
" {int ZZZZ;}\n" +
@@ -1498,7 +1492,7 @@ public void test0054() throws JavaModelException {
public void test0055() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0055/X.java",
+ "/Completion/src3/test0055/X.js",
"package test0055;\n" +
"public class X {\n" +
" {int ZZZZ;}\n" +
@@ -1523,7 +1517,7 @@ public void test0055() throws JavaModelException {
public void test0056() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0056/X.java",
+ "/Completion/src3/test0056/X.js",
"package test0056;\n" +
"public class X {\n" +
" {int ;}\n" +
@@ -1548,7 +1542,7 @@ public void test0056() throws JavaModelException {
public void test0057() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0057/X.java",
+ "/Completion/src3/test0057/X.js",
"package test0057;\n" +
"public class X {\n" +
" void foo(int ZZZZ){}\n" +
@@ -1573,7 +1567,7 @@ public void test0057() throws JavaModelException {
public void test0058() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0058/X.java",
+ "/Completion/src3/test0058/X.js",
"package test0058;\n" +
"public class X {\n" +
" void foo(int ZZZZ){}\n" +
@@ -1598,7 +1592,7 @@ public void test0058() throws JavaModelException {
public void test0059() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0059/X.java",
+ "/Completion/src3/test0059/X.js",
"package test0059;\n" +
"public class X {\n" +
" void foo(int ZZZZ){}\n" +
@@ -1623,7 +1617,7 @@ public void test0059() throws JavaModelException {
public void test0060() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0060/X.java",
+ "/Completion/src3/test0060/X.js",
"package test0060;\n" +
"public class X {\n" +
" void foo(int ){}\n" +
@@ -1648,7 +1642,7 @@ public void test0060() throws JavaModelException {
public void test0061() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0061/X.java",
+ "/Completion/src3/test0061/X.js",
"package test0061;\n" +
"public class X ZZZZ {\n" +
"}");
@@ -1672,7 +1666,7 @@ public void test0061() throws JavaModelException {
public void test0062() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0062/X.java",
+ "/Completion/src3/test0062/X.js",
"package test0062;\n" +
"public class X ZZZZ {\n" +
"}");
@@ -1696,7 +1690,7 @@ public void test0062() throws JavaModelException {
public void test0063() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0063/X.java",
+ "/Completion/src3/test0063/X.js",
"package test0063;\n" +
"public class X ZZZZ {\n" +
"}");
@@ -1720,7 +1714,7 @@ public void test0063() throws JavaModelException {
public void test0064() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0064/X.java",
+ "/Completion/src3/test0064/X.js",
"package test0064;\n" +
"public class X {\n" +
"}");
@@ -1744,7 +1738,7 @@ public void test0064() throws JavaModelException {
public void test0065() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0065/X.java",
+ "/Completion/src3/test0065/X.js",
"package test0065;\n" +
"ZZZZ\n" +
"}");
@@ -1768,7 +1762,7 @@ public void test0065() throws JavaModelException {
public void test0066() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0066/X.java",
+ "/Completion/src3/test0066/X.js",
"package test0066;\n" +
"ZZZZ\n" +
"}");
@@ -1792,7 +1786,7 @@ public void test0066() throws JavaModelException {
public void test0067() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0067/X.java",
+ "/Completion/src3/test0067/X.js",
"package test0067;\n" +
"ZZZZ\n" +
"}");
@@ -1816,7 +1810,7 @@ public void test0067() throws JavaModelException {
public void test0068() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0068/X.java",
+ "/Completion/src3/test0068/X.js",
"package test0068;\n" +
"/**/\n" +
"}");
@@ -1840,7 +1834,7 @@ public void test0068() throws JavaModelException {
public void test0069() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0069/X.java",
+ "/Completion/src3/test0069/X.js",
"package test0069;\n" +
"public class X {\n" +
" {\n" +
@@ -1868,7 +1862,7 @@ public void test0069() throws JavaModelException {
public void test0070() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0070/X.java",
+ "/Completion/src3/test0070/X.js",
"package test0070;\n" +
"public class X {\n" +
" {\n" +
@@ -1896,7 +1890,7 @@ public void test0070() throws JavaModelException {
public void test0071() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0071/X.java",
+ "/Completion/src3/test0071/X.js",
"package test0071;\n" +
"public class X {\n" +
" {\n" +
@@ -1924,7 +1918,7 @@ public void test0071() throws JavaModelException {
public void test0072() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0072/X.java",
+ "/Completion/src3/test0072/X.js",
"package test0072;\n" +
"public class X {\n" +
" {\n" +
@@ -1952,7 +1946,7 @@ public void test0072() throws JavaModelException {
public void test0073() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0073/X.java",
+ "/Completion/src3/test0073/X.js",
"package ZZZZ;\n" +
"public class X {\n" +
"}");
@@ -1976,7 +1970,7 @@ public void test0073() throws JavaModelException {
public void test0074() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0074/X.java",
+ "/Completion/src3/test0074/X.js",
"package ZZZZ;\n" +
"public class X {\n" +
"}");
@@ -2000,7 +1994,7 @@ public void test0074() throws JavaModelException {
public void test0075() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0075/X.java",
+ "/Completion/src3/test0075/X.js",
"package ZZZZ;\n" +
"public class X {\n" +
"}");
@@ -2024,7 +2018,7 @@ public void test0075() throws JavaModelException {
public void test0076() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0076/X.java",
+ "/Completion/src3/test0076/X.js",
"package \n" +
"public class X {\n" +
"}");
@@ -2048,7 +2042,7 @@ public void test0076() throws JavaModelException {
public void test0077() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0077/test/X.java",
+ "/Completion/src3/test0077/test/X.js",
"package test0077.ZZZZ;\n" +
"public class X {\n" +
"}");
@@ -2072,7 +2066,7 @@ public void test0077() throws JavaModelException {
public void test0078() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0078/test/X.java",
+ "/Completion/src3/test0078/test/X.js",
"package test0078.ZZZZ;\n" +
"public class X {\n" +
"}");
@@ -2096,7 +2090,7 @@ public void test0078() throws JavaModelException {
public void test0079() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0079/test/X.java",
+ "/Completion/src3/test0079/test/X.js",
"package test0079.ZZZZ;\n" +
"public class X {\n" +
"}");
@@ -2120,7 +2114,7 @@ public void test0079() throws JavaModelException {
public void test0080() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0080/test/X.java",
+ "/Completion/src3/test0080/test/X.js",
"package test0080.\n" +
"public class X {\n" +
"}");
@@ -2144,7 +2138,7 @@ public void test0080() throws JavaModelException {
public void test0081() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0081/X.java",
+ "/Completion/src3/test0081/X.js",
"package test0081;\n" +
"import ZZZZ;\n" +
"public class X {\n" +
@@ -2169,7 +2163,7 @@ public void test0081() throws JavaModelException {
public void test0082() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0082/X.java",
+ "/Completion/src3/test0082/X.js",
"package test0082;\n" +
"import ZZZZ;\n" +
"public class X {\n" +
@@ -2194,7 +2188,7 @@ public void test0082() throws JavaModelException {
public void test0083() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0083/X.java",
+ "/Completion/src3/test0083/X.js",
"package test0083;\n" +
"import ZZZZ;\n" +
"public class X {\n" +
@@ -2219,7 +2213,7 @@ public void test0083() throws JavaModelException {
public void test0084() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0084/X.java",
+ "/Completion/src3/test0084/X.js",
"package test0084;\n" +
"import \n" +
"public class X {\n" +
@@ -2244,7 +2238,7 @@ public void test0084() throws JavaModelException {
public void test0085() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0085/test/X.java",
+ "/Completion/src3/test0085/test/X.js",
"package test0085;\n" +
"import test0085.ZZZZ;\n" +
"public class X {\n" +
@@ -2269,7 +2263,7 @@ public void test0085() throws JavaModelException {
public void test0086() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0086/test/X.java",
+ "/Completion/src3/test0086/test/X.js",
"package test0086;\n" +
"import test0086.ZZZZ;\n" +
"public class X {\n" +
@@ -2294,7 +2288,7 @@ public void test0086() throws JavaModelException {
public void test0087() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0087/test/X.java",
+ "/Completion/src3/test0087/test/X.js",
"package test0087;\n" +
"import test0087.ZZZZ;\n" +
"public class X {\n" +
@@ -2319,7 +2313,7 @@ public void test0087() throws JavaModelException {
public void test0088() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0084/test/X.java",
+ "/Completion/src3/test0084/test/X.js",
"package test0088;\n" +
"import test0085.\n" +
"public class X {\n" +
@@ -2344,7 +2338,7 @@ public void test0088() throws JavaModelException {
public void test0089() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0089/X.java",
+ "/Completion/src3/test0089/X.js",
"package test0089;\n" +
"public class X {\n" +
" void foo(int a, int b) {\n" +
@@ -2371,7 +2365,7 @@ public void test0089() throws JavaModelException {
public void test0090() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0090/X.java",
+ "/Completion/src3/test0090/X.js",
"package test0090;\n" +
"public class X {\n" +
" void foo(int a, int b) {\n" +
@@ -2398,7 +2392,7 @@ public void test0090() throws JavaModelException {
public void test0091() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0091/X.java",
+ "/Completion/src3/test0091/X.js",
"package test0091;\n" +
"public class X {\n" +
" void foo(int a, int b) {\n" +
@@ -2425,7 +2419,7 @@ public void test0091() throws JavaModelException {
public void test0092() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0092/X.java",
+ "/Completion/src3/test0092/X.js",
"package test0092;\n" +
"public class X {\n" +
" void foo(int a, int b) {\n" +
@@ -2452,7 +2446,7 @@ public void test0092() throws JavaModelException {
public void test0093() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0093/X.java",
+ "/Completion/src3/test0093/X.js",
"package test0093;\n" +
"public class X {\n" +
" void foo(int a, int b) {\n" +
@@ -2479,7 +2473,7 @@ public void test0093() throws JavaModelException {
public void test0094() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0094/X.java",
+ "/Completion/src3/test0094/X.js",
"package test0094;\n" +
"public class X {\n" +
" void foo(int a, int b) {\n" +
@@ -2506,7 +2500,7 @@ public void test0094() throws JavaModelException {
public void test0095() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0095/X.java",
+ "/Completion/src3/test0095/X.js",
"package test0095;\n" +
"public class X {\n" +
" void foo(int a, int b) {\n" +
@@ -2533,7 +2527,7 @@ public void test0095() throws JavaModelException {
public void test0096() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0096/X.java",
+ "/Completion/src3/test0096/X.js",
"package test0096;\n" +
"public class X {\n" +
" void foo(int a, int b) {\n" +
@@ -2560,7 +2554,7 @@ public void test0096() throws JavaModelException {
public void test0097() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0097/X.java",
+ "/Completion/src3/test0097/X.js",
"package test0097;\n" +
"public class X {\n" +
" X(int a, int b) {}\n" +
@@ -2588,7 +2582,7 @@ public void test0097() throws JavaModelException {
public void test0098() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0098/X.java",
+ "/Completion/src3/test0098/X.js",
"package test0098;\n" +
"public class X {\n" +
" X(int a, int b) {}\n" +
@@ -2616,7 +2610,7 @@ public void test0098() throws JavaModelException {
public void test0099() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0099/X.java",
+ "/Completion/src3/test0099/X.js",
"package test0099;\n" +
"public class X {\n" +
" X(int a, int b) {}\n" +
@@ -2644,7 +2638,7 @@ public void test0099() throws JavaModelException {
public void test0100() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0100/X.java",
+ "/Completion/src3/test0100/X.js",
"package test0100;\n" +
"public class X {\n" +
" X(int a, int b) {}\n" +
@@ -2672,7 +2666,7 @@ public void test0100() throws JavaModelException {
public void test0101() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0101/X.java",
+ "/Completion/src3/test0101/X.js",
"package test0101;\n" +
"public class X {\n" +
" X(int a, int b) {}\n" +
@@ -2700,7 +2694,7 @@ public void test0101() throws JavaModelException {
public void test0102() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0102/X.java",
+ "/Completion/src3/test0102/X.js",
"package test0102;\n" +
"public class X {\n" +
" X(int a, int b) {}\n" +
@@ -2728,7 +2722,7 @@ public void test0102() throws JavaModelException {
public void test0103() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0103/X.java",
+ "/Completion/src3/test0103/X.js",
"package test0103;\n" +
"public class X {\n" +
" X(int a, int b) {}\n" +
@@ -2756,7 +2750,7 @@ public void test0103() throws JavaModelException {
public void test0104() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0104/X.java",
+ "/Completion/src3/test0104/X.js",
"package test0104;\n" +
"public class X {\n" +
" X(int a, int b) {}\n" +
@@ -2784,7 +2778,7 @@ public void test0104() throws JavaModelException {
public void test0105() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0105/X.java",
+ "/Completion/src3/test0105/X.js",
"package test0105;\n" +
"public class X {\n" +
" Object o = ZZZZ\n" +
@@ -2809,7 +2803,7 @@ public void test0105() throws JavaModelException {
public void test0106() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0106/X.java",
+ "/Completion/src3/test0106/X.js",
"package test0106;\n" +
"public class X {\n" +
" Object o = ZZZZ\n" +
@@ -2834,7 +2828,7 @@ public void test0106() throws JavaModelException {
public void test0107() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0107/X.java",
+ "/Completion/src3/test0107/X.js",
"package test0107;\n" +
"public class X {\n" +
" Object o = ZZZZ\n" +
@@ -2859,7 +2853,7 @@ public void test0107() throws JavaModelException {
public void test0108() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0108/X.java",
+ "/Completion/src3/test0108/X.js",
"package test0108;\n" +
"public class X {\n" +
" Object o = \n" +
@@ -2884,7 +2878,7 @@ public void test0108() throws JavaModelException {
public void test0109() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0109/X.java",
+ "/Completion/src3/test0109/X.js",
"package test0109;\n" +
"public class X {\n" +
" Object o = new ZZZZ\n" +
@@ -2909,7 +2903,7 @@ public void test0109() throws JavaModelException {
public void test0110() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0110/X.java",
+ "/Completion/src3/test0110/X.js",
"package test0110;\n" +
"public class X {\n" +
" Object o = new ZZZZ\n" +
@@ -2934,7 +2928,7 @@ public void test0110() throws JavaModelException {
public void test0111() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0111/X.java",
+ "/Completion/src3/test0111/X.js",
"package test0111;\n" +
"public class X {\n" +
" Object o = new ZZZZ\n" +
@@ -2959,7 +2953,7 @@ public void test0111() throws JavaModelException {
public void test0112() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0112/X.java",
+ "/Completion/src3/test0112/X.js",
"package test0112;\n" +
"public class X {\n" +
" Object o = new \n" +
@@ -2984,7 +2978,7 @@ public void test0112() throws JavaModelException {
public void test0113() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0113/X.java",
+ "/Completion/src3/test0113/X.js",
"package test0113;\n" +
"public class X {\n" +
" Object o = new Object() {\n" +
@@ -3011,7 +3005,7 @@ public void test0113() throws JavaModelException {
public void test0114() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0114/X.java",
+ "/Completion/src3/test0114/X.js",
"package test0114;\n" +
"public class X {\n" +
" Object o = new Object() {\n" +
@@ -3038,7 +3032,7 @@ public void test0114() throws JavaModelException {
public void test0115() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0115/X.java",
+ "/Completion/src3/test0115/X.js",
"package test0115;\n" +
"public class X {\n" +
" Object o = new Object() {\n" +
@@ -3065,7 +3059,7 @@ public void test0115() throws JavaModelException {
public void test0116() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0116/X.java",
+ "/Completion/src3/test0116/X.js",
"package test0116;\n" +
"public class X {\n" +
" Object o = new Object() {\n" +
@@ -3092,7 +3086,7 @@ public void test0116() throws JavaModelException {
public void test0117() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0117/X.java",
+ "/Completion/src3/test0117/X.js",
"package test0117;\n" +
"public class X {\n" +
" String s = \"ZZZZ\";\n" +
@@ -3117,7 +3111,7 @@ public void test0117() throws JavaModelException {
public void test0118() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0118/X.java",
+ "/Completion/src3/test0118/X.js",
"package test0118;\n" +
"public class X {\n" +
" String s = \"ZZZZ\";\n" +
@@ -3142,7 +3136,7 @@ public void test0118() throws JavaModelException {
public void test0119() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0119/X.java",
+ "/Completion/src3/test0119/X.js",
"package test0119;\n" +
"public class X {\n" +
" String s = \"ZZZZ\";\n" +
@@ -3167,7 +3161,7 @@ public void test0119() throws JavaModelException {
public void test0120() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0120/X.java",
+ "/Completion/src3/test0120/X.js",
"package test0120;\n" +
"public class X {\n" +
" String s = \"ZZZZ\";\n" +
@@ -3192,7 +3186,7 @@ public void test0120() throws JavaModelException {
public void test0121() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0121/X.java",
+ "/Completion/src3/test0121/X.js",
"package test0121;\n" +
"public class X {\n" +
" String s = \"ZZZZ\";\n" +
@@ -3215,7 +3209,7 @@ public void test0121() throws JavaModelException {
public void test0122() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0122/X.java",
+ "/Completion/src3/test0122/X.js",
"package test0122;\n" +
"public class X {\n" +
" String s = \"\";\n" +
@@ -3240,7 +3234,7 @@ public void test0122() throws JavaModelException {
public void test0123() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0123/X.java",
+ "/Completion/src3/test0123/X.js",
"package test0123;\n" +
"public class X {\n" +
" String s = \"ZZZZ\n" +
@@ -3265,7 +3259,7 @@ public void test0123() throws JavaModelException {
public void test0124() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0124/X.java",
+ "/Completion/src3/test0124/X.js",
"package test0124;\n" +
"public class X {\n" +
" String s = \"ZZZZ\n" +
@@ -3290,7 +3284,7 @@ public void test0124() throws JavaModelException {
public void test0125() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0125/X.java",
+ "/Completion/src3/test0125/X.js",
"package test0125;\n" +
"public class X {\n" +
" String s = \"ZZZZ\n" +
@@ -3315,7 +3309,7 @@ public void test0125() throws JavaModelException {
public void test0126() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0126/X.java",
+ "/Completion/src3/test0126/X.js",
"package test0126;\n" +
"public class X {\n" +
" String s = \"ZZZZ\n" +
@@ -3340,7 +3334,7 @@ public void test0126() throws JavaModelException {
public void test0127() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0127/X.java",
+ "/Completion/src3/test0127/X.js",
"package test0127;\n" +
"public class X {\n" +
" String s = \"\n" +
@@ -3365,7 +3359,7 @@ public void test0127() throws JavaModelException {
public void test0128() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0127/X.java",
+ "/Completion/src3/test0127/X.js",
"package test0127;\n" +
"public class X {\n" +
" String s0 = \"\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionContextTests_1_5.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionContextTests_1_5.java
index fce6544..3595bcb 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionContextTests_1_5.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionContextTests_1_5.java
@@ -34,7 +34,7 @@ public static Test suite() {
public void test0001() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0001/X.java",
+ "/Completion/src3/test0001/X.js",
"package test0001;\n" +
"public class X<T> {\n" +
" X<Object>.ZZZZ\n" +
@@ -59,7 +59,7 @@ public void test0001() throws JavaModelException {
public void test0002() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0002/X.java",
+ "/Completion/src3/test0002/X.js",
"package test0002;\n" +
"public class X<T> {\n" +
" X<Object>.ZZZZ\n" +
@@ -84,7 +84,7 @@ public void test0002() throws JavaModelException {
public void test0003() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0003/X.java",
+ "/Completion/src3/test0003/X.js",
"package test0003;\n" +
"public class X<T> {\n" +
" X<Object>.ZZZZ\n" +
@@ -109,7 +109,7 @@ public void test0003() throws JavaModelException {
public void test0004() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0004/X.java",
+ "/Completion/src3/test0004/X.js",
"package test0004;\n" +
"public class X<T> {\n" +
" X<Object>.\n" +
@@ -134,7 +134,7 @@ public void test0004() throws JavaModelException {
public void test0005() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0005/X.java",
+ "/Completion/src3/test0005/X.js",
"package test0005;\n" +
"@ZZZZ\n" +
"public class X {\n" +
@@ -159,7 +159,7 @@ public void test0005() throws JavaModelException {
public void test0006() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0006/X.java",
+ "/Completion/src3/test0006/X.js",
"package test0006;\n" +
"@ZZZZ\n" +
"public class X {\n" +
@@ -183,7 +183,7 @@ public void test0006() throws JavaModelException {
public void test0007() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0007/X.java",
+ "/Completion/src3/test0007/X.js",
"package test0007;\n" +
"@ZZZZ\n" +
"public class X {\n" +
@@ -208,7 +208,7 @@ public void test0007() throws JavaModelException {
public void test0008() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0008/X.java",
+ "/Completion/src3/test0008/X.js",
"package test0008;\n" +
"@\n" +
"public class X {\n" +
@@ -233,7 +233,7 @@ public void test0008() throws JavaModelException {
public void test0009() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0009/X.java",
+ "/Completion/src3/test0009/X.js",
"package test0009;\n" +
"class Y {\n" +
"}\n" +
@@ -260,7 +260,7 @@ public void test0009() throws JavaModelException {
public void test0010() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0010/X.java",
+ "/Completion/src3/test0010/X.js",
"package test0010;\n" +
"class Y {\n" +
"}\n" +
@@ -286,7 +286,7 @@ public void test0010() throws JavaModelException {
public void test0011() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0011/X.java",
+ "/Completion/src3/test0011/X.js",
"package test0011;\n" +
"class Y {\n" +
"}\n" +
@@ -313,7 +313,7 @@ public void test0011() throws JavaModelException {
public void test0012() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0012/X.java",
+ "/Completion/src3/test0012/X.js",
"package test0012;\n" +
"class Y {\n" +
"}\n" +
@@ -340,7 +340,7 @@ public void test0012() throws JavaModelException {
public void test0013() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0013/X.java",
+ "/Completion/src3/test0013/X.js",
"package test0013;\n" +
"@test0013.ZZZZ\n" +
"public class X {\n" +
@@ -365,7 +365,7 @@ public void test0013() throws JavaModelException {
public void test0014() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0014/X.java",
+ "/Completion/src3/test0014/X.js",
"package test0014;\n" +
"@test0014.ZZZZ\n" +
"public class X {\n" +
@@ -389,7 +389,7 @@ public void test0014() throws JavaModelException {
public void test0015() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0015/X.java",
+ "/Completion/src3/test0015/X.js",
"package test0015;\n" +
"@test0015.ZZZZ\n" +
"public class X {\n" +
@@ -414,7 +414,7 @@ public void test0015() throws JavaModelException {
public void test0016() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0016/X.java",
+ "/Completion/src3/test0016/X.js",
"package test0016;\n" +
"@test0016.\n" +
"public class X {\n" +
@@ -439,7 +439,7 @@ public void test0016() throws JavaModelException {
public void test0017() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0017/X.java",
+ "/Completion/src3/test0017/X.js",
"package test0017;\n" +
"@interface Y {\n" +
" int value();\n" +
@@ -467,7 +467,7 @@ public void test0017() throws JavaModelException {
public void test0018() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0018/X.java",
+ "/Completion/src3/test0018/X.js",
"package test0018;\n" +
"@interface Y {\n" +
" int value();\n" +
@@ -495,7 +495,7 @@ public void test0018() throws JavaModelException {
public void test0019() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0019/X.java",
+ "/Completion/src3/test0019/X.js",
"package test0019;\n" +
"@interface Y {\n" +
" int value();\n" +
@@ -523,7 +523,7 @@ public void test0019() throws JavaModelException {
public void test0020() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0020/X.java",
+ "/Completion/src3/test0020/X.js",
"package test0020;\n" +
"@interface Y {\n" +
" int value();\n" +
@@ -551,7 +551,7 @@ public void test0020() throws JavaModelException {
public void test0021() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0021/X.java",
+ "/Completion/src3/test0021/X.js",
"package test0021;\n" +
"@interface Y {\n" +
" int value1();\n" +
@@ -580,7 +580,7 @@ public void test0021() throws JavaModelException {
public void test0022() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0022/X.java",
+ "/Completion/src3/test0022/X.js",
"package test0022;\n" +
"@interface Y {\n" +
" int value1();\n" +
@@ -609,7 +609,7 @@ public void test0022() throws JavaModelException {
public void test0023() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0023/X.java",
+ "/Completion/src3/test0023/X.js",
"package test0023;\n" +
"@interface Y {\n" +
" int value1();\n" +
@@ -638,7 +638,7 @@ public void test0023() throws JavaModelException {
public void test0024() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0024/X.java",
+ "/Completion/src3/test0024/X.js",
"package test0024;\n" +
"@interface Y {\n" +
" int value1();\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionTests.java
index f4376d4..70130ef 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionTests.java
@@ -44,11 +44,36 @@ public void setUpSuite() throws Exception {
public void tearDownSuite() throws Exception {
super.tearDownSuite();
}
+
+public void test00() throws JavaModelException {
+ this.wc = getWorkingCopy(
+ "/Completion/src/test/Test.js",
+ "MyClass.prototype.someMethod = MyClass_someMethod;"+
+ "function MyClass(){}"+
+ "function MyClass_someMethod(){}"+
+ "var myClassObj = new MyClass();\n"+
+ "myClassObj.someMethod();\n"+
+ "");
+
+
+ CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
+ String str = this.wc.getSource();
+ String completeBehind = "someMethod";
+ int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
+ this.wc.codeComplete(cursorLocation, requestor, this.wcOwner);
+
+ assertResults(
+ "someMethod[METHOD_REF]{, Ltest.MyClass;, ()V, someMethod, null, " + (R_DEFAULT + R_INTERESTING + R_CASE + R_EXACT_NAME + R_UNQUALIFIED + R_NON_RESTRICTED) + "}",
+ requestor.getResults());
+}
+
+
+
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=164311
public void testBug164311() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" public int zzzzzz;\n" +
@@ -73,7 +98,7 @@ public void testBug164311() throws JavaModelException {
public void testBug164311_2() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class X {\n"+
" public void zork() { \n"+
@@ -106,7 +131,7 @@ public void testBug164311_2() throws JavaModelException {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=96213
public void testBug96213() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n" +
"public class Test{\n"+
" Test toto(Object o) {\n"+
@@ -136,11 +161,11 @@ public void testBug99811() throws JavaModelException {
ICompilationUnit aType = null;
try {
this.wc = getWorkingCopy(
- "/Completion/src/test/A.java",
+ "/Completion/src/test/A.js",
"public abstract class A implements I {}");
aType = getWorkingCopy(
- "/Completion/src/test/I.java",
+ "/Completion/src/test/I.js",
"public interface I {\n"+
" public class M extends A {}\n"+
"}");
@@ -168,7 +193,7 @@ public void testCamelCaseField1() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/camelcase/Test.java",
+ "/Completion/src/camelcase/Test.js",
"package camelcase;"+
"public class Test {\n"+
" int oneTwoThree;\n"+
@@ -202,7 +227,7 @@ public void testCamelCaseLocalVariable1() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/camelcase/Test.java",
+ "/Completion/src/camelcase/Test.js",
"package camelcase;"+
"public class Test {\n"+
" void foo() {\n"+
@@ -236,7 +261,7 @@ public void testCamelCaseMethod1() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/camelcase/Test.java",
+ "/Completion/src/camelcase/Test.js",
"package camelcase;"+
"public class Test {\n"+
" void oneTwoThree(){}\n"+
@@ -270,14 +295,14 @@ public void testCamelCaseMethodDeclaration1() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/camelcase/Test.java",
+ "/Completion/src/camelcase/Test.js",
"package camelcase;"+
"public class Test extends SuperClass {\n"+
" oTT\n"+
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/camelcase/SuperClass.java",
+ "/Completion/src/camelcase/SuperClass.js",
"package camelcase;"+
"public class SuperClass {\n"+
" public void oneTwoThree(){}\n"+
@@ -309,20 +334,20 @@ public void testCamelCaseType1() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/camelcase/Test.java",
+ "/Completion/src/camelcase/Test.js",
"package camelcase;"+
"public class Test {\n"+
" FF\n"+
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/camelcase/FoFoFo.java",
+ "/Completion/src/camelcase/FoFoFo.js",
"package camelcase;"+
"public class FoFoFo {\n"+
"}");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/camelcase/FFFTest.java",
+ "/Completion/src/camelcase/FFFTest.js",
"package camelcase;"+
"public class FFFTest {\n"+
"}");
@@ -352,20 +377,20 @@ public void testCamelCaseType2() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/camelcase/Test.java",
+ "/Completion/src/camelcase/Test.js",
"package camelcase;"+
"public class Test {\n"+
" camelcase.FF\n"+
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/camelcase/FoFoFo.java",
+ "/Completion/src/camelcase/FoFoFo.js",
"package camelcase;"+
"public class FoFoFo {\n"+
"}");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/camelcase/FFFTest.java",
+ "/Completion/src/camelcase/FFFTest.js",
"package camelcase;"+
"public class FFFTest {\n"+
"}");
@@ -394,7 +419,7 @@ public void testCamelCaseType3() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/camelcase/Test.java",
+ "/Completion/src/camelcase/Test.js",
"package camelcase;"+
"public class Test {\n"+
" /**/FF\n"+
@@ -430,14 +455,14 @@ public void testCamelCaseType4() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/camelcase/Test.java",
+ "/Completion/src/camelcase/Test.js",
"package camelcase;"+
"public class Test {\n"+
" FF\n"+
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/camelcase/Member1.java",
+ "/Completion/src/camelcase/Member1.js",
"package camelcase;"+
"public class Member1 {\n"+
" public class FoFoFo {\n"+
@@ -445,7 +470,7 @@ public void testCamelCaseType4() throws JavaModelException {
"}");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/camelcase/Member2.java",
+ "/Completion/src/camelcase/Member2.js",
"package camelcase;"+
"public class Member2 {\n"+
" public class FFFTest {\n"+
@@ -477,7 +502,7 @@ public void testCamelCaseType5() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/camelcase/Test.java",
+ "/Completion/src/camelcase/Test.js",
"package camelcase;"+
"public class Test {\n"+
" public class FoFoFo {\n"+
@@ -506,7 +531,7 @@ public void testCamelCaseType5() throws JavaModelException {
public void testCatchClauseExceptionRef01() throws JavaModelException {
this.workingCopies = new ICompilationUnit[4];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" public void throwing() throws IZZAException, IZZException {}\n" +
@@ -523,19 +548,19 @@ public void testCatchClauseExceptionRef01() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/IZZAException.java",
+ "/Completion/src/test/IZZAException.js",
"package test;"+
"public class IZZAException extends Exception {\n" +
"}\n");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/test/IZZBException.java",
+ "/Completion/src/test/IZZBException.js",
"package test;"+
"public class IZZBException extends Exception {\n" +
"}\n");
this.workingCopies[3] = getWorkingCopy(
- "/Completion/src/test/IZZException.java",
+ "/Completion/src/test/IZZException.js",
"package test;"+
"public class IZZException extends Exception {\n" +
"}\n");
@@ -555,7 +580,7 @@ public void testCatchClauseExceptionRef01() throws JavaModelException {
public void testCatchClauseExceptionRef02() throws JavaModelException {
this.workingCopies = new ICompilationUnit[4];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" public void throwing() throws IZZAException, IZZException {}\n" +
@@ -572,19 +597,19 @@ public void testCatchClauseExceptionRef02() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/IZZAException.java",
+ "/Completion/src/test/IZZAException.js",
"package test;"+
"public class IZZAException extends Exception {\n" +
"}\n");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/test/IZZBException.java",
+ "/Completion/src/test/IZZBException.js",
"package test;"+
"public class IZZBException extends Exception {\n" +
"}\n");
this.workingCopies[3] = getWorkingCopy(
- "/Completion/src/test/IZZException.java",
+ "/Completion/src/test/IZZException.js",
"package test;"+
"public class IZZException extends Exception {\n" +
"}\n");
@@ -605,7 +630,7 @@ public void testCatchClauseExceptionRef02() throws JavaModelException {
public void testCatchClauseExceptionRef03() throws JavaModelException {
this.workingCopies = new ICompilationUnit[4];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" public void throwing() throws IZZAException, IZZException {}\n" +
@@ -623,19 +648,19 @@ public void testCatchClauseExceptionRef03() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/IZZAException.java",
+ "/Completion/src/test/IZZAException.js",
"package test;"+
"public class IZZAException extends Exception {\n" +
"}\n");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/test/IZZBException.java",
+ "/Completion/src/test/IZZBException.js",
"package test;"+
"public class IZZBException extends Exception {\n" +
"}\n");
this.workingCopies[3] = getWorkingCopy(
- "/Completion/src/test/IZZException.java",
+ "/Completion/src/test/IZZException.js",
"package test;"+
"public class IZZException extends Exception {\n" +
"}\n");
@@ -656,7 +681,7 @@ public void testCatchClauseExceptionRef03() throws JavaModelException {
public void testCatchClauseExceptionRef04() throws JavaModelException {
this.workingCopies = new ICompilationUnit[4];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" public void throwing() throws test.p.IZZAException, test.p.IZZException {}\n" +
@@ -673,19 +698,19 @@ public void testCatchClauseExceptionRef04() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/p/IZZAException.java",
+ "/Completion/src/test/p/IZZAException.js",
"package test.p;"+
"public class IZZAException extends Exception {\n" +
"}\n");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/test/p/IZZBException.java",
+ "/Completion/src/test/p/IZZBException.js",
"package test.p;"+
"public class IZZBException extends Exception {\n" +
"}\n");
this.workingCopies[3] = getWorkingCopy(
- "/Completion/src/test/p/IZZException.java",
+ "/Completion/src/test/p/IZZException.js",
"package test.p;"+
"public class IZZException extends Exception {\n" +
"}\n");
@@ -705,7 +730,7 @@ public void testCatchClauseExceptionRef04() throws JavaModelException {
public void testCatchClauseExceptionRef05() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" public class IZZAException extends Exception {}\n" +
@@ -739,7 +764,7 @@ public void testCatchClauseExceptionRef05() throws JavaModelException {
public void testCatchClauseExceptionRef06() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" public class Inner {\n" +
@@ -775,7 +800,7 @@ public void testCatchClauseExceptionRef06() throws JavaModelException {
public void testCatchClauseExceptionRef07() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" void zork() {\n" +
@@ -813,7 +838,7 @@ public void testCatchClauseExceptionRef07() throws JavaModelException {
public void testCatchClauseExceptionRef08() throws JavaModelException {
this.workingCopies = new ICompilationUnit[4];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" public void throwing() throws IZZAException, IZZException {}\n" +
@@ -830,19 +855,19 @@ public void testCatchClauseExceptionRef08() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/IZZAException.java",
+ "/Completion/src/test/IZZAException.js",
"package test;"+
"public class IZZAException extends Exception {\n" +
"}\n");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/test/IZZBException.java",
+ "/Completion/src/test/IZZBException.js",
"package test;"+
"public class IZZBException extends Exception {\n" +
"}\n");
this.workingCopies[3] = getWorkingCopy(
- "/Completion/src/test/IZZException.java",
+ "/Completion/src/test/IZZException.js",
"package test;"+
"public class IZZException extends Exception {\n" +
"}\n");
@@ -863,7 +888,7 @@ public void testCatchClauseExceptionRef08() throws JavaModelException {
public void testCatchClauseExceptionRef09() throws JavaModelException {
this.workingCopies = new ICompilationUnit[5];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" public void throwing() throws IZZAException, IZZCException, IZZException {}\n" +
@@ -885,25 +910,25 @@ public void testCatchClauseExceptionRef09() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/IZZAException.java",
+ "/Completion/src/test/IZZAException.js",
"package test;"+
"public class IZZAException extends Exception {\n" +
"}\n");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/test/IZZBException.java",
+ "/Completion/src/test/IZZBException.js",
"package test;"+
"public class IZZBException extends Exception {\n" +
"}\n");
this.workingCopies[3] = getWorkingCopy(
- "/Completion/src/test/IZZCException.java",
+ "/Completion/src/test/IZZCException.js",
"package test;"+
"public class IZZCException extends Exception {\n" +
"}\n");
this.workingCopies[4] = getWorkingCopy(
- "/Completion/src/test/IZZException.java",
+ "/Completion/src/test/IZZException.js",
"package test;"+
"public class IZZException extends Exception {\n" +
"}\n");
@@ -924,7 +949,7 @@ public void testCatchClauseExceptionRef09() throws JavaModelException {
public void testCatchClauseExceptionRef10() throws JavaModelException {
this.workingCopies = new ICompilationUnit[4];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" public void throwing() throws IZZAException, IZZException {}\n" +
@@ -941,19 +966,19 @@ public void testCatchClauseExceptionRef10() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/IZZAException.java",
+ "/Completion/src/test/IZZAException.js",
"package test;"+
"public class IZZAException extends Exception {\n" +
"}\n");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/test/IZZBException.java",
+ "/Completion/src/test/IZZBException.js",
"package test;"+
"public class IZZBException extends Exception {\n" +
"}\n");
this.workingCopies[3] = getWorkingCopy(
- "/Completion/src/test/IZZException.java",
+ "/Completion/src/test/IZZException.js",
"package test;"+
"public class IZZException extends IZZBException {\n" +
"}\n");
@@ -975,7 +1000,7 @@ public void testCatchClauseExceptionRef10() throws JavaModelException {
public void testCatchClauseExceptionRef11() throws JavaModelException {
this.workingCopies = new ICompilationUnit[4];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" public void throwing() throws IZZAException, IZZException {}\n" +
@@ -992,19 +1017,19 @@ public void testCatchClauseExceptionRef11() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/IZZAException.java",
+ "/Completion/src/test/IZZAException.js",
"package test;"+
"public class IZZAException extends Exception {\n" +
"}\n");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/test/IZZBException.java",
+ "/Completion/src/test/IZZBException.js",
"package test;"+
"public class IZZBException extends IZZAException {\n" +
"}\n");
this.workingCopies[3] = getWorkingCopy(
- "/Completion/src/test/IZZException.java",
+ "/Completion/src/test/IZZException.js",
"package test;"+
"public class IZZException extends Exception {\n" +
"}\n");
@@ -1024,7 +1049,7 @@ public void testCatchClauseExceptionRef11() throws JavaModelException {
public void testCatchClauseExceptionRef12() throws JavaModelException {
this.workingCopies = new ICompilationUnit[4];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" public void throwing() throws IZZAException, IZZException {}\n" +
@@ -1038,19 +1063,19 @@ public void testCatchClauseExceptionRef12() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/IZZAException.java",
+ "/Completion/src/test/IZZAException.js",
"package test;"+
"public class IZZAException extends Exception {\n" +
"}\n");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/test/IZZBException.java",
+ "/Completion/src/test/IZZBException.js",
"package test;"+
"public class IZZBException extends Exception {\n" +
"}\n");
this.workingCopies[3] = getWorkingCopy(
- "/Completion/src/test/IZZException.java",
+ "/Completion/src/test/IZZException.js",
"package test;"+
"public class IZZException extends Exception {\n" +
"}\n");
@@ -1071,7 +1096,7 @@ public void testCatchClauseExceptionRef12() throws JavaModelException {
public void testCatchClauseExceptionRef13() throws JavaModelException {
this.workingCopies = new ICompilationUnit[4];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" public void throwing() throws IZZException {}\n" +
@@ -1087,19 +1112,19 @@ public void testCatchClauseExceptionRef13() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/IZZAException.java",
+ "/Completion/src/test/IZZAException.js",
"package test;"+
"public class IZZAException extends Exception {\n" +
"}\n");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/test/IZZBException.java",
+ "/Completion/src/test/IZZBException.js",
"package test;"+
"public class IZZBException extends Exception {\n" +
"}\n");
this.workingCopies[3] = getWorkingCopy(
- "/Completion/src/test/IZZException.java",
+ "/Completion/src/test/IZZException.js",
"package test;"+
"public class IZZException extends IZZAException {\n" +
"}\n");
@@ -1118,7 +1143,7 @@ public void testCatchClauseExceptionRef14() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" public void throwing() throws IZZException {}\n" +
@@ -1160,7 +1185,7 @@ public void testCatchClauseExceptionRef14() throws JavaModelException {
public void testCatchClauseExceptionRef15() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" public void throwing() throws IZZException, IZZAException {}\n" +
@@ -1178,13 +1203,13 @@ public void testCatchClauseExceptionRef15() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/IZZAException.java",
+ "/Completion/src/test/IZZAException.js",
"package test;"+
"public class IZZAException extends Exception {\n" +
"}\n");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/test/IZZException.java",
+ "/Completion/src/test/IZZException.js",
"package test;"+
"public class IZZException extends Exception {\n" +
"}\n");
@@ -1204,7 +1229,7 @@ public void testCatchClauseExceptionRef15() throws JavaModelException {
*/
public void testCompletion2InterfacesWithSameMethod() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "Completion2InterfacesWithSameMethod.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "Completion2InterfacesWithSameMethod.js");
String str = cu.getSource();
String completeBehind = "var.meth";
@@ -1217,7 +1242,7 @@ public void testCompletion2InterfacesWithSameMethod() throws JavaModelException
}
public void testCompletionAbstractMethod1() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionAbstractMethod1.java",
+ "/Completion/src/CompletionAbstractMethod1.js",
"public class CompletionAbstractMethod1 {\n" +
" abstract class A {\n" +
" abstract void foo();\n" +
@@ -1243,7 +1268,7 @@ public void testCompletionAbstractMethod1() throws JavaModelException {
}
public void testCompletionAbstractMethod2() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionAbstractMethod2.java",
+ "/Completion/src/CompletionAbstractMethod2.js",
"public class CompletionAbstractMethod2 {\n" +
" abstract class A {\n" +
" abstract void foo();\n" +
@@ -1269,7 +1294,7 @@ public void testCompletionAbstractMethod2() throws JavaModelException {
}
public void testCompletionAbstractMethod3() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionAbstractMethod3.java",
+ "/Completion/src/CompletionAbstractMethod3.js",
"public class CompletionAbstractMethod3 {\n" +
" abstract class A {\n" +
" abstract void foo();\n" +
@@ -1294,7 +1319,7 @@ public void testCompletionAbstractMethod3() throws JavaModelException {
}
public void testCompletionAbstractMethod4() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionAbstractMethod4.java",
+ "/Completion/src/CompletionAbstractMethod4.js",
"public class CompletionAbstractMethod1 {\n" +
" class A {\n" +
" void foo(){}\n" +
@@ -1329,7 +1354,7 @@ public void testCompletionAbstractMethodRelevance1() throws JavaModelException {
ICompilationUnit superClass = null;
try {
superClass = getWorkingCopy(
- "/Completion/src/CompletionAbstractSuperClass.java",
+ "/Completion/src/CompletionAbstractSuperClass.js",
"public abstract class CompletionAbstractSuperClass {\n"+
" public void foo1(){}\n"+
" public abstract void foo2();\n"+
@@ -1337,7 +1362,7 @@ public void testCompletionAbstractMethodRelevance1() throws JavaModelException {
"}");
this.wc = getWorkingCopy(
- "/Completion/src/CompletionAbstractMethodRelevance1.java",
+ "/Completion/src/CompletionAbstractMethodRelevance1.js",
"public class CompletionAbstractMethodRelevance1 extends CompletionAbstractSuperClass {\n"+
" foo\n"+
"}");
@@ -1368,13 +1393,13 @@ public void testCompletionAbstractMethodRelevance2() throws JavaModelException {
ICompilationUnit superClass = null;
try {
superClass = getWorkingCopy(
- "/Completion/src/CompletionSuperInterface.java",
+ "/Completion/src/CompletionSuperInterface.js",
"public interface CompletionSuperInterface{\n"+
" public int eqFoo(int a,Object b);\n"+
"}");
this.wc = getWorkingCopy(
- "/Completion/src/CompletionAbstractMethodRelevance2.java",
+ "/Completion/src/CompletionAbstractMethodRelevance2.js",
"public class CompletionAbstractMethodRelevance2 implements CompletionSuperInterface {\n"+
" eq\n"+
"}");
@@ -1399,7 +1424,7 @@ public void testCompletionAbstractMethodRelevance2() throws JavaModelException {
}
public void testCompletionAfterCase1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionAfterCase1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionAfterCase1.js");
String str = cu.getSource();
String completeBehind = "zz";
@@ -1412,7 +1437,7 @@ public void testCompletionAfterCase1() throws JavaModelException {
}
public void testCompletionAfterCase2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionAfterCase2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionAfterCase2.js");
String str = cu.getSource();
String completeBehind = "zz";
@@ -1426,7 +1451,7 @@ public void testCompletionAfterCase2() throws JavaModelException {
public void testCompletionAfterSupercall1() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/CompletionAfterSupercall1.java",
+ "/Completion/src/CompletionAfterSupercall1.js",
"public class CompletionAfterSupercall1 extends CompletionAfterSupercall1_1 {\n" +
" public void foo(){\n" +
" super.foo\n" +
@@ -1454,7 +1479,7 @@ public void testCompletionAfterSupercall1() throws JavaModelException {
}
public void testCompletionAfterSwitch() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionAfterSwitch.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionAfterSwitch.js");
String str = cu.getSource();
String completeBehind = "bar";
@@ -1467,7 +1492,7 @@ public void testCompletionAfterSwitch() throws JavaModelException {
}
public void testCompletionAllMemberTypes() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/test/CompletionAllMemberTypes.java",
+ "/Completion/src/test/CompletionAllMemberTypes.js",
"package test;\n" +
"public class CompletionAllMemberTypes {\n" +
" class Member1 {\n" +
@@ -1496,7 +1521,7 @@ public void testCompletionAllMemberTypes() throws JavaModelException {
}
public void testCompletionAllMemberTypes2() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/test/CompletionAllMemberTypes2.java",
+ "/Completion/src/test/CompletionAllMemberTypes2.js",
"package test;\n" +
"public class CompletionAllMemberTypes2 {\n" +
" class Member1 {\n" +
@@ -1534,7 +1559,7 @@ public void testCompletionAllMemberTypes2() throws JavaModelException {
}
public void testCompletionAllMemberTypes3() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/test/CompletionAllMemberTypes2.java",
+ "/Completion/src/test/CompletionAllMemberTypes2.js",
"package test;\n" +
"public interface CompletionAllMemberTypes2 {\n" +
" interface Member1 {\n" +
@@ -1573,7 +1598,7 @@ public void testCompletionAllMemberTypes4() throws JavaModelException {
ICompilationUnit anInterface = null;
try {
anInterface = getWorkingCopy(
- "/Completion/src/test/AnInterface.java",
+ "/Completion/src/test/AnInterface.js",
"package test;\n" +
"public interface AnInterface {\n" +
" public interface Member1 {\n" +
@@ -1592,7 +1617,7 @@ public void testCompletionAllMemberTypes4() throws JavaModelException {
"}");
this.wc = getWorkingCopy(
- "/Completion/src/test/CompletionAllMemberTypes2.java",
+ "/Completion/src/test/CompletionAllMemberTypes2.js",
"package test;\n" +
"public class CompletionAllMemberTypes2 {\n" +
" class Member1 {\n" +
@@ -1649,7 +1674,7 @@ public void testCompletionAllMemberTypes5() throws JavaModelException {
JavaCore.setOptions(options);
aType = getWorkingCopy(
- "/Completion/src/test/AType.java",
+ "/Completion/src/test/AType.js",
"package test;\n" +
"public class AType {\n" +
" public class Member1 {\n" +
@@ -1663,7 +1688,7 @@ public void testCompletionAllMemberTypes5() throws JavaModelException {
"}");
this.wc = getWorkingCopy(
- "/Completion/src/test/CompletionAllMemberTypes5.java",
+ "/Completion/src/test/CompletionAllMemberTypes5.js",
"package test;\n" +
"public class CompletionAllMemberTypes5 {\n" +
" void foo(){\n" +
@@ -1701,7 +1726,7 @@ public void testCompletionAllMemberTypes6() throws JavaModelException {
JavaCore.setOptions(options);
this.wc = getWorkingCopy(
- "/Completion/src/test/CompletionAllMemberTypes6.java",
+ "/Completion/src/test/CompletionAllMemberTypes6.js",
"package test;\n" +
"class AType {\n" +
" public class Member1 {\n" +
@@ -1740,7 +1765,7 @@ public void testCompletionAllMemberTypes7() throws JavaModelException {
JavaCore.setOptions(options);
this.wc = getWorkingCopy(
- "/Completion/src/test/AType.java",
+ "/Completion/src/test/AType.js",
"package test;\n" +
"class AType {\n" +
" public class Member1 {\n" +
@@ -1773,7 +1798,7 @@ public void testCompletionAllMemberTypes7() throws JavaModelException {
public void testCompletionAllocationExpressionIsParent1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionAllocationExpressionIsParent1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionAllocationExpressionIsParent1.js");
String str = cu.getSource();
String completeBehind = "zz";
@@ -1790,7 +1815,7 @@ public void testCompletionAllocationExpressionIsParent1() throws JavaModelExcept
}
public void testCompletionAllocationExpressionIsParent2() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionAllocationExpressionIsParent2.java",
+ "/Completion/src/CompletionAllocationExpressionIsParent2.js",
"public class CompletionAllocationExpressionIsParent2 {\n" +
" public class Inner {\n" +
" public Inner(long i, long j){super();}\n" +
@@ -1827,7 +1852,7 @@ public void testCompletionAllocationExpressionIsParent2() throws JavaModelExcept
public void testCompletionAllocationExpressionIsParent3() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionAllocationExpressionIsParent3.java",
+ "/Completion/src/CompletionAllocationExpressionIsParent3.js",
"public class CompletionAllocationExpressionIsParent3 {\n" +
" public class Inner {\n" +
" public Inner(long i, long j){super();}\n" +
@@ -1864,7 +1889,7 @@ public void testCompletionAllocationExpressionIsParent3() throws JavaModelExcept
public void testCompletionAllocationExpressionIsParent4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionAllocationExpressionIsParent4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionAllocationExpressionIsParent4.js");
String str = cu.getSource();
String completeBehind = "zz";
@@ -1882,7 +1907,7 @@ public void testCompletionAllocationExpressionIsParent4() throws JavaModelExcept
public void testCompletionAllocationExpressionIsParent5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionAllocationExpressionIsParent5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionAllocationExpressionIsParent5.js");
String str = cu.getSource();
String completeBehind = "zz";
@@ -1901,7 +1926,7 @@ public void testCompletionAllocationExpressionIsParent5() throws JavaModelExcept
public void testCompletionAllocationExpressionIsParent6() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionAllocationExpressionIsParent6.java",
+ "/Completion/src/CompletionAllocationExpressionIsParent6.js",
"public class CompletionAllocationExpressionIsParent6 {\n" +
" \n" +
" long zzlong;\n" +
@@ -1941,7 +1966,7 @@ public void testCompletionAllocationExpressionIsParent6() throws JavaModelExcept
public void testCompletionAmbiguousFieldName() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionAmbiguousFieldName.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionAmbiguousFieldName.js");
String str = cu.getSource();
String completeBehind = "xBa";
@@ -1957,7 +1982,7 @@ public void testCompletionAmbiguousFieldName() throws JavaModelException {
public void testCompletionAmbiguousFieldName2() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionAmbiguousFieldName2.java",
+ "/Completion/src/CompletionAmbiguousFieldName2.js",
"public class CompletionAmbiguousFieldName2 {\n"+
" int xBar;\n"+
" class classFoo {\n"+
@@ -1983,7 +2008,7 @@ public void testCompletionAmbiguousFieldName2() throws JavaModelException {
public void testCompletionAmbiguousFieldName3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionAmbiguousFieldName3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionAmbiguousFieldName3.js");
String str = cu.getSource();
String completeBehind = "xBa";
@@ -1999,7 +2024,7 @@ public void testCompletionAmbiguousFieldName3() throws JavaModelException {
public void testCompletionAmbiguousFieldName4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionAmbiguousFieldName4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionAmbiguousFieldName4.js");
String str = cu.getSource();
String completeBehind = "xBa";
@@ -2013,7 +2038,7 @@ public void testCompletionAmbiguousFieldName4() throws JavaModelException {
}
public void testCompletionAmbiguousType() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionAmbiguousType.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionAmbiguousType.js");
String str = cu.getSource();
String completeBehind = "ABC";
@@ -2028,7 +2053,7 @@ public void testCompletionAmbiguousType() throws JavaModelException {
}
public void testCompletionAmbiguousType2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionAmbiguousType2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionAmbiguousType2.js");
String str = cu.getSource();
String completeBehind = "ABC";
@@ -2044,7 +2069,7 @@ public void testCompletionAmbiguousType2() throws JavaModelException {
public void testCompletionArgumentName() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionArgumentName.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionArgumentName.js");
String str = cu.getSource();
String completeBehind = "ClassWithComplexName ";
@@ -2062,7 +2087,7 @@ public void testCompletionArgumentName() throws JavaModelException {
public void testCompletionArrayAccess1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionArrayAccess1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionArrayAccess1.js");
String str = cu.getSource();
String completeBehind = "zzz";
@@ -2078,7 +2103,7 @@ public void testCompletionArrayAccess1() throws JavaModelException {
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=84690
public void testCompletionArrayClone() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/test/CompletionArrayClone.java",
+ "/Completion/src/test/CompletionArrayClone.js",
"package test;\n" +
"public class CompletionArrayClone {\n" +
" public void foo() {\n" +
@@ -2102,7 +2127,7 @@ public void testCompletionArrayClone() throws JavaModelException {
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=84690
public void testCompletionArrayLength() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/test/CompletionArrayLength.java",
+ "/Completion/src/test/CompletionArrayLength.js",
"package test;\n" +
"public class CompletionArrayLength {\n" +
" public void foo() {\n" +
@@ -2125,7 +2150,7 @@ public void testCompletionArrayLength() throws JavaModelException {
public void testCompletionArraysCloneMethod() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionArraysCloneMethod.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionArraysCloneMethod.js");
String str = cu.getSource();
String completeBehind = ".cl";
@@ -2139,7 +2164,7 @@ public void testCompletionArraysCloneMethod() throws JavaModelException {
public void testCompletionAssignmentInMethod1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionAssignmentInMethod1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionAssignmentInMethod1.js");
String str = cu.getSource();
String completeBehind = "zz";
@@ -2157,7 +2182,7 @@ public void testCompletionAssignmentInMethod1() throws JavaModelException {
public void testCompletionAssignmentInMethod2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionAssignmentInMethod2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionAssignmentInMethod2.js");
String str = cu.getSource();
String completeBehind = "zz";
@@ -2175,7 +2200,7 @@ public void testCompletionAssignmentInMethod2() throws JavaModelException {
public void testCompletionAssignmentInMethod3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionAssignmentInMethod3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionAssignmentInMethod3.js");
String str = cu.getSource();
String completeBehind = "Objec";
@@ -2190,7 +2215,7 @@ public void testCompletionAssignmentInMethod3() throws JavaModelException {
public void testCompletionAssignmentInMethod4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionAssignmentInMethod4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionAssignmentInMethod4.js");
String str = cu.getSource();
String completeBehind = "Objec";
@@ -2205,7 +2230,7 @@ public void testCompletionAssignmentInMethod4() throws JavaModelException {
public void testCompletionBasicAnonymousDeclaration1() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0000/CompletionBasicCompletionContext.java",
+ "/Completion/src3/test0000/CompletionBasicCompletionContext.js",
"public class CompletionBasicAnonymousDeclaration1 {\n"+
" void foo() {\n"+
" new Object(\n"+
@@ -2226,7 +2251,7 @@ public void testCompletionBasicAnonymousDeclaration1() throws JavaModelException
public void testCompletionBasicCompletionContext() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0000/CompletionBasicCompletionContext.java",
+ "/Completion/src3/test0000/CompletionBasicCompletionContext.js",
"package test0000;\n" +
"public class CompletionBasicCompletionContext {\n" +
" void bar(String o) {\n" +
@@ -2248,7 +2273,7 @@ public void testCompletionBasicCompletionContext() throws JavaModelException {
public void testCompletionBasicField1() throws JavaModelException {
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionBasicField1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionBasicField1.js");
String str = cu.getSource();
String completeBehind = "zzvar";
@@ -2262,7 +2287,7 @@ public void testCompletionBasicField1() throws JavaModelException {
public void testCompletionBasicKeyword1() throws JavaModelException {
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionBasicKeyword1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionBasicKeyword1.js");
String str = cu.getSource();
String completeBehind = "whil";
@@ -2276,7 +2301,7 @@ public void testCompletionBasicKeyword1() throws JavaModelException {
public void testCompletionBasicLocalVariable1() throws JavaModelException {
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionBasicLocalVariable1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionBasicLocalVariable1.js");
String str = cu.getSource();
String completeBehind = "zzvar";
@@ -2290,7 +2315,7 @@ public void testCompletionBasicLocalVariable1() throws JavaModelException {
public void testCompletionBasicMethod1() throws JavaModelException {
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionBasicMethod1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionBasicMethod1.js");
String str = cu.getSource();
String completeBehind = "zzfo";
@@ -2304,7 +2329,7 @@ public void testCompletionBasicMethod1() throws JavaModelException {
public void testCompletionBasicMethodDeclaration1() throws JavaModelException {
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionBasicMethodDeclaration1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionBasicMethodDeclaration1.js");
String str = cu.getSource();
String completeBehind = "equals";
@@ -2319,7 +2344,7 @@ public void testCompletionBasicMethodDeclaration1() throws JavaModelException {
public void testCompletionBasicPackage1() throws JavaModelException {
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionBasicPackage1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionBasicPackage1.js");
String str = cu.getSource();
String completeBehind = "java.lan";
@@ -2334,7 +2359,7 @@ public void testCompletionBasicPackage1() throws JavaModelException {
public void testCompletionBasicPotentialMethodDeclaration1() throws JavaModelException {
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionBasicPotentialMethodDeclaration1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionBasicPotentialMethodDeclaration1.js");
String str = cu.getSource();
String completeBehind = "zzpot";
@@ -2349,7 +2374,7 @@ public void testCompletionBasicPotentialMethodDeclaration1() throws JavaModelExc
public void testCompletionBasicType1() throws JavaModelException {
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionBasicType1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionBasicType1.js");
String str = cu.getSource();
String completeBehind = "Objec";
@@ -2364,7 +2389,7 @@ public void testCompletionBasicType1() throws JavaModelException {
public void testCompletionBasicVariableDeclaration1() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/CompletionBasicVariableDeclaration1.java",
+ "/Completion/src/CompletionBasicVariableDeclaration1.js",
"public class CompletionBasicVariableDeclaration1 {\n"+
" public Object obj;\n"+
"}\n");
@@ -2382,7 +2407,7 @@ public void testCompletionBasicVariableDeclaration1() throws JavaModelException
public void testCompletionBinaryOperator1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionBinaryOperator1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionBinaryOperator1.js");
String str = cu.getSource();
String completeBehind = "var";
@@ -2399,7 +2424,7 @@ public void testCompletionBinaryOperator1() throws JavaModelException {
public void testCompletionBinaryOperator2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionBinaryOperator2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionBinaryOperator2.js");
String str = cu.getSource();
String completeBehind = "var";
@@ -2416,7 +2441,7 @@ public void testCompletionBinaryOperator2() throws JavaModelException {
public void testCompletionBinaryOperator3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionBinaryOperator3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionBinaryOperator3.js");
String str = cu.getSource();
String completeBehind = "var";
@@ -2436,7 +2461,7 @@ public void testCompletionBinaryOperator3() throws JavaModelException {
*/
public void testCompletionCaseInsensitive() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu = getCompilationUnit("Completion", "src", "", "CompletionCaseInsensitive.java");
+ ICompilationUnit cu = getCompilationUnit("Completion", "src", "", "CompletionCaseInsensitive.js");
String str = cu.getSource();
String completeBehind = "Fiel";
@@ -2454,7 +2479,7 @@ public void testCompletionCaseInsensitive() throws JavaModelException {
*/
public void testCompletionCaseInsensitivePackage() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionCaseInsensitivePackage.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionCaseInsensitivePackage.js");
String str = cu.getSource();
String completeBehind = "Ja";
@@ -2474,7 +2499,7 @@ public void testCompletionCaseInsensitivePackage() throws JavaModelException {
public void testCompletionCastIsParent1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionCastIsParent1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionCastIsParent1.js");
String str = cu.getSource();
String completeBehind = "zz";
@@ -2508,7 +2533,7 @@ public void testCompletionCastIsParent1() throws JavaModelException {
public void testCompletionCastIsParent2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionCastIsParent2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionCastIsParent2.js");
String str = cu.getSource();
String completeBehind = "xx";
@@ -2531,7 +2556,7 @@ public void testCompletionCastIsParent2() throws JavaModelException {
public void testCompletionCatchArgumentName() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/CompletionCatchArgumentName.java",
+ "/Completion/src/CompletionCatchArgumentName.js",
"public class CompletionCatchArgumentName {\n"+
" public void foo(){\n"+
" try{\n"+
@@ -2563,7 +2588,7 @@ public void testCompletionCatchArgumentName2() throws JavaModelException {
try {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionCatchArgumentName2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionCatchArgumentName2.js");
String str = cu.getSource();
String completeBehind = "Exception ";
@@ -2583,7 +2608,7 @@ public void testCompletionCatchArgumentName2() throws JavaModelException {
public void testCompletionClassLiteralAfterAnonymousType1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionClassLiteralAfterAnonymousType1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionClassLiteralAfterAnonymousType1.js");
String str = cu.getSource();
String completeBehind = "double.";
@@ -2597,7 +2622,7 @@ public void testCompletionClassLiteralAfterAnonymousType1() throws JavaModelExce
public void testCompletionConditionalExpression1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionConditionalExpression1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionConditionalExpression1.js");
String str = cu.getSource();
String completeBehind = "var";
@@ -2614,7 +2639,7 @@ public void testCompletionConditionalExpression1() throws JavaModelException {
public void testCompletionConditionalExpression2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionConditionalExpression2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionConditionalExpression2.js");
String str = cu.getSource();
String completeBehind = "var";
@@ -2631,7 +2656,7 @@ public void testCompletionConditionalExpression2() throws JavaModelException {
public void testCompletionConditionalExpression3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionConditionalExpression3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionConditionalExpression3.js");
String str = cu.getSource();
String completeBehind = "var";
@@ -2652,7 +2677,7 @@ public void testCompletionConditionalExpression3() throws JavaModelException {
*/
public void testCompletionConstructorForAnonymousType() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionConstructorForAnonymousType.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionConstructorForAnonymousType.js");
String str = cu.getSource();
String completeBehind = "TypeWithConstructor(";
@@ -2666,7 +2691,7 @@ public void testCompletionConstructorForAnonymousType() throws JavaModelExceptio
public void testCompletionEmptyToken1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionEmptyToken1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionEmptyToken1.js");
String str = cu.getSource();
String completeBehind = "zz";
@@ -2714,7 +2739,7 @@ public void testCompletionEmptyToken1() throws JavaModelException {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=100808
public void testCompletionEmptyToken2() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/testCompletionEmptyToken2/Test.java",
+ "/Completion/src/testCompletionEmptyToken2/Test.js",
"package testCompletionEmptyToken2.");
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true);
@@ -2742,7 +2767,7 @@ public void testCompletionEmptyToken2() throws JavaModelException {
*/
public void testCompletionEmptyTypeName1() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionEmptyTypeName1.java",
+ "/Completion/src/CompletionEmptyTypeName1.js",
"public class CompletionEmptyTypeName1 {\n"+
" void foo() {\n"+
" A a = new \n"+
@@ -2773,7 +2798,7 @@ public void testCompletionEmptyTypeName1() throws JavaModelException {
*/
public void testCompletionEmptyTypeName2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionEmptyTypeName2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionEmptyTypeName2.js");
String str = cu.getSource();
String completeBehind = " = ";
@@ -2822,7 +2847,7 @@ public void testCompletionEmptyTypeName2() throws JavaModelException {
*/
public void testCompletionEmptyTypeName3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionEmptyTypeName3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionEmptyTypeName3.js");
String str = cu.getSource();
String completeBehind = " = ";
@@ -2873,7 +2898,7 @@ public void testCompletionEmptyTypeName3() throws JavaModelException {
*/
public void testCompletionEndOfCompilationUnit() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu = getCompilationUnit("Completion", "src", "", "CompletionEndOfCompilationUnit.java");
+ ICompilationUnit cu = getCompilationUnit("Completion", "src", "", "CompletionEndOfCompilationUnit.js");
cu.codeComplete(cu.getSourceRange().getOffset() + cu.getSourceRange().getLength(), requestor);
assertEquals(
"should have two methods of 'foo'",
@@ -2886,7 +2911,7 @@ public void testCompletionEndOfCompilationUnit() throws JavaModelException {
*/
public void testCompletionExactNameCaseInsensitive() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionExactNameCaseInsensitive.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionExactNameCaseInsensitive.js");
String str = cu.getSource();
String completeBehind = "(compleTionexactnamecaseInsensitive";
@@ -2903,7 +2928,7 @@ public void testCompletionExactNameCaseInsensitive() throws JavaModelException {
*/
public void testCompletionExpectedTypeIsNotValid() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionExpectedTypeIsNotValid.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionExpectedTypeIsNotValid.js");
String str = cu.getSource();
String completeBehind = "new U";
@@ -2920,13 +2945,13 @@ public void testCompletionExpectedTypeOnEmptyToken1() throws JavaModelException
try {
aType = getWorkingCopy(
- "/Completion/src/test/AType.java",
+ "/Completion/src/test/AType.js",
"package test;\n" +
"public class AType{\n"+
"}");
this.wc = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n" +
"public class Test{\n"+
" void foo() {\n"+
@@ -2968,13 +2993,13 @@ public void testCompletionExpectedTypeOnEmptyToken3() throws JavaModelException
ICompilationUnit aType = null;
try {
aType = getWorkingCopy(
- "/Completion/src/test/AType.java",
+ "/Completion/src/test/AType.js",
"package test;\n" +
"public class AType{\n"+
"}");
this.wc = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n" +
"public class Test{\n"+
" void foo() {\n"+
@@ -3020,13 +3045,13 @@ public void testCompletionExpectedTypeOnEmptyToken4() throws JavaModelException
ICompilationUnit aType = null;
try {
aType = getWorkingCopy(
- "/Completion/src/test/AInterface.java",
+ "/Completion/src/test/AInterface.js",
"package test;\n" +
"public interface AInterface{\n"+
"}");
this.wc = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n" +
"public class Test{\n"+
" void foo() {\n"+
@@ -3067,7 +3092,7 @@ public void testCompletionExpectedTypeOnEmptyToken4() throws JavaModelException
public void testCompletionFieldInitializer1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFieldInitializer1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFieldInitializer1.js");
String str = cu.getSource();
String completeBehind = "zz";
@@ -3086,7 +3111,7 @@ public void testCompletionFieldInitializer1() throws JavaModelException {
public void testCompletionFieldInitializer2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFieldInitializer2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFieldInitializer2.js");
String str = cu.getSource();
String completeBehind = "zz";
@@ -3105,7 +3130,7 @@ public void testCompletionFieldInitializer2() throws JavaModelException {
public void testCompletionFieldInitializer3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFieldInitializer3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFieldInitializer3.js");
String str = cu.getSource();
String completeBehind = "Objec";
@@ -3120,7 +3145,7 @@ public void testCompletionFieldInitializer3() throws JavaModelException {
public void testCompletionFieldInitializer4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFieldInitializer4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFieldInitializer4.js");
String str = cu.getSource();
String completeBehind = "Objec";
@@ -3135,7 +3160,7 @@ public void testCompletionFieldInitializer4() throws JavaModelException {
public void testCompletionFieldName() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFieldName.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFieldName.js");
String str = cu.getSource();
String completeBehind = "ClassWithComplexName ";
@@ -3157,7 +3182,7 @@ public void testCompletionFieldName() throws JavaModelException {
*/
public void testCompletionFindClass() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionFindClass.java",
+ "/Completion/src/CompletionFindClass.js",
"public class CompletionFindClass {\n" +
" private A[] a;\n" +
" public CompletionFindClass () {\n" +
@@ -3186,7 +3211,7 @@ public void testCompletionFindClass() throws JavaModelException {
*/
public void testCompletionFindClass2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFindClass2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFindClass2.js");
String str = cu.getSource();
String completeBehind = "PX";
@@ -3205,7 +3230,7 @@ public void testCompletionFindClass2() throws JavaModelException {
*/
public void testCompletionFindClassDefaultPackage() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionDefaultPackage.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionDefaultPackage.js");
String str = cu.getSource();
String completeBehind = "Def";
@@ -3224,7 +3249,7 @@ public void testCompletionFindClassDefaultPackage() throws JavaModelException {
*/
public void testCompletionFindConstructor() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionFindConstructor.java",
+ "/Completion/src/CompletionFindConstructor.js",
"public class CompletionFindConstructor {\n"+
" public CompletionFindConstructor (int i) {\n"+
" }\n"+
@@ -3259,7 +3284,7 @@ public void testCompletionFindConstructor() throws JavaModelException {
*/
public void testCompletionFindConstructor2() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionFindConstructor2.java",
+ "/Completion/src/CompletionFindConstructor2.js",
"import zconstructors.*;\n"+
"public class CompletionFindConstructor2 {\n"+
" Constructor2 c = new Constructor2();\n"+
@@ -3289,7 +3314,7 @@ public void testCompletionFindConstructor2() throws JavaModelException {
*/
public void testCompletionFindConstructor3() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionFindConstructor3.java",
+ "/Completion/src/CompletionFindConstructor3.js",
"import zconstructors.*;\n"+
"public class CompletionFindConstructor3 {\n"+
" Constructor3 c = new Constructor3();\n"+
@@ -3319,7 +3344,7 @@ public void testCompletionFindConstructor3() throws JavaModelException {
*/
public void testCompletionFindConstructor4() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionFindConstructor4.java",
+ "/Completion/src/CompletionFindConstructor4.js",
"import zconstructors.*;\n"+
"public class CompletionFindConstructor4 {\n"+
" Constructor4 c = new Constructor4();\n"+
@@ -3349,7 +3374,7 @@ public void testCompletionFindConstructor4() throws JavaModelException {
*/
public void testCompletionFindConstructor5() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionFindConstructor5.java",
+ "/Completion/src/CompletionFindConstructor5.js",
"import zconstructors.*;\n"+
"public class CompletionFindConstructor5 {\n"+
" Constructor5 c = new Constructor5();\n"+
@@ -3379,7 +3404,7 @@ public void testCompletionFindConstructor5() throws JavaModelException {
*/
public void testCompletionFindExceptions1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFindException1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFindException1.js");
String str = cu.getSource();
String completeBehind = "Ex";
@@ -3397,7 +3422,7 @@ public void testCompletionFindExceptions1() throws JavaModelException {
*/
public void testCompletionFindExceptions2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFindException2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFindException2.js");
String str = cu.getSource();
String completeBehind = "Ex";
@@ -3415,7 +3440,7 @@ public void testCompletionFindExceptions2() throws JavaModelException {
*/
public void testCompletionFindField1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFindField1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFindField1.js");
String str = cu.getSource();
String completeBehind = "va";
@@ -3434,7 +3459,7 @@ public void testCompletionFindField1() throws JavaModelException {
*/
public void testCompletionFindField2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFindField2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFindField2.js");
String str = cu.getSource();
String completeBehind = "va";
@@ -3449,7 +3474,7 @@ public void testCompletionFindField2() throws JavaModelException {
public void testCompletionFindField3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFindField3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFindField3.js");
String str = cu.getSource();
String completeBehind = "b.ba";
@@ -3466,7 +3491,7 @@ public void testCompletionFindField3() throws JavaModelException {
*/
public void testCompletionFindImport1() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionFindImport1.java",
+ "/Completion/src/CompletionFindImport1.js",
"import pac\n"+
"\n"+
"public class CompletionFindImport1 {\n"+
@@ -3490,7 +3515,7 @@ public void testCompletionFindImport1() throws JavaModelException {
public void testCompletionFindImport2() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionFindImport2.java",
+ "/Completion/src/CompletionFindImport2.js",
"import pack1.P\n"+
"\n"+
"public class CompletionFindImport2 {\n"+
@@ -3515,7 +3540,7 @@ public void testCompletionFindImport2() throws JavaModelException {
*/
public void testCompletionFindLocalVariable() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFindLocalVariable.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFindLocalVariable.js");
String str = cu.getSource();
String completeBehind = "va";
@@ -3529,7 +3554,7 @@ public void testCompletionFindLocalVariable() throws JavaModelException {
public void testCompletionFindMemberType1() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionFindMemberType1.java",
+ "/Completion/src/CompletionFindMemberType1.js",
"interface A1 {\n"+
" class Inner1 {\n"+
" }\n"+
@@ -3558,7 +3583,7 @@ public void testCompletionFindMemberType1() throws JavaModelException {
public void testCompletionFindMemberType2() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionPrefixMethodName2.java",
+ "/Completion/src/CompletionPrefixMethodName2.js",
"interface A2 {\n"+
" class ZInner2{\n"+
" }\n"+
@@ -3589,7 +3614,7 @@ public void testCompletionFindMemberType2() throws JavaModelException {
*/
public void testCompletionFindMethod1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFindMethod1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFindMethod1.js");
String str = cu.getSource();
String completeBehind = "fooba";
@@ -3607,7 +3632,7 @@ public void testCompletionFindMethod1() throws JavaModelException {
public void testCompletionFindMethod2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFindMethod2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFindMethod2.js");
String str = cu.getSource();
String completeBehind = "fooba";
@@ -3625,7 +3650,7 @@ public void testCompletionFindMethod2() throws JavaModelException {
*/
public void testCompletionFindMethodInThis() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFindMethodInThis.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFindMethodInThis.js");
String str = cu.getSource();
String completeBehind = "fooba";
@@ -3643,7 +3668,7 @@ public void testCompletionFindMethodInThis() throws JavaModelException {
*/
public void testCompletionFindMethodWhenInProcess() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFindMethodInProcess.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFindMethodInProcess.js");
String str = cu.getSource();
String completeBehind = "fooba";
@@ -3658,7 +3683,7 @@ public void testCompletionFindMethodWhenInProcess() throws JavaModelException {
public void testCompletionFindSecondaryType1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFindSecondaryType1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFindSecondaryType1.js");
String str = cu.getSource();
String completeBehind = "/**/Secondary";
@@ -3673,7 +3698,7 @@ public void testCompletionFindSecondaryType1() throws JavaModelException {
public void testCompletionFindSuperInterface() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionFindSuperInterface.java",
+ "/Completion/src/CompletionFindSuperInterface.js",
"public class CompletionFindSuperInterface implements SuperInterface {\n"+
"}");
@@ -3694,7 +3719,7 @@ public void testCompletionFindSuperInterface() throws JavaModelException {
*/
public void testCompletionFindThisDotField() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFindThisDotField.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFindThisDotField.js");
String str = cu.getSource();
String completeBehind = "this.ba";
@@ -3709,14 +3734,14 @@ public void testCompletionFindThisDotField() throws JavaModelException {
public void testCompletionImportedType1() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/imported/ZZZZ.java",
+ "/Completion/src/test/imported/ZZZZ.js",
"package test.imported;"+
"public class ZZZZ {\n"+
" \n"+
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/CompletionImportedType1.java",
+ "/Completion/src/test/CompletionImportedType1.js",
"package test;"+
"public class CompletionImportedType1 {"+
" ZZZ\n"+
@@ -3737,26 +3762,26 @@ public void testCompletionImportedType1() throws JavaModelException {
public void testCompletionImportedType2() throws JavaModelException {
this.workingCopies = new ICompilationUnit[4];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/imported1/ZZZZ.java",
+ "/Completion/src/test/imported1/ZZZZ.js",
"package test.imported1;"+
"public class ZZZZ {\n"+
" \n"+
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/imported2/ZZZZ.java",
+ "/Completion/src/test/imported2/ZZZZ.js",
"package test.imported2;"+
"public class ZZZZ {\n"+
" \n"+
"}");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/test/imported3/ZZZZ.java",
+ "/Completion/src/test/imported3/ZZZZ.js",
"package test.imported3;"+
"public class ZZZZ {\n"+
" \n"+
"}");
this.workingCopies[3] = getWorkingCopy(
- "/Completion/src/test/CompletionImportedType2.java",
+ "/Completion/src/test/CompletionImportedType2.js",
"package test;"+
"import test.imported1.*;"+
"import test.imported2.*;"+
@@ -3782,26 +3807,26 @@ public void testCompletionImportedType2() throws JavaModelException {
public void testCompletionImportedType3() throws JavaModelException {
this.workingCopies = new ICompilationUnit[4];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/imported1/ZZZZ.java",
+ "/Completion/src/test/imported1/ZZZZ.js",
"package test.imported1;"+
"public class ZZZZ {\n"+
" \n"+
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/imported2/ZZZZ.java",
+ "/Completion/src/test/imported2/ZZZZ.js",
"package test.imported2;"+
"public class ZZZZ {\n"+
" \n"+
"}");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/test/imported3/ZZZZ.java",
+ "/Completion/src/test/imported3/ZZZZ.js",
"package test.imported3;"+
"public class ZZZZ {\n"+
" \n"+
"}");
this.workingCopies[3] = getWorkingCopy(
- "/Completion/src/test/CompletionImportedType3.java",
+ "/Completion/src/test/CompletionImportedType3.js",
"package test;"+
"import test.imported2.*;"+
"public class CompletionImportedType3 {"+
@@ -3825,20 +3850,20 @@ public void testCompletionImportedType3() throws JavaModelException {
public void testCompletionImportedType4() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/imported1/ZZZZ.java",
+ "/Completion/src/test/imported1/ZZZZ.js",
"package test.imported1;"+
"public class ZZZZ {\n"+
" \n"+
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/imported2/ZZZZ.java",
+ "/Completion/src/test/imported2/ZZZZ.js",
"package test.imported2;"+
"public class ZZZZ {\n"+
" \n"+
"}");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/test/CompletionImportedType4.java",
+ "/Completion/src/test/CompletionImportedType4.js",
"package test;"+
"import test.imported1.*;"+
"public class CompletionImportedType4 {"+
@@ -3861,20 +3886,20 @@ public void testCompletionImportedType4() throws JavaModelException {
public void testCompletionImportedType5() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/imported1/ZZZZ.java",
+ "/Completion/src/test/imported1/ZZZZ.js",
"package test.imported1;"+
"public class ZZZZ {\n"+
" \n"+
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/imported2/ZZZZ.java",
+ "/Completion/src/test/imported2/ZZZZ.js",
"package test.imported2;"+
"public class ZZZZ {\n"+
" \n"+
"}");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/test/CompletionImportedType5.java",
+ "/Completion/src/test/CompletionImportedType5.js",
"package test;"+
"import test.imported2.*;"+
"public class CompletionImportedType5 {"+
@@ -3897,7 +3922,7 @@ public void testCompletionImportedType5() throws JavaModelException {
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=78151
public void testCompletionInsideExtends1() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/test/CompletionInsideExtends1.java",
+ "/Completion/src/test/CompletionInsideExtends1.js",
"package test;\n" +
"public class CompletionInsideExtends1 extends {\n" +
" public class CompletionInsideExtends1Inner {}\n" +
@@ -3927,7 +3952,7 @@ public void testCompletionInsideExtends1() throws JavaModelException {
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=78151
public void testCompletionInsideExtends10() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/test/CompletionInsideExtends10.java",
+ "/Completion/src/test/CompletionInsideExtends10.js",
"package test;\n" +
"public interface CompletionInsideExtends10 {\n" +
" public interface CompletionInsideExtends10Inner extends CompletionInsideExtends{\n" +
@@ -3954,7 +3979,7 @@ public void testCompletionInsideExtends10() throws JavaModelException {
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=78151
public void testCompletionInsideExtends11() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/test/CompletionInsideExtends11.java",
+ "/Completion/src/test/CompletionInsideExtends11.js",
"package test;\n" +
"public class CompletionInsideExtends11 implements {\n" +
" public class CompletionInsideExtends11Inner {\n" +
@@ -3984,7 +4009,7 @@ public void testCompletionInsideExtends11() throws JavaModelException {
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=78151
public void testCompletionInsideExtends12() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/test/CompletionInsideExtends12.java",
+ "/Completion/src/test/CompletionInsideExtends12.js",
"package test;\n" +
"public class CompletionInsideExtends12 implements CompletionInsideExtends {\n" +
" public class CompletionInsideExtends12Inner {\n" +
@@ -4008,7 +4033,7 @@ public void testCompletionInsideExtends12() throws JavaModelException {
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=78151
public void testCompletionInsideExtends2() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/test/CompletionInsideExtends2.java",
+ "/Completion/src/test/CompletionInsideExtends2.js",
"package test;\n" +
"public class CompletionInsideExtends2 extends CompletionInsideExtends {\n" +
" public class CompletionInsideExtends2Inner {}\n" +
@@ -4031,7 +4056,7 @@ public void testCompletionInsideExtends2() throws JavaModelException {
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=78151
public void testCompletionInsideExtends3() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/test/CompletionInsideExtends3.java",
+ "/Completion/src/test/CompletionInsideExtends3.js",
"package test;\n" +
"public class CompletionInsideExtends3 {\n" +
" public class CompletionInsideExtends3Inner extends {\n" +
@@ -4064,7 +4089,7 @@ public void testCompletionInsideExtends3() throws JavaModelException {
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=78151
public void testCompletionInsideExtends4() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/test/CompletionInsideExtends4.java",
+ "/Completion/src/test/CompletionInsideExtends4.js",
"package test;\n" +
"public class CompletionInsideExtends4 {\n" +
" public class CompletionInsideExtends4Inner extends CompletionInsideExtends{\n" +
@@ -4091,7 +4116,7 @@ public void testCompletionInsideExtends4() throws JavaModelException {
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=78151
public void testCompletionInsideExtends5() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/test/CompletionInsideExtends5.java",
+ "/Completion/src/test/CompletionInsideExtends5.js",
"package test;\n" +
"public class CompletionInsideExtends5 {\n" +
" void foo() {\n" +
@@ -4126,7 +4151,7 @@ public void testCompletionInsideExtends5() throws JavaModelException {
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=78151
public void testCompletionInsideExtends6() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/test/CompletionInsideExtends6.java",
+ "/Completion/src/test/CompletionInsideExtends6.js",
"package test;\n" +
"public class CompletionInsideExtends6 {\n" +
" void foo() {\n" +
@@ -4155,7 +4180,7 @@ public void testCompletionInsideExtends6() throws JavaModelException {
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=78151
public void testCompletionInsideExtends7() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/test/CompletionInsideExtends7.java",
+ "/Completion/src/test/CompletionInsideExtends7.js",
"package test;\n" +
"public interface CompletionInsideExtends7 extends {\n" +
" public interface CompletionInsideExtends7Inner {}\n" +
@@ -4183,7 +4208,7 @@ public void testCompletionInsideExtends7() throws JavaModelException {
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=78151
public void testCompletionInsideExtends8() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/test/CompletionInsideExtends8.java",
+ "/Completion/src/test/CompletionInsideExtends8.js",
"package test;\n" +
"public interface CompletionInsideExtends8 extends CompletionInsideExtends {\n" +
" public interface CompletionInsideExtends8Inner {}\n" +
@@ -4206,7 +4231,7 @@ public void testCompletionInsideExtends8() throws JavaModelException {
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=78151
public void testCompletionInsideExtends9() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/test/CompletionInsideExtends9.java",
+ "/Completion/src/test/CompletionInsideExtends9.js",
"package test;\n" +
"public interface CompletionInsideExtends9 {\n" +
" public interface CompletionInsideExtends9Inner extends {\n" +
@@ -4239,7 +4264,7 @@ public void testCompletionInsideExtends9() throws JavaModelException {
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=82740
public void testCompletionInsideGenericClass() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/test/CompletionInsideGenericClass.java",
+ "/Completion/src/test/CompletionInsideGenericClass.js",
"package test;\n" +
"public class CompletionInsideGenericClass <CompletionInsideGenericClassParameter> {\n" +
" CompletionInsideGenericClas\n" +
@@ -4260,7 +4285,7 @@ public void testCompletionInsideGenericClass() throws JavaModelException {
public void testCompletionInsideStaticMethod() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionInsideStaticMethod.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionInsideStaticMethod.js");
String str = cu.getSource();
String completeBehind = "doT";
@@ -4273,7 +4298,7 @@ public void testCompletionInsideStaticMethod() throws JavaModelException {
}
public void testCompletionInstanceofOperator1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionInstanceofOperator1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionInstanceofOperator1.js");
String str = cu.getSource();
String completeBehind = "x instanceof WWWCompletionInstanceof";
@@ -4290,7 +4315,7 @@ public void testCompletionInstanceofOperator1() throws JavaModelException {
public void testCompletionKeywordAbstract1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAbstract1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAbstract1.js");
String str = cu.getSource();
String completeBehind = "abs";
@@ -4304,7 +4329,7 @@ public void testCompletionKeywordAbstract1() throws JavaModelException {
public void testCompletionKeywordAbstract10() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAbstract10.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAbstract10.js");
String str = cu.getSource();
String completeBehind = "abs";
@@ -4318,7 +4343,7 @@ public void testCompletionKeywordAbstract10() throws JavaModelException {
public void testCompletionKeywordAbstract11() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAbstract11.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAbstract11.js");
String str = cu.getSource();
String completeBehind = "abs";
@@ -4331,7 +4356,7 @@ public void testCompletionKeywordAbstract11() throws JavaModelException {
}
public void testCompletionKeywordAbstract12() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAbstract12.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAbstract12.js");
String str = cu.getSource();
String completeBehind = "abs";
@@ -4345,7 +4370,7 @@ public void testCompletionKeywordAbstract12() throws JavaModelException {
public void testCompletionKeywordAbstract13() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAbstract13.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAbstract13.js");
String str = cu.getSource();
String completeBehind = "abs";
@@ -4359,7 +4384,7 @@ public void testCompletionKeywordAbstract13() throws JavaModelException {
public void testCompletionKeywordAbstract14() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAbstract14.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAbstract14.js");
String str = cu.getSource();
String completeBehind = "abs";
@@ -4373,7 +4398,7 @@ public void testCompletionKeywordAbstract14() throws JavaModelException {
public void testCompletionKeywordAbstract15() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAbstract15.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAbstract15.js");
String str = cu.getSource();
String completeBehind = "abs";
@@ -4386,7 +4411,7 @@ public void testCompletionKeywordAbstract15() throws JavaModelException {
}
public void testCompletionKeywordAbstract16() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAbstract16.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAbstract16.js");
String str = cu.getSource();
String completeBehind = "abs";
@@ -4399,7 +4424,7 @@ public void testCompletionKeywordAbstract16() throws JavaModelException {
}
public void testCompletionKeywordAbstract2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAbstract2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAbstract2.js");
String str = cu.getSource();
String completeBehind = "abs";
@@ -4412,7 +4437,7 @@ public void testCompletionKeywordAbstract2() throws JavaModelException {
}
public void testCompletionKeywordAbstract3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAbstract3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAbstract3.js");
String str = cu.getSource();
String completeBehind = "abs";
@@ -4425,7 +4450,7 @@ public void testCompletionKeywordAbstract3() throws JavaModelException {
}
public void testCompletionKeywordAbstract4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAbstract4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAbstract4.js");
String str = cu.getSource();
String completeBehind = "abs";
@@ -4438,7 +4463,7 @@ public void testCompletionKeywordAbstract4() throws JavaModelException {
}
public void testCompletionKeywordAbstract5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAbstract5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAbstract5.js");
String str = cu.getSource();
String completeBehind = "abs";
@@ -4451,7 +4476,7 @@ public void testCompletionKeywordAbstract5() throws JavaModelException {
}
public void testCompletionKeywordAbstract6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAbstract6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAbstract6.js");
String str = cu.getSource();
String completeBehind = "abs";
@@ -4464,7 +4489,7 @@ public void testCompletionKeywordAbstract6() throws JavaModelException {
}
public void testCompletionKeywordAbstract7() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAbstract7.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAbstract7.js");
String str = cu.getSource();
String completeBehind = "abs";
@@ -4477,7 +4502,7 @@ public void testCompletionKeywordAbstract7() throws JavaModelException {
}
public void testCompletionKeywordAbstract8() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAbstract8.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAbstract8.js");
String str = cu.getSource();
String completeBehind = "abs";
@@ -4490,7 +4515,7 @@ public void testCompletionKeywordAbstract8() throws JavaModelException {
}
public void testCompletionKeywordAbstract9() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAbstract9.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAbstract9.js");
String str = cu.getSource();
String completeBehind = "abs";
@@ -4503,7 +4528,7 @@ public void testCompletionKeywordAbstract9() throws JavaModelException {
}
public void testCompletionKeywordAssert1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAssert1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAssert1.js");
String str = cu.getSource();
String completeBehind = "as";
@@ -4516,7 +4541,7 @@ public void testCompletionKeywordAssert1() throws JavaModelException {
}
public void testCompletionKeywordAssert2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAssert2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAssert2.js");
String str = cu.getSource();
String completeBehind = "as";
@@ -4529,7 +4554,7 @@ public void testCompletionKeywordAssert2() throws JavaModelException {
}
public void testCompletionKeywordAssert3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAssert3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAssert3.js");
String str = cu.getSource();
String completeBehind = "as";
@@ -4542,7 +4567,7 @@ public void testCompletionKeywordAssert3() throws JavaModelException {
}
public void testCompletionKeywordAssert4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAssert4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAssert4.js");
String str = cu.getSource();
String completeBehind = "as";
@@ -4555,7 +4580,7 @@ public void testCompletionKeywordAssert4() throws JavaModelException {
}
public void testCompletionKeywordAssert5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAssert5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAssert5.js");
String str = cu.getSource();
String completeBehind = "as";
@@ -4568,7 +4593,7 @@ public void testCompletionKeywordAssert5() throws JavaModelException {
}
public void testCompletionKeywordAssert6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAssert6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordAssert6.js");
String str = cu.getSource();
String completeBehind = "as";
@@ -4581,7 +4606,7 @@ public void testCompletionKeywordAssert6() throws JavaModelException {
}
public void testCompletionKeywordBreak1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordBreak1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordBreak1.js");
String str = cu.getSource();
String completeBehind = "bre";
@@ -4594,7 +4619,7 @@ public void testCompletionKeywordBreak1() throws JavaModelException {
}
public void testCompletionKeywordBreak2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordBreak2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordBreak2.js");
String str = cu.getSource();
String completeBehind = "bre";
@@ -4607,7 +4632,7 @@ public void testCompletionKeywordBreak2() throws JavaModelException {
}
public void testCompletionKeywordBreak3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordBreak3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordBreak3.js");
String str = cu.getSource();
String completeBehind = "bre";
@@ -4620,7 +4645,7 @@ public void testCompletionKeywordBreak3() throws JavaModelException {
}
public void testCompletionKeywordBreak4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordBreak4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordBreak4.js");
String str = cu.getSource();
String completeBehind = "bre";
@@ -4633,7 +4658,7 @@ public void testCompletionKeywordBreak4() throws JavaModelException {
}
public void testCompletionKeywordBreak5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordBreak5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordBreak5.js");
String str = cu.getSource();
String completeBehind = "bre";
@@ -4646,7 +4671,7 @@ public void testCompletionKeywordBreak5() throws JavaModelException {
}
public void testCompletionKeywordBreak6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordBreak6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordBreak6.js");
String str = cu.getSource();
String completeBehind = "bre";
@@ -4659,7 +4684,7 @@ public void testCompletionKeywordBreak6() throws JavaModelException {
}
public void testCompletionKeywordCase1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCase1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCase1.js");
String str = cu.getSource();
String completeBehind = "cas";
@@ -4672,7 +4697,7 @@ public void testCompletionKeywordCase1() throws JavaModelException {
}
public void testCompletionKeywordCase10() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCase10.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCase10.js");
String str = cu.getSource();
String completeBehind = "cas";
@@ -4685,7 +4710,7 @@ public void testCompletionKeywordCase10() throws JavaModelException {
}
public void testCompletionKeywordCase2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCase2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCase2.js");
String str = cu.getSource();
String completeBehind = "cas";
@@ -4698,7 +4723,7 @@ public void testCompletionKeywordCase2() throws JavaModelException {
}
public void testCompletionKeywordCase3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCase3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCase3.js");
String str = cu.getSource();
String completeBehind = "cas";
@@ -4711,7 +4736,7 @@ public void testCompletionKeywordCase3() throws JavaModelException {
}
public void testCompletionKeywordCase4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCase4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCase4.js");
String str = cu.getSource();
String completeBehind = "cas";
@@ -4724,7 +4749,7 @@ public void testCompletionKeywordCase4() throws JavaModelException {
}
public void testCompletionKeywordCase5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCase5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCase5.js");
String str = cu.getSource();
String completeBehind = "cas";
@@ -4737,7 +4762,7 @@ public void testCompletionKeywordCase5() throws JavaModelException {
}
public void testCompletionKeywordCase6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCase6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCase6.js");
String str = cu.getSource();
String completeBehind = "cas";
@@ -4750,7 +4775,7 @@ public void testCompletionKeywordCase6() throws JavaModelException {
}
public void testCompletionKeywordCase7() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCase7.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCase7.js");
String str = cu.getSource();
String completeBehind = "cas";
@@ -4763,7 +4788,7 @@ public void testCompletionKeywordCase7() throws JavaModelException {
}
public void testCompletionKeywordCase8() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCase8.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCase8.js");
String str = cu.getSource();
String completeBehind = "cas";
@@ -4776,7 +4801,7 @@ public void testCompletionKeywordCase8() throws JavaModelException {
}
public void testCompletionKeywordCase9() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCase9.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCase9.js");
String str = cu.getSource();
String completeBehind = "cas";
@@ -4789,7 +4814,7 @@ public void testCompletionKeywordCase9() throws JavaModelException {
}
public void testCompletionKeywordCatch1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCatch1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCatch1.js");
String str = cu.getSource();
String completeBehind = "cat";
@@ -4802,7 +4827,7 @@ public void testCompletionKeywordCatch1() throws JavaModelException {
}
public void testCompletionKeywordCatch10() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCatch10.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCatch10.js");
String str = cu.getSource();
String completeBehind = "cat";
@@ -4816,7 +4841,7 @@ public void testCompletionKeywordCatch10() throws JavaModelException {
}
public void testCompletionKeywordCatch2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCatch2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCatch2.js");
String str = cu.getSource();
String completeBehind = "cat";
@@ -4829,7 +4854,7 @@ public void testCompletionKeywordCatch2() throws JavaModelException {
}
public void testCompletionKeywordCatch3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCatch3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCatch3.js");
String str = cu.getSource();
String completeBehind = "cat";
@@ -4842,7 +4867,7 @@ public void testCompletionKeywordCatch3() throws JavaModelException {
}
public void testCompletionKeywordCatch4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCatch4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCatch4.js");
String str = cu.getSource();
String completeBehind = "cat";
@@ -4855,7 +4880,7 @@ public void testCompletionKeywordCatch4() throws JavaModelException {
}
public void testCompletionKeywordCatch5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCatch5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCatch5.js");
String str = cu.getSource();
String completeBehind = "cat";
@@ -4869,7 +4894,7 @@ public void testCompletionKeywordCatch5() throws JavaModelException {
}
public void testCompletionKeywordCatch6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCatch6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCatch6.js");
String str = cu.getSource();
String completeBehind = "cat";
@@ -4882,7 +4907,7 @@ public void testCompletionKeywordCatch6() throws JavaModelException {
}
public void testCompletionKeywordCatch7() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCatch7.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCatch7.js");
String str = cu.getSource();
String completeBehind = "cat";
@@ -4895,7 +4920,7 @@ public void testCompletionKeywordCatch7() throws JavaModelException {
}
public void testCompletionKeywordCatch8() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCatch8.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCatch8.js");
String str = cu.getSource();
String completeBehind = "cat";
@@ -4908,7 +4933,7 @@ public void testCompletionKeywordCatch8() throws JavaModelException {
}
public void testCompletionKeywordCatch9() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCatch9.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordCatch9.js");
String str = cu.getSource();
String completeBehind = "cat";
@@ -4921,7 +4946,7 @@ public void testCompletionKeywordCatch9() throws JavaModelException {
}
public void testCompletionKeywordClass1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass1.js");
String str = cu.getSource();
String completeBehind = "cla";
@@ -4934,7 +4959,7 @@ public void testCompletionKeywordClass1() throws JavaModelException {
}
public void testCompletionKeywordClass10() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass10.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass10.js");
String str = cu.getSource();
String completeBehind = "cla";
@@ -4949,7 +4974,7 @@ public void testCompletionKeywordClass10() throws JavaModelException {
}
public void testCompletionKeywordClass11() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass11.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass11.js");
String str = cu.getSource();
String completeBehind = "cla";
@@ -4964,7 +4989,7 @@ public void testCompletionKeywordClass11() throws JavaModelException {
}
public void testCompletionKeywordClass12() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass12.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass12.js");
String str = cu.getSource();
String completeBehind = "cla";
@@ -4979,7 +5004,7 @@ public void testCompletionKeywordClass12() throws JavaModelException {
}
public void testCompletionKeywordClass13() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass13.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass13.js");
String str = cu.getSource();
String completeBehind = "cla";
@@ -4992,7 +5017,7 @@ public void testCompletionKeywordClass13() throws JavaModelException {
}
public void testCompletionKeywordClass14() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass14.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass14.js");
String str = cu.getSource();
String completeBehind = "cla";
@@ -5007,7 +5032,7 @@ public void testCompletionKeywordClass14() throws JavaModelException {
}
public void testCompletionKeywordClass15() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass15.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass15.js");
String str = cu.getSource();
String completeBehind = "cla";
@@ -5022,7 +5047,7 @@ public void testCompletionKeywordClass15() throws JavaModelException {
}
public void testCompletionKeywordClass16() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass16.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass16.js");
String str = cu.getSource();
String completeBehind = "cla";
@@ -5037,7 +5062,7 @@ public void testCompletionKeywordClass16() throws JavaModelException {
}
public void testCompletionKeywordClass17() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass17.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass17.js");
String str = cu.getSource();
String completeBehind = "cla";
@@ -5050,7 +5075,7 @@ public void testCompletionKeywordClass17() throws JavaModelException {
}
public void testCompletionKeywordClass18() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass18.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass18.js");
String str = cu.getSource();
String completeBehind = "cla";
@@ -5063,7 +5088,7 @@ public void testCompletionKeywordClass18() throws JavaModelException {
}
public void testCompletionKeywordClass19() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass19.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass19.js");
String str = cu.getSource();
String completeBehind = "cla";
@@ -5076,7 +5101,7 @@ public void testCompletionKeywordClass19() throws JavaModelException {
}
public void testCompletionKeywordClass2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass2.js");
String str = cu.getSource();
String completeBehind = "cla";
@@ -5089,7 +5114,7 @@ public void testCompletionKeywordClass2() throws JavaModelException {
}
public void testCompletionKeywordClass20() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass20.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass20.js");
String str = cu.getSource();
String completeBehind = "cla";
@@ -5102,7 +5127,7 @@ public void testCompletionKeywordClass20() throws JavaModelException {
}
public void testCompletionKeywordClass21() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass21.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass21.js");
String str = cu.getSource();
String completeBehind = "cla";
@@ -5117,7 +5142,7 @@ public void testCompletionKeywordClass21() throws JavaModelException {
}
public void testCompletionKeywordClass22() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass22.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass22.js");
String str = cu.getSource();
String completeBehind = "cla";
@@ -5132,7 +5157,7 @@ public void testCompletionKeywordClass22() throws JavaModelException {
}
public void testCompletionKeywordClass23() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass23.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass23.js");
String str = cu.getSource();
String completeBehind = "cla";
@@ -5147,7 +5172,7 @@ public void testCompletionKeywordClass23() throws JavaModelException {
}
public void testCompletionKeywordClass24() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass24.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass24.js");
String str = cu.getSource();
String completeBehind = "cla";
@@ -5162,7 +5187,7 @@ public void testCompletionKeywordClass24() throws JavaModelException {
}
public void testCompletionKeywordClass3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass3.js");
String str = cu.getSource();
String completeBehind = "cla";
@@ -5175,7 +5200,7 @@ public void testCompletionKeywordClass3() throws JavaModelException {
}
public void testCompletionKeywordClass4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass4.js");
String str = cu.getSource();
String completeBehind = "cla";
@@ -5188,7 +5213,7 @@ public void testCompletionKeywordClass4() throws JavaModelException {
}
public void testCompletionKeywordClass5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass5.js");
String str = cu.getSource();
String completeBehind = "cla";
@@ -5201,7 +5226,7 @@ public void testCompletionKeywordClass5() throws JavaModelException {
}
public void testCompletionKeywordClass6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass6.js");
String str = cu.getSource();
String completeBehind = "cla";
@@ -5216,7 +5241,7 @@ public void testCompletionKeywordClass6() throws JavaModelException {
}
public void testCompletionKeywordClass7() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass7.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass7.js");
String str = cu.getSource();
String completeBehind = "cla";
@@ -5231,7 +5256,7 @@ public void testCompletionKeywordClass7() throws JavaModelException {
}
public void testCompletionKeywordClass8() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass8.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass8.js");
String str = cu.getSource();
String completeBehind = "cla";
@@ -5246,7 +5271,7 @@ public void testCompletionKeywordClass8() throws JavaModelException {
}
public void testCompletionKeywordClass9() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass9.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordClass9.js");
String str = cu.getSource();
String completeBehind = "cla";
@@ -5261,7 +5286,7 @@ public void testCompletionKeywordClass9() throws JavaModelException {
}
public void testCompletionKeywordContinue1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordContinue1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordContinue1.js");
String str = cu.getSource();
String completeBehind = "cont";
@@ -5274,7 +5299,7 @@ public void testCompletionKeywordContinue1() throws JavaModelException {
}
public void testCompletionKeywordContinue2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordContinue2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordContinue2.js");
String str = cu.getSource();
String completeBehind = "cont";
@@ -5287,7 +5312,7 @@ public void testCompletionKeywordContinue2() throws JavaModelException {
}
public void testCompletionKeywordContinue3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordContinue3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordContinue3.js");
String str = cu.getSource();
String completeBehind = "cont";
@@ -5300,7 +5325,7 @@ public void testCompletionKeywordContinue3() throws JavaModelException {
}
public void testCompletionKeywordContinue4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordContinue4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordContinue4.js");
String str = cu.getSource();
String completeBehind = "cont";
@@ -5313,7 +5338,7 @@ public void testCompletionKeywordContinue4() throws JavaModelException {
}
public void testCompletionKeywordDefault1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordDefault1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordDefault1.js");
String str = cu.getSource();
String completeBehind = "def";
@@ -5326,7 +5351,7 @@ public void testCompletionKeywordDefault1() throws JavaModelException {
}
public void testCompletionKeywordDefault10() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordDefault10.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordDefault10.js");
String str = cu.getSource();
String completeBehind = "def";
@@ -5339,7 +5364,7 @@ public void testCompletionKeywordDefault10() throws JavaModelException {
}
public void testCompletionKeywordDefault2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordDefault2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordDefault2.js");
String str = cu.getSource();
String completeBehind = "def";
@@ -5353,7 +5378,7 @@ public void testCompletionKeywordDefault2() throws JavaModelException {
}
public void testCompletionKeywordDefault3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordDefault3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordDefault3.js");
String str = cu.getSource();
String completeBehind = "def";
@@ -5367,7 +5392,7 @@ public void testCompletionKeywordDefault3() throws JavaModelException {
}
public void testCompletionKeywordDefault4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordDefault4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordDefault4.js");
String str = cu.getSource();
String completeBehind = "def";
@@ -5380,7 +5405,7 @@ public void testCompletionKeywordDefault4() throws JavaModelException {
}
public void testCompletionKeywordDefault5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordDefault5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordDefault5.js");
String str = cu.getSource();
String completeBehind = "def";
@@ -5393,7 +5418,7 @@ public void testCompletionKeywordDefault5() throws JavaModelException {
}
public void testCompletionKeywordDefault6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordDefault6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordDefault6.js");
String str = cu.getSource();
String completeBehind = "def";
@@ -5406,7 +5431,7 @@ public void testCompletionKeywordDefault6() throws JavaModelException {
}
public void testCompletionKeywordDefault7() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordDefault7.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordDefault7.js");
String str = cu.getSource();
String completeBehind = "def";
@@ -5420,7 +5445,7 @@ public void testCompletionKeywordDefault7() throws JavaModelException {
}
public void testCompletionKeywordDefault8() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordDefault8.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordDefault8.js");
String str = cu.getSource();
String completeBehind = "def";
@@ -5434,7 +5459,7 @@ public void testCompletionKeywordDefault8() throws JavaModelException {
}
public void testCompletionKeywordDefault9() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordDefault9.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordDefault9.js");
String str = cu.getSource();
String completeBehind = "def";
@@ -5447,7 +5472,7 @@ public void testCompletionKeywordDefault9() throws JavaModelException {
}
public void testCompletionKeywordDo1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordDo1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordDo1.js");
String str = cu.getSource();
String completeBehind = "do";
@@ -5461,7 +5486,7 @@ public void testCompletionKeywordDo1() throws JavaModelException {
}
public void testCompletionKeywordDo2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordDo2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordDo2.js");
String str = cu.getSource();
String completeBehind = "do";
@@ -5474,7 +5499,7 @@ public void testCompletionKeywordDo2() throws JavaModelException {
}
public void testCompletionKeywordDo3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordDo3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordDo3.js");
String str = cu.getSource();
String completeBehind = "do";
@@ -5487,7 +5512,7 @@ public void testCompletionKeywordDo3() throws JavaModelException {
}
public void testCompletionKeywordDo4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordDo4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordDo4.js");
String str = cu.getSource();
String completeBehind = "do";
@@ -5501,7 +5526,7 @@ public void testCompletionKeywordDo4() throws JavaModelException {
}
public void testCompletionKeywordDo5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordDo5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordDo5.js");
String str = cu.getSource();
String completeBehind = "do";
@@ -5514,7 +5539,7 @@ public void testCompletionKeywordDo5() throws JavaModelException {
}
public void testCompletionKeywordDo6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordDo6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordDo6.js");
String str = cu.getSource();
String completeBehind = "do";
@@ -5527,7 +5552,7 @@ public void testCompletionKeywordDo6() throws JavaModelException {
}
public void testCompletionKeywordElse1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordElse1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordElse1.js");
String str = cu.getSource();
String completeBehind = "els";
@@ -5540,7 +5565,7 @@ public void testCompletionKeywordElse1() throws JavaModelException {
}
public void testCompletionKeywordElse2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordElse2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordElse2.js");
String str = cu.getSource();
String completeBehind = "els";
@@ -5553,7 +5578,7 @@ public void testCompletionKeywordElse2() throws JavaModelException {
}
public void testCompletionKeywordElse3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordElse3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordElse3.js");
String str = cu.getSource();
String completeBehind = "els";
@@ -5566,7 +5591,7 @@ public void testCompletionKeywordElse3() throws JavaModelException {
}
public void testCompletionKeywordElse4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordElse4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordElse4.js");
String str = cu.getSource();
String completeBehind = "els";
@@ -5579,7 +5604,7 @@ public void testCompletionKeywordElse4() throws JavaModelException {
}
public void testCompletionKeywordElse5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordElse5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordElse5.js");
String str = cu.getSource();
String completeBehind = "els";
@@ -5592,7 +5617,7 @@ public void testCompletionKeywordElse5() throws JavaModelException {
}
public void testCompletionKeywordElse6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordElse6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordElse6.js");
String str = cu.getSource();
String completeBehind = "els";
@@ -5605,7 +5630,7 @@ public void testCompletionKeywordElse6() throws JavaModelException {
}
public void testCompletionKeywordElse7() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordElse7.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordElse7.js");
String str = cu.getSource();
String completeBehind = "els";
@@ -5618,7 +5643,7 @@ public void testCompletionKeywordElse7() throws JavaModelException {
}
public void testCompletionKeywordElse8() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordElse8.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordElse8.js");
String str = cu.getSource();
String completeBehind = "els";
@@ -5631,7 +5656,7 @@ public void testCompletionKeywordElse8() throws JavaModelException {
}
public void testCompletionKeywordExtends1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordExtends1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordExtends1.js");
String str = cu.getSource();
String completeBehind = "ext";
@@ -5644,7 +5669,7 @@ public void testCompletionKeywordExtends1() throws JavaModelException {
}
public void testCompletionKeywordExtends10() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordExtends10.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordExtends10.js");
String str = cu.getSource();
String completeBehind = "ext";
@@ -5657,7 +5682,7 @@ public void testCompletionKeywordExtends10() throws JavaModelException {
}
public void testCompletionKeywordExtends2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordExtends2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordExtends2.js");
String str = cu.getSource();
String completeBehind = "ext";
@@ -5670,7 +5695,7 @@ public void testCompletionKeywordExtends2() throws JavaModelException {
}
public void testCompletionKeywordExtends3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordExtends3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordExtends3.js");
String str = cu.getSource();
String completeBehind = "ext";
@@ -5683,7 +5708,7 @@ public void testCompletionKeywordExtends3() throws JavaModelException {
}
public void testCompletionKeywordExtends4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordExtends4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordExtends4.js");
String str = cu.getSource();
String completeBehind = "ext";
@@ -5696,7 +5721,7 @@ public void testCompletionKeywordExtends4() throws JavaModelException {
}
public void testCompletionKeywordExtends5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordExtends5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordExtends5.js");
String str = cu.getSource();
String completeBehind = "ext";
@@ -5709,7 +5734,7 @@ public void testCompletionKeywordExtends5() throws JavaModelException {
}
public void testCompletionKeywordExtends6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordExtends6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordExtends6.js");
String str = cu.getSource();
String completeBehind = "ext";
@@ -5722,7 +5747,7 @@ public void testCompletionKeywordExtends6() throws JavaModelException {
}
public void testCompletionKeywordExtends7() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordExtends7.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordExtends7.js");
String str = cu.getSource();
String completeBehind = "ext";
@@ -5735,7 +5760,7 @@ public void testCompletionKeywordExtends7() throws JavaModelException {
}
public void testCompletionKeywordExtends8() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordExtends8.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordExtends8.js");
String str = cu.getSource();
String completeBehind = "ext";
@@ -5748,7 +5773,7 @@ public void testCompletionKeywordExtends8() throws JavaModelException {
}
public void testCompletionKeywordExtends9() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordExtends9.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordExtends9.js");
String str = cu.getSource();
String completeBehind = "ext";
@@ -5761,7 +5786,7 @@ public void testCompletionKeywordExtends9() throws JavaModelException {
}
public void testCompletionKeywordFalse1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFalse1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFalse1.js");
String str = cu.getSource();
String completeBehind = "fal";
@@ -5774,7 +5799,7 @@ public void testCompletionKeywordFalse1() throws JavaModelException {
}
public void testCompletionKeywordFalse2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFalse2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFalse2.js");
String str = cu.getSource();
String completeBehind = "fal";
@@ -5787,7 +5812,7 @@ public void testCompletionKeywordFalse2() throws JavaModelException {
}
public void testCompletionKeywordFalse3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFalse3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFalse3.js");
String str = cu.getSource();
String completeBehind = "fal";
@@ -5800,7 +5825,7 @@ public void testCompletionKeywordFalse3() throws JavaModelException {
}
public void testCompletionKeywordFalse4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFalse4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFalse4.js");
String str = cu.getSource();
String completeBehind = "fal";
@@ -5815,7 +5840,7 @@ public void testCompletionKeywordFalse4() throws JavaModelException {
public void testCompletionKeywordFalse5() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" boolean test = ;\n" +
@@ -5847,7 +5872,7 @@ public void testCompletionKeywordFalse5() throws JavaModelException {
}
public void testCompletionKeywordFinal1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal1.js");
String str = cu.getSource();
String completeBehind = "fin";
@@ -5860,7 +5885,7 @@ public void testCompletionKeywordFinal1() throws JavaModelException {
}
public void testCompletionKeywordFinal10() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal10.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal10.js");
String str = cu.getSource();
String completeBehind = "fin";
@@ -5873,7 +5898,7 @@ public void testCompletionKeywordFinal10() throws JavaModelException {
}
public void testCompletionKeywordFinal11() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal11.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal11.js");
String str = cu.getSource();
String completeBehind = "fin";
@@ -5886,7 +5911,7 @@ public void testCompletionKeywordFinal11() throws JavaModelException {
}
public void testCompletionKeywordFinal12() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal12.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal12.js");
String str = cu.getSource();
String completeBehind = "fin";
@@ -5899,7 +5924,7 @@ public void testCompletionKeywordFinal12() throws JavaModelException {
}
public void testCompletionKeywordFinal13() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal13.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal13.js");
String str = cu.getSource();
String completeBehind = "fin";
@@ -5912,7 +5937,7 @@ public void testCompletionKeywordFinal13() throws JavaModelException {
}
public void testCompletionKeywordFinal14() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal14.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal14.js");
String str = cu.getSource();
String completeBehind = "fin";
@@ -5926,7 +5951,7 @@ public void testCompletionKeywordFinal14() throws JavaModelException {
}
public void testCompletionKeywordFinal15() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal15.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal15.js");
String str = cu.getSource();
String completeBehind = "fin";
@@ -5939,7 +5964,7 @@ public void testCompletionKeywordFinal15() throws JavaModelException {
}
public void testCompletionKeywordFinal16() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal16.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal16.js");
String str = cu.getSource();
String completeBehind = "fin";
@@ -5953,7 +5978,7 @@ public void testCompletionKeywordFinal16() throws JavaModelException {
}
public void testCompletionKeywordFinal17() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal17.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal17.js");
String str = cu.getSource();
String completeBehind = "fin";
@@ -5966,7 +5991,7 @@ public void testCompletionKeywordFinal17() throws JavaModelException {
}
public void testCompletionKeywordFinal18() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal18.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal18.js");
String str = cu.getSource();
String completeBehind = "fin";
@@ -5980,7 +6005,7 @@ public void testCompletionKeywordFinal18() throws JavaModelException {
}
public void testCompletionKeywordFinal2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal2.js");
String str = cu.getSource();
String completeBehind = "fin";
@@ -5993,7 +6018,7 @@ public void testCompletionKeywordFinal2() throws JavaModelException {
}
public void testCompletionKeywordFinal3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal3.js");
String str = cu.getSource();
String completeBehind = "fin";
@@ -6006,7 +6031,7 @@ public void testCompletionKeywordFinal3() throws JavaModelException {
}
public void testCompletionKeywordFinal4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal4.js");
String str = cu.getSource();
String completeBehind = "fin";
@@ -6019,7 +6044,7 @@ public void testCompletionKeywordFinal4() throws JavaModelException {
}
public void testCompletionKeywordFinal5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal5.js");
String str = cu.getSource();
String completeBehind = "fin";
@@ -6033,7 +6058,7 @@ public void testCompletionKeywordFinal5() throws JavaModelException {
}
public void testCompletionKeywordFinal6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal6.js");
String str = cu.getSource();
String completeBehind = "fin";
@@ -6046,7 +6071,7 @@ public void testCompletionKeywordFinal6() throws JavaModelException {
}
public void testCompletionKeywordFinal7() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal7.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal7.js");
String str = cu.getSource();
String completeBehind = "fin";
@@ -6060,7 +6085,7 @@ public void testCompletionKeywordFinal7() throws JavaModelException {
}
public void testCompletionKeywordFinal8() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal8.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal8.js");
String str = cu.getSource();
String completeBehind = "fin";
@@ -6073,7 +6098,7 @@ public void testCompletionKeywordFinal8() throws JavaModelException {
}
public void testCompletionKeywordFinal9() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal9.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinal9.js");
String str = cu.getSource();
String completeBehind = "fin";
@@ -6087,7 +6112,7 @@ public void testCompletionKeywordFinal9() throws JavaModelException {
}
public void testCompletionKeywordFinally1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinally1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinally1.js");
String str = cu.getSource();
String completeBehind = "finall";
@@ -6100,7 +6125,7 @@ public void testCompletionKeywordFinally1() throws JavaModelException {
}
public void testCompletionKeywordFinally10() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinally10.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinally10.js");
String str = cu.getSource();
String completeBehind = "finall";
@@ -6113,7 +6138,7 @@ public void testCompletionKeywordFinally10() throws JavaModelException {
}
public void testCompletionKeywordFinally11() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinally11.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinally11.js");
String str = cu.getSource();
String completeBehind = "finall";
@@ -6126,7 +6151,7 @@ public void testCompletionKeywordFinally11() throws JavaModelException {
}
public void testCompletionKeywordFinally12() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinally12.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinally12.js");
String str = cu.getSource();
String completeBehind = "finall";
@@ -6139,7 +6164,7 @@ public void testCompletionKeywordFinally12() throws JavaModelException {
}
public void testCompletionKeywordFinally13() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinally13.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinally13.js");
String str = cu.getSource();
String completeBehind = "finall";
@@ -6153,7 +6178,7 @@ public void testCompletionKeywordFinally13() throws JavaModelException {
}
public void testCompletionKeywordFinally14() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinally14.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinally14.js");
String str = cu.getSource();
String completeBehind = "finall";
@@ -6166,7 +6191,7 @@ public void testCompletionKeywordFinally14() throws JavaModelException {
}
public void testCompletionKeywordFinally2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinally2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinally2.js");
String str = cu.getSource();
String completeBehind = "finall";
@@ -6179,7 +6204,7 @@ public void testCompletionKeywordFinally2() throws JavaModelException {
}
public void testCompletionKeywordFinally3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinally3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinally3.js");
String str = cu.getSource();
String completeBehind = "finall";
@@ -6192,7 +6217,7 @@ public void testCompletionKeywordFinally3() throws JavaModelException {
}
public void testCompletionKeywordFinally4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinally4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinally4.js");
String str = cu.getSource();
String completeBehind = "finall";
@@ -6205,7 +6230,7 @@ public void testCompletionKeywordFinally4() throws JavaModelException {
}
public void testCompletionKeywordFinally5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinally5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinally5.js");
String str = cu.getSource();
String completeBehind = "finall";
@@ -6218,7 +6243,7 @@ public void testCompletionKeywordFinally5() throws JavaModelException {
}
public void testCompletionKeywordFinally6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinally6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinally6.js");
String str = cu.getSource();
String completeBehind = "finall";
@@ -6232,7 +6257,7 @@ public void testCompletionKeywordFinally6() throws JavaModelException {
}
public void testCompletionKeywordFinally7() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinally7.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinally7.js");
String str = cu.getSource();
String completeBehind = "finall";
@@ -6245,7 +6270,7 @@ public void testCompletionKeywordFinally7() throws JavaModelException {
}
public void testCompletionKeywordFinally8() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinally8.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinally8.js");
String str = cu.getSource();
String completeBehind = "finall";
@@ -6258,7 +6283,7 @@ public void testCompletionKeywordFinally8() throws JavaModelException {
}
public void testCompletionKeywordFinally9() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinally9.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFinally9.js");
String str = cu.getSource();
String completeBehind = "finall";
@@ -6271,7 +6296,7 @@ public void testCompletionKeywordFinally9() throws JavaModelException {
}
public void testCompletionKeywordFor1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFor1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFor1.js");
String str = cu.getSource();
String completeBehind = "fo";
@@ -6285,7 +6310,7 @@ public void testCompletionKeywordFor1() throws JavaModelException {
}
public void testCompletionKeywordFor2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFor2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFor2.js");
String str = cu.getSource();
String completeBehind = "fo";
@@ -6298,7 +6323,7 @@ public void testCompletionKeywordFor2() throws JavaModelException {
}
public void testCompletionKeywordFor3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFor3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFor3.js");
String str = cu.getSource();
String completeBehind = "fo";
@@ -6311,7 +6336,7 @@ public void testCompletionKeywordFor3() throws JavaModelException {
}
public void testCompletionKeywordFor4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFor4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFor4.js");
String str = cu.getSource();
String completeBehind = "fo";
@@ -6325,7 +6350,7 @@ public void testCompletionKeywordFor4() throws JavaModelException {
}
public void testCompletionKeywordFor5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFor5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFor5.js");
String str = cu.getSource();
String completeBehind = "fo";
@@ -6338,7 +6363,7 @@ public void testCompletionKeywordFor5() throws JavaModelException {
}
public void testCompletionKeywordFor6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFor6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordFor6.js");
String str = cu.getSource();
String completeBehind = "fo";
@@ -6351,7 +6376,7 @@ public void testCompletionKeywordFor6() throws JavaModelException {
}
public void testCompletionKeywordIf1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordIf1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordIf1.js");
String str = cu.getSource();
String completeBehind = "if";
@@ -6364,7 +6389,7 @@ public void testCompletionKeywordIf1() throws JavaModelException {
}
public void testCompletionKeywordIf2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordIf2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordIf2.js");
String str = cu.getSource();
String completeBehind = "if";
@@ -6377,7 +6402,7 @@ public void testCompletionKeywordIf2() throws JavaModelException {
}
public void testCompletionKeywordIf3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordIf3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordIf3.js");
String str = cu.getSource();
String completeBehind = "if";
@@ -6390,7 +6415,7 @@ public void testCompletionKeywordIf3() throws JavaModelException {
}
public void testCompletionKeywordIf4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordIf4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordIf4.js");
String str = cu.getSource();
String completeBehind = "if";
@@ -6403,7 +6428,7 @@ public void testCompletionKeywordIf4() throws JavaModelException {
}
public void testCompletionKeywordIf5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordIf5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordIf5.js");
String str = cu.getSource();
String completeBehind = "if";
@@ -6416,7 +6441,7 @@ public void testCompletionKeywordIf5() throws JavaModelException {
}
public void testCompletionKeywordIf6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordIf6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordIf6.js");
String str = cu.getSource();
String completeBehind = "if";
@@ -6429,7 +6454,7 @@ public void testCompletionKeywordIf6() throws JavaModelException {
}
public void testCompletionKeywordImplements1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordImplements1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordImplements1.js");
String str = cu.getSource();
String completeBehind = "imp";
@@ -6442,7 +6467,7 @@ public void testCompletionKeywordImplements1() throws JavaModelException {
}
public void testCompletionKeywordImplements2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordImplements2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordImplements2.js");
String str = cu.getSource();
String completeBehind = "imp";
@@ -6455,7 +6480,7 @@ public void testCompletionKeywordImplements2() throws JavaModelException {
}
public void testCompletionKeywordImplements3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordImplements3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordImplements3.js");
String str = cu.getSource();
String completeBehind = "imp";
@@ -6468,7 +6493,7 @@ public void testCompletionKeywordImplements3() throws JavaModelException {
}
public void testCompletionKeywordImplements4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordImplements4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordImplements4.js");
String str = cu.getSource();
String completeBehind = "imp";
@@ -6481,7 +6506,7 @@ public void testCompletionKeywordImplements4() throws JavaModelException {
}
public void testCompletionKeywordImplements5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordImplements5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordImplements5.js");
String str = cu.getSource();
String completeBehind = "imp";
@@ -6494,7 +6519,7 @@ public void testCompletionKeywordImplements5() throws JavaModelException {
}
public void testCompletionKeywordImplements6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordImplements6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordImplements6.js");
String str = cu.getSource();
String completeBehind = "imp";
@@ -6507,7 +6532,7 @@ public void testCompletionKeywordImplements6() throws JavaModelException {
}
public void testCompletionKeywordImport1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordImport1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordImport1.js");
String str = cu.getSource();
String completeBehind = "imp";
@@ -6520,7 +6545,7 @@ public void testCompletionKeywordImport1() throws JavaModelException {
}
public void testCompletionKeywordImport2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "p", "CompletionKeywordImport2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "p", "CompletionKeywordImport2.js");
String str = cu.getSource();
String completeBehind = "imp";
@@ -6533,7 +6558,7 @@ public void testCompletionKeywordImport2() throws JavaModelException {
}
public void testCompletionKeywordImport3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordImport3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordImport3.js");
String str = cu.getSource();
String completeBehind = "imp";
@@ -6546,7 +6571,7 @@ public void testCompletionKeywordImport3() throws JavaModelException {
}
public void testCompletionKeywordImport4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordImport4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordImport4.js");
String str = cu.getSource();
String completeBehind = "imp";
@@ -6559,7 +6584,7 @@ public void testCompletionKeywordImport4() throws JavaModelException {
}
public void testCompletionKeywordImport5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordImport5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordImport5.js");
String str = cu.getSource();
String completeBehind = "imp";
@@ -6572,7 +6597,7 @@ public void testCompletionKeywordImport5() throws JavaModelException {
}
public void testCompletionKeywordImport6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordImport6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordImport6.js");
String str = cu.getSource();
String completeBehind = "imp";
@@ -6585,7 +6610,7 @@ public void testCompletionKeywordImport6() throws JavaModelException {
}
public void testCompletionKeywordImport7() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordImport7.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordImport7.js");
String str = cu.getSource();
String completeBehind = "imp";
@@ -6598,7 +6623,7 @@ public void testCompletionKeywordImport7() throws JavaModelException {
}
public void testCompletionKeywordImport8() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "p", "CompletionKeywordImport8.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "p", "CompletionKeywordImport8.js");
String str = cu.getSource();
String completeBehind = "imp";
@@ -6611,7 +6636,7 @@ public void testCompletionKeywordImport8() throws JavaModelException {
}
public void testCompletionKeywordInstanceof1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInstanceof1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInstanceof1.js");
String str = cu.getSource();
String completeBehind = "ins";
@@ -6624,7 +6649,7 @@ public void testCompletionKeywordInstanceof1() throws JavaModelException {
}
public void testCompletionKeywordInstanceof2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInstanceof2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInstanceof2.js");
String str = cu.getSource();
String completeBehind = "ins";
@@ -6637,7 +6662,7 @@ public void testCompletionKeywordInstanceof2() throws JavaModelException {
}
public void testCompletionKeywordInstanceof3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInstanceof3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInstanceof3.js");
String str = cu.getSource();
String completeBehind = "ins";
@@ -6650,7 +6675,7 @@ public void testCompletionKeywordInstanceof3() throws JavaModelException {
}
public void testCompletionKeywordInstanceof4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInstanceof4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInstanceof4.js");
String str = cu.getSource();
String completeBehind = "ins";
@@ -6663,7 +6688,7 @@ public void testCompletionKeywordInstanceof4() throws JavaModelException {
}
public void testCompletionKeywordInstanceof5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInstanceof5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInstanceof5.js");
String str = cu.getSource();
String completeBehind = "ins";
@@ -6676,7 +6701,7 @@ public void testCompletionKeywordInstanceof5() throws JavaModelException {
}
public void testCompletionKeywordInstanceof6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInstanceof6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInstanceof6.js");
String str = cu.getSource();
String completeBehind = "ins";
@@ -6689,7 +6714,7 @@ public void testCompletionKeywordInstanceof6() throws JavaModelException {
}
public void testCompletionKeywordInterface1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface1.js");
String str = cu.getSource();
String completeBehind = "interf";
@@ -6702,7 +6727,7 @@ public void testCompletionKeywordInterface1() throws JavaModelException {
}
public void testCompletionKeywordInterface10() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface1.js");
String str = cu.getSource();
String completeBehind = "interf";
@@ -6715,7 +6740,7 @@ public void testCompletionKeywordInterface10() throws JavaModelException {
}
public void testCompletionKeywordInterface11() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface11.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface11.js");
String str = cu.getSource();
String completeBehind = "interf";
@@ -6728,7 +6753,7 @@ public void testCompletionKeywordInterface11() throws JavaModelException {
}
public void testCompletionKeywordInterface12() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface12.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface12.js");
String str = cu.getSource();
String completeBehind = "interf";
@@ -6741,7 +6766,7 @@ public void testCompletionKeywordInterface12() throws JavaModelException {
}
public void testCompletionKeywordInterface13() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface13.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface13.js");
String str = cu.getSource();
String completeBehind = "interf";
@@ -6754,7 +6779,7 @@ public void testCompletionKeywordInterface13() throws JavaModelException {
}
public void testCompletionKeywordInterface14() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface14.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface14.js");
String str = cu.getSource();
String completeBehind = "interf";
@@ -6767,7 +6792,7 @@ public void testCompletionKeywordInterface14() throws JavaModelException {
}
public void testCompletionKeywordInterface15() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface15.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface15.js");
String str = cu.getSource();
String completeBehind = "interf";
@@ -6780,7 +6805,7 @@ public void testCompletionKeywordInterface15() throws JavaModelException {
}
public void testCompletionKeywordInterface16() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface16.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface16.js");
String str = cu.getSource();
String completeBehind = "interf";
@@ -6793,7 +6818,7 @@ public void testCompletionKeywordInterface16() throws JavaModelException {
}
public void testCompletionKeywordInterface17() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface17.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface17.js");
String str = cu.getSource();
String completeBehind = "interf";
@@ -6806,7 +6831,7 @@ public void testCompletionKeywordInterface17() throws JavaModelException {
}
public void testCompletionKeywordInterface18() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface18.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface18.js");
String str = cu.getSource();
String completeBehind = "interf";
@@ -6819,7 +6844,7 @@ public void testCompletionKeywordInterface18() throws JavaModelException {
}
public void testCompletionKeywordInterface2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface2.js");
String str = cu.getSource();
String completeBehind = "interf";
@@ -6832,7 +6857,7 @@ public void testCompletionKeywordInterface2() throws JavaModelException {
}
public void testCompletionKeywordInterface3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface3.js");
String str = cu.getSource();
String completeBehind = "interf";
@@ -6845,7 +6870,7 @@ public void testCompletionKeywordInterface3() throws JavaModelException {
}
public void testCompletionKeywordInterface4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface4.js");
String str = cu.getSource();
String completeBehind = "interf";
@@ -6858,7 +6883,7 @@ public void testCompletionKeywordInterface4() throws JavaModelException {
}
public void testCompletionKeywordInterface5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface5.js");
String str = cu.getSource();
String completeBehind = "interf";
@@ -6871,7 +6896,7 @@ public void testCompletionKeywordInterface5() throws JavaModelException {
}
public void testCompletionKeywordInterface6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface6.js");
String str = cu.getSource();
String completeBehind = "interf";
@@ -6884,7 +6909,7 @@ public void testCompletionKeywordInterface6() throws JavaModelException {
}
public void testCompletionKeywordInterface7() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface7.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface7.js");
String str = cu.getSource();
String completeBehind = "interf";
@@ -6897,7 +6922,7 @@ public void testCompletionKeywordInterface7() throws JavaModelException {
}
public void testCompletionKeywordInterface8() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface8.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface8.js");
String str = cu.getSource();
String completeBehind = "interf";
@@ -6910,7 +6935,7 @@ public void testCompletionKeywordInterface8() throws JavaModelException {
}
public void testCompletionKeywordInterface9() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface9.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordInterface9.js");
String str = cu.getSource();
String completeBehind = "interf";
@@ -6923,7 +6948,7 @@ public void testCompletionKeywordInterface9() throws JavaModelException {
}
public void testCompletionKeywordNative1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNative1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNative1.js");
String str = cu.getSource();
String completeBehind = "nat";
@@ -6936,7 +6961,7 @@ public void testCompletionKeywordNative1() throws JavaModelException {
}
public void testCompletionKeywordNative2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNative2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNative2.js");
String str = cu.getSource();
String completeBehind = "nat";
@@ -6949,7 +6974,7 @@ public void testCompletionKeywordNative2() throws JavaModelException {
}
public void testCompletionKeywordNative3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNative3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNative3.js");
String str = cu.getSource();
String completeBehind = "nat";
@@ -6962,7 +6987,7 @@ public void testCompletionKeywordNative3() throws JavaModelException {
}
public void testCompletionKeywordNative4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNative4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNative4.js");
String str = cu.getSource();
String completeBehind = "nat";
@@ -6975,7 +7000,7 @@ public void testCompletionKeywordNative4() throws JavaModelException {
}
public void testCompletionKeywordNative5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNative5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNative5.js");
String str = cu.getSource();
String completeBehind = "nat";
@@ -6988,7 +7013,7 @@ public void testCompletionKeywordNative5() throws JavaModelException {
}
public void testCompletionKeywordNative6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNative6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNative6.js");
String str = cu.getSource();
String completeBehind = "nat";
@@ -7001,7 +7026,7 @@ public void testCompletionKeywordNative6() throws JavaModelException {
}
public void testCompletionKeywordNative7() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNative7.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNative7.js");
String str = cu.getSource();
String completeBehind = "nat";
@@ -7014,7 +7039,7 @@ public void testCompletionKeywordNative7() throws JavaModelException {
}
public void testCompletionKeywordNative8() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNative8.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNative8.js");
String str = cu.getSource();
String completeBehind = "nat";
@@ -7027,7 +7052,7 @@ public void testCompletionKeywordNative8() throws JavaModelException {
}
public void testCompletionKeywordNew1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNew1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNew1.js");
String str = cu.getSource();
String completeBehind = "ne";
@@ -7040,7 +7065,7 @@ public void testCompletionKeywordNew1() throws JavaModelException {
}
public void testCompletionKeywordNew10() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNew10.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNew10.js");
String str = cu.getSource();
String completeBehind = "ne";
@@ -7053,7 +7078,7 @@ public void testCompletionKeywordNew10() throws JavaModelException {
}
public void testCompletionKeywordNew11() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNew11.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNew11.js");
String str = cu.getSource();
String completeBehind = "ne";
@@ -7066,7 +7091,7 @@ public void testCompletionKeywordNew11() throws JavaModelException {
}
public void testCompletionKeywordNew12() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNew12.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNew12.js");
String str = cu.getSource();
String completeBehind = "ne";
@@ -7079,7 +7104,7 @@ public void testCompletionKeywordNew12() throws JavaModelException {
}
public void testCompletionKeywordNew13() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNew13.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNew13.js");
String str = cu.getSource();
String completeBehind = "ne";
@@ -7092,7 +7117,7 @@ public void testCompletionKeywordNew13() throws JavaModelException {
}
public void testCompletionKeywordNew14() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNew14.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNew14.js");
String str = cu.getSource();
String completeBehind = "ne";
@@ -7105,7 +7130,7 @@ public void testCompletionKeywordNew14() throws JavaModelException {
}
public void testCompletionKeywordNew15() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNew15.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNew15.js");
String str = cu.getSource();
String completeBehind = "ne";
@@ -7118,7 +7143,7 @@ public void testCompletionKeywordNew15() throws JavaModelException {
}
public void testCompletionKeywordNew16() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNew16.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNew16.js");
String str = cu.getSource();
String completeBehind = "ne";
@@ -7131,7 +7156,7 @@ public void testCompletionKeywordNew16() throws JavaModelException {
}
public void testCompletionKeywordNew2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNew2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNew2.js");
String str = cu.getSource();
String completeBehind = "ne";
@@ -7144,7 +7169,7 @@ public void testCompletionKeywordNew2() throws JavaModelException {
}
public void testCompletionKeywordNew3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNew3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNew3.js");
String str = cu.getSource();
String completeBehind = "ne";
@@ -7157,7 +7182,7 @@ public void testCompletionKeywordNew3() throws JavaModelException {
}
public void testCompletionKeywordNew4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNew4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNew4.js");
String str = cu.getSource();
String completeBehind = "ne";
@@ -7170,7 +7195,7 @@ public void testCompletionKeywordNew4() throws JavaModelException {
}
public void testCompletionKeywordNew5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNew5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNew5.js");
String str = cu.getSource();
String completeBehind = "ne";
@@ -7183,7 +7208,7 @@ public void testCompletionKeywordNew5() throws JavaModelException {
}
public void testCompletionKeywordNew6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNew6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNew6.js");
String str = cu.getSource();
String completeBehind = "ne";
@@ -7196,7 +7221,7 @@ public void testCompletionKeywordNew6() throws JavaModelException {
}
public void testCompletionKeywordNew7() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNew7.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNew7.js");
String str = cu.getSource();
String completeBehind = "ne";
@@ -7209,7 +7234,7 @@ public void testCompletionKeywordNew7() throws JavaModelException {
}
public void testCompletionKeywordNew8() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNew8.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNew8.js");
String str = cu.getSource();
String completeBehind = "ne";
@@ -7222,7 +7247,7 @@ public void testCompletionKeywordNew8() throws JavaModelException {
}
public void testCompletionKeywordNew9() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNew9.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNew9.js");
String str = cu.getSource();
String completeBehind = "ne";
@@ -7235,7 +7260,7 @@ public void testCompletionKeywordNew9() throws JavaModelException {
}
public void testCompletionKeywordNull1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNull1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNull1.js");
String str = cu.getSource();
String completeBehind = "nul";
@@ -7248,7 +7273,7 @@ public void testCompletionKeywordNull1() throws JavaModelException {
}
public void testCompletionKeywordNull2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNull2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNull2.js");
String str = cu.getSource();
String completeBehind = "nul";
@@ -7261,7 +7286,7 @@ public void testCompletionKeywordNull2() throws JavaModelException {
}
public void testCompletionKeywordNull3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNull3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNull3.js");
String str = cu.getSource();
String completeBehind = "nul";
@@ -7274,7 +7299,7 @@ public void testCompletionKeywordNull3() throws JavaModelException {
}
public void testCompletionKeywordNull4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNull4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordNull4.js");
String str = cu.getSource();
String completeBehind = "nul";
@@ -7287,7 +7312,7 @@ public void testCompletionKeywordNull4() throws JavaModelException {
}
public void testCompletionKeywordPackage1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPackage1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPackage1.js");
String str = cu.getSource();
String completeBehind = "pac";
@@ -7300,7 +7325,7 @@ public void testCompletionKeywordPackage1() throws JavaModelException {
}
public void testCompletionKeywordPackage2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "p", "CompletionKeywordPackage2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "p", "CompletionKeywordPackage2.js");
String str = cu.getSource();
String completeBehind = "pac";
@@ -7314,7 +7339,7 @@ public void testCompletionKeywordPackage2() throws JavaModelException {
public void testCompletionKeywordPackage3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPackage3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPackage3.js");
String str = cu.getSource();
String completeBehind = "pac";
@@ -7327,7 +7352,7 @@ public void testCompletionKeywordPackage3() throws JavaModelException {
}
public void testCompletionKeywordPackage4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPackage4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPackage4.js");
String str = cu.getSource();
String completeBehind = "pac";
@@ -7340,7 +7365,7 @@ public void testCompletionKeywordPackage4() throws JavaModelException {
}
public void testCompletionKeywordPackage5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPackage5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPackage5.js");
String str = cu.getSource();
String completeBehind = "pac";
@@ -7353,7 +7378,7 @@ public void testCompletionKeywordPackage5() throws JavaModelException {
}
public void testCompletionKeywordPackage6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPackage6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPackage6.js");
String str = cu.getSource();
String completeBehind = "pac";
@@ -7366,7 +7391,7 @@ public void testCompletionKeywordPackage6() throws JavaModelException {
}
public void testCompletionKeywordPackage7() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPackage7.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPackage7.js");
String str = cu.getSource();
String completeBehind = "pac";
@@ -7379,7 +7404,7 @@ public void testCompletionKeywordPackage7() throws JavaModelException {
}
public void testCompletionKeywordPackage8() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "p", "CompletionKeywordPackage8.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "p", "CompletionKeywordPackage8.js");
String str = cu.getSource();
String completeBehind = "pac";
@@ -7392,7 +7417,7 @@ public void testCompletionKeywordPackage8() throws JavaModelException {
}
public void testCompletionKeywordPrivate1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPrivate1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPrivate1.js");
String str = cu.getSource();
String completeBehind = "pri";
@@ -7405,7 +7430,7 @@ public void testCompletionKeywordPrivate1() throws JavaModelException {
}
public void testCompletionKeywordPrivate10() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPrivate10.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPrivate10.js");
String str = cu.getSource();
String completeBehind = "pri";
@@ -7418,7 +7443,7 @@ public void testCompletionKeywordPrivate10() throws JavaModelException {
}
public void testCompletionKeywordPrivate2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPrivate2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPrivate2.js");
String str = cu.getSource();
String completeBehind = "pri";
@@ -7431,7 +7456,7 @@ public void testCompletionKeywordPrivate2() throws JavaModelException {
}
public void testCompletionKeywordPrivate3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPrivate3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPrivate3.js");
String str = cu.getSource();
String completeBehind = "pri";
@@ -7444,7 +7469,7 @@ public void testCompletionKeywordPrivate3() throws JavaModelException {
}
public void testCompletionKeywordPrivate4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPrivate4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPrivate4.js");
String str = cu.getSource();
String completeBehind = "pri";
@@ -7457,7 +7482,7 @@ public void testCompletionKeywordPrivate4() throws JavaModelException {
}
public void testCompletionKeywordPrivate5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPrivate5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPrivate5.js");
String str = cu.getSource();
String completeBehind = "pri";
@@ -7470,7 +7495,7 @@ public void testCompletionKeywordPrivate5() throws JavaModelException {
}
public void testCompletionKeywordPrivate6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPrivate6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPrivate6.js");
String str = cu.getSource();
String completeBehind = "pri";
@@ -7483,7 +7508,7 @@ public void testCompletionKeywordPrivate6() throws JavaModelException {
}
public void testCompletionKeywordPrivate7() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPrivate7.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPrivate7.js");
String str = cu.getSource();
String completeBehind = "pri";
@@ -7496,7 +7521,7 @@ public void testCompletionKeywordPrivate7() throws JavaModelException {
}
public void testCompletionKeywordPrivate8() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPrivate8.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPrivate8.js");
String str = cu.getSource();
String completeBehind = "pri";
@@ -7509,7 +7534,7 @@ public void testCompletionKeywordPrivate8() throws JavaModelException {
}
public void testCompletionKeywordPrivate9() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPrivate9.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPrivate9.js");
String str = cu.getSource();
String completeBehind = "pri";
@@ -7522,7 +7547,7 @@ public void testCompletionKeywordPrivate9() throws JavaModelException {
}
public void testCompletionKeywordProtected1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordProtected1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordProtected1.js");
String str = cu.getSource();
String completeBehind = "pro";
@@ -7535,7 +7560,7 @@ public void testCompletionKeywordProtected1() throws JavaModelException {
}
public void testCompletionKeywordProtected10() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordProtected10.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordProtected10.js");
String str = cu.getSource();
String completeBehind = "pro";
@@ -7548,7 +7573,7 @@ public void testCompletionKeywordProtected10() throws JavaModelException {
}
public void testCompletionKeywordProtected2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordProtected2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordProtected2.js");
String str = cu.getSource();
String completeBehind = "pro";
@@ -7561,7 +7586,7 @@ public void testCompletionKeywordProtected2() throws JavaModelException {
}
public void testCompletionKeywordProtected3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordProtected3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordProtected3.js");
String str = cu.getSource();
String completeBehind = "pro";
@@ -7574,7 +7599,7 @@ public void testCompletionKeywordProtected3() throws JavaModelException {
}
public void testCompletionKeywordProtected4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordProtected4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordProtected4.js");
String str = cu.getSource();
String completeBehind = "pro";
@@ -7587,7 +7612,7 @@ public void testCompletionKeywordProtected4() throws JavaModelException {
}
public void testCompletionKeywordProtected5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordProtected5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordProtected5.js");
String str = cu.getSource();
String completeBehind = "pro";
@@ -7600,7 +7625,7 @@ public void testCompletionKeywordProtected5() throws JavaModelException {
}
public void testCompletionKeywordProtected6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordProtected6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordProtected6.js");
String str = cu.getSource();
String completeBehind = "pro";
@@ -7613,7 +7638,7 @@ public void testCompletionKeywordProtected6() throws JavaModelException {
}
public void testCompletionKeywordProtected7() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordProtected7.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordProtected7.js");
String str = cu.getSource();
String completeBehind = "pro";
@@ -7626,7 +7651,7 @@ public void testCompletionKeywordProtected7() throws JavaModelException {
}
public void testCompletionKeywordProtected8() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordProtected8.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordProtected8.js");
String str = cu.getSource();
String completeBehind = "pro";
@@ -7639,7 +7664,7 @@ public void testCompletionKeywordProtected8() throws JavaModelException {
}
public void testCompletionKeywordProtected9() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordProtected9.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordProtected9.js");
String str = cu.getSource();
String completeBehind = "pro";
@@ -7652,7 +7677,7 @@ public void testCompletionKeywordProtected9() throws JavaModelException {
}
public void testCompletionKeywordPublic1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic1.js");
String str = cu.getSource();
String completeBehind = "pub";
@@ -7665,7 +7690,7 @@ public void testCompletionKeywordPublic1() throws JavaModelException {
}
public void testCompletionKeywordPublic10() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic10.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic10.js");
String str = cu.getSource();
String completeBehind = "pub";
@@ -7678,7 +7703,7 @@ public void testCompletionKeywordPublic10() throws JavaModelException {
}
public void testCompletionKeywordPublic11() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic11.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic11.js");
String str = cu.getSource();
String completeBehind = "pub";
@@ -7691,7 +7716,7 @@ public void testCompletionKeywordPublic11() throws JavaModelException {
}
public void testCompletionKeywordPublic12() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic12.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic12.js");
String str = cu.getSource();
String completeBehind = "pub";
@@ -7704,7 +7729,7 @@ public void testCompletionKeywordPublic12() throws JavaModelException {
}
public void testCompletionKeywordPublic13() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic13.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic13.js");
String str = cu.getSource();
String completeBehind = "pub";
@@ -7717,7 +7742,7 @@ public void testCompletionKeywordPublic13() throws JavaModelException {
}
public void testCompletionKeywordPublic14() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic14.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic14.js");
String str = cu.getSource();
String completeBehind = "pub";
@@ -7730,7 +7755,7 @@ public void testCompletionKeywordPublic14() throws JavaModelException {
}
public void testCompletionKeywordPublic15() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic15.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic15.js");
String str = cu.getSource();
String completeBehind = "pub";
@@ -7743,7 +7768,7 @@ public void testCompletionKeywordPublic15() throws JavaModelException {
}
public void testCompletionKeywordPublic16() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic16.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic16.js");
String str = cu.getSource();
String completeBehind = "pub";
@@ -7756,7 +7781,7 @@ public void testCompletionKeywordPublic16() throws JavaModelException {
}
public void testCompletionKeywordPublic17() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic17.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic17.js");
String str = cu.getSource();
String completeBehind = "pub";
@@ -7769,7 +7794,7 @@ public void testCompletionKeywordPublic17() throws JavaModelException {
}
public void testCompletionKeywordPublic18() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic18.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic18.js");
String str = cu.getSource();
String completeBehind = "pub";
@@ -7782,7 +7807,7 @@ public void testCompletionKeywordPublic18() throws JavaModelException {
}
public void testCompletionKeywordPublic19() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic19.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic19.js");
String str = cu.getSource();
String completeBehind = "pub";
@@ -7795,7 +7820,7 @@ public void testCompletionKeywordPublic19() throws JavaModelException {
}
public void testCompletionKeywordPublic2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic2.js");
String str = cu.getSource();
String completeBehind = "pub";
@@ -7808,7 +7833,7 @@ public void testCompletionKeywordPublic2() throws JavaModelException {
}
public void testCompletionKeywordPublic20() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic10.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic10.js");
String str = cu.getSource();
String completeBehind = "pub";
@@ -7821,7 +7846,7 @@ public void testCompletionKeywordPublic20() throws JavaModelException {
}
public void testCompletionKeywordPublic3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic3.js");
String str = cu.getSource();
String completeBehind = "pub";
@@ -7834,7 +7859,7 @@ public void testCompletionKeywordPublic3() throws JavaModelException {
}
public void testCompletionKeywordPublic4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic4.js");
String str = cu.getSource();
String completeBehind = "pub";
@@ -7847,7 +7872,7 @@ public void testCompletionKeywordPublic4() throws JavaModelException {
}
public void testCompletionKeywordPublic5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic5.js");
String str = cu.getSource();
String completeBehind = "pub";
@@ -7860,7 +7885,7 @@ public void testCompletionKeywordPublic5() throws JavaModelException {
}
public void testCompletionKeywordPublic6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic6.js");
String str = cu.getSource();
String completeBehind = "pub";
@@ -7873,7 +7898,7 @@ public void testCompletionKeywordPublic6() throws JavaModelException {
}
public void testCompletionKeywordPublic7() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic7.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic7.js");
String str = cu.getSource();
String completeBehind = "pub";
@@ -7886,7 +7911,7 @@ public void testCompletionKeywordPublic7() throws JavaModelException {
}
public void testCompletionKeywordPublic8() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic8.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic8.js");
String str = cu.getSource();
String completeBehind = "pub";
@@ -7899,7 +7924,7 @@ public void testCompletionKeywordPublic8() throws JavaModelException {
}
public void testCompletionKeywordPublic9() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic9.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordPublic9.js");
String str = cu.getSource();
String completeBehind = "pub";
@@ -7912,7 +7937,7 @@ public void testCompletionKeywordPublic9() throws JavaModelException {
}
public void testCompletionKeywordReturn1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordReturn1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordReturn1.js");
String str = cu.getSource();
String completeBehind = "re";
@@ -7925,7 +7950,7 @@ public void testCompletionKeywordReturn1() throws JavaModelException {
}
public void testCompletionKeywordReturn2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordReturn2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordReturn2.js");
String str = cu.getSource();
String completeBehind = "re";
@@ -7938,7 +7963,7 @@ public void testCompletionKeywordReturn2() throws JavaModelException {
}
public void testCompletionKeywordReturn3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordReturn3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordReturn3.js");
String str = cu.getSource();
String completeBehind = "re";
@@ -7951,7 +7976,7 @@ public void testCompletionKeywordReturn3() throws JavaModelException {
}
public void testCompletionKeywordReturn4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordReturn4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordReturn4.js");
String str = cu.getSource();
String completeBehind = "re";
@@ -7964,7 +7989,7 @@ public void testCompletionKeywordReturn4() throws JavaModelException {
}
public void testCompletionKeywordReturn5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordReturn5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordReturn5.js");
String str = cu.getSource();
String completeBehind = "re";
@@ -7977,7 +8002,7 @@ public void testCompletionKeywordReturn5() throws JavaModelException {
}
public void testCompletionKeywordReturn6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordReturn6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordReturn6.js");
String str = cu.getSource();
String completeBehind = "re";
@@ -7990,7 +8015,7 @@ public void testCompletionKeywordReturn6() throws JavaModelException {
}
public void testCompletionKeywordStatic1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStatic1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStatic1.js");
String str = cu.getSource();
String completeBehind = "sta";
@@ -8003,7 +8028,7 @@ public void testCompletionKeywordStatic1() throws JavaModelException {
}
public void testCompletionKeywordStatic10() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStatic10.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStatic10.js");
String str = cu.getSource();
String completeBehind = "sta";
@@ -8016,7 +8041,7 @@ public void testCompletionKeywordStatic10() throws JavaModelException {
}
public void testCompletionKeywordStatic2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStatic2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStatic2.js");
String str = cu.getSource();
String completeBehind = "sta";
@@ -8029,7 +8054,7 @@ public void testCompletionKeywordStatic2() throws JavaModelException {
}
public void testCompletionKeywordStatic3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStatic3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStatic3.js");
String str = cu.getSource();
String completeBehind = "sta";
@@ -8042,7 +8067,7 @@ public void testCompletionKeywordStatic3() throws JavaModelException {
}
public void testCompletionKeywordStatic4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStatic4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStatic4.js");
String str = cu.getSource();
String completeBehind = "sta";
@@ -8055,7 +8080,7 @@ public void testCompletionKeywordStatic4() throws JavaModelException {
}
public void testCompletionKeywordStatic5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStatic5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStatic5.js");
String str = cu.getSource();
String completeBehind = "sta";
@@ -8068,7 +8093,7 @@ public void testCompletionKeywordStatic5() throws JavaModelException {
}
public void testCompletionKeywordStatic6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStatic6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStatic6.js");
String str = cu.getSource();
String completeBehind = "sta";
@@ -8081,7 +8106,7 @@ public void testCompletionKeywordStatic6() throws JavaModelException {
}
public void testCompletionKeywordStatic7() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStatic7.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStatic7.js");
String str = cu.getSource();
String completeBehind = "sta";
@@ -8094,7 +8119,7 @@ public void testCompletionKeywordStatic7() throws JavaModelException {
}
public void testCompletionKeywordStatic8() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStatic8.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStatic8.js");
String str = cu.getSource();
String completeBehind = "sta";
@@ -8107,7 +8132,7 @@ public void testCompletionKeywordStatic8() throws JavaModelException {
}
public void testCompletionKeywordStatic9() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStatic9.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStatic9.js");
String str = cu.getSource();
String completeBehind = "sta";
@@ -8120,7 +8145,7 @@ public void testCompletionKeywordStatic9() throws JavaModelException {
}
public void testCompletionKeywordStrictfp1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStrictfp1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStrictfp1.js");
String str = cu.getSource();
String completeBehind = "stric";
@@ -8133,7 +8158,7 @@ public void testCompletionKeywordStrictfp1() throws JavaModelException {
}
public void testCompletionKeywordStrictfp2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStrictfp2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStrictfp2.js");
String str = cu.getSource();
String completeBehind = "stric";
@@ -8146,7 +8171,7 @@ public void testCompletionKeywordStrictfp2() throws JavaModelException {
}
public void testCompletionKeywordStrictfp3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStrictfp3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStrictfp3.js");
String str = cu.getSource();
String completeBehind = "stric";
@@ -8159,7 +8184,7 @@ public void testCompletionKeywordStrictfp3() throws JavaModelException {
}
public void testCompletionKeywordStrictfp4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStrictfp4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStrictfp4.js");
String str = cu.getSource();
String completeBehind = "stric";
@@ -8172,7 +8197,7 @@ public void testCompletionKeywordStrictfp4() throws JavaModelException {
}
public void testCompletionKeywordStrictfp5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStrictfp5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStrictfp5.js");
String str = cu.getSource();
String completeBehind = "stric";
@@ -8185,7 +8210,7 @@ public void testCompletionKeywordStrictfp5() throws JavaModelException {
}
public void testCompletionKeywordStrictfp6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStrictfp6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStrictfp6.js");
String str = cu.getSource();
String completeBehind = "stric";
@@ -8198,7 +8223,7 @@ public void testCompletionKeywordStrictfp6() throws JavaModelException {
}
public void testCompletionKeywordStrictfp7() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStrictfp7.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStrictfp7.js");
String str = cu.getSource();
String completeBehind = "stric";
@@ -8211,7 +8236,7 @@ public void testCompletionKeywordStrictfp7() throws JavaModelException {
}
public void testCompletionKeywordStrictfp8() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStrictfp8.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordStrictfp8.js");
String str = cu.getSource();
String completeBehind = "stric";
@@ -8224,7 +8249,7 @@ public void testCompletionKeywordStrictfp8() throws JavaModelException {
}
public void testCompletionKeywordSuper1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSuper1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSuper1.js");
String str = cu.getSource();
String completeBehind = "sup";
@@ -8239,7 +8264,7 @@ public void testCompletionKeywordSuper1() throws JavaModelException {
}
public void testCompletionKeywordSuper10() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSuper10.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSuper10.js");
String str = cu.getSource();
String completeBehind = "sup";
@@ -8254,7 +8279,7 @@ public void testCompletionKeywordSuper10() throws JavaModelException {
}
public void testCompletionKeywordSuper11() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSuper11.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSuper11.js");
String str = cu.getSource();
String completeBehind = "sup";
@@ -8268,7 +8293,7 @@ public void testCompletionKeywordSuper11() throws JavaModelException {
}
public void testCompletionKeywordSuper12() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src2/CompletionKeywordSuper12.java",
+ "/Completion/src2/CompletionKeywordSuper12.js",
"public class CompletionKeywordSuper12 {\n"+
" public CompletionKeywordSuper12() {\n"+
" #\n"+
@@ -8298,7 +8323,7 @@ public void testCompletionKeywordSuper12() throws JavaModelException {
}
public void testCompletionKeywordSuper2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSuper2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSuper2.js");
String str = cu.getSource();
String completeBehind = "sup";
@@ -8313,7 +8338,7 @@ public void testCompletionKeywordSuper2() throws JavaModelException {
}
public void testCompletionKeywordSuper3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSuper3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSuper3.js");
String str = cu.getSource();
String completeBehind = "sup";
@@ -8327,7 +8352,7 @@ public void testCompletionKeywordSuper3() throws JavaModelException {
}
public void testCompletionKeywordSuper4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSuper4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSuper4.js");
String str = cu.getSource();
String completeBehind = "sup";
@@ -8342,7 +8367,7 @@ public void testCompletionKeywordSuper4() throws JavaModelException {
}
public void testCompletionKeywordSuper5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSuper5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSuper5.js");
String str = cu.getSource();
String completeBehind = "sup";
@@ -8356,7 +8381,7 @@ public void testCompletionKeywordSuper5() throws JavaModelException {
}
public void testCompletionKeywordSuper6() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src2/CompletionKeywordSuper6.java",
+ "/Completion/src2/CompletionKeywordSuper6.js",
"public class CompletionKeywordSuper6 {\n"+
" public CompletionKeywordSuper6() {\n"+
" sup\n"+
@@ -8385,7 +8410,7 @@ public void testCompletionKeywordSuper6() throws JavaModelException {
}
public void testCompletionKeywordSuper7() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSuper7.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSuper7.js");
String str = cu.getSource();
String completeBehind = "sup";
@@ -8400,7 +8425,7 @@ public void testCompletionKeywordSuper7() throws JavaModelException {
}
public void testCompletionKeywordSuper8() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSuper8.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSuper8.js");
String str = cu.getSource();
String completeBehind = "sup";
@@ -8415,7 +8440,7 @@ public void testCompletionKeywordSuper8() throws JavaModelException {
}
public void testCompletionKeywordSuper9() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSuper9.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSuper9.js");
String str = cu.getSource();
String completeBehind = "sup";
@@ -8429,7 +8454,7 @@ public void testCompletionKeywordSuper9() throws JavaModelException {
}
public void testCompletionKeywordSwitch1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSwitch1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSwitch1.js");
String str = cu.getSource();
String completeBehind = "sw";
@@ -8442,7 +8467,7 @@ public void testCompletionKeywordSwitch1() throws JavaModelException {
}
public void testCompletionKeywordSwitch2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSwitch2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSwitch2.js");
String str = cu.getSource();
String completeBehind = "sw";
@@ -8455,7 +8480,7 @@ public void testCompletionKeywordSwitch2() throws JavaModelException {
}
public void testCompletionKeywordSwitch3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSwitch3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSwitch3.js");
String str = cu.getSource();
String completeBehind = "sw";
@@ -8468,7 +8493,7 @@ public void testCompletionKeywordSwitch3() throws JavaModelException {
}
public void testCompletionKeywordSwitch4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSwitch4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSwitch4.js");
String str = cu.getSource();
String completeBehind = "sw";
@@ -8481,7 +8506,7 @@ public void testCompletionKeywordSwitch4() throws JavaModelException {
}
public void testCompletionKeywordSwitch5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSwitch5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSwitch5.js");
String str = cu.getSource();
String completeBehind = "sw";
@@ -8494,7 +8519,7 @@ public void testCompletionKeywordSwitch5() throws JavaModelException {
}
public void testCompletionKeywordSwitch6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSwitch6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSwitch6.js");
String str = cu.getSource();
String completeBehind = "sw";
@@ -8507,7 +8532,7 @@ public void testCompletionKeywordSwitch6() throws JavaModelException {
}
public void testCompletionKeywordSynchronized1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSynchronized1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSynchronized1.js");
String str = cu.getSource();
String completeBehind = "syn";
@@ -8520,7 +8545,7 @@ public void testCompletionKeywordSynchronized1() throws JavaModelException {
}
public void testCompletionKeywordSynchronized10() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSynchronized10.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSynchronized10.js");
String str = cu.getSource();
String completeBehind = "syn";
@@ -8533,7 +8558,7 @@ public void testCompletionKeywordSynchronized10() throws JavaModelException {
}
public void testCompletionKeywordSynchronized11() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSynchronized11.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSynchronized11.js");
String str = cu.getSource();
String completeBehind = "syn";
@@ -8546,7 +8571,7 @@ public void testCompletionKeywordSynchronized11() throws JavaModelException {
}
public void testCompletionKeywordSynchronized12() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSynchronized12.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSynchronized12.js");
String str = cu.getSource();
String completeBehind = "syn";
@@ -8559,7 +8584,7 @@ public void testCompletionKeywordSynchronized12() throws JavaModelException {
}
public void testCompletionKeywordSynchronized2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSynchronized2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSynchronized2.js");
String str = cu.getSource();
String completeBehind = "syn";
@@ -8572,7 +8597,7 @@ public void testCompletionKeywordSynchronized2() throws JavaModelException {
}
public void testCompletionKeywordSynchronized3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSynchronized3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSynchronized3.js");
String str = cu.getSource();
String completeBehind = "syn";
@@ -8585,7 +8610,7 @@ public void testCompletionKeywordSynchronized3() throws JavaModelException {
}
public void testCompletionKeywordSynchronized4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSynchronized4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSynchronized4.js");
String str = cu.getSource();
String completeBehind = "syn";
@@ -8598,7 +8623,7 @@ public void testCompletionKeywordSynchronized4() throws JavaModelException {
}
public void testCompletionKeywordSynchronized5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSynchronized5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSynchronized5.js");
String str = cu.getSource();
String completeBehind = "syn";
@@ -8611,7 +8636,7 @@ public void testCompletionKeywordSynchronized5() throws JavaModelException {
}
public void testCompletionKeywordSynchronized6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSynchronized6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSynchronized6.js");
String str = cu.getSource();
String completeBehind = "syn";
@@ -8624,7 +8649,7 @@ public void testCompletionKeywordSynchronized6() throws JavaModelException {
}
public void testCompletionKeywordSynchronized7() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSynchronized7.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSynchronized7.js");
String str = cu.getSource();
String completeBehind = "syn";
@@ -8637,7 +8662,7 @@ public void testCompletionKeywordSynchronized7() throws JavaModelException {
}
public void testCompletionKeywordSynchronized8() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSynchronized8.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSynchronized8.js");
String str = cu.getSource();
String completeBehind = "syn";
@@ -8650,7 +8675,7 @@ public void testCompletionKeywordSynchronized8() throws JavaModelException {
}
public void testCompletionKeywordSynchronized9() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSynchronized9.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordSynchronized9.js");
String str = cu.getSource();
String completeBehind = "syn";
@@ -8663,7 +8688,7 @@ public void testCompletionKeywordSynchronized9() throws JavaModelException {
}
public void testCompletionKeywordThis1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThis1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThis1.js");
String str = cu.getSource();
String completeBehind = "thi";
@@ -8676,7 +8701,7 @@ public void testCompletionKeywordThis1() throws JavaModelException {
}
public void testCompletionKeywordThis10() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThis10.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThis10.js");
String str = cu.getSource();
String completeBehind = "thi";
@@ -8689,7 +8714,7 @@ public void testCompletionKeywordThis10() throws JavaModelException {
}
public void testCompletionKeywordThis11() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThis11.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThis11.js");
String str = cu.getSource();
String completeBehind = "thi";
@@ -8702,7 +8727,7 @@ public void testCompletionKeywordThis11() throws JavaModelException {
}
public void testCompletionKeywordThis12() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThis12.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThis12.js");
String str = cu.getSource();
String completeBehind = "thi";
@@ -8715,7 +8740,7 @@ public void testCompletionKeywordThis12() throws JavaModelException {
}
public void testCompletionKeywordThis13() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThis13.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThis13.js");
String str = cu.getSource();
String completeBehind = "thi";
@@ -8728,7 +8753,7 @@ public void testCompletionKeywordThis13() throws JavaModelException {
}
public void testCompletionKeywordThis14() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThis14.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThis14.js");
String str = cu.getSource();
String completeBehind = "thi";
@@ -8744,7 +8769,7 @@ public void testCompletionKeywordThis14() throws JavaModelException {
*/
public void testCompletionKeywordThis15() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src2/CompletionKeywordThis15.java",
+ "/Completion/src2/CompletionKeywordThis15.js",
"public class CompletionKeywordThis15 {\n" +
" public class InnerClass {\n" +
" public InnerClass() {\n" +
@@ -8768,7 +8793,7 @@ public void testCompletionKeywordThis15() throws JavaModelException {
}
public void testCompletionKeywordThis2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThis2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThis2.js");
String str = cu.getSource();
String completeBehind = "thi";
@@ -8781,7 +8806,7 @@ public void testCompletionKeywordThis2() throws JavaModelException {
}
public void testCompletionKeywordThis3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThis3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThis3.js");
String str = cu.getSource();
String completeBehind = "thi";
@@ -8794,7 +8819,7 @@ public void testCompletionKeywordThis3() throws JavaModelException {
}
public void testCompletionKeywordThis4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThis4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThis4.js");
String str = cu.getSource();
String completeBehind = "thi";
@@ -8807,7 +8832,7 @@ public void testCompletionKeywordThis4() throws JavaModelException {
}
public void testCompletionKeywordThis5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThis5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThis5.js");
String str = cu.getSource();
String completeBehind = "thi";
@@ -8820,7 +8845,7 @@ public void testCompletionKeywordThis5() throws JavaModelException {
}
public void testCompletionKeywordThis6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThis6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThis6.js");
String str = cu.getSource();
String completeBehind = "thi";
@@ -8833,7 +8858,7 @@ public void testCompletionKeywordThis6() throws JavaModelException {
}
public void testCompletionKeywordThis7() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThis7.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThis7.js");
String str = cu.getSource();
String completeBehind = "thi";
@@ -8846,7 +8871,7 @@ public void testCompletionKeywordThis7() throws JavaModelException {
}
public void testCompletionKeywordThis8() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThis8.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThis8.js");
String str = cu.getSource();
String completeBehind = "thi";
@@ -8859,7 +8884,7 @@ public void testCompletionKeywordThis8() throws JavaModelException {
}
public void testCompletionKeywordThis9() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThis9.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThis9.js");
String str = cu.getSource();
String completeBehind = "thi";
@@ -8872,7 +8897,7 @@ public void testCompletionKeywordThis9() throws JavaModelException {
}
public void testCompletionKeywordThrow1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThrow1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThrow1.js");
String str = cu.getSource();
String completeBehind = "thr";
@@ -8886,7 +8911,7 @@ public void testCompletionKeywordThrow1() throws JavaModelException {
}
public void testCompletionKeywordThrow2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThrow2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThrow2.js");
String str = cu.getSource();
String completeBehind = "thr";
@@ -8899,7 +8924,7 @@ public void testCompletionKeywordThrow2() throws JavaModelException {
}
public void testCompletionKeywordThrow3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThrow3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThrow3.js");
String str = cu.getSource();
String completeBehind = "thr";
@@ -8912,7 +8937,7 @@ public void testCompletionKeywordThrow3() throws JavaModelException {
}
public void testCompletionKeywordThrow4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThrow4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThrow4.js");
String str = cu.getSource();
String completeBehind = "thr";
@@ -8926,7 +8951,7 @@ public void testCompletionKeywordThrow4() throws JavaModelException {
}
public void testCompletionKeywordThrow5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThrow5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThrow5.js");
String str = cu.getSource();
String completeBehind = "thr";
@@ -8939,7 +8964,7 @@ public void testCompletionKeywordThrow5() throws JavaModelException {
}
public void testCompletionKeywordThrow6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThrow6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThrow6.js");
String str = cu.getSource();
String completeBehind = "thr";
@@ -8952,7 +8977,7 @@ public void testCompletionKeywordThrow6() throws JavaModelException {
}
public void testCompletionKeywordThrows1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThrows1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThrows1.js");
String str = cu.getSource();
String completeBehind = "thro";
@@ -8965,7 +8990,7 @@ public void testCompletionKeywordThrows1() throws JavaModelException {
}
public void testCompletionKeywordThrows2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThrows2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThrows2.js");
String str = cu.getSource();
String completeBehind = "thro";
@@ -8978,7 +9003,7 @@ public void testCompletionKeywordThrows2() throws JavaModelException {
}
public void testCompletionKeywordThrows3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThrows3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThrows3.js");
String str = cu.getSource();
String completeBehind = "thro";
@@ -8991,7 +9016,7 @@ public void testCompletionKeywordThrows3() throws JavaModelException {
}
public void testCompletionKeywordThrows4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThrows4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThrows4.js");
String str = cu.getSource();
String completeBehind = "thro";
@@ -9004,7 +9029,7 @@ public void testCompletionKeywordThrows4() throws JavaModelException {
}
public void testCompletionKeywordThrows5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThrows5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThrows5.js");
String str = cu.getSource();
String completeBehind = "thro";
@@ -9017,7 +9042,7 @@ public void testCompletionKeywordThrows5() throws JavaModelException {
}
public void testCompletionKeywordThrows6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThrows6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThrows6.js");
String str = cu.getSource();
String completeBehind = "thro";
@@ -9030,7 +9055,7 @@ public void testCompletionKeywordThrows6() throws JavaModelException {
}
public void testCompletionKeywordThrows7() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThrows7.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThrows7.js");
String str = cu.getSource();
String completeBehind = "thro";
@@ -9043,7 +9068,7 @@ public void testCompletionKeywordThrows7() throws JavaModelException {
}
public void testCompletionKeywordThrows8() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThrows8.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordThrows8.js");
String str = cu.getSource();
String completeBehind = "thro";
@@ -9056,7 +9081,7 @@ public void testCompletionKeywordThrows8() throws JavaModelException {
}
public void testCompletionKeywordTransient1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTransient1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTransient1.js");
String str = cu.getSource();
String completeBehind = "tran";
@@ -9069,7 +9094,7 @@ public void testCompletionKeywordTransient1() throws JavaModelException {
}
public void testCompletionKeywordTransient2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTransient2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTransient2.js");
String str = cu.getSource();
String completeBehind = "tran";
@@ -9082,7 +9107,7 @@ public void testCompletionKeywordTransient2() throws JavaModelException {
}
public void testCompletionKeywordTransient3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTransient3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTransient3.js");
String str = cu.getSource();
String completeBehind = "tran";
@@ -9095,7 +9120,7 @@ public void testCompletionKeywordTransient3() throws JavaModelException {
}
public void testCompletionKeywordTransient4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTransient4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTransient4.js");
String str = cu.getSource();
String completeBehind = "tran";
@@ -9108,7 +9133,7 @@ public void testCompletionKeywordTransient4() throws JavaModelException {
}
public void testCompletionKeywordTransient5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTransient5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTransient5.js");
String str = cu.getSource();
String completeBehind = "tran";
@@ -9121,7 +9146,7 @@ public void testCompletionKeywordTransient5() throws JavaModelException {
}
public void testCompletionKeywordTransient6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTransient6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTransient6.js");
String str = cu.getSource();
String completeBehind = "tran";
@@ -9134,7 +9159,7 @@ public void testCompletionKeywordTransient6() throws JavaModelException {
}
public void testCompletionKeywordTransient7() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTransient7.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTransient7.js");
String str = cu.getSource();
String completeBehind = "tran";
@@ -9147,7 +9172,7 @@ public void testCompletionKeywordTransient7() throws JavaModelException {
}
public void testCompletionKeywordTransient8() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTransient8.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTransient8.js");
String str = cu.getSource();
String completeBehind = "tran";
@@ -9160,7 +9185,7 @@ public void testCompletionKeywordTransient8() throws JavaModelException {
}
public void testCompletionKeywordTrue1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTrue1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTrue1.js");
String str = cu.getSource();
String completeBehind = "tru";
@@ -9173,7 +9198,7 @@ public void testCompletionKeywordTrue1() throws JavaModelException {
}
public void testCompletionKeywordTrue2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTrue2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTrue2.js");
String str = cu.getSource();
String completeBehind = "tru";
@@ -9186,7 +9211,7 @@ public void testCompletionKeywordTrue2() throws JavaModelException {
}
public void testCompletionKeywordTrue3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTrue3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTrue3.js");
String str = cu.getSource();
String completeBehind = "tru";
@@ -9199,7 +9224,7 @@ public void testCompletionKeywordTrue3() throws JavaModelException {
}
public void testCompletionKeywordTrue4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTrue4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTrue4.js");
String str = cu.getSource();
String completeBehind = "tru";
@@ -9213,7 +9238,7 @@ public void testCompletionKeywordTrue4() throws JavaModelException {
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=90615
public void testCompletionKeywordTrue5() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/test/CompletionKeywordTrue5.java",
+ "/Completion/src/test/CompletionKeywordTrue5.js",
"package test;\n" +
"public class CompletionKeywordTrue5 {\n" +
" public void foo() {\n" +
@@ -9236,7 +9261,7 @@ public void testCompletionKeywordTrue5() throws JavaModelException {
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=90615
public void testCompletionKeywordTrue6() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/test/CompletionKeywordTrue6.java",
+ "/Completion/src/test/CompletionKeywordTrue6.js",
"package test;\n" +
"public class CompletionKeywordTrue6 {\n" +
" public void foo() {\n" +
@@ -9293,7 +9318,7 @@ public void testCompletionKeywordTrue6() throws JavaModelException {
}
public void testCompletionKeywordTry1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTry1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTry1.js");
String str = cu.getSource();
String completeBehind = "tr";
@@ -9306,7 +9331,7 @@ public void testCompletionKeywordTry1() throws JavaModelException {
}
public void testCompletionKeywordTry2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTry2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTry2.js");
String str = cu.getSource();
String completeBehind = "tr";
@@ -9319,7 +9344,7 @@ public void testCompletionKeywordTry2() throws JavaModelException {
}
public void testCompletionKeywordTry3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTry3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTry3.js");
String str = cu.getSource();
String completeBehind = "try";
@@ -9332,7 +9357,7 @@ public void testCompletionKeywordTry3() throws JavaModelException {
}
public void testCompletionKeywordTry4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTry4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTry4.js");
String str = cu.getSource();
String completeBehind = "tr";
@@ -9345,7 +9370,7 @@ public void testCompletionKeywordTry4() throws JavaModelException {
}
public void testCompletionKeywordTry5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTry5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTry5.js");
String str = cu.getSource();
String completeBehind = "tr";
@@ -9358,7 +9383,7 @@ public void testCompletionKeywordTry5() throws JavaModelException {
}
public void testCompletionKeywordTry6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTry6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordTry6.js");
String str = cu.getSource();
String completeBehind = "try";
@@ -9371,7 +9396,7 @@ public void testCompletionKeywordTry6() throws JavaModelException {
}
public void testCompletionKeywordVolatile1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordVolatile1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordVolatile1.js");
String str = cu.getSource();
String completeBehind = "vol";
@@ -9384,7 +9409,7 @@ public void testCompletionKeywordVolatile1() throws JavaModelException {
}
public void testCompletionKeywordVolatile2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordVolatile2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordVolatile2.js");
String str = cu.getSource();
String completeBehind = "vol";
@@ -9397,7 +9422,7 @@ public void testCompletionKeywordVolatile2() throws JavaModelException {
}
public void testCompletionKeywordVolatile3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordVolatile3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordVolatile3.js");
String str = cu.getSource();
String completeBehind = "vol";
@@ -9410,7 +9435,7 @@ public void testCompletionKeywordVolatile3() throws JavaModelException {
}
public void testCompletionKeywordVolatile4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordVolatile4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordVolatile4.js");
String str = cu.getSource();
String completeBehind = "vol";
@@ -9423,7 +9448,7 @@ public void testCompletionKeywordVolatile4() throws JavaModelException {
}
public void testCompletionKeywordVolatile5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordVolatile5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordVolatile5.js");
String str = cu.getSource();
String completeBehind = "vol";
@@ -9436,7 +9461,7 @@ public void testCompletionKeywordVolatile5() throws JavaModelException {
}
public void testCompletionKeywordVolatile6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordVolatile6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordVolatile6.js");
String str = cu.getSource();
String completeBehind = "vol";
@@ -9449,7 +9474,7 @@ public void testCompletionKeywordVolatile6() throws JavaModelException {
}
public void testCompletionKeywordVolatile7() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordVolatile7.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordVolatile7.js");
String str = cu.getSource();
String completeBehind = "vol";
@@ -9462,7 +9487,7 @@ public void testCompletionKeywordVolatile7() throws JavaModelException {
}
public void testCompletionKeywordVolatile8() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordVolatile8.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordVolatile8.js");
String str = cu.getSource();
String completeBehind = "vol";
@@ -9475,7 +9500,7 @@ public void testCompletionKeywordVolatile8() throws JavaModelException {
}
public void testCompletionKeywordWhile1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordWhile1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordWhile1.js");
String str = cu.getSource();
String completeBehind = "wh";
@@ -9488,7 +9513,7 @@ public void testCompletionKeywordWhile1() throws JavaModelException {
}
public void testCompletionKeywordWhile10() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordWhile10.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordWhile10.js");
String str = cu.getSource();
String completeBehind = "wh";
@@ -9501,7 +9526,7 @@ public void testCompletionKeywordWhile10() throws JavaModelException {
}
public void testCompletionKeywordWhile2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordWhile2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordWhile2.js");
String str = cu.getSource();
String completeBehind = "wh";
@@ -9514,7 +9539,7 @@ public void testCompletionKeywordWhile2() throws JavaModelException {
}
public void testCompletionKeywordWhile3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordWhile3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordWhile3.js");
String str = cu.getSource();
String completeBehind = "wh";
@@ -9527,7 +9552,7 @@ public void testCompletionKeywordWhile3() throws JavaModelException {
}
public void testCompletionKeywordWhile4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordWhile4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordWhile4.js");
String str = cu.getSource();
String completeBehind = "wh";
@@ -9540,7 +9565,7 @@ public void testCompletionKeywordWhile4() throws JavaModelException {
}
public void testCompletionKeywordWhile5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordWhile5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordWhile5.js");
String str = cu.getSource();
String completeBehind = "wh";
@@ -9553,7 +9578,7 @@ public void testCompletionKeywordWhile5() throws JavaModelException {
}
public void testCompletionKeywordWhile6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordWhile6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordWhile6.js");
String str = cu.getSource();
String completeBehind = "wh";
@@ -9566,7 +9591,7 @@ public void testCompletionKeywordWhile6() throws JavaModelException {
}
public void testCompletionKeywordWhile7() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordWhile7.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordWhile7.js");
String str = cu.getSource();
String completeBehind = "wh";
@@ -9579,7 +9604,7 @@ public void testCompletionKeywordWhile7() throws JavaModelException {
}
public void testCompletionKeywordWhile8() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordWhile8.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordWhile8.js");
String str = cu.getSource();
String completeBehind = "wh";
@@ -9592,7 +9617,7 @@ public void testCompletionKeywordWhile8() throws JavaModelException {
}
public void testCompletionKeywordWhile9() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordWhile9.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src2", "", "CompletionKeywordWhile9.js");
String str = cu.getSource();
String completeBehind = "wh";
@@ -9605,7 +9630,7 @@ public void testCompletionKeywordWhile9() throws JavaModelException {
}
public void testCompletionLocalName() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionLocalName.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionLocalName.js");
String str = cu.getSource();
String completeBehind = "ClassWithComplexName ";
@@ -9623,7 +9648,7 @@ public void testCompletionLocalName() throws JavaModelException {
public void testCompletionLocalType1() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/CompletionLocalType1.java",
+ "/Completion/src/CompletionLocalType1.js",
"public class CompletionLocalType1 {\n" +
" void foo() {\n" +
" class ZZZZ {\n" +
@@ -9648,7 +9673,7 @@ public void testCompletionLocalType1() throws JavaModelException {
*/
public void testCompletionMemberType() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionMemberType.java",
+ "/Completion/src/CompletionMemberType.js",
"public class CompletionMemberType {\n"+
" public class Y {\n"+
" public void foo(){\n"+
@@ -9670,7 +9695,7 @@ public void testCompletionMemberType() throws JavaModelException {
}
public void testCompletionMemberType2() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/test/CompletionMemberType2.java",
+ "/Completion/src/test/CompletionMemberType2.js",
"public class CompletionMemberType2 {\n"+
" public class MemberException extends Exception {\n"+
" }\n"+
@@ -9699,7 +9724,7 @@ public void testCompletionMemberType2() throws JavaModelException {
}
public void testCompletionMemberType3() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/test/CompletionArrayClone.java",
+ "/Completion/src/test/CompletionArrayClone.js",
"public class CompletionMemberType3 {\n"+
" public class MemberException extends Exception {\n"+
" }\n"+
@@ -9721,7 +9746,7 @@ public void testCompletionMemberType3() throws JavaModelException {
}
public void testCompletionMessageSendIsParent1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionMessageSendIsParent1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionMessageSendIsParent1.js");
String str = cu.getSource();
String completeBehind = "zz";
@@ -9738,7 +9763,7 @@ public void testCompletionMessageSendIsParent1() throws JavaModelException {
}
public void testCompletionMessageSendIsParent2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionMessageSendIsParent2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionMessageSendIsParent2.js");
String str = cu.getSource();
String completeBehind = "zz";
@@ -9755,7 +9780,7 @@ public void testCompletionMessageSendIsParent2() throws JavaModelException {
}
public void testCompletionMessageSendIsParent3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionMessageSendIsParent3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionMessageSendIsParent3.js");
String str = cu.getSource();
String completeBehind = "zz";
@@ -9772,7 +9797,7 @@ public void testCompletionMessageSendIsParent3() throws JavaModelException {
}
public void testCompletionMessageSendIsParent4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionMessageSendIsParent4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionMessageSendIsParent4.js");
String str = cu.getSource();
String completeBehind = "zz";
@@ -9789,7 +9814,7 @@ public void testCompletionMessageSendIsParent4() throws JavaModelException {
}
public void testCompletionMessageSendIsParent5() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionMessageSendIsParent5.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionMessageSendIsParent5.js");
String str = cu.getSource();
String completeBehind = "zz";
@@ -9806,7 +9831,7 @@ public void testCompletionMessageSendIsParent5() throws JavaModelException {
}
public void testCompletionMessageSendIsParent6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionMessageSendIsParent6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionMessageSendIsParent6.js");
String str = cu.getSource();
String completeBehind = "zz";
@@ -9824,7 +9849,7 @@ public void testCompletionMessageSendIsParent6() throws JavaModelException {
public void testCompletionMethodDeclaration() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionMethodDeclaration.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionMethodDeclaration.js");
String str = cu.getSource();
String completeBehind = "eq";
@@ -9840,7 +9865,7 @@ public void testCompletionMethodDeclaration() throws JavaModelException {
public void testCompletionMethodDeclaration10() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionMethodDeclaration10.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionMethodDeclaration10.js");
String str = cu.getSource();
String completeBehind = "clon";
@@ -9856,7 +9881,7 @@ public void testCompletionMethodDeclaration10() throws JavaModelException {
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=80063
public void testCompletionMethodDeclaration11() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/test/CompletionMethodDeclaration11.java",
+ "/Completion/src/test/CompletionMethodDeclaration11.js",
"package test;\n" +
"public class CompletionMethodDeclaration11 {\n" +
" private void foo() {\n" +
@@ -9879,7 +9904,7 @@ public void testCompletionMethodDeclaration11() throws JavaModelException {
}
public void testCompletionMethodDeclaration12() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/test/CompletionMethodDeclaration12.java",
+ "/Completion/src/test/CompletionMethodDeclaration12.js",
"package test;\n" +
"public class CompletionMethodDeclaration12 {\n" +
" public void foo() {\n" +
@@ -9908,7 +9933,7 @@ public void testCompletionMethodDeclaration2() throws JavaModelException {
ICompilationUnit superClass = null;
try {
superClass = getWorkingCopy(
- "/Completion/src/CompletionSuperClass.java",
+ "/Completion/src/CompletionSuperClass.js",
"public class CompletionSuperClass{\n" +
" public class Inner {}\n" +
" public int eqFoo(int a,Object b){\n" +
@@ -9917,7 +9942,7 @@ public void testCompletionMethodDeclaration2() throws JavaModelException {
"}");
this.wc = getWorkingCopy(
- "/Completion/src/CompletionMethodDeclaration2.java",
+ "/Completion/src/CompletionMethodDeclaration2.js",
"public class CompletionMethodDeclaration2 extends CompletionSuperClass {\n" +
" eq\n" +
"}");
@@ -9947,7 +9972,7 @@ public void testCompletionMethodDeclaration3() throws JavaModelException {
ICompilationUnit superClass = null;
try {
superClass = getWorkingCopy(
- "/Completion/src/CompletionSuperClass.java",
+ "/Completion/src/CompletionSuperClass.js",
"public class CompletionSuperClass{\n" +
" public class Inner {}\n" +
" public int eqFoo(int a,Object b){\n" +
@@ -9956,7 +9981,7 @@ public void testCompletionMethodDeclaration3() throws JavaModelException {
"}");
this.wc = getWorkingCopy(
- "/Completion/src/CompletionMethodDeclaration3.java",
+ "/Completion/src/CompletionMethodDeclaration3.js",
"public class CompletionMethodDeclaration3 extends CompletionSuperClass {\n" +
" eq\n" +
" \n" +
@@ -9986,13 +10011,13 @@ public void testCompletionMethodDeclaration4() throws JavaModelException {
ICompilationUnit superClass = null;
try {
superClass = getWorkingCopy(
- "/Completion/src/CompletionSuperInterface.java",
+ "/Completion/src/CompletionSuperInterface.js",
"public interface CompletionSuperInterface{\n"+
" public int eqFoo(int a,Object b);\n"+
"}");
this.wc = getWorkingCopy(
- "/Completion/src/CompletionMethodDeclaration4.java",
+ "/Completion/src/CompletionMethodDeclaration4.js",
"public abstract class CompletionMethodDeclaration4 implements CompletionSuperInterface {\n"+
" eq\n"+
"}");
@@ -10019,7 +10044,7 @@ public void testCompletionMethodDeclaration5() throws JavaModelException {
ICompilationUnit superClass = null;
try {
superClass = getWorkingCopy(
- "/Completion/src/CompletionSuperClass.java",
+ "/Completion/src/CompletionSuperClass.js",
"public class CompletionSuperClass{\n" +
" public class Inner {}\n" +
" public int eqFoo(int a,Object b){\n" +
@@ -10028,7 +10053,7 @@ public void testCompletionMethodDeclaration5() throws JavaModelException {
"}");
this.wc = getWorkingCopy(
- "/Completion/src/CompletionMethodDeclaration5.java",
+ "/Completion/src/CompletionMethodDeclaration5.js",
"public class CompletionMethodDeclaration5 {\n" +
" public static void main(String[] args) {\n" +
" new CompletionSuperClass() {\n" +
@@ -10074,7 +10099,7 @@ public void testCompletionMethodDeclaration5() throws JavaModelException {
public void testCompletionMethodDeclaration6() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionMethodDeclaration6.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionMethodDeclaration6.js");
String str = cu.getSource();
String completeBehind = "clon";
@@ -10089,7 +10114,7 @@ public void testCompletionMethodDeclaration6() throws JavaModelException {
public void testCompletionMethodDeclaration7() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionMethodDeclaration7.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionMethodDeclaration7.js");
String str = cu.getSource();
String completeBehind = "clon";
@@ -10105,7 +10130,7 @@ public void testCompletionMethodDeclaration7() throws JavaModelException {
public void testCompletionMethodDeclaration8() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionMethodDeclaration8.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionMethodDeclaration8.js");
String str = cu.getSource();
String completeBehind = "clon";
@@ -10121,7 +10146,7 @@ public void testCompletionMethodDeclaration8() throws JavaModelException {
public void testCompletionMethodDeclaration9() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionMethodDeclaration9.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionMethodDeclaration9.js");
String str = cu.getSource();
String completeBehind = "clon";
@@ -10136,7 +10161,7 @@ public void testCompletionMethodDeclaration9() throws JavaModelException {
}
public void testCompletionMethodThrowsClause() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionMethodThrowsClause.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionMethodThrowsClause.js");
String str = cu.getSource();
String completeBehind = "Ex";
@@ -10149,7 +10174,7 @@ public void testCompletionMethodThrowsClause() throws JavaModelException {
}
public void testCompletionMethodThrowsClause2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionMethodThrowsClause2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionMethodThrowsClause2.js");
String str = cu.getSource();
String completeBehind = "Ex";
@@ -10162,7 +10187,7 @@ public void testCompletionMethodThrowsClause2() throws JavaModelException {
}
public void testCompletionNonEmptyToken1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionNonEmptyToken1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionNonEmptyToken1.js");
String str = cu.getSource();
String completeBehind = "zz";
@@ -10177,7 +10202,7 @@ public void testCompletionNonEmptyToken1() throws JavaModelException {
}
public void testCompletionNonStaticFieldRelevance() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionNonStaticFieldRelevance.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionNonStaticFieldRelevance.js");
String str = cu.getSource();
String completeBehind = "var.Ii";
@@ -10194,7 +10219,7 @@ public void testCompletionNonStaticFieldRelevance() throws JavaModelException {
*/
public void testCompletionNullRequestor() throws JavaModelException {
try {
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFindThisDotField.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionFindThisDotField.js");
cu.codeComplete(5, (CompletionRequestor)null);
} catch (IllegalArgumentException iae) {
return;
@@ -10206,7 +10231,7 @@ public void testCompletionNullRequestor() throws JavaModelException {
*/
public void testCompletionObjectsMethodWithInterfaceReceiver() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionObjectsMethodWithInterfaceReceiver.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionObjectsMethodWithInterfaceReceiver.js");
String str = cu.getSource();
String completeBehind = "hash";
@@ -10238,7 +10263,7 @@ public void testCompletionOnClassFile() throws JavaModelException {
*/
public void testCompletionOnStaticMember1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionOnStaticMember1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionOnStaticMember1.js");
String str = cu.getSource();
String completeBehind = "var";
@@ -10255,7 +10280,7 @@ public void testCompletionOnStaticMember1() throws JavaModelException {
*/
public void testCompletionOnStaticMember2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionOnStaticMember2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionOnStaticMember2.js");
String str = cu.getSource();
String completeBehind = "method";
@@ -10272,7 +10297,7 @@ public void testCompletionOnStaticMember2() throws JavaModelException {
*/
public void testCompletionOutOfBounds() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionOutOfBounds.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionOutOfBounds.js");
try {
cu.codeComplete(cu.getSource().length() + 1, requestor);
} catch (JavaModelException e) {
@@ -10282,7 +10307,7 @@ public void testCompletionOutOfBounds() throws JavaModelException {
}
public void testCompletionPackageAndClass1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "z1.z2.qla0", "Qla3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "z1.z2.qla0", "Qla3.js");
String str = cu.getSource();
String completeBehind = "z1.z2.ql";
@@ -10297,7 +10322,7 @@ public void testCompletionPackageAndClass1() throws JavaModelException {
}
public void testCompletionPackageAndClass2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "z1.z2.qla0", "Wla.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "z1.z2.qla0", "Wla.js");
String str = cu.getSource();
String completeBehind = "z1.z2.qla0.";
@@ -10312,7 +10337,7 @@ public void testCompletionPackageAndClass2() throws JavaModelException {
}
public void testCompletionPrefixFieldName1() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionPrefixFieldName1.java",
+ "/Completion/src/CompletionPrefixFieldName1.js",
"public class CompletionPrefixFieldName1 {\n"+
" int xBar;\n"+
" \n"+
@@ -10339,7 +10364,7 @@ public void testCompletionPrefixFieldName1() throws JavaModelException {
}
public void testCompletionPrefixFieldName2() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionPrefixFieldName2.java",
+ "/Completion/src/CompletionPrefixFieldName2.js",
"public class CompletionPrefixFieldName2 {\n"+
" int xBar;\n"+
" \n"+
@@ -10365,7 +10390,7 @@ public void testCompletionPrefixFieldName2() throws JavaModelException {
}
public void testCompletionPrefixMethodName1() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionPrefixMethodName1.java",
+ "/Completion/src/CompletionPrefixMethodName1.js",
"public class CompletionPrefixMethodName1 {\n"+
" int xBar(){}\n"+
" \n"+
@@ -10392,7 +10417,7 @@ public void testCompletionPrefixMethodName1() throws JavaModelException {
}
public void testCompletionPrefixMethodName2() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionPrefixMethodName2.java",
+ "/Completion/src/CompletionPrefixMethodName2.js",
"public class CompletionPrefixMethodName2 {\n"+
" int xBar(){}\n"+
" \n"+
@@ -10418,7 +10443,7 @@ public void testCompletionPrefixMethodName2() throws JavaModelException {
}
public void testCompletionPrefixMethodName3() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionPrefixMethodName2.java",
+ "/Completion/src/CompletionPrefixMethodName2.js",
"public class CompletionPrefixMethodName3 {\n"+
" int xBar(int a, int b){}\n"+
" \n"+
@@ -10445,7 +10470,7 @@ public void testCompletionPrefixMethodName3() throws JavaModelException {
}
public void testCompletionQualifiedAllocationType1() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionQualifiedAllocationType1.java",
+ "/Completion/src/CompletionQualifiedAllocationType1.js",
"public class CompletionQualifiedAllocationType1 {\n"+
" public class YYY {\n"+
" }\n"+
@@ -10470,7 +10495,7 @@ public void testCompletionQualifiedAllocationType1() throws JavaModelException {
*/
public void testCompletionQualifiedExpectedType() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/test/CompletionQualifiedExpectedType.java",
+ "/Completion/src/test/CompletionQualifiedExpectedType.js",
"import pack1.PX;\n"+
"\n"+
"public class CompletionQualifiedExpectedType {\n"+
@@ -10502,7 +10527,7 @@ public void testCompletionQualifiedExpectedType() throws JavaModelException {
*/
public void testCompletionRepeatedType() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionRepeatedType.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionRepeatedType.js");
String str = cu.getSource();
String completeBehind = "/**/CompletionRepeated";
@@ -10519,7 +10544,7 @@ public void testCompletionRepeatedType() throws JavaModelException {
*/
public void testCompletionReturnInInitializer() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionReturnInInitializer.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionReturnInInitializer.js");
String str = cu.getSource();
String completeBehind = "eq";
@@ -10532,7 +10557,7 @@ public void testCompletionReturnInInitializer() throws JavaModelException {
}
public void testCompletionReturnStatementIsParent1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionReturnStatementIsParent1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionReturnStatementIsParent1.js");
String str = cu.getSource();
String completeBehind = "zz";
@@ -10564,7 +10589,7 @@ public void testCompletionReturnStatementIsParent1() throws JavaModelException {
}
public void testCompletionReturnStatementIsParent2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionReturnStatementIsParent2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionReturnStatementIsParent2.js");
String str = cu.getSource();
String completeBehind = "xx";
@@ -10588,7 +10613,7 @@ public void testCompletionReturnStatementIsParent2() throws JavaModelException {
*/
public void testCompletionSameClass() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionSameClass.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionSameClass.js");
String str = cu.getSource();
String completeBehind = "(CompletionSameClas";
@@ -10601,7 +10626,7 @@ public void testCompletionSameClass() throws JavaModelException {
}
public void testCompletionSameSuperClass() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionSameSuperClass.java",
+ "/Completion/src/CompletionSameSuperClass.js",
"public class CompletionSameSuperClass extends A {\n" +
" class Inner extends A {\n" +
" void foo(int bar){\n" +
@@ -10629,14 +10654,14 @@ public void testCompletionStaticMethod1() throws JavaModelException {
ICompilationUnit aType = null;
try {
aType = getWorkingCopy(
- "/Completion/src/TypeWithAMethodAndAStaticMethod .java",
+ "/Completion/src/TypeWithAMethodAndAStaticMethod .js",
"public class TypeWithAMethodAndAStaticMethod {\n"+
" public static void foo(){}\n"+
" public void foo0(){}\n"+
"}");
this.wc = getWorkingCopy(
- "/Completion/src/CompletionStaticMethod1.java",
+ "/Completion/src/CompletionStaticMethod1.js",
"public class CompletionStaticMethod1 extends TypeWithAMethodAndAStaticMethod {\n"+
" void bar(){\n"+
" new TypeWithAMethodAndAStaticMethod(){\n"+
@@ -10673,14 +10698,14 @@ public void testCompletionStaticMethodDeclaration1() throws JavaModelException {
ICompilationUnit aType = null;
try {
aType = getWorkingCopy(
- "/Completion/src/TypeWithAMethodAndAStaticMethod .java",
+ "/Completion/src/TypeWithAMethodAndAStaticMethod .js",
"public class TypeWithAMethodAndAStaticMethod {\n"+
" public static void foo(){}\n"+
" public void foo0(){}\n"+
"}");
this.wc = getWorkingCopy(
- "/Completion/src/CompletionStaticMethodDeclaration1.java",
+ "/Completion/src/CompletionStaticMethodDeclaration1.js",
"public class CompletionStaticMethodDeclaration1 extends TypeWithAMethodAndAStaticMethod {\n"+
" foo\n"+
"}");
@@ -10706,14 +10731,14 @@ public void testCompletionStaticMethodDeclaration2() throws JavaModelException {
ICompilationUnit aType = null;
try {
aType = getWorkingCopy(
- "/Completion/src/TypeWithAMethodAndAStaticMethod .java",
+ "/Completion/src/TypeWithAMethodAndAStaticMethod .js",
"public class TypeWithAMethodAndAStaticMethod {\n"+
" public static void foo(){}\n"+
" public void foo0(){}\n"+
"}");
this.wc = getWorkingCopy(
- "/Completion/src/CompletionStaticMethodDeclaration2.java",
+ "/Completion/src/CompletionStaticMethodDeclaration2.js",
"public class CompletionStaticMethodDeclaration2 {\n" +
" class Inner1 extends TypeWithAMethodAndAStaticMethod {\n" +
" foo\n" +
@@ -10741,14 +10766,14 @@ public void testCompletionStaticMethodDeclaration3() throws JavaModelException {
ICompilationUnit aType = null;
try {
aType = getWorkingCopy(
- "/Completion/src/TypeWithAMethodAndAStaticMethod .java",
+ "/Completion/src/TypeWithAMethodAndAStaticMethod .js",
"public class TypeWithAMethodAndAStaticMethod {\n"+
" public static void foo(){}\n"+
" public void foo0(){}\n"+
"}");
this.wc = getWorkingCopy(
- "/Completion/src/CompletionStaticMethodDeclaration3.java",
+ "/Completion/src/CompletionStaticMethodDeclaration3.js",
"public class CompletionStaticMethodDeclaration3 {\n" +
" static class Inner1 extends TypeWithAMethodAndAStaticMethod {\n" +
" foo\n" +
@@ -10776,14 +10801,14 @@ public void testCompletionStaticMethodDeclaration4() throws JavaModelException {
ICompilationUnit aType = null;
try {
aType = getWorkingCopy(
- "/Completion/src/TypeWithAMethodAndAStaticMethod .java",
+ "/Completion/src/TypeWithAMethodAndAStaticMethod .js",
"public class TypeWithAMethodAndAStaticMethod {\n"+
" public static void foo(){}\n"+
" public void foo0(){}\n"+
"}");
this.wc = getWorkingCopy(
- "/Completion/src/CompletionStaticMethodDeclaration4.java",
+ "/Completion/src/CompletionStaticMethodDeclaration4.js",
"public class CompletionStaticMethodDeclaration4 {\n" +
" void bar() {\n" +
" class Local1 extends TypeWithAMethodAndAStaticMethod {\n" +
@@ -10813,14 +10838,14 @@ public void testCompletionStaticMethodDeclaration5() throws JavaModelException {
ICompilationUnit aType = null;
try {
aType = getWorkingCopy(
- "/Completion/src/TypeWithAMethodAndAStaticMethod .java",
+ "/Completion/src/TypeWithAMethodAndAStaticMethod .js",
"public class TypeWithAMethodAndAStaticMethod {\n"+
" public static void foo(){}\n"+
" public void foo0(){}\n"+
"}");
this.wc = getWorkingCopy(
- "/Completion/src/CompletionStaticMethodDeclaration5.java",
+ "/Completion/src/CompletionStaticMethodDeclaration5.js",
"public class CompletionStaticMethodDeclaration5 {\n"+
" void bar() {\n"+
" static class Local1 extends TypeWithAMethodAndAStaticMethod {\n"+
@@ -10850,14 +10875,14 @@ public void testCompletionStaticMethodDeclaration6() throws JavaModelException {
ICompilationUnit aType = null;
try {
aType = getWorkingCopy(
- "/Completion/src/TypeWithAMethodAndAStaticMethod .java",
+ "/Completion/src/TypeWithAMethodAndAStaticMethod .js",
"public class TypeWithAMethodAndAStaticMethod {\n"+
" public static void foo(){}\n"+
" public void foo0(){}\n"+
"}");
this.wc = getWorkingCopy(
- "/Completion/src/CompletionStaticMethodDeclaration6.java",
+ "/Completion/src/CompletionStaticMethodDeclaration6.js",
"public class CompletionStaticMethodDeclaration6 {\n"+
" void bar() {\n"+
" new TypeWithAMethodAndAStaticMethod() {\n"+
@@ -10887,7 +10912,7 @@ public void testCompletionSuperType() throws JavaModelException {
ICompilationUnit superClass = null;
try {
superClass = getWorkingCopy(
- "/Completion/src/CompletionSuperClass.java",
+ "/Completion/src/CompletionSuperClass.js",
"public class CompletionSuperClass{\n" +
" public class Inner {}\n" +
" public int eqFoo(int a,Object b){\n" +
@@ -10896,7 +10921,7 @@ public void testCompletionSuperType() throws JavaModelException {
"}");
this.wc = getWorkingCopy(
- "/Completion/src/CompletionSuperType.java",
+ "/Completion/src/CompletionSuperType.js",
"public class CompletionSuperType extends CompletionSuperClass.");
@@ -10922,7 +10947,7 @@ public void testCompletionSuperType2() throws JavaModelException {
ICompilationUnit superInterface2 = null;
try {
superClass = getWorkingCopy(
- "/Completion/src/CompletionSuperClass.java",
+ "/Completion/src/CompletionSuperClass.js",
"public class CompletionSuperClass{\n" +
" public class Inner {}\n" +
" public int eqFoo(int a,Object b){\n" +
@@ -10931,27 +10956,27 @@ public void testCompletionSuperType2() throws JavaModelException {
"}");
superClass2 = getWorkingCopy(
- "/Completion/src/CompletionSuperClass2.java",
+ "/Completion/src/CompletionSuperClass2.js",
"public class CompletionSuperClass2 {\n" +
" public class InnerClass {}\n" +
" public interface InnerInterface {}\n" +
"}");
superInterface = getWorkingCopy(
- "/Completion/src/CompletionSuperInterface.java",
+ "/Completion/src/CompletionSuperInterface.js",
"public interface CompletionSuperInterface{\n" +
" public int eqFoo(int a,Object b);\n" +
"}");
superInterface2 = getWorkingCopy(
- "/Completion/src/CompletionSuperInterface2.java",
+ "/Completion/src/CompletionSuperInterface2.js",
"public interface CompletionSuperInterface2 {\n" +
" public class InnerClass {}\n" +
" public interface InnerInterface {}\n" +
"}");
this.wc = getWorkingCopy(
- "/Completion/src/CompletionSuperType2.java",
+ "/Completion/src/CompletionSuperType2.js",
"public class CompletionSuperType2 extends CompletionSuper");
@@ -10987,7 +11012,7 @@ public void testCompletionSuperType3() throws JavaModelException {
ICompilationUnit superInterface2 = null;
try {
superClass = getWorkingCopy(
- "/Completion/src/CompletionSuperClass.java",
+ "/Completion/src/CompletionSuperClass.js",
"public class CompletionSuperClass{\n" +
" public class Inner {}\n" +
" public int eqFoo(int a,Object b){\n" +
@@ -10996,27 +11021,27 @@ public void testCompletionSuperType3() throws JavaModelException {
"}");
superClass2 = getWorkingCopy(
- "/Completion/src/CompletionSuperClass2.java",
+ "/Completion/src/CompletionSuperClass2.js",
"public class CompletionSuperClass2 {\n" +
" public class InnerClass {}\n" +
" public interface InnerInterface {}\n" +
"}");
superInterface = getWorkingCopy(
- "/Completion/src/CompletionSuperInterface.java",
+ "/Completion/src/CompletionSuperInterface.js",
"public interface CompletionSuperInterface{\n" +
" public int eqFoo(int a,Object b);\n" +
"}");
superInterface2 = getWorkingCopy(
- "/Completion/src/CompletionSuperInterface2.java",
+ "/Completion/src/CompletionSuperInterface2.js",
"public interface CompletionSuperInterface2 {\n" +
" public class InnerClass {}\n" +
" public interface InnerInterface {}\n" +
"}");
this.wc = getWorkingCopy(
- "/Completion/src/CompletionSuperType3.java",
+ "/Completion/src/CompletionSuperType3.js",
"public class CompletionSuperType3 implements CompletionSuper");
@@ -11049,14 +11074,14 @@ public void testCompletionSuperType4() throws JavaModelException {
ICompilationUnit superClass2 = null;
try {
superClass2 = getWorkingCopy(
- "/Completion/src/CompletionSuperClass2.java",
+ "/Completion/src/CompletionSuperClass2.js",
"public class CompletionSuperClass2 {\n" +
" public class InnerClass {}\n" +
" public interface InnerInterface {}\n" +
"}");
this.wc = getWorkingCopy(
- "/Completion/src/CompletionSuperType4.java",
+ "/Completion/src/CompletionSuperType4.js",
"public class CompletionSuperType4 extends CompletionSuperClass2.Inner");
@@ -11080,14 +11105,14 @@ public void testCompletionSuperType5() throws JavaModelException {
ICompilationUnit superInterface2 = null;
try {
superInterface2 = getWorkingCopy(
- "/Completion/src/CompletionSuperInterface2.java",
+ "/Completion/src/CompletionSuperInterface2.js",
"public interface CompletionSuperInterface2 {\n" +
" public class InnerClass {}\n" +
" public interface InnerInterface {}\n" +
"}");
this.wc = getWorkingCopy(
- "/Completion/src/CompletionSuperType5.java",
+ "/Completion/src/CompletionSuperType5.js",
"public class CompletionSuperType5 implements CompletionSuperInterface2.Inner");
@@ -11114,7 +11139,7 @@ public void testCompletionSuperType6() throws JavaModelException {
ICompilationUnit superInterface2 = null;
try {
superClass = getWorkingCopy(
- "/Completion/src/CompletionSuperClass.java",
+ "/Completion/src/CompletionSuperClass.js",
"public class CompletionSuperClass{\n" +
" public class Inner {}\n" +
" public int eqFoo(int a,Object b){\n" +
@@ -11123,27 +11148,27 @@ public void testCompletionSuperType6() throws JavaModelException {
"}");
superClass2 = getWorkingCopy(
- "/Completion/src/CompletionSuperClass2.java",
+ "/Completion/src/CompletionSuperClass2.js",
"public class CompletionSuperClass2 {\n" +
" public class InnerClass {}\n" +
" public interface InnerInterface {}\n" +
"}");
superInterface = getWorkingCopy(
- "/Completion/src/CompletionSuperInterface.java",
+ "/Completion/src/CompletionSuperInterface.js",
"public interface CompletionSuperInterface{\n" +
" public int eqFoo(int a,Object b);\n" +
"}");
superInterface2 = getWorkingCopy(
- "/Completion/src/CompletionSuperInterface2.java",
+ "/Completion/src/CompletionSuperInterface2.js",
"public interface CompletionSuperInterface2 {\n" +
" public class InnerClass {}\n" +
" public interface InnerInterface {}\n" +
"}");
this.wc = getWorkingCopy(
- "/Completion/src/CompletionSuperType6.java",
+ "/Completion/src/CompletionSuperType6.js",
"public interface CompletionSuperType6 extends CompletionSuper");
@@ -11176,14 +11201,14 @@ public void testCompletionSuperType7() throws JavaModelException {
ICompilationUnit superClass2 = null;
try {
superClass2 = getWorkingCopy(
- "/Completion/src/CompletionSuperClass2.java",
+ "/Completion/src/CompletionSuperClass2.js",
"public class CompletionSuperClass2 {\n" +
" public class InnerClass {}\n" +
" public interface InnerInterface {}\n" +
"}");
this.wc = getWorkingCopy(
- "/Completion/src/CompletionSuperType7.java",
+ "/Completion/src/CompletionSuperType7.js",
"public interface CompletionSuperType7 extends CompletionSuperClass2.Inner");
@@ -11207,14 +11232,14 @@ public void testCompletionSuperType8() throws JavaModelException {
ICompilationUnit superInterface2 = null;
try {
superInterface2 = getWorkingCopy(
- "/Completion/src/CompletionSuperInterface2.java",
+ "/Completion/src/CompletionSuperInterface2.js",
"public interface CompletionSuperInterface2 {\n" +
" public class InnerClass {}\n" +
" public interface InnerInterface {}\n" +
"}");
this.wc = getWorkingCopy(
- "/Completion/src/CompletionSuperType8.java",
+ "/Completion/src/CompletionSuperType8.js",
"public interface CompletionSuperType8 extends CompletionSuperInterface2.Inner");
@@ -11236,7 +11261,7 @@ public void testCompletionSuperType8() throws JavaModelException {
}
public void testCompletionThrowStatement() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionThrowStatement.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionThrowStatement.js");
String str = cu.getSource();
String completeBehind = "Ex";
@@ -11249,7 +11274,7 @@ public void testCompletionThrowStatement() throws JavaModelException {
}
public void testCompletionToplevelType1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "p3", "CompletionToplevelType1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "p3", "CompletionToplevelType1.js");
String str = cu.getSource();
String completeBehind = "CompletionToplevelType1";
@@ -11262,7 +11287,7 @@ public void testCompletionToplevelType1() throws JavaModelException {
}
public void testCompletionType1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionType1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionType1.js");
String str = cu.getSource();
String completeBehind = "CT1";
@@ -11276,7 +11301,7 @@ public void testCompletionType1() throws JavaModelException {
}
public void testCompletionUnaryOperator1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionUnaryOperator1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionUnaryOperator1.js");
String str = cu.getSource();
String completeBehind = "var";
@@ -11291,7 +11316,7 @@ public void testCompletionUnaryOperator1() throws JavaModelException {
}
public void testCompletionUnaryOperator2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionUnaryOperator2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionUnaryOperator2.js");
String str = cu.getSource();
String completeBehind = "var";
@@ -11309,7 +11334,7 @@ public void testCompletionUnaryOperator2() throws JavaModelException {
*/
public void testCompletionUnresolvedEnclosingType() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionUnresolvedEnclosingType.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionUnresolvedEnclosingType.js");
String str = cu.getSource();
String completeBehind = "new ZZZ(";
@@ -11321,7 +11346,7 @@ public void testCompletionUnresolvedEnclosingType() throws JavaModelException {
}
public void testCompletionUnresolvedFieldType() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionUnresolvedFieldType.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionUnresolvedFieldType.js");
String str = cu.getSource();
String completeBehind = "bar";
@@ -11334,7 +11359,7 @@ public void testCompletionUnresolvedFieldType() throws JavaModelException {
}
public void testCompletionUnresolvedParameterType() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionUnresolvedParameterType.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionUnresolvedParameterType.js");
String str = cu.getSource();
String completeBehind = "bar";
@@ -11347,7 +11372,7 @@ public void testCompletionUnresolvedParameterType() throws JavaModelException {
}
public void testCompletionUnresolvedReturnType() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionUnresolvedReturnType.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionUnresolvedReturnType.js");
String str = cu.getSource();
String completeBehind = "bar";
@@ -11360,7 +11385,7 @@ public void testCompletionUnresolvedReturnType() throws JavaModelException {
}
public void testCompletionVariableInitializerInInitializer1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVariableInitializerInInitializer1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVariableInitializerInInitializer1.js");
String str = cu.getSource();
String completeBehind = "zz";
@@ -11377,7 +11402,7 @@ public void testCompletionVariableInitializerInInitializer1() throws JavaModelEx
}
public void testCompletionVariableInitializerInInitializer2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVariableInitializerInInitializer2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVariableInitializerInInitializer2.js");
String str = cu.getSource();
String completeBehind = "zz";
@@ -11394,7 +11419,7 @@ public void testCompletionVariableInitializerInInitializer2() throws JavaModelEx
}
public void testCompletionVariableInitializerInInitializer3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVariableInitializerInInitializer3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVariableInitializerInInitializer3.js");
String str = cu.getSource();
String completeBehind = "Objec";
@@ -11407,7 +11432,7 @@ public void testCompletionVariableInitializerInInitializer3() throws JavaModelEx
}
public void testCompletionVariableInitializerInInitializer4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVariableInitializerInInitializer4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVariableInitializerInInitializer4.js");
String str = cu.getSource();
String completeBehind = "Objec";
@@ -11420,7 +11445,7 @@ public void testCompletionVariableInitializerInInitializer4() throws JavaModelEx
}
public void testCompletionVariableInitializerInMethod1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVariableInitializerInMethod1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVariableInitializerInMethod1.js");
String str = cu.getSource();
String completeBehind = "zz";
@@ -11437,7 +11462,7 @@ public void testCompletionVariableInitializerInMethod1() throws JavaModelExcepti
}
public void testCompletionVariableInitializerInMethod2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVariableInitializerInMethod2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVariableInitializerInMethod2.js");
String str = cu.getSource();
String completeBehind = "zz";
@@ -11454,7 +11479,7 @@ public void testCompletionVariableInitializerInMethod2() throws JavaModelExcepti
}
public void testCompletionVariableInitializerInMethod3() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVariableInitializerInMethod3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVariableInitializerInMethod3.js");
String str = cu.getSource();
String completeBehind = "Objec";
@@ -11467,7 +11492,7 @@ public void testCompletionVariableInitializerInMethod3() throws JavaModelExcepti
}
public void testCompletionVariableInitializerInMethod4() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVariableInitializerInMethod4.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVariableInitializerInMethod4.js");
String str = cu.getSource();
String completeBehind = "Objec";
@@ -11483,7 +11508,7 @@ public void testCompletionVariableInitializerInMethod4() throws JavaModelExcepti
*/
public void testCompletionVariableName1() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVariableName1.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVariableName1.js");
String str = cu.getSource();
String completeBehind = "TEST_FOO_MyClass ";
@@ -11506,7 +11531,7 @@ public void testCompletionVariableName10() throws JavaModelException {
try {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionVariableName10.java",
+ "/Completion/src/CompletionVariableName10.js",
"class FooBar {\n"+
"}\n"+
"public class CompletionVariableName10 {\n"+
@@ -11545,7 +11570,7 @@ public void testCompletionVariableName11() throws JavaModelException {
try {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionVariableName11.java",
+ "/Completion/src/CompletionVariableName11.js",
"class FooBar {\n"+
"}\n"+
"public class CompletionVariableName11 {\n"+
@@ -11584,7 +11609,7 @@ public void testCompletionVariableName12() throws JavaModelException {
try {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionVariableName12.java",
+ "/Completion/src/CompletionVariableName12.js",
"class FooBar {\n"+
"}\n"+
"public class CompletionVariableName12 {\n"+
@@ -11623,7 +11648,7 @@ public void testCompletionVariableName13() throws JavaModelException {
try {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionVariableName13.java",
+ "/Completion/src/CompletionVariableName13.js",
"class FooBar {\n"+
"}\n"+
"public class CompletionVariableName13 {\n"+
@@ -11662,7 +11687,7 @@ public void testCompletionVariableName14() throws JavaModelException {
try {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionVariableName14.java",
+ "/Completion/src/CompletionVariableName14.js",
"class FooBar {\n"+
"}\n"+
"public class CompletionVariableName14 {\n"+
@@ -11702,7 +11727,7 @@ public void testCompletionVariableName15() throws JavaModelException {
try {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionVariableName15.java",
+ "/Completion/src/CompletionVariableName15.js",
"class FooBar {\n"+
"}\n"+
"public class CompletionVariableName15 {\n"+
@@ -11734,7 +11759,7 @@ public void testCompletionVariableName15() throws JavaModelException {
public void testCompletionVariableName16() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void foo(){\n"+
@@ -11758,7 +11783,7 @@ public void testCompletionVariableName16() throws JavaModelException {
public void testCompletionVariableName17() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void foo(){\n"+
@@ -11786,7 +11811,7 @@ public void testCompletionVariableName17() throws JavaModelException {
public void testCompletionVariableName18() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void foo(){\n"+
@@ -11810,7 +11835,7 @@ public void testCompletionVariableName18() throws JavaModelException {
public void testCompletionVariableName19() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void foo(){\n"+
@@ -11834,7 +11859,7 @@ public void testCompletionVariableName19() throws JavaModelException {
*/
public void testCompletionVariableName2() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVariableName2.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVariableName2.js");
String str = cu.getSource();
String completeBehind = "Test_Bar_MyClass ";
@@ -11852,7 +11877,7 @@ public void testCompletionVariableName2() throws JavaModelException {
public void testCompletionVariableName20() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void foo(){\n"+
@@ -11886,7 +11911,7 @@ public void testCompletionVariableName20() throws JavaModelException {
public void testCompletionVariableName21() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void foo(){\n"+
@@ -11913,7 +11938,7 @@ public void testCompletionVariableName21() throws JavaModelException {
public void testCompletionVariableName22() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void foo(){\n"+
@@ -11943,7 +11968,7 @@ public void testCompletionVariableName22() throws JavaModelException {
public void testCompletionVariableName23() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void foo(){\n"+
@@ -11968,7 +11993,7 @@ public void testCompletionVariableName23() throws JavaModelException {
public void testCompletionVariableName24() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void foo(){\n"+
@@ -11993,7 +12018,7 @@ public void testCompletionVariableName24() throws JavaModelException {
public void testCompletionVariableName25() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void foo(){\n"+
@@ -12021,7 +12046,7 @@ public void testCompletionVariableName25() throws JavaModelException {
public void testCompletionVariableName26() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void foo(){\n"+
@@ -12050,7 +12075,7 @@ public void testCompletionVariableName26() throws JavaModelException {
public void testCompletionVariableName27() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void foo(){\n"+
@@ -12087,7 +12112,7 @@ public void testCompletionVariableName27() throws JavaModelException {
public void testCompletionVariableName28() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void foo(){\n"+
@@ -12113,7 +12138,7 @@ public void testCompletionVariableName28() throws JavaModelException {
public void testCompletionVariableName29() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void foo(){\n"+
@@ -12161,7 +12186,7 @@ public void testCompletionVariableName3() throws JavaModelException {
try {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVariableName3.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVariableName3.js");
String str = cu.getSource();
String completeBehind = "OneName ";
@@ -12198,7 +12223,7 @@ public void testCompletionVariableName3() throws JavaModelException {
public void testCompletionVariableName30() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" public Test(){\n"+
@@ -12222,7 +12247,7 @@ public void testCompletionVariableName30() throws JavaModelException {
public void testCompletionVariableName31() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" {\n"+
@@ -12246,7 +12271,7 @@ public void testCompletionVariableName31() throws JavaModelException {
public void testCompletionVariableName32() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void bar(Object ) {\n"+
@@ -12269,7 +12294,7 @@ public void testCompletionVariableName32() throws JavaModelException {
public void testCompletionVariableName33() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void bar() {\n"+
@@ -12295,7 +12320,7 @@ public void testCompletionVariableName33() throws JavaModelException {
public void testCompletionVariableName34() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" int vDefined;\n"+
@@ -12321,7 +12346,7 @@ public void testCompletionVariableName34() throws JavaModelException {
public void testCompletionVariableName35() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void bar() {\n"+
@@ -12331,7 +12356,7 @@ public void testCompletionVariableName35() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/Test2.java",
+ "/Completion/src/test/Test2.js",
"package test;\n"+
"public class Test2 {\n"+
"}");
@@ -12348,7 +12373,7 @@ public void testCompletionVariableName35() throws JavaModelException {
}
public void testCompletionVariableName4() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionVariableName4.java",
+ "/Completion/src/CompletionVariableName4.js",
"class FooBar {\n"+
"}\n"+
"public class CompletionVariableName4 {\n"+
@@ -12371,7 +12396,7 @@ public void testCompletionVariableName4() throws JavaModelException {
}
public void testCompletionVariableName5() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionVariableName5.java",
+ "/Completion/src/CompletionVariableName5.js",
"class FooBar {\n"+
"}\n"+
"public class CompletionVariableName5 {\n"+
@@ -12394,7 +12419,7 @@ public void testCompletionVariableName5() throws JavaModelException {
}
public void testCompletionVariableName6() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionVariableName6.java",
+ "/Completion/src/CompletionVariableName6.js",
"class FooBar {\n"+
"}\n"+
"public class CompletionVariableName6 {\n"+
@@ -12417,7 +12442,7 @@ public void testCompletionVariableName6() throws JavaModelException {
}
public void testCompletionVariableName7() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionVariableName7.java",
+ "/Completion/src/CompletionVariableName7.js",
"class FooBar {\n"+
"}\n"+
"public class CompletionVariableName7 {\n"+
@@ -12450,7 +12475,7 @@ public void testCompletionVariableName8() throws JavaModelException {
try {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionVariableName8.java",
+ "/Completion/src/CompletionVariableName8.js",
"class FooBar {\n"+
"}\n"+
"public class CompletionVariableName8 {\n"+
@@ -12489,7 +12514,7 @@ public void testCompletionVariableName9() throws JavaModelException {
try {
this.wc = getWorkingCopy(
- "/Completion/src/CompletionVariableName9.java",
+ "/Completion/src/CompletionVariableName9.js",
"class FooBar {\n"+
"}\n"+
"public class CompletionVariableName9 {\n"+
@@ -12520,7 +12545,7 @@ public void testCompletionVariableName9() throws JavaModelException {
public void testCompletionVariableNameOfArray1() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/CompletionVariableNameOfArray1.java",
+ "/Completion/src/CompletionVariableNameOfArray1.js",
"public class CompletionVariableNameOfArray1 {\n"+
" Object[] ob\n"+
"}\n");
@@ -12538,7 +12563,7 @@ public void testCompletionVariableNameOfArray1() throws JavaModelException {
public void testCompletionVariableNameOfArray2() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/CompletionVariableNameOfArray2.java",
+ "/Completion/src/CompletionVariableNameOfArray2.js",
"public class CompletionVariableNameOfArray2 {\n"+
" Class[] cl\n"+
"}\n");
@@ -12556,7 +12581,7 @@ public void testCompletionVariableNameOfArray2() throws JavaModelException {
public void testCompletionVariableNameOfArray3() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/CompletionVariableNameOfArray3.java",
+ "/Completion/src/CompletionVariableNameOfArray3.js",
"public class CompletionVariableNameOfArray3 {\n"+
" Object[][] ob\n"+
"}\n");
@@ -12574,7 +12599,7 @@ public void testCompletionVariableNameOfArray3() throws JavaModelException {
public void testCompletionVariableNameOfArray4() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/CompletionVariableNameOfArray4.java",
+ "/Completion/src/CompletionVariableNameOfArray4.js",
"public class CompletionVariableNameOfArray4 {\n"+
" Objectz[] ob\n"+
"}\n");
@@ -12591,7 +12616,7 @@ public void testCompletionVariableNameOfArray4() throws JavaModelException {
}
public void testCompletionVariableNameUnresolvedType() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVariableNameUnresolvedType.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVariableNameUnresolvedType.js");
String str = cu.getSource();
String completeBehind = "ob";
@@ -12611,7 +12636,7 @@ public void testCompletionVisibilityCheckDisabled() throws JavaModelException {
JavaCore.setOptions(options);
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVisibilityCheck.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVisibilityCheck.js");
String str = cu.getSource();
String completeBehind = "x.p";
@@ -12635,7 +12660,7 @@ public void testCompletionVisibilityCheckEnabled() throws JavaModelException {
JavaCore.setOptions(options);
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVisibilityCheck.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVisibilityCheck.js");
String str = cu.getSource();
String completeBehind = "x.p";
@@ -12655,7 +12680,7 @@ public void testCompletionVisibilityCheckEnabled() throws JavaModelException {
*/
public void testCompletionVoidMethod() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVoidMethod.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionVoidMethod.js");
String str = cu.getSource();
String completeBehind = "foo";
@@ -12670,7 +12695,7 @@ public void testCompletionVoidMethod() throws JavaModelException {
}
public void testCompletionWithBinaryFolder() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionWithBinaryFolder.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionWithBinaryFolder.js");
String str = cu.getSource();
String completeBehind = "My";
@@ -12688,7 +12713,7 @@ public void testCompletionWithProblem1() throws JavaModelException {
ICompilationUnit aType = null;
try {
aType = getWorkingCopy(
- "/Completion/src/test/AType.java",
+ "/Completion/src/test/AType.js",
"package test;\n" +
"public class AType{\n"+
" void foo(Unknown var) {\n"+
@@ -12696,7 +12721,7 @@ public void testCompletionWithProblem1() throws JavaModelException {
"}");
this.wc = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n" +
"public class Test{\n"+
" void foo() {\n"+
@@ -12738,20 +12763,20 @@ public void testDeprecationCheck1() throws JavaModelException {
try {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/deprecation/Test.java",
+ "/Completion/src/deprecation/Test.js",
"package deprecation;"+
"public class Test {\n"+
" ZZZTy\n"+
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/deprecation/ZZZType1.java",
+ "/Completion/src/deprecation/ZZZType1.js",
"package deprecation;"+
"public class ZZZType1 {\n"+
"}");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/deprecation/ZZZType2.java",
+ "/Completion/src/deprecation/ZZZType2.js",
"package deprecation;"+
"/** @deprecated */\n"+
"public class ZZZType2 {\n"+
@@ -12785,7 +12810,7 @@ public void testDeprecationCheck10() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/deprecation/Test.java",
+ "/Completion/src/deprecation/Test.js",
"package deprecation;"+
"public class Test {\n"+
" public void bar1(){}\n"+
@@ -12823,7 +12848,7 @@ public void testDeprecationCheck11() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/deprecation/Test.java",
+ "/Completion/src/deprecation/Test.js",
"package deprecation;"+
"public class Test {\n"+
" public int bar1;\n"+
@@ -12861,7 +12886,7 @@ public void testDeprecationCheck12() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/deprecation/Test.java",
+ "/Completion/src/deprecation/Test.js",
"package deprecation;"+
"public class Test {\n"+
" public int bar1;\n"+
@@ -12899,7 +12924,7 @@ public void testDeprecationCheck13() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/deprecation/Test.java",
+ "/Completion/src/deprecation/Test.js",
"package deprecation;"+
"public class Test {\n"+
" class Inner1 {}\n"+
@@ -12937,7 +12962,7 @@ public void testDeprecationCheck14() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/deprecation/Test.java",
+ "/Completion/src/deprecation/Test.js",
"package deprecation;"+
"public class Test {\n"+
" class Inner1 {}\n"+
@@ -12975,7 +13000,7 @@ public void testDeprecationCheck15() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/deprecation/Test.java",
+ "/Completion/src/deprecation/Test.js",
"package deprecation;"+
"public class Test {\n"+
" void foo() {"+
@@ -12984,7 +13009,7 @@ public void testDeprecationCheck15() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/deprecation/ZZZType1.java",
+ "/Completion/src/deprecation/ZZZType1.js",
"package deprecation;"+
"/** @deprecated */\n"+
"public class ZZZType1 {\n"+
@@ -13018,7 +13043,7 @@ public void testDeprecationCheck16() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/deprecation/Test.java",
+ "/Completion/src/deprecation/Test.js",
"package deprecation;"+
"/** @deprecated */\n"+
"public class ZZZType1 {\n"+
@@ -13055,7 +13080,7 @@ public void testDeprecationCheck17() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/deprecation/Test.java",
+ "/Completion/src/deprecation/Test.js",
"package deprecation;"+
"public class Test {\n"+
" Bug127628Ty\n"+
@@ -13089,20 +13114,20 @@ public void testDeprecationCheck2() throws JavaModelException {
try {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/deprecation/Test.java",
+ "/Completion/src/deprecation/Test.js",
"package deprecation;"+
"public class Test {\n"+
" ZZZTy\n"+
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/deprecation/ZZZType1.java",
+ "/Completion/src/deprecation/ZZZType1.js",
"package deprecation;"+
"public class ZZZType1 {\n"+
"}");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/deprecation/ZZZType2.java",
+ "/Completion/src/deprecation/ZZZType2.js",
"package deprecation;"+
"/** @deprecated */\n"+
"public class ZZZType2 {\n"+
@@ -13135,7 +13160,7 @@ public void testDeprecationCheck3() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/deprecation/Test.java",
+ "/Completion/src/deprecation/Test.js",
"package deprecation;"+
"public class Test {\n"+
" void foo() {"+
@@ -13144,7 +13169,7 @@ public void testDeprecationCheck3() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/deprecation/ZZZType1.java",
+ "/Completion/src/deprecation/ZZZType1.js",
"package deprecation;"+
"public class ZZZType1 {\n"+
" public static void foo1(){}\n"+
@@ -13179,7 +13204,7 @@ public void testDeprecationCheck4() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/deprecation/Test.java",
+ "/Completion/src/deprecation/Test.js",
"package deprecation;"+
"public class Test {\n"+
" void foo() {"+
@@ -13188,7 +13213,7 @@ public void testDeprecationCheck4() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/deprecation/ZZZType1.java",
+ "/Completion/src/deprecation/ZZZType1.js",
"package deprecation;"+
"public class ZZZType1 {\n"+
" public static void foo1(){}\n"+
@@ -13222,14 +13247,14 @@ public void testDeprecationCheck5() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/deprecation/Test.java",
+ "/Completion/src/deprecation/Test.js",
"package deprecation;"+
"public class Test {\n"+
" ZZZType1.Inn\n"+
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/deprecation/ZZZType1.java",
+ "/Completion/src/deprecation/ZZZType1.js",
"package deprecation;"+
"public class ZZZType1 {\n"+
" public class Inner1 {}\n"+
@@ -13264,14 +13289,14 @@ public void testDeprecationCheck6() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/deprecation/Test.java",
+ "/Completion/src/deprecation/Test.js",
"package deprecation;"+
"public class Test {\n"+
" ZZZType1.Inn\n"+
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/deprecation/ZZZType1.java",
+ "/Completion/src/deprecation/ZZZType1.js",
"package deprecation;"+
"public class ZZZType1 {\n"+
" public class Inner1 {}\n"+
@@ -13305,7 +13330,7 @@ public void testDeprecationCheck7() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/deprecation/Test.java",
+ "/Completion/src/deprecation/Test.js",
"package deprecation;"+
"public class Test {\n"+
" void foo() {"+
@@ -13314,7 +13339,7 @@ public void testDeprecationCheck7() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/deprecation/ZZZType1.java",
+ "/Completion/src/deprecation/ZZZType1.js",
"package deprecation;"+
"public class ZZZType1 {\n"+
" public static int foo1;\n"+
@@ -13349,7 +13374,7 @@ public void testDeprecationCheck8() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/deprecation/Test.java",
+ "/Completion/src/deprecation/Test.js",
"package deprecation;"+
"public class Test {\n"+
" void foo() {"+
@@ -13358,7 +13383,7 @@ public void testDeprecationCheck8() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/deprecation/ZZZType1.java",
+ "/Completion/src/deprecation/ZZZType1.js",
"package deprecation;"+
"public class ZZZType1 {\n"+
" public static int foo1;\n"+
@@ -13392,7 +13417,7 @@ public void testDeprecationCheck9() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/deprecation/Test.java",
+ "/Completion/src/deprecation/Test.js",
"package deprecation;"+
"public class Test {\n"+
" public void bar1(){}\n"+
@@ -13422,7 +13447,7 @@ public void testDeprecationCheck9() throws JavaModelException {
public void testDuplicateLocals1() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" void foo() {\n" +
@@ -13433,7 +13458,7 @@ public void testDuplicateLocals1() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/TestString.java",
+ "/Completion/src/test/TestString.js",
"package test;"+
"public class TestString {\n" +
" public void bar() {\n" +
@@ -13454,7 +13479,7 @@ public void testDuplicateLocals1() throws JavaModelException {
public void testDuplicateLocals2() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" public static void main(String[] args) {\n" +
@@ -13469,7 +13494,7 @@ public void testDuplicateLocals2() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/TestException.java",
+ "/Completion/src/test/TestException.js",
"package test;"+
"public class TestException extends Exception {\n" +
" public void bar() {\n" +
@@ -13490,7 +13515,7 @@ public void testDuplicateLocals2() throws JavaModelException {
public void testDuplicateLocals3() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" public static void main(String[] args) {\n" +
@@ -13502,7 +13527,7 @@ public void testDuplicateLocals3() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/TestString.java",
+ "/Completion/src/test/TestString.js",
"package test;"+
"public class TestString {\n" +
" public void bar() {\n" +
@@ -13523,7 +13548,7 @@ public void testDuplicateLocals3() throws JavaModelException {
public void testDuplicateLocals4() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" public static void main(String[] args) {\n" +
@@ -13536,7 +13561,7 @@ public void testDuplicateLocals4() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/TestString.java",
+ "/Completion/src/test/TestString.js",
"package test;"+
"public class TestString {\n" +
" public void bar() {\n" +
@@ -13557,7 +13582,7 @@ public void testDuplicateLocals4() throws JavaModelException {
public void testDuplicateLocals5() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" public static void main(String[] args) {\n" +
@@ -13570,7 +13595,7 @@ public void testDuplicateLocals5() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/TestString.java",
+ "/Completion/src/test/TestString.js",
"package test;"+
"public class TestString {\n" +
" public void bar() {\n" +
@@ -13591,7 +13616,7 @@ public void testDuplicateLocals5() throws JavaModelException {
public void testDuplicateLocalsType1() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" void foo() {\n" +
@@ -13626,7 +13651,7 @@ public void testDuplicateLocalsType1() throws JavaModelException {
public void testDuplicateLocalsType2() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" void foo() {\n" +
@@ -13718,7 +13743,7 @@ public void testEvaluationContextCompletion2() throws JavaModelException {
public void testEvaluationContextCompletion3() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/TestEvaluationContextCompletion3.java",
+ "/Completion/src/test/TestEvaluationContextCompletion3.js",
"package test;"+
"public class TestEvaluationContextCompletion3 {\n"+
"}");
@@ -13750,7 +13775,7 @@ public void testEvaluationContextCompletion3() throws JavaModelException {
public void testEvaluationContextCompletion4() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/TestEvaluationContextCompletion4.java",
+ "/Completion/src/test/TestEvaluationContextCompletion4.js",
"package test;"+
"public class TestEvaluationContextCompletion4 {\n"+
"}");
@@ -13783,7 +13808,7 @@ public void testEvaluationContextCompletion4() throws JavaModelException {
public void testEvaluationContextCompletion5() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/TestEvaluationContextCompletion5.java",
+ "/Completion/src/test/TestEvaluationContextCompletion5.js",
"package test;"+
"public class TestEvaluationContextCompletion5 {\n"+
"}");
@@ -13817,7 +13842,7 @@ public void testEvaluationContextCompletion5() throws JavaModelException {
public void testFavoriteImports001() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method() {\n" +
@@ -13826,7 +13851,7 @@ public void testFavoriteImports001() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo;\n" +
@@ -13855,7 +13880,7 @@ public void testFavoriteImports001() throws JavaModelException {
public void testFavoriteImports002() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method() {\n" +
@@ -13864,7 +13889,7 @@ public void testFavoriteImports002() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -13893,7 +13918,7 @@ public void testFavoriteImports002() throws JavaModelException {
public void testFavoriteImports003() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method() {\n" +
@@ -13902,7 +13927,7 @@ public void testFavoriteImports003() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo;\n" +
@@ -13925,7 +13950,7 @@ public void testFavoriteImports003() throws JavaModelException {
public void testFavoriteImports004() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method() {\n" +
@@ -13934,7 +13959,7 @@ public void testFavoriteImports004() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -13957,7 +13982,7 @@ public void testFavoriteImports004() throws JavaModelException {
public void testFavoriteImports005() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method() {\n" +
@@ -13966,7 +13991,7 @@ public void testFavoriteImports005() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo;\n" +
@@ -13995,7 +14020,7 @@ public void testFavoriteImports005() throws JavaModelException {
public void testFavoriteImports006() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method() {\n" +
@@ -14004,7 +14029,7 @@ public void testFavoriteImports006() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -14033,7 +14058,7 @@ public void testFavoriteImports006() throws JavaModelException {
public void testFavoriteImports007() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"import test.p.ZZZ.*;\n" +
"public class Test {\n" +
@@ -14043,7 +14068,7 @@ public void testFavoriteImports007() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -14072,7 +14097,7 @@ public void testFavoriteImports007() throws JavaModelException {
public void testFavoriteImports009() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"import test.p.ZZZ.*;\n" +
"public class Test {\n" +
@@ -14082,7 +14107,7 @@ public void testFavoriteImports009() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -14111,7 +14136,7 @@ public void testFavoriteImports009() throws JavaModelException {
public void testFavoriteImports011() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"import test.p.ZZZ.foo;\n" +
"public class Test {\n" +
@@ -14121,7 +14146,7 @@ public void testFavoriteImports011() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -14150,7 +14175,7 @@ public void testFavoriteImports011() throws JavaModelException {
public void testFavoriteImports013() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"import test.p.ZZZ.foo;\n" +
"public class Test {\n" +
@@ -14160,7 +14185,7 @@ public void testFavoriteImports013() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -14189,7 +14214,7 @@ public void testFavoriteImports013() throws JavaModelException {
public void testFavoriteImports016() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public class foo {\n" +
@@ -14200,7 +14225,7 @@ public void testFavoriteImports016() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -14230,7 +14255,7 @@ public void testFavoriteImports016() throws JavaModelException {
public void testFavoriteImports017() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void foo() {\n" +
@@ -14239,7 +14264,7 @@ public void testFavoriteImports017() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -14264,7 +14289,7 @@ public void testFavoriteImports017() throws JavaModelException {
public void testFavoriteImports018() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public int foo;\n" +
@@ -14274,7 +14299,7 @@ public void testFavoriteImports018() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -14304,7 +14329,7 @@ public void testFavoriteImports018() throws JavaModelException {
public void testFavoriteImports019() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method() {\n" +
@@ -14314,7 +14339,7 @@ public void testFavoriteImports019() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -14344,7 +14369,7 @@ public void testFavoriteImports019() throws JavaModelException {
public void testFavoriteImports020() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method() {\n" +
@@ -14353,7 +14378,7 @@ public void testFavoriteImports020() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -14385,7 +14410,7 @@ public void testFavoriteImports020() throws JavaModelException {
public void testFavoriteImports022() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method() {\n" +
@@ -14394,7 +14419,7 @@ public void testFavoriteImports022() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -14417,7 +14442,7 @@ public void testFavoriteImports022() throws JavaModelException {
public void testFavoriteImports023() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"/** */\n" +
"public class Test {\n" +
@@ -14427,7 +14452,7 @@ public void testFavoriteImports023() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo;\n" +
@@ -14456,7 +14481,7 @@ public void testFavoriteImports023() throws JavaModelException {
public void testFavoriteImports024() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method() {\n" +
@@ -14465,7 +14490,7 @@ public void testFavoriteImports024() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public int foo;\n" +
@@ -14488,7 +14513,7 @@ public void testFavoriteImports024() throws JavaModelException {
public void testFavoriteImports025() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method() {\n" +
@@ -14497,7 +14522,7 @@ public void testFavoriteImports025() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public int foo;\n" +
@@ -14520,7 +14545,7 @@ public void testFavoriteImports025() throws JavaModelException {
public void testFavoriteImports026() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method() {\n" +
@@ -14529,7 +14554,7 @@ public void testFavoriteImports026() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public int foo(){return 0;};\n" +
@@ -14552,7 +14577,7 @@ public void testFavoriteImports026() throws JavaModelException {
public void testFavoriteImports027() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method() {\n" +
@@ -14561,7 +14586,7 @@ public void testFavoriteImports027() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public int foo(){return 0;};\n" +
@@ -14584,7 +14609,7 @@ public void testFavoriteImports027() throws JavaModelException {
public void testFavoriteImports028() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"import test.p.ZZZ;\n" +
"public class Test {\n" +
@@ -14594,7 +14619,7 @@ public void testFavoriteImports028() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){return 0;};\n" +
@@ -14626,7 +14651,7 @@ public void testFavoriteImports030() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method() {\n" +
@@ -14635,7 +14660,7 @@ public void testFavoriteImports030() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -14674,7 +14699,7 @@ public void testFavoriteImports031() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method() {\n" +
@@ -14683,7 +14708,7 @@ public void testFavoriteImports031() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -14714,7 +14739,7 @@ public void testFavoriteImports031() throws JavaModelException {
public void testInconsistentHierarchy1() throws CoreException, IOException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/p/Test.java",
+ "/Completion/src/p/Test.js",
"package p;"+
"public class Test extends Unknown {\n" +
" void foo() {\n" +
@@ -14736,7 +14761,7 @@ public void testInconsistentHierarchy1() throws CoreException, IOException {
public void testLabel1() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/label/Test.java",
+ "/Completion/src/label/Test.js",
"package label;"+
"public class Test {\n"+
" void foo() {\n"+
@@ -14766,7 +14791,7 @@ public void testLabel1() throws JavaModelException {
public void testLabel2() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/label/Test.java",
+ "/Completion/src/label/Test.js",
"package label;"+
"public class Test {\n"+
" void foo() {\n"+
@@ -14797,7 +14822,7 @@ public void testLabel2() throws JavaModelException {
public void testLabel3() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/label/Test.java",
+ "/Completion/src/label/Test.js",
"package label;"+
"public class Test {\n"+
" void foo() {\n"+
@@ -14825,7 +14850,7 @@ public void testLabel3() throws JavaModelException {
public void testLabel4() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/label/Test.java",
+ "/Completion/src/label/Test.js",
"package label;"+
"public class Test {\n"+
" void foo() {\n"+
@@ -14854,7 +14879,7 @@ public void testLabel4() throws JavaModelException {
public void testLabel5() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/label/Test.java",
+ "/Completion/src/label/Test.js",
"package label;"+
"public class Test {\n" +
" void foo() {\n" +
@@ -14884,7 +14909,7 @@ public void testLabel5() throws JavaModelException {
public void testLabel6() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/label/Test.java",
+ "/Completion/src/label/Test.js",
"package label;"+
"public class Test {\n" +
" void foo() {\n" +
@@ -14921,7 +14946,7 @@ public void testParameterNames1() throws CoreException, IOException {
try {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/p/Test.java",
+ "/Completion/src/p/Test.js",
"package p;"+
"public class Test {\n" +
" void foo(doctest.X x) {\n" +
@@ -14959,7 +14984,7 @@ public void testParameterNames1() throws CoreException, IOException {
public void testStaticMembers1() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" void foo() {\n" +
@@ -14968,7 +14993,7 @@ public void testStaticMembers1() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/StaticMembers.java",
+ "/Completion/src/test/StaticMembers.js",
"package test;"+
"public class StaticMembers extends SuperStaticMembers {\n" +
" public static int staticField;\n" +
@@ -14978,7 +15003,7 @@ public void testStaticMembers1() throws JavaModelException {
"}\n");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/test/SuperStaticMembers.java",
+ "/Completion/src/test/SuperStaticMembers.js",
"package test;"+
"public class SuperStaticMembers {\n" +
" public static int superStaticField;\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionTests2.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionTests2.java
index 63d3f57..9ca0d32 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionTests2.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionTests2.java
@@ -200,7 +200,7 @@ public void testBug29832() throws Exception {
new String[]{"/P1"},
"bin");
this.createFile(
- "/P2/src/X.java",
+ "/P2/src/X.js",
"public class X {\n"+
" ZZZ z;\n"+
"}");
@@ -209,7 +209,7 @@ public void testBug29832() throws Exception {
// do completion
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("P2", "src", "", "X.java");
+ ICompilationUnit cu= getCompilationUnit("P2", "src", "", "X.js");
String str = cu.getSource();
String completeBehind = "ZZZ";
@@ -258,7 +258,7 @@ public void testBug29832() throws Exception {
File pz = this.createDirectory(src, "pz");
- this.createFile(pz, "ZZZ.java",
+ this.createFile(pz, "ZZZ.js",
"package pz;\n" +
"public class ZZZ {\n" +
"}");
@@ -325,7 +325,7 @@ public void testBug33560() throws Exception {
new String[]{"/P2"},
"bin");
this.createFile(
- "/P3/src/X.java",
+ "/P3/src/X.js",
"public class X {\n"+
" ZZZ z;\n"+
"}");
@@ -334,7 +334,7 @@ public void testBug33560() throws Exception {
// do completion
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu= getCompilationUnit("P3", "src", "", "X.java");
+ ICompilationUnit cu= getCompilationUnit("P3", "src", "", "X.js");
String str = cu.getSource();
String completeBehind = "ZZZ";
@@ -383,7 +383,7 @@ public void testBug33560() throws Exception {
File pz = this.createDirectory(src, "pz");
- this.createFile(pz, "ZZZ.java",
+ this.createFile(pz, "ZZZ.js",
"package pz;\n" +
"public class ZZZ {\n" +
"}");
@@ -430,7 +430,7 @@ public void testBug79288() throws Exception {
this.createFolder("/P1/src/a");
this.createFile(
- "/P1/src/a/XX1.java",
+ "/P1/src/a/XX1.js",
"package a;\n"+
"public class XX1 {\n"+
"}");
@@ -445,7 +445,7 @@ public void testBug79288() throws Exception {
this.createFolder("/P2/src/b");
this.createFile(
- "/P2/src/b/XX2.java",
+ "/P2/src/b/XX2.js",
"package b;\n"+
"public class XX2 {\n"+
"}");
@@ -459,7 +459,7 @@ public void testBug79288() throws Exception {
"bin");
this.createFile(
- "/P3/src/YY.java",
+ "/P3/src/YY.js",
"public class YY {\n"+
" vois foo(){\n"+
" XX\n"+
@@ -470,7 +470,7 @@ public void testBug79288() throws Exception {
// do completion
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
- ICompilationUnit cu= getCompilationUnit("P3", "src", "", "YY.java");
+ ICompilationUnit cu= getCompilationUnit("P3", "src", "", "YY.js");
String str = cu.getSource();
String completeBehind = "XX";
@@ -503,7 +503,7 @@ public void testBug91772() throws Exception {
this.createFolder("/P1/src/a");
this.createFile(
- "/P1/src/a/XX1.java",
+ "/P1/src/a/XX1.js",
"package a;\n"+
"public class XX1 {\n"+
"}");
@@ -523,7 +523,7 @@ public void testBug91772() throws Exception {
this.createFolder("/P2/src/b");
this.createFile(
- "/P2/src/b/XX2.java",
+ "/P2/src/b/XX2.js",
"package b;\n"+
"public class XX2 {\n"+
"}");
@@ -537,7 +537,7 @@ public void testBug91772() throws Exception {
"bin");
this.createFile(
- "/P3/src/YY.java",
+ "/P3/src/YY.js",
"public class YY {\n"+
" vois foo(){\n"+
" XX\n"+
@@ -548,7 +548,7 @@ public void testBug91772() throws Exception {
// do completion
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
- ICompilationUnit cu= getCompilationUnit("P3", "src", "", "YY.java");
+ ICompilationUnit cu= getCompilationUnit("P3", "src", "", "YY.js");
String str = cu.getSource();
String completeBehind = "XX";
@@ -596,14 +596,14 @@ public void testBug93891() throws Exception {
this.createFolder("/P1/src/a");
this.createFile(
- "/P1/src/a/XX1.java",
+ "/P1/src/a/XX1.js",
"package a;\n"+
"public class XX1 {\n"+
"}");
this.createFolder("/P1/src/b");
this.createFile(
- "/P1/src/b/XX2.java",
+ "/P1/src/b/XX2.js",
"package b;\n"+
"public class XX2 {\n"+
"}");
@@ -623,7 +623,7 @@ public void testBug93891() throws Exception {
this.createFolder("/P2/src/b");
this.createFile(
- "/P2/src/YY.java",
+ "/P2/src/YY.js",
"public class YY {\n"+
" void foo() {\n"+
" XX\n"+
@@ -634,7 +634,7 @@ public void testBug93891() throws Exception {
// do completion
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
- ICompilationUnit cu= getCompilationUnit("P2", "src", "", "YY.java");
+ ICompilationUnit cu= getCompilationUnit("P2", "src", "", "YY.js");
String str = cu.getSource();
String completeBehind = "XX";
@@ -682,14 +682,14 @@ public void testAccessRestriction1() throws Exception {
this.createFolder("/P1/src/a");
this.createFile(
- "/P1/src/a/XX1.java",
+ "/P1/src/a/XX1.js",
"package a;\n"+
"public class XX1 {\n"+
"}");
this.createFolder("/P1/src/b");
this.createFile(
- "/P1/src/b/XX2.java",
+ "/P1/src/b/XX2.js",
"package b;\n"+
"public class XX2 {\n"+
"}");
@@ -702,7 +702,7 @@ public void testAccessRestriction1() throws Exception {
new String[]{"/P1"},
"bin");
this.createFile(
- "/P2/src/YY.java",
+ "/P2/src/YY.js",
"public class YY {\n"+
" void foo() {\n"+
" XX\n"+
@@ -713,7 +713,7 @@ public void testAccessRestriction1() throws Exception {
// do completion
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
- ICompilationUnit cu= getCompilationUnit("P2", "src", "", "YY.java");
+ ICompilationUnit cu= getCompilationUnit("P2", "src", "", "YY.js");
String str = cu.getSource();
String completeBehind = "XX";
@@ -756,14 +756,14 @@ public void testAccessRestriction2() throws Exception {
this.createFolder("/P1/src/a");
this.createFile(
- "/P1/src/a/XX1.java",
+ "/P1/src/a/XX1.js",
"package a;\n"+
"public class XX1 {\n"+
"}");
this.createFolder("/P1/src/b");
this.createFile(
- "/P1/src/b/XX2.java",
+ "/P1/src/b/XX2.js",
"package b;\n"+
"public class XX2 {\n"+
"}");
@@ -785,7 +785,7 @@ public void testAccessRestriction2() throws Exception {
null,
"1.4");
this.createFile(
- "/P2/src/YY.java",
+ "/P2/src/YY.js",
"public class YY {\n"+
" void foo() {\n"+
" XX\n"+
@@ -796,7 +796,7 @@ public void testAccessRestriction2() throws Exception {
// do completion
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
- ICompilationUnit cu= getCompilationUnit("P2", "src", "", "YY.java");
+ ICompilationUnit cu= getCompilationUnit("P2", "src", "", "YY.js");
String str = cu.getSource();
String completeBehind = "XX";
@@ -837,14 +837,14 @@ public void testAccessRestriction3() throws Exception {
this.createFolder("/P1/src/a");
this.createFile(
- "/P1/src/a/XX1.java",
+ "/P1/src/a/XX1.js",
"package a;\n"+
"public class XX1 {\n"+
"}");
this.createFolder("/P1/src/b");
this.createFile(
- "/P1/src/b/XX2.java",
+ "/P1/src/b/XX2.js",
"package b;\n"+
"public class XX2 {\n"+
"}");
@@ -866,7 +866,7 @@ public void testAccessRestriction3() throws Exception {
null,
"1.4");
this.createFile(
- "/P2/src/YY.java",
+ "/P2/src/YY.js",
"public class YY {\n"+
" void foo() {\n"+
" XX\n"+
@@ -877,7 +877,7 @@ public void testAccessRestriction3() throws Exception {
// do completion
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
- ICompilationUnit cu= getCompilationUnit("P2", "src", "", "YY.java");
+ ICompilationUnit cu= getCompilationUnit("P2", "src", "", "YY.js");
String str = cu.getSource();
String completeBehind = "XX";
@@ -919,14 +919,14 @@ public void testAccessRestriction4() throws Exception {
this.createFolder("/P1/src/a");
this.createFile(
- "/P1/src/a/XX1.java",
+ "/P1/src/a/XX1.js",
"package a;\n"+
"public class XX1 {\n"+
"}");
this.createFolder("/P1/src/b");
this.createFile(
- "/P1/src/b/XX2.java",
+ "/P1/src/b/XX2.js",
"package b;\n"+
"public class XX2 {\n"+
"}");
@@ -948,7 +948,7 @@ public void testAccessRestriction4() throws Exception {
null,
"1.4");
this.createFile(
- "/P2/src/YY.java",
+ "/P2/src/YY.js",
"public class YY {\n"+
" void foo() {\n"+
" XX\n"+
@@ -959,7 +959,7 @@ public void testAccessRestriction4() throws Exception {
// do completion
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
- ICompilationUnit cu= getCompilationUnit("P2", "src", "", "YY.java");
+ ICompilationUnit cu= getCompilationUnit("P2", "src", "", "YY.js");
String str = cu.getSource();
String completeBehind = "XX";
@@ -1000,14 +1000,14 @@ public void testAccessRestriction5() throws Exception {
this.createFolder("/P1/src/a");
this.createFile(
- "/P1/src/a/XX1.java",
+ "/P1/src/a/XX1.js",
"package a;\n"+
"public class XX1 {\n"+
"}");
this.createFolder("/P1/src/b");
this.createFile(
- "/P1/src/b/XX2.java",
+ "/P1/src/b/XX2.js",
"package b;\n"+
"public class XX2 {\n"+
"}");
@@ -1029,7 +1029,7 @@ public void testAccessRestriction5() throws Exception {
null,
"1.4");
this.createFile(
- "/P2/src/YY.java",
+ "/P2/src/YY.js",
"public class YY {\n"+
" void foo() {\n"+
" XX\n"+
@@ -1040,7 +1040,7 @@ public void testAccessRestriction5() throws Exception {
// do completion
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
- ICompilationUnit cu= getCompilationUnit("P2", "src", "", "YY.java");
+ ICompilationUnit cu= getCompilationUnit("P2", "src", "", "YY.js");
String str = cu.getSource();
String completeBehind = "XX";
@@ -1080,21 +1080,21 @@ public void testAccessRestriction6() throws Exception {
this.createFolder("/P1/src/a");
this.createFile(
- "/P1/src/a/XX1.java",
+ "/P1/src/a/XX1.js",
"package a;\n"+
"public class XX1 {\n"+
"}");
this.createFolder("/P1/src/b");
this.createFile(
- "/P1/src/b/XX2.java",
+ "/P1/src/b/XX2.js",
"package b;\n"+
"public class XX2 {\n"+
"}");
this.createFolder("/P1/src/c");
this.createFile(
- "/P1/src/c/XX3.java",
+ "/P1/src/c/XX3.js",
"package c;\n"+
"public class XX3 {\n"+
"}");
@@ -1134,7 +1134,7 @@ public void testAccessRestriction6() throws Exception {
"1.4");
this.createFile(
- "/P3/src/YY.java",
+ "/P3/src/YY.js",
"public class YY {\n"+
" void foo() {\n"+
" XX\n"+
@@ -1145,7 +1145,7 @@ public void testAccessRestriction6() throws Exception {
// do completion
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
- ICompilationUnit cu= getCompilationUnit("P3", "src", "", "YY.java");
+ ICompilationUnit cu= getCompilationUnit("P3", "src", "", "YY.js");
String str = cu.getSource();
String completeBehind = "XX";
@@ -1186,14 +1186,14 @@ public void testAccessRestriction7() throws Exception {
this.createFolder("/P1/src/a");
this.createFile(
- "/P1/src/a/XX1.java",
+ "/P1/src/a/XX1.js",
"package a;\n"+
"public class XX1 {\n"+
"}");
this.createFolder("/P1/src/b");
this.createFile(
- "/P1/src/b/XX2.java",
+ "/P1/src/b/XX2.js",
"package b;\n"+
"public class XX2 {\n"+
"}");
@@ -1215,7 +1215,7 @@ public void testAccessRestriction7() throws Exception {
null,
"1.4");
this.createFile(
- "/P2/src/YY.java",
+ "/P2/src/YY.js",
"public class YY {\n"+
" void foo() {\n"+
" XX\n"+
@@ -1243,7 +1243,7 @@ public void testAccessRestriction7() throws Exception {
// do completion
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
- ICompilationUnit cu= getCompilationUnit("P2", "src", "", "YY.java");
+ ICompilationUnit cu= getCompilationUnit("P2", "src", "", "YY.js");
String str = cu.getSource();
String completeBehind = "XX";
@@ -1284,14 +1284,14 @@ public void testAccessRestriction8() throws Exception {
this.createFolder("/P1/src/a");
this.createFile(
- "/P1/src/a/XX1.java",
+ "/P1/src/a/XX1.js",
"package a;\n"+
"public class XX1 {\n"+
"}");
this.createFolder("/P1/src/b");
this.createFile(
- "/P1/src/b/XX2.java",
+ "/P1/src/b/XX2.js",
"package b;\n"+
"public class XX2 {\n"+
"}");
@@ -1313,7 +1313,7 @@ public void testAccessRestriction8() throws Exception {
null,
"1.4");
this.createFile(
- "/P2/src/YY.java",
+ "/P2/src/YY.js",
"public class YY {\n"+
" void foo() {\n"+
" XX\n"+
@@ -1341,7 +1341,7 @@ public void testAccessRestriction8() throws Exception {
// do completion
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
- ICompilationUnit cu= getCompilationUnit("P2", "src", "", "YY.java");
+ ICompilationUnit cu= getCompilationUnit("P2", "src", "", "YY.js");
String str = cu.getSource();
String completeBehind = "XX";
@@ -1383,14 +1383,14 @@ public void testAccessRestriction9() throws Exception {
this.createFolder("/P1/src/p11");
this.createFile(
- "/P1/src/p11/XX11.java",
+ "/P1/src/p11/XX11.js",
"package p11;\n"+
"public class XX11 {\n"+
"}");
this.createFolder("/P1/src/p12");
this.createFile(
- "/P1/src/p12/XX12.java",
+ "/P1/src/p12/XX12.js",
"package p12;\n"+
"public class XX12 {\n"+
"}");
@@ -1414,14 +1414,14 @@ public void testAccessRestriction9() throws Exception {
this.createFolder("/P2/src/p21");
this.createFile(
- "/P2/src/p21/XX21.java",
+ "/P2/src/p21/XX21.js",
"package p21;\n"+
"public class XX21 {\n"+
"}");
this.createFolder("/P2/src/p22");
this.createFile(
- "/P2/src/p22/XX22.java",
+ "/P2/src/p22/XX22.js",
"package p22;\n"+
"public class XX22 {\n"+
"}");
@@ -1445,14 +1445,14 @@ public void testAccessRestriction9() throws Exception {
this.createFolder("/P3/src/p31");
this.createFile(
- "/P3/src/p31/XX31.java",
+ "/P3/src/p31/XX31.js",
"package p31;\n"+
"public class XX31 {\n"+
"}");
this.createFolder("/P3/src/p32");
this.createFile(
- "/P3/src/p32/XX32.java",
+ "/P3/src/p32/XX32.js",
"package p32;\n"+
"public class XX32 {\n"+
"}");
@@ -1475,7 +1475,7 @@ public void testAccessRestriction9() throws Exception {
"1.4");
this.createFile(
- "/PX/src/X.java",
+ "/PX/src/X.js",
"public class X {\n"+
" void foo() {\n"+
" XX\n"+
@@ -1486,7 +1486,7 @@ public void testAccessRestriction9() throws Exception {
// do completion
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
- ICompilationUnit cu= getCompilationUnit("PX", "src", "", "X.java");
+ ICompilationUnit cu= getCompilationUnit("PX", "src", "", "X.js");
String str = cu.getSource();
String completeBehind = "XX";
@@ -1531,14 +1531,14 @@ public void testAccessRestriction10() throws Exception {
this.createFolder("/P1/src/p11");
this.createFile(
- "/P1/src/p11/XX11.java",
+ "/P1/src/p11/XX11.js",
"package p11;\n"+
"public class XX11 {\n"+
"}");
this.createFolder("/P1/src/p12");
this.createFile(
- "/P1/src/p12/XX12.java",
+ "/P1/src/p12/XX12.js",
"package p12;\n"+
"public class XX12 {\n"+
"}");
@@ -1562,14 +1562,14 @@ public void testAccessRestriction10() throws Exception {
this.createFolder("/P2/src/p21");
this.createFile(
- "/P2/src/p21/XX21.java",
+ "/P2/src/p21/XX21.js",
"package p21;\n"+
"public class XX21 {\n"+
"}");
this.createFolder("/P2/src/p22");
this.createFile(
- "/P2/src/p22/XX22.java",
+ "/P2/src/p22/XX22.js",
"package p22;\n"+
"public class XX22 {\n"+
"}");
@@ -1593,14 +1593,14 @@ public void testAccessRestriction10() throws Exception {
this.createFolder("/P3/src/p31");
this.createFile(
- "/P3/src/p31/XX31.java",
+ "/P3/src/p31/XX31.js",
"package p31;\n"+
"public class XX31 {\n"+
"}");
this.createFolder("/P3/src/p32");
this.createFile(
- "/P3/src/p32/XX32.java",
+ "/P3/src/p32/XX32.js",
"package p32;\n"+
"public class XX32 {\n"+
"}");
@@ -1623,7 +1623,7 @@ public void testAccessRestriction10() throws Exception {
"1.4");
this.createFile(
- "/PX/src/X.java",
+ "/PX/src/X.js",
"public class X {\n"+
" void foo() {\n"+
" XX\n"+
@@ -1634,7 +1634,7 @@ public void testAccessRestriction10() throws Exception {
// do completion
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
- ICompilationUnit cu= getCompilationUnit("PX", "src", "", "X.java");
+ ICompilationUnit cu= getCompilationUnit("PX", "src", "", "X.js");
String str = cu.getSource();
String completeBehind = "XX";
@@ -1681,14 +1681,14 @@ public void testAccessRestriction11() throws Exception {
this.createFolder("/P1/src/x/y/z/p11");
this.createFile(
- "/P1/src/x/y/z/p11/XX11.java",
+ "/P1/src/x/y/z/p11/XX11.js",
"package x.y.z.p11;\n"+
"public class XX11 {\n"+
"}");
this.createFolder("/P1/src/x/y/z/p12");
this.createFile(
- "/P1/src/x/y/z/p12/XX12.java",
+ "/P1/src/x/y/z/p12/XX12.js",
"package x.y.z.p12;\n"+
"public class XX12 {\n"+
"}");
@@ -1712,14 +1712,14 @@ public void testAccessRestriction11() throws Exception {
this.createFolder("/P2/src/x/y/z/p21");
this.createFile(
- "/P2/src/x/y/z/p21/XX21.java",
+ "/P2/src/x/y/z/p21/XX21.js",
"package x.y.z.p21;\n"+
"public class XX21 {\n"+
"}");
this.createFolder("/P2/src/x/y/z/p22");
this.createFile(
- "/P2/src/x/y/z/p22/XX22.java",
+ "/P2/src/x/y/z/p22/XX22.js",
"package x.y.z.p22;\n"+
"public class XX22 {\n"+
"}");
@@ -1743,14 +1743,14 @@ public void testAccessRestriction11() throws Exception {
this.createFolder("/P3/src/x/y/z/p31");
this.createFile(
- "/P3/src/x/y/z/p31/XX31.java",
+ "/P3/src/x/y/z/p31/XX31.js",
"package x.y.z.p31;\n"+
"public class XX31 {\n"+
"}");
this.createFolder("/P3/src/x/y/z/p32");
this.createFile(
- "/P3/src/x/y/z/p32/XX32.java",
+ "/P3/src/x/y/z/p32/XX32.js",
"package x.y.z.p32;\n"+
"public class XX32 {\n"+
"}");
@@ -1773,7 +1773,7 @@ public void testAccessRestriction11() throws Exception {
"1.4");
this.createFile(
- "/PX/src/X.java",
+ "/PX/src/X.js",
"public class X {\n"+
" void foo() {\n"+
" XX\n"+
@@ -1784,7 +1784,7 @@ public void testAccessRestriction11() throws Exception {
// do completion
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
- ICompilationUnit cu= getCompilationUnit("PX", "src", "", "X.java");
+ ICompilationUnit cu= getCompilationUnit("PX", "src", "", "X.js");
String str = cu.getSource();
String completeBehind = "XX";
@@ -1829,14 +1829,14 @@ public void testAccessRestriction12() throws Exception {
this.createFolder("/P1/src/p11");
this.createFile(
- "/P1/src/p11/XX11.java",
+ "/P1/src/p11/XX11.js",
"package p11;\n"+
"public class XX11 {\n"+
"}");
this.createFolder("/P1/src/p12");
this.createFile(
- "/P1/src/p12/XX12.java",
+ "/P1/src/p12/XX12.js",
"package p12;\n"+
"public class XX12 {\n"+
"}");
@@ -1860,14 +1860,14 @@ public void testAccessRestriction12() throws Exception {
this.createFolder("/P2/src/p21");
this.createFile(
- "/P2/src/p21/XX21.java",
+ "/P2/src/p21/XX21.js",
"package p21;\n"+
"public class XX21 {\n"+
"}");
this.createFolder("/P2/src/p22");
this.createFile(
- "/P2/src/p22/XX22.java",
+ "/P2/src/p22/XX22.js",
"package p22;\n"+
"public class XX22 {\n"+
"}");
@@ -1891,14 +1891,14 @@ public void testAccessRestriction12() throws Exception {
this.createFolder("/P3/src/p31");
this.createFile(
- "/P3/src/p31/XX31.java",
+ "/P3/src/p31/XX31.js",
"package p31;\n"+
"public class XX31 {\n"+
"}");
this.createFolder("/P3/src/p32");
this.createFile(
- "/P3/src/p32/XX32.java",
+ "/P3/src/p32/XX32.js",
"package p32;\n"+
"public class XX32 {\n"+
"}");
@@ -1921,7 +1921,7 @@ public void testAccessRestriction12() throws Exception {
"1.4");
this.createFile(
- "/PX/src/X.java",
+ "/PX/src/X.js",
"public class X {\n"+
" void foo() {\n"+
" XX\n"+
@@ -1932,7 +1932,7 @@ public void testAccessRestriction12() throws Exception {
// do completion
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
- ICompilationUnit cu= getCompilationUnit("PX", "src", "", "X.java");
+ ICompilationUnit cu= getCompilationUnit("PX", "src", "", "X.js");
String str = cu.getSource();
String completeBehind = "XX";
@@ -1979,14 +1979,14 @@ public void testAccessRestriction13() throws Exception {
this.createFolder("/P1/src/a");
this.createFile(
- "/P1/src/a/XX1.java",
+ "/P1/src/a/XX1.js",
"package a;\n"+
"public class XX1 {\n"+
"}");
this.createFolder("/P1/src/b");
this.createFile(
- "/P1/src/b/XX2.java",
+ "/P1/src/b/XX2.js",
"package b;\n"+
"public class XX2 {\n"+
"}");
@@ -2008,7 +2008,7 @@ public void testAccessRestriction13() throws Exception {
null,
"1.4");
this.createFile(
- "/P2/src/YY.java",
+ "/P2/src/YY.js",
"public class YY {\n"+
" void foo() {\n"+
" XX\n"+
@@ -2019,7 +2019,7 @@ public void testAccessRestriction13() throws Exception {
// do completion
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
- ICompilationUnit cu= getCompilationUnit("P2", "src", "", "YY.java");
+ ICompilationUnit cu= getCompilationUnit("P2", "src", "", "YY.js");
String str = cu.getSource();
String completeBehind = "XX";
@@ -2059,14 +2059,14 @@ public void testAccessRestriction14() throws Exception {
this.createFolder("/P1/src/a");
this.createFile(
- "/P1/src/a/XX1.java",
+ "/P1/src/a/XX1.js",
"package a;\n"+
"public class XX1 {\n"+
"}");
this.createFolder("/P1/src/b");
this.createFile(
- "/P1/src/b/XX2.java",
+ "/P1/src/b/XX2.js",
"package b;\n"+
"public class XX2 {\n"+
"}");
@@ -2088,7 +2088,7 @@ public void testAccessRestriction14() throws Exception {
null,
"1.4");
this.createFile(
- "/P2/src/YY.java",
+ "/P2/src/YY.js",
"public class YY {\n"+
" void foo() {\n"+
" XX\n"+
@@ -2099,7 +2099,7 @@ public void testAccessRestriction14() throws Exception {
// do completion
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
- ICompilationUnit cu= getCompilationUnit("P2", "src", "", "YY.java");
+ ICompilationUnit cu= getCompilationUnit("P2", "src", "", "YY.js");
String str = cu.getSource();
String completeBehind = "XX";
@@ -2138,7 +2138,7 @@ public void testAccessRestriction14() throws Exception {
//
// this.createFolder("/P1/src/a");
// this.createFile(
-// "/P1/src/a/XX1.java",
+// "/P1/src/a/XX1.js",
// "package a;\n"+
// "public class XX1 {\n"+
// " public void foo() {\n"+
@@ -2162,7 +2162,7 @@ public void testAccessRestriction14() throws Exception {
// null,
// "1.4");
// this.createFile(
-// "/P2/src/YY.java",
+// "/P2/src/YY.js",
// "public class YY {\n"+
// " void foo() {\n"+
// " a.XX1 x;\n"+
@@ -2174,7 +2174,7 @@ public void testAccessRestriction14() throws Exception {
//
// // do completion
// CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
-// ICompilationUnit cu= getCompilationUnit("P2", "src", "", "YY.java");
+// ICompilationUnit cu= getCompilationUnit("P2", "src", "", "YY.js");
//
// String str = cu.getSource();
// String completeBehind = "x.fo";
@@ -2205,7 +2205,7 @@ public void testBug96950() throws Exception {
new String[]{"JCL_LIB"},
"bin");
this.createFile(
- "/P1/src/Taratata.java",
+ "/P1/src/Taratata.js",
"public class Taratata {\n"+
"}");
@@ -2226,7 +2226,7 @@ public void testBug96950() throws Exception {
null,
"1.4");
this.createFile(
- "/P2/src/BreakRules.java",
+ "/P2/src/BreakRules.js",
"public class BreakRules {\n"+
" Tara\n"+
"}");
@@ -2235,7 +2235,7 @@ public void testBug96950() throws Exception {
// do completion
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
- ICompilationUnit cu= getCompilationUnit("P2", "src", "", "BreakRules.java");
+ ICompilationUnit cu= getCompilationUnit("P2", "src", "", "BreakRules.js");
String str = cu.getSource();
String completeBehind = "Tara";
@@ -2260,7 +2260,7 @@ public void testChangeInternalJar() throws CoreException, IOException {
try {
// Create jar file with a class with 2 methods doXXX
String[] pathAndContents = new String[] {
- "pack/Util.java",
+ "pack/Util.js",
"package pack;\n" +
"public class Util {\n" +
" public void doit2A(int x, int y) { }\n" +
@@ -2278,7 +2278,7 @@ public void testChangeInternalJar() throws CoreException, IOException {
}
// Create compilation unit in which completion occurs
- String path = "/Completion/src/test/Test.java";
+ String path = "/Completion/src/test/Test.js";
String source = "package test;\n" +
"import pack.*;\n" +
"public class Test {\n" +
@@ -2305,7 +2305,7 @@ public void testChangeInternalJar() throws CoreException, IOException {
String projectLocation = this.currentProject.getProject().getLocation().toOSString();
String jarPath = projectLocation + File.separator + jarName;
org.eclipse.wst.jsdt.core.tests.util.Util.createJar(new String[] {
- "pack/Util.java",
+ "pack/Util.js",
"package pack;\n" +
"public class Util {\n" +
" public void doit2A(int x, int y) { }\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionTests_1_5.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionTests_1_5.java
index 98bfedf..b242b5d 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionTests_1_5.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionTests_1_5.java
@@ -45,7 +45,7 @@ private ICompilationUnit[] getExternalQQTypes() throws JavaModelException {
ICompilationUnit[] units = new ICompilationUnit[6];
units[0] = getWorkingCopy(
- "/Completion/src3/pkgstaticimport/QQType1.java",
+ "/Completion/src3/pkgstaticimport/QQType1.js",
"package pkgstaticimport;\n"+
"\n"+
"public class QQType1 {\n"+
@@ -60,7 +60,7 @@ private ICompilationUnit[] getExternalQQTypes() throws JavaModelException {
"}");
units[1] = getWorkingCopy(
- "/Completion/src3/pkgstaticimport/QQType3.java",
+ "/Completion/src3/pkgstaticimport/QQType3.js",
"package pkgstaticimport;\n"+
"\n"+
"public class QQType3 extends QQType1 {\n"+
@@ -68,7 +68,7 @@ private ICompilationUnit[] getExternalQQTypes() throws JavaModelException {
"}");
units[2] = getWorkingCopy(
- "/Completion/src3/pkgstaticimport/QQType4.java",
+ "/Completion/src3/pkgstaticimport/QQType4.js",
"package pkgstaticimport;\n"+
"\n"+
"public class QQType4 {\n"+
@@ -83,7 +83,7 @@ private ICompilationUnit[] getExternalQQTypes() throws JavaModelException {
"}");
units[3] = getWorkingCopy(
- "/Completion/src3/pkgstaticimport/QQType6.java",
+ "/Completion/src3/pkgstaticimport/QQType6.js",
"package pkgstaticimport;\n"+
"\n"+
"public class QQType6 extends QQType4 {\n"+
@@ -91,7 +91,7 @@ private ICompilationUnit[] getExternalQQTypes() throws JavaModelException {
"}");
units[4] = getWorkingCopy(
- "/Completion/src3/pkgstaticimport/QQType7.java",
+ "/Completion/src3/pkgstaticimport/QQType7.js",
"package pkgstaticimport;\n"+
"\n"+
"public class QQType7 {\n"+
@@ -106,7 +106,7 @@ private ICompilationUnit[] getExternalQQTypes() throws JavaModelException {
"}");
units[5] = getWorkingCopy(
- "/Completion/src3/pkgstaticimport/QQType9.java",
+ "/Completion/src3/pkgstaticimport/QQType9.js",
"package pkgstaticimport;\n"+
"\n"+
"public class QQType9 extends QQType7 {\n"+
@@ -117,7 +117,7 @@ private ICompilationUnit[] getExternalQQTypes() throws JavaModelException {
}
public void test0001() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0001", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0001", "Test.js");
String str = cu.getSource();
String completeBehind = "X<St";
@@ -130,7 +130,7 @@ public void test0001() throws JavaModelException {
}
public void test0002() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0002", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0002", "Test.js");
String str = cu.getSource();
String completeBehind = "X<Ob";
@@ -143,7 +143,7 @@ public void test0002() throws JavaModelException {
}
public void test0003() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0003", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0003", "Test.js");
String str = cu.getSource();
String completeBehind = "X<St";
@@ -156,7 +156,7 @@ public void test0003() throws JavaModelException {
}
public void test0004() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0004", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0004", "Test.js");
String str = cu.getSource();
String completeBehind = "X<XZ";
@@ -170,7 +170,7 @@ public void test0004() throws JavaModelException {
}
public void test0005() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0005/Test.java",
+ "/Completion/src3/test0005/Test.js",
"package test0005;\n" +
"\n" +
"public class Test {\n" +
@@ -196,7 +196,7 @@ public void test0005() throws JavaModelException {
}
public void test0006() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0006/Test.java",
+ "/Completion/src3/test0006/Test.js",
"package test0006;\n" +
"\n" +
"public class Test {\n" +
@@ -222,7 +222,7 @@ public void test0006() throws JavaModelException {
}
public void test0007() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0007/Test.java",
+ "/Completion/src3/test0007/Test.js",
"package test0007;\n" +
"\n" +
"public class Test {\n" +
@@ -248,7 +248,7 @@ public void test0007() throws JavaModelException {
}
public void test0008() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0008/Test.java",
+ "/Completion/src3/test0008/Test.js",
"package test0008;\n" +
"\n" +
"public class Test {\n" +
@@ -281,7 +281,7 @@ public void test0008() throws JavaModelException {
}
public void test0009() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0009", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0009", "Test.js");
String str = cu.getSource();
String completeBehind = "/**/T_";
@@ -295,7 +295,7 @@ public void test0009() throws JavaModelException {
}
public void test0010() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0010", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0010", "Test.js");
String str = cu.getSource();
String completeBehind = "/**/T_";
@@ -311,7 +311,7 @@ public void test0010() throws JavaModelException {
}
public void test0011() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0011/Test.java",
+ "/Completion/src3/test0011/Test.js",
"package test0011;\n"+
"\n"+
"public class Test <T extends Z0011<Object>.Y001> {\n"+
@@ -334,7 +334,7 @@ public void test0011() throws JavaModelException {
}
public void test0012() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0012/Test.java",
+ "/Completion/src3/test0012/Test.js",
"package test0012;\n"+
"\n"+
"public class Test {\n"+
@@ -357,7 +357,7 @@ public void test0012() throws JavaModelException {
}
public void test0013() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0013/Test.java",
+ "/Completion/src3/test0013/Test.js",
"package test0013;\n"+
"\n"+
"public class Test {\n"+
@@ -380,7 +380,7 @@ public void test0013() throws JavaModelException {
}
public void test0014() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0014/Test.java",
+ "/Completion/src3/test0014/Test.js",
"package test0014;\n" +
"\n" +
"public class Test extends Z0014<Object>.Y001 {\n" +
@@ -402,7 +402,7 @@ public void test0014() throws JavaModelException {
}
public void test0015() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0015/Test.java",
+ "/Completion/src3/test0015/Test.js",
"package test0015;\n" +
"\n" +
"public class Test implements Z0015<Object>.Y001 {\n" +
@@ -427,7 +427,7 @@ public void test0015() throws JavaModelException {
}
public void test0016() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0016/Test.java",
+ "/Completion/src3/test0016/Test.js",
"package test0016;\n" +
"\n" +
"public class Test implements {\n" +
@@ -452,7 +452,7 @@ public void test0016() throws JavaModelException {
}
public void test0017() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0017/Test.java",
+ "/Completion/src3/test0017/Test.js",
"package test0017;\n" +
"\n" +
"public class Test implements {\n" +
@@ -477,7 +477,7 @@ public void test0017() throws JavaModelException {
}
public void test0018() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0018/Test.java",
+ "/Completion/src3/test0018/Test.js",
"package test0018;\n" +
"\n" +
"public class Test {\n" +
@@ -502,7 +502,7 @@ public void test0018() throws JavaModelException {
}
public void test0019() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0019/Test.java",
+ "/Completion/src3/test0019/Test.js",
"package test0019;\n" +
"\n" +
"public class Test {\n" +
@@ -525,7 +525,7 @@ public void test0019() throws JavaModelException {
}
public void test0020() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0020/Test.java",
+ "/Completion/src3/test0020/Test.js",
"package test0020;\n"+
"\n"+
"public class Test {\n"+
@@ -551,7 +551,7 @@ public void test0020() throws JavaModelException {
public void test0021() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0021/Test.java",
+ "/Completion/src3/test0021/Test.js",
"package test0021;\n" +
"\n" +
"public class Test {\n" +
@@ -580,7 +580,7 @@ public void test0021() throws JavaModelException {
public void test0022() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0022/Test.java",
+ "/Completion/src3/test0022/Test.js",
"package test0022;\n" +
"\n" +
"public class Test {\n" +
@@ -611,7 +611,7 @@ public void test0022() throws JavaModelException {
}
public void test0023() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0023", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0023", "Test.js");
String str = cu.getSource();
String completeBehind = "<St";
@@ -624,7 +624,7 @@ public void test0023() throws JavaModelException {
}
public void test0024() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0024", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0024", "Test.js");
String str = cu.getSource();
String completeBehind = "<St";
@@ -637,7 +637,7 @@ public void test0024() throws JavaModelException {
}
public void test0025() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0025", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0025", "Test.js");
String str = cu.getSource();
String completeBehind = "<St";
@@ -651,7 +651,7 @@ public void test0025() throws JavaModelException {
public void test0026() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0026/Test.java",
+ "/Completion/src3/test0026/Test.js",
"package test0026;\n" +
"\n" +
"public class Test {\n" +
@@ -678,7 +678,7 @@ public void test0026() throws JavaModelException {
public void test0027() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0026/Test.java",
+ "/Completion/src3/test0026/Test.js",
"package test0027;\n" +
"\n" +
"public class Test {\n" +
@@ -706,7 +706,7 @@ public void test0027() throws JavaModelException {
}
public void test0028() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0028", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0028", "Test.js");
String str = cu.getSource();
String completeBehind = "<St";
@@ -719,7 +719,7 @@ public void test0028() throws JavaModelException {
}
public void test0029() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0029/Test.java",
+ "/Completion/src3/test0029/Test.js",
"package test0029;\n"+
"\n"+
"public class Test {\n"+
@@ -738,7 +738,7 @@ public void test0029() throws JavaModelException {
}
public void test0030() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0030", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0030", "Test.js");
String str = cu.getSource();
String completeBehind = "ZZ";
@@ -755,7 +755,7 @@ public void test0030() throws JavaModelException {
*/
public void test0031() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0031/Test.java",
+ "/Completion/src3/test0031/Test.js",
"package test0031;\n" +
"\n" +
"public class Test <T> {\n" +
@@ -781,7 +781,7 @@ public void test0031() throws JavaModelException {
*/
public void test0032() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0032", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0032", "Test.js");
String str = cu.getSource();
String completeBehind = "Stri";
@@ -797,7 +797,7 @@ public void test0032() throws JavaModelException {
*/
public void test0033() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0033", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0033", "Test.js");
String str = cu.getSource();
String completeBehind = "Stri";
@@ -813,7 +813,7 @@ public void test0033() throws JavaModelException {
*/
public void test0034() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0034", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0034", "Test.js");
String str = cu.getSource();
String completeBehind = "Stri";
@@ -829,7 +829,7 @@ public void test0034() throws JavaModelException {
*/
public void test0035() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0035", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0035", "Test.js");
String str = cu.getSource();
String completeBehind = "Stri";
@@ -845,7 +845,7 @@ public void test0035() throws JavaModelException {
*/
public void test0036() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0036", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0036", "Test.js");
String str = cu.getSource();
String completeBehind = "Stri";
@@ -861,7 +861,7 @@ public void test0036() throws JavaModelException {
*/
public void test0037() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0037", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0037", "Test.js");
String str = cu.getSource();
String completeBehind = "Stri";
@@ -877,7 +877,7 @@ public void test0037() throws JavaModelException {
*/
public void test0038() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0038", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0038", "Test.js");
String str = cu.getSource();
String completeBehind = "Stri";
@@ -893,7 +893,7 @@ public void test0038() throws JavaModelException {
*/
public void test0039() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0039", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0039", "Test.js");
String str = cu.getSource();
String completeBehind = "Stri";
@@ -909,7 +909,7 @@ public void test0039() throws JavaModelException {
*/
public void test0040() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0040/Test.java",
+ "/Completion/src3/test0040/Test.js",
"package test0040;\n" +
"\n" +
"public class Test <T> {\n" +
@@ -936,7 +936,7 @@ public void test0040() throws JavaModelException {
*/
public void test0041() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0041/Test.java",
+ "/Completion/src3/test0041/Test.js",
"package test0041;\n" +
"\n" +
"public class Test <T> {\n" +
@@ -965,7 +965,7 @@ public void test0041() throws JavaModelException {
*/
public void test0042() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0042/Test.java",
+ "/Completion/src3/test0042/Test.js",
"package test0042;\n" +
"\n" +
"public class Test <T> {\n" +
@@ -993,7 +993,7 @@ public void test0042() throws JavaModelException {
*/
public void test0043() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0043/Test.java",
+ "/Completion/src3/test0043/Test.js",
"package test0043;\n" +
"\n" +
"public class Test <T> {\n" +
@@ -1022,7 +1022,7 @@ public void test0043() throws JavaModelException {
*/
public void test0044() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0044/Test.java",
+ "/Completion/src3/test0044/Test.js",
"package test0044;\n" +
"\n" +
"public class Test <T> {\n" +
@@ -1049,7 +1049,7 @@ public void test0044() throws JavaModelException {
*/
public void test0045() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0045/Test.java",
+ "/Completion/src3/test0045/Test.js",
"package test0045;\n" +
"\n" +
"public class Test <T> {\n" +
@@ -1078,7 +1078,7 @@ public void test0045() throws JavaModelException {
*/
public void test0046() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0046/Test.java",
+ "/Completion/src3/test0046/Test.js",
"package test0046;\n" +
"\n" +
"public class Test <T> {\n" +
@@ -1105,7 +1105,7 @@ public void test0046() throws JavaModelException {
*/
public void test0047() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0047/Test.java",
+ "/Completion/src3/test0047/Test.js",
"package test0047;\n" +
"\n" +
"public class Test <T> {\n" +
@@ -1134,7 +1134,7 @@ public void test0047() throws JavaModelException {
*/
public void test0048() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0048", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0048", "Test.js");
String str = cu.getSource();
String completeBehind = "l.ba";
@@ -1150,7 +1150,7 @@ public void test0048() throws JavaModelException {
*/
public void test0049() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0049", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0049", "Test.js");
String str = cu.getSource();
String completeBehind = "l.ba";
@@ -1166,7 +1166,7 @@ public void test0049() throws JavaModelException {
*/
public void test0050() throws JavaModelException {
CompletionTestsRequestor requestor = new CompletionTestsRequestor();
- ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0050", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Completion", "src3", "test0050", "Test.js");
String str = cu.getSource();
String completeBehind = "Test<T_0050";
@@ -1190,7 +1190,7 @@ public void test0051() throws JavaModelException {
qqTypes = this.getExternalQQTypes();
this.wc = getWorkingCopy(
- "/Completion/src3/test0051/Test.java",
+ "/Completion/src3/test0051/Test.js",
"package test0051;\n"+
"import static pkgstaticimport.QQType1.*;\n"+
"public class Test {\n"+
@@ -1229,7 +1229,7 @@ public void test0052() throws JavaModelException {
qqTypes = this.getExternalQQTypes();
qqType2 = getWorkingCopy(
- "/Completion/src3/test0052/QQType2.java",
+ "/Completion/src3/test0052/QQType2.js",
"package test0052;\n"+
"public class QQType2 {\n"+
" public class Inner1 {}\n"+
@@ -1243,7 +1243,7 @@ public void test0052() throws JavaModelException {
"}");
this.wc = getWorkingCopy(
- "/Completion/src3/test0052/Test.java",
+ "/Completion/src3/test0052/Test.js",
"package test0052;\n"+
"import static test0052.QQType2.*;\n"+
"public class Test {\n"+
@@ -1290,7 +1290,7 @@ public void test0053() throws JavaModelException {
qqTypes = this.getExternalQQTypes();
this.wc = getWorkingCopy(
- "/Completion/src3/test0053/Test.java",
+ "/Completion/src3/test0053/Test.js",
"package test0053;\n"+
"import static pkgstaticimport.QQType1.*;\n"+
"public class Test extends pkgstaticimport.QQType1 {\n"+
@@ -1330,7 +1330,7 @@ public void test0054() throws JavaModelException {
qqTypes = this.getExternalQQTypes();
this.wc = getWorkingCopy(
- "/Completion/src3/test0054/Test.java",
+ "/Completion/src3/test0054/Test.js",
"package test0054;\n"+
"import static pkgstaticimport.QQType1.Inner2;\n"+
"public class Test {\n"+
@@ -1368,7 +1368,7 @@ public void test0055() throws JavaModelException {
qqTypes = this.getExternalQQTypes();
this.wc = getWorkingCopy(
- "/Completion/src3/test0055/Test.java",
+ "/Completion/src3/test0055/Test.js",
"package test0055;\n"+
"import static pkgstaticimport.QQType1.*;\n"+
"import static pkgstaticimport.QQType1.Inner2;\n"+
@@ -1407,7 +1407,7 @@ public void test0056() throws JavaModelException {
qqTypes = this.getExternalQQTypes();
this.wc = getWorkingCopy(
- "/Completion/src3/test0056/Test.java",
+ "/Completion/src3/test0056/Test.js",
"package test0056;\n"+
"import static pkgstaticimport.QQType1.Inner2;\n"+
"import static pkgstaticimport.QQType1.*;\n"+
@@ -1446,7 +1446,7 @@ public void test0057() throws JavaModelException {
qqTypes = this.getExternalQQTypes();
this.wc = getWorkingCopy(
- "/Completion/src3/test0056/Test.java",
+ "/Completion/src3/test0056/Test.js",
"package test0057;\n"+
"import static pkgstaticimport.QQType3.*;\n"+
"public class Test {\n"+
@@ -1485,7 +1485,7 @@ public void test0058() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0058/Test.java",
+ "/Completion/src3/test0058/Test.js",
"package test0058;\n"+
"import static pkgstaticimport.QQType4.*;\n"+
"public class Test {\n"+
@@ -1523,7 +1523,7 @@ public void test0059() throws JavaModelException {
qqTypes = this.getExternalQQTypes();
qqType5 = getWorkingCopy(
- "/Completion/src3/test0059/QQType5.java",
+ "/Completion/src3/test0059/QQType5.js",
"package test0059;\n"+
"\n"+
"public class QQType5 {\n"+
@@ -1539,7 +1539,7 @@ public void test0059() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0059/Test.java",
+ "/Completion/src3/test0059/Test.js",
"package test0059;\n"+
"import static test0059.QQType5.*;\n"+
"public class Test {\n"+
@@ -1579,7 +1579,7 @@ public void test0060() throws JavaModelException {
qqTypes = this.getExternalQQTypes();
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
- ICompilationUnit cu= getCompilationUnit("Completion", "src3", "test0060", "Test.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src3", "test0060", "Test.js");
String str = cu.getSource();
String completeBehind = "zzvarzz";
@@ -1611,7 +1611,7 @@ public void test0061() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0061/Test.java",
+ "/Completion/src3/test0061/Test.js",
"package test0061;\n" +
"import static pkgstaticimport.QQType4.zzvarzz2;\n" +
"public class Test {\n" +
@@ -1648,7 +1648,7 @@ public void test0062() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0062/Test.java",
+ "/Completion/src3/test0062/Test.js",
"package test0062;\n" +
"import static pkgstaticimport.QQType4.*;\n" +
"import static pkgstaticimport.QQType4.zzvarzz2;\n" +
@@ -1686,7 +1686,7 @@ public void test0063() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0063/Test.java",
+ "/Completion/src3/test0063/Test.js",
"package test0063;\n" +
"import static pkgstaticimport.QQType4.zzvarzz2;\n" +
"import static pkgstaticimport.QQType4.*;\n" +
@@ -1723,7 +1723,7 @@ public void test0064() throws JavaModelException {
qqTypes = this.getExternalQQTypes();
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
- ICompilationUnit cu= getCompilationUnit("Completion", "src3", "test0064", "Test.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src3", "test0064", "Test.js");
String str = cu.getSource();
String completeBehind = "zzvarzz";
@@ -1752,7 +1752,7 @@ public void test0065() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0065/Test.java",
+ "/Completion/src3/test0065/Test.js",
"package test0065;\n" +
"import static pkgstaticimport.QQType7.*;\n" +
"public class Test {\n" +
@@ -1789,7 +1789,7 @@ public void test0066() throws JavaModelException {
qqTypes = this.getExternalQQTypes();
qqType8 = getWorkingCopy(
- "/Completion/src3/test0066/QQType8.java",
+ "/Completion/src3/test0066/QQType8.js",
"package test0066;\n"+
"\n"+
"public class QQType8 {\n"+
@@ -1805,7 +1805,7 @@ public void test0066() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0066/Test.java",
+ "/Completion/src3/test0066/Test.js",
"package test0066;\n" +
"import static test0066.QQType8.*;\n" +
"public class Test {\n" +
@@ -1845,7 +1845,7 @@ public void test0067() throws JavaModelException {
qqTypes = this.getExternalQQTypes();
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
- ICompilationUnit cu= getCompilationUnit("Completion", "src3", "test0067", "Test.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src3", "test0067", "Test.js");
String str = cu.getSource();
String completeBehind = "zzfoozz";
@@ -1876,7 +1876,7 @@ public void test0068() throws JavaModelException {
qqTypes = this.getExternalQQTypes();
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2();
- ICompilationUnit cu= getCompilationUnit("Completion", "src3", "test0068", "Test.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src3", "test0068", "Test.js");
String str = cu.getSource();
String completeBehind = "zzfoozz";
@@ -1897,7 +1897,7 @@ public void test0068() throws JavaModelException {
*/
public void test0069() throws JavaModelException {
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
- ICompilationUnit cu= getCompilationUnit("Completion", "src3", "test0069", "Test.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src3", "test0069", "Test.js");
String str = cu.getSource();
String completeBehind = "icell.p";
@@ -1915,7 +1915,7 @@ public void test0070() throws JavaModelException {
ICompilationUnit importedClass = null;
try {
importedClass = getWorkingCopy(
- "/Completion/src3/test0070/p/ImportedClass.java",
+ "/Completion/src3/test0070/p/ImportedClass.js",
"package test0070.p;\n"+
"\n"+
"public class ImportedClass {\n"+
@@ -1923,7 +1923,7 @@ public void test0070() throws JavaModelException {
"}");
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
- ICompilationUnit cu= getCompilationUnit("Completion", "src3", "test0070", "Test.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src3", "test0070", "Test.js");
String str = cu.getSource();
String completeBehind = "test0070";
@@ -1948,7 +1948,7 @@ public void test0071() throws JavaModelException {
ICompilationUnit importedClass = null;
try {
importedClass = getWorkingCopy(
- "/Completion/src3/test0071/p/ImportedClass.java",
+ "/Completion/src3/test0071/p/ImportedClass.js",
"package test0071.p;\n"+
"\n"+
"public class ImportedClass {\n"+
@@ -1956,7 +1956,7 @@ public void test0071() throws JavaModelException {
"}");
CompletionResult result = complete(
- "/Completion/src3/test0071/Test.java",
+ "/Completion/src3/test0071/Test.js",
"package test0071;\n" +
"\n" +
"import static test0071.p.Im\n" +
@@ -1988,7 +1988,7 @@ public void test0072() throws JavaModelException {
ICompilationUnit importedClass = null;
try {
importedClass = getWorkingCopy(
- "/Completion/src3/test0072/p/ImportedClass.java",
+ "/Completion/src3/test0072/p/ImportedClass.js",
"package test0072.p;\n"+
"\n"+
"public class ImportedClass {\n"+
@@ -1998,7 +1998,7 @@ public void test0072() throws JavaModelException {
"}");
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
- ICompilationUnit cu= getCompilationUnit("Completion", "src3", "test0072", "Test.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src3", "test0072", "Test.js");
String str = cu.getSource();
String completeBehind = "test0072.p.ImportedClass.ZZ";
@@ -2023,7 +2023,7 @@ public void test0073() throws JavaModelException {
ICompilationUnit importedClass = null;
try {
importedClass = getWorkingCopy(
- "/Completion/src3/test0073/p/ImportedClass.java",
+ "/Completion/src3/test0073/p/ImportedClass.js",
"package test0073.p;\n"+
"\n"+
"public class ImportedClass {\n"+
@@ -2035,7 +2035,7 @@ public void test0073() throws JavaModelException {
"}");
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
- ICompilationUnit cu= getCompilationUnit("Completion", "src3", "test0073", "Test.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src3", "test0073", "Test.js");
String str = cu.getSource();
String completeBehind = "test0073.p.ImportedClass.Inner.ZZ";
@@ -2060,7 +2060,7 @@ public void test0074() throws JavaModelException {
ICompilationUnit importedClass = null;
try {
importedClass = getWorkingCopy(
- "/Completion/src3/test0074/p/ImportedClass.java",
+ "/Completion/src3/test0074/p/ImportedClass.js",
"package test0074.p;\n"+
"\n"+
"public class ImportedClass {\n"+
@@ -2072,7 +2072,7 @@ public void test0074() throws JavaModelException {
"}");
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
- ICompilationUnit cu= getCompilationUnit("Completion", "src3", "test0074", "Test.java");
+ ICompilationUnit cu= getCompilationUnit("Completion", "src3", "test0074", "Test.js");
String str = cu.getSource();
String completeBehind = "test0074.p.ImportedClass.Inner.ZZ";
@@ -2093,13 +2093,13 @@ public void test0074() throws JavaModelException {
public void test0075() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0075/Test.java",
+ "/Completion/src3/test0075/Test.js",
"package test0075;\n" +
"public @QQAnnot class Test {\n" +
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/pkgannotations/QQAnnotation.java",
+ "/Completion/src/pkgannotations/QQAnnotation.js",
"package pkgannotations;"+
"public @interface QQAnnotation {\n"+
"}");
@@ -2117,13 +2117,13 @@ public void test0075() throws JavaModelException {
public void test0076() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0076/Test.java",
+ "/Completion/src3/test0076/Test.js",
"package test0076;\n" +
"public @QQAnnot class Test\n" +
"");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/pkgannotations/QQAnnotation.java",
+ "/Completion/src/pkgannotations/QQAnnotation.js",
"package pkgannotations;"+
"public @interface QQAnnotation {\n"+
"}");
@@ -2141,13 +2141,13 @@ public void test0076() throws JavaModelException {
public void test0077() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0077/Test.java",
+ "/Completion/src3/test0077/Test.js",
"package test0077;\n" +
"public @QQAnnot\n" +
"");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/pkgannotations/QQAnnotation.java",
+ "/Completion/src/pkgannotations/QQAnnotation.js",
"package pkgannotations;"+
"public @interface QQAnnotation {\n"+
"}");
@@ -2166,7 +2166,7 @@ public void test0077() throws JavaModelException {
public void test0078() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0078/Test.java",
+ "/Completion/src3/test0078/Test.js",
"package test0078;\n" +
"public class Test {\n" +
" public @QQAnnot void foo() {\n" +
@@ -2174,7 +2174,7 @@ public void test0078() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/pkgannotations/QQAnnotation.java",
+ "/Completion/src/pkgannotations/QQAnnotation.js",
"package pkgannotations;"+
"public @interface QQAnnotation {\n"+
"}");
@@ -2192,14 +2192,14 @@ public void test0078() throws JavaModelException {
public void test0079() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0078/Test.java",
+ "/Completion/src3/test0078/Test.js",
"package test0078;\n" +
"public class Test {\n" +
" public @QQAnnot void foo(\n" +
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/pkgannotations/QQAnnotation.java",
+ "/Completion/src/pkgannotations/QQAnnotation.js",
"package pkgannotations;"+
"public @interface QQAnnotation {\n"+
"}");
@@ -2217,14 +2217,14 @@ public void test0079() throws JavaModelException {
public void test0080() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0078/Test.java",
+ "/Completion/src3/test0078/Test.js",
"package test0078;\n" +
"public class Test {\n" +
" public @QQAnnot int var;\n" +
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/pkgannotations/QQAnnotation.java",
+ "/Completion/src/pkgannotations/QQAnnotation.js",
"package pkgannotations;"+
"public @interface QQAnnotation {\n"+
"}");
@@ -2242,14 +2242,14 @@ public void test0080() throws JavaModelException {
public void test0081() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0078/Test.java",
+ "/Completion/src3/test0078/Test.js",
"package test0078;\n" +
"public class Test {\n" +
" public @QQAnnot int var\n" +
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/pkgannotations/QQAnnotation.java",
+ "/Completion/src/pkgannotations/QQAnnotation.js",
"package pkgannotations;"+
"public @interface QQAnnotation {\n"+
"}");
@@ -2267,14 +2267,14 @@ public void test0081() throws JavaModelException {
public void test0082() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0078/Test.java",
+ "/Completion/src3/test0078/Test.js",
"package test0078;\n" +
"public class Test {\n" +
" void foo(@QQAnnot int i) {}\n" +
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/pkgannotations/QQAnnotation.java",
+ "/Completion/src/pkgannotations/QQAnnotation.js",
"package pkgannotations;"+
"public @interface QQAnnotation {\n"+
"}");
@@ -2293,14 +2293,14 @@ public void test0082() throws JavaModelException {
public void test0083() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0078/Test.java",
+ "/Completion/src3/test0078/Test.js",
"package test0078;\n" +
"public class Test {\n" +
" void foo() {@QQAnnot int i}\n" +
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/pkgannotations/QQAnnotation.java",
+ "/Completion/src/pkgannotations/QQAnnotation.js",
"package pkgannotations;"+
"public @interface QQAnnotation {\n"+
"}");
@@ -2320,7 +2320,7 @@ public void test0084() throws JavaModelException {
ICompilationUnit imported = null;
try {
imported = getWorkingCopy(
- "/Completion/src3/pkgstaticimport/MyClass0084.java",
+ "/Completion/src3/pkgstaticimport/MyClass0084.js",
"package pkgstaticimport;\n" +
"public class MyClass0084 {\n" +
" public static int foo() {return 0;}\n" +
@@ -2328,7 +2328,7 @@ public void test0084() throws JavaModelException {
"}");
CompletionResult result = complete(
- "/Completion/src3/test0084/Test.java",
+ "/Completion/src3/test0084/Test.js",
"package test0084;\n" +
"import static pkgstaticimport.MyClass0084.foo;\n" +
"public class Test {\n" +
@@ -2351,7 +2351,7 @@ public void test0084() throws JavaModelException {
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=85290
public void test0085() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0085/TestAnnotation.java",
+ "/Completion/src3/test0085/TestAnnotation.js",
"package test0085;\n" +
"public @interface TestAnnotation {\n" +
"}\n" +
@@ -2373,7 +2373,7 @@ public void test0085() throws JavaModelException {
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=85290
public void test0086() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/TestAnnotation.java",
+ "/Completion/src3/TestAnnotation.js",
"public @interface TestAnnotation {\n" +
"}\n" +
"@TestAnnotati\n" +
@@ -2394,7 +2394,7 @@ public void test0086() throws JavaModelException {
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=85402
public void test0087() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0087/TestAnnotation.java",
+ "/Completion/src3/test0087/TestAnnotation.js",
"package test0087;\n" +
"public @interface TestAnnotation {\n" +
"}\n" +
@@ -2421,7 +2421,7 @@ public void test0087() throws JavaModelException {
}
public void test0088() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0088/TestAnnotation.java",
+ "/Completion/src3/test0088/TestAnnotation.js",
"package test0088;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -2443,7 +2443,7 @@ public void test0088() throws JavaModelException {
}
public void test0089() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0089/TestAnnotation.java",
+ "/Completion/src3/test0089/TestAnnotation.js",
"package test0089;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -2466,7 +2466,7 @@ public void test0089() throws JavaModelException {
}
public void test0090() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0090/TestAnnotation.java",
+ "/Completion/src3/test0090/TestAnnotation.js",
"package test0090;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -2489,7 +2489,7 @@ public void test0090() throws JavaModelException {
}
public void test0091() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0091/TestAnnotation.java",
+ "/Completion/src3/test0091/TestAnnotation.js",
"package test0091;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -2514,7 +2514,7 @@ public void test0091() throws JavaModelException {
}
public void test0092() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0092/TestAnnotation.java",
+ "/Completion/src3/test0092/TestAnnotation.js",
"package test0092;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -2537,7 +2537,7 @@ public void test0092() throws JavaModelException {
}
public void test0093() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0093/TestAnnotation.java",
+ "/Completion/src3/test0093/TestAnnotation.js",
"package test0093;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -2561,7 +2561,7 @@ public void test0093() throws JavaModelException {
}
public void test0094() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0094/TestAnnotation.java",
+ "/Completion/src3/test0094/TestAnnotation.js",
"package test0094;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -2583,7 +2583,7 @@ public void test0094() throws JavaModelException {
}
public void test0095() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0095/TestAnnotation.java",
+ "/Completion/src3/test0095/TestAnnotation.js",
"package test0095;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -2606,7 +2606,7 @@ public void test0095() throws JavaModelException {
}
public void test0096() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0096/TestAnnotation.java",
+ "/Completion/src3/test0096/TestAnnotation.js",
"package test0096;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -2629,7 +2629,7 @@ public void test0096() throws JavaModelException {
}
public void test0097() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0097/TestAnnotation.java",
+ "/Completion/src3/test0097/TestAnnotation.js",
"package test0097;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -2654,7 +2654,7 @@ public void test0097() throws JavaModelException {
}
public void test0098() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0098/TestAnnotation.java",
+ "/Completion/src3/test0098/TestAnnotation.js",
"package test0098;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -2677,7 +2677,7 @@ public void test0098() throws JavaModelException {
}
public void test0099() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0099/TestAnnotation.java",
+ "/Completion/src3/test0099/TestAnnotation.js",
"package test0099;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -2701,7 +2701,7 @@ public void test0099() throws JavaModelException {
}
public void test0100() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0100/TestAnnotation.java",
+ "/Completion/src3/test0100/TestAnnotation.js",
"package test0100;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -2723,7 +2723,7 @@ public void test0100() throws JavaModelException {
}
public void test0101() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0101/TestAnnotation.java",
+ "/Completion/src3/test0101/TestAnnotation.js",
"package test00101;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -2746,7 +2746,7 @@ public void test0101() throws JavaModelException {
}
public void test0102() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0102/TestAnnotation.java",
+ "/Completion/src3/test0102/TestAnnotation.js",
"package test0102;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -2769,7 +2769,7 @@ public void test0102() throws JavaModelException {
}
public void test0103() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0103/TestAnnotation.java",
+ "/Completion/src3/test0103/TestAnnotation.js",
"package test00103;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -2794,7 +2794,7 @@ public void test0103() throws JavaModelException {
}
public void test0104() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0104/TestAnnotation.java",
+ "/Completion/src3/test0104/TestAnnotation.js",
"package test0104;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -2817,7 +2817,7 @@ public void test0104() throws JavaModelException {
}
public void test0105() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0105/TestAnnotation.java",
+ "/Completion/src3/test0105/TestAnnotation.js",
"package test0105;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -2841,7 +2841,7 @@ public void test0105() throws JavaModelException {
}
public void test0106() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0106/TestAnnotation.java",
+ "/Completion/src3/test0106/TestAnnotation.js",
"package test0106;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -2863,7 +2863,7 @@ public void test0106() throws JavaModelException {
}
public void test0107() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0107/TestAnnotation.java",
+ "/Completion/src3/test0107/TestAnnotation.js",
"package test0107;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -2886,7 +2886,7 @@ public void test0107() throws JavaModelException {
}
public void test0108() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0108/TestAnnotation.java",
+ "/Completion/src3/test0108/TestAnnotation.js",
"package test0108;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -2909,7 +2909,7 @@ public void test0108() throws JavaModelException {
}
public void test0109() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0109/TestAnnotation.java",
+ "/Completion/src3/test0109/TestAnnotation.js",
"package test0109;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -2934,7 +2934,7 @@ public void test0109() throws JavaModelException {
}
public void test0110() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0110/TestAnnotation.java",
+ "/Completion/src3/test0110/TestAnnotation.js",
"package test0110;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -2957,7 +2957,7 @@ public void test0110() throws JavaModelException {
}
public void test0111() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0111/TestAnnotation.java",
+ "/Completion/src3/test0111/TestAnnotation.js",
"package test0111;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -2981,7 +2981,7 @@ public void test0111() throws JavaModelException {
}
public void test0112() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0112/TestAnnotation.java",
+ "/Completion/src3/test0112/TestAnnotation.js",
"package test0112;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -3004,7 +3004,7 @@ public void test0112() throws JavaModelException {
}
public void test0113() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0113/TestAnnotation.java",
+ "/Completion/src3/test0113/TestAnnotation.js",
"package test0113;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -3028,7 +3028,7 @@ public void test0113() throws JavaModelException {
}
public void test0114() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0114/TestAnnotation.java",
+ "/Completion/src3/test0114/TestAnnotation.js",
"package test0114;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -3052,7 +3052,7 @@ public void test0114() throws JavaModelException {
}
public void test0115() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0115/TestAnnotation.java",
+ "/Completion/src3/test0115/TestAnnotation.js",
"package test0115;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -3078,7 +3078,7 @@ public void test0115() throws JavaModelException {
}
public void test0116() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0116/TestAnnotation.java",
+ "/Completion/src3/test0116/TestAnnotation.js",
"package test0116;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -3102,7 +3102,7 @@ public void test0116() throws JavaModelException {
}
public void test0117() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0117/TestAnnotation.java",
+ "/Completion/src3/test0117/TestAnnotation.js",
"package test0117;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -3127,7 +3127,7 @@ public void test0117() throws JavaModelException {
}
public void test0118() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0118/TestAnnotation.java",
+ "/Completion/src3/test0118/TestAnnotation.js",
"package test0118;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -3150,7 +3150,7 @@ public void test0118() throws JavaModelException {
}
public void test0119() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0119/TestAnnotation.java",
+ "/Completion/src3/test0119/TestAnnotation.js",
"package test0119;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -3174,7 +3174,7 @@ public void test0119() throws JavaModelException {
}
public void test0120() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0120/TestAnnotation.java",
+ "/Completion/src3/test0120/TestAnnotation.js",
"package test0120;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -3198,7 +3198,7 @@ public void test0120() throws JavaModelException {
}
public void test0121() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0121/TestAnnotation.java",
+ "/Completion/src3/test0121/TestAnnotation.js",
"package test0121;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -3224,7 +3224,7 @@ public void test0121() throws JavaModelException {
}
public void test0122() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0122/TestAnnotation.java",
+ "/Completion/src3/test0122/TestAnnotation.js",
"package test0122;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -3248,7 +3248,7 @@ public void test0122() throws JavaModelException {
}
public void test0123() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0123/TestAnnotation.java",
+ "/Completion/src3/test0123/TestAnnotation.js",
"package test0123;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -3273,7 +3273,7 @@ public void test0123() throws JavaModelException {
}
public void test0124() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0124/TestAnnotation.java",
+ "/Completion/src3/test0124/TestAnnotation.js",
"package test0124;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -3296,7 +3296,7 @@ public void test0124() throws JavaModelException {
}
public void test0125() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0125/TestAnnotation.java",
+ "/Completion/src3/test0125/TestAnnotation.js",
"package test0125;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -3320,7 +3320,7 @@ public void test0125() throws JavaModelException {
}
public void test0126() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0126/TestAnnotation.java",
+ "/Completion/src3/test0126/TestAnnotation.js",
"package test0126;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -3344,7 +3344,7 @@ public void test0126() throws JavaModelException {
}
public void test0127() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0127/TestAnnotation.java",
+ "/Completion/src3/test0127/TestAnnotation.js",
"package test0127;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -3370,7 +3370,7 @@ public void test0127() throws JavaModelException {
}
public void test0128() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0128/TestAnnotation.java",
+ "/Completion/src3/test0128/TestAnnotation.js",
"package test0128;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -3394,7 +3394,7 @@ public void test0128() throws JavaModelException {
}
public void test0129() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0129/TestAnnotation.java",
+ "/Completion/src3/test0129/TestAnnotation.js",
"package test0129;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -3419,7 +3419,7 @@ public void test0129() throws JavaModelException {
}
public void test0130() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0130/TestAnnotation.java",
+ "/Completion/src3/test0130/TestAnnotation.js",
"package test0130;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -3442,7 +3442,7 @@ public void test0130() throws JavaModelException {
}
public void test0131() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0131/TestAnnotation.java",
+ "/Completion/src3/test0131/TestAnnotation.js",
"package test0131;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -3466,7 +3466,7 @@ public void test0131() throws JavaModelException {
}
public void test0132() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0132/TestAnnotation.java",
+ "/Completion/src3/test0132/TestAnnotation.js",
"package test0132;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -3490,7 +3490,7 @@ public void test0132() throws JavaModelException {
}
public void test0133() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0133/TestAnnotation.java",
+ "/Completion/src3/test0133/TestAnnotation.js",
"package test0133;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -3516,7 +3516,7 @@ public void test0133() throws JavaModelException {
}
public void test0134() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src3/test0134/TestAnnotation.java",
+ "/Completion/src3/test0134/TestAnnotation.js",
"package test0134;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -3540,7 +3540,7 @@ public void test0134() throws JavaModelException {
}
public void test0135() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0135/TestAnnotation.java",
+ "/Completion/src3/test0135/TestAnnotation.js",
"package test0135;\n" +
"public @interface TestAnnotation {\n" +
" String foo1();\n" +
@@ -3562,14 +3562,14 @@ public void test0136() throws JavaModelException {
ICompilationUnit enumeration = null;
try {
enumeration = getWorkingCopy(
- "/Completion/src3/test0136/Colors.java",
+ "/Completion/src3/test0136/Colors.js",
"package test0136;\n" +
"public enum Colors {\n" +
" RED, BLUE, WHITE;\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0136/Test.java",
+ "/Completion/src3/test0136/Test.js",
"package test0136;\n" +
"public class Test {\n" +
" void bar(Colors c) {\n" +
@@ -3600,14 +3600,14 @@ public void test0137() throws JavaModelException {
ICompilationUnit enumeration = null;
try {
enumeration = getWorkingCopy(
- "/Completion/src3/test0137/Colors.java",
+ "/Completion/src3/test0137/Colors.js",
"package test0137;\n" +
"public enum Colors {\n" +
" RED, BLUE, WHITE;\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0137/Test.java",
+ "/Completion/src3/test0137/Test.js",
"package test0137;\n" +
"public class Test {\n" +
" void bar(Colors c) {\n" +
@@ -3639,14 +3639,14 @@ public void test0138() throws JavaModelException {
ICompilationUnit enumeration = null;
try {
enumeration = getWorkingCopy(
- "/Completion/src3/test0138/Colors.java",
+ "/Completion/src3/test0138/Colors.js",
"package test0138;\n" +
"public enum Colors {\n" +
" RED, BLUE, WHITE;\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0138/Test.java",
+ "/Completion/src3/test0138/Test.js",
"package test0138;\n" +
"public class Test {\n" +
" void bar(Colors c) {\n" +
@@ -3679,14 +3679,14 @@ public void test0139() throws JavaModelException {
ICompilationUnit enumeration = null;
try {
enumeration = getWorkingCopy(
- "/Completion/src3/test0139/Colors.java",
+ "/Completion/src3/test0139/Colors.js",
"package test0139;\n" +
"public enum Colors {\n" +
" RED, BLUE, WHITE;\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0139/Test.java",
+ "/Completion/src3/test0139/Test.js",
"package test0139;\n" +
"public class Test {\n" +
" void bar(Colors c) {\n" +
@@ -3718,14 +3718,14 @@ public void test0140() throws JavaModelException {
ICompilationUnit enumeration = null;
try {
enumeration = getWorkingCopy(
- "/Completion/src3/test0140/Colors.java",
+ "/Completion/src3/test0140/Colors.js",
"package test0140;\n" +
"public enum Colors {\n" +
" RED, BLUE, WHITE;\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0140/Test.java",
+ "/Completion/src3/test0140/Test.js",
"package test0140;\n" +
"public class Test {\n" +
" void bar(Colors c) {\n" +
@@ -3757,14 +3757,14 @@ public void test0141() throws JavaModelException {
ICompilationUnit enumeration = null;
try {
enumeration = getWorkingCopy(
- "/Completion/src3/test0141/Colors.java",
+ "/Completion/src3/test0141/Colors.js",
"package test0141;\n" +
"public class Colors {\n" +
" public final static int RED = 0, BLUE = 1, WHITE = 3;\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0141/Test.java",
+ "/Completion/src3/test0141/Test.js",
"package test0141;\n" +
"public class Test {\n" +
" void bar(Colors c) {\n" +
@@ -3798,7 +3798,7 @@ public void test0142() throws JavaModelException {
ICompilationUnit enumeration = null;
try {
enumeration = getWorkingCopy(
- "/Completion/src3/test0142/Colors.java",
+ "/Completion/src3/test0142/Colors.js",
"package test0142;\n" +
"public enum Colors {\n" +
" RED, BLUE, WHITE;\n" +
@@ -3806,7 +3806,7 @@ public void test0142() throws JavaModelException {
"}");
CompletionResult result = complete(
- "/Completion/src3/test0142/Test.java",
+ "/Completion/src3/test0142/Test.js",
"package test0142;\n" +
"public class Test {\n" +
" void bar(Colors REDc) {\n" +
@@ -3844,7 +3844,7 @@ public void test0143() throws JavaModelException {
JavaCore.setOptions(options);
enumeration = getWorkingCopy(
- "/Completion/src3/test0143/Colors.java",
+ "/Completion/src3/test0143/Colors.js",
"package test0143;\n" +
"public enum Colors {\n" +
" RED, BLUE, WHITE;\n" +
@@ -3852,7 +3852,7 @@ public void test0143() throws JavaModelException {
"}");
CompletionResult result = complete(
- "/Completion/src3/test0143/Test.java",
+ "/Completion/src3/test0143/Test.js",
"package test0143;\n" +
"public class Test {\n" +
" void bar() {\n" +
@@ -3886,7 +3886,7 @@ public void test0144() throws JavaModelException {
JavaCore.setOptions(options);
aClass = getWorkingCopy(
- "/Completion/src3/test0144/X.java",
+ "/Completion/src3/test0144/X.js",
"package test0144;\n" +
"public class X {\n" +
" public class Y {}\n" +
@@ -3894,7 +3894,7 @@ public void test0144() throws JavaModelException {
"}");
CompletionResult result = complete(
- "/Completion/src3/test0144/Test.java",
+ "/Completion/src3/test0144/Test.js",
"package test0144;\n" +
"public class Test extends X.\n" +
"{}",
@@ -3921,7 +3921,7 @@ public void test0145() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0145/ZZAnnotation.java",
+ "/Completion/src3/test0145/ZZAnnotation.js",
"package test0145;\n" +
"public @interface ZZAnnotation {\n" +
" int foo1();\n" +
@@ -3929,13 +3929,13 @@ public void test0145() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0145/ZZClass.java",
+ "/Completion/src3/test0145/ZZClass.js",
"package test0145;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0145/Test.java",
+ "/Completion/src3/test0145/Test.js",
"package test0145;\n" +
"@ZZAnnotation(foo1=ZZ)\n" +
"public class Test {\n" +
@@ -3967,7 +3967,7 @@ public void test0146() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0146/ZZAnnotation.java",
+ "/Completion/src3/test0146/ZZAnnotation.js",
"package test0146;\n" +
"public @interface ZZAnnotation {\n" +
" int foo1();\n" +
@@ -3975,13 +3975,13 @@ public void test0146() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0146/ZZClass.java",
+ "/Completion/src3/test0146/ZZClass.js",
"package test0146;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0146/Test.java",
+ "/Completion/src3/test0146/Test.js",
"package test0146;\n" +
"@ZZAnnotation(foo1= 0 + ZZ)\n" +
"public class Test {\n" +
@@ -4013,7 +4013,7 @@ public void test0147() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0147/ZZAnnotation.java",
+ "/Completion/src3/test0147/ZZAnnotation.js",
"package test0147;\n" +
"public @interface ZZAnnotation {\n" +
" int[] foo1();\n" +
@@ -4021,13 +4021,13 @@ public void test0147() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0147/ZZClass.java",
+ "/Completion/src3/test0147/ZZClass.js",
"package test0147;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0147/Test.java",
+ "/Completion/src3/test0147/Test.js",
"package test0147;\n" +
"@ZZAnnotation(foo1= {ZZ})\n" +
"public class Test {\n" +
@@ -4059,7 +4059,7 @@ public void test0148() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0148/ZZAnnotation.java",
+ "/Completion/src3/test0148/ZZAnnotation.js",
"package test0148;\n" +
"public @interface ZZAnnotation {\n" +
" int foo1();\n" +
@@ -4067,13 +4067,13 @@ public void test0148() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0148/ZZClass.java",
+ "/Completion/src3/test0148/ZZClass.js",
"package test0148;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0148/Test.java",
+ "/Completion/src3/test0148/Test.js",
"package test0148;\n" +
"@ZZAnnotation(foo1=ZZ\n" +
"public class Test {\n" +
@@ -4105,7 +4105,7 @@ public void test0149() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0149/ZZAnnotation.java",
+ "/Completion/src3/test0149/ZZAnnotation.js",
"package test0149;\n" +
"public @interface ZZAnnotation {\n" +
" int foo1();\n" +
@@ -4113,13 +4113,13 @@ public void test0149() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0149/ZZClass.java",
+ "/Completion/src3/test0149/ZZClass.js",
"package test0149;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0149/Test.java",
+ "/Completion/src3/test0149/Test.js",
"package test0149;\n" +
"@ZZAnnotation(foo1= 0 + ZZ\n" +
"public class Test {\n" +
@@ -4151,7 +4151,7 @@ public void test0150() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0150/ZZAnnotation.java",
+ "/Completion/src3/test0150/ZZAnnotation.js",
"package test0150;\n" +
"public @interface ZZAnnotation {\n" +
" int[] foo1();\n" +
@@ -4159,13 +4159,13 @@ public void test0150() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0150/ZZClass.java",
+ "/Completion/src3/test0150/ZZClass.js",
"package test0150;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0150/Test.java",
+ "/Completion/src3/test0150/Test.js",
"package test0150;\n" +
"@ZZAnnotation(foo1= {ZZ}\n" +
"public class Test {\n" +
@@ -4197,7 +4197,7 @@ public void test0151() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0151/ZZAnnotation.java",
+ "/Completion/src3/test0151/ZZAnnotation.js",
"package test0151;\n" +
"public @interface ZZAnnotation {\n" +
" int[] foo1();\n" +
@@ -4205,13 +4205,13 @@ public void test0151() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0151/ZZClass.java",
+ "/Completion/src3/test0151/ZZClass.js",
"package test0151;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0151/Test.java",
+ "/Completion/src3/test0151/Test.js",
"package test0151;\n" +
"@ZZAnnotation(foo1= {ZZ\n" +
"public class Test {\n" +
@@ -4243,7 +4243,7 @@ public void test0152() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0152/ZZAnnotation.java",
+ "/Completion/src3/test0152/ZZAnnotation.js",
"package test0152;\n" +
"public @interface ZZAnnotation {\n" +
" int foo1();\n" +
@@ -4251,13 +4251,13 @@ public void test0152() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0152/ZZClass.java",
+ "/Completion/src3/test0152/ZZClass.js",
"package test0152;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0152/Test.java",
+ "/Completion/src3/test0152/Test.js",
"package test0152;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -4291,7 +4291,7 @@ public void test0153() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0153/ZZAnnotation.java",
+ "/Completion/src3/test0153/ZZAnnotation.js",
"package test0153;\n" +
"public @interface ZZAnnotation {\n" +
" int foo1();\n" +
@@ -4299,13 +4299,13 @@ public void test0153() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0153/ZZClass.java",
+ "/Completion/src3/test0153/ZZClass.js",
"package test0153;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0153/Test.java",
+ "/Completion/src3/test0153/Test.js",
"package test0153;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -4339,7 +4339,7 @@ public void test0154() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0154/ZZAnnotation.java",
+ "/Completion/src3/test0154/ZZAnnotation.js",
"package test0154;\n" +
"public @interface ZZAnnotation {\n" +
" int[] foo1();\n" +
@@ -4347,13 +4347,13 @@ public void test0154() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0154/ZZClass.java",
+ "/Completion/src3/test0154/ZZClass.js",
"package test0154;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0154/Test.java",
+ "/Completion/src3/test0154/Test.js",
"package test0154;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -4387,7 +4387,7 @@ public void test0155() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0155/ZZAnnotation.java",
+ "/Completion/src3/test0155/ZZAnnotation.js",
"package test0155;\n" +
"public @interface ZZAnnotation {\n" +
" int foo1();\n" +
@@ -4395,13 +4395,13 @@ public void test0155() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0155/ZZClass.java",
+ "/Completion/src3/test0155/ZZClass.js",
"package test0155;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0155/Test.java",
+ "/Completion/src3/test0155/Test.js",
"package test0155;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -4435,7 +4435,7 @@ public void test0156() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0156/ZZAnnotation.java",
+ "/Completion/src3/test0156/ZZAnnotation.js",
"package test0156;\n" +
"public @interface ZZAnnotation {\n" +
" int foo1();\n" +
@@ -4443,13 +4443,13 @@ public void test0156() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0156/ZZClass.java",
+ "/Completion/src3/test0156/ZZClass.js",
"package test0156;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0156/Test.java",
+ "/Completion/src3/test0156/Test.js",
"package test0156;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -4483,7 +4483,7 @@ public void test0157() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0157/ZZAnnotation.java",
+ "/Completion/src3/test0157/ZZAnnotation.js",
"package test0157;\n" +
"public @interface ZZAnnotation {\n" +
" int[] foo1();\n" +
@@ -4491,13 +4491,13 @@ public void test0157() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0157/ZZClass.java",
+ "/Completion/src3/test0157/ZZClass.js",
"package test0157;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0157/Test.java",
+ "/Completion/src3/test0157/Test.js",
"package test0157;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -4531,7 +4531,7 @@ public void test0158() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0158/ZZAnnotation.java",
+ "/Completion/src3/test0158/ZZAnnotation.js",
"package test0158;\n" +
"public @interface ZZAnnotation {\n" +
" int[] foo1();\n" +
@@ -4539,13 +4539,13 @@ public void test0158() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0158/ZZClass.java",
+ "/Completion/src3/test0158/ZZClass.js",
"package test0158;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0158/Test.java",
+ "/Completion/src3/test0158/Test.js",
"package test0158;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -4579,7 +4579,7 @@ public void test0159() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0159/ZZAnnotation.java",
+ "/Completion/src3/test0159/ZZAnnotation.js",
"package test0159;\n" +
"public @interface ZZAnnotation {\n" +
" int foo1();\n" +
@@ -4587,13 +4587,13 @@ public void test0159() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0159/ZZClass.java",
+ "/Completion/src3/test0159/ZZClass.js",
"package test0159;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0159/Test.java",
+ "/Completion/src3/test0159/Test.js",
"package test0159;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -4627,7 +4627,7 @@ public void test0160() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0160/ZZAnnotation.java",
+ "/Completion/src3/test0160/ZZAnnotation.js",
"package test0160;\n" +
"public @interface ZZAnnotation {\n" +
" int foo1();\n" +
@@ -4635,13 +4635,13 @@ public void test0160() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0160/ZZClass.java",
+ "/Completion/src3/test0160/ZZClass.js",
"package test0160;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0160/Test.java",
+ "/Completion/src3/test0160/Test.js",
"package test0160;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -4675,7 +4675,7 @@ public void test0161() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0161/ZZAnnotation.java",
+ "/Completion/src3/test0161/ZZAnnotation.js",
"package test0161;\n" +
"public @interface ZZAnnotation {\n" +
" int[] foo1();\n" +
@@ -4683,13 +4683,13 @@ public void test0161() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0161/ZZClass.java",
+ "/Completion/src3/test0161/ZZClass.js",
"package test0161;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0161/Test.java",
+ "/Completion/src3/test0161/Test.js",
"package test0161;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -4723,7 +4723,7 @@ public void test0162() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0162/ZZAnnotation.java",
+ "/Completion/src3/test0162/ZZAnnotation.js",
"package test0162;\n" +
"public @interface ZZAnnotation {\n" +
" int foo1();\n" +
@@ -4731,13 +4731,13 @@ public void test0162() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0162/ZZClass.java",
+ "/Completion/src3/test0162/ZZClass.js",
"package test0162;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0162/Test.java",
+ "/Completion/src3/test0162/Test.js",
"package test0162;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -4771,7 +4771,7 @@ public void test0163() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0163/ZZAnnotation.java",
+ "/Completion/src3/test0163/ZZAnnotation.js",
"package test0163;\n" +
"public @interface ZZAnnotation {\n" +
" int foo1();\n" +
@@ -4779,13 +4779,13 @@ public void test0163() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0163/ZZClass.java",
+ "/Completion/src3/test0163/ZZClass.js",
"package test0163;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0163/Test.java",
+ "/Completion/src3/test0163/Test.js",
"package test0163;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -4819,7 +4819,7 @@ public void test0164() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0164/ZZAnnotation.java",
+ "/Completion/src3/test0164/ZZAnnotation.js",
"package test0164;\n" +
"public @interface ZZAnnotation {\n" +
" int[] foo1();\n" +
@@ -4827,13 +4827,13 @@ public void test0164() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0164/ZZClass.java",
+ "/Completion/src3/test0164/ZZClass.js",
"package test0164;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0164/Test.java",
+ "/Completion/src3/test0164/Test.js",
"package test0164;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -4867,7 +4867,7 @@ public void test0165() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0165/ZZAnnotation.java",
+ "/Completion/src3/test0165/ZZAnnotation.js",
"package test0165;\n" +
"public @interface ZZAnnotation {\n" +
" int[] foo1();\n" +
@@ -4875,13 +4875,13 @@ public void test0165() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0165/ZZClass.java",
+ "/Completion/src3/test0165/ZZClass.js",
"package test0165;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0165/Test.java",
+ "/Completion/src3/test0165/Test.js",
"package test0165;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -4915,7 +4915,7 @@ public void test0166() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0166/ZZAnnotation.java",
+ "/Completion/src3/test0166/ZZAnnotation.js",
"package test0166;\n" +
"public @interface ZZAnnotation {\n" +
" int foo1();\n" +
@@ -4923,13 +4923,13 @@ public void test0166() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0166/ZZClass.java",
+ "/Completion/src3/test0166/ZZClass.js",
"package test0166;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0166/Test.java",
+ "/Completion/src3/test0166/Test.js",
"package test0166;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -4965,7 +4965,7 @@ public void test0167() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0167/ZZAnnotation.java",
+ "/Completion/src3/test0167/ZZAnnotation.js",
"package test0167;\n" +
"public @interface ZZAnnotation {\n" +
" int foo1();\n" +
@@ -4973,13 +4973,13 @@ public void test0167() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0167/ZZClass.java",
+ "/Completion/src3/test0167/ZZClass.js",
"package test0167;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0167/Test.java",
+ "/Completion/src3/test0167/Test.js",
"package test0167;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -5015,7 +5015,7 @@ public void test0168() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0168/ZZAnnotation.java",
+ "/Completion/src3/test0168/ZZAnnotation.js",
"package test0168;\n" +
"public @interface ZZAnnotation {\n" +
" int[] foo1();\n" +
@@ -5023,13 +5023,13 @@ public void test0168() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0168/ZZClass.java",
+ "/Completion/src3/test0168/ZZClass.js",
"package test0168;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0168/Test.java",
+ "/Completion/src3/test0168/Test.js",
"package test0168;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -5065,7 +5065,7 @@ public void test0169() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0169/ZZAnnotation.java",
+ "/Completion/src3/test0169/ZZAnnotation.js",
"package test0169;\n" +
"public @interface ZZAnnotation {\n" +
" int foo1();\n" +
@@ -5073,13 +5073,13 @@ public void test0169() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0169/ZZClass.java",
+ "/Completion/src3/test0169/ZZClass.js",
"package test0169;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0169/Test.java",
+ "/Completion/src3/test0169/Test.js",
"package test0169;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -5115,7 +5115,7 @@ public void test0170() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0170/ZZAnnotation.java",
+ "/Completion/src3/test0170/ZZAnnotation.js",
"package test0170;\n" +
"public @interface ZZAnnotation {\n" +
" int foo1();\n" +
@@ -5123,13 +5123,13 @@ public void test0170() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0170/ZZClass.java",
+ "/Completion/src3/test0170/ZZClass.js",
"package test0170;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0170/Test.java",
+ "/Completion/src3/test0170/Test.js",
"package test0170;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -5165,7 +5165,7 @@ public void test0171() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0171/ZZAnnotation.java",
+ "/Completion/src3/test0171/ZZAnnotation.js",
"package test0171;\n" +
"public @interface ZZAnnotation {\n" +
" int[] foo1();\n" +
@@ -5173,13 +5173,13 @@ public void test0171() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0171/ZZClass.java",
+ "/Completion/src3/test0171/ZZClass.js",
"package test0171;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0171/Test.java",
+ "/Completion/src3/test0171/Test.js",
"package test0171;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -5215,7 +5215,7 @@ public void test0172() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0172/ZZAnnotation.java",
+ "/Completion/src3/test0172/ZZAnnotation.js",
"package test0172;\n" +
"public @interface ZZAnnotation {\n" +
" int[] foo1();\n" +
@@ -5223,13 +5223,13 @@ public void test0172() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0172/ZZClass.java",
+ "/Completion/src3/test0172/ZZClass.js",
"package test0172;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0172/Test.java",
+ "/Completion/src3/test0172/Test.js",
"package test0172;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -5265,7 +5265,7 @@ public void test0173() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0173/ZZAnnotation.java",
+ "/Completion/src3/test0173/ZZAnnotation.js",
"package test0173;\n" +
"public @interface ZZAnnotation {\n" +
" int foo1();\n" +
@@ -5273,13 +5273,13 @@ public void test0173() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0173/ZZClass.java",
+ "/Completion/src3/test0173/ZZClass.js",
"package test0173;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0173/Test.java",
+ "/Completion/src3/test0173/Test.js",
"package test0173;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -5313,7 +5313,7 @@ public void test0174() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0174/ZZAnnotation.java",
+ "/Completion/src3/test0174/ZZAnnotation.js",
"package test0174;\n" +
"public @interface ZZAnnotation {\n" +
" int foo1();\n" +
@@ -5321,13 +5321,13 @@ public void test0174() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0174/ZZClass.java",
+ "/Completion/src3/test0174/ZZClass.js",
"package test0174;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0174/Test.java",
+ "/Completion/src3/test0174/Test.js",
"package test0174;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -5361,7 +5361,7 @@ public void test0175() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0175/ZZAnnotation.java",
+ "/Completion/src3/test0175/ZZAnnotation.js",
"package test0175;\n" +
"public @interface ZZAnnotation {\n" +
" int[] foo1();\n" +
@@ -5369,13 +5369,13 @@ public void test0175() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0175/ZZClass.java",
+ "/Completion/src3/test0175/ZZClass.js",
"package test0175;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0175/Test.java",
+ "/Completion/src3/test0175/Test.js",
"package test0175;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -5409,7 +5409,7 @@ public void test0176() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0176/ZZAnnotation.java",
+ "/Completion/src3/test0176/ZZAnnotation.js",
"package test0176;\n" +
"public @interface ZZAnnotation {\n" +
" int foo1();\n" +
@@ -5417,13 +5417,13 @@ public void test0176() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0176/ZZClass.java",
+ "/Completion/src3/test0176/ZZClass.js",
"package test0176;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0176/Test.java",
+ "/Completion/src3/test0176/Test.js",
"package test0176;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -5457,7 +5457,7 @@ public void test0177() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0177/ZZAnnotation.java",
+ "/Completion/src3/test0177/ZZAnnotation.js",
"package test0177;\n" +
"public @interface ZZAnnotation {\n" +
" int foo1();\n" +
@@ -5465,13 +5465,13 @@ public void test0177() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0177/ZZClass.java",
+ "/Completion/src3/test0177/ZZClass.js",
"package test0177;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0177/Test.java",
+ "/Completion/src3/test0177/Test.js",
"package test0177;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -5505,7 +5505,7 @@ public void test0178() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0178/ZZAnnotation.java",
+ "/Completion/src3/test0178/ZZAnnotation.js",
"package test0178;\n" +
"public @interface ZZAnnotation {\n" +
" int[] foo1();\n" +
@@ -5513,13 +5513,13 @@ public void test0178() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0178/ZZClass.java",
+ "/Completion/src3/test0178/ZZClass.js",
"package test0178;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0178/Test.java",
+ "/Completion/src3/test0178/Test.js",
"package test0178;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -5553,7 +5553,7 @@ public void test0179() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0179/ZZAnnotation.java",
+ "/Completion/src3/test0179/ZZAnnotation.js",
"package test0179;\n" +
"public @interface ZZAnnotation {\n" +
" int[] foo1();\n" +
@@ -5561,13 +5561,13 @@ public void test0179() throws JavaModelException {
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0179/ZZClass.java",
+ "/Completion/src3/test0179/ZZClass.js",
"package test0179;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0179/Test.java",
+ "/Completion/src3/test0179/Test.js",
"package test0179;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -5601,20 +5601,20 @@ public void test0180() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0180/ZZAnnotation.java",
+ "/Completion/src3/test0180/ZZAnnotation.js",
"package test0180;\n" +
"public @interface ZZAnnotation {\n" +
" int value();\n" +
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0180/ZZClass.java",
+ "/Completion/src3/test0180/ZZClass.js",
"package test0180;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0180/Test.java",
+ "/Completion/src3/test0180/Test.js",
"package test0180;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -5649,20 +5649,20 @@ public void test0181() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0181/ZZAnnotation.java",
+ "/Completion/src3/test0181/ZZAnnotation.js",
"package test0181;\n" +
"public @interface ZZAnnotation {\n" +
" int value();\n" +
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0181/ZZClass.java",
+ "/Completion/src3/test0181/ZZClass.js",
"package test0181;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0181/Test.java",
+ "/Completion/src3/test0181/Test.js",
"package test0181;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -5697,20 +5697,20 @@ public void test0182() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0182/ZZAnnotation.java",
+ "/Completion/src3/test0182/ZZAnnotation.js",
"package test0182;\n" +
"public @interface ZZAnnotation {\n" +
" int[] value();\n" +
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0182/ZZClass.java",
+ "/Completion/src3/test0182/ZZClass.js",
"package test0182;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0182/Test.java",
+ "/Completion/src3/test0182/Test.js",
"package test0182;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -5745,20 +5745,20 @@ public void test0183() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0183/ZZAnnotation.java",
+ "/Completion/src3/test0183/ZZAnnotation.js",
"package test0183;\n" +
"public @interface ZZAnnotation {\n" +
" int value();\n" +
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0183/ZZClass.java",
+ "/Completion/src3/test0183/ZZClass.js",
"package test0183;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0183/Test.java",
+ "/Completion/src3/test0183/Test.js",
"package test0183;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -5793,20 +5793,20 @@ public void test0184() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0184/ZZAnnotation.java",
+ "/Completion/src3/test0184/ZZAnnotation.js",
"package test0184;\n" +
"public @interface ZZAnnotation {\n" +
" int value();\n" +
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0184/ZZClass.java",
+ "/Completion/src3/test0184/ZZClass.js",
"package test0184;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0184/Test.java",
+ "/Completion/src3/test0184/Test.js",
"package test0184;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -5841,20 +5841,20 @@ public void test0185() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0185/ZZAnnotation.java",
+ "/Completion/src3/test0185/ZZAnnotation.js",
"package test0185;\n" +
"public @interface ZZAnnotation {\n" +
" int[] value();\n" +
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0185/ZZClass.java",
+ "/Completion/src3/test0185/ZZClass.js",
"package test0185;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0185/Test.java",
+ "/Completion/src3/test0185/Test.js",
"package test0185;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -5889,20 +5889,20 @@ public void test0186() throws JavaModelException {
ICompilationUnit aClass = null;
try {
anAnnotation = getWorkingCopy(
- "/Completion/src3/test0186/ZZAnnotation.java",
+ "/Completion/src3/test0186/ZZAnnotation.js",
"package test0186;\n" +
"public @interface ZZAnnotation {\n" +
" int[] value();\n" +
"}");
aClass = getWorkingCopy(
- "/Completion/src3/test0186/ZZClass.java",
+ "/Completion/src3/test0186/ZZClass.js",
"package test0186;\n" +
"public class ZZClass {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0186/Test.java",
+ "/Completion/src3/test0186/Test.js",
"package test0186;\n" +
"public class Test {\n" +
" public static final int zzint = 0;\n" +
@@ -5934,7 +5934,7 @@ public void test0186() throws JavaModelException {
// completion test with capture
public void test0187() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0187/Test.java",
+ "/Completion/src3/test0187/Test.js",
"package test0187;\n" +
"public class Test<U> {\n" +
" void bar(ZZClass1<? extends U> var) {\n" +
@@ -5962,7 +5962,7 @@ public void test0187() throws JavaModelException {
// completion test with capture
public void test0188() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0188/Test.java",
+ "/Completion/src3/test0188/Test.js",
"package test0188;\n" +
"public class Test<U> {\n" +
" ZZClass1<? extends U> var1;\n" +
@@ -5991,7 +5991,7 @@ public void test0188() throws JavaModelException {
// completion test with capture
public void test0189() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0189/Test.java",
+ "/Completion/src3/test0189/Test.js",
"package test0189;\n" +
"public class Test<U> {\n" +
" void bar(ZZClass3 var) {\n" +
@@ -6017,7 +6017,7 @@ public void test0189() throws JavaModelException {
// completion test with capture
public void test0190() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0190/Test.java",
+ "/Completion/src3/test0190/Test.js",
"package test0190;\n" +
"public class Test<U> {\n" +
" ZZClass1<? extends U> var1\n" +
@@ -6051,7 +6051,7 @@ public void test0190() throws JavaModelException {
// completion test with capture
public void test0191() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0191/Test.java",
+ "/Completion/src3/test0191/Test.js",
"package test0191;\n" +
"public class Test<U> {\n" +
" ZZClass1<? extends U> var1;\n" +
@@ -6079,7 +6079,7 @@ public void test0191() throws JavaModelException {
}
public void test0192() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0192/Test.java",
+ "/Completion/src3/test0192/Test.js",
"package test0192;\n" +
"class ZZClass1<X,Y> {\n" +
"}\n" +
@@ -6099,7 +6099,7 @@ public void test0192() throws JavaModelException {
}
public void test0193() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0193/Test.java",
+ "/Completion/src3/test0193/Test.js",
"package test0193;\n" +
"class ZZClass1<X,Y> {\n" +
"}\n" +
@@ -6121,7 +6121,7 @@ public void test0193() throws JavaModelException {
}
public void test0194() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0194/Test.java",
+ "/Completion/src3/test0194/Test.js",
"package test0194;\n" +
"class ZZClass1<X,Y> {\n" +
"}\n" +
@@ -6141,7 +6141,7 @@ public void test0194() throws JavaModelException {
}
public void test0195() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0195/Test.java",
+ "/Completion/src3/test0195/Test.js",
"package test0195;\n" +
"class ZZClass1<X,Y> {\n" +
"}\n" +
@@ -6163,7 +6163,7 @@ public void test0195() throws JavaModelException {
}
public void test0196() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0196/Test.java",
+ "/Completion/src3/test0196/Test.js",
"package test0196;\n" +
"class ZZAnnot {\n" +
" int foo1();\n" +
@@ -6185,7 +6185,7 @@ public void test0196() throws JavaModelException {
}
public void test0196b() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0196/Test.java",
+ "/Completion/src3/test0196/Test.js",
"package test0196;\n" +
"@interface ZZAnnot {\n" +
" int foo1();\n" +
@@ -6208,7 +6208,7 @@ public void test0196b() throws JavaModelException {
}
public void test0197() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0197/Test.java",
+ "/Completion/src3/test0197/Test.js",
"package test0197;\n" +
"class ZZAnnot {\n" +
" int foo1();\n" +
@@ -6231,7 +6231,7 @@ public void test0197() throws JavaModelException {
}
public void test0197b() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0197/Test.java",
+ "/Completion/src3/test0197/Test.js",
"package test0197;\n" +
"@interface ZZAnnot {\n" +
" int foo1();\n" +
@@ -6255,7 +6255,7 @@ public void test0197b() throws JavaModelException {
}
public void test0198() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0198/Test.java",
+ "/Completion/src3/test0198/Test.js",
"package test0198;\n" +
"class ZZAnnot {\n" +
" int foo1();\n" +
@@ -6278,7 +6278,7 @@ public void test0198() throws JavaModelException {
}
public void test0198b() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0198/Test.java",
+ "/Completion/src3/test0198/Test.js",
"package test0198;\n" +
"@interface ZZAnnot {\n" +
" int foo1();\n" +
@@ -6302,7 +6302,7 @@ public void test0198b() throws JavaModelException {
}
public void test0199() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0199/Test.java",
+ "/Completion/src3/test0199/Test.js",
"package test0199;\n" +
"class ZZAnnot {\n" +
" int foo1();\n" +
@@ -6324,7 +6324,7 @@ public void test0199() throws JavaModelException {
}
public void test0199b() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0199/Test.java",
+ "/Completion/src3/test0199/Test.js",
"package test0199;\n" +
"@interface ZZAnnot {\n" +
" int foo1();\n" +
@@ -6346,7 +6346,7 @@ public void test0199b() throws JavaModelException {
}
public void test0200() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0200/Test.java",
+ "/Completion/src3/test0200/Test.js",
"package test0200;\n" +
"class ZZAnnot {\n" +
" int foo1();\n" +
@@ -6369,7 +6369,7 @@ public void test0200() throws JavaModelException {
}
public void test0200b() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0200/Test.java",
+ "/Completion/src3/test0200/Test.js",
"package test0200;\n" +
"@interface ZZAnnot {\n" +
" int foo1();\n" +
@@ -6392,7 +6392,7 @@ public void test0200b() throws JavaModelException {
}
public void test0201() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0201/Test.java",
+ "/Completion/src3/test0201/Test.js",
"package test0201;\n" +
"class ZZAnnot {\n" +
" int foo1();\n" +
@@ -6415,7 +6415,7 @@ public void test0201() throws JavaModelException {
}
public void test0201b() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0201/Test.java",
+ "/Completion/src3/test0201/Test.js",
"package test0201;\n" +
"@interface ZZAnnot {\n" +
" int foo1();\n" +
@@ -6440,7 +6440,7 @@ public void test0202() throws JavaModelException {
ICompilationUnit aType = null;
try {
aType = getWorkingCopy(
- "/Completion/src3/p/ZZType.java",
+ "/Completion/src3/p/ZZType.js",
"package p;\n" +
"public class ZZType {\n" +
" public class ZZClass {" +
@@ -6454,7 +6454,7 @@ public void test0202() throws JavaModelException {
"}");
CompletionResult result = complete(
- "/Completion/src3/test0202/Test.java",
+ "/Completion/src3/test0202/Test.js",
"package test0202;\n" +
"public class Test {\n" +
" public void foo() {" +
@@ -6486,7 +6486,7 @@ public void test0203() throws JavaModelException {
ICompilationUnit aType = null;
try {
aType = getWorkingCopy(
- "/Completion/src3/p/ZZType.java",
+ "/Completion/src3/p/ZZType.js",
"package p;\n" +
"public class ZZType {\n" +
" public class ZZClass {" +
@@ -6500,7 +6500,7 @@ public void test0203() throws JavaModelException {
"}");
CompletionResult result = complete(
- "/Completion/src3/test0203/Test.java",
+ "/Completion/src3/test0203/Test.js",
"package test0203;\n" +
"public class Test extends ZZ{\n" +
"}",
@@ -6526,7 +6526,7 @@ public void test0204() throws JavaModelException {
ICompilationUnit aType = null;
try {
aType = getWorkingCopy(
- "/Completion/src3/p/ZZType.java",
+ "/Completion/src3/p/ZZType.js",
"package p;\n" +
"public class ZZType {\n" +
" public class ZZClass {" +
@@ -6540,7 +6540,7 @@ public void test0204() throws JavaModelException {
"}");
CompletionResult result = complete(
- "/Completion/src3/test0204/Test.java",
+ "/Completion/src3/test0204/Test.js",
"package test0204;\n" +
"public interface Test extends ZZ{\n" +
"}",
@@ -6566,7 +6566,7 @@ public void test0205() throws JavaModelException {
ICompilationUnit aType = null;
try {
aType = getWorkingCopy(
- "/Completion/src3/p/ZZType.java",
+ "/Completion/src3/p/ZZType.js",
"package p;\n" +
"public class ZZType {\n" +
" public class ZZClass {" +
@@ -6580,7 +6580,7 @@ public void test0205() throws JavaModelException {
"}");
CompletionResult result = complete(
- "/Completion/src3/test0205/Test.java",
+ "/Completion/src3/test0205/Test.js",
"package test0205;\n" +
"public class Test implements ZZ {\n" +
"}",
@@ -6606,7 +6606,7 @@ public void test0206() throws JavaModelException {
ICompilationUnit aType = null;
try {
aType = getWorkingCopy(
- "/Completion/src3/p/ZZType.java",
+ "/Completion/src3/p/ZZType.js",
"package p;\n" +
"public class ZZType {\n" +
" public class ZZClass {" +
@@ -6620,7 +6620,7 @@ public void test0206() throws JavaModelException {
"}");
CompletionResult result = complete(
- "/Completion/src3/test0206/Test.java",
+ "/Completion/src3/test0206/Test.js",
"package test0206;\n" +
"@ZZ\n" +
"public class Test {\n" +
@@ -6647,13 +6647,13 @@ public void test0207() throws JavaModelException {
ICompilationUnit aType = null;
try {
aType = getWorkingCopy(
- "/Completion/src3/p/Annot.java",
+ "/Completion/src3/p/Annot.js",
"package p;\n" +
"public @interface Annot {\n" +
"}");
CompletionResult result = complete(
- "/Completion/src3/test0207/Test.java",
+ "/Completion/src3/test0207/Test.js",
"package test0206;\n" +
"@p.Annot\n",
"@p.Annot");
@@ -6677,12 +6677,12 @@ public void test0208() throws JavaModelException {
ICompilationUnit aType = null;
try {
aType = getWorkingCopy(
- "/Completion/src3/p/Colors.java",
+ "/Completion/src3/p/Colors.js",
"package p;\n" +
"public enum Colors { BLACK, BLUE, WHITE, RED }\n");
CompletionResult result = complete(
- "/Completion/src3/test0208/Test.java",
+ "/Completion/src3/test0208/Test.js",
"package test0208;\n" +
"public class Test {\n" +
" static final String BLANK = \" \";\n" +
@@ -6720,7 +6720,7 @@ public void test0209() throws JavaModelException {
ICompilationUnit importedClass = null;
try {
importedClass = getWorkingCopy(
- "/Completion/src3/test0209/p/ImportedClass.java",
+ "/Completion/src3/test0209/p/ImportedClass.js",
"package test0209.p;\n"+
"\n"+
"public class ImportedClass {\n"+
@@ -6729,7 +6729,7 @@ public void test0209() throws JavaModelException {
"}");
CompletionResult result = complete(
- "/Completion/src3/test0209/Test.java",
+ "/Completion/src3/test0209/Test.js",
"package test0209;\n" +
"\n" +
"import static Imported\n" +
@@ -6762,7 +6762,7 @@ public void test0210() throws JavaModelException {
ICompilationUnit importedClass = null;
try {
importedClass = getWorkingCopy(
- "/Completion/src3/test0210/p/ImportedClass.java",
+ "/Completion/src3/test0210/p/ImportedClass.js",
"package test0210.p;\n"+
"\n"+
"public class ImportedClass {\n"+
@@ -6771,7 +6771,7 @@ public void test0210() throws JavaModelException {
"}");
CompletionResult result = complete(
- "/Completion/src3/test0210/Test.java",
+ "/Completion/src3/test0210/Test.js",
"package test0210;\n" +
"\n" +
"import static test0210.p.ImportedClass.Im\n" +
@@ -6803,7 +6803,7 @@ public void test0211() throws JavaModelException {
ICompilationUnit importedClass = null;
try {
importedClass = getWorkingCopy(
- "/Completion/src3/test0211/p/ImportedClass.java",
+ "/Completion/src3/test0211/p/ImportedClass.js",
"package test0211.p;\n"+
"\n"+
"public class ImportedClass {\n"+
@@ -6812,7 +6812,7 @@ public void test0211() throws JavaModelException {
"}");
CompletionResult result = complete(
- "/Completion/src3/test0211/Test.java",
+ "/Completion/src3/test0211/Test.js",
"package test0211;\n" +
"\n" +
"import static test0211.p.ImportedClass.Im\n" +
@@ -6844,7 +6844,7 @@ public void test0212() throws JavaModelException {
ICompilationUnit importedClass = null;
try {
importedClass = getWorkingCopy(
- "/Completion/src3/test0212/p/ImportedClass.java",
+ "/Completion/src3/test0212/p/ImportedClass.js",
"package test0212.p;\n"+
"\n"+
"public class ImportedClass {\n"+
@@ -6853,7 +6853,7 @@ public void test0212() throws JavaModelException {
"}");
CompletionResult result = complete(
- "/Completion/src3/test0212/Test.java",
+ "/Completion/src3/test0212/Test.js",
"package test0212;\n" +
"\n" +
"import test0212.p.Im\n" +
@@ -6885,14 +6885,14 @@ public void test0213() throws JavaModelException {
ICompilationUnit importedClass = null;
try {
importedClass = getWorkingCopy(
- "/Completion/src3/test0213/p/ImportedClass.java",
+ "/Completion/src3/test0213/p/ImportedClass.js",
"package test0213.p;\n"+
"\n"+
"public class ImportedClass {\n"+
"}");
CompletionResult result = complete(
- "/Completion/src3/test0213/Test.java",
+ "/Completion/src3/test0213/Test.js",
"package test0213;\n" +
"\n" +
"import test0213.p.Im\n" +
@@ -6926,21 +6926,21 @@ public void test0214() throws JavaModelException {
ICompilationUnit superClass = null;
try {
paramClass1 = getWorkingCopy(
- "/Completion/src3/test0214/AClass1.java",
+ "/Completion/src3/test0214/AClass1.js",
"package test0214;\n"+
"\n"+
"public class AClass1 {\n"+
"}");
paramClass2 = getWorkingCopy(
- "/Completion/src3/test0214/AClass2.java",
+ "/Completion/src3/test0214/AClass2.js",
"package test0214;\n"+
"\n"+
"public class AClass2 {\n"+
"}");
superClass = getWorkingCopy(
- "/Completion/src3/test0214/SuperClass.java",
+ "/Completion/src3/test0214/SuperClass.js",
"package test0214;\n"+
"\n"+
"public class SuperClass<T> {\n"+
@@ -6951,7 +6951,7 @@ public void test0214() throws JavaModelException {
"}");
CompletionResult result = complete(
- "/Completion/src3/test0214/Test.java",
+ "/Completion/src3/test0214/Test.js",
"package test0214;\n" +
"\n" +
"public class Test<Z> extends SuperClass<Z>{\n" +
@@ -6990,7 +6990,7 @@ public void test0215() throws JavaModelException {
ICompilationUnit superClass = null;
try {
paramClass = getWorkingCopy(
- "/Completion/src3/test0215/p/ParamClass.java",
+ "/Completion/src3/test0215/p/ParamClass.js",
"package test0215.p;\n"+
"\n"+
"public class ParamClass {\n"+
@@ -6999,7 +6999,7 @@ public void test0215() throws JavaModelException {
"}");
superClass = getWorkingCopy(
- "/Completion/src3/test0215/SuperClass.java",
+ "/Completion/src3/test0215/SuperClass.js",
"package test0215;\n"+
"\n"+
"public class SuperClass<T> {\n"+
@@ -7009,7 +7009,7 @@ public void test0215() throws JavaModelException {
"}");
CompletionResult result = complete(
- "/Completion/src3/test0215/Test.java",
+ "/Completion/src3/test0215/Test.js",
"package test0215;\n" +
"\n" +
"public class Test<Z> extends SuperClass<Z>{\n" +
@@ -7045,21 +7045,21 @@ public void test0216() throws JavaModelException {
ICompilationUnit superClass = null;
try {
paramClass1 = getWorkingCopy(
- "/Completion/src3/test0216/p/ParamClass.java",
+ "/Completion/src3/test0216/p/ParamClass.js",
"package test0216.p;\n"+
"\n"+
"public class ParamClass {\n"+
"}");
paramClass2 = getWorkingCopy(
- "/Completion/src3/test0216/q/ParamClass.java",
+ "/Completion/src3/test0216/q/ParamClass.js",
"package test0216.q;\n"+
"\n"+
"public class ParamClass {\n"+
"}");
superClass = getWorkingCopy(
- "/Completion/src3/test0216/SuperClass.java",
+ "/Completion/src3/test0216/SuperClass.js",
"package test0216;\n"+
"\n"+
"public class SuperClass<T> {\n"+
@@ -7070,7 +7070,7 @@ public void test0216() throws JavaModelException {
"}");
CompletionResult result = complete(
- "/Completion/src3/test0216/Test.java",
+ "/Completion/src3/test0216/Test.js",
"package test0216;\n" +
"\n" +
"public class Test<Z> extends SuperClass<Z>{\n" +
@@ -7108,7 +7108,7 @@ public void test0217() throws JavaModelException {
ICompilationUnit paramClass1 = null;
try {
paramClass1 = getWorkingCopy(
- "/Completion/src3/test0217/AType.java",
+ "/Completion/src3/test0217/AType.js",
"package test0217;\n"+
"\n"+
"public class AType<T> {\n"+
@@ -7117,7 +7117,7 @@ public void test0217() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0217/Test.java",
+ "/Completion/src3/test0217/Test.js",
"package test0217;\n" +
"\n" +
"public class Test {\n" +
@@ -7147,7 +7147,7 @@ public void test0218() throws JavaModelException {
ICompilationUnit paramClass1 = null;
try {
paramClass1 = getWorkingCopy(
- "/Completion/src3/test0218/AType.java",
+ "/Completion/src3/test0218/AType.js",
"package test0218;\n"+
"\n"+
"public class AType<T> {\n"+
@@ -7156,7 +7156,7 @@ public void test0218() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0218/Test.java",
+ "/Completion/src3/test0218/Test.js",
"package test0218;\n" +
"\n" +
"public class Test {\n" +
@@ -7186,7 +7186,7 @@ public void test0219() throws JavaModelException {
ICompilationUnit paramClass1 = null;
try {
paramClass1 = getWorkingCopy(
- "/Completion/src3/test0219/AType.java",
+ "/Completion/src3/test0219/AType.js",
"package test0219;\n"+
"\n"+
"public class AType<T> {\n"+
@@ -7195,7 +7195,7 @@ public void test0219() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0219/Test.java",
+ "/Completion/src3/test0219/Test.js",
"package test0219;\n" +
"\n" +
"public class Test {\n" +
@@ -7227,7 +7227,7 @@ public void test0220() throws JavaModelException {
ICompilationUnit paramClass1 = null;
try {
paramClass1 = getWorkingCopy(
- "/Completion/src3/test0220/AType.java",
+ "/Completion/src3/test0220/AType.js",
"package test0220;\n"+
"\n"+
"public class AType<T> {\n"+
@@ -7236,7 +7236,7 @@ public void test0220() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0220/Test.java",
+ "/Completion/src3/test0220/Test.js",
"package test0220;\n" +
"\n" +
"public class Test {\n" +
@@ -7265,7 +7265,7 @@ public void test0221() throws JavaModelException {
ICompilationUnit paramClass1 = null;
try {
paramClass1 = getWorkingCopy(
- "/Completion/src3/test0221/AType.java",
+ "/Completion/src3/test0221/AType.js",
"package test0221;\n"+
"\n"+
"public class AType<T> {\n"+
@@ -7274,7 +7274,7 @@ public void test0221() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0221/Test.java",
+ "/Completion/src3/test0221/Test.js",
"package test0221;\n" +
"\n" +
"public class Test {\n" +
@@ -7304,7 +7304,7 @@ public void test0222() throws JavaModelException {
ICompilationUnit paramClass1 = null;
try {
paramClass1 = getWorkingCopy(
- "/Completion/src3/test0222/AType.java",
+ "/Completion/src3/test0222/AType.js",
"package test0222;\n"+
"\n"+
"public class AType<T> {\n"+
@@ -7313,7 +7313,7 @@ public void test0222() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0222/Test.java",
+ "/Completion/src3/test0222/Test.js",
"package test0222;\n" +
"\n" +
"public class Test {\n" +
@@ -7346,7 +7346,7 @@ public void test0223() throws JavaModelException {
ICompilationUnit paramClass1 = null;
try {
paramClass1 = getWorkingCopy(
- "/Completion/src3/test0223/AType.java",
+ "/Completion/src3/test0223/AType.js",
"package test0223;\n"+
"\n"+
"public class AType {\n"+
@@ -7356,7 +7356,7 @@ public void test0223() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0223/Test.java",
+ "/Completion/src3/test0223/Test.js",
"package test0223;\n" +
"\n" +
"import static test0223.AType.va\n" +
@@ -7389,7 +7389,7 @@ public void test0223() throws JavaModelException {
*/
public void test0224() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0224/Test.java",
+ "/Completion/src3/test0224/Test.js",
"package test0224;\n" +
"\n" +
"public class Test<T ext> {\n" +
@@ -7411,7 +7411,7 @@ public void test0224() throws JavaModelException {
*/
public void test0225() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0225/Test.java",
+ "/Completion/src3/test0225/Test.js",
"package test0225;\n" +
"\n" +
"public class Test<T ext\n" +
@@ -7433,7 +7433,7 @@ public void test0225() throws JavaModelException {
*/
public void test0226() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0226/Test.java",
+ "/Completion/src3/test0226/Test.js",
"package test0226;\n" +
"\n" +
"public class Test {\n" +
@@ -7456,7 +7456,7 @@ public void test0226() throws JavaModelException {
*/
public void test0227() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0227/Test.java",
+ "/Completion/src3/test0227/Test.js",
"package test0227;\n" +
"\n" +
"public class Test {\n" +
@@ -7479,7 +7479,7 @@ public void test0227() throws JavaModelException {
*/
public void test0228() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0228/Test.java",
+ "/Completion/src3/test0228/Test.js",
"package test0228;\n" +
"\n" +
"public class Test {\n" +
@@ -7504,7 +7504,7 @@ public void test0228() throws JavaModelException {
*/
public void test0229() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0229/Test.java",
+ "/Completion/src3/test0229/Test.js",
"package test0229;\n" +
"\n" +
"public class Test<T> {\n" +
@@ -7527,7 +7527,7 @@ public void test0229() throws JavaModelException {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=96944
public void test0230() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0230/Test.java",
+ "/Completion/src3/test0230/Test.js",
"package test0230;\n" +
"\n" +
"public class Test<ZT> {\n" +
@@ -7550,7 +7550,7 @@ public void test0230() throws JavaModelException {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=96944
public void test0231() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0231/Test.java",
+ "/Completion/src3/test0231/Test.js",
"package test0231;\n" +
"\n" +
"public class Test<ZT> {\n" +
@@ -7573,7 +7573,7 @@ public void test0231() throws JavaModelException {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=96944
public void test0232() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0232/Test.java",
+ "/Completion/src3/test0232/Test.js",
"package test0232;\n" +
"\n" +
"public class Test<ZT> {\n" +
@@ -7602,7 +7602,7 @@ public void test0232() throws JavaModelException {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=82560
public void test0233() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0233/Test0233Z.java",
+ "/Completion/src3/test0233/Test0233Z.js",
"package test0233;\n" +
"\n" +
"public class Test0233Z<ZT> {\n" +
@@ -7627,7 +7627,7 @@ public void test0233() throws JavaModelException {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=97860
public void test0234() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0234/Test.java",
+ "/Completion/src3/test0234/Test.js",
"package test0234;\n" +
"\n" +
"public class Test<ZT> {\n" +
@@ -7650,7 +7650,7 @@ public void test0234() throws JavaModelException {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=97860
public void test0235() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0235/Test.java",
+ "/Completion/src3/test0235/Test.js",
"package test0235;\n" +
"\n" +
"public class Test<ZT> {\n" +
@@ -7672,7 +7672,7 @@ public void test0235() throws JavaModelException {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=94641
public void test0236() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0236/Test.java",
+ "/Completion/src3/test0236/Test.js",
"package test0236;\n" +
"\n" +
"public class Test<ZT> {\n" +
@@ -7696,7 +7696,7 @@ public void test0236() throws JavaModelException {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=94907
public void test0237() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0237/Test.java",
+ "/Completion/src3/test0237/Test.js",
"package test0237;\n" +
"\n" +
"public class Test<ZT> ext {\n" +
@@ -7716,7 +7716,7 @@ public void test0237() throws JavaModelException {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=94907
public void test0238() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0238/Test.java",
+ "/Completion/src3/test0238/Test.js",
"package test0238;\n" +
"\n" +
"public class Test<ZT> imp {\n" +
@@ -7736,7 +7736,7 @@ public void test0238() throws JavaModelException {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=94907
public void test0239() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0239/Test.java",
+ "/Completion/src3/test0239/Test.js",
"package test0239;\n" +
"\n" +
"public class Test<ZT> extends Object ext {\n" +
@@ -7756,7 +7756,7 @@ public void test0239() throws JavaModelException {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=94907
public void test0240() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0204/Test.java",
+ "/Completion/src3/test0204/Test.js",
"package test0240;\n" +
"\n" +
"public class Test<ZT> extends Object imp {\n" +
@@ -7776,7 +7776,7 @@ public void test0240() throws JavaModelException {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=94907
public void test0241() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0241/Test.java",
+ "/Completion/src3/test0241/Test.js",
"package test0241;\n" +
"\n" +
"public interface Test<ZT> ext {\n" +
@@ -7796,7 +7796,7 @@ public void test0241() throws JavaModelException {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=94907
public void test0242() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0242/Test.java",
+ "/Completion/src3/test0242/Test.js",
"package test0242;\n" +
"\n" +
"public interface Test<ZT> imp {\n" +
@@ -7816,7 +7816,7 @@ public void test0242() throws JavaModelException {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=99686
public void test0243() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0243/X.java",
+ "/Completion/src3/test0243/X.js",
"package test0243;\n" +
"public class X {\n" +
" void test() {\n" +
@@ -7840,7 +7840,7 @@ public void test0242() throws JavaModelException {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=100009
public void test0244() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0244/X.java",
+ "/Completion/src3/test0244/X.js",
"package test0244;\n" +
"import generics.*;\n" +
"public class X extends ZAGenericType {\n" +
@@ -7857,19 +7857,19 @@ public void test0244() throws JavaModelException {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=101456
public void test0245() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Completion/src/test/SnapshotImpl.java",
+ "/Completion/src/test/SnapshotImpl.js",
"class SnapshotImpl extends AbstractSnapshot<SnapshotImpl, ProviderImpl> {}");
getWorkingCopy(
- "/Completion/src/test/Snapshot.java",
+ "/Completion/src/test/Snapshot.js",
"public interface Snapshot<S extends Snapshot> {}");
getWorkingCopy(
- "/Completion/src/test/SnapshotProvider.java",
+ "/Completion/src/test/SnapshotProvider.js",
"interface SnapshotProvider<S extends Snapshot> {}");
getWorkingCopy(
- "/Completion/src/test/AbstractSnapshot.java",
+ "/Completion/src/test/AbstractSnapshot.js",
"abstract class AbstractSnapshot<S extends Snapshot, P extends SnapshotProvider<S>> implements Snapshot<S> {}");
getWorkingCopy(
- "/Completion/src/test/ProviderImpl.java",
+ "/Completion/src/test/ProviderImpl.js",
"class ProviderImpl implements SnapshotProvider<SnapshotImpl> {}");
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
@@ -7883,7 +7883,7 @@ public void test0245() throws JavaModelException {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=83005
public void test0246() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0245/X.java",
+ "/Completion/src3/test0245/X.js",
"package test0245;\n" +
"public @interface X {\n" +
" ann\n" +
@@ -7897,7 +7897,7 @@ public void test0246() throws JavaModelException {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=102284
public void test0247() throws JavaModelException {
CompletionResult result = complete(
- "/Completion/src3/test0245/X.java",
+ "/Completion/src3/test0245/X.js",
"package test0245;\n" +
"public class X {\n" +
" void test() {\n" +
@@ -7923,7 +7923,7 @@ public void test0248() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/camelcase/Test.java",
+ "/Completion/src/camelcase/Test.js",
"package camelcase;"+
"import static camelcase.ImportedType.*;"+
"public class Test {\n"+
@@ -7933,7 +7933,7 @@ public void test0248() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/camelcase/ImportedType.java",
+ "/Completion/src/camelcase/ImportedType.js",
"package camelcase;"+
"public class ImportedType {\n"+
" public static void oneTwoThree(){}\n"+
@@ -7964,7 +7964,7 @@ public void test0249() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/camelcase/Test.java",
+ "/Completion/src/camelcase/Test.js",
"package camelcase;"+
"import static camelcase.ImportedType.*;"+
"public class Test {\n"+
@@ -7974,7 +7974,7 @@ public void test0249() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/camelcase/ImportedType.java",
+ "/Completion/src/camelcase/ImportedType.js",
"package camelcase;"+
"public class ImportedType {\n"+
" public static int oneTwoThree;\n"+
@@ -8005,14 +8005,14 @@ public void test0250() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/camelcase/Test.java",
+ "/Completion/src/camelcase/Test.js",
"package camelcase;"+
"import static camelcase.ImportedType.oTT;"+
"public class Test {\n"+
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/camelcase/ImportedType.java",
+ "/Completion/src/camelcase/ImportedType.js",
"package camelcase;"+
"public class ImportedType {\n"+
" public static void oneTwoThree(){}\n"+
@@ -8043,14 +8043,14 @@ public void test0260() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/camelcase/Test.java",
+ "/Completion/src/camelcase/Test.js",
"package camelcase;"+
"@Annot(oTT)"+
"public class Test {\n"+
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/camelcase/Annot.java",
+ "/Completion/src/camelcase/Annot.js",
"package camelcase;"+
"public @interface Annot {\n"+
" String oneTwoThree() default \"\";\n"+
@@ -8075,7 +8075,7 @@ public void test0260() throws JavaModelException {
public void test0261() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test<T extends SuperClass> {\n"+
" T foo() {\n"+
@@ -8084,7 +8084,7 @@ public void test0261() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/SuperClass.java",
+ "/Completion/src/test/SuperClass.js",
"package test;"+
"public class SuperClass {\n"+
" public int zzfield;\n"+
@@ -8106,7 +8106,7 @@ public void test0261() throws JavaModelException {
public void test0262() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test<T extends SuperInterface> {\n"+
" T foo() {\n"+
@@ -8115,7 +8115,7 @@ public void test0262() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/SuperInterface.java",
+ "/Completion/src/test/SuperInterface.js",
"package test;"+
"public interface SuperInterface {\n"+
" public static int zzfield;\n"+
@@ -8138,7 +8138,7 @@ public void test0262() throws JavaModelException {
public void test0263() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test<T extends SuperClass & SuperInterface> {\n"+
" T foo() {\n"+
@@ -8147,7 +8147,7 @@ public void test0263() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/SuperClass.java",
+ "/Completion/src/test/SuperClass.js",
"package test;"+
"public class SuperClass {\n"+
" public int zzfield;\n"+
@@ -8155,7 +8155,7 @@ public void test0263() throws JavaModelException {
"}");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/test/SuperInterface.java",
+ "/Completion/src/test/SuperInterface.js",
"package test;"+
"public interface SuperInterface {\n"+
" public static int zzfield2;\n"+
@@ -8179,21 +8179,21 @@ public void test0263() throws JavaModelException {
public void test0264() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"@MyAnnot(MyEnum\n"+
"public class Test {\n"+
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/MyEnum.java",
+ "/Completion/src/test/MyEnum.js",
"package test;"+
"public enum MyEnum {\n"+
" AAA\n"+
"}");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/test/MyAnnot.java",
+ "/Completion/src/test/MyAnnot.js",
"package test;"+
"public @interface MyAnnot {\n"+
" MyEnum[] value();\n"+
@@ -8215,7 +8215,7 @@ public void test0264() throws JavaModelException {
public void test0265() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/enumbug/EnumBug.java",
+ "/Completion/src/enumbug/EnumBug.js",
"package enumbug;\n"+
"public class EnumBug {\n"+
" public static enum Foo {foo, bar, baz}\n"+
@@ -8244,14 +8244,14 @@ public void test0265() throws JavaModelException {
public void test0266() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test<T, U, TU> extends SuperTest<T> {\n"+
" foo\n"+
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/SuperTest.java",
+ "/Completion/src/test/SuperTest.js",
"package test;\n"+
"public class SuperTest<E> {\n"+
" public <T, U, TU> T foo(SuperTest<T> t, SuperTest<U> u, SuperTest<TU> tu, SuperTest<E> e) {return null;}\n"+
@@ -8277,14 +8277,14 @@ public void test0266() throws JavaModelException {
public void test0267() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test<T, U, TU> extends SuperTest {\n"+
" foo\n"+
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/SuperTest.java",
+ "/Completion/src/test/SuperTest.js",
"package test;\n"+
"public class SuperTest<E> {\n"+
" public <T, U, TU> T foo(SuperTest<T> t, SuperTest<U> u, SuperTest<TU> tu, SuperTest<E> e) {return null;}\n"+
@@ -8308,14 +8308,14 @@ public void test0267() throws JavaModelException {
public void test0268() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test<T, U, TU> extends SuperTest {\n"+
" foo\n"+
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/SuperTest.java",
+ "/Completion/src/test/SuperTest.js",
"package test;\n"+
"public class SuperTest {\n"+
" public <T, U, TU> T foo(T t, U u, TU tu) {return null;}\n"+
@@ -8338,14 +8338,14 @@ public void test0268() throws JavaModelException {
public void test0269() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test extends SuperTest {\n"+
" foo\n"+
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/SuperTest.java",
+ "/Completion/src/test/SuperTest.js",
"package test;\n"+
"public class SuperTest {\n"+
" public <T> void foo() {}\n"+
@@ -8366,19 +8366,19 @@ public void test0269() throws JavaModelException {
public void test0270() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test270_2.java",
+ "/Completion/src/test/Test270_2.js",
"package test;\n"+
"public class Test270_2 extends SuperTest<Test270> {\n"+
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/SuperTest.java",
+ "/Completion/src/test/SuperTest.js",
"package test;\n"+
"public class SuperTest<T> {\n"+
"}");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/test/Test270.java",
+ "/Completion/src/test/Test270.js",
"package test;\n"+
"public class Test270 {\n"+
"}");
@@ -8399,7 +8399,7 @@ public void test0270() throws JavaModelException {
public void test0271() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void foo() {\n"+
@@ -8408,7 +8408,7 @@ public void test0271() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/TestCollections.java",
+ "/Completion/src/test/TestCollections.js",
"package test;\n"+
"public class TestCollections {\n"+
" public <T> void zzz1(T t) {}\n"+
@@ -8430,7 +8430,7 @@ public void test0271() throws JavaModelException {
public void test0272() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void foo(TestCollections t) {\n"+
@@ -8439,7 +8439,7 @@ public void test0272() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/TestCollections.java",
+ "/Completion/src/test/TestCollections.js",
"package test;\n"+
"public class TestCollections {\n"+
" public <T> void zzz1(T t) {}\n"+
@@ -8462,7 +8462,7 @@ public void test0272() throws JavaModelException {
public void test0273() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" TestCollections bar() {\n"+
@@ -8474,7 +8474,7 @@ public void test0273() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/TestCollections.java",
+ "/Completion/src/test/TestCollections.js",
"package test;\n"+
"public class TestCollections {\n"+
" public <T> void zzz1(T t) {}\n"+
@@ -8497,7 +8497,7 @@ public void test0273() throws JavaModelException {
public void test0274() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void foo() {\n"+
@@ -8506,7 +8506,7 @@ public void test0274() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/TestCollections.java",
+ "/Completion/src/test/TestCollections.js",
"package test;\n"+
"public class TestCollections {\n"+
" public <T> void zzz1(T t) {}\n"+
@@ -8528,7 +8528,7 @@ public void test0274() throws JavaModelException {
public void test0275() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void foo(int t) {\n"+
@@ -8537,7 +8537,7 @@ public void test0275() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/TestCollections.java",
+ "/Completion/src/test/TestCollections.js",
"package test;\n"+
"public class TestCollections {\n"+
" public <T> void zzz1(T t) {}\n"+
@@ -8559,7 +8559,7 @@ public void test0275() throws JavaModelException {
public void test0276() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" int bar() {\n"+
@@ -8571,7 +8571,7 @@ public void test0276() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/TestCollections.java",
+ "/Completion/src/test/TestCollections.js",
"package test;\n"+
"public class TestCollections {\n"+
" public <T> void zzz1(T t) {}\n"+
@@ -8593,7 +8593,7 @@ public void test0276() throws JavaModelException {
public void test0277() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void foo(TestCollections[] o) {\n"+
@@ -8602,7 +8602,7 @@ public void test0277() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/TestCollections.java",
+ "/Completion/src/test/TestCollections.js",
"package test;\n"+
"public class TestCollections {\n"+
" public <T> void zzz1(T t) {}\n"+
@@ -8624,7 +8624,7 @@ public void test0277() throws JavaModelException {
public void test0278() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" public <T> void zzz1(T t) {}\n"+
@@ -8649,7 +8649,7 @@ public void test0278() throws JavaModelException {
public void test0279() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test extends TestCollections {\n"+
" void foo() {\n"+
@@ -8658,7 +8658,7 @@ public void test0279() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/TestCollections.java",
+ "/Completion/src/test/TestCollections.js",
"package test;\n"+
"public class TestCollections {\n"+
" public <T> void zzz1(T t) {}\n"+
@@ -8680,7 +8680,7 @@ public void test0279() throws JavaModelException {
public void test0280() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void foo() {\n"+
@@ -8689,7 +8689,7 @@ public void test0280() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/TestCollections.java",
+ "/Completion/src/test/TestCollections.js",
"package test;\n"+
"public class TestCollections {\n"+
" public <T> void zzz1(T t) {}\n"+
@@ -8711,7 +8711,7 @@ public void test0280() throws JavaModelException {
public void test0281() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void foo() {\n"+
@@ -8720,7 +8720,7 @@ public void test0281() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/TestCollections.java",
+ "/Completion/src/test/TestCollections.js",
"package test;\n"+
"public class TestCollections {\n"+
" public <T> void zzz1(T t) {}\n"+
@@ -8742,7 +8742,7 @@ public void test0281() throws JavaModelException {
public void test0282() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" public <T> void zzz1(T t) {}\n"+
@@ -8767,7 +8767,7 @@ public void test0282() throws JavaModelException {
public void test0283() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" public <T, U> void zzz1(T t) {}\n"+
@@ -8792,7 +8792,7 @@ public void test0283() throws JavaModelException {
public void test0284() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" public <T extends Test2> void zzz1(T t) {}\n"+
@@ -8803,7 +8803,7 @@ public void test0284() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/Test2.java",
+ "/Completion/src/test/Test2.js",
"package test;\n"+
"public class Test2 {\n"+
"}\n");
@@ -8823,7 +8823,7 @@ public void test0284() throws JavaModelException {
public void test0285() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/other/Test.java",
+ "/Completion/src/other/Test.js",
"package other;\n"+
"import pack.*;\n"+
"public class Test {\n"+
@@ -8833,14 +8833,14 @@ public void test0285() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/pack/ZZZNeedsImportEnum.java",
+ "/Completion/src/pack/ZZZNeedsImportEnum.js",
"package pack;\n"+
"public enum ZZZNeedsImportEnum {\n"+
" HELLO;\n"+
"}\n");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/pack/MyAnnotation.java",
+ "/Completion/src/pack/MyAnnotation.js",
"package pack;\n"+
"public @interface MyAnnotation {\n"+
" ZZZNeedsImportEnum value();\n"+
@@ -8862,7 +8862,7 @@ public void test0285() throws JavaModelException {
public void test0286() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void bar(Test2<Object> t) {\n"+
@@ -8871,14 +8871,14 @@ public void test0286() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/Test1.java",
+ "/Completion/src/test/Test1.js",
"package test;\n"+
"public interface Test1<U> {\n"+
" <T> T[] foo(T[] t);\n"+
"}\n");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/test/Test2.java",
+ "/Completion/src/test/Test2.js",
"package test;\n"+
"public interface Test2<U> extends Test1<U> {\n"+
" <T> T[] foo(T[] t);\n"+
@@ -8899,21 +8899,21 @@ public void test0286() throws JavaModelException {
public void test0287() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test implements Test2<Object>{\n"+
" fo\n"+
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/Test1.java",
+ "/Completion/src/test/Test1.js",
"package test;\n"+
"public interface Test1<U> {\n"+
" <T> T[] foo(T[] t);\n"+
"}\n");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/test/Test2.java",
+ "/Completion/src/test/Test2.js",
"package test;\n"+
"public interface Test2<U> extends Test1<U> {\n"+
" <T> T[] foo(T[] t);\n"+
@@ -8935,14 +8935,14 @@ public void test0287() throws JavaModelException {
public void test0288() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"import test0.tes"+
"public class Test {\n"+
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test0/test1/X.java",
+ "/Completion/src/test0/test1/X.js",
"package test0/test1;"+
"public class X {\n"+
"}");
@@ -8961,14 +8961,14 @@ public void test0288() throws JavaModelException {
public void test0289() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"import static test0.tes"+
"public class Test {\n"+
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test0/test1/X.java",
+ "/Completion/src/test0/test1/X.js",
"package test0/test1;"+
"public class X {\n"+
"}");
@@ -8987,14 +8987,14 @@ public void test0289() throws JavaModelException {
public void test0290() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0290/Test.java",
+ "/Completion/src3/test0290/Test.js",
"package test0290;\n" +
"@\n" +
"public class Test {\n" +
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/pkgannotations/QQAnnotation.java",
+ "/Completion/src/pkgannotations/QQAnnotation.js",
"package pkgannotations;"+
"public @interface QQAnnotation {\n"+
"}");
@@ -9014,7 +9014,7 @@ public void test0290() throws JavaModelException {
public void test0291() throws JavaModelException {
this.workingCopies = new ICompilationUnit[5];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void foo(){\n" +
@@ -9023,27 +9023,27 @@ public void test0291() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/Test1.java",
+ "/Completion/src3/test/Test1.js",
"package test;\n" +
"public class Test1<TTest1> {\n" +
" public void foo(TTest1 t){}\n" +
"}");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src3/test/Test2.java",
+ "/Completion/src3/test/Test2.js",
"package test;\n" +
"public class Test2<TTest2 extends Test3> extends Test1<TTest2> {\n" +
" public void foo(Test3 t){}\n" +
"}");
this.workingCopies[3] = getWorkingCopy(
- "/Completion/src3/test/Test3.java",
+ "/Completion/src3/test/Test3.js",
"package test;\n" +
"public class Test3 {\n" +
"}");
this.workingCopies[4] = getWorkingCopy(
- "/Completion/src3/test/Test4.java",
+ "/Completion/src3/test/Test4.js",
"package test;\n" +
"public class Test4 extends Test3 {\n" +
"}");
@@ -9062,7 +9062,7 @@ public void test0291() throws JavaModelException {
public void test0292() throws JavaModelException {
this.workingCopies = new ICompilationUnit[6];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void foo(){\n" +
@@ -9071,33 +9071,33 @@ public void test0292() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/Test1.java",
+ "/Completion/src3/test/Test1.js",
"package test;\n" +
"public class Test1<TTest1> {\n" +
" public void foo(TTest1 t){}\n" +
"}");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src3/test/Test2.java",
+ "/Completion/src3/test/Test2.js",
"package test;\n" +
"public class Test2<TTest2 extends Test3> extends Test1<TTest2> {\n" +
" public void foo(Test3 t){}\n" +
"}");
this.workingCopies[3] = getWorkingCopy(
- "/Completion/src3/test/Test3.java",
+ "/Completion/src3/test/Test3.js",
"package test;\n" +
"public class Test3 {\n" +
"}");
this.workingCopies[4] = getWorkingCopy(
- "/Completion/src3/test/Test4.java",
+ "/Completion/src3/test/Test4.js",
"package test;\n" +
"public class Test4 extends Test3 {\n" +
"}");
this.workingCopies[5] = getWorkingCopy(
- "/Completion/src3/test/Test5.java",
+ "/Completion/src3/test/Test5.js",
"package test;\n" +
"public class Test5 extends Test2<Test4> {\n" +
" public void foo(Test4 t){}\n" +
@@ -9118,7 +9118,7 @@ public void test0292() throws JavaModelException {
public void test0293() throws JavaModelException {
this.workingCopies = new ICompilationUnit[5];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test extends Test2<Test4> {\n" +
" public void foo(Test4 t){}\n" +
@@ -9128,27 +9128,27 @@ public void test0293() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/Test1.java",
+ "/Completion/src3/test/Test1.js",
"package test;\n" +
"public class Test1<TTest1> {\n" +
" public void foo(TTest1 t){}\n" +
"}");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src3/test/Test2.java",
+ "/Completion/src3/test/Test2.js",
"package test;\n" +
"public class Test2<TTest2 extends Test3> extends Test1<TTest2> {\n" +
" public void foo(Test3 t){}\n" +
"}");
this.workingCopies[3] = getWorkingCopy(
- "/Completion/src3/test/Test3.java",
+ "/Completion/src3/test/Test3.js",
"package test;\n" +
"public class Test3 {\n" +
"}");
this.workingCopies[4] = getWorkingCopy(
- "/Completion/src3/test/Test4.java",
+ "/Completion/src3/test/Test4.js",
"package test;\n" +
"public class Test4 extends Test3 {\n" +
"}");
@@ -9168,20 +9168,20 @@ public void test0293() throws JavaModelException {
public void test0294() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" Test1<Test2> var[];\n" +
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/Test1.java",
+ "/Completion/src3/test/Test1.js",
"package test;\n" +
"public class Test1<TTest1> {\n" +
"}");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src3/test/Test2.java",
+ "/Completion/src3/test/Test2.js",
"package test;\n" +
"public class Test2 {\n" +
"}");
@@ -9200,7 +9200,7 @@ public void test0294() throws JavaModelException {
public void test0295() throws JavaModelException {
this.workingCopies = new ICompilationUnit[5];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" void test(StringTest s, IntegerTest i) {\n" +
@@ -9213,7 +9213,7 @@ public void test0295() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/StringTest.java",
+ "/Completion/src3/test/StringTest.js",
"package test;\n" +
"public class StringTest implements ComparableTest<StringTest>, SerializableTest {\n" +
" public int compareTo(StringTest s) {\n" +
@@ -9222,7 +9222,7 @@ public void test0295() throws JavaModelException {
"}");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src3/test/IntegerTest.java",
+ "/Completion/src3/test/IntegerTest.js",
"package test;\n" +
"public class IntegerTest implements ComparableTest<IntegerTest>, SerializableTest {\n" +
" public int compareTo(IntegerTest i) {\n" +
@@ -9231,14 +9231,14 @@ public void test0295() throws JavaModelException {
"}");
this.workingCopies[3] = getWorkingCopy(
- "/Completion/src3/test/ComparableTest.java",
+ "/Completion/src3/test/ComparableTest.js",
"package test;\n" +
"public interface ComparableTest<T> {\n" +
" public int compareTo(T t) ;\n" +
"}");
this.workingCopies[4] = getWorkingCopy(
- "/Completion/src3/test/SerializableTest.java",
+ "/Completion/src3/test/SerializableTest.js",
"package test;\n" +
"public interface SerializableTest {\n" +
"}");
@@ -9257,7 +9257,7 @@ public void test0295() throws JavaModelException {
public void test0296() throws JavaModelException {
this.workingCopies = new ICompilationUnit[5];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public static void main(String[] args) {\n" +
@@ -9268,7 +9268,7 @@ public void test0296() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/StringTest.java",
+ "/Completion/src3/test/StringTest.js",
"package test;\n" +
"public class StringTest implements ComparableTest<StringTest>, SerializableTest {\n" +
" public int compareTo(StringTest s) {\n" +
@@ -9277,7 +9277,7 @@ public void test0296() throws JavaModelException {
"}");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src3/test/IntegerTest.java",
+ "/Completion/src3/test/IntegerTest.js",
"package test;\n" +
"public class IntegerTest implements ComparableTest<IntegerTest>, SerializableTest {\n" +
" public int compareTo(IntegerTest i) {\n" +
@@ -9286,14 +9286,14 @@ public void test0296() throws JavaModelException {
"}");
this.workingCopies[3] = getWorkingCopy(
- "/Completion/src3/test/ComparableTest.java",
+ "/Completion/src3/test/ComparableTest.js",
"package test;\n" +
"public interface ComparableTest<T> {\n" +
" public int compareTo(T t) ;\n" +
"}");
this.workingCopies[4] = getWorkingCopy(
- "/Completion/src3/test/SerializableTest.java",
+ "/Completion/src3/test/SerializableTest.js",
"package test;\n" +
"public interface SerializableTest {\n" +
"}");
@@ -9312,7 +9312,7 @@ public void test0296() throws JavaModelException {
public void test0297() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" String description = \"Some description\";\n" +
@@ -9321,7 +9321,7 @@ public void test0297() throws JavaModelException {
" }");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/Description.java",
+ "/Completion/src3/test/Description.js",
"package test;\n" +
"public @interface Description {\n" +
" String value();\n" +
@@ -9341,7 +9341,7 @@ public void test0297() throws JavaModelException {
public void test0298() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method(ZZZ[] z) {\n" +
@@ -9350,7 +9350,7 @@ public void test0298() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/ZZZ.java",
+ "/Completion/src3/test/ZZZ.js",
"package test;\n" +
"public class ZZZ {\n" +
"}");
@@ -9369,7 +9369,7 @@ public void test0298() throws JavaModelException {
public void test0299() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method(ZZZ z) {\n" +
@@ -9378,7 +9378,7 @@ public void test0299() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/ZZZ.java",
+ "/Completion/src3/test/ZZZ.js",
"package test;\n" +
"public class ZZZ {\n" +
"}");
@@ -9397,7 +9397,7 @@ public void test0299() throws JavaModelException {
public void test0300() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" public void throwing() throws IZZAException, Top<Object>.IZZException {}\n" +
@@ -9414,13 +9414,13 @@ public void test0300() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/IZZAException.java",
+ "/Completion/src/test/IZZAException.js",
"package test;"+
"public class IZZAException extends Exception {\n" +
"}\n");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/test/IZZException.java",
+ "/Completion/src/test/IZZException.js",
"package test;"+
"public class Top<T> {\n" +
" public class IZZException extends Exception {\n" +
@@ -9441,7 +9441,7 @@ public void test0300() throws JavaModelException {
public void testEC001() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test<T> {\n"+
"}");
@@ -9473,7 +9473,7 @@ public void testEC001() throws JavaModelException {
public void testFavoriteImports001() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method() {\n" +
@@ -9482,7 +9482,7 @@ public void testFavoriteImports001() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo;\n" +
@@ -9511,7 +9511,7 @@ public void testFavoriteImports001() throws JavaModelException {
public void testFavoriteImports002() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method() {\n" +
@@ -9520,7 +9520,7 @@ public void testFavoriteImports002() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -9549,7 +9549,7 @@ public void testFavoriteImports002() throws JavaModelException {
public void testFavoriteImports003() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method() {\n" +
@@ -9558,7 +9558,7 @@ public void testFavoriteImports003() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo;\n" +
@@ -9581,7 +9581,7 @@ public void testFavoriteImports003() throws JavaModelException {
public void testFavoriteImports004() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method() {\n" +
@@ -9590,7 +9590,7 @@ public void testFavoriteImports004() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -9613,7 +9613,7 @@ public void testFavoriteImports004() throws JavaModelException {
public void testFavoriteImports005() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method() {\n" +
@@ -9622,7 +9622,7 @@ public void testFavoriteImports005() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo;\n" +
@@ -9651,7 +9651,7 @@ public void testFavoriteImports005() throws JavaModelException {
public void testFavoriteImports006() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method() {\n" +
@@ -9660,7 +9660,7 @@ public void testFavoriteImports006() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -9689,7 +9689,7 @@ public void testFavoriteImports006() throws JavaModelException {
public void testFavoriteImports007() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"import test.p.ZZZ.*;\n" +
"public class Test {\n" +
@@ -9699,7 +9699,7 @@ public void testFavoriteImports007() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -9728,7 +9728,7 @@ public void testFavoriteImports007() throws JavaModelException {
public void testFavoriteImports008() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"import static test.p.ZZZ.*;\n" +
"public class Test {\n" +
@@ -9738,7 +9738,7 @@ public void testFavoriteImports008() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -9763,7 +9763,7 @@ public void testFavoriteImports008() throws JavaModelException {
public void testFavoriteImports009() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"import test.p.ZZZ.*;\n" +
"public class Test {\n" +
@@ -9773,7 +9773,7 @@ public void testFavoriteImports009() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -9802,7 +9802,7 @@ public void testFavoriteImports009() throws JavaModelException {
public void testFavoriteImports010() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"import static test.p.ZZZ.*;\n" +
"public class Test {\n" +
@@ -9812,7 +9812,7 @@ public void testFavoriteImports010() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -9837,7 +9837,7 @@ public void testFavoriteImports010() throws JavaModelException {
public void testFavoriteImports011() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"import test.p.ZZZ.foo;\n" +
"public class Test {\n" +
@@ -9847,7 +9847,7 @@ public void testFavoriteImports011() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -9876,7 +9876,7 @@ public void testFavoriteImports011() throws JavaModelException {
public void testFavoriteImports012() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"import static test.p.ZZZ.foo;\n" +
"public class Test {\n" +
@@ -9886,7 +9886,7 @@ public void testFavoriteImports012() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -9911,7 +9911,7 @@ public void testFavoriteImports012() throws JavaModelException {
public void testFavoriteImports013() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"import test.p.ZZZ.foo;\n" +
"public class Test {\n" +
@@ -9921,7 +9921,7 @@ public void testFavoriteImports013() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -9950,7 +9950,7 @@ public void testFavoriteImports013() throws JavaModelException {
public void testFavoriteImports014() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"import static test.p.ZZZ.foo;\n" +
"public class Test {\n" +
@@ -9960,7 +9960,7 @@ public void testFavoriteImports014() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -9985,7 +9985,7 @@ public void testFavoriteImports014() throws JavaModelException {
public void testFavoriteImports015() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"import static test.p.ZZZ.foo;\n" +
"public class Test {\n" +
@@ -9995,14 +9995,14 @@ public void testFavoriteImports015() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
"}");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src3/test/q/ZZZ2.java",
+ "/Completion/src3/test/q/ZZZ2.js",
"package test.q;\n" +
"public class ZZZ2 {\n" +
" public static int foo(){}\n" +
@@ -10027,7 +10027,7 @@ public void testFavoriteImports015() throws JavaModelException {
public void testFavoriteImports016() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public class foo {\n" +
@@ -10038,7 +10038,7 @@ public void testFavoriteImports016() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -10068,7 +10068,7 @@ public void testFavoriteImports016() throws JavaModelException {
public void testFavoriteImports017() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void foo() {\n" +
@@ -10077,7 +10077,7 @@ public void testFavoriteImports017() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -10102,7 +10102,7 @@ public void testFavoriteImports017() throws JavaModelException {
public void testFavoriteImports018() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public int foo;\n" +
@@ -10112,7 +10112,7 @@ public void testFavoriteImports018() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -10142,7 +10142,7 @@ public void testFavoriteImports018() throws JavaModelException {
public void testFavoriteImports019() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method() {\n" +
@@ -10152,7 +10152,7 @@ public void testFavoriteImports019() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -10182,7 +10182,7 @@ public void testFavoriteImports019() throws JavaModelException {
public void testFavoriteImports020() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method() {\n" +
@@ -10191,7 +10191,7 @@ public void testFavoriteImports020() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -10223,7 +10223,7 @@ public void testFavoriteImports020() throws JavaModelException {
public void testFavoriteImports021() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method() {\n" +
@@ -10232,7 +10232,7 @@ public void testFavoriteImports021() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static <T> int foo(){}\n" +
@@ -10261,7 +10261,7 @@ public void testFavoriteImports021() throws JavaModelException {
public void testFavoriteImports022() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method() {\n" +
@@ -10270,7 +10270,7 @@ public void testFavoriteImports022() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -10293,7 +10293,7 @@ public void testFavoriteImports022() throws JavaModelException {
public void testFavoriteImports023() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"/** */\n" +
"public class Test {\n" +
@@ -10303,7 +10303,7 @@ public void testFavoriteImports023() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo;\n" +
@@ -10332,7 +10332,7 @@ public void testFavoriteImports023() throws JavaModelException {
public void testFavoriteImports024() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method() {\n" +
@@ -10341,7 +10341,7 @@ public void testFavoriteImports024() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public int foo;\n" +
@@ -10364,7 +10364,7 @@ public void testFavoriteImports024() throws JavaModelException {
public void testFavoriteImports025() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method() {\n" +
@@ -10373,7 +10373,7 @@ public void testFavoriteImports025() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public int foo;\n" +
@@ -10396,7 +10396,7 @@ public void testFavoriteImports025() throws JavaModelException {
public void testFavoriteImports026() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method() {\n" +
@@ -10405,7 +10405,7 @@ public void testFavoriteImports026() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public int foo(){return 0;};\n" +
@@ -10428,7 +10428,7 @@ public void testFavoriteImports026() throws JavaModelException {
public void testFavoriteImports027() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method() {\n" +
@@ -10437,7 +10437,7 @@ public void testFavoriteImports027() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public int foo(){return 0;};\n" +
@@ -10460,7 +10460,7 @@ public void testFavoriteImports027() throws JavaModelException {
public void testFavoriteImports029() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"import test.p.ZZZ;\n" +
"public class Test {\n" +
@@ -10470,7 +10470,7 @@ public void testFavoriteImports029() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){return 0;};\n" +
@@ -10506,7 +10506,7 @@ public void testFavoriteImports030() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method() {\n" +
@@ -10515,7 +10515,7 @@ public void testFavoriteImports030() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
@@ -10554,7 +10554,7 @@ public void testFavoriteImports031() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test/Test.java",
+ "/Completion/src3/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public void method() {\n" +
@@ -10563,7 +10563,7 @@ public void testFavoriteImports031() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src3/test/p/ZZZ.java",
+ "/Completion/src3/test/p/ZZZ.js",
"package test.p;\n" +
"public class ZZZ {\n" +
" public static int foo(){}\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionWithMissingTypesTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionWithMissingTypesTests.java
index 846ab5b..720403e 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionWithMissingTypesTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionWithMissingTypesTests.java
@@ -43,7 +43,7 @@ public static Test suite() {
public void test0001() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" void foo() {\n" +
@@ -53,7 +53,7 @@ public void test0001() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
" public void bar() {}\n" +
@@ -80,7 +80,7 @@ public void test0001() throws JavaModelException {
public void test0002() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" void foo() {\n" +
@@ -90,7 +90,7 @@ public void test0002() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
" public int bar;\n" +
@@ -117,7 +117,7 @@ public void test0002() throws JavaModelException {
public void test0003() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" void foo() {\n" +
@@ -127,13 +127,13 @@ public void test0003() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType extends SuperType {\n" +
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/SuperType.java",
+ "/Completion/src/missing/SuperType.js",
"package missing;"+
"public class SuperType {\n" +
" public int bar;\n" +
@@ -160,7 +160,7 @@ public void test0003() throws JavaModelException {
public void test0004() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" void foo() {\n" +
@@ -170,7 +170,7 @@ public void test0004() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
" public void bar() {};\n" +
@@ -220,7 +220,7 @@ public void test0004() throws JavaModelException {
public void test0005() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" MissingType m;\n" +
@@ -230,7 +230,7 @@ public void test0005() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
" public void bar() {}\n" +
@@ -257,7 +257,7 @@ public void test0005() throws JavaModelException {
public void test0006() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" MissingType m;\n" +
@@ -269,7 +269,7 @@ public void test0006() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
" public void bar() {}\n" +
@@ -296,7 +296,7 @@ public void test0006() throws JavaModelException {
public void test0007() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" MissingType m;\n" +
@@ -308,14 +308,14 @@ public void test0007() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
" public void bar() {}\n" +
"}\n");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/test/SuperType.java",
+ "/Completion/src/test/SuperType.js",
"package test;"+
"public class SuperType {\n" +
" public Object m;\n" +
@@ -339,7 +339,7 @@ public void test0007() throws JavaModelException {
public void test0008() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" MissingType m;\n" +
@@ -351,14 +351,14 @@ public void test0008() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
" public void bar() {}\n" +
"}\n");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/test/SuperType.java",
+ "/Completion/src/test/SuperType.js",
"package test;"+
"public class SuperType {\n" +
" public Object m;\n" +
@@ -379,7 +379,7 @@ public void test0008() throws JavaModelException {
public void test0009() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" void foo() {\n" +
@@ -389,14 +389,14 @@ public void test0009() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
" public void bar() {}\n" +
"}\n");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/missing2/MissingType.java",
+ "/Completion/src/missing2/MissingType.js",
"package missing2;"+
"public class MissingType {\n" +
" public void bar() {}\n" +
@@ -425,7 +425,7 @@ public void test0009() throws JavaModelException {
public void test0010() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" void foo() {\n" +
@@ -435,7 +435,7 @@ public void test0010() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
" public class MissingMemberType {\n" +
@@ -464,7 +464,7 @@ public void test0010() throws JavaModelException {
public void test0011() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" MissingType m() {return null;}\n" +
@@ -474,7 +474,7 @@ public void test0011() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
" public void bar() {}\n" +
@@ -501,7 +501,7 @@ public void test0011() throws JavaModelException {
public void test0012() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" MissingType m(int i) {return null;}\n" +
@@ -511,7 +511,7 @@ public void test0012() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
" public void bar() {}\n" +
@@ -538,7 +538,7 @@ public void test0012() throws JavaModelException {
public void test0013() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" MissingType m() {return null;}\n" +
@@ -550,14 +550,14 @@ public void test0013() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
" public void bar() {}\n" +
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/SuperType.java",
+ "/Completion/src/missing/SuperType.js",
"package missing;"+
"public class SuperType {\n" +
" public Object m() {return null;}\n" +
@@ -581,7 +581,7 @@ public void test0013() throws JavaModelException {
public void test0014() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" MissingType m() {return null;}\n" +
@@ -593,14 +593,14 @@ public void test0014() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
" public void bar() {}\n" +
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/SuperType.java",
+ "/Completion/src/missing/SuperType.js",
"package missing;"+
"public class SuperType {\n" +
" public Object m() {return null;}\n" +
@@ -621,7 +621,7 @@ public void test0014() throws JavaModelException {
public void test0015() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" MissingType m() {return null;}\n" +
@@ -633,14 +633,14 @@ public void test0015() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
" public void bar() {}\n" +
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/SuperType.java",
+ "/Completion/src/missing/SuperType.js",
"package missing;"+
"public class SuperType {\n" +
" public Object m(int i) {return null;}\n" +
@@ -667,7 +667,7 @@ public void test0015() throws JavaModelException {
public void test0016() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" void foo() {\n" +
@@ -677,7 +677,7 @@ public void test0016() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
" public class MissingMemberType {\n" +
@@ -706,7 +706,7 @@ public void test0016() throws JavaModelException {
public void test0017() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" void foo() {\n" +
@@ -716,7 +716,7 @@ public void test0017() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing1/missing2/MissingType.java",
+ "/Completion/src/missing1/missing2/MissingType.js",
"package missing1.missing2;"+
"public class MissingType {\n" +
" public class MissingMemberType {\n" +
@@ -739,7 +739,7 @@ public void test0017() throws JavaModelException {
public void test0018() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" void foo() {\n" +
@@ -749,7 +749,7 @@ public void test0018() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing1/missing2/missing3/MissingType.java",
+ "/Completion/src/missing1/missing2/missing3/MissingType.js",
"package missing1.missing2.missing3;"+
"public class MissingType {\n" +
" public class MissingMemberType {\n" +
@@ -772,7 +772,7 @@ public void test0018() throws JavaModelException {
public void test0019() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" void foo() {\n" +
@@ -782,7 +782,7 @@ public void test0019() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
" public class MissingMemberType {\n" +
@@ -818,7 +818,7 @@ public void test0020() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void foo() {\n"+
@@ -828,7 +828,7 @@ public void test0020() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
" /** @deprecated */\n" +
@@ -868,7 +868,7 @@ public void test0021() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void foo() {\n"+
@@ -878,7 +878,7 @@ public void test0021() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
" /** @deprecated */\n" +
@@ -912,7 +912,7 @@ public void test0022() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void foo() {\n"+
@@ -922,7 +922,7 @@ public void test0022() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
" /** @deprecated */\n" +
@@ -964,7 +964,7 @@ public void test0023() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void foo() {\n"+
@@ -974,7 +974,7 @@ public void test0023() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
" /** @deprecated */\n" +
@@ -1010,7 +1010,7 @@ public void _test0024() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void foo() {\n"+
@@ -1020,7 +1020,7 @@ public void _test0024() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
" private class MissingMemberType {\n" +
@@ -1059,7 +1059,7 @@ public void test0025() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void foo() {\n"+
@@ -1069,7 +1069,7 @@ public void test0025() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
" private class MissingMemberType {\n" +
@@ -1102,7 +1102,7 @@ public void _test0026() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void foo() {\n"+
@@ -1112,7 +1112,7 @@ public void _test0026() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
" private class MissingMemberType {\n" +
@@ -1153,7 +1153,7 @@ public void test0027() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;\n"+
"public class Test {\n"+
" void foo() {\n"+
@@ -1163,7 +1163,7 @@ public void test0027() throws JavaModelException {
"}");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
" private class MissingMemberType {\n" +
@@ -1191,7 +1191,7 @@ public void test0027() throws JavaModelException {
public void test0028() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"import known.KnownType;\n"+
"public class Test {\n" +
@@ -1202,14 +1202,14 @@ public void test0028() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
" public known.KnownType field\n" +
"}\n");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/test/known/KnownType.java",
+ "/Completion/src/test/known/KnownType.js",
"package known;"+
"public class KnownType {\n" +
" public void bar() {}\n" +
@@ -1230,7 +1230,7 @@ public void test0028() throws JavaModelException {
public void test0029() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"import known.KnownType;\n"+
"public class Test {\n" +
@@ -1241,14 +1241,14 @@ public void test0029() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
" public known.KnownType field\n" +
"}\n");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/test/known/KnownType.java",
+ "/Completion/src/test/known/KnownType.js",
"package known;"+
"public class KnownType {\n" +
" public void bar() {}\n" +
@@ -1269,7 +1269,7 @@ public void test0029() throws JavaModelException {
public void test0030() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"import known.KnownType;\n"+
"public class Test {\n" +
@@ -1280,14 +1280,14 @@ public void test0030() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
" public known.KnownType field\n" +
"}\n");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/test/known/KnownType.java",
+ "/Completion/src/test/known/KnownType.js",
"package known;"+
"public class KnownType {\n" +
" public void bar() {}\n" +
@@ -1308,7 +1308,7 @@ public void test0030() throws JavaModelException {
public void test031() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"import known.KnownType;\n"+
"public class Test {\n" +
@@ -1319,14 +1319,14 @@ public void test031() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
" public known.KnownType method() {return null;}\n" +
"}\n");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/test/known/KnownType.java",
+ "/Completion/src/test/known/KnownType.js",
"package known;"+
"public class KnownType {\n" +
" public void bar() {}\n" +
@@ -1347,7 +1347,7 @@ public void test031() throws JavaModelException {
public void test0032() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"import known.KnownType;\n"+
"public class Test {\n" +
@@ -1358,14 +1358,14 @@ public void test0032() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
" public known.KnownType method() {return null;}\n" +
"}\n");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/test/known/KnownType.java",
+ "/Completion/src/test/known/KnownType.js",
"package known;"+
"public class KnownType {\n" +
" public void bar() {}\n" +
@@ -1386,7 +1386,7 @@ public void test0032() throws JavaModelException {
public void test0033() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" /** @see MissingType#b */\n" +
@@ -1395,7 +1395,7 @@ public void test0033() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
" public void bar()\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionWithMissingTypesTests2.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionWithMissingTypesTests2.java
index a9ee619..c5e9eb5 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionWithMissingTypesTests2.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionWithMissingTypesTests2.java
@@ -92,7 +92,7 @@ public void test0001() throws Exception {
this.createFolder("/P1/src/a");
this.createFile(
- "/P1/src/a/XX.java",
+ "/P1/src/a/XX.js",
"package a;\n"+
"public class XX {\n"+
" void foo() {}\n"+
@@ -100,7 +100,7 @@ public void test0001() throws Exception {
this.createFolder("/P1/src/b");
this.createFile(
- "/P1/src/b/XX.java",
+ "/P1/src/b/XX.js",
"package b;\n"+
"public class XX {\n"+
" void foo() {}\n"+
@@ -123,7 +123,7 @@ public void test0001() throws Exception {
null,
"1.4");
this.createFile(
- "/P2/src/YY.java",
+ "/P2/src/YY.js",
"public class YY {\n"+
" void foo() {\n"+
" XX x = null;\n"+
@@ -136,7 +136,7 @@ public void test0001() throws Exception {
// do completion
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
requestor.allowAllRequiredProposals();
- ICompilationUnit cu= getCompilationUnit("P2", "src", "", "YY.java");
+ ICompilationUnit cu= getCompilationUnit("P2", "src", "", "YY.js");
String str = cu.getSource();
String completeBehind = "x.fo";
@@ -186,7 +186,7 @@ public void test0002() throws Exception {
this.createFolder("/P1/src/a");
this.createFile(
- "/P1/src/a/XX.java",
+ "/P1/src/a/XX.js",
"package a;\n"+
"public class XX {\n"+
" void foo() {}\n"+
@@ -194,7 +194,7 @@ public void test0002() throws Exception {
this.createFolder("/P1/src/b");
this.createFile(
- "/P1/src/b/XX.java",
+ "/P1/src/b/XX.js",
"package b;\n"+
"public class XX {\n"+
" void foo() {}\n"+
@@ -217,7 +217,7 @@ public void test0002() throws Exception {
null,
"1.4");
this.createFile(
- "/P2/src/YY.java",
+ "/P2/src/YY.js",
"public class YY {\n"+
" void foo() {\n"+
" XX x = null;\n"+
@@ -230,7 +230,7 @@ public void test0002() throws Exception {
// do completion
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
requestor.allowAllRequiredProposals();
- ICompilationUnit cu= getCompilationUnit("P2", "src", "", "YY.java");
+ ICompilationUnit cu= getCompilationUnit("P2", "src", "", "YY.js");
String str = cu.getSource();
String completeBehind = "x.fo";
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionWithMissingTypesTests_1_5.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionWithMissingTypesTests_1_5.java
index b4bf1bc..a2ea37a 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionWithMissingTypesTests_1_5.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionWithMissingTypesTests_1_5.java
@@ -41,7 +41,7 @@ public static Test suite() {
public void test0001() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" void foo() {\n" +
@@ -51,7 +51,7 @@ public void test0001() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType<T> {\n" +
" public void bar() {};\n" +
@@ -78,7 +78,7 @@ public void test0001() throws JavaModelException {
public void test0002() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" void foo() {\n" +
@@ -88,7 +88,7 @@ public void test0002() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType<T> {\n" +
" public void bar() {};\n" +
@@ -96,7 +96,7 @@ public void test0002() throws JavaModelException {
"}\n");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/missing/MissingType2.java",
+ "/Completion/src/missing/MissingType2.js",
"package missing;"+
"public class MissingType2 {\n" +
"}\n");
@@ -128,7 +128,7 @@ public void test0002() throws JavaModelException {
public void test0003() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"import missing.MissingType;"+
"public class Test {\n" +
@@ -139,7 +139,7 @@ public void test0003() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType<T> {\n" +
" public void bar() {};\n" +
@@ -147,7 +147,7 @@ public void test0003() throws JavaModelException {
"}\n");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/missing/MissingType2.java",
+ "/Completion/src/missing/MissingType2.js",
"package missing;"+
"public class MissingType2 {\n" +
"}\n");
@@ -175,7 +175,7 @@ public void test0003() throws JavaModelException {
public void test0004() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"import missing.MissingType2;"+
"public class Test {\n" +
@@ -186,7 +186,7 @@ public void test0004() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType<T> {\n" +
" public void bar() {};\n" +
@@ -194,7 +194,7 @@ public void test0004() throws JavaModelException {
"}\n");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/missing/MissingType2.java",
+ "/Completion/src/missing/MissingType2.js",
"package missing;"+
"public class MissingType2 {\n" +
"}\n");
@@ -222,7 +222,7 @@ public void test0004() throws JavaModelException {
public void test0005() throws JavaModelException {
this.workingCopies = new ICompilationUnit[6];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" void foo() {\n" +
@@ -232,32 +232,32 @@ public void test0005() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType<T, U> {\n" +
" public void bar(T t, U u) {};\n" +
"}\n");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/missing/MissingType1.java",
+ "/Completion/src/missing/MissingType1.js",
"package missing;"+
"public class MissingType1 {\n" +
"}\n");
this.workingCopies[3] = getWorkingCopy(
- "/Completion/src/missing/MissingType2.java",
+ "/Completion/src/missing/MissingType2.js",
"package missing;"+
"public class MissingType2 {\n" +
"}\n");
this.workingCopies[4] = getWorkingCopy(
- "/Completion/src/missing2/MissingType1.java",
+ "/Completion/src/missing2/MissingType1.js",
"package missing2;"+
"public class MissingType1 {\n" +
"}\n");
this.workingCopies[5] = getWorkingCopy(
- "/Completion/src/missing2/MissingType2.java",
+ "/Completion/src/missing2/MissingType2.js",
"package missing2;"+
"public class MissingType2 {\n" +
"}\n");
@@ -301,7 +301,7 @@ public void test0005() throws JavaModelException {
public void test0006() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" MissingType m(int ... i) {return null;}\n" +
@@ -311,7 +311,7 @@ public void test0006() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
" public void bar() {}\n" +
@@ -338,7 +338,7 @@ public void test0006() throws JavaModelException {
public void test0007() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" void foo() {\n" +
@@ -348,14 +348,14 @@ public void test0007() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/test/AType.java",
+ "/Completion/src/test/AType.js",
"package tezt;"+
"public class AType<T> {\n" +
" public void bar(T t) {};\n" +
"}\n");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
"}\n");
@@ -381,7 +381,7 @@ public void test0007() throws JavaModelException {
public void test0008() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" void foo() {\n" +
@@ -391,7 +391,7 @@ public void test0008() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType {\n" +
" public class MissingMemberType<T> {\n" +
@@ -420,7 +420,7 @@ public void test0008() throws JavaModelException {
public void test0009() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" void foo() {\n" +
@@ -430,7 +430,7 @@ public void test0009() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing1/missing2/MissingType.java",
+ "/Completion/src/missing1/missing2/MissingType.js",
"package missing1.missing2;"+
"public class MissingType<T> {\n" +
" public void bar() {};\n" +
@@ -451,7 +451,7 @@ public void test0009() throws JavaModelException {
public void test0010() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" void foo() {\n" +
@@ -461,7 +461,7 @@ public void test0010() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType<T> {\n" +
" public class MissingMemberType<T> {\n" +
@@ -490,7 +490,7 @@ public void test0010() throws JavaModelException {
public void test0011() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" void foo() {\n" +
@@ -500,7 +500,7 @@ public void test0011() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing/MissingType.java",
+ "/Completion/src/missing/MissingType.js",
"package missing;"+
"public class MissingType<T> {\n" +
" public class MissingMemberType<T> {\n" +
@@ -523,7 +523,7 @@ public void test0011() throws JavaModelException {
public void test0012() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src/test/Test.java",
+ "/Completion/src/test/Test.js",
"package test;"+
"public class Test {\n" +
" void foo() {\n" +
@@ -533,14 +533,14 @@ public void test0012() throws JavaModelException {
"}\n");
this.workingCopies[1] = getWorkingCopy(
- "/Completion/src/missing1/MissingType.java",
+ "/Completion/src/missing1/MissingType.js",
"package missing1;"+
"public class MissingType<T> {\n" +
" public void bar() {};\n" +
"}\n");
this.workingCopies[2] = getWorkingCopy(
- "/Completion/src/missing2/MissingType.java",
+ "/Completion/src/missing2/MissingType.js",
"package missing2;"+
"public class MissingType {\n" +
" public void bar() {};\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CopyMoveElementsTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CopyMoveElementsTests.java
index 3bc600d..72e34fa 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CopyMoveElementsTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CopyMoveElementsTests.java
@@ -26,7 +26,7 @@ public void setUpSuite() throws Exception {
IJavaProject project = this.createJavaProject("BinaryProject", new String[] {"src"}, new String[] {"JCL_LIB"}, "bin");
this.createFile(
- "/BinaryProject/src/X.java",
+ "/BinaryProject/src/X.js",
"public class X {\n" +
" int bar;\n" +
" public void foo() {\n" +
@@ -42,7 +42,7 @@ public void setUpSuite() throws Exception {
public void setUp() throws Exception {
super.setUp();
- this.createJavaProject("P", new String[] {"src"}, new String[] {"/BinaryProject/bin"}, "bin", "1.5");
+ this.createJavaProject("P", new String[] {"src"}, new String[] {"/BinaryProject/bin"}, "bin");
}
// Use this static initializer to specify subset for tests
// All specified tests which do not belong to the class are skipped...
@@ -71,100 +71,100 @@ public void tearDownSuite() throws Exception {
/**
* Ensures that a binary field cannot be renamed.
*/
-public void testCopyBinaryField() throws JavaModelException {
- IClassFile cf = getClassFile("P", "/BinaryProject/bin", "", "X.class");
- IField binaryField = cf.getType().getField("bar");
- copyNegative(binaryField, cf, null, "bar2", false, IJavaModelStatusConstants.READ_ONLY);
-}
-/**
- * Ensures that a binary method cannot be renamed.
- */
-public void testCopyBinaryMethod() throws JavaModelException {
- IClassFile cf = getClassFile("P", "/BinaryProject/bin", "", "X.class");
- IMethod binaryMethod = cf.getType().getMethod("foo", new String[] {});
- copyNegative(binaryMethod, cf, null, "foo2", false, IJavaModelStatusConstants.READ_ONLY);
-}
-/**
- * Ensures that a binary type cannot be copied.
- */
-public void testCopyBinaryType() throws JavaModelException {
- IClassFile cf = getClassFile("P", "/BinaryProject/bin", "", "X.class");
- IType binaryType = cf.getType();
- copyNegative(binaryType, cf, null, "Y", false, IJavaModelStatusConstants.READ_ONLY);
-}
+//public void testCopyBinaryField() throws JavaModelException {
+// IClassFile cf = getClassFile("P", "/BinaryProject/bin", "", "X.class");
+// IField binaryField = cf.getType().getField("bar");
+// copyNegative(binaryField, cf, null, "bar2", false, IJavaModelStatusConstants.READ_ONLY);
+//}
+///**
+// * Ensures that a binary method cannot be renamed.
+// */
+//public void testCopyBinaryMethod() throws JavaModelException {
+// IClassFile cf = getClassFile("P", "/BinaryProject/bin", "", "X.class");
+// IMethod binaryMethod = cf.getType().getMethod("foo", new String[] {});
+// copyNegative(binaryMethod, cf, null, "foo2", false, IJavaModelStatusConstants.READ_ONLY);
+//}
+///**
+// * Ensures that a binary type cannot be copied.
+// */
+//public void testCopyBinaryType() throws JavaModelException {
+// IClassFile cf = getClassFile("P", "/BinaryProject/bin", "", "X.class");
+// IType binaryType = cf.getType();
+// copyNegative(binaryType, cf, null, "Y", false, IJavaModelStatusConstants.READ_ONLY);
+//}
/**
* Ensures that a constructor can be copied to a different type. The constructor
* should be automatically renamed to that of the destination type.
*/
-public void testCopyConstructor() throws CoreException {
- this.createFile(
- "/P/src/X.java",
- "public class X {\n" +
- " X(String s) {\n" +
- " }\n" +
- "}"
- );
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
- IMethod methodSource = typeSource.getMethod("X", new String[] {"QString;"});
-
- this.createFile(
- "/P/src/Y.java",
- "public class Y {\n" +
- "}"
- );
- IType typeDest = getCompilationUnit("/P/src/Y.java").getType("Y");
-
- copyPositive(methodSource, typeDest, null, null, false);
-}
-/**
- * Ensures that a constructor can be copied to a different type across projects.
- * The constructor should be automatically renamed to that of the destination type.
- */
-public void testCopyConstructorInDifferentProject() throws CoreException {
- try {
- this.createFile(
- "/P/src/X.java",
- "public class X {\n" +
- " X(String s) {\n" +
- " }\n" +
- "}"
- );
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
- IMethod methodSource = typeSource.getMethod("X", new String[] {"QString;"});
-
- this.createJavaProject("P2", new String[] {"src"}, "bin");
- this.createFile(
- "/P2/src/Y.java",
- "public class Y {\n" +
- "}"
- );
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
-
- copyPositive(methodSource, typeDest, null, null, false);
-
- } finally {
- this.deleteProject("P2");
- }
-}
+//public void testCopyConstructor() throws CoreException {
+// this.createFile(
+// "/P/src/X.js",
+// "public class X {\n" +
+// " X(String s) {\n" +
+// " }\n" +
+// "}"
+// );
+// IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
+// IMethod methodSource = typeSource.getMethod("X", new String[] {"QString;"});
+//
+// this.createFile(
+// "/P/src/Y.js",
+// "public class Y {\n" +
+// "}"
+// );
+// IType typeDest = getCompilationUnit("/P/src/Y.js").getType("Y");
+//
+// copyPositive(methodSource, typeDest, null, null, false);
+//}
+///**
+// * Ensures that a constructor can be copied to a different type across projects.
+// * The constructor should be automatically renamed to that of the destination type.
+// */
+//public void testCopyConstructorInDifferentProject() throws CoreException {
+// try {
+// this.createFile(
+// "/P/src/X.js",
+// "public class X {\n" +
+// " X(String s) {\n" +
+// " }\n" +
+// "}"
+// );
+// IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
+// IMethod methodSource = typeSource.getMethod("X", new String[] {"QString;"});
+//
+// this.createJavaProject("P2", new String[] {"src"}, "bin");
+// this.createFile(
+// "/P2/src/Y.js",
+// "public class Y {\n" +
+// "}"
+// );
+// IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
+//
+// copyPositive(methodSource, typeDest, null, null, false);
+//
+// } finally {
+// this.deleteProject("P2");
+// }
+//}
/**
* Ensures that a field can be copied to a different type.
*/
public void testCopyField() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P/src/Y.js").getType("Y");
copyPositive(fieldSource, typeDest, null, null, false);
}
@@ -173,21 +173,21 @@ public void testCopyField() throws CoreException {
*/
public void testCopyFieldForce() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
" boolean foo;\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P/src/Y.js").getType("Y");
copyPositive(fieldSource, typeDest, null, null, true);
}
@@ -198,22 +198,22 @@ public void testCopyFieldForce() throws CoreException {
public void testCopyFieldForceInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int bar;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("bar");
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
" boolean bar;\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
copyPositive(fieldSource, typeDest, null, null, true);
} finally {
@@ -226,21 +226,21 @@ public void testCopyFieldForceInDifferentProject() throws CoreException {
public void testCopyFieldInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int bar;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("bar");
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
copyPositive(fieldSource, typeDest, null, null, false);
} finally {
@@ -253,20 +253,20 @@ public void testCopyFieldInDifferentProject() throws CoreException {
*/
public void testCopyFieldRename() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P/src/Y.js").getType("Y");
copyPositive(fieldSource, typeDest, null, "bar", false);
}
@@ -276,21 +276,21 @@ public void testCopyFieldRename() throws CoreException {
*/
public void testCopyFieldRenameForce() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
" boolean bar;\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P/src/Y.js").getType("Y");
copyPositive(fieldSource, typeDest, null, "bar", true);
}
@@ -301,22 +301,22 @@ public void testCopyFieldRenameForce() throws CoreException {
public void testCopyFieldRenameForceInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
" boolean bar;\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
copyPositive(fieldSource, typeDest, null, "bar", true);
} finally {
@@ -330,21 +330,21 @@ public void testCopyFieldRenameForceInDifferentProject() throws CoreException {
public void testCopyFieldRenameInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
copyPositive(fieldSource, typeDest, null, "bar", false);
} finally {
@@ -356,12 +356,12 @@ public void testCopyFieldRenameInDifferentProject() throws CoreException {
*/
public void testCopyFieldSameParent() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
copyPositive(fieldSource, typeSource, null, "bar", false);
@@ -371,21 +371,21 @@ public void testCopyFieldSameParent() throws CoreException {
*/
public void testCopyFieldsMultiStatus() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
" Object bar;\n" +
" char[] fred;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P/src/Y.js").getType("Y");
IField[] fieldsSource = typeSource.getFields();
IJavaElement[] dests = new IJavaElement[fieldsSource.length];
@@ -412,7 +412,7 @@ public void testCopyFieldsMultiStatus() throws CoreException {
"P[*]: {CHILDREN}\n" +
" src[*]: {CHILDREN}\n" +
" <default>[*]: {CHILDREN}\n" +
- " Y.java[*]: {CHILDREN | FINE GRAINED | PRIMARY RESOURCE}\n" +
+ " Y.js[*]: {CHILDREN | FINE GRAINED | PRIMARY RESOURCE}\n" +
" Y[*]: {CHILDREN | FINE GRAINED}\n" +
" foo[+]: {}"
);
@@ -429,22 +429,22 @@ public void testCopyFieldsMultiStatus() throws CoreException {
public void testCopyFieldsMultiStatusInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
" Object bar;\n" +
" char[] fred;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
IField[] fieldsSource = typeSource.getFields();
IJavaElement[] dests = new IJavaElement[fieldsSource.length];
@@ -470,7 +470,7 @@ public void testCopyFieldsMultiStatusInDifferentProject() throws CoreException {
"P2[*]: {CHILDREN}\n" +
" src[*]: {CHILDREN}\n" +
" <default>[*]: {CHILDREN}\n" +
- " Y.java[*]: {CHILDREN | FINE GRAINED | PRIMARY RESOURCE}\n" +
+ " Y.js[*]: {CHILDREN | FINE GRAINED | PRIMARY RESOURCE}\n" +
" Y[*]: {CHILDREN | FINE GRAINED}\n" +
" foo[+]: {}"
);
@@ -488,21 +488,21 @@ public void testCopyFieldsMultiStatusInDifferentProject() throws CoreException {
*/
public void testCopyFieldWithCollision() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
" boolean foo;\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P/src/Y.js").getType("Y");
copyNegative(fieldSource, typeDest, null, null, false, IJavaModelStatusConstants.NAME_COLLISION);
}
@@ -513,22 +513,22 @@ public void testCopyFieldWithCollision() throws CoreException {
public void testCopyFieldWithCollisionInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int bar;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("bar");
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
" boolean bar;\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
copyNegative(fieldSource, typeDest, null, null, false, IJavaModelStatusConstants.NAME_COLLISION);
} finally {
@@ -540,12 +540,12 @@ public void testCopyFieldWithCollisionInDifferentProject() throws CoreException
*/
public void testCopyFieldWithInvalidDestination() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
IClassFile cf = getClassFile("P", "/BinaryProject/bin", "", "X.class");
@@ -558,12 +558,12 @@ public void testCopyFieldWithInvalidDestination() throws CoreException {
public void testCopyFieldWithInvalidDestinationInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
this.createJavaProject("P2", new String[] {"src"}, new String[] {"/BinaryProject/bin"}, "bin");
@@ -580,20 +580,20 @@ public void testCopyFieldWithInvalidDestinationInDifferentProject() throws CoreE
*/
public void testCopyFieldWithInvalidPositioning() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P/src/Y.js").getType("Y");
copyNegative(
fieldSource,
@@ -610,21 +610,21 @@ public void testCopyFieldWithInvalidPositioning() throws CoreException {
public void testCopyFieldWithInvalidPositioningInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
copyNegative(
fieldSource,
@@ -642,21 +642,21 @@ public void testCopyFieldWithInvalidPositioningInDifferentProject() throws CoreE
*/
public void testCopyFieldWithPositioning() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
" boolean bar;\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P/src/Y.js").getType("Y");
copyPositive(fieldSource, typeDest, typeDest.getField("bar"), null, false);
}
@@ -667,46 +667,47 @@ public void testCopyFieldWithPositioning() throws CoreException {
public void testCopyFieldWithPositioningInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
" boolean bar;\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
copyPositive(fieldSource, typeDest, typeDest.getField("bar"), null, false);
} finally {
this.deleteProject("P2");
}
}
+
/*
* Ensures that an import can be copied to a different cu.
*/
public void testCopyImport() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"import java.util.*;\n" +
"public class X {\n" +
"}"
);
- IImportDeclaration importSource = getCompilationUnit("/P/src/X.java").getImport("java.util.*");
+ IImportDeclaration importSource = getCompilationUnit("/P/src/X.js").getImport("java.util.*");
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
"}"
);
- ICompilationUnit cuDest = getCompilationUnit("/P/src/Y.java");
+ ICompilationUnit cuDest = getCompilationUnit("/P/src/Y.js");
copyPositive(importSource, cuDest, null, null, false);
}
@@ -715,7 +716,7 @@ public void testCopyImport() throws CoreException {
*/
public void testCopyImportStatic() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"import static java.lang.Math;\n" +
"public class X {\n" +
" int foo;\n" +
@@ -724,24 +725,25 @@ public void testCopyImportStatic() throws CoreException {
" }\n" +
"}"
);
- IImportDeclaration importSource = getCompilationUnit("/P/src/X.java").getImport("java.lang.Math");
+ IImportDeclaration importSource = getCompilationUnit("/P/src/X.js").getImport("java.lang.Math");
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
"}"
);
- ICompilationUnit cuDest = getCompilationUnit("/P/src/Y.java");
+ ICompilationUnit cuDest = getCompilationUnit("/P/src/Y.js");
copyPositive(importSource, cuDest, null, null, false);
assertEquals("Copied import should be static", Flags.AccStatic, cuDest.getImport("java.lang.Math").getFlags());
}
+
/**
* Ensures that a initializer can be copied to a different type.
*/
public void testCopyInitializer() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
" {\n" +
@@ -749,15 +751,15 @@ public void testCopyInitializer() throws CoreException {
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IInitializer initializerSource= typeSource.getInitializer(1);
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P/src/Y.js").getType("Y");
copyPositive(initializerSource, typeDest, null, null, false);
}
@@ -768,7 +770,7 @@ public void testCopyInitializer() throws CoreException {
public void testCopyInitializerInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
" {\n" +
@@ -776,16 +778,16 @@ public void testCopyInitializerInDifferentProject() throws CoreException {
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IInitializer initializerSource= typeSource.getInitializer(1);
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
copyPositive(initializerSource, typeDest, null, null, false);
} finally {
@@ -797,7 +799,7 @@ public void testCopyInitializerInDifferentProject() throws CoreException {
*/
public void testCopyInitializerRename() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
" {\n" +
@@ -805,15 +807,15 @@ public void testCopyInitializerRename() throws CoreException {
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IInitializer initializerSource= typeSource.getInitializer(1);
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P/src/Y.js").getType("Y");
copyNegative(initializerSource, typeDest, null, "newName", false, IJavaModelStatusConstants.INVALID_NAME);
}
@@ -823,7 +825,7 @@ public void testCopyInitializerRename() throws CoreException {
public void testCopyInitializerRenameInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
" {\n" +
@@ -831,16 +833,16 @@ public void testCopyInitializerRenameInDifferentProject() throws CoreException {
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IInitializer initializerSource= typeSource.getInitializer(1);
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
copyNegative(initializerSource, typeDest, null, "newName", false, IJavaModelStatusConstants.INVALID_NAME);
} finally {
@@ -854,7 +856,7 @@ public void testCopyInitializerRenameInDifferentProject() throws CoreException {
public void testCopyInitializerWithPositioningInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
" {\n" +
@@ -862,17 +864,17 @@ public void testCopyInitializerWithPositioningInDifferentProject() throws CoreEx
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IInitializer initializerSource= typeSource.getInitializer(1);
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
" int bar;\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
copyPositive(initializerSource, typeDest, typeDest.getField("bar"), null, false);
} finally {
@@ -885,23 +887,23 @@ public void testCopyInitializerWithPositioningInDifferentProject() throws CoreEx
public void testCopyInnerTypeWithPositioningInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" class Inner {\n" +
" }" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X").getType("Inner");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X").getType("Inner");
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
" void foo() {\n" +
" }\n" +
"}"
);
- ICompilationUnit cuDest = getCompilationUnit("/P2/src/Y.java");
+ ICompilationUnit cuDest = getCompilationUnit("/P2/src/Y.js");
IType typeDest = cuDest.getType("Y");
copyPositive(typeSource, typeDest, typeDest.getMethod("foo", new String[] {}), null, false);
@@ -914,7 +916,7 @@ public void testCopyInnerTypeWithPositioningInDifferentProject() throws CoreExce
*/
public void testCopyLocalType() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo() {\n" +
" class Z {\n" +
@@ -922,14 +924,14 @@ public void testCopyLocalType() throws CoreException {
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X").getMethod("foo", new String[0]).getType("Z", 1);
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X").getMethod("foo", new String[0]).getType("Z", 1);
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
"}"
);
- ICompilationUnit cuDest = getCompilationUnit("/P/src/Y.java");
+ ICompilationUnit cuDest = getCompilationUnit("/P/src/Y.js");
copyPositive(typeSource, cuDest, null, null, false);
}
@@ -938,18 +940,18 @@ public void testCopyLocalType() throws CoreException {
*/
public void testCopyMainType() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
"}"
);
- ICompilationUnit cuDest = getCompilationUnit("/P/src/Y.java");
+ ICompilationUnit cuDest = getCompilationUnit("/P/src/Y.js");
copyPositive(typeSource, cuDest, null, null, false);
}
@@ -959,19 +961,19 @@ public void testCopyMainType() throws CoreException {
public void testCopyMainTypeInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
"}"
);
- ICompilationUnit cuDest = getCompilationUnit("/P2/src/Y.java");
+ ICompilationUnit cuDest = getCompilationUnit("/P2/src/Y.js");
copyPositive(typeSource, cuDest, null, null, false);
} finally {
@@ -983,21 +985,21 @@ public void testCopyMainTypeInDifferentProject() throws CoreException {
*/
public void testCopyMethod() throws CoreException{
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource= typeSource.getMethod("foo", new String[] {"QString;"});
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P/src/Y.js").getType("Y");
copyPositive(methodSource, typeDest, null, null, false);
}
@@ -1007,23 +1009,23 @@ public void testCopyMethod() throws CoreException{
*/
public void testCopyMethodForce() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource= typeSource.getMethod("foo", new String[] {"QString;"});
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
" int foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P/src/Y.js").getType("Y");
copyPositive(methodSource, typeDest, null, null, true);
}
@@ -1034,24 +1036,24 @@ public void testCopyMethodForce() throws CoreException {
public void testCopyMethodForceInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource= typeSource.getMethod("foo", new String[] {"QString;"});
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
" int foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
copyPositive(methodSource, typeDest, null, null, true);
} finally {
@@ -1064,22 +1066,22 @@ public void testCopyMethodForceInDifferentProject() throws CoreException {
public void testCopyMethodInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource= typeSource.getMethod("foo", new String[] {"QString;"});
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
copyPositive(methodSource, typeDest, null, null, false);
} finally {
@@ -1092,21 +1094,21 @@ public void testCopyMethodInDifferentProject() throws CoreException {
*/
public void testCopyMethodRename() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource= typeSource.getMethod("foo", new String[] {"QString;"});
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P/src/Y.js").getType("Y");
copyPositive(methodSource, typeDest, null, "bar", false);
}
@@ -1116,23 +1118,23 @@ public void testCopyMethodRename() throws CoreException {
*/
public void testCopyMethodRenameForce() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource= typeSource.getMethod("foo", new String[] {"QString;"});
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
" void bar(String s) {\n" +
" }\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P/src/Y.js").getType("Y");
copyPositive(methodSource, typeDest, null, "bar", true);
}
@@ -1143,24 +1145,24 @@ public void testCopyMethodRenameForce() throws CoreException {
public void testCopyMethodRenameForceInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource= typeSource.getMethod("foo", new String[] {"QString;"});
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
" void bar(String s) {\n" +
" }\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
copyPositive(methodSource, typeDest, null, "bar", true);
} finally {
@@ -1174,22 +1176,22 @@ public void testCopyMethodRenameForceInDifferentProject() throws CoreException {
public void testCopyMethodRenameInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource= typeSource.getMethod("foo", new String[] {"QString;"});
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
copyPositive(methodSource, typeDest, null, "bar", false);
} finally {
@@ -1202,13 +1204,13 @@ public void testCopyMethodRenameInDifferentProject() throws CoreException {
*/
public void testCopyMethodSameParent() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource= typeSource.getMethod("foo", new String[] {"QString;"});
copyPositive(methodSource, typeSource, null, "bar", false);
@@ -1219,23 +1221,23 @@ public void testCopyMethodSameParent() throws CoreException {
*/
public void testCopyMethodWithCollision() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource= typeSource.getMethod("foo", new String[] {"QString;"});
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
" void foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P/src/Y.js").getType("Y");
copyNegative(methodSource, typeDest, null, null, false, IJavaModelStatusConstants.NAME_COLLISION);
}
@@ -1246,24 +1248,24 @@ public void testCopyMethodWithCollision() throws CoreException {
public void testCopyMethodWithCollisionInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource= typeSource.getMethod("foo", new String[] {"QString;"});
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
" void foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
copyNegative(methodSource, typeDest, null, null, false, IJavaModelStatusConstants.NAME_COLLISION);
} finally {
@@ -1275,13 +1277,13 @@ public void testCopyMethodWithCollisionInDifferentProject() throws CoreException
*/
public void testCopyMethodWithInvalidDestination() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource= typeSource.getMethod("foo", new String[] {"QString;"});
copyNegative(methodSource, methodSource, null, null, false, IJavaModelStatusConstants.INVALID_DESTINATION);
@@ -1292,24 +1294,24 @@ public void testCopyMethodWithInvalidDestination() throws CoreException {
public void testCopyMethodWithInvalidDestinationInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource = typeSource.getMethod("foo", new String[] {"QString;"});
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
" void bar() {\n" +
" }\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
IMethod methodDest = typeDest.getMethod("bar", new String[] {});
copyNegative(methodSource, methodDest, null, null, false, IJavaModelStatusConstants.INVALID_DESTINATION);
@@ -1323,24 +1325,24 @@ public void testCopyMethodWithInvalidDestinationInDifferentProject() throws Core
public void testCopyMethodWithPositioningInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource = typeSource.getMethod("foo", new String[] {"QString;"});
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
" boolean bar() {\n" +
" }\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
copyPositive(methodSource, typeDest, typeDest.getMethod("bar", new String[] {}), null, false);
} finally {
@@ -1352,13 +1354,13 @@ public void testCopyMethodWithPositioningInDifferentProject() throws CoreExcepti
*/
public void testCopyMoveWithInvalidRenamings() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" public void foo() {\n" +
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource = typeSource.getMethod("foo", new String[]{});
copyNegative(
new IJavaElement[] {methodSource},
@@ -1373,21 +1375,21 @@ public void testCopyMoveWithInvalidRenamings() throws CoreException {
*/
public void testCopySyntaxErrorMethod() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo(String s\n" + // syntax error
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource= typeSource.getMethod("foo", new String[] {"QString;"});
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P/src/Y.js").getType("Y");
copyPositive(methodSource, typeDest, null, null, false);
}
@@ -1398,22 +1400,22 @@ public void testCopySyntaxErrorMethod() throws CoreException {
public void testCopySyntaxErrorMethodInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo(String s\n" + // syntax error
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource= typeSource.getMethod("foo", new String[] {"QString;"});
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
copyPositive(methodSource, typeDest, null, null, false);
} finally {
@@ -1425,20 +1427,20 @@ public void testCopySyntaxErrorMethodInDifferentProject() throws CoreException {
*/
public void testCopyType() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
"}\n" +
"class Z {\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("Z");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("Z");
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
"}"
);
- ICompilationUnit cuDest = getCompilationUnit("/P/src/Y.java");
+ ICompilationUnit cuDest = getCompilationUnit("/P/src/Y.js");
copyPositive(typeSource, cuDest, null, null, false);
}
@@ -1448,21 +1450,21 @@ public void testCopyType() throws CoreException {
public void testCopyTypeInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
"}\n" +
"class Z {\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("Z");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("Z");
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
"}"
);
- ICompilationUnit cuDest = getCompilationUnit("/P2/src/Y.java");
+ ICompilationUnit cuDest = getCompilationUnit("/P2/src/Y.js");
copyPositive(typeSource, cuDest, null, null, false);
} finally {
@@ -1475,21 +1477,21 @@ public void testCopyTypeInDifferentProject() throws CoreException {
public void testCopyTypeWithPositioningInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
"}\n" +
"class Z {\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("Z");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("Z");
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
"}"
);
- ICompilationUnit cuDest = getCompilationUnit("/P2/src/Y.java");
+ ICompilationUnit cuDest = getCompilationUnit("/P2/src/Y.js");
copyPositive(typeSource, cuDest, cuDest.getType("Y"), null, false);
} finally {
@@ -1502,21 +1504,21 @@ public void testCopyTypeWithPositioningInDifferentProject() throws CoreException
*/
public void testMoveConstructor() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" X(String s) {\n" +
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource= typeSource.getMethod("X", new String[] {"QString;"});
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P/src/Y.js").getType("Y");
movePositive(methodSource, typeDest, null, null, false);
@@ -1532,22 +1534,22 @@ public void testMoveConstructor() throws CoreException {
public void testMoveConstructorInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" X(String s) {\n" +
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource= typeSource.getMethod("X", new String[] {"QString;"});
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
movePositive(methodSource, typeDest, null, null, false);
@@ -1564,20 +1566,20 @@ public void testMoveConstructorInDifferentProject() throws CoreException {
*/
public void testMoveField() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P/src/Y.js").getType("Y");
movePositive(fieldSource, typeDest, null, null, false);
}
@@ -1586,21 +1588,21 @@ public void testMoveField() throws CoreException {
*/
public void testMoveFieldForce() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
" boolean foo;\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P/src/Y.js").getType("Y");
movePositive(fieldSource, typeDest, null, null, true);
}
@@ -1611,22 +1613,22 @@ public void testMoveFieldForce() throws CoreException {
public void testMoveFieldForceInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int bar;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("bar");
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
" boolean bar;\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
movePositive(fieldSource, typeDest, null, null, true);
} finally {
@@ -1639,21 +1641,21 @@ public void testMoveFieldForceInDifferentProject() throws CoreException {
public void testMoveFieldInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int bar;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("bar");
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
movePositive(fieldSource, typeDest, null, null, false);
} finally {
@@ -1666,20 +1668,20 @@ public void testMoveFieldInDifferentProject() throws CoreException {
*/
public void testMoveFieldRename() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P/src/Y.js").getType("Y");
movePositive(fieldSource, typeDest, null, "fred", false);
}
@@ -1689,21 +1691,21 @@ public void testMoveFieldRename() throws CoreException {
*/
public void testMoveFieldRenameForce() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
" boolean bar;\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P/src/Y.js").getType("Y");
movePositive(fieldSource, typeDest, null, "bar", true);
}
@@ -1714,22 +1716,22 @@ public void testMoveFieldRenameForce() throws CoreException {
public void testMoveFieldRenameForceInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
" boolean bar;\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
movePositive(fieldSource, typeDest, null, "bar", true);
} finally {
@@ -1743,21 +1745,21 @@ public void testMoveFieldRenameForceInDifferentProject() throws CoreException {
public void testMoveFieldRenameInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
movePositive(fieldSource, typeDest, null, "bar", false);
} finally {
@@ -1771,23 +1773,23 @@ public void testMoveFieldRenameInDifferentProject() throws CoreException {
public void testMoveFieldRenameForceWithPositioningInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
" boolean bar;\n" +
" char fred;\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
movePositive(fieldSource, typeDest, typeDest.getField("bar"), "fred", true);
} finally {
@@ -1799,12 +1801,12 @@ public void testMoveFieldRenameForceWithPositioningInDifferentProject() throws C
*/
public void testMoveFieldSameParent() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
movePositive(fieldSource, typeSource, null, "bar", false);
@@ -1815,21 +1817,21 @@ public void testMoveFieldSameParent() throws CoreException {
*/
public void testMoveFieldWithCollision() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
" boolean foo;\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P/src/Y.js").getType("Y");
moveNegative(fieldSource, typeDest, null, null, false, IJavaModelStatusConstants.NAME_COLLISION);
}
@@ -1840,22 +1842,22 @@ public void testMoveFieldWithCollision() throws CoreException {
public void testMoveFieldWithCollisionInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int bar;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("bar");
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
" boolean bar;\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
moveNegative(fieldSource, typeDest, null, null, false, IJavaModelStatusConstants.NAME_COLLISION);
} finally {
@@ -1867,12 +1869,12 @@ public void testMoveFieldWithCollisionInDifferentProject() throws CoreException
*/
public void testMoveFieldWithInvalidDestination() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
IClassFile cf = getClassFile("P", "/BinaryProject/bin", "", "X.class");
@@ -1885,12 +1887,12 @@ public void testMoveFieldWithInvalidDestination() throws CoreException {
public void testMoveFieldWithInvalidDestinationInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
this.createJavaProject("P2", new String[] {"src"}, new String[] {"/BinaryProject/bin"}, "bin");
@@ -1908,22 +1910,22 @@ public void testMoveFieldWithInvalidDestinationInDifferentProject() throws CoreE
public void testMoveFieldWithPositioningInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
" boolean bar;\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
movePositive(fieldSource, typeDest, typeDest.getField("bar"), null, false);
} finally {
@@ -1935,7 +1937,7 @@ public void testMoveFieldWithPositioningInDifferentProject() throws CoreExceptio
*/
public void testMoveInitializer() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
" {\n" +
@@ -1943,15 +1945,15 @@ public void testMoveInitializer() throws CoreException {
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IInitializer initializerSource= typeSource.getInitializer(1);
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P/src/Y.js").getType("Y");
movePositive(initializerSource, typeDest, null, null, false);
}
@@ -1962,7 +1964,7 @@ public void testMoveInitializer() throws CoreException {
public void testMoveInitializerInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
" {\n" +
@@ -1970,16 +1972,16 @@ public void testMoveInitializerInDifferentProject() throws CoreException {
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IInitializer initializerSource= typeSource.getInitializer(1);
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
movePositive(initializerSource, typeDest, null, null, false);
} finally {
@@ -1991,7 +1993,7 @@ public void testMoveInitializerInDifferentProject() throws CoreException {
*/
public void testMoveInitializerRename() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
" {\n" +
@@ -1999,15 +2001,15 @@ public void testMoveInitializerRename() throws CoreException {
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IInitializer initializerSource= typeSource.getInitializer(1);
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P/src/Y.js").getType("Y");
moveNegative(initializerSource, typeDest, null, "newName", false, IJavaModelStatusConstants.INVALID_NAME);
}
@@ -2017,7 +2019,7 @@ public void testMoveInitializerRename() throws CoreException {
public void testMoveInitializerRenameInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
" {\n" +
@@ -2025,16 +2027,16 @@ public void testMoveInitializerRenameInDifferentProject() throws CoreException {
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IInitializer initializerSource= typeSource.getInitializer(1);
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
moveNegative(initializerSource, typeDest, null, "newName", false, IJavaModelStatusConstants.INVALID_NAME);
} finally {
@@ -2048,7 +2050,7 @@ public void testMoveInitializerRenameInDifferentProject() throws CoreException {
public void testMoveInitializerWithPositioningInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo;\n" +
" {\n" +
@@ -2056,17 +2058,17 @@ public void testMoveInitializerWithPositioningInDifferentProject() throws CoreEx
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IInitializer initializerSource= typeSource.getInitializer(1);
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
" int bar;\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
movePositive(initializerSource, typeDest, typeDest.getField("bar"), null, false);
} finally {
@@ -2080,23 +2082,23 @@ public void testMoveInitializerWithPositioningInDifferentProject() throws CoreEx
public void testMoveInnerTypeRenameWithPositioningInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" class Inner {\n" +
" }" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X").getType("Inner");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X").getType("Inner");
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
" void foo() {\n" +
" }\n" +
"}"
);
- ICompilationUnit cuDest = getCompilationUnit("/P2/src/Y.java");
+ ICompilationUnit cuDest = getCompilationUnit("/P2/src/Y.js");
IType typeDest = cuDest.getType("Y");
movePositive(typeSource, typeDest, typeDest.getMethod("foo", new String[] {}), "T", false);
@@ -2111,23 +2113,23 @@ public void testMoveInnerTypeRenameWithPositioningInDifferentProject() throws Co
public void testMoveInnerTypeWithPositioningInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" class Inner {\n" +
" }" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X").getType("Inner");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X").getType("Inner");
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
" void foo() {\n" +
" }\n" +
"}"
);
- ICompilationUnit cuDest = getCompilationUnit("/P2/src/Y.java");
+ ICompilationUnit cuDest = getCompilationUnit("/P2/src/Y.js");
IType typeDest = cuDest.getType("Y");
movePositive(typeSource, typeDest, typeDest.getMethod("foo", new String[] {}), null, false);
@@ -2140,12 +2142,12 @@ public void testMoveInnerTypeWithPositioningInDifferentProject() throws CoreExce
*/
public void testMoveMainTypes() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
"}"
);
IPackageFragment pkg = getPackage("/P/src");
- ICompilationUnit cu = pkg.getCompilationUnit("X.java");
+ ICompilationUnit cu = pkg.getCompilationUnit("X.js");
IType typeSource = cu.getType("X");
movePositive(
@@ -2156,7 +2158,7 @@ public void testMoveMainTypes() throws CoreException {
false);
// test that both the compilation unit and the main type have been renamed.
- ICompilationUnit renamedCU = pkg.getCompilationUnit("Y.java");
+ ICompilationUnit renamedCU = pkg.getCompilationUnit("Y.js");
assertTrue("Renamed element should be present", renamedCU.getType("Y").exists());
}
/**
@@ -2164,21 +2166,21 @@ public void testMoveMainTypes() throws CoreException {
*/
public void testMoveMethod() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource= typeSource.getMethod("foo", new String[] {"QString;"});
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P/src/Y.js").getType("Y");
movePositive(methodSource, typeDest, null, null, false);
}
@@ -2188,23 +2190,23 @@ public void testMoveMethod() throws CoreException {
*/
public void testMoveMethodForce() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource= typeSource.getMethod("foo", new String[] {"QString;"});
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
" int foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P/src/Y.js").getType("Y");
movePositive(methodSource, typeDest, null, null, true);
}
@@ -2215,24 +2217,24 @@ public void testMoveMethodForce() throws CoreException {
public void testMoveMethodForceInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource= typeSource.getMethod("foo", new String[] {"QString;"});
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
" int foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
movePositive(methodSource, typeDest, null, null, true);
} finally {
@@ -2245,22 +2247,22 @@ public void testMoveMethodForceInDifferentProject() throws CoreException {
public void testMoveMethodInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource= typeSource.getMethod("foo", new String[] {"QString;"});
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
movePositive(methodSource, typeDest, null, null, false);
} finally {
@@ -2273,21 +2275,21 @@ public void testMoveMethodInDifferentProject() throws CoreException {
*/
public void testMoveMethodRename() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource= typeSource.getMethod("foo", new String[] {"QString;"});
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P/src/Y.js").getType("Y");
movePositive(methodSource, typeDest, null, "bar", false);
}
@@ -2297,23 +2299,23 @@ public void testMoveMethodRename() throws CoreException {
*/
public void testMoveMethodRenameForce() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource= typeSource.getMethod("foo", new String[] {"QString;"});
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
" void bar(String s) {\n" +
" }\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P/src/Y.js").getType("Y");
movePositive(methodSource, typeDest, null, "bar", true);
}
@@ -2324,24 +2326,24 @@ public void testMoveMethodRenameForce() throws CoreException {
public void testMoveMethodRenameForceInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource= typeSource.getMethod("foo", new String[] {"QString;"});
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
" void bar(String s) {\n" +
" }\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
movePositive(methodSource, typeDest, null, "bar", true);
} finally {
@@ -2355,22 +2357,22 @@ public void testMoveMethodRenameForceInDifferentProject() throws CoreException {
public void testMoveMethodRenameInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource= typeSource.getMethod("foo", new String[] {"QString;"});
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
movePositive(methodSource, typeDest, null, "bar", false);
} finally {
@@ -2384,24 +2386,24 @@ public void testMoveMethodRenameInDifferentProject() throws CoreException {
public void testMoveMethodRenameWithPositioningInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource = typeSource.getMethod("foo", new String[] {"QString;"});
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
" boolean bar() {\n" +
" }\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
movePositive(methodSource, typeDest, typeDest.getMethod("bar", new String[] {}), "fred", false);
} finally {
@@ -2413,13 +2415,13 @@ public void testMoveMethodRenameWithPositioningInDifferentProject() throws CoreE
*/
public void testMoveMethodSameParent() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource= typeSource.getMethod("foo", new String[] {"QString;"});
movePositive(methodSource, typeSource, null, "bar", false);
@@ -2429,7 +2431,7 @@ public void testMoveMethodSameParent() throws CoreException {
*/
public void testMoveMethodsWithCancel() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo(String s) {\n" +
" }\n" +
@@ -2437,16 +2439,16 @@ public void testMoveMethodsWithCancel() throws CoreException {
" }\n" +
"}"
);
- final IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ final IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
" void foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P/src/Y.js").getType("Y");
boolean isCanceled = false;
try {
@@ -2464,7 +2466,7 @@ public void testMoveMethodsWithCancel() throws CoreException {
public void testMoveMethodsWithCancelInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo(String s) {\n" +
" }\n" +
@@ -2472,17 +2474,17 @@ public void testMoveMethodsWithCancelInDifferentProject() throws CoreException {
" }\n" +
"}"
);
- final IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ final IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
" void foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
boolean isCanceled = false;
try {
@@ -2503,23 +2505,23 @@ public void testMoveMethodsWithCancelInDifferentProject() throws CoreException {
*/
public void testMoveMethodWithCollision() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource= typeSource.getMethod("foo", new String[] {"QString;"});
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
" void foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P/src/Y.js").getType("Y");
moveNegative(methodSource, typeDest, null, null, false, IJavaModelStatusConstants.NAME_COLLISION);
}
@@ -2530,24 +2532,24 @@ public void testMoveMethodWithCollision() throws CoreException {
public void testMoveMethodWithCollisionInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource= typeSource.getMethod("foo", new String[] {"QString;"});
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
" void foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
moveNegative(methodSource, typeDest, null, null, false, IJavaModelStatusConstants.NAME_COLLISION);
} finally {
@@ -2559,13 +2561,13 @@ public void testMoveMethodWithCollisionInDifferentProject() throws CoreException
*/
public void testMoveMethodWithInvalidDestination() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource= typeSource.getMethod("foo", new String[] {"QString;"});
moveNegative(methodSource, methodSource, null, null, false, IJavaModelStatusConstants.INVALID_DESTINATION);
@@ -2576,24 +2578,24 @@ public void testMoveMethodWithInvalidDestination() throws CoreException {
public void testMoveMethodWithInvalidDestinationInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource = typeSource.getMethod("foo", new String[] {"QString;"});
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
" void bar() {\n" +
" }\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
IMethod methodDest = typeDest.getMethod("bar", new String[] {});
moveNegative(methodSource, methodDest, null, null, false, IJavaModelStatusConstants.INVALID_DESTINATION);
@@ -2608,24 +2610,24 @@ public void testMoveMethodWithInvalidDestinationInDifferentProject() throws Core
public void testMoveMethodWithPositioningInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int foo(String s) {\n" +
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource = typeSource.getMethod("foo", new String[] {"QString;"});
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
" boolean bar() {\n" +
" }\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
movePositive(methodSource, typeDest, typeDest.getMethod("bar", new String[] {}), null, false);
} finally {
@@ -2637,21 +2639,21 @@ public void testMoveMethodWithPositioningInDifferentProject() throws CoreExcepti
*/
public void testMoveSyntaxErrorMethod() throws CoreException {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo(String s\n" + // syntax error
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource= typeSource.getMethod("foo", new String[] {"QString;"});
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P/src/Y.js").getType("Y");
movePositive(methodSource, typeDest, null, null, false);
}
@@ -2662,22 +2664,22 @@ public void testMoveSyntaxErrorMethod() throws CoreException {
public void testMoveSyntaxErrorMethodInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo(String s\n" + // syntax error
" }\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("X");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IMethod methodSource= typeSource.getMethod("foo", new String[] {"QString;"});
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
"}"
);
- IType typeDest = getCompilationUnit("/P2/src/Y.java").getType("Y");
+ IType typeDest = getCompilationUnit("/P2/src/Y.js").getType("Y");
movePositive(methodSource, typeDest, null, null, false);
} finally {
@@ -2690,21 +2692,21 @@ public void testMoveSyntaxErrorMethodInDifferentProject() throws CoreException {
public void testMoveTypeRenameWithPositioningInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
"}\n" +
"class Z {\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("Z");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("Z");
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
"}"
);
- ICompilationUnit cuDest = getCompilationUnit("/P2/src/Y.java");
+ ICompilationUnit cuDest = getCompilationUnit("/P2/src/Y.js");
movePositive(typeSource, cuDest, cuDest.getType("Y"), "T", false);
} finally {
@@ -2717,21 +2719,21 @@ public void testMoveTypeRenameWithPositioningInDifferentProject() throws CoreExc
public void testMoveTypeWithPositioningInDifferentProject() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
"}\n" +
"class Z {\n" +
"}"
);
- IType typeSource = getCompilationUnit("/P/src/X.java").getType("Z");
+ IType typeSource = getCompilationUnit("/P/src/X.js").getType("Z");
this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFile(
- "/P2/src/Y.java",
+ "/P2/src/Y.js",
"public class Y {\n" +
"}"
);
- ICompilationUnit cuDest = getCompilationUnit("/P2/src/Y.java");
+ ICompilationUnit cuDest = getCompilationUnit("/P2/src/Y.js");
movePositive(typeSource, cuDest, cuDest.getType("Y"), null, false);
} finally {
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CopyMoveResourcesTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CopyMoveResourcesTests.java
index 130439b..4315b49 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CopyMoveResourcesTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CopyMoveResourcesTests.java
@@ -217,19 +217,19 @@ public void tearDown() throws Exception {
public void testCopyCU() throws CoreException {
this.createFolder("/P/src/p1");
this.createFile(
- "/P/src/p1/X.java",
+ "/P/src/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}"
);
- ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.java");
+ ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.js");
this.createFolder("/P/src/p2");
IPackageFragment pkgDest = getPackage("/P/src/p2");
copyPositive(cuSource, pkgDest, null, null, false);
- ICompilationUnit cu= pkgDest.getCompilationUnit("X.java");
+ ICompilationUnit cu= pkgDest.getCompilationUnit("X.js");
assertTrue("Package declaration not updated for copied cu", cu.getPackageDeclaration("p2").exists());
}
/**
@@ -239,18 +239,18 @@ public void testCopyCU() throws CoreException {
public void testCopyCUAndType() throws CoreException {
this.createFolder("/P/src/p1");
this.createFile(
- "/P/src/p1/X.java",
+ "/P/src/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}"
);
- ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.java");
+ ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.js");
copyNegative(
new IJavaElement[]{cuSource, cuSource.getType("X")},
new IJavaElement[]{cuSource.getParent(), cuSource},
null,
- new String[]{"Y.java", "Y"},
+ new String[]{"Y.js", "Y"},
false,
IJavaModelStatusConstants.INVALID_ELEMENT_TYPES);
}
@@ -260,16 +260,16 @@ public void testCopyCUAndType() throws CoreException {
public void testCopyCUForce() throws CoreException {
this.createFolder("/P/src/p1");
this.createFile(
- "/P/src/p1/X.java",
+ "/P/src/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}"
);
- ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.java");
+ ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.js");
this.createFolder("/P/src/p2");
this.createFile(
- "/P/src/p2/X.java",
+ "/P/src/p2/X.js",
"package p2;\n" +
"public class X {\n" +
"}"
@@ -283,18 +283,18 @@ public void testCopyCUForce() throws CoreException {
*/
public void testCopyCUFromDefaultToNonDefault() throws CoreException {
createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
"}"
);
- ICompilationUnit cuSource = getCompilationUnit("/P/src/X.java");
+ ICompilationUnit cuSource = getCompilationUnit("/P/src/X.js");
createFolder("/P/src/p");
IPackageFragment pkgDest = getPackage("/P/src/p");
copyPositive(cuSource, pkgDest, null, null, false);
- ICompilationUnit cu= pkgDest.getCompilationUnit("X.java");
+ ICompilationUnit cu= pkgDest.getCompilationUnit("X.js");
assertTrue("Package declaration not updated for copied cu", cu.getPackageDeclaration("p").exists());
}
/**
@@ -304,17 +304,17 @@ public void testCopyCUFromDefaultToNonDefault() throws CoreException {
public void testCopyCURename() throws CoreException {
this.createFolder("/P/src/p1");
this.createFile(
- "/P/src/p1/X.java",
+ "/P/src/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}"
);
- ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.java");
+ ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.js");
this.createFolder("/P/src/p2");
IPackageFragment pkgDest = getPackage("/P/src/p2");
- copyPositive(cuSource, pkgDest, null, "Y.java", false);
+ copyPositive(cuSource, pkgDest, null, "Y.js", false);
}
/**
* Ensures that a read-only CU can be copied to a different package.
@@ -329,20 +329,20 @@ public void testCopyCUReadOnly() throws CoreException {
try {
this.createFolder("/P/src/p1");
file = this.createFile(
- "/P/src/p1/X.java",
+ "/P/src/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}"
);
Util.setReadOnly(file, true);
- ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.java");
+ ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.js");
this.createFolder("/P/src/p2");
IPackageFragment pkgDest = getPackage("/P/src/p2");
copyPositive(cuSource, pkgDest, null, null, false);
- file2 = getFile("/P/src/p2/X.java");
+ file2 = getFile("/P/src/p2/X.js");
assertTrue("Destination cu should be read-only", file2.isReadOnly());
} finally {
if (file != null) {
@@ -362,23 +362,23 @@ public void testCopyCUReadOnly() throws CoreException {
public void testCopyCURenameForce() throws CoreException {
this.createFolder("/P/src/p1");
this.createFile(
- "/P/src/p1/X.java",
+ "/P/src/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}"
);
- ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.java");
+ ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.js");
this.createFolder("/P/src/p2");
this.createFile(
- "/P/src/p2/Y.java",
+ "/P/src/p2/Y.js",
"package p2;\n" +
"public class Y {\n" +
"}"
);
IPackageFragment pkgDest = getPackage("/P/src/p2");
- copyPositive(cuSource, pkgDest, null, "Y.java", true);
+ copyPositive(cuSource, pkgDest, null, "Y.js", true);
}
/**
* Ensures that a CU cannot be copied to a different package,over an existing CU when no force.
@@ -386,16 +386,16 @@ public void testCopyCURenameForce() throws CoreException {
public void testCopyCUWithCollision() throws CoreException {
this.createFolder("/P/src/p1");
this.createFile(
- "/P/src/p1/X.java",
+ "/P/src/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}"
);
- ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.java");
+ ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.js");
this.createFolder("/P/src/p2");
this.createFile(
- "/P/src/p2/X.java",
+ "/P/src/p2/X.js",
"package p2;\n" +
"public class X {\n" +
"}"
@@ -410,12 +410,12 @@ public void testCopyCUWithCollision() throws CoreException {
public void testCopyCUWithInvalidDestination() throws CoreException {
this.createFolder("/P/src/p1");
this.createFile(
- "/P/src/p1/X.java",
+ "/P/src/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}"
);
- ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.java");
+ ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.js");
copyNegative(cuSource, cuSource, null, null, false, IJavaModelStatusConstants.INVALID_DESTINATION);
}
@@ -425,12 +425,12 @@ public void testCopyCUWithInvalidDestination() throws CoreException {
public void testCopyCUWithNullContainer() throws CoreException {
this.createFolder("/P/src/p1");
this.createFile(
- "/P/src/p1/X.java",
+ "/P/src/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}"
);
- ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.java");
+ ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.js");
try {
cuSource.copy(null, null, null, false, null);
@@ -446,12 +446,12 @@ public void testCopyCUWithNullContainer() throws CoreException {
public void testCopyCUWithServerProperties() throws CoreException {
this.createFolder("/P/src/p1");
this.createFile(
- "/P/src/p1/X.java",
+ "/P/src/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}"
);
- ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.java");
+ ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.js");
QualifiedName qualifiedName = new QualifiedName("x.y.z", "a property");
cuSource.getUnderlyingResource().setPersistentProperty(
@@ -462,7 +462,7 @@ public void testCopyCUWithServerProperties() throws CoreException {
IPackageFragment pkgDest = getPackage("/P/src/p2");
copyPositive(cuSource, pkgDest, null, null, false);
- ICompilationUnit cu= pkgDest.getCompilationUnit("X.java");
+ ICompilationUnit cu= pkgDest.getCompilationUnit("X.js");
String propertyValue = cu.getUnderlyingResource().getPersistentProperty(qualifiedName);
assertEquals(
"Server property should be copied with cu",
@@ -476,7 +476,7 @@ public void testCopyCUWithServerProperties() throws CoreException {
public void testCopyPackageFragment() throws CoreException {
this.createFolder("/P/src/p1");
this.createFile(
- "/P/src/p1/X.java",
+ "/P/src/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}"
@@ -500,12 +500,12 @@ public void testCopyReadOnlyPackageFragment() throws CoreException {
try {
this.createFolder("/P/src/p1/p2/p3");
this.createFile(
- "/P/src/p1/p2/p3/X.java",
+ "/P/src/p1/p2/p3/X.js",
"package p1.p2.p3;\n" +
"public class X {\n" +
"}"
);
- Util.setReadOnly(getFile("/P/src/p1/p2/p3/X.java"), true);
+ Util.setReadOnly(getFile("/P/src/p1/p2/p3/X.js"), true);
pkgSource = getPackage("/P/src/p1");
Util.setReadOnly(pkgSource.getResource(), true);
pkg2 = getPackage("/P/src/p1/p2/p3");
@@ -518,9 +518,9 @@ public void testCopyReadOnlyPackageFragment() throws CoreException {
assertTrue("Not readOnly", Util.isReadOnly(getPackage("/P/src2/p1").getResource()));
assertTrue("Is readOnly", !Util.isReadOnly(getPackage("/P/src2/p1/p2").getResource()));
assertTrue("Not readOnly", Util.isReadOnly(getPackage("/P/src2/p1/p2/p3").getResource()));
- assertTrue("Is readOnly", Util.isReadOnly(getFile("/P/src2/p1/p2/p3/X.java")));
+ assertTrue("Is readOnly", Util.isReadOnly(getFile("/P/src2/p1/p2/p3/X.js")));
} finally {
- IFile xSrcFile = getFile("/P/src/p1/p2/p3/X.java");
+ IFile xSrcFile = getFile("/P/src/p1/p2/p3/X.js");
if (xSrcFile != null) {
Util.setReadOnly(xSrcFile, false);
}
@@ -538,7 +538,7 @@ public void testCopyReadOnlyPackageFragment() throws CoreException {
if (p3Fragment != null) {
Util.setReadOnly(p3Fragment.getResource(), false);
}
- IFile xFile = getFile("/P/src2/p1/p2/p3/X.java");
+ IFile xFile = getFile("/P/src2/p1/p2/p3/X.js");
if (xFile != null) {
Util.setReadOnly(xFile, false);
}
@@ -553,12 +553,12 @@ public void testCopyWorkingCopy() throws CoreException {
try {
this.createFolder("/P/src/p1");
this.createFile(
- "/P/src/p1/X.java",
+ "/P/src/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}"
);
- ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.java");
+ ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.js");
copy = cuSource.getWorkingCopy(null);
this.createFolder("/P/src/p2");
@@ -578,24 +578,24 @@ public void testCopyWorkingCopyDestination() throws CoreException {
try {
createFolder("/P/src/p1");
createFile(
- "/P/src/p1/X.java",
+ "/P/src/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" void foo() {}\n" +
"}"
);
- ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.java");
+ ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.js");
createFolder("/P/src/p2");
IPackageFragment pkgDest = getPackage("/P/src/p2");
createFile(
- "/P/src/p2/X.java",
+ "/P/src/p2/X.js",
"\n" +
"package p1;\n" +
"public class X {\n" +
"}"
);
- copy = getCompilationUnit("/P/src/p2/X.java");
+ copy = getCompilationUnit("/P/src/p2/X.js");
copy.becomeWorkingCopy(null, null);
copyPositive(cuSource, pkgDest, null, null, true/*force*/);
@@ -611,17 +611,17 @@ public void testCopyWorkingCopyForce() throws CoreException {
try {
this.createFolder("/P/src/p1");
this.createFile(
- "/P/src/p1/X.java",
+ "/P/src/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}"
);
- ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.java");
+ ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.js");
copy = cuSource.getWorkingCopy(null);
this.createFolder("/P/src/p2");
this.createFile(
- "/P/src/p2/X.java",
+ "/P/src/p2/X.js",
"package p2;\n" +
"public class X {\n" +
"}"
@@ -642,18 +642,18 @@ public void testCopyWorkingCopyRename() throws CoreException {
try {
this.createFolder("/P/src/p1");
this.createFile(
- "/P/src/p1/X.java",
+ "/P/src/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}"
);
- ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.java");
+ ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.js");
copy = cuSource.getWorkingCopy(null);
this.createFolder("/P/src/p2");
IPackageFragment pkgDest = getPackage("/P/src/p2");
- copyPositive(copy, pkgDest, null, "Y.java", false);
+ copyPositive(copy, pkgDest, null, "Y.js", false);
} finally {
if (copy != null) copy.discardWorkingCopy();
}
@@ -667,24 +667,24 @@ public void testCopyWorkingCopyRenameForce() throws CoreException {
try {
this.createFolder("/P/src/p1");
this.createFile(
- "/P/src/p1/X.java",
+ "/P/src/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}"
);
- ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.java");
+ ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.js");
copy = cuSource.getWorkingCopy(null);
this.createFolder("/P/src/p2");
this.createFile(
- "/P/src/p2/Y.java",
+ "/P/src/p2/Y.js",
"package p2;\n" +
"public class Y {\n" +
"}"
);
IPackageFragment pkgDest = getPackage("/P/src/p2");
- copyPositive(copy, pkgDest, null, "Y.java", true);
+ copyPositive(copy, pkgDest, null, "Y.js", true);
} finally {
if (copy != null) copy.discardWorkingCopy();
}
@@ -697,17 +697,17 @@ public void testCopyWorkingCopyWithCollision() throws CoreException {
try {
this.createFolder("/P/src/p1");
this.createFile(
- "/P/src/p1/X.java",
+ "/P/src/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}"
);
- ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.java");
+ ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.js");
copy = cuSource.getWorkingCopy(null);
this.createFolder("/P/src/p2");
this.createFile(
- "/P/src/p2/X.java",
+ "/P/src/p2/X.js",
"package p2;\n" +
"public class X {\n" +
"}"
@@ -727,12 +727,12 @@ public void testCopyWorkingCopyWithInvalidDestination() throws CoreException {
try {
this.createFolder("/P/src/p1");
this.createFile(
- "/P/src/p1/X.java",
+ "/P/src/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}"
);
- ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.java");
+ ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.js");
copy = cuSource.getWorkingCopy(null);
copyNegative(copy, cuSource, null, null, false, IJavaModelStatusConstants.INVALID_DESTINATION);
@@ -746,19 +746,19 @@ public void testCopyWorkingCopyWithInvalidDestination() throws CoreException {
public void testMoveCU() throws CoreException {
this.createFolder("/P/src/p1");
this.createFile(
- "/P/src/p1/X.java",
+ "/P/src/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}"
);
- ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.java");
+ ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.js");
this.createFolder("/P/src/p2");
IPackageFragment pkgDest = getPackage("/P/src/p2");
movePositive(cuSource, pkgDest, null, null, false);
- ICompilationUnit cu= pkgDest.getCompilationUnit("X.java");
+ ICompilationUnit cu= pkgDest.getCompilationUnit("X.js");
assertTrue("Package declaration not updated for copied cu", cu.getPackageDeclaration("p2").exists());
}
/**
@@ -768,18 +768,18 @@ public void testMoveCU() throws CoreException {
public void testMoveCUAndType() throws CoreException {
this.createFolder("/P/src/p1");
this.createFile(
- "/P/src/p1/X.java",
+ "/P/src/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}"
);
- ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.java");
+ ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.js");
moveNegative(
new IJavaElement[]{cuSource, cuSource.getType("X")},
new IJavaElement[]{cuSource.getParent(), cuSource},
null,
- new String[]{"Y.java", "Y"},
+ new String[]{"Y.js", "Y"},
false,
IJavaModelStatusConstants.INVALID_ELEMENT_TYPES);
}
@@ -790,16 +790,16 @@ public void testMoveCUAndType() throws CoreException {
public void testMoveCUForce() throws CoreException {
this.createFolder("/P/src/p1");
this.createFile(
- "/P/src/p1/X.java",
+ "/P/src/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}"
);
- ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.java");
+ ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.js");
this.createFolder("/P/src/p2");
this.createFile(
- "/P/src/p2/X.java",
+ "/P/src/p2/X.js",
"package p2;\n" +
"public class X {\n" +
"}"
@@ -815,17 +815,17 @@ public void testMoveCUForce() throws CoreException {
public void testMoveCURename() throws CoreException {
this.createFolder("/P/src/p1");
this.createFile(
- "/P/src/p1/X.java",
+ "/P/src/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}"
);
- ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.java");
+ ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.js");
this.createFolder("/P/src/p2");
IPackageFragment pkgDest = getPackage("/P/src/p2");
- movePositive(cuSource, pkgDest, null, "Y.java", false);
+ movePositive(cuSource, pkgDest, null, "Y.js", false);
}
/**
* Ensures that a CU can be moved to a different package,
@@ -834,23 +834,23 @@ public void testMoveCURename() throws CoreException {
public void testMoveCURenameForce() throws CoreException {
this.createFolder("/P/src/p1");
this.createFile(
- "/P/src/p1/X.java",
+ "/P/src/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}"
);
- ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.java");
+ ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.js");
this.createFolder("/P/src/p2");
this.createFile(
- "/P/src/p2/Y.java",
+ "/P/src/p2/Y.js",
"package p2;\n" +
"public class Y {\n" +
"}"
);
IPackageFragment pkgDest = getPackage("/P/src/p2");
- movePositive(cuSource, pkgDest, null, "Y.java", true);
+ movePositive(cuSource, pkgDest, null, "Y.js", true);
}
/**
* Ensures that a CU cannot be moved to a different package, replacing an
@@ -859,16 +859,16 @@ public void testMoveCURenameForce() throws CoreException {
public void testMoveCUWithCollision() throws CoreException {
this.createFolder("/P/src/p1");
this.createFile(
- "/P/src/p1/X.java",
+ "/P/src/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}"
);
- ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.java");
+ ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.js");
this.createFolder("/P/src/p2");
this.createFile(
- "/P/src/p2/X.java",
+ "/P/src/p2/X.js",
"package p2;\n" +
"public class X {\n" +
"}"
@@ -883,12 +883,12 @@ public void testMoveCUWithCollision() throws CoreException {
public void testMoveCUWithInvalidDestination() throws CoreException {
this.createFolder("/P/src/p1");
this.createFile(
- "/P/src/p1/X.java",
+ "/P/src/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}"
);
- ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.java");
+ ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.js");
moveNegative(cuSource, cuSource, null, null, false, IJavaModelStatusConstants.INVALID_DESTINATION);
}
@@ -898,12 +898,12 @@ public void testMoveCUWithInvalidDestination() throws CoreException {
public void testMoveCUWithNullContainer() throws CoreException {
this.createFolder("/P/src/p1");
this.createFile(
- "/P/src/p1/X.java",
+ "/P/src/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}"
);
- ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.java");
+ ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.js");
try {
cuSource.move(null, null, null, false, null);
@@ -918,7 +918,7 @@ public void testMoveCUWithNullContainer() throws CoreException {
public void testMovePackageFragment() throws CoreException {
this.createFolder("/P/src/p1");
this.createFile(
- "/P/src/p1/X.java",
+ "/P/src/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}"
@@ -942,12 +942,12 @@ public void testMoveReadOnlyPackageFragment() throws CoreException {
try {
this.createFolder("/P/src/p1/p2/p3");
this.createFile(
- "/P/src/p1/p2/p3/X.java",
+ "/P/src/p1/p2/p3/X.js",
"package p1.p2.p3;\n" +
"public class X {\n" +
"}"
);
- Util.setReadOnly(getFile("/P/src/p1/p2/p3/X.java"), true);
+ Util.setReadOnly(getFile("/P/src/p1/p2/p3/X.js"), true);
pkgSource = getPackage("/P/src/p1");
Util.setReadOnly(pkgSource.getResource(), true);
pkg2 = getPackage("/P/src/p1/p2/p3");
@@ -960,9 +960,9 @@ public void testMoveReadOnlyPackageFragment() throws CoreException {
assertTrue("Not readOnly", Util.isReadOnly(getPackage("/P/src2/p1").getResource()));
assertTrue("Is readOnly", !Util.isReadOnly(getPackage("/P/src2/p1/p2").getResource()));
assertTrue("Not readOnly", Util.isReadOnly(getPackage("/P/src2/p1/p2/p3").getResource()));
- assertTrue("Is readOnly", Util.isReadOnly(getFile("/P/src2/p1/p2/p3/X.java")));
+ assertTrue("Is readOnly", Util.isReadOnly(getFile("/P/src2/p1/p2/p3/X.js")));
} finally {
- IFile xSrcFile = getFile("/P/src/p1/p2/p3/X.java");
+ IFile xSrcFile = getFile("/P/src/p1/p2/p3/X.js");
if (xSrcFile != null) {
Util.setReadOnly(xSrcFile, false);
}
@@ -980,7 +980,7 @@ public void testMoveReadOnlyPackageFragment() throws CoreException {
if (p3Fragment != null) {
Util.setReadOnly(p3Fragment.getResource(), false);
}
- IFile xFile = getFile("/P/src2/p1/p2/p3/X.java");
+ IFile xFile = getFile("/P/src2/p1/p2/p3/X.js");
if (xFile != null) {
Util.setReadOnly(xFile, false);
}
@@ -995,12 +995,12 @@ public void testMoveWorkingCopy() throws CoreException {
try {
this.createFolder("/P/src/p1");
this.createFile(
- "/P/src/p1/X.java",
+ "/P/src/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}"
);
- ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.java");
+ ICompilationUnit cuSource = getCompilationUnit("/P/src/p1/X.js");
copy = cuSource.getWorkingCopy(null);
this.createFolder("/P/src/p2");
@@ -1022,12 +1022,12 @@ public void testMoveWorkingCopy2() throws CoreException {
try {
this.createFolder("/P/src/p1");
this.createFile(
- "/P/src/p1/X.java",
+ "/P/src/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}"
);
- copy = getCompilationUnit("/P/src/p1/X.java");
+ copy = getCompilationUnit("/P/src/p1/X.js");
copy.becomeWorkingCopy(null, null);
this.createFolder("/P/src/p2");
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CopyMoveTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CopyMoveTests.java
index b6bbe45..4a8f5ab 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CopyMoveTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CopyMoveTests.java
@@ -152,7 +152,7 @@ public IJavaElement generateHandle(IJavaElement original, String rename, IJavaEl
case IJavaElement.TYPE :
if (isMainType(original, container)) {
//the cu has been renamed as well
- container = ((IPackageFragment) container.getParent()).getCompilationUnit(name + ".java");
+ container = ((IPackageFragment) container.getParent()).getCompilationUnit(name + ".js");
}
return ((ICompilationUnit) container).getType(name);
default :
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CreateCompilationUnitTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CreateCompilationUnitTests.java
index ae7bd54..9dfe0b3 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CreateCompilationUnitTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CreateCompilationUnitTests.java
@@ -45,7 +45,7 @@ public void tearDown() throws Exception {
*/
public void testCUAndImportContainer() throws JavaModelException {
IPackageFragment pkg = getPackage("/P/p");
- ICompilationUnit cu= pkg.createCompilationUnit("HelloImports.java",
+ ICompilationUnit cu= pkg.createCompilationUnit("HelloImports.js",
("package p;\n" +
"\n" +
"import java.util.Enumeration;\n" +
@@ -77,7 +77,7 @@ public void testCUAndImportContainer() throws JavaModelException {
*/
public void testDefaultCU() throws CoreException {
IPackageFragment pkg = getPackage("/P/p");
- ICompilationUnit cu= pkg.getCompilationUnit("Default.java");
+ ICompilationUnit cu= pkg.getCompilationUnit("Default.js");
IType type= cu.createType("public class Default {}", null, false, null);
assertCreation(cu);
assertCreation(type);
@@ -104,13 +104,13 @@ public void testDefaultCU() throws CoreException {
// should fail if we try again
try {
- pkg.createCompilationUnit("Default.java", "", false, null);
+ pkg.createCompilationUnit("Default.js", "", false, null);
} catch (JavaModelException jme) {
assertTrue("Exception status not correct for creating a cu that already exists", jme.getStatus().getCode() == IJavaModelStatusConstants.NAME_COLLISION);
}
// should fail if we try again
try {
- pkg.createCompilationUnit("Default.java", "public class Default {}", true, null);
+ pkg.createCompilationUnit("Default.js", "public class Default {}", true, null);
return;
} catch (JavaModelException jme) {
}
@@ -124,10 +124,10 @@ public void testEmptyCU() {
IPackageFragment pkg = getPackage("/P/p");
// should fail if we try again
try {
- pkg.createCompilationUnit("Empty.java", "", true, null);
+ pkg.createCompilationUnit("Empty.js", "", true, null);
} catch (JavaModelException jme) {
}
- ICompilationUnit cu= pkg.getCompilationUnit("Empty.java");
+ ICompilationUnit cu= pkg.getCompilationUnit("Empty.js");
assertCreation(cu);
}
/*
@@ -137,9 +137,9 @@ public void testEmptyCU() {
public void testForce() throws JavaModelException, IOException {
IPackageFragment pkg = getPackage("/P/p");
File folder = pkg.getResource().getLocation().toFile();
- new File(folder, "X.java").createNewFile();
+ new File(folder, "X.js").createNewFile();
ICompilationUnit cu = pkg.createCompilationUnit(
- "X.java",
+ "X.js",
"package p;\n" +
"public class X {\n" +
"}",
@@ -180,7 +180,7 @@ public void testInvalidName() {
public void testNullContents() {
IPackageFragment pkg = getPackage("/P/p");
try {
- pkg.createCompilationUnit("HelloWorld.java", null, false, null);
+ pkg.createCompilationUnit("HelloWorld.js", null, false, null);
} catch (JavaModelException jme) {
assertTrue("Incorrect JavaModelException thrown for creating a cu with null contents: " + jme, jme.getStatus().getCode() == IJavaModelStatusConstants.INVALID_CONTENTS);
return;
@@ -195,7 +195,7 @@ public void testNullContents() {
*/
public void testSimpleCreation() throws JavaModelException {
IPackageFragment pkg = getPackage("/P/p");
- ICompilationUnit cu= pkg.createCompilationUnit("HelloWorld.java",
+ ICompilationUnit cu= pkg.createCompilationUnit("HelloWorld.js",
("package p;\n" +
"\n" +
"public class HelloWorld {\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CreateImportsTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CreateImportsTests.java
index 6a5e05c..7c849dd 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CreateImportsTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CreateImportsTests.java
@@ -36,7 +36,7 @@ public class CreateImportsTests extends AbstractJavaModelTests {
}
protected void setUp() throws Exception {
super.setUp();
- ICompilationUnit workingCopy = getCompilationUnit("P/X.java");
+ ICompilationUnit workingCopy = getCompilationUnit("P/X.js");
workingCopy.becomeWorkingCopy(null/*no problem requested*/, null/*no progress*/);
this.workingCopies = new ICompilationUnit[] {workingCopy};
setContents(
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CreateMembersTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CreateMembersTests.java
index 5985af2..e7f97f4 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CreateMembersTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CreateMembersTests.java
@@ -35,7 +35,7 @@ public class CreateMembersTests extends AbstractJavaModelTests {
// TESTS_RANGE = new int[] { 21, 38 };
}
public static Test suite() {
- return buildModelTestSuite(CreateMembersTests.class, ALPHABETICAL_SORT);
+ return buildModelTestSuite(CreateMembersTests.class, 1/*sort ascending order*/);
}
public void setUpSuite() throws Exception {
super.setUpSuite();
@@ -48,45 +48,44 @@ public class CreateMembersTests extends AbstractJavaModelTests {
}
public void test001() throws JavaModelException {
- ICompilationUnit compilationUnit = getCompilationUnit("CreateMembers", "src", "", "A.java");
+ ICompilationUnit compilationUnit = getCompilationUnit("CreateMembers", "src", "", "A.js");
assertNotNull("No compilation unit", compilationUnit);
- IType[] types = compilationUnit.getTypes();
- assertNotNull("No types", types);
- assertEquals("Wrong size", 1, types.length);
- IType type = types[0];
- type.createMethod("\tpublic void foo() {\n\t\tSystem.out.println(\"Hello World\");\n\t}\n", null, true, new NullProgressMonitor());
+// IType[] types = compilationUnit.getTypes();
+// assertNotNull("No types", types);
+// assertEquals("Wrong size", 1, types.length);
+// IType type = types[0];
+ compilationUnit.createMethod("\tfunction foo() {\n\t\tSystem.out.println(\"Hello World\");\n\t}\n", null, true, new NullProgressMonitor());
String expectedSource =
- "public class A {\n" +
+ "var aVar;\n" +
"\n" +
- " public void foo() {\n" +
- " System.out.println(\"Hello World\");\n" +
- " }\n" +
- "}";
- assertSourceEquals("Unexpected source", expectedSource, type.getSource());
+ "function foo() {\n" +
+ "\tSystem.out.println(\"Hello World\");\n" +
+ "}" +
+ "";
+ assertSourceEquals("Unexpected source", expectedSource, compilationUnit.getSource());
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=86906
public void test002() throws JavaModelException {
- ICompilationUnit compilationUnit = getCompilationUnit("CreateMembers", "src", "", "E.java");
+ ICompilationUnit compilationUnit = getCompilationUnit("CreateMembers", "src", "", "A2.js");
assertNotNull("No compilation unit", compilationUnit);
- IType[] types = compilationUnit.getTypes();
- assertNotNull("No types", types);
- assertEquals("Wrong size", 1, types.length);
- IType type = types[0];
- IField sibling = type.getField("j");
- type.createField("int i;", sibling, true, null);
+// IType[] types = compilationUnit.getTypes();
+// assertNotNull("No types", types);
+// assertEquals("Wrong size", 1, types.length);
+// IType type = types[0];
+ IField sibling = compilationUnit.getField("aVar");
+ compilationUnit.createField("var i;", sibling, true, null);
String expectedSource =
- "public enum E {\n" +
- " E1, E2;\n" +
- " int i;\n" +
- " int j;\n" +
- "}";
- assertSourceEquals("Unexpected source", expectedSource, type.getSource());
+ "var i;\n" +
+ "\n" +
+ "var aVar;" +
+ "";
+ assertSourceEquals("Unexpected source", expectedSource, compilationUnit.getSource());
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=86906
public void test003() throws JavaModelException {
- ICompilationUnit compilationUnit = getCompilationUnit("CreateMembers", "src", "", "Annot.java");
+ ICompilationUnit compilationUnit = getCompilationUnit("CreateMembers", "src", "", "Annot.js");
assertNotNull("No compilation unit", compilationUnit);
IType[] types = compilationUnit.getTypes();
assertNotNull("No types", types);
@@ -108,7 +107,7 @@ public class CreateMembersTests extends AbstractJavaModelTests {
* (regression test for bug 93487 IType#findMethods fails on vararg methods)
*/
public void test004() throws JavaModelException {
- IType type = getCompilationUnit("/CreateMembers/src/A.java").getType("A");
+ IType type = getCompilationUnit("/CreateMembers/src/A.js").getType("A");
IMethod method = type.createMethod(
"void bar(String... args) {}",
null, // no siblings
@@ -120,7 +119,7 @@ public class CreateMembersTests extends AbstractJavaModelTests {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=95580
public void test005() throws JavaModelException {
- ICompilationUnit compilationUnit = getCompilationUnit("CreateMembers", "src", "", "E2.java");
+ ICompilationUnit compilationUnit = getCompilationUnit("CreateMembers", "src", "", "E2.js");
assertNotNull("No compilation unit", compilationUnit);
IType[] types = compilationUnit.getTypes();
assertNotNull("No types", types);
@@ -137,7 +136,7 @@ public class CreateMembersTests extends AbstractJavaModelTests {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=95580
public void test006() throws JavaModelException {
- ICompilationUnit compilationUnit = getCompilationUnit("CreateMembers", "src", "", "E3.java");
+ ICompilationUnit compilationUnit = getCompilationUnit("CreateMembers", "src", "", "E3.js");
assertNotNull("No compilation unit", compilationUnit);
IType[] types = compilationUnit.getTypes();
assertNotNull("No types", types);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/DeleteTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/DeleteTests.java
index 255bbe4..6dfdb7c 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/DeleteTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/DeleteTests.java
@@ -61,13 +61,13 @@ public void tearDownSuite() throws Exception {
public void testDeleteAllImports() throws CoreException {
try {
createFile(
- "P/X.java",
+ "P/X.js",
"import java.util.*;\n" +
"import q.Y;\n" +
"public class X {\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("P/X.java");
+ ICompilationUnit cu = getCompilationUnit("P/X.js");
IImportDeclaration[] children= cu.getImports();
startDeltas();
@@ -82,7 +82,7 @@ public void testDeleteAllImports() throws CoreException {
);
} finally {
stopDeltas();
- deleteFile("P/X.java");
+ deleteFile("P/X.js");
}
}
/**
@@ -161,11 +161,11 @@ public void testDeleteBinaryType() throws CoreException {
public void testDeleteCompilationUnit1() throws CoreException {
try {
createFile(
- "P/X.java",
+ "P/X.js",
"public class X {\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("P/X.java");
+ ICompilationUnit cu = getCompilationUnit("P/X.js");
startDeltas();
cu.delete(false, null);
@@ -179,7 +179,7 @@ public void testDeleteCompilationUnit1() throws CoreException {
);
} finally {
stopDeltas();
- deleteFile("P/X.java");
+ deleteFile("P/X.js");
}
}
@@ -190,11 +190,11 @@ public void testDeleteCompilationUnit1() throws CoreException {
public void testDeleteCompilationUnit2() throws CoreException {
try {
IFile file = createFile(
- "P/X.java",
+ "P/X.js",
"public class X {\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("P/X.java");
+ ICompilationUnit cu = getCompilationUnit("P/X.js");
startDeltas();
Util.delete(file);
@@ -208,7 +208,7 @@ public void testDeleteCompilationUnit2() throws CoreException {
);
} finally {
stopDeltas();
- deleteFile("P/X.java");
+ deleteFile("P/X.js");
}
}
/**
@@ -218,11 +218,11 @@ public void testDeleteCompilationUnit2() throws CoreException {
public void testDeleteCompilationUnit3() throws CoreException {
try {
createFile(
- "P/X.java",
+ "P/X.js",
"public class X {\n" +
"}"
);
- final ICompilationUnit cu = getCompilationUnit("P/X.java");
+ final ICompilationUnit cu = getCompilationUnit("P/X.js");
// force the cu to be opened
cu.open(null);
@@ -247,7 +247,7 @@ public void testDeleteCompilationUnit3() throws CoreException {
);
} finally {
stopDeltas();
- deleteFile("P/X.java");
+ deleteFile("P/X.js");
}
}
/**
@@ -257,12 +257,12 @@ public void testDeleteCompilationUnit4() throws CoreException {
try {
createFolder("P/p");
IFile file = createFile(
- "P/p/X.java",
+ "P/p/X.js",
"package p;\n" +
"public class X {\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("P/p/X.java");
+ ICompilationUnit cu = getCompilationUnit("P/p/X.js");
startDeltas();
cu.delete(false, null);
@@ -287,13 +287,13 @@ public void testDeleteCompilationUnit4() throws CoreException {
public void testDeleteConstructor() throws CoreException {
try {
createFile(
- "P/X.java",
+ "P/X.js",
"public class X {\n" +
" public X(String s) {\n" +
" }\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("P/X.java");
+ ICompilationUnit cu = getCompilationUnit("P/X.js");
IMethod constructor = cu.getType("X").getMethod("X", new String[] {"QString;"});
startDeltas();
@@ -310,7 +310,7 @@ public void testDeleteConstructor() throws CoreException {
);
} finally {
stopDeltas();
- deleteFile("P/X.java");
+ deleteFile("P/X.js");
}
}
/**
@@ -341,12 +341,12 @@ public void testDeleteEmptyPackageFragment() throws CoreException {
public void testDeleteField1() throws CoreException { // was testDeleteField
try {
createFile(
- "P/X.java",
+ "P/X.js",
"public class X {\n" +
" int field;\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("P/X.java");
+ ICompilationUnit cu = getCompilationUnit("P/X.js");
IField field = cu.getType("X").getField("field");
startDeltas();
@@ -362,7 +362,7 @@ public void testDeleteField1() throws CoreException { // was testDeleteField
);
} finally {
stopDeltas();
- deleteFile("P/X.java");
+ deleteFile("P/X.js");
}
}
/**
@@ -371,12 +371,12 @@ public void testDeleteField1() throws CoreException { // was testDeleteField
public void testDeleteField2() throws CoreException { // was testDeleteFieldWithCancel
try {
createFile(
- "P/X.java",
+ "P/X.js",
"public class X {\n" +
" int field;\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("P/X.java");
+ ICompilationUnit cu = getCompilationUnit("P/X.js");
IField field = cu.getType("X").getField("field");
boolean isCanceled = false;
@@ -389,7 +389,7 @@ public void testDeleteField2() throws CoreException { // was testDeleteFieldWith
}
assertTrue("Operation should have thrown an operation canceled exception", isCanceled);
} finally {
- deleteFile("P/X.java");
+ deleteFile("P/X.js");
}
}
/*
@@ -399,12 +399,12 @@ public void testDeleteField2() throws CoreException { // was testDeleteFieldWith
public void testDeleteField3() throws CoreException {
try {
IFile file = createFile(
- "P/X.java",
+ "P/X.js",
"public class X {\n" +
" int field;\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("P/X.java");
+ ICompilationUnit cu = getCompilationUnit("P/X.js");
final IField field = cu.getType("X").getField("field");
startDeltas();
@@ -428,7 +428,7 @@ public void testDeleteField3() throws CoreException {
);
} finally {
stopDeltas();
- deleteFile("P/X.java");
+ deleteFile("P/X.js");
}
}
/*
@@ -438,12 +438,12 @@ public void testDeleteField3() throws CoreException {
public void testDeleteField4() throws CoreException {
try {
createFile(
- "P/X.java",
+ "P/X.js",
"public class X {\n" +
" private String t = \"sample test\";\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("P/X.java");
+ ICompilationUnit cu = getCompilationUnit("P/X.js");
IField field = cu.getType("X").getField("t");
field.delete(false, null);
assertSourceEquals(
@@ -452,7 +452,7 @@ public void testDeleteField4() throws CoreException {
"}",
cu.getSource());
} finally {
- deleteFile("P/X.java");
+ deleteFile("P/X.js");
}
}
/**
@@ -462,12 +462,12 @@ public void testDeleteField5() throws CoreException {
try {
this.createJavaProject("P1", new String[] {""}, new String[] {"JCL15_LIB"}, null, "", "1.5");
createFile(
- "P1/X.java",
+ "P1/X.js",
"public enum X {\n" +
" A, B, C\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("P1/X.java");
+ ICompilationUnit cu = getCompilationUnit("P1/X.js");
IField field = cu.getType("X").getField("A");
field.delete(false, null);
assertSourceEquals(
@@ -486,13 +486,13 @@ public void testDeleteField5() throws CoreException {
public void testDeleteImportDeclaration() throws CoreException {
try {
createFile(
- "P/X.java",
+ "P/X.js",
"import java.util.*;\n" +
"import q.Y;\n" +
"public class X {\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("P/X.java");
+ ICompilationUnit cu = getCompilationUnit("P/X.js");
IImportDeclaration imp= cu.getImport("q.Y");
startDeltas();
@@ -508,7 +508,7 @@ public void testDeleteImportDeclaration() throws CoreException {
);
} finally {
stopDeltas();
- deleteFile("P/X.java");
+ deleteFile("P/X.js");
}
}
/**
@@ -517,13 +517,13 @@ public void testDeleteImportDeclaration() throws CoreException {
public void testDeleteMethod() throws CoreException {
try {
createFile(
- "P/X.java",
+ "P/X.js",
"public class X {\n" +
" public void foo() {\n" +
" }\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("P/X.java");
+ ICompilationUnit cu = getCompilationUnit("P/X.js");
IMethod method = cu.getType("X").getMethod("foo", new String[] {});
startDeltas();
@@ -539,7 +539,7 @@ public void testDeleteMethod() throws CoreException {
);
} finally {
stopDeltas();
- deleteFile("P/X.java");
+ deleteFile("P/X.js");
}
}
/**
@@ -551,7 +551,7 @@ public void testDeleteMultipleMembersFromVariousCUs() throws CoreException {
try {
createFolder("P/a/b/c");
createFile(
- "P/a/b/c/X.java",
+ "P/a/b/c/X.js",
"package a.b.c;\n" +
"import java.util.Vector;\n" +
"import java.util.Enumeration;\n" +
@@ -570,7 +570,7 @@ public void testDeleteMultipleMembersFromVariousCUs() throws CoreException {
"}"
);
createFile(
- "P/a/b/Y.java",
+ "P/a/b/Y.js",
"package a.b;\n" +
"public class Y {\n" +
" int foo;\n" +
@@ -593,7 +593,7 @@ public void testDeleteMultipleMembersFromVariousCUs() throws CoreException {
// foo
// main
- ICompilationUnit cuX = getCompilationUnit("P/a/b/c/X.java");
+ ICompilationUnit cuX = getCompilationUnit("P/a/b/c/X.js");
IType typeX = cuX.getType("X");
IType typeBar = typeX.getType("Bar");
@@ -605,7 +605,7 @@ public void testDeleteMultipleMembersFromVariousCUs() throws CoreException {
toBeDeleted[4] = typeBar.getMethod("test", new String[] {});
toBeDeleted[5] = typeBar;
- ICompilationUnit cuY = getCompilationUnit("P/a/b/Y.java");
+ ICompilationUnit cuY = getCompilationUnit("P/a/b/Y.js");
IType typeY = cuY.getType("Y");
toBeDeleted[6] = typeY.getField("foo");
@@ -642,12 +642,12 @@ public void testDeletePackageDeclaration() throws CoreException {
try {
createFolder("P/a/b/c");
createFile(
- "P/a/b/c/X.java",
+ "P/a/b/c/X.js",
"package a.b.c;\n" +
"public class X {\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("P/a/b/c/X.java");
+ ICompilationUnit cu = getCompilationUnit("P/a/b/c/X.js");
IPackageDeclaration packageDeclaration = cu.getPackageDeclaration("a.b.c");
startDeltas();
@@ -669,7 +669,7 @@ public void testDeletePackageFragment1() throws CoreException {
try {
createFolder("P/a/b/c");
createFile(
- "P/a/b/c/X.java",
+ "P/a/b/c/X.js",
"package a.b.c;\n" +
"public class X {\n" +
"}"
@@ -700,13 +700,13 @@ public void testDeletePackageFragment2() throws CoreException {
try {
createJavaProject("P1", new String[] {"src"}, "bin");
IFile file = createFile(
- "P1/src/X.java",
+ "P1/src/X.js",
"public class X {\n" +
"}"
);
IPackageFragment pkg = getPackage("P1/src");
IFolder folder = getFolder("P1/src");
- ICompilationUnit cu = getCompilationUnit("P1/src/X.java");
+ ICompilationUnit cu = getCompilationUnit("P1/src/X.js");
startDeltas();
pkg.delete(false, null);
@@ -734,13 +734,13 @@ public void testDeletePackageFragment3() throws CoreException {
try {
createJavaProject("P1");
IFile file = createFile(
- "P1/X.java",
+ "P1/X.js",
"public class X {\n" +
"}"
);
IPackageFragment pkg = getPackage("P1");
IProject project = getProject("P1");
- ICompilationUnit cu = getCompilationUnit("P1/X.java");
+ ICompilationUnit cu = getCompilationUnit("P1/X.js");
startDeltas();
pkg.delete(false, null);
@@ -800,7 +800,7 @@ public void testDeleteProjectAfterUsingJar() throws CoreException, IOException {
"lib.jar",
"libsrc.zip",
new String[] {
- "p/X.java",
+ "p/X.js",
"package p;\n" +
"public class X {\n" +
"}",
@@ -822,12 +822,12 @@ public void testDeleteProjectAfterUsingJar() throws CoreException, IOException {
public void testDeleteSyntaxErrorField() throws CoreException {
try {
createFile(
- "P/X.java",
+ "P/X.js",
"public class X {\n" +
" int field\n" + // missing semi-colon
"}"
);
- ICompilationUnit cu = getCompilationUnit("P/X.java");
+ ICompilationUnit cu = getCompilationUnit("P/X.js");
IField field = cu.getType("X").getField("field");
startDeltas();
@@ -843,7 +843,7 @@ public void testDeleteSyntaxErrorField() throws CoreException {
);
} finally {
stopDeltas();
- deleteFile("P/X.java");
+ deleteFile("P/X.js");
}
}
/**
@@ -852,7 +852,7 @@ public void testDeleteSyntaxErrorField() throws CoreException {
public void testDeleteSyntaxErrorInMethod1() throws CoreException {
try {
createFile(
- "P/X.java",
+ "P/X.js",
"public class X {\n" +
" public void foo() {\n" +
" String s = ;\n" +
@@ -860,7 +860,7 @@ public void testDeleteSyntaxErrorInMethod1() throws CoreException {
" }\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("P/X.java");
+ ICompilationUnit cu = getCompilationUnit("P/X.js");
IMethod method = cu.getType("X").getMethod("foo", new String[] {});
startDeltas();
@@ -876,7 +876,7 @@ public void testDeleteSyntaxErrorInMethod1() throws CoreException {
);
} finally {
stopDeltas();
- deleteFile("P/X.java");
+ deleteFile("P/X.js");
}
}
/**
@@ -885,12 +885,12 @@ public void testDeleteSyntaxErrorInMethod1() throws CoreException {
public void testDeleteSyntaxErrorInMethod2() throws CoreException {
try {
createFile(
- "P/X.java",
+ "P/X.js",
"public class X {\n" +
" public void foo() \n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("P/X.java");
+ ICompilationUnit cu = getCompilationUnit("P/X.js");
IMethod method = cu.getType("X").getMethod("foo", new String[] {});
startDeltas();
@@ -906,7 +906,7 @@ public void testDeleteSyntaxErrorInMethod2() throws CoreException {
);
} finally {
stopDeltas();
- deleteFile("P/X.java");
+ deleteFile("P/X.js");
}
}
/**
@@ -915,13 +915,13 @@ public void testDeleteSyntaxErrorInMethod2() throws CoreException {
public void testDeleteSyntaxErrorInMethod3() throws CoreException {
try {
createFile(
- "P/X.java",
+ "P/X.js",
"public class X {\n" +
" public void foo( \n" +
" }\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("P/X.java");
+ ICompilationUnit cu = getCompilationUnit("P/X.js");
IMethod method = cu.getType("X").getMethod("foo", new String[] {});
startDeltas();
@@ -937,7 +937,7 @@ public void testDeleteSyntaxErrorInMethod3() throws CoreException {
);
} finally {
stopDeltas();
- deleteFile("P/X.java");
+ deleteFile("P/X.js");
}
}
/**
@@ -946,12 +946,12 @@ public void testDeleteSyntaxErrorInMethod3() throws CoreException {
public void testDeleteSyntaxErrorType() throws CoreException {
try {
createFile(
- "P/X.java",
+ "P/X.js",
"public class X {\n" +
" method() {\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("P/X.java");
+ ICompilationUnit cu = getCompilationUnit("P/X.js");
IType type = cu.getType("X");
startDeltas();
@@ -966,7 +966,7 @@ public void testDeleteSyntaxErrorType() throws CoreException {
);
} finally {
stopDeltas();
- deleteFile("P/X.java");
+ deleteFile("P/X.js");
}
}
/**
@@ -975,11 +975,11 @@ public void testDeleteSyntaxErrorType() throws CoreException {
public void testDeleteType1() throws CoreException{
try {
createFile(
- "P/X.java",
+ "P/X.js",
"public class X {\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("P/X.java");
+ ICompilationUnit cu = getCompilationUnit("P/X.js");
IType type = cu.getType("X");
startDeltas();
@@ -994,7 +994,7 @@ public void testDeleteType1() throws CoreException{
);
} finally {
stopDeltas();
- deleteFile("P/X.java");
+ deleteFile("P/X.js");
}
}
/**
@@ -1005,11 +1005,11 @@ public void testDeleteType2() throws CoreException {
try {
createJavaProject("P1", new String[] {"src"}, "bin");
createFile(
- "P1/src/X.java",
+ "P1/src/X.js",
"public class X {\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("P1/src/X.java");
+ ICompilationUnit cu = getCompilationUnit("P1/src/X.js");
IType type = cu.getType("X");
startDeltas();
@@ -1034,11 +1034,11 @@ public void testDeleteWithInvalidInput() throws CoreException {
IType type = null;
try {
createFile(
- "P/X.java",
+ "P/X.js",
"public class X {\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("P/X.java");
+ ICompilationUnit cu = getCompilationUnit("P/X.js");
type = cu.getType("X");
getJavaModel().delete(null, false, null);
@@ -1051,7 +1051,7 @@ public void testDeleteWithInvalidInput() throws CoreException {
}
return;
} finally {
- deleteFile("P/X.java");
+ deleteFile("P/X.js");
}
}
}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/EncodingTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/EncodingTests.java
index 4cc7c74..21fb8cb 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/EncodingTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/EncodingTests.java
@@ -69,7 +69,7 @@ public class EncodingTests extends ModifyingResourceTests {
System.out.println("Encoding tests using Workspace charset: "+wkspEncoding+" and VM charset: "+vmEncoding);
this.encodingJavaProject = setUpJavaProject("Encoding");
this.encodingProject = (IProject) this.encodingJavaProject.getResource();
- this.utf8File = (IFile) this.encodingProject.findMember("src/testUTF8/Test.java");
+ this.utf8File = (IFile) this.encodingProject.findMember("src/testUTF8/Test.js");
}
public void tearDownSuite() throws Exception {
@@ -146,12 +146,12 @@ public class EncodingTests extends ModifyingResourceTests {
" System.out.println(\"\u00e9\");\r\n" +
" }\r\n" +
"}";
- ICompilationUnit cu= pkg.createCompilationUnit("A.java", source, false, new NullProgressMonitor());
+ ICompilationUnit cu= pkg.createCompilationUnit("A.js", source, false, new NullProgressMonitor());
assertCreation(cu);
- cu.rename("B.java", true, new NullProgressMonitor());
- cu = pkg.getCompilationUnit("B.java");
- cu.rename("A.java", true, new NullProgressMonitor());
- cu = pkg.getCompilationUnit("A.java");
+ cu.rename("B.js", true, new NullProgressMonitor());
+ cu = pkg.getCompilationUnit("B.js");
+ cu.rename("A.js", true, new NullProgressMonitor());
+ cu = pkg.getCompilationUnit("A.js");
byte[] tab = null;
try {
tab = cu.getSource().getBytes(encoding);
@@ -514,9 +514,9 @@ public class EncodingTests extends ModifyingResourceTests {
String initialContent = "/**\n"+
" */\n"+
"public class Test {}";
- IFile file = this.createFile("P/Test.java", initialContent);
+ IFile file = this.createFile("P/Test.js", initialContent);
file.setCharset(encoding, null);
- ICompilationUnit cu = this.getCompilationUnit("P/Test.java");
+ ICompilationUnit cu = this.getCompilationUnit("P/Test.js");
// Modif direct the buffer
String firstModif = "/**\n"+
@@ -560,9 +560,9 @@ public class EncodingTests extends ModifyingResourceTests {
String initialContent = "/**\n"+
" */\n"+
"public class Test {}";
- IFile file = this.createFile("P/Test.java", initialContent);
+ IFile file = this.createFile("P/Test.js", initialContent);
file.setCharset(encoding, null);
- ICompilationUnit cu = this.getCompilationUnit("P/Test.java");
+ ICompilationUnit cu = this.getCompilationUnit("P/Test.js");
// Modif using working copy
workingCopy = cu.getWorkingCopy(null);
@@ -611,7 +611,7 @@ public class EncodingTests extends ModifyingResourceTests {
String source = this.utf8Source.getSource();
// Get source and compare with file contents
- IFile bomFile = (IFile) this.encodingProject.findMember("src/testUTF8BOM/Test.java");
+ IFile bomFile = (IFile) this.encodingProject.findMember("src/testUTF8BOM/Test.js");
ISourceReference bomSourceRef = getCompilationUnit(bomFile.getFullPath().toString());
String bomSource = bomSourceRef.getSource();
assertEquals("BOM UTF-8 source should be idtentical than UTF-8!", source, bomSource);
@@ -631,7 +631,7 @@ public class EncodingTests extends ModifyingResourceTests {
IFile file = null;
try {
file = createFile(
- "/Encoding/src/test68585/X.java",
+ "/Encoding/src/test68585/X.js",
"package test68585;\n" +
"public class X {\n" +
"}\n" +
@@ -657,7 +657,7 @@ public class EncodingTests extends ModifyingResourceTests {
assertSearchResults("Should not get any result", "", resultCollector);
// change encoding so that file is readable
- getFile("/Encoding/src/test68585/X.java").setCharset(encoding, null);
+ getFile("/Encoding/src/test68585/X.js").setCharset(encoding, null);
search(
"Y\u00F4",
IJavaSearchConstants.TYPE,
@@ -725,7 +725,7 @@ public class EncodingTests extends ModifyingResourceTests {
// Set file encoding
String encoding = "UTF-8".equals(vmEncoding) ? "Cp1252" : "UTF-8";
- IFile file = (IFile) this.encodingProject.findMember("src/testBug66898/Test.java");
+ IFile file = (IFile) this.encodingProject.findMember("src/testBug66898/Test.js");
file.setCharset(encoding, null);
String fileName = file.getName();
ICompilationUnit cu = getCompilationUnit(file.getFullPath().toString());
@@ -743,8 +743,8 @@ public class EncodingTests extends ModifyingResourceTests {
compareContents(destSource, encoding);
// Rename file
- destSource.rename("TestUTF8.java", false, null);
- ICompilationUnit renamedSource = packFrag.getCompilationUnit("TestUTF8.java");
+ destSource.rename("TestUTF8.js", false, null);
+ ICompilationUnit renamedSource = packFrag.getCompilationUnit("TestUTF8.js");
IFile renamedFile = (IFile) renamedSource.getUnderlyingResource();
assertEquals("Moved file should keep encoding", encoding, renamedFile.getCharset());
@@ -762,7 +762,7 @@ public class EncodingTests extends ModifyingResourceTests {
// Set file encoding
final String encoding = "UTF-8".equals(vmEncoding) ? "Cp1252" : "UTF-8";
- final IFile file = (IFile) this.encodingProject.findMember("src/testBug66898b/Test.java");
+ final IFile file = (IFile) this.encodingProject.findMember("src/testBug66898b/Test.js");
file.setCharset(encoding, null);
final String fileName = file.getName();
final IPackageFragment srcFolder = getPackageFragment("Encoding", "src", "testBug66898b");
@@ -790,9 +790,9 @@ public class EncodingTests extends ModifyingResourceTests {
IWorkspaceRunnable rename = new IWorkspaceRunnable() {
public void run(IProgressMonitor monitor) throws CoreException {
ICompilationUnit cu = tmpFolder.getCompilationUnit(fileName);
- cu.rename("Renamed.java", true, null);
+ cu.rename("Renamed.js", true, null);
cu.close(); // purge buffer contents from cache
- ICompilationUnit ren = tmpFolder.getCompilationUnit("Renamed.java");
+ ICompilationUnit ren = tmpFolder.getCompilationUnit("Renamed.js");
IFile renFile = (IFile) ren.getUnderlyingResource();
assertEquals("Renamed file should keep encoding", encoding, renFile.getCharset());
@@ -805,10 +805,10 @@ public class EncodingTests extends ModifyingResourceTests {
// Move file
IWorkspaceRunnable move = new IWorkspaceRunnable() {
public void run(IProgressMonitor monitor) throws CoreException {
- ICompilationUnit cu = tmpFolder.getCompilationUnit("Renamed.java");
+ ICompilationUnit cu = tmpFolder.getCompilationUnit("Renamed.js");
cu.move(srcFolder, null, null, true, null);
cu.close(); // purge buffer contents from cache
- ICompilationUnit moved = srcFolder.getCompilationUnit("Renamed.java");
+ ICompilationUnit moved = srcFolder.getCompilationUnit("Renamed.js");
IFile movedFile = (IFile) moved.getUnderlyingResource();
assertEquals("Renamed file should keep encoding", encoding, movedFile.getCharset());
@@ -820,7 +820,7 @@ public class EncodingTests extends ModifyingResourceTests {
}
finally {
// Delete temporary file and folder
- ICompilationUnit cu = srcFolder.getCompilationUnit("Renamed.java");
+ ICompilationUnit cu = srcFolder.getCompilationUnit("Renamed.js");
if (cu.exists()) cu.delete(true, null);
deleteFolder("/Encoding/src/tmp");
}
@@ -833,7 +833,7 @@ public class EncodingTests extends ModifyingResourceTests {
public void testBug70598() throws JavaModelException, CoreException, IOException {
// Create empty file
- IFile emptyFile = createFile("/Encoding/src/testUTF8BOM/Empty.java", new byte[0]);
+ IFile emptyFile = createFile("/Encoding/src/testUTF8BOM/Empty.js", new byte[0]);
// Test read empty content using io file
File file = new File(this.encodingProject.getLocation().toString(), emptyFile.getProjectRelativePath().toString());
@@ -861,7 +861,7 @@ public class EncodingTests extends ModifyingResourceTests {
}
// Verify file UTF-8 BOM encoding
- IFile file = (IFile) this.encodingProject.findMember("src/testBug110576/Test.java");
+ IFile file = (IFile) this.encodingProject.findMember("src/testBug110576/Test.js");
verifyUtf8BOM(file);
String fileName = file.getName();
@@ -880,8 +880,8 @@ public class EncodingTests extends ModifyingResourceTests {
compareContents(copiedCU, "UTF-8", true/*BOM*/);
// Rename file
- copiedCU.rename("TestUTF8.java", false, null);
- ICompilationUnit renamedCU = tmpPackage.getCompilationUnit("TestUTF8.java");
+ copiedCU.rename("TestUTF8.js", false, null);
+ ICompilationUnit renamedCU = tmpPackage.getCompilationUnit("TestUTF8.js");
IFile renamedFile = (IFile) renamedCU.getUnderlyingResource();
verifyUtf8BOM(renamedFile);
fileName = renamedFile.getName();
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ExclusionPatternsTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ExclusionPatternsTests.java
index 3fa0073..39874e7 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ExclusionPatternsTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ExclusionPatternsTests.java
@@ -60,14 +60,14 @@ protected void tearDown() throws Exception {
public void testAddExclusionOnCompilationUnit() throws CoreException {
createFolder("/P/src/p");
createFile(
- "/P/src/p/A.java",
+ "/P/src/p/A.js",
"package p;\n" +
"public class A {\n" +
"}"
);
clearDeltas();
- setClasspath(new String[] {"/P/src", "**/A.java"});
+ setClasspath(new String[] {"/P/src", "**/A.js"});
assertDeltas(
"Unexpected deltas",
@@ -84,7 +84,7 @@ public void testAddExclusionOnCompilationUnit() throws CoreException {
assertResourceNamesEqual(
"Unexpected non-java resources",
- "A.java",
+ "A.js",
pkg.getNonJavaResources());
}
/*
@@ -159,7 +159,7 @@ public void testAddExclusionOnPackage() throws CoreException {
public void testAddExclusionOnPrimaryWorkingCopy() throws CoreException {
createFolder("/P/src/p");
createFile(
- "/P/src/p/A.java",
+ "/P/src/p/A.js",
"package p;\n" +
"public class A {\n" +
"}"
@@ -167,11 +167,11 @@ public void testAddExclusionOnPrimaryWorkingCopy() throws CoreException {
ICompilationUnit workingCopy = null;
try {
- workingCopy = getCompilationUnit("/P/src/p/A.java");
+ workingCopy = getCompilationUnit("/P/src/p/A.js");
workingCopy.becomeWorkingCopy(null, null);
clearDeltas();
- setClasspath(new String[] {"/P/src", "**/A.java"});
+ setClasspath(new String[] {"/P/src", "**/A.js"});
assertDeltas(
"Unexpected deltas",
@@ -188,7 +188,7 @@ public void testAddExclusionOnPrimaryWorkingCopy() throws CoreException {
assertResourceNamesEqual(
"Unexpected non-java resources",
- "A.java",
+ "A.js",
pkg.getNonJavaResources());
} finally {
if (workingCopy != null) {
@@ -229,13 +229,13 @@ public void testAddToExcludedFolder() throws CoreException {
* doesn't make it appear as a child of its package but it is a non-java resource.
*/
public void testCreateExcludedCompilationUnit() throws CoreException {
- setClasspath(new String[] {"/P/src", "**/A.java"});
+ setClasspath(new String[] {"/P/src", "**/A.js"});
createFolder("/P/src/p");
IPackageFragment pkg = getPackage("/P/src/p");
clearDeltas();
pkg.createCompilationUnit(
- "A.java",
+ "A.js",
"package p;\n" +
"public class A {\n" +
"}",
@@ -257,7 +257,7 @@ public void testCreateExcludedCompilationUnit() throws CoreException {
assertResourceNamesEqual(
"Unexpected non-java resources",
- "A.java",
+ "A.js",
pkg.getNonJavaResources());
}
/*
@@ -352,12 +352,12 @@ public void testCreateExcludedAndIncludedPackages() throws CoreException {
* doesn't make it appear as a child of its package but it is a non-java resource.
*/
public void testCreateResourceExcludedCompilationUnit() throws CoreException {
- setClasspath(new String[] {"/P/src", "**/A.java"});
+ setClasspath(new String[] {"/P/src", "**/A.js"});
createFolder("/P/src/p");
clearDeltas();
createFile(
- "/P/src/p/A.java",
+ "/P/src/p/A.js",
"package p;\n" +
"public class A {\n" +
"}"
@@ -379,7 +379,7 @@ public void testCreateResourceExcludedCompilationUnit() throws CoreException {
assertResourceNamesEqual(
"Unexpected non-java resources",
- "A.java",
+ "A.js",
pkg.getNonJavaResources());
}
/*
@@ -417,31 +417,31 @@ public void testIsOnClasspath1() throws CoreException {
setClasspath(new String[] {"/P/src", ""});
createFolder("/P/src/p");
IFile file = createFile(
- "/P/src/p/A.java",
+ "/P/src/p/A.js",
"package p;\n" +
"public class A {\n" +
"}"
);
assertTrue("Resource should be on classpath", project.isOnClasspath(file));
- ICompilationUnit cu = getCompilationUnit("/P/src/p/A.java");
+ ICompilationUnit cu = getCompilationUnit("/P/src/p/A.js");
assertTrue("CU should be on classpath", project.isOnClasspath(cu));
}
/*
* Ensures that a cu that is excluded is not on the classpath of the project.
*/
public void testIsOnClasspath2() throws CoreException {
- setClasspath(new String[] {"/P/src", "**/A.java"});
+ setClasspath(new String[] {"/P/src", "**/A.js"});
createFolder("/P/src/p");
IFile file = createFile(
- "/P/src/p/A.java",
+ "/P/src/p/A.js",
"package p;\n" +
"public class A {\n" +
"}"
);
assertTrue("Resource should not be on classpath", !project.isOnClasspath(file));
- ICompilationUnit cu = getCompilationUnit("/P/src/p/A.java");
+ ICompilationUnit cu = getCompilationUnit("/P/src/p/A.js");
assertTrue("CU should not be on classpath", !project.isOnClasspath(cu));
}
/*
@@ -486,7 +486,7 @@ public void testNestedSourceFolder2() throws CoreException {
clearDeltas();
createFile(
- "/P/src1/src2/A.java",
+ "/P/src1/src2/A.js",
"public class A {\n" +
"}"
);
@@ -579,17 +579,17 @@ public void testNestedSourceFolder6() throws CoreException {
* makes it appears as a child of its package and it is removed from the non-java resources.
*/
public void testRenameExcludedCompilationUnit() throws CoreException {
- setClasspath(new String[] {"/P/src", "**/A.java"});
+ setClasspath(new String[] {"/P/src", "**/A.js"});
createFolder("/P/src/p");
IFile file = createFile(
- "/P/src/p/A.java",
+ "/P/src/p/A.js",
"package p;\n" +
"public class A {\n" +
"}"
);
clearDeltas();
- file.move(new Path("/P/src/p/B.java"), false, null);
+ file.move(new Path("/P/src/p/B.js"), false, null);
assertDeltas(
"Unexpected deltas",
@@ -648,17 +648,17 @@ public void testRenameExcludedPackage() throws CoreException {
* makes it appears as a child of its package and it is removed from the non-java resources.
*/
public void testRenameResourceExcludedCompilationUnit() throws CoreException {
- setClasspath(new String[] {"/P/src", "**/A.java"});
+ setClasspath(new String[] {"/P/src", "**/A.js"});
createFolder("/P/src/p");
IFile file = createFile(
- "/P/src/p/A.java",
+ "/P/src/p/A.js",
"package p;\n" +
"public class A {\n" +
"}"
);
clearDeltas();
- file.move(new Path("/P/src/p/B.java"), false, null);
+ file.move(new Path("/P/src/p/B.js"), false, null);
assertDeltas(
"Unexpected deltas",
@@ -684,10 +684,10 @@ public void testRenameResourceExcludedCompilationUnit() throws CoreException {
* Ensure search doesn't find matches in an excluded compilation unit.
*/
public void testSearchWithExcludedCompilationUnit1() throws CoreException {
- setClasspath(new String[] {"/P/src", "**/A.java"});
+ setClasspath(new String[] {"/P/src", "**/A.js"});
createFolder("/P/src/p");
createFile(
- "/P/src/p/A.java",
+ "/P/src/p/A.js",
"package p;\n" +
"public class A {\n" +
"}"
@@ -709,10 +709,10 @@ public void testSearchWithExcludedCompilationUnit1() throws CoreException {
* Ensure search find matches in a compilation unit that was excluded but that is not any longer.
*/
public void testSearchWithExcludedCompilationUnit2() throws CoreException {
- setClasspath(new String[] {"/P/src", "A.java"});
+ setClasspath(new String[] {"/P/src", "A.js"});
createFolder("/P/src/p");
createFile(
- "/P/src/p/A.java",
+ "/P/src/p/A.js",
"package p;\n" +
"public class A {\n" +
"}"
@@ -806,7 +806,7 @@ public void testSearchPotentialMatchInOutput() throws CoreException {
IJavaProject javaProject = createJavaProject("P2", new String[] {}, "bin");
javaProject.setRawClasspath(createClasspath(new String[] {"/P2", "src/", "/P2/src", ""}, false/*no inclusion*/, true/*exclusion*/), null);
createFile(
- "/P2/bin/X.java",
+ "/P2/bin/X.js",
"public class X {\n" +
"}"
);
@@ -831,10 +831,10 @@ public void testSearchPotentialMatchInOutput() throws CoreException {
* makes it appears as a child of its package and it is removed from the non-java resources.
*/
public void testRemoveExclusionOnCompilationUnit() throws CoreException {
- setClasspath(new String[] {"/P/src", "A.java"});
+ setClasspath(new String[] {"/P/src", "A.js"});
createFolder("/P/src/p");
createFile(
- "/P/src/p/A.java",
+ "/P/src/p/A.js",
"package p;\n" +
"public class A {\n" +
"}"
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ExistenceTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ExistenceTests.java
index 3400034..a5f046b 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ExistenceTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ExistenceTests.java
@@ -116,7 +116,7 @@ public void testJarFile() throws Exception {
try {
IJavaProject p2 = createJavaProject("P2");
String[] pathsAndContents = new String[] {
- "test/X.java",
+ "test/X.js",
"package test;\n" +
"public class X {\n" +
"}",
@@ -172,10 +172,10 @@ public void testCompilationUnitInLibrary1() throws CoreException {
try {
this.createJavaProject("P", new String[] {}, new String[] {"lib"}, "bin");
this.createFile(
- "P/lib/X.java",
+ "P/lib/X.js",
"public class X {}"
);
- ICompilationUnit cu = this.getCompilationUnit("P/lib/X.java");
+ ICompilationUnit cu = this.getCompilationUnit("P/lib/X.js");
assertTrue("Ccompilation unit should not exist", !cu.exists());
} finally {
this.deleteProject("P");
@@ -190,10 +190,10 @@ public void testCompilationUnitInLibrary2() throws CoreException {
try {
this.createJavaProject("P", new String[] {}, new String[] {"lib"}, "bin");
this.createFile(
- "P/lib/X.java",
+ "P/lib/X.js",
"public class X {}"
);
- ICompilationUnit cu = this.getCompilationUnit("P/lib/X.java");
+ ICompilationUnit cu = this.getCompilationUnit("P/lib/X.js");
assertOpenFails(
"Operation not supported for specified element type(s):lib [in P]",
cu);
@@ -209,10 +209,10 @@ public void testMethodWithInvalidParameter() throws CoreException {
try {
createJavaProject("P");
createFile(
- "P/X.java",
+ "P/X.js",
"public class X {}"
);
- IMethod method = getCompilationUnit("P/X.java").getType("X").getMethod("foo", new String[] {"~12345@"});
+ IMethod method = getCompilationUnit("P/X.js").getType("X").getMethod("foo", new String[] {"~12345@"});
assertTrue("Methodr should not exist", !method.exists());
} finally {
deleteProject("P");
@@ -254,7 +254,7 @@ public void testNonExistingClassFile2() throws CoreException {
public void testNonExistingCompilationUnit() throws CoreException {
try {
this.createJavaProject("P", new String[] {"src"}, "bin");
- ICompilationUnit cu = getCompilationUnit("/P/src/X.java");
+ ICompilationUnit cu = getCompilationUnit("/P/src/X.js");
assertOpenFails(
"X.java [in <default> [in src [in P]]] does not exist",
cu);
@@ -351,10 +351,10 @@ public void testTypeParameter1() throws CoreException {
try {
createJavaProject("P");
createFile(
- "P/X.java",
+ "P/X.js",
"public class X<T> {}"
);
- ITypeParameter typeParameter = getCompilationUnit("P/X.java").getType("X").getTypeParameter("T");
+ ITypeParameter typeParameter = getCompilationUnit("P/X.js").getType("X").getTypeParameter("T");
assertTrue("Type parameter should exist", typeParameter.exists());
} finally {
deleteProject("P");
@@ -367,12 +367,12 @@ public void testTypeParameter2() throws CoreException {
try {
createJavaProject("P");
createFile(
- "P/X.java",
+ "P/X.js",
"public class X {\n" +
" <T extends String> void foo() {}\n" +
"}"
);
- ITypeParameter typeParameter = getCompilationUnit("P/X.java").getType("X").getMethod("foo", new String[0]).getTypeParameter("T");
+ ITypeParameter typeParameter = getCompilationUnit("P/X.js").getType("X").getMethod("foo", new String[0]).getTypeParameter("T");
assertTrue("Type parameter should exist", typeParameter.exists());
} finally {
deleteProject("P");
@@ -385,10 +385,10 @@ public void testTypeParameter3() throws CoreException {
try {
createJavaProject("P");
createFile(
- "P/X.java",
+ "P/X.js",
"public class X<T> {}"
);
- ITypeParameter typeParameter = getCompilationUnit("P/X.java").getType("X").getTypeParameter("U");
+ ITypeParameter typeParameter = getCompilationUnit("P/X.js").getType("X").getTypeParameter("U");
assertTrue("Type parameter should not exist", !typeParameter.exists());
} finally {
deleteProject("P");
@@ -401,12 +401,12 @@ public void testTypeParameter4() throws CoreException {
try {
createJavaProject("P");
createFile(
- "P/X.java",
+ "P/X.js",
"public class X {\n" +
" <T extends String> void foo() {}\n" +
"}"
);
- ITypeParameter typeParameter = getCompilationUnit("P/X.java").getType("X").getMethod("foo", new String[0]).getTypeParameter("String");
+ ITypeParameter typeParameter = getCompilationUnit("P/X.js").getType("X").getMethod("foo", new String[0]).getTypeParameter("String");
assertTrue("Type parameter should not exist", !typeParameter.exists());
} finally {
deleteProject("P");
@@ -420,12 +420,12 @@ public void testTypeParameter5() throws CoreException {
try {
createJavaProject("P");
createFile(
- "P/X.java",
+ "P/X.js",
"public class X {\n" +
" class T {}\n" +
"}"
);
- ITypeParameter typeParameter = getCompilationUnit("P/X.java").getType("X").getTypeParameter("T");
+ ITypeParameter typeParameter = getCompilationUnit("P/X.js").getType("X").getTypeParameter("T");
assertTrue("Type parameter should not exist", !typeParameter.exists());
} finally {
deleteProject("P");
@@ -449,7 +449,7 @@ public void testCorrespondingResourceNonExistingClassFile() throws CoreException
public void testCorrespondingResourceNonExistingCompilationUnit() throws CoreException {
try {
createJavaProject("P", new String[] {"src"}, "bin");
- ICompilationUnit compilationUnit = getCompilationUnit("/P/src/X.java");
+ ICompilationUnit compilationUnit = getCompilationUnit("/P/src/X.js");
assertCorrespondingResourceFails(compilationUnit);
} finally {
deleteProject("P");
@@ -507,11 +507,11 @@ public void testCorrespondingResourceNonExistingType() throws CoreException {
try {
createJavaProject("P", new String[] {"src"}, "bin");
createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X{\n" +
"}"
);
- IType type = getCompilationUnit("/P/src/X.java").getType("NonExisting");
+ IType type = getCompilationUnit("/P/src/X.js").getType("NonExisting");
assertCorrespondingResourceFails(type);
} finally {
deleteProject("P");
@@ -535,7 +535,7 @@ public void testUnderlyingResourceNonExistingClassFile() throws CoreException {
public void testUnderlyingResourceNonExistingCompilationUnit() throws CoreException {
try {
createJavaProject("P", new String[] {"src"}, "bin");
- ICompilationUnit compilationUnit = getCompilationUnit("/P/src/X.java");
+ ICompilationUnit compilationUnit = getCompilationUnit("/P/src/X.js");
assertUnderlyingResourceFails(compilationUnit);
} finally {
deleteProject("P");
@@ -593,11 +593,11 @@ public void testUnderlyingResourceNonExistingType() throws CoreException {
try {
createJavaProject("P", new String[] {"src"}, "bin");
createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X{\n" +
"}"
);
- IType type = getCompilationUnit("/P/src/X.java").getType("NonExisting");
+ IType type = getCompilationUnit("/P/src/X.js").getType("NonExisting");
assertUnderlyingResourceFails(type);
} finally {
deleteProject("P");
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ExternalJarDeltaTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ExternalJarDeltaTests.java
index 0916750..a73d5ef 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ExternalJarDeltaTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ExternalJarDeltaTests.java
@@ -267,7 +267,7 @@ public void testExternalJarChanged6() throws CoreException, IOException {
f = new File(pPath);
f.createNewFile();
createJavaProject("P", new String[] {""}, new String[] {"JCL_LIB", pPath}, "");
- createFile("/P/X.java", "public class X{}");
+ createFile("/P/X.js", "public class X{}");
getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
getJavaModel().refreshExternalArchives(null,null);
waitUntilIndexesReady();
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/FactoryTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/FactoryTests.java
index 75551f1..b628656 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/FactoryTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/FactoryTests.java
@@ -51,13 +51,13 @@ public void testCreateCompilationUnits() throws CoreException {
this.createJavaProject("P", new String[] {"src"}, "bin");
this.createFolder("/P/src/x/y/z");
IFile fileA = this.createFile(
- "/P/src/x/y/z/A.java",
+ "/P/src/x/y/z/A.js",
"package x.y.z;\n" +
"public class A {\n" +
"}"
);
IFile fileB = this.createFile(
- "/P/src/x/y/B.java",
+ "/P/src/x/y/B.js",
"package x.y;\n" +
"public class B {\n" +
"}"
@@ -86,9 +86,9 @@ public void testCreateCompilationUnitsNotOnClasspath() throws CoreException {
try {
this.createJavaProject("P", new String[] {"src"}, "bin");
this.createFolder("/P/other/nested");
- IFile fileA = this.createFile("/P/other/A.java", "public class A {}");
- IFile fileB = this.createFile("/P/other/nested/B.java", "public class B {}");
- IFile fileC = this.createFile("/P/C.java", "public class C {}");
+ IFile fileA = this.createFile("/P/other/A.js", "public class A {}");
+ IFile fileB = this.createFile("/P/other/nested/B.js", "public class B {}");
+ IFile fileC = this.createFile("/P/C.js", "public class C {}");
IJavaElement objectA = JavaCore.create(fileA);
assertTrue("tooling object A not created", objectA != null);
@@ -170,7 +170,7 @@ public void testCreateFolderToolObjects() throws CoreException {
public void testCreateFromEmptyJavaFile() throws CoreException {
try {
this.createJavaProject("P", new String[] {"src"}, "bin");
- IFile file = this.createFile("/P/src/X.java", "");
+ IFile file = this.createFile("/P/src/X.js", "");
IJavaElement cu = JavaCore.create(file);
assertTrue("does not handle empty Java files", cu != null);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/GetSourceTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/GetSourceTests.java
index b87c2e0..f902bc4 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/GetSourceTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/GetSourceTests.java
@@ -28,7 +28,7 @@ public class GetSourceTests extends ModifyingResourceTests {
createJavaProject("P");
createFolder("/P/p");
createFile(
- "/P/p/X.java",
+ "/P/p/X.js",
"package p;\n" +
"import java.lang.*;\n" +
"public class X {\n" +
@@ -52,7 +52,7 @@ public class GetSourceTests extends ModifyingResourceTests {
" }\n" +
"}"
);
- this.cu = getCompilationUnit("/P/p/X.java");
+ this.cu = getCompilationUnit("/P/p/X.js");
String cuSource =
"package p;\n" +
"public class Constants {\n" +
@@ -64,7 +64,7 @@ public class GetSourceTests extends ModifyingResourceTests {
" static final float field6 = 123456f;\n" +
" static final int field7 = 1<<0;\n" +
"}";
- createFile("/P/p/Constants.java", cuSource);
+ createFile("/P/p/Constants.js", cuSource);
}
// Use this static initializer to specify subset for tests
@@ -115,7 +115,7 @@ public class GetSourceTests extends ModifyingResourceTests {
* Ensures the source for a local variable contains the modifiers, type and name.
*/
public void testLocalVariable1() throws JavaModelException {
- ILocalVariable var = getLocalVariable("/P/p/X.java", "var1 = 2;", "var1");
+ ILocalVariable var = getLocalVariable("/P/p/X.js", "var1 = 2;", "var1");
String actualSource = ((ISourceReference)var).getSource();
String expectedSource = "final int var1 = 2;";
@@ -126,7 +126,7 @@ public class GetSourceTests extends ModifyingResourceTests {
* Ensures the source for a local variable contains the modifiers, type and name.
*/
public void testLocalVariable2() throws JavaModelException {
- ILocalVariable var = getLocalVariable("/P/p/X.java", "var2;", "var2");
+ ILocalVariable var = getLocalVariable("/P/p/X.js", "var2;", "var2");
String actualSource = ((ISourceReference)var).getSource();
String expectedSource = "Object var2;";
@@ -137,7 +137,7 @@ public class GetSourceTests extends ModifyingResourceTests {
* Ensures the source for a local variable contains the modifiers, type and name.
*/
public void testLocalVariable3() throws JavaModelException {
- ILocalVariable var = getLocalVariable("/P/p/X.java", "i = 0;", "i");
+ ILocalVariable var = getLocalVariable("/P/p/X.js", "i = 0;", "i");
String actualSource = ((ISourceReference)var).getSource();
String expectedSource = "int i = 0"; // semi-colon is not part of the local declaration in a for statement
@@ -148,7 +148,7 @@ public class GetSourceTests extends ModifyingResourceTests {
* Ensures the source for a local variable contains the modifiers, type and name.
*/
public void testLocalVariable4() throws JavaModelException {
- ILocalVariable var = getLocalVariable("/P/p/X.java", "s) {", "s");
+ ILocalVariable var = getLocalVariable("/P/p/X.js", "s) {", "s");
String actualSource = ((ISourceReference)var).getSource();
String expectedSource = "String s";
@@ -184,14 +184,14 @@ public class GetSourceTests extends ModifyingResourceTests {
" }\n" +
" void static bar() {}\n" +
"}";
- createFile("/P/p/Y.java", cuSource);
- IMethod method= getCompilationUnit("/P/p/Y.java").getType("Y").getMethod("bar", new String[0]);
+ createFile("/P/p/Y.js", cuSource);
+ IMethod method= getCompilationUnit("/P/p/Y.js").getType("Y").getMethod("bar", new String[0]);
String actualSource = getNameSource(cuSource, method);
String expectedSource = "bar";
assertSourceEquals("Unexpected source'", expectedSource, actualSource);
} finally {
- deleteFile("/P/p/Y.java");
+ deleteFile("/P/p/Y.js");
}
}
@@ -210,14 +210,14 @@ public class GetSourceTests extends ModifyingResourceTests {
" }\n"+
" }\n" +
"}";
- createFile("/P/p/Y.java", cuSource);
- IType anonymous = getCompilationUnit("/P/p/Y.java").getType("Y").getMethod("foo", new String[0]).getType("", 1);
+ createFile("/P/p/Y.js", cuSource);
+ IType anonymous = getCompilationUnit("/P/p/Y.js").getType("Y").getMethod("foo", new String[0]).getType("", 1);
String actualSource = getNameSource(cuSource, anonymous);
String expectedSource = "Y";
assertSourceEquals("Unexpected source'", expectedSource, actualSource);
} finally {
- deleteFile("/P/p/Y.java");
+ deleteFile("/P/p/Y.js");
}
}
@@ -230,14 +230,14 @@ public class GetSourceTests extends ModifyingResourceTests {
"package p;\n" +
"public class Y<T extends String> {\n" +
"}";
- createFile("/P/p/Y.java", cuSource);
- ITypeParameter typeParameter = getCompilationUnit("/P/p/Y.java").getType("Y").getTypeParameter("T");
+ createFile("/P/p/Y.js", cuSource);
+ ITypeParameter typeParameter = getCompilationUnit("/P/p/Y.js").getType("Y").getTypeParameter("T");
assertSourceEquals(
"Unexpected source'",
"T",
getNameSource(cuSource, typeParameter));
} finally {
- deleteFile("/P/p/Y.java");
+ deleteFile("/P/p/Y.js");
}
}
@@ -251,14 +251,14 @@ public class GetSourceTests extends ModifyingResourceTests {
"public class Y {\n" +
" <T extends String, U extends StringBuffer & Runnable> void foo() {} \n" +
"}";
- createFile("/P/p/Y.java", cuSource);
- ITypeParameter typeParameter = getCompilationUnit("/P/p/Y.java").getType("Y").getMethod("foo", new String[0]).getTypeParameter("U");
+ createFile("/P/p/Y.js", cuSource);
+ ITypeParameter typeParameter = getCompilationUnit("/P/p/Y.js").getType("Y").getMethod("foo", new String[0]).getTypeParameter("U");
assertSourceEquals(
"Unexpected source'",
"U",
getNameSource(cuSource, typeParameter));
} finally {
- deleteFile("/P/p/Y.java");
+ deleteFile("/P/p/Y.js");
}
}
@@ -271,14 +271,14 @@ public class GetSourceTests extends ModifyingResourceTests {
"package p;\n" +
"public class Y<T extends String> {\n" +
"}";
- createFile("/P/p/Y.java", cuSource);
- ITypeParameter typeParameter = getCompilationUnit("/P/p/Y.java").getType("Y").getTypeParameter("T");
+ createFile("/P/p/Y.js", cuSource);
+ ITypeParameter typeParameter = getCompilationUnit("/P/p/Y.js").getType("Y").getTypeParameter("T");
assertSourceEquals(
"Unexpected source'",
"T extends String",
typeParameter.getSource());
} finally {
- deleteFile("/P/p/Y.java");
+ deleteFile("/P/p/Y.js");
}
}
@@ -292,14 +292,14 @@ public class GetSourceTests extends ModifyingResourceTests {
"public class Y {\n" +
" <T extends String, U extends StringBuffer & Runnable> void foo() {} \n" +
"}";
- createFile("/P/p/Y.java", cuSource);
- ITypeParameter typeParameter = getCompilationUnit("/P/p/Y.java").getType("Y").getMethod("foo", new String[0]).getTypeParameter("U");
+ createFile("/P/p/Y.js", cuSource);
+ ITypeParameter typeParameter = getCompilationUnit("/P/p/Y.js").getType("Y").getMethod("foo", new String[0]).getTypeParameter("U");
assertSourceEquals(
"Unexpected source'",
"U extends StringBuffer & Runnable",
typeParameter.getSource());
} finally {
- deleteFile("/P/p/Y.java");
+ deleteFile("/P/p/Y.js");
}
}
@@ -341,7 +341,7 @@ public class GetSourceTests extends ModifyingResourceTests {
* Test the field constant
*/
private IField getConstantField(String fieldName) {
- IType type = getCompilationUnit("/P/p/Constants.java").getType("Constants");
+ IType type = getCompilationUnit("/P/p/Constants.js").getType("Constants");
IField field = type.getField(fieldName);
return field;
}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/HierarchyOnWorkingCopiesTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/HierarchyOnWorkingCopiesTests.java
index 4595dd4..c397f69 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/HierarchyOnWorkingCopiesTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/HierarchyOnWorkingCopiesTests.java
@@ -47,20 +47,20 @@ public void testSimpleSubTypeHierarchy() throws CoreException {
IFile file = null;
try {
file = this.createFile(
- "P/src/x/y/B.java",
+ "P/src/x/y/B.js",
"package x.y;\n" +
"public class B {\n" +
"}");
- IType type = this.getCompilationUnit("P/src/x/y/B.java").getType("B");
+ IType type = this.getCompilationUnit("P/src/x/y/B.js").getType("B");
ITypeHierarchy h = type.newTypeHierarchy(new ICompilationUnit[] {this.copy}, null);
assertHierarchyEquals(
- "Focus: B [in B.java [in x.y [in src [in P]]]]\n" +
+ "Focus: B [in B.js [in x.y [in src [in P]]]]\n" +
"Super types:\n" +
- " Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
+ " Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + " [in P]]]]\n" +
"Sub types:\n" +
- " A [in [Working copy] A.java [in x.y [in src [in P]]]]\n",
+ " A [in [Working copy] A.js [in x.y [in src [in P]]]]\n",
h);
} finally {
if (file != null) {
@@ -83,19 +83,19 @@ public void testSimpleSuperTypeHierarchy() throws CoreException {
IFile file = null;
try {
file = this.createFile(
- "P/src/x/y/C.java",
+ "P/src/x/y/C.js",
"package x.y;\n" +
"public class C extends B {\n" +
"}");
- IType type = this.getCompilationUnit("P/src/x/y/C.java").getType("C");
+ IType type = this.getCompilationUnit("P/src/x/y/C.js").getType("C");
ITypeHierarchy h = type.newSupertypeHierarchy(new ICompilationUnit[] {this.copy}, null);
assertHierarchyEquals(
- "Focus: C [in C.java [in x.y [in src [in P]]]]\n" +
+ "Focus: C [in C.js [in x.y [in src [in P]]]]\n" +
"Super types:\n" +
- " B [in [Working copy] A.java [in x.y [in src [in P]]]]\n" +
- " Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
+ " B [in [Working copy] A.js [in x.y [in src [in P]]]]\n" +
+ " Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + " [in P]]]]\n" +
"Sub types:\n",
h);
} finally {
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/InclusionPatternsTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/InclusionPatternsTests.java
index 7f778c5..47138e8 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/InclusionPatternsTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/InclusionPatternsTests.java
@@ -54,14 +54,14 @@ protected void tearDown() throws Exception {
public void testAddInclusionOnCompilationUnit() throws CoreException {
createFolder("/P/src/p");
createFile(
- "/P/src/p/A.java",
+ "/P/src/p/A.js",
"package p;\n" +
"public class A {\n" +
"}"
);
clearDeltas();
- setClasspath(new String[] {"/P/src", "**/A.java"});
+ setClasspath(new String[] {"/P/src", "**/A.js"});
assertDeltas(
"Unexpected deltas",
@@ -178,13 +178,13 @@ public void testAddToIncludedFolder() throws CoreException {
* doesn't make it appear as a non-java resource but it is a child of its package.
*/
public void testCreateIncludedCompilationUnit() throws CoreException {
- setClasspath(new String[] {"/P/src", "**/A.java"});
+ setClasspath(new String[] {"/P/src", "**/A.js"});
createFolder("/P/src/p");
IPackageFragment pkg = getPackage("/P/src/p");
clearDeltas();
pkg.createCompilationUnit(
- "A.java",
+ "A.js",
"package p;\n" +
"public class A {\n" +
"}",
@@ -242,12 +242,12 @@ public void testCreateIncludedPackage() throws CoreException {
* makes it appear as a child of its package and not as a non-java resource.
*/
public void testCreateResourceIncludedCompilationUnit() throws CoreException {
- setClasspath(new String[] {"/P/src", "**/A.java"});
+ setClasspath(new String[] {"/P/src", "**/A.js"});
createFolder("/P/src/p");
clearDeltas();
createFile(
- "/P/src/p/A.java",
+ "/P/src/p/A.js",
"package p;\n" +
"public class A {\n" +
"}"
@@ -278,12 +278,12 @@ public void testCreateResourceIncludedCompilationUnit() throws CoreException {
* (regression test for bug 65234 Inclusion filter not working)
*/
public void testCreateResourceIncludedCompilationUnit2() throws CoreException {
- setClasspath(new String[] {"/P/src", "p1/p2/p3/A.java"});
+ setClasspath(new String[] {"/P/src", "p1/p2/p3/A.js"});
createFolder("/P/src/p1/p2/p3");
clearDeltas();
createFile(
- "/P/src/p1/p2/p3/A.java",
+ "/P/src/p1/p2/p3/A.js",
"package p1.p2.p3;\n" +
"public class A {\n" +
"}"
@@ -374,9 +374,9 @@ public void testCreateResourceIncludedPackage2() throws CoreException {
* (regression test for bug 148278 Default-package classes missing in Package Explorer)
*/
public void testDefaultPackageProjectIsSource() throws CoreException {
- setClasspath(new String[] {"/P", "**/*.java"});
+ setClasspath(new String[] {"/P", "**/*.js"});
deleteFolder("/P/src");
- createFile("/P/A.java", "public class A {}");
+ createFile("/P/A.js", "public class A {}");
IPackageFragmentRoot root = getPackageFragmentRoot("/P");
assertElementDescendants(
"Unexpected descendants of root",
@@ -391,11 +391,11 @@ public void testDefaultPackageProjectIsSource() throws CoreException {
* (regression test for bug 119161 classes in "deep" packages not fully recognized when using tight inclusion filters)
*/
public void testIncludeCUOnly01() throws CoreException {
- setClasspath(new String[] {"/P/src", "p1/p2/*.java|q/*.java"});
+ setClasspath(new String[] {"/P/src", "p1/p2/*.java|q/*.js"});
addLibraryEntry(getJavaProject("P"), getExternalJCLPathString(), false);
createFolder("/P/src/p1/p2");
createFile(
- "/P/src/p1/p2/X.java",
+ "/P/src/p1/p2/X.js",
"package p1.p2;\n" +
"public class X {\n" +
"}"
@@ -404,7 +404,7 @@ public void testIncludeCUOnly01() throws CoreException {
try {
ProblemRequestor problemRequestor = new ProblemRequestor();
workingCopy = getWorkingCopy(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"import p1.p2.X;\n" +
"public class Y extends X {\n" +
"}",
@@ -425,11 +425,11 @@ public void testIncludeCUOnly01() throws CoreException {
* (regression test for bug 119161 classes in "deep" packages not fully recognized when using tight inclusion filters)
*/
public void testIncludeCUOnly02() throws CoreException {
- setClasspath(new String[] {"/P/src", "p1/p2/p3/*.java|q/*.java"});
+ setClasspath(new String[] {"/P/src", "p1/p2/p3/*.java|q/*.js"});
addLibraryEntry(getJavaProject("P"), getExternalJCLPathString(), false);
createFolder("/P/src/p1/p2/p3");
createFile(
- "/P/src/p1/p2/p3/X.java",
+ "/P/src/p1/p2/p3/X.js",
"package p1.p2.p3;\n" +
"public class X {\n" +
"}"
@@ -438,7 +438,7 @@ public void testIncludeCUOnly02() throws CoreException {
try {
ProblemRequestor problemRequestor = new ProblemRequestor();
workingCopy = getWorkingCopy(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"import p1.p2.p3.X;\n" +
"public class Y extends X {\n" +
"}",
@@ -458,41 +458,41 @@ public void testIncludeCUOnly02() throws CoreException {
* Ensures that a cu that is not included is not on the classpath of the project.
*/
public void testIsOnClasspath1() throws CoreException {
- setClasspath(new String[] {"/P/src", "**/B.java"});
+ setClasspath(new String[] {"/P/src", "**/B.js"});
createFolder("/P/src/p");
IFile file = createFile(
- "/P/src/p/A.java",
+ "/P/src/p/A.js",
"package p;\n" +
"public class A {\n" +
"}"
);
assertTrue("Resource should not be on classpath", !project.isOnClasspath(file));
- ICompilationUnit cu = getCompilationUnit("/P/src/p/A.java");
+ ICompilationUnit cu = getCompilationUnit("/P/src/p/A.js");
assertTrue("CU should not be on classpath", !project.isOnClasspath(cu));
}
/*
* Ensures that a cu that is included is on the classpath of the project.
*/
public void testIsOnClasspath2() throws CoreException {
- setClasspath(new String[] {"/P/src", "**/A.java"});
+ setClasspath(new String[] {"/P/src", "**/A.js"});
createFolder("/P/src/p");
IFile file = createFile(
- "/P/src/p/A.java",
+ "/P/src/p/A.js",
"package p;\n" +
"public class A {\n" +
"}"
);
assertTrue("Resource should be on classpath", project.isOnClasspath(file));
- ICompilationUnit cu = getCompilationUnit("/P/src/p/A.java");
+ ICompilationUnit cu = getCompilationUnit("/P/src/p/A.js");
assertTrue("CU should be on classpath", project.isOnClasspath(cu));
}
/*
* Ensures that a non-java resource that is not included is not on the classpath of the project.
*/
public void testIsOnClasspath3() throws CoreException {
- setClasspath(new String[] {"/P/src", "**/X.java"});
+ setClasspath(new String[] {"/P/src", "**/X.js"});
createFolder("/P/src/p");
IFile file = createFile("/P/src/p/readme.txt", "");
assertTrue("Resource should not be on classpath", !project.isOnClasspath(file));
@@ -549,7 +549,7 @@ public void testMoveFolderContainingPackage2() throws CoreException {
*
*/
public void testNestedSourceFolder1() throws CoreException {
- setClasspath(new String[] {"/P/src1", "**/A.java", "/P/src1/src2", ""});
+ setClasspath(new String[] {"/P/src1", "**/A.js", "/P/src1/src2", ""});
createFolder("/P/src1/src2");
IPackageFragmentRoot root1 = getPackageFragmentRoot("/P/src1");
assertResourceNamesEqual(
@@ -562,12 +562,12 @@ public void testNestedSourceFolder1() throws CoreException {
* a delta on the nested source folder and not on the outer one.
*/
public void testNestedSourceFolder2() throws CoreException {
- setClasspath(new String[] {"/P/src1", "**/X.java", "/P/src1/src2", ""});
+ setClasspath(new String[] {"/P/src1", "**/X.js", "/P/src1/src2", ""});
createFolder("/P/src1/src2");
clearDeltas();
createFile(
- "/P/src1/src2/A.java",
+ "/P/src1/src2/A.js",
"public class A {\n" +
"}"
);
@@ -585,7 +585,7 @@ public void testNestedSourceFolder2() throws CoreException {
* a resource delta on the nested source folder and not on the outer one.
*/
public void testNestedSourceFolder3() throws CoreException {
- setClasspath(new String[] {"/P/src1", "**/X.java", "/P/src1/src2", ""});
+ setClasspath(new String[] {"/P/src1", "**/X.js", "/P/src1/src2", ""});
createFolder("/P/src1/src2");
clearDeltas();
@@ -603,7 +603,7 @@ public void testNestedSourceFolder3() throws CoreException {
* a delta on the nested source folder and not on the outer one.
*/
public void testNestedSourceFolder4() throws CoreException {
- setClasspath(new String[] {"/P/src1", "**/X.java", "/P/src1/src2", "**/X.java"});
+ setClasspath(new String[] {"/P/src1", "**/X.js", "/P/src1/src2", "**/X.js"});
createFolder("/P/src1/src2");
clearDeltas();
@@ -621,7 +621,7 @@ public void testNestedSourceFolder4() throws CoreException {
* a delta on the outer source folder and not on the nested one.
*/
public void testNestedSourceFolder5() throws CoreException {
- setClasspath(new String[] {"/P/src1", "**/X.java", "/P/src1/src2", ""});
+ setClasspath(new String[] {"/P/src1", "**/X.js", "/P/src1/src2", ""});
createFolder("/P/src1/src2");
clearDeltas();
@@ -639,7 +639,7 @@ public void testNestedSourceFolder5() throws CoreException {
* source folder reports a move delta.
*/
public void testNestedSourceFolder6() throws CoreException {
- setClasspath(new String[] {"/P/src1", "**/X.java", "/P/src1/src2", "**/X.java"});
+ setClasspath(new String[] {"/P/src1", "**/X.js", "/P/src1/src2", "**/X.js"});
createFolder("/P/src1/src2");
createFolder("/P/src1/p");
@@ -660,17 +660,17 @@ public void testNestedSourceFolder6() throws CoreException {
* makes it disappears from the children of its package and it is added to the non-java resources.
*/
public void testRemoveInclusionOnCompilationUnit() throws CoreException {
- setClasspath(new String[] {"/P/src", "**/A.java"});
+ setClasspath(new String[] {"/P/src", "**/A.js"});
createFolder("/P/src/p");
createFile(
- "/P/src/p/A.java",
+ "/P/src/p/A.js",
"package p;\n" +
"public class A {\n" +
"}"
);
clearDeltas();
- setClasspath(new String[] {"/P/src", "**/B.java"});
+ setClasspath(new String[] {"/P/src", "**/B.js"});
assertDeltas(
"Unexpected deltas",
@@ -687,7 +687,7 @@ public void testRemoveInclusionOnCompilationUnit() throws CoreException {
assertResourceNamesEqual(
"Unexpected non-java resources",
- "A.java",
+ "A.js",
pkg.getNonJavaResources());
}
/*
@@ -725,17 +725,17 @@ public void testRemoveInclusionOnPackage() throws CoreException {
* makes it disappears from the children of its package and it is added to the non-java resources.
*/
public void testRenameIncludedCompilationUnit() throws CoreException {
- setClasspath(new String[] {"/P/src", "**/A.java"});
+ setClasspath(new String[] {"/P/src", "**/A.js"});
createFolder("/P/src/p");
IFile file = createFile(
- "/P/src/p/A.java",
+ "/P/src/p/A.js",
"package p;\n" +
"public class A {\n" +
"}"
);
clearDeltas();
- file.move(new Path("/P/src/p/B.java"), false, null);
+ file.move(new Path("/P/src/p/B.js"), false, null);
assertDeltas(
"Unexpected deltas",
@@ -754,7 +754,7 @@ public void testRenameIncludedCompilationUnit() throws CoreException {
assertResourceNamesEqual(
"Unexpected non-java resources",
- "B.java",
+ "B.js",
pkg.getNonJavaResources());
}
/*
@@ -798,7 +798,7 @@ public void testRenameIncludedPackage2() throws CoreException {
IPackageFragmentRoot root = getPackageFragmentRoot("/P/src");
IPackageFragment pkg = root.createPackageFragment("p", false, null);
createFile(
- "/P/src/p/X.java",
+ "/P/src/p/X.js",
"package p;\n" +
"public class X {\n" +
"}"
@@ -830,17 +830,17 @@ public void testRenameIncludedPackage2() throws CoreException {
* makes it disappears from the children of its package and it is added to the non-java resources.
*/
public void testRenameResourceIncludedCompilationUnit() throws CoreException {
- setClasspath(new String[] {"/P/src", "**/A.java"});
+ setClasspath(new String[] {"/P/src", "**/A.js"});
createFolder("/P/src/p");
IFile file = createFile(
- "/P/src/p/A.java",
+ "/P/src/p/A.js",
"package p;\n" +
"public class A {\n" +
"}"
);
clearDeltas();
- file.move(new Path("/P/src/p/B.java"), false, null);
+ file.move(new Path("/P/src/p/B.js"), false, null);
assertDeltas(
"Unexpected deltas",
@@ -859,7 +859,7 @@ public void testRenameResourceIncludedCompilationUnit() throws CoreException {
assertResourceNamesEqual(
"Unexpected non-java resources",
- "B.java",
+ "B.js",
pkg.getNonJavaResources());
}
/*
@@ -903,9 +903,9 @@ public void testSearchPotentialMatchInOutput() throws CoreException {
JavaCore.run(new IWorkspaceRunnable() {
public void run(IProgressMonitor monitor) throws CoreException {
IJavaProject javaProject = createJavaProject("P2", new String[] {}, "bin");
- javaProject.setRawClasspath(createClasspath(new String[] {"/P2", "**/X.java", "/P2/src", ""}, true/*inclusion*/, false/*no exclusion*/), null);
+ javaProject.setRawClasspath(createClasspath(new String[] {"/P2", "**/X.js", "/P2/src", ""}, true/*inclusion*/, false/*no exclusion*/), null);
createFile(
- "/P2/bin/X.java",
+ "/P2/bin/X.js",
"public class X {\n" +
"}"
);
@@ -929,10 +929,10 @@ public void testSearchPotentialMatchInOutput() throws CoreException {
* Ensure search finds matches in an included compilation unit.
*/
public void testSearchWithIncludedCompilationUnit1() throws CoreException {
- setClasspath(new String[] {"/P/src", "**/A.java"});
+ setClasspath(new String[] {"/P/src", "**/A.js"});
createFolder("/P/src/p");
createFile(
- "/P/src/p/A.java",
+ "/P/src/p/A.js",
"package p;\n" +
"public class A {\n" +
"}"
@@ -954,16 +954,16 @@ public void testSearchWithIncludedCompilationUnit1() throws CoreException {
* Ensure search doesn't find matches in a compilation unit that was included but that is not any longer.
*/
public void testSearchWithIncludedCompilationUnit2() throws CoreException {
- setClasspath(new String[] {"/P/src", "**/A.java"});
+ setClasspath(new String[] {"/P/src", "**/A.js"});
createFolder("/P/src/p");
createFile(
- "/P/src/p/A.java",
+ "/P/src/p/A.js",
"package p;\n" +
"public class A {\n" +
"}"
);
- setClasspath(new String[] {"/P/src", "**/B.java"});
+ setClasspath(new String[] {"/P/src", "**/B.js"});
JavaSearchTests.JavaSearchResultCollector resultCollector = new JavaSearchTests.JavaSearchResultCollector();
search(
"A",
@@ -983,7 +983,7 @@ public void testSearchWithIncludedCompilationUnit2() throws CoreException {
public void testSearchWithIncludedPackage1() throws CoreException {
createFolder("/P/src/p");
createFile(
- "/P/src/p/A.java",
+ "/P/src/p/A.js",
"package p;\n" +
"public class A {\n" +
"}"
@@ -1010,7 +1010,7 @@ public void testSearchWithIncludedPackage2() throws CoreException {
setClasspath(new String[] {"/P/src", "p/"});
createFolder("/P/src/p");
createFile(
- "/P/src/p/A.java",
+ "/P/src/p/A.js",
"package p;\n" +
"public class A {\n" +
"}"
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaConventionTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaConventionTests.java
index ffd2ca5..d83f94a 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaConventionTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaConventionTests.java
@@ -195,11 +195,11 @@ public class JavaConventionTests extends AbstractJavaModelTests {
* @see JavaConventions
*/
public void testValidCompilationUnitName() {
- String[] invalidNames = new String[] {"java/lang/Object.java", "Object.class", ".java", "Object.javaaa", "A.B.java"};
+ String[] invalidNames = new String[] {"java/lang/Object.js", "Object.class", ".js", "Object.javaaa", "A.B.js"};
for (int i = 0; i < invalidNames.length; i++) {
assertEquals("compilation unit name not recognized as invalid: " + invalidNames[i], IStatus.ERROR, validate(invalidNames[i], COMPILATION_UNIT_NAME));
}
- String[] validNames = new String[] {"Object.java", "OBJECT.java", "object.java", "package-info.java"};
+ String[] validNames = new String[] {"Object.js", "OBJECT.js", "object.js", "package-info.js"};
for (int i = 0; i < validNames.length; i++) {
assertEquals("compilation unit name not recognized as valid: " + validNames[i], IStatus.OK, validate(validNames[i], COMPILATION_UNIT_NAME));
}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaElementDeltaTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaElementDeltaTests.java
index 4eb6beb..2406ce6 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaElementDeltaTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaElementDeltaTests.java
@@ -13,15 +13,10 @@ package org.eclipse.wst.jsdt.core.tests.model;
import java.util.ArrayList;
import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Path;
-import org.eclipse.wst.jsdt.core.*;
import org.eclipse.wst.jsdt.core.ElementChangedEvent;
import org.eclipse.wst.jsdt.core.IClasspathEntry;
import org.eclipse.wst.jsdt.core.ICompilationUnit;
@@ -31,8 +26,7 @@ import org.eclipse.wst.jsdt.core.IJavaProject;
import org.eclipse.wst.jsdt.core.IPackageFragment;
import org.eclipse.wst.jsdt.core.JavaCore;
import org.eclipse.wst.jsdt.internal.core.*;
-import org.eclipse.wst.jsdt.internal.core.JavaModelManager;
-import org.eclipse.wst.jsdt.internal.core.JavaProject;
+import org.eclipse.wst.jsdt.core.*;
import junit.framework.Test;
@@ -112,15 +106,15 @@ public void testAddCommentAndCommit() throws CoreException {
ICompilationUnit copy = null;
try {
createJavaProject("P", new String[] {""}, "");
- createFile("P/X.java",
- "public class X {\n" +
+ createFile("P/X.js",
+ "function X() {\n" +
"}");
- ICompilationUnit unit = getCompilationUnit("P", "", "", "X.java");
+ ICompilationUnit unit = getCompilationUnit("P", "", "", "X.js");
copy = unit.getWorkingCopy(null);
// add comment to working copy
copy.getBuffer().setContents(
- "public class X {\n" +
+ "function X(){\n" +
" // some comment\n" +
"}");
@@ -132,7 +126,7 @@ public void testAddCommentAndCommit() throws CoreException {
"P[*]: {CHILDREN}\n" +
" <project root>[*]: {CHILDREN}\n" +
" <default>[*]: {CHILDREN}\n" +
- " X.java[*]: {CONTENT | FINE GRAINED | PRIMARY RESOURCE}",
+ " X.js[*]: {CONTENT | FINE GRAINED | PRIMARY RESOURCE}",
listener.toString());
} finally {
JavaCore.removeElementChangedListener(listener);
@@ -148,15 +142,15 @@ public void testAddCuInDefaultPkg1() throws CoreException {
try {
createJavaProject("P", new String[] {""}, "");
startDeltas();
- createFile("P/X.java",
- "public class X {\n" +
+ createFile("P/X.js",
+ "function X() {\n" +
"}");
assertDeltas(
"Unexpected delta",
"P[*]: {CHILDREN}\n" +
" <project root>[*]: {CHILDREN}\n" +
" <default>[*]: {CHILDREN}\n" +
- " X.java[+]: {}"
+ " X.js[+]: {}"
);
} finally {
stopDeltas();
@@ -171,15 +165,15 @@ public void testAddCuInDefaultPkg2() throws CoreException {
try {
createJavaProject("P", new String[] {"src"}, "bin");
startDeltas();
- createFile("P/src/X.java",
- "public class X {\n" +
+ createFile("P/src/X.js",
+ "function X() {\n" +
"}");
assertDeltas(
"Unexpected delta",
"P[*]: {CHILDREN}\n" +
" src[*]: {CHILDREN}\n" +
" <default>[*]: {CHILDREN}\n" +
- " X.java[+]: {}"
+ " X.js[+]: {}"
);
} finally {
stopDeltas();
@@ -194,8 +188,8 @@ public void testAddCuAfterProjectOpen() throws CoreException {
try {
IJavaProject p1 = createJavaProject("P1", new String[] {"src"}, "bin");
IJavaProject p2 = createJavaProject("P2", new String[] {"src"}, "bin");
- createFile("P2/src/X.java",
- "public class X {\n" +
+ createFile("P2/src/X.js",
+ "function X() {\n" +
"}");
IProject project = p2.getProject();
project.close(null);
@@ -207,15 +201,15 @@ public void testAddCuAfterProjectOpen() throws CoreException {
project.open(null);
startDeltas();
- createFile("P2/src/Y.java",
- "public class Y {\n" +
+ createFile("P2/src/Y.js",
+ "function Y() {\n" +
"}");
assertDeltas(
"Unexpected delta",
"P2[*]: {CHILDREN}\n" +
" src[*]: {CHILDREN}\n" +
" <default>[*]: {CHILDREN}\n" +
- " Y.java[+]: {}"
+ " Y.js[+]: {}"
);
} finally {
stopDeltas();
@@ -243,13 +237,13 @@ public void testAddDotClasspathFile() throws CoreException {
" </projects>\n" +
" <buildSpec>\n" +
" <buildCommand>\n" +
- " <name>org.eclipse.wst.jsdt.core.javabuilder</name>\n" +
+ " <name>org.eclipse.wst.jsdt.core.jsbuilder</name>\n" +
" <arguments>\n" +
" </arguments>\n" +
" </buildCommand>\n" +
" </buildSpec>\n" +
" <natures>\n" +
- " <nature>org.eclipse.wst.jsdt.core.javanature</nature>\n" +
+ " <nature>org.eclipse.wst.jsdt.core.jsnature</nature>\n" +
" </natures>\n" +
"</projectDescription>"
);
@@ -265,7 +259,7 @@ public void testAddDotClasspathFile() throws CoreException {
);
assertDeltas(
"Unexpected delta",
- "P[*]: {CHILDREN | CONTENT | CLASSPATH CHANGED}\n" +
+ "P[*]: {CHILDREN}\n" +
" <project root>[*]: {REMOVED FROM CLASSPATH}\n" +
" src[*]: {ADDED TO CLASSPATH}\n" +
" ResourceDelta(/P/.classpath)[+]"
@@ -501,29 +495,26 @@ public void testBatchOperation() throws CoreException {
createJavaProject("P", new String[] {"src"}, "bin");
createFolder("P/src/x");
createFile(
- "P/src/x/A.java",
- "package x;\n" +
- "public class A {\n" +
+ "P/src/x/A.js",
+ "function A() {\n" +
"}");
startDeltas();
JavaCore.run(
new IWorkspaceRunnable() {
public void run(IProgressMonitor monitor) throws CoreException {
- ICompilationUnit unit = getCompilationUnit("P/src/x/A.java");
- unit.createType("class B {}", null, false, monitor);
- unit.getType("A").createField("int i;", null, false, monitor);
+ ICompilationUnit unit = getCompilationUnit("P/src/x/A.js");
+// unit.createType("class B {}", null, false, monitor);
+ unit.createField("var i;", null, false, monitor);
}
},
null);
assertDeltas(
"Unexpected delta",
- "P[*]: {CHILDREN}\n" +
- " src[*]: {CHILDREN}\n" +
- " x[*]: {CHILDREN}\n" +
- " A.java[*]: {CHILDREN | FINE GRAINED | PRIMARY RESOURCE}\n" +
- " A[*]: {CHILDREN | FINE GRAINED}\n" +
- " i[+]: {}\n" +
- " B[+]: {}"
+ "P[*]: {CHILDREN}\n" +
+ " src[*]: {CHILDREN}\n" +
+ " x[*]: {CHILDREN}\n" +
+ " A.js[*]: {CHILDREN | FINE GRAINED | PRIMARY RESOURCE}\n" +
+ " i[+]: {}"
);
} finally {
stopDeltas();
@@ -539,8 +530,8 @@ public void testBuildProjectUsedAsLib() throws CoreException {
IJavaProject p1 = createJavaProject("P1", new String[] {"src1"}, new String[] {"JCL_LIB"}, "bin1");
createJavaProject("P2", new String[] {"src2"}, new String[] {"/P1/bin1"}, "bin2");
createFile(
- "/P1/src1/X.java",
- "public class X {\n" +
+ "/P1/src1/X.js",
+ "function X() {\n" +
"}"
);
@@ -561,11 +552,11 @@ public void testBuildProjectUsedAsLib() throws CoreException {
);
editFile(
- "/P1/src1/X.java",
- "public class X {\n" +
- " void foo() {}\n" +
+ "/P1/src1/X.js",
+ "function X() {\n" +
+// " void foo() {}\n" +
"}\n" +
- "class Y {\n" +
+ "function Y() {\n" +
"}"
);
clearDeltas();
@@ -603,7 +594,7 @@ public void testChangeCustomOutput() throws CoreException {
});
assertDeltas(
"Unexpected delta",
- "P[*]: {CHILDREN | CONTENT | CLASSPATH CHANGED}\n" +
+ "P[*]: {CHILDREN | CLASSPATH CHANGED}\n" +
" src[*]: {ADDED TO CLASSPATH | REMOVED FROM CLASSPATH}\n" +
" ResourceDelta(/P/.classpath)[*]"
);
@@ -612,33 +603,33 @@ public void testChangeCustomOutput() throws CoreException {
deleteProject("P");
}
}
-
-/*
- * Ensures that the setting the classpath where the only change is the export flag
- * triggers a F_CLASSPATH CHANGED delta.
- * (regression test for bug 75517 No classpath delta for project becoming exported)
- */
-public void testChangeExportFlag() throws CoreException {
- try {
- createJavaProject("P1");
- IJavaProject proj = createJavaProject("P2", new String[] {}, new String[] {}, new String[] {"/P1"}, new boolean[] {false}, "bin");
- startDeltas();
- setClasspath(
- proj,
- new IClasspathEntry[] {
- JavaCore.newProjectEntry(new Path("/P1"), true)
- });
- assertDeltas(
- "Unexpected delta",
- "P2[*]: {CONTENT | CLASSPATH CHANGED}\n" +
- " ResourceDelta(/P2/.classpath)[*]"
- );
- } finally {
- stopDeltas();
- deleteProject("P1");
- deleteProject("P2");
- }
-}
+//
+///*
+// * Ensures that the setting the classpath where the only change is the export flag
+// * triggers a F_CLASSPATH CHANGED delta.
+// * (regression test for bug 75517 No classpath delta for project becoming exported)
+// */
+//public void testChangeExportFlag() throws CoreException {
+// try {
+// createJavaProject("P1");
+// IJavaProject proj = createJavaProject("P2", new String[] {}, new String[] {}, new String[] {"/P1"}, new boolean[] {false}, "bin");
+// startDeltas();
+// setClasspath(
+// proj,
+// new IClasspathEntry[] {
+// JavaCore.newProjectEntry(new Path("/P1"), true)
+// });
+// assertDeltas(
+// "Unexpected delta",
+// "P2[*]: {CONTENT | CLASSPATH CHANGED}\n" +
+// " ResourceDelta(/P2/.classpath)[*]"
+// );
+// } finally {
+// stopDeltas();
+// deleteProject("P1");
+// deleteProject("P2");
+// }
+//}
/**
* Ensures that the setting the classpath with a library entry
@@ -655,7 +646,7 @@ public void testChangeRootKind() throws CoreException {
});
assertDeltas(
"Unexpected delta",
- "P[*]: {CHILDREN | CONTENT | CLASSPATH CHANGED}\n" +
+ "P[*]: {CHILDREN | CLASSPATH CHANGED}\n" +
" src[*]: {ADDED TO CLASSPATH | REMOVED FROM CLASSPATH}\n" +
" ResourceDelta(/P/.classpath)[*]"
);
@@ -704,31 +695,31 @@ public void testCloseNonJavaProject() throws CoreException {
}
}
-/*
- * Closing a non-java project that contains a jar referenced in another project should produce
- * a delta on this other project.
- * (regression test for bug 19058 Closing non-java project doesn't remove root from java project)
- */
-public void testCloseNonJavaProjectUpdateDependent() throws CoreException {
- try {
- createProject("SP");
- createFile("/SP/x.jar", "");
- createJavaProject("JP", new String[] {""}, new String[] {"/SP/x.jar"}, "");
- IProject project = getProject("SP");
- startDeltas();
- project.close(null);
- assertDeltas(
- "Unexpected delta",
- "JP[*]: {CHILDREN}\n" +
- " /SP/x.jar[-]: {}\n" +
- "ResourceDelta(/SP)"
- );
- } finally {
- stopDeltas();
- deleteProject("SP");
- deleteProject("JP");
- }
-}
+///*
+// * Closing a non-java project that contains a jar referenced in another project should produce
+// * a delta on this other project.
+// * (regression test for bug 19058 Closing non-java project doesn't remove root from java project)
+// */
+//public void testCloseNonJavaProjectUpdateDependent() throws CoreException {
+// try {
+// createProject("SP");
+// createFile("/SP/x.jar", "");
+// createJavaProject("JP", new String[] {""}, new String[] {"/SP/x.jar"}, "");
+// IProject project = getProject("SP");
+// startDeltas();
+// project.close(null);
+// assertDeltas(
+// "Unexpected delta",
+// "JP[*]: {CHILDREN}\n" +
+// " /SP/x.jar[-]: {}\n" +
+// "ResourceDelta(/SP)"
+// );
+// } finally {
+// stopDeltas();
+// deleteProject("SP");
+// deleteProject("JP");
+// }
+//}
/**
* Test that deltas are generated when a compilation unit is added
* and removed from a package via core API.
@@ -736,11 +727,10 @@ public void testCloseNonJavaProjectUpdateDependent() throws CoreException {
public void testCompilationUnitRemoveAndAdd() throws CoreException {
try {
createJavaProject("P");
- createFolder("/P/p");
+// createFolder("/P/p");
IFile file = createFile(
- "/P/p/X.java",
- "package p;\n" +
- "public class X {\n" +
+ "/P/X.js",
+ "function X() {\n" +
"}"
);
@@ -748,27 +738,26 @@ public void testCompilationUnitRemoveAndAdd() throws CoreException {
startDeltas();
deleteResource(file);
assertDeltas(
- "Unexpected delta after deleting /P/p/X.java",
+ "Unexpected delta after deleting /P/X.js",
"P[*]: {CHILDREN}\n" +
" <project root>[*]: {CHILDREN}\n" +
- " p[*]: {CHILDREN}\n" +
- " X.java[-]: {}"
+ " <default>[*]: {CHILDREN}\n" +
+ " X.js[-]: {}"
);
// add cu
clearDeltas();
createFile(
- "/P/p/X.java",
- "package p;\n" +
- "public class X {\n" +
+ "/P/X.js",
+ "function X() {\n" +
"}"
);
assertDeltas(
- "Unexpected delta after adding /P/p/X.java",
+ "Unexpected delta after adding /P/p/X.js",
"P[*]: {CHILDREN}\n" +
" <project root>[*]: {CHILDREN}\n" +
" p[*]: {CHILDREN}\n" +
- " X.java[+]: {}"
+ " X.js[+]: {}"
);
} finally {
stopDeltas();
@@ -780,10 +769,10 @@ public void testCreateSharedWorkingCopy() throws CoreException {
ICompilationUnit copy = null;
try {
createJavaProject("P", new String[] {""}, "");
- createFile("P/X.java",
- "public class X {\n" +
+ createFile("P/X.js",
+ "function X() {\n" +
"}");
- ICompilationUnit unit = getCompilationUnit("P", "", "", "X.java");
+ ICompilationUnit unit = getCompilationUnit("P", "", "", "X.js");
startDeltas();
copy = unit.getWorkingCopy(new WorkingCopyOwner() {}, null, null);
assertDeltas(
@@ -791,7 +780,7 @@ public void testCreateSharedWorkingCopy() throws CoreException {
"P[*]: {CHILDREN}\n" +
" <project root>[*]: {CHILDREN}\n" +
" <default>[*]: {CHILDREN}\n" +
- " [Working copy] X.java[+]: {}"
+ " [Working copy] X.js[+]: {}"
);
} finally {
stopDeltas();
@@ -803,10 +792,10 @@ public void testCreateWorkingCopy() throws CoreException {
ICompilationUnit copy = null;
try {
createJavaProject("P", new String[] {""}, "");
- createFile("P/X.java",
- "public class X {\n" +
+ createFile("P/X.js",
+ "function X() {\n" +
"}");
- ICompilationUnit unit = getCompilationUnit("P", "", "", "X.java");
+ ICompilationUnit unit = getCompilationUnit("P", "", "", "X.js");
startDeltas();
copy = unit.getWorkingCopy(null);
assertDeltas(
@@ -814,7 +803,7 @@ public void testCreateWorkingCopy() throws CoreException {
"P[*]: {CHILDREN}\n" +
" <project root>[*]: {CHILDREN}\n" +
" <default>[*]: {CHILDREN}\n" +
- " [Working copy] X.java[+]: {}"
+ " [Working copy] X.js[+]: {}"
);
} finally {
stopDeltas();
@@ -830,21 +819,20 @@ public void testCreateWorkingCopy() throws CoreException {
public void testCopyAndOverwritePackage() throws CoreException {
try {
createJavaProject("P", new String[] {"src1", "src2"}, "bin");
- createFolder("/P/src1/p");
+// createFolder("/P/src1/p");
createFile(
- "P/src1/p/X.java",
- "package p;\n" +
- "public class X {\n" +
+ "P/src1/X.js",
+ "function X() {\n" +
"}");
- createFolder("/P/src2/p");
+ createFolder("/P/src2");
startDeltas();
- getPackage("/P/src1/p").copy(getPackageFragmentRoot("/P/src2"), null/*no sibling*/, null/*no rename*/, true/*replace*/, null/*no progress*/);
+ getPackage("/P/src1").copy(getPackageFragmentRoot("/P/src2"), null/*no sibling*/, null/*no rename*/, true/*replace*/, null/*no progress*/);
assertDeltas(
"Unexpected delta",
"P[*]: {CHILDREN}\n" +
" src2[*]: {CHILDREN}\n" +
" p[*]: {CHILDREN}\n" +
- " X.java[+]: {}"
+ " X.js[+]: {}"
);
} finally {
stopDeltas();
@@ -858,31 +846,29 @@ public void testCopyAndOverwritePackage() throws CoreException {
public void testCUNotOnClasspath() throws CoreException {
try {
createJavaProject("P", new String[] {}, "bin");
- createFolder("/P/src/p");
+// createFolder("/P/src/p");
IFile file = createFile(
- "/P/src/p/X.java",
- "package p;\n" +
- "public class X {\n" +
+ "/P/src/p/X.js",
+ "function X() {\n" +
"}"
);
startDeltas();
deleteResource(file);
assertDeltas(
- "Unexpected delta after deletion of /P/src/p/X.java",
+ "Unexpected delta after deletion of /P/src/X.js",
"P[*]: {CONTENT}\n" +
" ResourceDelta(/P/src)[*]"
);
clearDeltas();
createFile(
- "/P/src/p/X.java",
- "package p;\n" +
- "public class X {\n" +
+ "/P/src/X.js",
+ "function X() {\n" +
"}"
);
assertDeltas(
- "Unexpected delta after addition of /P/src/p/X.java",
+ "Unexpected delta after addition of /P/src/X.js",
"P[*]: {CONTENT}\n" +
" ResourceDelta(/P/src)[*]"
);
@@ -891,30 +877,30 @@ public void testCUNotOnClasspath() throws CoreException {
deleteProject("P");
}
}
-/*
- * Ensure that deleting a jar that is in a folder and that is on the classpath reports
- * a removed pkg fragment root delta.
- * (regression test for bug 27068 Elements in the Package Explorer are displayed but don't more exist [package explorer])
- *
- */
-public void testDeleteInnerJar() throws CoreException {
- try {
- createJavaProject("P", new String[] {"src"}, new String[] {"/P/lib/x.jar"}, "bin");
- createFolder("/P/lib");
- IFile file = createFile("/P/lib/x.jar", "");
- startDeltas();
- deleteResource(file);
- assertDeltas(
- "Unexpected deltas",
- "P[*]: {CHILDREN | CONTENT}\n" +
- " lib/x.jar[-]: {}\n" +
- " ResourceDelta(/P/lib)[*]"
- );
- } finally {
- stopDeltas();
- deleteProject("P");
- }
-}
+///*
+// * Ensure that deleting a jar that is in a folder and that is on the classpath reports
+// * a removed pkg fragment root delta.
+// * (regression test for bug 27068 Elements in the Package Explorer are displayed but don't more exist [package explorer])
+// *
+// */
+//public void testDeleteInnerJar() throws CoreException {
+// try {
+// createJavaProject("P", new String[] {"src"}, new String[] {"/P/lib/x.jar"}, "bin");
+// createFolder("/P/lib");
+// IFile file = createFile("/P/lib/x.jar", "");
+// startDeltas();
+// deleteResource(file);
+// assertDeltas(
+// "Unexpected deltas",
+// "P[*]: {CHILDREN | CONTENT}\n" +
+// " lib/x.jar[-]: {}\n" +
+// " ResourceDelta(/P/lib)[*]"
+// );
+// } finally {
+// stopDeltas();
+// deleteProject("P");
+// }
+//}
/*
* Ensure that deleting a non-Java folder that contains a source root folder reports
* a removed root delta as well as a resource delta for the removed folder.
@@ -960,8 +946,7 @@ public void testDeleteProjectAfterChangingClasspath() throws CoreException {
stopDeltas();
deleteProject("P");
}
-}
-/*
+}/*
* Ensure that deleting a project and setting the classpath on another project
* in an IWorkspaceRunnable doesn't throw a NullPointerException
* (regression test for bug 25197 NPE importing external plugins)
@@ -986,7 +971,7 @@ public void testDeleteProjectSetCPAnotherProject() throws CoreException {
null);
assertDeltas(
"Unexpected deltas",
- "P1[*]: {CHILDREN | CONTENT | CLASSPATH CHANGED}\n" +
+ "P1[*]: {CHILDREN | CLASSPATH CHANGED}\n" +
" <project root>[*]: {ADDED TO CLASSPATH}\n" +
" src[*]: {REMOVED FROM CLASSPATH}\n" +
" ResourceDelta(/P1/.classpath)[*]\n" +
@@ -1002,10 +987,10 @@ public void testDiscardWorkingCopy1() throws CoreException { // renamed from tes
ICompilationUnit copy = null;
try {
createJavaProject("P", new String[] {""}, "");
- createFile("P/X.java",
+ createFile("P/X.js",
"public class X {\n" +
"}");
- ICompilationUnit unit = getCompilationUnit("P", "", "", "X.java");
+ ICompilationUnit unit = getCompilationUnit("P", "", "", "X.js");
copy = unit.getWorkingCopy(null);
startDeltas();
copy.discardWorkingCopy();
@@ -1014,7 +999,7 @@ public void testDiscardWorkingCopy1() throws CoreException { // renamed from tes
"P[*]: {CHILDREN}\n" +
" <project root>[*]: {CHILDREN}\n" +
" <default>[*]: {CHILDREN}\n" +
- " [Working copy] X.java[-]: {}"
+ " [Working copy] X.js[-]: {}"
);
} finally {
stopDeltas();
@@ -1027,10 +1012,10 @@ public void testDiscardWorkingCopy2() throws CoreException { // renamed from tes
ICompilationUnit copy = null;
try {
createJavaProject("P", new String[] {""}, "");
- createFile("P/X.java",
+ createFile("P/X.js",
"public class X {\n" +
"}");
- ICompilationUnit unit = getCompilationUnit("P", "", "", "X.java");
+ ICompilationUnit unit = getCompilationUnit("P", "", "", "X.js");
copy = unit.getWorkingCopy(new WorkingCopyOwner() {}, null, null);
startDeltas();
copy.discardWorkingCopy();
@@ -1039,7 +1024,7 @@ public void testDiscardWorkingCopy2() throws CoreException { // renamed from tes
"P[*]: {CHILDREN}\n" +
" <project root>[*]: {CHILDREN}\n" +
" <default>[*]: {CHILDREN}\n" +
- " [Working copy] X.java[-]: {}"
+ " [Working copy] X.js[-]: {}"
);
} finally {
stopDeltas();
@@ -1062,7 +1047,7 @@ public void testListenerPostChange() throws CoreException {
// cu creation
IPackageFragment pkg = getPackage("P");
ICompilationUnit cu = pkg.createCompilationUnit(
- "X.java",
+ "X.js",
"public class X {\n" +
"}",
false,
@@ -1072,7 +1057,7 @@ public void testListenerPostChange() throws CoreException {
"P[*]: {CHILDREN}\n" +
" <project root>[*]: {CHILDREN}\n" +
" <default>[*]: {CHILDREN}\n" +
- " X.java[+]: {}",
+ " X.js[+]: {}",
listener.toString());
listener.flush();
@@ -1088,7 +1073,7 @@ public void testListenerPostChange() throws CoreException {
"P[*]: {CHILDREN}\n" +
" <project root>[*]: {CHILDREN}\n" +
" <default>[*]: {CHILDREN}\n" +
- " X.java[*]: {CHILDREN | FINE GRAINED | PRIMARY RESOURCE}\n" +
+ " X.js[*]: {CHILDREN | FINE GRAINED | PRIMARY RESOURCE}\n" +
" A[+]: {}",
listener.toString());
listener.flush();
@@ -1109,7 +1094,7 @@ public void testListenerPostChange() throws CoreException {
"P[*]: {CHILDREN}\n" +
" <project root>[*]: {CHILDREN}\n" +
" <default>[*]: {CHILDREN}\n" +
- " [Working copy] X.java[+]: {}",
+ " [Working copy] X.js[+]: {}",
listener.toString());
listener.flush();
@@ -1133,7 +1118,7 @@ public void testListenerPostChange() throws CoreException {
"P[*]: {CHILDREN}\n" +
" <project root>[*]: {CHILDREN}\n" +
" <default>[*]: {CHILDREN}\n" +
- " X.java[*]: {CHILDREN | FINE GRAINED | PRIMARY RESOURCE}\n" +
+ " X.js[*]: {CHILDREN | FINE GRAINED | PRIMARY RESOURCE}\n" +
" X[*]: {CHILDREN | FINE GRAINED}\n" +
" foo()[+]: {}\n" +
" A[-]: {}",
@@ -1147,7 +1132,7 @@ public void testListenerPostChange() throws CoreException {
"P[*]: {CHILDREN}\n" +
" <project root>[*]: {CHILDREN}\n" +
" <default>[*]: {CHILDREN}\n" +
- " [Working copy] X.java[-]: {}",
+ " [Working copy] X.js[-]: {}",
listener.toString());
listener.flush();
wc = null;
@@ -1173,7 +1158,7 @@ public void testListenerReconcile() throws CoreException {
// cu creation
IPackageFragment pkg = getPackage("P");
ICompilationUnit cu = pkg.createCompilationUnit(
- "X.java",
+ "X.js",
"public class X {\n" +
"}",
false,
@@ -1267,7 +1252,7 @@ public void testMergeResourceDeltas() throws CoreException {
// an operation that creates a java delta without firing it
IPackageFragment pkg = getPackageFragment("P", "", "");
pkg.createCompilationUnit(
- "X.java",
+ "X.js",
"public class X {\n" +
"}",
true,
@@ -1284,7 +1269,7 @@ public void testMergeResourceDeltas() throws CoreException {
"P[*]: {CHILDREN}\n" +
" <project root>[*]: {CHILDREN}\n" +
" <default>[*]: {CHILDREN}\n" +
- " X.java[+]: {}\n" +
+ " X.js[+]: {}\n" +
" ResourceDelta(/P/Y.txt)[+]"
);
} finally {
@@ -1299,13 +1284,13 @@ public void testModifyMethodBodyAndSave() throws CoreException {
try {
createJavaProject("P", new String[] {""}, "");
createFolder("P/x/y");
- createFile("P/x/y/A.java",
+ createFile("P/x/y/A.js",
"package x.y;\n" +
"public class A {\n" +
" public void foo() {\n" +
" }\n" +
"}");
- ICompilationUnit cu = getCompilationUnit("P/x/y/A.java");
+ ICompilationUnit cu = getCompilationUnit("P/x/y/A.js");
workingCopy = cu.getWorkingCopy(null);
workingCopy.getBuffer().setContents(
"package x.y;\n" +
@@ -1322,7 +1307,7 @@ public void testModifyMethodBodyAndSave() throws CoreException {
"P[*]: {CHILDREN}\n" +
" <project root>[*]: {CHILDREN}\n" +
" x.y[*]: {CHILDREN}\n" +
- " A.java[*]: {CONTENT | FINE GRAINED | PRIMARY RESOURCE}"
+ " A.js[*]: {CONTENT | FINE GRAINED | PRIMARY RESOURCE}"
);
} finally {
stopDeltas();
@@ -1458,28 +1443,28 @@ public void testMoveCuInEnclosingPkg() throws CoreException {
try {
createJavaProject("P", new String[] {""}, "");
createFolder("P/x/y");
- createFile("P/x/y/A.java",
+ createFile("P/x/y/A.js",
"package x.y;\n" +
"public class A {\n" +
"}");
- ICompilationUnit cu = getCompilationUnit("P/x/y/A.java");
+ ICompilationUnit cu = getCompilationUnit("P/x/y/A.js");
IPackageFragment pkg = getPackage("P/x");
startDeltas();
cu.move(pkg, null, null, true, null);
assertDeltas(
"Unexpected delta",
- "P[*]: {CHILDREN}\n" +
- " <project root>[*]: {CHILDREN}\n" +
- " x[*]: {CHILDREN}\n" +
- " A.java[+]: {MOVED_FROM(A.java [in x.y [in <project root> [in P]]])}\n" +
- " x.y[*]: {CHILDREN}\n" +
- " A.java[-]: {MOVED_TO(A.java [in x [in <project root> [in P]]])}"
+ "P[*]: {CHILDREN}\n" +
+ " <project root>[*]: {CHILDREN}\n" +
+ " x[*]: {CHILDREN}\n" +
+ " A.js[+]: {MOVED_FROM(A.js [in x.y [in <project root> [in P]]])}"+
+ " x.y[*]: {CHILDREN}\n" +
+ " A.js[-]: {MOVED_TO(A.js [in x [in <project root> [in P]]])}\n"
);
assertElementDescendants(
"Unexpected children for package x",
"x\n" +
- " A.java\n" +
+ " A.js\n" +
" package x\n" +
" class A",
pkg);
@@ -1524,15 +1509,15 @@ public void testMoveResInDotNamedFolder() throws CoreException {
public void testMoveTwoResInRoot() throws CoreException {
try {
createJavaProject("P", new String[] {"src"}, "bin");
- final IFile f1 = createFile("P/X.java", "public class X {}");
- final IFile f2 = createFile("P/Y.java", "public class Y {}");
+ final IFile f1 = createFile("P/X.js", "public class X {}");
+ final IFile f2 = createFile("P/Y.js", "public class Y {}");
startDeltas();
JavaCore.run(
new IWorkspaceRunnable() {
public void run(IProgressMonitor monitor) throws CoreException {
- f1.move(new Path("/P/src/X.java"), true, null);
- f2.move(new Path("/P/src/Y.java"), true, null);
+ f1.move(new Path("/P/src/X.js"), true, null);
+ f2.move(new Path("/P/src/Y.js"), true, null);
}
},
null);
@@ -1541,10 +1526,10 @@ public void testMoveTwoResInRoot() throws CoreException {
"P[*]: {CHILDREN | CONTENT}\n" +
" src[*]: {CHILDREN}\n" +
" <default>[*]: {CHILDREN}\n" +
- " X.java[+]: {}\n" +
- " Y.java[+]: {}\n" +
- " ResourceDelta(/P/X.java)[-]\n" +
- " ResourceDelta(/P/Y.java)[-]"
+ " X.js[+]: {}\n" +
+ " Y.js[+]: {}\n" +
+ " ResourceDelta(/P/X.js)[-]\n" +
+ " ResourceDelta(/P/Y.js)[-]"
);
} finally {
stopDeltas();
@@ -1677,7 +1662,7 @@ public void testOverwriteClasspath() throws CoreException {
getWorkspace().run(run, null);
assertDeltas(
"Unexpected delta",
- "P[*]: {CHILDREN | CONTENT | CLASSPATH CHANGED}\n" +
+ "P[*]: {CHILDREN}\n" +
" <project root>[*]: {REMOVED FROM CLASSPATH}\n" +
" src[*]: {ADDED TO CLASSPATH}\n" +
" ResourceDelta(/P/.classpath)[*]\n" +
@@ -1795,7 +1780,7 @@ public void testRemoveAddBinaryProject() throws CoreException {
null);
assertDeltas(
"Unexpected delta",
- "P[*]: {CHILDREN | CONTENT | CLASSPATH CHANGED}\n" +
+ "P[*]: {CHILDREN | CLASSPATH CHANGED}\n" +
" <project root>[*]: {ADDED TO CLASSPATH}\n" +
" lib.jar[-]: {}\n" +
" ResourceDelta(/P/.classpath)[*]\n" +
@@ -1823,7 +1808,7 @@ public void testRemoveAddJavaProject() throws CoreException {
null);
assertDeltas(
"Unexpected delta",
- "P[*]: {CONTENT}\n" +
+ "P[*]: {CONTENT | CLASSPATH CHANGED}\n" +
" ResourceDelta(/P/.classpath)[*]\n" +
" ResourceDelta(/P/.project)[*]"
);
@@ -1860,7 +1845,7 @@ public void testRemoveCPEntryAndRoot1() throws CoreException {
null);
assertDeltas(
"Unexpected delta",
- "P[*]: {CHILDREN | CONTENT | CLASSPATH CHANGED}\n" +
+ "P[*]: {CHILDREN}\n" +
" src[-]: {}\n" +
" ResourceDelta(/P/.classpath)[*]"
);
@@ -1892,7 +1877,7 @@ public void testRemoveCPEntryAndRoot2() throws CoreException {
null);
assertDeltas(
"Unexpected delta",
- "P[*]: {CHILDREN | CONTENT | CLASSPATH CHANGED}\n" +
+ "P[*]: {CHILDREN | CLASSPATH CHANGED}\n" +
" src[-]: {}\n" +
" ResourceDelta(/P/.classpath)[*]"
);
@@ -1924,7 +1909,7 @@ public void testRemoveCPEntryAndRoot3() throws CoreException {
null);
assertDeltas(
"Unexpected delta",
- "P[*]: {CHILDREN | CONTENT | CLASSPATH CHANGED}\n" +
+ "P[*]: {CHILDREN | CLASSPATH CHANGED}\n" +
" src[-]: {}\n" +
" ResourceDelta(/P/.classpath)[*]"
);
@@ -2089,13 +2074,13 @@ public void testRenameMethodAndSave() throws CoreException {
try {
createJavaProject("P", new String[] {""}, "");
createFolder("P/x/y");
- createFile("P/x/y/A.java",
+ createFile("P/x/y/A.js",
"package x.y;\n" +
"public class A {\n" +
" public void foo1() {\n" +
" }\n" +
"}");
- ICompilationUnit cu = getCompilationUnit("P/x/y/A.java");
+ ICompilationUnit cu = getCompilationUnit("P/x/y/A.js");
workingCopy = cu.getWorkingCopy(null);
workingCopy.getBuffer().setContents(
"package x.y;\n" +
@@ -2111,9 +2096,9 @@ public void testRenameMethodAndSave() throws CoreException {
"P[*]: {CHILDREN}\n" +
" <project root>[*]: {CHILDREN}\n" +
" x.y[*]: {CHILDREN}\n" +
- " A.java[*]: {CHILDREN | FINE GRAINED | PRIMARY RESOURCE}\n" +
+ " A.js[*]: {CHILDREN | FINE GRAINED | PRIMARY RESOURCE}\n" +
" A[*]: {CHILDREN | FINE GRAINED}\n" +
- " foo1()[-]: {}\n" +
+ " foo1()[-]: {}\n" +
" foo2()[+]: {}"
);
} finally {
@@ -2153,7 +2138,7 @@ public void testRenameOuterPkgFragment() throws CoreException {
createJavaProject("P", new String[] {""}, "");
createFolder("P/x/y");
createFile(
- "P/x/y/X.java",
+ "P/x/y/X.js",
"package x.y;\n" +
"public class X {\n" +
"}");
@@ -2179,10 +2164,10 @@ public void testSaveWorkingCopy() throws CoreException {
ICompilationUnit copy = null;
try {
createJavaProject("P", new String[] {""}, "");
- createFile("P/X.java",
+ createFile("P/X.js",
"public class X {\n" +
"}");
- ICompilationUnit unit = getCompilationUnit("P", "", "", "X.java");
+ ICompilationUnit unit = getCompilationUnit("P", "", "", "X.js");
copy = unit.getWorkingCopy(null);
copy.getType("X").createMethod("void foo() {}", null, true, null);
startDeltas();
@@ -2197,7 +2182,7 @@ public void testSaveWorkingCopy() throws CoreException {
"P[*]: {CHILDREN}\n" +
" <project root>[*]: {CHILDREN}\n" +
" <default>[*]: {CHILDREN}\n" +
- " X.java[*]: {CHILDREN | FINE GRAINED | PRIMARY RESOURCE}\n" +
+ " X.js[*]: {CHILDREN | FINE GRAINED | PRIMARY RESOURCE}\n" +
" X[*]: {CHILDREN | FINE GRAINED}\n" +
" foo()[+]: {}"
);
@@ -2233,7 +2218,7 @@ public void testSetClasspathOnFreshProject() throws CoreException {
p1.setRawClasspath(classpath, null);
assertDeltas(
"Should notice src2 and myLib additions to the classpath",
- "P1[*]: {CHILDREN | CONTENT | CLASSPATH CHANGED}\n" +
+ "P1[*]: {CHILDREN | CLASSPATH CHANGED}\n" +
" <project root>[*]: {REMOVED FROM CLASSPATH}\n" +
" /LibProj/mylib.jar[*]: {ADDED TO CLASSPATH}\n" +
" src2[*]: {ADDED TO CLASSPATH}\n" +
@@ -2308,11 +2293,11 @@ public void testWorkingCopyCommit() throws CoreException {
try {
createJavaProject("P", new String[] {""}, "");
createFolder("P/x/y");
- createFile("P/x/y/A.java",
+ createFile("P/x/y/A.js",
"package x.y;\n" +
"public class A {\n" +
"}");
- ICompilationUnit cu = getCompilationUnit("P/x/y/A.java");
+ ICompilationUnit cu = getCompilationUnit("P/x/y/A.js");
ICompilationUnit copy = cu.getWorkingCopy(null);
copy.getBuffer().setContents(
"package x.y;\n" +
@@ -2328,7 +2313,7 @@ public void testWorkingCopyCommit() throws CoreException {
"P[*]: {CHILDREN}\n" +
" <project root>[*]: {CHILDREN}\n" +
" x.y[*]: {CHILDREN}\n" +
- " A.java[*]: {CHILDREN | FINE GRAINED | PRIMARY RESOURCE}\n" +
+ " A.js[*]: {CHILDREN | FINE GRAINED | PRIMARY RESOURCE}\n" +
" A[*]: {CHILDREN | FINE GRAINED}\n" +
" foo()[+]: {}"
);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaLikeExtensionsTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaLikeExtensionsTests.java
index c2b7941..9ee323e 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaLikeExtensionsTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaLikeExtensionsTests.java
@@ -89,7 +89,7 @@ public class JavaLikeExtensionsTests extends ModifyingResourceTests {
* Ensure that file.java is a Java-like file name
*/
public void testIJavaLikeFileName02() {
- assertTrue("file.java should be a Java-like file name", JavaCore.isJavaLikeFileName("file.java"));
+ assertTrue("file.java should be a Java-like file name", JavaCore.isJavaLikeFileName("file.js"));
}
/*
@@ -117,7 +117,7 @@ public class JavaLikeExtensionsTests extends ModifyingResourceTests {
* Ensure that removing the Java-like extension for file.java returns foo
*/
public void testRemoveJavaLikeExtension02() {
- assertEquals("Unexpected file without Java-like extension", "file", JavaCore.removeJavaLikeExtension("file.java"));
+ assertEquals("Unexpected file without Java-like extension", "file", JavaCore.removeJavaLikeExtension("file.js"));
}
/*
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaModelTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaModelTests.java
index b63cb43..790ba0f 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaModelTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaModelTests.java
@@ -92,12 +92,12 @@ public void testContains1() throws CoreException {
IJavaProject project = this.createJavaProject("P", new String[] {""}, "");
// .java file
- IFile file = this.getFile("/P/X.java");
+ IFile file = this.getFile("/P/X.js");
assertTrue("/P/X.java should be in model", getJavaModel().contains(file));
// .class file
- file = this.getFile("/P/X.class");
- assertTrue("/P/X.class should not be in model", !getJavaModel().contains(file));
+// file = this.getFile("/P/X.class");
+// assertTrue("/P/X.class should not be in model", !getJavaModel().contains(file));
// non-Java resource
file = this.getFile("/P/read.txt");
@@ -108,7 +108,7 @@ public void testContains1() throws CoreException {
assertTrue("/P/p should be in model", getJavaModel().contains(folder));
// resource in closed project
- file = this.createFile("/P/X.java", "");
+ file = this.createFile("/P/X.js", "");
project.getProject().close(null);
assertTrue("/P/X.java should be in model (even if project is closed)", getJavaModel().contains(file));
@@ -143,7 +143,7 @@ public void testContains3() throws CoreException {
this.createJavaProject("P", new String[] {""}, "");
// .java file
- IFile file = this.createFile("/P/X.java", "");
+ IFile file = this.createFile("/P/X.js", "");
assertTrue("/P/X.java should be in model", getJavaModel().contains(file));
// .class file
@@ -170,7 +170,7 @@ public void testContains4() throws CoreException {
this.createJavaProject("P", new String[] {}, "bin");
// .java file
- IFile file = this.createFile("/P/X.java", "");
+ IFile file = this.createFile("/P/X.js", "");
assertTrue("/P/X.java should be in model", getJavaModel().contains(file));
// .class file
@@ -210,7 +210,7 @@ public void testContains5() throws CoreException {
this.createJavaProject("P", new String[] {"src"}, "bin");
// .java file
- IFile file = this.createFile("/P/src/X.java", "");
+ IFile file = this.createFile("/P/src/X.js", "");
assertTrue("/P/src/X.java should be in model", getJavaModel().contains(file));
// resource file in src
@@ -251,7 +251,7 @@ public void testContains6() throws CoreException {
this.createJavaProject("P", new String[] {""}, "bin");
// .java file
- IFile file = this.createFile("/P/X.java", "");
+ IFile file = this.createFile("/P/X.js", "");
assertTrue("/P/X.java should be in model", getJavaModel().contains(file));
// resource file in src
@@ -312,11 +312,11 @@ public void testFindLineSeparator01() throws CoreException {
try {
createJavaProject("P");
createFile(
- "/P/X.java",
+ "/P/X.js",
"public class X {\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("/P/X.java");
+ ICompilationUnit cu = getCompilationUnit("/P/X.js");
assertEquals("\n", cu.findRecommendedLineSeparator());
} finally {
deleteProject("P");
@@ -330,11 +330,11 @@ public void testFindLineSeparator02() throws CoreException {
try {
createJavaProject("P");
createFile(
- "/P/X.java",
+ "/P/X.js",
"public class X {\r\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("/P/X.java");
+ ICompilationUnit cu = getCompilationUnit("/P/X.js");
assertEquals("\r\n", cu.findRecommendedLineSeparator());
} finally {
deleteProject("P");
@@ -348,10 +348,10 @@ public void testFindLineSeparator03() throws CoreException {
try {
createJavaProject("P");
createFile(
- "/P/X.java",
+ "/P/X.js",
""
);
- ICompilationUnit cu = getCompilationUnit("/P/X.java");
+ ICompilationUnit cu = getCompilationUnit("/P/X.js");
assertEquals(System.getProperty("line.separator"), cu.findRecommendedLineSeparator());
} finally {
deleteProject("P");
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaProjectTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaProjectTests.java
index 1c1341d..478bbe9 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaProjectTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaProjectTests.java
@@ -192,9 +192,9 @@ public void testClassFileCorrespondingResource() throws JavaModelException {
* has a corresponding resource.
*/
public void testCompilationUnitCorrespondingResource() throws JavaModelException {
- ICompilationUnit element= getCompilationUnit("JavaProjectTests", "", "q", "A.java");
+ ICompilationUnit element= getCompilationUnit("JavaProjectTests", "", "q", "A.js");
IResource corr= element.getCorrespondingResource();
- IResource res= getWorkspace().getRoot().getProject("JavaProjectTests").getFolder("q").getFile("A.java");
+ IResource res= getWorkspace().getRoot().getProject("JavaProjectTests").getFolder("q").getFile("A.js");
assertTrue("incorrect corresponding resource", corr.equals(res));
assertEquals("Project is incorrect for the compilation unit", "JavaProjectTests", corr.getProject().getName());
}
@@ -261,7 +261,7 @@ public void testExtraJavaLikeExtension1() throws CoreException {
try {
createJavaProject("P");
createFolder("/P/pack");
- createFile("/P/pack/X.java", "package pack; public class X {}");
+ createFile("/P/pack/X.js", "package pack; public class X {}");
createFile("/P/pack/Y.bar", "package pack; public class Y {}");
IPackageFragment pkg = getPackage("/P/pack");
assertSortedElementsEqual(
@@ -296,7 +296,7 @@ public void testExtraJavaLikeExtension2() throws CoreException {
*/
public void testFindElementClassFile() throws JavaModelException {
IJavaProject project= getJavaProject("JavaProjectTests");
- IJavaElement element= project.findElement(new Path("java/lang/Object.java"));
+ IJavaElement element= project.findElement(new Path("java/lang/Object.js"));
assertTrue("CU not found" , element != null && element.getElementType() == IJavaElement.CLASS_FILE
&& element.getElementName().equals("Object.class"));
}
@@ -305,18 +305,18 @@ public void testFindElementClassFile() throws JavaModelException {
*/
public void testFindElementCompilationUnit() throws JavaModelException {
IJavaProject project= getJavaProject("JavaProjectTests");
- IJavaElement element= project.findElement(new Path("x/y/Main.java"));
+ IJavaElement element= project.findElement(new Path("x/y/Main.js"));
assertTrue("CU not found" , element != null && element.getElementType() == IJavaElement.COMPILATION_UNIT
- && element.getElementName().equals("Main.java"));
+ && element.getElementName().equals("Main.js"));
}
/**
* Test that a compilation unit can be found in a default package
*/
public void testFindElementCompilationUnitDefaultPackage() throws JavaModelException {
IJavaProject project= getJavaProject("JavaProjectTests");
- IJavaElement element= project.findElement(new Path("B.java"));
+ IJavaElement element= project.findElement(new Path("B.js"));
assertTrue("CU not found" , element != null && element.getElementType() == IJavaElement.COMPILATION_UNIT
- && element.getElementName().equals("B.java"));
+ && element.getElementName().equals("B.js"));
}
/**
* Test that an invlaid path throws an exception
@@ -341,7 +341,7 @@ public void testFindElementInvalidPath() throws JavaModelException {
}
assertTrue("Shold have failed", failed);
- IJavaElement element= project.findElement(new Path("does/not/exist/HelloWorld.java"));
+ IJavaElement element= project.findElement(new Path("does/not/exist/HelloWorld.js"));
assertTrue("should get no element", element == null);
}
/**
@@ -362,11 +362,11 @@ public void testFindElementPrereqSimpleProject() throws CoreException {
this.createProject("R");
IJavaProject project = this.createJavaProject("J", new String[] {"src"}, new String[] {}, new String[] {"/R"}, "bin");
this.createFile(
- "J/src/X.java",
+ "J/src/X.js",
"public class X {\n" +
"}"
);
- assertTrue("X.java not found", project.findElement(new Path("X.java")) != null);
+ assertTrue("X.java not found", project.findElement(new Path("X.js")) != null);
} finally {
this.deleteProject("R");
this.deleteProject("J");
@@ -1125,7 +1125,7 @@ public void testRootGetPackageFragments3() throws CoreException {
try {
IJavaProject p1 = createJavaProject("P1");
createFile(
- "/P1/X.java",
+ "/P1/X.js",
"public class X {\n" +
"}"
);
@@ -1161,7 +1161,7 @@ public void testRootGetPackageFragments3() throws CoreException {
public void testSourceFolderWithJarName() throws CoreException {
try {
this.createJavaProject("P", new String[] {"src.jar"}, "bin");
- IFile file = createFile("/P/src.jar/X.java", "class X {}");
+ IFile file = createFile("/P/src.jar/X.js", "class X {}");
ICompilationUnit unit = (ICompilationUnit)JavaCore.create(file);
unit.getAllTypes(); // force to open
} catch (CoreException e) {
@@ -1174,7 +1174,7 @@ public void testSourceFolderWithJarName() throws CoreException {
* has no corresponding resource.
*/
public void testSourceMethodCorrespondingResource() throws JavaModelException {
- ICompilationUnit element= getCompilationUnit("JavaProjectTests", "", "q", "A.java");
+ ICompilationUnit element= getCompilationUnit("JavaProjectTests", "", "q", "A.js");
IMethod[] methods = element.getType("A").getMethods();
assertTrue("missing methods", methods.length > 0);
IResource corr= methods[0].getCorrespondingResource();
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchBugsTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchBugsTests.java
index 9881b6c..f45b02f 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchBugsTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchBugsTests.java
@@ -115,11 +115,11 @@ protected void search(String patternString, int searchFor, int limitTo, int matc
public void setUpSuite() throws Exception {
super.setUpSuite();
JAVA_PROJECT = setUpJavaProject("JavaSearchBugs", "1.5");
- addLibraryEntry(JAVA_PROJECT, "/JavaSearchBugs/lib/b95152.jar", false);
- addLibraryEntry(JAVA_PROJECT, "/JavaSearchBugs/lib/b123679.jar", false);
- addLibraryEntry(JAVA_PROJECT, "/JavaSearchBugs/lib/b140156.jar", false);
- addLibraryEntry(JAVA_PROJECT, "/JavaSearchBugs/lib/b164791.jar", false);
- addLibraryEntry(JAVA_PROJECT, "/JavaSearchBugs/lib/b166348.jar", false);
+// addLibraryEntry(JAVA_PROJECT, "/JavaSearchBugs/lib/b95152.jar", false);
+// addLibraryEntry(JAVA_PROJECT, "/JavaSearchBugs/lib/b123679.jar", false);
+// addLibraryEntry(JAVA_PROJECT, "/JavaSearchBugs/lib/b140156.jar", false);
+// addLibraryEntry(JAVA_PROJECT, "/JavaSearchBugs/lib/b164791.jar", false);
+// addLibraryEntry(JAVA_PROJECT, "/JavaSearchBugs/lib/b166348.jar", false);
}
public void tearDownSuite() throws Exception {
deleteProject("JavaSearchBugs");
@@ -138,7 +138,7 @@ protected void setUp () throws Exception {
*/
public void testBug41018() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b41018/A.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b41018/A.js",
"package b41018;\n" +
"public class A {\n" +
" protected void anotherMethod() {\n" +
@@ -169,7 +169,7 @@ public void testBug41018() throws CoreException {
*/
public void testBug70827() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b70827/A.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b70827/A.js",
"package b70827;\n" +
"class A {\n" +
" private void privateMethod() {\n" +
@@ -206,7 +206,7 @@ public void testBug71279() throws CoreException {
}
};
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b71279/AA.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b71279/AA.js",
"package b71279;\n" +
"public class AA {\n" +
" Unknown ref;\n" +
@@ -226,7 +226,7 @@ public void testBug71279() throws CoreException {
public void testBug72866() throws CoreException {
workingCopies = new ICompilationUnit[4];
WorkingCopyOwner owner = new WorkingCopyOwner() {};
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b72866/A.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b72866/A.js",
"package b72866;\n" +
"public abstract class A {\n" +
" public abstract void foo(V v);\n" +
@@ -234,7 +234,7 @@ public void testBug72866() throws CoreException {
owner,
true
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b72866/SX.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b72866/SX.js",
"package b72866;\n" +
"public class SX extends A {\n" +
" public void foo(V v) {\n" +
@@ -243,7 +243,7 @@ public void testBug72866() throws CoreException {
"}\n" ,
owner,
true);
- workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b72866/V.java",
+ workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b72866/V.js",
"package b72866;\n" +
"public class V {\n" +
" void bar(A a) {}\n" +
@@ -252,7 +252,7 @@ public void testBug72866() throws CoreException {
"}\n" ,
owner,
true);
- workingCopies[3] = getWorkingCopy("/JavaSearchBugs/src/b72866/X.java",
+ workingCopies[3] = getWorkingCopy("/JavaSearchBugs/src/b72866/X.js",
"package b72866;\n" +
"public class X extends A {\n" +
" public void foo(V v) {\n" +
@@ -275,7 +275,7 @@ public void testBug72866() throws CoreException {
*/
public void testBug73112a() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b73112/A.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b73112/A.js",
"package b73112;\n" +
"public class A {\n" +
" int fieldA73112a = 1, fieldA73112b = new Integer(2).intValue(), fieldA73112c = fieldA73112a + fieldA73112b;\n" +
@@ -296,7 +296,7 @@ public void testBug73112a() throws CoreException {
}
public void testBug73112b() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = super.getWorkingCopy("/JavaSearchBugs/src/b73112/B.java",
+ workingCopies[0] = super.getWorkingCopy("/JavaSearchBugs/src/b73112/B.js",
"package b73112;\n" +
"public class B {\n" +
" int fieldB73112a, fieldB73112b = 10;\n" +
@@ -326,24 +326,24 @@ public void testBug73112b() throws CoreException {
public void testBug73336() throws CoreException {
workingCopies = new ICompilationUnit[6];
WorkingCopyOwner owner = new WorkingCopyOwner() {};
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b73336/A.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b73336/A.js",
"package b73336;\n" +
"public class A {}\n",
owner,
true);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b73336/AA.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b73336/AA.js",
"package b73336;\n" +
"public class AA extends A {}\n",
owner,
true);
- workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b73336/B.java",
+ workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b73336/B.js",
"package b73336;\n" +
"public class B extends X<A, A> {\n" +
" <T> void foo(T t) {}\n" +
"}\n",
owner,
true);
- workingCopies[3] = getWorkingCopy("/JavaSearchBugs/src/b73336/C.java",
+ workingCopies[3] = getWorkingCopy("/JavaSearchBugs/src/b73336/C.js",
"package b73336;\n" +
"public class C implements I<A> {\n" +
" public void foo() {\n" +
@@ -353,14 +353,14 @@ public void testBug73336() throws CoreException {
"}\n",
owner,
true );
- workingCopies[4] = getWorkingCopy("/JavaSearchBugs/src/b73336/I.java",
+ workingCopies[4] = getWorkingCopy("/JavaSearchBugs/src/b73336/I.js",
"package b73336;\n" +
"public interface I<T> {\n" +
" public void foo();\n" +
"}\n",
owner,
true );
- workingCopies[5] = getWorkingCopy("/JavaSearchBugs/src/b73336/X.java",
+ workingCopies[5] = getWorkingCopy("/JavaSearchBugs/src/b73336/X.js",
"package b73336;\n" +
"public class X<T, U> {\n" +
" <V> void foo(V v) {}\n" +
@@ -385,18 +385,18 @@ public void testBug73336() throws CoreException {
public void testBug73336b() throws CoreException {
workingCopies = new ICompilationUnit[4];
WorkingCopyOwner owner = new WorkingCopyOwner() {};
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b73336b/A.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b73336b/A.js",
"package b73336b;\n" +
"public class A {}\n",
owner,
true);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b73336b/B.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b73336b/B.js",
"package b73336b;\n" +
"public class B extends X<A, A> {\n" +
"}\n",
owner,
true);
- workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b73336b/C.java",
+ workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b73336b/C.js",
"package b73336b;\n" +
"public class C extends X<A, A>.Member<A> {\n" +
" public C() {\n" +
@@ -405,7 +405,7 @@ public void testBug73336b() throws CoreException {
"}\n",
owner,
true);
- workingCopies[3] = getWorkingCopy("/JavaSearchBugs/src/b73336b/X.java",
+ workingCopies[3] = getWorkingCopy("/JavaSearchBugs/src/b73336b/X.js",
"package b73336b;\n" +
"public class X<T, U> {\n" +
" <V> void foo(V v) {}\n" +
@@ -433,25 +433,25 @@ public void testBug73336b() throws CoreException {
public void testBug73336c() throws CoreException {
workingCopies = new ICompilationUnit[4];
WorkingCopyOwner owner = new WorkingCopyOwner() {};
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b73336c/A.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b73336c/A.js",
"package b73336c;\n" +
"public class A {}\n",
owner,
true);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b73336c/B.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b73336c/B.js",
"package b73336c;\n" +
"public class B extends X<A, A> {\n" +
"}\n",
owner,
true);
- workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b73336c/C.java",
+ workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b73336c/C.js",
"package b73336c;\n" +
"public class C implements X<A, A>.Interface<A> {\n" +
" void bar() {}\n" +
"}\n",
owner,
true);
- workingCopies[3] = getWorkingCopy("/JavaSearchBugs/src/b73336c/X.java",
+ workingCopies[3] = getWorkingCopy("/JavaSearchBugs/src/b73336c/X.js",
"package b73336c;\n" +
"public class X<T, U> {\n" +
" interface Interface<V> {\n" +
@@ -480,13 +480,13 @@ public void testBug73336c() throws CoreException {
public void testBug73696() throws CoreException {
workingCopies = new ICompilationUnit[2];
WorkingCopyOwner owner = new WorkingCopyOwner() {};
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b73696/C.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b73696/C.js",
"package b73696;\n" +
"public class C implements I {\n" +
"}",
owner,
true);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b73696/I.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b73696/I.js",
"package b73696;\n" +
"public interface I {}\n",
owner,
@@ -534,7 +534,7 @@ public void testBug73696() throws CoreException {
public void testBug74776() throws CoreException {
workingCopies = new ICompilationUnit[3];
WorkingCopyOwner owner = new WorkingCopyOwner() {};
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b74776/A.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b74776/A.js",
"package b74776;\n" +
"public class A {\n" +
" /**\n" +
@@ -549,13 +549,13 @@ public void testBug74776() throws CoreException {
"}\n",
owner,
true);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b74776/IRegion.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b74776/IRegion.js",
"package b74776;\n" +
"public interface IRegion {\n" +
"}\n",
owner,
true);
- workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b74776/Region.java",
+ workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b74776/Region.js",
"package b74776;\n" +
"public class Region implements IRegion {\n" +
"\n" +
@@ -590,7 +590,7 @@ public void testBug75816() throws CoreException {
*/
private void setUpBug77093() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b77093/X.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b77093/X.js",
"package b77093;\n" +
"public class X {\n" +
" class Z {\n" +
@@ -651,7 +651,7 @@ public void testBug77093method() throws CoreException {
*/
public void testBug77388() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b77388/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b77388/Test.js",
"package b77388;\n" +
"class Test {\n" +
" Test(int a, int b) { }\n" +
@@ -676,14 +676,14 @@ public void testBug77388() throws CoreException {
public void testBug78082() throws CoreException {
workingCopies = new ICompilationUnit[2];
WorkingCopyOwner owner = new WorkingCopyOwner() {};
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b78082/M.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b78082/M.js",
"package b78082;\n" +
"public class M {\n" +
" static int VAL=78082;\n" +
"}\n",
owner,
true);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b78082/XY.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b78082/XY.js",
"package b78082;\n" +
"import static b78082.M.VAL;\n" +
"public class XY {\n" +
@@ -710,7 +710,7 @@ public void testBug78082() throws CoreException {
*/
public void testBug79267() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b79267/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b79267/Test.js",
"package b79267;\n" +
"public class Test {\n" +
" private static final X<String, String> BEFORE = new X<String, String>(4);\n" +
@@ -754,7 +754,7 @@ public void testBug79267() throws CoreException {
*/
public void testBug79378() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b79378/A.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b79378/A.js",
"package b79378;\n" +
"public class Test {\n" +
" void foo79378(String s, RuntimeException[] exceptions) {}\n" +
@@ -776,7 +776,7 @@ public void testBug79378() throws CoreException {
public void testBug79378b() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b79378/A.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b79378/A.js",
"package b79378;\n" +
"public class Test {\n" +
" void foo79378(String s, RuntimeException[] exceptions) {}\n" +
@@ -800,7 +800,7 @@ public void testBug79378b() throws CoreException {
*/
public void testBug79803() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b79803/A.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b79803/A.js",
"package b79803;\n" +
"class A<A> {\n" +
" A a;\n" +
@@ -816,7 +816,7 @@ public void testBug79803() throws CoreException {
}
public void testBug79803string() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b79803/A.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b79803/A.js",
"package b79803;\n" +
"class A<A> {\n" +
" A a;\n" +
@@ -838,13 +838,13 @@ public void testBug79803string() throws CoreException {
public void testBug79860() throws CoreException {
workingCopies = new ICompilationUnit[2];
WorkingCopyOwner owner = new WorkingCopyOwner() {};
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b79860/X.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b79860/X.js",
"package b79860;\n" +
"public class X<T extends A> { }\n" +
"class A { }",
owner,
true);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b79860/Y.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b79860/Y.js",
"package b79860;\n" +
"public class Y<T extends B&I1&I2&I3> { }\n" +
"class B { }\n" +
@@ -862,13 +862,13 @@ public void testBug79860() throws CoreException {
public void testBug79860string() throws CoreException {
workingCopies = new ICompilationUnit[2];
WorkingCopyOwner owner = new WorkingCopyOwner() {};
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b79860/X.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b79860/X.js",
"package b79860;\n" +
"public class X<T extends A> { }\n" +
"class A { }",
owner,
true);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b79860/Y.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b79860/Y.js",
"package b79860;\n" +
"public class Y<T extends B&I1&I2&I3> { }\n" +
"class B { }\n" +
@@ -891,7 +891,7 @@ public void testBug79860string() throws CoreException {
*/
private void setUpBug79990() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b79990/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b79990/Test.js",
"package b79990;\n" +
"class Test<T> {\n" +
" public void first(Exception num) {}\n" +
@@ -931,7 +931,7 @@ public void testBug79990c() throws CoreException {
}
public void testBug79990d() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b79990/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b79990/Test.js",
"package b79990;\n" +
"public class Test<T> {\n" +
" void methodT(T t) {}\n" +
@@ -954,7 +954,7 @@ public void testBug79990d() throws CoreException {
*/
public void testBug80084() throws CoreException, JavaModelException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b80084/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b80084/Test.js",
"package b80084;\n" +
"class List<T> {}\n" +
"public class Test {\n" +
@@ -979,7 +979,7 @@ public void testBug80084() throws CoreException, JavaModelException {
*/
private void setUpBug80194() throws CoreException, JavaModelException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b80194/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b80194/Test.js",
"package b80194;\n" +
"interface Map<K, V> {}\n" +
"class HashMap<K, V> implements Map {}\n" +
@@ -1048,14 +1048,14 @@ public void testBug80194string3() throws CoreException, JavaModelException {
public void testBug80223() throws CoreException {
workingCopies = new ICompilationUnit[2];
WorkingCopyOwner owner = new WorkingCopyOwner() {};
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b80223/a/A.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b80223/a/A.js",
"package b80223.a;\n" +
"public class A {\n" +
" void m() {}\n" +
"}",
owner,
true);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b80223/b/B.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b80223/b/B.js",
"package b80223.b;\n" +
"public class B extends b80223.a.A {\n" +
" void m() {}\n" +
@@ -1082,7 +1082,7 @@ public void testBug80223() throws CoreException {
// Methods
private void setUpBug80264_Methods() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b80264/Methods.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b80264/Methods.js",
"package b80264;\n" +
"class Methods {\n" +
" Methods stable() { return null; }\n" +
@@ -1156,7 +1156,7 @@ public void testBug80264_MethodsIgnoreBothTypes() throws CoreException, JavaMode
// Classes
private void setUpBug80264_Classes() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b80264/Classes.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b80264/Classes.js",
"package b80264;\n" +
"class Classes {\n" +
" class Inner {}\n" +
@@ -1208,7 +1208,7 @@ public void testBug80264_ClassesIgnoreTypes() throws CoreException, JavaModelExc
// Fields
private void setUpBug80264_Fields() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b80264/Fields.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b80264/Fields.js",
"package b80264;\n" +
"class Fields {\n" +
" Fields field1;\n" +
@@ -1282,7 +1282,7 @@ public void testBug80264_FieldsIgnoreBothTypes() throws CoreException, JavaModel
*/
public void testBug80890() throws CoreException, JavaModelException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b80890/A.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b80890/A.js",
"package b80890;\n" +
"public class A {\n" +
" protected void foo(Exception e) {}\n" +
@@ -1332,7 +1332,7 @@ public void testBug80918() throws CoreException {
*/
public void testBug81084a() throws CoreException, JavaModelException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b81084a/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b81084a/Test.js",
"package b81084a;\n" +
"class List<E> {}\n" +
"public class Test {\n" +
@@ -1359,7 +1359,7 @@ public void testBug81084a() throws CoreException, JavaModelException {
}
public void testBug81084string() throws CoreException, JavaModelException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b81084a/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b81084a/Test.js",
"package b81084a;\n" +
"class List<E> {}\n" +
"public class Test {\n" +
@@ -1383,7 +1383,7 @@ public void testBug81084string() throws CoreException, JavaModelException {
}
public void testBug81084b() throws CoreException, JavaModelException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b81084b/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b81084b/Test.js",
"package b81084b;\n" +
"class List<E> {}\n" +
"public class Test {\n" +
@@ -1415,7 +1415,7 @@ public void testBug81084b() throws CoreException, JavaModelException {
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=81556"
*/
public void testBug81556() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearchBugs", "src", "b81556.a", "X81556.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearchBugs", "src", "b81556.a", "X81556.js");
IType type = unit.getType("X81556");
IMethod method = type.getMethod("foo", new String[0]);
search(method, REFERENCES);
@@ -1430,7 +1430,7 @@ public void testBug81556() throws CoreException {
*/
public void testBug82088method() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b82088/m/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b82088/m/Test.js",
"package b82088.m;\n" +
"/**\n" +
" * @see #setA(A)\n" +
@@ -1453,7 +1453,7 @@ public void testBug82088method() throws CoreException {
}
public void testBug82088constructor() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b82088/c/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b82088/c/Test.js",
"package b82088.c;\n" +
"/**\n" +
" * @see #Test(A)\n" +
@@ -1481,7 +1481,7 @@ public void testBug82088constructor() throws CoreException {
*/
private void setUpBug82208() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b82208/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b82208/Test.js",
"package b82208;\n" +
"interface B82208_I {}\n" +
"enum B82208_E {}\n" +
@@ -1558,7 +1558,7 @@ public void testBug82208_CLASS_AND_ENUMERATION() throws CoreException {
public void testBug82673() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b82673/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b82673/Test.js",
"package b82673;\n" +
"public class Test {\n" +
" void test1() {\n" +
@@ -1591,7 +1591,7 @@ public void testBug82673() throws CoreException {
public void testBug83012() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b83012/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b83012/Test.js",
"package b83012;\n" +
"@interface A {\n" +
" String value() default \"\";\n" +
@@ -1623,7 +1623,7 @@ public void testBug83012() throws CoreException {
private void setUpBug83230_Explicit() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b83230/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b83230/Test.js",
"package b83230;\n" +
"@interface Author {\n" +
" String[] authorName() default \"FREDERIC\";\n" +
@@ -1723,7 +1723,7 @@ public void testBug83230_Explicit05() throws CoreException {
public void testBug83230_Implicit01() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b83230/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b83230/Test.js",
"package b83230;\n" +
"@interface Annot {\n" +
" int value();\n" +
@@ -1748,7 +1748,7 @@ public void testBug83230_Implicit01() throws CoreException {
public void testBug83230_Implicit02() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b83230/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b83230/Test.js",
"package b83230;\n" +
"@interface A {\n" +
" String value() default \"\";\n" +
@@ -1779,7 +1779,7 @@ public void testBug83230_Implicit02() throws CoreException {
public void testBug83304() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b83304/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b83304/Test.js",
"package b83304;\n" +
"public class Test {\n" +
" void foo() {\n" +
@@ -1801,7 +1801,7 @@ public void testBug83304() throws CoreException {
private void setUpBug83304_TypeParameterizedElementPattern() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b83304/Types.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b83304/Types.js",
"package b83304;\n" +
"import g1.t.s.def.Generic;\n" +
"public class Types {\n" +
@@ -1864,7 +1864,7 @@ public void testBug83304_TypeStringPattern() throws CoreException {
private void setUpBug83304_MethodParameterizedElementPattern() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b83304/Methods.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b83304/Methods.js",
"package b83304;\n" +
"import g5.m.def.Single;\n" +
"public class Methods {\n" +
@@ -1914,7 +1914,7 @@ public void testBug83304_MethodStringPattern() throws CoreException {
private void setUpBug83304_ConstructorGenericElementPattern() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b83304/Constructors.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b83304/Constructors.js",
"package b83304;\n" +
"import g5.c.def.Single;\n" +
"public class Constructors {\n" +
@@ -1969,7 +1969,7 @@ public void testBug83304_ConstructorStringPattern() throws CoreException {
*/
private void setUpBug83804_Type() throws CoreException {
workingCopies = new ICompilationUnit[2];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b83804/package-info.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b83804/package-info.js",
"/**\n" +
" * Valid javadoc.\n" +
" * @see Test\n" +
@@ -1984,7 +1984,7 @@ private void setUpBug83804_Type() throws CoreException {
" */\n" +
"package b83804;\n"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b83804/Test.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b83804/Test.js",
"/**\n" +
" * Invalid javadoc\n" +
" */\n" +
@@ -2036,7 +2036,7 @@ public void testBug83804_Field() throws CoreException {
public void testBug83388() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b83388/R.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b83388/R.js",
"package b83388;\n" +
"import b83388.*;\n" +
"public class R {}\n"
@@ -2064,7 +2064,7 @@ public void testBug83388() throws CoreException {
public void testBug83388b() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b83388/R.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b83388/R.js",
"package b83388;\n" +
"import b83388.*;\n" +
"public class R {}\n"
@@ -2098,7 +2098,7 @@ public void testBug83693() throws CoreException {
resultCollector.showRule = true;
resultCollector.showInsideDoc = true;
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b83693/A.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b83693/A.js",
"package b83693;\n" +
"import static b83693.A.m;\n" +
"/**\n" +
@@ -2130,7 +2130,7 @@ public void testBug83693() throws CoreException {
*/
public void testBug83716() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b83716/X.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b83716/X.js",
"package b83716;\n" +
"public class X {\n" +
" X() {}\n" +
@@ -2154,7 +2154,7 @@ public void testBug83716() throws CoreException {
private void setUpBug84100() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[2];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b84100/X.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b84100/X.js",
"package b84100;\n" +
"public class X {\n" +
" void foo() {}\n" +
@@ -2164,7 +2164,7 @@ private void setUpBug84100() throws CoreException {
" void foo(String s, int x, String... xs) {}\n" +
"}\n"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b84100/Z.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b84100/Z.js",
"package b84100;\n" +
"public class Z {\n" +
" X x;\n" +
@@ -2233,7 +2233,7 @@ public void testBug84100e() throws CoreException {
public void testBug84121() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b84121/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b84121/Test.js",
"package b84121;\n" +
"public class Test {\n" +
" void foo(Test... t) {}\n" +
@@ -2258,7 +2258,7 @@ public void testBug84121() throws CoreException {
private void setUpBug84724() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[2];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b84724/X.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b84724/X.js",
"package b84724;\n" +
"public class X {\n" +
" X(String s) {}\n" +
@@ -2267,7 +2267,7 @@ private void setUpBug84724() throws CoreException {
" X(String s, int x, String... v) {}\n" +
"}\n"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b84724/Z.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b84724/Z.js",
"package b84724;\n" +
"public class Z {\n" +
" void foo() {\n" +
@@ -2327,14 +2327,14 @@ public void testBug84724d() throws CoreException {
private void setUpBug84727() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[3];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b84727/A.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b84727/A.js",
"package b84727;\n" +
"public interface A {\n" +
" Set<Set<Exception>> getXYZ(List<Set<Exception>> arg);\n" +
" void getXYZ(String s);\n" +
"}\n"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b84727/X.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b84727/X.js",
"package b84727;\n" +
"public class X {\n" +
" A a;\n" +
@@ -2344,7 +2344,7 @@ private void setUpBug84727() throws CoreException {
" }\n" +
"}\n"
);
- workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b84727/List.java",
+ workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b84727/List.js",
"package b84727;\n" +
"public interface List<E> {}\n" +
"interface Set<E> {}\n" +
@@ -2379,7 +2379,7 @@ public void testBug84727b() throws CoreException {
public void testBug85810() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b85810/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b85810/Test.js",
"package b85810;\n" +
"public class Test<E> implements In<Test<E>> {\n" +
" E e;\n" +
@@ -2401,15 +2401,15 @@ public void testBug85810() throws CoreException {
public void testBug86596() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[3];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b86596/aa/link/A.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b86596/aa/link/A.js",
"package b86596.aa.link;\n" +
"public interface A {}\n"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b86596/bb/Link.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b86596/bb/Link.js",
"package b86596.bb;\n" +
"public class Link{}\n"
);
- workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b86596/cc/X.java",
+ workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b86596/cc/X.js",
"package b86596.cc;\n" +
"import b86596.aa.link.A;\n" +
"import b86596.bb.Link;\n" +
@@ -2432,14 +2432,14 @@ public void testBug86596() throws CoreException {
public void testBug86642() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[2];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b86642/A.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b86642/A.js",
"package b86642;\n" +
"class A {\n" +
" public void m() {}\n" +
" protected void f(A a){}\n" +
"}\n"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b86642/B.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b86642/B.js",
"package b86642;\n" +
"public class B extends A{\n" +
" protected void f(A a){\n" +
@@ -2476,14 +2476,14 @@ public void testBug86293() throws CoreException {
private void setUpBug86380() throws CoreException {
resultCollector.showInsideDoc = true;
workingCopies = new ICompilationUnit[2];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b86380/package-info.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b86380/package-info.js",
"/**\n" +
" * @see Annot#field\n" +
" */\n" +
"@Annot(value=11)\n" +
"package b86380;\n"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b86380/Test.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b86380/Test.js",
"package b86380;\n" +
"@Annot(12) public class Test {\n" +
" public int field = Annot.field;\n" +
@@ -2494,7 +2494,7 @@ private void setUpBug86380() throws CoreException {
public void testBug86380_Type() throws CoreException {
resultCollector.showInsideDoc = true;
setUpBug86380();
- ICompilationUnit unit = getCompilationUnit("JavaSearchBugs", "src", "b86380", "Annot.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearchBugs", "src", "b86380", "Annot.js");
IType type = unit.getType("Annot");
search(type, REFERENCES);
assertSearchResults(
@@ -2507,7 +2507,7 @@ public void testBug86380_Type() throws CoreException {
public void testBug86380_Method() throws CoreException {
resultCollector.showInsideDoc = true;
setUpBug86380();
- ICompilationUnit unit = getCompilationUnit("JavaSearchBugs", "src", "b86380", "Annot.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearchBugs", "src", "b86380", "Annot.js");
IMethod[] methods = unit.getType("Annot").getMethods();
assertEquals("Invalid number of methods", 1, methods.length);
search(methods[0], REFERENCES);
@@ -2519,7 +2519,7 @@ public void testBug86380_Method() throws CoreException {
public void testBug86380_Field() throws CoreException {
resultCollector.showInsideDoc = true;
setUpBug86380();
- ICompilationUnit unit = getCompilationUnit("JavaSearchBugs", "src", "b86380", "Annot.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearchBugs", "src", "b86380", "Annot.js");
IField[] fields = unit.getType("Annot").getFields();
assertEquals("Invalid number of fields", 1, fields.length);
search(fields[0], REFERENCES);
@@ -2536,7 +2536,7 @@ public void testBug86380_Field() throws CoreException {
public void testBug88174() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[2];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b88174/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b88174/Test.js",
"package b88174;\n" +
"public enum Test {\n" +
" a {\n" +
@@ -2547,7 +2547,7 @@ public void testBug88174() throws CoreException {
" abstract int getTheValue();\n" +
"}\n"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b88174/X.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b88174/X.js",
"package b88174;\n" +
"public class X {\n" +
" X x = new X() {\n" +
@@ -2590,7 +2590,7 @@ public void testBug87627() throws CoreException {
*/
public void testBug88300() throws CoreException {
workingCopies = new ICompilationUnit[3];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b88300/SubClass.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b88300/SubClass.js",
"package b88300;\n" +
"public class SubClass extends SuperClass {\n" +
" private void aMethod(String x) {\n" +
@@ -2599,14 +2599,14 @@ public void testBug88300() throws CoreException {
" }\n" +
"}\n"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b88300/SuperClass.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b88300/SuperClass.js",
"package b88300;\n" +
"public class SuperClass {\n" +
" public void aMethod(Object x) {\n" +
" }\n" +
"}\n"
);
- workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b88300/User.java",
+ workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b88300/User.js",
"package b88300;\n" +
"public class User {\n" +
" public void methodUsingSubClassMethod() {\n" +
@@ -2623,7 +2623,7 @@ public void testBug88300() throws CoreException {
}
public void testBug88300b() throws CoreException {
workingCopies = new ICompilationUnit[3];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b88300/SubClass.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b88300/SubClass.js",
"package b88300;\n" +
"public class SubClass extends SuperClass {\n" +
" public void aMethod(Object x) {\n" +
@@ -2632,14 +2632,14 @@ public void testBug88300b() throws CoreException {
" }\n" +
"}\n"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b88300/SuperClass.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b88300/SuperClass.js",
"package b88300;\n" +
"public class SuperClass {\n" +
" public void aMethod(Object x) {\n" +
" }\n" +
"}\n"
);
- workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b88300/User.java",
+ workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b88300/User.js",
"package b88300;\n" +
"public class User {\n" +
" public void methodUsingSubClassMethod() {\n" +
@@ -2656,7 +2656,7 @@ public void testBug88300b() throws CoreException {
}
public void testBug88300c() throws CoreException {
workingCopies = new ICompilationUnit[3];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b88300/not/fixed/ConditionalFlowInfo.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b88300/not/fixed/ConditionalFlowInfo.js",
"package b88300.not.fixed;\n" +
"public class ConditionalFlowInfo extends FlowInfo {\n" +
" public FlowInfo info;\n" +
@@ -2671,7 +2671,7 @@ public void testBug88300c() throws CoreException {
" }\n" +
"}\n"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b88300/not/fixed/FlowInfo.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b88300/not/fixed/FlowInfo.js",
"package b88300.not.fixed;\n" +
"\n" +
"class FieldBinding {\n" +
@@ -2684,7 +2684,7 @@ public void testBug88300c() throws CoreException {
" abstract public void markAsDefinitelyNull(FieldBinding field);\n" +
"}\n"
);
- workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b88300/not/fixed/UnconditionalFlowInfo.java",
+ workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b88300/not/fixed/UnconditionalFlowInfo.js",
"package b88300.not.fixed;\n" +
"public class UnconditionalFlowInfo extends FlowInfo {\n" +
" final private void markAsDefinitelyNull(int position) {}\n" +
@@ -2709,7 +2709,7 @@ public void testBug88300c() throws CoreException {
*/
public void testBug89686() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b89686/A.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b89686/A.js",
"package b89686;\n" +
"public enum Color {\n" +
" RED, GREEN(), BLUE(17), PINK((1+(1+1))) {/*anon*/};\n" +
@@ -2727,7 +2727,7 @@ public void testBug89686() throws CoreException {
}
public void testBug89686b() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b89686/A.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b89686/A.js",
"package b89686;\n" +
"public enum Color {\n" +
" RED, GREEN(), BLUE(17), PINK((1+(1+1))) {/*anon*/};\n" +
@@ -2764,19 +2764,19 @@ public void testBug89848() throws CoreException {
*/
public void testBug90779() throws CoreException {
workingCopies = new ICompilationUnit[3];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b90779/A.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b90779/A.js",
"package b90779;\n" +
"public class A {\n" +
" public A() {}\n" +
"}\n"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b90779/B.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b90779/B.js",
"package b90779;\n" +
"public class B {\n" +
" public B() {}\n" +
"}\n"
);
- workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b90779/C.java",
+ workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b90779/C.js",
"package b90779;\n" +
"public class C {\n" +
" public C() {}\n" +
@@ -2797,7 +2797,7 @@ public void testBug90779() throws CoreException {
*/
public void testBug90915() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b90915/X.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b90915/X.js",
"package b90915;\n" +
"import g5.m.def.Single;\n" +
"public class X<T> {\n" +
@@ -2829,7 +2829,7 @@ public void testBug90915() throws CoreException {
*/
public void testBug91542() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b91542/A.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b91542/A.js",
"package b91542;\n" +
"\n" +
"class A<T> {\n" +
@@ -2856,7 +2856,7 @@ public void testBug91542() throws CoreException {
*/
public void testBug91078() throws CoreException {
workingCopies = new ICompilationUnit[3];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b91078/test/Example.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b91078/test/Example.js",
"package b91078.test;\n" +
"import b91078.util.HashMap;\n" +
"import b91078.util.Map;\n" +
@@ -2874,13 +2874,13 @@ public void testBug91078() throws CoreException {
" }\n" +
"}\n"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b91078/util/HashMap.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b91078/util/HashMap.js",
"package b91078.util;\n" +
"public class HashMap implements Map {\n" +
" public Entry entry;\n" +
"}\n"
);
- workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b91078/util/Map.java",
+ workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b91078/util/Map.js",
"package b91078.util;\n" +
"public interface Map {\n" +
" class Entry{}\n" +
@@ -3007,7 +3007,7 @@ public void testBug92264d() throws CoreException {
private void setUpBug92944() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b92944/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b92944/Test.js",
"package b92944;\n" +
"interface B92944_I {}\n" +
"enum B92944_E {}\n" +
@@ -3176,7 +3176,7 @@ public void testBug93392() throws CoreException {
TestCollector collector = new TestCollector();
collector.showAccuracy = true;
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b93392/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b93392/Test.js",
"package b93392;\n" +
"@interface Annot {\n" +
" int value();\n" +
@@ -3222,7 +3222,7 @@ public void testBug93392() throws CoreException {
*/
public void testBug94160() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b94160/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b94160/Test.js",
"package b94160;\n" +
"public class Test {\n" +
" <T> List<T> generateList(Class<T> clazz) {\n" +
@@ -3252,7 +3252,7 @@ public void testBug94160() throws CoreException {
*/
public void testBug94389() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b94389/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b94389/Test.js",
"package b94389;\n" +
"public class Test {\n" +
" public void foo() {}\n" +
@@ -3294,13 +3294,13 @@ public void testBug94389() throws CoreException {
*/
public void testBug94718() throws CoreException {
workingCopies = new ICompilationUnit[2];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b94718/SetUp.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b94718/SetUp.js",
"package b94718;\n" +
"public @interface SetUp {\n" +
" String value() {}\n" +
"}\n"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b94718/Test.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b94718/Test.js",
"package b94718;\n" +
"@SetUp(\"howdy\")\n" +
"public class Test {\n" +
@@ -3367,7 +3367,7 @@ public void testBug95152_jar04() throws CoreException {
}
public void testBug95152_wc01() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b95152/T.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b95152/T.js",
"package b95152;\n" +
"public class T {\n" +
" T2 c2;\n" +
@@ -3398,7 +3398,7 @@ public void testBug95152_wc01() throws CoreException {
}
public void testBug95152_wc02() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b95152/T.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b95152/T.js",
"package b95152;\n" +
"public class T {\n" +
" T2 c2;\n" +
@@ -3429,7 +3429,7 @@ public void testBug95152_wc02() throws CoreException {
}
public void testBug95152_wc03() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b95152/T.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b95152/T.js",
"package b95152;\n" +
"public class T {\n" +
" T2 c2;\n" +
@@ -3460,7 +3460,7 @@ public void testBug95152_wc03() throws CoreException {
}
public void testBug95152_wc04() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b95152/T.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b95152/T.js",
"package b95152;\n" +
"public class T {\n" +
" T2 c2;\n" +
@@ -3495,7 +3495,7 @@ public void testBug95152_wc04() throws CoreException {
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=95794"
*/
public void testBug95794() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearchBugs", "src", "b95794", "Test.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearchBugs", "src", "b95794", "Test.js");
IType type = unit.getType("Test");
// Verify matches
@@ -3517,7 +3517,7 @@ public void testBug95794() throws CoreException {
}
public void testBug95794b() throws CoreException {
resultCollector.showRule = true;
- ICompilationUnit unit = getCompilationUnit("JavaSearchBugs", "src", "b95794", "Test.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearchBugs", "src", "b95794", "Test.js");
IType type = unit.getType("Test").getType("Color");
// Verify matches
@@ -3539,7 +3539,7 @@ public void testBug95794b() throws CoreException {
}
public void testBug95794c() throws CoreException {
resultCollector.showRule = true;
- ICompilationUnit unit = getCompilationUnit("JavaSearchBugs", "src", "b95794", "Test.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearchBugs", "src", "b95794", "Test.js");
IField field = unit.getType("Test").getType("Color").getField("WHITE");
// Verify matches
@@ -3565,7 +3565,7 @@ public void testBug95794c() throws CoreException {
*/
public void testBug96761() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b96761/Generic.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b96761/Generic.js",
"package b96761;\n" +
"public class Generic<G> {\n" +
" void take(G g) {\n" +
@@ -3590,7 +3590,7 @@ public void testBug96761() throws CoreException {
*/
public void testBug96763() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b96763/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b96763/Test.js",
"package b96763;\n" +
"class Test<T> {\n" +
" public void first(Exception num) {}\n" +
@@ -3610,7 +3610,7 @@ public void testBug96763() throws CoreException {
}
public void testBug96763b() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b96763/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b96763/Test.js",
"package b96763;\n" +
"class Test<T> {\n" +
" public void first(Exception num) {}\n" +
@@ -3630,7 +3630,7 @@ public void testBug96763b() throws CoreException {
}
public void testBug96763c() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b96763/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b96763/Test.js",
"package b96763;\n" +
"public class Test<T> {\n" +
" void methodT(T t) {}\n" +
@@ -3654,7 +3654,7 @@ public void testBug96763c() throws CoreException {
public void testBug97087() throws CoreException {
workingCopies = new ICompilationUnit[1];
this.resultCollector.showRule = true;
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b97087/Bug.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b97087/Bug.js",
"package b97087;\n" +
"public class Bug<Type> {\n" +
" Bug(){}\n" +
@@ -3708,7 +3708,7 @@ public void testBug97120() throws CoreException {
*/
public void testBug97322() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b97322/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b97322/Test.js",
"package b97322;\n" +
"class Test {\n" +
" static void myMethod(int a, String b) {}\n" +
@@ -3729,13 +3729,13 @@ public void testBug97322() throws CoreException {
*/
public void testBug97547() throws CoreException {
workingCopies = new ICompilationUnit[2];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b97547/IX.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b97547/IX.js",
"package b97547;\n" +
"public interface IX {\n" +
" public interface IX1 {}\n" +
"}"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b97547/X.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b97547/X.js",
"package b97547;\n" +
"import b97547.IX.*;\n" +
"class X {\n" +
@@ -3756,11 +3756,11 @@ public void testBug97547() throws CoreException {
*/
public void testBug97606() throws CoreException {
workingCopies = new ICompilationUnit[4];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b97606/pack/def/L.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b97606/pack/def/L.js",
"package b97606.pack.def;\n" +
"public interface L<E> {}\n"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b97606/pack/def/LL.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b97606/pack/def/LL.js",
"package b97606.pack.def;\n" +
"public class LL<E> implements L<E> {\n" +
" public Object clone() {\n" +
@@ -3768,11 +3768,11 @@ public void testBug97606() throws CoreException {
" }\n" +
"}\n"
);
- workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b97606/pack/ref/K.java",
+ workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b97606/pack/ref/K.js",
"package b97606.pack.ref;\n" +
"public interface K {}\n"
);
- workingCopies[3] = getWorkingCopy("/JavaSearchBugs/src/b97606/pack/ref/X.java",
+ workingCopies[3] = getWorkingCopy("/JavaSearchBugs/src/b97606/pack/ref/X.js",
"package b97606.pack.ref;\n" +
"public class X implements K {\n" +
" private b97606.pack.def.LL sg;\n" +
@@ -3808,11 +3808,11 @@ public void testBug97606() throws CoreException {
}
public void testBug97606b() throws CoreException {
workingCopies = new ICompilationUnit[4];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b97606/pack/def/L.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b97606/pack/def/L.js",
"package b97606.pack.def;\n" +
"public interface L<E> {}\n"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b97606/pack/def/LL.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b97606/pack/def/LL.js",
"package b97606.pack.def;\n" +
"public class LL<E> implements L<E> {\n" +
" public Object clone() {\n" +
@@ -3820,11 +3820,11 @@ public void testBug97606b() throws CoreException {
" }\n" +
"}\n"
);
- workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b97606/pack/ref/K.java",
+ workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b97606/pack/ref/K.js",
"package b97606.pack.ref;\n" +
"public interface K {}\n"
);
- workingCopies[3] = getWorkingCopy("/JavaSearchBugs/src/b97606/pack/ref/X.java",
+ workingCopies[3] = getWorkingCopy("/JavaSearchBugs/src/b97606/pack/ref/X.js",
"package b97606.pack.ref;\n" +
"import b97606.pack.def.*;\n" +
"public class X implements K {\n" +
@@ -3866,7 +3866,7 @@ public void testBug97606b() throws CoreException {
*/
public void testBug97614() throws CoreException {
workingCopies = new ICompilationUnit[3];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b97614/W.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b97614/W.js",
"package b97614;\n" +
"public class W {\n" +
" private final Map<String, Y<?, ? extends b97614.X.XX<?, ?>, ? >> m1 = null; // (a)\n" +
@@ -3878,7 +3878,7 @@ public void testBug97614() throws CoreException {
" V get(Object k);\n" +
"}"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b97614/X.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b97614/X.js",
"package b97614;\n" +
"import java.io.Serializable;\n" +
"public interface X<T extends X<T, U, V>, \n" +
@@ -3892,7 +3892,7 @@ public void testBug97614() throws CoreException {
" }\n" +
"}"
);
- workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b97614/Y.java",
+ workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b97614/Y.js",
"package b97614;\n" +
"public class Y<T extends X<T, U, V>, U extends X.XX<T, V>, V extends X.XY> {\n" +
"}\n"
@@ -3910,7 +3910,7 @@ public void testBug97614() throws CoreException {
*/
public void testBug98378() throws CoreException {
workingCopies = new ICompilationUnit[2];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b98378/X.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b98378/X.js",
"package b98378;\n" +
"public class X implements java.lang.CharSequence {\n" +
" public int length() {\n" +
@@ -3918,7 +3918,7 @@ public void testBug98378() throws CoreException {
" }\n" +
"}"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b98378/Y.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b98378/Y.js",
"package b98378;\n" +
"public class Y {\n" +
" public int length() {\n" +
@@ -3937,7 +3937,7 @@ public void testBug98378() throws CoreException {
}
public void testBug98378b() throws CoreException {
workingCopies = new ICompilationUnit[2];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b98378/X.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b98378/X.js",
"package b98378;\n" +
"public class X implements java.lang.CharSequence {\n" +
" public int length() {\n" +
@@ -3945,7 +3945,7 @@ public void testBug98378b() throws CoreException {
" }\n" +
"}"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b98378/Y.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b98378/Y.js",
"package b98378;\n" +
"public class Y {\n" +
" public int length() {\n" +
@@ -3970,7 +3970,7 @@ public void testBug98378b() throws CoreException {
*/
public void testBug99600() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b99600/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b99600/Test.js",
"package b99600;\n" +
"public class Test {\n" +
" public class C1 {}\n" +
@@ -3997,19 +3997,19 @@ public void testBug99600() throws CoreException {
*/
public void testBug99903_annotation() throws CoreException {
workingCopies = new ICompilationUnit[3];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b99903/package-info.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b99903/package-info.js",
"/**\n" +
" * @see Test\n" +
" */\n" +
"@Annot\n" +
"package b99903;\n"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b99903/Test.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b99903/Test.js",
"package b99903;\n" +
"public class Test {\n" +
"}\n"
);
- workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b99903/Annot.java",
+ workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b99903/Annot.js",
"package b99903;\n" +
"public @interface Annot {\n" +
"}\n"
@@ -4022,19 +4022,19 @@ public void testBug99903_annotation() throws CoreException {
}
public void testBug99903_javadoc() throws CoreException {
workingCopies = new ICompilationUnit[3];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b99903/package-info.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b99903/package-info.js",
"/**\n" +
" * @see Test\n" +
" */\n" +
"@Annot\n" +
"package b99903;\n"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b99903/Test.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b99903/Test.js",
"package b99903;\n" +
"public class Test {\n" +
"}\n"
);
- workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b99903/Annot.java",
+ workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b99903/Annot.js",
"package b99903;\n" +
"public @interface Annot {\n" +
"}\n"
@@ -4053,7 +4053,7 @@ public void testBug99903_javadoc() throws CoreException {
*/
public void testBug100695() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b100695/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b100695/Test.js",
"package b100695;\n" +
"public class Test {\n" +
" Class<Class>[] foo;\n" +
@@ -4072,7 +4072,7 @@ public void testBug100695() throws CoreException {
}
public void testBug100695a() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b100695/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b100695/Test.js",
"package b100695;\n" +
"public class Test {\n" +
" Class<Class>[] foo;\n" +
@@ -4092,7 +4092,7 @@ public void testBug100695a() throws CoreException {
}
public void testBug100695b() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b100695/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b100695/Test.js",
"package b100695;\n" +
"public class Test {\n" +
" Class<Class> foo;\n" +
@@ -4112,7 +4112,7 @@ public void testBug100695b() throws CoreException {
}
public void testBug100695c() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b100695/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b100695/Test.js",
"package b100695;\n" +
"public class Test {\n" +
" Class[] foo;\n" +
@@ -4132,7 +4132,7 @@ public void testBug100695c() throws CoreException {
}
public void testBug100695d() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b100695/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b100695/Test.js",
"package b100695;\n" +
"public class Test {\n" +
" public Class<Class>[] foo(Class<Class>[] a) {\n" +
@@ -4152,7 +4152,7 @@ public void testBug100695d() throws CoreException {
}
public void testBug100695e() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b100695/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b100695/Test.js",
"package b100695;\n" +
"public class Test {\n" +
" public Class<Class> foo(Class<Class> a) {\n" +
@@ -4172,7 +4172,7 @@ public void testBug100695e() throws CoreException {
}
public void testBug100695f() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b100695/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b100695/Test.js",
"package b100695;\n" +
"public class Test {\n" +
" public Class[] foo(Class[] a) {\n" +
@@ -4197,7 +4197,7 @@ public void testBug100695f() throws CoreException {
*/
private void setUpBug100772_HierarchyScope_ClassAndSubclass() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b100772/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b100772/Test.js",
"package b100772;\n" +
"class Test<T> {\n" +
" public void foo(T t) {}\n" +
@@ -4259,7 +4259,7 @@ public void testBug100772_HierarchyScope_ClassAndSubclass05() throws CoreExcepti
}
private void setUpBug100772_HierarchyScope_InterfacesAndClass() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b100772/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b100772/Test.js",
"package b100772;\n" +
"interface Test<T> {\n" +
" public void foo(T t);\n" +
@@ -4358,7 +4358,7 @@ public void testBug100772_HierarchyScope_InterfacesAndClass08() throws CoreExcep
}
private void setUpBug100772_HierarchyScope_Complex() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b100772/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b100772/Test.js",
"package b100772;\n" +
"public class X<T> implements IX<T> {\n" +
" public void foo(T t) {}\n" +
@@ -4431,14 +4431,14 @@ public void testBug100772_HierarchyScope_Complex04() throws CoreException {
}
private void setUpBug100772_ProjectScope_ClassAndSubclass() throws CoreException {
workingCopies = new ICompilationUnit[2];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b100772/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b100772/Test.js",
"package b100772;\n" +
"class Test<T> {\n" +
" public void foo(T t) {}\n" +
" public void foo(Class c) {}\n" +
"}\n"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b100772/Sub.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b100772/Sub.js",
"package b100772;\n" +
"class Sub extends Test<String> {\n" +
" public void foo(String str) {}\n" +
@@ -4496,21 +4496,21 @@ public void testBug100772_ProjectScope_ClassAndSubclass05() throws CoreException
}
private void setUpBug100772_ProjectScope_InterfacesAndClass() throws CoreException {
workingCopies = new ICompilationUnit[3];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b100772/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b100772/Test.js",
"package b100772;\n" +
"interface Test<T> {\n" +
" public void foo(T t);\n" +
" public void foo(Class c);\n" +
"}\n"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b100772/Sub.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b100772/Sub.js",
"package b100772;\n" +
"interface Sub extends Test<String> {\n" +
" public void foo(String str);\n" +
" public void foo(Exception e);\n" +
"}\n"
);
- workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b100772/X.java",
+ workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b100772/X.js",
"package b100772;\n" +
"class X implements Test<String> {\n" +
" public void foo(String str) {}\n" +
@@ -4605,39 +4605,39 @@ public void testBug100772_ProjectScope_InterfacesAndClass08() throws CoreExcepti
}
private void setUpBug100772_ProjectScope_Complex() throws CoreException {
workingCopies = new ICompilationUnit[6];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b100772/X.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b100772/X.js",
"package b100772;\n" +
"public class X<T> implements IX<T> {\n" +
" public void foo(T t) {}\n" +
"}\n"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b100772/XX.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b100772/XX.js",
"package b100772;\n" +
"class XX extends X<String> {\n" +
" public void foo(String s) {}\n" +
" public void foo(Exception e) {}\n" +
"}\n"
);
- workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b100772/IX.java",
+ workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b100772/IX.js",
"package b100772;\n" +
"interface IX<U> {\n" +
" public void foo(U u);\n" +
"}\n"
);
- workingCopies[3] = getWorkingCopy("/JavaSearchBugs/src/b100772/Y.java",
+ workingCopies[3] = getWorkingCopy("/JavaSearchBugs/src/b100772/Y.js",
"package b100772;\n" +
"class Y implements IX<String> {\n" +
" public void foo(String s) {}\n" +
" public void foo(Exception e) {}\n" +
"}\n"
);
- workingCopies[4] = getWorkingCopy("/JavaSearchBugs/src/b100772/IXX.java",
+ workingCopies[4] = getWorkingCopy("/JavaSearchBugs/src/b100772/IXX.js",
"package b100772;\n" +
"interface IXX<V extends Exception> {\n" +
" public void foo(V v);\n" +
"}\n"
);
- workingCopies[5] = getWorkingCopy("/JavaSearchBugs/src/b100772/Z.java",
+ workingCopies[5] = getWorkingCopy("/JavaSearchBugs/src/b100772/Z.js",
"package b100772;\n" +
"class Z extends Y implements IXX<Exception> {\n" +
" public void foo(String s) {}\n" +
@@ -4699,7 +4699,7 @@ public void testBug100772_ProjectScope_Complex04() throws CoreException {
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=108088"
*/
public void testBug108088() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearchBugs", "src", "b108088", "Test108088.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearchBugs", "src", "b108088", "Test108088.js");
IType type = unit.getType("A108088");
IMethod method = type.getMethod("subroutine", new String[] { "F" });
SearchPattern pattern = SearchPattern.createPattern(method, REFERENCES, EXACT_RULE);
@@ -4720,27 +4720,27 @@ public void testBug108088() throws CoreException {
// Types search
private void setUpBug110060_TypePattern() throws CoreException {
workingCopies = new ICompilationUnit[5];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b110060/AA.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b110060/AA.js",
"package b110060;\n" +
"public class AA {\n" +
"}\n"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b110060/AAxx.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b110060/AAxx.js",
"package b110060;\n" +
"public class AAxx {\n" +
"}\n"
);
- workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b110060/AxxAyy.java",
+ workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b110060/AxxAyy.js",
"package b110060;\n" +
"public class AxxAyy {\n" +
"}\n"
);
- workingCopies[3] = getWorkingCopy("/JavaSearchBugs/src/b110060/AxA.java",
+ workingCopies[3] = getWorkingCopy("/JavaSearchBugs/src/b110060/AxA.js",
"package b110060;\n" +
"public class AxA {\n" +
"}\n"
);
- workingCopies[4] = getWorkingCopy("/JavaSearchBugs/src/b110060/Test.java",
+ workingCopies[4] = getWorkingCopy("/JavaSearchBugs/src/b110060/Test.js",
"package b110060;\n" +
"public class Test {\n" +
" AA aa;\n" +
@@ -5177,31 +5177,31 @@ public void testBug110060_AllTypeNames14() throws CoreException {
// Constructor search
private void setUpBug110060_ConstructorPattern() throws CoreException {
workingCopies = new ICompilationUnit[5];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b110060/AA.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b110060/AA.js",
"package b110060;\n" +
"public class AA {\n" +
" AA() {}\n" +
"}\n"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b110060/AAxx.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b110060/AAxx.js",
"package b110060;\n" +
"public class AAxx {\n" +
" AAxx() {}\n" +
"}\n"
);
- workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b110060/AxxAyy.java",
+ workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b110060/AxxAyy.js",
"package b110060;\n" +
"public class AxxAyy {\n" +
" AxxAyy() {}\n" +
"}\n"
);
- workingCopies[3] = getWorkingCopy("/JavaSearchBugs/src/b110060/AxA.java",
+ workingCopies[3] = getWorkingCopy("/JavaSearchBugs/src/b110060/AxA.js",
"package b110060;\n" +
"public class AxA {\n" +
" AxA() {}\n" +
"}\n"
);
- workingCopies[4] = getWorkingCopy("/JavaSearchBugs/src/b110060/Test.java",
+ workingCopies[4] = getWorkingCopy("/JavaSearchBugs/src/b110060/Test.js",
"package b110060;\n" +
"public class Test {\n" +
" AA aa = new AA();\n" +
@@ -5284,7 +5284,7 @@ public void testBug110060_ConstructorPattern06() throws CoreException {
// Methods search
private void setUpBug110060_MethodPattern() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b110060/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b110060/Test.js",
"package b110060;\n" +
"public class Test {\n" +
" void aMethodWithNothingSpecial() {}\n" +
@@ -5401,7 +5401,7 @@ public void testBug110060_MethodPattern09() throws CoreException {
// Fields search
private void setUpBug110060_FieldPattern() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b110060/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b110060/Test.js",
"package b110060;\n" +
"public class Test {\n" +
" Object aFieldWithNothingSpecial;\n" +
@@ -5470,7 +5470,7 @@ public void testBug110060_FieldPattern05() throws CoreException {
*/
public void testBug110291() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b110291/Test110291XX.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b110291/Test110291XX.js",
"package b110291;\n" +
"public class Test110291XX {\n" +
" class Test110291YY {}" +
@@ -5488,7 +5488,7 @@ public void testBug110291() throws CoreException {
*/
public void testBug110336a() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b110336/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b110336/Test.js",
"package b110336;\n" +
"public class Test {\n" +
" <TP extends Test> void method(Class<Test> clazz) {\n" +
@@ -5513,7 +5513,7 @@ public void testBug110336a() throws CoreException {
}
public void testBug110336b() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b110336/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b110336/Test.js",
"package b110336;\n" +
"public class Test {\n" +
" void method1(Test methodParam) {\n" +
@@ -5542,7 +5542,7 @@ public void testBug110336b() throws CoreException {
}
public void testBug110336c() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b110336/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b110336/Test.js",
"package b110336;\n" +
"public class Test<TP extends X> {\n" +
" X x;\n" +
@@ -5561,7 +5561,7 @@ public void testBug110336c() throws CoreException {
}
public void testBug110336d() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b110336/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b110336/Test.js",
"package b110336;\n" +
"public class Test {\n" +
" Test a1Test = null, b1Test = new Test(), c1Test;\n" +
@@ -5584,7 +5584,7 @@ public void testBug110336d() throws CoreException {
}
public void testBug110336e() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b110336/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b110336/Test.js",
"package b110336;\n" +
"public class Test {\n" +
" void foo() {\n" +
@@ -5609,7 +5609,7 @@ public void testBug110336e() throws CoreException {
}
public void testBug110336f() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b110336/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b110336/Test.js",
"package b110336;\n" +
"public class Test extends Exception {\n" +
" void foo(Test test1) { // <- no local element\n" +
@@ -5638,7 +5638,7 @@ public void testBug110336f() throws CoreException {
}
public void testBug110336g() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b110336/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b110336/Test.js",
"package b110336;\n" +
"public class Test {\n" +
" {\n" +
@@ -5663,7 +5663,7 @@ public void testBug110336g() throws CoreException {
}
public void testBug110336h() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b110336/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b110336/Test.js",
"package b110336;\n" +
"public class Test {\n" +
" static {\n" +
@@ -5745,13 +5745,13 @@ public void testBug113671() throws CoreException {
*/
public void testBug114539() throws CoreException {
workingCopies = new ICompilationUnit[2];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b114539/Foo.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b114539/Foo.js",
"package b114539;\n" +
"public class Foo {\n" +
" int bar=Bar.FOO;\n" +
"}\n"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b114539/Bar.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b114539/Bar.js",
"package b114539;\n" +
"public class Bar {\n" +
" private static final int FOO=0;\n" +
@@ -5770,7 +5770,7 @@ public void testBug114539() throws CoreException {
*/
public void testBug116459() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/p1/X.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/p1/X.js",
"package p1;\n" +
"class X<T> {\n" +
" X<T> gen;\n" +
@@ -5794,7 +5794,7 @@ public void testBug116459() throws CoreException {
*/
public void testBug119545() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b119545/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b119545/Test.js",
"package b119545;\n" +
"class Test {\n" +
" void foo(Object o1, Object o2){\n" +
@@ -5816,13 +5816,13 @@ public void testBug119545() throws CoreException {
*/
public void testBug120816a() throws CoreException {
workingCopies = new ICompilationUnit[2];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b120816/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b120816/Test.js",
"package b120816;\n" +
"public class Test<E> {\n" +
" String foo(E e) { return \"\"; }\n" +
"}\n"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b120816/Sub.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b120816/Sub.js",
"package b120816;\n" +
"public class Sub extends Test<Exception> {\n" +
" String foo(RuntimeException e) { return \"\"; }\n" +
@@ -5838,7 +5838,7 @@ public void testBug120816a() throws CoreException {
}
public void testBug120816b() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b120816/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b120816/Test.js",
"package b120816;\n" +
"public class Test<E> {\n" +
" String foo(E e) { return \"\"; }\n" +
@@ -5862,15 +5862,15 @@ public void testBug120816b() throws CoreException {
*/
private void setUpBug122442a() throws CoreException {
workingCopies = new ICompilationUnit[3];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b122442/I.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b122442/I.js",
"package b122442;\n" +
"public interface I {}\n"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b122442/II.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b122442/II.js",
"package b122442;\n" +
"public interface II extends I {}\n"
);
- workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b122442/X.java",
+ workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b122442/X.js",
"package b122442;\n" +
"public class X implements I {}\n"
);
@@ -5899,7 +5899,7 @@ public void testBug122442c() throws CoreException {
}
private void setUpBug122442d() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b122442/User.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b122442/User.js",
"class Klass {}\n" +
"interface Interface {}\n" +
"class User {\n" +
@@ -5973,7 +5973,7 @@ public void testBug123679() throws CoreException {
);
}
public void testBug123679_cu() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearchBugs", "src", "b123679.pack", "I123679.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearchBugs", "src", "b123679.pack", "I123679.js");
IType type = unit.getType("I123679");
search(type, REFERENCES);
assertSearchResults(
@@ -5987,12 +5987,12 @@ public void testBug123679_cu() throws CoreException {
}
public void testBug123679_wc() throws CoreException {
workingCopies = new ICompilationUnit[2];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/pack/I122679.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/pack/I122679.js",
"package pack;\n" +
"public interface I123679 {\n" +
"}\n"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/test/Test.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/test/Test.js",
"package test;\n" +
"import pack.I123679;\n" +
"public class Test {\n" +
@@ -6219,10 +6219,10 @@ public void testBug124469n() throws CoreException {
*/
public void testBug124489() throws CoreException {
workingCopies = new ICompilationUnit[2];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Foo.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Foo.js",
"public class Foo<T> {}"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/Bar.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/Bar.js",
"public class Bar {\n" +
" Foo<String> f = new Foo<String>();\n" +
" Foo f2 = new Foo();\n" +
@@ -6300,7 +6300,7 @@ public void testBug125178() throws CoreException {
// Need a working copy as anonymous are not indexed...
ProblemRequestor problemRequestor = new ProblemRequestor();
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b125178/X.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b125178/X.js",
"package b125178;\n" +
"import pack.age.Test;\n" +
"public class X {\n" +
@@ -6418,22 +6418,22 @@ public void testBug128877c() throws CoreException {
*/
private void setUpBug130390() throws CoreException {
workingCopies = new ICompilationUnit[4];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b130390/TZ.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b130390/TZ.js",
"package b130390;\n" +
"public class TZ {\n" +
"}\n"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b130390/TimeZone.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b130390/TimeZone.js",
"package b130390;\n" +
"public class TimeZone{\n" +
"}\n"
);
- workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b130390/Npe.java",
+ workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b130390/Npe.js",
"package b130390;\n" +
"public class Npe {\n" +
"}\n"
);
- workingCopies[3] = getWorkingCopy("/JavaSearchBugs/src/b130390/NullPointerException.java",
+ workingCopies[3] = getWorkingCopy("/JavaSearchBugs/src/b130390/NullPointerException.js",
"package b130390;\n" +
"public class NullPointerException {\n" +
"}\n"
@@ -6760,7 +6760,7 @@ public void testBug137984_jar() throws CoreException {
);
}
public void testBug137984_cu() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearchBugs", "src", "b137984", "C.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearchBugs", "src", "b137984", "C.js");
IField field = unit.getType("C").getField("c3");
search(field, REFERENCES);
assertSearchResults(
@@ -6769,7 +6769,7 @@ public void testBug137984_cu() throws CoreException {
}
public void testBug137984_wc() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/CW.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/CW.js",
"public class CW {\n" +
" CW2 c2;\n" +
" CW2.CW3 c3;\n" +
@@ -6812,7 +6812,7 @@ public void testBug140156() throws CoreException {
*/
public void testBug144044() throws CoreException {
workingCopies = new ICompilationUnit[2];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/test1/p/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/test1/p/Test.js",
"package test1.p;\n" +
"import test1.q.X;\n" +
"public class Test {\n" +
@@ -6821,7 +6821,7 @@ public void testBug144044() throws CoreException {
" }\n" +
"}\n"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/test1/q/X.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/test1/q/X.js",
"package test1.q;\n" +
"public class X {\n" +
" String str;\n" +
@@ -6836,7 +6836,7 @@ public void testBug144044() throws CoreException {
}
public void testBug144044b() throws CoreException {
workingCopies = new ICompilationUnit[4];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/test2/p/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/test2/p/Test.js",
"package test2.p;\n" +
"import test2.q.X;\n" +
"public class Test {\n" +
@@ -6845,19 +6845,19 @@ public void testBug144044b() throws CoreException {
" }\n" +
"}\n"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/test2/q/X.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/test2/q/X.js",
"package test2.q;\n" +
"public class X {\n" +
" public static Y y_field;\n" +
"}\n"
);
- workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/test2/q/Y.java",
+ workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/test2/q/Y.js",
"package test2.q;\n" +
"public class Y {\n" +
" public static Z z_field;\n" +
"}\n"
);
- workingCopies[3] = getWorkingCopy("/JavaSearchBugs/src/test2/q/Z.java",
+ workingCopies[3] = getWorkingCopy("/JavaSearchBugs/src/test2/q/Z.js",
"package test2.q;\n" +
"public class Z {\n" +
" static X x_field;\n" +
@@ -6932,19 +6932,19 @@ public void testBug148215_Fields() throws CoreException {
public void testBug148380_SearchAllTypes_wc() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[4];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b148380/I.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b148380/I.js",
"package b148380;\n" +
"public interface I {}\n"
);
- workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b148380/X.java",
+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b148380/X.js",
"package b148380;\n" +
"public class X {}\n"
);
- workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b148380/Sub.java",
+ workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b148380/Sub.js",
"package b148380;\n" +
"public class Sub extends X {}\n"
);
- workingCopies[3] = getWorkingCopy("/JavaSearchBugs/src/b148380/Y.java",
+ workingCopies[3] = getWorkingCopy("/JavaSearchBugs/src/b148380/Y.js",
"package b148380;\n" +
"public class Y {}\n"
);
@@ -7057,7 +7057,7 @@ public void testBug156340() throws CoreException {
public void testBug156177() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b156177/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b156177/Test.js",
"package b156177;\n" +
"interface B156177_I {}\n" +
"enum B156177_E {}\n" +
@@ -7090,7 +7090,7 @@ public void testBug156177() throws CoreException {
public void testBug156491() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/pack/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/pack/Test.js",
"package pack;\n" +
"public class Test {\n" +
" void noMatch(Y y) {\n" +
@@ -7134,7 +7134,7 @@ public void testBug156491() throws CoreException {
}
private void setUpBug156491() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/other/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/other/Test.js",
"package other;\n" +
"public class Test {\n" +
" void testInterface(I i) {\n" +
@@ -7191,7 +7191,7 @@ public void testBug156491b() throws CoreException {
public void testBug160301() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Test.js",
"public class Test {\n" +
" class A {\n" +
" void foo() {}\n" +
@@ -7221,7 +7221,7 @@ public void testBug160301() throws CoreException {
public void testBug160301b() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/test/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" class A {\n" +
@@ -7257,7 +7257,7 @@ public void testBug160301b() throws CoreException {
public void testBug160301_Interface() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Test.js",
"public class Test {\n" +
" interface I {\n" +
" void foo();\n" +
@@ -7311,7 +7311,7 @@ public void testBug160301_Interface() throws CoreException {
public void testBug160301_Abstract() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Test.js",
"public class Test {\n" +
" abstract class Abstract {\n" +
" abstract void foo();\n" +
@@ -7358,7 +7358,7 @@ public void testBug160301_Abstract() throws CoreException {
public void testBug160301_Abstract2() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Test.js",
"public class Test {\n" +
" abstract class Abstract {\n" +
" public abstract void foo();\n" +
@@ -7393,7 +7393,7 @@ public void testBug160301_Abstract2() throws CoreException {
public void testBug160301_Abstract3() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Test.js",
"public class Test {\n" +
" abstract class Abstract {\n" +
" public abstract void foo();\n" +
@@ -7734,7 +7734,7 @@ public void testBug163984() throws CoreException {
*/
private void setUpBug164121() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/A.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/A.js",
"class A {\n" +
" int x(int param) {\n" +
" param = 2 + 2;\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchGenericConstructorTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchGenericConstructorTests.java
index c46d6dc..9b80486 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchGenericConstructorTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchGenericConstructorTests.java
@@ -88,7 +88,7 @@ public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGeneric
*/
// Search references to constructors defined in a single type parameter class
public void testConstructorReferencesElementPatternSingleTypeParameter01() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g5/c/def/Single.java").getType("Single");
+ IType type = getCompilationUnit("JavaSearch15/src/g5/c/def/Single.js").getType("Single");
// search reference to a standard constructor
IMethod method = type.getMethod("Single", new String[] { "QT;" });
IJavaSearchScope scope = getJavaSearchScope15();
@@ -101,7 +101,7 @@ public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGeneric
);
}
public void testConstructorReferencesElementPatternSingleTypeParameter02() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g5/c/def/Single.java").getType("Single");
+ IType type = getCompilationUnit("JavaSearch15/src/g5/c/def/Single.js").getType("Single");
// search reference to a generic constructor
IMethod method = type.getMethod("Single", new String[] { "QT;", "QU;" });
IJavaSearchScope scope = getJavaSearchScope15();
@@ -114,7 +114,7 @@ public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGeneric
);
}
public void testConstructorReferencesElementPatternSingleTypeParameter03() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g5/c/def/Single.java").getType("Single");
+ IType type = getCompilationUnit("JavaSearch15/src/g5/c/def/Single.js").getType("Single");
// search reference to a method with parameterized type arguments
IMethod method = type.getMethod("Single", new String[] { "QSingle<QT;>;" });
IJavaSearchScope scope = getJavaSearchScope15();
@@ -127,7 +127,7 @@ public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGeneric
);
}
public void testConstructorReferencesElementPatternSingleTypeParameter04() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g5/c/def/Single.java").getType("Single");
+ IType type = getCompilationUnit("JavaSearch15/src/g5/c/def/Single.js").getType("Single");
// search reference to a generic method returning a param type with param type parameters (=complete)
IMethod method = type.getMethod("Single", new String[] { "QU;", "QSingle<QT;>;" });
IJavaSearchScope scope = getJavaSearchScope15();
@@ -142,7 +142,7 @@ public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGeneric
// Search references to contructors defined in a multiple type parameters class
public void testConstructorReferencesElementPatternMultipleTypeParameter01() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g5/c/def/Multiple.java").getType("Multiple");
+ IType type = getCompilationUnit("JavaSearch15/src/g5/c/def/Multiple.js").getType("Multiple");
IMethod method = type.getMethod("Multiple", new String[] { "QT1;","QT2;","QT3;" });
IJavaSearchScope scope = getJavaSearchScope15();
search(method, REFERENCES, scope, resultCollector);
@@ -154,7 +154,7 @@ public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGeneric
);
}
public void testConstructorReferencesElementPatternMultipleTypeParameter02() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g5/c/def/Multiple.java").getType("Multiple");
+ IType type = getCompilationUnit("JavaSearch15/src/g5/c/def/Multiple.js").getType("Multiple");
IMethod method = type.getMethod("Multiple", new String[] { "QMultiple<QT1;QT2;QT3;>;", "QU1;","QU2;","QU3;" });
IJavaSearchScope scope = getJavaSearchScope15();
search(method, REFERENCES, scope, resultCollector);
@@ -166,7 +166,7 @@ public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGeneric
);
}
public void testConstructorReferencesElementPatternMultipleTypeParameter03() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g5/c/def/Multiple.java").getType("Multiple");
+ IType type = getCompilationUnit("JavaSearch15/src/g5/c/def/Multiple.js").getType("Multiple");
IMethod method = type.getMethod("Multiple", new String[] { "QMultiple<QT1;QT2;QT3;>;" });
IJavaSearchScope scope = getJavaSearchScope15();
search(method, REFERENCES, scope, resultCollector);
@@ -178,7 +178,7 @@ public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGeneric
);
}
public void testConstructorReferencesElementPatternMultipleTypeParameter04() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g5/c/def/Multiple.java").getType("Multiple");
+ IType type = getCompilationUnit("JavaSearch15/src/g5/c/def/Multiple.js").getType("Multiple");
IMethod method = type.getMethod("Multiple", new String[] { "QU1;","QU2;","QU3;", "QMultiple<QT1;QT2;QT3;>;" });
IJavaSearchScope scope = getJavaSearchScope15();
search(method, REFERENCES, scope, resultCollector);
@@ -192,7 +192,7 @@ public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGeneric
// Search references to single parameterized contructors
public void testConstructorReferencesElementPatternSingleParamArguments01() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefSingle.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefSingle.js");
IMethod method = selectMethod(unit, "Single", 9);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, REFERENCES, scope, resultCollector);
@@ -204,7 +204,7 @@ public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGeneric
);
}
public void testConstructorReferencesElementPatternSingleParamArguments02() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefSingle.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefSingle.js");
IMethod method = selectMethod(unit, "Single", 10);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, REFERENCES, scope, resultCollector);
@@ -216,7 +216,7 @@ public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGeneric
);
}
public void testConstructorReferencesElementPatternSingleParamArguments03() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefSingle.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefSingle.js");
IMethod method = selectMethod(unit, "Single", 11);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, REFERENCES, scope, resultCollector);
@@ -228,7 +228,7 @@ public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGeneric
);
}
public void testConstructorReferencesElementPatternSingleParamArguments04() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefSingle.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefSingle.js");
IMethod method = selectMethod(unit, "Single", 12);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, REFERENCES, scope, resultCollector);
@@ -240,7 +240,7 @@ public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGeneric
);
}
public void testConstructorReferencesElementPatternSingleParamArguments05() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefRaw.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefRaw.js");
IMethod method = selectMethod(unit, "Single", 5);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, REFERENCES, scope, resultCollector);
@@ -252,7 +252,7 @@ public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGeneric
);
}
public void testConstructorReferencesElementPatternSingleParamArguments06() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefRaw.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefRaw.js");
IMethod method = selectMethod(unit, "Single", 7);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, REFERENCES, scope, resultCollector);
@@ -266,7 +266,7 @@ public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGeneric
// Search references to multiple parameterized contructors
public void testConstructorReferencesElementPatternMultipleParamArguments01() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefMultiple.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefMultiple.js");
IMethod method = selectMethod(unit, "Multiple", 8);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, REFERENCES, scope, resultCollector);
@@ -278,7 +278,7 @@ public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGeneric
);
}
public void testConstructorReferencesElementPatternMultipleParamArguments02() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefMultiple.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefMultiple.js");
IMethod method = selectMethod(unit, "Multiple", 9);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, REFERENCES, scope, resultCollector);
@@ -290,7 +290,7 @@ public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGeneric
);
}
public void testConstructorReferencesElementPatternMultipleParamArguments03() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefMultiple.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefMultiple.js");
IMethod method = selectMethod(unit, "Multiple", 10);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, REFERENCES, scope, resultCollector);
@@ -302,7 +302,7 @@ public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGeneric
);
}
public void testConstructorReferencesElementPatternMultipleParamArguments04() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefMultiple.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefMultiple.js");
IMethod method = selectMethod(unit, "Multiple", 11);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, REFERENCES, scope, resultCollector);
@@ -314,7 +314,7 @@ public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGeneric
);
}
public void testConstructorReferencesElementPatternMultipleParamArguments05() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefRaw.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefRaw.js");
IMethod method = selectMethod(unit, "Multiple", 5);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, REFERENCES, scope, resultCollector);
@@ -326,7 +326,7 @@ public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGeneric
);
}
public void testConstructorReferencesElementPatternMultipleParamArguments06() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefRaw.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefRaw.js");
IMethod method = selectMethod(unit, "Multiple", 7);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, REFERENCES, scope, resultCollector);
@@ -674,7 +674,7 @@ public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGeneric
*/
// Search references to single parameterized contructors
public void testConstructorDeclarationsElementPatternSingleParamArguments01() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefSingle.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefSingle.js");
IMethod method = selectMethod(unit, "Single", 9);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, DECLARATIONS, scope, resultCollector);
@@ -683,7 +683,7 @@ public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGeneric
);
}
public void testConstructorDeclarationsElementPatternSingleParamArguments02() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefSingle.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefSingle.js");
IMethod method = selectMethod(unit, "Single", 10);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, DECLARATIONS, scope, resultCollector);
@@ -692,7 +692,7 @@ public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGeneric
);
}
public void testConstructorDeclarationsElementPatternSingleParamArguments03() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefSingle.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefSingle.js");
IMethod method = selectMethod(unit, "Single", 11);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, DECLARATIONS, scope, resultCollector);
@@ -701,7 +701,7 @@ public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGeneric
);
}
public void testConstructorDeclarationsElementPatternSingleParamArguments04() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefSingle.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefSingle.js");
IMethod method = selectMethod(unit, "Single", 12);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, DECLARATIONS, scope, resultCollector);
@@ -710,7 +710,7 @@ public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGeneric
);
}
public void testConstructorDeclarationssElementPatternSingleParamArguments05() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefRaw.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefRaw.js");
IMethod method = selectMethod(unit, "Single", 5);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, DECLARATIONS, scope, resultCollector);
@@ -719,7 +719,7 @@ public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGeneric
);
}
public void testConstructorDeclarationssElementPatternSingleParamArguments06() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefRaw.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefRaw.js");
IMethod method = selectMethod(unit, "Single", 7);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, DECLARATIONS, scope, resultCollector);
@@ -730,7 +730,7 @@ public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGeneric
// Search references to multiple parameterized contructors
public void testConstructorDeclarationsElementPatternMultipleParamArguments01() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefMultiple.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefMultiple.js");
IMethod method = selectMethod(unit, "Multiple", 8);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, DECLARATIONS, scope, resultCollector);
@@ -739,7 +739,7 @@ public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGeneric
);
}
public void testConstructorDeclarationsElementPatternMultipleParamArguments02() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefMultiple.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefMultiple.js");
IMethod method = selectMethod(unit, "Multiple", 9);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, DECLARATIONS, scope, resultCollector);
@@ -748,7 +748,7 @@ public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGeneric
);
}
public void testConstructorDeclarationsElementPatternMultipleParamArguments03() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefMultiple.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefMultiple.js");
IMethod method = selectMethod(unit, "Multiple", 10);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, DECLARATIONS, scope, resultCollector);
@@ -757,7 +757,7 @@ public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGeneric
);
}
public void testConstructorDeclarationsElementPatternMultipleParamArguments04() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefMultiple.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefMultiple.js");
IMethod method = selectMethod(unit, "Multiple", 11);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, DECLARATIONS, scope, resultCollector);
@@ -766,7 +766,7 @@ public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGeneric
);
}
public void testConstructorDeclarationssElementPatternMultipleParamArguments05() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefRaw.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefRaw.js");
IMethod method = selectMethod(unit, "Multiple", 5);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, DECLARATIONS, scope, resultCollector);
@@ -775,7 +775,7 @@ public class JavaSearchGenericConstructorTests extends AbstractJavaSearchGeneric
);
}
public void testConstructorDeclarationssElementPatternMultipleParamArguments06() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefRaw.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/c/ref/RefRaw.js");
IMethod method = selectMethod(unit, "Multiple", 7);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, DECLARATIONS, scope, resultCollector);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchGenericFieldTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchGenericFieldTests.java
index b60a395..27f785e 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchGenericFieldTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchGenericFieldTests.java
@@ -67,7 +67,7 @@ public class JavaSearchGenericFieldTests extends JavaSearchTests {
*/
// Search reference to a field of generic type
public void testElementPatternSingleTypeArgument01() throws CoreException {
- IField field = getCompilationUnit("JavaSearch15/src/g1/t/s/def/Generic.java").getType("Generic").getField("t");
+ IField field = getCompilationUnit("JavaSearch15/src/g1/t/s/def/Generic.js").getType("Generic").getField("t");
IJavaSearchScope scope = getJavaSearchScope15("g2.f", true /* add all subpackages */);
search(field, REFERENCES, scope, resultCollector);
assertSearchResults(
@@ -83,7 +83,7 @@ public class JavaSearchGenericFieldTests extends JavaSearchTests {
}
// Search reference to a field of field of member type declared in a generic type
public void testElementPatternSingleTypeArgument02() throws CoreException {
- IField field = getCompilationUnit("JavaSearch15/src/g1/t/s/def/Generic.java").getType("Generic").getType("Member").getField("m");
+ IField field = getCompilationUnit("JavaSearch15/src/g1/t/s/def/Generic.js").getType("Generic").getType("Member").getField("m");
IJavaSearchScope scope = getJavaSearchScope15("g2.f", true /* add all subpackages */);
search(field, REFERENCES, scope, resultCollector);
assertSearchResults(
@@ -99,7 +99,7 @@ public class JavaSearchGenericFieldTests extends JavaSearchTests {
}
// Search reference to a field of field of generic member type declared in a generic type
public void testElementPatternSingleTypeArgument03() throws CoreException {
- IField field = getCompilationUnit("JavaSearch15/src/g1/t/s/def/Generic.java").getType("Generic").getType("MemberGeneric").getField("v");
+ IField field = getCompilationUnit("JavaSearch15/src/g1/t/s/def/Generic.js").getType("Generic").getType("MemberGeneric").getField("v");
IJavaSearchScope scope = getJavaSearchScope15("g2.f", true /* add all subpackages */);
search(field, REFERENCES, scope, resultCollector);
assertSearchResults(
@@ -119,7 +119,7 @@ public class JavaSearchGenericFieldTests extends JavaSearchTests {
}
// Search reference to a field of generic member type declared in a non-generic type
public void testElementPatternSingleTypeArgument04() throws CoreException {
- IField field = getCompilationUnit("JavaSearch15/src/g1/t/s/def/NonGeneric.java").getType("NonGeneric").getType("GenericMember").getField("t");
+ IField field = getCompilationUnit("JavaSearch15/src/g1/t/s/def/NonGeneric.js").getType("NonGeneric").getType("GenericMember").getField("t");
IJavaSearchScope scope = getJavaSearchScope15("g2.f", true /* add all subpackages */);
search(field, REFERENCES, scope, resultCollector);
assertSearchResults(
@@ -135,7 +135,7 @@ public class JavaSearchGenericFieldTests extends JavaSearchTests {
}
// Search reference to a field of generic type
public void testElementPatternMultipleTypeArgument01() throws CoreException {
- IField field = getCompilationUnit("JavaSearch15/src/g1/t/m/def/Generic.java").getType("Generic").getField("t1");
+ IField field = getCompilationUnit("JavaSearch15/src/g1/t/m/def/Generic.js").getType("Generic").getField("t1");
IJavaSearchScope scope = getJavaSearchScope15("g2.f", true /* add all subpackages */);
search(field, REFERENCES, scope, resultCollector);
assertSearchResults(
@@ -151,7 +151,7 @@ public class JavaSearchGenericFieldTests extends JavaSearchTests {
}
// Search reference to a field of member type declared in a generic type
public void testElementPatternMultipleTypeArgument02() throws CoreException {
- IField field = getCompilationUnit("JavaSearch15/src/g1/t/m/def/Generic.java").getType("Generic").getType("Member").getField("m");
+ IField field = getCompilationUnit("JavaSearch15/src/g1/t/m/def/Generic.js").getType("Generic").getType("Member").getField("m");
IJavaSearchScope scope = getJavaSearchScope15("g2.f", true /* add all subpackages */);
search(field, REFERENCES, scope, resultCollector);
assertSearchResults(
@@ -167,7 +167,7 @@ public class JavaSearchGenericFieldTests extends JavaSearchTests {
}
// Search reference to a field of generic member type declared in a generic type
public void testElementPatternMultipleTypeArgument03() throws CoreException {
- IField field = getCompilationUnit("JavaSearch15/src/g1/t/m/def/Generic.java").getType("Generic").getType("MemberGeneric").getField("u2");
+ IField field = getCompilationUnit("JavaSearch15/src/g1/t/m/def/Generic.js").getType("Generic").getType("MemberGeneric").getField("u2");
IJavaSearchScope scope = getJavaSearchScope15("g2.f", true /* add all subpackages */);
search(field, REFERENCES, scope, resultCollector);
assertSearchResults(
@@ -187,7 +187,7 @@ public class JavaSearchGenericFieldTests extends JavaSearchTests {
}
// Search reference to a field of generic member type declared in a non-generic type
public void testElementPatternMultipleTypeArgument04() throws CoreException {
- IField field = getCompilationUnit("JavaSearch15/src/g1/t/m/def/NonGeneric.java").getType("NonGeneric").getType("GenericMember").getField("t3");
+ IField field = getCompilationUnit("JavaSearch15/src/g1/t/m/def/NonGeneric.js").getType("NonGeneric").getType("GenericMember").getField("t3");
IJavaSearchScope scope = getJavaSearchScope15("g2.f", true /* add all subpackages */);
search(field, REFERENCES, scope, resultCollector);
assertSearchResults(
@@ -204,29 +204,29 @@ public class JavaSearchGenericFieldTests extends JavaSearchTests {
// Search reference to a single parameterized field
public void testElementPatternSingleParameterizedType01() throws CoreException {
IJavaSearchScope scope = getJavaSearchScope15("g2.f", true /* add all subpackages */);
- IField field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R1.java").getType("R1").getField("gen");
+ IField field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R1.js").getType("R1").getField("gen");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R1.java").getType("R1").getField("gen_obj");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R1.js").getType("R1").getField("gen_obj");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R1.java").getType("R1").getField("gen_exc");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R1.js").getType("R1").getField("gen_exc");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R1.java").getType("R1").getField("gen_wld");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R1.js").getType("R1").getField("gen_wld");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R1.java").getType("R1").getField("gen_thr");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R1.js").getType("R1").getField("gen_thr");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R1.java").getType("R1").getField("gen_run");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R1.js").getType("R1").getField("gen_run");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R1.java").getType("R1").getField("qgen");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R1.js").getType("R1").getField("qgen");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R1.java").getType("R1").getField("qgen_obj");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R1.js").getType("R1").getField("qgen_obj");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R1.java").getType("R1").getField("qgen_exc");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R1.js").getType("R1").getField("qgen_exc");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R1.java").getType("R1").getField("qgen_wld");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R1.js").getType("R1").getField("qgen_wld");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R1.java").getType("R1").getField("qgen_thr");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R1.js").getType("R1").getField("qgen_thr");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R1.java").getType("R1").getField("qgen_run");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R1.js").getType("R1").getField("qgen_run");
search(field, REFERENCES, scope, resultCollector);
assertSearchResults(
"src/g2/f/s/ref/RR1.java g2.f.s.ref.RR1.{} [gen] EXACT_MATCH\n" +
@@ -246,29 +246,29 @@ public class JavaSearchGenericFieldTests extends JavaSearchTests {
// Search reference to a member type field of single parameterized type
public void testElementPatternSingleParameterizedType02() throws CoreException {
IJavaSearchScope scope = getJavaSearchScope15("g2.f", true /* add all subpackages */);
- IField field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R2.java").getType("R2").getField("gen");
+ IField field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R2.js").getType("R2").getField("gen");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R2.java").getType("R2").getField("gen_obj");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R2.js").getType("R2").getField("gen_obj");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R2.java").getType("R2").getField("gen_exc");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R2.js").getType("R2").getField("gen_exc");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R2.java").getType("R2").getField("gen_wld");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R2.js").getType("R2").getField("gen_wld");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R2.java").getType("R2").getField("gen_thr");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R2.js").getType("R2").getField("gen_thr");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R2.java").getType("R2").getField("gen_run");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R2.js").getType("R2").getField("gen_run");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R2.java").getType("R2").getField("qgen");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R2.js").getType("R2").getField("qgen");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R2.java").getType("R2").getField("qgen_obj");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R2.js").getType("R2").getField("qgen_obj");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R2.java").getType("R2").getField("qgen_exc");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R2.js").getType("R2").getField("qgen_exc");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R2.java").getType("R2").getField("qgen_wld");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R2.js").getType("R2").getField("qgen_wld");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R2.java").getType("R2").getField("qgen_thr");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R2.js").getType("R2").getField("qgen_thr");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R2.java").getType("R2").getField("qgen_run");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R2.js").getType("R2").getField("qgen_run");
search(field, REFERENCES, scope, resultCollector);
assertSearchResults(
"src/g2/f/s/ref/RR2.java g2.f.s.ref.RR2.{} [gen] EXACT_MATCH\n" +
@@ -288,29 +288,29 @@ public class JavaSearchGenericFieldTests extends JavaSearchTests {
// Search reference to a single parameterized member type field of a single parameterized type
public void testElementPatternSingleParameterizedType03() throws CoreException {
IJavaSearchScope scope = getJavaSearchScope15("g2.f", true /* add all subpackages */);
- IField field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R3.java").getType("R3").getField("gen");
+ IField field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R3.js").getType("R3").getField("gen");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R3.java").getType("R3").getField("gen_obj");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R3.js").getType("R3").getField("gen_obj");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R3.java").getType("R3").getField("gen_exc");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R3.js").getType("R3").getField("gen_exc");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R3.java").getType("R3").getField("gen_wld");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R3.js").getType("R3").getField("gen_wld");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R3.java").getType("R3").getField("gen_thr");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R3.js").getType("R3").getField("gen_thr");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R3.java").getType("R3").getField("gen_run");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R3.js").getType("R3").getField("gen_run");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R3.java").getType("R3").getField("qgen");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R3.js").getType("R3").getField("qgen");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R3.java").getType("R3").getField("qgen_obj");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R3.js").getType("R3").getField("qgen_obj");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R3.java").getType("R3").getField("qgen_exc");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R3.js").getType("R3").getField("qgen_exc");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R3.java").getType("R3").getField("qgen_wld");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R3.js").getType("R3").getField("qgen_wld");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R3.java").getType("R3").getField("qgen_thr");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R3.js").getType("R3").getField("qgen_thr");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R3.java").getType("R3").getField("qgen_run");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R3.js").getType("R3").getField("qgen_run");
search(field, REFERENCES, scope, resultCollector);
assertSearchResults(
"src/g2/f/s/ref/RR3.java g2.f.s.ref.RR3.{} [gen] EXACT_MATCH\n" +
@@ -330,29 +330,29 @@ public class JavaSearchGenericFieldTests extends JavaSearchTests {
// Search reference to a single parameterized member type field
public void testElementPatternSingleParameterizedType04() throws CoreException {
IJavaSearchScope scope = getJavaSearchScope15("g2.f", true /* add all subpackages */);
- IField field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R4.java").getType("R4").getField("gen");
+ IField field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R4.js").getType("R4").getField("gen");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R4.java").getType("R4").getField("gen_obj");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R4.js").getType("R4").getField("gen_obj");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R4.java").getType("R4").getField("gen_exc");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R4.js").getType("R4").getField("gen_exc");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R4.java").getType("R4").getField("gen_wld");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R4.js").getType("R4").getField("gen_wld");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R4.java").getType("R4").getField("gen_thr");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R4.js").getType("R4").getField("gen_thr");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R4.java").getType("R4").getField("gen_run");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R4.js").getType("R4").getField("gen_run");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R4.java").getType("R4").getField("qgen");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R4.js").getType("R4").getField("qgen");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R4.java").getType("R4").getField("qgen_obj");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R4.js").getType("R4").getField("qgen_obj");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R4.java").getType("R4").getField("qgen_exc");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R4.js").getType("R4").getField("qgen_exc");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R4.java").getType("R4").getField("qgen_wld");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R4.js").getType("R4").getField("qgen_wld");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R4.java").getType("R4").getField("qgen_thr");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R4.js").getType("R4").getField("qgen_thr");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R4.java").getType("R4").getField("qgen_run");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R4.js").getType("R4").getField("qgen_run");
search(field, REFERENCES, scope, resultCollector);
assertSearchResults(
"src/g2/f/s/ref/RR4.java g2.f.s.ref.RR4.{} [gen] EXACT_MATCH\n" +
@@ -372,29 +372,29 @@ public class JavaSearchGenericFieldTests extends JavaSearchTests {
// Search reference to a multiple parameterized field
public void testElementPatternMultipleParameterizedType01() throws CoreException {
IJavaSearchScope scope = getJavaSearchScope15("g2.f", true /* add all subpackages */);
- IField field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R1.java").getType("R1").getField("gen");
+ IField field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R1.js").getType("R1").getField("gen");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R1.java").getType("R1").getField("gen_obj");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R1.js").getType("R1").getField("gen_obj");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R1.java").getType("R1").getField("gen_exc");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R1.js").getType("R1").getField("gen_exc");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R1.java").getType("R1").getField("gen_wld");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R1.js").getType("R1").getField("gen_wld");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R1.java").getType("R1").getField("gen_thr");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R1.js").getType("R1").getField("gen_thr");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R1.java").getType("R1").getField("gen_run");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R1.js").getType("R1").getField("gen_run");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R1.java").getType("R1").getField("qgen");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R1.js").getType("R1").getField("qgen");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R1.java").getType("R1").getField("qgen_obj");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R1.js").getType("R1").getField("qgen_obj");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R1.java").getType("R1").getField("qgen_exc");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R1.js").getType("R1").getField("qgen_exc");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R1.java").getType("R1").getField("qgen_wld");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R1.js").getType("R1").getField("qgen_wld");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R1.java").getType("R1").getField("qgen_thr");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R1.js").getType("R1").getField("qgen_thr");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R1.java").getType("R1").getField("qgen_run");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R1.js").getType("R1").getField("qgen_run");
search(field, REFERENCES, scope, resultCollector);
assertSearchResults(
"src/g2/f/m/ref/RR1.java g2.f.m.ref.RR1.{} [gen] EXACT_MATCH\n" +
@@ -414,29 +414,29 @@ public class JavaSearchGenericFieldTests extends JavaSearchTests {
// Search reference to a member type field of multiple parameterized type
public void testElementPatternMultipleParameterizedType02() throws CoreException {
IJavaSearchScope scope = getJavaSearchScope15("g2.f", true /* add all subpackages */);
- IField field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R2.java").getType("R2").getField("gen");
+ IField field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R2.js").getType("R2").getField("gen");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R2.java").getType("R2").getField("gen_obj");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R2.js").getType("R2").getField("gen_obj");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R2.java").getType("R2").getField("gen_exc");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R2.js").getType("R2").getField("gen_exc");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R2.java").getType("R2").getField("gen_wld");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R2.js").getType("R2").getField("gen_wld");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R2.java").getType("R2").getField("gen_thr");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R2.js").getType("R2").getField("gen_thr");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R2.java").getType("R2").getField("gen_run");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R2.js").getType("R2").getField("gen_run");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R2.java").getType("R2").getField("qgen");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R2.js").getType("R2").getField("qgen");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R2.java").getType("R2").getField("qgen_obj");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R2.js").getType("R2").getField("qgen_obj");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R2.java").getType("R2").getField("qgen_exc");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R2.js").getType("R2").getField("qgen_exc");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R2.java").getType("R2").getField("qgen_wld");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R2.js").getType("R2").getField("qgen_wld");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R2.java").getType("R2").getField("qgen_thr");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R2.js").getType("R2").getField("qgen_thr");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R2.java").getType("R2").getField("qgen_run");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R2.js").getType("R2").getField("qgen_run");
search(field, REFERENCES, scope, resultCollector);
assertSearchResults(
"src/g2/f/m/ref/RR2.java g2.f.m.ref.RR2.{} [gen] EXACT_MATCH\n" +
@@ -456,29 +456,29 @@ public class JavaSearchGenericFieldTests extends JavaSearchTests {
// Search reference to a multiple parameterized member type field of a multiple parameterized type
public void testElementPatternMultipleParameterizedType03() throws CoreException {
IJavaSearchScope scope = getJavaSearchScope15("g2.f", true /* add all subpackages */);
- IField field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R3.java").getType("R3").getField("gen");
+ IField field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R3.js").getType("R3").getField("gen");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R3.java").getType("R3").getField("gen_obj");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R3.js").getType("R3").getField("gen_obj");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R3.java").getType("R3").getField("gen_exc");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R3.js").getType("R3").getField("gen_exc");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R3.java").getType("R3").getField("gen_wld");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R3.js").getType("R3").getField("gen_wld");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R3.java").getType("R3").getField("gen_thr");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R3.js").getType("R3").getField("gen_thr");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R3.java").getType("R3").getField("gen_run");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R3.js").getType("R3").getField("gen_run");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R3.java").getType("R3").getField("qgen");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R3.js").getType("R3").getField("qgen");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R3.java").getType("R3").getField("qgen_obj");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R3.js").getType("R3").getField("qgen_obj");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R3.java").getType("R3").getField("qgen_exc");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R3.js").getType("R3").getField("qgen_exc");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R3.java").getType("R3").getField("qgen_wld");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R3.js").getType("R3").getField("qgen_wld");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R3.java").getType("R3").getField("qgen_thr");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R3.js").getType("R3").getField("qgen_thr");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R3.java").getType("R3").getField("qgen_run");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R3.js").getType("R3").getField("qgen_run");
search(field, REFERENCES, scope, resultCollector);
assertSearchResults(
"src/g2/f/m/ref/RR3.java g2.f.m.ref.RR3.{} [gen] EXACT_MATCH\n" +
@@ -498,29 +498,29 @@ public class JavaSearchGenericFieldTests extends JavaSearchTests {
// Search reference to a multiple parameterized member type field
public void testElementPatternMultipleParameterizedType04() throws CoreException {
IJavaSearchScope scope = getJavaSearchScope15("g2.f", true /* add all subpackages */);
- IField field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R4.java").getType("R4").getField("gen");
+ IField field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R4.js").getType("R4").getField("gen");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R4.java").getType("R4").getField("gen_obj");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R4.js").getType("R4").getField("gen_obj");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R4.java").getType("R4").getField("gen_exc");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R4.js").getType("R4").getField("gen_exc");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R4.java").getType("R4").getField("gen_wld");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R4.js").getType("R4").getField("gen_wld");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R4.java").getType("R4").getField("gen_thr");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R4.js").getType("R4").getField("gen_thr");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R4.java").getType("R4").getField("gen_run");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R4.js").getType("R4").getField("gen_run");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R4.java").getType("R4").getField("qgen");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R4.js").getType("R4").getField("qgen");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R4.java").getType("R4").getField("qgen_obj");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R4.js").getType("R4").getField("qgen_obj");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R4.java").getType("R4").getField("qgen_exc");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R4.js").getType("R4").getField("qgen_exc");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R4.java").getType("R4").getField("qgen_wld");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R4.js").getType("R4").getField("qgen_wld");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R4.java").getType("R4").getField("qgen_thr");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R4.js").getType("R4").getField("qgen_thr");
search(field, REFERENCES, scope, resultCollector);
- field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R4.java").getType("R4").getField("qgen_run");
+ field = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R4.js").getType("R4").getField("qgen_run");
search(field, REFERENCES, scope, resultCollector);
assertSearchResults(
"src/g2/f/m/ref/RR4.java g2.f.m.ref.RR4.{} [gen] EXACT_MATCH\n" +
@@ -749,13 +749,13 @@ public class JavaSearchGenericFieldTests extends JavaSearchTests {
// Search reference to a local variable
public void testElementPatternLocalVariables01() throws CoreException {
IJavaSearchScope scope = getJavaSearchScope15("g4.v.ref", false);
- ILocalVariable localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R1.java", "gen_obj,", "gen_obj");
+ ILocalVariable localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R1.js", "gen_obj,", "gen_obj");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
- localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R1.java", "gen_exc,", "gen_exc");
+ localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R1.js", "gen_exc,", "gen_exc");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
- localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R1.java", "gen_thr,", "gen_thr");
+ localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R1.js", "gen_thr,", "gen_thr");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
- localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R1.java", "gen_run)", "gen_run");
+ localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R1.js", "gen_run)", "gen_run");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
assertSearchResults(
"src/g4/v/ref/R1.java void g4.v.ref.R1.simple_name(Generic<Object>, Generic<Exception>, Generic<? extends Throwable>, Generic<? super RuntimeException>).gen_obj [gen_obj] EXACT_MATCH\n" +
@@ -770,13 +770,13 @@ public class JavaSearchGenericFieldTests extends JavaSearchTests {
}
public void testElementPatternLocalVariables02() throws CoreException {
IJavaSearchScope scope = getJavaSearchScope15("g4.v.ref", false);
- ILocalVariable localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R1.java", "gen_obj =", "gen_obj");
+ ILocalVariable localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R1.js", "gen_obj =", "gen_obj");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
- localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R1.java", "gen_exc =", "gen_exc");
+ localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R1.js", "gen_exc =", "gen_exc");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
- localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R1.java", "gen_thr =", "gen_thr");
+ localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R1.js", "gen_thr =", "gen_thr");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
- localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R1.java", "gen_run =", "gen_run");
+ localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R1.js", "gen_run =", "gen_run");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
assertSearchResults(
"src/g4/v/ref/R1.java void g4.v.ref.R1.qualified_name().gen_obj [gen_obj] EXACT_MATCH\n" +
@@ -791,13 +791,13 @@ public class JavaSearchGenericFieldTests extends JavaSearchTests {
}
public void testElementPatternLocalVariables03() throws CoreException {
IJavaSearchScope scope = getJavaSearchScope15("g4.v.ref", false);
- ILocalVariable localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R2.java", "gen_obj,", "gen_obj");
+ ILocalVariable localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R2.js", "gen_obj,", "gen_obj");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
- localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R2.java", "gen_exc,", "gen_exc");
+ localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R2.js", "gen_exc,", "gen_exc");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
- localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R2.java", "gen_thr,", "gen_thr");
+ localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R2.js", "gen_thr,", "gen_thr");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
- localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R2.java", "gen_run)", "gen_run");
+ localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R2.js", "gen_run)", "gen_run");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
assertSearchResults(
"src/g4/v/ref/R2.java void g4.v.ref.R2.qualified_name(g1.t.s.def.NonGeneric.GenericMember<Object>, g1.t.s.def.NonGeneric.GenericMember<Exception>, g1.t.s.def.NonGeneric.GenericMember<? extends Throwable>, g1.t.s.def.NonGeneric.GenericMember<? super RuntimeException>).gen_obj [gen_obj] EXACT_MATCH\n" +
@@ -812,13 +812,13 @@ public class JavaSearchGenericFieldTests extends JavaSearchTests {
}
public void testElementPatternLocalVariables04() throws CoreException {
IJavaSearchScope scope = getJavaSearchScope15("g4.v.ref", false);
- ILocalVariable localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R2.java", "gen_obj =", "gen_obj");
+ ILocalVariable localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R2.js", "gen_obj =", "gen_obj");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
- localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R2.java", "gen_exc =", "gen_exc");
+ localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R2.js", "gen_exc =", "gen_exc");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
- localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R2.java", "gen_thr =", "gen_thr");
+ localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R2.js", "gen_thr =", "gen_thr");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
- localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R2.java", "gen_run =", "gen_run");
+ localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R2.js", "gen_run =", "gen_run");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
assertSearchResults(
"src/g4/v/ref/R2.java void g4.v.ref.R2.simple_name().gen_obj [gen_obj] EXACT_MATCH\n" +
@@ -833,13 +833,13 @@ public class JavaSearchGenericFieldTests extends JavaSearchTests {
}
public void testElementPatternLocalVariables05() throws CoreException {
IJavaSearchScope scope = getJavaSearchScope15("g4.v.ref", false);
- ILocalVariable localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R3.java", "gen_obj,", "gen_obj");
+ ILocalVariable localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R3.js", "gen_obj,", "gen_obj");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
- localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R3.java", "gen_exc,", "gen_exc");
+ localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R3.js", "gen_exc,", "gen_exc");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
- localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R3.java", "gen_thr,", "gen_thr");
+ localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R3.js", "gen_thr,", "gen_thr");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
- localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R3.java", "gen_run)", "gen_run");
+ localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R3.js", "gen_run)", "gen_run");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
assertSearchResults(
"src/g4/v/ref/R3.java void g4.v.ref.R3.simple_name(Generic<Object>.MemberGeneric<Object>, Generic<Exception>.MemberGeneric<Exception>, Generic<? extends Throwable>.MemberGeneric<? extends Throwable>, Generic<? super RuntimeException>.MemberGeneric<? super RuntimeException>).gen_obj [gen_obj] EXACT_MATCH\n" +
@@ -854,13 +854,13 @@ public class JavaSearchGenericFieldTests extends JavaSearchTests {
}
public void testElementPatternLocalVariables06() throws CoreException {
IJavaSearchScope scope = getJavaSearchScope15("g4.v.ref", false);
- ILocalVariable localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R3.java", "gen_obj =", "gen_obj");
+ ILocalVariable localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R3.js", "gen_obj =", "gen_obj");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
- localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R3.java", "gen_exc =", "gen_exc");
+ localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R3.js", "gen_exc =", "gen_exc");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
- localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R3.java", "gen_thr =", "gen_thr");
+ localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R3.js", "gen_thr =", "gen_thr");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
- localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R3.java", "gen_run =", "gen_run");
+ localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R3.js", "gen_run =", "gen_run");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
assertSearchResults(
"src/g4/v/ref/R3.java void g4.v.ref.R3.qualified_name().gen_obj [gen_obj] EXACT_MATCH\n" +
@@ -875,13 +875,13 @@ public class JavaSearchGenericFieldTests extends JavaSearchTests {
}
public void testElementPatternLocalVariables07() throws CoreException {
IJavaSearchScope scope = getJavaSearchScope15("g4.v.ref", false);
- ILocalVariable localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R4.java", "gen_obj,", "gen_obj");
+ ILocalVariable localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R4.js", "gen_obj,", "gen_obj");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
- localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R4.java", "gen_exc,", "gen_exc");
+ localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R4.js", "gen_exc,", "gen_exc");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
- localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R4.java", "gen_thr,", "gen_thr");
+ localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R4.js", "gen_thr,", "gen_thr");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
- localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R4.java", "gen_run)", "gen_run");
+ localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R4.js", "gen_run)", "gen_run");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
assertSearchResults(
"src/g4/v/ref/R4.java void g4.v.ref.R4.qualified_name(g1.t.s.def.Generic<Object>.Member, g1.t.s.def.Generic<Exception>.Member, g1.t.s.def.Generic<? extends Throwable>.Member, g1.t.s.def.Generic<? super RuntimeException>.Member).gen_obj [gen_obj] EXACT_MATCH\n" +
@@ -896,13 +896,13 @@ public class JavaSearchGenericFieldTests extends JavaSearchTests {
}
public void testElementPatternLocalVariables08() throws CoreException {
IJavaSearchScope scope = getJavaSearchScope15("g4.v.ref", false);
- ILocalVariable localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R4.java", "gen_obj =", "gen_obj");
+ ILocalVariable localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R4.js", "gen_obj =", "gen_obj");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
- localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R4.java", "gen_exc =", "gen_exc");
+ localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R4.js", "gen_exc =", "gen_exc");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
- localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R4.java", "gen_thr =", "gen_thr");
+ localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R4.js", "gen_thr =", "gen_thr");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
- localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R4.java", "gen_run =", "gen_run");
+ localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R4.js", "gen_run =", "gen_run");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
assertSearchResults(
"src/g4/v/ref/R4.java void g4.v.ref.R4.simple_name().gen_obj [gen_obj] EXACT_MATCH\n" +
@@ -917,11 +917,11 @@ public class JavaSearchGenericFieldTests extends JavaSearchTests {
}
public void testElementPatternLocalVariables09() throws CoreException {
IJavaSearchScope scope = getJavaSearchScope15("g4.v.ref", false);
- ILocalVariable localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R5.java", "gen_wld, // simple", "gen_wld");
+ ILocalVariable localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R5.js", "gen_wld, // simple", "gen_wld");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
- localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R5.java", "gen_www, // simple", "gen_www");
+ localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R5.js", "gen_www, // simple", "gen_www");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
- localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R5.java", "gen_obj) // simple", "gen_obj");
+ localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R5.js", "gen_obj) // simple", "gen_obj");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
assertSearchResults(
"src/g4/v/ref/R5.java void g4.v.ref.R5.simple_name(GM<GS<?>,GS<?>,GS<?>>, GM<GS<?>,GS<GS<?>>,GS<GS<GS<?>>>>, GM<GS<Object>,GS<? extends Throwable>,GS<? super RuntimeException>>).gen_wld [gen_wld] EXACT_MATCH\n" +
@@ -934,11 +934,11 @@ public class JavaSearchGenericFieldTests extends JavaSearchTests {
}
public void testElementPatternLocalVariables10() throws CoreException {
IJavaSearchScope scope = getJavaSearchScope15("g4.v.ref", false);
- ILocalVariable localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R5.java", "gen_wld = new GS", "gen_wld");
+ ILocalVariable localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R5.js", "gen_wld = new GS", "gen_wld");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
- localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R5.java", "gen_www = new GS", "gen_www");
+ localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R5.js", "gen_www = new GS", "gen_www");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
- localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R5.java", "gen_obj = new GS", "gen_obj");
+ localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R5.js", "gen_obj = new GS", "gen_obj");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
assertSearchResults(
"src/g4/v/ref/R5.java void g4.v.ref.R5.simple_name().gen_wld [gen_wld] EXACT_MATCH\n" +
@@ -951,11 +951,11 @@ public class JavaSearchGenericFieldTests extends JavaSearchTests {
}
public void testElementPatternLocalVariables11() throws CoreException {
IJavaSearchScope scope = getJavaSearchScope15("g4.v.ref", false);
- ILocalVariable localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R5.java", "gen_wld, // qualified", "gen_wld");
+ ILocalVariable localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R5.js", "gen_wld, // qualified", "gen_wld");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
- localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R5.java", "gen_www, // qualified", "gen_www");
+ localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R5.js", "gen_www, // qualified", "gen_www");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
- localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R5.java", "gen_obj) // qualified", "gen_obj");
+ localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R5.js", "gen_obj) // qualified", "gen_obj");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
assertSearchResults(
"src/g4/v/ref/R5.java void g4.v.ref.R5.qualified_name(g3.t.def.GS<g3.t.def.GM<?,?,?>>, g3.t.def.GS<g3.t.def.GM<g3.t.def.GM<?,?,?>,g3.t.def.GM<?,?,?>,g3.t.def.GM<?,?,?>>>, g3.t.def.GS<g3.t.def.GM<java.lang.Object,java.lang.Exception,java.lang.RuntimeException>>).gen_wld [gen_wld] EXACT_MATCH\n" +
@@ -968,11 +968,11 @@ public class JavaSearchGenericFieldTests extends JavaSearchTests {
}
public void testElementPatternLocalVariables12() throws CoreException {
IJavaSearchScope scope = getJavaSearchScope15("g4.v.ref", false);
- ILocalVariable localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R5.java", "gen_wld = new GM", "gen_wld");
+ ILocalVariable localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R5.js", "gen_wld = new GM", "gen_wld");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
- localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R5.java", "gen_www = new GM", "gen_www");
+ localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R5.js", "gen_www = new GM", "gen_www");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
- localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R5.java", "gen_obj = new GM", "gen_obj");
+ localVar = getLocalVariable("/JavaSearch15/src/g4/v/ref/R5.js", "gen_obj = new GM", "gen_obj");
search(localVar, ALL_OCCURRENCES, scope, resultCollector);
assertSearchResults(
"src/g4/v/ref/R5.java void g4.v.ref.R5.qualified_name().gen_wld [gen_wld] EXACT_MATCH\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchGenericMethodTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchGenericMethodTests.java
index 87b7592..38be3a3 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchGenericMethodTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchGenericMethodTests.java
@@ -88,7 +88,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
*/
// Search references to methods defined in a single type parameter class
public void testMethodReferencesElementPatternSingleTypeParameter01() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g5/m/def/Single.java").getType("Single");
+ IType type = getCompilationUnit("JavaSearch15/src/g5/m/def/Single.js").getType("Single");
// search reference to a standard method
IMethod method = type.getMethod("standard", new String[] { "QT;" });
IJavaSearchScope scope = getJavaSearchScope15();
@@ -101,7 +101,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
);
}
public void testMethodReferencesElementPatternSingleTypeParameter02() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g5/m/def/Single.java").getType("Single");
+ IType type = getCompilationUnit("JavaSearch15/src/g5/m/def/Single.js").getType("Single");
// search reference to a generic method
IMethod method = type.getMethod("generic", new String[] { "QU;" });
IJavaSearchScope scope = getJavaSearchScope15();
@@ -114,7 +114,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
);
}
public void testMethodReferencesElementPatternSingleTypeParameter03() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g5/m/def/Single.java").getType("Single");
+ IType type = getCompilationUnit("JavaSearch15/src/g5/m/def/Single.js").getType("Single");
// search reference to a method returning a parameterized type
IMethod method = type.getMethod("returnParamType", new String[] {});
IJavaSearchScope scope = getJavaSearchScope15();
@@ -131,7 +131,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
);
}
public void testMethodReferencesElementPatternSingleTypeParameter04() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g5/m/def/Single.java").getType("Single");
+ IType type = getCompilationUnit("JavaSearch15/src/g5/m/def/Single.js").getType("Single");
// search reference to a method with parameterized type arguments
IMethod method = type.getMethod("paramTypesArgs", new String[] { "QSingle<QT;>;" });
IJavaSearchScope scope = getJavaSearchScope15();
@@ -147,7 +147,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
);
}
public void testMethodReferencesElementPatternSingleTypeParameter05() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g5/m/def/Single.java").getType("Single");
+ IType type = getCompilationUnit("JavaSearch15/src/g5/m/def/Single.js").getType("Single");
// search reference to a generic method returning a param type with param type parameters (=complete)
IMethod method = type.getMethod("complete", new String[] { "QU;", "QSingle<QT;>;" });
IJavaSearchScope scope = getJavaSearchScope15();
@@ -165,7 +165,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
// Search references to methods defined in a multiple type parameters class
public void testMethodReferencesElementPatternMultipleTypeParameter01() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g5/m/def/Multiple.java").getType("Multiple");
+ IType type = getCompilationUnit("JavaSearch15/src/g5/m/def/Multiple.js").getType("Multiple");
IMethod method = type.getMethod("standard", new String[] { "QT1;","QT2;","QT3;" });
IJavaSearchScope scope = getJavaSearchScope15();
search(method, REFERENCES, scope, resultCollector);
@@ -175,7 +175,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
);
}
public void testMethodReferencesElementPatternMultipleTypeParameter02() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g5/m/def/Multiple.java").getType("Multiple");
+ IType type = getCompilationUnit("JavaSearch15/src/g5/m/def/Multiple.js").getType("Multiple");
IMethod method = type.getMethod("generic", new String[] { "QU1;","QU2;","QU3;" });
IJavaSearchScope scope = getJavaSearchScope15();
search(method, REFERENCES, scope, resultCollector);
@@ -187,7 +187,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
);
}
public void testMethodReferencesElementPatternMultipleTypeParameter03() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g5/m/def/Multiple.java").getType("Multiple");
+ IType type = getCompilationUnit("JavaSearch15/src/g5/m/def/Multiple.js").getType("Multiple");
IMethod method = type.getMethod("returnParamType", new String[] {});
IJavaSearchScope scope = getJavaSearchScope15();
search(method, REFERENCES, scope, resultCollector);
@@ -201,7 +201,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
);
}
public void testMethodReferencesElementPatternMultipleTypeParameter04() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g5/m/def/Multiple.java").getType("Multiple");
+ IType type = getCompilationUnit("JavaSearch15/src/g5/m/def/Multiple.js").getType("Multiple");
IMethod method = type.getMethod("paramTypesArgs", new String[] { "QSingle<QT1;>;","QSingle<QT2;>;","QSingle<QT3;>;","QMultiple<QT1;QT2;QT3;>;" });
IJavaSearchScope scope = getJavaSearchScope15();
search(method, REFERENCES, scope, resultCollector);
@@ -214,7 +214,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
);
}
public void testMethodReferencesElementPatternMultipleTypeParameter05() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g5/m/def/Multiple.java").getType("Multiple");
+ IType type = getCompilationUnit("JavaSearch15/src/g5/m/def/Multiple.js").getType("Multiple");
IMethod method = type.getMethod("complete", new String[] { "QU1;","QU2;","QU3;", "QMultiple<QT1;QT2;QT3;>;" });
IJavaSearchScope scope = getJavaSearchScope15();
search(method, REFERENCES, scope, resultCollector);
@@ -228,7 +228,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
// Search references to single parameterized methods
public void testMethodReferencesElementPatternSingleParamArguments01() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefSingle.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefSingle.js");
IMethod method = selectMethod(unit, "generic", 3);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, REFERENCES, scope, resultCollector);
@@ -240,7 +240,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
);
}
public void testMethodReferencesElementPatternSingleParamArguments02() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefSingle.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefSingle.js");
IMethod method = selectMethod(unit, "generic", 6);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, REFERENCES, scope, resultCollector);
@@ -252,7 +252,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
);
}
public void testMethodReferencesElementPatternSingleParamArguments03() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefSingle.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefSingle.js");
IMethod method = selectMethod(unit, "complete");
IJavaSearchScope scope = getJavaSearchScope15();
search(method, REFERENCES, scope, resultCollector);
@@ -267,7 +267,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
);
}
public void testMethodReferencesElementPatternSingleParamArguments04() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefSingle.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefSingle.js");
IMethod method = selectMethod(unit, "complete", 2);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, REFERENCES, scope, resultCollector);
@@ -282,7 +282,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
);
}
public void testMethodReferencesElementPatternSingleParamArguments05() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefRaw.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefRaw.js");
IMethod method = selectMethod(unit, "generic", 2);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, REFERENCES, scope, resultCollector);
@@ -294,7 +294,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
);
}
public void testMethodReferencesElementPatternSingleParamArguments06() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefRaw.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefRaw.js");
IMethod method = selectMethod(unit, "complete");
IJavaSearchScope scope = getJavaSearchScope15();
search(method, REFERENCES, scope, resultCollector);
@@ -311,7 +311,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
// Search references to multiple parameterized methods
public void testMethodReferencesElementPatternMultipleParamArguments01() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefMultiple.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefMultiple.js");
IMethod method = selectMethod(unit, "generic", 2);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, REFERENCES, scope, resultCollector);
@@ -323,7 +323,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
);
}
public void testMethodReferencesElementPatternMultipleParamArguments02() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefMultiple.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefMultiple.js");
IMethod method = selectMethod(unit, "generic", 6);
search(method, REFERENCES);
assertSearchResults(
@@ -334,7 +334,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
);
}
public void testMethodReferencesElementPatternMultipleParamArguments03() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefMultiple.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefMultiple.js");
IMethod method = selectMethod(unit, "complete");
IJavaSearchScope scope = getJavaSearchScope15();
search(method, REFERENCES, scope, resultCollector);
@@ -346,7 +346,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
);
}
public void testMethodReferencesElementPatternMultipleParamArguments04() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefMultiple.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefMultiple.js");
IMethod method = selectMethod(unit, "complete", 2);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, REFERENCES, scope, resultCollector);
@@ -358,7 +358,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
);
}
public void testMethodReferencesElementPatternMultipleParamArguments05() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefRaw.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefRaw.js");
IMethod method = selectMethod(unit, "generic", 4);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, REFERENCES, scope, resultCollector);
@@ -370,7 +370,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
);
}
public void testMethodReferencesElementPatternMultipleParamArguments06() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefRaw.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefRaw.js");
IMethod method = selectMethod(unit, "complete", 2);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, REFERENCES, scope, resultCollector);
@@ -599,7 +599,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
*/
// Search references to single parameterized methods
public void testMethodDeclarationsElementPatternSingleParamArguments01() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefSingle.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefSingle.js");
IMethod method = selectMethod(unit, "generic", 3);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, DECLARATIONS, scope, resultCollector);
@@ -608,7 +608,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
);
}
public void testMethodDeclarationsElementPatternSingleParamArguments02() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefSingle.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefSingle.js");
IMethod method = selectMethod(unit, "generic", 6);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, DECLARATIONS, scope, resultCollector);
@@ -617,7 +617,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
);
}
public void testMethodDeclarationsElementPatternSingleParamArguments03() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefRaw.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefRaw.js");
IMethod method = selectMethod(unit, "generic", 2);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, DECLARATIONS, scope, resultCollector);
@@ -626,7 +626,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
);
}
public void testMethodDeclarationsElementPatternSingleParamArguments04() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefSingle.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefSingle.js");
IMethod method = selectMethod(unit, "complete");
IJavaSearchScope scope = getJavaSearchScope15();
search(method, DECLARATIONS, scope, resultCollector);
@@ -635,7 +635,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
);
}
public void testMethodDeclarationsElementPatternSingleParamArguments05() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefSingle.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefSingle.js");
IMethod method = selectMethod(unit, "complete", 2);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, DECLARATIONS, scope, resultCollector);
@@ -644,7 +644,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
);
}
public void testMethodDeclarationsElementPatternSingleParamArguments06() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefRaw.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefRaw.js");
IMethod method = selectMethod(unit, "complete");
IJavaSearchScope scope = getJavaSearchScope15();
search(method, DECLARATIONS, scope, resultCollector);
@@ -655,7 +655,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
// Search references to multiple parameterized methods
public void testMethodDeclarationsElementPatternMultipleParamArguments01() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefMultiple.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefMultiple.js");
IMethod method = selectMethod(unit, "generic", 2);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, DECLARATIONS, scope, resultCollector);
@@ -664,7 +664,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
);
}
public void testMethodDeclarationsElementPatternMultipleParamArguments02() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefMultiple.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefMultiple.js");
IMethod method = selectMethod(unit, "generic", 6);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, DECLARATIONS, scope, resultCollector);
@@ -673,7 +673,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
);
}
public void testMethodDeclarationsElementPatternMultipleParamArguments03() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefRaw.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefRaw.js");
IMethod method = selectMethod(unit, "generic", 4);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, DECLARATIONS, scope, resultCollector);
@@ -682,7 +682,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
);
}
public void testMethodDeclarationsElementPatternMultipleParamArguments04() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefMultiple.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefMultiple.js");
IMethod method = selectMethod(unit, "complete");
IJavaSearchScope scope = getJavaSearchScope15();
search(method, DECLARATIONS, scope, resultCollector);
@@ -691,7 +691,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
);
}
public void testMethodDeclarationsElementPatternMultipleParamArguments05() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefMultiple.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefMultiple.js");
IMethod method = selectMethod(unit, "complete", 2);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, DECLARATIONS, scope, resultCollector);
@@ -700,7 +700,7 @@ public class JavaSearchGenericMethodTests extends AbstractJavaSearchGenericTests
);
}
public void testMethodDeclarationsElementPatternMultipleParamArguments06() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefRaw.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g5/m/ref/RefRaw.js");
IMethod method = selectMethod(unit, "complete", 2);
IJavaSearchScope scope = getJavaSearchScope15();
search(method, DECLARATIONS, scope, resultCollector);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchGenericTypeTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchGenericTypeTests.java
index 3ee3419..e64afc8 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchGenericTypeTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchGenericTypeTests.java
@@ -120,7 +120,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
*/
// Source type pattern on single type argument
public void testTypeSingleArgument01() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g1/t/s/def/Generic.java").getType("Generic");
+ IType type = getCompilationUnit("JavaSearch15/src/g1/t/s/def/Generic.js").getType("Generic");
IJavaSearchScope scope = getJavaSearchScope15("g1.t", true /* add all subpackages */);
search(type, REFERENCES, scope, resultCollector);
assertSearchResults(
@@ -166,7 +166,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
resultCollector);
}
public void testTypeSingleArgument02() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g1/t/s/def/Generic.java").getType("Generic").getType("Member");
+ IType type = getCompilationUnit("JavaSearch15/src/g1/t/s/def/Generic.js").getType("Generic").getType("Member");
IJavaSearchScope scope = getJavaSearchScope15("g1.t", true /* add all subpackages */);
search(type, REFERENCES, scope, resultCollector);
assertSearchResults(
@@ -185,7 +185,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
resultCollector);
}
public void testTypeSingleArgument03() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g1/t/s/def/Generic.java").getType("Generic").getType("MemberGeneric");
+ IType type = getCompilationUnit("JavaSearch15/src/g1/t/s/def/Generic.js").getType("Generic").getType("MemberGeneric");
IJavaSearchScope scope = getJavaSearchScope15("g1.t", true /* add all subpackages */);
search(type, REFERENCES, scope, resultCollector);
assertSearchResults(
@@ -204,7 +204,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
resultCollector);
}
public void testTypeSingleArgument04() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g1/t/s/def/NonGeneric.java").getType("NonGeneric").getType("GenericMember");
+ IType type = getCompilationUnit("JavaSearch15/src/g1/t/s/def/NonGeneric.js").getType("NonGeneric").getType("GenericMember");
IJavaSearchScope scope = getJavaSearchScope15("g1.t", true /* add all subpackages */);
search(type, REFERENCES, scope, resultCollector);
assertSearchResults(
@@ -225,7 +225,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
// Source type pattern on multiple type arguments
public void testTypeMultipleArguments01() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g1/t/m/def/Generic.java").getType("Generic");
+ IType type = getCompilationUnit("JavaSearch15/src/g1/t/m/def/Generic.js").getType("Generic");
IJavaSearchScope scope = getJavaSearchScope15("g1.t", true /* add all subpackages */);
search(type, REFERENCES, scope, resultCollector);
assertSearchResults(
@@ -271,7 +271,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
resultCollector);
}
public void testTypeMultipleArguments02() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g1/t/m/def/Generic.java").getType("Generic").getType("Member");
+ IType type = getCompilationUnit("JavaSearch15/src/g1/t/m/def/Generic.js").getType("Generic").getType("Member");
IJavaSearchScope scope = getJavaSearchScope15("g1.t", true /* add all subpackages */);
search(type, REFERENCES, scope, resultCollector);
assertSearchResults(
@@ -290,7 +290,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
resultCollector);
}
public void testTypeMultipleArguments03() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g1/t/m/def/Generic.java").getType("Generic").getType("MemberGeneric");
+ IType type = getCompilationUnit("JavaSearch15/src/g1/t/m/def/Generic.js").getType("Generic").getType("MemberGeneric");
IJavaSearchScope scope = getJavaSearchScope15("g1.t", true /* add all subpackages */);
search(type, REFERENCES, scope, resultCollector);
assertSearchResults(
@@ -309,7 +309,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
resultCollector);
}
public void testTypeMultipleArguments04() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g1/t/m/def/NonGeneric.java").getType("NonGeneric").getType("GenericMember");
+ IType type = getCompilationUnit("JavaSearch15/src/g1/t/m/def/NonGeneric.js").getType("NonGeneric").getType("GenericMember");
IJavaSearchScope scope = getJavaSearchScope15("g1.t", true /* add all subpackages */);
search(type, REFERENCES, scope, resultCollector);
assertSearchResults(
@@ -330,8 +330,8 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
// Source type pattern on nested single type argument
public void testTypeNestedSingleArgument01() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g3/t/def/GS.java").getType("GS");
- ICompilationUnit ref = getCompilationUnit("JavaSearch15/src/g3/t/ref/R1.java");
+ IType type = getCompilationUnit("JavaSearch15/src/g3/t/def/GS.js").getType("GS");
+ ICompilationUnit ref = getCompilationUnit("JavaSearch15/src/g3/t/ref/R1.js");
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new ICompilationUnit[] {ref});
search(type, REFERENCES, scope, resultCollector);
assertSearchResults(
@@ -369,7 +369,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
resultCollector);
}
public void testTypeNestedSingleArgument02() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g3/t/def/GS.java").getType("GS").getType("Member");
+ IType type = getCompilationUnit("JavaSearch15/src/g3/t/def/GS.js").getType("GS").getType("Member");
IJavaSearchScope scope = getJavaSearchScope15("g3.t", true /* add all subpackages */);
search(type, REFERENCES, scope, resultCollector);
assertSearchResults(
@@ -406,7 +406,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
resultCollector);
}
public void testTypeNestedSingleArgument03() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g3/t/def/GS.java").getType("GS").getType("Generic");
+ IType type = getCompilationUnit("JavaSearch15/src/g3/t/def/GS.js").getType("GS").getType("Generic");
IJavaSearchScope scope = getJavaSearchScope15("g3.t", true /* add all subpackages */);
search(type, REFERENCES, scope, resultCollector);
assertSearchResults(
@@ -443,7 +443,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
resultCollector);
}
public void testTypeNestedSingleArgument04() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g3/t/def/NGS.java").getType("NGS").getType("Generic");
+ IType type = getCompilationUnit("JavaSearch15/src/g3/t/def/NGS.js").getType("NGS").getType("Generic");
IJavaSearchScope scope = getJavaSearchScope15("g3.t", true /* add all subpackages */);
search(type, REFERENCES, scope, resultCollector);
assertSearchResults(
@@ -482,8 +482,8 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
// Source type pattern on nested multiple type arguments
public void testTypeNestedMultipleArguments01() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g3/t/def/GM.java").getType("GM");
- ICompilationUnit ref = getCompilationUnit("JavaSearch15/src/g3/t/ref/R1.java");
+ IType type = getCompilationUnit("JavaSearch15/src/g3/t/def/GM.js").getType("GM");
+ ICompilationUnit ref = getCompilationUnit("JavaSearch15/src/g3/t/ref/R1.js");
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new ICompilationUnit[] {ref});
search(type, REFERENCES, scope, resultCollector);
assertSearchResults(
@@ -509,7 +509,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
resultCollector);
}
public void testTypeNestedMultipleArguments02() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g3/t/def/GM.java").getType("GM").getType("Member");
+ IType type = getCompilationUnit("JavaSearch15/src/g3/t/def/GM.js").getType("GM").getType("Member");
IJavaSearchScope scope = getJavaSearchScope15("g3.t", true /* add all subpackages */);
search(type, REFERENCES, scope, resultCollector);
assertSearchResults(
@@ -534,7 +534,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
resultCollector);
}
public void testTypeNestedMultipleArguments03() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g3/t/def/GM.java").getType("GM").getType("Generic");
+ IType type = getCompilationUnit("JavaSearch15/src/g3/t/def/GM.js").getType("GM").getType("Generic");
IJavaSearchScope scope = getJavaSearchScope15("g3.t", true /* add all subpackages */);
search(type, REFERENCES, scope, resultCollector);
assertSearchResults(
@@ -559,7 +559,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
resultCollector);
}
public void testTypeNestedMultipleArguments04() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/g3/t/def/NGM.java").getType("NGM").getType("Generic");
+ IType type = getCompilationUnit("JavaSearch15/src/g3/t/def/NGM.js").getType("NGM").getType("Generic");
IJavaSearchScope scope = getJavaSearchScope15("g3.t", true /* add all subpackages */);
search(type, REFERENCES, scope, resultCollector);
assertSearchResults(
@@ -858,7 +858,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
// Parameterized Source type pattern on single type argument
public void testParameterizedTypeSingleArgument01() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R1.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R1.js");
ResolvedSourceType type = selectParameterizedType(unit, "Generic<Exception>"); //$NON-NLS-1$
IJavaSearchScope scope = getJavaSearchScope15("g1.t", true /* add all subpackages */);
search(type, REFERENCES, scope, resultCollector);
@@ -905,7 +905,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
resultCollector);
}
public void testParameterizedTypeSingleArgument02() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R4.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R4.js");
ResolvedSourceType type = selectParameterizedType(unit, "g1.t.s.def.Generic<Exception>.Member"); //$NON-NLS-1$
IJavaSearchScope scope = getJavaSearchScope15("g1.t", true /* add all subpackages */);
search(type, REFERENCES, scope, resultCollector);
@@ -925,7 +925,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
resultCollector);
}
public void testParameterizedTypeSingleArgument03() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R2.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R2.js");
ResolvedSourceType type = selectParameterizedType(unit, "NonGeneric.GenericMember<Exception>"); //$NON-NLS-1$
IJavaSearchScope scope = getJavaSearchScope15("g1.t", true /* add all subpackages */);
search(type, REFERENCES, scope, resultCollector);
@@ -945,7 +945,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
resultCollector);
}
public void testParameterizedTypeSingleArgument04() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R3.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g1/t/s/ref/R3.js");
ResolvedSourceType type = selectParameterizedType(unit, "g1.t.s.def.Generic<Exception>.MemberGeneric<Exception>"); //$NON-NLS-1$
IJavaSearchScope scope = getJavaSearchScope15("g1.t", true /* add all subpackages */);
search(type, REFERENCES, scope, resultCollector);
@@ -967,7 +967,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
// Parameterized Source type pattern on multiple type arguments
public void testParameterizedTypeMultipleArguments01() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R1.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R1.js");
ResolvedSourceType type = selectParameterizedType(unit, "g1.t.m.def.Generic<? extends Throwable, ? extends Exception, ? extends RuntimeException>"); //$NON-NLS-1$
IJavaSearchScope scope = getJavaSearchScope15("g1.t", true /* add all subpackages */);
search(type, REFERENCES, scope, resultCollector);
@@ -1014,7 +1014,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
resultCollector);
}
public void testParameterizedTypeMultipleArguments02() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R4.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R4.js");
ResolvedSourceType type = selectParameterizedType(unit, "Generic<? extends Throwable, ? extends Exception, ? extends RuntimeException>.Member"); //$NON-NLS-1$
IJavaSearchScope scope = getJavaSearchScope15("g1.t", true /* add all subpackages */);
search(type, REFERENCES, scope, resultCollector);
@@ -1034,7 +1034,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
resultCollector);
}
public void testParameterizedTypeMultipleArguments03() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R2.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R2.js");
ResolvedSourceType type = selectParameterizedType(unit, "NonGeneric.GenericMember<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException>"); //$NON-NLS-1$
IJavaSearchScope scope = getJavaSearchScope15("g1.t", true /* add all subpackages */);
search(type, REFERENCES, scope, resultCollector);
@@ -1054,7 +1054,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
resultCollector);
}
public void testParameterizedTypeMultipleArguments04() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R3.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g1/t/m/ref/R3.js");
ResolvedSourceType type = selectParameterizedType(unit, "g1.t.m.def.Generic<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException>.MemberGeneric<? extends Throwable, ? extends Exception, ? extends RuntimeException>"); //$NON-NLS-1$
IJavaSearchScope scope = getJavaSearchScope15("g1.t", true /* add all subpackages */);
search(type, REFERENCES, scope, resultCollector);
@@ -1627,7 +1627,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
// String pattern with nested single type argument
public void testStringNestedSingleArgument01() throws CoreException {
- IJavaSearchScope scope = getJavaSearchCUScope("JavaSearch15", "g3/t/ref", "R1.java");
+ IJavaSearchScope scope = getJavaSearchCUScope("JavaSearch15", "g3/t/ref", "R1.js");
search("GS<Exception>", TYPE, REFERENCES, scope, resultCollector);
assertSearchResults(
"src/g3/t/ref/R1.java [GS] EQUIVALENT_RAW_MATCH\n" +
@@ -1774,7 +1774,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
// String pattern with nested multiple type arguments
public void testStringNestedMultipleArguments01() throws CoreException {
- IJavaSearchScope scope = getJavaSearchCUScope("JavaSearch15", "g3/t/ref", "R1.java");
+ IJavaSearchScope scope = getJavaSearchCUScope("JavaSearch15", "g3/t/ref", "R1.js");
search("GM<Object, Exception, RuntimeException>", TYPE, REFERENCES, scope, resultCollector);
assertSearchResults(
"src/g3/t/ref/R1.java [GM] EQUIVALENT_RAW_MATCH\n" +
@@ -1897,7 +1897,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
// Parameterized array type with single type argument
public void testParameterizedArrayTypeSingleArgument01() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g6/t/ref/Single.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g6/t/ref/Single.js");
IType type = selectType(unit, "List", 2 /* 2nd occurence*/); //$NON-NLS-1$
IJavaSearchScope scope = getJavaSearchScope15("g6", true /* add all subpackages */);
search(type, REFERENCES, scope, resultCollector);
@@ -1915,7 +1915,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
resultCollector);
}
public void testParameterizedArrayTypeSingleArgument02() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g6/t/ref/Single.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g6/t/ref/Single.js");
IType type = selectType(unit, "List<Exception>"); //$NON-NLS-1$
IJavaSearchScope scope = getJavaSearchScope15("g6", true /* add all subpackages */);
search(type, REFERENCES, scope, resultCollector);
@@ -1934,7 +1934,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
resultCollector);
}
public void testParameterizedArrayTypeSingleArgument03() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g6/t/ref/QualifSingle.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g6/t/ref/QualifSingle.js");
IType type = selectType(unit, "g6.t.def.List<Exception>", 2 /* 2nd occurence*/); //$NON-NLS-1$
IJavaSearchScope scope = getJavaSearchScope15("g6", true /* add all subpackages */);
search(type, REFERENCES, scope, resultCollector);
@@ -1952,7 +1952,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
resultCollector);
}
public void testParameterizedArrayTypeSingleArgument04() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g6/t/ref/QualifSingle.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g6/t/ref/QualifSingle.js");
IType type = selectType(unit, "g6.t.def.List<g6.t.def.List<Exception>[]>"); //$NON-NLS-1$
IJavaSearchScope scope = getJavaSearchScope15("g6", true /* add all subpackages */);
search(type, REFERENCES, scope, resultCollector);
@@ -1972,7 +1972,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
// Parameterized array type with multiple type arguments
public void testParameterizedArrayTypeMultipleArguments01() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g6/t/ref/Multiple.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g6/t/ref/Multiple.js");
IType type = selectType(unit, "Table.Entry"); //$NON-NLS-1$
IJavaSearchScope scope = getJavaSearchScope15("g6", true /* add all subpackages */);
search(type, REFERENCES, scope, resultCollector);
@@ -1991,7 +1991,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
resultCollector);
}
public void testParameterizedArrayTypeMultipleArguments02() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g6/t/ref/QualifMultiple.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g6/t/ref/QualifMultiple.js");
IType type = selectType(unit, "Table<String, Exception>.Entry<String, Exception>"); //$NON-NLS-1$
IJavaSearchScope scope = getJavaSearchScope15("g6", true /* add all subpackages */);
search(type, REFERENCES, scope, resultCollector);
@@ -2010,7 +2010,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
resultCollector);
}
public void testParameterizedArrayTypeMultipleArguments03() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g6/t/ref/Multiple.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g6/t/ref/Multiple.js");
IType type = selectType(unit, "Table<String, Exception>.Entry<String, Exception>", 2); //$NON-NLS-1$
IJavaSearchScope scope = getJavaSearchScope15("g6", true /* add all subpackages */);
search(type, REFERENCES, scope, resultCollector);
@@ -2029,7 +2029,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
resultCollector);
}
public void testParameterizedArrayTypeMultipleArguments04() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g6/t/ref/Multiple.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15/src/g6/t/ref/Multiple.js");
IType type = selectType(unit, "Table<String, Table<String, Exception>.Entry<String, Exception>[]>.Entry<String, Table<String, Exception>.Entry<String, Exception>[]>"); //$NON-NLS-1$
IJavaSearchScope scope = getJavaSearchScope15("g6", true /* add all subpackages */);
search(type, REFERENCES, scope, resultCollector);
@@ -2054,7 +2054,7 @@ public class JavaSearchGenericTypeTests extends AbstractJavaSearchGenericTests {
*/
public void testParameterizedType_Bug83713() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearch15/src/p/X.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearch15/src/p/X.js",
"package p;\n" +
"public class X<T> {}\n" +
"class Y<E> extends X<E> {\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchJavadocTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchJavadocTests.java
index 801eb98..2971962 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchJavadocTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchJavadocTests.java
@@ -77,7 +77,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
* ===================================================
*/
public void testJavadocTypeDeclaration() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.java").getType("JavadocSearched");
+ IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.js").getType("JavadocSearched");
search(
type,
DECLARATIONS,
@@ -99,7 +99,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
this.resultCollector);
}
public void testJavadocTypeDeclarationWithJavadoc() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.java").getType("JavadocSearched");
+ IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.js").getType("JavadocSearched");
setJavadocOptions();
search(
type,
@@ -116,7 +116,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
* ====================================================
*/
public void testJavadocFieldDeclaration() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.java").getType("JavadocSearched");
+ IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.js").getType("JavadocSearched");
IField field = type.getField("javadocSearchedVar");
search(
field,
@@ -139,7 +139,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
this.resultCollector);
}
public void testJavadocFieldDeclarationWithJavadoc() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.java").getType("JavadocSearched");
+ IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.js").getType("JavadocSearched");
IField field = type.getField("javadocSearchedVar");
setJavadocOptions();
search(
@@ -157,7 +157,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
* ======================================================
*/
public void testJavadocMethodDeclaration() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.java").getType("JavadocSearched");
+ IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.js").getType("JavadocSearched");
IMethod method = type.getMethod("javadocSearchedMethod", null);
search(
method,
@@ -169,7 +169,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
this.resultCollector);
}
public void testJavadocMethodArgDeclaration() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.java").getType("JavadocSearched");
+ IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.js").getType("JavadocSearched");
IMethod method = type.getMethod("javadocSearchedMethod", new String[] { "QString;" });
search(
method,
@@ -193,7 +193,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
this.resultCollector);
}
public void testJavadocMethodDeclarationWithJavadoc() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.java").getType("JavadocSearched");
+ IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.js").getType("JavadocSearched");
setJavadocOptions();
IMethod method = type.getMethod("javadocSearchedMethod", null);
search(
@@ -206,7 +206,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
this.resultCollector);
}
public void testJavadocMethodArgDeclarationWithJavadoc() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.java").getType("JavadocSearched");
+ IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.js").getType("JavadocSearched");
setJavadocOptions();
IMethod method = type.getMethod("javadocSearchedMethod", new String[] { "QString;" });
search(
@@ -224,7 +224,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
* ==================================================
*/
public void testJavadocTypeReference() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.java").getType("JavadocSearched");
+ IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.js").getType("JavadocSearched");
search(
type,
REFERENCES,
@@ -266,7 +266,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
this.resultCollector);
}
public void testJavadocTypeReferenceWithJavadoc() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.java").getType("JavadocSearched");
+ IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.js").getType("JavadocSearched");
setJavadocOptions();
search(
type,
@@ -310,7 +310,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
this.resultCollector);
}
public void testJavadocTypeStringReferenceWithJavadocDisabled() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.java").getType("JavadocSearched");
+ IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.js").getType("JavadocSearched");
disableJavadocOptions();
search(
type,
@@ -325,7 +325,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
* ===================================================
*/
public void testJavadocFieldReference() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.java").getType("JavadocSearched");
+ IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.js").getType("JavadocSearched");
IField field = type.getField("javadocSearchedVar");
search(
field,
@@ -352,7 +352,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
this.resultCollector);
}
public void testJavadocFieldReferenceWithJavadoc() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.java").getType("JavadocSearched");
+ IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.js").getType("JavadocSearched");
IField field = type.getField("javadocSearchedVar");
setJavadocOptions();
search(
@@ -396,7 +396,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
* ====================================================
*/
public void testJavadocMethodReference() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.java").getType("JavadocSearched");
+ IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.js").getType("JavadocSearched");
IMethod method = type.getMethod("javadocSearchedMethod", null);
search(
method,
@@ -409,7 +409,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
this.resultCollector);
}
public void testJavadocMethodArgReference() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.java").getType("JavadocSearched");
+ IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.js").getType("JavadocSearched");
IMethod method = type.getMethod("javadocSearchedMethod", new String[] { "QString;" });
search(
method,
@@ -436,7 +436,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
this.resultCollector);
}
public void testJavadocMethodReferenceWithJavadoc() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.java").getType("JavadocSearched");
+ IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.js").getType("JavadocSearched");
setJavadocOptions();
IMethod method = type.getMethod("javadocSearchedMethod", null);
search(
@@ -450,7 +450,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
this.resultCollector);
}
public void testJavadocMethodArgReferenceWithJavadoc() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.java").getType("JavadocSearched");
+ IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.js").getType("JavadocSearched");
setJavadocOptions();
IMethod method = type.getMethod("javadocSearchedMethod", new String[] { "QString;" });
search(
@@ -479,7 +479,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
this.resultCollector);
}
public void testJavadocMethodArgReferenceWithJavadocDisabled() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.java").getType("JavadocSearched");
+ IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.js").getType("JavadocSearched");
IMethod method = type.getMethod("javadocSearchedMethod", new String[] { "QString;" });
disableJavadocOptions();
search(
@@ -495,7 +495,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
* ====================================================
*/
public void testJavadocConstructorReference() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.java").getType("JavadocSearched");
+ IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.js").getType("JavadocSearched");
IMethod method = type.getMethod("JavadocSearched", null);
search(
method,
@@ -508,7 +508,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
);
}
public void testJavadocConstructorArgReference() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.java").getType("JavadocSearched");
+ IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.js").getType("JavadocSearched");
IMethod method = type.getMethod("JavadocSearched", new String[] { "QString;" });
search(
method,
@@ -535,7 +535,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
);
}
public void testJavadocConstructorReferenceWithJavadoc() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.java").getType("JavadocSearched");
+ IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.js").getType("JavadocSearched");
setJavadocOptions();
IMethod method = type.getMethod("JavadocSearched", null);
search(
@@ -549,7 +549,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
);
}
public void testJavadocConstructorArgReferenceWithJavadoc() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.java").getType("JavadocSearched");
+ IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.js").getType("JavadocSearched");
setJavadocOptions();
IMethod method = type.getMethod("JavadocSearched", new String[] { "QString;" });
search(
@@ -578,7 +578,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
);
}
public void testJavadocConstructorReferenceWithJavadocDisabled() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.java").getType("JavadocSearched");
+ IType type = getCompilationUnit("JavaSearch", "src", "j1", "JavadocSearched.js").getType("JavadocSearched");
IMethod method = type.getMethod("JavadocSearched", null);
disableJavadocOptions();
search(
@@ -590,7 +590,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
}
private void setUpJavadocTypeParameterReferences() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearch15/src/b81190/Test.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearch15/src/b81190/Test.js",
"package b81190;\n" +
"/**\n" +
" * @param <T1> First class type parameter\n" +
@@ -647,7 +647,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
* @throws CoreException
*/
public void testBug47909() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "j3", "Y.java").getType("Y");
+ IType type = getCompilationUnit("JavaSearch", "src", "j3", "Y.js").getType("Y");
setJavadocOptions();
IMethod method = type.getMethod("Y", new String[] { "I" });
search(
@@ -666,7 +666,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
* @throws CoreException
*/
public void testBug47968type() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "j2", "Bug47968.java").getType("Bug47968");
+ IType type = getCompilationUnit("JavaSearch", "src", "j2", "Bug47968.js").getType("Bug47968");
setJavadocOptions();
search(
type,
@@ -695,7 +695,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
this.resultCollector);
}
public void testBug47968field() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "j2", "Bug47968.java").getType("Bug47968");
+ IType type = getCompilationUnit("JavaSearch", "src", "j2", "Bug47968.js").getType("Bug47968");
setJavadocOptions();
IField field = type.getField("x");
search(
@@ -711,7 +711,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
this.resultCollector);
}
public void testBug47968method() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "j2", "Bug47968.java").getType("Bug47968");
+ IType type = getCompilationUnit("JavaSearch", "src", "j2", "Bug47968.js").getType("Bug47968");
setJavadocOptions();
IMethod method = type.getMethod("foo", new String[] { "I" });
search(
@@ -727,7 +727,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
this.resultCollector);
}
public void testBug47968constructor() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "j2", "Bug47968.java").getType("Bug47968");
+ IType type = getCompilationUnit("JavaSearch", "src", "j2", "Bug47968.js").getType("Bug47968");
setJavadocOptions();
IMethod method = type.getMethod("Bug47968", new String[] { "QString;" });
search(
@@ -750,13 +750,13 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
*/
public void testBug47209type() throws CoreException {
setJavadocOptions();
- IType type = getCompilationUnit("JavaSearch", "src", "j4", "TT47209.java").getType("TT47209");
+ IType type = getCompilationUnit("JavaSearch", "src", "j4", "TT47209.js").getType("TT47209");
search(type, REFERENCES, getJavaSearchScope());
- type = getCompilationUnit("JavaSearch", "src", "j4", "TF47209.java").getType("TF47209");
+ type = getCompilationUnit("JavaSearch", "src", "j4", "TF47209.js").getType("TF47209");
search(type, REFERENCES, getJavaSearchScope());
- type = getCompilationUnit("JavaSearch", "src", "j4", "TC47209.java").getType("TC47209");
+ type = getCompilationUnit("JavaSearch", "src", "j4", "TC47209.js").getType("TC47209");
search(type, REFERENCES, getJavaSearchScope());
- type = getCompilationUnit("JavaSearch", "src", "j4", "TT47209.java").getType("TM47209");
+ type = getCompilationUnit("JavaSearch", "src", "j4", "TT47209.js").getType("TM47209");
search(type, REFERENCES, getJavaSearchScope());
assertSearchResults(
"src/j4/TT47209.java j4.TT47209 [TT47209] EXACT_MATCH INSIDE_JAVADOC\n" +
@@ -767,13 +767,13 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
}
public void testBug47209field() throws CoreException {
setJavadocOptions();
- IType type = getCompilationUnit("JavaSearch", "src", "j4", "FT47209.java").getType("FT47209");
+ IType type = getCompilationUnit("JavaSearch", "src", "j4", "FT47209.js").getType("FT47209");
search(type, REFERENCES, getJavaSearchScope());
- type = getCompilationUnit("JavaSearch", "src", "j4", "FF47209.java").getType("FF47209");
+ type = getCompilationUnit("JavaSearch", "src", "j4", "FF47209.js").getType("FF47209");
search(type, REFERENCES, getJavaSearchScope());
- type = getCompilationUnit("JavaSearch", "src", "j4", "FC47209.java").getType("FC47209");
+ type = getCompilationUnit("JavaSearch", "src", "j4", "FC47209.js").getType("FC47209");
search(type, REFERENCES, getJavaSearchScope());
- type = getCompilationUnit("JavaSearch", "src", "j4", "FT47209.java").getType("FM47209");
+ type = getCompilationUnit("JavaSearch", "src", "j4", "FT47209.js").getType("FM47209");
search(type, REFERENCES, getJavaSearchScope());
assertSearchResults(
"src/j4/FT47209.java j4.FT47209 [FT47209] EXACT_MATCH INSIDE_JAVADOC\n" +
@@ -784,13 +784,13 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
}
public void testBug47209method() throws CoreException {
setJavadocOptions();
- IType type = getCompilationUnit("JavaSearch", "src", "j4", "MT47209.java").getType("MT47209");
+ IType type = getCompilationUnit("JavaSearch", "src", "j4", "MT47209.js").getType("MT47209");
search(type, REFERENCES, getJavaSearchScope());
- type = getCompilationUnit("JavaSearch", "src", "j4", "MF47209.java").getType("MF47209");
+ type = getCompilationUnit("JavaSearch", "src", "j4", "MF47209.js").getType("MF47209");
search(type, REFERENCES, getJavaSearchScope());
- type = getCompilationUnit("JavaSearch", "src", "j4", "MC47209.java").getType("MC47209");
+ type = getCompilationUnit("JavaSearch", "src", "j4", "MC47209.js").getType("MC47209");
search(type, REFERENCES, getJavaSearchScope());
- type = getCompilationUnit("JavaSearch", "src", "j4", "MT47209.java").getType("MM47209");
+ type = getCompilationUnit("JavaSearch", "src", "j4", "MT47209.js").getType("MM47209");
search(type, REFERENCES, getJavaSearchScope());
assertSearchResults(
"src/j4/MT47209.java j4.MT47209 [MT47209] EXACT_MATCH INSIDE_JAVADOC\n" +
@@ -801,13 +801,13 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
}
public void testBug47209constructor() throws CoreException {
setJavadocOptions();
- IType type = getCompilationUnit("JavaSearch", "src", "j4", "CT47209.java").getType("CT47209");
+ IType type = getCompilationUnit("JavaSearch", "src", "j4", "CT47209.js").getType("CT47209");
search(type, REFERENCES, getJavaSearchScope());
- type = getCompilationUnit("JavaSearch", "src", "j4", "CF47209.java").getType("CF47209");
+ type = getCompilationUnit("JavaSearch", "src", "j4", "CF47209.js").getType("CF47209");
search(type, REFERENCES, getJavaSearchScope());
- type = getCompilationUnit("JavaSearch", "src", "j4", "CC47209.java").getType("CC47209");
+ type = getCompilationUnit("JavaSearch", "src", "j4", "CC47209.js").getType("CC47209");
search(type, REFERENCES, getJavaSearchScope());
- type = getCompilationUnit("JavaSearch", "src", "j4", "CT47209.java").getType("CM47209");
+ type = getCompilationUnit("JavaSearch", "src", "j4", "CT47209.js").getType("CM47209");
search(type, REFERENCES, getJavaSearchScope());
assertSearchResults(
"src/j4/CT47209.java j4.CT47209 [CT47209] EXACT_MATCH INSIDE_JAVADOC\n" +
@@ -824,27 +824,27 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
*/
public void testBug49994() throws CoreException {
setJavadocOptions();
- IType type = getCompilationUnit("JavaSearch", "src", "j5", "Bug49994.java").getType("Bug49994");
+ IType type = getCompilationUnit("JavaSearch", "src", "j5", "Bug49994.js").getType("Bug49994");
search(type, REFERENCES, getJavaSearchScope());
assertSearchResults("", this.resultCollector);
}
public void testBug49994field() throws CoreException {
setJavadocOptions();
- IType type = getCompilationUnit("JavaSearch", "src", "j5", "Bug49994.java").getType("Bug49994");
+ IType type = getCompilationUnit("JavaSearch", "src", "j5", "Bug49994.js").getType("Bug49994");
IField field = type.getField("field");
search(field, REFERENCES, getJavaSearchScope(), this.resultCollector);
assertSearchResults("src/j5/Bug49994.java void j5.Bug49994.foo() [field] EXACT_MATCH INSIDE_JAVADOC", this.resultCollector);
}
public void testBug49994method() throws CoreException {
setJavadocOptions();
- IType type = getCompilationUnit("JavaSearch", "src", "j5", "Bug49994.java").getType("Bug49994");
+ IType type = getCompilationUnit("JavaSearch", "src", "j5", "Bug49994.js").getType("Bug49994");
IMethod method = type.getMethod("bar", new String[0]);
search(method, REFERENCES, getJavaSearchScope(), this.resultCollector);
assertSearchResults("src/j5/Bug49994.java void j5.Bug49994.foo() [bar()] EXACT_MATCH INSIDE_JAVADOC", this.resultCollector);
}
public void testBug49994constructor() throws CoreException {
setJavadocOptions();
- IType type = getCompilationUnit("JavaSearch", "src", "j5", "Bug49994.java").getType("Bug49994");
+ IType type = getCompilationUnit("JavaSearch", "src", "j5", "Bug49994.js").getType("Bug49994");
IMethod method = type.getMethod("Bug49994", new String[] { "QString;" });
search(method, REFERENCES, getJavaSearchScope(), this.resultCollector);
assertSearchResults("src/j5/Bug49994.java void j5.Bug49994.foo() [Bug49994(String)] EXACT_MATCH INSIDE_JAVADOC", this.resultCollector);
@@ -858,7 +858,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
public void testBug54962() throws CoreException {
setJavadocOptions();
this.resultCollector.showInsideDoc = true;
- IPackageDeclaration packDecl = getCompilationUnit("JavaSearch", "src", "j6", "Bug54962.java").getPackageDeclaration("j6");
+ IPackageDeclaration packDecl = getCompilationUnit("JavaSearch", "src", "j6", "Bug54962.js").getPackageDeclaration("j6");
search(packDecl, REFERENCES, getJavaSearchScope());
assertSearchResults(
"src/j6/Bug54962.java j6.Bug54962 [j6] EXACT_MATCH INSIDE_JAVADOC\n" +
@@ -870,7 +870,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
public void testBug54962qualified() throws CoreException {
setJavadocOptions();
this.resultCollector.showInsideDoc = true;
- IPackageDeclaration packDecl = getCompilationUnit("JavaSearch", "src", "j7.qua.li.fied", "Bug54962a.java").getPackageDeclaration("j7.qua.li.fied");
+ IPackageDeclaration packDecl = getCompilationUnit("JavaSearch", "src", "j7.qua.li.fied", "Bug54962a.js").getPackageDeclaration("j7.qua.li.fied");
search(packDecl, REFERENCES, getJavaSearchScope());
assertSearchResults(
"src/j7/qua/li/fied/Bug54962a.java j7.qua.li.fied.Bug54962a [j7.qua.li.fied] EXACT_MATCH INSIDE_JAVADOC\n" +
@@ -887,7 +887,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
public void testBug71267() throws CoreException {
setJavadocOptions();
this.resultCollector.showInsideDoc = true;
- IPackageDeclaration packDecl = getCompilationUnit("JavaSearch", "src", "p71267", "Test.java").getPackageDeclaration("p71267");
+ IPackageDeclaration packDecl = getCompilationUnit("JavaSearch", "src", "p71267", "Test.js").getPackageDeclaration("p71267");
search(packDecl, REFERENCES, getJavaSearchScope());
assertSearchResults(
"src/p71267/Test.java p71267.Test [p71267] EXACT_MATCH INSIDE_JAVADOC\n" +
@@ -898,7 +898,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
public void testBug71267qualified() throws CoreException {
setJavadocOptions();
this.resultCollector.showInsideDoc = true;
- IPackageDeclaration packDecl = getCompilationUnit("JavaSearch", "src", "p71267.q71267", "Test.java").getPackageDeclaration("p71267.q71267");
+ IPackageDeclaration packDecl = getCompilationUnit("JavaSearch", "src", "p71267.q71267", "Test.js").getPackageDeclaration("p71267.q71267");
search(packDecl, REFERENCES, getJavaSearchScope());
assertSearchResults(
"src/p71267/q71267/Test.java p71267.q71267.Test [p71267.q71267] EXACT_MATCH INSIDE_JAVADOC\n" +
@@ -917,7 +917,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
public void testBug83285() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearch/src/b83285/A.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearch/src/b83285/A.js",
"package b83285;\n" +
"class A { }\n" +
"class C {\n" +
@@ -940,7 +940,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
public void testBug83285a() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearch/src/b83285/A.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearch/src/b83285/A.js",
"package b83285;\n" +
"class A {\n" +
" A(char c) {}\n" +
@@ -973,7 +973,7 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
public void testBug83285b() throws CoreException {
resultCollector.showRule = true;
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearch/src/b83285/A.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearch/src/b83285/A.js",
"package b83285;\n" +
"class A {\n" +
" A(char c) {}\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchMultipleProjectsTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchMultipleProjectsTests.java
index 1e38b04..ea6498b 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchMultipleProjectsTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchMultipleProjectsTests.java
@@ -51,7 +51,7 @@ public void testFieldOccurencesInWorkingCopies() throws CoreException {
IJavaProject p1 = createJavaProject("P1");
createFolder("/P1/p1");
createFile(
- "/P1/p1/X.java",
+ "/P1/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" public static int FOO;\n" +
@@ -62,7 +62,7 @@ public void testFieldOccurencesInWorkingCopies() throws CoreException {
IJavaProject p2 = createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P1"}, "");
createFolder("/P2/p2");
createFile(
- "/P2/p2/Y.java",
+ "/P2/p2/Y.js",
"package p2;\n" +
"import p1.X;\n" +
"public class Y {\n" +
@@ -72,7 +72,7 @@ public void testFieldOccurencesInWorkingCopies() throws CoreException {
);
// create working copies and rename X.FOO to X.BAR in these working copies
- wc1 = getCompilationUnit("P1/p1/X.java").getWorkingCopy(null);
+ wc1 = getCompilationUnit("P1/p1/X.js").getWorkingCopy(null);
wc1.getBuffer().setContents(
"package p1;\n" +
"public class X {\n" +
@@ -80,7 +80,7 @@ public void testFieldOccurencesInWorkingCopies() throws CoreException {
"}"
);
wc1.reconcile(ICompilationUnit.NO_AST, false, null, null);
- wc2 = getCompilationUnit("P2/p2/Y.java").getWorkingCopy(null);
+ wc2 = getCompilationUnit("P2/p2/Y.js").getWorkingCopy(null);
wc2.getBuffer().setContents(
"package p2;\n" +
"import p1.X;\n" +
@@ -126,7 +126,7 @@ public void testHierarchyScope1() throws CoreException {
createJavaProject("P1");
createFolder("/P1/p");
createFile(
- "/P1/p/X.java",
+ "/P1/p/X.js",
"package p;\n" +
"public class X {\n" +
" protected void foo() {\n" +
@@ -138,14 +138,14 @@ public void testHierarchyScope1() throws CoreException {
);
createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P1"}, "");
createFile(
- "/P2/Y.java",
+ "/P2/Y.js",
"import p.X;\n" +
"public class Y extends X {\n" +
" protected void foo() {\n" +
" }\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("/P2/Y.java");
+ ICompilationUnit cu = getCompilationUnit("/P2/Y.js");
IType type = cu.getType("Y");
IMethod method = type.getMethod("foo", new String[] {});
IJavaSearchScope scope = SearchEngine.createHierarchyScope(type);
@@ -173,7 +173,7 @@ public void testHierarchyScope2() throws CoreException {
createJavaProject("P1");
createFolder("/P1/p");
createFile(
- "/P1/p/X.java",
+ "/P1/p/X.js",
"package p;\n" +
"public class X {\n" +
" protected void foo() {\n" +
@@ -185,7 +185,7 @@ public void testHierarchyScope2() throws CoreException {
);
createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P1"}, "");
createFile(
- "/P2/Y.java",
+ "/P2/Y.js",
"import p.X;\n" +
"public class Y extends X {\n" +
" protected void foo() {\n" +
@@ -193,14 +193,14 @@ public void testHierarchyScope2() throws CoreException {
"}"
);
createFile(
- "/P2/Z.java",
+ "/P2/Z.js",
"public class Z extends Y {\n" +
" protected void foo() {\n" +
" }\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("/P2/Z.java");
+ ICompilationUnit cu = getCompilationUnit("/P2/Z.js");
IType type = cu.getType("Z");
IMethod method = type.getMethod("foo", new String[] {});
IJavaSearchScope scope = SearchEngine.createHierarchyScope(type);
@@ -228,7 +228,7 @@ public void testHierarchyScope3() throws CoreException {
createJavaProject("P1");
createFolder("/P1/p");
createFile(
- "/P1/p/X.java",
+ "/P1/p/X.js",
"package p;\n" +
"public class X {\n" +
" protected void foo() {\n" +
@@ -238,7 +238,7 @@ public void testHierarchyScope3() throws CoreException {
createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P1"}, "");
createFolder("/P2/q");
createFile(
- "/P2/q/Y.java",
+ "/P2/q/Y.js",
"package q;\n" +
"import p.X;\n" +
"public class Y extends X {\n" +
@@ -248,7 +248,7 @@ public void testHierarchyScope3() throws CoreException {
"}"
);
- ICompilationUnit cu = getCompilationUnit("/P1/p/X.java");
+ ICompilationUnit cu = getCompilationUnit("/P1/p/X.js");
IType type = cu.getType("X");
IMethod method = type.getMethod("foo", new String[] {});
IJavaSearchScope scope = SearchEngine.createHierarchyScope(type);
@@ -276,7 +276,7 @@ public void testHierarchyScope4() throws CoreException {
createJavaProject("P0");
createFolder("/P0/p0");
createFile(
- "/P0/p0/X.java",
+ "/P0/p0/X.js",
"package p0;\n" +
"public class X {\n" +
" public static X TheX;\n" +
@@ -287,7 +287,7 @@ public void testHierarchyScope4() throws CoreException {
createJavaProject("P1", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P0"}, "");
createFolder("/P1/p1");
createFile(
- "/P1/p1/T.java",
+ "/P1/p1/T.js",
"package p1;\n" +
"import p0.X;\n" +
"public class T {\n" +
@@ -299,7 +299,7 @@ public void testHierarchyScope4() throws CoreException {
createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P0", "/P1"}, "");
createFolder("/P2/p2");
createFile(
- "/P2/p2/Y.java",
+ "/P2/p2/Y.js",
"package p2;\n" +
"import p0.X;\n" +
"import p1.T;\n" +
@@ -312,7 +312,7 @@ public void testHierarchyScope4() throws CoreException {
createJavaProject("P3", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P0", "/P2"}, "");
createFolder("/P3/p3");
createFile(
- "/P3/p3/Z.java",
+ "/P3/p3/Z.js",
"package p3;\n" +
"import p0.X;\n" +
"import p2.Y;\n" +
@@ -325,7 +325,7 @@ public void testHierarchyScope4() throws CoreException {
"}"
);
- ICompilationUnit cu = getCompilationUnit("/P3/p3/Z.java");
+ ICompilationUnit cu = getCompilationUnit("/P3/p3/Z.js");
IType type = cu.getType("Z");
IMethod method = type.getMethod("foo", new String[] {});
IJavaSearchScope scope = SearchEngine.createHierarchyScope(type);
@@ -354,14 +354,14 @@ public void testMethodOccurences() throws CoreException {
IJavaProject p1 = createJavaProject("P1");
createFolder("/P1/p");
createFile(
- "/P1/p/I.java",
+ "/P1/p/I.js",
"package p;\n" +
"public interface I {\n" +
" void method(Object o);\n" +
"}"
);
createFile(
- "/P1/p/C.java",
+ "/P1/p/C.js",
"package p;\n" +
"public class C implements I {\n" +
" void method(Object o) {\n" +
@@ -376,7 +376,7 @@ public void testMethodOccurences() throws CoreException {
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {p1, p2});
JavaSearchResultCollector resultCollector = new JavaSearchResultCollector();
resultCollector.showProject = true;
- IMethod method = getCompilationUnit("/P1/p/I.java").getType("I").getMethod("method", new String[] {"QObject;"});
+ IMethod method = getCompilationUnit("/P1/p/I.js").getType("I").getMethod("method", new String[] {"QObject;"});
search(
method,
ALL_OCCURRENCES,
@@ -402,7 +402,7 @@ public void testPackageDeclaration() throws CoreException {
IJavaProject p1 = createJavaProject("P1");
createFolder("/P1/p");
createFile(
- "/P1/p/X.java",
+ "/P1/p/X.js",
"package p;\n" +
"public class X {\n" +
"}"
@@ -440,7 +440,7 @@ public void testPackageReference1() throws CoreException {
IJavaProject p1 = createJavaProject("P1");
createFolder("/P1/p");
createFile(
- "/P1/p/X.java",
+ "/P1/p/X.js",
"package p;\n" +
"public class X {\n" +
"}"
@@ -455,7 +455,7 @@ public void testPackageReference1() throws CoreException {
"");
createFolder("/P2/p");
createFile(
- "/P2/p/Y.java",
+ "/P2/p/Y.js",
"package p;\n" +
"public class Y {\n" +
"}"
@@ -464,7 +464,7 @@ public void testPackageReference1() throws CoreException {
// create package references
createFolder("/P2/q");
createFile(
- "/P2/q/Z.java",
+ "/P2/q/Z.js",
"package q;\n" +
"import p.X;\n" +
"import p.Y;\n" +
@@ -540,7 +540,7 @@ public void testReferenceInWorkingCopies() throws CoreException {
IJavaProject p1 = createJavaProject("P1");
createFolder("/P1/p1");
createFile(
- "/P1/p1/X.java",
+ "/P1/p1/X.js",
"package p1;\n" +
"public class X {\n" +
" void foo() {\n" +
@@ -548,7 +548,7 @@ public void testReferenceInWorkingCopies() throws CoreException {
"}"
);
createFile(
- "/P1/p1/Test.java",
+ "/P1/p1/Test.js",
"package p1;\n" +
"public class Test {\n" +
"}"
@@ -563,14 +563,14 @@ public void testReferenceInWorkingCopies() throws CoreException {
"");
createFolder("/P2/p2");
createFile(
- "/P2/p2/Y.java",
+ "/P2/p2/Y.js",
"package p2;\n" +
"public class Y {\n" +
"}"
);
// need a second potential match to see the problem
createFile(
- "/P2/p2/Z.java",
+ "/P2/p2/Z.js",
"public class Z {\n" +
" void bar(p1.Test test) {\n" +
" }\n" +
@@ -582,7 +582,7 @@ public void testReferenceInWorkingCopies() throws CoreException {
// create working copies
WorkingCopyOwner owner = new WorkingCopyOwner() {};
- workingCopy1 = getCompilationUnit("/P1/p1/X.java").getWorkingCopy(owner, null/*no problem requestor*/, null/*no progress monitor*/);
+ workingCopy1 = getCompilationUnit("/P1/p1/X.js").getWorkingCopy(owner, null/*no problem requestor*/, null/*no progress monitor*/);
workingCopy1.getBuffer().setContents(
"package p1;\n" +
"public class X {\n" +
@@ -591,7 +591,7 @@ public void testReferenceInWorkingCopies() throws CoreException {
"}"
);
workingCopy1.makeConsistent(null);
- workingCopy2 = getCompilationUnit("/P2/p2/Y.java").getWorkingCopy(owner, null/*no problem requestor*/, null/*no progress monitor*/);
+ workingCopy2 = getCompilationUnit("/P2/p2/Y.js").getWorkingCopy(owner, null/*no problem requestor*/, null/*no progress monitor*/);
workingCopy2.getBuffer().setContents(
"package p2;\n" +
"import p1.X;\n" +
@@ -676,14 +676,14 @@ public void testBug151189_Workspace() throws CoreException {
/*IJavaProject p1 = */createJavaProject("P1");
createFolder("/P1/pack");
createFile(
- "/P1/pack/Declaration.java",
+ "/P1/pack/Declaration.js",
"package pack;\n" +
"public class Declaration implements Interface {\n" +
" public void doOperation(int val) {}\n" +
"}\n"
);
createFile(
- "/P1/pack/Interface.java",
+ "/P1/pack/Interface.js",
"package pack;\n" +
"public interface Interface {\n" +
" void doOperation(int val);\n" +
@@ -694,7 +694,7 @@ public void testBug151189_Workspace() throws CoreException {
createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] { "/P1" }, "");
createFolder("/P2/test");
createFile(
- "/P2/test/Declaration_bis.java",
+ "/P2/test/Declaration_bis.js",
"package test;\n" +
"import pack.Interface;\n" +
"public class Declaration_bis implements Interface {\n" +
@@ -703,7 +703,7 @@ public void testBug151189_Workspace() throws CoreException {
);
// Get method
- IMethod method = getCompilationUnit("/P2/test/Declaration_bis.java").getType("Declaration_bis").getMethod("doOperation", new String[] {"I"});
+ IMethod method = getCompilationUnit("/P2/test/Declaration_bis.js").getType("Declaration_bis").getMethod("doOperation", new String[] {"I"});
// search method declaration in workspace scope
IJavaSearchScope scope = SearchEngine.createWorkspaceScope(); //JavaSearchScope(new IJavaElement[] {p1, p2});
@@ -744,14 +744,14 @@ public void testBug151189_Project() throws CoreException {
createJavaProject("P1");
createFolder("/P1/pack");
createFile(
- "/P1/pack/Declaration.java",
+ "/P1/pack/Declaration.js",
"package pack;\n" +
"public class Declaration implements Interface {\n" +
" public void doOperation(int val) {}\n" +
"}\n"
);
createFile(
- "/P1/pack/Interface.java",
+ "/P1/pack/Interface.js",
"package pack;\n" +
"public interface Interface {\n" +
" void doOperation(int val);\n" +
@@ -762,7 +762,7 @@ public void testBug151189_Project() throws CoreException {
IJavaProject p2 = createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] { "/P1" }, "");
createFolder("/P2/test");
createFile(
- "/P2/test/Declaration_bis.java",
+ "/P2/test/Declaration_bis.js",
"package test;\n" +
"import pack.Interface;\n" +
"public class Declaration_bis implements Interface {\n" +
@@ -771,7 +771,7 @@ public void testBug151189_Project() throws CoreException {
);
// Get method
- IMethod method = getCompilationUnit("/P2/test/Declaration_bis.java").getType("Declaration_bis").getMethod("doOperation", new String[] {"I"});
+ IMethod method = getCompilationUnit("/P2/test/Declaration_bis.js").getType("Declaration_bis").getMethod("doOperation", new String[] {"I"});
// search method declaration in project scope
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {p2});
@@ -805,7 +805,7 @@ public void testBug163072() throws CoreException {
/*IJavaProject p1 = */createJavaProject("P1"); // standard project using 1.4 compliance
createFolder("/P1/test");
createFile(
- "/P1/test/Test.java",
+ "/P1/test/Test.js",
"package test;\n" +
"public class Test {\n" +
" public Object getType() {\n" +
@@ -823,7 +823,7 @@ public void testBug163072() throws CoreException {
createJavaProject("P2", new String[] {""}, new String[] {"JCL15_LIB"}, new String[] { "/P1" }, "", "1.5");
createFolder("/P2/pack");
createFile(
- "/P2/pack/FactoryContainer.java",
+ "/P2/pack/FactoryContainer.js",
"package pack;\n" +
"public class FactoryContainer {\n" +
" public enum FactoryType { PLUGIN }\n" +
@@ -833,7 +833,7 @@ public void testBug163072() throws CoreException {
"}\n"
);
createFile(
- "/P2/pack/Reference.java",
+ "/P2/pack/Reference.js",
"package pack;\n" +
"public class Reference {\n" +
" private final FactoryContainer _fc;\n" +
@@ -847,7 +847,7 @@ public void testBug163072() throws CoreException {
);
// Get method
- IMethod method = getCompilationUnit("/P1/test/Test.java").getType("Test").getMethod("getType", new String[0]);
+ IMethod method = getCompilationUnit("/P1/test/Test.js").getType("Test").getMethod("getType", new String[0]);
assertTrue("Method 'Test.getType()' should exist!", method.exists());
// search method declaration in workspace scope
@@ -876,7 +876,7 @@ public void testBug167743() throws CoreException {
IJavaProject p = createJavaProject("P");
createFolder("/P/test");
createFile(
- "/P/test/TestClass.java",
+ "/P/test/TestClass.js",
"package test;\n" +
"public class Test {\n" +
"}\n"
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchScopeTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchScopeTests.java
index a067dac..9a04548 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchScopeTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchScopeTests.java
@@ -324,7 +324,7 @@ public void testScopeEncloses09() throws CoreException {
try {
IJavaProject project = createJavaProject("P");
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {project});
- assertTrue("scope on P should enclose \"/P/x/y/A.java\"", scope.encloses("/P/x/y/A.java"));
+ assertTrue("scope on P should enclose \"/P/x/y/A.java\"", scope.encloses("/P/x/y/A.js"));
} finally {
deleteProject("P");
}
@@ -337,8 +337,8 @@ public void testScopeEncloses10() throws CoreException {
try {
IJavaProject project = createJavaProject("P");
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {project});
- ICompilationUnit cu = getCompilationUnit("/P/x/y/A.java");
- assertTrue("scope on P should enclose compilation unit A.java", scope.encloses(cu));
+ ICompilationUnit cu = getCompilationUnit("/P/x/y/A.js");
+ assertTrue("scope on P should enclose compilation unit A.js", scope.encloses(cu));
} finally {
deleteProject("P");
}
@@ -351,7 +351,7 @@ public void testScopeEncloses11() throws CoreException {
try {
IJavaProject project = createJavaProject("P");
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {project});
- assertTrue("scope on P should enclose \"/P/A.java\"", scope.encloses("/P/A.java"));
+ assertTrue("scope on P should enclose \"/P/A.java\"", scope.encloses("/P/A.js"));
} finally {
deleteProject("P");
}
@@ -364,8 +364,8 @@ public void testScopeEncloses12() throws CoreException {
try {
IJavaProject project = createJavaProject("P");
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {project});
- ICompilationUnit cu = getCompilationUnit("/P/A.java");
- assertTrue("scope on P should enclose compilation unit A.java", scope.encloses(cu));
+ ICompilationUnit cu = getCompilationUnit("/P/A.js");
+ assertTrue("scope on P should enclose compilation unit A.js", scope.encloses(cu));
} finally {
deleteProject("P");
}
@@ -378,7 +378,7 @@ public void testScopeEncloses13() throws CoreException {
try {
IJavaProject project = createJavaProject("P");
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {project});
- ICompilationUnit cu = getCompilationUnit("/P/x/y/A.java");
+ ICompilationUnit cu = getCompilationUnit("/P/x/y/A.js");
IType type = cu.getType("A");
assertTrue("scope on P should enclose type A", scope.encloses(type));
} finally {
@@ -539,7 +539,7 @@ public void testScopeEncloses23() throws CoreException {
try {
IJavaProject project = createJavaProject("P", new String[] {"src"}, "bin");
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {project});
- assertTrue("scope on P should enclose \"/P/src/x/y/A.java\"", scope.encloses("/P/src/x/y/A.java"));
+ assertTrue("scope on P should enclose \"/P/src/x/y/A.java\"", scope.encloses("/P/src/x/y/A.js"));
} finally {
deleteProject("P");
}
@@ -552,8 +552,8 @@ public void testScopeEncloses24() throws CoreException {
try {
IJavaProject project = createJavaProject("P", new String[] {"src"}, "bin");
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {project});
- ICompilationUnit cu = getCompilationUnit("/P/src/x/y/A.java");
- assertTrue("scope on P should enclose compilation unit A.java", scope.encloses(cu));
+ ICompilationUnit cu = getCompilationUnit("/P/src/x/y/A.js");
+ assertTrue("scope on P should enclose compilation unit A.js", scope.encloses(cu));
} finally {
deleteProject("P");
}
@@ -566,7 +566,7 @@ public void testScopeEncloses25() throws CoreException {
try {
IJavaProject project = createJavaProject("P", new String[] {"src"}, "bin");
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {project});
- assertTrue("scope on P should enclose \"/P/src/A.java\"", scope.encloses("/P/src/A.java"));
+ assertTrue("scope on P should enclose \"/P/src/A.java\"", scope.encloses("/P/src/A.js"));
} finally {
deleteProject("P");
}
@@ -579,8 +579,8 @@ public void testScopeEncloses26() throws CoreException {
try {
IJavaProject project = createJavaProject("P", new String[] {"src"}, "bin");
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {project});
- ICompilationUnit cu = getCompilationUnit("/P/src/A.java");
- assertTrue("scope on P should enclose compilation unit A.java", scope.encloses(cu));
+ ICompilationUnit cu = getCompilationUnit("/P/src/A.js");
+ assertTrue("scope on P should enclose compilation unit A.js", scope.encloses(cu));
} finally {
deleteProject("P");
}
@@ -593,7 +593,7 @@ public void testScopeEncloses27() throws CoreException {
try {
IJavaProject project = createJavaProject("P", new String[] {"src"}, "bin");
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {project});
- ICompilationUnit cu = getCompilationUnit("/P/src/x/y/A.java");
+ ICompilationUnit cu = getCompilationUnit("/P/src/x/y/A.js");
IType type = cu.getType("A");
assertTrue("scope on P should enclose type A", scope.encloses(type));
} finally {
@@ -754,7 +754,7 @@ public void testScopeEncloses37() throws CoreException {
try {
IJavaProject project = createJavaProject("P", new String[] {"src/"}, "bin");
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {project});
- assertTrue("scope on P should enclose \"/P/src/x/y/A.java\"", scope.encloses("/P/src/x/y/A.java"));
+ assertTrue("scope on P should enclose \"/P/src/x/y/A.java\"", scope.encloses("/P/src/x/y/A.js"));
} finally {
deleteProject("P");
}
@@ -767,8 +767,8 @@ public void testScopeEncloses38() throws CoreException {
try {
IJavaProject project = createJavaProject("P", new String[] {"src/"}, "bin");
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {project});
- ICompilationUnit cu = getCompilationUnit("/P/src/x/y/A.java");
- assertTrue("scope on P should enclose compilation unit A.java", scope.encloses(cu));
+ ICompilationUnit cu = getCompilationUnit("/P/src/x/y/A.js");
+ assertTrue("scope on P should enclose compilation unit A.js", scope.encloses(cu));
} finally {
deleteProject("P");
}
@@ -781,7 +781,7 @@ public void testScopeEncloses39() throws CoreException {
try {
IJavaProject project = createJavaProject("P", new String[] {"src/"}, "bin");
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {project});
- assertTrue("scope on P should enclose \"/P/src/A.java\"", scope.encloses("/P/src/A.java"));
+ assertTrue("scope on P should enclose \"/P/src/A.java\"", scope.encloses("/P/src/A.js"));
} finally {
deleteProject("P");
}
@@ -794,8 +794,8 @@ public void testScopeEncloses40() throws CoreException {
try {
IJavaProject project = createJavaProject("P", new String[] {"src/"}, "bin");
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {project});
- ICompilationUnit cu = getCompilationUnit("/P/src/A.java");
- assertTrue("scope on P should enclose compilation unit A.java", scope.encloses(cu));
+ ICompilationUnit cu = getCompilationUnit("/P/src/A.js");
+ assertTrue("scope on P should enclose compilation unit A.js", scope.encloses(cu));
} finally {
deleteProject("P");
}
@@ -808,7 +808,7 @@ public void testScopeEncloses41() throws CoreException {
try {
IJavaProject project = createJavaProject("P", new String[] {"src/"}, "bin");
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {project});
- ICompilationUnit cu = getCompilationUnit("/P/src/x/y/A.java");
+ ICompilationUnit cu = getCompilationUnit("/P/src/x/y/A.js");
IType type = cu.getType("A");
assertTrue("scope on P should enclose type A", scope.encloses(type));
} finally {
@@ -824,19 +824,19 @@ public void testBug101022() throws CoreException {
try {
IJavaProject project = createJavaProject("P1", new String[] {"src", "test", "test2"}, "bin");
createFile(
- "/P1/src/Test.java",
+ "/P1/src/Test.js",
"public class Test {\n" +
" protected void foo() {}\n" +
"}"
);
createFile(
- "/P1/test/Test.java",
+ "/P1/test/Test.js",
"public class Test {\n" +
" protected void foo() {}\n" +
"}"
);
createFile(
- "/P1/test2/Test.java",
+ "/P1/test2/Test.js",
"public class Test {\n" +
" protected void foo() {}\n" +
"}"
@@ -863,18 +863,18 @@ public void testBug101426() throws CoreException {
try {
IJavaProject project = createJavaProject("P1", new String[] {"src/", "test/", "test2/"}, new String[] {"JCL_LIB"}, "bin");
createFile(
- "/P1/src/Test.java",
+ "/P1/src/Test.js",
"public interface ITest {\n" +
"}"
);
createFile(
- "/P1/test/Test.java",
+ "/P1/test/Test.js",
"public class Test {\n" +
" ITest test;\n" +
"}"
);
createFile(
- "/P1/test2/Test.java",
+ "/P1/test2/Test.js",
"public class Test2 {\n" +
" ITest test;\n" +
"}"
@@ -901,7 +901,7 @@ public void testBug101777() throws CoreException {
try {
IJavaProject project = createJavaProject("P1");
createFile(
- "/P1/Test.java",
+ "/P1/Test.js",
"public class Test {\n" +
" public static void main(String[] args) {}\n" +
"}"
@@ -941,12 +941,12 @@ public void testBug119203() throws CoreException {
try {
IJavaProject project = createJavaProject("P1", new String[] {"src"}, "bin");
createFile(
- "/P1/src/Test.java",
+ "/P1/src/Test.js",
"public class Test {\n" +
"}"
);
createFile(
- "/P1/src/X.java",
+ "/P1/src/X.js",
"public class X {\n" +
" Test test;\n" +
"}"
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchTests.java
index 2177042..ee56c27 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchTests.java
@@ -28,341 +28,436 @@ import org.eclipse.wst.jsdt.internal.core.JavaModelStatus;
*/
public class JavaSearchTests extends AbstractJavaSearchTests implements IJavaSearchConstants {
-public JavaSearchTests(String name) {
- super(name);
-}
-public static Test suite() {
- return buildModelTestSuite(JavaSearchTests.class);
-}
-// Use this static initializer to specify subset for tests
-// All specified tests which do not belong to the class are skipped...
-static {
-// org.eclipse.wst.jsdt.internal.core.search.BasicSearchEngine.VERBOSE = true;
-// TESTS_PREFIX = "testPackageDeclaration";
-// TESTS_NAMES = new String[] { "testMethodReference17" };
-// TESTS_NUMBERS = new int[] { 113671 };
-// TESTS_RANGE = new int[] { 16, -1 };
-}
+ public JavaSearchTests(String name) {
+ super(name);
+ }
+ public static Test suite() {
+ return buildModelTestSuite(JavaSearchTests.class);
+ }
+// Use this static initializer to specify subset for tests
+// All specified tests which do not belong to the class are skipped...
+ static {
+// org.eclipse.jsdt.internal.core.search.BasicSearchEngine.VERBOSE = true;
+// TESTS_PREFIX = "testPackageDeclaration";
+// TESTS_NAMES = new String[] { "testMethodReference17" };
+// TESTS_NUMBERS = new int[] { 113671 };
+// TESTS_RANGE = new int[] { 16, -1 };
+ }
-/* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.core.tests.model.AbstractJavaModelTests#copyDirectory(java.io.File, java.io.File)
- */
-protected void copyDirectory(File sourceDir, File targetDir) throws IOException {
- if (!targetDir.exists()) {
- super.copyDirectory(sourceDir, targetDir);
+ /* (non-Javadoc)
+ * @see org.eclipse.jsdt.core.tests.model.AbstractJavaModelTests#copyDirectory(java.io.File, java.io.File)
+ */
+ protected void copyDirectory(File sourceDir, File targetDir) throws IOException {
+ if (!targetDir.exists()) {
+ super.copyDirectory(sourceDir, targetDir);
+ }
}
-}
-/* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.core.tests.model.SuiteOfTestCases#setUpSuite()
- */
-public void setUpSuite() throws Exception {
- super.setUpSuite();
+ /* (non-Javadoc)
+ * @see org.eclipse.jsdt.core.tests.model.SuiteOfTestCases#setUpSuite()
+ */
+ public void setUpSuite() throws Exception {
+ super.setUpSuite();
- if (JAVA_PROJECT == null) {
- JAVA_PROJECT = setUpJavaProject("JavaSearch");
- setUpJavaProject("JavaSearch15", "1.5");
+ if (JAVA_PROJECT == null) {
+ JAVA_PROJECT = setUpJavaProject("JsSearch");
+// setUpJavaProject("JavaSearch15", "1.5");
+ }
}
-}
-public void tearDownSuite() throws Exception {
- if (JAVA_SEARCH_SUITES == null) {
- deleteProject("JavaSearch");
- deleteProject("JavaSearch15");
- } else {
- JAVA_SEARCH_SUITES.remove(getClass());
- if (JAVA_SEARCH_SUITES.size() == 0) {
- deleteProject("JavaSearch");
- deleteProject("JavaSearch15");
+ public void tearDownSuite() throws Exception {
+ if (JAVA_SEARCH_SUITES == null) {
+ deleteProject("JsSearch");
+// deleteProject("JavaSearch15");
+ } else {
+ JAVA_SEARCH_SUITES.remove(getClass());
+ if (JAVA_SEARCH_SUITES.size() == 0) {
+ deleteProject("JsSearch");
+ //deleteProject("JavaSearch15");
+ }
}
+
+ super.tearDownSuite();
}
- super.tearDownSuite();
-}
-/**
- * Simple constructor declaration test.
- */
-public void testConstructorDeclaration01() throws CoreException { // was testSimpleConstructorDeclaration
- IType type = getCompilationUnit("JavaSearch", "src", "p", "A.java").getType("A");
- IMethod constructor = type.getMethod("A", new String[] {"QX;"});
- search(
- constructor,
- DECLARATIONS,
- getJavaSearchScope(),
- this.resultCollector);
- assertSearchResults("src/p/A.java p.A(X) [A]", resultCollector);
-}
-/**
- * Constructor declaration in jar file test.
- */
-public void testConstructorDeclaration02() throws CoreException { // was testConstructorDeclarationInJar
- IType type = getClassFile("JavaSearch", "MyJar.jar", "p1", "A.class").getType();
- IMethod method = type.getMethod("A", new String[] {"Ljava.lang.String;"});
- search(
- method,
- DECLARATIONS,
- getJavaSearchScope(),
- this.resultCollector);
- assertSearchResults(
- "MyJar.jar p1.A(java.lang.String) [No source]",
- this.resultCollector);
-}
-/**
- * Simple constructor reference test.
- */
-public void testConstructorReference01() throws CoreException { // was testSimpleConstructorReference1
- IType type = getCompilationUnit("JavaSearch", "src", "p", "A.java").getType("A");
- IMethod constructor = type.getMethod("A", new String[] {"QX;"});
+ public void test00() throws CoreException { // was testSimpleConstructorReference1
+ IMethod method =
+ getCompilationUnit("JsSearch", "src", "a6", "A.js").
+ getMethod("m", new String[] {});
+ searchDeclarationsOfAccessedFields(
+ method,
+ resultCollector
+ );
+ assertSearchResults(
+ "src/a6/A.js a6.P.f [P.prototype.f=1]",
+ this.resultCollector);
+ }
+
+
+
+ public void test01() throws CoreException { // was testSimpleConstructorDeclaration
+ ICompilationUnit compilationUnit = getCompilationUnit("JsSearch", "src", "p", "A.js");
+ IMethod constructor = compilationUnit.getMethod("A", new String[] {"QX;"});
+ search(
+ constructor,
+ DECLARATIONS,
+ getJavaSearchScope(),
+ this.resultCollector);
+ assertSearchResults("src/p/A.js any A(any) [A]", resultCollector);
+ }
+
+
+ public void test02() throws CoreException { // was testSimpleConstructorReference1
+ ICompilationUnit compilationUnit = getCompilationUnit("JsSearch", "src", "p", "A.js");
+ IMethod constructor = compilationUnit.getMethod("A", new String[] {"QX;"});
search(
constructor,
REFERENCES,
getJavaSearchScope(),
this.resultCollector);
assertSearchResults(
- "src/Test.java void Test.main(String[]) [new p.A(y)]",
+ "src/p/A.js any main(any) [A(0)]",
this.resultCollector);
-}
-/**
- * Simple constructor reference test.
- */
-public void testConstructorReference02() throws CoreException { // was testSimpleConstructorReference2
- search(
- "p.A(X)",
- CONSTRUCTOR,
- REFERENCES,
- getJavaSearchScope(),
- this.resultCollector);
- assertSearchResults(
- "src/Test.java void Test.main(String[]) [new p.A(y)]",
- this.resultCollector);
-}
-/**
- * Constructor reference using an explicit constructor call.
- */
-public void testConstructorReference03() throws CoreException { // was testConstructorReferenceExplicitConstructorCall1
- IType type = getCompilationUnit("JavaSearch", "src", "p", "Y.java").getType("Y");
- IMethod method = type.getMethod("Y", new String[] {"I"});
- search(
- method,
- REFERENCES,
- getJavaSearchScope(),
- this.resultCollector);
- assertSearchResults(
- "src/p/Z.java p.Z(int) [super(i);]",
- this.resultCollector);
-}
-/**
- * Constructor reference using an explicit constructor call.
- */
-public void testConstructorReference04() throws CoreException { // was testConstructorReferenceExplicitConstructorCall2
- IType type = getCompilationUnit("JavaSearch", "src", "p", "X.java").getType("X");
- IMethod method = type.getMethod("X", new String[] {"I"});
- search(
- method,
- REFERENCES,
- getJavaSearchScope(),
- this.resultCollector);
- assertSearchResults(
- "src/p/Y.java p.Y(int) [super(i);]\n" +
- "src/p/Y.java p.Y(boolean) [super(1);]",
- this.resultCollector);
-}
-/**
- * Constructor reference using an implicit constructor call.
- * (regression test for bug 23112 search: need a way to search for references to the implicit non-arg constructor)
- */
-public void testConstructorReference05() throws CoreException { // was testConstructorReferenceImplicitConstructorCall1
- IType type = getCompilationUnit("JavaSearch", "src", "c7", "X.java").getType("X");
- IMethod method = type.getMethod("X", new String[] {});
- search(
- method,
- REFERENCES,
- getJavaSearchScope(),
- this.resultCollector);
- assertSearchResults(
- "src/c7/Y.java c7.Y() [Y]",
- this.resultCollector);
-}
-/**
- * Constructor reference using an implicit constructor call.
- * (regression test for bug 23112 search: need a way to search for references to the implicit non-arg constructor)
- */
-public void testConstructorReference06() throws CoreException { // was testConstructorReferenceImplicitConstructorCall2
- search(
- "c8.X()",
- CONSTRUCTOR,
- REFERENCES,
- getJavaSearchScope(),
- this.resultCollector);
- assertSearchResults(
- "src/c8/Y.java c8.Y [Y]",
- this.resultCollector);
-}
-/**
- * Constructor reference in a field initializer.
- * (regression test for PR 1GKZ8VZ: ITPJCORE:WINNT - Search - did not find references to member constructor)
- */
-public void testConstructorReference07() throws CoreException { // was testConstructorReferenceInFieldInitializer
- IType type = getCompilationUnit("JavaSearch", "src", "", "A.java").getType("A").getType("Inner");
- IMethod method = type.getMethod("Inner", new String[] {"I"});
- search(
- method,
- REFERENCES,
- getJavaSearchScope(),
- this.resultCollector);
- assertSearchResults(
- "src/A.java A.field [new Inner(1)]\n" +
- "src/A.java A.field [new Inner(2)]",
- this.resultCollector);
-}
-/**
- * Constructor reference in case of default constructor of member type
- * (regression test for bug 43276)
- */
-public void testConstructorReference08() throws CoreException { // was testConstructorReferenceDefaultConstructorOfMemberClass
+ }
+
+ public void test03() throws CoreException { // was testSimpleConstructorReference1
+ ICompilationUnit compilationUnit = getCompilationUnit("JsSearch", "src", "p", "A.js");
+ IField field = compilationUnit.getField("x");
search(
- "c10.X.Inner()",
- CONSTRUCTOR,
- REFERENCES,
+ field,
+ DECLARATIONS,
getJavaSearchScope(),
this.resultCollector);
assertSearchResults(
- "src/c10/X.java c10.B() [new X().super();]",
+ "src/p/A.js x [x]",
this.resultCollector);
-}
-/*
- * Generic constructor reference
- */
-public void testConstructorReference09() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/p2/X.java").getType("X");
- IMethod method = type.getMethod("X", new String[] {"QE;"});
- search(
- method,
- REFERENCES,
- ERASURE_RULE,
- getJavaSearchScope15(),
- this.resultCollector);
- assertSearchResults(
- "src/p2/Y.java Object p2.Y.foo() [new X<Object>(this)]",
- this.resultCollector);
-}
-/**
- * Constructor reference using an implicit constructor call.
- * (regression test for bug 23112 search: need a way to search for references to the implicit non-arg constructor)
- */
-public void testConstructorReference10() throws CoreException { // was testConstructorReferenceImplicitConstructorCall2
- resultCollector.showSynthetic = true;
+ }
+
+ public void test04() throws CoreException { // was testSimpleConstructorReference1
+ ICompilationUnit compilationUnit = getCompilationUnit("JsSearch", "src", "p", "A.js");
+ IField field = compilationUnit.getField("x");
search(
- "c11.A()",
- CONSTRUCTOR,
- REFERENCES,
+ field,
+ REFERENCES,
getJavaSearchScope(),
this.resultCollector);
assertSearchResults(
- "src/c11/A.java c11.A1 [A1] SYNTHETIC\n" +
- "src/c11/A.java c11.A2() [A2] SYNTHETIC\n" +
- "src/c11/A.java c11.A3() [super();]",
+ "src/p/A.js any A(any) [x]",
this.resultCollector);
-}
-/**
- * CoreException thrown during accept.
- * (regression test for PR #1G3UI7A)
- */
-public void testCoreException() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "p", "X.java").getType("X");
- SearchRequestor result = new SearchRequestor() {
- public void acceptSearchMatch(SearchMatch match) throws CoreException {
- throw new CoreException(new JavaModelStatus(-1, "test"));
- }
- };
- try {
+ }
+
+ public void test05() throws CoreException { // was testSimpleConstructorReference1
+ IType type = getCompilationUnit("JsSearch", "src", "p", "cls1.js").getType("MyClass");
+ IMethod method = type.getMethod("someMethod", new String[] {});
+
search(
- type,
+ method,
DECLARATIONS,
getJavaSearchScope(),
- result);
- } catch (CoreException e) {
- assertEquals("Unexpected CoreException has been thrown", "test", e.getStatus().getMessage());
- return;
+ this.resultCollector);
+ assertSearchResults(
+ "src/p/cls1.js any MyClass_someMethod() [MyClass_someMethod]",
+ this.resultCollector);
}
- assertTrue("CoreException should have been thrown", false);
-}
-/**
- * Declaration of accessed fields test.
- * (regression test for bug 6538 searchDeclarationsOf* incorrect)
- */
-public void testDeclarationOfAccessedFields1() throws CoreException {
- IMethod method =
- getCompilationUnit("JavaSearch", "src", "a5", "B.java").
- getType("C").getMethod("i", new String[] {});
- searchDeclarationsOfAccessedFields(
- method,
- resultCollector
- );
- assertSearchResults(
- "",
- this.resultCollector);
-}
-/**
- * Declaration of accessed fields test.
- * (regression test for bug 6538 searchDeclarationsOf* incorrect)
- */
-public void testDeclarationOfAccessedFields2() throws CoreException {
- IMethod method =
- getCompilationUnit("JavaSearch", "src", "a6", "A.java").
- getType("B").getMethod("m", new String[] {});
- searchDeclarationsOfAccessedFields(
- method,
- resultCollector
- );
- assertSearchResults(
- "src/a6/A.java a6.B.f [f]",
- this.resultCollector);
-}
-/**
- * Declaration of accessed fields test.
- * (regression test for bug 10386 NPE in MatchLocator.lookupType)
- */
-public void testDeclarationOfAccessedFields3() throws CoreException {
- IMethod method =
- getCompilationUnit("JavaSearch", "src", "b6", "A.java").
- getType("A").getMethod("foo", new String[] {});
- searchDeclarationsOfAccessedFields(
- method,
- resultCollector
- );
- assertSearchResults(
- "src/b6/A.java b6.A.field [field]",
- this.resultCollector);
-}
-/**
- * Declaration of referenced types test.
- */
-public void testDeclarationOfReferencedTypes01() throws CoreException {
- IMethod method =
- getCompilationUnit("JavaSearch", "src", "a3", "References.java").
- getType("References").getMethod("foo", new String[] {});
- searchDeclarationsOfReferencedTypes(
- method,
- resultCollector
- );
- assertSearchResults(
- "src/a3/X.java a3.X [X]\n" +
- "src/a3/Z.java a3.Z [Z]\n" +
- "src/a3/b/A.java a3.b.A [A]\n" +
- "src/a3/b/A.java a3.b.A$B$C [C]\n" +
- "src/a3/b/A.java a3.b.A$B [B]\n" +
- getExternalJCLPathString() + " java.lang.Object\n" +
- "src/a3/Y.java a3.Y [Y]\n" +
- "src/a3/b/B.java a3.b.B [B]",
- this.resultCollector);
-}
+
+ public void test06() throws CoreException {
+ IMethod method =
+ getCompilationUnit("JsSearch", "src", "a6", "A.js").
+ getMethod("m", new String[] {});
+ searchDeclarationsOfAccessedFields(
+ method,
+ resultCollector
+ );
+ assertSearchResults(
+ "src/a6/A.js a6.P.f [P.prototype.f=1]",
+ this.resultCollector);
+ }
+// /**
+// * Simple constructor declaration test.
+// */
+// public void testConstructorDeclaration01() throws CoreException { // was testSimpleConstructorDeclaration
+// IType type = getCompilationUnit("JsSearch", "src", "p", "A.js").getType("A");
+// IMethod constructor = type.getMethod("A", new String[] {"QX;"});
+// search(
+// constructor,
+// DECLARATIONS,
+// getJavaSearchScope(),
+// this.resultCollector);
+// assertSearchResults("src/p/A.js p.A(X) [A]", resultCollector);
+// }
+// /**
+// * Constructor declaration in jar file test.
+// */
+// public void testConstructorDeclaration02() throws CoreException { // was testConstructorDeclarationInJar
+// IType type = getClassFile("JsSearch", "MyJar.jar", "p1", "A.class").getType();
+// IMethod method = type.getMethod("A", new String[] {"Ljava.lang.String;"});
+// search(
+// method,
+// DECLARATIONS,
+// getJavaSearchScope(),
+// this.resultCollector);
+// assertSearchResults(
+// "MyJar.jar p1.A(java.lang.String) [No source]",
+// this.resultCollector);
+// }
+// /**
+// * Simple constructor reference test.
+// */
+// public void testConstructorReference01() throws CoreException { // was testSimpleConstructorReference1
+// IType type = getCompilationUnit("JsSearch", "src", "p", "A.js").getType("A");
+// IMethod constructor = type.getMethod("A", new String[] {"QX;"});
+// search(
+// constructor,
+// REFERENCES,
+// getJavaSearchScope(),
+// this.resultCollector);
+// assertSearchResults(
+// "src/Test.js void Test.main(String[]) [new p.A(y)]",
+// this.resultCollector);
+// }
+// /**
+// * Simple constructor reference test.
+// */
+// public void testConstructorReference02() throws CoreException { // was testSimpleConstructorReference2
+// search(
+// "p.A(X)",
+// CONSTRUCTOR,
+// REFERENCES,
+// getJavaSearchScope(),
+// this.resultCollector);
+// assertSearchResults(
+// "src/Test.js void Test.main(String[]) [new p.A(y)]",
+// this.resultCollector);
+// }
+// /**
+// * Constructor reference using an explicit constructor call.
+// */
+// public void testConstructorReference03() throws CoreException { // was testConstructorReferenceExplicitConstructorCall1
+// IType type = getCompilationUnit("JsSearch", "src", "p", "Y.js").getType("Y");
+// IMethod method = type.getMethod("Y", new String[] {"I"});
+// search(
+// method,
+// REFERENCES,
+// getJavaSearchScope(),
+// this.resultCollector);
+// assertSearchResults(
+// "src/p/Z.js p.Z(int) [super(i)]",
+// this.resultCollector);
+// }
+// /**
+// * Constructor reference using an explicit constructor call.
+// */
+// public void testConstructorReference04() throws CoreException { // was testConstructorReferenceExplicitConstructorCall2
+// IType type = getCompilationUnit("JsSearch", "src", "p", "X.js").getType("X");
+// IMethod method = type.getMethod("X", new String[] {"I"});
+// search(
+// method,
+// REFERENCES,
+// getJavaSearchScope(),
+// this.resultCollector);
+// assertSearchResults(
+// "src/p/Y.js p.Y(int) [super(i)]\n" +
+// "src/p/Y.js p.Y(boolean) [super(1)]",
+// this.resultCollector);
+// }
+// /**
+// * Constructor reference using an implicit constructor call.
+// * (regression test for bug 23112 search: need a way to search for references to the implicit non-arg constructor)
+// */
+// public void testConstructorReference05() throws CoreException { // was testConstructorReferenceImplicitConstructorCall1
+// IType type = getCompilationUnit("JsSearch", "src", "c7", "X.js").getType("X");
+// IMethod method = type.getMethod("X", new String[] {});
+// search(
+// method,
+// REFERENCES,
+// getJavaSearchScope(),
+// this.resultCollector);
+// assertSearchResults(
+// "src/c7/Y.js c7.Y() [Y]",
+// this.resultCollector);
+// }
+// /**
+// * Constructor reference using an implicit constructor call.
+// * (regression test for bug 23112 search: need a way to search for references to the implicit non-arg constructor)
+// */
+// public void testConstructorReference06() throws CoreException { // was testConstructorReferenceImplicitConstructorCall2
+// search(
+// "c8.X()",
+// CONSTRUCTOR,
+// REFERENCES,
+// getJavaSearchScope(),
+// this.resultCollector);
+// assertSearchResults(
+// "src/c8/Y.js c8.Y [Y]",
+// this.resultCollector);
+// }
+// /**
+// * Constructor reference in a field initializer.
+// * (regression test for PR 1GKZ8VZ: ITPJCORE:WINNT - Search - did not find references to member constructor)
+// */
+// public void testConstructorReference07() throws CoreException { // was testConstructorReferenceInFieldInitializer
+// IType type = getCompilationUnit("JsSearch", "src", "", "A.js").getType("A").getType("Inner");
+// IMethod method = type.getMethod("Inner", new String[] {"I"});
+// search(
+// method,
+// REFERENCES,
+// getJavaSearchScope(),
+// this.resultCollector);
+// assertSearchResults(
+// "src/A.js A.field [new Inner(1)]\n" +
+// "src/A.js A.field [new Inner(2)]",
+// this.resultCollector);
+// }
+// /**
+// * Constructor reference in case of default constructor of member type
+// * (regression test for bug 43276)
+// */
+// public void testConstructorReference08() throws CoreException { // was testConstructorReferenceDefaultConstructorOfMemberClass
+// search(
+// "c10.X.Inner()",
+// CONSTRUCTOR,
+// REFERENCES,
+// getJavaSearchScope(),
+// this.resultCollector);
+// assertSearchResults(
+// "src/c10/X.js c10.B() [new X().super()]",
+// this.resultCollector);
+// }
+// /*
+// * Generic constructor reference
+// */
+// public void testConstructorReference09() throws CoreException {
+// IType type = getCompilationUnit("JavaSearch15/src/p2/X.js").getType("X");
+// IMethod method = type.getMethod("X", new String[] {"QE;"});
+// search(
+// method,
+// REFERENCES,
+// ERASURE_RULE,
+// getJavaSearchScope15(),
+// this.resultCollector);
+// assertSearchResults(
+// "src/p2/Y.js Object p2.Y.foo() [new X<Object>(this)]",
+// this.resultCollector);
+// }
+// /**
+// * Constructor reference using an implicit constructor call.
+// * (regression test for bug 23112 search: need a way to search for references to the implicit non-arg constructor)
+// */
+// public void testConstructorReference10() throws CoreException { // was testConstructorReferenceImplicitConstructorCall2
+// resultCollector.showSynthetic = true;
+// search(
+// "c11.A()",
+// CONSTRUCTOR,
+// REFERENCES,
+// getJavaSearchScope(),
+// this.resultCollector);
+// assertSearchResults(
+// "src/c11/A.js c11.A1 [A1] SYNTHETIC\n" +
+// "src/c11/A.js c11.A2() [A2] SYNTHETIC\n" +
+// "src/c11/A.js c11.A3() [super()]",
+// this.resultCollector);
+// }
+ /**
+ * CoreException thrown during accept.
+ * (regression test for PR #1G3UI7A)
+ */
+ public void testCoreException() throws CoreException {
+ ICompilationUnit compilationUnit = getCompilationUnit("JsSearch", "src", "p", "A.js");
+ IMethod method = compilationUnit.getMethod("A", new String[] {"QX;"});
+ SearchRequestor result = new SearchRequestor() {
+ public void acceptSearchMatch(SearchMatch match) throws CoreException {
+ throw new CoreException(new JavaModelStatus(-1, "test"));
+ }
+ };
+ try {
+ search(
+ method,
+ DECLARATIONS,
+ getJavaSearchScope(),
+ result);
+ } catch (CoreException e) {
+ assertEquals("Unexpected CoreException has been thrown", "test", e.getStatus().getMessage());
+ return;
+ }
+ assertTrue("CoreException should have been thrown", false);
+ }
+ /**
+ * Declaration of accessed fields test.
+ * (regression test for bug 6538 searchDeclarationsOf* incorrect)
+ */
+ public void testDeclarationOfAccessedFields1() throws CoreException {
+ IMethod method =
+ getCompilationUnit("JsSearch", "src", "a5", "B.js").
+ getType("C").getMethod("i", new String[] {});
+ searchDeclarationsOfAccessedFields(
+ method,
+ resultCollector
+ );
+ assertSearchResults(
+ "",
+ this.resultCollector);
+ }
+// COVERED BY TEST06
+// /**
+// * Declaration of accessed fields test.
+// * (regression test for bug 6538 searchDeclarationsOf* incorrect)
+// */
+// public void testDeclarationOfAccessedFields2() throws CoreException {
+// IMethod method =
+// getCompilationUnit("JsSearch", "src", "a6", "A.js").
+// getType("P").getMethod("mm", new String[] {});
+// searchDeclarationsOfAccessedFields(
+// method,
+// resultCollector
+// );
+// assertSearchResults(
+// "src/a6/A.js a6.B.f [f]",
+// this.resultCollector);
+// }
+// /**
+// * Declaration of accessed fields test.
+// * (regression test for bug 10386 NPE in MatchLocator.lookupType)
+// */
+// public void testDeclarationOfAccessedFields3() throws CoreException {
+// IMethod method =
+// getCompilationUnit("JsSearch", "src", "b6", "A.js").
+// getType("A").getMethod("foo", new String[] {});
+// searchDeclarationsOfAccessedFields(
+// method,
+// resultCollector
+// );
+// assertSearchResults(
+// "src/b6/A.js b6.A.field [field]",
+// this.resultCollector);
+// }
+// /**
+// * Declaration of referenced types test.
+// */
+// public void testDeclarationOfReferencedTypes01() throws CoreException {
+// IMethod method =
+// getCompilationUnit("JsSearch", "src", "a3", "References.js").
+// getType("References").getMethod("foo", new String[] {});
+// searchDeclarationsOfReferencedTypes(
+// method,
+// resultCollector
+// );
+// assertSearchResults(
+// "src/a3/X.js a3.X [X]\n" +
+// "src/a3/Z.js a3.Z [Z]\n" +
+// "src/a3/b/A.js a3.b.A [A]\n" +
+// "src/a3/b/A.js a3.b.A$B$C [C]\n" +
+// "src/a3/b/A.js a3.b.A$B [B]\n" +
+// getExternalJCLPathString() + " java.lang.Object\n" +
+// "src/a3/Y.js a3.Y [Y]\n" +
+// "src/a3/b/B.js a3.b.B [B]",
+// this.resultCollector);
+// }
/**
* Declaration of referenced types test.
* (Regression test for bug 6779 searchDeclarationsOfReferencedTyped - missing exception types)
*/
public void testDeclarationOfReferencedTypes02() throws CoreException {
IMethod method =
- getCompilationUnit("JavaSearch", "src", "a7", "X.java").
+ getCompilationUnit("JsSearch", "src", "a7", "X.js").
getType("X").getMethod("foo", new String[] {});
searchDeclarationsOfReferencedTypes(
method,
@@ -377,7 +472,7 @@ public void testDeclarationOfReferencedTypes02() throws CoreException {
* (Regression test for bug 12649 Missing import after move )
*/
public void testDeclarationOfReferencedTypes03() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch", "src", "c1", "A.java");
+ ICompilationUnit unit = getCompilationUnit("JsSearch", "src", "c1", "A.js");
searchDeclarationsOfReferencedTypes(
unit,
resultCollector
@@ -391,7 +486,7 @@ public void testDeclarationOfReferencedTypes03() throws CoreException {
* (Regression test for bug 12649 Missing import after move )
*/
public void testDeclarationOfReferencedTypes04() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch", "src", "c1", "B.java");
+ ICompilationUnit unit = getCompilationUnit("JsSearch", "src", "c1", "B.js");
searchDeclarationsOfReferencedTypes(
unit,
resultCollector
@@ -405,7 +500,7 @@ public void testDeclarationOfReferencedTypes04() throws CoreException {
* (Regression test for bug 18418 search: searchDeclarationsOfReferencedTypes reports import declarations)
*/
public void testDeclarationOfReferencedTypes05() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch", "src", "c2", "A.java");
+ ICompilationUnit unit = getCompilationUnit("JsSearch", "src", "c2", "A.js");
searchDeclarationsOfReferencedTypes(
unit,
resultCollector
@@ -419,7 +514,7 @@ public void testDeclarationOfReferencedTypes05() throws CoreException {
* (Regression test for bug 24934 Move top level doesn't optimize the imports[refactoring])
*/
public void testDeclarationOfReferencedTypes06() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch", "src", "d1", "X.java");
+ ICompilationUnit unit = getCompilationUnit("JsSearch", "src", "d1", "X.js");
IType innerType = unit.getType("X").getType("Inner");
searchDeclarationsOfReferencedTypes(
innerType,
@@ -435,7 +530,7 @@ public void testDeclarationOfReferencedTypes06() throws CoreException {
)
*/
public void testDeclarationOfReferencedTypes07() throws CoreException {
- IPackageFragment pkg = getPackageFragment("JavaSearch", "src", "r7");
+ IPackageFragment pkg = getPackageFragment("JsSearch", "src", "r7");
searchDeclarationsOfReferencedTypes(
pkg,
resultCollector
@@ -450,7 +545,7 @@ public void testDeclarationOfReferencedTypes07() throws CoreException {
* (Regression test for bug 47787 IJavaSearchResultCollector.aboutToStart() and done() not called)
*/
public void testDeclarationOfReferencedTypes08() throws CoreException {
- IPackageFragment pkg = getPackageFragment("JavaSearch", "src", "r7");
+ IPackageFragment pkg = getPackageFragment("JsSearch", "src", "r7");
JavaSearchResultCollector result = new JavaSearchResultCollector() {
public void beginReporting() {
results.append("Starting search...");
@@ -475,7 +570,7 @@ public void testDeclarationOfReferencedTypes08() throws CoreException {
)
*/
public void testDeclarationOfReferencedTypes09() throws CoreException {
- ICompilationUnit cu = getCompilationUnit("JavaSearch15/src/p3/X.java");
+ ICompilationUnit cu = getCompilationUnit("JavaSearch15/src/p3/X.js");
JavaSearchResultCollector result = new JavaSearchResultCollector() {
public void beginReporting() {
results.append("Starting search...");
@@ -498,7 +593,7 @@ public void testDeclarationOfReferencedTypes09() throws CoreException {
* Simple declarations of sent messages test.
*/
public void testDeclarationsOfSentMessages01() throws CoreException { // was testSimpleDeclarationsOfSentMessages
- ICompilationUnit cu = getCompilationUnit("JavaSearch", "src", "", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("JsSearch", "src", "", "Test.js");
searchDeclarationsOfSentMessages(
cu,
this.resultCollector);
@@ -516,7 +611,7 @@ public void testDeclarationsOfSentMessages01() throws CoreException { // was tes
*/
public void testDeclarationsOfSentMessages02() throws CoreException { // was testDeclarationOfSentMessages
IMethod method =
- getCompilationUnit("JavaSearch", "src", "a5", "B.java").
+ getCompilationUnit("JsSearch", "src", "a5", "B.js").
getType("C").getMethod("i", new String[] {});
searchDeclarationsOfSentMessages(
method,
@@ -530,7 +625,7 @@ public void testDeclarationsOfSentMessages02() throws CoreException { // was tes
* Simple field declaration test.
*/
public void testFieldDeclaration01() throws CoreException { // was testSimpleFieldDeclaration
- IType type = getCompilationUnit("JavaSearch", "src", "p", "A.java").getType("A");
+ IType type = getCompilationUnit("JsSearch", "src", "p", "A.js").getType("A");
IField field = type.getField("x");
search(
field,
@@ -545,7 +640,7 @@ public void testFieldDeclaration01() throws CoreException { // was testSimpleFie
* Field declaration in jar file test.
*/
public void testFieldDeclaration02() throws CoreException { // was testFieldDeclarationInJar
- IType type = getClassFile("JavaSearch", "MyJar.jar", "p1", "A.class").getType();
+ IType type = getClassFile("JsSearch", "MyJar.jar", "p1", "A.class").getType();
IField field = type.getField("field");
search(
field,
@@ -563,7 +658,7 @@ public void testFieldDeclaration02() throws CoreException { // was testFieldDecl
* (regression test for PR 1GKEG73: ITPJCORE:WIN2000 - search (136): missing field declaration)
*/
public void testFieldDeclaration03() throws CoreException { // was testFieldDeclarationArrayType
- IType type = getCompilationUnit("JavaSearch", "src", "", "B.java").getType("B");
+ IType type = getCompilationUnit("JsSearch", "src", "", "B.js").getType("B");
IField field = type.getField("open");
search(
field,
@@ -594,7 +689,7 @@ public void testFieldDeclaration04() throws CoreException { // was testFieldDecl
* (regression test for bug #3433 search: missing field occurrecnces (1GKZ8J6))
*/
public void testFieldReference01() throws CoreException { // was testFieldReference
- IType type = getCompilationUnit("JavaSearch", "src", "p8", "A.java").getType("A");
+ IType type = getCompilationUnit("JsSearch", "src", "p8", "A.js").getType("A");
IField field = type.getField("g");
search(
field,
@@ -611,7 +706,7 @@ public void testFieldReference01() throws CoreException { // was testFieldRefere
* (regression test for PR 1GK8TXE: ITPJCORE:WIN2000 - search: missing field reference)
*/
public void testFieldReference02() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "p9", "X.java").getType("X");
+ IType type = getCompilationUnit("JsSearch", "src", "p9", "X.js").getType("X");
IField field = type.getField("f");
search(
field,
@@ -627,7 +722,7 @@ public void testFieldReference02() throws CoreException {
* (regression test for bug 5821 Refactor > Rename renames local variable instead of member in case of name clash )
*/
public void testFieldReference03() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "q8", "EclipseTest.java").getType("EclipseTest");
+ IType type = getCompilationUnit("JsSearch", "src", "q8", "EclipseTest.js").getType("EclipseTest");
IField field = type.getField("test");
resultCollector.showPotential = false;
search(field, REFERENCES, getJavaSearchScope());
@@ -640,7 +735,7 @@ public void testFieldReference03() throws CoreException {
* (regression test for bug 5923 Search for "length" field refs finds [].length)
*/
public void testFieldReference04() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "a2", "X.java").getType("X");
+ IType type = getCompilationUnit("JsSearch", "src", "a2", "X.js").getType("X");
IField field = type.getField("length");
search(
field,
@@ -656,7 +751,7 @@ public void testFieldReference04() throws CoreException {
* (regression test for bug 7987 Field reference search should do lookup in 1.4 mode)
*/
public void testFieldReference05() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "b1", "A.java").getType("A");
+ IType type = getCompilationUnit("JsSearch", "src", "b1", "A.js").getType("A");
IField field = type.getField("x");
// Set 1.4 compliance level (no constant yet)
@@ -685,7 +780,7 @@ public void testFieldReference05() throws CoreException {
* (regression test for bug 20693 Finding references to variables does not find all occurances)
*/
public void testFieldReference06() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "c4", "X.java").getType("X");
+ IType type = getCompilationUnit("JsSearch", "src", "c4", "X.js").getType("X");
IField field = type.getField("x");
search(
field,
@@ -701,7 +796,7 @@ public void testFieldReference06() throws CoreException {
* (regression test for bug 61017 Refactoring - test case that results in uncompilable source)
*/
public void testFieldReference07() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "s5", "A.java").getType("A");
+ IType type = getCompilationUnit("JsSearch", "src", "s5", "A.js").getType("A");
IField field = type.getField("b");
search(
field,
@@ -716,7 +811,7 @@ public void testFieldReference07() throws CoreException {
* Simple field reference test.
*/
public void testFieldReference08() throws CoreException { // was testSimpleFieldReference
- IType type = getCompilationUnit("JavaSearch", "src", "p", "A.java").getType("A");
+ IType type = getCompilationUnit("JsSearch", "src", "p", "A.js").getType("A");
IField field = type.getField("x");
search(
field,
@@ -732,7 +827,7 @@ public void testFieldReference08() throws CoreException { // was testSimpleField
* Simple field read access reference test.
*/
public void testFieldReference09() throws CoreException { // was testSimpleReadFieldReference
- IType type = getCompilationUnit("JavaSearch", "src", "p", "A.java").getType("A");
+ IType type = getCompilationUnit("JsSearch", "src", "p", "A.js").getType("A");
IField field = type.getField("x");
search(
field,
@@ -747,7 +842,7 @@ public void testFieldReference09() throws CoreException { // was testSimpleReadF
* Simple write field access reference test.
*/
public void testFieldReference10() throws CoreException { // was testSimpleWriteFieldReference
- IType type = getCompilationUnit("JavaSearch", "src", "p", "A.java").getType("A");
+ IType type = getCompilationUnit("JsSearch", "src", "p", "A.js").getType("A");
IField field = type.getField("x");
search(
field,
@@ -763,7 +858,7 @@ public void testFieldReference10() throws CoreException { // was testSimpleWrite
* (regression test for PR 1GD79XM: ITPJCORE:WINNT - Search - search for field references - not all found)
*/
public void testFieldReference11() throws CoreException { // was testMultipleFieldReference
- IType type = getCompilationUnit("JavaSearch", "src", "p5", "A.java").getType("A");
+ IType type = getCompilationUnit("JsSearch", "src", "p5", "A.js").getType("A");
IField field = type.getField("x");
search(
field,
@@ -781,7 +876,7 @@ public void testFieldReference11() throws CoreException { // was testMultipleFie
* (regression test for PR #1G2P5EP)
*/
public void testFieldReference12() throws CoreException { // was testStaticFieldReference
- IType type = getCompilationUnit("JavaSearch", "src", "p", "A.java").getType("A");
+ IType type = getCompilationUnit("JsSearch", "src", "p", "A.js").getType("A");
IField field = type.getField("DEBUG");
search(
field,
@@ -797,7 +892,7 @@ public void testFieldReference12() throws CoreException { // was testStaticField
* (regression test for PR 1GL11J6: ITPJCORE:WIN2000 - search: missing field references (nested types))
*/
public void testFieldReference13() throws CoreException { // was testFieldReferenceInInnerClass
- IType type = getCompilationUnit("JavaSearch", "src", "", "O.java").getType("O");
+ IType type = getCompilationUnit("JsSearch", "src", "", "O.js").getType("O");
IField field = type.getField("y");
search(
field,
@@ -813,7 +908,7 @@ public void testFieldReference13() throws CoreException { // was testFieldRefere
* (regression test for PR 1GL12XE: ITPJCORE:WIN2000 - search: missing field references in inner class)
*/
public void testFieldReference14() throws CoreException { // was testFieldReferenceInAnonymousClass
- IType type = getCompilationUnit("JavaSearch", "src", "", "D.java").getType("D");
+ IType type = getCompilationUnit("JsSearch", "src", "", "D.js").getType("D");
IField field = type.getField("h");
search(
field,
@@ -829,7 +924,7 @@ public void testFieldReference14() throws CoreException { // was testFieldRefere
* (regression test for PR 1GKB9YH: ITPJCORE:WIN2000 - search for field refs - incorrect results)
*/
public void testFieldReference15() throws CoreException { // was testFieldReferenceThroughSubclass
- IType type = getCompilationUnit("JavaSearch", "src", "p6", "A.java").getType("A");
+ IType type = getCompilationUnit("JsSearch", "src", "p6", "A.js").getType("A");
IField field = type.getField("f");
search(
field,
@@ -842,7 +937,7 @@ public void testFieldReference15() throws CoreException { // was testFieldRefere
"src/p6/A.java void p6.B.m() [f]",
this.resultCollector);
- type = getCompilationUnit("JavaSearch", "src", "p6", "A.java").getType("AA");
+ type = getCompilationUnit("JsSearch", "src", "p6", "A.js").getType("AA");
field = type.getField("f");
resultCollector = new JavaSearchResultCollector();
search(
@@ -860,7 +955,7 @@ public void testFieldReference15() throws CoreException { // was testFieldRefere
* (regression test for bug 6158 Search - Prefix and postfix expression not found as write reference)
*/
public void testFieldReference16() throws CoreException { // was testReadWriteFieldReferenceInCompoundExpression
- IType type = getCompilationUnit("JavaSearch", "src", "a4", "X.java").getType("X");
+ IType type = getCompilationUnit("JsSearch", "src", "a4", "X.js").getType("X");
IField field = type.getField("field");
// Read reference
@@ -889,7 +984,7 @@ public void testFieldReference16() throws CoreException { // was testReadWriteFi
* (regression test for bug 7344 Search - write acces give wrong result)
*/
public void testFieldReference17() throws CoreException { // was testReadWriteAccessInQualifiedNameReference
- IType type = getCompilationUnit("JavaSearch", "src", "a8", "A.java").getType("A");
+ IType type = getCompilationUnit("JsSearch", "src", "a8", "A.js").getType("A");
IField field = type.getField("a");
search(
field,
@@ -905,7 +1000,7 @@ public void testFieldReference17() throws CoreException { // was testReadWriteAc
* (regression test for bug 23329 search: incorrect range for type references in brackets)
*/
public void testFieldReference18() throws CoreException { // was testFieldReferenceInBrackets
- IType type = getCompilationUnit("JavaSearch", "src", "s3", "A.java").getType("A");
+ IType type = getCompilationUnit("JsSearch", "src", "s3", "A.js").getType("A");
IField field = type.getField("field");
search(
field,
@@ -926,7 +1021,7 @@ public void testFieldReference19() throws CoreException { // was testAccurateFie
FIELD,
REFERENCES,
SearchEngine.createJavaSearchScope(new IJavaElement[] {
- getPackageFragment("JavaSearch", "src", "d6")
+ getPackageFragment("JsSearch", "src", "d6")
}),
this.resultCollector);
assertSearchResults(
@@ -937,7 +1032,7 @@ public void testFieldReference19() throws CoreException { // was testAccurateFie
* Field reference inside/outside doc comment.
*/
public void testFieldReference20() throws CoreException { // was testFieldReferenceInOutDocComment
- IType type = getCompilationUnit("JavaSearch", "src", "s4", "X.java").getType("X");
+ IType type = getCompilationUnit("JsSearch", "src", "s4", "X.js").getType("X");
IField field = type.getField("x");
resultCollector.showInsideDoc = true;
search(field, REFERENCES, getJavaSearchScope(), resultCollector);
@@ -951,7 +1046,7 @@ public void testFieldReference20() throws CoreException { // was testFieldRefere
*/
public void testInterfaceImplementors1() throws CoreException { // was testInterfaceImplementors
// implementors of an interface
- IType type = getCompilationUnit("JavaSearch", "src", "p", "I.java").getType("I");
+ IType type = getCompilationUnit("JsSearch", "src", "p", "I.js").getType("I");
search(
type,
IMPLEMENTORS,
@@ -967,7 +1062,7 @@ public void testInterfaceImplementors1() throws CoreException { // was testInter
* Bug 1G5HBQA: "ITPJUI:WINNT - Search - search for implementors of a class finds subclasses" is cancelled
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=124645"
*/
- type = getCompilationUnit("JavaSearch", "src", "p", "X.java").getType("X");
+ type = getCompilationUnit("JsSearch", "src", "p", "X.js").getType("X");
resultCollector = new JavaSearchResultCollector();
search(
type,
@@ -984,7 +1079,7 @@ public void testInterfaceImplementors1() throws CoreException { // was testInter
*/
public void testInterfaceImplementors2() throws CoreException {
// implementors of an interface
- IType type = getCompilationUnit("JavaSearch", "src", "r2", "I.java").getType("I");
+ IType type = getCompilationUnit("JsSearch", "src", "r2", "I.js").getType("I");
search(
type,
IMPLEMENTORS,
@@ -999,7 +1094,7 @@ public void testInterfaceImplementors2() throws CoreException {
* (SingleNameReference)
*/
public void testLocalVariableDeclaration1() throws CoreException {
- ILocalVariable localVar = getLocalVariable("/JavaSearch/src/f1/X.java", "var1 = 1;", "var1");
+ ILocalVariable localVar = getLocalVariable("/JavaSearch/src/f1/X.js", "var1 = 1;", "var1");
search(
localVar,
DECLARATIONS,
@@ -1014,7 +1109,7 @@ public void testLocalVariableDeclaration1() throws CoreException {
* (QualifiedNameReference)
*/
public void testLocalVariableDeclaration2() throws CoreException {
- ILocalVariable localVar = getLocalVariable("/JavaSearch/src/f1/X.java", "var2 = new X();", "var2");
+ ILocalVariable localVar = getLocalVariable("/JavaSearch/src/f1/X.js", "var2 = new X();", "var2");
search(
localVar,
DECLARATIONS,
@@ -1029,7 +1124,7 @@ public void testLocalVariableDeclaration2() throws CoreException {
* (SingleNameReference)
*/
public void testLocalVariableOccurrences1() throws CoreException {
- ILocalVariable localVar = getLocalVariable("/JavaSearch/src/f1/X.java", "var1 = 1;", "var1");
+ ILocalVariable localVar = getLocalVariable("/JavaSearch/src/f1/X.js", "var1 = 1;", "var1");
search(
localVar,
ALL_OCCURRENCES,
@@ -1045,7 +1140,7 @@ public void testLocalVariableOccurrences1() throws CoreException {
* (QualifiedNameReference)
*/
public void testLocalVariableOccurrences2() throws CoreException {
- ILocalVariable localVar = getLocalVariable("/JavaSearch/src/f1/X.java", "var2 = new X();", "var2");
+ ILocalVariable localVar = getLocalVariable("/JavaSearch/src/f1/X.js", "var2 = new X();", "var2");
search(
localVar,
ALL_OCCURRENCES,
@@ -1061,7 +1156,7 @@ public void testLocalVariableOccurrences2() throws CoreException {
* (SingleNameReference)
*/
public void testLocalVariableReference1() throws CoreException {
- ILocalVariable localVar = getLocalVariable("/JavaSearch/src/f1/X.java", "var1 = 1;", "var1");
+ ILocalVariable localVar = getLocalVariable("/JavaSearch/src/f1/X.js", "var1 = 1;", "var1");
search(
localVar,
REFERENCES,
@@ -1076,7 +1171,7 @@ public void testLocalVariableReference1() throws CoreException {
* (QualifiedNameReference)
*/
public void testLocalVariableReference2() throws CoreException {
- ILocalVariable localVar = getLocalVariable("/JavaSearch/src/f1/X.java", "var2 = new X();", "var2");
+ ILocalVariable localVar = getLocalVariable("/JavaSearch/src/f1/X.js", "var2 = new X();", "var2");
search(
localVar,
REFERENCES,
@@ -1091,7 +1186,7 @@ public void testLocalVariableReference2() throws CoreException {
* (regression test for bug 48725 Cannot search for local vars in jars.)
*/
public void testLocalVariableReference3() throws CoreException {
- IClassFile classFile = getClassFile("JavaSearch", "test48725.jar", "p48725", "X.class");
+ IClassFile classFile = getClassFile("JsSearch", "test48725.jar", "p48725", "X.class");
ILocalVariable localVar = (ILocalVariable) codeSelect(classFile, "local = 1;", "local")[0];
search(
localVar,
@@ -1106,7 +1201,7 @@ public void testLocalVariableReference3() throws CoreException {
* Simple method declaration test.
*/
public void testMethodDeclaration01() throws CoreException { // was testSimpleMethodDeclaration
- IType type = getCompilationUnit("JavaSearch", "src", "p", "X.java").getType("X");
+ IType type = getCompilationUnit("JsSearch", "src", "p", "X.js").getType("X");
IMethod method = type.getMethod("foo", new String[] {"I", "QString;", "QX;"});
search(
@@ -1124,7 +1219,7 @@ public void testMethodDeclaration01() throws CoreException { // was testSimpleMe
* (regression test for bug 38568 Search for method declarations fooled by array types)
*/
public void testMethodDeclaration02() throws CoreException { // was testMethodDeclaration
- IType type = getCompilationUnit("JavaSearch", "src", "e2", "X.java").getType("X");
+ IType type = getCompilationUnit("JsSearch", "src", "e2", "X.js").getType("X");
search(
"foo(String, String)",
@@ -1142,7 +1237,7 @@ public void testMethodDeclaration02() throws CoreException { // was testMethodDe
* Inner method declaration test.
*/
public void testMethodDeclaration03() throws CoreException { // was testInnerMethodDeclaration
- IType type = getCompilationUnit("JavaSearch", "src", "p", "X.java").getType("X").getType("Inner");
+ IType type = getCompilationUnit("JsSearch", "src", "p", "X.js").getType("X").getType("Inner");
IMethod method = type.getMethod("foo", new String[] {});
search(
@@ -1158,7 +1253,7 @@ public void testMethodDeclaration03() throws CoreException { // was testInnerMet
* Method declaration in hierarchy test.
*/
public void testMethodDeclaration04() throws CoreException { // was testMethodDeclarationInHierarchyScope1
- IType type = getCompilationUnit("JavaSearch", "src", "p", "X.java").getType("X");
+ IType type = getCompilationUnit("JsSearch", "src", "p", "X.js").getType("X");
search(
"foo",
@@ -1176,7 +1271,7 @@ public void testMethodDeclaration04() throws CoreException { // was testMethodDe
* (regression test for PR #1G2E4F1)
*/
public void testMethodDeclaration05() throws CoreException { // was testMethodDeclarationInHierarchyScope2
- IType type = getCompilationUnit("JavaSearch", "src", "p", "X.java").getType("X");
+ IType type = getCompilationUnit("JsSearch", "src", "p", "X.js").getType("X");
IMethod method = type.getMethod("foo", new String[] {"I", "QString;", "QX;"});
search(
@@ -1193,7 +1288,7 @@ public void testMethodDeclaration05() throws CoreException { // was testMethodDe
* Method declaration in hierarchy on a secondary type.
*/
public void testMethodDeclaration06() throws CoreException { // was testMethodDeclarationInHierarchyScope3
- IType type = getCompilationUnit("JavaSearch", "src", "d3", "A.java").getType("B");
+ IType type = getCompilationUnit("JsSearch", "src", "d3", "A.js").getType("B");
IMethod method = type.getMethod("foo", new String[] {});
search(
@@ -1210,7 +1305,7 @@ public void testMethodDeclaration06() throws CoreException { // was testMethodDe
* (regression tets for PR #1G2KA97)
*/
public void testMethodDeclaration07() throws CoreException { // was testMethodDeclarationInPackageScope
- IType type = getCompilationUnit("JavaSearch", "src", "p", "X.java").getType("X");
+ IType type = getCompilationUnit("JsSearch", "src", "p", "X.js").getType("X");
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {type.getPackageFragment()});
search(
@@ -1227,7 +1322,7 @@ public void testMethodDeclaration07() throws CoreException { // was testMethodDe
* Method declaration in jar file test.
*/
public void testMethodDeclaration08() throws CoreException { // was testMethodDeclarationInJar
- IType type = getClassFile("JavaSearch", "MyJar.jar", "p1", "A.class").getType();
+ IType type = getClassFile("JsSearch", "MyJar.jar", "p1", "A.class").getType();
IMethod method = type.getMethod("foo", new String[] {"Ljava.lang.String;"});
search(
@@ -1260,7 +1355,7 @@ public void testMethodDeclaration09() throws CoreException { // was testMethodDe
* (regression test for bug 43080 NPE when searching in CU with incomplete method declaration)
*/
public void testMethodDeclaration10() throws CoreException { // was testMethodDeclarationNoReturnType
- IType type = getCompilationUnit("JavaSearch", "src", "e8", "A.java").getType("A");
+ IType type = getCompilationUnit("JsSearch", "src", "e8", "A.js").getType("A");
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {type.getPackageFragment()});
search(
@@ -1278,7 +1373,7 @@ public void testMethodDeclaration10() throws CoreException { // was testMethodDe
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=92210"
*/
public void testMethodDeclaration11() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch", "otherSrc()", "", "X92210.java");
+ ICompilationUnit unit = getCompilationUnit("JsSearch", "otherSrc()", "", "X92210.js");
assertNotNull("Should have found an unit", unit);
IJavaElement root = unit.getAncestor(IJavaElement.PACKAGE_FRAGMENT_ROOT);
assertNotNull("Should have found package fragment root", root);
@@ -1299,7 +1394,7 @@ public void testMethodDeclaration11() throws CoreException {
* (regression test for bug 5068 search: missing method reference)
*/
public void testMethodReference01() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "q5", "AQ.java").getType("I");
+ IType type = getCompilationUnit("JsSearch", "src", "q5", "AQ.js").getType("I");
IMethod method = type.getMethod("k", new String[] {});
search(
@@ -1316,7 +1411,7 @@ public void testMethodReference01() throws CoreException {
* (regression test for bug 5069 search: method reference in super missing)
*/
public void testMethodReference02() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "q6", "CD.java").getType("AQ");
+ IType type = getCompilationUnit("JsSearch", "src", "q6", "CD.js").getType("AQ");
IMethod method = type.getMethod("k", new String[] {});
search(
@@ -1333,7 +1428,7 @@ public void testMethodReference02() throws CoreException {
* (regression test for bug 5070 search: missing interface method reference )
*/
public void testMethodReference03() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "q7", "AQ.java").getType("I");
+ IType type = getCompilationUnit("JsSearch", "src", "q7", "AQ.js").getType("I");
IMethod method = type.getMethod("k", new String[] {});
search(
@@ -1350,7 +1445,7 @@ public void testMethodReference03() throws CoreException {
* (regression test for bug 8928 Unable to find references or declarations of methods that use static inner classes in the signature)
*/
public void testMethodReference04() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "b2", "Y.java").getType("Y");
+ IType type = getCompilationUnit("JsSearch", "src", "b2", "Y.js").getType("Y");
IMethod method = type.getMethod("foo", new String[] {"QX.Inner;"});
search(
@@ -1367,7 +1462,7 @@ public void testMethodReference04() throws CoreException {
* (regression test for bug 49120 search doesn't find references to anonymous inner methods)
*/
public void testMethodReference05() throws CoreException {
- IType type = getCompilationUnit("JavaSearch/src/e9/A.java").getType("A").getMethod("foo", new String[] {}).getType("", 1);
+ IType type = getCompilationUnit("JavaSearch/src/e9/A.js").getType("A").getMethod("foo", new String[] {}).getType("", 1);
IMethod method = type.getMethod("bar", new String[] {});
search(
@@ -1383,7 +1478,7 @@ public void testMethodReference05() throws CoreException {
* Method reference in second anonymous and second local type of a method test.
*/
public void testMethodReference06() throws CoreException {
- IMethod method= getCompilationUnit("JavaSearch/src/f3/X.java").getType("X").getMethod("bar", new String[] {});
+ IMethod method= getCompilationUnit("JavaSearch/src/f3/X.js").getType("X").getMethod("bar", new String[] {});
search(
method,
@@ -1399,7 +1494,7 @@ public void testMethodReference06() throws CoreException {
* Simple method reference test.
*/
public void testMethodReference07() throws CoreException { // was testSimpleMethodReference
- IType type = getCompilationUnit("JavaSearch", "src", "p", "X.java").getType("X");
+ IType type = getCompilationUnit("JsSearch", "src", "p", "X.js").getType("X");
IMethod method = type.getMethod("foo", new String[] {"I", "QString;", "QX;"});
search(
@@ -1418,7 +1513,7 @@ public void testMethodReference07() throws CoreException { // was testSimpleMeth
* Static method reference test.
*/
public void testMethodReference08() throws CoreException { // was testStaticMethodReference1
- IType type = getCompilationUnit("JavaSearch", "src", "p", "Y.java").getType("Y");
+ IType type = getCompilationUnit("JsSearch", "src", "p", "Y.js").getType("Y");
IMethod method = type.getMethod("bar", new String[] {});
search(
@@ -1434,7 +1529,7 @@ public void testMethodReference08() throws CoreException { // was testStaticMeth
* Static method reference test.
*/
public void testMethodReference09() throws CoreException { // was testStaticMethodReference2
- IType type = getCompilationUnit("JavaSearch", "src", "p", "X.java").getType("X");
+ IType type = getCompilationUnit("JsSearch", "src", "p", "X.js").getType("X");
IMethod method = type.getMethod("bar", new String[] {});
search(
@@ -1450,7 +1545,7 @@ public void testMethodReference09() throws CoreException { // was testStaticMeth
* Inner method reference test.
*/
public void testMethodReference10() throws CoreException { // was testInnerMethodReference
- IType type = getCompilationUnit("JavaSearch", "src", "p", "X.java").getType("X").getType("Inner");
+ IType type = getCompilationUnit("JsSearch", "src", "p", "X.js").getType("X").getType("Inner");
IMethod method = type.getMethod("foo", new String[] {});
search(
@@ -1466,7 +1561,7 @@ public void testMethodReference10() throws CoreException { // was testInnerMetho
* Method reference through super test.
*/
public void testMethodReference11() throws CoreException { // was testMethodReferenceThroughSuper
- IType type = getCompilationUnit("JavaSearch", "src", "sd", "AQ.java").getType("AQ");
+ IType type = getCompilationUnit("JsSearch", "src", "sd", "AQ.js").getType("AQ");
IMethod method = type.getMethod("k", new String[] {});
search(
@@ -1482,7 +1577,7 @@ public void testMethodReference11() throws CoreException { // was testMethodRefe
* Method reference in inner class test.
*/
public void testMethodReference12() throws CoreException { // was testMethodReferenceInInnerClass
- IType type = getCompilationUnit("JavaSearch", "src", "", "CA.java").getType("CA");
+ IType type = getCompilationUnit("JsSearch", "src", "", "CA.js").getType("CA");
IMethod method = type.getMethod("m", new String[] {});
search(
@@ -1500,7 +1595,7 @@ public void testMethodReference12() throws CoreException { // was testMethodRefe
* (regression test for PR 1GGNOTF: ITPJCORE:WINNT - Search doesn't find method referenced in anonymous inner class)
*/
public void testMethodReference13() throws CoreException { // was testMethodReferenceInAnonymousClass
- IType type = getCompilationUnit("JavaSearch", "src", "", "PR_1GGNOTF.java").getType("PR_1GGNOTF");
+ IType type = getCompilationUnit("JsSearch", "src", "", "PR_1GGNOTF.js").getType("PR_1GGNOTF");
IMethod method = type.getMethod("method", new String[] {});
search(
@@ -1517,7 +1612,7 @@ public void testMethodReference13() throws CoreException { // was testMethodRefe
* (regression test for 1GHDA2V: ITPJCORE:WINNT - ClassCastException when doing a search)
*/
public void testMethodReference14() throws CoreException { // was testMethodReferenceThroughArray
- IType type = getClassFile("JavaSearch", getExternalJCLPathString(), "java.lang", "Object.class").getType();
+ IType type = getClassFile("JsSearch", getExternalJCLPathString(), "java.lang", "Object.class").getType();
IMethod method = type.getMethod("clone", new String[] {});
search(
@@ -1533,7 +1628,7 @@ public void testMethodReference14() throws CoreException { // was testMethodRefe
* Method reference inside/outside doc comment.
*/
public void testMethodReference15() throws CoreException { // was testMethodReferenceInOutDocComment
- IType type = getCompilationUnit("JavaSearch", "src", "s4", "X.java").getType("X");
+ IType type = getCompilationUnit("JsSearch", "src", "s4", "X.js").getType("X");
IMethod method = type.getMethod("foo", new String[] {});
resultCollector.showInsideDoc = true;
search(method, REFERENCES, getJavaSearchScope(), resultCollector);
@@ -1546,7 +1641,7 @@ public void testMethodReference15() throws CoreException { // was testMethodRefe
* Generic method reference.
*/
public void testMethodReference16() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/p2/X.java").getType("X");
+ IType type = getCompilationUnit("JavaSearch15/src/p2/X.js").getType("X");
IMethod method = type.getMethod("foo", new String[] {"QE;"});
search(method, REFERENCES, ERASURE_RULE, getJavaSearchScope15(), resultCollector);
assertSearchResults(
@@ -1558,7 +1653,7 @@ public void testMethodReference16() throws CoreException {
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=111416"
*/
public void testMethodReference17() throws CoreException {
- IType type = getCompilationUnit("JavaSearch/src/b111416/X.java").getType("X");
+ IType type = getCompilationUnit("JavaSearch/src/b111416/X.js").getType("X");
IMethod method = type.getMethod("open", new String[] {"QString;"});
resultCollector.showAccuracy = true;
search(method, REFERENCES, ERASURE_RULE, getJavaSearchScope(), resultCollector);
@@ -1571,10 +1666,10 @@ public void testMethodReference17() throws CoreException {
* (regression test for bug 5862 search : too many matches on search with OrPattern)
*/
public void testOrPattern() throws CoreException {
- IMethod leftMethod = getCompilationUnit("JavaSearch", "src", "q9", "I.java")
+ IMethod leftMethod = getCompilationUnit("JsSearch", "src", "q9", "I.js")
.getType("I").getMethod("m", new String[] {});
SearchPattern leftPattern = createPattern(leftMethod, ALL_OCCURRENCES);
- IMethod rightMethod = getCompilationUnit("JavaSearch", "src", "q9", "I.java")
+ IMethod rightMethod = getCompilationUnit("JsSearch", "src", "q9", "I.js")
.getType("A1").getMethod("m", new String[] {});
SearchPattern rightPattern = createPattern(rightMethod, ALL_OCCURRENCES);
SearchPattern orPattern = SearchPattern.createOrPattern(leftPattern, rightPattern);
@@ -1593,7 +1688,7 @@ public void testOrPattern() throws CoreException {
* Simple package declaration test.
*/
public void testPackageDeclaration1() throws CoreException { // was testSimplePackageDeclaration
- IPackageFragment pkg = getPackageFragment("JavaSearch", "src", "p");
+ IPackageFragment pkg = getPackageFragment("JsSearch", "src", "p");
search(
pkg,
DECLARATIONS,
@@ -1626,7 +1721,7 @@ public void testPackageDeclaration2() throws CoreException { // was testVariousP
* (regression test for bug 62698 NPE while searching for declaration of binary package)
*/
public void testPackageDeclaration3() throws CoreException { // was testPackageDeclaration
- IPackageFragment pkg = getPackageFragment("JavaSearch", getExternalJCLPathString(), "java.lang");
+ IPackageFragment pkg = getPackageFragment("JsSearch", getExternalJCLPathString(), "java.lang");
search(
pkg,
@@ -1642,7 +1737,7 @@ public void testPackageDeclaration3() throws CoreException { // was testPackageD
* (regression test for bug 75561 Rename package results in I/O exception)
*/
public void testPackageDeclaration4() throws CoreException {
- IJavaProject project = getJavaProject("JavaSearch");
+ IJavaProject project = getJavaProject("JsSearch");
IClasspathEntry[] originalCP = project.getRawClasspath();
try {
// add corrupt.jar to classpath
@@ -1673,7 +1768,7 @@ public void testPackageDeclaration4() throws CoreException {
public void testPackageDeclarationBug73551() throws CoreException {
JavaSearchResultCollector result = new JavaSearchResultCollector();
result.showAccuracy = true;
- IPackageDeclaration packDecl = getCompilationUnit("JavaSearch", "src", "p71267", "Test.java").getPackageDeclaration("p71267");
+ IPackageDeclaration packDecl = getCompilationUnit("JsSearch", "src", "p71267", "Test.js").getPackageDeclaration("p71267");
search(packDecl, DECLARATIONS, getJavaSearchScope(), result);
assertSearchResults(
"src/p71267/Test.java p71267 [No source] EXACT_MATCH",
@@ -1710,7 +1805,7 @@ public void testPackageDeclarationBug117020() throws CoreException {
* (regression test for PR 1GK90H4: ITPJCORE:WIN2000 - search: missing package reference)
*/
public void testPackageReference1() throws CoreException {
- IPackageFragment pkg = getPackageFragment("JavaSearch", "src", "q2");
+ IPackageFragment pkg = getPackageFragment("JsSearch", "src", "q2");
search(
pkg,
@@ -1726,7 +1821,7 @@ public void testPackageReference1() throws CoreException {
* (regression test for bug 17906 Rename package fails when inner classes are imported)
*/
public void testPackageReference2() throws CoreException {
- IPackageFragment pkg = getPackageFragment("JavaSearch", "src", "b8");
+ IPackageFragment pkg = getPackageFragment("JsSearch", "src", "b8");
search(
pkg,
@@ -1742,7 +1837,7 @@ public void testPackageReference2() throws CoreException {
* (regression test for bug 47989 Exception when searching for IPackageFragment "java.util.zip")
*/
public void testPackageReference3() throws CoreException {
- IPackageFragment pkg = getPackageFragment("JavaSearch", "test47989.jar", "p1");
+ IPackageFragment pkg = getPackageFragment("JsSearch", "test47989.jar", "p1");
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {pkg.getParent()});
search(
@@ -1758,7 +1853,7 @@ public void testPackageReference3() throws CoreException {
* Simple package reference test.
*/
public void testPackageReference4() throws CoreException { // was testSimplePackageReference
- IPackageFragment pkg = getPackageFragment("JavaSearch", "src", "p");
+ IPackageFragment pkg = getPackageFragment("JsSearch", "src", "p");
search(
pkg,
@@ -1781,7 +1876,7 @@ public void testPackageReference4() throws CoreException { // was testSimplePack
* Various package reference test.
*/
public void testPackageReference5() throws CoreException { // was testVariousPackageReference
- IPackageFragment pkg = getPackageFragment("JavaSearch", "src", "p3.p2.p");
+ IPackageFragment pkg = getPackageFragment("JsSearch", "src", "p3.p2.p");
search(
pkg,
@@ -1805,7 +1900,7 @@ public void testPackageReference5() throws CoreException { // was testVariousPac
* Regression test for 1GBK7B2: ITPJCORE:WINNT - package references: could be more precise
*/
public void testPackageReference6() throws CoreException { // was testAccuratePackageReference
- IPackageFragment pkg = getPackageFragment("JavaSearch", "src", "p3.p2");
+ IPackageFragment pkg = getPackageFragment("JsSearch", "src", "p3.p2");
search(
pkg,
@@ -1861,7 +1956,7 @@ public void testPackageReference8() throws CoreException { // was testPatternMat
* (Regression test for 1G4IN3E: ITPJCORE:WINNT - AbortCompilation using J9 to search for class declaration)
*/
public void testPotentialMatchInBinary1() throws CoreException {
- IJavaProject project = this.getJavaProject("JavaSearch");
+ IJavaProject project = this.getJavaProject("JsSearch");
IClasspathEntry[] classpath = project.getRawClasspath();
try {
// add AbortCompilation.jar to classpath
@@ -1896,7 +1991,7 @@ public void testPotentialMatchInBinary1() throws CoreException {
* (Regression test for 1G4IN3E: ITPJCORE:WINNT - AbortCompilation using J9 to search for class declaration)
*/
public void testPotentialMatchInBinary2() throws CoreException {
- IJavaProject project = this.getJavaProject("JavaSearch");
+ IJavaProject project = this.getJavaProject("JsSearch");
IClasspathEntry[] classpath = project.getRawClasspath();
try {
// add AbortCompilation.jar to classpath
@@ -1931,7 +2026,7 @@ public void testPotentialMatchInBinary2() throws CoreException {
* (Regression test for 1G4IN3E: ITPJCORE:WINNT - AbortCompilation using J9 to search for class declaration)
*/
public void testPotentialMatchInBinary3() throws CoreException {
- IJavaProject project = this.getJavaProject("JavaSearch");
+ IJavaProject project = this.getJavaProject("JsSearch");
IClasspathEntry[] classpath = project.getRawClasspath();
try {
// add AbortCompilation.jar to classpath
@@ -1965,7 +2060,7 @@ public void testPotentialMatchInBinary3() throws CoreException {
* (regression test for bug 3445 search: type hierarchy scope incorrect (1GLC8VS))
*/
public void testSearchScope01() throws CoreException { // was testHierarchyScope
- ICompilationUnit cu = this. getCompilationUnit("JavaSearch", "src", "a9", "A.java");
+ ICompilationUnit cu = this. getCompilationUnit("JsSearch", "src", "a9", "A.js");
IType type = cu.getType("C");
IJavaSearchScope scope = SearchEngine.createHierarchyScope(type);
assertTrue("a9.C should be included in hierarchy scope", scope.encloses(type));
@@ -1978,7 +2073,7 @@ public void testSearchScope01() throws CoreException { // was testHierarchyScope
* (regression test for bug 9041 search: cannot create a sub-cu scope)
*/
public void testSearchScope02() throws CoreException { // was testSubCUSearchScope1
- IType type = getCompilationUnit("JavaSearch", "src", "b3", "X.java").getType("X");
+ IType type = getCompilationUnit("JsSearch", "src", "b3", "X.js").getType("X");
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {type});
search(
@@ -1998,7 +2093,7 @@ public void testSearchScope02() throws CoreException { // was testSubCUSearchSco
* (regression test for bug 9041 search: cannot create a sub-cu scope)
*/
public void testSearchScope03() throws CoreException { // was testSubCUSearchScope2
- IType type = getCompilationUnit("JavaSearch", "src", "b3", "X.java").getType("X");
+ IType type = getCompilationUnit("JsSearch", "src", "b3", "X.js").getType("X");
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {type.getField("field")});
search(
@@ -2015,7 +2110,7 @@ public void testSearchScope03() throws CoreException { // was testSubCUSearchSco
* (regression test for bug 9041 search: cannot create a sub-cu scope)
*/
public void testSearchScope04() throws CoreException { // was testSubCUSearchScope3
- IType type = getCompilationUnit("JavaSearch", "src", "b3", "X.java").getType("X");
+ IType type = getCompilationUnit("JsSearch", "src", "b3", "X.js").getType("X");
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {type.getType("Y")});
search(
@@ -2036,7 +2131,7 @@ public void testSearchScope05() throws CoreException, IOException { // was testE
File workspaceLocation = new File(workspace.getRoot().getLocation().toOSString());
File minimalJar = new File(workspaceLocation, "JavaSearch/MyJar.jar");
File externalJar = new File(workspaceLocation.getParentFile().getCanonicalFile(), "MyJar.jar"); // canonicalize the external path as this is not done on case sensitive platforms when creating a new lib entry
- IJavaProject project = this.getJavaProject("JavaSearch");
+ IJavaProject project = this.getJavaProject("JsSearch");
IClasspathEntry[] classpath = project.getRawClasspath();
try {
copy(minimalJar, externalJar);
@@ -2047,7 +2142,7 @@ public void testSearchScope05() throws CoreException, IOException { // was testE
newClasspath[length-1] = JavaCore.newLibraryEntry(new Path(externalPath), new Path(externalPath), null, false);
project.setRawClasspath(newClasspath, null);
- IPackageFragment pkg = this.getPackageFragment("JavaSearch", externalPath, "p0");
+ IPackageFragment pkg = this.getPackageFragment("JsSearch", externalPath, "p0");
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {pkg});
search(
@@ -2082,7 +2177,7 @@ public void testSearchScope05() throws CoreException, IOException { // was testE
* Simple type declaration test.
*/
public void testTypeDeclaration01() throws CoreException { // was testSimpleTypeDeclaration
- IType type = getCompilationUnit("JavaSearch", "src", "p", "X.java").getType("X");
+ IType type = getCompilationUnit("JsSearch", "src", "p", "X.js").getType("X");
search(
type,
@@ -2114,7 +2209,7 @@ public void testTypeDeclaration02() throws CoreException {
* (regression test for bug 29524 Search for declaration via patterns adds '"*")
*/
public void testTypeDeclaration03() throws CoreException { // was testTypeDeclaration
- IPackageFragment pkg = this.getPackageFragment("JavaSearch", "src", "d8");
+ IPackageFragment pkg = this.getPackageFragment("JsSearch", "src", "d8");
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {pkg});
search(
@@ -2129,7 +2224,7 @@ public void testTypeDeclaration03() throws CoreException { // was testTypeDeclar
* Type declaration in jar file test.
*/
public void testTypeDeclaration04() throws CoreException { // was testTypeDeclarationInJar
- IType type = getClassFile("JavaSearch", "MyJar.jar", "p1", "A.class").getType();
+ IType type = getClassFile("JsSearch", "MyJar.jar", "p1", "A.class").getType();
search(
type,
@@ -2145,7 +2240,7 @@ public void testTypeDeclaration04() throws CoreException { // was testTypeDeclar
* (regression test for 20631 Declaration of local binary type not found)
*/
public void testTypeDeclaration05() throws CoreException { // was testTypeDeclarationInJar2
- IPackageFragmentRoot root = getPackageFragmentRoot("JavaSearch", "test20631.jar");
+ IPackageFragmentRoot root = getPackageFragmentRoot("JsSearch", "test20631.jar");
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {root});
search(
@@ -2163,7 +2258,7 @@ public void testTypeDeclaration05() throws CoreException { // was testTypeDeclar
* (check that subpackages are not included)
*/
public void testTypeDeclaration06() throws CoreException { // was testTypeDeclarationInPackageScope
- IType type = getCompilationUnit("JavaSearch", "src", "p3", "X.java").getType("X");
+ IType type = getCompilationUnit("JsSearch", "src", "p3", "X.js").getType("X");
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {type.getPackageFragment()});
search(
@@ -2181,7 +2276,7 @@ public void testTypeDeclaration06() throws CoreException { // was testTypeDeclar
* (check that subpackages are not included)
*/
public void testTypeDeclaration07() throws CoreException { // was testTypeDeclarationInPackageScope2
- IType type = getClassFile("JavaSearch", "MyJar.jar", "p0", "X.class").getType();
+ IType type = getClassFile("JsSearch", "MyJar.jar", "p0", "X.class").getType();
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {type.getPackageFragment()});
search(
@@ -2200,7 +2295,7 @@ public void testTypeDeclaration07() throws CoreException { // was testTypeDeclar
*/
public void testTypeDeclaration08() throws CoreException { // was testMemberTypeDeclaration
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[]{
- this.getPackageFragment("JavaSearch", "src", "b4")
+ this.getPackageFragment("JsSearch", "src", "b4")
});
search(
@@ -2247,7 +2342,7 @@ public void testTypeDeclaration10() throws CoreException { // was testLongDeclar
* Local type declaration test.
*/
public void testTypeDeclaration11() throws CoreException { // was testLocalTypeDeclaration1
- IPackageFragment pkg = getPackageFragment("JavaSearch", "src", "f2");
+ IPackageFragment pkg = getPackageFragment("JsSearch", "src", "f2");
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {pkg});
search(
@@ -2264,7 +2359,7 @@ public void testTypeDeclaration11() throws CoreException { // was testLocalTypeD
* Local type declaration test.
*/
public void testTypeDeclaration12() throws CoreException { // was testLocalTypeDeclaration2
- IType type = getCompilationUnit("JavaSearch/src/f2/X.java").getType("X").getMethod("foo1", new String[0]).getType("Y", 1);
+ IType type = getCompilationUnit("JavaSearch/src/f2/X.js").getType("X").getMethod("foo1", new String[0]).getType("Y", 1);
IJavaSearchScope scope = SearchEngine.createWorkspaceScope();
@@ -2282,7 +2377,7 @@ public void testTypeDeclaration12() throws CoreException { // was testLocalTypeD
* (regression test for PR 1GKAQJS: ITPJCORE:WIN2000 - search: incorrect results for nested types)
*/
public void testTypeOccurence1() throws CoreException { // was testTypeOccurence
- IType type = getCompilationUnit("JavaSearch", "src", "r", "A.java").getType("A").getType("X");
+ IType type = getCompilationUnit("JsSearch", "src", "r", "A.js").getType("A").getType("X");
search(
type,
@@ -2303,7 +2398,7 @@ public void testTypeOccurence1() throws CoreException { // was testTypeOccurence
* (regression test for bug 37166 NPE in SearchEngine when matching type against ProblemReferenceBinding )
*/
public void testTypeOccurence2() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "r8", "B.java").getType("B");
+ IType type = getCompilationUnit("JsSearch", "src", "r8", "B.js").getType("B");
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {type.getPackageFragment()});
search(
@@ -2320,7 +2415,7 @@ public void testTypeOccurence2() throws CoreException {
* Ensures that correct positions are reported for an inner type reference using a ALL_OCCURENCES pattern
*/
public void testTypeOccurence3() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "e4", "A.java").getType("A").getType("Inner");
+ IType type = getCompilationUnit("JsSearch", "src", "e4", "A.js").getType("A").getType("Inner");
search(
type,
@@ -2341,7 +2436,7 @@ public void testTypeOccurence3() throws CoreException {
* (regression test for bug 3310 Smoke 124: Compile errors introduced with rename refactoring (1GFBK2G))
*/
public void testTypeOccurence4() throws CoreException { // was testTypeOccurenceWithDollar
- IType type = getCompilationUnit("JavaSearch", "src", "q3", "A$B.java").getType("A$B");
+ IType type = getCompilationUnit("JsSearch", "src", "q3", "A$B.js").getType("A$B");
search(
type,
@@ -2358,7 +2453,7 @@ public void testTypeOccurence4() throws CoreException { // was testTypeOccurence
* (Regression test for PR 1GK7K17: ITPJCORE:WIN2000 - search: missing type reference)
*/
public void testTypeReference01() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "", "X.java").getType("X");
+ IType type = getCompilationUnit("JsSearch", "src", "", "X.js").getType("X");
search(
type,
@@ -2374,7 +2469,7 @@ public void testTypeReference01() throws CoreException {
* (Regression test for bug 29516 SearchEngine regressions in 20030114)
*/
public void testTypeReference02() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "src", "d7", "A.java").getType("A");
+ IType type = getCompilationUnit("JsSearch", "src", "d7", "A.js").getType("A");
search(
type,
@@ -2409,7 +2504,7 @@ public void testTypeReference03() throws CoreException {
* (Regression test for bug 31997 Refactoring d.n. work for projects with brackets in name.)
*/
public void testTypeReference04() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "otherSrc()", "", "X31997.java").getType("X31997");
+ IType type = getCompilationUnit("JsSearch", "otherSrc()", "", "X31997.js").getType("X31997");
search(
type,
@@ -2425,7 +2520,7 @@ public void testTypeReference04() throws CoreException {
* (Regression test for bug 48261 Search does not show results)
*/
public void testTypeReference05() throws CoreException {
- IType type = getCompilationUnit("JavaSearch", "test48261.jar", "p", "X.java").getType("X");
+ IType type = getCompilationUnit("JsSearch", "test48261.jar", "p", "X.js").getType("X");
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {type.getPackageFragment().getParent()});
search(
@@ -2442,7 +2537,7 @@ public void testTypeReference05() throws CoreException {
* (in a generic type)
*/
public void testTypeReference06() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15/src/p1/X.java").getType("X");
+ IType type = getCompilationUnit("JavaSearch15/src/p1/X.js").getType("X");
search(
type,
@@ -2457,7 +2552,7 @@ public void testTypeReference06() throws CoreException {
* Simple type reference test.
*/
public void testTypeReference07() throws CoreException { // was testTypeDeclaration01
- IType type = getCompilationUnit("JavaSearch", "src", "p", "X.java").getType("X");
+ IType type = getCompilationUnit("JsSearch", "src", "p", "X.js").getType("X");
search(
type,
@@ -2479,7 +2574,7 @@ public void testTypeReference07() throws CoreException { // was testTypeDeclarat
* (regression test for PR #1G4GO4O)
*/
public void testTypeReference08() throws CoreException { // was testTypeReferenceInInitializer
- IType type = getCompilationUnit("JavaSearch", "src", "", "Test.java").getType("Test");
+ IType type = getCompilationUnit("JsSearch", "src", "", "Test.js").getType("Test");
search(
type,
@@ -2496,7 +2591,7 @@ public void testTypeReference08() throws CoreException { // was testTypeReferenc
* Type reference as a single name reference test.
*/
public void testTypeReference09() throws CoreException { // was testTypeReferenceAsSingleNameReference
- IType type = getCompilationUnit("JavaSearch", "src", "", "TypeReferenceAsSingleNameReference.java").getType("TypeReferenceAsSingleNameReference");
+ IType type = getCompilationUnit("JsSearch", "src", "", "TypeReferenceAsSingleNameReference.js").getType("TypeReferenceAsSingleNameReference");
search(
type,
@@ -2563,7 +2658,7 @@ public void testTypeReference10() throws CoreException { // was testMemberTypeRe
* (regression test for PR 1GL0MN9: ITPJCORE:WIN2000 - search: not consistent results for nested types)
*/
public void testTypeReference11() throws CoreException { // was testMemberTypeReference2
- IType type = getCompilationUnit("JavaSearch", "src", "a", "A.java").getType("A").getType("X");
+ IType type = getCompilationUnit("JsSearch", "src", "a", "A.js").getType("A").getType("X");
search(
type,
@@ -2580,7 +2675,7 @@ public void testTypeReference11() throws CoreException { // was testMemberTypeRe
* (regression test for 1G4GHPS: ITPJUI:WINNT - Strange error message in search)
*/
public void testTypeReference12() throws CoreException { // was testObjectMemberTypeReference
- IType type = getCompilationUnit("JavaSearch", "src", "ObjectMemberTypeReference", "A.java")
+ IType type = getCompilationUnit("JsSearch", "src", "ObjectMemberTypeReference", "A.js")
.getType("A")
.getType("Object");
@@ -2599,7 +2694,7 @@ public void testTypeReference12() throws CoreException { // was testObjectMember
* (Regression test for PR #1G4TSC0)
*/
public void testTypeReference13() throws CoreException { // was testTypeReferenceInQualifiedNameReference
- IType type = getCompilationUnit("JavaSearch", "src", "p", "A.java").getType("A");
+ IType type = getCompilationUnit("JsSearch", "src", "p", "A.js").getType("A");
search(
type,
@@ -2617,7 +2712,7 @@ public void testTypeReference13() throws CoreException { // was testTypeReferenc
* (Regression test for PR #1GLBP65)
*/
public void testTypeReference14() throws CoreException { // was testTypeReferenceInQualifiedNameReference2
- IType type = getCompilationUnit("JavaSearch", "src", "p4", "A.java").getType("A");
+ IType type = getCompilationUnit("JsSearch", "src", "p4", "A.js").getType("A");
search(
type,
@@ -2635,7 +2730,7 @@ public void testTypeReference14() throws CoreException { // was testTypeReferenc
* (Regression test for PR 1GL9UMH: ITPJCORE:WIN2000 - search: missing type occurrences)
*/
public void testTypeReference15() throws CoreException { // was testTypeReferenceInQualifiedNameReference3
- IType type = getCompilationUnit("JavaSearch", "src", "", "W.java").getType("W");
+ IType type = getCompilationUnit("JsSearch", "src", "", "W.js").getType("W");
search(
type,
@@ -2651,7 +2746,7 @@ public void testTypeReference15() throws CoreException { // was testTypeReferenc
* (Regression test for bug 16751 Renaming a class doesn't update all references )
*/
public void testTypeReference16() throws CoreException { // was testTypeReferenceInQualifiedNameReference4
- IType type = getCompilationUnit("JavaSearch", "src", "b7", "X.java").getType("SubClass");
+ IType type = getCompilationUnit("JsSearch", "src", "b7", "X.js").getType("SubClass");
search(
type,
@@ -2667,7 +2762,7 @@ public void testTypeReference16() throws CoreException { // was testTypeReferenc
* (regression test for PR #1G5N8KS)
*/
public void testTypeReference17() throws CoreException { // was testTypeReferenceNotInClasspath
- IType type = getCompilationUnit("JavaSearch", "src", "p", "X.java").getType("X");
+ IType type = getCompilationUnit("JsSearch", "src", "p", "X.js").getType("X");
search(
type,
@@ -2689,7 +2784,7 @@ public void testTypeReference17() throws CoreException { // was testTypeReferenc
* (Regression test for PR #1GA7QA1)
*/
public void testTypeReference18() throws CoreException { // was testVariousTypeReferences
- IType type = getCompilationUnit("JavaSearch", "src", "NoReference", "A.java").getType("A");
+ IType type = getCompilationUnit("JsSearch", "src", "NoReference", "A.js").getType("A");
search(
type,
@@ -2705,7 +2800,7 @@ public void testTypeReference18() throws CoreException { // was testVariousTypeR
* (regression test for PR #1GA7PAS)
*/
public void testTypeReference19() throws CoreException { // was testTypeReferenceInImport
- IType type = getCompilationUnit("JavaSearch", "src", "p2", "Z.java").getType("Z");
+ IType type = getCompilationUnit("JsSearch", "src", "p2", "Z.js").getType("Z");
search(
type,
@@ -2721,7 +2816,7 @@ public void testTypeReference19() throws CoreException { // was testTypeReferenc
* (regression test for bug 23077 search: does not find type references in some imports)
*/
public void testTypeReference20() throws CoreException { // was testTypeReferenceInImport2
- IType type = getCompilationUnit("JavaSearch", "src", "r6", "A.java").getType("A");
+ IType type = getCompilationUnit("JsSearch", "src", "r6", "A.js").getType("A");
search(
type,
@@ -2742,7 +2837,7 @@ public void testTypeReference20() throws CoreException { // was testTypeReferenc
* (regression test for PR #1GAL424)
*/
public void testTypeReference21() throws CoreException { // was testTypeReferenceInArray
- IType type = getCompilationUnit("JavaSearch", "src", "TypeReferenceInArray", "A.java").getType("A");
+ IType type = getCompilationUnit("JsSearch", "src", "TypeReferenceInArray", "A.js").getType("A");
search(
type,
@@ -2759,7 +2854,7 @@ public void testTypeReference21() throws CoreException { // was testTypeReferenc
* (regression test for bug 3230 Search - Too many type references for query ending with * (1GAZVGI) )
*/
public void testTypeReference22() throws CoreException { // was testTypeReferenceInArray2
- IType type = getCompilationUnit("JavaSearch", "src", "s1", "X.java").getType("X");
+ IType type = getCompilationUnit("JsSearch", "src", "s1", "X.js").getType("X");
search(
type,
@@ -2775,7 +2870,7 @@ public void testTypeReference22() throws CoreException { // was testTypeReferenc
* (regression test for 1G52F7P: ITPJCORE:WINNT - Search - finds bogus references to class)
*/
public void testTypeReference23() throws CoreException { // testNegativeTypeReference
- IType type = getCompilationUnit("JavaSearch", "src", "p7", "A.java").getType("A");
+ IType type = getCompilationUnit("JsSearch", "src", "p7", "A.js").getType("A");
search(
type,
@@ -2791,7 +2886,7 @@ public void testTypeReference23() throws CoreException { // testNegativeTypeRefe
* (Regression test for bug 6779 searchDeclarationsOfReferencedTyped - missing exception types)
*/
public void testTypeReference24() throws CoreException { // was testTypeReferenceInThrows
- IType type = getCompilationUnit("JavaSearch", "src", "a7", "X.java").getType("MyException");
+ IType type = getCompilationUnit("JsSearch", "src", "a7", "X.js").getType("MyException");
resultCollector.showAccuracy = true;
search(
@@ -2814,7 +2909,7 @@ public void testTypeReference25() throws CoreException { // was testInnacurateTy
TYPE,
REFERENCES,
SearchEngine.createJavaSearchScope(new IJavaElement[] {
- getPackageFragment("JavaSearch", "src", "b5")
+ getPackageFragment("JsSearch", "src", "b5")
}),
this.resultCollector);
assertSearchResults(
@@ -2835,7 +2930,7 @@ public void testTypeReference26() throws CoreException { // was testInnacurateTy
TYPE,
REFERENCES,
SearchEngine.createJavaSearchScope(new IJavaElement[] {
- getPackageFragment("JavaSearch", "src", "b5")
+ getPackageFragment("JsSearch", "src", "b5")
}),
this.resultCollector);
assertSearchResults(
@@ -2849,7 +2944,7 @@ public void testTypeReference26() throws CoreException { // was testInnacurateTy
* (Regression test for bug 21485 NPE when doing a reference search to a package)
*/
public void testTypeReference27() throws CoreException { // was testInnacurateTypeReference3
- IType type = getCompilationUnit("JavaSearch", "src", "r3", "A21485.java").getType("A21485");
+ IType type = getCompilationUnit("JsSearch", "src", "r3", "A21485.js").getType("A21485");
resultCollector.showAccuracy = true;
search(
@@ -2867,7 +2962,7 @@ public void testTypeReference27() throws CoreException { // was testInnacurateTy
* (regression test for bug 23329 search: incorrect range for type references in brackets)
*/
public void testTypeReference28() throws CoreException { // was testTypeReferenceInCast
- IType type = getCompilationUnit("JavaSearch", "src", "s3", "A.java").getType("B");
+ IType type = getCompilationUnit("JsSearch", "src", "s3", "A.js").getType("B");
search(
type,
@@ -2898,7 +2993,7 @@ public void testTypeReference29() throws CoreException { // was testPatternMatch
* Type reference test (not case sensitive)
*/
public void testTypeReference30() throws CoreException { // was testTypeReferenceNotCaseSensitive
- IPackageFragment pkg = getPackageFragment("JavaSearch", "src", "d4");
+ IPackageFragment pkg = getPackageFragment("JsSearch", "src", "d4");
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {pkg});
SearchPattern pattern = createPattern("Y", TYPE, REFERENCES, false);
@@ -2920,7 +3015,7 @@ public void testTypeReference31() throws CoreException { // was testAccurateType
TYPE,
REFERENCES,
SearchEngine.createJavaSearchScope(new IJavaElement[] {
- getPackageFragment("JavaSearch", "src", "d5")
+ getPackageFragment("JsSearch", "src", "d5")
}),
this.resultCollector);
assertSearchResults(
@@ -2934,7 +3029,7 @@ public void testTypeReference31() throws CoreException { // was testAccurateType
* (regression test for bug 28236 Search for refs to class in hierarchy matches class outside hierarchy )
*/
public void testTypeReference32() throws CoreException { // was testTypeReferenceInHierarchy
- IType type = getCompilationUnit("JavaSearch", "src", "d9.p1", "A.java").getType("A");
+ IType type = getCompilationUnit("JsSearch", "src", "d9.p1", "A.js").getType("A");
IJavaSearchScope scope = SearchEngine.createHierarchyScope(type);
search(
@@ -2951,7 +3046,7 @@ public void testTypeReference32() throws CoreException { // was testTypeReferenc
* (Regression test for bug 29366 Search reporting invalid inaccurate match )
*/
public void testTypeReference33() throws CoreException { // was testTypeReferenceWithRecovery
- IType type = getCompilationUnit("JavaSearch", "src", "e1", "A29366.java").getType("A29366");
+ IType type = getCompilationUnit("JsSearch", "src", "e1", "A29366.js").getType("A29366");
resultCollector.showAccuracy = true;
search(
@@ -2968,7 +3063,7 @@ public void testTypeReference33() throws CoreException { // was testTypeReferenc
* (Regression test for bug 36479 Rename operation during refactoring fails)
*/
public void testTypeReference34() throws CoreException { // was testTypeReferenceWithProblem
- IType type = getCompilationUnit("JavaSearch", "src", "e6", "A.java").getType("A");
+ IType type = getCompilationUnit("JsSearch", "src", "e6", "A.js").getType("A");
resultCollector.showAccuracy = true;
search(
@@ -2986,7 +3081,7 @@ public void testTypeReference34() throws CoreException { // was testTypeReferenc
* (Regression test for bug 39831 Search finds only "inexact" matches)
*/
public void testTypeReference35() throws CoreException { // was testTypeReferenceWithCorruptJar
- IJavaProject project = getJavaProject("JavaSearch");
+ IJavaProject project = getJavaProject("JsSearch");
IClasspathEntry[] originalCP = project.getRawClasspath();
try {
// add corrupt.jar to classpath
@@ -2996,7 +3091,7 @@ public void testTypeReference35() throws CoreException { // was testTypeReferenc
newCP[cpLength] = JavaCore.newLibraryEntry(new Path("/JavaSearch/corrupt.jar"), null, null);
project.setRawClasspath(newCP, null);
- IType type = getCompilationUnit("JavaSearch", "src", "e7", "A.java").getType("A");
+ IType type = getCompilationUnit("JsSearch", "src", "e7", "A.js").getType("A");
resultCollector.showAccuracy = true;
search(
@@ -3015,7 +3110,7 @@ public void testTypeReference35() throws CoreException { // was testTypeReferenc
* Local type reference test.
*/
public void testTypeReference36() throws CoreException { // was testLocalTypeReference1
- IPackageFragment pkg = getPackageFragment("JavaSearch", "src", "f2");
+ IPackageFragment pkg = getPackageFragment("JsSearch", "src", "f2");
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {pkg});
resultCollector.showContext = true;
@@ -3033,7 +3128,7 @@ public void testTypeReference36() throws CoreException { // was testLocalTypeRef
* Local type reference test.
*/
public void testTypeReference37() throws CoreException { // was testLocalTypeReference2
- IType type = getCompilationUnit("JavaSearch/src/f2/X.java").getType("X");
+ IType type = getCompilationUnit("JavaSearch/src/f2/X.js").getType("X");
IMethod method = type.getMethod("foo1", new String[0]);
IType localType = method.getType("Y", 1);
@@ -3053,7 +3148,7 @@ public void testTypeReference37() throws CoreException { // was testLocalTypeRef
* Type reference inside/outside doc comment.
*/
public void testTypeReference38() throws CoreException { // was testTypeReferenceInOutDocComment
- IType type = getCompilationUnit("JavaSearch", "src", "s4", "X.java").getType("X");
+ IType type = getCompilationUnit("JsSearch", "src", "s4", "X.js").getType("X");
resultCollector.showInsideDoc = true;
search(type, REFERENCES, getJavaSearchScope(), this.resultCollector);
assertSearchResults(
@@ -3068,7 +3163,7 @@ public void testTypeReference38() throws CoreException { // was testTypeReferenc
* Search for enumerations
*/
public void testEnum01() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15", "src", "e1", "Team.java").getType("Team");
+ IType type = getCompilationUnit("JavaSearch15", "src", "e1", "Team.js").getType("Team");
search(type, REFERENCES, getJavaSearchScope15(), this.resultCollector);
assertSearchResults(
"src/a1/Author.java [e1.Team]\n" +
@@ -3081,7 +3176,7 @@ public void testEnum01() throws CoreException {
this.resultCollector);
}
public void testEnum02() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15", "src", "e1", "Team.java").getType("Team");
+ IType type = getCompilationUnit("JavaSearch15", "src", "e1", "Team.js").getType("Team");
IMethod method = type.getMethod("Team", new String[0]);
search(method, REFERENCES, getJavaSearchScope15("e1", false), this.resultCollector);
assertSearchResults(
@@ -3089,7 +3184,7 @@ public void testEnum02() throws CoreException {
this.resultCollector);
}
public void testEnum03() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15", "src", "e1", "Team.java").getType("Team");
+ IType type = getCompilationUnit("JavaSearch15", "src", "e1", "Team.js").getType("Team");
IMethod method = type.getMethod("Team", new String[] { "I" });
search(method, REFERENCES, getJavaSearchScope15("e1", false), this.resultCollector);
assertSearchResults(
@@ -3101,7 +3196,7 @@ public void testEnum03() throws CoreException {
this.resultCollector);
}
public void testEnum04() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15", "src", "e1", "Team.java").getType("Team");
+ IType type = getCompilationUnit("JavaSearch15", "src", "e1", "Team.js").getType("Team");
IMethod method = type.getMethod("age", new String[0]);
search(method, REFERENCES, getJavaSearchScope15("e1", false), this.resultCollector);
assertSearchResults(
@@ -3109,7 +3204,7 @@ public void testEnum04() throws CoreException {
this.resultCollector);
}
public void testEnum05() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15", "src", "e1", "Team.java").getType("Team");
+ IType type = getCompilationUnit("JavaSearch15", "src", "e1", "Team.js").getType("Team");
IMethod method = type.getMethod("isManager", new String[0]);
search(method, ALL_OCCURRENCES, getJavaSearchScope15("e1", false), this.resultCollector);
assertSearchResults(
@@ -3119,7 +3214,7 @@ public void testEnum05() throws CoreException {
this.resultCollector);
}
public void testEnum06() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15", "src", "e1", "Team.java").getType("Team");
+ IType type = getCompilationUnit("JavaSearch15", "src", "e1", "Team.js").getType("Team");
IMethod method = type.getMethod("setRole", new String[] { "Z" });
search(method, REFERENCES, getJavaSearchScope15("e1", false), this.resultCollector);
assertSearchResults(
@@ -3130,7 +3225,7 @@ public void testEnum06() throws CoreException {
* Search method with varargs
*/
public void testVarargs01() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15", "src", "v1", "X.java").getType("X");
+ IType type = getCompilationUnit("JavaSearch15", "src", "v1", "X.js").getType("X");
IMethod method = type.getMethod("vargs", new String[] { "I", "I" });
search(method, ALL_OCCURRENCES, getJavaSearchScope15(), this.resultCollector);
assertSearchResults(
@@ -3139,7 +3234,7 @@ public void testVarargs01() throws CoreException {
this.resultCollector);
}
public void testVarargs02() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15", "src", "v1", "X.java").getType("X");
+ IType type = getCompilationUnit("JavaSearch15", "src", "v1", "X.js").getType("X");
IMethod method = type.getMethod("vargs", new String[] { "I", "[I" });
search(method, ALL_OCCURRENCES, getJavaSearchScope15(), this.resultCollector);
assertSearchResults(
@@ -3149,7 +3244,7 @@ public void testVarargs02() throws CoreException {
this.resultCollector);
}
public void testVarargs03() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15", "src", "v1", "X.java").getType("X");
+ IType type = getCompilationUnit("JavaSearch15", "src", "v1", "X.js").getType("X");
IMethod method = type.getMethod("vargs", new String[] { "[QString;" });
search(method, ALL_OCCURRENCES, getJavaSearchScope15(), this.resultCollector);
assertSearchResults(
@@ -3158,7 +3253,7 @@ public void testVarargs03() throws CoreException {
this.resultCollector);
}
public void testVarargs04() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15", "src", "v1", "X.java").getType("X");
+ IType type = getCompilationUnit("JavaSearch15", "src", "v1", "X.js").getType("X");
IMethod method = type.getMethod("vargs", new String[] { "QString;", "[Z" });
search(method, ALL_OCCURRENCES, getJavaSearchScope15(), this.resultCollector);
assertSearchResults(
@@ -3189,7 +3284,7 @@ public void testVarargs06() throws CoreException {
* Search for annotations
*/
public void testAnnotationType01() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15", "src", "a1", "Author.java").getType("Author");
+ IType type = getCompilationUnit("JavaSearch15", "src", "a1", "Author.js").getType("Author");
search(type, REFERENCES, getJavaSearchScope15(), this.resultCollector);
assertSearchResults(
"src/a1/Test.java a1.Test [Author]\n" +
@@ -3198,7 +3293,7 @@ public void testAnnotationType01() throws CoreException {
this.resultCollector);
}
public void testAnnotationType02() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "a1", "Test.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "a1", "Test.js");
IType type = selectType(unit, "Author");
search(type, DECLARATIONS, getJavaSearchScope15(), this.resultCollector);
assertSearchResults(
@@ -3211,7 +3306,7 @@ public void testAnnotationType02() throws CoreException {
*/
public void testAutoBoxing01() throws CoreException {
workingCopies = new ICompilationUnit[1];
- workingCopies[0] = getWorkingCopy("/JavaSearch15/src/p/X.java",
+ workingCopies[0] = getWorkingCopy("/JavaSearch15/src/p/X.js",
"package p;\n" +
"public class X {\n" +
" void foo(int x) {}\n" +
@@ -3235,7 +3330,7 @@ public void testAutoBoxing01() throws CoreException {
* Type type parameters
*/
public void testTypeParameterTypes01() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.m.def", "Single.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.m.def", "Single.js");
ITypeParameter typeParam = selectTypeParameter(unit, "T");
search(typeParam, REFERENCES, getJavaSearchScope15());
assertSearchResults(
@@ -3250,7 +3345,7 @@ public void testTypeParameterTypes01() throws CoreException {
);
}
public void testTypeParameterTypes02() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.m.def", "Single.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.m.def", "Single.js");
ITypeParameter typeParam = selectTypeParameter(unit, "T", 3); // return type of returnParamType() method
search(typeParam, DECLARATIONS, getJavaSearchScope15());
assertSearchResults(
@@ -3258,7 +3353,7 @@ public void testTypeParameterTypes02() throws CoreException {
);
}
public void testTypeParameterTypes03() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.m.def", "Single.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.m.def", "Single.js");
ITypeParameter typeParam = selectTypeParameter(unit, "T", 4); // type argument of Single<T>
search(typeParam, ALL_OCCURRENCES, getJavaSearchScope15());
assertSearchResults(
@@ -3274,7 +3369,7 @@ public void testTypeParameterTypes03() throws CoreException {
);
}
public void testTypeParameterTypes04() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.m.def", "Multiple.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.m.def", "Multiple.js");
ITypeParameter typeParam = selectTypeParameter(unit, "T3");
search(typeParam, REFERENCES, getJavaSearchScope15());
assertSearchResults(
@@ -3289,7 +3384,7 @@ public void testTypeParameterTypes04() throws CoreException {
);
}
public void testTypeParameterTypes05() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.m.def", "Multiple.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.m.def", "Multiple.js");
ITypeParameter typeParam = selectTypeParameter(unit, "T1", 2); // return type of returnParamType() method
search(typeParam, DECLARATIONS, getJavaSearchScope15());
assertSearchResults(
@@ -3297,7 +3392,7 @@ public void testTypeParameterTypes05() throws CoreException {
);
}
public void testTypeParameterTypes06() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.m.def", "Multiple.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.m.def", "Multiple.js");
ITypeParameter typeParam = selectTypeParameter(unit, "T2", 3); // type argument of Multiple<T1,T2,T3>
search(typeParam, ALL_OCCURRENCES, getJavaSearchScope15());
assertSearchResults(
@@ -3316,7 +3411,7 @@ public void testTypeParameterTypes06() throws CoreException {
* Methods type parameters
*/
public void testTypeParameterMethods01() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.m.def", "Single.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.m.def", "Single.js");
ITypeParameter typeParam = selectTypeParameter(unit, "U");
search(typeParam, REFERENCES, getJavaSearchScope15());
assertSearchResults(
@@ -3324,7 +3419,7 @@ public void testTypeParameterMethods01() throws CoreException {
);
}
public void testTypeParameterMethods02() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.m.def", "Single.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.m.def", "Single.js");
ITypeParameter typeParam = selectTypeParameter(unit, "U", 2); // argument of generic method
search(typeParam, DECLARATIONS, getJavaSearchScope15());
assertSearchResults(
@@ -3332,7 +3427,7 @@ public void testTypeParameterMethods02() throws CoreException {
);
}
public void testTypeParameterMethods03() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.m.def", "Single.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.m.def", "Single.js");
ITypeParameter typeParam = selectTypeParameter(unit, "U", 4); // argument of complete method
search(typeParam, ALL_OCCURRENCES, getJavaSearchScope15());
assertSearchResults(
@@ -3341,7 +3436,7 @@ public void testTypeParameterMethods03() throws CoreException {
);
}
public void testTypeParameterMethods04() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.m.def", "Multiple.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.m.def", "Multiple.js");
ITypeParameter typeParam = selectTypeParameter(unit, "U3", 3); // type parameter of complete method (extends)
search(typeParam, REFERENCES, getJavaSearchScope15());
assertSearchResults(
@@ -3349,7 +3444,7 @@ public void testTypeParameterMethods04() throws CoreException {
);
}
public void testTypeParameterMethods05() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.m.def", "Multiple.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.m.def", "Multiple.js");
ITypeParameter typeParam = selectTypeParameter(unit, "U1", 2); // argument of generic method
search(typeParam, DECLARATIONS, getJavaSearchScope15());
assertSearchResults(
@@ -3357,7 +3452,7 @@ public void testTypeParameterMethods05() throws CoreException {
);
}
public void testTypeParameterMethods06() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.m.def", "Multiple.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.m.def", "Multiple.js");
ITypeParameter typeParam = selectTypeParameter(unit, "U2", 4); // argument of complete method
search(typeParam, ALL_OCCURRENCES, getJavaSearchScope15());
assertSearchResults(
@@ -3369,7 +3464,7 @@ public void testTypeParameterMethods06() throws CoreException {
* Constructors type parameters
*/
public void testTypeParameterConstructors01() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.c.def", "Single.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.c.def", "Single.js");
ITypeParameter typeParam = selectTypeParameter(unit, "U");
search(typeParam, REFERENCES, getJavaSearchScope15());
assertSearchResults(
@@ -3377,7 +3472,7 @@ public void testTypeParameterConstructors01() throws CoreException {
);
}
public void testTypeParameterConstructors02() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.c.def", "Single.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.c.def", "Single.js");
ITypeParameter typeParam = selectTypeParameter(unit, "U");
// TODO (frederic) use following line instead when bug 83438 will be fixed
// ITypeParameter typeParam = selectTypeParameter(unit, "U", 2); // argument of generic method
@@ -3387,7 +3482,7 @@ public void testTypeParameterConstructors02() throws CoreException {
);
}
public void testTypeParameterConstructors03() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.c.def", "Single.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.c.def", "Single.js");
ITypeParameter typeParam = selectTypeParameter(unit, "U");
// TODO (frederic) use following line instead when bug 83438 will be fixed
//ITypeParameter typeParam = selectTypeParameter(unit, "U", 4); // argument of complete method
@@ -3398,7 +3493,7 @@ public void testTypeParameterConstructors03() throws CoreException {
);
}
public void testTypeParameterConstructors04() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.c.def", "Multiple.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.c.def", "Multiple.js");
ITypeParameter typeParam = selectTypeParameter(unit, "U3", 3); // type parameter of complete method (extends)
search(typeParam, REFERENCES, getJavaSearchScope15());
assertSearchResults(
@@ -3406,7 +3501,7 @@ public void testTypeParameterConstructors04() throws CoreException {
);
}
public void testTypeParameterConstructors05() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.c.def", "Multiple.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.c.def", "Multiple.js");
ITypeParameter typeParam = selectTypeParameter(unit, "U1");
// TODO (frederic) use following line instead when bug 83438 will be fixed
//ITypeParameter typeParam = selectTypeParameter(unit, "U1", 2); // argument of generic method
@@ -3416,7 +3511,7 @@ public void testTypeParameterConstructors05() throws CoreException {
);
}
public void testTypeParameterConstructors06() throws CoreException {
- ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.c.def", "Multiple.java");
+ ICompilationUnit unit = getCompilationUnit("JavaSearch15", "src", "g5.c.def", "Multiple.js");
ITypeParameter typeParam = selectTypeParameter(unit, "U2", 3);
// TODO (frederic) use following line instead when bug 83438 will be fixed
//ITypeParameter typeParam = selectTypeParameter(unit, "U2", 4); // argument of complete method
@@ -3432,7 +3527,7 @@ public void testTypeParameterConstructors06() throws CoreException {
*/
// for fields
public void testStaticImportField01() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15", "src", "s1.pack.age", "S.java").getType("S");
+ IType type = getCompilationUnit("JavaSearch15", "src", "s1.pack.age", "S.js").getType("S");
search(type, REFERENCES, getJavaSearchScope15(), resultCollector);
assertSearchResults(
"src/s1/A.java [s1.pack.age.S]\n" +
@@ -3446,7 +3541,7 @@ public void testStaticImportField01() throws CoreException {
);
}
public void testStaticImportField02() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15", "src", "s1.pack.age", "S.java").getType("S");
+ IType type = getCompilationUnit("JavaSearch15", "src", "s1.pack.age", "S.js").getType("S");
IField field = type.getField("out");
search(field, REFERENCES, getJavaSearchScope15(), resultCollector);
assertSearchResults(
@@ -3457,7 +3552,7 @@ public void testStaticImportField02() throws CoreException {
);
}
public void testStaticImportField03() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15", "src", "s1.pack.age", "S.java").getType("S");
+ IType type = getCompilationUnit("JavaSearch15", "src", "s1.pack.age", "S.js").getType("S");
IType member = type.getType("M");
search(member, REFERENCES, getJavaSearchScope15(), resultCollector);
assertSearchResults(
@@ -3470,7 +3565,7 @@ public void testStaticImportField03() throws CoreException {
);
}
public void testStaticImportField04() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15", "src", "s1.pack.age", "S.java").getType("S");
+ IType type = getCompilationUnit("JavaSearch15", "src", "s1.pack.age", "S.js").getType("S");
IType member = type.getType("M");
IField field = member.getField("in");
search(field, REFERENCES, getJavaSearchScope15(), resultCollector);
@@ -3484,7 +3579,7 @@ public void testStaticImportField04() throws CoreException {
}
// for methods
public void testStaticImportMethod01() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15", "src", "s2.pack.age", "S.java").getType("S");
+ IType type = getCompilationUnit("JavaSearch15", "src", "s2.pack.age", "S.js").getType("S");
search(type, REFERENCES, getJavaSearchScope15(), resultCollector);
assertSearchResults(
"src/s2/A.java [s2.pack.age.S]\n" +
@@ -3498,7 +3593,7 @@ public void testStaticImportMethod01() throws CoreException {
);
}
public void testStaticImportMethod02() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15", "src", "s2.pack.age", "S.java").getType("S");
+ IType type = getCompilationUnit("JavaSearch15", "src", "s2.pack.age", "S.js").getType("S");
IMethod method = type.getMethod("out", new String[0]);
search(method, REFERENCES, getJavaSearchScope15(), resultCollector);
assertSearchResults(
@@ -3509,7 +3604,7 @@ public void testStaticImportMethod02() throws CoreException {
);
}
public void testStaticImportMethod03() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15", "src", "s2.pack.age", "S.java").getType("S");
+ IType type = getCompilationUnit("JavaSearch15", "src", "s2.pack.age", "S.js").getType("S");
IType member = type.getType("M");
search(member, REFERENCES, getJavaSearchScope15(), resultCollector);
assertSearchResults(
@@ -3522,7 +3617,7 @@ public void testStaticImportMethod03() throws CoreException {
);
}
public void testStaticImportMethod04() throws CoreException {
- IType type = getCompilationUnit("JavaSearch15", "src", "s2.pack.age", "S.java").getType("S");
+ IType type = getCompilationUnit("JavaSearch15", "src", "s2.pack.age", "S.js").getType("S");
IType member = type.getType("M");
IMethod method = member.getMethod("in", new String[0]);
search(method, REFERENCES, getJavaSearchScope15(), resultCollector);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocBugsCompletionModelTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocBugsCompletionModelTest.java
index b9c6877..ce5c6fc 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocBugsCompletionModelTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocBugsCompletionModelTest.java
@@ -55,7 +55,7 @@ public void testBug3270() throws JavaModelException {
" */\n" +
" void foo() throws InterruptedException {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/bugs/BasicTestBugs.java", source, true, "@throws ", 0); // empty token
+ completeInJavadoc("/Completion/src/javadoc/bugs/BasicTestBugs.js", source, true, "@throws ", 0); // empty token
if (CompletionEngine.NO_TYPE_COMPLETION_ON_EMPTY_TOKEN) {
assertSortedResults(
"InterruptedException[TYPE_REF]{InterruptedException, java.lang, Ljava.lang.InterruptedException;, null, null, "+this.positions+R_DICUNREETE+"}"
@@ -76,7 +76,7 @@ public void testBug3270a() throws JavaModelException {
" */\n" +
" void foo() throws InterruptedException {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/bugs/BasicTestBugs.java", source, true, "I");
+ completeInJavadoc("/Completion/src/javadoc/bugs/BasicTestBugs.js", source, true, "I");
assertSortedResults(
"InterruptedException[TYPE_REF]{InterruptedException, java.lang, Ljava.lang.InterruptedException;, null, null, "+this.positions+R_DICUNREEET+"}\n" +
"IllegalMonitorStateException[TYPE_REF]{IllegalMonitorStateException, java.lang, Ljava.lang.IllegalMonitorStateException;, null, null, "+this.positions+R_DICUNRE+"}"
@@ -91,7 +91,7 @@ public void testBug3270b() throws JavaModelException {
" */\n" +
" void foo() throws InterruptedException {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/bugs/BasicTestBugs.java", source, true, "Cl");
+ completeInJavadoc("/Completion/src/javadoc/bugs/BasicTestBugs.js", source, true, "Cl");
assertSortedResults(
"CloneNotSupportedException[TYPE_REF]{CloneNotSupportedException, java.lang, Ljava.lang.CloneNotSupportedException;, null, null, "+this.positions+R_DICUNRE+"}\n" +
"Class[TYPE_REF]{Class, java.lang, Ljava.lang.Class;, null, null, "+this.positions+R_DICUNR+"}"
@@ -112,7 +112,7 @@ public void testBug22043() throws JavaModelException {
"public class BasicTestBugs {\n" +
" public void thisIsAMethod(String param) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/bugs/BasicTestBugs.java", source, true, "S", 2); // 2nd occurence
+ completeInJavadoc("/Completion/src/javadoc/bugs/BasicTestBugs.js", source, true, "S", 2); // 2nd occurence
assertSortedResults(
"String[TYPE_REF]{String, java.lang, Ljava.lang.String;, null, null, "+this.positions+R_DICUNR+"}\n" +
"Serializable[TYPE_REF]{java.io.Serializable, java.io, Ljava.io.Serializable;, null, null, "+this.positions+R_DICNR+"}\n" +
@@ -130,7 +130,7 @@ public void testBug22043a() throws JavaModelException {
"public class BasicTestBugs {\n" +
" public void thisIsAMethod(String param) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/bugs/BasicTestBugs.java", source, true, "thisIsAMethod", 2); // 2nd occurence
+ completeInJavadoc("/Completion/src/javadoc/bugs/BasicTestBugs.js", source, true, "thisIsAMethod", 2); // 2nd occurence
assertResults(
"thisIsAMethod[METHOD_REF]{thisIsAMethod(String), Ljavadoc.bugs.BasicTestBugs;, (Ljava.lang.String;)V, thisIsAMethod, (param), "+this.positions+R_DICENNRNS+"}"
);
@@ -146,7 +146,7 @@ public void testBug22043b() throws JavaModelException {
"public class BasicTestBugs {\n" +
" public void thisIsAMethod(String param) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/bugs/BasicTestBugs.java", source, true, "thisIsAMethod(", 2); // 2nd occurence
+ completeInJavadoc("/Completion/src/javadoc/bugs/BasicTestBugs.js", source, true, "thisIsAMethod(", 2); // 2nd occurence
assertResults(
"thisIsAMethod[METHOD_REF]{thisIsAMethod(String), Ljavadoc.bugs.BasicTestBugs;, (Ljava.lang.String;)V, thisIsAMethod, (param), "+this.positions+R_DICENUNR+"}"
);
@@ -163,7 +163,7 @@ public void testBug22043c() throws JavaModelException {
" public void thisIsAMethod(String param) {}\n" +
" public void thisIsAMethod(Object str) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/bugs/BasicTestBugs.java", source, true, "thisIsAMethod(", 2); // 2nd occurence
+ completeInJavadoc("/Completion/src/javadoc/bugs/BasicTestBugs.js", source, true, "thisIsAMethod(", 2); // 2nd occurence
assertResults(
"thisIsAMethod[METHOD_REF]{thisIsAMethod(Object), Ljavadoc.bugs.BasicTestBugs;, (Ljava.lang.Object;)V, thisIsAMethod, (str), "+this.positions+R_DICENUNR+"}\n" +
"thisIsAMethod[METHOD_REF]{thisIsAMethod(String), Ljavadoc.bugs.BasicTestBugs;, (Ljava.lang.String;)V, thisIsAMethod, (param), "+this.positions+R_DICENUNR+"}"
@@ -183,7 +183,7 @@ public void testBug67732() throws JavaModelException {
" */\n" +
"public class T67732 {\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/bugs/BasicTestBugs.java", source, true, "to");
+ completeInJavadoc("/Completion/src/javadoc/bugs/BasicTestBugs.js", source, true, "to");
assertSortedResults(
"toString[METHOD_REF]{toString(), Ljava.lang.Object;, ()Ljava.lang.String;, toString, null, "+this.positions+R_DICNRNS+"}"
);
@@ -195,7 +195,7 @@ public void testBug67732() throws JavaModelException {
*/
public void testBug68757() throws JavaModelException {
String[] sources = {
- "/Completion/src/javadoc/bugs/BasicTestBugs.java",
+ "/Completion/src/javadoc/bugs/BasicTestBugs.js",
"package javadoc.bugs;\n" +
"import javadoc.tests.OtherType;\n" +
"public class BasicTestBugs {\n" +
@@ -204,7 +204,7 @@ public void testBug68757() throws JavaModelException {
" */\n" +
" public void foo(OtherType type) {}\n" +
"}\n",
- "/Completion/src/javadoc/tests/OtherType.java",
+ "/Completion/src/javadoc/tests/OtherType.js",
"package javadoc.tests;\n" +
"public class OtherType {\n" +
"}\n"
@@ -216,7 +216,7 @@ public void testBug68757() throws JavaModelException {
}
public void testBug68757a() throws JavaModelException {
String[] sources = {
- "/Completion/src/javadoc/bugs/BasicTestBugs.java",
+ "/Completion/src/javadoc/bugs/BasicTestBugs.js",
"package javadoc.bugs;\n" +
"public class BasicTestBugs {\n" +
" /**\n" +
@@ -224,7 +224,7 @@ public void testBug68757a() throws JavaModelException {
" */\n" +
" public void foo(javadoc.tests.OtherType type) {}\n" +
"}\n",
- "/Completion/src/javadoc/tests/OtherType.java",
+ "/Completion/src/javadoc/tests/OtherType.js",
"package javadoc.tests;\n" +
"public class OtherType {\n" +
"}\n"
@@ -236,7 +236,7 @@ public void testBug68757a() throws JavaModelException {
}
public void testBug68757b() throws JavaModelException {
String[] sources = {
- "/Completion/src/javadoc/bugs/BasicTestBugs.java",
+ "/Completion/src/javadoc/bugs/BasicTestBugs.js",
"package javadoc.bugs;\n" +
"public class BasicTestBugs {\n" +
" /**\n" +
@@ -244,7 +244,7 @@ public void testBug68757b() throws JavaModelException {
" */\n" +
" public void foo() {}\n" +
"}\n",
- "/Completion/src/javadoc/tests/OtherType.java",
+ "/Completion/src/javadoc/tests/OtherType.js",
"package javadoc.tests;\n" +
"public class OtherType {\n" +
"}\n"
@@ -262,7 +262,7 @@ public void testBug68757b() throws JavaModelException {
*/
public void _testBug75551() throws JavaModelException {
String[] sources = {
- "/Completion/src/javadoc/bugs/BasicTestBugs.java",
+ "/Completion/src/javadoc/bugs/BasicTestBugs.js",
"package javadoc.bugs;\n" +
"public class BasicTestBugs extends SuperClass {\n" +
" /**\n" +
@@ -272,7 +272,7 @@ public void _testBug75551() throws JavaModelException {
" }\n" +
" public void kick(InnerClass innerClass) {}\n" +
"}",
- "/Completion/src/javadoc/bugs/SuperClass.java",
+ "/Completion/src/javadoc/bugs/SuperClass.js",
"package javadoc.bugs;\n" +
"public class SuperClass {\n" +
" protected static class InnerClass {\n" +
@@ -291,7 +291,7 @@ public void _testBug75551() throws JavaModelException {
*/
public void testBug86112() throws JavaModelException {
String[] sources = {
- "/Completion/src/javadoc/bugs/BasicTestBugs.java",
+ "/Completion/src/javadoc/bugs/BasicTestBugs.js",
"package javadoc.bugs;\n" +
"public class BasicTestBugs {\n" +
" /**\n" +
@@ -300,7 +300,7 @@ public void testBug86112() throws JavaModelException {
" public BasicTestBugs() {\n" +
" }\n" +
"}",
- "/Completion/src/javadoc/bugs/Terminator.java",
+ "/Completion/src/javadoc/bugs/Terminator.js",
"package javadoc.bugs;\n" +
"public class Terminator {\n" +
" static {\n" +
@@ -338,7 +338,7 @@ public void testBug87868() throws JavaModelException {
" */\n" +
" public void method(S s) {}\n" +
"}";
- completeInJavadoc("/Completion/src/javadoc/bugs/BasicTestBugs.java", source, true, "meth");
+ completeInJavadoc("/Completion/src/javadoc/bugs/BasicTestBugs.js", source, true, "meth");
assertSortedResults(
"method[METHOD_REF]{method(Object), Ljavadoc.bugs.BasicTestBugs<TS;>;, (TS;)V, method, (s), "+this.positions+R_DICNRNS+"}"
);
@@ -357,7 +357,7 @@ public void testBug113374a() throws JavaModelException {
" */\n" +
"public class BasicTestBugs {\n" +
"}";
- completeInJavadoc("/Completion/src/javadoc/bugs/BasicTestBugs.java", source, true, "co");
+ completeInJavadoc("/Completion/src/javadoc/bugs/BasicTestBugs.js", source, true, "co");
assertSortedResults("");
}
public void testBug113374b() throws JavaModelException {
@@ -369,7 +369,7 @@ public void testBug113374b() throws JavaModelException {
" */\n" +
"public class BasicTestBugs {\n" +
"}";
- completeInJavadoc("/Completion/src/javadoc/bugs/BasicTestBugs.java", source, true, "un");
+ completeInJavadoc("/Completion/src/javadoc/bugs/BasicTestBugs.js", source, true, "un");
assertSortedResults("");
}
@@ -380,14 +380,14 @@ public void testBug113374b() throws JavaModelException {
public void testBug113376a() throws JavaModelException {
setUpProjectOptions(CompilerOptions.VERSION_1_5);
String[] sources = {
- "/Completion/src/javadoc/bugs/BasicTestFields.java",
+ "/Completion/src/javadoc/bugs/BasicTestFields.js",
"package javadoc.bugs;\n" +
"/**\n" +
" * @see javadoc.util.Collection\n" +
" * @see javadoc.util.List#add(Object)\n" +
" */public class BasicTestBugs<A> {\n" +
"}",
- "/Completion/src/javadoc/util/Collection.java",
+ "/Completion/src/javadoc/util/Collection.js",
"package javadoc.util;\n" +
"public interface Collection<E> {}\n" +
"public interface List<E> {}\n" +
@@ -402,7 +402,7 @@ public void testBug113376a() throws JavaModelException {
public void testBug113376b() throws JavaModelException {
setUpProjectOptions(CompilerOptions.VERSION_1_5);
String[] sources = {
- "/Completion/src/javadoc/bugs/BasicTestFields.java",
+ "/Completion/src/javadoc/bugs/BasicTestFields.js",
"package javadoc.bugs;\n" +
"/**\n" +
" * {@link String.}\n" +
@@ -411,7 +411,7 @@ public void testBug113376b() throws JavaModelException {
" * @see javadoc.util.List#add(Object)\n" +
" */public class BasicTestBugs<A> {\n" +
"}",
- "/Completion/src/javadoc/util/Collection.java",
+ "/Completion/src/javadoc/util/Collection.js",
"package javadoc.util;\n" +
"public interface Collection<E> {}\n" +
"public interface List<E> {}\n" +
@@ -438,7 +438,7 @@ public void testBug114341a() throws JavaModelException {
"class Secondary {\n" +
" class Member {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "Secondary.Mem");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "Secondary.Mem");
assertSortedResults(
"Secondary.Member[JAVADOC_TYPE_REF]{{@link Member}, javadoc.text, Ljavadoc.text.Secondary$Member;, null, null, "+this.positions+R_DICNRIT+"}\n" +
"Secondary.Member[TYPE_REF]{Member, javadoc.text, Ljavadoc.text.Secondary$Member;, null, null, "+this.positions+R_DICNR+"}"
@@ -457,7 +457,7 @@ public void testBug114341b() throws JavaModelException {
"class Secondary {\n" +
" class Member {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "Mem");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "Mem");
assertSortedResults(
"Secondary.Member[TYPE_REF]{Member, javadoc.text, Ljavadoc.text.Secondary$Member;, null, null, "+this.positions+R_DICNR+"}"
);
@@ -475,7 +475,7 @@ public void testBug114341c() throws JavaModelException {
"class Secondary {\n" +
" class Member {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "Mem");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "Mem");
assertSortedResults(
"Secondary.Member[TYPE_REF]{Member, javadoc.text, Ljavadoc.text.Secondary$Member;, null, null, "+this.positions+R_DICNR+"}"
);
@@ -492,7 +492,7 @@ public void testBug114341d() throws JavaModelException {
"class Secondary {\n" +
" class Member {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "javadoc.text.Secondary.Mem");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "javadoc.text.Secondary.Mem");
assertSortedResults(
"Secondary.Member[JAVADOC_TYPE_REF]{{@link Member}, javadoc.text, Ljavadoc.text.Secondary$Member;, null, null, "+this.positions+R_DICNRIT+"}\n" +
"Secondary.Member[TYPE_REF]{Member, javadoc.text, Ljavadoc.text.Secondary$Member;, null, null, "+this.positions+R_DICNR+"}"
@@ -511,7 +511,7 @@ public void testBug114341e() throws JavaModelException {
"class Secondary {\n" +
" class Member {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "Mem");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "Mem");
assertSortedResults(
"Secondary.Member[TYPE_REF]{Member, javadoc.text, Ljavadoc.text.Secondary$Member;, null, null, "+this.positions+R_DICNR+"}"
);
@@ -529,7 +529,7 @@ public void testBug114341f() throws JavaModelException {
"class Secondary {\n" +
" class Member {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "Mem");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "Mem");
assertSortedResults(
"Secondary.Member[TYPE_REF]{Member, javadoc.text, Ljavadoc.text.Secondary$Member;, null, null, "+this.positions+R_DICNR+"}"
);
@@ -548,7 +548,7 @@ public void testBug115662a() throws JavaModelException {
"public class Tests {\n" +
" int toto;\n" +
"}\n";
- completeInJavadoc("/Completion/src/bugs/b115662/Test.java", source, true, "to");
+ completeInJavadoc("/Completion/src/bugs/b115662/Test.js", source, true, "to");
assertSortedResults(
"toString[METHOD_REF]{toString(), Ljava.lang.Object;, ()Ljava.lang.String;, toString, null, "+this.positions+R_DICNRNS+"}\n" +
"toto[FIELD_REF]{toto, Lbugs.b115662.Tests;, I, toto, null, "+this.positions+R_DICNRNS+"}"
@@ -564,7 +564,7 @@ public void testBug115662b() throws JavaModelException {
"public class Tests {\n" +
" int toto;\n" +
"}\n";
- completeInJavadoc("/Completion/src/bugs/b115662/Test.java", source, true, "to");
+ completeInJavadoc("/Completion/src/bugs/b115662/Test.js", source, true, "to");
assertSortedResults(
"toString[METHOD_REF]{toString(), Ljava.lang.Object;, ()Ljava.lang.String;, toString, null, "+this.positions+R_DICNRNS+"}\n" +
"toto[FIELD_REF]{toto, Lbugs.b115662.Tests;, I, toto, null, "+this.positions+R_DICNRNS+"}"
@@ -580,7 +580,7 @@ public void testBug115662c() throws JavaModelException {
"public class Test {\n" +
" int toto;\n" +
"}\n";
- completeInJavadoc("/Completion/src/bugs/b115662/Test.java", source, true, "toString");
+ completeInJavadoc("/Completion/src/bugs/b115662/Test.js", source, true, "toString");
assertSortedResults(
"toString[METHOD_REF]{toString(), Ljava.lang.Object;, ()Ljava.lang.String;, toString, null, "+this.positions+R_DICENNRNS+"}"
);
@@ -592,7 +592,7 @@ public void testBug115662c() throws JavaModelException {
*/
public void testBug117183a() throws JavaModelException {
String[] sources = {
- "/Completion/src/javadoc/bugs/BasicTestBugs.java",
+ "/Completion/src/javadoc/bugs/BasicTestBugs.js",
"package javadoc.bugs;\n" +
"/**\n" +
" * Completion inside reference Reference#A_STATIC_FIELD.\n" +
@@ -600,7 +600,7 @@ public void testBug117183a() throws JavaModelException {
" */\n" +
"public class BasicTestBugs {\n" +
"}\n",
- "/Completion/src/javadoc/bugs/Reference.java",
+ "/Completion/src/javadoc/bugs/Reference.js",
"package javadoc.bugs;\n" +
"public class Reference {\n" +
" public static int A_STATIC_FIELD = 0;\n" +
@@ -614,7 +614,7 @@ public void testBug117183a() throws JavaModelException {
}
public void testBug117183b() throws JavaModelException {
String[] sources = {
- "/Completion/src/javadoc/bugs/BasicTestBugs.java",
+ "/Completion/src/javadoc/bugs/BasicTestBugs.js",
"package javadoc.bugs;\n" +
"/**\n" +
" * Completion inside reference Reference#A_STATIC_FIELD.\n" +
@@ -622,7 +622,7 @@ public void testBug117183b() throws JavaModelException {
" */\n" +
"public class BasicTestBugs {\n" +
"}\n",
- "/Completion/src/javadoc/bugs/Reference.java",
+ "/Completion/src/javadoc/bugs/Reference.js",
"package javadoc.bugs;\n" +
"public class Reference {\n" +
" public static int A_STATIC_FIELD = 0;\n" +
@@ -636,7 +636,7 @@ public void testBug117183b() throws JavaModelException {
}
public void testBug117183c() throws JavaModelException {
String[] sources = {
- "/Completion/src/javadoc/bugs/BasicTestBugs.java",
+ "/Completion/src/javadoc/bugs/BasicTestBugs.js",
"package javadoc.bugs;\n" +
"/**\n" +
" * Completion after Obj|\n" +
@@ -652,7 +652,7 @@ public void testBug117183c() throws JavaModelException {
}
public void testBug117183d() throws JavaModelException {
String[] sources = {
- "/Completion/src/javadoc/bugs/BasicTestBugs.java",
+ "/Completion/src/javadoc/bugs/BasicTestBugs.js",
"package javadoc.bugs;\n" +
"/**\n" +
" * Completion after Str.\n" +
@@ -679,7 +679,7 @@ public void testBug118105() throws JavaModelException {
" */\n" +
"public class BasicTestBugs {\n" +
"}\n";
- completeInJavadoc("/Completion/src/bugs/b118105/BasicTestBugs.java", source, true, "Str");
+ completeInJavadoc("/Completion/src/bugs/b118105/BasicTestBugs.js", source, true, "Str");
assertSortedResults(
"String[TYPE_REF]{String, java.lang, Ljava.lang.String;, null, null, "+this.positions+R_DICUNR+"}"
);
@@ -698,7 +698,7 @@ public void testBug118092() throws JavaModelException {
" */\n" +
" public void method() {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/bugs/b118092/BasicTestBugs.java", source, true, "<c");
+ completeInJavadoc("/Completion/src/bugs/b118092/BasicTestBugs.js", source, true, "<c");
// expect no result, just not hang...
assertSortedResults("");
}
@@ -716,7 +716,7 @@ public void testBug118311() throws JavaModelException {
"public class BasicTestBugs {\n" +
"\n" +
"}\n";
- completeInJavadoc("/Completion/src/bugs/b118311/BasicTestBugs.java", source, true, "@");
+ completeInJavadoc("/Completion/src/bugs/b118311/BasicTestBugs.js", source, true, "@");
assertSortedResults(
"docRoot[JAVADOC_INLINE_TAG]{{@docRoot}, null, null, docRoot, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"link[JAVADOC_INLINE_TAG]{{@link}, null, null, link, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
@@ -737,7 +737,7 @@ public void testBug118397a() throws JavaModelException {
" */\n" +
"public class BasicTestBugs {\n" +
"}\n";
- completeInJavadoc("/Completion/src/bugs/b118397/BasicTestBugs.java", source, true, "bugs.b118", 2); // 2nd occurence
+ completeInJavadoc("/Completion/src/bugs/b118397/BasicTestBugs.js", source, true, "bugs.b118", 2); // 2nd occurence
assertSortedResults(
"bugs.b118397[PACKAGE_REF]{bugs.b118397, bugs.b118397, null, null, null, "+this.positions+R_DICQNR+"}"
);
@@ -752,7 +752,7 @@ public void testBug118397b() throws JavaModelException {
" class Inner {\n" +
" }\n" +
"}\n";
- completeInJavadoc("/Completion/src/bugs/b118397/BasicTestBugs.java", source, true, "Basic");
+ completeInJavadoc("/Completion/src/bugs/b118397/BasicTestBugs.js", source, true, "Basic");
assertSortedResults(
"BasicTestBugs[TYPE_REF]{BasicTestBugs, bugs.b118397, Lbugs.b118397.BasicTestBugs;, null, null, "+this.positions+R_DICUNR+"}\n" +
"BasicTestReferences[TYPE_REF]{org.eclipse.wst.jsdt.core.tests.BasicTestReferences, org.eclipse.wst.jsdt.core.tests, Lorg.eclipse.wst.jsdt.core.tests.BasicTestReferences;, null, null, "+this.positions+R_DICNR+"}"
@@ -772,7 +772,7 @@ public void testBug118397c() throws JavaModelException {
" }\n" +
" }\n" +
"}\n";
- completeInJavadoc("/Completion/src/bugs/b118397/BasicTestBugs.java", source, true, "In");
+ completeInJavadoc("/Completion/src/bugs/b118397/BasicTestBugs.js", source, true, "In");
assertSortedResults(
"BasicTestBugs.Inner[TYPE_REF]{Inner, bugs.b118397, Lbugs.b118397.BasicTestBugs$Inner;, null, null, "+this.positions+R_DICNR+"}"
);
@@ -791,7 +791,7 @@ public void testBug118397d() throws JavaModelException {
" }\n" +
" }\n" +
"}\n";
- completeInJavadoc("/Completion/src/bugs/b118397/BasicTestBugs.java", source, true, "Lev");
+ completeInJavadoc("/Completion/src/bugs/b118397/BasicTestBugs.js", source, true, "Lev");
assertSortedResults(
"BasicTestBugs.Inner.Level2[TYPE_REF]{Level2, bugs.b118397, Lbugs.b118397.BasicTestBugs$Inner$Level2;, null, null, "+this.positions+R_DICNR+"}"
);
@@ -811,7 +811,7 @@ public void testBug139621a() throws JavaModelException {
" * @see Obj\n" +
" */\n" +
"}\n";
- completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.java", source, true, "Obj");
+ completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.js", source, true, "Obj");
assertSortedResults(
"Object[TYPE_REF]{Object, java.lang, Ljava.lang.Object;, null, null, "+this.positions+R_DICUNR+"}"
);
@@ -829,7 +829,7 @@ public void testBug139621b() throws JavaModelException {
" * @see Obj\n" +
" */\n" +
"}\n";
- completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.java", source, true, "Obj");
+ completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.js", source, true, "Obj");
assertSortedResults(
"Object[TYPE_REF]{Object, java.lang, Ljava.lang.Object;, null, null, "+this.positions+R_DICUNR+"}"
);
@@ -844,7 +844,7 @@ public void testBug139621c() throws JavaModelException {
" * @\n" +
" */\n" +
"}\n";
- completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.java", source, true, "@");
+ completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.js", source, true, "@");
assertSortedResults(
"author[JAVADOC_BLOCK_TAG]{@author, null, null, author, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"category[JAVADOC_BLOCK_TAG]{@category, null, null, category, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
@@ -877,7 +877,7 @@ public void testBug139621d() throws JavaModelException {
" * @\n" +
" */\n" +
"}\n";
- completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.java", source, true, "@", 2);
+ completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.js", source, true, "@", 2);
assertSortedResults(
"docRoot[JAVADOC_INLINE_TAG]{{@docRoot}, null, null, docRoot, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"inheritDoc[JAVADOC_INLINE_TAG]{{@inheritDoc}, null, null, inheritDoc, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
@@ -900,7 +900,7 @@ public void testBug139621e() throws JavaModelException {
" * @see Obj\n" +
" */\n" +
"}\n";
- completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.java", source, true, "Obj");
+ completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.js", source, true, "Obj");
assertSortedResults(
"Object[TYPE_REF]{Object, java.lang, Ljava.lang.Object;, null, null, "+this.positions+R_DICUNR+"}"
);
@@ -919,7 +919,7 @@ public void testBug139621f() throws JavaModelException {
" * @see Obj\n" +
" */\n" +
"}\n";
- completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.java", source, true, "Obj");
+ completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.js", source, true, "Obj");
assertSortedResults(
"Object[TYPE_REF]{Object, java.lang, Ljava.lang.Object;, null, null, "+this.positions+R_DICUNR+"}"
);
@@ -931,7 +931,7 @@ public void testBug139621g() throws JavaModelException {
" * Compilation unit without any type\n" +
" * @see Obj\n" +
" */\n";
- completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.java", source, true, "Obj");
+ completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.js", source, true, "Obj");
assertSortedResults(
"Object[TYPE_REF]{Object, java.lang, Ljava.lang.Object;, null, null, "+this.positions+R_DICUNR+"}"
);
@@ -944,7 +944,7 @@ public void testBug139621h() throws JavaModelException {
" * (completion for tags)\n" +
" * @\n" +
" */\n";
- completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.java", source, true, "@");
+ completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.js", source, true, "@");
assertSortedResults(
"author[JAVADOC_BLOCK_TAG]{@author, null, null, author, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"category[JAVADOC_BLOCK_TAG]{@category, null, null, category, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
@@ -968,7 +968,7 @@ public void testBug139621i() throws JavaModelException {
" * @see Object The root class" + // missing \n
" * @\n" +
" */\n";
- completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.java", source, true, "@", 2);
+ completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.js", source, true, "@", 2);
assertSortedResults(
"docRoot[JAVADOC_INLINE_TAG]{{@docRoot}, null, null, docRoot, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"link[JAVADOC_INLINE_TAG]{{@link}, null, null, link, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
@@ -994,7 +994,7 @@ public void testBug144866() throws JavaModelException {
" public void foo() {\n" +
" }\n" +
"}\n";
- completeInJavadoc("/Completion/src/bugs/b144866/BasicTestBugs.java", source, true, "EX", 2); // 2nd occurence
+ completeInJavadoc("/Completion/src/bugs/b144866/BasicTestBugs.js", source, true, "EX", 2); // 2nd occurence
assertSortedResults(
"EXAMPLE[FIELD_REF]{EXAMPLE, Lbugs.b144866.BasicTestBugs;, I, EXAMPLE, null, "+this.positions+R_DICNR+"}"
);
@@ -1017,7 +1017,7 @@ public void testBug171016() throws JavaModelException {
" */\n" +
" public void foo() {}" +
"}\n";
- completeInJavadoc("/Completion/src/bugs/b171016/BasicTestBugs.java", source, true, "{@In", 1);
+ completeInJavadoc("/Completion/src/bugs/b171016/BasicTestBugs.js", source, true, "{@In", 1);
assertSortedResults(
"inheritDoc[JAVADOC_INLINE_TAG]{{@inheritDoc}, null, null, inheritDoc, null, "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -1034,7 +1034,7 @@ public void testBug171016b() throws JavaModelException {
" */\n" +
" public void foo() {}" +
"}\n";
- completeInJavadoc("/Completion/src/bugs/b171016/BasicTestBugs.java", source, true, "@In", 1);
+ completeInJavadoc("/Completion/src/bugs/b171016/BasicTestBugs.js", source, true, "@In", 1);
assertSortedResults(
"inheritDoc[JAVADOC_INLINE_TAG]{{@inheritDoc}, null, null, inheritDoc, null, "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -1055,7 +1055,7 @@ public void _testBug171031() throws JavaModelException {
" */\n" +
" public void foo() {}" +
"}\n";
- completeInJavadoc("/Completion/src/bugs/b171031/BasicTestBugs.java", source, true, "@In", 1);
+ completeInJavadoc("/Completion/src/bugs/b171031/BasicTestBugs.js", source, true, "@In", 1);
assertSortedResults(""); // should not have any proposal as
}
}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocCompletionContextTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocCompletionContextTests.java
index 11c2530..c24d306 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocCompletionContextTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocCompletionContextTests.java
@@ -39,7 +39,7 @@ public static Test suite() {
public void test0001() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0001/X.java",
+ "/Completion/src3/test0001/X.js",
"package test0001;\n" +
"/**\n" +
" * @see ZZZZ\n" +
@@ -66,7 +66,7 @@ public void test0001() throws JavaModelException {
public void test0002() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0002/X.java",
+ "/Completion/src3/test0002/X.js",
"package test0002;\n" +
"/**\n" +
" * @see ZZZZ\n" +
@@ -93,7 +93,7 @@ public void test0002() throws JavaModelException {
public void test0003() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0003/X.java",
+ "/Completion/src3/test0003/X.js",
"package test0003;\n" +
"/**\n" +
" * @see ZZZZ\n" +
@@ -120,7 +120,7 @@ public void test0003() throws JavaModelException {
public void test0004() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0004/X.java",
+ "/Completion/src3/test0004/X.js",
"package test0004;\n" +
"/**\n" +
" * @see \n" +
@@ -147,7 +147,7 @@ public void test0004() throws JavaModelException {
public void test0005() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0005/X.java",
+ "/Completion/src3/test0005/X.js",
"package test0005;\n" +
"/**\n" +
" * @see X.ZZZZ\n" +
@@ -174,7 +174,7 @@ public void test0005() throws JavaModelException {
public void test0006() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0006/X.java",
+ "/Completion/src3/test0006/X.js",
"package test0006;\n" +
"/**\n" +
" * @see X.ZZZZ\n" +
@@ -201,7 +201,7 @@ public void test0006() throws JavaModelException {
public void test0007() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0007/X.java",
+ "/Completion/src3/test0007/X.js",
"package test0007;\n" +
"/**\n" +
" * @see X.ZZZZ\n" +
@@ -228,7 +228,7 @@ public void test0007() throws JavaModelException {
public void test0008() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0008/X.java",
+ "/Completion/src3/test0008/X.js",
"package test0008;\n" +
"/**\n" +
" * @see X.\n" +
@@ -255,7 +255,7 @@ public void test0008() throws JavaModelException {
public void test0009() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0009/X.java",
+ "/Completion/src3/test0009/X.js",
"package test0009;\n" +
"/**\n" +
" * @see test0009.ZZZZ\n" +
@@ -282,7 +282,7 @@ public void test0009() throws JavaModelException {
public void test0010() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0010/X.java",
+ "/Completion/src3/test0010/X.js",
"package test0010;\n" +
"/**\n" +
" * @see test0010.ZZZZ\n" +
@@ -309,7 +309,7 @@ public void test0010() throws JavaModelException {
public void test0011() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0011/X.java",
+ "/Completion/src3/test0011/X.js",
"package test0011;\n" +
"/**\n" +
" * @see test0011.ZZZZ\n" +
@@ -336,7 +336,7 @@ public void test0011() throws JavaModelException {
public void test0012() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0012/X.java",
+ "/Completion/src3/test0012/X.js",
"package test0012;\n" +
"/**\n" +
" * @see test0012.\n" +
@@ -363,7 +363,7 @@ public void test0012() throws JavaModelException {
public void test0013() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0013/X.java",
+ "/Completion/src3/test0013/X.js",
"package test0013;\n" +
"/**\n" +
" * @see #ZZZZ\n" +
@@ -390,7 +390,7 @@ public void test0013() throws JavaModelException {
public void test0014() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0014/X.java",
+ "/Completion/src3/test0014/X.js",
"package test0014;\n" +
"/**\n" +
" * @see #ZZZZ\n" +
@@ -417,7 +417,7 @@ public void test0014() throws JavaModelException {
public void test0015() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0015/X.java",
+ "/Completion/src3/test0015/X.js",
"package test0015;\n" +
"/**\n" +
" * @see #ZZZZ\n" +
@@ -444,7 +444,7 @@ public void test0015() throws JavaModelException {
public void test0016() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0012/X.java",
+ "/Completion/src3/test0012/X.js",
"package test0016;\n" +
"/**\n" +
" * @see #\n" +
@@ -471,7 +471,7 @@ public void test0016() throws JavaModelException {
public void test0017() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0017/X.java",
+ "/Completion/src3/test0017/X.js",
"package test0017;\n" +
"/**\n" +
" * @see X#ZZZZ\n" +
@@ -498,7 +498,7 @@ public void test0017() throws JavaModelException {
public void test0018() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0018/X.java",
+ "/Completion/src3/test0018/X.js",
"package test0018;\n" +
"/**\n" +
" * @see X#ZZZZ\n" +
@@ -525,7 +525,7 @@ public void test0018() throws JavaModelException {
public void test0019() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0019/X.java",
+ "/Completion/src3/test0019/X.js",
"package test0019;\n" +
"/**\n" +
" * @see X#ZZZZ\n" +
@@ -552,7 +552,7 @@ public void test0019() throws JavaModelException {
public void test0020() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0020/X.java",
+ "/Completion/src3/test0020/X.js",
"package test0020;\n" +
"/**\n" +
" * @see X#\n" +
@@ -579,7 +579,7 @@ public void test0020() throws JavaModelException {
public void test0021() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0021/X.java",
+ "/Completion/src3/test0021/X.js",
"package test0021;\n" +
"/**\n" +
" * @see X#foo(ZZZZ\n" +
@@ -607,7 +607,7 @@ public void test0021() throws JavaModelException {
public void test0022() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0022/X.java",
+ "/Completion/src3/test0022/X.js",
"package test0022;\n" +
"/**\n" +
" * @see X#foo(ZZZZ\n" +
@@ -635,7 +635,7 @@ public void test0022() throws JavaModelException {
public void test0023() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0023/X.java",
+ "/Completion/src3/test0023/X.js",
"package test0023;\n" +
"/**\n" +
" * @see X#foo(ZZZZ\n" +
@@ -663,7 +663,7 @@ public void test0023() throws JavaModelException {
public void test0024() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0024/X.java",
+ "/Completion/src3/test0024/X.js",
"package test0024;\n" +
"/**\n" +
" * @see X#foo(\n" +
@@ -691,7 +691,7 @@ public void test0024() throws JavaModelException {
public void test0025() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0025/X.java",
+ "/Completion/src3/test0025/X.js",
"package test0025;\n" +
"/**\n" +
" * @see X#foo(Object ZZZZ\n" +
@@ -719,7 +719,7 @@ public void test0025() throws JavaModelException {
public void test0026() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0026/X.java",
+ "/Completion/src3/test0026/X.js",
"package test0026;\n" +
"/**\n" +
" * @see X#foo(Object ZZZZ\n" +
@@ -747,7 +747,7 @@ public void test0026() throws JavaModelException {
public void test0027() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0027/X.java",
+ "/Completion/src3/test0027/X.js",
"package test0027;\n" +
"/**\n" +
" * @see X#foo(Object ZZZZ\n" +
@@ -775,7 +775,7 @@ public void test0027() throws JavaModelException {
public void test0028() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0028/X.java",
+ "/Completion/src3/test0028/X.js",
"package test0028;\n" +
"/**\n" +
" * @see X#foo(Object \n" +
@@ -803,7 +803,7 @@ public void test0028() throws JavaModelException {
public void test0029() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0029/X.java",
+ "/Completion/src3/test0029/X.js",
"package test0029;\n" +
"/**\n" +
" * @see X#foo(Object a,ZZZZ\n" +
@@ -831,7 +831,7 @@ public void test0029() throws JavaModelException {
public void test0030() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0030/X.java",
+ "/Completion/src3/test0030/X.js",
"package test0030;\n" +
"/**\n" +
" * @see X#foo(Object a,ZZZZ\n" +
@@ -859,7 +859,7 @@ public void test0030() throws JavaModelException {
public void test0031() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0031/X.java",
+ "/Completion/src3/test0031/X.js",
"package test0031;\n" +
"/**\n" +
" * @see X#foo(Object a,ZZZZ\n" +
@@ -887,7 +887,7 @@ public void test0031() throws JavaModelException {
public void test0032() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0032/X.java",
+ "/Completion/src3/test0032/X.js",
"package test0032;\n" +
"/**\n" +
" * @see X#foo(Object a,\n" +
@@ -915,7 +915,7 @@ public void test0032() throws JavaModelException {
public void test0033() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0033/X.java",
+ "/Completion/src3/test0033/X.js",
"package test0033;\n" +
"/**\n" +
" * @see X#X(ZZZZ\n" +
@@ -943,7 +943,7 @@ public void test0033() throws JavaModelException {
public void test0034() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0034/X.java",
+ "/Completion/src3/test0034/X.js",
"package test0034;\n" +
"/**\n" +
" * @see X#X(ZZZZ\n" +
@@ -971,7 +971,7 @@ public void test0034() throws JavaModelException {
public void test0035() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0035/X.java",
+ "/Completion/src3/test0035/X.js",
"package test0035;\n" +
"/**\n" +
" * @see X#X(ZZZZ\n" +
@@ -999,7 +999,7 @@ public void test0035() throws JavaModelException {
public void test0036() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0036/X.java",
+ "/Completion/src3/test0036/X.js",
"package test0036;\n" +
"/**\n" +
" * @see X#X(\n" +
@@ -1027,7 +1027,7 @@ public void test0036() throws JavaModelException {
public void test0037() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0037/X.java",
+ "/Completion/src3/test0037/X.js",
"package test0037;\n" +
"/**\n" +
" * @see X#X(Object ZZZZ\n" +
@@ -1055,7 +1055,7 @@ public void test0037() throws JavaModelException {
public void test0038() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0038/X.java",
+ "/Completion/src3/test0038/X.js",
"package test0038;\n" +
"/**\n" +
" * @see X#X(Object ZZZZ\n" +
@@ -1083,7 +1083,7 @@ public void test0038() throws JavaModelException {
public void test0039() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0039/X.java",
+ "/Completion/src3/test0039/X.js",
"package test0039;\n" +
"/**\n" +
" * @see X#X(Object ZZZZ\n" +
@@ -1111,7 +1111,7 @@ public void test0039() throws JavaModelException {
public void test0040() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0040/X.java",
+ "/Completion/src3/test0040/X.js",
"package test0040;\n" +
"/**\n" +
" * @see X#X(Object \n" +
@@ -1139,7 +1139,7 @@ public void test0040() throws JavaModelException {
public void test0041() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0041/X.java",
+ "/Completion/src3/test0041/X.js",
"package test0041;\n" +
"/**\n" +
" * @see X#X(Object a,ZZZZ\n" +
@@ -1167,7 +1167,7 @@ public void test0041() throws JavaModelException {
public void test0042() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0042/X.java",
+ "/Completion/src3/test0042/X.js",
"package test0042;\n" +
"/**\n" +
" * @see X#X(Object a,ZZZZ\n" +
@@ -1195,7 +1195,7 @@ public void test0042() throws JavaModelException {
public void test0043() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0043/X.java",
+ "/Completion/src3/test0043/X.js",
"package test0043;\n" +
"/**\n" +
" * @see X#X(Object a,ZZZZ\n" +
@@ -1223,7 +1223,7 @@ public void test0043() throws JavaModelException {
public void test0044() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0044/X.java",
+ "/Completion/src3/test0044/X.js",
"package test0044;\n" +
"/**\n" +
" * @see X#X(Object a,\n" +
@@ -1251,7 +1251,7 @@ public void test0044() throws JavaModelException {
public void test0045() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0045/X.java",
+ "/Completion/src3/test0045/X.js",
"package test0045;\n" +
"public class X {\n" +
" /**\n" +
@@ -1279,7 +1279,7 @@ public void test0045() throws JavaModelException {
public void test0046() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0046/X.java",
+ "/Completion/src3/test0046/X.js",
"package test0046;\n" +
"public class X {\n" +
" /**\n" +
@@ -1307,7 +1307,7 @@ public void test0046() throws JavaModelException {
public void test0047() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0047/X.java",
+ "/Completion/src3/test0047/X.js",
"package test0047;\n" +
"public class X {\n" +
" /**\n" +
@@ -1335,7 +1335,7 @@ public void test0047() throws JavaModelException {
public void test0048() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0048/X.java",
+ "/Completion/src3/test0048/X.js",
"package test0048;\n" +
"public class X {\n" +
" /**\n" +
@@ -1363,7 +1363,7 @@ public void test0048() throws JavaModelException {
public void test0049() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0049/X.java",
+ "/Completion/src3/test0049/X.js",
"package test0049;\n" +
"public class X {\n" +
" /**\n" +
@@ -1391,7 +1391,7 @@ public void test0049() throws JavaModelException {
public void test0050() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0050/X.java",
+ "/Completion/src3/test0050/X.js",
"package test0050;\n" +
"public class X {\n" +
" /**\n" +
@@ -1419,7 +1419,7 @@ public void test0050() throws JavaModelException {
public void test0051() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0051/X.java",
+ "/Completion/src3/test0051/X.js",
"package test0051;\n" +
"public class X {\n" +
" /**\n" +
@@ -1447,7 +1447,7 @@ public void test0051() throws JavaModelException {
public void test0052() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0052/X.java",
+ "/Completion/src3/test0052/X.js",
"package test0052;\n" +
"public class X {\n" +
" /**\n" +
@@ -1475,7 +1475,7 @@ public void test0052() throws JavaModelException {
public void test0053() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0053/X.java",
+ "/Completion/src3/test0053/X.js",
"package test0053;\n" +
"public class X {\n" +
" /**\n" +
@@ -1503,7 +1503,7 @@ public void test0053() throws JavaModelException {
public void test0054() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0054/X.java",
+ "/Completion/src3/test0054/X.js",
"package test0054;\n" +
"public class X {\n" +
" /**\n" +
@@ -1531,7 +1531,7 @@ public void test0054() throws JavaModelException {
public void test0055() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0055/X.java",
+ "/Completion/src3/test0055/X.js",
"package test0055;\n" +
"public class X {\n" +
" /**\n" +
@@ -1559,7 +1559,7 @@ public void test0055() throws JavaModelException {
public void test0056() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0056/X.java",
+ "/Completion/src3/test0056/X.js",
"package test0056;\n" +
"public class X {\n" +
" /**\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocCompletionContextTests_1_5.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocCompletionContextTests_1_5.java
index 21000a7..56820de 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocCompletionContextTests_1_5.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocCompletionContextTests_1_5.java
@@ -38,7 +38,7 @@ public static Test suite() {
public void test0001() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0001/X.java",
+ "/Completion/src3/test0001/X.js",
"package test0001;\n" +
"public class X {\n" +
" /**\n" +
@@ -66,7 +66,7 @@ public void test0001() throws JavaModelException {
public void test0002() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0002/X.java",
+ "/Completion/src3/test0002/X.js",
"package test0002;\n" +
"public class X {\n" +
" /**\n" +
@@ -94,7 +94,7 @@ public void test0002() throws JavaModelException {
public void test0003() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0003/X.java",
+ "/Completion/src3/test0003/X.js",
"package test0003;\n" +
"public class X {\n" +
" /**\n" +
@@ -122,7 +122,7 @@ public void test0003() throws JavaModelException {
public void test0004() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0004/X.java",
+ "/Completion/src3/test0004/X.js",
"package test0004;\n" +
"public class X {\n" +
" /**\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocFieldCompletionModelTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocFieldCompletionModelTest.java
index a25e9cd..78808d9 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocFieldCompletionModelTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocFieldCompletionModelTest.java
@@ -56,7 +56,7 @@ public void test001() throws JavaModelException {
" */\n" +
" int field;\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/fields/Test.java", source, true, "@");
+ completeInJavadoc("/Completion/src/javadoc/fields/Test.js", source, true, "@");
assertResults(
"deprecated[JAVADOC_BLOCK_TAG]{@deprecated, null, null, deprecated, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"see[JAVADOC_BLOCK_TAG]{@see, null, null, see, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
@@ -81,7 +81,7 @@ public void test002() throws JavaModelException {
" */\n" +
" int field;\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/fields/Test.java", source, true, "@thr");
+ completeInJavadoc("/Completion/src/javadoc/fields/Test.js", source, true, "@thr");
assertResults("");
}
@@ -95,7 +95,7 @@ public void test003() throws JavaModelException {
" */\n" +
" int field;\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/fields/Test.java", source, true, "@v");
+ completeInJavadoc("/Completion/src/javadoc/fields/Test.js", source, true, "@v");
assertResults(
"value[JAVADOC_INLINE_TAG]{{@value}, null, null, value, null, "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -111,7 +111,7 @@ public void test004() throws JavaModelException {
" */\n" +
" int field;\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/fields/Test.java", source, true, "@ser");
+ completeInJavadoc("/Completion/src/javadoc/fields/Test.js", source, true, "@ser");
assertResults(
"serial[JAVADOC_BLOCK_TAG]{@serial, null, null, serial, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"serialField[JAVADOC_BLOCK_TAG]{@serialField, null, null, serialField, null, "+this.positions+JAVADOC_RELEVANCE+"}"
@@ -128,7 +128,7 @@ public void test005() throws JavaModelException {
" */\n" +
" int field;\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/fields/Test.java", source, true, "@docRoot");
+ completeInJavadoc("/Completion/src/javadoc/fields/Test.js", source, true, "@docRoot");
assertResults(
"docRoot[JAVADOC_INLINE_TAG]{{@docRoot}, null, null, docRoot, null, "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -145,7 +145,7 @@ public void test006() throws JavaModelException {
" */\n" +
" int field;\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/fields/Test.java", source, true, "@");
+ completeInJavadoc("/Completion/src/javadoc/fields/Test.js", source, true, "@");
assertResults(
"deprecated[JAVADOC_BLOCK_TAG]{@deprecated, null, null, deprecated, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"see[JAVADOC_BLOCK_TAG]{@see, null, null, see, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
@@ -169,7 +169,7 @@ public void test007() throws JavaModelException {
" */\n" +
" int field;\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/fields/Test.java", source, true, "@");
+ completeInJavadoc("/Completion/src/javadoc/fields/Test.js", source, true, "@");
assertResults(
"deprecated[JAVADOC_BLOCK_TAG]{@deprecated, null, null, deprecated, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"see[JAVADOC_BLOCK_TAG]{@see, null, null, see, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
@@ -199,7 +199,7 @@ public void test010() throws JavaModelException {
" */\n" +
" int field;\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/fields/tags/BasicTestFields.java", source, true, "Obj");
+ completeInJavadoc("/Completion/src/javadoc/fields/tags/BasicTestFields.js", source, true, "Obj");
assertResults(
"Object[TYPE_REF]{Object, java.lang, Ljava.lang.Object;, null, null, "+this.positions+R_DICUNR+"}"
);
@@ -215,7 +215,7 @@ public void test011() throws JavaModelException {
" */\n" +
" int field;\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/fields/tags/BasicTestFields.java", source, true, "BasicTest", 2);
+ completeInJavadoc("/Completion/src/javadoc/fields/tags/BasicTestFields.js", source, true, "BasicTest", 2);
assertResults(
"BasicTestFields[TYPE_REF]{BasicTestFields, javadoc.fields.tags, Ljavadoc.fields.tags.BasicTestFields;, null, null, "+this.positions+R_DICUNR+"}\n" +
"BasicTestReferences[TYPE_REF]{org.eclipse.wst.jsdt.core.tests.BasicTestReferences, org.eclipse.wst.jsdt.core.tests, Lorg.eclipse.wst.jsdt.core.tests.BasicTestReferences;, null, null, "+this.positions+R_DICNR+"}"
@@ -233,7 +233,7 @@ public void test012() throws JavaModelException {
" */\n" +
" int field;\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/fields/tags/BasicTestFields.java", source, true, "javadoc.fields.tags.BasicTest");
+ completeInJavadoc("/Completion/src/javadoc/fields/tags/BasicTestFields.js", source, true, "javadoc.fields.tags.BasicTest");
assertResults(
"BasicTestFields[TYPE_REF]{BasicTestFields, javadoc.fields.tags, Ljavadoc.fields.tags.BasicTestFields;, null, null, "+this.positions+R_DICNR+"}"
);
@@ -250,7 +250,7 @@ public void test013() throws JavaModelException {
" */\n" +
" int field;\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/fields/tags/BasicTestFields.java", source, true, "java.la");
+ completeInJavadoc("/Completion/src/javadoc/fields/tags/BasicTestFields.js", source, true, "java.la");
assertResults(
"java.lang[PACKAGE_REF]{java.lang, java.lang, null, null, null, "+this.positions+R_DICQNR+"}"
);
@@ -266,7 +266,7 @@ public void test014() throws JavaModelException {
" */\n" +
" int field;\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/fields/tags/BasicTestFields.java", source, true, "pack.Bin");
+ completeInJavadoc("/Completion/src/javadoc/fields/tags/BasicTestFields.js", source, true, "pack.Bin");
assertSortedResults(
"Bin1[TYPE_REF]{pack.Bin1, pack, Lpack.Bin1;, null, null, "+this.positions+R_DICQNR+"}\n" +
"Bin2[TYPE_REF]{pack.Bin2, pack, Lpack.Bin2;, null, null, "+this.positions+R_DICQNR+"}\n" +
@@ -285,7 +285,7 @@ public void test015() throws JavaModelException {
" */\n" +
" int field;\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/fields/tags/BasicTestFields.java", source, true, "I");
+ completeInJavadoc("/Completion/src/javadoc/fields/tags/BasicTestFields.js", source, true, "I");
assertSortedResults(
"IllegalMonitorStateException[TYPE_REF]{IllegalMonitorStateException, java.lang, Ljava.lang.IllegalMonitorStateException;, null, null, "+this.positions+R_DICUNR+"}\n" +
"InterruptedException[TYPE_REF]{InterruptedException, java.lang, Ljava.lang.InterruptedException;, null, null, "+this.positions+R_DICUNR+"}"
@@ -305,7 +305,7 @@ public void test020() throws JavaModelException {
" */\n" +
" int foo;\n" +
"}";
- completeInJavadoc("/Completion/src/javadoc/fields/tags/BasicTestFields.java", source, true, "fo");
+ completeInJavadoc("/Completion/src/javadoc/fields/tags/BasicTestFields.js", source, true, "fo");
assertResults(
"foo[FIELD_REF]{foo, Ljavadoc.fields.tags.BasicTestFields;, I, foo, null, "+this.positions+R_DICNRNS+"}"
);
@@ -321,7 +321,7 @@ public void test021() throws JavaModelException {
" */\n" +
" int foo;\n" +
"}";
- completeInJavadoc("/Completion/src/javadoc/fields/tags/BasicTestFields.java", source, true, "fo");
+ completeInJavadoc("/Completion/src/javadoc/fields/tags/BasicTestFields.js", source, true, "fo");
assertResults(
"foo[FIELD_REF]{foo, Ljavadoc.fields.tags.BasicTestFields;, I, foo, null, "+this.positions+R_DICNRNS+"}"
);
@@ -337,7 +337,7 @@ public void test022() throws JavaModelException {
" */\n" +
" int foo;\n" +
"}";
- completeInJavadoc("/Completion/src/javadoc/fields/tags/BasicTestFields.java", source, true, "fo");
+ completeInJavadoc("/Completion/src/javadoc/fields/tags/BasicTestFields.js", source, true, "fo");
assertResults(
"foo[FIELD_REF]{foo, Ljavadoc.fields.tags.BasicTestFields;, I, foo, null, "+this.positions+R_DICNRNS+"}"
);
@@ -345,7 +345,7 @@ public void test022() throws JavaModelException {
public void test023() throws JavaModelException {
String[] sources = {
- "/Completion/src/javadoc/fields/tags/BasicTestFields.java",
+ "/Completion/src/javadoc/fields/tags/BasicTestFields.js",
"package javadoc.fields.tags;\n" +
"public class BasicTestFields {\n" +
" /**\n" +
@@ -354,7 +354,7 @@ public void test023() throws JavaModelException {
" */\n" +
" int foo;\n" +
"}",
- "/Completion/src/javadoc/fields/tags/OtherFields.java",
+ "/Completion/src/javadoc/fields/tags/OtherFields.js",
"package javadoc.fields.tags;\n" +
"public class OtherFields {\n" +
" int other;\n" +
@@ -377,7 +377,7 @@ public void test024() throws JavaModelException {
" int foo;\n" +
" Object obj;\n" +
"}";
- completeInJavadoc("/Completion/src/javadoc/fields/tags/BasicTestFields.java", source, true, "#", 0); // completion on empty token
+ completeInJavadoc("/Completion/src/javadoc/fields/tags/BasicTestFields.js", source, true, "#", 0); // completion on empty token
assertResults(
"obj[FIELD_REF]{obj, Ljavadoc.fields.tags.BasicTestFields;, Ljava.lang.Object;, obj, null, "+this.positions+R_DICNRNS+"}\n" +
"foo[FIELD_REF]{foo, Ljavadoc.fields.tags.BasicTestFields;, I, foo, null, "+this.positions+R_DICNRNS+"}\n" +
@@ -407,7 +407,7 @@ public void test025() throws JavaModelException {
" int foo;\n" +
" Object obj;\n" +
"}";
- completeInJavadoc("/Completion/src/javadoc/fields/tags/BasicTestFields.java", source, true, "#", 0); // completion on empty token
+ completeInJavadoc("/Completion/src/javadoc/fields/tags/BasicTestFields.js", source, true, "#", 0); // completion on empty token
assertResults(
"obj[FIELD_REF]{obj, Ljavadoc.fields.tags.BasicTestFields;, Ljava.lang.Object;, obj, null, "+this.positions+R_DICNRNS+"}\n" +
"foo[FIELD_REF]{foo, Ljavadoc.fields.tags.BasicTestFields;, I, foo, null, "+this.positions+R_DICNRNS+"}\n" +
@@ -437,7 +437,7 @@ public void test026() throws JavaModelException {
" int foo;\n" +
" Object obj;\n" +
"}";
- completeInJavadoc("/Completion/src/javadoc/fields/tags/BasicTestFields.java", source, true, "#", 0); // completion on empty token
+ completeInJavadoc("/Completion/src/javadoc/fields/tags/BasicTestFields.js", source, true, "#", 0); // completion on empty token
assertResults(
"obj[FIELD_REF]{obj, Ljavadoc.fields.tags.BasicTestFields;, Ljava.lang.Object;, obj, null, "+this.positions+R_DICNRNS+"}\n" +
"foo[FIELD_REF]{foo, Ljavadoc.fields.tags.BasicTestFields;, I, foo, null, "+this.positions+R_DICNRNS+"}\n" +
@@ -467,7 +467,7 @@ public void test027() throws JavaModelException {
" int foo;\n" +
" Object obj;\n" +
"}";
- completeInJavadoc("/Completion/src/javadoc/fields/tags/BasicTestFields.java", source, true, "FIE");
+ completeInJavadoc("/Completion/src/javadoc/fields/tags/BasicTestFields.js", source, true, "FIE");
assertResults("");
}
@@ -482,7 +482,7 @@ public void test028() throws JavaModelException {
" int foo;\n" +
" Object obj;\n" +
"}";
- completeInJavadoc("/Completion/src/javadoc/fields/tags/BasicTestFields.java", source, true, "FIE");
+ completeInJavadoc("/Completion/src/javadoc/fields/tags/BasicTestFields.js", source, true, "FIE");
assertResults(
"FIELD[FIELD_REF]{FIELD, Lorg.eclipse.wst.jsdt.core.tests.BasicTestReferences;, I, FIELD, null, "+this.positions+R_DICNR+"}"
);
@@ -508,7 +508,7 @@ public void test030() throws JavaModelException {
" int foo;\n" +
"}";
- completeInJavadoc("/Completion/src/javadoc/fields/tags/BasicTestFields.java", source, true, "oTT");
+ completeInJavadoc("/Completion/src/javadoc/fields/tags/BasicTestFields.js", source, true, "oTT");
assertResults(
"oneTwoThree[FIELD_REF]{oneTwoThree, Ljavadoc.fields.tags.BasicTestFields;, Ljava.lang.Object;, oneTwoThree, null, "+this.positions+"24}"
);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocMethodCompletionModelTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocMethodCompletionModelTest.java
index 624c8db..dfe6da1 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocMethodCompletionModelTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocMethodCompletionModelTest.java
@@ -57,7 +57,7 @@ public void test001() throws JavaModelException {
" */\n" +
" public void foo() {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/Test.java", source, true, "@");
+ completeInJavadoc("/Completion/src/javadoc/methods/Test.js", source, true, "@");
assertResults(
"deprecated[JAVADOC_BLOCK_TAG]{@deprecated, null, null, deprecated, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"exception[JAVADOC_BLOCK_TAG]{@exception, null, null, exception, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
@@ -86,7 +86,7 @@ public void test002() throws JavaModelException {
" */\n" +
" public void foo() {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/Test.java", source, true, "@aut");
+ completeInJavadoc("/Completion/src/javadoc/methods/Test.js", source, true, "@aut");
assertResults("");
}
@@ -100,7 +100,7 @@ public void test003() throws JavaModelException {
" */\n" +
" public void foo() {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/Test.java", source, true, "@r");
+ completeInJavadoc("/Completion/src/javadoc/methods/Test.js", source, true, "@r");
assertResults(
"return[JAVADOC_BLOCK_TAG]{@return, null, null, return, null, "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -116,7 +116,7 @@ public void test004() throws JavaModelException {
" */\n" +
" public void foo() {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/Test.java", source, true, "@ser");
+ completeInJavadoc("/Completion/src/javadoc/methods/Test.js", source, true, "@ser");
assertResults(
"serialData[JAVADOC_BLOCK_TAG]{@serialData, null, null, serialData, null, "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -132,7 +132,7 @@ public void test005() throws JavaModelException {
" */\n" +
" public void foo() {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/Test.java", source, true, "@inheritDoc");
+ completeInJavadoc("/Completion/src/javadoc/methods/Test.js", source, true, "@inheritDoc");
assertResults(
"inheritDoc[JAVADOC_INLINE_TAG]{{@inheritDoc}, null, null, inheritDoc, null, "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -149,7 +149,7 @@ public void test006() throws JavaModelException {
" */\n" +
" public void foo() {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/Test.java", source, true, "@");
+ completeInJavadoc("/Completion/src/javadoc/methods/Test.js", source, true, "@");
assertResults(
"deprecated[JAVADOC_BLOCK_TAG]{@deprecated, null, null, deprecated, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"exception[JAVADOC_BLOCK_TAG]{@exception, null, null, exception, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
@@ -176,7 +176,7 @@ public void test007() throws JavaModelException {
" */\n" +
" public void foo() {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/Test.java", source, true, "@");
+ completeInJavadoc("/Completion/src/javadoc/methods/Test.js", source, true, "@");
assertResults(
"deprecated[JAVADOC_BLOCK_TAG]{@deprecated, null, null, deprecated, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"exception[JAVADOC_BLOCK_TAG]{@exception, null, null, exception, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
@@ -215,7 +215,7 @@ public void test010() throws JavaModelException {
"class BasicTestMethodsException2 extends Exception{}\n" +
"class BasicTestMethodsExample {\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "BasicTestMethodsE");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "BasicTestMethodsE");
assertSortedResults(
"BasicTestMethodsExample[TYPE_REF]{BasicTestMethodsExample, javadoc.methods.tags, Ljavadoc.methods.tags.BasicTestMethodsExample;, null, null, "+this.positions+R_DICUNR+"}\n" +
"BasicTestMethodsException1[TYPE_REF]{BasicTestMethodsException1, javadoc.methods.tags, Ljavadoc.methods.tags.BasicTestMethodsException1;, null, null, "+this.positions+R_DICUNR+"}\n" +
@@ -238,7 +238,7 @@ public void test011() throws JavaModelException {
"class BasicTestMethodsException2 extends Exception{}\n" +
"class BasicTestMethodsExample {\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "@see ", 0); // completion on empty token
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "@see ", 0); // completion on empty token
if(CompletionEngine.NO_TYPE_COMPLETION_ON_EMPTY_TOKEN) {
assertResults("");
} else {
@@ -265,7 +265,7 @@ public void test012() throws JavaModelException {
"class BasicTestMethodsException2 extends Exception{}\n" +
"class BasicTestMethodsExample {\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "BasicTestMethodsE");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "BasicTestMethodsE");
assertSortedResults(
"BasicTestMethodsException1[TYPE_REF]{BasicTestMethodsException1, javadoc.methods.tags, Ljavadoc.methods.tags.BasicTestMethodsException1;, null, null, "+this.positions+R_DICUNRE+"}\n" +
"BasicTestMethodsException2[TYPE_REF]{BasicTestMethodsException2, javadoc.methods.tags, Ljavadoc.methods.tags.BasicTestMethodsException2;, null, null, "+this.positions+R_DICUNRE+"}\n" +
@@ -288,7 +288,7 @@ public void test013() throws JavaModelException {
"class BasicTestMethodsException2 extends Exception{}\n" +
"class BasicTestMethodsExample {\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "BasicTestMethodsE");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "BasicTestMethodsE");
assertSortedResults(
"BasicTestMethodsException2[TYPE_REF]{BasicTestMethodsException2, javadoc.methods.tags, Ljavadoc.methods.tags.BasicTestMethodsException2;, null, null, "+this.positions+R_DICUNREEET+"}\n" +
"BasicTestMethodsException1[TYPE_REF]{BasicTestMethodsException1, javadoc.methods.tags, Ljavadoc.methods.tags.BasicTestMethodsException1;, null, null, "+this.positions+R_DICUNRE+"}\n" +
@@ -310,7 +310,7 @@ public void test014() throws JavaModelException {
"class BasicTestMethodsException extends Exception{}\n" +
"class BasicTestMethodsExample {\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "@throws ", 0); // completion on empty token
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "@throws ", 0); // completion on empty token
if(CompletionEngine.NO_TYPE_COMPLETION_ON_EMPTY_TOKEN) {
assertResults(
"BasicTestMethodsException[TYPE_REF]{BasicTestMethodsException, javadoc.methods.tags, Ljavadoc.methods.tags.BasicTestMethodsException;, null, null, "+this.positions+R_DICUNREET+"}"
@@ -336,7 +336,7 @@ public void test015() throws JavaModelException {
" public void foo() {\n" +
" }\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "I");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "I");
assertResults(
"IllegalMonitorStateException[TYPE_REF]{IllegalMonitorStateException, java.lang, Ljava.lang.IllegalMonitorStateException;, null, null, "+this.positions+R_DICUNRE+"}\n" +
"InterruptedException[TYPE_REF]{InterruptedException, java.lang, Ljava.lang.InterruptedException;, null, null, "+this.positions+R_DICUNRE+"}"
@@ -355,7 +355,7 @@ public void test016() throws JavaModelException {
" public void foo() throws InterruptedException {\n" +
" }\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "java.lang.I");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "java.lang.I");
assertResults(
"IllegalMonitorStateException[TYPE_REF]{IllegalMonitorStateException, java.lang, Ljava.lang.IllegalMonitorStateException;, null, null, "+this.positions+R_DICNRE+"}\n" +
"InterruptedException[TYPE_REF]{InterruptedException, java.lang, Ljava.lang.InterruptedException;, null, null, "+this.positions+R_DICNREEET+"}"
@@ -376,7 +376,7 @@ public void test020() throws JavaModelException {
" int foo;\n" +
" void foo() {}\n" +
"}";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "fo");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "fo");
assertResults(
"foo[FIELD_REF]{foo, Ljavadoc.methods.tags.BasicTestMethods;, I, foo, null, "+this.positions+R_DICNRNS+"}\n" +
"foo[METHOD_REF]{foo(), Ljavadoc.methods.tags.BasicTestMethods;, ()V, foo, null, "+this.positions+R_DICNRNS+"}"
@@ -394,7 +394,7 @@ public void test021() throws JavaModelException {
" int foo;\n" +
" void foo() {}\n" +
"}";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "fo");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "fo");
assertResults(
"foo[FIELD_REF]{foo, Ljavadoc.methods.tags.BasicTestMethods;, I, foo, null, "+this.positions+R_DICNRNS+"}\n" +
"foo[METHOD_REF]{foo(), Ljavadoc.methods.tags.BasicTestMethods;, ()V, foo, null, "+this.positions+R_DICNRNS+"}"
@@ -412,7 +412,7 @@ public void test022() throws JavaModelException {
" int foo;\n" +
" void foo() {}\n" +
"}";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "fo");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "fo");
assertResults(
"foo[FIELD_REF]{foo, Ljavadoc.methods.tags.BasicTestMethods;, I, foo, null, "+this.positions+R_DICNRNS+"}\n" +
"foo[METHOD_REF]{foo(), Ljavadoc.methods.tags.BasicTestMethods;, ()V, foo, null, "+this.positions+R_DICNRNS+"}"
@@ -421,7 +421,7 @@ public void test022() throws JavaModelException {
public void test023() throws JavaModelException {
String[] sources = {
- "/Completion/src/javadoc/methods/tags/BasicTestMethods.java",
+ "/Completion/src/javadoc/methods/tags/BasicTestMethods.js",
"package javadoc.methods.tags;\n" +
"public class BasicTestMethods {\n" +
" /**\n" +
@@ -430,7 +430,7 @@ public void test023() throws JavaModelException {
" */\n" +
" int foo;\n" +
"}",
- "/Completion/src/javadoc/methods/tags/OtherFields.java",
+ "/Completion/src/javadoc/methods/tags/OtherFields.js",
"package javadoc.methods.tags;\n" +
"public class OtherFields {\n" +
" int foo;\n" +
@@ -458,7 +458,7 @@ public void test030() throws JavaModelException {
" void foo() {}\n" +
" void bar(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "fo");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "fo");
assertResults("");
}
@@ -474,7 +474,7 @@ public void test031() throws JavaModelException {
" <T> void foo() {}\n" +
" void bar(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "fo");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "fo");
assertResults(
"foo[METHOD_REF]{foo(), Ljavadoc.methods.tags.BasicTestMethods;, <T:Ljava.lang.Object;>()V, foo, null, "+this.positions+R_DICNRNS+"}"
);
@@ -495,7 +495,7 @@ public void test032() throws JavaModelException {
" */\n" +
" void bar(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "ba");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "ba");
assertResults(
"bar[METHOD_REF]{bar(String, boolean, Object), Ljavadoc.methods.tags.BasicTestMethods;, (Ljava.lang.String;ZLjava.lang.Object;)V, bar, (str, flag, obj), "+this.positions+R_DICNRNS+"}"
);
@@ -517,7 +517,7 @@ public void test033() throws JavaModelException {
" */\n" +
" <T, U> void bar(String str, Class<T> clt, Class<U> clu) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "ba");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "ba");
assertResults(
"bar[METHOD_REF]{bar(String, Class, Class), Ljavadoc.methods.tags.BasicTestMethods;, <T:Ljava.lang.Object;U:Ljava.lang.Object;>(Ljava.lang.String;Ljava.lang.Class<TT;>;Ljava.lang.Class<TU;>;)V, bar, (str, clt, clu), "+this.positions+R_DICNRNS+"}"
);
@@ -538,7 +538,7 @@ public void test034() throws JavaModelException {
" */\n" +
" void bar(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "ba");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "ba");
assertResults(
"bar[METHOD_REF]{bar(String, boolean, Object), Ljavadoc.methods.tags.BasicTestMethods;, (Ljava.lang.String;ZLjava.lang.Object;)V, bar, (str, flag, obj), "+this.positions+R_DICNRNS+"}"
);
@@ -559,7 +559,7 @@ public void test035() throws JavaModelException {
" */\n" +
" void bar(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "ba");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "ba");
assertResults(
"bar[METHOD_REF]{bar(String, boolean, Object), Ljavadoc.methods.tags.BasicTestMethods;, (Ljava.lang.String;ZLjava.lang.Object;)V, bar, (str, flag, obj), "+this.positions+R_DICNRNS+"}"
);
@@ -567,7 +567,7 @@ public void test035() throws JavaModelException {
public void test036() throws JavaModelException {
String[] sources = {
- "/Completion/src/javadoc/methods/tags/BasicTestMethods.java",
+ "/Completion/src/javadoc/methods/tags/BasicTestMethods.js",
"package javadoc.methods.tags;\n" +
"public class BasicTestMethods {\n" +
" /**\n" +
@@ -576,7 +576,7 @@ public void test036() throws JavaModelException {
" */\n" +
" void foo() {};\n" +
"}",
- "/Completion/src/javadoc/methods/tags/OtherTypes.java",
+ "/Completion/src/javadoc/methods/tags/OtherTypes.js",
"package javadoc.methods.tags;\n" +
"public class OtherTypes {\n" +
" void foo() {};\n" +
@@ -599,7 +599,7 @@ public void test037() throws JavaModelException {
" void foo() {}\n" +
" void bar(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "#", 0); // completion on empty token
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "#", 0); // completion on empty token
assertResults(
"foo[METHOD_REF]{foo(), Ljavadoc.methods.tags.BasicTestMethods;, ()V, foo, null, "+this.positions+R_DICNRNS+"}\n" +
"bar[METHOD_REF]{bar(String, boolean, Object), Ljavadoc.methods.tags.BasicTestMethods;, (Ljava.lang.String;ZLjava.lang.Object;)V, bar, (str, flag, obj), "+this.positions+R_DICNRNS+"}\n" +
@@ -630,7 +630,7 @@ public void test038() throws JavaModelException {
" <T> void foo() {}\n" +
" <TParam1, TParam2> void bar(TParam1 tp1, TParam2 tp2) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "#", 0); // completion on empty token
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "#", 0); // completion on empty token
assertResults(
"foo[METHOD_REF]{foo(), Ljavadoc.methods.tags.BasicTestMethods;, <T:Ljava.lang.Object;>()V, foo, null, "+this.positions+R_DICNRNS+"}\n" +
"bar[METHOD_REF]{bar(Object, Object), Ljavadoc.methods.tags.BasicTestMethods;, <TParam1:Ljava.lang.Object;TParam2:Ljava.lang.Object;>(TTParam1;TTParam2;)V, bar, (tp1, tp2), "+this.positions+R_DICNRNS+"}\n" +
@@ -660,7 +660,7 @@ public void test039() throws JavaModelException {
" void foo() {}\n" +
" void bar(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "#", 0); // completion on empty token
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "#", 0); // completion on empty token
assertResults(
"foo[METHOD_REF]{foo(), Ljavadoc.methods.tags.BasicTestMethods;, ()V, foo, null, "+this.positions+R_DICNRNS+"}\n" +
"bar[METHOD_REF]{bar(String, boolean, Object), Ljavadoc.methods.tags.BasicTestMethods;, (Ljava.lang.String;ZLjava.lang.Object;)V, bar, (str, flag, obj), "+this.positions+R_DICNRNS+"}\n" +
@@ -690,7 +690,7 @@ public void test040() throws JavaModelException {
" void foo() {}\n" +
" void bar(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "#", 0); // completion on empty token
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "#", 0); // completion on empty token
assertResults(
"foo[METHOD_REF]{foo(), Ljavadoc.methods.tags.BasicTestMethods;, ()V, foo, null, "+this.positions+R_DICNRNS+"}\n" +
"bar[METHOD_REF]{bar(String, boolean, Object), Ljavadoc.methods.tags.BasicTestMethods;, (Ljava.lang.String;ZLjava.lang.Object;)V, bar, (str, flag, obj), "+this.positions+R_DICNRNS+"}\n" +
@@ -720,7 +720,7 @@ public void test041() throws JavaModelException {
" */\n" +
" void bar(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "bar(");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "bar(");
assertResults(
"bar[METHOD_REF]{bar(String, boolean, Object), Ljavadoc.methods.tags.BasicTestMethods;, (Ljava.lang.String;ZLjava.lang.Object;)V, bar, (str, flag, obj), "+this.positions+R_DICENUNR+"}"
);
@@ -737,7 +737,7 @@ public void test042() throws JavaModelException {
" */\n" +
" void bar(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "Str");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "Str");
assertResults(
"String[TYPE_REF]{String, java.lang, Ljava.lang.String;, null, null, "+this.positions+R_DICUNR+"}"
);
@@ -754,7 +754,7 @@ public void test043() throws JavaModelException {
" */\n" +
" void bar(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "java.lang.");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "java.lang.");
assertSortedResults(
"Class[TYPE_REF]{Class, java.lang, Ljava.lang.Class;, null, null, "+this.positions+R_DICNR+"}\n" +
"CloneNotSupportedException[TYPE_REF]{CloneNotSupportedException, java.lang, Ljava.lang.CloneNotSupportedException;, null, null, "+this.positions+R_DICNR+"}\n" +
@@ -780,7 +780,7 @@ public void test044() throws JavaModelException {
" */\n" +
" void bar(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "java.lang.St");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "java.lang.St");
assertResults(
"String[TYPE_REF]{String, java.lang, Ljava.lang.String;, null, null, "+this.positions+R_DICNR+"}"
);
@@ -797,7 +797,7 @@ public void test045() throws JavaModelException {
" */\n" +
" void bar(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "bar(String s");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "bar(String s");
assertResults(
"bar[METHOD_REF]{bar(String, boolean, Object), Ljavadoc.methods.tags.BasicTestMethods;, (Ljava.lang.String;ZLjava.lang.Object;)V, bar, (str, flag, obj), "+this.positions+R_DICENUNR+"}"
);
@@ -815,7 +815,7 @@ public void test046() throws JavaModelException {
" // Note: Completion takes place just after trailoing comma (there's a space after)\n" +
" void bar(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "bar(String str,");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "bar(String str,");
assertResults(
"bar[METHOD_REF]{bar(String, boolean, Object), Ljavadoc.methods.tags.BasicTestMethods;, (Ljava.lang.String;ZLjava.lang.Object;)V, bar, (str, flag, obj), "+this.positions+R_DICENUNR+"}"
);
@@ -832,7 +832,7 @@ public void test047() throws JavaModelException {
" */\n" +
" void bar(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "bar(String str, ");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "bar(String str, ");
assertResults(
"bar[METHOD_REF]{bar(String, boolean, Object), Ljavadoc.methods.tags.BasicTestMethods;, (Ljava.lang.String;ZLjava.lang.Object;)V, bar, (str, flag, obj), "+this.positions+R_DICENUNR+"}"
);
@@ -849,7 +849,7 @@ public void test048() throws JavaModelException {
" */\n" +
" void bar(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "bar(String,");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "bar(String,");
assertResults(
"bar[METHOD_REF]{bar(String, boolean, Object), Ljavadoc.methods.tags.BasicTestMethods;, (Ljava.lang.String;ZLjava.lang.Object;)V, bar, (str, flag, obj), "+this.positions+R_DICENUNR+"}"
);
@@ -866,7 +866,7 @@ public void test049() throws JavaModelException {
" */\n" +
" void bar(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "bool");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "bool");
assertResults(
"boolean[KEYWORD]{boolean, null, null, boolean, null, "+this.positions+R_DICNR+"}"
);
@@ -886,7 +886,7 @@ public void test050() throws JavaModelException {
" */\n" +
" void bar(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "bar(String str, boolean,");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "bar(String str, boolean,");
assertResults("");
}
@@ -901,7 +901,7 @@ public void test051() throws JavaModelException {
" */\n" +
" void bar(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "bar(String str, boolean flag,");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "bar(String str, boolean flag,");
assertResults(
"bar[METHOD_REF]{bar(String, boolean, Object), Ljavadoc.methods.tags.BasicTestMethods;, (Ljava.lang.String;ZLjava.lang.Object;)V, bar, (str, flag, obj), "+this.positions+R_DICENUNR+"}"
);
@@ -918,7 +918,7 @@ public void test052() throws JavaModelException {
" */\n" +
" void bar(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "bar(String,boolean,");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "bar(String,boolean,");
assertResults(
"bar[METHOD_REF]{bar(String, boolean, Object), Ljavadoc.methods.tags.BasicTestMethods;, (Ljava.lang.String;ZLjava.lang.Object;)V, bar, (str, flag, obj), "+this.positions+R_DICENUNR+"}"
);
@@ -935,7 +935,7 @@ public void test053() throws JavaModelException {
" */\n" +
" void bar(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "Object");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "Object");
assertResults(
"Object[TYPE_REF]{Object, java.lang, Ljava.lang.Object;, null, null, "+this.positions+R_DICENUNR+"}"
);
@@ -955,7 +955,7 @@ public void test054() throws JavaModelException {
" */\n" +
" void bar(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "bar(String, boolean, Object o");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "bar(String, boolean, Object o");
assertResults("");
}
@@ -970,7 +970,7 @@ public void test055() throws JavaModelException {
" */\n" +
" void bar(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "bar(String str, boolean flag, Object o");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "bar(String str, boolean flag, Object o");
assertResults(
"bar[METHOD_REF]{bar(String, boolean, Object), Ljavadoc.methods.tags.BasicTestMethods;, (Ljava.lang.String;ZLjava.lang.Object;)V, bar, (str, flag, obj), "+this.positions+R_DICENUNR+"}"
);
@@ -978,7 +978,7 @@ public void test055() throws JavaModelException {
public void test056() throws JavaModelException {
String[] sources = {
- "/Completion/src/javadoc/methods/tags/BasicTestMethods.java",
+ "/Completion/src/javadoc/methods/tags/BasicTestMethods.js",
"package javadoc.methods.tags;\n" +
"public class BasicTestMethods {\n" +
" /**\n" +
@@ -987,7 +987,7 @@ public void test056() throws JavaModelException {
" */\n" +
" void foo() {};\n" +
"}",
- "/Completion/src/javadoc/methods/tags/OtherTypes.java",
+ "/Completion/src/javadoc/methods/tags/OtherTypes.js",
"package javadoc.methods.tags;\n" +
"public class OtherTypes {\n" +
" void foo(String str) {};\n" +
@@ -1001,7 +1001,7 @@ public void test056() throws JavaModelException {
public void test057() throws JavaModelException {
String[] sources = {
- "/Completion/src/javadoc/methods/tags/BasicTestMethods.java",
+ "/Completion/src/javadoc/methods/tags/BasicTestMethods.js",
"package javadoc.methods.tags;\n" +
"public class BasicTestMethods {\n" +
" /**\n" +
@@ -1010,7 +1010,7 @@ public void test057() throws JavaModelException {
" */\n" +
" void foo() {};\n" +
"}",
- "/Completion/src/javadoc/methods/tags/OtherTypes.java",
+ "/Completion/src/javadoc/methods/tags/OtherTypes.js",
"package javadoc.methods.tags;\n" +
"public class OtherTypes {\n" +
" void foo(String str) {};\n" +
@@ -1033,7 +1033,7 @@ public void test058() throws JavaModelException {
" void method() {}\n" +
" void bar(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "meth", 2); // 2nd occurrence
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "meth", 2); // 2nd occurrence
assertResults(
"method[METHOD_REF]{method(), Ljavadoc.methods.tags.BasicTestMethods;, ()V, method, null, "+this.positions+R_DICNRNS+"}"
);
@@ -1050,7 +1050,7 @@ public void test059() throws JavaModelException {
" void method() {}\n" +
" void method(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "meth", 2); // 2nd occurrence
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "meth", 2); // 2nd occurrence
assertResults(
"method[METHOD_REF]{method(String, boolean, Object), Ljavadoc.methods.tags.BasicTestMethods;, (Ljava.lang.String;ZLjava.lang.Object;)V, method, (str, flag, obj), "+this.positions+R_DICNRNS+"}\n" +
"method[METHOD_REF]{method(), Ljavadoc.methods.tags.BasicTestMethods;, ()V, method, null, "+this.positions+R_DICNRNS+"}"
@@ -1068,7 +1068,7 @@ public void test060() throws JavaModelException {
" void method() {}\n" +
" void method(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "meth", 2); // 2nd occurrence
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "meth", 2); // 2nd occurrence
assertResults(
"method[METHOD_REF]{method(String, boolean, Object), Ljavadoc.methods.tags.BasicTestMethods;, (Ljava.lang.String;ZLjava.lang.Object;)V, method, (str, flag, obj), "+this.positions+R_DICNRNS+"}\n" +
"method[METHOD_REF]{method(), Ljavadoc.methods.tags.BasicTestMethods;, ()V, method, null, "+this.positions+R_DICNRNS+"}"
@@ -1086,7 +1086,7 @@ public void test061() throws JavaModelException {
" void method() {}\n" +
" void method(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "meth", 2); // 2nd occurrence
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "meth", 2); // 2nd occurrence
assertResults(
"method[METHOD_REF]{method(String, boolean, Object), Ljavadoc.methods.tags.BasicTestMethods;, (Ljava.lang.String;ZLjava.lang.Object;)V, method, (str, flag, obj), [116, 145], "+R_DICNRNS+"}\n" +
"method[METHOD_REF]{method(), Ljavadoc.methods.tags.BasicTestMethods;, ()V, method, null, [116, 145], "+R_DICNRNS+"}"
@@ -1105,7 +1105,7 @@ public void _test062() throws JavaModelException {
" void method() {}\n" +
" void method(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "meth", 2); // 2nd occurrence
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "meth", 2); // 2nd occurrence
assertResults(
"method[METHOD_REF]{method(String, boolean, Object), Ljavadoc.methods.tags.BasicTestMethods;, (Ljava.lang.String;ZLjava.lang.Object;)V, method, (str, flag, obj), "+this.positions+R_DICUNR+"}\n" +
"method[METHOD_REF]{method(), Ljavadoc.methods.tags.BasicTestMethods;, ()V, method, null, "+this.positions+R_DICUNR+"}"
@@ -1127,7 +1127,7 @@ public void test070() throws JavaModelException {
" return null;\n" +
" }\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "@param ", 0); // empty token
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "@param ", 0); // empty token
assertResults(
"str[JAVADOC_PARAM_REF]{str, null, null, str, null, "+this.positions+(JAVADOC_RELEVANCE+R_INTERESTING)+"}"
);
@@ -1145,7 +1145,7 @@ public void test071() throws JavaModelException {
" return null;\n" +
" }\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "x");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "x");
assertResults(
"xstr[JAVADOC_PARAM_REF]{xstr, null, null, xstr, null, "+this.positions+(JAVADOC_RELEVANCE+R_INTERESTING)+"}"
);
@@ -1163,7 +1163,7 @@ public void test072() throws JavaModelException {
" return null;\n" +
" }\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "xstr");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "xstr");
assertResults(
"xstr[JAVADOC_PARAM_REF]{xstr, null, null, xstr, null, "+this.positions+(JAVADOC_RELEVANCE+R_INTERESTING)+"}"
);
@@ -1181,7 +1181,7 @@ public void test073() throws JavaModelException {
" return null;\n" +
" }\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "x");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "x");
assertResults(
"xstr[JAVADOC_PARAM_REF]{xstr, null, null, xstr, null, "+this.positions+(JAVADOC_RELEVANCE+R_INTERESTING)+"}"
);
@@ -1199,7 +1199,7 @@ public void test074() throws JavaModelException {
" return null;\n" +
" }\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "xx");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "xx");
assertResults("");
}
@@ -1216,7 +1216,7 @@ public void test075() throws JavaModelException {
" return null;\n" +
" }\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "** @param ", 0); // empty token
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "** @param ", 0); // empty token
assertResults( "");
}
@@ -1233,7 +1233,7 @@ public void test076() throws JavaModelException {
" return null;\n" +
" }\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "xstr");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "xstr");
assertResults("");
}
@@ -1250,7 +1250,7 @@ public void test077() throws JavaModelException {
" return null;\n" +
" }\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "xstr", 2);
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "xstr", 2);
assertResults("");
}
@@ -1267,7 +1267,7 @@ public void test078() throws JavaModelException {
" return null;\n" +
" }\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "xstr");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "xstr");
assertResults(
"xstr2[JAVADOC_PARAM_REF]{xstr2, null, null, xstr2, null, "+this.positions+(JAVADOC_RELEVANCE+R_INTERESTING)+"}"
);
@@ -1286,7 +1286,7 @@ public void test079() throws JavaModelException {
" return null;\n" +
" }\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "xstr", 2); // 2nd occurence
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "xstr", 2); // 2nd occurence
assertResults(
"xstr2[JAVADOC_PARAM_REF]{xstr2, null, null, xstr2, null, "+this.positions+(JAVADOC_RELEVANCE+R_INTERESTING)+"}"
);
@@ -1305,7 +1305,7 @@ public void test080() throws JavaModelException {
" return null;\n" +
" }\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "xstr");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "xstr");
assertResults(
"xstr[JAVADOC_PARAM_REF]{xstr, null, null, xstr, null, "+this.positions+(JAVADOC_RELEVANCE+R_INTERESTING)+"}"
);
@@ -1324,7 +1324,7 @@ public void test081() throws JavaModelException {
" return null;\n" +
" }\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "xstr", 2); // 2nd occurence
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "xstr", 2); // 2nd occurence
assertResults(
"xstr2[JAVADOC_PARAM_REF]{xstr2, null, null, xstr2, null, "+this.positions+(JAVADOC_RELEVANCE+R_INTERESTING)+"}"
);
@@ -1344,7 +1344,7 @@ public void test082() throws JavaModelException {
" return null;\n" +
" }\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "xstr");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "xstr");
assertResults("");
}
@@ -1362,7 +1362,7 @@ public void test083() throws JavaModelException {
" return null;\n" +
" }\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "xstr", 2); // 2nd occurence
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "xstr", 2); // 2nd occurence
assertResults("");
}
@@ -1380,7 +1380,7 @@ public void test084() throws JavaModelException {
" return null;\n" +
" }\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "xstr", 3); // 3rd position
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "xstr", 3); // 3rd position
assertResults(
"xstr2[JAVADOC_PARAM_REF]{xstr2, null, null, xstr2, null, "+this.positions+(JAVADOC_RELEVANCE+R_INTERESTING)+"}"
);
@@ -1398,7 +1398,7 @@ public void test085() throws JavaModelException {
" return null;\n" +
" }\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "@param ", 0); // empty token
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "@param ", 0); // empty token
assertResults(
"xstr[JAVADOC_PARAM_REF]{xstr, null, null, xstr, null, "+this.positions+(JAVADOC_RELEVANCE+R_INTERESTING+2)+"}\n" +
"flag[JAVADOC_PARAM_REF]{flag, null, null, flag, null, "+this.positions+(JAVADOC_RELEVANCE+R_INTERESTING+1)+"}\n" +
@@ -1419,7 +1419,7 @@ public void test086() throws JavaModelException {
" return null;\n" +
" }\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "** @param ", 0); // empty token
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "** @param ", 0); // empty token
assertResults(
"flag[JAVADOC_PARAM_REF]{flag, null, null, flag, null, "+this.positions+(JAVADOC_RELEVANCE+R_INTERESTING+1)+"}\n" +
"obj[JAVADOC_PARAM_REF]{obj, null, null, obj, null, "+this.positions+(JAVADOC_RELEVANCE+R_INTERESTING)+"}"
@@ -1439,7 +1439,7 @@ public void test087() throws JavaModelException {
" return null;\n" +
" }\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "@param ", 0); // empty token
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "@param ", 0); // empty token
assertResults(
"xstr[JAVADOC_PARAM_REF]{xstr, null, null, xstr, null, "+this.positions+(JAVADOC_RELEVANCE+R_INTERESTING+1)+"}\n" +
"obj[JAVADOC_PARAM_REF]{obj, null, null, obj, null, "+this.positions+(JAVADOC_RELEVANCE+R_INTERESTING)+"}"
@@ -1460,7 +1460,7 @@ public void test088() throws JavaModelException {
" return null;\n" +
" }\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "** @param ", 0); // empty token
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "** @param ", 0); // empty token
assertResults(
"flag[JAVADOC_PARAM_REF]{flag, null, null, flag, null, "+this.positions+(JAVADOC_RELEVANCE+R_INTERESTING)+"}"
);
@@ -1481,7 +1481,7 @@ public void test089() throws JavaModelException {
" return null;\n" +
" }\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "@param ", 0); // empty token
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "@param ", 0); // empty token
assertResults("");
}
@@ -1499,7 +1499,7 @@ public void test090() throws JavaModelException {
" return null;\n" +
" }\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "ob");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "ob");
assertResults(
"obj[JAVADOC_PARAM_REF]{obj, null, null, obj, null, "+this.positions+(JAVADOC_RELEVANCE+R_INTERESTING)+"}"
);
@@ -1519,7 +1519,7 @@ public void test100() throws JavaModelException {
" */\n" +
" <TM> void foo(Class<TM> xtm, Class<TC> xtc) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "@param ", 0); // empty token
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "@param ", 0); // empty token
assertSortedResults(
"xtm[JAVADOC_PARAM_REF]{xtm, null, null, xtm, null, "+this.positions+(JAVADOC_RELEVANCE+R_INTERESTING+1)+"}\n" +
"xtc[JAVADOC_PARAM_REF]{xtc, null, null, xtc, null, "+this.positions+(JAVADOC_RELEVANCE+R_INTERESTING)+"}\n" +
@@ -1539,7 +1539,7 @@ public void test101() throws JavaModelException {
" */\n" +
" <TM> void foo(Class<TM> xtm, Class<TC> xtc) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "** @param ", 0); // empty token
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "** @param ", 0); // empty token
assertSortedResults(
"xtm[JAVADOC_PARAM_REF]{xtm, null, null, xtm, null, "+this.positions+(JAVADOC_RELEVANCE+R_INTERESTING+1)+"}\n" +
"xtc[JAVADOC_PARAM_REF]{xtc, null, null, xtc, null, "+this.positions+(JAVADOC_RELEVANCE+R_INTERESTING)+"}"
@@ -1559,7 +1559,7 @@ public void test102() throws JavaModelException {
" */\n" +
" <TM> void foo(Class<TM> xtm, Class<TC> xtc) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true,"** @param ", 0); // empty token
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true,"** @param ", 0); // empty token
assertSortedResults(
"xtm[JAVADOC_PARAM_REF]{xtm, null, null, xtm, null, "+this.positions+(JAVADOC_RELEVANCE+R_INTERESTING)+"}"
);
@@ -1578,7 +1578,7 @@ public void test103() throws JavaModelException {
" */\n" +
" <TM> void foo(Class<TM> xtm, Class<TC> xtc) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true,"** @param ", 0); // empty token
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true,"** @param ", 0); // empty token
assertSortedResults(
"xtm[JAVADOC_PARAM_REF]{xtm, null, null, xtm, null, "+this.positions+(JAVADOC_RELEVANCE+R_INTERESTING)+"}\n" +
"TM[JAVADOC_PARAM_REF]{<TM>, null, null, TM, null, "+this.positions+JAVADOC_RELEVANCE+"}"
@@ -1598,7 +1598,7 @@ public void test104() throws JavaModelException {
" */\n" +
" <TM> void foo(Class<TM> xtm, Class<TC> xtc) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true,"** @param ", 0); // empty token
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true,"** @param ", 0); // empty token
assertSortedResults(
"TM[JAVADOC_PARAM_REF]{<TM>, null, null, TM, null, "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -1618,7 +1618,7 @@ public void test105() throws JavaModelException {
" */\n" +
" <TM> void foo(Class<TM> xtm, Class<TC> xtc) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true,"** @param ", 0); // empty token
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true,"** @param ", 0); // empty token
assertSortedResults("");
}
@@ -1633,7 +1633,7 @@ public void test106() throws JavaModelException {
" */\n" +
" <TM> void foo(Class<TM> xtm, Class<TC> xtc) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "<", 2); // 2nd occurence
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "<", 2); // 2nd occurence
assertSortedResults(
"TM[JAVADOC_PARAM_REF]{<TM>, null, null, TM, null, "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -1650,7 +1650,7 @@ public void test107() throws JavaModelException {
" */\n" +
" <TM> void foo(Class<TM> xtm, Class<TC> xtc) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "<T", 2); // 2nd occurence
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "<T", 2); // 2nd occurence
assertSortedResults(
"TM[JAVADOC_PARAM_REF]{<TM>, null, null, TM, null, "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -1667,7 +1667,7 @@ public void test108() throws JavaModelException {
" */\n" +
" <TM> void foo(Class<TM> xtm, Class<TC> xtc) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "<TC", 2); // 2nd occurence
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "<TC", 2); // 2nd occurence
assertSortedResults("");
}
@@ -1682,7 +1682,7 @@ public void test109() throws JavaModelException {
" */\n" +
" <TM> void foo(Class<TM> xtm, Class<TC> xtc) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "<TM");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "<TM");
assertSortedResults(
"TM[JAVADOC_PARAM_REF]{<TM>, null, null, TM, null, "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -1699,7 +1699,7 @@ public void test110() throws JavaModelException {
" */\n" +
" <TM> void foo(Class<TM> xtm, Class<TC> xtc) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "<TM>");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "<TM>");
assertSortedResults(
"TM[JAVADOC_PARAM_REF]{<TM>, null, null, TM, null, "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -1717,7 +1717,7 @@ public void test111() throws JavaModelException {
" */\n" +
" <TM> void foo(Class<TM> xtm, Class<TC> xtc) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "<TM");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "<TM");
assertSortedResults("");
}
@@ -1733,7 +1733,7 @@ public void test112() throws JavaModelException {
" */\n" +
" <TM> void foo(Class<TM> xtm, Class<TC> xtc) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "<TM>", 2); // 2nd occurence
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "<TM>", 2); // 2nd occurence
assertSortedResults("");
}
@@ -1747,7 +1747,7 @@ public void test113() throws JavaModelException {
" */\n" +
" void foo(Object ab1, Object ab2) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "@param ", 0);
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "@param ", 0);
assertSortedResults(
"ab1[JAVADOC_PARAM_REF]{ab1, null, null, ab1, null, "+this.positions+(JAVADOC_RELEVANCE+R_INTERESTING+1)+"}\n" +
"ab2[JAVADOC_PARAM_REF]{ab2, null, null, ab2, null, "+this.positions+(JAVADOC_RELEVANCE+R_INTERESTING)+"}"
@@ -1765,7 +1765,7 @@ public void test114() throws JavaModelException {
" */\n" +
" <TM> void foo(Class<TM> xtm, Class<TC> xtc) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "@param ", 0); // empty token
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "@param ", 0); // empty token
assertSortedResults(
"xtm[JAVADOC_PARAM_REF]{xtm, null, null, xtm, null, "+this.positions+"14}\n" +
"xtc[JAVADOC_PARAM_REF]{xtc, null, null, xtc, null, "+this.positions+"13}\n" +
@@ -1784,7 +1784,7 @@ public void test115() throws JavaModelException {
" */\n" +
" <TM> void foo(Class<TM> xtm, Class<TC> xtc) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "<", 2); // 2nd occurrence
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "<", 2); // 2nd occurrence
assertSortedResults(
"TM[JAVADOC_PARAM_REF]{<TM>, null, null, TM, null, "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -1801,7 +1801,7 @@ public void test116() throws JavaModelException {
" */\n" +
" <TM> void foo(Class<TM> xtm, Class<TC> xtc) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "Z");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "Z");
assertSortedResults("");
}
@@ -1816,7 +1816,7 @@ public void test117() throws JavaModelException {
" */\n" +
" <TM> void foo(Class<TM> xtm, Class<TC> xtc) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "ZZZ");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "ZZZ");
assertSortedResults("");
}
@@ -1831,7 +1831,7 @@ public void test118() throws JavaModelException {
" */\n" +
" <TM> void foo(Class<TM> xtm, Class<TC> xtc) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "@param ", 0); // empty token
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "@param ", 0); // empty token
assertSortedResults(
"xtm[JAVADOC_PARAM_REF]{xtm, null, null, xtm, null, [105, 108], 14}\n" +
"xtc[JAVADOC_PARAM_REF]{xtc, null, null, xtc, null, [105, 108], 13}\n" +
@@ -1850,7 +1850,7 @@ public void test119() throws JavaModelException {
" */\n" +
" <TM> void foo(Class<TM> xtm, Class<TC> xtc) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "Z");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "Z");
assertSortedResults("");
}
@@ -1865,7 +1865,7 @@ public void test120() throws JavaModelException {
" */\n" +
" <TM> void foo(Class<TM> xtm, Class<TC> xtc) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "ZZZ");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "ZZZ");
assertSortedResults("");
}
@@ -1880,7 +1880,7 @@ public void test121() throws JavaModelException {
" */\n" +
" <TM> void foo(Class<TM> xtm, Class<TC> xtc) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "@param ", 0); // empty token
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "@param ", 0); // empty token
assertSortedResults(
"xtm[JAVADOC_PARAM_REF]{xtm, null, null, xtm, null, "+this.positions+"14}\n" +
"xtc[JAVADOC_PARAM_REF]{xtc, null, null, xtc, null, "+this.positions+"13}\n" +
@@ -1899,7 +1899,7 @@ public void test122() throws JavaModelException {
" */\n" +
" <TM> void foo(Class<TM> xtm, Class<TC> xtc) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "@param ", 0); // empty token
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "@param ", 0); // empty token
assertSortedResults(
"xtm[JAVADOC_PARAM_REF]{xtm, null, null, xtm, null, "+this.positions+"14}\n" +
"xtc[JAVADOC_PARAM_REF]{xtc, null, null, xtc, null, "+this.positions+"13}\n" +
@@ -1918,7 +1918,7 @@ public void test123() throws JavaModelException {
" */\n" +
" <TM> void foo(Class<TM> xtm, Class<TC> xtc) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "@param ", 0); // empty token
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "@param ", 0); // empty token
assertSortedResults(
"xtm[JAVADOC_PARAM_REF]{xtm, null, null, xtm, null, "+this.positions+"14}\n" +
"xtc[JAVADOC_PARAM_REF]{xtc, null, null, xtc, null, "+this.positions+"13}\n" +
@@ -1940,7 +1940,7 @@ public void test130() throws JavaModelException {
" BasicTestMethods() {}\n" +
" BasicTestMethods(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "BasicTest", 2); // 2nd occurence
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "BasicTest", 2); // 2nd occurence
assertResults(
"BasicTestMethods[METHOD_REF<CONSTRUCTOR>]{BasicTestMethods(int, float, Class), Ljavadoc.methods.tags.BasicTestMethods;, (IFLjava.lang.Class;)V, BasicTestMethods, (xxx, real, clazz), "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"BasicTestMethods[METHOD_REF<CONSTRUCTOR>]{BasicTestMethods(), Ljavadoc.methods.tags.BasicTestMethods;, ()V, BasicTestMethods, null, "+this.positions+JAVADOC_RELEVANCE+"}"
@@ -1959,7 +1959,7 @@ public void test131() throws JavaModelException {
" BasicTestMethods() {}\n" +
" BasicTestMethods(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "BasicTest", 2); // 2nd occurence
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "BasicTest", 2); // 2nd occurence
assertResults(
"BasicTestMethods[METHOD_REF<CONSTRUCTOR>]{BasicTestMethods(int, float, Class), Ljavadoc.methods.tags.BasicTestMethods;, (IFLjava.lang.Class;)V, BasicTestMethods, (xxx, real, clazz), "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"BasicTestMethods[METHOD_REF<CONSTRUCTOR>]{BasicTestMethods(), Ljavadoc.methods.tags.BasicTestMethods;, ()V, BasicTestMethods, null, "+this.positions+JAVADOC_RELEVANCE+"}"
@@ -1978,7 +1978,7 @@ public void test132() throws JavaModelException {
" BasicTestMethods() {}\n" +
" <T> BasicTestMethods(int xxx, float real, Class<T> clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "BasicTest", 2); // 2nd occurence
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "BasicTest", 2); // 2nd occurence
assertResults(
"BasicTestMethods[METHOD_REF<CONSTRUCTOR>]{BasicTestMethods(int, float, Class), Ljavadoc.methods.tags.BasicTestMethods;, <T:Ljava.lang.Object;>(IFLjava.lang.Class<TT;>;)V, BasicTestMethods, (xxx, real, clazz), "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"BasicTestMethods[METHOD_REF<CONSTRUCTOR>]{BasicTestMethods(), Ljavadoc.methods.tags.BasicTestMethods;, ()V, BasicTestMethods, null, "+this.positions+JAVADOC_RELEVANCE+"}"
@@ -1996,7 +1996,7 @@ public void test133() throws JavaModelException {
" BasicTestMethods() {}\n" +
" BasicTestMethods(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "BasicTest", 3); // 3rd occurence
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "BasicTest", 3); // 3rd occurence
assertResults(
"BasicTestMethods[METHOD_REF<CONSTRUCTOR>]{BasicTestMethods(int, float, Class), Ljavadoc.methods.tags.BasicTestMethods;, (IFLjava.lang.Class;)V, BasicTestMethods, (xxx, real, clazz), "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"BasicTestMethods[METHOD_REF<CONSTRUCTOR>]{BasicTestMethods(), Ljavadoc.methods.tags.BasicTestMethods;, ()V, BasicTestMethods, null, "+this.positions+JAVADOC_RELEVANCE+"}"
@@ -2014,7 +2014,7 @@ public void test134() throws JavaModelException {
" BasicTestMethods() {}\n" +
" BasicTestMethods(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "BasicTest", 3); // 3rd occurence
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "BasicTest", 3); // 3rd occurence
assertResults(
"BasicTestMethods[METHOD_REF<CONSTRUCTOR>]{BasicTestMethods(int, float, Class), Ljavadoc.methods.tags.BasicTestMethods;, (IFLjava.lang.Class;)V, BasicTestMethods, (xxx, real, clazz), "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"BasicTestMethods[METHOD_REF<CONSTRUCTOR>]{BasicTestMethods(), Ljavadoc.methods.tags.BasicTestMethods;, ()V, BasicTestMethods, null, "+this.positions+JAVADOC_RELEVANCE+"}"
@@ -2023,7 +2023,7 @@ public void test134() throws JavaModelException {
public void test135() throws JavaModelException {
String[] sources = {
- "/Completion/src/javadoc/methods/tags/BasicTestMethods.java",
+ "/Completion/src/javadoc/methods/tags/BasicTestMethods.js",
"package javadoc.methods.tags;\n" +
"public class BasicTestMethods {\n" +
" /**\n" +
@@ -2032,7 +2032,7 @@ public void test135() throws JavaModelException {
" */\n" +
" void foo() {};\n" +
"}",
- "/Completion/src/javadoc/methods/tags/OtherTypes.java",
+ "/Completion/src/javadoc/methods/tags/OtherTypes.js",
"package javadoc.methods.tags;\n" +
"public class OtherTypes {\n" +
" OtherTypes() {};\n" +
@@ -2046,7 +2046,7 @@ public void test135() throws JavaModelException {
public void test136() throws JavaModelException {
String[] sources = {
- "/Completion/src/javadoc/methods/tags/BasicTestMethods.java",
+ "/Completion/src/javadoc/methods/tags/BasicTestMethods.js",
"package javadoc.methods.tags;\n" +
"public class BasicTestMethods {\n" +
" /**\n" +
@@ -2055,7 +2055,7 @@ public void test136() throws JavaModelException {
" */\n" +
" void foo() {};\n" +
"}",
- "/Completion/src/javadoc/methods/tags/OtherTypes.java",
+ "/Completion/src/javadoc/methods/tags/OtherTypes.js",
"package javadoc.methods.tags;\n" +
"public class OtherTypes {\n" +
"}"
@@ -2077,7 +2077,7 @@ public void test137() throws JavaModelException {
" BasicTestMethods() {}\n" +
" BasicTestMethods(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "#", 0); // empty token
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "#", 0); // empty token
assertResults(
"wait[METHOD_REF]{wait(long, int), Ljava.lang.Object;, (JI)V, wait, (millis, nanos), "+this.positions+R_DICNRNS+"}\n" +
"wait[METHOD_REF]{wait(long), Ljava.lang.Object;, (J)V, wait, (millis), "+this.positions+R_DICNRNS+"}\n" +
@@ -2107,7 +2107,7 @@ public void test138() throws JavaModelException {
" BasicTestMethods() {}\n" +
" BasicTestMethods(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "#", 0); // empty token
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "#", 0); // empty token
assertResults(
"wait[METHOD_REF]{wait(long, int), Ljava.lang.Object;, (JI)V, wait, (millis, nanos), "+this.positions+R_DICNRNS+"}\n" +
"wait[METHOD_REF]{wait(long), Ljava.lang.Object;, (J)V, wait, (millis), "+this.positions+R_DICNRNS+"}\n" +
@@ -2137,7 +2137,7 @@ public void test139() throws JavaModelException {
" <T> BasicTestMethods() {}\n" +
" <T, U> BasicTestMethods(int xxx, Class<T> cl1, Class<U> cl2) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "#", 0); // empty token
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "#", 0); // empty token
assertResults(
"wait[METHOD_REF]{wait(long, int), Ljava.lang.Object;, (JI)V, wait, (millis, nanos), "+this.positions+R_DICNRNS+"}\n" +
"wait[METHOD_REF]{wait(long), Ljava.lang.Object;, (J)V, wait, (millis), "+this.positions+R_DICNRNS+"}\n" +
@@ -2164,7 +2164,7 @@ public void test140() throws JavaModelException {
" */\n" +
"public class BasicTestMethods {\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "#", 0); // empty token
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "#", 0); // empty token
assertResults(
"wait[METHOD_REF]{wait(long, int), Ljava.lang.Object;, (JI)V, wait, (millis, nanos), "+this.positions+R_DICNRNS+"}\n" +
"wait[METHOD_REF]{wait(long), Ljava.lang.Object;, (J)V, wait, (millis), "+this.positions+R_DICNRNS+"}\n" +
@@ -2192,7 +2192,7 @@ public void test141() throws JavaModelException {
" */\n" +
" BasicTestMethods(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "BasicTestMethods(");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "BasicTestMethods(");
assertResults(
"BasicTestMethods[METHOD_REF<CONSTRUCTOR>]{BasicTestMethods(int, float, Class), Ljavadoc.methods.tags.BasicTestMethods;, (IFLjava.lang.Class;)V, BasicTestMethods, (xxx, real, clazz), "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -2210,7 +2210,7 @@ public void test142() throws JavaModelException {
" */\n" +
" BasicTestMethods(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "BasicTestMethods(");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "BasicTestMethods(");
assertResults(
"BasicTestMethods[METHOD_REF<CONSTRUCTOR>]{BasicTestMethods(int, float, Class), Ljavadoc.methods.tags.BasicTestMethods;, (IFLjava.lang.Class;)V, BasicTestMethods, (xxx, real, clazz), "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -2227,7 +2227,7 @@ public void test143() throws JavaModelException {
" */\n" +
" BasicTestMethods(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "BasicTestMethods(");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "BasicTestMethods(");
assertResults(
"BasicTestMethods[METHOD_REF<CONSTRUCTOR>]{BasicTestMethods(int, float, Class), Ljavadoc.methods.tags.BasicTestMethods;, (IFLjava.lang.Class;)V, BasicTestMethods, (xxx, real, clazz), "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -2244,7 +2244,7 @@ public void test144() throws JavaModelException {
" */\n" +
" BasicTestMethods(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "BasicTestMethods(");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "BasicTestMethods(");
assertResults(
"BasicTestMethods[METHOD_REF<CONSTRUCTOR>]{BasicTestMethods(int, float, Class), Ljavadoc.methods.tags.BasicTestMethods;, (IFLjava.lang.Class;)V, BasicTestMethods, (xxx, real, clazz), "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -2261,7 +2261,7 @@ public void test145() throws JavaModelException {
" */\n" +
" BasicTestMethods(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "BasicTestMethods(");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "BasicTestMethods(");
assertResults(
"BasicTestMethods[METHOD_REF<CONSTRUCTOR>]{BasicTestMethods(int, float, Class), Ljavadoc.methods.tags.BasicTestMethods;, (IFLjava.lang.Class;)V, BasicTestMethods, (xxx, real, clazz), "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -2278,7 +2278,7 @@ public void test146() throws JavaModelException {
" */\n" +
" BasicTestMethods(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "BasicTestMethods(");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "BasicTestMethods(");
assertResults(
"BasicTestMethods[METHOD_REF<CONSTRUCTOR>]{BasicTestMethods(int, float, Class), Ljavadoc.methods.tags.BasicTestMethods;, (IFLjava.lang.Class;)V, BasicTestMethods, (xxx, real, clazz), "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -2295,7 +2295,7 @@ public void test147() throws JavaModelException {
" */\n" +
" BasicTestMethods(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "BasicTestMethods(");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "BasicTestMethods(");
assertResults(
"BasicTestMethods[METHOD_REF<CONSTRUCTOR>]{BasicTestMethods(int, float, Class), Ljavadoc.methods.tags.BasicTestMethods;, (IFLjava.lang.Class;)V, BasicTestMethods, (xxx, real, clazz), "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -2313,7 +2313,7 @@ public void test148() throws JavaModelException {
" BasicTestMethods() {}\n" +
" BasicTestMethods(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "BasicTestMethods(");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "BasicTestMethods(");
assertResults(
"BasicTestMethods[METHOD_REF<CONSTRUCTOR>]{BasicTestMethods(int, float, Class), Ljavadoc.methods.tags.BasicTestMethods;, (IFLjava.lang.Class;)V, BasicTestMethods, (xxx, real, clazz), "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"BasicTestMethods[METHOD_REF<CONSTRUCTOR>]{BasicTestMethods(), Ljavadoc.methods.tags.BasicTestMethods;, ()V, BasicTestMethods, null, "+this.positions+JAVADOC_RELEVANCE+"}"
@@ -2330,7 +2330,7 @@ public void test149() throws JavaModelException {
" */\n" +
" void foo() {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "BasicTestMethods(");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "BasicTestMethods(");
assertResults(
"BasicTestMethods[METHOD_REF<CONSTRUCTOR>]{BasicTestMethods(), Ljavadoc.methods.tags.BasicTestMethods;, ()V, BasicTestMethods, null, "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -2348,7 +2348,7 @@ public void test150() throws JavaModelException {
" */\n" +
" BasicTestMethods(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "in");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "in");
assertResults(
"int[KEYWORD]{int, null, null, int, null, "+this.positions+R_DICNR+"}\n" +
"InterruptedException[TYPE_REF]{InterruptedException, java.lang, Ljava.lang.InterruptedException;, null, null, "+this.positions+R_DIUNR+"}"
@@ -2367,7 +2367,7 @@ public void test151() throws JavaModelException {
" */\n" +
" BasicTestMethods(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "int");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "int");
assertResults(
"int[KEYWORD]{int, null, null, int, null, "+this.positions+R_DICENNR+"}\n" +
"InterruptedException[TYPE_REF]{InterruptedException, java.lang, Ljava.lang.InterruptedException;, null, null, "+this.positions+R_DIUNR+"}"
@@ -2385,7 +2385,7 @@ public void test152() throws JavaModelException {
" */\n" +
" BasicTestMethods(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "fl");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "fl");
assertResults(
"float[KEYWORD]{float, null, null, float, null, "+this.positions+R_DICNR+"}"
);
@@ -2402,7 +2402,7 @@ public void test153() throws JavaModelException {
" */\n" +
" BasicTestMethods(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "float");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "float");
assertResults(
"float[KEYWORD]{float, null, null, float, null, "+this.positions+R_DICENNR+"}"
);
@@ -2419,7 +2419,7 @@ public void test154() throws JavaModelException {
" */\n" +
" BasicTestMethods(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "Cla");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "Cla");
assertResults(
"Class[TYPE_REF]{Class, java.lang, Ljava.lang.Class;, null, null, "+this.positions+R_DICUNR+"}"
);
@@ -2437,7 +2437,7 @@ public void test155() throws JavaModelException {
" */\n" +
" BasicTestMethods(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "java.lang.");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "java.lang.");
assertSortedResults(
"Class[TYPE_REF]{Class, java.lang, Ljava.lang.Class;, null, null, "+this.positions+R_DICNR+"}\n" +
"CloneNotSupportedException[TYPE_REF]{CloneNotSupportedException, java.lang, Ljava.lang.CloneNotSupportedException;, null, null, "+this.positions+R_DICNR+"}\n" +
@@ -2463,7 +2463,7 @@ public void test156() throws JavaModelException {
" */\n" +
" BasicTestMethods(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "java.lang.Cla");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "java.lang.Cla");
assertResults(
"Class[TYPE_REF]{Class, java.lang, Ljava.lang.Class;, null, null, "+this.positions+R_DICNR+"}"
);
@@ -2481,7 +2481,7 @@ public void test157() throws JavaModelException {
" */\n" +
" BasicTestMethods(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "Class");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "Class");
assertResults(
"Class[TYPE_REF]{Class, java.lang, Ljava.lang.Class;, null, null, "+this.positions+R_DICENUNR+"}"
);
@@ -2507,7 +2507,7 @@ public void test160() throws JavaModelException {
" */\n" +
" BasicTestMethods(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "BTM");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "BTM");
assertResults(
"BasicTestMethods[METHOD_REF<CONSTRUCTOR>]{BasicTestMethods(int, float, Class), Ljavadoc.methods.tags.BasicTestMethods;, (IFLjava.lang.Class;)V, BasicTestMethods, (xxx, real, clazz), "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -2533,7 +2533,7 @@ public void test161() throws JavaModelException {
" */\n" +
" BasicTestMethods() {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "oTT");
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "oTT");
assertResults(
"oneTwoThree[METHOD_REF]{oneTwoThree(int), Ljavadoc.methods.tags.BasicTestMethods;, (I)V, oneTwoThree, (i), "+this.positions+"24}"
);
@@ -2556,7 +2556,7 @@ public void test162() throws JavaModelException {
" */\n" +
" BasicTestMethods() {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "oneTwoT", 2);
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "oneTwoT", 2);
assertResults(
"oneTwoThree[METHOD_REF]{oneTwoThree(Object...), Ljavadoc.methods.tags.BasicTestMethods;, ([Ljava.lang.Object;)V, oneTwoThree, (o), "+this.positions+R_DICNRNS+"}"
);
@@ -2576,7 +2576,7 @@ public void test163() throws JavaModelException {
" */\n" +
" void foo() {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.java", source, true, "BasicTestMeth", 3);
+ completeInJavadoc("/Completion/src/javadoc/methods/tags/BasicTestMethods.js", source, true, "BasicTestMeth", 3);
assertResults(
"BasicTestMethods[METHOD_REF<CONSTRUCTOR>]{BasicTestMethods(Object...), Ljavadoc.methods.tags.BasicTestMethods;, ([Ljava.lang.Object;)V, BasicTestMethods, (o), "+this.positions+JAVADOC_RELEVANCE+"}"
);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocPackageCompletionModelTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocPackageCompletionModelTest.java
index cf844dd..809901c 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocPackageCompletionModelTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocPackageCompletionModelTest.java
@@ -97,7 +97,7 @@ protected void writeFiles(String[] sources) {
}
// Store names info
- String fullPathName = testDir.getAbsolutePath()+"\\"+typeName+".java";
+ String fullPathName = testDir.getAbsolutePath()+"\\"+typeName+".js";
System.out.println("Write file "+fullPathName);
String contents = null;
if (i==0) { // package-info
@@ -123,7 +123,7 @@ public void test001() throws JavaModelException {
" * @\n" +
" */\n" +
"package javadoc;\n";
- completeInJavadoc("/Completion/src/javadoc/package-info.java", source, true, "@");
+ completeInJavadoc("/Completion/src/javadoc/package-info.js", source, true, "@");
assertResults(
"author[JAVADOC_BLOCK_TAG]{@author, null, null, author, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"see[JAVADOC_BLOCK_TAG]{@see, null, null, see, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
@@ -145,7 +145,7 @@ public void test002() throws JavaModelException {
" * @deprec\n" +
" */\n" +
"package javadoc;\n";
- completeInJavadoc("/Completion/src/javadoc/package-info.java", source, true, "@deprec");
+ completeInJavadoc("/Completion/src/javadoc/package-info.js", source, true, "@deprec");
assertResults("");
}
@@ -156,7 +156,7 @@ public void test003() throws JavaModelException {
" * @a\n" +
" */\n" +
"package javadoc;\n";
- completeInJavadoc("/Completion/src/javadoc/package-info.java", source, true, "@a");
+ completeInJavadoc("/Completion/src/javadoc/package-info.js", source, true, "@a");
assertResults(
"author[JAVADOC_BLOCK_TAG]{@author, null, null, author, null, "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -169,7 +169,7 @@ public void test004() throws JavaModelException {
" * @ser\n" +
" */\n" +
"package javadoc;\n";
- completeInJavadoc("/Completion/src/javadoc/package-info.java", source, true, "@ser");
+ completeInJavadoc("/Completion/src/javadoc/package-info.js", source, true, "@ser");
assertResults(
"serial[JAVADOC_BLOCK_TAG]{@serial, null, null, serial, null, "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -182,7 +182,7 @@ public void test005() throws JavaModelException {
" * @since\n" +
" */\n" +
"package javadoc;\n";
- completeInJavadoc("/Completion/src/javadoc/package-info.java", source, true, "@since");
+ completeInJavadoc("/Completion/src/javadoc/package-info.js", source, true, "@since");
assertResults(
"since[JAVADOC_BLOCK_TAG]{@since, null, null, since, null, "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -194,7 +194,7 @@ public void test006() throws JavaModelException {
" * Completion on @ inside text\n" +
" */\n" +
"package javadoc;\n";
- completeInJavadoc("/Completion/src/javadoc/package-info.java", source, true, "@");
+ completeInJavadoc("/Completion/src/javadoc/package-info.js", source, true, "@");
assertResults(
"link[JAVADOC_INLINE_TAG]{{@link}, null, null, link, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"docRoot[JAVADOC_INLINE_TAG]{{@docRoot}, null, null, docRoot, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
@@ -209,7 +209,7 @@ public void test007() throws JavaModelException {
" * Completion on @d inside text\n" +
" */\n" +
"package javadoc;\n";
- completeInJavadoc("/Completion/src/javadoc/package-info.java", source, true, "@d");
+ completeInJavadoc("/Completion/src/javadoc/package-info.js", source, true, "@d");
assertResults(
"docRoot[JAVADOC_INLINE_TAG]{{@docRoot}, null, null, docRoot, null, "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -225,7 +225,7 @@ public void test010() throws JavaModelException {
" * @see Obj\n" +
" */\n" +
"package javadoc.tags;\n";
- completeInJavadoc("/Completion/src/javadoc/tags/package-info.java", source, true, "Obj");
+ completeInJavadoc("/Completion/src/javadoc/tags/package-info.js", source, true, "Obj");
assertResults(
"Object[TYPE_REF]{Object, java.lang, Ljava.lang.Object;, null, null, "+this.positions+R_DICUNR+"}"
);
@@ -238,7 +238,7 @@ public void test011() throws JavaModelException {
" * @see BasicTestRef\n" +
" */\n" +
"package javadoc.tags;\n";
- completeInJavadoc("/Completion/src/javadoc/tags/package-info.java", source, true, "BasicTestRef");
+ completeInJavadoc("/Completion/src/javadoc/tags/package-info.js", source, true, "BasicTestRef");
assertResults(
"BasicTestReferences[TYPE_REF]{org.eclipse.wst.jsdt.core.tests.BasicTestReferences, org.eclipse.wst.jsdt.core.tests, Lorg.eclipse.wst.jsdt.core.tests.BasicTestReferences;, null, null, "+this.positions+R_DICNR+"}"
);
@@ -252,7 +252,7 @@ public void test012() throws JavaModelException {
" * Note: JDT-UI failed on this one\n" +
" */\n" +
"package javadoc.tags;\n";
- completeInJavadoc("/Completion/src/javadoc/tags/package-info.java", source, true, "org.eclipse.wst.jsdt.core.tests.BasicTestRef");
+ completeInJavadoc("/Completion/src/javadoc/tags/package-info.js", source, true, "org.eclipse.wst.jsdt.core.tests.BasicTestRef");
assertResults(
"BasicTestReferences[TYPE_REF]{org.eclipse.wst.jsdt.core.tests.BasicTestReferences, org.eclipse.wst.jsdt.core.tests, Lorg.eclipse.wst.jsdt.core.tests.BasicTestReferences;, null, null, "+this.positions+R_DICQNR+"}"
);
@@ -266,7 +266,7 @@ public void test013() throws JavaModelException {
" * Note: JDT-UI fails on this one\n" +
" */\n" +
"package javadoc.tags;\n";
- completeInJavadoc("/Completion/src/javadoc/tags/package-info.java", source, true, "java.la");
+ completeInJavadoc("/Completion/src/javadoc/tags/package-info.js", source, true, "java.la");
assertResults(
"java.lang.annotation[PACKAGE_REF]{java.lang.annotation, java.lang.annotation, null, null, null, "+this.positions+R_DICQNR+"}\n" +
"java.lang[PACKAGE_REF]{java.lang, java.lang, null, null, null, "+this.positions+R_DICQNR+"}"
@@ -280,7 +280,7 @@ public void test014() throws JavaModelException {
" * @see pack.Bin\n" +
" */\n" +
"package javadoc.tags;\n";
- completeInJavadoc("/Completion/src/javadoc/tags/package-info.java", source, true, "pack.Bin");
+ completeInJavadoc("/Completion/src/javadoc/tags/package-info.js", source, true, "pack.Bin");
assertSortedResults(
"Bin1[TYPE_REF]{pack.Bin1, pack, Lpack.Bin1;, null, null, "+this.positions+R_DICQNR+"}\n" +
"Bin2[TYPE_REF]{pack.Bin2, pack, Lpack.Bin2;, null, null, "+this.positions+R_DICQNR+"}\n" +
@@ -296,7 +296,7 @@ public void test015() throws JavaModelException {
" * Note: completion list shoud not include base types.\n" +
" */\n" +
"package javadoc.tags;\n";
- completeInJavadoc("/Completion/src/javadoc/tags/package-info.java", source, true, "I");
+ completeInJavadoc("/Completion/src/javadoc/tags/package-info.js", source, true, "I");
assertSortedResults(
"IllegalMonitorStateException[TYPE_REF]{IllegalMonitorStateException, java.lang, Ljava.lang.IllegalMonitorStateException;, null, null, "+this.positions+R_DICUNR+"}\n" +
"InterruptedException[TYPE_REF]{InterruptedException, java.lang, Ljava.lang.InterruptedException;, null, null, "+this.positions+R_DICUNR+"}"
@@ -313,7 +313,7 @@ public void test020() throws JavaModelException {
" * @see BasicTestReferences#FIE\n" +
" */\n" +
"package javadoc.tags;\n";
- completeInJavadoc("/Completion/src/javadoc/tags/package-info.java", source, true, "FIE");
+ completeInJavadoc("/Completion/src/javadoc/tags/package-info.js", source, true, "FIE");
assertResults("");
}
@@ -324,7 +324,7 @@ public void test021() throws JavaModelException {
" * @see org.eclipse.wst.jsdt.core.tests.BasicTestReferences#FIE\n" +
" */\n" +
"package javadoc.tags;\n";
- completeInJavadoc("/Completion/src/javadoc/tags/package-info.java", source, true, "FIE");
+ completeInJavadoc("/Completion/src/javadoc/tags/package-info.js", source, true, "FIE");
assertResults(
"FIELD[FIELD_REF]{FIELD, Lorg.eclipse.wst.jsdt.core.tests.BasicTestReferences;, I, FIELD, null, "+this.positions+R_DICNR+"}"
);
@@ -332,13 +332,13 @@ public void test021() throws JavaModelException {
public void test022() throws JavaModelException {
String[] sources = {
- "/Completion/src/javadoc/tags/package-info.java",
+ "/Completion/src/javadoc/tags/package-info.js",
"/**\n" +
" * Completion after:\n" +
" * @see OtherTypes#bar\n" +
" */\n" +
"package javadoc.tags;\n",
- "/Completion/src/javadoc/tags/OtherTypes.java",
+ "/Completion/src/javadoc/tags/OtherTypes.js",
"package javadoc.tags;\n" +
"public class OtherTypes {\n" +
" int bar;\n" +
@@ -357,7 +357,7 @@ public void test023() throws JavaModelException {
" * @see BasicTestReferences#\n" +
" */\n" +
"package javadoc.tags;\n";
- completeInJavadoc("/Completion/src/javadoc/tags/package-info.java", source, true, "#", 0); // empty token
+ completeInJavadoc("/Completion/src/javadoc/tags/package-info.js", source, true, "#", 0); // empty token
assertResults("");
}
@@ -368,7 +368,7 @@ public void test024() throws JavaModelException {
" * @see org.eclipse.wst.jsdt.core.tests.BasicTestReferences#\n" +
" */\n" +
"package javadoc.tags;\n";
- completeInJavadoc("/Completion/src/javadoc/tags/package-info.java", source, true, "#", 0); // empty token
+ completeInJavadoc("/Completion/src/javadoc/tags/package-info.js", source, true, "#", 0); // empty token
assertResults(
"FIELD[FIELD_REF]{FIELD, Lorg.eclipse.wst.jsdt.core.tests.BasicTestReferences;, I, FIELD, null, "+this.positions+R_DICNR+"}\n" +
"wait[METHOD_REF]{wait(long, int), Ljava.lang.Object;, (JI)V, wait, (millis, nanos), "+this.positions+R_DICNRNS+"}\n" +
@@ -388,13 +388,13 @@ public void test024() throws JavaModelException {
public void test025() throws JavaModelException {
String[] sources = {
- "/Completion/src/javadoc/tags/package-info.java",
+ "/Completion/src/javadoc/tags/package-info.js",
"/**\n" +
" * Completion after:\n" +
" * @see OtherTypes#\n" +
" */\n" +
"package javadoc.tags;\n",
- "/Completion/src/javadoc/tags/OtherTypes.java",
+ "/Completion/src/javadoc/tags/OtherTypes.js",
"package javadoc.tags;\n" +
"public class OtherTypes {\n" +
" int foo;\n" +
@@ -425,13 +425,13 @@ public void test025() throws JavaModelException {
*/
public void test030() throws JavaModelException {
String[] sources = {
- "/Completion/src/javadoc/tags/package-info.java",
+ "/Completion/src/javadoc/tags/package-info.js",
"/**\n" +
" * Completion after:\n" +
" * @see OtherTypes#meth\n" +
" */\n" +
"package javadoc.tags;",
- "/Completion/src/javadoc/tags/OtherTypes.java",
+ "/Completion/src/javadoc/tags/OtherTypes.js",
"package javadoc.tags;\n" +
"public class OtherTypes {\n" +
" void method() {};\n" +
@@ -444,13 +444,13 @@ public void test030() throws JavaModelException {
}
public void test031() throws JavaModelException {
String[] sources = {
- "/Completion/src/javadoc/tags/package-info.java",
+ "/Completion/src/javadoc/tags/package-info.js",
"/**\n" +
" * Completion after:\n" +
" * @see OtherTypes#\n" +
" */\n" +
"package javadoc.tags;",
- "/Completion/src/javadoc/tags/OtherTypes.java",
+ "/Completion/src/javadoc/tags/OtherTypes.js",
"package javadoc.tags;\n" +
"public class OtherTypes {\n" +
" void method() {};\n" +
@@ -481,13 +481,13 @@ public void test031() throws JavaModelException {
*/
public void test040() throws JavaModelException {
String[] sources = {
- "/Completion/src/javadoc/tags/package-info.java",
+ "/Completion/src/javadoc/tags/package-info.js",
"/**\n" +
" * Completion after:\n" +
" * @see OtherTypes#O\n" +
" */\n" +
"package javadoc.tags;\n",
- "/Completion/src/javadoc/tags/OtherTypes.java",
+ "/Completion/src/javadoc/tags/OtherTypes.js",
"package javadoc.tags;\n" +
"public class OtherTypes {\n" +
" void method() {};\n" +
@@ -501,13 +501,13 @@ public void test040() throws JavaModelException {
}
public void test041() throws JavaModelException {
String[] sources = {
- "/Completion/src/javadoc/tags/package-info.java",
+ "/Completion/src/javadoc/tags/package-info.js",
"/**\n" +
" * Completion after:\n" +
" * @see OtherTypes#O\n" +
" */\n" +
"package javadoc.tags;\n",
- "/Completion/src/javadoc/tags/OtherTypes.java",
+ "/Completion/src/javadoc/tags/OtherTypes.js",
"package javadoc.tags;\n" +
"public class OtherTypes {\n" +
" OtherTypes(int x) {};\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocTextCompletionModelTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocTextCompletionModelTest.java
index b63bb6f..3c4e9e2 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocTextCompletionModelTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocTextCompletionModelTest.java
@@ -50,7 +50,7 @@ public void test001() throws JavaModelException {
" * Completion on @ inside text\n" +
" */\n" +
"public class BasicTestTextIns {}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "@");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "@");
assertResults(
"link[JAVADOC_INLINE_TAG]{{@link}, null, null, link, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"docRoot[JAVADOC_INLINE_TAG]{{@docRoot}, null, null, docRoot, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
@@ -66,7 +66,7 @@ public void test002() throws JavaModelException {
" * Completion on @s inside text\n" +
" */\n" +
"public class BasicTestTextIns {}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "@s");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "@s");
assertResults("");
}
@@ -80,7 +80,7 @@ public void test003() throws JavaModelException {
" */\n" +
" int field;\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "@");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "@");
assertResults(
"link[JAVADOC_INLINE_TAG]{{@link}, null, null, link, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"docRoot[JAVADOC_INLINE_TAG]{{@docRoot}, null, null, docRoot, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
@@ -99,7 +99,7 @@ public void test004() throws JavaModelException {
" */\n" +
" int field;\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "@d");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "@d");
assertResults(
"docRoot[JAVADOC_INLINE_TAG]{{@docRoot}, null, null, docRoot, null, "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -114,7 +114,7 @@ public void test005() throws JavaModelException {
" */\n" +
" public void foo() {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "@");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "@");
assertResults(
"link[JAVADOC_INLINE_TAG]{{@link}, null, null, link, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"docRoot[JAVADOC_INLINE_TAG]{{@docRoot}, null, null, docRoot, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
@@ -133,7 +133,7 @@ public void test006() throws JavaModelException {
" */\n" +
" public void foo() {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "@ret");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "@ret");
assertResults("");
}
@@ -146,7 +146,7 @@ public void test007() throws JavaModelException {
" */\n" +
" public void foo() {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "@l");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "@l");
assertResults(
"link[JAVADOC_INLINE_TAG]{{@link}, null, null, link, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"linkplain[JAVADOC_INLINE_TAG]{{@linkplain}, null, null, linkplain, null, "+this.positions+JAVADOC_RELEVANCE+"}"
@@ -162,7 +162,7 @@ public void test008() throws JavaModelException {
" */\n" +
" public void foo() {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "{@li");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "{@li");
assertResults(
"link[JAVADOC_INLINE_TAG]{{@link}, null, null, link, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"linkplain[JAVADOC_INLINE_TAG]{{@linkplain}, null, null, linkplain, null, "+this.positions+JAVADOC_RELEVANCE+"}"
@@ -179,7 +179,7 @@ public void test009() throws JavaModelException {
" */\n" +
" public void foo(String str) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "@inh");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "@inh");
assertResults(
"inheritDoc[JAVADOC_INLINE_TAG]{{@inheritDoc}, null, null, inheritDoc, null, "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -195,7 +195,7 @@ public void test010() throws JavaModelException {
" */\n" +
" public void foo(String str) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "{@inh");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "{@inh");
assertResults(
"inheritDoc[JAVADOC_INLINE_TAG]{{@inheritDoc}, null, null, inheritDoc, null, "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -210,7 +210,7 @@ public void test011() throws JavaModelException {
" */\n" +
" public void foo() {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "{@docRoot");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "{@docRoot");
assertResults(
"docRoot[JAVADOC_INLINE_TAG]{{@docRoot}, null, null, docRoot, null, "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -227,7 +227,7 @@ public void test020() throws JavaModelException {
" */\n" +
"public class BasicTestTextIns {\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "BasicTestTextIns");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "BasicTestTextIns");
assertSortedResults(
"BasicTestTextIns[JAVADOC_TYPE_REF]{{@link BasicTestTextIns}, javadoc.text, Ljavadoc.text.BasicTestTextIns;, null, null, "+this.positions+R_DICENUNRIT+"}\n" +
"BasicTestTextIns[TYPE_REF]{BasicTestTextIns, javadoc.text, Ljavadoc.text.BasicTestTextIns;, null, null, "+this.positions+R_DICENUNR+"}"
@@ -244,7 +244,7 @@ public void test021() throws JavaModelException {
"}\n" +
"class BasicTestTextInsException extends Exception{\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "BasicTestTextIns");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "BasicTestTextIns");
assertSortedResults(
"BasicTestTextIns[TYPE_REF]{BasicTestTextIns, javadoc.text, Ljavadoc.text.BasicTestTextIns;, null, null, "+this.positions+R_DICENUNR+"}\n" +
"BasicTestTextInsException[TYPE_REF]{BasicTestTextInsException, javadoc.text, Ljavadoc.text.BasicTestTextInsException;, null, null, "+this.positions+R_DICUNR+"}"
@@ -262,7 +262,7 @@ public void test022() throws JavaModelException {
"}\n" +
"class BasicTestTextInsException extends Exception{\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "BasicTestTextIns");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "BasicTestTextIns");
assertSortedResults(
"BasicTestTextIns[JAVADOC_TYPE_REF]{{@link BasicTestTextIns}, javadoc.text, Ljavadoc.text.BasicTestTextIns;, null, null, "+this.positions+(R_DICENUNR+R_INLINE_TAG)+"}\n" +
"BasicTestTextInsException[JAVADOC_TYPE_REF]{{@link BasicTestTextInsException}, javadoc.text, Ljavadoc.text.BasicTestTextInsException;, null, null, "+this.positions+R_DICUNRIT+"}\n" +
@@ -282,7 +282,7 @@ public void test023() throws JavaModelException {
"}\n" +
"class BasicTestTextInsException extends Exception{\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "BasicTestTextIns", 2); // 2nd occurrence
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "BasicTestTextIns", 2); // 2nd occurrence
assertSortedResults(
"BasicTestTextInsException[JAVADOC_TYPE_REF]{{@link BasicTestTextInsException}, javadoc.text, Ljavadoc.text.BasicTestTextInsException;, null, null, "+this.positions+R_DICUNREETIT+"}\n" +
"BasicTestTextIns[JAVADOC_TYPE_REF]{{@link BasicTestTextIns}, javadoc.text, Ljavadoc.text.BasicTestTextIns;, null, null, "+this.positions+R_DICENUNRIT+"}\n" +
@@ -300,7 +300,7 @@ public void test024() throws JavaModelException {
"public class BasicTestTextIns {\n" +
" public void foo() {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "BasicTestTextIns");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "BasicTestTextIns");
assertSortedResults(
"BasicTestTextIns[JAVADOC_TYPE_REF]{{@link BasicTestTextIns}, javadoc.text, Ljavadoc.text.BasicTestTextIns;, null, null, "+this.positions+R_DICENUNRIT+"}\n" +
"BasicTestTextIns[TYPE_REF]{BasicTestTextIns, javadoc.text, Ljavadoc.text.BasicTestTextIns;, null, null, "+this.positions+R_DICENUNR+"}"
@@ -316,7 +316,7 @@ public void test025() throws JavaModelException {
" */\n" +
" public void foo() {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "BasicTestTextIns", 2); // 2nd occurrence
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "BasicTestTextIns", 2); // 2nd occurrence
assertSortedResults(
"BasicTestTextIns[JAVADOC_TYPE_REF]{{@link BasicTestTextIns}, javadoc.text, Ljavadoc.text.BasicTestTextIns;, null, null, "+this.positions+R_DICENUNRIT+"}\n" +
"BasicTestTextIns[TYPE_REF]{BasicTestTextIns, javadoc.text, Ljavadoc.text.BasicTestTextIns;, null, null, "+this.positions+R_DICENUNR+"}"
@@ -333,7 +333,7 @@ public void test026() throws JavaModelException {
" public void foo() throws InterruptedException {\n" +
" }\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "java.la");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "java.la");
assertSortedResults(
"java.lang[PACKAGE_REF]{java.lang, java.lang, null, null, null, "+this.positions+R_DICQNR+"}"
);
@@ -349,7 +349,7 @@ public void test027() throws JavaModelException {
" public void foo() throws InterruptedException {\n" +
" }\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "java.lang.I");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "java.lang.I");
assertSortedResults(
"IllegalMonitorStateException[JAVADOC_TYPE_REF]{{@link IllegalMonitorStateException}, java.lang, Ljava.lang.IllegalMonitorStateException;, null, null, "+this.positions+R_DICNRIT+"}\n" +
"InterruptedException[JAVADOC_TYPE_REF]{{@link InterruptedException}, java.lang, Ljava.lang.InterruptedException;, null, null, "+this.positions+R_DICNRIT+"}\n" +
@@ -368,7 +368,7 @@ public void test028() throws JavaModelException {
" public void foo() throws InterruptedException {\n" +
" }\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "java.lang.I");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "java.lang.I");
assertSortedResults(
"InterruptedException[JAVADOC_TYPE_REF]{{@link InterruptedException}, java.lang, Ljava.lang.InterruptedException;, null, null, "+this.positions+R_DICNREETIT+"}\n" +
"IllegalMonitorStateException[JAVADOC_TYPE_REF]{{@link IllegalMonitorStateException}, java.lang, Ljava.lang.IllegalMonitorStateException;, null, null, "+this.positions+R_DICNRIT+"}\n" +
@@ -389,7 +389,7 @@ public void test030() throws JavaModelException {
" */\n" +
" int foo;\n" +
"}";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "#fo");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "#fo");
assertSortedResults(
"foo[JAVADOC_FIELD_REF]{{@link #foo}, Ljavadoc.text.BasicTestTextIns;, I, foo, null, "+this.positions+R_DICNRNSIT+"}"
);
@@ -404,7 +404,7 @@ public void test031() throws JavaModelException {
" */\n" +
" static int foo;\n" +
"}";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "BasicTestTextIns#fo");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "BasicTestTextIns#fo");
assertSortedResults(
"foo[JAVADOC_FIELD_REF]{{@link BasicTestTextIns#foo}, Ljavadoc.text.BasicTestTextIns;, I, foo, null, "+this.positions+R_DICNRIT+"}\n" +
"foo[JAVADOC_VALUE_REF]{{@value BasicTestTextIns#foo}, Ljavadoc.text.BasicTestTextIns;, I, foo, null, "+this.positions+R_DICNRIT+"}"
@@ -420,7 +420,7 @@ public void test032() throws JavaModelException {
" */\n" +
" int foo;\n" +
"}";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "javadoc.text.BasicTestTextIns#fo");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "javadoc.text.BasicTestTextIns#fo");
assertSortedResults(
"foo[JAVADOC_FIELD_REF]{{@link javadoc.text.BasicTestTextIns#foo}, Ljavadoc.text.BasicTestTextIns;, I, foo, null, "+this.positions+R_DICNRNSIT+"}"
);
@@ -428,7 +428,7 @@ public void test032() throws JavaModelException {
public void test033() throws JavaModelException {
String[] sources = {
- "/Completion/src/javadoc/text/BasicTestTextIns.java",
+ "/Completion/src/javadoc/text/BasicTestTextIns.js",
"package javadoc.text;\n" +
"public class BasicTestTextIns {\n" +
" /**\n" +
@@ -436,7 +436,7 @@ public void test033() throws JavaModelException {
" */\n" +
" int foo;\n" +
"}",
- "/Completion/src/javadoc/text/OtherFields.java",
+ "/Completion/src/javadoc/text/OtherFields.js",
"package javadoc.text;\n" +
"public class OtherFields {\n" +
" static int foo;\n" +
@@ -459,7 +459,7 @@ public void test034() throws JavaModelException {
" */\n" +
" int foo;\n" +
"}";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "fo");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "fo");
assertSortedResults(
"foo[FIELD_REF]{foo, Ljavadoc.text.BasicTestTextIns;, I, foo, null, "+this.positions+R_DICNRNS+"}"
);
@@ -476,7 +476,7 @@ public void test035() throws JavaModelException {
" */\n" +
" int foo;\n" +
"}";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "fo");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "fo");
assertSortedResults(
"foo[FIELD_REF]{foo, Ljavadoc.text.BasicTestTextIns;, I, foo, null, "+this.positions+R_DICNRNS+"}"
);
@@ -491,7 +491,7 @@ public void test036() throws JavaModelException {
" */\n" +
" static int foo;\n" +
"}";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "fo");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "fo");
assertSortedResults(
"foo[FIELD_REF]{foo, Ljavadoc.text.BasicTestTextIns;, I, foo, null, "+this.positions+R_DICNR+"}"
);
@@ -506,7 +506,7 @@ public void test037() throws JavaModelException {
" */\n" +
" int foo;\n" +
"}";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "fo");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "fo");
assertSortedResults(
"foo[FIELD_REF]{foo, Ljavadoc.text.BasicTestTextIns;, I, foo, null, "+this.positions+R_DICNRNS+"}"
);
@@ -515,7 +515,7 @@ public void test037() throws JavaModelException {
public void test038() throws JavaModelException {
setUpProjectOptions(CompilerOptions.VERSION_1_5);
String[] sources = {
- "/Completion/src/javadoc/text/BasicTestTextIns.java",
+ "/Completion/src/javadoc/text/BasicTestTextIns.js",
"package javadoc.text;\n" +
"public class BasicTestTextIns {\n" +
" /**\n" +
@@ -524,7 +524,7 @@ public void test038() throws JavaModelException {
" */\n" +
" int foo;\n" +
"}",
- "/Completion/src/javadoc/text/OtherFields.java",
+ "/Completion/src/javadoc/text/OtherFields.js",
"package javadoc.text;\n" +
"public class OtherFields {\n" +
" static int foo;\n" +
@@ -549,7 +549,7 @@ public void test040() throws JavaModelException {
" void method() {}\n" +
" void paramMethod(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "meth");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "meth");
assertSortedResults("");
}
@@ -563,7 +563,7 @@ public void test041() throws JavaModelException {
" void method() {}\n" +
" void paramMethod(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "#meth");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "#meth");
assertSortedResults(
"method[JAVADOC_METHOD_REF]{{@link #method()}, Ljavadoc.text.BasicTestTextIns;, ()V, method, null, "+this.positions+R_DICNRNSIT+"}"
);
@@ -579,7 +579,7 @@ public void test042() throws JavaModelException {
" void method() {}\n" +
" void paramMethod(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "#meth");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "#meth");
assertSortedResults(
"method[JAVADOC_METHOD_REF]{{@link #method()}, Ljavadoc.text.BasicTestTextIns;, ()V, method, null, "+this.positions+R_DICNRNSIT+"}"
);
@@ -595,7 +595,7 @@ public void test043() throws JavaModelException {
" void method() {}\n" +
" void paramMethod(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "#meth");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "#meth");
assertSortedResults(
"method[JAVADOC_METHOD_REF]{{@link #method()}, Ljavadoc.text.BasicTestTextIns;, ()V, method, null, "+this.positions+R_DICNRNSIT+"}"
);
@@ -611,7 +611,7 @@ public void test044() throws JavaModelException {
" void method() {}\n" +
" void paramMethod(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "BasicTestTextIns#param");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "BasicTestTextIns#param");
assertSortedResults(
"paramMethod[JAVADOC_METHOD_REF]{{@link BasicTestTextIns#paramMethod(String, boolean, Object)}, Ljavadoc.text.BasicTestTextIns;, (Ljava.lang.String;ZLjava.lang.Object;)V, paramMethod, (str, flag, obj), "+this.positions+R_DICNRNSIT+"}"
);
@@ -627,7 +627,7 @@ public void test045() throws JavaModelException {
" void method() {}\n" +
" void paramMethod(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "javadoc.text.BasicTestTextIns#meth");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "javadoc.text.BasicTestTextIns#meth");
assertSortedResults(
"method[JAVADOC_METHOD_REF]{{@link javadoc.text.BasicTestTextIns#method()}, Ljavadoc.text.BasicTestTextIns;, ()V, method, null, "+this.positions+R_DICNRNSIT+"}"
);
@@ -643,7 +643,7 @@ public void test046() throws JavaModelException {
" */\n" +
" void paramMethod(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "param");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "param");
assertSortedResults(
"paramMethod[METHOD_REF]{paramMethod(String, boolean, Object), Ljavadoc.text.BasicTestTextIns;, (Ljava.lang.String;ZLjava.lang.Object;)V, paramMethod, (str, flag, obj), "+this.positions+R_DICNRNS+"}"
);
@@ -659,7 +659,7 @@ public void test047() throws JavaModelException {
" void method() {}\n" +
" void paramMethod(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "meth");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "meth");
assertSortedResults(
"method[METHOD_REF]{method(), Ljavadoc.text.BasicTestTextIns;, ()V, method, null, "+this.positions+R_DICNRNS+"}"
);
@@ -675,7 +675,7 @@ public void test048() throws JavaModelException {
" */\n" +
" void paramMethod(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "param");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "param");
assertSortedResults(
"paramMethod[METHOD_REF]{paramMethod(String, boolean, Object), Ljavadoc.text.BasicTestTextIns;, (Ljava.lang.String;ZLjava.lang.Object;)V, paramMethod, (str, flag, obj), "+this.positions+R_DICNRNS+"}"
);
@@ -683,7 +683,7 @@ public void test048() throws JavaModelException {
public void test049() throws JavaModelException {
String[] sources = {
- "/Completion/src/javadoc/text/BasicTestTextIns.java",
+ "/Completion/src/javadoc/text/BasicTestTextIns.js",
"package javadoc.text;\n" +
"public class BasicTestTextIns {\n" +
" /**\n" +
@@ -691,7 +691,7 @@ public void test049() throws JavaModelException {
" */\n" +
" void foo() {};\n" +
"}",
- "/Completion/src/javadoc/text/OtherTypes.java",
+ "/Completion/src/javadoc/text/OtherTypes.js",
"package javadoc.text;\n" +
"public class OtherTypes {\n" +
" void method() {};\n" +
@@ -705,7 +705,7 @@ public void test049() throws JavaModelException {
public void test050() throws JavaModelException {
String[] sources = {
- "/Completion/src/javadoc/text/BasicTestTextIns.java",
+ "/Completion/src/javadoc/text/BasicTestTextIns.js",
"package javadoc.text;\n" +
"public class BasicTestTextIns {\n" +
" /**\n" +
@@ -713,7 +713,7 @@ public void test050() throws JavaModelException {
" */\n" +
" void foo() {};\n" +
"}",
- "/Completion/src/javadoc/text/OtherTypes.java",
+ "/Completion/src/javadoc/text/OtherTypes.js",
"package javadoc.text;\n" +
"public class OtherTypes {\n" +
" void method() {};\n" +
@@ -735,7 +735,7 @@ public void test051() throws JavaModelException {
" void method() {}\n" +
" void paramMethod(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "#");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "#");
assertSortedResults(
"clone[JAVADOC_METHOD_REF]{{@link #clone()}, Ljava.lang.Object;, ()Ljava.lang.Object;, clone, null, "+this.positions+R_DICNRNSIT+"}\n" +
"equals[JAVADOC_METHOD_REF]{{@link #equals(Object)}, Ljava.lang.Object;, (Ljava.lang.Object;)Z, equals, null, "+this.positions+R_DICNRNSIT+"}\n" +
@@ -764,7 +764,7 @@ public void test052() throws JavaModelException {
" void method() {}\n" +
" void paramMethod(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "#");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "#");
assertSortedResults(
"clone[JAVADOC_METHOD_REF]{{@link #clone()}, Ljava.lang.Object;, ()Ljava.lang.Object;, clone, null, "+this.positions+R_DICNRNSIT+"}\n" +
"equals[JAVADOC_METHOD_REF]{{@link #equals(Object)}, Ljava.lang.Object;, (Ljava.lang.Object;)Z, equals, null, "+this.positions+R_DICNRNSIT+"}\n" +
@@ -793,7 +793,7 @@ public void test053() throws JavaModelException {
" void method() {}\n" +
" void paramMethod(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "#", 0); //empty token
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "#", 0); //empty token
assertSortedResults(
"clone[METHOD_REF]{clone(), Ljava.lang.Object;, ()Ljava.lang.Object;, clone, null, "+this.positions+R_DICNRNS+"}\n" +
"equals[METHOD_REF]{equals(Object), Ljava.lang.Object;, (Ljava.lang.Object;)Z, equals, (obj), "+this.positions+R_DICNRNS+"}\n" +
@@ -822,7 +822,7 @@ public void test054() throws JavaModelException {
" void method() {}\n" +
" void paramMethod(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "#", 0); //empty token
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "#", 0); //empty token
assertSortedResults(
"clone[METHOD_REF]{clone(), Ljava.lang.Object;, ()Ljava.lang.Object;, clone, null, "+this.positions+R_DICNRNS+"}\n" +
"equals[METHOD_REF]{equals(Object), Ljava.lang.Object;, (Ljava.lang.Object;)Z, equals, (obj), "+this.positions+R_DICNRNS+"}\n" +
@@ -851,7 +851,7 @@ public void test055() throws JavaModelException {
" */\n" +
" void paramMethod(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "#paramMethod(");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "#paramMethod(");
assertSortedResults(
"paramMethod[JAVADOC_METHOD_REF]{{@link #paramMethod(String, boolean, Object)}, Ljavadoc.text.BasicTestTextIns;, (Ljava.lang.String;ZLjava.lang.Object;)V, paramMethod, (str, flag, obj), "+this.positions+R_DICENUNRIT+"}"
);
@@ -867,7 +867,7 @@ public void test056() throws JavaModelException {
" */\n" +
" void paramMethod(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "Str");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "Str");
assertSortedResults(
"String[TYPE_REF]{String, java.lang, Ljava.lang.String;, null, null, "+this.positions+R_DICUNR+"}"
);
@@ -883,7 +883,7 @@ public void test057() throws JavaModelException {
" */\n" +
" void paramMethod(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "paramMethod(String s");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "paramMethod(String s");
assertSortedResults(
"paramMethod[METHOD_REF]{paramMethod(String, boolean, Object), Ljavadoc.text.BasicTestTextIns;, (Ljava.lang.String;ZLjava.lang.Object;)V, paramMethod, (str, flag, obj), "+this.positions+R_DICENUNR+"}"
);
@@ -899,7 +899,7 @@ public void test058() throws JavaModelException {
" */\n" +
" void paramMethod(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "#paramMethod(String str,");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "#paramMethod(String str,");
assertSortedResults(
"paramMethod[JAVADOC_METHOD_REF]{{@link #paramMethod(String, boolean, Object)}, Ljavadoc.text.BasicTestTextIns;, (Ljava.lang.String;ZLjava.lang.Object;)V, paramMethod, (str, flag, obj), "+this.positions+R_DICENUNRIT+"}"
);
@@ -915,7 +915,7 @@ public void test059() throws JavaModelException {
" */\n" +
" void paramMethod(String str, boolean flag, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "paramMethod(String,");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "paramMethod(String,");
assertSortedResults(
"paramMethod[METHOD_REF]{paramMethod(String, boolean, Object), Ljavadoc.text.BasicTestTextIns;, (Ljava.lang.String;ZLjava.lang.Object;)V, paramMethod, (str, flag, obj), "+this.positions+R_DICENUNR+"}"
);
@@ -934,7 +934,7 @@ public void test070() throws JavaModelException {
" BasicTestTextIns() {}\n" +
" BasicTestTextIns(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "#BasicTest");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "#BasicTest");
assertSortedResults(
"BasicTestTextIns[JAVADOC_METHOD_REF]{{@link #BasicTestTextIns(int, float, Class)}, Ljavadoc.text.BasicTestTextIns;, (IFLjava.lang.Class;)V, BasicTestTextIns, (xxx, real, clazz), "+this.positions+JAVADOC_RELEVANCE_IT+"}\n" +
"BasicTestTextIns[JAVADOC_METHOD_REF]{{@link #BasicTestTextIns()}, Ljavadoc.text.BasicTestTextIns;, ()V, BasicTestTextIns, null, "+this.positions+JAVADOC_RELEVANCE_IT+"}"
@@ -951,7 +951,7 @@ public void test071() throws JavaModelException {
" BasicTestTextIns() {}\n" +
" BasicTestTextIns(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "BasicTest", 3); // 3rd occurence
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "BasicTest", 3); // 3rd occurence
assertSortedResults(
"BasicTestTextIns[METHOD_REF<CONSTRUCTOR>]{BasicTestTextIns(int, float, Class), Ljavadoc.text.BasicTestTextIns;, (IFLjava.lang.Class;)V, BasicTestTextIns, (xxx, real, clazz), "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"BasicTestTextIns[METHOD_REF<CONSTRUCTOR>]{BasicTestTextIns(), Ljavadoc.text.BasicTestTextIns;, ()V, BasicTestTextIns, null, "+this.positions+JAVADOC_RELEVANCE+"}"
@@ -968,7 +968,7 @@ public void test072() throws JavaModelException {
" BasicTestTextIns() {}\n" +
" BasicTestTextIns(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "BasicTest", 3); // 3rd occurence
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "BasicTest", 3); // 3rd occurence
assertSortedResults(
"BasicTestTextIns[METHOD_REF<CONSTRUCTOR>]{BasicTestTextIns(int, float, Class), Ljavadoc.text.BasicTestTextIns;, (IFLjava.lang.Class;)V, BasicTestTextIns, (xxx, real, clazz), "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"BasicTestTextIns[METHOD_REF<CONSTRUCTOR>]{BasicTestTextIns(), Ljavadoc.text.BasicTestTextIns;, ()V, BasicTestTextIns, null, "+this.positions+JAVADOC_RELEVANCE+"}"
@@ -977,7 +977,7 @@ public void test072() throws JavaModelException {
public void test073() throws JavaModelException {
String[] sources = {
- "/Completion/src/javadoc/text/BasicTestTextIns.java",
+ "/Completion/src/javadoc/text/BasicTestTextIns.js",
"package javadoc.text;\n" +
"public class BasicTestTextIns {\n" +
" /**\n" +
@@ -985,7 +985,7 @@ public void test073() throws JavaModelException {
" */\n" +
" void foo() {};\n" +
"}",
- "/Completion/src/javadoc/text/OtherTypes.java",
+ "/Completion/src/javadoc/text/OtherTypes.js",
"package javadoc.text;\n" +
"public class OtherTypes {\n" +
" OtherTypes() {};\n" +
@@ -999,7 +999,7 @@ public void test073() throws JavaModelException {
public void test074() throws JavaModelException {
String[] sources = {
- "/Completion/src/javadoc/text/BasicTestTextIns.java",
+ "/Completion/src/javadoc/text/BasicTestTextIns.js",
"package javadoc.text;\n" +
"public class BasicTestTextIns {\n" +
" /**\n" +
@@ -1007,7 +1007,7 @@ public void test074() throws JavaModelException {
" */\n" +
" void foo() {};\n" +
"}",
- "/Completion/src/javadoc/text/OtherTypes.java",
+ "/Completion/src/javadoc/text/OtherTypes.js",
"package javadoc.text;\n" +
"public class OtherTypes {\n" +
"}"
@@ -1028,7 +1028,7 @@ public void test075() throws JavaModelException {
" BasicTestTextIns() {}\n" +
" BasicTestTextIns(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "#");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "#");
assertSortedResults(
"clone[JAVADOC_METHOD_REF]{{@link #clone()}, Ljava.lang.Object;, ()Ljava.lang.Object;, clone, null, "+this.positions+R_DICNRNSIT+"}\n" +
"equals[JAVADOC_METHOD_REF]{{@link #equals(Object)}, Ljava.lang.Object;, (Ljava.lang.Object;)Z, equals, null, "+this.positions+R_DICNRNSIT+"}\n" +
@@ -1056,7 +1056,7 @@ public void test076() throws JavaModelException {
" BasicTestTextIns() {}\n" +
" BasicTestTextIns(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "#");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "#");
assertSortedResults(
"clone[JAVADOC_METHOD_REF]{{@link #clone()}, Ljava.lang.Object;, ()Ljava.lang.Object;, clone, null, "+this.positions+R_DICNRNSIT+"}\n" +
"equals[JAVADOC_METHOD_REF]{{@link #equals(Object)}, Ljava.lang.Object;, (Ljava.lang.Object;)Z, equals, null, "+this.positions+R_DICNRNSIT+"}\n" +
@@ -1084,7 +1084,7 @@ public void test077() throws JavaModelException {
" BasicTestTextIns() {}\n" +
" BasicTestTextIns(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "#", 0); // empty token
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "#", 0); // empty token
assertSortedResults(
"clone[METHOD_REF]{clone(), Ljava.lang.Object;, ()Ljava.lang.Object;, clone, null, "+this.positions+R_DICNRNS+"}\n" +
"equals[METHOD_REF]{equals(Object), Ljava.lang.Object;, (Ljava.lang.Object;)Z, equals, (obj), "+this.positions+R_DICNRNS+"}\n" +
@@ -1112,7 +1112,7 @@ public void test078() throws JavaModelException {
" */\n" +
" BasicTestTextIns(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "BasicTestTextIns(");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "BasicTestTextIns(");
assertSortedResults(
"BasicTestTextIns[METHOD_REF<CONSTRUCTOR>]{BasicTestTextIns(int, float, Class), Ljavadoc.text.BasicTestTextIns;, (IFLjava.lang.Class;)V, BasicTestTextIns, (xxx, real, clazz), "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -1129,7 +1129,7 @@ public void test079() throws JavaModelException {
" BasicTestTextIns() {}\n" +
" BasicTestTextIns(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "BasicTestTextIns#BasicTestTextIns(int,");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "BasicTestTextIns#BasicTestTextIns(int,");
assertSortedResults(
"BasicTestTextIns[JAVADOC_METHOD_REF]{{@link BasicTestTextIns#BasicTestTextIns(int, float, Class)}, Ljavadoc.text.BasicTestTextIns;, (IFLjava.lang.Class;)V, BasicTestTextIns, (xxx, real, clazz), "+this.positions+JAVADOC_RELEVANCE_IT+"}"
);
@@ -1147,7 +1147,7 @@ public void test080() throws JavaModelException {
" BasicTestTextIns() {}\n" +
" BasicTestTextIns(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "BasicTestTextIns#BasicTestTextIns(");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "BasicTestTextIns#BasicTestTextIns(");
assertSortedResults(
"BasicTestTextIns[JAVADOC_METHOD_REF]{{@link BasicTestTextIns#BasicTestTextIns(int, float, Class)}, Ljavadoc.text.BasicTestTextIns;, (IFLjava.lang.Class;)V, BasicTestTextIns, (xxx, real, clazz), "+this.positions+JAVADOC_RELEVANCE_IT+"}\n" +
"BasicTestTextIns[JAVADOC_METHOD_REF]{{@link BasicTestTextIns#BasicTestTextIns()}, Ljavadoc.text.BasicTestTextIns;, ()V, BasicTestTextIns, null, "+this.positions+JAVADOC_RELEVANCE_IT+"}"
@@ -1164,7 +1164,7 @@ public void test081() throws JavaModelException {
" */\n" +
" void method() {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "javadoc.text.BasicTestTextIns#BasicTestTextIns(");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "javadoc.text.BasicTestTextIns#BasicTestTextIns(");
assertSortedResults(
"BasicTestTextIns[JAVADOC_METHOD_REF]{{@link javadoc.text.BasicTestTextIns#BasicTestTextIns()}, Ljavadoc.text.BasicTestTextIns;, ()V, BasicTestTextIns, null, "+this.positions+JAVADOC_RELEVANCE_IT+"}"
);
@@ -1181,7 +1181,7 @@ public void test082() throws JavaModelException {
" */\n" +
" BasicTestTextIns(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "#BasicTestTextIns(int, float, java.lang.");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "#BasicTestTextIns(int, float, java.lang.");
assertSortedResults(
"BasicTestTextIns[JAVADOC_METHOD_REF]{{@link #BasicTestTextIns(int, float, Class)}, Ljavadoc.text.BasicTestTextIns;, (IFLjava.lang.Class;)V, BasicTestTextIns, (xxx, real, clazz), "+this.positions+JAVADOC_RELEVANCE_IT+"}"
);
@@ -1198,7 +1198,7 @@ public void test083() throws JavaModelException {
" */\n" +
" BasicTestTextIns(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "#BasicTestTextIns(int, float, java.lang.Cla");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "#BasicTestTextIns(int, float, java.lang.Cla");
assertSortedResults(
"BasicTestTextIns[JAVADOC_METHOD_REF]{{@link #BasicTestTextIns(int, float, Class)}, Ljavadoc.text.BasicTestTextIns;, (IFLjava.lang.Class;)V, BasicTestTextIns, (xxx, real, clazz), "+this.positions+JAVADOC_RELEVANCE_IT+"}"
);
@@ -1216,7 +1216,7 @@ public void test084() throws JavaModelException {
" */\n" +
" BasicTestTextIns(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "#BasicTestTextIns(int, float, Class");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "#BasicTestTextIns(int, float, Class");
assertSortedResults(
"BasicTestTextIns[JAVADOC_METHOD_REF]{{@link #BasicTestTextIns(int, float, Class)}, Ljavadoc.text.BasicTestTextIns;, (IFLjava.lang.Class;)V, BasicTestTextIns, (xxx, real, clazz), "+this.positions+JAVADOC_RELEVANCE_IT+"}"
);
@@ -1234,7 +1234,7 @@ public void test085() throws JavaModelException {
" */\n" +
" BasicTestTextIns(int xxx, float real, Class clazz) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "#BasicTestTextIns(int, float, Class)");
+ completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.js", source, true, "#BasicTestTextIns(int, float, Class)");
assertSortedResults("");
}
}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocTypeCompletionModelTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocTypeCompletionModelTest.java
index 7c86a1a..4ae52c2 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocTypeCompletionModelTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocTypeCompletionModelTest.java
@@ -55,7 +55,7 @@ public void test001() throws JavaModelException {
" * @\n" +
" */\n" +
"public class Test {}\n";
- completeInJavadoc("/Completion/src/javadoc/types/Test.java", source, true, "@");
+ completeInJavadoc("/Completion/src/javadoc/types/Test.js", source, true, "@");
assertResults(
"author[JAVADOC_BLOCK_TAG]{@author, null, null, author, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"deprecated[JAVADOC_BLOCK_TAG]{@deprecated, null, null, deprecated, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
@@ -79,7 +79,7 @@ public void test002() throws JavaModelException {
" * @par\n" +
" */\n" +
"public class Test {}\n";
- completeInJavadoc("/Completion/src/javadoc/types/Test.java", source, true, "@par");
+ completeInJavadoc("/Completion/src/javadoc/types/Test.js", source, true, "@par");
assertResults("");
}
@@ -91,7 +91,7 @@ public void test003() throws JavaModelException {
" * @v\n" +
" */\n" +
"public class Test {}\n";
- completeInJavadoc("/Completion/src/javadoc/types/Test.java", source, true, "@v");
+ completeInJavadoc("/Completion/src/javadoc/types/Test.js", source, true, "@v");
assertResults(
"version[JAVADOC_BLOCK_TAG]{@version, null, null, version, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"value[JAVADOC_INLINE_TAG]{{@value}, null, null, value, null, "+this.positions+JAVADOC_RELEVANCE+"}"
@@ -106,7 +106,7 @@ public void test004() throws JavaModelException {
" * @deprec\n" +
" */\n" +
"public class Test {}\n";
- completeInJavadoc("/Completion/src/javadoc/types/Test.java", source, true, "@deprec");
+ completeInJavadoc("/Completion/src/javadoc/types/Test.js", source, true, "@deprec");
assertResults(
"deprecated[JAVADOC_BLOCK_TAG]{@deprecated, null, null, deprecated, null, "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -120,7 +120,7 @@ public void test005() throws JavaModelException {
" * @link\n" +
" */\n" +
"public class Test {}\n";
- completeInJavadoc("/Completion/src/javadoc/types/Test.java", source, true, "@link");
+ completeInJavadoc("/Completion/src/javadoc/types/Test.js", source, true, "@link");
assertResults(
"link[JAVADOC_INLINE_TAG]{{@link}, null, null, link, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"linkplain[JAVADOC_INLINE_TAG]{{@linkplain}, null, null, linkplain, null, "+this.positions+JAVADOC_RELEVANCE+"}"
@@ -135,7 +135,7 @@ public void test006() throws JavaModelException {
" * @link\n" +
" */\n" +
"public class Test {}\n";
- completeInJavadoc("/Completion/src/javadoc/types/Test.java", source, true, "@li");
+ completeInJavadoc("/Completion/src/javadoc/types/Test.js", source, true, "@li");
assertResults(
"link[JAVADOC_INLINE_TAG]{{@link}, null, null, link, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"linkplain[JAVADOC_INLINE_TAG]{{@linkplain}, null, null, linkplain, null, "+this.positions+JAVADOC_RELEVANCE+"}"
@@ -152,7 +152,7 @@ public void test007() throws JavaModelException {
" */\n" +
"// Note: this test should be done using compliance 1.3\n" +
"public class Test {}\n";
- completeInJavadoc("/Completion/src/javadoc/types/Test.java", source, true, "@");
+ completeInJavadoc("/Completion/src/javadoc/types/Test.js", source, true, "@");
assertResults(
"author[JAVADOC_BLOCK_TAG]{@author, null, null, author, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"deprecated[JAVADOC_BLOCK_TAG]{@deprecated, null, null, deprecated, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
@@ -176,7 +176,7 @@ public void test008() throws JavaModelException {
" */\n" +
"// Note: this test should be done using compliance 1.5\n" +
"public class Test<T> {}\n";
- completeInJavadoc("/Completion/src/javadoc/types/Test.java", source, true, "@");
+ completeInJavadoc("/Completion/src/javadoc/types/Test.js", source, true, "@");
assertResults(
"author[JAVADOC_BLOCK_TAG]{@author, null, null, author, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
"deprecated[JAVADOC_BLOCK_TAG]{@deprecated, null, null, deprecated, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" +
@@ -207,7 +207,7 @@ public void test010() throws JavaModelException {
" */\n" +
"public class BasicTestTypes {\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "Obj");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "Obj");
assertResults(
"Object[TYPE_REF]{Object, java.lang, Ljava.lang.Object;, null, null, "+this.positions+R_DICUNR+"}"
);
@@ -222,7 +222,7 @@ public void test011() throws JavaModelException {
" */\n" +
"public class BasicTestTypes {\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "BasicTest");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "BasicTest");
assertResults(
"BasicTestTypes[TYPE_REF]{BasicTestTypes, javadoc.types.tags, Ljavadoc.types.tags.BasicTestTypes;, null, null, "+this.positions+R_DICUNR+"}\n" +
"BasicTestReferences[TYPE_REF]{org.eclipse.wst.jsdt.core.tests.BasicTestReferences, org.eclipse.wst.jsdt.core.tests, Lorg.eclipse.wst.jsdt.core.tests.BasicTestReferences;, null, null, "+this.positions+R_DICNR+"}"
@@ -238,7 +238,7 @@ public void test012() throws JavaModelException {
" */\n" +
"public class BasicTestTypes {\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "BasicTest");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "BasicTest");
assertResults(
"BasicTestTypes[TYPE_REF]{BasicTestTypes, javadoc.types.tags, Ljavadoc.types.tags.BasicTestTypes;, null, null, "+this.positions+R_DICUNR+"}\n" +
"BasicTestReferences[TYPE_REF]{org.eclipse.wst.jsdt.core.tests.BasicTestReferences, org.eclipse.wst.jsdt.core.tests, Lorg.eclipse.wst.jsdt.core.tests.BasicTestReferences;, null, null, "+this.positions+R_DICNR+"}"
@@ -255,7 +255,7 @@ public void test013() throws JavaModelException {
" */\n" +
"public class BasicTestTypes<TPARAM> {\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "BasicTest");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "BasicTest");
assertResults(
"BasicTestTypes<TPARAM>[TYPE_REF]{BasicTestTypes, javadoc.types.tags, Ljavadoc.types.tags.BasicTestTypes<TTPARAM;>;, null, null, "+this.positions+R_DICUNR+"}\n" +
"BasicTestReferences[TYPE_REF]{org.eclipse.wst.jsdt.core.tests.BasicTestReferences, org.eclipse.wst.jsdt.core.tests, Lorg.eclipse.wst.jsdt.core.tests.BasicTestReferences;, null, null, "+this.positions+R_DICNR+"}"
@@ -272,7 +272,7 @@ public void test014() throws JavaModelException {
" */\n" +
"public class BasicTestTypes {\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "javadoc.types.tags.BasicTest");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "javadoc.types.tags.BasicTest");
assertResults(
"BasicTestTypes[TYPE_REF]{BasicTestTypes, javadoc.types.tags, Ljavadoc.types.tags.BasicTestTypes;, null, null, "+this.positions+R_DICNR+"}"
);
@@ -289,7 +289,7 @@ public void test015() throws JavaModelException {
" */\n" +
"public class BasicTestTypes<TPARAM> {\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "javadoc.types.tags.BasicTest");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "javadoc.types.tags.BasicTest");
assertResults(
"BasicTestTypes<TPARAM>[TYPE_REF]{BasicTestTypes, javadoc.types.tags, Ljavadoc.types.tags.BasicTestTypes<TTPARAM;>;, null, null, "+this.positions+R_DICNR+"}"
);
@@ -305,7 +305,7 @@ public void test016() throws JavaModelException {
" */\n" +
"public class BasicTestTypes {\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "java.la");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "java.la");
assertResults(
"java.lang[PACKAGE_REF]{java.lang, java.lang, null, null, null, "+this.positions+R_DICQNR+"}"
);
@@ -321,7 +321,7 @@ public void test017() throws JavaModelException {
" */\n" +
"public class BasicTestTypes {\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "java.la");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "java.la");
assertResults(
"java.lang[PACKAGE_REF]{java.lang, java.lang, null, null, null, "+this.positions+R_DICQNR+"}"
);
@@ -336,7 +336,7 @@ public void test018() throws JavaModelException {
" */\n" +
"public class BasicTestTypes {\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "pack.Bin");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "pack.Bin");
assertSortedResults(
"Bin1[TYPE_REF]{pack.Bin1, pack, Lpack.Bin1;, null, null, "+this.positions+R_DICQNR+"}\n" +
"Bin2[TYPE_REF]{pack.Bin2, pack, Lpack.Bin2;, null, null, "+this.positions+R_DICQNR+"}\n" +
@@ -353,7 +353,7 @@ public void test019() throws JavaModelException {
" */\n" +
"public class BasicTestTypes {\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "pack.Bin");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "pack.Bin");
assertSortedResults(
"Bin1[TYPE_REF]{pack.Bin1, pack, Lpack.Bin1;, null, null, "+this.positions+R_DICQNR+"}\n" +
"Bin2[TYPE_REF]{pack.Bin2, pack, Lpack.Bin2;, null, null, "+this.positions+R_DICQNR+"}\n" +
@@ -370,7 +370,7 @@ public void test020() throws JavaModelException {
" */\n" +
"public class BasicTestTypes {\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "pack.Bin2");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "pack.Bin2");
assertSortedResults(
"Bin2[TYPE_REF]{pack.Bin2, pack, Lpack.Bin2;, null, null, "+this.positions+R_DICENQNR+"}"
);
@@ -386,7 +386,7 @@ public void test021() throws JavaModelException {
" */\n" +
"public class BasicTestTypes {\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "I");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "I");
assertSortedResults(
"IllegalMonitorStateException[TYPE_REF]{IllegalMonitorStateException, java.lang, Ljava.lang.IllegalMonitorStateException;, null, null, "+this.positions+R_DICUNR+"}\n" +
"InterruptedException[TYPE_REF]{InterruptedException, java.lang, Ljava.lang.InterruptedException;, null, null, "+this.positions+R_DICUNR+"}"
@@ -403,7 +403,7 @@ public void test022() throws JavaModelException {
" */\n" +
"public class BasicTestTypes {\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "java.lang.");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "java.lang.");
assertSortedResults(
"java.lang.annotation[PACKAGE_REF]{java.lang.annotation, java.lang.annotation, null, null, null, "+this.positions+R_DICQNR+"}\n" +
"CharSequence[TYPE_REF]{CharSequence, java.lang, Ljava.lang.CharSequence;, null, null, "+this.positions+R_DICNR+"}\n" +
@@ -431,7 +431,7 @@ public void test023() throws JavaModelException {
" */\n" +
"public class BasicTestTypes {\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "java.");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "java.");
assertResults(
"java.lang[PACKAGE_REF]{java.lang, java.lang, null, null, null, "+this.positions+R_DICQNR+"}\n" +
"java.io[PACKAGE_REF]{java.io, java.io, null, null, null, "+this.positions+R_DICQNR+"}"
@@ -448,7 +448,7 @@ public void test024() throws JavaModelException {
" */\n" +
"public class BasicTestTypes {\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "java.");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "java.");
assertResults(
"java.lang.annotation[PACKAGE_REF]{java.lang.annotation, java.lang.annotation, null, null, null, "+this.positions+R_DICQNR+"}\n" +
"java.lang[PACKAGE_REF]{java.lang, java.lang, null, null, null, "+this.positions+R_DICQNR+"}\n" +
@@ -465,7 +465,7 @@ public void test025() throws JavaModelException {
" */\n" +
"public class BasicTestTypes {\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "java.lang.");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "java.lang.");
assertSortedResults(
"Class[TYPE_REF]{Class, java.lang, Ljava.lang.Class;, null, null, "+this.positions+R_DICNR+"}\n" +
"CloneNotSupportedException[TYPE_REF]{CloneNotSupportedException, java.lang, Ljava.lang.CloneNotSupportedException;, null, null, "+this.positions+R_DICNR+"}\n" +
@@ -489,7 +489,7 @@ public void test026() throws JavaModelException {
" */\n" +
"public class BasicTestTypes {\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "java.lang.Ob");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "java.lang.Ob");
assertResults(
"Object[TYPE_REF]{Object, java.lang, Ljava.lang.Object;, null, null, "+this.positions+R_DICNR+"}"
);
@@ -509,7 +509,7 @@ public void test030() throws JavaModelException {
" class BasicTestTypesMember {}\n" +
"}\n" +
"class BasicTestTypesTestSecondary {}";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "BasicTestTypesM");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "BasicTestTypesM");
assertResults(
"BasicTestTypes.BasicTestTypesMember[TYPE_REF]{BasicTestTypesMember, javadoc.types.tags, Ljavadoc.types.tags.BasicTestTypes$BasicTestTypesMember;, null, null, "+this.positions+R_DICUNR+"}"
);
@@ -526,7 +526,7 @@ public void test031() throws JavaModelException {
" class BasicTestTypesMember {}\n" +
"}\n" +
"class BasicTestTypesSecondary {}";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "BasicTestTypesM");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "BasicTestTypesM");
assertResults(
"BasicTestTypes.BasicTestTypesMember[TYPE_REF]{BasicTestTypesMember, javadoc.types.tags, Ljavadoc.types.tags.BasicTestTypes$BasicTestTypesMember;, null, null, "+this.positions+R_DICUNR+"}"
);
@@ -543,7 +543,7 @@ public void test032() throws JavaModelException {
" class BasicTestTypesMember {}\n" +
"}\n" +
"class BasicTestTypesSecondary {}";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "BasicTestTypesM");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "BasicTestTypesM");
assertResults(
"BasicTestTypes.BasicTestTypesMember[TYPE_REF]{BasicTestTypesMember, javadoc.types.tags, Ljavadoc.types.tags.BasicTestTypes$BasicTestTypesMember;, null, null, "+this.positions+R_DICNR+"}"
);
@@ -560,7 +560,7 @@ public void test033() throws JavaModelException {
" class BasicTestTypesMember {}\n" +
"}\n" +
"class BasicTestTypesSecondary {}";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "BasicTestTypesM");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "BasicTestTypesM");
assertResults(
"BasicTestTypes.BasicTestTypesMember[TYPE_REF]{BasicTestTypesMember, javadoc.types.tags, Ljavadoc.types.tags.BasicTestTypes$BasicTestTypesMember;, null, null, "+this.positions+R_DICNR+"}"
);
@@ -576,7 +576,7 @@ public void test034() throws JavaModelException {
"public class BasicTestTypes {\n" +
"}\n" +
"class BasicTestTypesSecondary {}";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "BasicTestTypesS");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "BasicTestTypesS");
assertResults(
"BasicTestTypesSecondary[TYPE_REF]{BasicTestTypesSecondary, javadoc.types.tags, Ljavadoc.types.tags.BasicTestTypesSecondary;, null, null, "+this.positions+R_DICUNR+"}"
);
@@ -592,7 +592,7 @@ public void test035() throws JavaModelException {
"public class BasicTestTypes {\n" +
"}\n" +
"class BasicTestTypesSecondary {}";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "javadoc.types.tags.BasicTestTypesS");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "javadoc.types.tags.BasicTestTypesS");
assertResults(
"BasicTestTypesSecondary[TYPE_REF]{BasicTestTypesSecondary, javadoc.types.tags, Ljavadoc.types.tags.BasicTestTypesSecondary;, null, null, "+this.positions+R_DICNR+"}"
);
@@ -608,7 +608,7 @@ public void test036() throws JavaModelException {
"public class BasicTestTypes {\n" +
"}\n" +
"class BasicTestTypesSecondary {}";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "javadoc.types.tags.BasicTestTypesS");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "javadoc.types.tags.BasicTestTypesS");
assertResults(
"BasicTestTypesSecondary[TYPE_REF]{BasicTestTypesSecondary, javadoc.types.tags, Ljavadoc.types.tags.BasicTestTypesSecondary;, null, null, "+this.positions+R_DICNR+"}"
);
@@ -624,7 +624,7 @@ public void test037() throws JavaModelException {
"public class BasicTestTypes {\n" +
"}\n" +
"class BasicTestTypesSecondary {}";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "javadoc.types.tags.BasicTestTypes.BasicTestTypes");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "javadoc.types.tags.BasicTestTypes.BasicTestTypes");
assertResults("");
}
@@ -642,7 +642,7 @@ public void test040() throws JavaModelException {
" */\n" +
"public class BasicTestTypes {\n" +
"}";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "FIE");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "FIE");
assertResults("");
}
@@ -655,7 +655,7 @@ public void test041() throws JavaModelException {
" */\n" +
"public class BasicTestTypes {\n" +
"}";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "FIE");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "FIE");
assertResults(
"FIELD[FIELD_REF]{FIELD, Lorg.eclipse.wst.jsdt.core.tests.BasicTestReferences;, I, FIELD, null, "+this.positions+R_DICNR+"}"
);
@@ -670,7 +670,7 @@ public void test042() throws JavaModelException {
" */\n" +
"public class BasicTestTypes {\n" +
"}";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "FIE");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "FIE");
assertResults(
"FIELD[FIELD_REF]{FIELD, Lorg.eclipse.wst.jsdt.core.tests.BasicTestReferences;, I, FIELD, null, "+this.positions+R_DICNR+"}"
);
@@ -686,7 +686,7 @@ public void test043() throws JavaModelException {
"public class BasicTestTypes {\n" +
" int foo;\n" +
"}";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "fo");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "fo");
assertResults(
"foo[FIELD_REF]{foo, Ljavadoc.types.tags.BasicTestTypes;, I, foo, null, "+this.positions+R_DICNRNS+"}"
);
@@ -702,7 +702,7 @@ public void test044() throws JavaModelException {
"public class BasicTestTypes {\n" +
" int foo;\n" +
"}";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "fo");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "fo");
assertResults(
"foo[FIELD_REF]{foo, Ljavadoc.types.tags.BasicTestTypes;, I, foo, null, "+this.positions+R_DICNRNS+"}"
);
@@ -710,7 +710,7 @@ public void test044() throws JavaModelException {
public void test045() throws JavaModelException {
String[] sources = {
- "/Completion/src/javadoc/types/tags/BasicTestTypes.java",
+ "/Completion/src/javadoc/types/tags/BasicTestTypes.js",
"package javadoc.types.tags;\n" +
"/**\n" +
" * Completion after:\n" +
@@ -718,7 +718,7 @@ public void test045() throws JavaModelException {
" */\n" +
"public class BasicTestTypes {\n" +
"}",
- "/Completion/src/javadoc/types/tags/OtherTypes.java",
+ "/Completion/src/javadoc/types/tags/OtherTypes.js",
"package javadoc.types.tags;\n" +
"public class OtherTypes {\n" +
" int foo;\n" +
@@ -746,7 +746,7 @@ public void test050() throws JavaModelException {
" void method() {}\n" +
" void paramMethod(String str, int x, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "meth");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "meth");
assertResults("");
}
@@ -762,13 +762,13 @@ public void test051() throws JavaModelException {
" void method() {}\n" +
" void paramMethod(String str, int x, Object obj) {}\n" +
"}\n";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "unknown");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "unknown");
assertResults("");
}
public void test052() throws JavaModelException {
String[] sources = {
- "/Completion/src/javadoc/types/tags/BasicTestTypes.java",
+ "/Completion/src/javadoc/types/tags/BasicTestTypes.js",
"package javadoc.types.tags;\n" +
"/**\n" +
" * Completion after:\n" +
@@ -776,7 +776,7 @@ public void test052() throws JavaModelException {
" */\n" +
"public class BasicTestTypes {\n" +
"}",
- "/Completion/src/javadoc/types/tags/OtherTypes.java",
+ "/Completion/src/javadoc/types/tags/OtherTypes.js",
"package javadoc.types.tags;\n" +
"public class OtherTypes {\n" +
" void method() {};\n" +
@@ -790,7 +790,7 @@ public void test052() throws JavaModelException {
public void test053() throws JavaModelException {
String[] sources = {
- "/Completion/src/javadoc/types/tags/BasicTestTypes.java",
+ "/Completion/src/javadoc/types/tags/BasicTestTypes.js",
"package javadoc.types.tags;\n" +
"/**\n" +
" * Completion after:\n" +
@@ -798,7 +798,7 @@ public void test053() throws JavaModelException {
" */\n" +
"public class BasicTestTypes {\n" +
"}",
- "/Completion/src/javadoc/types/tags/OtherTypes.java",
+ "/Completion/src/javadoc/types/tags/OtherTypes.js",
"package javadoc.types.tags;\n" +
"public class OtherTypes {\n" +
" void method() {};\n" +
@@ -822,7 +822,7 @@ public void test060() throws JavaModelException {
" * @param \n" +
" */\n" +
"public class BasicTestTypes<TPARAM> {}\n";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "@param ", 0); // empty token
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "@param ", 0); // empty token
assertResults(
"TPARAM[JAVADOC_PARAM_REF]{<TPARAM>, null, null, TPARAM, null, "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -839,7 +839,7 @@ public void test061() throws JavaModelException {
" * JDT/UI fails on this one (no proposal)\n" +
" */\n" +
"public class BasicTestTypes<TPARAM> {}\n";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "<");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "<");
assertResults(
"TPARAM[JAVADOC_PARAM_REF]{<TPARAM>, null, null, TPARAM, null, "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -856,7 +856,7 @@ public void test062() throws JavaModelException {
" * JDT/UI fails on this one (no proposal)\n" +
" */\n" +
"public class BasicTestTypes<TPARAM> {}\n";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "<TPA");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "<TPA");
assertResults(
"TPARAM[JAVADOC_PARAM_REF]{<TPARAM>, null, null, TPARAM, null, "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -873,7 +873,7 @@ public void test063() throws JavaModelException {
" * JDT/UI fails on this one (no proposal)\n" +
" */\n" +
"public class BasicTestTypes<TPARAM> {}\n";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "<TPA");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "<TPA");
assertResults(
"TPARAM[JAVADOC_PARAM_REF]{<TPARAM>, null, null, TPARAM, null, "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -890,7 +890,7 @@ public void test064() throws JavaModelException {
" * JDT/UI fails on this one (no proposal)\n" +
" */\n" +
"public class BasicTestTypes<TPARAM> {}\n";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "<TPARAM");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "<TPARAM");
assertResults(
"TPARAM[JAVADOC_PARAM_REF]{<TPARAM>, null, null, TPARAM, null, "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -907,7 +907,7 @@ public void test065() throws JavaModelException {
" * JDT/UI fails on this one (no proposal)\n" +
" */\n" +
"public class BasicTestTypes<TPARAM> {}\n";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "<TPARAM");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "<TPARAM");
assertResults(
"TPARAM[JAVADOC_PARAM_REF]{<TPARAM>, null, null, TPARAM, null, "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -924,7 +924,7 @@ public void test066() throws JavaModelException {
" * JDT/UI fails on this one (no proposal)\n" +
" */\n" +
"public class BasicTestTypes<TPARAM> {}\n";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "<TPARAM>");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "<TPARAM>");
assertResults(
"TPARAM[JAVADOC_PARAM_REF]{<TPARAM>, null, null, TPARAM, null, "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -940,7 +940,7 @@ public void test067() throws JavaModelException {
" * @param <T1>\n" +
" */\n" +
"public class BasicTestTypes<T1, T2, T3> {}\n";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "<T1>");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "<T1>");
assertResults("");
}
@@ -954,7 +954,7 @@ public void test068() throws JavaModelException {
" * @param <T1>\n" +
" */\n" +
"public class BasicTestTypes<T1, T2, T3> {}\n";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "<T1>", 2); //2nd position
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "<T1>", 2); //2nd position
assertResults("");
}
@@ -969,7 +969,7 @@ public void test069() throws JavaModelException {
" * @param <T3>\n" +
" */\n" +
"public class BasicTestTypes<T1, T2, T3> {}\n";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "** @param ", 0); // empty token
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "** @param ", 0); // empty token
assertResults(
"T2[JAVADOC_PARAM_REF]{<T2>, null, null, T2, null, "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -986,7 +986,7 @@ public void test070() throws JavaModelException {
" * @param <T3>\n" +
" */\n" +
"public class BasicTestTypes<T1, T2, T3> {}\n";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "<T", 3); // 3rd position
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "<T", 3); // 3rd position
assertResults(
"T3[JAVADOC_PARAM_REF]{<T3>, null, null, T3, null, "+this.positions+JAVADOC_RELEVANCE+"}"
);
@@ -1004,7 +1004,7 @@ public void test071() throws JavaModelException {
" ** @param \n" +
" */\n" +
"public class BasicTestTypes<T1, T2, T3> {}\n";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "** @param ", 0); // empty token
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "** @param ", 0); // empty token
assertResults("");
}
@@ -1025,7 +1025,7 @@ public void test080() throws JavaModelException {
" * @see BTT\n" +
" */\n" +
"public class BasicTestTypes {}\n";
- completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.java", source, true, "BTT");
+ completeInJavadoc("/Completion/src/javadoc/types/tags/BasicTestTypes.js", source, true, "BTT");
assertResults("BasicTestTypes[TYPE_REF]{BasicTestTypes, javadoc.types.tags, Ljavadoc.types.tags.BasicTestTypes;, null, null, "+this.positions+"16}");
} finally {
JavaCore.setOptions(oldOptions);
@@ -1043,7 +1043,7 @@ public void test100() throws JavaModelException {
" */\n" +
"public class ZBasicTestTypes {}\n";
completeInJavadoc(
- "/Completion/src/javadoc/types/ZBasicTestTypes.java",
+ "/Completion/src/javadoc/types/ZBasicTestTypes.js",
source,
true,
"ZBasi",
@@ -1063,7 +1063,7 @@ public void test101() throws JavaModelException {
" */\n" +
"public class ZBasicTestTypes {}\n";
completeInJavadoc(
- "/Completion/src/javadoc/types/ZBasicTestTypes.java",
+ "/Completion/src/javadoc/types/ZBasicTestTypes.js",
source,
true,
"ZBasi",
@@ -1082,7 +1082,7 @@ public void test102() throws JavaModelException {
" */\n" +
"public class ZBasicTestTypes {}\n";
completeInJavadoc(
- "/Completion/src/javadoc/types/ZBasicTestTypes.java",
+ "/Completion/src/javadoc/types/ZBasicTestTypes.js",
source,
true,
"ZBasi",
@@ -1103,7 +1103,7 @@ public void test103() throws JavaModelException {
" public void foo() {}\n" +
"}\n";
completeInJavadoc(
- "/Completion/src/javadoc/types/ZBasicTestTypes.java",
+ "/Completion/src/javadoc/types/ZBasicTestTypes.js",
source,
true,
"ZBasicTestTypes#fo",
@@ -1124,7 +1124,7 @@ public void test104() throws JavaModelException {
" public void foo() {}\n" +
"}\n";
completeInJavadoc(
- "/Completion/src/javadoc/types/ZBasicTestTypes.java",
+ "/Completion/src/javadoc/types/ZBasicTestTypes.js",
source,
true,
"ZBasicTestTypes#fo",
@@ -1145,7 +1145,7 @@ public void test105() throws JavaModelException {
" public void foo() {}\n" +
"}\n";
completeInJavadoc(
- "/Completion/src/javadoc/types/ZBasicTestTypes.java",
+ "/Completion/src/javadoc/types/ZBasicTestTypes.js",
source,
true,
"ZBasicTestTypes#fo",
@@ -1166,7 +1166,7 @@ public void test106() throws JavaModelException {
" public int foo;\n" +
"}\n";
completeInJavadoc(
- "/Completion/src/javadoc/types/ZBasicTestTypes.java",
+ "/Completion/src/javadoc/types/ZBasicTestTypes.js",
source,
true,
"ZBasicTestTypes#fo",
@@ -1187,7 +1187,7 @@ public void test107() throws JavaModelException {
" public int foo;\n" +
"}\n";
completeInJavadoc(
- "/Completion/src/javadoc/types/ZBasicTestTypes.java",
+ "/Completion/src/javadoc/types/ZBasicTestTypes.js",
source,
true,
"ZBasicTestTypes#fo",
@@ -1208,7 +1208,7 @@ public void test108() throws JavaModelException {
" public int foo;\n" +
"}\n";
completeInJavadoc(
- "/Completion/src/javadoc/types/ZBasicTestTypes.java",
+ "/Completion/src/javadoc/types/ZBasicTestTypes.js",
source,
true,
"ZBasicTestTypes#fo",
@@ -1227,7 +1227,7 @@ public void test109() throws JavaModelException {
" */\n" +
"public class ZBasicTestTypes {}\n";
completeInJavadoc(
- "/Completion/src/javadoc/types/ZBasicTestTypes.java",
+ "/Completion/src/javadoc/types/ZBasicTestTypes.js",
source,
true,
"javadoc.types.ZBasi",
@@ -1247,7 +1247,7 @@ public void test110() throws JavaModelException {
" */\n" +
"public class ZBasicTestTypes {}\n";
completeInJavadoc(
- "/Completion/src/javadoc/types/ZBasicTestTypes.java",
+ "/Completion/src/javadoc/types/ZBasicTestTypes.js",
source,
true,
"javadoc.types.ZBasi",
@@ -1266,7 +1266,7 @@ public void test111() throws JavaModelException {
" */\n" +
"public class ZBasicTestTypes {}\n";
completeInJavadoc(
- "/Completion/src/javadoc/types/ZBasicTestTypes.java",
+ "/Completion/src/javadoc/types/ZBasicTestTypes.js",
source,
true,
"javadoc.types.ZBasi",
@@ -1287,7 +1287,7 @@ public void test112() throws JavaModelException {
" public class Inner {}\n" +
"}\n";
completeInJavadoc(
- "/Completion/src/javadoc/types/ZBasicTestTypes.java",
+ "/Completion/src/javadoc/types/ZBasicTestTypes.js",
source,
true,
"javadoc.types.ZBasicTestTypes.Inn",
@@ -1309,7 +1309,7 @@ public void test113() throws JavaModelException {
" public class Inner {}\n" +
"}\n";
completeInJavadoc(
- "/Completion/src/javadoc/types/ZBasicTestTypes.java",
+ "/Completion/src/javadoc/types/ZBasicTestTypes.js",
source,
true,
"javadoc.types.ZBasicTestTypes.Inn",
@@ -1330,7 +1330,7 @@ public void test114() throws JavaModelException {
" public class Inner {}\n" +
"}\n";
completeInJavadoc(
- "/Completion/src/javadoc/types/ZBasicTestTypes.java",
+ "/Completion/src/javadoc/types/ZBasicTestTypes.js",
source,
true,
"javadoc.types.ZBasicTestTypes.Inn",
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/LocalElementTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/LocalElementTests.java
index dd4cfa8..3611f29 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/LocalElementTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/LocalElementTests.java
@@ -51,7 +51,7 @@ public class LocalElementTests extends ModifyingResourceTests {
public void testAnonymousType1() throws CoreException {
try {
createFile(
- "/P/X.java",
+ "/P/X.js",
"public class X {\n" +
" void foo() {\n" +
" run(new X() {\n" +
@@ -61,7 +61,7 @@ public class LocalElementTests extends ModifyingResourceTests {
" }\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("/P/X.java");
+ ICompilationUnit cu = getCompilationUnit("/P/X.js");
assertElementDescendants(
"Unexpected compilation unit contents",
"X.java\n" +
@@ -71,7 +71,7 @@ public class LocalElementTests extends ModifyingResourceTests {
" void run(X)",
cu);
} finally {
- deleteFile("/P/X.java");
+ deleteFile("/P/X.js");
}
}
@@ -81,7 +81,7 @@ public class LocalElementTests extends ModifyingResourceTests {
public void testAnonymousType2() throws CoreException {
try {
createFile(
- "/P/X.java",
+ "/P/X.js",
"public class X {\n" +
" public class Y {\n" +
" }\n" +
@@ -95,7 +95,7 @@ public class LocalElementTests extends ModifyingResourceTests {
" }\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("/P/X.java");
+ ICompilationUnit cu = getCompilationUnit("/P/X.js");
assertElementDescendants(
"Unexpected compilation unit contents",
"X.java\n" +
@@ -107,7 +107,7 @@ public class LocalElementTests extends ModifyingResourceTests {
" void run(X)",
cu);
} finally {
- deleteFile("/P/X.java");
+ deleteFile("/P/X.js");
}
}
@@ -117,7 +117,7 @@ public class LocalElementTests extends ModifyingResourceTests {
public void testAnonymousType3() throws CoreException {
try {
createFile(
- "/P/X.java",
+ "/P/X.js",
"public class X {\n" +
" void foo() {\n" +
" run(new X() {\n" +
@@ -131,7 +131,7 @@ public class LocalElementTests extends ModifyingResourceTests {
" }\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("/P/X.java");
+ ICompilationUnit cu = getCompilationUnit("/P/X.js");
assertElementDescendants(
"Unexpected compilation unit contents",
"X.java\n" +
@@ -143,7 +143,7 @@ public class LocalElementTests extends ModifyingResourceTests {
" void run(X)",
cu);
} finally {
- deleteFile("/P/X.java");
+ deleteFile("/P/X.js");
}
}
@@ -153,7 +153,7 @@ public class LocalElementTests extends ModifyingResourceTests {
public void testAnonymousType4() throws CoreException {
try {
createFile(
- "/P/X.java",
+ "/P/X.js",
"public class X {\n" +
" {\n" +
" field = new Vector() {\n" +
@@ -169,7 +169,7 @@ public class LocalElementTests extends ModifyingResourceTests {
" }\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("/P/X.java");
+ ICompilationUnit cu = getCompilationUnit("/P/X.js");
assertElementDescendants(
"Unexpected compilation unit contents",
"X.java\n" +
@@ -183,7 +183,7 @@ public class LocalElementTests extends ModifyingResourceTests {
" void run(X)",
cu);
} finally {
- deleteFile("/P/X.java");
+ deleteFile("/P/X.js");
}
}
@@ -194,7 +194,7 @@ public class LocalElementTests extends ModifyingResourceTests {
public void testAnonymousType5() throws CoreException {
try {
createFile(
- "/P/X.java",
+ "/P/X.js",
"public class X {\n" +
" X(Object o) {\n" +
" }\n" +
@@ -205,7 +205,7 @@ public class LocalElementTests extends ModifyingResourceTests {
" }\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("/P/X.java");
+ ICompilationUnit cu = getCompilationUnit("/P/X.js");
assertElementDescendants(
"Unexpected compilation unit contents",
"X.java\n" +
@@ -216,7 +216,7 @@ public class LocalElementTests extends ModifyingResourceTests {
" class <anonymous #1>",
cu);
} finally {
- deleteFile("/P/X.java");
+ deleteFile("/P/X.js");
}
}
@@ -228,12 +228,12 @@ public class LocalElementTests extends ModifyingResourceTests {
try {
createJavaProject("P15", new String[] {""}, new String[] {"JCL15_LIB"}, "", "1.5");
createFile(
- "/P15/En.java",
+ "/P15/En.js",
"public enum En {\n" +
" CONST() {};\n" +
"}"
);
- IType type = getCompilationUnit("/P15/En.java").getType("En").getField("CONST").getType("", 1);
+ IType type = getCompilationUnit("/P15/En.js").getType("En").getField("CONST").getType("", 1);
assertTrue("Should be a local type", type.isLocal());
} finally {
deleteProject("P15");
@@ -247,7 +247,7 @@ public class LocalElementTests extends ModifyingResourceTests {
public void testAnonymousType7() throws CoreException {
try {
createFile(
- "/P/X.java",
+ "/P/X.js",
"public class X {\n" +
" class Y {\n" +
" }\n" +
@@ -263,7 +263,7 @@ public class LocalElementTests extends ModifyingResourceTests {
" }\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("/P/X.java");
+ ICompilationUnit cu = getCompilationUnit("/P/X.js");
assertElementDescendants(
"Unexpected compilation unit contents",
"X.java\n" +
@@ -276,7 +276,7 @@ public class LocalElementTests extends ModifyingResourceTests {
" class <anonymous #1>",
cu);
} finally {
- deleteFile("/P/X.java");
+ deleteFile("/P/X.js");
}
}
@@ -286,7 +286,7 @@ public class LocalElementTests extends ModifyingResourceTests {
public void testGetSuperclassName() throws CoreException {
try {
createFile(
- "/P/X.java",
+ "/P/X.js",
"public class X {\n" +
" void foo() {\n" +
" run(new X() {\n" +
@@ -296,14 +296,14 @@ public class LocalElementTests extends ModifyingResourceTests {
" }\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("/P/X.java");
+ ICompilationUnit cu = getCompilationUnit("/P/X.js");
IType type = cu.getType("X").getMethod("foo", new String[0]).getType("", 1);
assertEquals(
"Unexpected superclass name",
"X",
type.getSuperclassName());
} finally {
- deleteFile("/P/X.java");
+ deleteFile("/P/X.js");
}
}
@@ -311,7 +311,7 @@ public class LocalElementTests extends ModifyingResourceTests {
* IMember.getType(...) test
*/
public void testGetType() {
- ICompilationUnit cu = getCompilationUnit("P/X.java");
+ ICompilationUnit cu = getCompilationUnit("P/X.js");
IType topLevelType = cu.getType("X");
IJavaElement[] types = new IJavaElement[5];
types[0] = topLevelType.getInitializer(1).getType("", 1);
@@ -335,7 +335,7 @@ public class LocalElementTests extends ModifyingResourceTests {
public void testLocalType1() throws CoreException {
try {
createFile(
- "/P/X.java",
+ "/P/X.js",
"public class X {\n" +
" void foo() {\n" +
" class Y {\n" +
@@ -343,7 +343,7 @@ public class LocalElementTests extends ModifyingResourceTests {
" }\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("/P/X.java");
+ ICompilationUnit cu = getCompilationUnit("/P/X.js");
assertElementDescendants(
"Unexpected compilation unit contents",
"X.java\n" +
@@ -352,7 +352,7 @@ public class LocalElementTests extends ModifyingResourceTests {
" class Y",
cu);
} finally {
- deleteFile("/P/X.java");
+ deleteFile("/P/X.js");
}
}
@@ -362,7 +362,7 @@ public class LocalElementTests extends ModifyingResourceTests {
public void testLocalType2() throws CoreException {
try {
createFile(
- "/P/X.java",
+ "/P/X.js",
"public class X {\n" +
" void foo() {\n" +
" class Y {\n" +
@@ -372,7 +372,7 @@ public class LocalElementTests extends ModifyingResourceTests {
" }\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("/P/X.java");
+ ICompilationUnit cu = getCompilationUnit("/P/X.js");
assertElementDescendants(
"Unexpected compilation unit contents",
"X.java\n" +
@@ -382,7 +382,7 @@ public class LocalElementTests extends ModifyingResourceTests {
" class Z",
cu);
} finally {
- deleteFile("/P/X.java");
+ deleteFile("/P/X.js");
}
}
@@ -392,7 +392,7 @@ public class LocalElementTests extends ModifyingResourceTests {
public void testLocalType3() throws CoreException {
try {
createFile(
- "/P/X.java",
+ "/P/X.js",
"public class X {\n" +
" void foo() {\n" +
" class Y {\n" +
@@ -404,7 +404,7 @@ public class LocalElementTests extends ModifyingResourceTests {
" }\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("/P/X.java");
+ ICompilationUnit cu = getCompilationUnit("/P/X.js");
assertElementDescendants(
"Unexpected compilation unit contents",
"X.java\n" +
@@ -415,7 +415,7 @@ public class LocalElementTests extends ModifyingResourceTests {
" class Z",
cu);
} finally {
- deleteFile("/P/X.java");
+ deleteFile("/P/X.js");
}
}
@@ -425,7 +425,7 @@ public class LocalElementTests extends ModifyingResourceTests {
public void testLocalType4() throws CoreException {
try {
createFile(
- "/P/X.java",
+ "/P/X.js",
"public class X {\n" +
" {\n" +
" class Y {\n" +
@@ -437,7 +437,7 @@ public class LocalElementTests extends ModifyingResourceTests {
" }\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("/P/X.java");
+ ICompilationUnit cu = getCompilationUnit("/P/X.js");
assertElementDescendants(
"Unexpected compilation unit contents",
"X.java\n" +
@@ -448,7 +448,7 @@ public class LocalElementTests extends ModifyingResourceTests {
" class Z",
cu);
} finally {
- deleteFile("/P/X.java");
+ deleteFile("/P/X.js");
}
}
@@ -458,7 +458,7 @@ public class LocalElementTests extends ModifyingResourceTests {
public void testLocalType5() throws CoreException {
try {
createFile(
- "/P/X.java",
+ "/P/X.js",
"public class X {\n" +
" void foo() {\n" +
" class Z {\n" +
@@ -467,7 +467,7 @@ public class LocalElementTests extends ModifyingResourceTests {
" }\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("/P/X.java");
+ ICompilationUnit cu = getCompilationUnit("/P/X.js");
assertElementDescendants(
"Unexpected compilation unit contents",
"X.java\n" +
@@ -476,7 +476,7 @@ public class LocalElementTests extends ModifyingResourceTests {
" class Z",
cu);
} finally {
- deleteFile("/P/X.java");
+ deleteFile("/P/X.js");
}
}
@@ -484,7 +484,7 @@ public class LocalElementTests extends ModifyingResourceTests {
public void _testLocalType6() throws CoreException {
try {
createFile(
- "/P/X.java",
+ "/P/X.js",
"public class X {\n" +
" void foo() {\n" +
" class Y {\n" +
@@ -496,7 +496,7 @@ public class LocalElementTests extends ModifyingResourceTests {
" }\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("/P/X.java");
+ ICompilationUnit cu = getCompilationUnit("/P/X.js");
assertElementDescendants(
"Unexpected compilation unit contents",
"X.java\n" +
@@ -507,7 +507,7 @@ public class LocalElementTests extends ModifyingResourceTests {
" class Z",
cu);
} finally {
- deleteFile("/P/X.java");
+ deleteFile("/P/X.js");
}
}
@@ -515,7 +515,7 @@ public class LocalElementTests extends ModifyingResourceTests {
public void _testLocalType7() throws CoreException {
try {
createFile(
- "/P/X.java",
+ "/P/X.js",
"public class X {\n" +
" void foo() {\n" +
" class Y {\n" +
@@ -528,7 +528,7 @@ public class LocalElementTests extends ModifyingResourceTests {
" }\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("/P/X.java");
+ ICompilationUnit cu = getCompilationUnit("/P/X.js");
assertElementDescendants(
"Unexpected compilation unit contents",
"X.java\n" +
@@ -540,7 +540,7 @@ public class LocalElementTests extends ModifyingResourceTests {
" String s",
cu);
} finally {
- deleteFile("/P/X.java");
+ deleteFile("/P/X.js");
}
}
@@ -548,7 +548,7 @@ public class LocalElementTests extends ModifyingResourceTests {
public void _testLocalType8() throws CoreException {
try {
createFile(
- "/P/X.java",
+ "/P/X.js",
"public class X {\n" +
" void foo() {\n" +
" class Y {\n" +
@@ -561,7 +561,7 @@ public class LocalElementTests extends ModifyingResourceTests {
" }\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("/P/X.java");
+ ICompilationUnit cu = getCompilationUnit("/P/X.js");
assertElementDescendants(
"Unexpected compilation unit contents",
"X.java\n" +
@@ -573,7 +573,7 @@ public class LocalElementTests extends ModifyingResourceTests {
" class Z",
cu);
} finally {
- deleteFile("/P/X.java");
+ deleteFile("/P/X.js");
}
}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/MementoTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/MementoTests.java
index 77e57a2..613e623 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/MementoTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/MementoTests.java
@@ -97,7 +97,7 @@ public void tearDownSuite() throws Exception {
* Tests that an anonymous type can be persisted and restored using its memento.
*/
public void testAnonymousTypeMemento1() {
- IType type = getCompilationUnit("/P/src/p/X.java").getType("X");
+ IType type = getCompilationUnit("/P/src/p/X.js").getType("X");
IType anonymous = type.getInitializer(1).getType("", 1);
assertMemento(
@@ -113,7 +113,7 @@ public void testAnonymousTypeMemento1() {
* Tests that an anonymous type can be persisted and restored using its memento.
*/
public void testAnonymousTypeMemento2() {
- IType type = getCompilationUnit("/P/src/p/X.java").getType("X");
+ IType type = getCompilationUnit("/P/src/p/X.js").getType("X");
IType anonymous = type.getField("f").getType("", 1);
assertMemento(
@@ -129,7 +129,7 @@ public void testAnonymousTypeMemento2() {
* Tests that an anonymous type can be persisted and restored using its memento.
*/
public void testAnonymousTypeMemento3() {
- IType type = getCompilationUnit("/P/src/p/X.java").getType("X");
+ IType type = getCompilationUnit("/P/src/p/X.js").getType("X");
IType anonymous = type.getMethod("foo", new String[]{}).getType("", 1);
assertMemento(
@@ -241,14 +241,14 @@ public void testClassFileMemento() {
* Tests that a compilation unit can be persisted and restored using its memento.
*/
public void testCompilationUnitMemento() {
- ICompilationUnit cu = getCompilationUnit("/P/src/p/X.java");
+ ICompilationUnit cu = getCompilationUnit("/P/src/p/X.js");
assertMemento(
- "=P/src<p{X.java",
+ "=P/src<p{X.js",
cu);
- cu = getCompilationUnit("/P/src/Y.java");
+ cu = getCompilationUnit("/P/src/Y.js");
assertMemento(
- "=P/src<{Y.java",
+ "=P/src<{Y.js",
cu);
}
/**
@@ -304,7 +304,7 @@ public void testExternalJarClassFileMemento() throws JavaModelException {
* Tests that an import declaration can be persisted and restored using its memento.
*/
public void testImportContainerMemento() {
- IImportContainer importContainer = getCompilationUnit("/P/src/p/X.java").getImportContainer();
+ IImportContainer importContainer = getCompilationUnit("/P/src/p/X.js").getImportContainer();
assertMemento(
"=P/src<p{X.java#",
importContainer);
@@ -313,12 +313,12 @@ public void testImportContainerMemento() {
* Tests that an import declaration can be persisted and restored using its memento.
*/
public void testImportDeclarationMemento() {
- IImportDeclaration importDecl = getCompilationUnit("/P/src/p/X.java").getImport("java.io.Serializable");
+ IImportDeclaration importDecl = getCompilationUnit("/P/src/p/X.js").getImport("java.io.Serializable");
assertMemento(
"=P/src<p{X.java#java.io.Serializable",
importDecl);
- importDecl = getCompilationUnit("/P/src/p/X.java").getImport("java.util.*");
+ importDecl = getCompilationUnit("/P/src/p/X.js").getImport("java.util.*");
assertMemento(
"=P/src<p{X.java#java.util.*",
importDecl);
@@ -335,7 +335,7 @@ public void testInvalidMemento() {
* Tests that an initializer can be persisted and restored using its memento.
*/
public void testInitializerMemento() {
- IType type = getCompilationUnit("/P/src/p/X.java").getType("X");
+ IType type = getCompilationUnit("/P/src/p/X.js").getType("X");
IInitializer initializer = type.getInitializer(1);
assertMemento(
@@ -389,7 +389,7 @@ public void testInternalJarBinaryTypeMemento() throws JavaModelException {
* Tests that a local type can be persisted and restored using its memento.
*/
public void testLocalTypeMemento1() {
- IType type = getCompilationUnit("/P/src/p/X.java").getType("X");
+ IType type = getCompilationUnit("/P/src/p/X.js").getType("X");
IType anonymous = type.getInitializer(1).getType("Y", 1);
assertMemento(
@@ -405,7 +405,7 @@ public void testLocalTypeMemento1() {
* Tests that a local type can be persisted and restored using its memento.
*/
public void testLocalTypeMemento2() {
- IType type = getCompilationUnit("/P/src/p/X.java").getType("X");
+ IType type = getCompilationUnit("/P/src/p/X.js").getType("X");
IType anonymous = type.getMethod("foo", new String[]{}).getType("Y", 1);
assertMemento(
@@ -421,7 +421,7 @@ public void testLocalTypeMemento2() {
* Tests that a local variable can be persisted and restored using its memento.
*/
public void testLocalVariableMemento1() {
- IType type = getCompilationUnit("/P/src/p/X.java").getType("X");
+ IType type = getCompilationUnit("/P/src/p/X.js").getType("X");
IMethod method = type.getMethod("foo", new String[]{});
ILocalVariable localVar = new LocalVariable((JavaElement)method, "var", 1, 2, 3, 4, "Z");
@@ -433,7 +433,7 @@ public void testLocalVariableMemento1() {
* Tests that a local variable can be persisted and restored using its memento.
*/
public void testLocalVariableMemento3() {
- IType type = getCompilationUnit("/P/src/p/X.java").getType("X");
+ IType type = getCompilationUnit("/P/src/p/X.js").getType("X");
IInitializer initializer = type.getInitializer(1);
ILocalVariable localVar = new LocalVariable((JavaElement)initializer, "var", 1, 2, 3, 4, "Z");
@@ -457,12 +457,12 @@ public void testLocalVariableMemento2() throws JavaModelException {
* Tests that a package declaration can be persisted and restored using its memento.
*/
public void testPackageDeclarationMemento() {
- IPackageDeclaration declaration = getCompilationUnit("/P/src/p/X.java").getPackageDeclaration("p");
+ IPackageDeclaration declaration = getCompilationUnit("/P/src/p/X.js").getPackageDeclaration("p");
assertMemento(
"=P/src<p{X.java%p",
declaration);
- declaration = getCompilationUnit("/P/src/p1/p2/X.java").getPackageDeclaration("p1.p2");
+ declaration = getCompilationUnit("/P/src/p1/p2/X.js").getPackageDeclaration("p1.p2");
assertMemento(
"=P/src<p1.p2{X.java%p1.p2",
declaration);
@@ -636,7 +636,7 @@ public void testRestoreBogusMemento() {
* Tests that a source field can be persisted and restored using its memento.
*/
public void testSourceFieldMemento() {
- IField field = getCompilationUnit("/P/src/p/X.java").getType("X").getField("field");
+ IField field = getCompilationUnit("/P/src/p/X.js").getType("X").getField("field");
assertMemento(
"=P/src<p{X.java[X^field",
field);
@@ -646,7 +646,7 @@ public void testSourceFieldMemento() {
* using mementos.
*/
public void testSourceInnerTypeMemento() {
- IType innerType = getCompilationUnit("/P/src/p/X.java").getType("X").getType("Inner");
+ IType innerType = getCompilationUnit("/P/src/p/X.js").getType("X").getType("Inner");
assertMemento(
"=P/src<p{X.java[X[Inner",
innerType);
@@ -655,7 +655,7 @@ public void testSourceInnerTypeMemento() {
* Tests that a source method can be persisted and restored using its memento.
*/
public void testSourceMethodMemento1() {
- IType type = getCompilationUnit("/P/src/p/X.java").getType("X");
+ IType type = getCompilationUnit("/P/src/p/X.js").getType("X");
IMethod method = type.getMethod("foo", new String[] {"I", "Ljava.lang.String;"});
assertMemento(
"=P/src<p{X.java[X~foo~I~Ljava.lang.String;",
@@ -665,7 +665,7 @@ public void testSourceMethodMemento1() {
* Tests that a source method can be persisted and restored using its memento.
*/
public void testSourceMethodMemento2() {
- IType type = getCompilationUnit("/P/src/p/X.java").getType("X");
+ IType type = getCompilationUnit("/P/src/p/X.js").getType("X");
IMethod method = type.getMethod("bar", new String[] {});
assertMemento(
"=P/src<p{X.java[X~bar",
@@ -675,7 +675,7 @@ public void testSourceMethodMemento2() {
* Tests that a source method can be persisted and restored using its memento.
*/
public void testSourceMethodMemento3() {
- IType type = getCompilationUnit("/P/src/p/X.java").getType("X");
+ IType type = getCompilationUnit("/P/src/p/X.js").getType("X");
IMethod method = type.getMethod("fred", new String[] {"[Z"});
assertMemento(
"=P/src<p{X.java[X~fred~\\[Z",
@@ -685,7 +685,7 @@ public void testSourceMethodMemento3() {
* Tests that a source type can be persisted and restored using its memento.
*/
public void testSourceTypeMemento() {
- IType type = getCompilationUnit("/P/src/p/X.java").getType("X");
+ IType type = getCompilationUnit("/P/src/p/X.js").getType("X");
assertMemento(
"=P/src<p{X.java[X",
type);
@@ -694,7 +694,7 @@ public void testSourceTypeMemento() {
* Tests that a type parameter can be persisted and restored using its memento.
*/
public void testTypeParameter1() {
- ITypeParameter typeParameter = getCompilationUnit("/P/src/p/X.java").getType("X").getTypeParameter("T");
+ ITypeParameter typeParameter = getCompilationUnit("/P/src/p/X.js").getType("X").getTypeParameter("T");
assertMemento(
"=P/src<p{X.java[X]T",
typeParameter);
@@ -703,7 +703,7 @@ public void testTypeParameter1() {
* Tests that a type parameter can be persisted and restored using its memento.
*/
public void testTypeParameter2() {
- ITypeParameter typeParameter = getCompilationUnit("/P/src/p/X.java").getType("X").getMethod("foo", new String[0]).getTypeParameter("T");
+ ITypeParameter typeParameter = getCompilationUnit("/P/src/p/X.js").getType("X").getMethod("foo", new String[0]).getTypeParameter("T");
assertMemento(
"=P/src<p{X.java[X~foo]T",
typeParameter);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ModifyingResourceTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ModifyingResourceTests.java
index 8c82185..c1f62be 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ModifyingResourceTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ModifyingResourceTests.java
@@ -59,7 +59,7 @@ protected void assertStatus(String message, String expected, IStatus status) {
* "}")
*/
public static void generateClassFile(String className, String javaSource) throws IOException {
- String cu = "d:/temp/" + className + ".java";
+ String cu = "d:/temp/" + className + ".js";
Util.createFile(cu, javaSource);
Main.compile(cu + " -d d:/temp -classpath " + System.getProperty("java.home") + "/lib/rt.jar");
FileInputStream input = new FileInputStream("d:/temp/" + className + ".class");
@@ -226,7 +226,7 @@ protected IClassFile createClassFile(String libPath, String classFileRelativePat
Util.delete(classFile.getResource());
IJavaProject javaProject = classFile.getJavaProject();
IProject project = javaProject.getProject();
- String sourcePath = project.getLocation().toOSString() + File.separatorChar + classFile.getType().getElementName() + ".java";
+ String sourcePath = project.getLocation().toOSString() + File.separatorChar + classFile.getType().getElementName() + ".js";
String libOSPath = new Path(libPath).segmentCount() > 1 ? getFolder(libPath).getLocation().toOSString() : getProject(libPath).getLocation().toOSString();
Util.compile(new String[] {sourcePath, contents}, javaProject.getOptions(true), libOSPath);
project.refreshLocal(IResource.DEPTH_INFINITE, null);
@@ -238,7 +238,7 @@ protected IClassFile createClassFile(String libPath, String classFileRelativePat
* The given array as the following form:
* [<folder>, "<pattern>[|<pattern]*"]*
* E.g. new String[] {
- * "/P/src1", "p/A.java",
+ * "/P/src1", "p/A.js",
* "/P", "*.txt|com.tests/**"
* }
*/
@@ -282,7 +282,7 @@ protected IClasspathEntry[] createClasspath(String[] foldersAndPatterns, boolean
* The given array as the following form:
* [<folder>, "<+|-><pattern>[|<+|-><pattern]*"]*
* E.g. new String[] {
- * "/P/src1", "+p/A.java",
+ * "/P/src1", "+p/A.js",
* "/P", "-*.txt|+com.tests/**"
* }
*/
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/NameLookupTests2.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/NameLookupTests2.java
index e5063ec..51f9ce7 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/NameLookupTests2.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/NameLookupTests2.java
@@ -14,9 +14,10 @@ import java.io.IOException;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.Path;
-import org.eclipse.wst.jsdt.core.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.Binding;
import org.eclipse.wst.jsdt.internal.core.JavaProject;
import org.eclipse.wst.jsdt.internal.core.NameLookup;
+import org.eclipse.wst.jsdt.core.*;
import junit.framework.Test;
@@ -143,33 +144,26 @@ public void testDuplicateTypesInWorkingCopies() throws CoreException {
try {
JavaProject project = (JavaProject)createJavaProject("P");
workingCopies[0] = getWorkingCopy(
- "/P/X.java",
- "public class X {\n" +
- "}\n" +
- "class Other {\n" +
+ "/P/X.js",
+ "function foo() {\n" +
"}"
);
workingCopies[1] = getWorkingCopy(
- "/P/Y.java",
- "public class Y {\n" +
- "}\n" +
- "class Other {\n" +
+ "/P/Y.js",
+ "function foo() {\n" +
"}"
);
workingCopies[2] = getWorkingCopy(
- "/P/Z.java",
- "public class Z {\n" +
- "}\n" +
- "class Other {\n" +
+ "/P/Z.js",
+ "function foo() {\n" +
"}"
);
NameLookup nameLookup = project.newNameLookup(workingCopies);
- IType type = nameLookup.findType("Other", false, NameLookup.ACCEPT_ALL); // TODO (jerome) should use seekTypes
- assertTypesEqual(
- "Unepexted types",
- "Other\n",
- new IType[] {type}
- );
+ NameLookup.Answer answer=nameLookup.findBinding("foo","",Binding.METHOD, false, NameLookup.ACCEPT_ALL,false);
+ assertEquals(
+ "Unepexted ",
+ "foo",
+ ((IJavaElement)answer.element).getElementName());
} finally {
// discardWorkingCopies(workingCopies);
deleteProject("P");
@@ -203,7 +197,7 @@ public void testFindPackageFragmentWithWorkingCopy() throws CoreException {
JavaProject project = (JavaProject)createJavaProject("P");
createFolder("/P/p1");
workingCopies[0] = getWorkingCopy(
- "/P/p1/X.java",
+ "/P/p1/X.js",
"package p1;\n" +
"public class X {\n" +
"}"
@@ -227,7 +221,7 @@ public void testFindBinaryTypeWithDollarName() throws CoreException, IOException
IJavaProject project = createJavaProject("P");
addLibrary(project, "lib.jar", "libsrc.zip",
new String[] {
- "p/X.java",
+ "p/X.js",
"package p;\n" +
"public class X {\n" +
" public class $1 {\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/OverflowingCacheTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/OverflowingCacheTests.java
index 1fcf1a7..e6f53f6 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/OverflowingCacheTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/OverflowingCacheTests.java
@@ -499,7 +499,7 @@ public class OverflowingCacheTests extends ModifyingResourceTests {
createJavaProject("P");
for (int i = 0; i < 61; i++) {
createFile(
- "P/X" + i + ".java",
+ "P/X" + i + ".js",
"public class X" + i + " {\n" +
"}"
);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ReconcilerStatementsRecoveryTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ReconcilerStatementsRecoveryTests.java
index 21c1e7b..57c507f 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ReconcilerStatementsRecoveryTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ReconcilerStatementsRecoveryTests.java
@@ -15,11 +15,11 @@ import junit.framework.Test;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.wst.jsdt.core.*;
import org.eclipse.wst.jsdt.core.compiler.IProblem;
import org.eclipse.wst.jsdt.core.dom.AST;
import org.eclipse.wst.jsdt.internal.core.JavaModelManager;
import org.eclipse.wst.jsdt.internal.core.search.indexing.IndexManager;
+import org.eclipse.wst.jsdt.core.*;
public class ReconcilerStatementsRecoveryTests extends ModifyingResourceTests {
@@ -121,7 +121,7 @@ protected void removeClasspathEntries(IClasspathEntry[] entries) throws JavaMode
public void setUp() throws Exception {
super.setUp();
this.problemRequestor = new ProblemRequestor();
- this.workingCopy = getCompilationUnit("Reconciler/src/p1/X.java").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
+ this.workingCopy = getCompilationUnit("Reconciler/src/p1/X.js").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
this.problemRequestor.initialize(this.workingCopy.getSource().toCharArray());
startDeltas();
}
@@ -133,12 +133,8 @@ public void setUpSuite() throws Exception {
createFolder("/Reconciler/src/p1");
createFolder("/Reconciler/src/p2");
createFile(
- "/Reconciler/src/p1/X.java",
- "package p1;\n" +
- "import p2.*;\n" +
- "public class X {\n" +
- " public void foo() {\n" +
- " }\n" +
+ "/Reconciler/src/p1/X.js",
+ " function foo() {\n" +
"}"
);
project14.setOption(JavaCore.COMPILER_PB_UNUSED_LOCAL, JavaCore.IGNORE);
@@ -151,27 +147,27 @@ public void setUpSuite() throws Exception {
"lib15.jar",
"lib15src.zip",
new String[] {
- "java/util/List.java",
+ "java/util/List.js",
"package java.util;\n" +
"public class List<T> {\n" +
"}",
- "java/util/Stack.java",
+ "java/util/Stack.js",
"package java.util;\n" +
"public class Stack<T> {\n" +
"}",
- "java/util/Map.java",
+ "java/util/Map.js",
"package java.util;\n" +
"public interface Map<K,V> {\n" +
"}",
- "java/lang/annotation/Annotation.java",
+ "java/lang/annotation/Annotation.js",
"package java.lang.annotation;\n" +
"public interface Annotation {\n" +
"}",
- "java/lang/Deprecated.java",
+ "java/lang/Deprecated.js",
"package java.lang;\n" +
"public @interface Deprecated {\n" +
"}",
- "java/lang/SuppressWarnings.java",
+ "java/lang/SuppressWarnings.js",
"package java.lang;\n" +
"public @interface SuppressWarnings {\n" +
" String[] value();\n" +
@@ -182,7 +178,7 @@ public void setUpSuite() throws Exception {
project15.setOption(JavaCore.COMPILER_PB_UNUSED_LOCAL, JavaCore.IGNORE);
}
//private void setUp15WorkingCopy() throws JavaModelException {
-// setUp15WorkingCopy("Reconciler15/src/p1/X.java", new WorkingCopyOwner() {});
+// setUp15WorkingCopy("Reconciler15/src/p1/X.js", new WorkingCopyOwner() {});
//}
//private void setUp15WorkingCopy(String path, WorkingCopyOwner owner) throws JavaModelException {
// String contents = this.workingCopy.getSource();
@@ -233,12 +229,12 @@ public void testStatementsRecovery01() throws CoreException {
this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, false, null, null);
assertDeltas(
"Unexpected delta after syntax error",
- "[Working copy] X.java[*]: {CONTENT | FINE GRAINED}"
+ "[Working copy] X.js[*]: {CONTENT | FINE GRAINED}"
);
assertProblems(
"Unexpected problems",
"----------\n" +
- "1. ERROR in /Reconciler/src/p1/X.java (at line 5)\n" +
+ "1. ERROR in /Reconciler/src/p1/X.js (at line 5)\n" +
" UnknownType name\n" +
" ^^^^\n" +
"Syntax error, insert \";\" to complete BlockStatements\n" +
@@ -263,12 +259,12 @@ public void testStatementsRecovery02() throws CoreException {
this.workingCopy.reconcile(AST.JLS3, false, false, null, null);
assertDeltas(
"Unexpected delta after syntax error",
- "[Working copy] X.java[*]: {CONTENT | FINE GRAINED | AST AFFECTED}"
+ "[Working copy] X.js[*]: {CONTENT | FINE GRAINED | AST AFFECTED}"
);
assertProblems(
"Unexpected problems",
"----------\n" +
- "1. ERROR in /Reconciler/src/p1/X.java (at line 5)\n" +
+ "1. ERROR in /Reconciler/src/p1/X.js (at line 5)\n" +
" UnknownType name\n" +
" ^^^^\n" +
"Syntax error, insert \";\" to complete BlockStatements\n" +
@@ -293,17 +289,17 @@ public void testStatementsRecovery03() throws CoreException {
this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, true, null, null);
assertDeltas(
"Unexpected delta after syntax error",
- "[Working copy] X.java[*]: {CONTENT | FINE GRAINED}"
+ "[Working copy] X.js[*]: {CONTENT | FINE GRAINED}"
);
assertProblems(
"Unexpected problems",
"----------\n" +
- "1. ERROR in /Reconciler/src/p1/X.java (at line 5)\n" +
+ "1. ERROR in /Reconciler/src/p1/X.js (at line 5)\n" +
" UnknownType name\n" +
" ^^^^^^^^^^^\n" +
"UnknownType cannot be resolved to a type\n" +
"----------\n" +
- "2. ERROR in /Reconciler/src/p1/X.java (at line 5)\n" +
+ "2. ERROR in /Reconciler/src/p1/X.js (at line 5)\n" +
" UnknownType name\n" +
" ^^^^\n" +
"Syntax error, insert \";\" to complete BlockStatements\n" +
@@ -328,17 +324,17 @@ public void testStatementsRecovery04() throws CoreException {
this.workingCopy.reconcile(AST.JLS3, false, true, null, null);
assertDeltas(
"Unexpected delta after syntax error",
- "[Working copy] X.java[*]: {CONTENT | FINE GRAINED | AST AFFECTED}"
+ "[Working copy] X.js[*]: {CONTENT | FINE GRAINED | AST AFFECTED}"
);
assertProblems(
"Unexpected problems",
"----------\n" +
- "1. ERROR in /Reconciler/src/p1/X.java (at line 5)\n" +
+ "1. ERROR in /Reconciler/src/p1/X.js (at line 5)\n" +
" UnknownType name\n" +
" ^^^^^^^^^^^\n" +
"UnknownType cannot be resolved to a type\n" +
"----------\n" +
- "2. ERROR in /Reconciler/src/p1/X.java (at line 5)\n" +
+ "2. ERROR in /Reconciler/src/p1/X.js (at line 5)\n" +
" UnknownType name\n" +
" ^^^^\n" +
"Syntax error, insert \";\" to complete BlockStatements\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ReconcilerTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ReconcilerTests.java
index eddbd48..e502a32 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ReconcilerTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ReconcilerTests.java
@@ -93,7 +93,7 @@ public ReconcilerTests(String name) {
// All specified tests which do not belong to the class are skipped...
static {
// JavaModelManager.VERBOSE = true;
-// org.eclipse.wst.jsdt.internal.core.search.BasicSearchEngine.VERBOSE = true;
+// org.eclipse.jsdt.internal.core.search.BasicSearchEngine.VERBOSE = true;
// TESTS_PREFIX = "testIgnoreIfBetterNonAccessibleRule";
// TESTS_NAMES = new String[] { "testRawUsage" };
// TESTS_NUMBERS = new int[] { 118823 };
@@ -154,7 +154,7 @@ protected void removeClasspathEntries(IClasspathEntry[] entries) throws JavaMode
public void setUp() throws Exception {
super.setUp();
this.problemRequestor = new ProblemRequestor();
- this.workingCopy = getCompilationUnit("Reconciler/src/p1/X.java").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
+ this.workingCopy = getCompilationUnit("Reconciler/src/p1/X.js").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
this.problemRequestor.initialize(this.workingCopy.getSource().toCharArray());
startDeltas();
}
@@ -166,13 +166,10 @@ public void setUpSuite() throws Exception {
createFolder("/Reconciler/src/p1");
createFolder("/Reconciler/src/p2");
createFile(
- "/Reconciler/src/p1/X.java",
- "package p1;\n" +
- "import p2.*;\n" +
- "public class X {\n" +
- " public void foo() {\n" +
+ "/Reconciler/src/p1/X.js",
+ " function foo() {\n" +
" }\n" +
- "}"
+ ""
);
project14.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4);
project14.setOption(JavaCore.COMPILER_PB_UNUSED_LOCAL, JavaCore.IGNORE);
@@ -180,44 +177,44 @@ public void setUpSuite() throws Exception {
// Create project with 1.5 compliance
IJavaProject project15 = createJavaProject("Reconciler15", new String[] {"src"}, new String[] {"JCL15_LIB"}, "bin", "1.5");
- addLibrary(
- project15,
- "lib15.jar",
- "lib15src.zip",
- new String[] {
- "java/util/List.java",
- "package java.util;\n" +
- "public class List<T> {\n" +
- "}",
- "java/util/Stack.java",
- "package java.util;\n" +
- "public class Stack<T> {\n" +
- "}",
- "java/util/Map.java",
- "package java.util;\n" +
- "public interface Map<K,V> {\n" +
- "}",
- "java/lang/annotation/Annotation.java",
- "package java.lang.annotation;\n" +
- "public interface Annotation {\n" +
- "}",
- "java/lang/Deprecated.java",
- "package java.lang;\n" +
- "public @interface Deprecated {\n" +
- "}",
- "java/lang/SuppressWarnings.java",
- "package java.lang;\n" +
- "public @interface SuppressWarnings {\n" +
- " String[] value();\n" +
- "}"
- },
- JavaCore.VERSION_1_5
- );
- project15.setOption(JavaCore.COMPILER_PB_UNUSED_LOCAL, JavaCore.IGNORE);
- project15.setOption(JavaCore.COMPILER_PB_RAW_TYPE_REFERENCE, JavaCore.IGNORE);
+// addLibrary(
+// project15,
+// "lib15.jar",
+// "lib15src.zip",
+// new String[] {
+// "java/util/List.js",
+// "package java.util;\n" +
+// "public class List<T> {\n" +
+// "}",
+// "java/util/Stack.js",
+// "package java.util;\n" +
+// "public class Stack<T> {\n" +
+// "}",
+// "java/util/Map.js",
+// "package java.util;\n" +
+// "public interface Map<K,V> {\n" +
+// "}",
+// "java/lang/annotation/Annotation.js",
+// "package java.lang.annotation;\n" +
+// "public interface Annotation {\n" +
+// "}",
+// "java/lang/Deprecated.js",
+// "package java.lang;\n" +
+// "public @interface Deprecated {\n" +
+// "}",
+// "java/lang/SuppressWarnings.js",
+// "package java.lang;\n" +
+// "public @interface SuppressWarnings {\n" +
+// " String[] value();\n" +
+// "}"
+// },
+// JavaCore.VERSION_1_5
+// );
+// project15.setOption(JavaCore.COMPILER_PB_UNUSED_LOCAL, JavaCore.IGNORE);
+// project15.setOption(JavaCore.COMPILER_PB_RAW_TYPE_REFERENCE, JavaCore.IGNORE);
}
private void setUp15WorkingCopy() throws JavaModelException {
- setUp15WorkingCopy("Reconciler15/src/p1/X.java", new WorkingCopyOwner() {});
+ setUp15WorkingCopy("Reconciler15/src/p1/X.js", new WorkingCopyOwner() {});
}
private void setUp15WorkingCopy(String path, WorkingCopyOwner owner) throws JavaModelException {
String contents = this.workingCopy.getSource();
@@ -255,49 +252,34 @@ public void tearDownSuite() throws Exception {
/*
* Ensures that no problem is created for a reference to a type that is included in a prereq project.
*/
+
+
+public void test00() throws Exception {
+
+}
+
+
+public void test00a() throws JavaModelException {
+ setWorkingCopyContents(
+ "function foo(){\n" +
+ " alert();\n"+
+ "}"
+ );
+ this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
+ assertProblems(
+ "Unexpected problems",
+ "----------\n" +
+ "----------\n"
+ );
+ }
+
public void testAccessRestriction() throws CoreException {
try {
- createJavaProject("P1", new String[] {"src"}, new String[] {"JCL_LIB"}, null, null, new String[0], null, null, new boolean[0], "bin", null, new String[][] {{"**/X.java"}}, null, "1.4");
- createFolder("/P1/src/p");
- createFile("/P1/src/p/X.java", "package p; public class X {}");
+ createJavaProject("P1", new String[] {"src"}, new String[] {"JCL_LIB"}, null, null, new String[0], null, null, new boolean[0], "bin", null, new String[][] {{"**/X.js"}}, null, "1.4");
+ createFile("/P1/src/X.js", "function foo() {}");
createJavaProject("P2", new String[] {"src"}, new String[] {"JCL_LIB"}, new String[] {"/P1"}, "bin");
- setUpWorkingCopy("/P2/src/Y.java", "public class Y extends p.X {}");
- assertProblems(
- "Unexpected problems",
- "----------\n" +
- "----------\n"
- );
- } finally {
- deleteProject("P1");
- deleteProject("P2");
- }
-}
-/*
- * Ensures that no problem is created for a reference to a binary type that is included in a prereq project.
- * (regression test for bug 82542 Internal error during AST creation)
- */
-public void testAccessRestriction2() throws CoreException, IOException {
- try {
- IJavaProject project = createJavaProject("P1");
- addLibrary(
- project,
- "lib.jar",
- "libsrc.zip",
- new String[] {
- "p/X.java",
- "package p;\n" +
- "public class X {\n" +
- "}",
- },
- new String[] {
- "**/*"
- },
- null,
- "1.4"
- );
- createJavaProject("P2", new String[] {"src"}, new String[] {"JCL_LIB"}, new String[] {"/P1"}, "bin");
- setUpWorkingCopy("/P2/src/Y.java", "public class Y extends p.X {}");
+ setUpWorkingCopy("/P2/src/Y.js", "foo();");
assertProblems(
"Unexpected problems",
"----------\n" +
@@ -308,168 +290,194 @@ public void testAccessRestriction2() throws CoreException, IOException {
deleteProject("P2");
}
}
-/*
- * Ensures that no problem is created for a reference to a type that is included and not exported in a prereq project
- * but with combineAccessRestriction flag set to false.
- */
-public void testAccessRestriction3() throws CoreException {
- try {
- createJavaProject("P1");
- createFolder("/P1/p");
- createFile("/P1/p/X.java", "package p; public class X {}");
-
- createJavaProject("P2", new String[] {}, new String[] {}, null, null, new String[] {"/P1"}, null, null, new boolean[] {true}, "", null, null, null, "1.4");
-
- createJavaProject("P3", new String[] {"src"}, new String[] {"JCL_LIB"}, null, null, new String[] {"/P2"}, null, new String[][] {new String[] {"**/X"}}, false/*don't combine access restrictions*/, new boolean[] {true}, "bin", null, null, null, "1.4");
- setUpWorkingCopy("/P3/src/Y.java", "public class Y extends p.X {}");
- assertProblems(
- "Unexpected problems",
- "----------\n" +
- "----------\n"
- );
- } finally {
- deleteProjects(new String[] {"P1", "P2", "P3" });
- }
-}
-/*
- * Ensures that a problem is created for a reference to a type that is included and not exported in a prereq project
- * but with combineAccessRestriction flag set to true.
- */
-public void testAccessRestriction4() throws CoreException {
- try {
- createJavaProject("P1");
- createFolder("/P1/p");
- createFile("/P1/p/X.java", "package p; public class X {}");
-
- createJavaProject("P2", new String[] {}, new String[] {}, null, null, new String[] {"/P1"}, null, null, new boolean[] {true}, "", null, null, null, "1.4");
-
- createJavaProject("P3", new String[] {"src"}, new String[] {"JCL_LIB"}, null, null, new String[] {"/P2"}, null, new String[][] {new String[] {"**/X"}}, true/*combine access restrictions*/, new boolean[] {true}, "bin", null, null, null, "1.4");
- setUpWorkingCopy("/P3/src/Y.java", "public class Y extends p.X {}");
- assertProblems(
- "Unexpected problems",
- "----------\n" +
- "1. ERROR in /P3/src/Y.java (at line 1)\n" +
- " public class Y extends p.X {}\n" +
- " ^^^\n" +
- "Access restriction: The type X is not accessible due to restriction on required project P1\n" +
- "----------\n"
- );
- } finally {
- deleteProjects(new String[] {"P1", "P2", "P3" });
- }
-}
-/*
- * Ensures that a problem is created for a reference to a type that is no longer accessible in a prereq project.
- * (regression test for bug 91498 Reconcile still sees old access rules)
- */
-public void testAccessRestriction5() throws CoreException {
- try {
- createJavaProject("P1");
- createFolder("/P1/p");
- createFile("/P1/p/X.java", "package p; public class X {}");
- IJavaProject p2 = createJavaProject("P2", new String[] {"src"}, new String[] {"JCL_LIB"}, "bin");
- IClasspathEntry[] classpath = p2.getRawClasspath();
- int length = classpath.length;
- System.arraycopy(classpath, 0, classpath = new IClasspathEntry[length+1], 0, length);
- classpath[length] = createSourceEntry("P2", "/P1", "+**/p/|-**/*");
- p2.setRawClasspath(classpath, null);
- setUpWorkingCopy("/P2/src/Y.java", "public class Y extends p.X {}");
- assertProblems(
- "Unexpected problems",
- "----------\n" +
- "----------\n"
- );
-
- // remove accessible rule
- System.arraycopy(classpath, 0, classpath = new IClasspathEntry[length+1], 0, length);
- classpath[length] = createSourceEntry("P2", "/P1", "-**/*");
- p2.setRawClasspath(classpath, null);
- this.problemRequestor.initialize(this.workingCopy.getSource().toCharArray());
- this.workingCopy.reconcile(ICompilationUnit.NO_AST, true/*force problem detection*/, null, null);
- assertProblems(
- "Unexpected problems",
- "----------\n" +
- "1. ERROR in /P2/src/Y.java (at line 1)\n" +
- " public class Y extends p.X {}\n" +
- " ^^^\n" +
- "Access restriction: The type X is not accessible due to restriction on required project P1\n" +
- "----------\n"
- );
-
- } finally {
- deleteProjects(new String[] {"P1", "P2"});
- }
-}
+///*
+// * Ensures that no problem is created for a reference to a binary type that is included in a prereq project.
+// * (regression test for bug 82542 Internal error during AST creation)
+// */
+//public void testAccessRestriction2() throws CoreException, IOException {
+// try {
+// IJavaProject project = createJavaProject("P1");
+// addLibrary(
+// project,
+// "lib.jar",
+// "libsrc.zip",
+// new String[] {
+// "p/X.js",
+// "package p;\n" +
+// "public class X {\n" +
+// "}",
+// },
+// new String[] {
+// "**/*"
+// },
+// null,
+// "1.4"
+// );
+// createJavaProject("P2", new String[] {"src"}, new String[] {"JCL_LIB"}, new String[] {"/P1"}, "bin");
+// setUpWorkingCopy("/P2/src/Y.js", "public class Y extends p.X {}");
+// assertProblems(
+// "Unexpected problems",
+// "----------\n" +
+// "----------\n"
+// );
+// } finally {
+// deleteProject("P1");
+// deleteProject("P2");
+// }
+//}
+///*
+// * Ensures that no problem is created for a reference to a type that is included and not exported in a prereq project
+// * but with combineAccessRestriction flag set to false.
+// */
+//public void testAccessRestriction3() throws CoreException {
+// try {
+// createJavaProject("P1");
+// createFolder("/P1/p");
+// createFile("/P1/p/X.js", "package p; public class X {}");
+//
+// createJavaProject("P2", new String[] {}, new String[] {}, null, null, new String[] {"/P1"}, null, null, new boolean[] {true}, "", null, null, null, "1.4");
+//
+// createJavaProject("P3", new String[] {"src"}, new String[] {"JCL_LIB"}, null, null, new String[] {"/P2"}, null, new String[][] {new String[] {"**/X"}}, false/*don't combine access restrictions*/, new boolean[] {true}, "bin", null, null, null, "1.4");
+// setUpWorkingCopy("/P3/src/Y.js", "public class Y extends p.X {}");
+// assertProblems(
+// "Unexpected problems",
+// "----------\n" +
+// "----------\n"
+// );
+// } finally {
+// deleteProjects(new String[] {"P1", "P2", "P3" });
+// }
+//}
+///*
+// * Ensures that a problem is created for a reference to a type that is included and not exported in a prereq project
+// * but with combineAccessRestriction flag set to true.
+// */
+//public void testAccessRestriction4() throws CoreException {
+// try {
+// createJavaProject("P1");
+// createFolder("/P1/p");
+// createFile("/P1/p/X.js", "package p; public class X {}");
+//
+// createJavaProject("P2", new String[] {}, new String[] {}, null, null, new String[] {"/P1"}, null, null, new boolean[] {true}, "", null, null, null, "1.4");
+//
+// createJavaProject("P3", new String[] {"src"}, new String[] {"JCL_LIB"}, null, null, new String[] {"/P2"}, null, new String[][] {new String[] {"**/X"}}, true/*combine access restrictions*/, new boolean[] {true}, "bin", null, null, null, "1.4");
+// setUpWorkingCopy("/P3/src/Y.js", "public class Y extends p.X {}");
+// assertProblems(
+// "Unexpected problems",
+// "----------\n" +
+// "1. ERROR in /P3/src/Y.js (at line 1)\n" +
+// " public class Y extends p.X {}\n" +
+// " ^^^\n" +
+// "Access restriction: The type X is not accessible due to restriction on required project P1\n" +
+// "----------\n"
+// );
+// } finally {
+// deleteProjects(new String[] {"P1", "P2", "P3" });
+// }
+//}
+///*
+// * Ensures that a problem is created for a reference to a type that is no longer accessible in a prereq project.
+// * (regression test for bug 91498 Reconcile still sees old access rules)
+// */
+//public void testAccessRestriction5() throws CoreException {
+// try {
+// createJavaProject("P1");
+// createFolder("/P1/p");
+// createFile("/P1/p/X.js", "package p; public class X {}");
+// IJavaProject p2 = createJavaProject("P2", new String[] {"src"}, new String[] {"JCL_LIB"}, "bin");
+// IClasspathEntry[] classpath = p2.getRawClasspath();
+// int length = classpath.length;
+// System.arraycopy(classpath, 0, classpath = new IClasspathEntry[length+1], 0, length);
+// classpath[length] = createSourceEntry("P2", "/P1", "+**/p/|-**/*");
+// p2.setRawClasspath(classpath, null);
+// setUpWorkingCopy("/P2/src/Y.js", "public class Y extends p.X {}");
+// assertProblems(
+// "Unexpected problems",
+// "----------\n" +
+// "----------\n"
+// );
+//
+// // remove accessible rule
+// System.arraycopy(classpath, 0, classpath = new IClasspathEntry[length+1], 0, length);
+// classpath[length] = createSourceEntry("P2", "/P1", "-**/*");
+// p2.setRawClasspath(classpath, null);
+// this.problemRequestor.initialize(this.workingCopy.getSource().toCharArray());
+// this.workingCopy.reconcile(ICompilationUnit.NO_AST, true/*force problem detection*/, null, null);
+// assertProblems(
+// "Unexpected problems",
+// "----------\n" +
+// "1. ERROR in /P2/src/Y.js (at line 1)\n" +
+// " public class Y extends p.X {}\n" +
+// " ^^^\n" +
+// "Access restriction: The type X is not accessible due to restriction on required project P1\n" +
+// "----------\n"
+// );
+//
+// } finally {
+// deleteProjects(new String[] {"P1", "P2"});
+// }
+//}
/**
* Ensures that the reconciler handles duplicate members correctly.
*/
public void testAddDuplicateMember() throws JavaModelException {
setWorkingCopyContents(
- "package p1;\n" +
- "import p2.*;\n" +
- "public class X {\n" +
- " public void foo() {\n" +
+ " function foo() {\n" +
" }\n" +
- " public void foo() {\n" +
+ " function foo() {\n" +
" }\n" +
- "}");
+ " ");
this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
assertDeltas(
"Unexpected delta",
- "X[*]: {CHILDREN | FINE GRAINED}\n" +
- " foo()#2[+]: {}"
+ "foo()#2[+]: {}"
);
}
/**
* Ensures that the reconciler reconciles the new contents with the current
* contents, updating the structure of this reconciler's compilation
* unit, and fires the Java element delta for the structural changes
- * of the addition of a field and a constructor.
+ * of the addition of a field and a method.
*/
public void testAddFieldAndConstructor() throws JavaModelException {
setWorkingCopyContents(
- "package p1;\n" +
- "import p2.*;\n" +
- "public class X {\n" +
- " int i;\n" +
- " X(int i) {\n" +
- " this.i = i;\n" +
- " }\n" +
- " public void foo() {\n" +
- " }\n" +
- "}");
- this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
- assertDeltas(
- "Unexpected delta",
- "X[*]: {CHILDREN | FINE GRAINED}\n" +
- " X(int)[+]: {}\n" +
- " i[+]: {}"
- );
-}
-/**
- * Ensures that the reconciler reconciles the new contents with the current
- * contents, updating the structure of this reconciler's compilation
- * unit, and fires the Java element delta for the structural changes
- * of the addition of a field and a constructor.
- */
-public void testAddImports() throws JavaModelException {
- setWorkingCopyContents(
- "package p1;\n" +
- "import p2.*;\n" +
- "import java.lang.reflect.*;\n" +
- "import java.util.Vector;\n" +
- "public class X {\n" +
- " public void foo() {\n" +
- " }\n" +
- "}");
- this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
- assertDeltas(
- "Unexpected delta",
- "<import container>[*]: {CHILDREN | FINE GRAINED}\n" +
- " import java.lang.reflect.*[+]: {}\n" +
- " import java.util.Vector[+]: {}"
- );
-}
+ " var i;\n" +
+ " function X(p) {\n" +
+ " }\n" +
+ " function foo() {\n" +
+ " }\n" +
+ " ");
+ this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
+ assertDeltas(
+ "Unexpected delta",
+ "X(p0)[+]: {}\n"+
+ "i[+]: {}"
+ );
+}
+///**
+// * Ensures that the reconciler reconciles the new contents with the current
+// * contents, updating the structure of this reconciler's compilation
+// * unit, and fires the Java element delta for the structural changes
+// * of the addition of a field and a constructor.
+// */
+//public void testAddImports() throws JavaModelException {
+// setWorkingCopyContents(
+// "package p1;\n" +
+// "import p2.*;\n" +
+// "import java.lang.reflect.*;\n" +
+// "import java.util.Vector;\n" +
+// "public class X {\n" +
+// " public void foo() {\n" +
+// " }\n" +
+// "}");
+// this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
+// assertDeltas(
+// "Unexpected delta",
+// "<import container>[*]: {CHILDREN | FINE GRAINED}\n" +
+// " import java.lang.reflect.*[+]: {}\n" +
+// " import java.util.Vector[+]: {}"
+// );
+//}
/**
* Ensures that the reconciler reconciles the new contents with the current
* contents, updating the structure of this reconciler's compilation
@@ -478,19 +486,15 @@ public void testAddImports() throws JavaModelException {
*/
public void testAddMethod1() throws JavaModelException {
setWorkingCopyContents(
- "package p1;\n" +
- "import p2.*;\n" +
- "public class X {\n" +
- " public void foo() {\n" +
+ " function foo() {\n" +
" }\n" +
- " public void bar() {\n" +
+ " function bar() {\n" +
" }\n" +
- "}");
+ " ");
this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
assertDeltas(
"Unexpected delta",
- "X[*]: {CHILDREN | FINE GRAINED}\n" +
- " bar()[+]: {}"
+ "bar()[+]: {}"
);
}
/**
@@ -501,18 +505,14 @@ public void testAddMethod1() throws JavaModelException {
*/
public void testAddPartialMethod1() throws JavaModelException {
setWorkingCopyContents(
- "package p1;\n" +
- "import p2.*;\n" +
- "public class X {\n" +
- " public void some()\n" +
- " public void foo() {\n" +
+ " function some()\n" +
+ " function foo() {\n" +
" }\n" +
- "}");
+ " ");
this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
assertDeltas(
"Unexpected delta",
- "X[*]: {CHILDREN | FINE GRAINED}\n" +
- " some()[+]: {}"
+ "some()[+]: {}"
);
}
/**
@@ -525,29 +525,23 @@ public void testAddPartialMethod1() throws JavaModelException {
public void testAddPartialMethod1and2() throws JavaModelException {
// Add partial method before foo
setWorkingCopyContents(
- "package p1;\n" +
- "import p2.*;\n" +
- "public class X {\n" +
- " public void some()\n" +
- " public void foo() {\n" +
+ " function some()\n" +
+ " function foo() {\n" +
" }\n" +
- "}");
+ "");
this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
// Add { on partial method
clearDeltas();
setWorkingCopyContents(
- "package p1;\n" +
- "import p2.*;\n" +
- "public class X {\n" +
- " public void some() {\n" +
- " public void foo() {\n" +
+ " function some() {\n" +
+ " function foo() {\n" +
" }\n" +
- "}");
+ "");
this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
assertDeltas(
"Unexpected delta",
- "[Working copy] X.java[*]: {CONTENT | FINE GRAINED}"
+ "[Working copy] X.js[*]: {CONTENT | FINE GRAINED}"
);
}
/*
@@ -556,17 +550,13 @@ public void testAddPartialMethod1and2() throws JavaModelException {
*/
public void testBroadcastAST1() throws JavaModelException {
setWorkingCopyContents(
- "package p1;\n" +
- "import p2.*;\n" +
- "public class X {\n" +
- "}");
+ "var i;\n" +
+ "");
this.workingCopy.reconcile(AST.JLS3, false/*don't force problem detection*/, null/*primary owner*/, null/*no progress*/);
assertASTNodeEquals(
"Unexpected ast",
- "package p1;\n" +
- "import p2.*;\n" +
- "public class X {\n" +
- "}\n",
+ "var i;\n" +
+ "",
this.deltaListener.getCompilationUnitAST(this.workingCopy));
}
/*
@@ -577,12 +567,9 @@ public void testBroadcastAST2() throws JavaModelException {
this.workingCopy.reconcile(AST.JLS3, true/*force problem detection*/, null/*primary owner*/, null/*no progress*/);
assertASTNodeEquals(
"Unexpected ast",
- "package p1;\n" +
- "import p2.*;\n" +
- "public class X {\n" +
- " public void foo(){\n" +
- " }\n" +
- "}\n",
+ "function foo(){\n" +
+ "}\n" +
+ "",
this.deltaListener.getCompilationUnitAST(this.workingCopy));
}
/*
@@ -593,12 +580,9 @@ public void testBroadcastAST3() throws JavaModelException {
this.workingCopy.reconcile(AST.JLS3, false/*don't force problem detection*/, null/*primary owner*/, null/*no progress*/);
assertASTNodeEquals(
"Unexpected ast",
- "package p1;\n" +
- "import p2.*;\n" +
- "public class X {\n" +
- " public void foo(){\n" +
- " }\n" +
- "}\n",
+ "function foo(){\n" +
+ "}" +
+ "\n",
this.deltaListener.getCompilationUnitAST(this.workingCopy));
}
/*
@@ -611,20 +595,14 @@ public void testBroadcastAST4() throws CoreException {
public void run(IProgressMonitor monitor) throws CoreException {
ReconcilerTests.this.workingCopy.reconcile(AST.JLS3, true/*force problem detection*/, null/*primary owner*/, monitor);
setWorkingCopyContents(
- "package p1;\n" +
- "import p2.*;\n" +
- "public class X {\n" +
- "}");
+ "var i;");
ReconcilerTests.this.workingCopy.reconcile(AST.JLS3, false/*don't force problem detection*/, null/*primary owner*/, monitor);
}
},
null/*no progress*/);
assertASTNodeEquals(
"Unexpected ast",
- "package p1;\n" +
- "import p2.*;\n" +
- "public class X {\n" +
- "}\n",
+ "var i;\n",
this.deltaListener.getCompilationUnitAST(this.workingCopy));
}
/*
@@ -634,23 +612,20 @@ public void testBroadcastAST4() throws CoreException {
public void testBufferOpenAfterReconcile() throws CoreException {
try {
createFile(
- "/Reconciler/src/p1/Super.java",
+ "/Reconciler/src/p1/Super.js",
"package p1;\n" +
"public class Super {\n" +
"}"
);
setWorkingCopyContents(
- "package p1;\n" +
- "import p2.*;\n" +
- "public class X extends Super {\n" +
- " public void foo() {\n" +
+ " function foo() {\n" +
" }\n" +
- "}");
+ "");
IBuffer buffer = this.workingCopy.getBuffer();
this.workingCopy.reconcile(ICompilationUnit.NO_AST, true, null, null);
assertTrue("Buffer should still be open", !buffer.isClosed());
} finally {
- deleteFile("/Reconciler/src/p1/Super.java");
+ deleteFile("/Reconciler/src/p1/Super.js");
}
}
/**
@@ -659,11 +634,9 @@ public void testBufferOpenAfterReconcile() throws CoreException {
*/
public void testCancel() throws JavaModelException {
setWorkingCopyContents(
- "package p1;\n" +
- "public class X {\n" +
- " void foo(String s) {\n" +
+ " function foo( s) {\n" +
" }\n" +
- "}"
+ ""
);
this.workingCopy.makeConsistent(null);
@@ -690,21 +663,17 @@ public void testCancel() throws JavaModelException {
*/
public void testCategories1() throws JavaModelException {
setWorkingCopyContents(
- "package p1;\n" +
- "import p2.*;\n" +
- "public class X {\n" +
" /**\n" +
" * @category cat1\n" +
" */\n" +
- " public void foo() {\n" +
+ " function foo() {\n" +
" }\n" +
- "}"
+ ""
);
this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
assertDeltas(
"Unexpected delta",
- "X[*]: {CHILDREN | FINE GRAINED}\n" +
- " foo()[*]: {CATEGORIES}"
+ "foo()[*]: {CATEGORIES}"
);
}
/**
@@ -712,25 +681,19 @@ public void testCategories1() throws JavaModelException {
*/
public void testCategories2() throws JavaModelException {
setWorkingCopyContents(
- "package p1;\n" +
- "import p2.*;\n" +
- "public class X {\n" +
" /**\n" +
" * @category cat1\n" +
" */\n" +
- " public void foo() {\n" +
+ " function foo() {\n" +
" }\n" +
- "}"
+ ""
);
this.workingCopy.makeConsistent(null);
setWorkingCopyContents(
- "package p1;\n" +
- "import p2.*;\n" +
- "public class X {\n" +
- " public void foo() {\n" +
+ " function foo() {\n" +
" }\n" +
- "}"
+ ""
);
this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
assertDeltas(
@@ -744,28 +707,22 @@ public void testCategories2() throws JavaModelException {
*/
public void testCategories3() throws JavaModelException {
setWorkingCopyContents(
- "package p1;\n" +
- "import p2.*;\n" +
- "public class X {\n" +
" /**\n" +
" * @category cat1\n" +
" */\n" +
- " public void foo() {\n" +
+ " function foo() {\n" +
" }\n" +
- "}"
+ " "
);
this.workingCopy.makeConsistent(null);
setWorkingCopyContents(
- "package p1;\n" +
- "import p2.*;\n" +
- "public class X {\n" +
" /**\n" +
" * @category cat2\n" +
" */\n" +
- " public void foo() {\n" +
+ " function foo() {\n" +
" }\n" +
- "}"
+ ""
);
this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
assertDeltas(
@@ -780,22 +737,16 @@ public void testCategories3() throws JavaModelException {
*/
public void testCategories4() throws JavaModelException {
setWorkingCopyContents(
- "package p1;\n" +
- "import p2.*;\n" +
- "public class X {\n" +
" /**\n" +
" * @category cat1\n" +
" */\n" +
" int f1;\n" +
" int f2;\n" +
- "}"
+ ""
);
this.workingCopy.makeConsistent(null);
setWorkingCopyContents(
- "package p1;\n" +
- "import p2.*;\n" +
- "public class X {\n" +
" /**\n" +
" * @category cat1\n" +
" */\n" +
@@ -804,7 +755,7 @@ public void testCategories4() throws JavaModelException {
" * @category cat2\n" +
" */\n" +
" int f2;\n" +
- "}"
+ ""
);
this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
assertDeltas(
@@ -813,222 +764,126 @@ public void testCategories4() throws JavaModelException {
" f2[*]: {CATEGORIES}"
);
}
-/*
- * Ensures that changing and external jar and refreshing takes the change into account
- * (regression test for bug 134110 [regression] Does not pick-up interface changes from classes in the build path)
- */
-public void testChangeExternalJar() throws CoreException, IOException {
- IJavaProject project = getJavaProject("Reconciler");
- String jarPath = getExternalPath() + "lib.jar";
- try {
- org.eclipse.wst.jsdt.core.tests.util.Util.createJar(new String[] {
- "p/Y.java",
- "package p;\n" +
- "public class Y {\n" +
- " public void foo() {\n" +
- " }\n" +
- "}"
- }, jarPath, "1.4");
- addLibraryEntry(project, jarPath, false);
-
- // force Y.class file to be cached during resolution
- setWorkingCopyContents(
- "package p1;\n" +
- "public class X extends p.Y {\n" +
- " public void bar() {\n" +
- " foo();\n" +
- " }\n" +
- "}");
- this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
-
- // change jar and refresh
- org.eclipse.wst.jsdt.core.tests.util.Util.createJar(new String[] {
- "p/Y.java",
- "package p;\n" +
- "public class Y {\n" +
- " public void foo(String s) {\n" +
- " }\n" +
- "}"
- }, jarPath, "1.4");
- getJavaModel().refreshExternalArchives(null,null);
-
- setWorkingCopyContents(
- "package p1;\n" +
- "public class X extends p.Y {\n" +
- " public void bar() {\n" +
- " foo(\"a\");\n" +
- " }\n" +
- "}");
- this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
- assertProblems(
- "Unexpected problems",
- "----------\n" +
- "----------\n"
- );
- } finally {
- removeLibraryEntry(project, new Path(jarPath));
- deleteFile(new File(jarPath));
- }
-}
-/**
- * @bug 162621: [model][delta] Validation errors do not clear after replacing jar file
- * @test Ensures that changing an internal jar and refreshing takes the change into account
- * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=162621"
- */
-public void testChangeInternalJar() throws CoreException, IOException {
- IJavaProject project = getJavaProject("Reconciler");
- String jarName = "b162621.jar";
- try {
- String[] pathAndContents = new String[] {
- "test/before/Foo.java",
- "package test.before;\n" +
- "public class Foo {\n" +
- "}\n"
- };
- addLibrary(project, jarName, "b162621_src.zip", pathAndContents, JavaCore.VERSION_1_4);
-
- // Wait a little bit to be sure file system is aware of zip file creation
- try {
- Thread.sleep(1000);
- }
- catch (InterruptedException ie) {
- // skip
- }
-
- // Set working copy content with no error
- setUpWorkingCopy("/Reconciler/src/test/Test.java",
- "package test;\n" +
- "import test.before.Foo;\n" +
- "public class Test {\n" +
- " Foo f;\n" +
- "}\n"
- );
- assertProblems(
- "Unexpected problems",
- "----------\n" +
- "----------\n"
- );
-
- // Update working copy with Jar expected changes
- String contents = "package test;\n" +
- "import test.after.Foo;\n" +
- "public class Test {\n" +
- " Foo f;\n" +
- "}\n";
- setWorkingCopyContents(contents);
- this.workingCopy.reconcile(ICompilationUnit.NO_AST, true, null, null);
- assertProblems(
- "Wrong expected problems",
- "----------\n" +
- "1. ERROR in /Reconciler/src/test/Test.java (at line 2)\n" +
- " import test.after.Foo;\n" +
- " ^^^^^^^^^^\n" +
- "The import test.after cannot be resolved\n" +
- "----------\n" +
- "2. ERROR in /Reconciler/src/test/Test.java (at line 4)\n" +
- " Foo f;\n" +
- " ^^^\n" +
- "Foo cannot be resolved to a type\n" +
- "----------\n"
- );
-
- // change jar and refresh
- String projectLocation = project.getProject().getLocation().toOSString();
- String jarPath = projectLocation + File.separator + jarName;
- org.eclipse.wst.jsdt.core.tests.util.Util.createJar(new String[] {
- "test/after/Foo.java",
- "package test.after;\n" +
- "public class Foo {\n" +
- "}\n"
- }, jarPath, "1.4");
- project.getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
-
- try {
- Thread.sleep(1000);
- }
- catch (InterruptedException ie) {
- // skip
- }
-
- // Verify that error is gone
- this.problemRequestor.initialize(contents.toCharArray());
- this.workingCopy.reconcile(ICompilationUnit.NO_AST, true, null, null);
- assertProblems(
- "Unexpected problems",
- "----------\n" +
- "----------\n"
- );
- } finally {
- removeLibraryEntry(project, new Path(jarName));
- deleteFile(new File(jarName));
- }
-}
-/**
- * Ensures that the reconciler reconciles the new contents with the current
- * contents,updating the structure of this reconciler's compilation
- * unit, and fires the Java element deltas for the structural changes
- * of a method's type parameter change.
- */
-public void testChangeMethodTypeParameters() throws JavaModelException {
- setUp15WorkingCopy();
- clearDeltas();
- setWorkingCopyContents(
- "package p1;\n" +
- "import p2.*;\n" +
- "public class X {\n" +
- " public <T> void foo() {\n" +
- " }\n" +
- "}");
- this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
- assertDeltas(
- "Unexpected delta",
- "X[*]: {CHILDREN | FINE GRAINED}\n" +
- " foo()[*]: {CONTENT}"
- );
-}
-/**
- * Ensures that the reconciler reconciles the new contents with the current
- * contents,updating the structure of this reconciler's compilation
- * unit, and fires the Java element deltas for the structural changes
- * of a type's type parameter change.
- */
-public void testChangeTypeTypeParameters() throws JavaModelException {
- setUp15WorkingCopy();
- clearDeltas();
- setWorkingCopyContents(
- "package p1;\n" +
- "import p2.*;\n" +
- "public class X <T> {\n" +
- " public void foo() {\n" +
- " }\n" +
- "}");
- this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
- assertDeltas(
- "Unexpected delta",
- "X[*]: {CONTENT}"
- );
-}
-/**
- * Ensures that the reconciler reconciles the new contents with the current
- * contents,updating the structure of this reconciler's compilation
- * unit, and fires the Java element deltas for the structural changes
- * of a method visibility change.
- */
-public void testChangeMethodVisibility() throws JavaModelException {
- setWorkingCopyContents(
- "package p1;\n" +
- "import p2.*;\n" +
- "public class X {\n" +
- " private void foo() {\n" +
- " }\n" +
- "}");
- this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
- assertDeltas(
- "Unexpected delta",
- "X[*]: {CHILDREN | FINE GRAINED}\n" +
- " foo()[*]: {MODIFIERS CHANGED}"
- );
-}
+///*
+// * Ensures that changing and external jar and refreshing takes the change into account
+// * (regression test for bug 134110 [regression] Does not pick-up interface changes from classes in the build path)
+// */
+//public void testChangeExternalJar() throws CoreException, IOException {
+// IJavaProject project = getJavaProject("Reconciler");
+// String jarPath = getExternalPath() + "lib.jar";
+// try {
+// org.eclipse.jsdt.core.tests.util.Util.createJar(new String[] {
+// "p/Y.js",
+// "package p;\n" +
+// "public class Y {\n" +
+// " function foo() {\n" +
+// " }\n" +
+// "}"
+// }, jarPath, "1.4");
+// addLibraryEntry(project, jarPath, false);
+//
+// // force Y.class file to be cached during resolution
+// setWorkingCopyContents(
+// "package p1;\n" +
+// "public class X extends p.Y {\n" +
+// " function bar() {\n" +
+// " foo();\n" +
+// " }\n" +
+// "}");
+// this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
+//
+// // change jar and refresh
+// org.eclipse.jsdt.core.tests.util.Util.createJar(new String[] {
+// "p/Y.js",
+// "package p;\n" +
+// "public class Y {\n" +
+// " function foo(String s) {\n" +
+// " }\n" +
+// "}"
+// }, jarPath, "1.4");
+// getJavaModel().refreshExternalArchives(null,null);
+//
+// setWorkingCopyContents(
+// "package p1;\n" +
+// "public class X extends p.Y {\n" +
+// " function bar() {\n" +
+// " foo(\"a\");\n" +
+// " }\n" +
+// "}");
+// this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
+// assertProblems(
+// "Unexpected problems",
+// "----------\n" +
+// "----------\n"
+// );
+// } finally {
+// removeLibraryEntry(project, new Path(jarPath));
+// deleteFile(new File(jarPath));
+// }
+//}
+///**
+// * Ensures that the reconciler reconciles the new contents with the current
+// * contents,updating the structure of this reconciler's compilation
+// * unit, and fires the Java element deltas for the structural changes
+// * of a method's type parameter change.
+// */
+//public void testChangeMethodTypeParameters() throws JavaModelException {
+// setUp15WorkingCopy();
+// clearDeltas();
+// setWorkingCopyContents(
+// " public <T> void foo() {\n" +
+// " }\n" +
+// "");
+// this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
+// assertDeltas(
+// "Unexpected delta",
+// "X[*]: {CHILDREN | FINE GRAINED}\n" +
+// " foo()[*]: {CONTENT}"
+// );
+//}
+///**
+// * Ensures that the reconciler reconciles the new contents with the current
+// * contents,updating the structure of this reconciler's compilation
+// * unit, and fires the Java element deltas for the structural changes
+// * of a type's type parameter change.
+// */
+//public void testChangeTypeTypeParameters() throws JavaModelException {
+// setUp15WorkingCopy();
+// clearDeltas();
+// setWorkingCopyContents(
+// "package p1;\n" +
+// "import p2.*;\n" +
+// "public class X <T> {\n" +
+// " function foo() {\n" +
+// " }\n" +
+// "}");
+// this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
+// assertDeltas(
+// "Unexpected delta",
+// "X[*]: {CONTENT}"
+// );
+//}
+///**
+// * Ensures that the reconciler reconciles the new contents with the current
+// * contents,updating the structure of this reconciler's compilation
+// * unit, and fires the Java element deltas for the structural changes
+// * of a method visibility change.
+// */
+//public void testChangeMethodVisibility() throws JavaModelException {
+// setWorkingCopyContents(
+// "package p1;\n" +
+// "import p2.*;\n" +
+// "public class X {\n" +
+// " private void foo() {\n" +
+// " }\n" +
+// "}");
+// this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
+// assertDeltas(
+// "Unexpected delta",
+// "X[*]: {CHILDREN | FINE GRAINED}\n" +
+// " foo()[*]: {MODIFIERS CHANGED}"
+// );
+//}
/**
* Ensures that the correct delta is reported when closing the working copy and modifying its buffer.
*/
@@ -1036,91 +891,87 @@ public void testCloseWorkingCopy() throws JavaModelException {
IBuffer buffer = this.workingCopy.getBuffer();
this.workingCopy.close();
buffer.setContents(
- "package p1;\n" +
- "import p2.*;\n" +
- "public class X {\n" +
- " public void foo() {\n" +
+ " function foo() {\n" +
" }\n" +
- " public void bar() {\n" +
+ " function bar() {\n" +
" }\n" +
- "}");
+ "");
this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
assertDeltas(
"Unexpected delta",
- "X[*]: {CHILDREN | FINE GRAINED}\n" +
- " bar()[+]: {}"
- );
-}
-
-/**
- * Ensures that a reference to a constant with type mismatch doesn't show an error.
- * (regression test for bug 17104 Compiler does not complain but "Quick Fix" ??? complains)
- */
-public void testConstantReference() throws CoreException {
- try {
- createFile(
- "/Reconciler/src/p1/OS.java",
- "package p1;\n" +
- "public class OS {\n" +
- " public static final int CONST = 23 * 1024;\n" +
- "}");
- setWorkingCopyContents(
- "package p1;\n" +
- "public class X {\n" +
- " public short c;\n" +
- " public static void main(String[] arguments) {\n" +
- " short c = 1;\n" +
- " switch (c) {\n" +
- " case OS.CONST: return;\n" +
- " }\n" +
- " }\n" +
- "}");
- this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
- assertProblems(
- "Unexpected problems",
- "----------\n" +
- "----------\n"
- );
- } finally {
- deleteFile("/Reconciler/src/p1/OS.java");
- }
-}
+ "bar()[+]: {}"
+ );
+}
+
+///**
+// * Ensures that a reference to a constant with type mismatch doesn't show an error.
+// * (regression test for bug 17104 Compiler does not complain but "Quick Fix" ??? complains)
+// */
+//public void testConstantReference() throws CoreException {
+// try {
+// createFile(
+// "/Reconciler/src/p1/OS.js",
+// "package p1;\n" +
+// "public class OS {\n" +
+// " public static final int CONST = 23 * 1024;\n" +
+// "}");
+// setWorkingCopyContents(
+// "package p1;\n" +
+// "public class X {\n" +
+// " public short c;\n" +
+// " public static void main(String[] arguments) {\n" +
+// " short c = 1;\n" +
+// " switch (c) {\n" +
+// " case OS.CONST: return;\n" +
+// " }\n" +
+// " }\n" +
+// "}");
+// this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
+// assertProblems(
+// "Unexpected problems",
+// "----------\n" +
+// "----------\n"
+// );
+// } finally {
+// deleteFile("/Reconciler/src/p1/OS.js");
+// }
+//}
/*
- * Ensures that the source type converter doesn't throw an OutOfMemoryError if converting a generic type with a primitive type array as argument
- * (regression test for bug 135296 opening a special java file results in an "out of memory" message)
- */
-public void testConvertPrimitiveTypeArrayTypeArgument() throws CoreException {
- ICompilationUnit otherCopy = null;
- try {
- WorkingCopyOwner owner = new WorkingCopyOwner() {};
- otherCopy = getWorkingCopy(
- "Reconciler15/src/Y.java",
- "public class Y {\n" +
- " void foo(Z<int[]> z) {}\n" +
- "}\n" +
- "class Z<E> {\n" +
- "}",
- owner,
- false/*don't compute problems*/);
- setUp15WorkingCopy("/Reconciler15/src/X.java", owner);
- setWorkingCopyContents(
- "public class X {\n" +
- " void bar(Y y) {\n" +
- " y.foo(new Z<int[]>());\n" +
- " }\n" +
- "}"
- );
- this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, owner, null);
- assertProblems(
- "Unexpected problems",
- "----------\n" +
- "----------\n"
- );
- } finally {
- if (otherCopy != null)
- otherCopy.discardWorkingCopy();
- }
-}
+// * Ensures that the source type converter doesn't throw an OutOfMemoryError if converting a generic type with a primitive type array as argument
+// * (regression test for bug 135296 opening a special java file results in an "out of memory" message)
+// */
+//public void testConvertPrimitiveTypeArrayTypeArgument() throws CoreException {
+// ICompilationUnit otherCopy = null;
+// try {
+// WorkingCopyOwner owner = new WorkingCopyOwner() {};
+// otherCopy = getWorkingCopy(
+// "Reconciler15/src/Y.js",
+// "public class Y {\n" +
+// " void foo(Z<int[]> z) {}\n" +
+// "}\n" +
+// "class Z<E> {\n" +
+// "}",
+// owner,
+// false/*don't compute problems*/);
+// setUp15WorkingCopy("/Reconciler15/src/X.js", owner);
+// setWorkingCopyContents(
+// "public class X {\n" +
+// " void bar(Y y) {\n" +
+// " y.foo(new Z<int[]>());\n" +
+// " }\n" +
+// "}"
+// );
+// this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, owner, null);
+// assertProblems(
+// "Unexpected problems",
+// "----------\n" +
+// "----------\n"
+// );
+// } finally {
+// if (otherCopy != null)
+// otherCopy.discardWorkingCopy();
+// }
+//}
/**
* Ensures that the reconciler reconciles the new contents with the current
* contents, updating the structure of this reconciler's compilation
@@ -1129,15 +980,11 @@ public void testConvertPrimitiveTypeArrayTypeArgument() throws CoreException {
*/
public void testDeleteMethod1() throws JavaModelException {
setWorkingCopyContents(
- "package p1;\n" +
- "import p2.*;\n" +
- "public class X {\n" +
- "}");
+ " ");
this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
assertDeltas(
"Unexpected delta",
- "X[*]: {CHILDREN | FINE GRAINED}\n" +
- " foo()[-]: {}"
+ "foo()[-]: {}"
);
}
/**
@@ -1149,29 +996,22 @@ public void testDeleteMethod1() throws JavaModelException {
public void testDeleteTwoMethods() throws JavaModelException {
// create 2 methods
setWorkingCopyContents(
- "package p1;\n" +
- "import p2.*;\n" +
- "public class X {\n" +
- " public void foo() {\n" +
+ " function foo() {\n" +
" }\n" +
- " public void bar() {\n" +
+ " function bar() {\n" +
" }\n" +
- "}");
+ "");
this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
// delete the 2 methods
clearDeltas();
setWorkingCopyContents(
- "package p1;\n" +
- "import p2.*;\n" +
- "public class X {\n" +
- "}");
+ " ");
this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
assertDeltas(
"Unexpected delta",
- "X[*]: {CHILDREN | FINE GRAINED}\n" +
- " bar()[-]: {}\n" +
- " foo()[-]: {}"
+ "bar()[-]: {}\n" +
+ "foo()[-]: {}"
);
}
/*
@@ -1184,7 +1024,7 @@ public void testExcludePartOfAnotherProject1() throws CoreException {
createJavaProject("P");
createFolder("/P/p/internal");
createFile(
- "/P/p/internal/Y.java",
+ "/P/p/internal/Y.js",
"package p.internal;\n" +
"public class Y {\n" +
"}"
@@ -1219,7 +1059,7 @@ public void testExcludePartOfAnotherProject2() throws CoreException {
createJavaProject("P");
createFolder("/P/p/api");
createFile(
- "/P/p/api/Y.java",
+ "/P/p/api/Y.js",
"package p.api;\n" +
"public class Y {\n" +
"}"
@@ -1248,7 +1088,7 @@ public void testExternal1() throws CoreException {
this.workingCopy = null;
this.problemRequestor = new ProblemRequestor();
IClasspathEntry[] classpath = new IClasspathEntry[] {JavaCore.newLibraryEntry(getExternalJCLPath(), null, null)};
- this.workingCopy = newExternalWorkingCopy("External.java", classpath, this.problemRequestor,
+ this.workingCopy = newExternalWorkingCopy("External.js", classpath, this.problemRequestor,
"public class External {\n"+
" String foo(){\n"+
" return \"\";\n" +
@@ -1285,7 +1125,7 @@ public void testExternal2() throws CoreException {
IClasspathEntry[] classpath = new IClasspathEntry[] {
JavaCore.newContainerEntry(new Path("org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"))
};
- this.workingCopy = newExternalWorkingCopy("External.java", classpath, this.problemRequestor,
+ this.workingCopy = newExternalWorkingCopy("External.js", classpath, this.problemRequestor,
"public class External {\n"+
" String foo(){\n"+
" return \"\";\n" +
@@ -1309,7 +1149,7 @@ public void testIncludePartOfAnotherProject1() throws CoreException {
createJavaProject("P");
createFolder("/P/p/api");
createFile(
- "/P/p/api/Y.java",
+ "/P/p/api/Y.js",
"package p.api;\n" +
"public class Y {\n" +
"}"
@@ -1340,7 +1180,7 @@ public void testIncludePartOfAnotherProject2() throws CoreException {
createJavaProject("P");
createFolder("/P/p/internal");
createFile(
- "/P/p/internal/Y.java",
+ "/P/p/internal/Y.js",
"package p.internal;\n" +
"public class Y {\n" +
"}"
@@ -1416,7 +1256,7 @@ public void testIgnoreIfBetterNonAccessibleRule1() throws CoreException {
createJavaProject("P1");
createFolder("/P1/p/internal");
createFile(
- "/P1/p/internal/Y.java",
+ "/P1/p/internal/Y.js",
"package p.internal;\n" +
"public class Y {\n" +
"}"
@@ -1424,7 +1264,7 @@ public void testIgnoreIfBetterNonAccessibleRule1() throws CoreException {
createJavaProject("P2");
createFolder("/P2/p/internal");
createFile(
- "/P2/p/internal/Y.java",
+ "/P2/p/internal/Y.js",
"package p.internal;\n" +
"public class Y {\n" +
"}"
@@ -1457,7 +1297,7 @@ public void testIgnoreIfBetterNonAccessibleRule2() throws CoreException {
createJavaProject("P1");
createFolder("/P1/p/internal");
createFile(
- "/P1/p/internal/Y.java",
+ "/P1/p/internal/Y.js",
"package p.internal;\n" +
"public class Y {\n" +
"}"
@@ -1465,7 +1305,7 @@ public void testIgnoreIfBetterNonAccessibleRule2() throws CoreException {
createJavaProject("P2");
createFolder("/P2/p/internal");
createFile(
- "/P2/p/internal/Y.java",
+ "/P2/p/internal/Y.js",
"package p.internal;\n" +
"public class Y {\n" +
"}"
@@ -1502,7 +1342,7 @@ public void testIgnoreIfBetterNonAccessibleRule3() throws CoreException {
createJavaProject("P1");
createFolder("/P1/p/internal");
createFile(
- "/P1/p/internal/Y.java",
+ "/P1/p/internal/Y.js",
"package p.internal;\n" +
"public class Y {\n" +
"}"
@@ -1510,7 +1350,7 @@ public void testIgnoreIfBetterNonAccessibleRule3() throws CoreException {
createJavaProject("P2");
createFolder("/P2/p/internal");
createFile(
- "/P2/p/internal/Y.java",
+ "/P2/p/internal/Y.js",
"package p.internal;\n" +
"public class Y {\n" +
"}"
@@ -1547,7 +1387,7 @@ public void testIgnoreIfBetterNonAccessibleRule4() throws CoreException {
createJavaProject("P1");
createFolder("/P1/p/internal");
createFile(
- "/P1/p/internal/Y.java",
+ "/P1/p/internal/Y.js",
"package p.internal;\n" +
"public class Y {\n" +
"}"
@@ -1684,7 +1524,7 @@ public void testMethodWithError04() throws CoreException {
CancelingProblemRequestor myPbRequestor = new CancelingProblemRequestor();
this.workingCopy.discardWorkingCopy();
- ICompilationUnit x = getCompilationUnit("Reconciler", "src", "p1", "X.java");
+ ICompilationUnit x = getCompilationUnit("Reconciler", "src", "p1", "X.js");
this.problemRequestor = myPbRequestor;
this.workingCopy = x.getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
@@ -1729,11 +1569,11 @@ public void testMethodWithError05() throws CoreException {
" } \n"+
"} \n";
createFile(
- "/Reconciler/src/tests/AbstractSearchableSource.java",
+ "/Reconciler/src/tests/AbstractSearchableSource.js",
contents);
createFile(
- "/Reconciler/src/tests/Source.java",
+ "/Reconciler/src/tests/Source.js",
"package tests; \n"+
"interface Source { \n"+
" long getValue(int index); \n"+
@@ -1741,7 +1581,7 @@ public void testMethodWithError05() throws CoreException {
"} \n");
createFile(
- "/Reconciler/src/tests/AbstractSource.java",
+ "/Reconciler/src/tests/AbstractSource.js",
"package tests; \n"+
"abstract class AbstractSource implements Source { \n"+
" AbstractSource() { \n"+
@@ -1759,13 +1599,13 @@ public void testMethodWithError05() throws CoreException {
"} \n");
createFile(
- "/Reconciler/src/tests/SearchableSource.java",
+ "/Reconciler/src/tests/SearchableSource.js",
"package tests; \n"+
"interface SearchableSource extends Source { \n"+
" int indexOf(long value); \n"+
"} \n");
- ICompilationUnit compilationUnit = getCompilationUnit("Reconciler", "src", "tests", "AbstractSearchableSource.java");
+ ICompilationUnit compilationUnit = getCompilationUnit("Reconciler", "src", "tests", "AbstractSearchableSource.js");
ProblemRequestor pbReq = new ProblemRequestor();
ICompilationUnit wc = compilationUnit.getWorkingCopy(new WorkingCopyOwner() {}, pbReq, null);
pbReq.initialize(contents.toCharArray());
@@ -1783,10 +1623,10 @@ public void testMethodWithError05() throws CoreException {
expected,
actual);
} finally {
- deleteFile("/Reconciler/src/tests/AbstractSearchableSource.java");
- deleteFile("/Reconciler/src/tests/SearchableSource.java");
- deleteFile("/Reconciler/src/tests/Source.java");
- deleteFile("/Reconciler/src/tests/AbstractSource.java");
+ deleteFile("/Reconciler/src/tests/AbstractSearchableSource.js");
+ deleteFile("/Reconciler/src/tests/SearchableSource.js");
+ deleteFile("/Reconciler/src/tests/Source.js");
+ deleteFile("/Reconciler/src/tests/AbstractSource.js");
deleteFolder("/Reconciler/src/tests");
}
}
@@ -1805,12 +1645,12 @@ public void testMethodWithError06() throws CoreException {
" }\n" +
"}";
createFile(
- "/Reconciler/src/p1/Y.java",
+ "/Reconciler/src/p1/Y.js",
contents
);
this.problemRequestor = new ProblemRequestor();
this.problemRequestor.initialize(contents.toCharArray());
- this.workingCopy = getCompilationUnit("Reconciler/src/p1/Y.java").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
+ this.workingCopy = getCompilationUnit("Reconciler/src/p1/Y.js").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
assertProblems(
"Unexpected problems",
"----------\n" +
@@ -1821,7 +1661,7 @@ public void testMethodWithError06() throws CoreException {
"----------\n"
);
} finally {
- deleteFile("/Reconciler/src/p1/Y.java");
+ deleteFile("/Reconciler/src/p1/Y.js");
}
}
/*
@@ -1839,12 +1679,12 @@ public void testMethodWithError07() throws CoreException {
" }\n" +
"}";
createFile(
- "/Reconciler/src/p1/Y.java",
+ "/Reconciler/src/p1/Y.js",
contents
);
this.problemRequestor = new ProblemRequestor();
this.problemRequestor.initialize(contents.toCharArray());
- this.workingCopy = getCompilationUnit("Reconciler/src/p1/Y.java").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
+ this.workingCopy = getCompilationUnit("Reconciler/src/p1/Y.js").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
// Close working copy
JavaModelManager.getJavaModelManager().removeInfoAndChildren((CompilationUnit)workingCopy); // use a back door as working copies cannot be closed
@@ -1862,7 +1702,7 @@ public void testMethodWithError07() throws CoreException {
"----------\n"
);
} finally {
- deleteFile("/Reconciler/src/p1/Y.java");
+ deleteFile("/Reconciler/src/p1/Y.js");
}
}
/*
@@ -1874,7 +1714,7 @@ public void testMethodWithError08() throws CoreException {
this.workingCopy = null;
try {
createFile(
- "/Reconciler/src/p1/X01.java",
+ "/Reconciler/src/p1/X01.js",
"package p1;\n" +
"public abstract class X01 {\n" +
" public abstract void bar(); \n"+
@@ -1887,12 +1727,12 @@ public void testMethodWithError08() throws CoreException {
" public void bar(){} \n"+
"}";
createFile(
- "/Reconciler/src/p2/X01.java",
+ "/Reconciler/src/p2/X01.js",
contents
);
this.problemRequestor = new ProblemRequestor();
this.problemRequestor.initialize(contents.toCharArray());
- this.workingCopy = getCompilationUnit("Reconciler/src/p2/X01.java").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
+ this.workingCopy = getCompilationUnit("Reconciler/src/p2/X01.js").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
// Close working copy
JavaModelManager.getJavaModelManager().removeInfoAndChildren((CompilationUnit)workingCopy); // use a back door as working copies cannot be closed
@@ -1906,8 +1746,8 @@ public void testMethodWithError08() throws CoreException {
"----------\n" // shouldn't report problem against p2.X01
);
} finally {
- deleteFile("/Reconciler/src/p1/X01.java");
- deleteFile("/Reconciler/src/p2/X01.java");
+ deleteFile("/Reconciler/src/p1/X01.js");
+ deleteFile("/Reconciler/src/p2/X01.js");
}
}
/*
@@ -1919,7 +1759,7 @@ public void testMethodWithError09() throws CoreException {
WorkingCopyOwner owner = new WorkingCopyOwner() {};
ICompilationUnit workingCopy1 = null;
try {
- workingCopy1 = getCompilationUnit("/Reconciler/src/p1/X1.java").getWorkingCopy(owner, null, null);
+ workingCopy1 = getCompilationUnit("/Reconciler/src/p1/X1.js").getWorkingCopy(owner, null, null);
workingCopy1.getBuffer().setContents(
"package p1;\n" +
"public abstract class X1 {\n" +
@@ -1929,7 +1769,7 @@ public void testMethodWithError09() throws CoreException {
workingCopy1.makeConsistent(null);
this.problemRequestor = new ProblemRequestor();
- this.workingCopy = getCompilationUnit("Reconciler/src/p/X.java").getWorkingCopy(owner, this.problemRequestor, null);
+ this.workingCopy = getCompilationUnit("Reconciler/src/p/X.js").getWorkingCopy(owner, this.problemRequestor, null);
setWorkingCopyContents(
"package p;\n" +
"public class X extends p1.X1 {\n" +
@@ -1959,7 +1799,7 @@ public void testMethodWithError10() throws CoreException {
ICompilationUnit workingCopy1 = null;
try {
createFolder("/Reconciler15/src/test/cheetah");
- workingCopy1 = getCompilationUnit("/Reconciler15/src/test/cheetah/NestedGenerics.java").getWorkingCopy(owner, null, null);
+ workingCopy1 = getCompilationUnit("/Reconciler15/src/test/cheetah/NestedGenerics.js").getWorkingCopy(owner, null, null);
workingCopy1.getBuffer().setContents(
"package test.cheetah;\n"+
"import java.util.List;\n"+
@@ -1971,7 +1811,7 @@ public void testMethodWithError10() throws CoreException {
workingCopy1.makeConsistent(null);
this.problemRequestor = new ProblemRequestor();
- this.workingCopy = getCompilationUnit("Reconciler15/src/test/cheetah/NestedGenericsTest.java").getWorkingCopy(owner, this.problemRequestor, null);
+ this.workingCopy = getCompilationUnit("Reconciler15/src/test/cheetah/NestedGenericsTest.js").getWorkingCopy(owner, this.problemRequestor, null);
setWorkingCopyContents(
"package test.cheetah;\n"+
"import java.util.Stack;\n"+
@@ -2005,7 +1845,7 @@ public void testMethodWithError11() throws CoreException {
ICompilationUnit workingCopy1 = null;
try {
createFolder("/Reconciler15/src/test/cheetah");
- workingCopy1 = getCompilationUnit("/Reconciler15/src/test/cheetah/NestedGenerics.java").getWorkingCopy(owner, null, null);
+ workingCopy1 = getCompilationUnit("/Reconciler15/src/test/cheetah/NestedGenerics.js").getWorkingCopy(owner, null, null);
workingCopy1.getBuffer().setContents(
"package test.cheetah;\n"+
"import java.util.*;\n"+
@@ -2018,7 +1858,7 @@ public void testMethodWithError11() throws CoreException {
workingCopy1.makeConsistent(null);
this.problemRequestor = new ProblemRequestor();
- this.workingCopy = getCompilationUnit("Reconciler15/src/test/cheetah/NestedGenericsTest.java").getWorkingCopy(owner, this.problemRequestor, null);
+ this.workingCopy = getCompilationUnit("Reconciler15/src/test/cheetah/NestedGenericsTest.js").getWorkingCopy(owner, this.problemRequestor, null);
setWorkingCopyContents(
"package test.cheetah;\n"+
"import java.util.*;\n"+
@@ -2054,7 +1894,7 @@ public void testMethodWithError12() throws CoreException {
ICompilationUnit workingCopy1 = null;
try {
createFolder("/Reconciler15/src/test/cheetah");
- workingCopy1 = getCompilationUnit("/Reconciler15/src/test/cheetah/NestedGenerics.java").getWorkingCopy(owner, null, null);
+ workingCopy1 = getCompilationUnit("/Reconciler15/src/test/cheetah/NestedGenerics.js").getWorkingCopy(owner, null, null);
workingCopy1.getBuffer().setContents(
"package test.cheetah;\n"+
"import java.util.*;\n"+
@@ -2067,7 +1907,7 @@ public void testMethodWithError12() throws CoreException {
workingCopy1.makeConsistent(null);
this.problemRequestor = new ProblemRequestor();
- this.workingCopy = getCompilationUnit("Reconciler15/src/test/cheetah/NestedGenericsTest.java").getWorkingCopy(owner, this.problemRequestor, null);
+ this.workingCopy = getCompilationUnit("Reconciler15/src/test/cheetah/NestedGenericsTest.js").getWorkingCopy(owner, this.problemRequestor, null);
setWorkingCopyContents(
"package test.cheetah;\n"+
"import java.util.*;\n"+
@@ -2102,7 +1942,7 @@ public void testMethodWithError13() throws CoreException {
WorkingCopyOwner owner = new WorkingCopyOwner() {};
ICompilationUnit workingCopy1 = null;
try {
- workingCopy1 = getCompilationUnit("/Reconciler15/src/test/X.java").getWorkingCopy(owner, null, null);
+ workingCopy1 = getCompilationUnit("/Reconciler15/src/test/X.js").getWorkingCopy(owner, null, null);
createFolder("/Reconciler15/src/test");
workingCopy1.getBuffer().setContents(
"package test;\n"+
@@ -2117,7 +1957,7 @@ public void testMethodWithError13() throws CoreException {
workingCopy1.makeConsistent(null);
this.problemRequestor = new ProblemRequestor();
- this.workingCopy = getCompilationUnit("Reconciler15/src/test/Y.java").getWorkingCopy(owner, this.problemRequestor, null);
+ this.workingCopy = getCompilationUnit("Reconciler15/src/test/Y.js").getWorkingCopy(owner, this.problemRequestor, null);
setWorkingCopyContents(
"package test;\n"+
"public class Y {\n"+
@@ -2154,7 +1994,7 @@ public void testMethodWithError14() throws CoreException {
WorkingCopyOwner owner = new WorkingCopyOwner() {};
ICompilationUnit workingCopy1 = null;
try {
- workingCopy1 = getCompilationUnit("/Reconciler15/src/test/X.java").getWorkingCopy(owner, null, null);
+ workingCopy1 = getCompilationUnit("/Reconciler15/src/test/X.js").getWorkingCopy(owner, null, null);
createFolder("/Reconciler15/src/test");
workingCopy1.getBuffer().setContents(
"package test;\n"+
@@ -2165,7 +2005,7 @@ public void testMethodWithError14() throws CoreException {
workingCopy1.makeConsistent(null);
this.problemRequestor = new ProblemRequestor();
- this.workingCopy = getCompilationUnit("Reconciler15/src/test/Y.java").getWorkingCopy(owner, this.problemRequestor, null);
+ this.workingCopy = getCompilationUnit("Reconciler15/src/test/Y.js").getWorkingCopy(owner, this.problemRequestor, null);
setWorkingCopyContents(
"package test;\n"+
"public class Y {\n"+
@@ -2267,13 +2107,13 @@ public void testRawUsage() throws CoreException {
try {
WorkingCopyOwner owner = new WorkingCopyOwner() {};
otherCopy = getWorkingCopy(
- "Reconciler15/src/Generic105756.java",
+ "Reconciler15/src/Generic105756.js",
"public class Generic105756<T> {\n" +
" void foo() {}\n" +
"}",
owner,
false/*don't compute problems*/);
- setUp15WorkingCopy("/Reconciler15/src/X.java", owner);
+ setUp15WorkingCopy("/Reconciler15/src/X.js", owner);
setWorkingCopyContents(
"public class X {\n" +
" void bar(Generic105756 g) {\n" +
@@ -2585,14 +2425,14 @@ public void testSuppressWarnings1() throws JavaModelException {
try {
WorkingCopyOwner owner = new WorkingCopyOwner() {};
otherCopy = getWorkingCopy(
- "/Reconciler15/src/X.java",
+ "/Reconciler15/src/X.js",
"@Deprecated\n" +
"public class X {\n" +
" void foo(){}\n" +
"}\n",
owner,
false/*don't compute problems*/);
- setUp15WorkingCopy("/Reconciler15/src/Y.java", owner);
+ setUp15WorkingCopy("/Reconciler15/src/Y.js", owner);
setWorkingCopyContents(
"public class Y extends X {\n" +
" @SuppressWarnings(\"all\")\n" +
@@ -2627,13 +2467,13 @@ public void testSuppressWarnings2() throws JavaModelException {
try {
WorkingCopyOwner owner = new WorkingCopyOwner() {};
otherCopy = getWorkingCopy(
- "/Reconciler15/src/java/util/List.java",
+ "/Reconciler15/src/java/util/List.js",
"package java.util;\n" +
"public interface List<E> {\n" +
"}\n",
owner,
false/*don't compute problems*/);
- setUp15WorkingCopy("/Reconciler15/src/X.java", owner);
+ setUp15WorkingCopy("/Reconciler15/src/X.js", owner);
setWorkingCopyContents(
"import java.util.List;\n" +
"\n" +
@@ -2676,13 +2516,13 @@ public void testSuppressWarnings3() throws JavaModelException {
try {
WorkingCopyOwner owner = new WorkingCopyOwner() {};
otherCopy = getWorkingCopy(
- "/Reconciler15/src/java/util/HashMap.java",
+ "/Reconciler15/src/java/util/HashMap.js",
"package java.util;\n" +
"public class HashMap implements Map {\n" +
"}\n",
owner,
false/*don't compute problems*/);
- setUp15WorkingCopy("/Reconciler15/src/X.java", owner);
+ setUp15WorkingCopy("/Reconciler15/src/X.js", owner);
setWorkingCopyContents(
"import java.util.*;\n" +
"@SuppressWarnings(\"unchecked\")\n" +
@@ -2716,14 +2556,14 @@ public void testSuppressWarnings4() throws JavaModelException {
try {
WorkingCopyOwner owner = new WorkingCopyOwner() {};
otherCopy = getWorkingCopy(
- "/Reconciler15/src/X.java",
+ "/Reconciler15/src/X.js",
"/** @deprecated */\n" +
"public class X {\n" +
" void foo(){}\n" +
"}\n",
owner,
false/*don't compute problems*/);
- setUp15WorkingCopy("/Reconciler15/src/Y.java", owner);
+ setUp15WorkingCopy("/Reconciler15/src/Y.js", owner);
setWorkingCopyContents(
"public class Y extends X {\n" +
" @SuppressWarnings(\"all\")\n" +
@@ -2819,7 +2659,7 @@ public void testTwoProjectsWithDifferentCompliances() throws CoreException {
createJavaProject("P1", new String[] {""}, new String[] {"JCL15_LIB"}, "", "1.5");
createFolder("/P1/p");
createFile(
- "/P1/p/X.java",
+ "/P1/p/X.js",
"package p;\n" +
"public class X {\n" +
" void foo(Class<String> c) {\n" +
@@ -2830,7 +2670,7 @@ public void testTwoProjectsWithDifferentCompliances() throws CoreException {
createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P1"}, "", "1.4");
createFolder("/P2/p");
WorkingCopyOwner owner = new WorkingCopyOwner() {};
- this.workingCopy = getWorkingCopy("/P2/p/Y.java", "", owner, this.problemRequestor);
+ this.workingCopy = getWorkingCopy("/P2/p/Y.js", "", owner, this.problemRequestor);
setWorkingCopyContents(
"package p;\n" +
"public class Y {\n" +
@@ -2860,7 +2700,7 @@ public void testTypeParameterWithBound() throws CoreException {
ICompilationUnit workingCopy1 = null;
try {
workingCopy1 = getWorkingCopy(
- "/Reconciler15/src/test/I.java",
+ "/Reconciler15/src/test/I.js",
"package test;\n"+
"public interface I {\n"+
" <T extends I> void foo(T t);\n"+
@@ -2870,7 +2710,7 @@ public void testTypeParameterWithBound() throws CoreException {
);
this.problemRequestor = new ProblemRequestor();
- this.workingCopy = getWorkingCopy("Reconciler15/src/test/X.java", "", owner, this.problemRequestor);
+ this.workingCopy = getWorkingCopy("Reconciler15/src/test/X.js", "", owner, this.problemRequestor);
setWorkingCopyContents(
"package test;\n"+
"public class X implements I {\n"+
@@ -2902,7 +2742,7 @@ public void testTypeParameterStartingWithDollar() throws CoreException {
ICompilationUnit workingCopy1 = null;
try {
workingCopy1 = getWorkingCopy(
- "/Reconciler15/src/test/Y.java",
+ "/Reconciler15/src/test/Y.js",
"package test;\n"+
"public class Y<$T> {\n"+
" void foo($T t);\n"+
@@ -2912,7 +2752,7 @@ public void testTypeParameterStartingWithDollar() throws CoreException {
);
this.problemRequestor = new ProblemRequestor();
- this.workingCopy = getWorkingCopy("Reconciler15/src/test/X.java", "", owner, this.problemRequestor);
+ this.workingCopy = getWorkingCopy("Reconciler15/src/test/X.js", "", owner, this.problemRequestor);
setWorkingCopyContents(
"package test;\n"+
"public class X {\n"+
@@ -2947,11 +2787,11 @@ public void testTypeWithDollarName() throws CoreException {
"public class Y$Z {\n" +
"}";
createFile(
- "/Reconciler/src/p1/Y$Z.java",
+ "/Reconciler/src/p1/Y$Z.js",
contents
);
this.problemRequestor = new ProblemRequestor();
- this.workingCopy = getCompilationUnit("Reconciler/src/p1/Y$Z.java").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
+ this.workingCopy = getCompilationUnit("Reconciler/src/p1/Y$Z.js").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
this.problemRequestor.initialize(contents.toCharArray());
this.workingCopy.reconcile(ICompilationUnit.NO_AST, true, null, null);
@@ -2961,7 +2801,7 @@ public void testTypeWithDollarName() throws CoreException {
"----------\n"
);
} finally {
- deleteFile("/Reconciler/src/p1/Y$Z.java");
+ deleteFile("/Reconciler/src/p1/Y$Z.js");
}
}
/*
@@ -2973,7 +2813,7 @@ public void testTypeWithDollarName2() throws CoreException {
try {
WorkingCopyOwner owner = this.workingCopy.getOwner();
workingCopy2 = getWorkingCopy(
- "/Reconciler/src/p1/Y$Z.java",
+ "/Reconciler/src/p1/Y$Z.js",
"package p1;\n" +
"public class Y$Z {\n" +
"}",
@@ -3007,7 +2847,7 @@ public void testVarargs() throws CoreException {
ICompilationUnit workingCopy1 = null;
try {
workingCopy1 = getWorkingCopy(
- "/Reconciler15/src/test/X.java",
+ "/Reconciler15/src/test/X.js",
"package test;\n"+
"public class X {\n"+
" void bar(String ... args) {}\n"+
@@ -3017,7 +2857,7 @@ public void testVarargs() throws CoreException {
);
this.problemRequestor = new ProblemRequestor();
- this.workingCopy = getWorkingCopy("Reconciler15/src/test/Y.java", "", owner, this.problemRequestor);
+ this.workingCopy = getWorkingCopy("Reconciler15/src/test/Y.js", "", owner, this.problemRequestor);
setWorkingCopyContents(
"package test;\n"+
"public class Y {\n"+
@@ -3100,25 +2940,25 @@ public void testBug36032a() throws CoreException, InterruptedException {
" }\n" +
"}\n";
this.createFile(
- "/P/Foo.java",
+ "/P/Foo.js",
"class SFoo { void foo() {} }\n"
);
this.createFile(
- "/P/Test.java",
+ "/P/Test.js",
source
);
// Get compilation unit and reconcile it
char[] sourceChars = source.toCharArray();
this.problemRequestor.initialize(sourceChars);
- this.workingCopy = getCompilationUnit("/P/Test.java").getWorkingCopy(new WorkingCopyOwner() {}, problemRequestor, null);
+ this.workingCopy = getCompilationUnit("/P/Test.js").getWorkingCopy(new WorkingCopyOwner() {}, problemRequestor, null);
this.workingCopy.getBuffer().setContents(source);
this.workingCopy.reconcile(AST.JLS3, true, null, null);
assertNoProblem(sourceChars, this.workingCopy);
// Add new secondary type
this.createFile(
- "/P/Bar.java",
+ "/P/Bar.js",
"class SBar{ void bar() {} }\n"
);
source =
@@ -3151,29 +2991,29 @@ public void testBug36032b() throws CoreException, InterruptedException {
" }\n" +
"}\n";
createFile(
- "/P/Foo.java",
+ "/P/Foo.js",
"class SFoo { void foo() {} }\n"
);
createFile(
- "/P/Test.java",
+ "/P/Test.js",
source
);
createFile(
- "/P/Bar.java",
+ "/P/Bar.js",
"class SBar{ void bar() {} }\n"
);
// Get compilation unit and reconcile it
char[] sourceChars = source.toCharArray();
this.problemRequestor.initialize(sourceChars);
- this.workingCopy = getCompilationUnit("/P/Test.java").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
+ this.workingCopy = getCompilationUnit("/P/Test.js").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
this.workingCopy.getBuffer().setContents(source);
this.workingCopy.reconcile(AST.JLS3, true, null, null);
assertNoProblem(sourceChars, this.workingCopy);
// Delete secondary type => should get a problem
waitUntilIndexesReady();
- deleteFile("/P/Bar.java");
+ deleteFile("/P/Bar.js");
this.problemRequestor.initialize(source.toCharArray());
this.workingCopy.reconcile(AST.JLS3, true, null, null);
assertEquals("Working copy should not find secondary type 'Bar'!", 1, this.problemRequestor.problemCount);
@@ -3209,12 +3049,12 @@ public void testBug36032c() throws CoreException, InterruptedException {
createJavaProject("P1", new String[] {""}, new String[] {"JCL_LIB"}, "bin");
createFolder("/P1/test");
createFile(
- "/P1/test/Foo.java",
+ "/P1/test/Foo.js",
"package test;\n" +
"class Secondary{ void foo() {} }\n"
);
createFile(
- "/P1/test/Test1.java",
+ "/P1/test/Test1.js",
"package test;\n" +
"public class Test1 {\n" +
" public static void main(String[] args) {\n" +
@@ -3234,14 +3074,14 @@ public void testBug36032c() throws CoreException, InterruptedException {
"}\n";
createFolder("/P2/test");
createFile(
- "/P2/test/Test2.java",
+ "/P2/test/Test2.js",
source
);
// Get compilation unit and reconcile it => expect no error
char[] sourceChars = source.toCharArray();
this.problemRequestor.initialize(sourceChars);
- this.workingCopy = getCompilationUnit("/P2/test/Test2.java").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
+ this.workingCopy = getCompilationUnit("/P2/test/Test2.js").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
this.workingCopy.getBuffer().setContents(source);
this.workingCopy.reconcile(AST.JLS3, true, null, null);
assertNoProblem(sourceChars, this.workingCopy);
@@ -3260,7 +3100,7 @@ public void testBug118823() throws CoreException, InterruptedException, IOExcept
createJavaProject("P1", new String[] {""}, new String[] {"JCL_LIB"}, "bin");
String source = "class Test {}\n";
createFile(
- "/P1/Test.java",
+ "/P1/Test.js",
source
);
createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] { "/P1" }, "bin");
@@ -3269,7 +3109,7 @@ public void testBug118823() throws CoreException, InterruptedException, IOExcept
" Secondary s;\n" +
"}\n";
createFile(
- "/P2/A.java",
+ "/P2/A.js",
source2
);
waitUntilIndexesReady();
@@ -3279,12 +3119,12 @@ public void testBug118823() throws CoreException, InterruptedException, IOExcept
// Get first working copy and verify that there's no error
char[] sourceChars = source.toCharArray();
this.problemRequestor.initialize(sourceChars);
- this.workingCopies[0] = getCompilationUnit("/P1/Test.java").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
+ this.workingCopies[0] = getCompilationUnit("/P1/Test.js").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
assertNoProblem(sourceChars, this.workingCopies[0]);
// Get second working copy and verify that there's one error (missing secondary type)
this.problemRequestor.initialize(source2.toCharArray());
- this.workingCopies[1] = getCompilationUnit("/P2/A.java").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
+ this.workingCopies[1] = getCompilationUnit("/P2/A.js").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
assertEquals("Working copy should not find secondary type 'Secondary'!", 1, this.problemRequestor.problemCount);
assertProblems("Working copy should have problem!",
"----------\n" +
@@ -3302,9 +3142,9 @@ public void testBug118823() throws CoreException, InterruptedException, IOExcept
getWorkspace().run(
new IWorkspaceRunnable() {
public void run(IProgressMonitor monitor) throws CoreException {
- deleteFile("/P1/Test.java");
+ deleteFile("/P1/Test.js");
createFile(
- "/P1/Test.java",
+ "/P1/Test.js",
source1
);
}
@@ -3342,7 +3182,7 @@ public void testBug118823b() throws CoreException, InterruptedException {
createJavaProject("P1", new String[] {""}, new String[] {"JCL_LIB"}, "bin");
String source1 = "class Test {}\n";
createFile(
- "/P1/Test.java",
+ "/P1/Test.js",
source1
);
createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] { "/P1" }, "bin");
@@ -3351,7 +3191,7 @@ public void testBug118823b() throws CoreException, InterruptedException {
" Secondary s;\n" +
"}\n";
createFile(
- "/P2/A.java",
+ "/P2/A.js",
source2
);
waitUntilIndexesReady();
@@ -3360,12 +3200,12 @@ public void testBug118823b() throws CoreException, InterruptedException {
// Get first working copy and verify that there's no error
char[] sourceChars = source1.toCharArray();
this.problemRequestor.initialize(sourceChars);
- this.workingCopies[0] = getCompilationUnit("/P1/Test.java").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
+ this.workingCopies[0] = getCompilationUnit("/P1/Test.js").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
assertNoProblem(sourceChars, this.workingCopies[0]);
// Get second working copy and verify that there's one error (missing secondary type)
this.problemRequestor.initialize(source2.toCharArray());
- this.workingCopies[1] = getCompilationUnit("/P2/A.java").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
+ this.workingCopies[1] = getCompilationUnit("/P2/A.js").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
assertEquals("Working copy should not find secondary type 'Secondary'!", 1, this.problemRequestor.problemCount);
assertProblems("Working copy should have problem!",
"----------\n" +
@@ -3410,7 +3250,7 @@ public void testBug118823c() throws CoreException, InterruptedException {
createJavaProject("P1", new String[] {""}, new String[] {"JCL_LIB"}, "bin");
String source1 = "class Test {}\n";
createFile(
- "/P1/Test.java",
+ "/P1/Test.js",
source1
);
createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] { "/P1" }, "bin");
@@ -3419,7 +3259,7 @@ public void testBug118823c() throws CoreException, InterruptedException {
" Secondary s;\n" +
"}\n";
createFile(
- "/P2/A.java",
+ "/P2/A.js",
source2
);
waitUntilIndexesReady();
@@ -3429,12 +3269,12 @@ public void testBug118823c() throws CoreException, InterruptedException {
// Get first working copy and verify that there's no error
char[] sourceChars = source1.toCharArray();
this.problemRequestor.initialize(sourceChars);
- this.workingCopies[0] = getCompilationUnit("/P1/Test.java").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
+ this.workingCopies[0] = getCompilationUnit("/P1/Test.js").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
assertNoProblem(sourceChars, this.workingCopies[0]);
// Get second working copy and verify that there's one error (missing secondary type)
this.problemRequestor.initialize(source2.toCharArray());
- this.workingCopies[1] = getCompilationUnit("/P2/A.java").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
+ this.workingCopies[1] = getCompilationUnit("/P2/A.js").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
assertEquals("Working copy should not find secondary type 'Secondary'!", 1, this.problemRequestor.problemCount);
assertProblems("Working copy should have problem!",
"----------\n" +
@@ -3446,12 +3286,12 @@ public void testBug118823c() throws CoreException, InterruptedException {
);
// Delete file and recreate it with secondary
- deleteFile("/P1/Test.java");
+ deleteFile("/P1/Test.js");
source1 =
"public class Test {}\n" +
"class Secondary{}\n";
createFile(
- "/P1/Test.java",
+ "/P1/Test.js",
source1
);
@@ -3492,7 +3332,7 @@ public void test1001() throws CoreException, InterruptedException, IOException {
createJavaProject("P1", new String[] {""}, new String[] {"JCL_LIB"}, "bin");
sources[0] = "class X {}\n";
createFile(
- "/P1/X.java",
+ "/P1/X.js",
sources[0]
);
createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] { "/P1" }, "bin");
@@ -3502,7 +3342,7 @@ public void test1001() throws CoreException, InterruptedException, IOException {
" void bar(X p);\n" +
"}\n";
createFile(
- "/P2/I.java",
+ "/P2/I.js",
sources[1]
);
createJavaProject("P3", new String[] {""}, new String[] {"JCL_LIB"}, new String[] { "/P2" }, "bin");
@@ -3512,7 +3352,7 @@ public void test1001() throws CoreException, InterruptedException, IOException {
" // public void bar(X p) { }\n" +
"}\n";
createFile(
- "/P3/Y.java",
+ "/P3/Y.js",
sources[2]
);
for (int i = 0 ; i < sources.length ; i++) {
@@ -3524,17 +3364,17 @@ public void test1001() throws CoreException, InterruptedException, IOException {
// Get first working copy and verify that there's no error
this.problemRequestor.initialize(sourcesAsCharArrays[0]);
- this.workingCopies[0] = getCompilationUnit("/P1/X.java").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
+ this.workingCopies[0] = getCompilationUnit("/P1/X.js").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
assertNoProblem(sourcesAsCharArrays[0], this.workingCopies[0]);
// Get second working copy and verify that there's no error
this.problemRequestor.initialize(sourcesAsCharArrays[1]);
- this.workingCopies[1] = getCompilationUnit("/P2/I.java").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
+ this.workingCopies[1] = getCompilationUnit("/P2/I.js").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
assertNoProblem(sourcesAsCharArrays[1], this.workingCopies[1]);
// Get third working copy and verify that all expected errors are here
this.problemRequestor.initialize(sourcesAsCharArrays[2]);
- this.workingCopies[2] = getCompilationUnit("/P3/Y.java").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
+ this.workingCopies[2] = getCompilationUnit("/P3/Y.js").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
assertProblems("Working copy should have problems:",
"----------\n" +
"1. ERROR in /P3/Y.java (at line 1)\n" +
@@ -3566,7 +3406,7 @@ public void test1002() throws CoreException, InterruptedException, IOException {
createJavaProject("P1", new String[] {""}, new String[] {"JCL_LIB"}, "bin");
sources[0] = "class X {}\n";
createFile(
- "/P1/X.java",
+ "/P1/X.js",
sources[0]
);
createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] { "/P1" }, "bin");
@@ -3576,7 +3416,7 @@ public void test1002() throws CoreException, InterruptedException, IOException {
" void bar(X p);\n" +
"}\n";
createFile(
- "/P2/I.java",
+ "/P2/I.js",
sources[1]
);
createJavaProject("P3", new String[] {""}, new String[] {"JCL_LIB"}, new String[] { "/P1" /* compare with test1001 */, "/P2" }, "bin");
@@ -3586,7 +3426,7 @@ public void test1002() throws CoreException, InterruptedException, IOException {
" // public void bar(X p) { }\n" +
"}\n";
createFile(
- "/P3/Y.java",
+ "/P3/Y.js",
sources[2]
);
for (int i = 0 ; i < sources.length ; i++) {
@@ -3598,17 +3438,17 @@ public void test1002() throws CoreException, InterruptedException, IOException {
// Get first working copy and verify that there's no error
this.problemRequestor.initialize(sourcesAsCharArrays[0]);
- this.workingCopies[0] = getCompilationUnit("/P1/X.java").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
+ this.workingCopies[0] = getCompilationUnit("/P1/X.js").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
assertNoProblem(sourcesAsCharArrays[0], this.workingCopies[0]);
// Get second working copy and verify that there's no error
this.problemRequestor.initialize(sourcesAsCharArrays[1]);
- this.workingCopies[1] = getCompilationUnit("/P2/I.java").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
+ this.workingCopies[1] = getCompilationUnit("/P2/I.js").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
assertNoProblem(sourcesAsCharArrays[1], this.workingCopies[1]);
// Get third working copy and verify that all expected errors are here
this.problemRequestor.initialize(sourcesAsCharArrays[2]);
- this.workingCopies[2] = getCompilationUnit("/P3/Y.java").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
+ this.workingCopies[2] = getCompilationUnit("/P3/Y.js").getWorkingCopy(new WorkingCopyOwner() {}, this.problemRequestor, null);
assertProblems("Working copy should have problems:",
"----------\n" +
"1. ERROR in /P3/Y.java (at line 1)\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/RenameTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/RenameTests.java
index a7e1805..04a9af6 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/RenameTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/RenameTests.java
@@ -139,7 +139,7 @@ public void setUp() throws Exception {
this.createJavaProject("P", new String[] {"src"}, "bin");
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" boolean other;\n" +
" int bar;\n" +
@@ -154,7 +154,7 @@ public void setUp() throws Exception {
" }\n" +
"}"
);
- this.cu = getCompilationUnit("/P/src/X.java");
+ this.cu = getCompilationUnit("/P/src/X.js");
startDeltas();
}
@@ -163,7 +163,7 @@ public void setUpSuite() throws Exception {
IJavaProject project = this.createJavaProject("BinaryProject", new String[] {"src"}, new String[] {"JCL_LIB"}, "lib");
this.createFile(
- "/BinaryProject/src/X.java",
+ "/BinaryProject/src/X.js",
"public class X {\n" +
" int bar;\n" +
" public void foo() {\n" +
@@ -236,7 +236,7 @@ public void testRenameBinaryType() throws JavaModelException {
public void testRenameCompilationUnitAndType() {
renameNegative(
new IJavaElement[] {this.cu, this.cu.getType("X")},
- new String[]{"Y.java", "Y"},
+ new String[]{"Y.js", "Y"},
false,
IJavaModelStatusConstants.INVALID_ELEMENT_TYPES);
}
@@ -246,13 +246,13 @@ public void testRenameCompilationUnitAndType() {
*/
public void testRenameCompilationUnitResultingInCollision() throws CoreException{
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
"}"
);
- renameNegative(this.cu, "Y.java", false, IJavaModelStatusConstants.NAME_COLLISION);
- renamePositive(this.cu, "Y.java", true);
+ renameNegative(this.cu, "Y.js", false, IJavaModelStatusConstants.NAME_COLLISION);
+ renamePositive(this.cu, "Y.js", true);
}
/**
* Ensures that compilation units can be renamed.
@@ -261,16 +261,16 @@ public void testRenameCompilationUnitResultingInCollision() throws CoreException
*/
public void testRenameCompilationUnitsCheckingDeltas() throws CoreException{
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
"}"
);
- ICompilationUnit cu2 = this.getCompilationUnit("/P/src/Y.java");
+ ICompilationUnit cu2 = this.getCompilationUnit("/P/src/Y.js");
clearDeltas();
renamePositive(
new ICompilationUnit[] {this.cu, cu2},
- new String[] {"NewX.java", "NewY.java"},
+ new String[] {"NewX.js", "NewY.js"},
false);
assertDeltas(
@@ -290,7 +290,7 @@ public void testRenameCompilationUnitsCheckingDeltas() throws CoreException{
*/
public void testRenameCompilationUnitWithInvalidName() {
renameNegative(this.cu, "NewX", false, IJavaModelStatusConstants.INVALID_NAME);
- renameNegative(this.cu, "New X.java", false, IJavaModelStatusConstants.INVALID_NAME);
+ renameNegative(this.cu, "New X.js", false, IJavaModelStatusConstants.INVALID_NAME);
}
/**
* This operation should fail as renaming a CU with a null name should throw
@@ -317,10 +317,10 @@ public void testRenameConstructor() {
*
*/
public void testRenameCU() throws CoreException {
- this.cu.rename("NewX.java", false, null);
+ this.cu.rename("NewX.js", false, null);
assertTrue("Original CU should not exist", !cu.exists());
- ICompilationUnit newCU = getCompilationUnit("/P/src/NewX.java");
+ ICompilationUnit newCU = getCompilationUnit("/P/src/NewX.js");
assertTrue("New CU should exist", newCU.exists());
assertTypesEqual(
@@ -339,16 +339,16 @@ public void testRenameCU() throws CoreException {
}
public void testRenameCUForce() throws CoreException {
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
"}"
);
clearDeltas();
- this.cu.rename("Y.java", true, null);
+ this.cu.rename("Y.js", true, null);
IFile file = (IFile)this.cu.getResource();
- ICompilationUnit destCU = getCompilationUnit("/P/src/Y.java");
+ ICompilationUnit destCU = getCompilationUnit("/P/src/Y.js");
IFile destFile = (IFile)destCU.getResource();
assertTrue("Original CU should not exist", !cu.exists());
@@ -398,16 +398,16 @@ public void testRenameEnum() throws CoreException {
try {
createJavaProject("P15", new String[] {""}, new String[] {"JCL15_LIB"}, "", "1.5");
createFile(
- "/P15/En.java",
+ "/P15/En.js",
"public enum En {\n" +
" ;\n" +
" En() {\n" +
" }\n" +
"}"
);
- ICompilationUnit enumCU = getCompilationUnit("/P15/En.java");
- enumCU.rename("OtherEnum.java", false, null);
- ICompilationUnit renamedCu = getCompilationUnit("/P15/OtherEnum.java");
+ ICompilationUnit enumCU = getCompilationUnit("/P15/En.js");
+ enumCU.rename("OtherEnum.js", false, null);
+ ICompilationUnit renamedCu = getCompilationUnit("/P15/OtherEnum.js");
assertSourceEquals(
"Unexpected source after rename",
"public enum OtherEnum {\n" +
@@ -429,15 +429,15 @@ public void testRenameEnum2() throws CoreException {
try {
createJavaProject("P15", new String[] {""}, new String[] {"JCL15_LIB"}, "", "1.5");
createFile(
- "/P15/En.java",
+ "/P15/En.js",
"public enum En {\n" +
" CONST() {\n" +
" }\n" +
"}"
);
- ICompilationUnit enumCU = getCompilationUnit("/P15/En.java");
- enumCU.rename("OtherEnum.java", false, null);
- ICompilationUnit renamedCu = getCompilationUnit("/P15/OtherEnum.java");
+ ICompilationUnit enumCU = getCompilationUnit("/P15/En.js");
+ enumCU.rename("OtherEnum.js", false, null);
+ ICompilationUnit renamedCu = getCompilationUnit("/P15/OtherEnum.js");
assertSourceEquals(
"Unexpected source after rename",
"public enum OtherEnum {\n" +
@@ -479,12 +479,12 @@ public void testRenameFieldsCheckingDeltasAndPositions() throws JavaModelExcepti
*/
public void testRenameFieldFragment() throws Exception {
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
" int int1, int2, int3;\n" +
"}"
);
- ICompilationUnit c = getCompilationUnit("/P/src/Y.java");
+ ICompilationUnit c = getCompilationUnit("/P/src/Y.js");
IType type = c.getType("Y");
IField field = type.getField("int2");
renamePositive(field, "int2_renamed", false);
@@ -585,13 +585,13 @@ public void testRenameInitializer() {
*/
public void testRenameMainTypes() throws CoreException {
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
" public Y() {\n" +
" }\n" +
"}"
);
- ICompilationUnit cu2 = getCompilationUnit("/P/src/Y.java");
+ ICompilationUnit cu2 = getCompilationUnit("/P/src/Y.js");
IPackageFragment pkg = (IPackageFragment) this.cu.getParent();
IJavaElement[] types = new IJavaElement[] {
@@ -611,8 +611,8 @@ public void testRenameMainTypes() throws CoreException {
false);
//test that both the compilation unit, main type and constructors have been renamed.
- ICompilationUnit renamedCU1= pkg.getCompilationUnit("NewX.java");
- ICompilationUnit renamedCU2= pkg.getCompilationUnit("NewY.java");
+ ICompilationUnit renamedCU1= pkg.getCompilationUnit("NewX.js");
+ ICompilationUnit renamedCU2= pkg.getCompilationUnit("NewY.js");
IType newType1 = renamedCU1.getType("NewX");
IType newType2 = renamedCU2.getType("NewY");
assertTrue("NewX should be present", newType1.exists());
@@ -631,13 +631,13 @@ public void testRenameMainTypes() throws CoreException {
*/
public void testRenameMainTypesAndAChild() throws CoreException {
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
" public Y() {\n" +
" }\n" +
"}"
);
- ICompilationUnit cu2 = getCompilationUnit("/P/src/Y.java");
+ ICompilationUnit cu2 = getCompilationUnit("/P/src/Y.js");
String[] newNames = new String[] {
"newBar",
@@ -658,11 +658,11 @@ public void testRenameMainTypesAndAChild() throws CoreException {
//test that both the compilation unit and the main type have been renamed.
IPackageFragment pkg = (IPackageFragment) this.cu.getParent();
- ICompilationUnit renamedCU1= pkg.getCompilationUnit("NewX.java");
+ ICompilationUnit renamedCU1= pkg.getCompilationUnit("NewX.js");
IType newX = renamedCU1.getType("NewX");
assertTrue("NewX should be present", newX.exists());
- ICompilationUnit renamedCU2= pkg.getCompilationUnit("NewY.java");
+ ICompilationUnit renamedCU2= pkg.getCompilationUnit("NewY.js");
IType newY = renamedCU2.getType("NewY");
assertTrue("NewY should be present", newY.exists());
@@ -701,7 +701,7 @@ public void testRenameMethodsWithInvalidName() {
public void testRenamePF() throws CoreException {
this.createFolder("/P/src/x/y/z");
this.createFile(
- "/P/src/x/y/z/A.java",
+ "/P/src/x/y/z/A.js",
"package x.y.z;\n" +
"public class A {\n" +
"}"
@@ -715,7 +715,7 @@ public void testRenamePF() throws CoreException {
assertTrue("Old package should not exist", !frag.exists());
assertTrue("New package should exist", newFrag.exists());
- ICompilationUnit compilationUnit = newFrag.getCompilationUnit("A.java");
+ ICompilationUnit compilationUnit = newFrag.getCompilationUnit("A.js");
assertTrue("A.java should exits in new package", compilationUnit.exists());
IType[] types = compilationUnit.getTypes();
@@ -741,7 +741,7 @@ public void testRenamePF() throws CoreException {
public void testRenamePF2() throws CoreException {
this.createFolder("/P/src/x/y/z");
this.createFile(
- "/P/src/x/y/z/A.java",
+ "/P/src/x/y/z/A.js",
"package x.y.z;\n" +
"public class A {\n" +
"}"
@@ -755,7 +755,7 @@ public void testRenamePF2() throws CoreException {
assertTrue("Old package should not exist", !frag.exists());
assertTrue("New package should exist", newFrag.exists());
- ICompilationUnit compilationUnit = newFrag.getCompilationUnit("A.java");
+ ICompilationUnit compilationUnit = newFrag.getCompilationUnit("A.js");
assertTrue("A.java should exits in new package", compilationUnit.exists());
IType[] types = compilationUnit.getTypes();
@@ -782,7 +782,7 @@ public void testRenamePF2() throws CoreException {
public void testRenamePF3() throws CoreException {
createFolder("/P/src/x");
createFile(
- "/P/src/x/A.java",
+ "/P/src/x/A.js",
"package x;\n" +
"public class A {\n" +
"}"
@@ -802,7 +802,7 @@ public void testRenamePF3() throws CoreException {
public void testRenamePFWithSubPackages() throws CoreException {
this.createFolder("/P/src/x/y/z");
this.createFile(
- "/P/src/x/y/z/A.java",
+ "/P/src/x/y/z/A.js",
"package x.y.z;\n" +
"public class A {\n" +
"}"
@@ -817,7 +817,7 @@ public void testRenamePFWithSubPackages() throws CoreException {
IPackageFragment newFrag = getPackage("/P/src/newX");
assertTrue("New package should exist", newFrag.exists());
- ICompilationUnit compilationUnit = oldFrag.getCompilationUnit("A.java");
+ ICompilationUnit compilationUnit = oldFrag.getCompilationUnit("A.js");
assertTrue("A.java should exits in old inner package", compilationUnit.exists());
assertDeltas(
@@ -832,20 +832,20 @@ public void testRenamePFWithSubPackages() throws CoreException {
*/
public void testRenameSyntaxErrorMethod() throws CoreException {
this.createFile(
- "/P/src/Y.java",
+ "/P/src/Y.js",
"public class Y {\n" +
" void foo( {\n" + // syntax error
" }\n" +
"}"
);
- IMethod method = getCompilationUnit("/P/src/Y.java").getType("Y").getMethod("foo", null);
+ IMethod method = getCompilationUnit("/P/src/Y.js").getType("Y").getMethod("foo", null);
renamePositive(method, "newFoo", false);
}
/**
* Ensures that attempting to rename with an incorrect number of renamings fails
*/
public void testRenameWithInvalidRenamings() {
- IMethod method = getCompilationUnit("/P/src/X.java").getType("X").getMethod("foo", null);
+ IMethod method = getCompilationUnit("/P/src/X.js").getType("X").getMethod("foo", null);
renameNegative(
new IJavaElement[] {method},
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ResolveTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ResolveTests.java
index c72160d..612e29a 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ResolveTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ResolveTests.java
@@ -67,16 +67,16 @@ protected void tearDown() throws Exception {
* Resolve default abstract method
* bugs http://dev.eclipse.org/bugs/show_bug.cgi?id=23594
*/
-public void testAbstractMethod() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveAbstractMethod.java");
- IJavaElement[] elements = codeSelect(cu, "foo", "foo");
- assertElementsEqual(
- "Unexpected elements",
- "foo() [in SuperInterface [in SuperInterface.java [in <default> [in src [in Resolve]]]]]",
- elements
- );
-}
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=165900
+//public void testAbstractMethod() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveAbstractMethod.js");
+// IJavaElement[] elements = codeSelect(cu, "foo", "foo");
+// assertElementsEqual(
+// "Unexpected elements",
+// "foo() [in SuperInterface [in SuperInterface.js [in <default> [in src [in Resolve]]]]]",
+// elements
+// );
+//}
+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=165900
public void testAmbiguousMethod1() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
@@ -105,15 +105,16 @@ public void testAmbiguousMethod1() throws JavaModelException {
elements
);
}
+
/**
* Resolve an argument name
*/
public void testArgumentName1() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveArgumentName.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveArgumentName.js");
IJavaElement[] elements = codeSelect(cu, "var1", "var1");
assertElementsEqual(
"Unexpected elements",
- "var1 [in foo(Object, int) [in ResolveArgumentName [in ResolveArgumentName.java [in <default> [in src [in Resolve]]]]]]",
+ "var1 [in foo(p0, p1) [in ResolveArgumentName.js [in <default> [in src [in Resolve]]]]]",
elements
);
}
@@ -121,11 +122,11 @@ public void testArgumentName1() throws JavaModelException {
* Resolve an argument name with base type
*/
public void testArgumentName2() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveArgumentName.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveArgumentName.js");
IJavaElement[] elements = codeSelect(cu, "var2", "var2");
assertElementsEqual(
"Unexpected elements",
- "var2 [in foo(Object, int) [in ResolveArgumentName [in ResolveArgumentName.java [in <default> [in src [in Resolve]]]]]]",
+ "var2 [in foo(p0, p1) [in ResolveArgumentName.js [in <default> [in src [in Resolve]]]]]",
elements
);
}
@@ -133,24 +134,25 @@ public void testArgumentName2() throws JavaModelException {
* Resolve the field "length" of an array
*/
public void testArrayLength() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveArrayLength.java");
- IJavaElement[] elements = codeSelect(cu, "length", "length");
- assertElementsEqual(
- "Unexpected elements",
- "",
- elements
- );
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveArrayLength.js");
+// IJavaElement[] elements = codeSelect(cu, "length", "length");
+// assertElementsEqual(
+// "Unexpected elements",
+// "",
+// elements
+// );
+ assertTrue("implement?",false);
}
/**
* Resolve an argument name inside catch statement
*/
public void testCatchArgumentName1() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveCatchArgumentName.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveCatchArgumentName.js");
IJavaElement[] elements = codeSelect(cu, "var1", "var1");
assertElementsEqual(
"Unexpected elements",
- "var1 [in foo() [in ResolveCatchArgumentName [in ResolveCatchArgumentName.java [in <default> [in src [in Resolve]]]]]]",
+ "var1 [in foo() [in ResolveCatchArgumentName.js [in <default> [in src [in Resolve]]]]]",
elements
);
}
@@ -158,323 +160,343 @@ public void testCatchArgumentName1() throws JavaModelException {
* Resolve an argument name inside catch statement with base type
*/
public void testCatchArgumentName2() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveCatchArgumentName.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveCatchArgumentName.js");
IJavaElement[] elements = codeSelect(cu, "var2", "var2");
assertElementsEqual(
"Unexpected elements",
- "var2 [in foo() [in ResolveCatchArgumentName [in ResolveCatchArgumentName.java [in <default> [in src [in Resolve]]]]]]",
- elements
- );
-}
-/**
- * bugs http://dev.eclipse.org/bugs/show_bug.cgi?id=24626
- */
-public void testCatchArgumentType1() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveCatchArgumentType1.java");
- IJavaElement[] elements = codeSelect(cu, "Y1", "Y1");
- assertElementsEqual(
- "Unexpected elements",
- "Y1 [in X1 [in X1.java [in <default> [in src [in Resolve]]]]]",
- elements
- );
-}
-/**
- * bugs http://dev.eclipse.org/bugs/show_bug.cgi?id=24626
- */
-public void testCatchArgumentType2() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveCatchArgumentType2.java");
- IJavaElement[] elements = codeSelect(cu, "Y1", "Y1");
- assertElementsEqual(
- "Unexpected elements",
- "Y1 [in X1 [in X1.java [in <default> [in src [in Resolve]]]]]",
- elements
- );
-}
+ "var2 [in foo() [in ResolveCatchArgumentName.js [in <default> [in src [in Resolve]]]]]",
+ elements
+ );
+}
+///**
+// * bugs http://dev.eclipse.org/bugs/show_bug.cgi?id=24626
+// */
+//public void testCatchArgumentType1() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveCatchArgumentType1.js");
+// IJavaElement[] elements = codeSelect(cu, "Y1", "Y1");
+// assertElementsEqual(
+// "Unexpected elements",
+// "Y1 [in X1 [in X1.js [in <default> [in src [in Resolve]]]]]",
+// elements
+// );
+//}
+///**
+// * bugs http://dev.eclipse.org/bugs/show_bug.cgi?id=24626
+// */
+//public void testCatchArgumentType2() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveCatchArgumentType2.js");
+// IJavaElement[] elements = codeSelect(cu, "Y1", "Y1");
+// assertElementsEqual(
+// "Unexpected elements",
+// "Y1 [in X1 [in X1.js [in <default> [in src [in Resolve]]]]]",
+// elements
+// );
+//}
/**
* Resolve the class 'X' (field type).
*/
public void testClass1() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveClass1.java");
- IJavaElement[] elements = codeSelect(cu, "X", "X");
- assertElementsEqual(
- "Unexpected elements",
- "X [in X.java [in p1 [in src [in Resolve]]]]",
- elements
- );
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveClass1.js");
+// IJavaElement[] elements = codeSelect(cu, "X", "X");
+// assertElementsEqual(
+// "Unexpected elements",
+// "X [in X.js [in p1 [in src [in Resolve]]]]",
+// elements
+// );
+ assertTrue("implement?",false);
}
/**
* Resolve the class 'X' (local variable type).
*/
public void testClass2() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveClass2.java");
- IJavaElement[] elements = codeSelect(cu, "X", "X");
- assertElementsEqual(
- "Unexpected elements",
- "X [in X.java [in p1 [in src [in Resolve]]]]",
- elements
- );
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveClass2.js");
+// IJavaElement[] elements = codeSelect(cu, "X", "X");
+// assertElementsEqual(
+// "Unexpected elements",
+// "X [in X.js [in p1 [in src [in Resolve]]]]",
+// elements
+// );
+ assertTrue("implement?",false);
}
/**
* Resolve the class 'X'(array initializer type).
*/
public void testClass3() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveClass3.java");
- IJavaElement[] elements = codeSelect(cu, "X[]{", "X");
- assertElementsEqual(
- "Unexpected elements",
- "X [in X.java [in p1 [in src [in Resolve]]]]",
- elements
- );
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveClass3.js");
+// IJavaElement[] elements = codeSelect(cu, "X[]{", "X");
+// assertElementsEqual(
+// "Unexpected elements",
+// "X [in X.js [in p1 [in src [in Resolve]]]]",
+// elements
+// );
+ assertTrue("implement?",false);
}
/**
* Resolve the class 'X' (return type).
*/
public void testClass4() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveClass4.java");
- IJavaElement[] elements = codeSelect(cu, "X", "X");
- assertElementsEqual(
- "Unexpected elements",
- "X [in X.java [in p1 [in src [in Resolve]]]]",
- elements
- );
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveClass4.js");
+// IJavaElement[] elements = codeSelect(cu, "X", "X");
+// assertElementsEqual(
+// "Unexpected elements",
+// "X [in X.js [in p1 [in src [in Resolve]]]]",
+// elements
+// );
+ assertTrue("implement?",false);
}
/**
* Resolve the class 'X' (method argument).
*/
public void testClass5() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveClass5.java");
- IJavaElement[] elements = codeSelect(cu, "X", "X");
- assertElementsEqual(
- "Unexpected elements",
- "X [in X.java [in p1 [in src [in Resolve]]]]",
- elements
- );
-}
-/**
- * Resolve the class 'SuperClass' (super class).
- */
-public void testClass6() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveClass6.java");
- IJavaElement[] elements = codeSelect(cu, "X", "X");
- assertElementsEqual(
- "Unexpected elements",
- "X [in X.java [in p1 [in src [in Resolve]]]]",
- elements
- );
-}
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveClass5.js");
+// IJavaElement[] elements = codeSelect(cu, "X", "X");
+// assertElementsEqual(
+// "Unexpected elements",
+// "X [in X.js [in p1 [in src [in Resolve]]]]",
+// elements
+// );
+ assertTrue("implement?",false);
+}
+///**
+// * Resolve the class 'SuperClass' (super class).
+// */
+//public void testClass6() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveClass6.js");
+// IJavaElement[] elements = codeSelect(cu, "X", "X");
+// assertElementsEqual(
+// "Unexpected elements",
+// "X [in X.js [in p1 [in src [in Resolve]]]]",
+// elements
+// );
+//}
/**
* Resolve a constructor
*/
public void testConstructor() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveConstructor.java");
- IJavaElement[] elements = codeSelect(cu, "ResolveConstructor(\"", "ResolveConstructor");
- assertElementsEqual(
- "Unexpected elements",
- "ResolveConstructor(String) [in ResolveConstructor [in ResolveConstructor.java [in <default> [in src [in Resolve]]]]]",
- elements
- );
-}
-/**
- * Resolve a constructor call
- */
-public void testConstructor2() throws JavaModelException {
- IClassFile cf = getClassFile("Resolve", "class-folder", "", "ResolveConstructorCall.class");
- IJavaElement[] elements = codeSelect(cf, "ResolveConstructorCall();", "ResolveConstructorCall");
- assertElementsEqual(
- "Unexpected elements",
- "ResolveConstructorCall() [in ResolveConstructorCall [in ResolveConstructorCall.class [in <default> [in class-folder [in Resolve]]]]]",
- elements
- );
-}
-/**
- * Resolve constructor call
- */
-public void testConstructorCallOfMemberType() throws JavaModelException {
- IClassFile cf = getClassFile("Resolve", "class-folder", "", "ResolveConstructorCallOfMemberType.class");
- IJavaElement[] elements = codeSelect(cf, "Inner()", "Inner");
- assertElementsEqual(
- "Unexpected elements",
- "Inner [in ResolveConstructorCallOfMemberType$Inner.class [in <default> [in class-folder [in Resolve]]]]",
- elements
- );
-}
-/**
- * Resolve constructor call
- */
-//TODO(david) enable this test when https://bugs.eclipse.org/bugs/show_bug.cgi?id=108784 will be fixed.
-public void _testConstructorCallOfMemberType2() throws JavaModelException {
- IClassFile cf = getClassFile("Resolve", "class-folder", "", "ResolveConstructorCallOfMemberType2.class");
- IJavaElement[] elements = codeSelect(cf, "Inner();", "Inner");
- assertElementsEqual(
- "Unexpected elements",
- "Inner(ResolveConstructorCallOfMemberType2) [in Inner [in ResolveConstructorCallOfMemberType2$Inner.class [in <default> [in class-folder [in Resolve]]]]]",
- elements
- );
-}
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveConstructor.js");
+// IJavaElement[] elements = codeSelect(cu, "ResolveConstructor(\"", "ResolveConstructor");
+// assertElementsEqual(
+// "Unexpected elements",
+// "ResolveConstructor(String) [in ResolveConstructor [in ResolveConstructor.js [in <default> [in src [in Resolve]]]]]",
+// elements
+// );
+ assertTrue("implement?",false);
+}
+///**
+// * Resolve a constructor call
+// */
+//public void testConstructor2() throws JavaModelException {
+// IClassFile cf = getClassFile("Resolve", "class-folder", "", "ResolveConstructorCall.class");
+// IJavaElement[] elements = codeSelect(cf, "ResolveConstructorCall();", "ResolveConstructorCall");
+// assertElementsEqual(
+// "Unexpected elements",
+// "ResolveConstructorCall() [in ResolveConstructorCall [in ResolveConstructorCall.class [in <default> [in class-folder [in Resolve]]]]]",
+// elements
+// );
+//}
+///**
+// * Resolve constructor call
+// */
+//public void testConstructorCallOfMemberType() throws JavaModelException {
+// IClassFile cf = getClassFile("Resolve", "class-folder", "", "ResolveConstructorCallOfMemberType.class");
+// IJavaElement[] elements = codeSelect(cf, "Inner()", "Inner");
+// assertElementsEqual(
+// "Unexpected elements",
+// "Inner [in ResolveConstructorCallOfMemberType$Inner.class [in <default> [in class-folder [in Resolve]]]]",
+// elements
+// );
+//}
+///**
+// * Resolve constructor call
+// */
+////TODO(david) enable this test when https://bugs.eclipse.org/bugs/show_bug.cgi?id=108784 will be fixed.
+//public void _testConstructorCallOfMemberType2() throws JavaModelException {
+// IClassFile cf = getClassFile("Resolve", "class-folder", "", "ResolveConstructorCallOfMemberType2.class");
+// IJavaElement[] elements = codeSelect(cf, "Inner();", "Inner");
+// assertElementsEqual(
+// "Unexpected elements",
+// "Inner(ResolveConstructorCallOfMemberType2) [in Inner [in ResolveConstructorCallOfMemberType2$Inner.class [in <default> [in class-folder [in Resolve]]]]]",
+// elements
+// );
+//}
/**
* Resolve constructor declaration
*/
public void testConstructorDeclaration() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveConstructorDeclaration.java");
- IJavaElement[] elements = codeSelect(cu, "ResolveConstructorDeclaration(i", "ResolveConstructorDeclaration");
- assertElementsEqual(
- "Unexpected elements",
- "ResolveConstructorDeclaration(int) [in ResolveConstructorDeclaration [in ResolveConstructorDeclaration.java [in <default> [in src [in Resolve]]]]]",
- elements
- );
-}
-/**
- * Resolve empty selection
- */
-public void testEmptySelection() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveTypeEmptySelection.java");
- IJavaElement[] elements = codeSelect(cu, "ject", "");
- assertElementsEqual(
- "Unexpected elements",
- "Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + "]]]",
- elements
- );
-}
-/**
- * Resolve empty selection
- */
-public void testEmptySelection2() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveTypeEmptySelection2.java");
- IJavaElement[] elements = codeSelect(cu, "Obj", "");
- assertElementsEqual(
- "Unexpected elements",
- "Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + "]]]",
- elements
- );
-}
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveConstructorDeclaration.js");
+// IJavaElement[] elements = codeSelect(cu, "ResolveConstructorDeclaration(i", "ResolveConstructorDeclaration");
+// assertElementsEqual(
+// "Unexpected elements",
+// "ResolveConstructorDeclaration(int) [in ResolveConstructorDeclaration [in ResolveConstructorDeclaration.js [in <default> [in src [in Resolve]]]]]",
+// elements
+// );
+ assertTrue("implement?",false);
+}
+///**
+// * Resolve empty selection
+// */
+//public void testEmptySelection() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveTypeEmptySelection.js");
+// IJavaElement[] elements = codeSelect(cu, "ject", "");
+// assertElementsEqual(
+// "Unexpected elements",
+// "Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + " [in Resolve]]]]",
+// elements
+// );
+//}
+///**
+// * Resolve empty selection
+// */
+//public void testEmptySelection2() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveTypeEmptySelection2.js");
+// IJavaElement[] elements = codeSelect(cu, "Obj", "");
+// assertElementsEqual(
+// "Unexpected elements",
+// "Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + " [in Resolve]]]]",
+// elements
+// );
+//}
/**
* Resolve empty selection
*/
public void testEmptySelectionOnMethod() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveEmptySelectionOnMethod.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveEmptySelectionOnMethod.js");
IJavaElement[] elements = codeSelect(cu, "oo();", "");
assertElementsEqual(
"Unexpected elements",
- "foo() [in ResolveEmptySelectionOnMethod [in ResolveEmptySelectionOnMethod.java [in <default> [in src [in Resolve]]]]]",
- elements
- );
-}
-/**
- * Resolse explicit super constructor call
- */
-public void testExplicitSuperConstructorCall() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveExplicitSuperConstructorCall.java");
- IJavaElement[] elements = codeSelect(cu, "super(", "super");
- assertElementsEqual(
- "Unexpected elements",
- "SuperClass(int) [in SuperClass [in SuperClass.java [in <default> [in src [in Resolve]]]]]",
- elements
- );
-}
+ "foo() [in ResolveEmptySelectionOnMethod.js [in <default> [in src [in Resolve]]]]",
+ elements
+ );
+}
+///**
+// * Resolse explicit super constructor call
+// */
+//public void testExplicitSuperConstructorCall() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveExplicitSuperConstructorCall.js");
+// IJavaElement[] elements = codeSelect(cu, "super(", "super");
+// assertElementsEqual(
+// "Unexpected elements",
+// "SuperClass(int) [in SuperClass [in SuperClass.js [in <default> [in src [in Resolve]]]]]",
+// elements
+// );
+//}
+///**
+// * Resolse explicit this constructor call
+// */
+//public void testExplicitThisConstructorCall() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveExplicitThisConstructorCall.js");
+// IJavaElement[] elements = codeSelect(cu, "this(", "this");
+// assertElementsEqual(
+// "Unexpected elements",
+// "ResolveExplicitThisConstructorCall() [in ResolveExplicitThisConstructorCall [in ResolveExplicitThisConstructorCall.js [in <default> [in src [in Resolve]]]]]",
+// elements
+// );
+//}
/**
- * Resolse explicit this constructor call
+ * Resolve the field "foo"
*/
-public void testExplicitThisConstructorCall() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveExplicitThisConstructorCall.java");
- IJavaElement[] elements = codeSelect(cu, "this(", "this");
+public void testField() throws JavaModelException {
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveField.js");
+ IJavaElement[] elements = codeSelect(cu, "foo =", "foo");
assertElementsEqual(
"Unexpected elements",
- "ResolveExplicitThisConstructorCall() [in ResolveExplicitThisConstructorCall [in ResolveExplicitThisConstructorCall.java [in <default> [in src [in Resolve]]]]]",
+ "foo [in ResolveField.js [in <default> [in src [in Resolve]]]]",
elements
);
}
/**
* Resolve the field "foo"
*/
-public void testField() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveField.java");
- IJavaElement[] elements = codeSelect(cu, "foo =", "foo");
- assertElementsEqual(
- "Unexpected elements",
- "foo [in ResolveField [in ResolveField.java [in <default> [in src [in Resolve]]]]]",
- elements
- );
+public void testField0() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveField0.js");
+// IJavaElement[] elements = codeSelect(cu, "foo =", "foo");
+// assertElementsEqual(
+// "Unexpected elements",
+// "foo [in ResolveField [in ResolveField.js [in <default> [in src [in Resolve]]]]]",
+// elements
+// );
+ assertTrue("implement",false);
}
/**
* Resolve field declaration
*/
public void testFieldDeclaration() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveFieldDeclaration.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveFieldDeclaration.js");
IJavaElement[] elements = codeSelect(cu, "foo", "foo");
assertElementsEqual(
"Unexpected elements",
- "foo [in ResolveFieldDeclaration [in ResolveFieldDeclaration.java [in <default> [in src [in Resolve]]]]]",
- elements
- );
-}
-/**
- * Resolve in import
- */
-public void testImport() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveImport.java");
- IJavaElement[] elements = codeSelect(cu, "ImportedClass", "ImportedClass");
- assertElementsEqual(
- "Unexpected elements",
- "ImportedClass [in ImportedClass.java [in a.b [in src [in Resolve]]]]",
- elements
- );
-}
-/**
- * Tests code resolve on a class file without attached source.
- */
-public void testInClassFileWithoutSource() throws JavaModelException {
- IClassFile cu = getClassFile("Resolve", "p4.jar", "p4", "X.class");
- String selection = "Object";
- int start = 34;
- int length = selection.length();
- IJavaElement[] elements = cu.codeSelect(start, length);
- assertElementsEqual(
- "Unexpected elements",
- "",
- elements
- );
-}
-/**
- * Tests code resolve on a class file with attached source.
- */
-public void testInClassFileWithSource() throws JavaModelException {
- IClassFile cf = getClassFile("Resolve", "p3.jar", "p3", "X.class");
- IJavaElement[] elements = codeSelect(cf, "Object", "Object");
- assertElementsEqual(
- "Unexpected elements",
- "Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + "]]]",
- elements
- );
-}
-/**
- * bugs http://dev.eclipse.org/bugs/show_bug.cgi?id=25687
- */
-public void testInnerClassAsParamater() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveInnerClassAsParamater.java");
- IJavaElement[] elements = codeSelect(cu, "foo(i)", "foo");
- assertElementsEqual(
- "Unexpected elements",
- "foo(Inner) [in ResolveInnerClassAsParamater [in ResolveInnerClassAsParamater.java [in <default> [in src [in Resolve]]]]]",
- elements
- );
-}
-/**
- * Resolve the interface "Y"
- */
-public void testInterface() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveInterface.java");
- IJavaElement[] elements = codeSelect(cu, "Y", "Y");
- assertElementsEqual(
- "Unexpected elements",
- "Y [in Y.java [in p1 [in src [in Resolve]]]]",
- elements
- );
-}
+ "foo [in ResolveFieldDeclaration.js [in <default> [in src [in Resolve]]]]",
+ elements
+ );
+}
+///**
+// * Resolve in import
+// */
+//public void testImport() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveImport.js");
+// IJavaElement[] elements = codeSelect(cu, "ImportedClass", "ImportedClass");
+// assertElementsEqual(
+// "Unexpected elements",
+// "ImportedClass [in ImportedClass.js [in a.b [in src [in Resolve]]]]",
+// elements
+// );
+//}
+///**
+// * Tests code resolve on a class file without attached source.
+// */
+//public void testInClassFileWithoutSource() throws JavaModelException {
+// IClassFile cu = getClassFile("Resolve", "p4.jar", "p4", "X.class");
+// String selection = "Object";
+// int start = 34;
+// int length = selection.length();
+// IJavaElement[] elements = cu.codeSelect(start, length);
+// assertElementsEqual(
+// "Unexpected elements",
+// "",
+// elements
+// );
+//}
+///**
+// * Tests code resolve on a class file with attached source.
+// */
+//public void testInClassFileWithSource() throws JavaModelException {
+// IClassFile cf = getClassFile("Resolve", "p3.jar", "p3", "X.class");
+// IJavaElement[] elements = codeSelect(cf, "Object", "Object");
+// assertElementsEqual(
+// "Unexpected elements",
+// "Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + " [in Resolve]]]]",
+// elements
+// );
+//}
+///**
+// * bugs http://dev.eclipse.org/bugs/show_bug.cgi?id=25687
+// */
+//public void testInnerClassAsParamater() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveInnerClassAsParamater.js");
+// IJavaElement[] elements = codeSelect(cu, "foo(i)", "foo");
+// assertElementsEqual(
+// "Unexpected elements",
+// "foo(Inner) [in ResolveInnerClassAsParamater [in ResolveInnerClassAsParamater.js [in <default> [in src [in Resolve]]]]]",
+// elements
+// );
+//}
+///**
+// * Resolve the interface "Y"
+// */
+//public void testInterface() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveInterface.js");
+// IJavaElement[] elements = codeSelect(cu, "Y", "Y");
+// assertElementsEqual(
+// "Unexpected elements",
+// "Y [in Y.js [in p1 [in src [in Resolve]]]]",
+// elements
+// );
+//}
/**
* Attempt to resolve outside of the range of the compilation unit.
*/
public void testInvalidResolve() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "p1", "X.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src", "p1", "X.js");
try {
cu.codeSelect(-1, 10);
} catch (JavaModelException e) {
@@ -482,269 +504,269 @@ public void testInvalidResolve() throws JavaModelException {
}
assertTrue("Exception should have been thrown for out of bounds resolution", false);
}
-/**
- * Resolve the local class 'Y' (field type).
- */
-public void testLocalClass1() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalClass1.java");
- IJavaElement[] elements = codeSelect(cu, "Y[]", "Y");
- assertElementsEqual(
- "Unexpected elements",
- "Y [in foo() [in ResolveLocalClass1 [in ResolveLocalClass1.java [in <default> [in src [in Resolve]]]]]]",
- elements
- );
-}
-/**
- * Resolve the local class 'Y' (local variable type).
- */
-public void testLocalClass2() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalClass2.java");
- IJavaElement[] elements = codeSelect(cu, "Y y", "Y");
- assertElementsEqual(
- "Unexpected elements",
- "Y [in foo() [in ResolveLocalClass2 [in ResolveLocalClass2.java [in <default> [in src [in Resolve]]]]]]",
- elements
- );
-}
-/**
- * Resolve the local class 'Y'(array initializer type).
- */
-public void testLocalClass3() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalClass3.java");
- IJavaElement[] elements = codeSelect(cu, "Y[]{", "Y");
- assertElementsEqual(
- "Unexpected elements",
- "Y [in foo() [in ResolveLocalClass3 [in ResolveLocalClass3.java [in <default> [in src [in Resolve]]]]]]",
- elements
- );
-}
-/**
- * Resolve the local class 'Y' (return type).
- */
-public void testLocalClass4() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalClass4.java");
- IJavaElement[] elements = codeSelect(cu, "Y bar()", "Y");
- assertElementsEqual(
- "Unexpected elements",
- "Y [in foo() [in ResolveLocalClass4 [in ResolveLocalClass4.java [in <default> [in src [in Resolve]]]]]]",
- elements
- );
-}
-/**
- * Resolve the local class 'Y' (method argument).
- */
-public void testLocalClass5() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalClass5.java");
- IJavaElement[] elements = codeSelect(cu, "Y y", "Y");
- assertElementsEqual(
- "Unexpected elements",
- "Y [in foo() [in ResolveLocalClass5 [in ResolveLocalClass5.java [in <default> [in src [in Resolve]]]]]]",
- elements
- );
-}
-/**
- * Resolve the local class 'SuperClass' (super class).
- */
-public void testLocalClass6() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalClass6.java");
- IJavaElement[] elements = codeSelect(cu, "Y { // superclass", "Y");
- assertElementsEqual(
- "Unexpected elements",
- "Y [in foo() [in ResolveLocalClass6 [in ResolveLocalClass6.java [in <default> [in src [in Resolve]]]]]]",
- elements
- );
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=68710
- */
-public void testLocalClass7() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalClass7.java");
- IJavaElement[] elements = codeSelect(cu, "X var", "X");
- assertElementsEqual(
- "Unexpected elements",
- "X [in <anonymous #2> [in foo2() [in ResolveLocalClass7 [in ResolveLocalClass7.java [in <default> [in src [in Resolve]]]]]]]",
- elements
- );
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=126227
- */
-public void testLocalClass8() throws JavaModelException {
- // select the default constructor of a local class
- IJavaElement[] elements = select(
- "/Resolve/src/test/Test.java",
- "package test;\n" +
- "public class Test\n" +
- " void foo() {\n" +
- " class LocalClass {}\n" +
- " Object o = new LocalClass();\n" +
- " }\n" +
- "}\n",
- "LocalClass");
-
- assertElementsEqual(
- "Unexpected elements",
- "LocalClass [in foo() [in Test [in [Working copy] Test.java [in test [in src [in Resolve]]]]]]",
- elements
- );
-}
-/*
- * Resolve the local class in a class file and ensure it is a binary type.
- * (regression test for bug 131459 Java model returns stale resolved source type for binary type
- */
-public void testLocalClass9() throws CoreException, IOException {
- try {
- IJavaProject project = createJavaProject("P");
- addLibrary(
- project,
- "lib.jar",
- "libsrc.zip",
- new String[] {
- "X.java",
- "public class X {\n" +
- " void foo() {\n" +
- " class Y {\n" +
- " }\n" +
- " }\n" +
- "}"
- },
- "1.4");
- IClassFile classFile = getClassFile("P", "/P/lib.jar", "", "X.class");
- IJavaElement[] elements = codeSelect(classFile, "Y", "Y");
- assertTrue("Should be a binary type", ((IType) elements[0]).isBinary());
- } finally {
- deleteProject("P");
- }
-}
-/**
- * Resolve a local constructor
- */
-public void testLocalConstructor() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalConstructor.java");
- IJavaElement[] elements = codeSelect(cu, "Y(\"", "Y");
- assertElementsEqual(
- "Unexpected elements",
- "Y(String) [in Y [in foo() [in ResolveLocalConstructor [in ResolveLocalConstructor.java [in <default> [in src [in Resolve]]]]]]]",
- elements
- );
-}
-/**
- * Resolve local constructor declaration
- */
-public void testLocalConstructorDeclaration() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalConstructorDeclaration.java");
- IJavaElement[] elements = codeSelect(cu, "Y(i", "Y");
- assertElementsEqual(
- "Unexpected elements",
- "Y(int) [in Y [in foo() [in ResolveLocalConstructorDeclaration [in ResolveLocalConstructorDeclaration.java [in <default> [in src [in Resolve]]]]]]]",
- elements
- );
-}
-/**
- * Resolve the local field "fred"
- */
-public void testLocalField() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalField.java");
- IJavaElement[] elements = codeSelect(cu, "fred =", "fred");
- assertElementsEqual(
- "Unexpected elements",
- "fred [in Y [in foo() [in ResolveLocalField [in ResolveLocalField.java [in <default> [in src [in Resolve]]]]]]]",
- elements
- );
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=68710
- */
-public void testLocalField2() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalField2.java");
- IJavaElement[] elements = codeSelect(cu, "var =", "var");
- assertElementsEqual(
- "Unexpected elements",
- "var [in <anonymous #2> [in foo2() [in ResolveLocalField2 [in ResolveLocalField2.java [in <default> [in src [in Resolve]]]]]]]",
- elements
- );
-}
-/**
- * Resolve local field declaration
- */
-public void testLocalFieldDeclaration() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalFieldDeclaration.java");
- IJavaElement[] elements = codeSelect(cu, "fred", "fred");
- assertElementsEqual(
- "Unexpected elements",
- "fred [in Y [in foo() [in ResolveLocalFieldDeclaration [in ResolveLocalFieldDeclaration.java [in <default> [in src [in Resolve]]]]]]]",
- elements
- );
-}
-/**
- * Resolve local member type declaration
- */
-public void testLocalMemberTypeDeclaration() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalMemberTypeDeclaration1.java");
- IJavaElement[] elements = codeSelect(cu, "Member {", "Member");
- assertElementsEqual(
- "Unexpected elements",
- "Member [in Y [in foo() [in ResolveLocalMemberTypeDeclaration1 [in ResolveLocalMemberTypeDeclaration1.java [in <default> [in src [in Resolve]]]]]]]",
- elements
- );
-}
-/**
- * Resolve member type declaration
- */
-public void testLocalMemberTypeDeclaration2() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalMemberTypeDeclaration2.java");
- IJavaElement[] elements = codeSelect(cu, "MemberOfMember", "MemberOfMember");
- assertElementsEqual(
- "Unexpected elements",
- "MemberOfMember [in Member [in Y [in foo() [in ResolveLocalMemberTypeDeclaration2 [in ResolveLocalMemberTypeDeclaration2.java [in <default> [in src [in Resolve]]]]]]]]",
- elements
- );
-}
-/**
- * Resolve the method "foo"
- */
-public void testLocalMethod() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalMethod.java");
- IJavaElement[] elements = codeSelect(cu, "foo(\"", "foo");
- assertElementsEqual(
- "Unexpected elements",
- "foo(String) [in Y [in bar() [in ResolveLocalMethod [in ResolveLocalMethod.java [in <default> [in src [in Resolve]]]]]]]",
- elements
- );
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=68710
- */
-public void testLocalMethod2() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalMethod2.java");
- IJavaElement[] elements = codeSelect(cu, "bar();", "bar");
- assertElementsEqual(
- "Unexpected elements",
- "bar() [in <anonymous #2> [in foo2() [in ResolveLocalMethod2 [in ResolveLocalMethod2.java [in <default> [in src [in Resolve]]]]]]]",
- elements
- );
-}
-/**
- * Resolve method declaration
- */
-public void testLocalMethodDeclaration() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalMethodDeclaration.java");
- IJavaElement[] elements = codeSelect(cu, "foo(i", "foo");
- assertElementsEqual(
- "Unexpected elements",
- "foo(int) [in Y [in bar() [in ResolveLocalMethodDeclaration [in ResolveLocalMethodDeclaration.java [in <default> [in src [in Resolve]]]]]]]",
- elements
- );
-}
+///**
+// * Resolve the local class 'Y' (field type).
+// */
+//public void testLocalClass1() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalClass1.js");
+// IJavaElement[] elements = codeSelect(cu, "Y[]", "Y");
+// assertElementsEqual(
+// "Unexpected elements",
+// "Y [in foo() [in ResolveLocalClass1 [in ResolveLocalClass1.js [in <default> [in src [in Resolve]]]]]]",
+// elements
+// );
+//}
+///**
+// * Resolve the local class 'Y' (local variable type).
+// */
+//public void testLocalClass2() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalClass2.js");
+// IJavaElement[] elements = codeSelect(cu, "Y y", "Y");
+// assertElementsEqual(
+// "Unexpected elements",
+// "Y [in foo() [in ResolveLocalClass2 [in ResolveLocalClass2.js [in <default> [in src [in Resolve]]]]]]",
+// elements
+// );
+//}
+///**
+// * Resolve the local class 'Y'(array initializer type).
+// */
+//public void testLocalClass3() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalClass3.js");
+// IJavaElement[] elements = codeSelect(cu, "Y[]{", "Y");
+// assertElementsEqual(
+// "Unexpected elements",
+// "Y [in foo() [in ResolveLocalClass3 [in ResolveLocalClass3.js [in <default> [in src [in Resolve]]]]]]",
+// elements
+// );
+//}
+/////**
+//// * Resolve the local class 'Y' (return type).
+//// */
+////public void testLocalClass4() throws JavaModelException {
+//// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalClass4.js");
+//// IJavaElement[] elements = codeSelect(cu, "Y bar()", "Y");
+//// assertElementsEqual(
+//// "Unexpected elements",
+//// "Y [in foo() [in ResolveLocalClass4 [in ResolveLocalClass4.js [in <default> [in src [in Resolve]]]]]]",
+//// elements
+//// );
+////}
+/////**
+//// * Resolve the local class 'Y' (method argument).
+//// */
+////public void testLocalClass5() throws JavaModelException {
+//// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalClass5.js");
+//// IJavaElement[] elements = codeSelect(cu, "Y y", "Y");
+//// assertElementsEqual(
+//// "Unexpected elements",
+//// "Y [in foo() [in ResolveLocalClass5 [in ResolveLocalClass5.js [in <default> [in src [in Resolve]]]]]]",
+//// elements
+//// );
+////}
+///**
+// * Resolve the local class 'SuperClass' (super class).
+// */
+//public void testLocalClass6() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalClass6.js");
+// IJavaElement[] elements = codeSelect(cu, "Y { // superclass", "Y");
+// assertElementsEqual(
+// "Unexpected elements",
+// "Y [in foo() [in ResolveLocalClass6 [in ResolveLocalClass6.js [in <default> [in src [in Resolve]]]]]]",
+// elements
+// );
+//}
+///*
+// * https://bugs.eclipse.org/bugs/show_bug.cgi?id=68710
+// */
+//public void testLocalClass7() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalClass7.js");
+// IJavaElement[] elements = codeSelect(cu, "X var", "X");
+// assertElementsEqual(
+// "Unexpected elements",
+// "X [in <anonymous #2> [in foo2() [in ResolveLocalClass7 [in ResolveLocalClass7.js [in <default> [in src [in Resolve]]]]]]]",
+// elements
+// );
+//}
+///*
+// * https://bugs.eclipse.org/bugs/show_bug.cgi?id=126227
+// */
+//public void testLocalClass8() throws JavaModelException {
+// // select the default constructor of a local class
+// IJavaElement[] elements = select(
+// "/Resolve/src/test/Test.js",
+// "package test;\n" +
+// "public class Test\n" +
+// " void foo() {\n" +
+// " class LocalClass {}\n" +
+// " Object o = new LocalClass();\n" +
+// " }\n" +
+// "}\n",
+// "LocalClass");
+//
+// assertElementsEqual(
+// "Unexpected elements",
+// "LocalClass [in foo() [in Test [in [Working copy] Test.js [in test [in src [in Resolve]]]]]]",
+// elements
+// );
+//}
+///*
+// * Resolve the local class in a class file and ensure it is a binary type.
+// * (regression test for bug 131459 Java model returns stale resolved source type for binary type
+// */
+//public void testLocalClass9() throws CoreException, IOException {
+// try {
+// IJavaProject project = createJavaProject("P");
+// addLibrary(
+// project,
+// "lib.jar",
+// "libsrc.zip",
+// new String[] {
+// "X.js",
+// "public class X {\n" +
+// " void foo() {\n" +
+// " class Y {\n" +
+// " }\n" +
+// " }\n" +
+// "}"
+// },
+// "1.4");
+// IClassFile classFile = getClassFile("P", "/P/lib.jar", "", "X.class");
+// IJavaElement[] elements = codeSelect(classFile, "Y", "Y");
+// assertTrue("Should be a binary type", ((IType) elements[0]).isBinary());
+// } finally {
+// deleteProject("P");
+// }
+//}
+/////**
+//// * Resolve a local constructor
+//// */
+////public void testLocalConstructor() throws JavaModelException {
+//// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalConstructor.js");
+//// IJavaElement[] elements = codeSelect(cu, "Y(\"", "Y");
+//// assertElementsEqual(
+//// "Unexpected elements",
+//// "Y(String) [in Y [in foo() [in ResolveLocalConstructor [in ResolveLocalConstructor.js [in <default> [in src [in Resolve]]]]]]]",
+//// elements
+//// );
+////}
+/////**
+//// * Resolve local constructor declaration
+//// */
+////public void testLocalConstructorDeclaration() throws JavaModelException {
+//// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalConstructorDeclaration.js");
+//// IJavaElement[] elements = codeSelect(cu, "Y(i", "Y");
+//// assertElementsEqual(
+//// "Unexpected elements",
+//// "Y(int) [in Y [in foo() [in ResolveLocalConstructorDeclaration [in ResolveLocalConstructorDeclaration.js [in <default> [in src [in Resolve]]]]]]]",
+//// elements
+//// );
+////}
+///**
+// * Resolve the local field "fred"
+// */
+//public void testLocalField() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalField.js");
+// IJavaElement[] elements = codeSelect(cu, "fred =", "fred");
+// assertElementsEqual(
+// "Unexpected elements",
+// "fred [in Y [in foo() [in ResolveLocalField [in ResolveLocalField.js [in <default> [in src [in Resolve]]]]]]]",
+// elements
+// );
+//}
+///*
+// * https://bugs.eclipse.org/bugs/show_bug.cgi?id=68710
+// */
+//public void testLocalField2() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalField2.js");
+// IJavaElement[] elements = codeSelect(cu, "var =", "var");
+// assertElementsEqual(
+// "Unexpected elements",
+// "var [in <anonymous #2> [in foo2() [in ResolveLocalField2 [in ResolveLocalField2.js [in <default> [in src [in Resolve]]]]]]]",
+// elements
+// );
+//}
+///**
+// * Resolve local field declaration
+// */
+//public void testLocalFieldDeclaration() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalFieldDeclaration.js");
+// IJavaElement[] elements = codeSelect(cu, "fred", "fred");
+// assertElementsEqual(
+// "Unexpected elements",
+// "fred [in Y [in foo() [in ResolveLocalFieldDeclaration [in ResolveLocalFieldDeclaration.js [in <default> [in src [in Resolve]]]]]]]",
+// elements
+// );
+//}
+///**
+// * Resolve local member type declaration
+// */
+//public void testLocalMemberTypeDeclaration() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalMemberTypeDeclaration1.js");
+// IJavaElement[] elements = codeSelect(cu, "Member {", "Member");
+// assertElementsEqual(
+// "Unexpected elements",
+// "Member [in Y [in foo() [in ResolveLocalMemberTypeDeclaration1 [in ResolveLocalMemberTypeDeclaration1.js [in <default> [in src [in Resolve]]]]]]]",
+// elements
+// );
+//}
+///**
+// * Resolve member type declaration
+// */
+//public void testLocalMemberTypeDeclaration2() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalMemberTypeDeclaration2.js");
+// IJavaElement[] elements = codeSelect(cu, "MemberOfMember", "MemberOfMember");
+// assertElementsEqual(
+// "Unexpected elements",
+// "MemberOfMember [in Member [in Y [in foo() [in ResolveLocalMemberTypeDeclaration2 [in ResolveLocalMemberTypeDeclaration2.js [in <default> [in src [in Resolve]]]]]]]]",
+// elements
+// );
+//}
+///**
+// * Resolve the method "foo"
+// */
+//public void testLocalMethod() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalMethod.js");
+// IJavaElement[] elements = codeSelect(cu, "foo(\"", "foo");
+// assertElementsEqual(
+// "Unexpected elements",
+// "foo(String) [in Y [in bar() [in ResolveLocalMethod [in ResolveLocalMethod.js [in <default> [in src [in Resolve]]]]]]]",
+// elements
+// );
+//}
+///*
+// * https://bugs.eclipse.org/bugs/show_bug.cgi?id=68710
+// */
+//public void testLocalMethod2() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalMethod2.js");
+// IJavaElement[] elements = codeSelect(cu, "bar();", "bar");
+// assertElementsEqual(
+// "Unexpected elements",
+// "bar() [in <anonymous #2> [in foo2() [in ResolveLocalMethod2 [in ResolveLocalMethod2.js [in <default> [in src [in Resolve]]]]]]]",
+// elements
+// );
+//}
+///**
+// * Resolve method declaration
+// */
+//public void testLocalMethodDeclaration() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalMethodDeclaration.js");
+// IJavaElement[] elements = codeSelect(cu, "foo(i", "foo");
+// assertElementsEqual(
+// "Unexpected elements",
+// "foo(int) [in Y [in bar() [in ResolveLocalMethodDeclaration [in ResolveLocalMethodDeclaration.js [in <default> [in src [in Resolve]]]]]]]",
+// elements
+// );
+//}
/**
* Resolve a local declaration name
*/
public void testLocalName1() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalName.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalName.js");
IJavaElement[] elements = codeSelect(cu, "var1 = new Object();", "var1");
assertElementsEqual(
"Unexpected elements",
- "var1 [in foo() [in ResolveLocalName [in ResolveLocalName.java [in <default> [in src [in Resolve]]]]]]",
+ "var1 [in foo() [in ResolveLocalName.js [in <default> [in src [in Resolve]]]]]",
elements
);
}
@@ -752,11 +774,11 @@ public void testLocalName1() throws JavaModelException {
* Resolve a local declaration name with base type
*/
public void testLocalName2() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalName.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalName.js");
IJavaElement[] elements = codeSelect(cu, "var2 = 1;", "var2");
assertElementsEqual(
"Unexpected elements",
- "var2 [in foo() [in ResolveLocalName [in ResolveLocalName.java [in <default> [in src [in Resolve]]]]]]",
+ "var2 [in foo() [in ResolveLocalName.js [in <default> [in src [in Resolve]]]]]",
elements
);
}
@@ -764,11 +786,11 @@ public void testLocalName2() throws JavaModelException {
* Resolve a local variable reference
*/
public void testLocalName3() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalName.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalName.js");
IJavaElement[] elements = codeSelect(cu, "var1.toString();", "var1");
assertElementsEqual(
"Unexpected elements",
- "var1 [in foo() [in ResolveLocalName [in ResolveLocalName.java [in <default> [in src [in Resolve]]]]]]",
+ "var1 [in foo() [in ResolveLocalName.js [in <default> [in src [in Resolve]]]]]",
elements
);
}
@@ -776,11 +798,11 @@ public void testLocalName3() throws JavaModelException {
* Resolve a local variable reference
*/
public void testLocalName4() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalName.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalName.js");
IJavaElement[] elements = codeSelect(cu, "var2++;", "var2");
assertElementsEqual(
"Unexpected elements",
- "var2 [in foo() [in ResolveLocalName [in ResolveLocalName.java [in <default> [in src [in Resolve]]]]]]",
+ "var2 [in foo() [in ResolveLocalName.js [in <default> [in src [in Resolve]]]]]",
elements
);
}
@@ -788,11 +810,11 @@ public void testLocalName4() throws JavaModelException {
* Resolve a local variable reference
*/
public void testLocalName5() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalName.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalName.js");
IJavaElement[] elements = codeSelect(cu, "var3.hashCode();", "var3");
assertElementsEqual(
"Unexpected elements",
- "var3 [in foo() [in ResolveLocalName [in ResolveLocalName.java [in <default> [in src [in Resolve]]]]]]",
+ "var3 [in foo() [in ResolveLocalName.js [in <default> [in src [in Resolve]]]]]",
elements
);
}
@@ -800,11 +822,11 @@ public void testLocalName5() throws JavaModelException {
* Resolve a local variable reference
*/
public void testLocalName6() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalName.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalName.js");
IJavaElement[] elements = codeSelect(cu, "var3.toString();", "var3");
assertElementsEqual(
"Unexpected elements",
- "var3 [in foo() [in ResolveLocalName [in ResolveLocalName.java [in <default> [in src [in Resolve]]]]]]",
+ "var3 [in foo() [in ResolveLocalName.js [in <default> [in src [in Resolve]]]]]",
elements
);
}
@@ -812,11 +834,11 @@ public void testLocalName6() throws JavaModelException {
* Resolve a local variable reference
*/
public void testLocalName7() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalName.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalName.js");
IJavaElement[] elements = codeSelect(cu, "var4;", "var4");
assertElementsEqual(
"Unexpected elements",
- "var4 [in foo() [in ResolveLocalName [in ResolveLocalName.java [in <default> [in src [in Resolve]]]]]]",
+ "var4 [in foo() [in ResolveLocalName.js [in <default> [in src [in Resolve]]]]]",
elements
);
}
@@ -825,14 +847,14 @@ public void testLocalName7() throws JavaModelException {
* (regression test for bug 48422 Calling isStructureKnown() on ILocalVaraible throws JavaModelExceptions)
*/
public void testLocalVarIsStructureKnown() throws JavaModelException {
- ILocalVariable localVar = getLocalVariable("/Resolve/src/ResolveLocalName.java", "var1 = new Object();", "var1");
+ ILocalVariable localVar = getLocalVariable("/Resolve/src/ResolveLocalName.js", "var1 = new Object();", "var1");
assertTrue(localVar.isStructureKnown());
}
/*
* Resolve a local reference and ensure its type signature is correct.
*/
public void testLocalVarTypeSignature1() throws JavaModelException {
- ILocalVariable localVar = getLocalVariable("/Resolve/src/ResolveLocalName.java", "var1 = new Object();", "var1");
+ ILocalVariable localVar = getLocalVariable("/Resolve/src/ResolveLocalName.js", "var1 = new Object();", "var1");
assertEquals(
"Unexpected type signature",
"QObject;",
@@ -842,41 +864,41 @@ public void testLocalVarTypeSignature1() throws JavaModelException {
* Resolve a local reference and ensure its type signature is correct.
*/
public void testLocalVarTypeSignature2() throws JavaModelException {
- ILocalVariable localVar = getLocalVariable("/Resolve/src/ResolveLocalName.java", "var2 = 1;", "var2");
+ ILocalVariable localVar = getLocalVariable("/Resolve/src/ResolveLocalName.js", "var2 = 1;", "var2");
assertEquals(
"Unexpected type signature",
"I",
localVar.getTypeSignature());
}
-/**
- * Resolve member type declaration
- */
-public void testMemberTypeDeclaration() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveMemberTypeDeclaration1.java");
- IJavaElement[] elements = codeSelect(cu, "MemberInterface", "MemberInterface");
- assertElementsEqual(
- "Unexpected elements",
- "MemberInterface [in ResolveMemberTypeDeclaration1 [in ResolveMemberTypeDeclaration1.java [in <default> [in src [in Resolve]]]]]",
- elements
- );
-}
-/**
- * Resolve member type declaration located in default package
- */
-public void testMemberTypeDeclaration2() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveMemberTypeDeclaration2.java");
- IJavaElement[] elements = codeSelect(cu, "MemberOfMember", "MemberOfMember");
- assertElementsEqual(
- "Unexpected elements",
- "MemberOfMember [in Member [in ResolveMemberTypeDeclaration2 [in ResolveMemberTypeDeclaration2.java [in <default> [in src [in Resolve]]]]]]",
- elements
- );
-}
+///**
+// * Resolve member type declaration
+// */
+//public void testMemberTypeDeclaration() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveMemberTypeDeclaration1.js");
+// IJavaElement[] elements = codeSelect(cu, "MemberInterface", "MemberInterface");
+// assertElementsEqual(
+// "Unexpected elements",
+// "MemberInterface [in ResolveMemberTypeDeclaration1 [in ResolveMemberTypeDeclaration1.js [in <default> [in src [in Resolve]]]]]",
+// elements
+// );
+//}
+///**
+// * Resolve member type declaration located in default package
+// */
+//public void testMemberTypeDeclaration2() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveMemberTypeDeclaration2.js");
+// IJavaElement[] elements = codeSelect(cu, "MemberOfMember", "MemberOfMember");
+// assertElementsEqual(
+// "Unexpected elements",
+// "MemberOfMember [in Member [in ResolveMemberTypeDeclaration2 [in ResolveMemberTypeDeclaration2.js [in <default> [in src [in Resolve]]]]]]",
+// elements
+// );
+//}
/**
* Try to resolve message send on base type.
*/
public void testMessageSendOnBaseType() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveMessageSendOnBaseType.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveMessageSendOnBaseType.js");
IJavaElement[] elements = codeSelect(cu, "hello", "hello");
assertElementsEqual(
"Unexpected elements",
@@ -888,11 +910,11 @@ public void testMessageSendOnBaseType() throws JavaModelException {
* Resolve the method "foo"
*/
public void testMethod() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveMethod.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveMethod.js");
IJavaElement[] elements = codeSelect(cu, "foo(\"", "foo");
assertElementsEqual(
"Unexpected elements",
- "foo(String) [in ResolveMethod [in ResolveMethod.java [in <default> [in src [in Resolve]]]]]",
+ "foo(p0) [in ResolveMethod.js [in <default> [in src [in Resolve]]]]",
elements
);
}
@@ -900,354 +922,350 @@ public void testMethod() throws JavaModelException {
* Resolve method declaration
*/
public void testMethodDeclaration() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveMethodDeclaration.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveMethodDeclaration.js");
IJavaElement[] elements = codeSelect(cu, "foo(i", "foo");
assertElementsEqual(
"Unexpected elements",
- "foo(int) [in ResolveMethodDeclaration [in ResolveMethodDeclaration.java [in <default> [in src [in Resolve]]]]]",
- elements
- );
-}
-/**
- * Resolve method declaration in anonymous
- * (regression test for bug 45655 exception while editing java file)
- */
-public void testMethodDeclarationInAnonymous() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveMethodDeclarationInAnonymous.java");
- IJavaElement[] elements = codeSelect(cu, "bar()", "bar");
- assertElementsEqual(
- "Unexpected elements",
- "bar() [in <anonymous #1> [in foo() [in ResolveMethodDeclarationInAnonymous [in ResolveMethodDeclarationInAnonymous.java [in <default> [in src [in Resolve]]]]]]]",
- elements
- );
-}
-/**
- * Resolve method declaration in anonymous
- * (regression test for bug 45786 No selection on method declaration in field initializer)
- */
-public void testMethodDeclarationInAnonymous2() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveMethodDeclarationInAnonymous2.java");
- IJavaElement[] elements = codeSelect(cu, "foo()", "foo");
- assertElementsEqual(
- "Unexpected elements",
- "foo() [in <anonymous #1> [in field [in ResolveMethodDeclarationInAnonymous2 [in ResolveMethodDeclarationInAnonymous2.java [in <default> [in src [in Resolve]]]]]]]",
- elements
- );
-}
-/**
- * Resolve method declaration in anonymous
- * (regression test for bug 47795 NPE selecting method in anonymous 2 level deep)
- */
-public void testMethodDeclarationInAnonymous3() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveMethodDeclarationInAnonymous3.java");
- IJavaElement[] elements = codeSelect(cu, "selectMe(", "selectMe");
- assertElementsEqual(
- "Unexpected elements",
- "selectMe() [in <anonymous #1> [in bar() [in <anonymous #1> [in foo() [in ResolveMethodDeclarationInAnonymous3 [in ResolveMethodDeclarationInAnonymous3.java [in <default> [in src [in Resolve]]]]]]]]]",
- elements
- );
-}
-/**
- * Resolve method declaration in anonymous
- * (regression test for bug 47214 Cannot open declaration on a selected method of an anonymous class)
- */
-public void testMethodDeclarationInAnonymous4() throws JavaModelException {
- IClassFile classFile = getClassFile("Resolve", "test47214.jar", "p", "X.class");
- IJavaElement[] elements = codeSelect(classFile, "bar(", "bar");
- assertElementsEqual(
- "Unexpected elements",
- "bar() [in <anonymous> [in X$1.class [in p [in test47214.jar [in Resolve]]]]]",
- elements
- );
-}
+ "foo(p0) [in ResolveMethodDeclaration.js [in <default> [in src [in Resolve]]]]",
+ elements
+ );
+}
+///**
+// * Resolve method declaration in anonymous
+// * (regression test for bug 45655 exception while editing java file)
+// */
+//public void testMethodDeclarationInAnonymous() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveMethodDeclarationInAnonymous.js");
+// IJavaElement[] elements = codeSelect(cu, "bar()", "bar");
+// assertElementsEqual(
+// "Unexpected elements",
+// "bar() [in <anonymous #1> [in foo() [in ResolveMethodDeclarationInAnonymous [in ResolveMethodDeclarationInAnonymous.js [in <default> [in src [in Resolve]]]]]]]",
+// elements
+// );
+//}
+///**
+// * Resolve method declaration in anonymous
+// * (regression test for bug 45786 No selection on method declaration in field initializer)
+// */
+//public void testMethodDeclarationInAnonymous2() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveMethodDeclarationInAnonymous2.js");
+// IJavaElement[] elements = codeSelect(cu, "foo()", "foo");
+// assertElementsEqual(
+// "Unexpected elements",
+// "foo() [in <anonymous #1> [in field [in ResolveMethodDeclarationInAnonymous2 [in ResolveMethodDeclarationInAnonymous2.js [in <default> [in src [in Resolve]]]]]]]",
+// elements
+// );
+//}
+///**
+// * Resolve method declaration in anonymous
+// * (regression test for bug 47795 NPE selecting method in anonymous 2 level deep)
+// */
+//public void testMethodDeclarationInAnonymous3() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveMethodDeclarationInAnonymous3.js");
+// IJavaElement[] elements = codeSelect(cu, "selectMe(", "selectMe");
+// assertElementsEqual(
+// "Unexpected elements",
+// "selectMe() [in <anonymous #1> [in bar() [in <anonymous #1> [in foo() [in ResolveMethodDeclarationInAnonymous3 [in ResolveMethodDeclarationInAnonymous3.js [in <default> [in src [in Resolve]]]]]]]]]",
+// elements
+// );
+//}
+///**
+// * Resolve method declaration in anonymous
+// * (regression test for bug 47214 Cannot open declaration on a selected method of an anonymous class)
+// */
+//public void testMethodDeclarationInAnonymous4() throws JavaModelException {
+// IClassFile classFile = getClassFile("Resolve", "test47214.jar", "p", "X.class");
+// IJavaElement[] elements = codeSelect(classFile, "bar(", "bar");
+// assertElementsEqual(
+// "Unexpected elements",
+// "bar() [in <anonymous> [in X$1.class [in p [in test47214.jar [in Resolve]]]]]",
+// elements
+// );
+//}
/**
* Resolve the method
*/
public void testMethodWithIncorrectParameter() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveMethodWithIncorrectParameter.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveMethodWithIncorrectParameter.js");
IJavaElement[] elements = codeSelect(cu, "foo(\"String", "foo");
assertElementsEqual(
"Unexpected elements",
- "foo(int) [in ResolveMethodWithIncorrectParameter [in ResolveMethodWithIncorrectParameter.java [in <default> [in src [in Resolve]]]]]",
+ "foo(p0) [in ResolveMethodWithIncorrectParameter.js [in <default> [in src [in Resolve]]]]",
elements
);
}
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=126160
public void testMethodWithIncorrectParameter2() throws JavaModelException {
- IJavaElement[] elements = select(
- "/Resolve/src/test/Test.java",
- "package test;\n" +
- "public class Test\n" +
- " void called(String arg) {\n" +
- " }\n" +
- " void foo() {\n" +
- " new Object() {\n" +
- " void bar() {\n" +
- " called(zzz);\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- "}\n",
- "called");
-
- assertElementsEqual(
- "Unexpected elements",
- "called(String) [in Test [in [Working copy] Test.java [in test [in src [in Resolve]]]]]",
- elements
- );
+// IJavaElement[] elements = select(
+// "/Resolve/src/test/Test.js",
+// "package test;\n" +
+// "public class Test\n" +
+// " void called(String arg) {\n" +
+// " }\n" +
+// " void foo() {\n" +
+// " new Object() {\n" +
+// " void bar() {\n" +
+// " called(zzz);\n" +
+// " }\n" +
+// " };\n" +
+// " }\n" +
+// "}\n",
+// "called");
+//
+// assertElementsEqual(
+// "Unexpected elements",
+// "called(String) [in Test [in [Working copy] Test.js [in test [in src [in Resolve]]]]]",
+// elements
+// );
-}
-/**
- * Resolve method in inner type.
- */
-public void testMethodWithInnerTypeInClassFile() throws JavaModelException {
- IClassFile cf = getClassFile("Resolve", "zzz.jar", "", "MyClass$Inner.class");
- IJavaElement[] elements = codeSelect(cf, "test", "test");
- assertElementsEqual(
- "Unexpected elements",
- "test() [in MyClass [in MyClass.class [in <default> [in zzz.jar [in Resolve]]]]]",
- elements
- );
-}
-/**
- * bug 33785
- */
-public void testMethodWithInnerTypeInClassFile2() throws JavaModelException {
- IClassFile cf = getClassFile("Resolve", "zzz.jar", "", "MyClass2$Inner.class");
- IJavaElement[] elements = codeSelect(cf, "method", "method");
- assertElementsEqual(
- "Unexpected elements",
- "method(MyClass2.Inner[]) [in MyClass2 [in MyClass2.class [in <default> [in zzz.jar [in Resolve]]]]]",
- elements
- );
-
- IMethod method = (IMethod) elements[0];
- ISourceRange sourceRange = method.getSourceRange();
- String methodString = "void method(MyClass2.Inner[] arg){}";
- int o = cf.getSource().indexOf(methodString);
- int l = methodString.length();
- assertEquals("Unexpected offset", o, sourceRange.getOffset());
- assertEquals("Unexpected length", l, sourceRange.getLength());
-}
+ assertTrue("implement",false);
+}
+///**
+// * Resolve method in inner type.
+// */
+//public void testMethodWithInnerTypeInClassFile() throws JavaModelException {
+// IClassFile cf = getClassFile("Resolve", "zzz.jar", "", "MyClass$Inner.class");
+// IJavaElement[] elements = codeSelect(cf, "test", "test");
+// assertElementsEqual(
+// "Unexpected elements",
+// "test() [in MyClass [in MyClass.class [in <default> [in zzz.jar [in Resolve]]]]]",
+// elements
+// );
+//}
+///**
+// * bug 33785
+// */
+//public void testMethodWithInnerTypeInClassFile2() throws JavaModelException {
+// IClassFile cf = getClassFile("Resolve", "zzz.jar", "", "MyClass2$Inner.class");
+// IJavaElement[] elements = codeSelect(cf, "method", "method");
+// assertElementsEqual(
+// "Unexpected elements",
+// "method(MyClass2.Inner[]) [in MyClass2 [in MyClass2.class [in <default> [in zzz.jar [in Resolve]]]]]",
+// elements
+// );
+//
+// IMethod method = (IMethod) elements[0];
+// ISourceRange sourceRange = method.getSourceRange();
+// String methodString = "void method(MyClass2.Inner[] arg){}";
+// int o = cf.getSource().indexOf(methodString);
+// int l = methodString.length();
+// assertEquals("Unexpected offset", o, sourceRange.getOffset());
+// assertEquals("Unexpected length", l, sourceRange.getLength());
+//}
/**
* Tries to resolve the type "lang. \u0053tring" which doesn't exist.
*/
public void testNegativeResolveUnicode() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveUnicode.java");
- IJavaElement[] elements = codeSelect(cu, "lang.\\u0053tring", "lang.\\u0053tring");
- assertElementsEqual(
- "Unexpected elements",
- "String [in String.class [in java.lang [in "+ getExternalJCLPathString() + "]]]",
- elements
- );
-}
-/**
- * Resolve the package "java.lang"
- */
-public void testPackage() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolvePackage.java");
- IJavaElement[] elements = codeSelect(cu, "lang", "lang");
- assertElementsEqual(
- "Unexpected elements",
- "java.lang [in " + getExternalJCLPathString() + "]",
- elements
- );
-}
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveUnicode.js");
+// IJavaElement[] elements = codeSelect(cu, "lang.\\u0053tring", "lang.\\u0053tring");
+// assertElementsEqual(
+// "Unexpected elements",
+// "String [in String.class [in java.lang [in "+ getExternalJCLPathString() + " [in Resolve]]]]",
+// elements
+// );
+ assertTrue("implement",false);
+}
+///**
+// * Resolve the package "java.lang"
+// */
+//public void testPackage() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolvePackage.js");
+// IJavaElement[] elements = codeSelect(cu, "lang", "lang");
+// assertElementsEqual(
+// "Unexpected elements",
+// "java.lang [in " + getExternalJCLPathString() + " [in Resolve]]",
+// elements
+// );
+//}
/**
* Try to resolve the qualified type "lang.Object"
*/
public void testPartiallyQualifiedType() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolvePartiallyQualifiedType.java");
- IJavaElement[] elements = codeSelect(cu, "lang.Object", "lang.Object");
- assertElementsEqual(
- "Unexpected elements",
- "Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + "]]]",
- elements
- );
-}
-/**
- * Resolve the qualified type "java.lang.Object"
- */
-public void testQualifiedType() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveQualifiedType.java");
- IJavaElement[] elements = codeSelect(cu, "java.lang.Object", "java.lang.Object");
- assertElementsEqual(
- "Unexpected elements",
- "Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + "]]]",
- elements
- );
-}
-/**
- * bugs http://dev.eclipse.org/bugs/show_bug.cgi?id=25888
- */
-public void testStaticClassConstructor() throws JavaModelException {
- IClassFile cu = getClassFile("Resolve", "test25888.jar", "", "ResolveStaticClassConstructor.class");
- IJavaElement[] elements = codeSelect(cu, "StaticInnerClass();", "StaticInnerClass");
- assertElementsEqual(
- "Unexpected elements",
- "StaticInnerClass() [in StaticInnerClass [in ResolveStaticClassConstructor$StaticInnerClass.class [in <default> [in test25888.jar [in Resolve]]]]]",
- elements
- );
-}
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolvePartiallyQualifiedType.js");
+// IJavaElement[] elements = codeSelect(cu, "lang.Object", "lang.Object");
+// assertElementsEqual(
+// "Unexpected elements",
+// "Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + " [in Resolve]]]]",
+// elements
+// );
+ assertTrue("implement",false);
+}
+///**
+// * Resolve the qualified type "java.lang.Object"
+// */
+//public void testQualifiedType() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveQualifiedType.js");
+// IJavaElement[] elements = codeSelect(cu, "java.lang.Object", "java.lang.Object");
+// assertElementsEqual(
+// "Unexpected elements",
+// "Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + " [in Resolve]]]]",
+// elements
+// );
+//}
+///**
+// * bugs http://dev.eclipse.org/bugs/show_bug.cgi?id=25888
+// */
+//public void testStaticClassConstructor() throws JavaModelException {
+// IClassFile cu = getClassFile("Resolve", "test25888.jar", "", "ResolveStaticClassConstructor.class");
+// IJavaElement[] elements = codeSelect(cu, "StaticInnerClass();", "StaticInnerClass");
+// assertElementsEqual(
+// "Unexpected elements",
+// "StaticInnerClass() [in StaticInnerClass [in ResolveStaticClassConstructor$StaticInnerClass.class [in <default> [in test25888.jar [in Resolve]]]]]",
+// elements
+// );
+//}
/**
* Resolve type declaration
*/
public void testTypeDeclaration() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveTypeDeclaration.java");
- IJavaElement[] elements = codeSelect(cu, "OtherType", "OtherType");
- assertElementsEqual(
- "Unexpected elements",
- "OtherType [in ResolveTypeDeclaration.java [in <default> [in src [in Resolve]]]]",
- elements
- );
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveTypeDeclaration.js");
+// IJavaElement[] elements = codeSelect(cu, "OtherType", "OtherType");
+// assertElementsEqual(
+// "Unexpected elements",
+// "OtherType [in ResolveTypeDeclaration.js [in <default> [in src [in Resolve]]]]",
+// elements
+// );
+//
+ assertTrue("implement",false);
}
/**
* Resolve type in comment.
*/
public void testTypeInComment() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveTypeInComment.java");
- IJavaElement[] elements = codeSelect(cu, "X */", "X");
- assertElementsEqual(
- "Unexpected elements",
- "X [in X.java [in p2 [in src [in Resolve]]]]",
- elements
- );
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveTypeInComment.js");
+// IJavaElement[] elements = codeSelect(cu, "X */", "X");
+// assertElementsEqual(
+// "Unexpected elements",
+// "X [in X.js [in p2 [in src [in Resolve]]]]",
+// elements
+// );
+ assertTrue("implement",false);
}
/**
* Resolve the type "java.lang. \u0053ring"
*/
public void testUnicode() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveUnicode.java");
- IJavaElement[] elements = codeSelect(cu, "java.lang.\\u0053tring", "java.lang.\\u0053tring");
- assertElementsEqual(
- "Unexpected elements",
- "String [in String.class [in java.lang [in "+ getExternalJCLPathString() + "]]]",
- elements
- );
-}
-/**
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=47177
- */
-public void testLocalNameForClassFile() throws JavaModelException {
- IClassFile cu = getClassFile("Resolve", "test47177.jar", "", "ResolveLocalName.class");
-
- //Resolve a local declaration name
- IJavaElement[] elements = codeSelect(cu, "var1 = new Object();", "var1");
- assertElementsEqual(
- "Unexpected elements",
- "var1 [in foo() [in ResolveLocalName [in ResolveLocalName.class [in <default> [in test47177.jar [in Resolve]]]]]]",
- elements
- );
-
- // Resolve a local declaration name with base type
- elements = codeSelect(cu, "var2 = 1;", "var2");
- assertElementsEqual(
- "Unexpected elements",
- "var2 [in foo() [in ResolveLocalName [in ResolveLocalName.class [in <default> [in test47177.jar [in Resolve]]]]]]",
- elements
- );
-
- // Resolve a local variable reference
- elements = codeSelect(cu, "var1.toString();", "var1");
- assertElementsEqual(
- "Unexpected elements",
- "var1 [in foo() [in ResolveLocalName [in ResolveLocalName.class [in <default> [in test47177.jar [in Resolve]]]]]]",
- elements
- );
-
- // Resolve a local variable reference
- elements = codeSelect(cu, "var2++;", "var2");
- assertElementsEqual(
- "Unexpected elements",
- "var2 [in foo() [in ResolveLocalName [in ResolveLocalName.class [in <default> [in test47177.jar [in Resolve]]]]]]",
- elements
- );
-
- // Resolve a local variable reference
- elements = codeSelect(cu, "var3.hashCode();", "var3");
- assertElementsEqual(
- "Unexpected elements",
- "var3 [in foo() [in ResolveLocalName [in ResolveLocalName.class [in <default> [in test47177.jar [in Resolve]]]]]]",
- elements
- );
-
- // Resolve a local variable reference
- elements = codeSelect(cu, "var3.toString();", "var3");
- assertElementsEqual(
- "Unexpected elements",
- "var3 [in foo() [in ResolveLocalName [in ResolveLocalName.class [in <default> [in test47177.jar [in Resolve]]]]]]",
- elements
- );
-
- // Resolve a local variable reference
- elements = codeSelect(cu, "var4;", "var4");
- assertElementsEqual(
- "Unexpected elements",
- "var4 [in foo() [in ResolveLocalName [in ResolveLocalName.class [in <default> [in test47177.jar [in Resolve]]]]]]",
- elements
- );
-}
-/**
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=42365
- */
-public void testMethodDeclarationInInterface() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveMethodDeclarationInInterface.java");
- IJavaElement[] elements = codeSelect(cu, "foo", "foo");
- assertElementsEqual(
- "Unexpected elements",
- "foo() [in QI [in QI.class [in <default> [in jj.jar [in Resolve]]]]]",
- elements
- );
-}
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveUnicode.js");
+// IJavaElement[] elements = codeSelect(cu, "java.lang.\\u0053tring", "java.lang.\\u0053tring");
+// assertElementsEqual(
+// "Unexpected elements",
+// "String [in String.class [in java.lang [in "+ getExternalJCLPathString() + " [in Resolve]]]]",
+// elements
+// );
+//
+ assertTrue("implement",false);
+}
+///**
+// * https://bugs.eclipse.org/bugs/show_bug.cgi?id=47177
+// */
+//public void testLocalNameForClassFile() throws JavaModelException {
+// IClassFile cu = getClassFile("Resolve", "test47177.jar", "", "ResolveLocalName.class");
+//
+// //Resolve a local declaration name
+// IJavaElement[] elements = codeSelect(cu, "var1 = new Object();", "var1");
+// assertElementsEqual(
+// "Unexpected elements",
+// "var1 [in foo() [in ResolveLocalName [in ResolveLocalName.class [in <default> [in test47177.jar [in Resolve]]]]]]",
+// elements
+// );
+//
+// // Resolve a local declaration name with base type
+// elements = codeSelect(cu, "var2 = 1;", "var2");
+// assertElementsEqual(
+// "Unexpected elements",
+// "var2 [in foo() [in ResolveLocalName [in ResolveLocalName.class [in <default> [in test47177.jar [in Resolve]]]]]]",
+// elements
+// );
+//
+// // Resolve a local variable reference
+// elements = codeSelect(cu, "var1.toString();", "var1");
+// assertElementsEqual(
+// "Unexpected elements",
+// "var1 [in foo() [in ResolveLocalName [in ResolveLocalName.class [in <default> [in test47177.jar [in Resolve]]]]]]",
+// elements
+// );
+//
+// // Resolve a local variable reference
+// elements = codeSelect(cu, "var2++;", "var2");
+// assertElementsEqual(
+// "Unexpected elements",
+// "var2 [in foo() [in ResolveLocalName [in ResolveLocalName.class [in <default> [in test47177.jar [in Resolve]]]]]]",
+// elements
+// );
+//
+// // Resolve a local variable reference
+// elements = codeSelect(cu, "var3.hashCode();", "var3");
+// assertElementsEqual(
+// "Unexpected elements",
+// "var3 [in foo() [in ResolveLocalName [in ResolveLocalName.class [in <default> [in test47177.jar [in Resolve]]]]]]",
+// elements
+// );
+//
+// // Resolve a local variable reference
+// elements = codeSelect(cu, "var3.toString();", "var3");
+// assertElementsEqual(
+// "Unexpected elements",
+// "var3 [in foo() [in ResolveLocalName [in ResolveLocalName.class [in <default> [in test47177.jar [in Resolve]]]]]]",
+// elements
+// );
+//
+// // Resolve a local variable reference
+// elements = codeSelect(cu, "var4;", "var4");
+// assertElementsEqual(
+// "Unexpected elements",
+// "var4 [in foo() [in ResolveLocalName [in ResolveLocalName.class [in <default> [in test47177.jar [in Resolve]]]]]]",
+// elements
+// );
+//}
+///**
+// * https://bugs.eclipse.org/bugs/show_bug.cgi?id=42365
+// */
+//public void testMethodDeclarationInInterface() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveMethodDeclarationInInterface.js");
+// IJavaElement[] elements = codeSelect(cu, "foo", "foo");
+// assertElementsEqual(
+// "Unexpected elements",
+// "foo() [in QI [in QI.class [in <default> [in jj.jar [in Resolve]]]]]",
+// elements
+// );
+//}
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=142303
-public void testMethodInAnonymous1() throws JavaModelException {
- this.workingCopies = new ICompilationUnit[2];
- this.workingCopies[0] = getWorkingCopy(
- "/Resolve/src/Test2.java",
- "public class Test2 {\n" +
- "\n" +
- " private void foo(boolean v) {\n" +
- " }\n" +
- "\n" +
- " void function(boolean v) {\n" +
- " new Object() {\n" +
- " public void run() {\n" +
- " if (false) {\n" +
- " } else {\n" +
- " foo(false); // <-- right-click, open declaration fails\n" +
- " }\n" +
- " }\n" +
- " };\n" +
- " new Object() { public void run() { } };\n" +
- " if (v) {}\n" +
- " }\n" +
- "}");
-
- String str = this.workingCopies[0].getSource();
- String selectAt = "foo(false)";
- String selection = "foo";
- int start = str.indexOf(selectAt);
- int length = selection.length();
- IJavaElement[] elements = this.workingCopies[0].codeSelect(start, length, this.wcOwner);
-
- assertElementsEqual(
- "Unexpected elements",
- "foo(boolean) [in Test2 [in [Working copy] Test2.java [in <default> [in src [in Resolve]]]]]",
- elements);
-}
-/**
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=57414
- */
-public void testEndOfFile() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveEndOfFile.java");
- IJavaElement[] elements = codeSelectAt(cu, "zzz");
- assertElementsEqual(
- "Unexpected elements",
- "",
- elements
- );
-}
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=144858
+//public void testMethodInAnonymous1() throws JavaModelException {
+// this.workingCopies = new ICompilationUnit[2];
+// this.workingCopies[0] = getWorkingCopy(
+// "/Resolve/src/Test2.java",
+// "public class Test2 {\n" +
+// "\n" +
+// " private void foo(boolean v) {\n" +
+// " }\n" +
+// "\n" +
+// " void function(boolean v) {\n" +
+// " new Object() {\n" +
+// " public void run() {\n" +
+// " if (false) {\n" +
+// " } else {\n" +
+// " foo(false); // <-- right-click, open declaration fails\n" +
+// " }\n" +
+// " }\n" +
+// " };\n" +
+// " new Object() { public void run() { } };\n" +
+// " if (v) {}\n" +
+// " }\n" +
+// "}");
+//
+// String str = this.workingCopies[0].getSource();
+// String selectAt = "foo(false)";
+// String selection = "foo";
+// int start = str.indexOf(selectAt);
+// int length = selection.length();
+// IJavaElement[] elements = this.workingCopies[0].codeSelect(start, length, this.wcOwner);
+//
+// assertElementsEqual(
+// "Unexpected elements",
+// "foo(boolean) [in Test2 [in [Working copy] Test2.java [in <default> [in src [in Resolve]]]]]",
+// elements);
+//}
+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=144858
public void testDuplicateLocals1() throws JavaModelException {
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getWorkingCopy(
@@ -1542,70 +1560,26 @@ public void testDuplicateLocalsType2() throws JavaModelException {
elements
);
}
+
/**
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=65259
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=57414
*/
-public void testDuplicateMethodDeclaration() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateMethodDeclaration.java");
-
- String str = cu.getSource();
- int start = str.indexOf("foo");
- int length = "foo".length();
- IJavaElement[] elements = cu.codeSelect(start, length);
-
+public void testEndOfFile() throws JavaModelException {
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveEndOfFile.js");
+ IJavaElement[] elements = codeSelectAt(cu, "zzz");
assertElementsEqual(
"Unexpected elements",
- "foo() [in ResolveDuplicateMethodDeclaration [in ResolveDuplicateMethodDeclaration.java [in <default> [in src [in Resolve]]]]]",
+ "",
elements
);
}
+
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=65259
*/
-public void testDuplicateMethodDeclaration2() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateMethodDeclaration.java");
-
- String str = cu.getSource();
- int start = str.lastIndexOf("foo");
- int length = "foo".length();
- IJavaElement[] elements = cu.codeSelect(start, length);
-
- assertElementsEqual(
- "Unexpected elements",
- "foo()#2 [in ResolveDuplicateMethodDeclaration [in ResolveDuplicateMethodDeclaration.java [in <default> [in src [in Resolve]]]]]",
- elements
- );
-}
-public void testDuplicateMethodDeclaration3() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateMethodDeclaration3.java");
-
- String str = cu.getSource();
- int start = str.indexOf("foo");
- int length = "foo".length();
- IJavaElement[] elements = cu.codeSelect(start, length);
-
- assertElementsEqual(
- "Unexpected elements",
- "foo(Object) [in ResolveDuplicateMethodDeclaration3 [in ResolveDuplicateMethodDeclaration3.java [in <default> [in src [in Resolve]]]]]",
- elements
- );
-}
-public void testDuplicateMethodDeclaration4() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateMethodDeclaration3.java");
-
- String str = cu.getSource();
- int start = str.lastIndexOf("foo");
- int length = "foo".length();
- IJavaElement[] elements = cu.codeSelect(start, length);
-
- assertElementsEqual(
- "Unexpected elements",
- "foo(Object)#2 [in ResolveDuplicateMethodDeclaration3 [in ResolveDuplicateMethodDeclaration3.java [in <default> [in src [in Resolve]]]]]",
- elements
- );
-}
-public void testDuplicateMethodDeclaration5() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateMethodDeclaration5.java");
+public void testDuplicateMethodDeclaration() throws JavaModelException {
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateMethodDeclaration.js");
String str = cu.getSource();
int start = str.indexOf("foo");
@@ -1614,12 +1588,15 @@ public void testDuplicateMethodDeclaration5() throws JavaModelException {
assertElementsEqual(
"Unexpected elements",
- "foo(Zork) [in ResolveDuplicateMethodDeclaration5 [in ResolveDuplicateMethodDeclaration5.java [in <default> [in src [in Resolve]]]]]",
+ "foo() [in ResolveDuplicateMethodDeclaration.js [in <default> [in src [in Resolve]]]]",
elements
);
}
-public void testDuplicateMethodDeclaration6() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateMethodDeclaration5.java");
+/**
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=65259
+ */
+public void testDuplicateMethodDeclaration2() throws JavaModelException {
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateMethodDeclaration.js");
String str = cu.getSource();
int start = str.lastIndexOf("foo");
@@ -1628,12 +1605,12 @@ public void testDuplicateMethodDeclaration6() throws JavaModelException {
assertElementsEqual(
"Unexpected elements",
- "foo(Zork)#2 [in ResolveDuplicateMethodDeclaration5 [in ResolveDuplicateMethodDeclaration5.java [in <default> [in src [in Resolve]]]]]",
+ "foo()#2 [in ResolveDuplicateMethodDeclaration.js [in <default> [in src [in Resolve]]]]",
elements
);
}
-public void testDuplicateMethodDeclaration7() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateMethodDeclaration7.java");
+public void testDuplicateMethodDeclaration3() throws JavaModelException {
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateMethodDeclaration3.js");
String str = cu.getSource();
int start = str.indexOf("foo");
@@ -1642,12 +1619,12 @@ public void testDuplicateMethodDeclaration7() throws JavaModelException {
assertElementsEqual(
"Unexpected elements",
- "foo(Zork) [in Inner [in ResolveDuplicateMethodDeclaration7 [in ResolveDuplicateMethodDeclaration7.java [in <default> [in src [in Resolve]]]]]]",
+ "foo(p0) [in ResolveDuplicateMethodDeclaration3.js [in <default> [in src [in Resolve]]]]",
elements
);
}
-public void testDuplicateMethodDeclaration8() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateMethodDeclaration7.java");
+public void testDuplicateMethodDeclaration4() throws JavaModelException {
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateMethodDeclaration3.js");
String str = cu.getSource();
int start = str.lastIndexOf("foo");
@@ -1656,420 +1633,480 @@ public void testDuplicateMethodDeclaration8() throws JavaModelException {
assertElementsEqual(
"Unexpected elements",
- "foo(Zork)#2 [in Inner [in ResolveDuplicateMethodDeclaration7 [in ResolveDuplicateMethodDeclaration7.java [in <default> [in src [in Resolve]]]]]]",
- elements
- );
-}
-public void testDuplicateMethodDeclaration9() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateMethodDeclaration9.java");
-
- String str = cu.getSource();
- int start = str.indexOf("foo(/*1*/");
- int length = "foo".length();
- IJavaElement[] elements = cu.codeSelect(start, length);
-
- assertElementsEqual(
- "Unexpected elements",
- "foo(Zork) [in Inner [in ResolveDuplicateMethodDeclaration9 [in ResolveDuplicateMethodDeclaration9.java [in <default> [in src [in Resolve]]]]]]",
- elements
- );
-}
-public void testDuplicateMethodDeclaration10() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateMethodDeclaration9.java");
-
- String str = cu.getSource();
- int start = str.lastIndexOf("foo(/*1*/");
- int length = "foo".length();
- IJavaElement[] elements = cu.codeSelect(start, length);
-
- assertElementsEqual(
- "Unexpected elements",
- "foo(Zork)#2 [in Inner [in ResolveDuplicateMethodDeclaration9 [in ResolveDuplicateMethodDeclaration9.java [in <default> [in src [in Resolve]]]]]]",
- elements
- );
-}
-public void testDuplicateMethodDeclaration11() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateMethodDeclaration11.java");
-
- String str = cu.getSource();
- int start = str.indexOf("foo(/*2*/");
- int length = "foo".length();
- IJavaElement[] elements = cu.codeSelect(start, length);
-
- assertElementsEqual(
- "Unexpected elements",
- "foo(Zork) [in Inner#2 [in ResolveDuplicateMethodDeclaration11 [in ResolveDuplicateMethodDeclaration11.java [in <default> [in src [in Resolve]]]]]]",
- elements
- );
-}
-public void testDuplicateMethodDeclaration12() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateMethodDeclaration11.java");
-
- String str = cu.getSource();
- int start = str.lastIndexOf("foo(/*2*/");
- int length = "foo".length();
- IJavaElement[] elements = cu.codeSelect(start, length);
-
- assertElementsEqual(
- "Unexpected elements",
- "foo(Zork)#2 [in Inner#2 [in ResolveDuplicateMethodDeclaration11 [in ResolveDuplicateMethodDeclaration11.java [in <default> [in src [in Resolve]]]]]]",
+ "foo(p0)#2 [in ResolveDuplicateMethodDeclaration3.js [in <default> [in src [in Resolve]]]]",
elements
);
}
+//public void testDuplicateMethodDeclaration5() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateMethodDeclaration5.js");
+//
+// String str = cu.getSource();
+// int start = str.indexOf("foo");
+// int length = "foo".length();
+// IJavaElement[] elements = cu.codeSelect(start, length);
+//
+// assertElementsEqual(
+// "Unexpected elements",
+// "foo(Zork) [in ResolveDuplicateMethodDeclaration5 [in ResolveDuplicateMethodDeclaration5.js [in <default> [in src [in Resolve]]]]]",
+// elements
+// );
+//}
+//public void testDuplicateMethodDeclaration6() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateMethodDeclaration5.js");
+//
+// String str = cu.getSource();
+// int start = str.lastIndexOf("foo");
+// int length = "foo".length();
+// IJavaElement[] elements = cu.codeSelect(start, length);
+//
+// assertElementsEqual(
+// "Unexpected elements",
+// "foo(Zork)#2 [in ResolveDuplicateMethodDeclaration5 [in ResolveDuplicateMethodDeclaration5.js [in <default> [in src [in Resolve]]]]]",
+// elements
+// );
+//}
+//public void testDuplicateMethodDeclaration7() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateMethodDeclaration7.js");
+//
+// String str = cu.getSource();
+// int start = str.indexOf("foo");
+// int length = "foo".length();
+// IJavaElement[] elements = cu.codeSelect(start, length);
+//
+// assertElementsEqual(
+// "Unexpected elements",
+// "foo(Zork) [in Inner [in ResolveDuplicateMethodDeclaration7 [in ResolveDuplicateMethodDeclaration7.js [in <default> [in src [in Resolve]]]]]]",
+// elements
+// );
+//}
+//public void testDuplicateMethodDeclaration8() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateMethodDeclaration7.js");
+//
+// String str = cu.getSource();
+// int start = str.lastIndexOf("foo");
+// int length = "foo".length();
+// IJavaElement[] elements = cu.codeSelect(start, length);
+//
+// assertElementsEqual(
+// "Unexpected elements",
+// "foo(Zork)#2 [in Inner [in ResolveDuplicateMethodDeclaration7 [in ResolveDuplicateMethodDeclaration7.js [in <default> [in src [in Resolve]]]]]]",
+// elements
+// );
+//}
+//public void testDuplicateMethodDeclaration9() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateMethodDeclaration9.js");
+//
+// String str = cu.getSource();
+// int start = str.indexOf("foo(/*1*/");
+// int length = "foo".length();
+// IJavaElement[] elements = cu.codeSelect(start, length);
+//
+// assertElementsEqual(
+// "Unexpected elements",
+// "foo(Zork) [in Inner [in ResolveDuplicateMethodDeclaration9 [in ResolveDuplicateMethodDeclaration9.js [in <default> [in src [in Resolve]]]]]]",
+// elements
+// );
+//}
+//public void testDuplicateMethodDeclaration10() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateMethodDeclaration9.js");
+//
+// String str = cu.getSource();
+// int start = str.lastIndexOf("foo(/*1*/");
+// int length = "foo".length();
+// IJavaElement[] elements = cu.codeSelect(start, length);
+//
+// assertElementsEqual(
+// "Unexpected elements",
+// "foo(Zork)#2 [in Inner [in ResolveDuplicateMethodDeclaration9 [in ResolveDuplicateMethodDeclaration9.js [in <default> [in src [in Resolve]]]]]]",
+// elements
+// );
+//}
+//public void testDuplicateMethodDeclaration11() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateMethodDeclaration11.js");
+//
+// String str = cu.getSource();
+// int start = str.indexOf("foo(/*2*/");
+// int length = "foo".length();
+// IJavaElement[] elements = cu.codeSelect(start, length);
+//
+// assertElementsEqual(
+// "Unexpected elements",
+// "foo(Zork) [in Inner#2 [in ResolveDuplicateMethodDeclaration11 [in ResolveDuplicateMethodDeclaration11.js [in <default> [in src [in Resolve]]]]]]",
+// elements
+// );
+//}
+//public void testDuplicateMethodDeclaration12() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateMethodDeclaration11.js");
+//
+// String str = cu.getSource();
+// int start = str.lastIndexOf("foo(/*2*/");
+// int length = "foo".length();
+// IJavaElement[] elements = cu.codeSelect(start, length);
+//
+// assertElementsEqual(
+// "Unexpected elements",
+// "foo(Zork)#2 [in Inner#2 [in ResolveDuplicateMethodDeclaration11 [in ResolveDuplicateMethodDeclaration11.js [in <default> [in src [in Resolve]]]]]]",
+// elements
+// );
+//}
public void testDuplicateFieldDeclaration() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateFieldDeclaration.java");
-
- String str = cu.getSource();
- int start = str.indexOf("var;/*1*/");
- int length = "var".length();
- IJavaElement[] elements = cu.codeSelect(start, length);
-
- assertElementsEqual(
- "Unexpected elements",
- "var [in Inner [in ResolveDuplicateFieldDeclaration [in ResolveDuplicateFieldDeclaration.java [in <default> [in src [in Resolve]]]]]]",
- elements
- );
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateFieldDeclaration.js");
+//
+// String str = cu.getSource();
+// int start = str.indexOf("var;/*1*/");
+// int length = "var".length();
+// IJavaElement[] elements = cu.codeSelect(start, length);
+//
+// assertElementsEqual(
+// "Unexpected elements",
+// "var [in Inner [in ResolveDuplicateFieldDeclaration [in ResolveDuplicateFieldDeclaration.js [in <default> [in src [in Resolve]]]]]]",
+// elements
+// );
+ assertTrue("implement",false);
}
public void testDuplicateFieldDeclaration2() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateFieldDeclaration.java");
-
- String str = cu.getSource();
- int start = str.lastIndexOf("var;/*1*/");
- int length = "var".length();
- IJavaElement[] elements = cu.codeSelect(start, length);
-
- assertElementsEqual(
- "Unexpected elements",
- "var#2 [in Inner [in ResolveDuplicateFieldDeclaration [in ResolveDuplicateFieldDeclaration.java [in <default> [in src [in Resolve]]]]]]",
- elements
- );
-}
-public void testDuplicateFieldDeclaration3() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateFieldDeclaration3.java");
-
- String str = cu.getSource();
- int start = str.indexOf("var;/*2*/");
- int length = "var".length();
- IJavaElement[] elements = cu.codeSelect(start, length);
-
- assertElementsEqual(
- "Unexpected elements",
- "var [in Inner#2 [in ResolveDuplicateFieldDeclaration3 [in ResolveDuplicateFieldDeclaration3.java [in <default> [in src [in Resolve]]]]]]",
- elements
- );
-}
-public void testDuplicateFieldDeclaration4() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateFieldDeclaration3.java");
-
- String str = cu.getSource();
- int start = str.lastIndexOf("var;/*2*/");
- int length = "var".length();
- IJavaElement[] elements = cu.codeSelect(start, length);
-
- assertElementsEqual(
- "Unexpected elements",
- "var#2 [in Inner#2 [in ResolveDuplicateFieldDeclaration3 [in ResolveDuplicateFieldDeclaration3.java [in <default> [in src [in Resolve]]]]]]",
- elements
- );
-}
-public void testDuplicateTypeDeclaration() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateTypeDeclaration.java");
-
- String str = cu.getSource();
- int start = str.indexOf("Inner");
- int length = "Inner".length();
- IJavaElement[] elements = cu.codeSelect(start, length);
-
- assertElementsEqual(
- "Unexpected elements",
- "Inner [in ResolveDuplicateTypeDeclaration [in ResolveDuplicateTypeDeclaration.java [in <default> [in src [in Resolve]]]]]",
- elements
- );
-}
-public void testDuplicateTypeDeclaration2() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateTypeDeclaration.java");
-
- String str = cu.getSource();
- int start = str.lastIndexOf("Inner");
- int length = "Inner".length();
- IJavaElement[] elements = cu.codeSelect(start, length);
-
- assertElementsEqual(
- "Unexpected elements",
- "Inner#2 [in ResolveDuplicateTypeDeclaration [in ResolveDuplicateTypeDeclaration.java [in <default> [in src [in Resolve]]]]]",
- elements
- );
-}
-public void testDuplicateTypeDeclaration3() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateTypeDeclaration3.java");
-
- String str = cu.getSource();
- int start = str.indexOf("Inner2/*1*/");
- int length = "Inner2".length();
- IJavaElement[] elements = cu.codeSelect(start, length);
-
- assertElementsEqual(
- "Unexpected elements",
- "Inner2 [in Inner [in ResolveDuplicateTypeDeclaration3 [in ResolveDuplicateTypeDeclaration3.java [in <default> [in src [in Resolve]]]]]]",
- elements
- );
-}
-public void testDuplicateTypeDeclaration4() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateTypeDeclaration3.java");
-
- String str = cu.getSource();
- int start = str.lastIndexOf("Inner2/*1*/");
- int length = "Inner2".length();
- IJavaElement[] elements = cu.codeSelect(start, length);
-
- assertElementsEqual(
- "Unexpected elements",
- "Inner2#2 [in Inner [in ResolveDuplicateTypeDeclaration3 [in ResolveDuplicateTypeDeclaration3.java [in <default> [in src [in Resolve]]]]]]",
- elements
- );
-}
-public void testDuplicateTypeDeclaration5() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateTypeDeclaration5.java");
-
- String str = cu.getSource();
- int start = str.indexOf("Inner2/*2*/");
- int length = "Inner2".length();
- IJavaElement[] elements = cu.codeSelect(start, length);
-
- assertElementsEqual(
- "Unexpected elements",
- "Inner2 [in Inner#2 [in ResolveDuplicateTypeDeclaration5 [in ResolveDuplicateTypeDeclaration5.java [in <default> [in src [in Resolve]]]]]]",
- elements
- );
-}
-public void testDuplicateTypeDeclaration6() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateTypeDeclaration5.java");
-
- String str = cu.getSource();
- int start = str.lastIndexOf("Inner2/*2*/");
- int length = "Inner2".length();
- IJavaElement[] elements = cu.codeSelect(start, length);
-
- assertElementsEqual(
- "Unexpected elements",
- "Inner2#2 [in Inner#2 [in ResolveDuplicateTypeDeclaration5 [in ResolveDuplicateTypeDeclaration5.java [in <default> [in src [in Resolve]]]]]]",
- elements
- );
-}
-public void testArrayParameterInsideParent1() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveArrayParameterInsideParent1.java");
-
- String str = cu.getSource();
- int start = str.lastIndexOf("var");
- int length = "var".length();
- IJavaElement[] elements = cu.codeSelect(start, length);
-
- assertElementsEqual(
- "Unexpected elements",
- "var [in test(int[]) [in ResolveArrayParameterInsideParent1 [in ResolveArrayParameterInsideParent1.java [in <default> [in src [in Resolve]]]]]]",
- elements
- );
-}
-public void testDeepLocalVariable() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDeepLocalVariable.java");
-
- String str = cu.getSource();
- int start = str.lastIndexOf("foo");
- int length = "foo".length();
- IJavaElement[] elements = cu.codeSelect(start, length);
-
- assertElementsEqual(
- "Unexpected elements",
- "foo [in D9() [in D9 [in D8 [in D7 [in D6 [in D5 [in D4 [in D3 [in D2 [in D1 [in ResolveDeepLocalVariable [in ResolveDeepLocalVariable.java [in <default> [in src [in Resolve]]]]]]]]]]]]]]]",
- elements
- );
-}
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateFieldDeclaration.js");
+//
+// String str = cu.getSource();
+// int start = str.lastIndexOf("var;/*1*/");
+// int length = "var".length();
+// IJavaElement[] elements = cu.codeSelect(start, length);
+//
+// assertElementsEqual(
+// "Unexpected elements",
+// "var#2 [in Inner [in ResolveDuplicateFieldDeclaration [in ResolveDuplicateFieldDeclaration.js [in <default> [in src [in Resolve]]]]]]",
+// elements
+// );
+ assertTrue("implement",false);
+}
+//public void testDuplicateFieldDeclaration3() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateFieldDeclaration3.js");
+//
+// String str = cu.getSource();
+// int start = str.indexOf("var;/*2*/");
+// int length = "var".length();
+// IJavaElement[] elements = cu.codeSelect(start, length);
+//
+// assertElementsEqual(
+// "Unexpected elements",
+// "var [in Inner#2 [in ResolveDuplicateFieldDeclaration3 [in ResolveDuplicateFieldDeclaration3.js [in <default> [in src [in Resolve]]]]]]",
+// elements
+// );
+//}
+//public void testDuplicateFieldDeclaration4() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateFieldDeclaration3.js");
+//
+// String str = cu.getSource();
+// int start = str.lastIndexOf("var;/*2*/");
+// int length = "var".length();
+// IJavaElement[] elements = cu.codeSelect(start, length);
+//
+// assertElementsEqual(
+// "Unexpected elements",
+// "var#2 [in Inner#2 [in ResolveDuplicateFieldDeclaration3 [in ResolveDuplicateFieldDeclaration3.js [in <default> [in src [in Resolve]]]]]]",
+// elements
+// );
+//}
+//public void testDuplicateTypeDeclaration() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateTypeDeclaration.js");
+//
+// String str = cu.getSource();
+// int start = str.indexOf("Inner");
+// int length = "Inner".length();
+// IJavaElement[] elements = cu.codeSelect(start, length);
+//
+// assertElementsEqual(
+// "Unexpected elements",
+// "Inner [in ResolveDuplicateTypeDeclaration [in ResolveDuplicateTypeDeclaration.js [in <default> [in src [in Resolve]]]]]",
+// elements
+// );
+//}
+//public void testDuplicateTypeDeclaration2() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateTypeDeclaration.js");
+//
+// String str = cu.getSource();
+// int start = str.lastIndexOf("Inner");
+// int length = "Inner".length();
+// IJavaElement[] elements = cu.codeSelect(start, length);
+//
+// assertElementsEqual(
+// "Unexpected elements",
+// "Inner#2 [in ResolveDuplicateTypeDeclaration [in ResolveDuplicateTypeDeclaration.js [in <default> [in src [in Resolve]]]]]",
+// elements
+// );
+//}
+//public void testDuplicateTypeDeclaration3() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateTypeDeclaration3.js");
+//
+// String str = cu.getSource();
+// int start = str.indexOf("Inner2/*1*/");
+// int length = "Inner2".length();
+// IJavaElement[] elements = cu.codeSelect(start, length);
+//
+// assertElementsEqual(
+// "Unexpected elements",
+// "Inner2 [in Inner [in ResolveDuplicateTypeDeclaration3 [in ResolveDuplicateTypeDeclaration3.js [in <default> [in src [in Resolve]]]]]]",
+// elements
+// );
+//}
+//public void testDuplicateTypeDeclaration4() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateTypeDeclaration3.js");
+//
+// String str = cu.getSource();
+// int start = str.lastIndexOf("Inner2/*1*/");
+// int length = "Inner2".length();
+// IJavaElement[] elements = cu.codeSelect(start, length);
+//
+// assertElementsEqual(
+// "Unexpected elements",
+// "Inner2#2 [in Inner [in ResolveDuplicateTypeDeclaration3 [in ResolveDuplicateTypeDeclaration3.js [in <default> [in src [in Resolve]]]]]]",
+// elements
+// );
+//}
+//public void testDuplicateTypeDeclaration5() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateTypeDeclaration5.js");
+//
+// String str = cu.getSource();
+// int start = str.indexOf("Inner2/*2*/");
+// int length = "Inner2".length();
+// IJavaElement[] elements = cu.codeSelect(start, length);
+//
+// assertElementsEqual(
+// "Unexpected elements",
+// "Inner2 [in Inner#2 [in ResolveDuplicateTypeDeclaration5 [in ResolveDuplicateTypeDeclaration5.js [in <default> [in src [in Resolve]]]]]]",
+// elements
+// );
+//}
+//public void testDuplicateTypeDeclaration6() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDuplicateTypeDeclaration5.js");
+//
+// String str = cu.getSource();
+// int start = str.lastIndexOf("Inner2/*2*/");
+// int length = "Inner2".length();
+// IJavaElement[] elements = cu.codeSelect(start, length);
+//
+// assertElementsEqual(
+// "Unexpected elements",
+// "Inner2#2 [in Inner#2 [in ResolveDuplicateTypeDeclaration5 [in ResolveDuplicateTypeDeclaration5.js [in <default> [in src [in Resolve]]]]]]",
+// elements
+// );
+//}
+//public void testArrayParameterInsideParent1() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveArrayParameterInsideParent1.js");
+//
+// String str = cu.getSource();
+// int start = str.lastIndexOf("var");
+// int length = "var".length();
+// IJavaElement[] elements = cu.codeSelect(start, length);
+//
+// assertElementsEqual(
+// "Unexpected elements",
+// "var [in test(int[]) [in ResolveArrayParameterInsideParent1 [in ResolveArrayParameterInsideParent1.js [in <default> [in src [in Resolve]]]]]]",
+// elements
+// );
+//}
+//public void testDeepLocalVariable() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveDeepLocalVariable.js");
+//
+// String str = cu.getSource();
+// int start = str.lastIndexOf("foo");
+// int length = "foo".length();
+// IJavaElement[] elements = cu.codeSelect(start, length);
+//
+// assertElementsEqual(
+// "Unexpected elements",
+// "foo [in D9() [in D9 [in D8 [in D7 [in D6 [in D5 [in D4 [in D3 [in D2 [in D1 [in ResolveDeepLocalVariable [in ResolveDeepLocalVariable.js [in <default> [in src [in Resolve]]]]]]]]]]]]]]]",
+// elements
+// );
+//}
/*
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=68710
*/
public void testLocalVariable() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalVariable.java");
- IJavaElement[] elements = codeSelect(cu, "var =", "var");
- assertElementsEqual(
- "Unexpected elements",
- "var [in toto() [in <anonymous #2> [in foo2() [in ResolveLocalVariable [in ResolveLocalVariable.java [in <default> [in src [in Resolve]]]]]]]]",
- elements
- );
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=78931
- */
-public void testQualifiedName1() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveQualifiedName1.java");
-
- IJavaElement[] elements = codeSelect(cu, "pp.qq.XX.YY.ZZ", "pp.qq.XX.YY.ZZ");
-
- assertElementsEqual(
- "Unexpected elements",
- "ZZ [in YY [in XX [in XX.java [in pp.qq [in src [in Resolve]]]]]]",
- elements
- );
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=78931
- */
-public void testQualifiedName2() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveQualifiedName2.java");
-
- IJavaElement[] elements = codeSelect(cu, "qq.XX.YY.ZZ", "qq.XX.YY.ZZ");
-
- assertElementsEqual(
- "Unexpected elements",
- "ZZ [in YY [in XX [in XX.java [in pp.qq [in src [in Resolve]]]]]]",
- elements
- );
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=78931
- */
-public void testQualifiedName3() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveQualifiedName3.java");
-
- IJavaElement[] elements = codeSelect(cu, "XX.YY.ZZ", "XX.YY.ZZ");
-
- assertElementsEqual(
- "Unexpected elements",
- "ZZ [in YY [in XX [in XX.java [in pp.qq [in src [in Resolve]]]]]]",
- elements
- );
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=78931
- */
-public void testQualifiedName4() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveQualifiedName4.java");
-
- IJavaElement[] elements = codeSelect(cu, "YY.ZZ", "YY.ZZ");
-
- assertElementsEqual(
- "Unexpected elements",
- "ZZ [in YY [in XX [in XX.java [in pp.qq [in src [in Resolve]]]]]]",
- elements
- );
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=78931
- */
-public void testQualifiedName5() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveQualifiedName5.java");
-
- IJavaElement[] elements = codeSelect(cu, "YY.ZZ", "YY.ZZ");
-
- assertElementsEqual(
- "Unexpected elements",
- "ZZ [in YY [in XX [in ResolveQualifiedName5 [in ResolveQualifiedName5.java [in <default> [in src [in Resolve]]]]]]]",
- elements
- );
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=84001
-public void testTypeInsideConstructor() throws JavaModelException {
- ICompilationUnit imported = null;
- try {
- imported = getWorkingCopy(
- "/Resolve/src/test/AType.java",
- "public class AType {\n" +
- " public class Sub {\n" +
- " }\n" +
- "}\n");
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalVariable.js");
+// IJavaElement[] elements = codeSelect(cu, "var =", "var");
+// assertElementsEqual(
+// "Unexpected elements",
+// "var [in toto() [in <anonymous #2> [in foo2() [in ResolveLocalVariable [in ResolveLocalVariable.js [in <default> [in src [in Resolve]]]]]]]]",
+// elements
+// );
+ assertTrue("implement",false);
- IJavaElement[] elements = select(
- "/Resolve/src/test/Test.java",
- "public class Test<\n" +
- " void foo() {\n" +
- " new Test.Sub();\n" +
- " }\n" +
- "}\n",
- "Test");
-
- assertElementsEqual(
- "Unexpected elements",
- "Test [in [Working copy] Test.java [in test [in src [in Resolve]]]]",
- elements
- );
- } finally {
- if(imported != null) {
- imported.discardWorkingCopy();
- }
- }
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=79309
-public void testMemberTypeInImport() throws JavaModelException {
- ICompilationUnit imported = null;
- try {
- imported = getWorkingCopy(
- "/Resolve/src/test/AType.java",
- "public class AType {\n" +
- " public class Sub {\n" +
- " }\n" +
- "}\n");
-
- IJavaElement[] elements = select(
- "/Resolve/src/test/Test.java",
- "import test.AType.Sub;\n" +
- "public class Test\n" +
- "}\n",
- "Sub");
-
- assertElementsEqual(
- "Unexpected elements",
- "Sub [in AType [in [Working copy] AType.java [in test [in src [in Resolve]]]]]",
- elements
- );
- } finally {
- if(imported != null) {
- imported.discardWorkingCopy();
- }
- }
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=99901
-public void testSingleNameInImport() throws JavaModelException {
- ICompilationUnit aType = null;
- try {
- aType = getWorkingCopy(
- "/Resolve/src/zzz/AType.java",
- "package zzz;\n" +
- "public class AType {\n" +
- "}\n");
-
- IJavaElement[] elements = select(
- "/Resolve/src/test/Test.java",
- "package test;\n" +
- "import zzz.*;\n" +
- "public class Test\n" +
- "}\n",
- "zzz");
-
- assertElementsEqual(
- "Unexpected elements",
- "zzz [in src [in Resolve]]",
- elements
- );
- } finally {
- if(aType != null) {
- aType.discardWorkingCopy();
- }
- }
-}
-/**
- * Bug 120350: [model] Secondary type not found by code resolve
- * @throws JavaModelException
- */
-public void testSecondaryTypes() throws JavaModelException {
- waitUntilIndexesReady();
- ICompilationUnit cu = getCompilationUnit("Resolve", "src", "b120350", "X.java");
- String str = cu.getSource();
- int start = str.indexOf("Secondary");
- int length = "Secondary".length();
- IJavaElement[] elements = cu.codeSelect(start, length);
- assertElementsEqual(
- "Unexpected elements",
- "Secondary [in Test.java [in b120350 [in src [in Resolve]]]]",
- elements
- );
}
+///*
+// * https://bugs.eclipse.org/bugs/show_bug.cgi?id=78931
+// */
+//public void testQualifiedName1() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveQualifiedName1.js");
+//
+// IJavaElement[] elements = codeSelect(cu, "pp.qq.XX.YY.ZZ", "pp.qq.XX.YY.ZZ");
+//
+// assertElementsEqual(
+// "Unexpected elements",
+// "ZZ [in YY [in XX [in XX.js [in pp.qq [in src [in Resolve]]]]]]",
+// elements
+// );
+//}
+///*
+// * https://bugs.eclipse.org/bugs/show_bug.cgi?id=78931
+// */
+//public void testQualifiedName2() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveQualifiedName2.js");
+//
+// IJavaElement[] elements = codeSelect(cu, "qq.XX.YY.ZZ", "qq.XX.YY.ZZ");
+//
+// assertElementsEqual(
+// "Unexpected elements",
+// "ZZ [in YY [in XX [in XX.js [in pp.qq [in src [in Resolve]]]]]]",
+// elements
+// );
+//}
+///*
+// * https://bugs.eclipse.org/bugs/show_bug.cgi?id=78931
+// */
+//public void testQualifiedName3() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveQualifiedName3.js");
+//
+// IJavaElement[] elements = codeSelect(cu, "XX.YY.ZZ", "XX.YY.ZZ");
+//
+// assertElementsEqual(
+// "Unexpected elements",
+// "ZZ [in YY [in XX [in XX.js [in pp.qq [in src [in Resolve]]]]]]",
+// elements
+// );
+//}
+///*
+// * https://bugs.eclipse.org/bugs/show_bug.cgi?id=78931
+// */
+//public void testQualifiedName4() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveQualifiedName4.js");
+//
+// IJavaElement[] elements = codeSelect(cu, "YY.ZZ", "YY.ZZ");
+//
+// assertElementsEqual(
+// "Unexpected elements",
+// "ZZ [in YY [in XX [in XX.js [in pp.qq [in src [in Resolve]]]]]]",
+// elements
+// );
+//}
+///*
+// * https://bugs.eclipse.org/bugs/show_bug.cgi?id=78931
+// */
+//public void testQualifiedName5() throws JavaModelException {
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveQualifiedName5.js");
+//
+// IJavaElement[] elements = codeSelect(cu, "YY.ZZ", "YY.ZZ");
+//
+// assertElementsEqual(
+// "Unexpected elements",
+// "ZZ [in YY [in XX [in ResolveQualifiedName5 [in ResolveQualifiedName5.js [in <default> [in src [in Resolve]]]]]]]",
+// elements
+// );
+//}
+////https://bugs.eclipse.org/bugs/show_bug.cgi?id=84001
+//public void testTypeInsideConstructor() throws JavaModelException {
+// ICompilationUnit imported = null;
+// try {
+// imported = getWorkingCopy(
+// "/Resolve/src/test/AType.js",
+// "public class AType {\n" +
+// " public class Sub {\n" +
+// " }\n" +
+// "}\n");
+//
+// IJavaElement[] elements = select(
+// "/Resolve/src/test/Test.js",
+// "public class Test<\n" +
+// " void foo() {\n" +
+// " new Test.Sub();\n" +
+// " }\n" +
+// "}\n",
+// "Test");
+//
+// assertElementsEqual(
+// "Unexpected elements",
+// "Test [in [Working copy] Test.js [in test [in src [in Resolve]]]]",
+// elements
+// );
+// } finally {
+// if(imported != null) {
+// imported.discardWorkingCopy();
+// }
+// }
+//}
+////https://bugs.eclipse.org/bugs/show_bug.cgi?id=79309
+//public void testMemberTypeInImport() throws JavaModelException {
+// ICompilationUnit imported = null;
+// try {
+// imported = getWorkingCopy(
+// "/Resolve/src/test/AType.js",
+// "public class AType {\n" +
+// " public class Sub {\n" +
+// " }\n" +
+// "}\n");
+//
+// IJavaElement[] elements = select(
+// "/Resolve/src/test/Test.js",
+// "import test.AType.Sub;\n" +
+// "public class Test\n" +
+// "}\n",
+// "Sub");
+//
+// assertElementsEqual(
+// "Unexpected elements",
+// "Sub [in AType [in [Working copy] AType.js [in test [in src [in Resolve]]]]]",
+// elements
+// );
+// } finally {
+// if(imported != null) {
+// imported.discardWorkingCopy();
+// }
+// }
+//}
+////https://bugs.eclipse.org/bugs/show_bug.cgi?id=99901
+//public void testSingleNameInImport() throws JavaModelException {
+// ICompilationUnit aType = null;
+// try {
+// aType = getWorkingCopy(
+// "/Resolve/src/zzz/AType.js",
+// "package zzz;\n" +
+// "public class AType {\n" +
+// "}\n");
+//
+// IJavaElement[] elements = select(
+// "/Resolve/src/test/Test.js",
+// "package test;\n" +
+// "import zzz.*;\n" +
+// "public class Test\n" +
+// "}\n",
+// "zzz");
+//
+// assertElementsEqual(
+// "Unexpected elements",
+// "zzz [in src [in Resolve]]",
+// elements
+// );
+// } finally {
+// if(aType != null) {
+// aType.discardWorkingCopy();
+// }
+// }
+//}
+///**
+// * Bug 120350: [model] Secondary type not found by code resolve
+// * @throws JavaModelException
+// */
+//public void testSecondaryTypes() throws JavaModelException {
+// waitUntilIndexesReady();
+// ICompilationUnit cu = getCompilationUnit("Resolve", "src", "b120350", "X.js");
+// String str = cu.getSource();
+// int start = str.indexOf("Secondary");
+// int length = "Secondary".length();
+// IJavaElement[] elements = cu.codeSelect(start, length);
+// assertElementsEqual(
+// "Unexpected elements",
+// "Secondary [in Test.js [in b120350 [in src [in Resolve]]]]",
+// elements
+// );
+//}
}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ResolveTests_1_5.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ResolveTests_1_5.java
index 8f9b762..98a5bad 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ResolveTests_1_5.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ResolveTests_1_5.java
@@ -76,7 +76,7 @@ protected void tearDown() throws Exception {
super.tearDown();
}
public void test0001() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0001", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0001", "Test.js");
String str = cu.getSource();
String selection = "iii";
@@ -91,7 +91,7 @@ public void test0001() throws JavaModelException {
);
}
public void test0002() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0002", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0002", "Test.js");
String str = cu.getSource();
String selection = "Y";
@@ -106,7 +106,7 @@ public void test0002() throws JavaModelException {
);
}
public void test0003() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0003", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0003", "Test.js");
String str = cu.getSource();
String selection = "X";
@@ -122,7 +122,7 @@ public void test0003() throws JavaModelException {
}
public void test0004() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0004/Test.java",
+ "/Resolve/src2/test0004/Test.js",
"package test0004;\n" +
"public class Test <T> {\n" +
" test0004.Test.X<Object>.Y<Object> var;\n" +
@@ -145,7 +145,7 @@ public void test0004() throws JavaModelException {
);
}
public void test0005() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0005", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0005", "Test.js");
String str = cu.getSource();
String selection = "test0005";
@@ -160,7 +160,7 @@ public void test0005() throws JavaModelException {
);
}
public void test0006() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0006", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0006", "Test.js");
String str = cu.getSource();
String selection = "Test0006";
@@ -175,7 +175,7 @@ public void test0006() throws JavaModelException {
);
}
public void test0007() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0007", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0007", "Test.js");
String str = cu.getSource();
String selection = "Test0007";
@@ -190,7 +190,7 @@ public void test0007() throws JavaModelException {
);
}
public void test0008() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0008", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0008", "Test.js");
String str = cu.getSource();
String selection = "Test0008";
@@ -205,7 +205,7 @@ public void test0008() throws JavaModelException {
);
}
public void test0009() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0009", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0009", "Test.js");
String str = cu.getSource();
String selection = "Test0009";
@@ -220,7 +220,7 @@ public void test0009() throws JavaModelException {
);
}
public void test0010() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0010", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0010", "Test.js");
String str = cu.getSource();
String selection = "Test0010";
@@ -235,7 +235,7 @@ public void test0010() throws JavaModelException {
);
}
public void test0011() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0011", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0011", "Test.js");
String str = cu.getSource();
String selection = "Test0011";
@@ -250,7 +250,7 @@ public void test0011() throws JavaModelException {
);
}
public void test0012() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0012", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0012", "Test.js");
String str = cu.getSource();
String selection = "Test0012";
@@ -265,7 +265,7 @@ public void test0012() throws JavaModelException {
);
}
public void test0013() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0013", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0013", "Test.js");
String str = cu.getSource();
String selection = "Test0013";
@@ -280,7 +280,7 @@ public void test0013() throws JavaModelException {
);
}
public void test0014() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0014", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0014", "Test.js");
String str = cu.getSource();
String selection = "Test0014";
@@ -298,7 +298,7 @@ public void test0014() throws JavaModelException {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=71852
*/
public void test0015() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0015", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0015", "Test.js");
String str = cu.getSource();
String selection = "var";
@@ -316,7 +316,7 @@ public void test0015() throws JavaModelException {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=72105
*/
public void test0016() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0016", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0016", "Test.js");
String str = cu.getSource();
String selection = "T";
@@ -334,7 +334,7 @@ public void test0016() throws JavaModelException {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=72105
*/
public void test0017() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0017", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0017", "Test.js");
String str = cu.getSource();
String selection = "T";
@@ -352,7 +352,7 @@ public void test0017() throws JavaModelException {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=72105
*/
public void test0018() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0018", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0018", "Test.js");
String str = cu.getSource();
String selection = "T";
@@ -370,7 +370,7 @@ public void test0018() throws JavaModelException {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=72105
*/
public void test0019() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0019", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0019", "Test.js");
String str = cu.getSource();
String selection = "T";
@@ -388,7 +388,7 @@ public void test0019() throws JavaModelException {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=72105
*/
public void test0020() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0020", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0020", "Test.js");
String str = cu.getSource();
String selection = "T";
@@ -406,7 +406,7 @@ public void test0020() throws JavaModelException {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=72105
*/
public void test0021() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0021", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0021", "Test.js");
String str = cu.getSource();
String selection = "T";
@@ -424,7 +424,7 @@ public void test0021() throws JavaModelException {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=74286
*/
public void test0022() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0022", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0022", "Test.js");
String str = cu.getSource();
String selection = "add";
@@ -442,7 +442,7 @@ public void test0022() throws JavaModelException {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=74286
*/
public void test0023() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0023", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0023", "Test.js");
String str = cu.getSource();
String selection = "add";
@@ -460,7 +460,7 @@ public void test0023() throws JavaModelException {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=77184
*/
public void test0024() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0024", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0024", "Test.js");
String str = cu.getSource();
String selection = "Test";
@@ -478,7 +478,7 @@ public void test0024() throws JavaModelException {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=77184
*/
public void test0025() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0025", "Test.java");
+ ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0025", "Test.js");
String str = cu.getSource();
String selection = "Test";
@@ -494,7 +494,7 @@ public void test0025() throws JavaModelException {
}
public void test0026() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0026/Test.java",
+ "/Resolve/src2/test0026/Test.js",
"package test0026;\n" +
"public class Test<T> {\n" +
" public class Inner<U> {\n" +
@@ -515,7 +515,7 @@ public void test0026() throws JavaModelException {
}
public void test0027() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0027/Test.java",
+ "/Resolve/src2/test0027/Test.js",
"package test0027;\n" +
"public class Test<T> {\n" +
" public class Inner<U> {\n" +
@@ -536,7 +536,7 @@ public void test0027() throws JavaModelException {
}
public void test0028() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0028/Test.java",
+ "/Resolve/src2/test0028/Test.js",
"package test0028;\n" +
"public class Test<T> {\n" +
" public class Inner<U> {\n" +
@@ -557,7 +557,7 @@ public void test0028() throws JavaModelException {
}
public void test0029() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0029/Test.java",
+ "/Resolve/src2/test0029/Test.js",
"package test0029;\n" +
"public class Test<T> {\n" +
" public class Inner<U> {\n" +
@@ -578,7 +578,7 @@ public void test0029() throws JavaModelException {
}
public void test0030() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0030/Test.java",
+ "/Resolve/src2/test0030/Test.js",
"package test0030;\n" +
"public class Test<T> {\n" +
" public class Inner<U> {\n" +
@@ -600,7 +600,7 @@ public void test0030() throws JavaModelException {
}
public void test0031() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0031/Test.java",
+ "/Resolve/src2/test0031/Test.js",
"package test0031;\n" +
"public class Test<T> {\n" +
" public class Inner<U> {\n" +
@@ -622,7 +622,7 @@ public void test0031() throws JavaModelException {
}
public void test0032() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0032/Test.java",
+ "/Resolve/src2/test0032/Test.js",
"package test0032;\n" +
"public class Test<T> {\n" +
" public class Inner<U> { \n" +
@@ -644,7 +644,7 @@ public void test0032() throws JavaModelException {
}
public void test0033() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0033/Test.java",
+ "/Resolve/src2/test0033/Test.js",
"package test0033;\n" +
"public class Test<T> {\n" +
" public class Inner<U> {\n" +
@@ -666,7 +666,7 @@ public void test0033() throws JavaModelException {
}
public void test0034() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0034/Test.java",
+ "/Resolve/src2/test0034/Test.js",
"package test0034;\n" +
"public class Test<T> {\n" +
" public class Inner<U> {\n" +
@@ -688,7 +688,7 @@ public void test0034() throws JavaModelException {
}
public void test0035() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0035/Test.java",
+ "/Resolve/src2/test0035/Test.js",
"package test0035;\n" +
"public class Test<T> {\n" +
" public class Inner<U> { \n" +
@@ -710,7 +710,7 @@ public void test0035() throws JavaModelException {
}
public void test0036() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0036/Test.java",
+ "/Resolve/src2/test0036/Test.js",
"package test0036;\n" +
"public class Test<T> {\n" +
" public class Inner<U> { \n" +
@@ -732,7 +732,7 @@ public void test0036() throws JavaModelException {
}
public void test0037() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0037/Test.java",
+ "/Resolve/src2/test0037/Test.js",
"package test0037;\n" +
"public class Test<T> {\n" +
" public class Inner<U> { \n" +
@@ -754,7 +754,7 @@ public void test0037() throws JavaModelException {
}
public void test0038() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0038/Test.java",
+ "/Resolve/src2/test0038/Test.js",
"package test0038;\n" +
"public class Test<T> {\n" +
" public class Inner<U> {\n" +
@@ -776,7 +776,7 @@ public void test0038() throws JavaModelException {
}
public void test0039() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0039/Test.java",
+ "/Resolve/src2/test0039/Test.js",
"package test0039;\n" +
"public class Test<T> {\n" +
" public class Inner<U> {\n" +
@@ -798,7 +798,7 @@ public void test0039() throws JavaModelException {
}
public void test0040() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0040/Test.java",
+ "/Resolve/src2/test0040/Test.js",
"package test0040;\n" +
"public class Test<T> {\n" +
" public class Inner<U> {\n" +
@@ -820,7 +820,7 @@ public void test0040() throws JavaModelException {
}
public void test0041() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0041/Test.java",
+ "/Resolve/src2/test0041/Test.js",
"package test0041;\n" +
"public class Test<T> {\n" +
" void foo() {\n" +
@@ -848,7 +848,7 @@ public void test0041() throws JavaModelException {
}
public void test0042() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0042/Test.java",
+ "/Resolve/src2/test0042/Test.js",
"package test0042;\n" +
"public class Test<T> {\n" +
" public class Inner<U> { \n" +
@@ -870,7 +870,7 @@ public void test0042() throws JavaModelException {
}
public void test0043() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0043/Test.java",
+ "/Resolve/src2/test0043/Test.js",
"package test0043;\n" +
"public class Test<T> {\n" +
" Test<T> var;\n" +
@@ -890,7 +890,7 @@ public void test0043() throws JavaModelException {
}
public void test0044() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0044/Test.java",
+ "/Resolve/src2/test0044/Test.js",
"package test0044;\n" +
"public class Test<T1> {\n" +
"}\n" +
@@ -912,7 +912,7 @@ public void test0044() throws JavaModelException {
}
public void test0045() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0045/Test.java",
+ "/Resolve/src2/test0045/Test.js",
"package test0045;\n" +
"public class Test<T1> {\n" +
" String var;\n" +
@@ -932,7 +932,7 @@ public void test0045() throws JavaModelException {
}
public void test0046() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0046/Test.java",
+ "/Resolve/src2/test0046/Test.js",
"package test0046;\n" +
"public class Test<T1> {\n" +
" String var;\n" +
@@ -955,7 +955,7 @@ public void test0046() throws JavaModelException {
}
public void test0047() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0047/Test.java",
+ "/Resolve/src2/test0047/Test.js",
"package test0047;\n" +
"public class Test<T1> {\n" +
" public String var;\n" +
@@ -979,7 +979,7 @@ public void test0047() throws JavaModelException {
}
public void test0048() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0048/Test.java",
+ "/Resolve/src2/test0048/Test.js",
"package test0048;\n" +
"public class Test<T1> {\n" +
" public String var;\n" +
@@ -1003,7 +1003,7 @@ public void test0048() throws JavaModelException {
}
public void test0049() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0049/Test.java",
+ "/Resolve/src2/test0049/Test.js",
"package test0049;\n" +
"public class Test<T1> {\n" +
" public String var;\n" +
@@ -1027,7 +1027,7 @@ public void test0049() throws JavaModelException {
}
public void test0050() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0050/Test.java",
+ "/Resolve/src2/test0050/Test.js",
"package test0050;\n" +
"public class Test<T1> {\n" +
" public String var;\n" +
@@ -1051,7 +1051,7 @@ public void test0050() throws JavaModelException {
}
public void test0051() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0051/Test.java",
+ "/Resolve/src2/test0051/Test.js",
"package test0051;\n" +
"public class Test {\n" +
" void foo() {\n" +
@@ -1077,7 +1077,7 @@ public void test0051() throws JavaModelException {
}
public void test0052() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0052/Test.java",
+ "/Resolve/src2/test0052/Test.js",
"package test0052;\n" +
"public class Test {\n" +
" void foo() {\n" +
@@ -1103,7 +1103,7 @@ public void test0052() throws JavaModelException {
}
public void test0053() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0053/Test.java",
+ "/Resolve/src2/test0053/Test.js",
"package test0053;\n" +
"public class Test<T> {\n" +
" public void foo() {\n" +
@@ -1130,7 +1130,7 @@ public void test0053() throws JavaModelException {
}
public void test0054() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0054/Test.java",
+ "/Resolve/src2/test0054/Test.js",
"package test0054;\n" +
"public class Test<T> {\n" +
" public void foo() {\n" +
@@ -1157,7 +1157,7 @@ public void test0054() throws JavaModelException {
}
public void test0055() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0055/Test.java",
+ "/Resolve/src2/test0055/Test.js",
"package test0055;\n" +
"public class Test<T> {\n" +
" public void foo() {\n" +
@@ -1184,7 +1184,7 @@ public void test0055() throws JavaModelException {
}
public void test0056() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0056/Test.java",
+ "/Resolve/src2/test0056/Test.js",
"package test0056;\n" +
"public class Test<T> {\n" +
" public void foo() {\n" +
@@ -1209,7 +1209,7 @@ public void test0056() throws JavaModelException {
}
public void test0057() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0057/Test.java",
+ "/Resolve/src2/test0057/Test.js",
"package test0057;\n" +
"public class Test<T1> {\n" +
" public <T2> void foo() {\n" +
@@ -1236,7 +1236,7 @@ public void test0057() throws JavaModelException {
}
public void test0058() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0058/Test.java",
+ "/Resolve/src2/test0058/Test.js",
"package test0058;\n" +
"public class Test<T1> {\n" +
" public <T2> void foo() {\n" +
@@ -1263,7 +1263,7 @@ public void test0058() throws JavaModelException {
}
public void test0059() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0059/Test.java",
+ "/Resolve/src2/test0059/Test.js",
"package test0059;\n" +
"public class Test {\n" +
" public <T2> void foo() {\n" +
@@ -1290,7 +1290,7 @@ public void test0059() throws JavaModelException {
}
public void test0060() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0060/Test.java",
+ "/Resolve/src2/test0060/Test.js",
"package test0060;\n" +
"public class Test {\n" +
" public <T2> void foo() {\n" +
@@ -1317,7 +1317,7 @@ public void test0060() throws JavaModelException {
}
public void test0061() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0061/Test.java",
+ "/Resolve/src2/test0061/Test.js",
"package test0061;\n" +
"public class Test {\n" +
" public <T2> void foo() {\n" +
@@ -1340,7 +1340,7 @@ public void test0061() throws JavaModelException {
}
public void test0062() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0062/Test.java",
+ "/Resolve/src2/test0062/Test.js",
"package test0062;\n" +
"public class Test<T1> {\n" +
" public <T2> void foo() {\n" +
@@ -1363,7 +1363,7 @@ public void test0062() throws JavaModelException {
}
public void test0063() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0063/Test.java",
+ "/Resolve/src2/test0063/Test.js",
"package test0063;\n" +
"public class Test<T1> {\n" +
" public void foo() {\n" +
@@ -1390,7 +1390,7 @@ public void test0063() throws JavaModelException {
}
public void test0064() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0064/Test.java",
+ "/Resolve/src2/test0064/Test.js",
"package test0064;\n" +
"public class Test {\n" +
" public <U> Test(U u) {\n" +
@@ -1414,7 +1414,7 @@ public void test0064() throws JavaModelException {
}
public void test0065() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0065/Test.java",
+ "/Resolve/src2/test0065/Test.js",
"package test0065;\n" +
"public class Test {\n" +
" public <U> Test(U u) {\n" +
@@ -1438,7 +1438,7 @@ public void test0065() throws JavaModelException {
}
public void test0066() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0066/Test.java",
+ "/Resolve/src2/test0066/Test.js",
"package test0066;\n" +
"public class Test<T> {\n" +
" public <U> Test(U u) {\n" +
@@ -1462,7 +1462,7 @@ public void test0066() throws JavaModelException {
}
public void test0067() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0067/Test.java",
+ "/Resolve/src2/test0067/Test.js",
"package test0067;\n" +
"public class Test<T> {\n" +
" public <U> Test(U u) {\n" +
@@ -1486,7 +1486,7 @@ public void test0067() throws JavaModelException {
}
public void test0068() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0068/Test.java",
+ "/Resolve/src2/test0068/Test.js",
"package test0068;\n" +
"public class Test<T> {\n" +
" public <U> Test(U u) {\n" +
@@ -1510,7 +1510,7 @@ public void test0068() throws JavaModelException {
}
public void test0069() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0069/Test.java",
+ "/Resolve/src2/test0069/Test.js",
"package test0069;\n" +
"public class Test<T> {\n" +
" public <U> Test(U u) {\n" +
@@ -1538,7 +1538,7 @@ public void test0069() throws JavaModelException {
}
public void test0070() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0070/Test.java",
+ "/Resolve/src2/test0070/Test.js",
"package test0070;\n" +
"public class Test {\n" +
" public <U> Test(U u) {\n" +
@@ -1562,7 +1562,7 @@ public void test0070() throws JavaModelException {
}
public void test0071() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0071/Test.java",
+ "/Resolve/src2/test0071/Test.js",
"package test0071;\n" +
"public class Test {\n" +
" public <U> Test(U u) {\n" +
@@ -1586,7 +1586,7 @@ public void test0071() throws JavaModelException {
}
public void test0072() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0072/Test.java",
+ "/Resolve/src2/test0072/Test.js",
"package test0072;\n" +
"public class Test<T> {\n" +
" public <U> Test(U u) {\n" +
@@ -1610,7 +1610,7 @@ public void test0072() throws JavaModelException {
}
public void test0073() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0073/Test.java",
+ "/Resolve/src2/test0073/Test.js",
"package test0073;\n" +
"public class Test<T> {\n" +
" public <U> Test(U u) {\n" +
@@ -1634,7 +1634,7 @@ public void test0073() throws JavaModelException {
}
public void test0074() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0074/Test.java",
+ "/Resolve/src2/test0074/Test.js",
"package test0074;\n" +
"public class Test<T> {\n" +
" public <U> Test(U u) {\n" +
@@ -1658,7 +1658,7 @@ public void test0074() throws JavaModelException {
}
public void test0075() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0075/Test.java",
+ "/Resolve/src2/test0075/Test.js",
"package test0075;\n" +
"public class Test<T> {\n" +
" public <U> Test(U u) {\n" +
@@ -1686,7 +1686,7 @@ public void test0075() throws JavaModelException {
}
public void test0076() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0076/Test.java",
+ "/Resolve/src2/test0076/Test.js",
"package test0076;\n" +
"public class Test<T> {\n" +
" public class Inner<U, V> {\n" +
@@ -1708,7 +1708,7 @@ public void test0076() throws JavaModelException {
}
public void test0077() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0077/Test.java",
+ "/Resolve/src2/test0077/Test.js",
"package test0077;\n" +
"@interface MyAnn {\n" +
"}\n" +
@@ -1729,7 +1729,7 @@ public void test0077() throws JavaModelException {
}
public void test0078() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0078/Test.java",
+ "/Resolve/src2/test0078/Test.js",
"package test0078;\n" +
"@interface MyAnn {\n" +
" String value();\n" +
@@ -1751,7 +1751,7 @@ public void test0078() throws JavaModelException {
}
public void test0079() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0079/Test.java",
+ "/Resolve/src2/test0079/Test.js",
"package test0079;\n" +
"@interface MyAnn {\n" +
" String value();\n" +
@@ -1773,7 +1773,7 @@ public void test0079() throws JavaModelException {
}
public void test0080() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0080/Test.java",
+ "/Resolve/src2/test0080/Test.js",
"package test0080;\n" +
"@interface MyAnn {\n" +
" String value1();\n" +
@@ -1796,7 +1796,7 @@ public void test0080() throws JavaModelException {
}
public void test0081() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0081/Test.java",
+ "/Resolve/src2/test0081/Test.js",
"package test0080;\n" +
"@interface MyAnn {\n" +
" String value1();\n" +
@@ -1819,7 +1819,7 @@ public void test0081() throws JavaModelException {
}
public void test0082() throws JavaModelException {
IJavaElement[] elements = select(
- "/Resolve/src2/test0082/Test.java",
+ "/Resolve/src2/test0082/Test.js",
"package test0082;\n" +
"public class Test<T> {\n" +
"}",
@@ -1828,7 +1828,7 @@ public void test0082() throws JavaModelException {
}
public void test0083() throws JavaModelException {
IJavaElement[] elements = select(
- "/Resolve/src2/test0083/Test.java",
+ "/Resolve/src2/test0083/Test.js",
"package test0083;\n" +
"public class Test<T> {\n" +
" Test<String> field;\n" +
@@ -1838,7 +1838,7 @@ public void test0083() throws JavaModelException {
}
public void test0084() throws JavaModelException {
IJavaElement[] elements = select(
- "/Resolve/src2/test0084/Test.java",
+ "/Resolve/src2/test0084/Test.js",
"package test0084;\n" +
"public class Test<T> {\n" +
" Test field;\n" +
@@ -1848,7 +1848,7 @@ public void test0084() throws JavaModelException {
}
public void test0085() throws JavaModelException {
IJavaElement[] elements = select(
- "/Resolve/src2/test0085/Test.java",
+ "/Resolve/src2/test0085/Test.js",
"package test0085;\n" +
"public class Test<T> {\n" +
" class Member {\n" +
@@ -1860,7 +1860,7 @@ public void test0085() throws JavaModelException {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=80957
public void test0086() throws JavaModelException {
this.wc = getWorkingCopy(
- "/Resolve/src2/test0086/Test.java",
+ "/Resolve/src2/test0086/Test.js",
"package test0080;\n" +
"public class Test {\n" +
" List<Integer> list;\n" +
@@ -1883,14 +1883,14 @@ public void test0087() throws JavaModelException {
ICompilationUnit imported = null;
try {
imported = getWorkingCopy(
- "/Resolve/src2/p/MyClass0087.java",
+ "/Resolve/src2/p/MyClass0087.js",
"package p;\n" +
"public class MyClass0087 {\n" +
" public static int bar = 0;\n" +
"}");
IJavaElement[] elements = select(
- "/Resolve/src2/test0087/Test.java",
+ "/Resolve/src2/test0087/Test.js",
"import static p.MyClass0087.bar;\n" +
"package test0087;\n" +
"public class Test {\n" +
@@ -1913,7 +1913,7 @@ public void test0088() throws JavaModelException {
ICompilationUnit imported = null;
try {
imported = getWorkingCopy(
- "/Resolve/src2/p/MyClass0088.java",
+ "/Resolve/src2/p/MyClass0088.js",
"package p;\n" +
"public class MyClass0088 {\n" +
" public static void foo() {}\n" +
@@ -1921,7 +1921,7 @@ public void test0088() throws JavaModelException {
"}");
IJavaElement[] elements = select(
- "/Resolve/src2/test0088/Test.java",
+ "/Resolve/src2/test0088/Test.js",
"import static p.MyClass0088.foo;\n" +
"package test0088;\n" +
"public class Test {\n" +
@@ -1943,7 +1943,7 @@ public void test0088() throws JavaModelException {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=82558
public void test0089() throws JavaModelException {
IJavaElement[] elements = selectAfter(
- "/Resolve/src2/test0089/Test.java",
+ "/Resolve/src2/test0089/Test.js",
"package test0089;\n" +
"public class Test<T> {\n" +
" Test(String t) {}\n" +
@@ -1964,7 +1964,7 @@ public void test0089() throws JavaModelException {
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=83489
public void test0090() throws JavaModelException {
IJavaElement[] elements = selectAfter(
- "/Resolve/src2/test0090/Test.java",
+ "/Resolve/src2/test0090/Test.js",
"package test0090;\n" +
"public class Test {\n" +
" <T>Test(T t) {}\n" +
@@ -1983,13 +1983,13 @@ public void test0091() throws JavaModelException {
ICompilationUnit imported = null;
try {
imported = getWorkingCopy(
- "/Resolve/src2/test0091/MyAnnot.java",
+ "/Resolve/src2/test0091/MyAnnot.js",
"package test0091;\n" +
"public @interface MyAnnot {\n" +
"}");
IJavaElement[] elements = select(
- "/Resolve/src2/test0091/Test.java",
+ "/Resolve/src2/test0091/Test.js",
"package test0091;\n" +
"@MyAnnot\n" +
"public class Test {\n" +
@@ -2012,13 +2012,13 @@ public void test0092() throws JavaModelException {
ICompilationUnit imported = null;
try {
imported = getWorkingCopy(
- "/Resolve/src2/test0092/MyAnnot.java",
+ "/Resolve/src2/test0092/MyAnnot.js",
"package test0092;\n" +
"public @interface MyAnnot {\n" +
"}");
IJavaElement[] elements = select(
- "/Resolve/src2/test0092/Test.java",
+ "/Resolve/src2/test0092/Test.js",
"package test0092;\n" +
"@MyAnnot @MyAnnot\n" +
"public class Test {\n" +
@@ -2041,14 +2041,14 @@ public void test0093() throws JavaModelException {
ICompilationUnit imported = null;
try {
imported = getWorkingCopy(
- "/Resolve/src2/test0093/MyEnum.java",
+ "/Resolve/src2/test0093/MyEnum.js",
"package test0093;\n" +
"public enum MyEnum {\n" +
" MyEnumConstant;\n" +
"}");
IJavaElement[] elements = select(
- "/Resolve/src2/test0093/Test.java",
+ "/Resolve/src2/test0093/Test.js",
"package test0093;\n" +
"public class Test {\n" +
" void foo(MyEnum e) {\n" +
@@ -2073,7 +2073,7 @@ public void test0093() throws JavaModelException {
}
public void test0094() throws JavaModelException {
IJavaElement[] elements = select(
- "/Resolve/src2/test0094/Test.java",
+ "/Resolve/src2/test0094/Test.js",
"package test0094;\n" +
"package import;\n" +
"public class Test {\n" +
@@ -2095,7 +2095,7 @@ public void test0094() throws JavaModelException {
*/
public void test0095() throws JavaModelException {
IJavaElement[] elements = select(
- "/Resolve/src2/test0095/X.java",
+ "/Resolve/src2/test0095/X.js",
"package test0095;\n" +
"public class X {\n" +
" Y<?, ? extends Z<? super Exception>> y;\n" +
@@ -2125,7 +2125,7 @@ public void test0095() throws JavaModelException {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=94653
public void test0096() throws JavaModelException {
IJavaElement[] elements = select(
- "/Resolve/src2/test0096/X.java",
+ "/Resolve/src2/test0096/X.js",
"package test0095;\n" +
"public class X<T> {\n" +
" class Inner<U> {\n" +
@@ -2146,14 +2146,14 @@ public void test0097() throws JavaModelException {
ICompilationUnit imported = null;
try {
imported = getWorkingCopy(
- "/Resolve/src2/test0097/Key.java",
+ "/Resolve/src2/test0097/Key.js",
"public class Key<\n" +
" TT extends Test<KK, TT>,\n" +
" KK extends Key<TT, KK>> {\n" +
"}\n");
IJavaElement[] elements = select(
- "/Resolve/src2/test0097/Test.java",
+ "/Resolve/src2/test0097/Test.js",
"public class Test<\n" +
" K extends Key<T, K>,\n" +
" T extends Test<K, T>> {\n" +
@@ -2176,14 +2176,14 @@ public void test0098() throws JavaModelException {
ICompilationUnit imported = null;
try {
imported = getWorkingCopy(
- "/Resolve/src2/test0098/Color.java",
+ "/Resolve/src2/test0098/Color.js",
"public enum Color<\n" +
" BLUE,\n" +
" RED;\n" +
"}\n");
IJavaElement[] elements = select(
- "/Resolve/src2/test0098/Test.java",
+ "/Resolve/src2/test0098/Test.js",
"public class Test<\n" +
" void foo() {\n" +
" Color.valueOf(\"RED\");\n" +
@@ -2205,7 +2205,7 @@ public void test0098() throws JavaModelException {
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=99645
public void test0099() throws JavaModelException {
IJavaElement[] elements = select(
- "/Resolve/src2/test0099/Test.java",
+ "/Resolve/src2/test0099/Test.js",
"public class Test<\n" +
" void foo() {\n" +
" class Local<TLocal>{}\n" +
@@ -2222,7 +2222,7 @@ public void test0099() throws JavaModelException {
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=99645
public void test0100() throws JavaModelException {
IJavaElement[] elements = select(
- "/Resolve/src2/test0100/Test.java",
+ "/Resolve/src2/test0100/Test.js",
"public class Test<\n" +
" void foo() {\n" +
" class Local<TLocal>{\n" +
@@ -2272,7 +2272,7 @@ public void test0102() throws CoreException, IOException {
" return new Y();\n" +
" }\n" +
"}";
- addLibrary(project, "lib15.jar", "lib15.zip", new String[] {"X.java", source}, "1.5");
+ addLibrary(project, "lib15.jar", "lib15.zip", new String[] {"X.js", source}, "1.5");
IClassFile classFile = getClassFile("P", "/P/lib15.jar", "", "X.class");
int start = source.indexOf("Y()");
int end = source.indexOf("();");
@@ -2289,7 +2289,7 @@ public void test0102() throws CoreException, IOException {
public void test103() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Resolve/src/test/Test.java",
+ "/Resolve/src/test/Test.js",
"package test;\n"+
"public class Test {\n" +
" <T extends Test1> void foo(T t) {}\n" +
@@ -2318,7 +2318,7 @@ public void test103() throws JavaModelException {
public void test104() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Resolve/src/test/Test.java",
+ "/Resolve/src/test/Test.js",
"package test;\n"+
"public class Test {\n" +
" <T extends Test1> T foo(Test3<T> t) {return null;}\n" +
@@ -2349,7 +2349,7 @@ public void test104() throws JavaModelException {
public void test105() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Resolve/src/test/Test.java",
+ "/Resolve/src/test/Test.js",
"package test;\n"+
"public class Test {\n" +
" <T extends Test1> T foo(Test3<T> t) {return null;}\n" +
@@ -2380,7 +2380,7 @@ public void test105() throws JavaModelException {
public void test106() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Resolve/src/test/Test.java",
+ "/Resolve/src/test/Test.js",
"package test;\n"+
"public class Test {\n" +
" <T extends Test1> T foo(Test3<T> t) {return null;}\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/RootManipulationsTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/RootManipulationsTests.java
index 9d5fcca..c861f11 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/RootManipulationsTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/RootManipulationsTests.java
@@ -135,7 +135,7 @@ public void testCopySourceFolder1() throws CoreException {
this.createJavaProject("P2", new String[] {}, "bin");
this.createFolder("/P1/src/p");
this.createFile(
- "/P1/src/p/X.java",
+ "/P1/src/p/X.js",
"package p;\n" +
"public class X {\n" +
"}"
@@ -149,7 +149,7 @@ public void testCopySourceFolder1() throws CoreException {
" src[+]: {}\n" +
" ResourceDelta(/P2/.classpath)[*]"
);
- ICompilationUnit cu = this.getCompilationUnit("/P2/src/p/X.java");
+ ICompilationUnit cu = this.getCompilationUnit("/P2/src/p/X.js");
assertTrue("Destination cu should exist", cu.exists());
} finally {
this.stopDeltas();
@@ -167,7 +167,7 @@ public void testCopySourceFolder2() throws CoreException {
this.createJavaProject("P2", new String[] {}, "bin");
this.createFolder("/P1/src/p");
this.createFile(
- "/P1/src/p/X.java",
+ "/P1/src/p/X.js",
"package p;\n" +
"public class X {\n" +
"}"
@@ -181,7 +181,7 @@ public void testCopySourceFolder2() throws CoreException {
" src2[+]: {}\n" +
" ResourceDelta(/P2/.classpath)[*]"
);
- ICompilationUnit cu = this.getCompilationUnit("/P2/src2/p/X.java");
+ ICompilationUnit cu = this.getCompilationUnit("/P2/src2/p/X.js");
assertTrue("Destination cu should exist", cu.exists());
} finally {
this.stopDeltas();
@@ -200,14 +200,14 @@ public void testCopySourceFolder3() throws CoreException {
this.createJavaProject("P2", new String[] {}, "bin");
this.createFolder("/P1/src1/p");
this.createFile(
- "/P1/src1/p/X.java",
+ "/P1/src1/p/X.js",
"package p;\n" +
"public class X {\n" +
"}"
);
this.createFolder("/P1/src1/src2/q");
this.createFile(
- "/P1/src1/src2/q/Y.java",
+ "/P1/src1/src2/q/Y.js",
"package q;\n" +
"public class Y {\n" +
"}"
@@ -221,9 +221,9 @@ public void testCopySourceFolder3() throws CoreException {
" src1[+]: {}\n" +
" ResourceDelta(/P2/.classpath)[*]"
);
- ICompilationUnit cu = this.getCompilationUnit("/P2/src1/p/X.java");
+ ICompilationUnit cu = this.getCompilationUnit("/P2/src1/p/X.js");
assertTrue("Destination cu should exist", cu.exists());
- cu = this.getCompilationUnit("/P2/src1/src2/q/Y.java");
+ cu = this.getCompilationUnit("/P2/src1/src2/q/Y.js");
assertTrue("Nested cu should not exist", !cu.exists());
} finally {
this.stopDeltas();
@@ -313,7 +313,7 @@ public void testCopySourceFolder5() throws CoreException {
IJavaProject p2 = this.createJavaProject("P2", new String[] {"src"}, "bin");
this.createFolder("/P1/src/p");
this.createFile(
- "/P1/src/p/X.java",
+ "/P1/src/p/X.js",
"package p;\n" +
"public class X {\n" +
"}"
@@ -353,7 +353,7 @@ public void testCopySourceFolder6() throws CoreException {
IJavaProject project = this.createJavaProject("P", new String[] {"src"}, "bin");
this.createFolder("/P/src/p");
this.createFile(
- "/P/src/p/X.java",
+ "/P/src/p/X.js",
"package p;\n" +
"public class X {\n" +
"}"
@@ -549,7 +549,7 @@ public void testDeleteSourceFolder1() throws CoreException {
IJavaProject project = this.createJavaProject("P", new String[] {"src"}, "bin");
this.createFolder("/P/src/p");
this.createFile(
- "/P/src/p/X.java",
+ "/P/src/p/X.js",
"package p;\n" +
"public class X {\n" +
"}"
@@ -583,14 +583,14 @@ public void testDeleteSourceFolder2() throws CoreException {
project.setRawClasspath(createClasspath(new String[] {"/P/src1", "src2/**", "/P/src1/src2", ""}, false/*no inclusion*/, true/*exclusion*/), null);
IFolder folder = this.createFolder("/P/src1/p");
IFile file = this.createFile(
- "/P/src1/p/X.java",
+ "/P/src1/p/X.js",
"package p;\n" +
"public class X {\n" +
"}"
);
this.createFolder("/P/src1/src2/q");
this.createFile(
- "/P/src1/src2/q/Y.java",
+ "/P/src1/src2/q/Y.js",
"package q;\n" +
"public class Y {\n" +
"}"
@@ -636,7 +636,7 @@ public void testMoveSourceFolder1() throws CoreException {
IJavaProject p2 = this.createJavaProject("P2", new String[] {}, "bin");
this.createFolder("/P1/src/p");
this.createFile(
- "/P1/src/p/X.java",
+ "/P1/src/p/X.js",
"package p;\n" +
"public class X {\n" +
"}"
@@ -683,7 +683,7 @@ public void testMoveSourceFolder2() throws CoreException {
IJavaProject p2 = this.createJavaProject("P2", new String[] {}, "bin");
this.createFolder("/P1/src/p");
this.createFile(
- "/P1/src/p/X.java",
+ "/P1/src/p/X.js",
"package p;\n" +
"public class X {\n" +
"}"
@@ -733,14 +733,14 @@ public void testMoveSourceFolder3() throws CoreException {
IJavaProject p2 = this.createJavaProject("P2", new String[] {}, "bin");
this.createFolder("/P1/src1/p");
this.createFile(
- "/P1/src1/p/X.java",
+ "/P1/src1/p/X.js",
"package p;\n" +
"public class X {\n" +
"}"
);
this.createFolder("/P1/src1/src2/q");
this.createFile(
- "/P1/src1/src2/q/Y.java",
+ "/P1/src1/src2/q/Y.js",
"package q;\n" +
"public class Y {\n" +
"}"
@@ -932,7 +932,7 @@ public void testRenameSourceFolder1() throws CoreException {
IJavaProject project = this.createJavaProject("P", new String[] {"src1"}, "bin");
this.createFolder("/P/src1/p");
this.createFile(
- "/P/src1/p/X.java",
+ "/P/src1/p/X.js",
"package p;\n" +
"public class X {\n" +
"}"
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SearchParticipantTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SearchParticipantTests.java
index a709a20..4a6e1d1 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SearchParticipantTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SearchParticipantTests.java
@@ -39,7 +39,7 @@ public class SearchParticipantTests extends ModifyingResourceTests implements IJ
private SearchDocument document;
WrapperDocument(SearchDocument document, SearchParticipant participant) {
- super(document.getPath().replaceAll(".test", ".java"), participant);
+ super(document.getPath().replaceAll(".test", ".js"), participant);
this.document = document;
}
@@ -120,7 +120,7 @@ public class SearchParticipantTests extends ModifyingResourceTests implements IJ
return fileContent.toCharArray();
}
protected String getPathString(IResource resource, IJavaElement element) {
- return super.getPathString(resource, element).replaceAll(".java", ".test");
+ return super.getPathString(resource, element).replaceAll(".js", ".test");
}
}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SearchTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SearchTests.java
index cf1ddff..69f27b3 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SearchTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SearchTests.java
@@ -199,23 +199,16 @@ protected void assertValidMatchRule(String pattern, int rule, int expected) {
public void setUpSuite() throws Exception {
super.setUpSuite();
createJavaProject("P");
- createFolder("/P/x/y/z");
+ createFolder("/P/x");
createFile(
- "/P/x/y/z/Foo.java",
- "package x.y,z;\n" +
- "import x.y.*;\n" +
- "import java.util.Vector;\n" +
- "public class Foo {\n" +
- " int field;\n" +
- " void bar() {\n" +
- " }\n" +
+ "/P/x/Foo.js",
+ "function foo1(){\n" +
"}"
);
createFile(
- "/P/x/y/z/I.java",
- "package x.y,z;\n" +
- "public interface I {\n" +
- "}"
+ "/P/x/I.js",
+ "var v;\n" +
+ ""
);
}
public void tearDownSuite() throws Exception {
@@ -236,10 +229,10 @@ public void testChangeClasspath() throws CoreException, TimeOutException {
public void run(IProgressMonitor monitor) throws CoreException {
createJavaProject("P1");
createFile(
- "/P1/X.java",
- "public class X {\n" +
- "}"
- );
+ "/P1/X.js",
+ "function bar() {\n" +
+ "}"
+ );
}
}, null);
@@ -276,9 +269,10 @@ public void testChangeClasspath2() throws CoreException {
try {
final IJavaProject project = createJavaProject("P1", new String[] {""}, "bin");
createFile(
- "/P1/X.java",
- "public class X {}"
- );
+ "/P1/X.js",
+ "function bar() {\n" +
+ "}"
+ );
assertAllTypes(
"Unexpected types before changing the classpath",
null, // workspace search
@@ -470,7 +464,7 @@ public void testRemoveOuterFolder() throws CoreException {
null);
createFolder("/P1/src1/src2");
createFile(
- "/P1/src1/src2/X.java",
+ "/P1/src1/src2/X.js",
"public class X {\n" +
"}"
);
@@ -645,7 +639,7 @@ public void testSearchPatternCreation10() {
* Test pattern creation
*/
public void testSearchPatternCreation12() {
- IField field = getCompilationUnit("/P/x/y/z/Foo.java").getType("Foo").getField("field");
+ IField field = getCompilationUnit("/P/x/y/z/Foo.js").getType("Foo").getField("field");
SearchPattern searchPattern = createPattern(
field,
IJavaSearchConstants.REFERENCES);
@@ -659,7 +653,7 @@ public void testSearchPatternCreation12() {
* Test pattern creation
*/
public void testSearchPatternCreation13() {
- IField field = getCompilationUnit("/P/x/y/z/Foo.java").getType("Foo").getField("field");
+ IField field = getCompilationUnit("/P/x/y/z/Foo.js").getType("Foo").getField("field");
SearchPattern searchPattern = createPattern(
field,
IJavaSearchConstants.DECLARATIONS);
@@ -673,7 +667,7 @@ public void testSearchPatternCreation13() {
* Test pattern creation
*/
public void testSearchPatternCreation14() {
- IField field = getCompilationUnit("/P/x/y/z/Foo.java").getType("Foo").getField("field");
+ IField field = getCompilationUnit("/P/x/y/z/Foo.js").getType("Foo").getField("field");
SearchPattern searchPattern = createPattern(
field,
IJavaSearchConstants.ALL_OCCURRENCES);
@@ -687,7 +681,7 @@ public void testSearchPatternCreation14() {
* Test pattern creation
*/
public void testSearchPatternCreation15() {
- IImportDeclaration importDecl = getCompilationUnit("/P/x/y/z/Foo.java").getImport("x.y.*");
+ IImportDeclaration importDecl = getCompilationUnit("/P/x/y/z/Foo.js").getImport("x.y.*");
SearchPattern searchPattern = createPattern(
importDecl,
IJavaSearchConstants.REFERENCES);
@@ -701,7 +695,7 @@ public void testSearchPatternCreation15() {
* Test pattern creation
*/
public void testSearchPatternCreation16() {
- IMethod method = getCompilationUnit("/P/x/y/z/Foo.java").getType("Foo").getMethod("bar", new String[] {});
+ IMethod method = getCompilationUnit("/P/x/y/z/Foo.js").getType("Foo").getMethod("bar", new String[] {});
SearchPattern searchPattern = createPattern(
method,
IJavaSearchConstants.DECLARATIONS);
@@ -715,7 +709,7 @@ public void testSearchPatternCreation16() {
* Test pattern creation
*/
public void testSearchPatternCreation17() {
- IMethod method = getCompilationUnit("/P/x/y/z/Foo.java").getType("Foo").getMethod("bar", new String[] {});
+ IMethod method = getCompilationUnit("/P/x/y/z/Foo.js").getType("Foo").getMethod("bar", new String[] {});
SearchPattern searchPattern = createPattern(
method,
IJavaSearchConstants.REFERENCES);
@@ -729,7 +723,7 @@ public void testSearchPatternCreation17() {
* Test pattern creation
*/
public void testSearchPatternCreation18() {
- IMethod method = getCompilationUnit("/P/x/y/z/Foo.java").getType("Foo").getMethod("bar", new String[] {});
+ IMethod method = getCompilationUnit("/P/x/y/z/Foo.js").getType("Foo").getMethod("bar", new String[] {});
SearchPattern searchPattern = createPattern(
method,
IJavaSearchConstants.ALL_OCCURRENCES);
@@ -743,7 +737,7 @@ public void testSearchPatternCreation18() {
* Test pattern creation
*/
public void testSearchPatternCreation19() {
- IType type = getCompilationUnit("/P/x/y/z/Foo.java").getType("Foo");
+ IType type = getCompilationUnit("/P/x/y/z/Foo.js").getType("Foo");
SearchPattern searchPattern = createPattern(
type,
IJavaSearchConstants.DECLARATIONS);
@@ -757,7 +751,7 @@ public void testSearchPatternCreation19() {
* Test pattern creation
*/
public void testSearchPatternCreation20() {
- IType type = getCompilationUnit("/P/x/y/z/Foo.java").getType("Foo");
+ IType type = getCompilationUnit("/P/x/y/z/Foo.js").getType("Foo");
SearchPattern searchPattern = createPattern(
type,
IJavaSearchConstants.REFERENCES);
@@ -771,7 +765,7 @@ public void testSearchPatternCreation20() {
* Test pattern creation
*/
public void testSearchPatternCreation21() {
- IType type = getCompilationUnit("/P/x/y/z/I.java").getType("I");
+ IType type = getCompilationUnit("/P/x/y/z/I.js").getType("I");
SearchPattern searchPattern = createPattern(
type,
IJavaSearchConstants.IMPLEMENTORS);
@@ -785,7 +779,7 @@ public void testSearchPatternCreation21() {
* Test pattern creation
*/
public void testSearchPatternCreation22() {
- IType type = getCompilationUnit("/P/x/y/z/Foo.java").getType("Foo");
+ IType type = getCompilationUnit("/P/x/y/z/Foo.js").getType("Foo");
SearchPattern searchPattern = createPattern(
type,
IJavaSearchConstants.ALL_OCCURRENCES);
@@ -800,7 +794,7 @@ public void testSearchPatternCreation22() {
* Test pattern creation
*/
public void testSearchPatternCreation23() {
- IPackageDeclaration pkg = getCompilationUnit("/P/x/y/z/Foo.java").getPackageDeclaration("x.y.z");
+ IPackageDeclaration pkg = getCompilationUnit("/P/x/y/z/Foo.js").getPackageDeclaration("x.y.z");
SearchPattern searchPattern = createPattern(
pkg,
IJavaSearchConstants.REFERENCES);
@@ -828,7 +822,7 @@ public void testSearchPatternCreation24() {
* Test pattern creation
*/
public void testSearchPatternCreation25() {
- IImportDeclaration importDecl = getCompilationUnit("/P/x/y/z/Foo.java").getImport("java.util.Vector");
+ IImportDeclaration importDecl = getCompilationUnit("/P/x/y/z/Foo.js").getImport("java.util.Vector");
SearchPattern searchPattern = createPattern(
importDecl,
IJavaSearchConstants.REFERENCES);
@@ -856,7 +850,7 @@ public void testSearchPatternCreation26() {
* Test pattern creation
*/
public void testSearchPatternCreation27() {
- IPackageDeclaration pkg = getCompilationUnit("/P/x/y/z/Foo.java").getPackageDeclaration("x.y.z");
+ IPackageDeclaration pkg = getCompilationUnit("/P/x/y/z/Foo.js").getPackageDeclaration("x.y.z");
SearchPattern searchPattern = createPattern(
pkg,
IJavaSearchConstants.DECLARATIONS);
@@ -870,7 +864,7 @@ public void testSearchPatternCreation27() {
* Test pattern creation
*/
public void testSearchPatternCreation28() {
- IImportDeclaration importDecl = getCompilationUnit("/P/x/y/z/Foo.java").getImport("x.y.*");
+ IImportDeclaration importDecl = getCompilationUnit("/P/x/y/z/Foo.js").getImport("x.y.*");
SearchPattern searchPattern = createPattern(
importDecl,
IJavaSearchConstants.DECLARATIONS);
@@ -899,7 +893,7 @@ public void testSearchPatternCreation29() {
* Test LocalVarDeclarationPattern creation
*/
public void testSearchPatternCreation30() {
- ILocalVariable localVar = new LocalVariable((JavaElement)getCompilationUnit("/P/X.java").getType("X").getMethod("foo", new String[0]), "var", 1, 2, 3, 4, "Z");
+ ILocalVariable localVar = new LocalVariable((JavaElement)getCompilationUnit("/P/X.js").getType("X").getMethod("foo", new String[0]), "var", 1, 2, 3, 4, "Z");
SearchPattern searchPattern = createPattern(
localVar,
IJavaSearchConstants.DECLARATIONS);
@@ -913,7 +907,7 @@ public void testSearchPatternCreation30() {
* Test LocalVarReferencePattern creation
*/
public void testSearchPatternCreation31() {
- ILocalVariable localVar = new LocalVariable((JavaElement)getCompilationUnit("/P/X.java").getType("X").getMethod("foo", new String[0]), "var", 1, 2, 3, 4, "Z");
+ ILocalVariable localVar = new LocalVariable((JavaElement)getCompilationUnit("/P/X.js").getType("X").getMethod("foo", new String[0]), "var", 1, 2, 3, 4, "Z");
SearchPattern searchPattern = createPattern(
localVar,
IJavaSearchConstants.REFERENCES);
@@ -927,7 +921,7 @@ public void testSearchPatternCreation31() {
* Test LocalVarCombinedPattern creation
*/
public void testSearchPatternCreation32() {
- ILocalVariable localVar = new LocalVariable((JavaElement)getCompilationUnit("/P/X.java").getType("X").getMethod("foo", new String[0]), "var", 1, 2, 3, 4, "Z");
+ ILocalVariable localVar = new LocalVariable((JavaElement)getCompilationUnit("/P/X.js").getType("X").getMethod("foo", new String[0]), "var", 1, 2, 3, 4, "Z");
SearchPattern searchPattern = createPattern(
localVar,
IJavaSearchConstants.ALL_OCCURRENCES);
@@ -941,7 +935,7 @@ public void testSearchPatternCreation32() {
* Test TypeDeclarationPattern creation
*/
public void testSearchPatternCreation33() {
- IType localType = getCompilationUnit("/P/X.java").getType("X").getMethod("foo", new String[0]).getType("Y", 2);
+ IType localType = getCompilationUnit("/P/X.js").getType("X").getMethod("foo", new String[0]).getType("Y", 2);
SearchPattern searchPattern = createPattern(
localType,
IJavaSearchConstants.DECLARATIONS);
@@ -955,7 +949,7 @@ public void testSearchPatternCreation33() {
* Test TypeReferencePattern creation
*/
public void testSearchPatternCreation34() {
- IType localType = getCompilationUnit("/P/X.java").getType("X").getMethod("foo", new String[0]).getType("Y", 3);
+ IType localType = getCompilationUnit("/P/X.js").getType("X").getMethod("foo", new String[0]).getType("Y", 3);
SearchPattern searchPattern = createPattern(
localType,
IJavaSearchConstants.REFERENCES);
@@ -969,7 +963,7 @@ public void testSearchPatternCreation34() {
* Test TypeDeclarationPattern creation
*/
public void testSearchPatternCreation35() {
- IType localType = getCompilationUnit("/P/X.java").getType("X").getInitializer(1).getType("Y", 2);
+ IType localType = getCompilationUnit("/P/X.js").getType("X").getInitializer(1).getType("Y", 2);
SearchPattern searchPattern = createPattern(
localType,
IJavaSearchConstants.DECLARATIONS);
@@ -983,7 +977,7 @@ public void testSearchPatternCreation35() {
* Test TypeReferencePattern creation
*/
public void testSearchPatternCreation36() {
- IType localType = getCompilationUnit("/P/X.java").getType("X").getInitializer(2).getType("Y", 3);
+ IType localType = getCompilationUnit("/P/X.js").getType("X").getInitializer(2).getType("Y", 3);
SearchPattern searchPattern = createPattern(
localType,
IJavaSearchConstants.REFERENCES);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SelectionJavadocModelTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SelectionJavadocModelTests.java
index bb64d08..5469f71 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SelectionJavadocModelTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SelectionJavadocModelTests.java
@@ -66,24 +66,57 @@ public class SelectionJavadocModelTests extends AbstractJavaModelTests {
assertTrue("Selection should be empty", elements == null || elements.length == 0);
}
+ public void test00() throws JavaModelException {
+ setUnit("Test.js",
+ "" +
+ "" +
+ "function bar() {\n" +
+ " foo();\n" +
+ "}\n" +
+ "function foo() {}\n" +
+ "}\n"
+ );
+ this.element = selectMethod(this.workingCopies[0], "foo");
+ assertElementEquals("Invalid selected method",
+ "foo() [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]"
+ );
+ }
+
+
public void test01() throws JavaModelException {
- setUnit("Test.java",
- "public class Test {\n" +
- " /** @see #foo() */\n" +
- " void bar() {\n" +
+ setUnit("Test.js",
+ "" +
+ "" +
+ "function foo() {}\n" +
+ "}\n" +
+ "function bar() {\n" +
" foo();\n" +
- " }\n" +
- " void foo() {}\n" +
"}\n"
);
this.element = selectMethod(this.workingCopies[0], "foo");
assertElementEquals("Invalid selected method",
- "foo() [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]"
+ "foo() [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]"
+ );
+ }
+
+ public void test01a() throws JavaModelException {
+ setUnit("Test.js",
+ "" +
+ "" +
+ "function bar() {\n" +
+ " foo();\n" +
+ "}\n" +
+ "function foo() {}\n" +
+ "}\n"
+ );
+ this.element = selectMethod(this.workingCopies[0], "foo");
+ assertElementEquals("Invalid selected method",
+ "foo() [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]"
);
}
public void test02() throws JavaModelException {
- setUnit("Test.java",
+ setUnit("Test.js",
"public class Test {\n" +
" /** {@link #foo() foo} */\n" +
" void bar() {\n" +
@@ -94,12 +127,12 @@ public class SelectionJavadocModelTests extends AbstractJavaModelTests {
);
this.element = selectMethod(this.workingCopies[0], "foo");
assertElementEquals("Invalid selected method",
- "foo() [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]"
+ "foo() [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]"
);
}
public void test03() throws JavaModelException {
- setUnit("Test.java",
+ setUnit("Test.js",
"public class Test {\n" +
" /** @see Test */\n" +
" void foo() {}\n" +
@@ -107,12 +140,12 @@ public class SelectionJavadocModelTests extends AbstractJavaModelTests {
);
this.element = selectType(this.workingCopies[0], "Test", 2);
assertElementEquals("Invalid selected type",
- "Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]"
+ "Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]"
);
}
public void test04() throws JavaModelException {
- setUnit("Test.java",
+ setUnit("Test.js",
"public class Test {\n" +
" /** Javadoc {@link Test} */\n" +
" void foo() {}\n" +
@@ -120,12 +153,12 @@ public class SelectionJavadocModelTests extends AbstractJavaModelTests {
);
this.element = selectType(this.workingCopies[0], "Test", 2);
assertElementEquals("Invalid selected type",
- "Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]"
+ "Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]"
);
}
public void test05() throws JavaModelException {
- setUnit("Test.java",
+ setUnit("Test.js",
"public class Test {\n" +
" int field;\n" +
" /** @see #field */\n" +
@@ -134,12 +167,12 @@ public class SelectionJavadocModelTests extends AbstractJavaModelTests {
);
this.element = selectField(this.workingCopies[0], "field", 2);
assertElementEquals("Invalid selected field",
- "field [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]"
+ "field [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]"
);
}
public void test06() throws JavaModelException {
- setUnit("Test.java",
+ setUnit("Test.js",
"public class Test {\n" +
" int field;\n" +
" /**{@link #field}*/\n" +
@@ -148,12 +181,12 @@ public class SelectionJavadocModelTests extends AbstractJavaModelTests {
);
this.element = selectField(this.workingCopies[0], "field", 2);
assertElementEquals("Invalid selected field",
- "field [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]"
+ "field [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]"
);
}
public void test07() throws JavaModelException {
- setUnit("Test.java",
+ setUnit("Test.js",
"public class Test {\n" +
" /**\n" +
" * @see Test#field\n" +
@@ -176,19 +209,19 @@ public class SelectionJavadocModelTests extends AbstractJavaModelTests {
elements[5] = selectMethod(this.workingCopies[0], "foo", 2);
elements[6] = selectType(this.workingCopies[0], "String", 2);
assertElementsEqual("Invalid selection(s)",
- "Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]\n" +
- "field [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]\n" +
- "foo(int, String) [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]\n" +
- "String [in String.class [in java.lang [in "+ getExternalJCLPathString("1.5") + "]]]\n" +
- "Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]\n" +
- "foo(int, String) [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]\n" +
- "String [in String.class [in java.lang [in "+ getExternalJCLPathString("1.5") + "]]]",
+ "Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]\n" +
+ "field [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]\n" +
+ "foo(int, String) [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]\n" +
+ "String [in String.class [in java.lang [in "+ getExternalJCLPathString("1.5") + " [in Tests]]]]\n" +
+ "Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]\n" +
+ "foo(int, String) [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]\n" +
+ "String [in String.class [in java.lang [in "+ getExternalJCLPathString("1.5") + " [in Tests]]]]",
elements
);
}
public void test08() throws JavaModelException {
- setUnit("Test.java",
+ setUnit("Test.js",
"public class Test {\n" +
" /**\n" +
" * First {@link #foo(int, String)}\n" +
@@ -211,19 +244,19 @@ public class SelectionJavadocModelTests extends AbstractJavaModelTests {
elements[5] = selectMethod(this.workingCopies[0], "foo", 2);
elements[6] = selectType(this.workingCopies[0], "String", 2);
assertElementsEqual("Invalid selection(s)",
- "Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]\n" +
- "field [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]\n" +
- "foo(int, String) [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]\n" +
- "String [in String.class [in java.lang [in "+ getExternalJCLPathString("1.5") + "]]]\n" +
- "Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]\n" +
- "foo(int, String) [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]\n" +
- "String [in String.class [in java.lang [in "+ getExternalJCLPathString("1.5") + "]]]",
+ "Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]\n" +
+ "field [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]\n" +
+ "foo(int, String) [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]\n" +
+ "String [in String.class [in java.lang [in "+ getExternalJCLPathString("1.5") + " [in Tests]]]]\n" +
+ "Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]\n" +
+ "foo(int, String) [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]\n" +
+ "String [in String.class [in java.lang [in "+ getExternalJCLPathString("1.5") + " [in Tests]]]]",
elements
);
}
public void test09() throws JavaModelException {
- setUnit("test/junit/Test.java",
+ setUnit("test/junit/Test.js",
"package test.junit;\n" +
"public class Test {\n" +
" /**\n" +
@@ -253,18 +286,18 @@ public class SelectionJavadocModelTests extends AbstractJavaModelTests {
elements[5] = selectType(this.workingCopies[0], "Object");
assertSelectionIsEmpty(this.workingCopies[0], "array");
assertElementsEqual("Invalid selection(s)",
- "Test [in [Working copy] Test.java [in test.junit [in <project root> [in Tests]]]]\n" +
- "Test [in [Working copy] Test.java [in test.junit [in <project root> [in Tests]]]]\n" +
- "field [in Test [in [Working copy] Test.java [in test.junit [in <project root> [in Tests]]]]]\n" +
- "Test [in [Working copy] Test.java [in test.junit [in <project root> [in Tests]]]]\n" +
- "foo(Object[]) [in Test [in [Working copy] Test.java [in test.junit [in <project root> [in Tests]]]]]\n" +
- "Object [in Object.class [in java.lang [in "+ getExternalJCLPathString("1.5") + "]]]",
+ "Test [in [Working copy] Test.js [in test.junit [in <project root> [in Tests]]]]\n" +
+ "Test [in [Working copy] Test.js [in test.junit [in <project root> [in Tests]]]]\n" +
+ "field [in Test [in [Working copy] Test.js [in test.junit [in <project root> [in Tests]]]]]\n" +
+ "Test [in [Working copy] Test.js [in test.junit [in <project root> [in Tests]]]]\n" +
+ "foo(Object[]) [in Test [in [Working copy] Test.js [in test.junit [in <project root> [in Tests]]]]]\n" +
+ "Object [in Object.class [in java.lang [in "+ getExternalJCLPathString("1.5") + " [in Tests]]]]",
elements
);
}
public void test10() throws JavaModelException {
- setUnit("test/junit/Test.java",
+ setUnit("test/junit/Test.js",
"package test.junit;\n" +
"public class Test {\n" +
" /** Javadoc {@linkplain test.junit.Test}\n" +
@@ -293,18 +326,18 @@ public class SelectionJavadocModelTests extends AbstractJavaModelTests {
elements[5] = selectType(this.workingCopies[0], "Object");
assertSelectionIsEmpty(this.workingCopies[0], "array");
assertElementsEqual("Invalid selection(s)",
- "Test [in [Working copy] Test.java [in test.junit [in <project root> [in Tests]]]]\n" +
- "Test [in [Working copy] Test.java [in test.junit [in <project root> [in Tests]]]]\n" +
- "field [in Test [in [Working copy] Test.java [in test.junit [in <project root> [in Tests]]]]]\n" +
- "Test [in [Working copy] Test.java [in test.junit [in <project root> [in Tests]]]]\n" +
- "foo(Object[]) [in Test [in [Working copy] Test.java [in test.junit [in <project root> [in Tests]]]]]\n" +
- "Object [in Object.class [in java.lang [in "+ getExternalJCLPathString("1.5") + "]]]",
+ "Test [in [Working copy] Test.js [in test.junit [in <project root> [in Tests]]]]\n" +
+ "Test [in [Working copy] Test.js [in test.junit [in <project root> [in Tests]]]]\n" +
+ "field [in Test [in [Working copy] Test.js [in test.junit [in <project root> [in Tests]]]]]\n" +
+ "Test [in [Working copy] Test.js [in test.junit [in <project root> [in Tests]]]]\n" +
+ "foo(Object[]) [in Test [in [Working copy] Test.js [in test.junit [in <project root> [in Tests]]]]]\n" +
+ "Object [in Object.class [in java.lang [in "+ getExternalJCLPathString("1.5") + " [in Tests]]]]",
elements
);
}
public void test11() throws JavaModelException {
- setUnit("Test.java",
+ setUnit("Test.js",
"public class Test {\n" +
" /**\n" +
" * @throws RuntimeException runtime exception\n" +
@@ -317,14 +350,14 @@ public class SelectionJavadocModelTests extends AbstractJavaModelTests {
elements[0] = selectType(this.workingCopies[0], "RuntimeException");
elements[1] = selectType(this.workingCopies[0], "InterruptedException");
assertElementsEqual("Invalid selection(s)",
- "RuntimeException [in RuntimeException.class [in java.lang [in "+ getExternalJCLPathString("1.5") + "]]]\n" +
- "InterruptedException [in InterruptedException.class [in java.lang [in "+ getExternalJCLPathString("1.5") + "]]]",
+ "RuntimeException [in RuntimeException.class [in java.lang [in "+ getExternalJCLPathString("1.5") + " [in Tests]]]]\n" +
+ "InterruptedException [in InterruptedException.class [in java.lang [in "+ getExternalJCLPathString("1.5") + " [in Tests]]]]",
elements
);
}
public void test12() throws JavaModelException {
- setUnit("Test.java",
+ setUnit("Test.js",
"public class Test {\n" +
" /**\n" +
" * @exception RuntimeException runtime exception\n" +
@@ -337,14 +370,14 @@ public class SelectionJavadocModelTests extends AbstractJavaModelTests {
elements[0] = selectType(this.workingCopies[0], "RuntimeException");
elements[1] = selectType(this.workingCopies[0], "InterruptedException");
assertElementsEqual("Invalid selection(s)",
- "RuntimeException [in RuntimeException.class [in java.lang [in "+ getExternalJCLPathString("1.5") + "]]]\n" +
- "InterruptedException [in InterruptedException.class [in java.lang [in "+ getExternalJCLPathString("1.5") + "]]]",
+ "RuntimeException [in RuntimeException.class [in java.lang [in "+ getExternalJCLPathString("1.5") + " [in Tests]]]]\n" +
+ "InterruptedException [in InterruptedException.class [in java.lang [in "+ getExternalJCLPathString("1.5") + " [in Tests]]]]",
elements
);
}
public void test13() throws JavaModelException {
- setUnit("Test.java",
+ setUnit("Test.js",
"public class Test {\n" +
" /**\n" +
" * @param xxx integer param\n" +
@@ -357,14 +390,14 @@ public class SelectionJavadocModelTests extends AbstractJavaModelTests {
elements[0] = selectLocalVariable(this.workingCopies[0], "xxx");
elements[1] = selectLocalVariable(this.workingCopies[0], "str");
assertElementsEqual("Invalid selection(s)",
- "xxx [in foo(int, String) [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]\n" +
- "str [in foo(int, String) [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]",
+ "xxx [in foo(int, String) [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]\n" +
+ "str [in foo(int, String) [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]",
elements
);
}
public void test14() throws JavaModelException {
- setUnit("Test.java",
+ setUnit("Test.js",
"/**\n" +
" * Javadoc of {@link Test}\n" +
" * @see Field#foo\n" +
@@ -394,21 +427,21 @@ public class SelectionJavadocModelTests extends AbstractJavaModelTests {
elements[7] = selectType(this.workingCopies[0], "Field", 4);
elements[8] = selectField(this.workingCopies[0], "foo", 5);
assertElementsEqual("Invalid selection(s)",
- "Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]\n" +
- "Field [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]\n" +
- "foo [in Field [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]\n" +
- "Field [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]\n" +
- "foo [in Field [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]\n" +
- "foo [in Field [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]\n" +
- "foo [in Field [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]\n" +
- "Field [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]\n" +
- "foo [in Field [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]",
+ "Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]\n" +
+ "Field [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]\n" +
+ "foo [in Field [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]\n" +
+ "Field [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]\n" +
+ "foo [in Field [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]\n" +
+ "foo [in Field [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]\n" +
+ "foo [in Field [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]\n" +
+ "Field [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]\n" +
+ "foo [in Field [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]",
elements
);
}
public void test15() throws JavaModelException {
- setUnit("Test.java",
+ setUnit("Test.js",
"/**\n" +
" * Javadoc of {@link Test}\n" +
" * @see Method#foo\n" +
@@ -450,25 +483,25 @@ public class SelectionJavadocModelTests extends AbstractJavaModelTests {
elements[11] = selectType(this.workingCopies[0], "RuntimeException");
elements[12] = selectType(this.workingCopies[0], "InterruptedException");
assertElementsEqual("Invalid selection(s)",
- "Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]\n" +
- "Method [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]\n" +
- "foo(int, String) [in Method [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]\n" +
- "Method [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]\n" +
- "foo(int, String) [in Method [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]\n" +
- "foo(int, String) [in Method [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]\n" +
- "foo(int, String) [in Method [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]\n" +
- "Method [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]\n" +
- "foo(int, String) [in Method [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]\n" +
- "xxx [in foo(int, String) [in Method [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]\n" +
- "str [in foo(int, String) [in Method [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]\n" +
- "RuntimeException [in RuntimeException.class [in java.lang [in "+ getExternalJCLPathString("1.5") + "]]]\n" +
- "InterruptedException [in InterruptedException.class [in java.lang [in "+ getExternalJCLPathString("1.5") + "]]]",
+ "Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]\n" +
+ "Method [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]\n" +
+ "foo(int, String) [in Method [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]\n" +
+ "Method [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]\n" +
+ "foo(int, String) [in Method [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]\n" +
+ "foo(int, String) [in Method [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]\n" +
+ "foo(int, String) [in Method [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]\n" +
+ "Method [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]\n" +
+ "foo(int, String) [in Method [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]\n" +
+ "xxx [in foo(int, String) [in Method [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]\n" +
+ "str [in foo(int, String) [in Method [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]\n" +
+ "RuntimeException [in RuntimeException.class [in java.lang [in "+ getExternalJCLPathString("1.5") + " [in Tests]]]]\n" +
+ "InterruptedException [in InterruptedException.class [in java.lang [in "+ getExternalJCLPathString("1.5") + " [in Tests]]]]",
elements
);
}
public void test16() throws JavaModelException {
- setUnit("Test.java",
+ setUnit("Test.js",
"/**\n" +
" * Javadoc of {@link Test}\n" +
" * @see Other\n" +
@@ -486,16 +519,16 @@ public class SelectionJavadocModelTests extends AbstractJavaModelTests {
elements[2] = selectType(this.workingCopies[0], "Test", 3);
elements[3] = selectType(this.workingCopies[0], "Other", 2);
assertElementsEqual("Invalid selection(s)",
- "Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]\n" +
- "Other [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]\n" +
- "Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]\n" +
- "Other [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]",
+ "Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]\n" +
+ "Other [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]\n" +
+ "Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]\n" +
+ "Other [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]",
elements
);
}
public void test17() throws JavaModelException {
- setUnit("Test.java",
+ setUnit("Test.js",
"/**\n" +
" * @see Test.Field#foo\n" +
" */\n" +
@@ -526,23 +559,23 @@ public class SelectionJavadocModelTests extends AbstractJavaModelTests {
elements[9] = selectType(this.workingCopies[0], "Field", 5);
elements[10] = selectField(this.workingCopies[0], "foo", 5);
assertElementsEqual("Invalid selection(s)",
- "Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]\n" +
- "Field [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]\n" +
- "foo [in Field [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]\n" +
- "Field [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]\n" +
- "foo [in Field [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]\n" +
- "foo [in Field [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]\n" +
- "Field [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]\n" +
- "foo [in Field [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]\n" +
- "Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]\n" +
- "Field [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]\n" +
- "foo [in Field [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]",
+ "Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]\n" +
+ "Field [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]\n" +
+ "foo [in Field [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]\n" +
+ "Field [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]\n" +
+ "foo [in Field [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]\n" +
+ "foo [in Field [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]\n" +
+ "Field [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]\n" +
+ "foo [in Field [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]\n" +
+ "Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]\n" +
+ "Field [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]\n" +
+ "foo [in Field [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]",
elements
);
}
public void test18() throws JavaModelException {
- setUnit("Test.java",
+ setUnit("Test.js",
"/**\n" +
" * @see Test.Method#foo()\n" +
" */\n" +
@@ -573,23 +606,23 @@ public class SelectionJavadocModelTests extends AbstractJavaModelTests {
elements[9] = selectType(this.workingCopies[0], "Method", 5);
elements[10] = selectMethod(this.workingCopies[0], "foo", 5);
assertElementsEqual("Invalid selection(s)",
- "Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]\n" +
- "Method [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]\n" +
- "foo() [in Method [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]\n" +
- "Method [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]\n" +
- "foo() [in Method [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]\n" +
- "foo() [in Method [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]\n" +
- "Method [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]\n" +
- "foo() [in Method [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]\n" +
- "Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]\n" +
- "Method [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]\n" +
- "foo() [in Method [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]",
+ "Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]\n" +
+ "Method [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]\n" +
+ "foo() [in Method [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]\n" +
+ "Method [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]\n" +
+ "foo() [in Method [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]\n" +
+ "foo() [in Method [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]\n" +
+ "Method [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]\n" +
+ "foo() [in Method [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]\n" +
+ "Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]\n" +
+ "Method [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]\n" +
+ "foo() [in Method [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]",
elements
);
}
public void test19() throws JavaModelException {
- setUnit("Test.java",
+ setUnit("Test.js",
"/**\n" +
" * @see Test.Other\n" +
" */\n" +
@@ -610,18 +643,18 @@ public class SelectionJavadocModelTests extends AbstractJavaModelTests {
elements[4] = selectType(this.workingCopies[0], "Test", 4);
elements[5] = selectType(this.workingCopies[0], "Other", 3);
assertElementsEqual("Invalid selection(s)",
- "Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]\n" +
- "Other [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]\n" +
- "Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]\n" +
- "Other [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]\n" +
- "Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]\n" +
- "Other [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]",
+ "Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]\n" +
+ "Other [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]\n" +
+ "Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]\n" +
+ "Other [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]\n" +
+ "Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]\n" +
+ "Other [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]",
elements
);
}
public void test20() throws JavaModelException {
- setUnit("Test.java",
+ setUnit("Test.js",
"public class Test {\n" +
" void bar() {\n" +
" /**\n" +
@@ -645,17 +678,17 @@ public class SelectionJavadocModelTests extends AbstractJavaModelTests {
elements[4] = selectField(this.workingCopies[0], "foo", 3);
// Running test with Unix/Windows do not matter even if result includes positions as we use working copies
assertElementsEqual("Invalid selection(s)",
- "Field [in bar() [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]\n" +
- "foo [in Field [in bar() [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]]\n" +
- "foo [in Field [in bar() [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]]\n" +
- "Field [in bar() [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]\n" +
- "foo [in Field [in bar() [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]]",
+ "Field [in bar() [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]\n" +
+ "foo [in Field [in bar() [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]]\n" +
+ "foo [in Field [in bar() [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]]\n" +
+ "Field [in bar() [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]\n" +
+ "foo [in Field [in bar() [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]]",
elements
);
}
public void test21() throws JavaModelException {
- setUnit("Test.java",
+ setUnit("Test.js",
"public class Test {\n" +
" void bar() {\n" +
" /**\n" +
@@ -679,17 +712,17 @@ public class SelectionJavadocModelTests extends AbstractJavaModelTests {
elements[4] = selectMethod(this.workingCopies[0], "foo", 3);
// Running test with Unix/Windows do not matter even if result includes positions as we use working copies
assertElementsEqual("Invalid selection(s)",
- "Method [in bar() [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]\n" +
- "foo() [in Method [in bar() [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]]\n" +
- "foo() [in Method [in bar() [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]]\n" +
- "Method [in bar() [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]\n" +
- "foo() [in Method [in bar() [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]]",
+ "Method [in bar() [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]\n" +
+ "foo() [in Method [in bar() [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]]\n" +
+ "foo() [in Method [in bar() [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]]\n" +
+ "Method [in bar() [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]\n" +
+ "foo() [in Method [in bar() [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]]",
elements
);
}
public void test22() throws JavaModelException {
- setUnit("Test.java",
+ setUnit("Test.js",
"public class Test {\n" +
" void bar() {\n" +
" /**\n" +
@@ -705,14 +738,14 @@ public class SelectionJavadocModelTests extends AbstractJavaModelTests {
elements[1] = selectType(this.workingCopies[0], "Other");
// Running test with Unix/Windows do not matter even if result includes positions as we use working copies
assertElementsEqual("Invalid selection(s)",
- "Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]\n" +
- "Other [in bar() [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]",
+ "Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]\n" +
+ "Other [in bar() [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]",
elements
);
}
public void test23() throws JavaModelException {
- setUnit("Test.java",
+ setUnit("Test.js",
"public class Test {\n" +
" void bar() {\n" +
" new Object() {\n" +
@@ -738,17 +771,17 @@ public class SelectionJavadocModelTests extends AbstractJavaModelTests {
elements[4] = selectField(this.workingCopies[0], "foo", 3);
// Running test with Unix/Windows do not matter even if result includes positions as we use working copies
assertElementsEqual("Invalid selection(s)",
- "Field [in <anonymous #1> [in bar() [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]]\n" +
- "foo [in Field [in <anonymous #1> [in bar() [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]]]\n" +
- "foo [in Field [in <anonymous #1> [in bar() [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]]]\n" +
- "Field [in <anonymous #1> [in bar() [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]]\n" +
- "foo [in Field [in <anonymous #1> [in bar() [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]]]",
+ "Field [in <anonymous #1> [in bar() [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]]\n" +
+ "foo [in Field [in <anonymous #1> [in bar() [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]]]\n" +
+ "foo [in Field [in <anonymous #1> [in bar() [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]]]\n" +
+ "Field [in <anonymous #1> [in bar() [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]]\n" +
+ "foo [in Field [in <anonymous #1> [in bar() [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]]]",
elements
);
}
public void test24() throws JavaModelException {
- setUnit("Test.java",
+ setUnit("Test.js",
"public class Test {\n" +
" void bar() {\n" +
" new Object() {\n" +
@@ -774,17 +807,17 @@ public class SelectionJavadocModelTests extends AbstractJavaModelTests {
elements[4] = selectMethod(this.workingCopies[0], "foo", 3);
// Running test with Unix/Windows do not matter even if result includes positions as we use working copies
assertElementsEqual("Invalid selection(s)",
- "Method [in <anonymous #1> [in bar() [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]]\n" +
- "foo() [in Method [in <anonymous #1> [in bar() [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]]]\n" +
- "foo() [in Method [in <anonymous #1> [in bar() [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]]]\n" +
- "Method [in <anonymous #1> [in bar() [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]]\n" +
- "foo() [in Method [in <anonymous #1> [in bar() [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]]]",
+ "Method [in <anonymous #1> [in bar() [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]]\n" +
+ "foo() [in Method [in <anonymous #1> [in bar() [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]]]\n" +
+ "foo() [in Method [in <anonymous #1> [in bar() [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]]]\n" +
+ "Method [in <anonymous #1> [in bar() [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]]\n" +
+ "foo() [in Method [in <anonymous #1> [in bar() [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]]]",
elements
);
}
public void test25() throws JavaModelException {
- setUnit("Test.java",
+ setUnit("Test.js",
"public class Test {\n" +
" void bar() {\n" +
" new Object() {\n" +
@@ -802,14 +835,14 @@ public class SelectionJavadocModelTests extends AbstractJavaModelTests {
elements[1] = selectType(this.workingCopies[0], "Other");
// Running test with Unix/Windows do not matter even if result includes positions as we use working copies
assertElementsEqual("Invalid selection(s)",
- "Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]\n" +
- "Other [in <anonymous #1> [in bar() [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]]]",
+ "Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]\n" +
+ "Other [in <anonymous #1> [in bar() [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]]]",
elements
);
}
public void test26() throws JavaModelException {
- setUnit("Test.java",
+ setUnit("Test.js",
"public class Test {\n" +
" static int field;\n" +
" /** \n" +
@@ -824,9 +857,9 @@ public class SelectionJavadocModelTests extends AbstractJavaModelTests {
elements[1] = selectType(this.workingCopies[0], "Test");
elements[2] = selectField(this.workingCopies[0], "field");
assertElementsEqual("Invalid selection(s)",
- "field [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]\n" +
- "Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]\n" +
- "field [in Test [in [Working copy] Test.java [in <default> [in <project root> [in Tests]]]]]",
+ "field [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]\n" +
+ "Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]\n" +
+ "field [in Test [in [Working copy] Test.js [in <default> [in <project root> [in Tests]]]]]",
elements
);
}
@@ -838,7 +871,7 @@ public class SelectionJavadocModelTests extends AbstractJavaModelTests {
public void testBug86380() throws CoreException {
this.wcOwner = new WorkingCopyOwner() {};
workingCopies = new ICompilationUnit[2];
- workingCopies[0] = getWorkingCopy("/Tests/b86380/package-info.java",
+ workingCopies[0] = getWorkingCopy("/Tests/b86380/package-info.js",
"/**\n" +
" * Valid javadoc.\n" +
" * @see Test\n" +
@@ -855,7 +888,7 @@ public class SelectionJavadocModelTests extends AbstractJavaModelTests {
wcOwner,
null/*don't compute problems*/
);
- workingCopies[1] = getWorkingCopy("/Tests/b86380/Test.java",
+ workingCopies[1] = getWorkingCopy("/Tests/b86380/Test.js",
"/**\n" +
" * Invalid javadoc\n" +
" */\n" +
@@ -872,9 +905,9 @@ public class SelectionJavadocModelTests extends AbstractJavaModelTests {
elements[1] = selectMethod(this.workingCopies[0], "foo");
elements[2] = selectField(this.workingCopies[0], "field");
assertElementsEqual("Invalid selection(s)",
- "Test [in [Working copy] Test.java [in b86380 [in <project root> [in Tests]]]]\n" +
- "foo() [in Test [in [Working copy] Test.java [in b86380 [in <project root> [in Tests]]]]]\n" +
- "field [in Test [in [Working copy] Test.java [in b86380 [in <project root> [in Tests]]]]]",
+ "Test [in [Working copy] Test.js [in b86380 [in <project root> [in Tests]]]]\n" +
+ "foo() [in Test [in [Working copy] Test.js [in b86380 [in <project root> [in Tests]]]]]\n" +
+ "field [in Test [in [Working copy] Test.js [in b86380 [in <project root> [in Tests]]]]]",
elements
);
}
@@ -884,7 +917,7 @@ public class SelectionJavadocModelTests extends AbstractJavaModelTests {
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=90266"
*/
public void testBug90266_String() throws JavaModelException {
- setUnit("b90266/Test.java",
+ setUnit("b90266/Test.js",
"package b90266;\n" +
"public class Test {\n" +
" public int field;\n" +
@@ -897,12 +930,12 @@ public class SelectionJavadocModelTests extends AbstractJavaModelTests {
int[] selectionPositions = selectionInfo(workingCopies[0], "field", 2);
IJavaElement[] elements = workingCopies[0].codeSelect(selectionPositions[0], 0);
assertElementsEqual("Invalid selection(s)",
- "field [in Test [in [Working copy] Test.java [in b90266 [in <project root> [in Tests]]]]]",
+ "field [in Test [in [Working copy] Test.js [in b90266 [in <project root> [in Tests]]]]]",
elements
);
}
public void testBug90266_Char() throws JavaModelException {
- setUnit("b90266/Test.java",
+ setUnit("b90266/Test.js",
"package b90266;\n" +
"public class Test {\n" +
" public int field;\n" +
@@ -915,73 +948,72 @@ public class SelectionJavadocModelTests extends AbstractJavaModelTests {
int[] selectionPositions = selectionInfo(workingCopies[0], "field", 2);
IJavaElement[] elements = workingCopies[0].codeSelect(selectionPositions[0], 0);
assertElementsEqual("Invalid selection(s)",
- "field [in Test [in [Working copy] Test.java [in b90266 [in <project root> [in Tests]]]]]",
+ "field [in Test [in [Working copy] Test.js [in b90266 [in <project root> [in Tests]]]]]",
elements
);
}
-
/**
- * @bug 165701: [model] No hint for ambiguous javadoc
- * @test Ensure that no exception is thrown while selecting method in javadoc comment
- * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=165701"
- */
- public void testBug165701() throws JavaModelException {
- setUnit("b165701/Test.java",
- "package b165701;\n" +
- "/**\n" +
- " * @see #fooo(int)\n" +
- " */\n" +
- "public class Test {\n" +
- " public void foo() {}\n" +
- "}\n"
- );
- int[] selectionPositions = selectionInfo(workingCopies[0], "fooo", 1);
- IJavaElement[] elements = workingCopies[0].codeSelect(selectionPositions[0], 0);
- assertElementsEqual("Invalid selection(s)",
- "Test [in [Working copy] Test.java [in b165701 [in <project root> [in Tests]]]]",
- elements
- );
- }
-
- /**
- * @bug 165794: [model] No hint for ambiguous javadoc
- * @test Ensure that no exception is thrown while selecting method in javadoc comment
- * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=165794"
- */
- public void testBug165794() throws JavaModelException {
- setUnit("b165794/Test.java",
- "package b165794;\n" +
- "/**\n" +
- " * No reasonable hint for resolving the {@link #getMax(A)}.\n" +
- " */\n" +
- "public class X {\n" +
- " /**\n" +
- " * Extends Number method.\n" +
- " * @see #getMax(A ipZ)\n" +
- " */\n" +
- " public <T extends Y> T getMax(final A<T> ipY) {\n" +
- " return ipY.t();\n" +
- " }\n" +
- " \n" +
- " /**\n" +
- " * Extends Exception method.\n" +
- " * @see #getMax(A ipY)\n" +
- " */\n" +
- " public <T extends Z> T getMax(final A<T> ipZ) {\n" +
- " return ipZ.t();\n" +
- " }\n" +
- "}\n" +
- "class A<T> {\n" +
- " T t() { return null; }\n" +
- "}\n" +
- "class Y {}\n" +
- "class Z {}"
- );
- int[] selectionPositions = selectionInfo(workingCopies[0], "getMax", 1);
- IJavaElement[] elements = workingCopies[0].codeSelect(selectionPositions[0], 0);
- assertElementsEqual("Invalid selection(s)",
- "getMax(A<T>) [in X [in [Working copy] Test.java [in b165794 [in <project root> [in Tests]]]]]",
- elements
- );
- }
+ );
+ * @bug 165701: [model] No hint for ambiguous javadoc
+ * @test Ensure that no exception is thrown while selecting method in javadoc comment
+ * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=165701"
+ */
+public void testBug165701() throws JavaModelException {
+ setUnit("b165701/Test.js",
+ "package b165701;\n" +
+ "/**\n" +
+ " * @see #fooo(int)\n" +
+ " */\n" +
+ "public class Test {\n" +
+ " public void foo() {}\n" +
+ "}\n"
+ );
+ int[] selectionPositions = selectionInfo(workingCopies[0], "fooo", 1);
+ IJavaElement[] elements = workingCopies[0].codeSelect(selectionPositions[0], 0);
+ assertElementsEqual("Invalid selection(s)",
+ "Test [in [Working copy] Test.js [in b165701 [in <project root> [in Tests]]]]",
+ elements
+ );
}
+
+/**
+ * @bug 165794: [model] No hint for ambiguous javadoc
+ * @test Ensure that no exception is thrown while selecting method in javadoc comment
+ * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=165794"
+ */
+public void testBug165794() throws JavaModelException {
+ setUnit("b165794/Test.js",
+ "package b165794;\n" +
+ "/**\n" +
+ " * No reasonable hint for resolving the {@link #getMax(A)}.\n" +
+ " */\n" +
+ "public class X {\n" +
+ " /**\n" +
+ " * Extends Number method.\n" +
+ " * @see #getMax(A ipZ)\n" +
+ " */\n" +
+ " public <T extends Y> T getMax(final A<T> ipY) {\n" +
+ " return ipY.t();\n" +
+ " }\n" +
+ " \n" +
+ " /**\n" +
+ " * Extends Exception method.\n" +
+ " * @see #getMax(A ipY)\n" +
+ " */\n" +
+ " public <T extends Z> T getMax(final A<T> ipZ) {\n" +
+ " return ipZ.t();\n" +
+ " }\n" +
+ "}\n" +
+ "class A<T> {\n" +
+ " T t() { return null; }\n" +
+ "}\n" +
+ "class Y {}\n" +
+ "class Z {}"
+ );
+ int[] selectionPositions = selectionInfo(workingCopies[0], "getMax", 1);
+ IJavaElement[] elements = workingCopies[0].codeSelect(selectionPositions[0], 0);
+ assertElementsEqual("Invalid selection(s)",
+ "getMax(A<T>) [in X [in [Working copy] Test.js [in b165794 [in <project root> [in Tests]]]]]",
+ elements
+ );
+}}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SnippetCompletionContextTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SnippetCompletionContextTests.java
index dedf1d4..501656b 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SnippetCompletionContextTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SnippetCompletionContextTests.java
@@ -39,7 +39,7 @@ static {
public void test0001() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0001/X.java",
+ "/Completion/src3/test0001/X.js",
"package test0001;\n" +
"public class X {\n" +
" /**/\n" +
@@ -76,7 +76,7 @@ public void test0001() throws JavaModelException {
public void test0002() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0002/X.java",
+ "/Completion/src3/test0002/X.js",
"package test0002;\n" +
"public class X {\n" +
" /**/\n" +
@@ -113,7 +113,7 @@ public void test0002() throws JavaModelException {
public void test0003() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0003/X.java",
+ "/Completion/src3/test0003/X.js",
"package test0003;\n" +
"public class X {\n" +
" /**/\n" +
@@ -150,7 +150,7 @@ public void test0003() throws JavaModelException {
public void test0004() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.workingCopies[0] = getWorkingCopy(
- "/Completion/src3/test0004/X.java",
+ "/Completion/src3/test0004/X.js",
"package test0004;\n" +
"public class X {\n" +
" /**/\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SnippetCompletionTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SnippetCompletionTests.java
index 030d848..c370bc9 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SnippetCompletionTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SnippetCompletionTests.java
@@ -92,7 +92,7 @@ public void testCodeSnippetAssistForClassFile() throws JavaModelException {
public void testCodeSnippetAssistForCompilationUnit() throws JavaModelException {
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(false,false,true);
- ICompilationUnit cu = getCompilationUnit("SnippetCompletion", "src", "aa.bb.cc", "BClass.java");
+ ICompilationUnit cu = getCompilationUnit("SnippetCompletion", "src", "aa.bb.cc", "BClass.js");
IType type = cu.getTypes()[0];
String snippet =
"int varX;\n" +
@@ -160,7 +160,7 @@ public void testCodeSnippetAssistForClassFileWithSource() throws JavaModelExcept
public void testCodeSnippetAssistForCompilationUnitWithoutSource() throws JavaModelException {
CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(false,false,true);
- ICompilationUnit cu = getCompilationUnit("SnippetCompletion", "src", "aa.bb.cc", "BClass.java");
+ ICompilationUnit cu = getCompilationUnit("SnippetCompletion", "src", "aa.bb.cc", "BClass.js");
IType type = cu.getTypes()[0];
String snippet =
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SortCompilationUnitElementsTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SortCompilationUnitElementsTests.java
index 2e1ed7c..3437a06 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SortCompilationUnitElementsTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SortCompilationUnitElementsTests.java
@@ -167,7 +167,7 @@ public void tearDownSuite() throws Exception {
public void test001() throws CoreException {
try {
this.createFile(
- "/P/src/p/X.java", //$NON-NLS-1$
+ "/P/src/p/X.js", //$NON-NLS-1$
"/**\n" + //$NON-NLS-1$
" *\n" + //$NON-NLS-1$
" */\n" + //$NON-NLS-1$
@@ -254,15 +254,15 @@ public void test001() throws CoreException {
" void bar(int i) {\n" + //$NON-NLS-1$
" }\n" + //$NON-NLS-1$
"}\n";//$NON-NLS-1$
- sortUnit(this.getCompilationUnit("/P/src/p/X.java"), expectedResult); //$NON-NLS-1$
+ sortUnit(this.getCompilationUnit("/P/src/p/X.js"), expectedResult); //$NON-NLS-1$
} finally {
- this.deleteFile("/P/src/p/X.java"); //$NON-NLS-1$
+ this.deleteFile("/P/src/p/X.js"); //$NON-NLS-1$
}
}
public void test002() throws CoreException {
try {
this.createFile(
- "/P/src/p/X.java", //$NON-NLS-1$
+ "/P/src/p/X.js", //$NON-NLS-1$
"package p;\n" + //$NON-NLS-1$
"public class X {\n" + //$NON-NLS-1$
" \n" + //$NON-NLS-1$
@@ -320,9 +320,9 @@ public void test002() throws CoreException {
" return o;\n" + //$NON-NLS-1$
" }\n" + //$NON-NLS-1$
"}"; //$NON-NLS-1$
- sortUnit(this.getCompilationUnit("/P/src/p/X.java"), expectedSource); //$NON-NLS-1$
+ sortUnit(this.getCompilationUnit("/P/src/p/X.js"), expectedSource); //$NON-NLS-1$
} finally {
- this.deleteFile("/P/src/p/X.java"); //$NON-NLS-1$
+ this.deleteFile("/P/src/p/X.js"); //$NON-NLS-1$
}
}
/**
@@ -331,7 +331,7 @@ public void test002() throws CoreException {
public void test003() throws CoreException {
try {
this.createFile(
- "/P/src/p/X.java", //$NON-NLS-1$
+ "/P/src/p/X.js", //$NON-NLS-1$
"/**\n" + //$NON-NLS-1$
" *\n" + //$NON-NLS-1$
" */\n" + //$NON-NLS-1$
@@ -418,9 +418,9 @@ public void test003() throws CoreException {
" void bar(final int i[]) {\n" + //$NON-NLS-1$
" }\n" + //$NON-NLS-1$
"}\n"; //$NON-NLS-1$
- sortUnit(this.getCompilationUnit("/P/src/p/X.java"), expectedResult); //$NON-NLS-1$
+ sortUnit(this.getCompilationUnit("/P/src/p/X.js"), expectedResult); //$NON-NLS-1$
} finally {
- this.deleteFile("/P/src/p/X.java"); //$NON-NLS-1$
+ this.deleteFile("/P/src/p/X.js"); //$NON-NLS-1$
}
}
/**
@@ -429,7 +429,7 @@ public void test003() throws CoreException {
public void test004() throws CoreException {
try {
this.createFile(
- "/P/src/p/X.java", //$NON-NLS-1$
+ "/P/src/p/X.js", //$NON-NLS-1$
"/**\n" + //$NON-NLS-1$
" *\n" + //$NON-NLS-1$
" */\n" + //$NON-NLS-1$
@@ -501,15 +501,15 @@ public void test004() throws CoreException {
" }\n" + //$NON-NLS-1$
"\n" + //$NON-NLS-1$
"}\n"; //$NON-NLS-1$
- sortUnit(this.getCompilationUnit("/P/src/p/X.java"), expectedResult); //$NON-NLS-1$
+ sortUnit(this.getCompilationUnit("/P/src/p/X.js"), expectedResult); //$NON-NLS-1$
} finally {
- this.deleteFile("/P/src/p/X.java"); //$NON-NLS-1$
+ this.deleteFile("/P/src/p/X.js"); //$NON-NLS-1$
}
}
public void test005() throws CoreException {
try {
this.createFile(
- "/P/src/p/X.java", //$NON-NLS-1$
+ "/P/src/p/X.js", //$NON-NLS-1$
"package p;\n" + //$NON-NLS-1$
"public class X {\n" + //$NON-NLS-1$
" Object bar3() {\n" + //$NON-NLS-1$
@@ -529,15 +529,15 @@ public void test005() throws CoreException {
" return o;\n" + //$NON-NLS-1$
" }\n" + //$NON-NLS-1$
"}"; //$NON-NLS-1$
- sortUnit(this.getCompilationUnit("/P/src/p/X.java"), expectedResult); //$NON-NLS-1$
+ sortUnit(this.getCompilationUnit("/P/src/p/X.js"), expectedResult); //$NON-NLS-1$
} finally {
- this.deleteFile("/P/src/p/X.java"); //$NON-NLS-1$
+ this.deleteFile("/P/src/p/X.js"); //$NON-NLS-1$
}
}
public void test006() throws CoreException {
try {
this.createFile(
- "/P/src/p/X.java", //$NON-NLS-1$
+ "/P/src/p/X.js", //$NON-NLS-1$
"package p;\n" + //$NON-NLS-1$
"public class X {\n" + //$NON-NLS-1$
" Object bar3() {\n" + //$NON-NLS-1$
@@ -561,15 +561,15 @@ public void test006() throws CoreException {
" };\n" + //$NON-NLS-1$
" }\n" + //$NON-NLS-1$
"}"; //$NON-NLS-1$
- sortUnit(this.getCompilationUnit("/P/src/p/X.java"), expectedResult); //$NON-NLS-1$
+ sortUnit(this.getCompilationUnit("/P/src/p/X.js"), expectedResult); //$NON-NLS-1$
} finally {
- this.deleteFile("/P/src/p/X.java"); //$NON-NLS-1$
+ this.deleteFile("/P/src/p/X.js"); //$NON-NLS-1$
}
}
public void test007() throws CoreException {
try {
this.createFile(
- "/P/src/p/X.java", //$NON-NLS-1$
+ "/P/src/p/X.js", //$NON-NLS-1$
"package p;\n" + //$NON-NLS-1$
"public class X {\n" + //$NON-NLS-1$
" Object bar3() {\n" + //$NON-NLS-1$
@@ -593,16 +593,16 @@ public void test007() throws CoreException {
" };\n" + //$NON-NLS-1$
" }\n" + //$NON-NLS-1$
"}"; //$NON-NLS-1$
- sortUnit(this.getCompilationUnit("/P/src/p/X.java"), expectedResult); //$NON-NLS-1$
+ sortUnit(this.getCompilationUnit("/P/src/p/X.js"), expectedResult); //$NON-NLS-1$
} finally {
- this.deleteFile("/P/src/p/X.java"); //$NON-NLS-1$
+ this.deleteFile("/P/src/p/X.js"); //$NON-NLS-1$
}
}
public void test008() throws CoreException {
try {
this.createFile(
- "/P/src/p/X.java", //$NON-NLS-1$
+ "/P/src/p/X.js", //$NON-NLS-1$
"package p;\n" + //$NON-NLS-1$
"public class X {\n" + //$NON-NLS-1$
" Object bar3() {\n" + //$NON-NLS-1$
@@ -626,9 +626,9 @@ public void test008() throws CoreException {
" };\n" + //$NON-NLS-1$
" }\n" + //$NON-NLS-1$
"}"; //$NON-NLS-1$
- sortUnit(this.getCompilationUnit("/P/src/p/X.java"), expectedResult); //$NON-NLS-1$
+ sortUnit(this.getCompilationUnit("/P/src/p/X.js"), expectedResult); //$NON-NLS-1$
} finally {
- this.deleteFile("/P/src/p/X.java"); //$NON-NLS-1$
+ this.deleteFile("/P/src/p/X.js"); //$NON-NLS-1$
}
}
/**
@@ -637,7 +637,7 @@ public void test008() throws CoreException {
public void test009() throws CoreException {
try {
this.createFile(
- "/P/src/p/X.java", //$NON-NLS-1$
+ "/P/src/p/X.js", //$NON-NLS-1$
"/**\n" + //$NON-NLS-1$
" *\n" + //$NON-NLS-1$
" */\n" + //$NON-NLS-1$
@@ -727,16 +727,16 @@ public void test009() throws CoreException {
" void bar(int i) {\n" + //$NON-NLS-1$
" }\n" + //$NON-NLS-1$
"}\n"; //$NON-NLS-1$
- ICompilationUnit unit = this.getCompilationUnit("/P/src/p/X.java"); //$NON-NLS-1$
+ ICompilationUnit unit = this.getCompilationUnit("/P/src/p/X.js"); //$NON-NLS-1$
sortUnit(unit, expectedResult, false);
} finally {
- this.deleteFile("/P/src/p/X.java"); //$NON-NLS-1$
+ this.deleteFile("/P/src/p/X.js"); //$NON-NLS-1$
}
}
public void test010() throws CoreException {
try {
this.createFile(
- "/P/src/SuperReference.java", //$NON-NLS-1$
+ "/P/src/SuperReference.js", //$NON-NLS-1$
"public class SuperReference extends ThisReference {\r\n" + //$NON-NLS-1$
"public SuperReference(int sourceStart, int sourceEnd) {\r\n" + //$NON-NLS-1$
" super(sourceStart, sourceEnd);\r\n" + //$NON-NLS-1$
@@ -818,15 +818,15 @@ public void test010() throws CoreException {
" visitor.endVisit(this, blockScope);\r\n" + //$NON-NLS-1$
"}\r\n" + //$NON-NLS-1$
"}"; //$NON-NLS-1$
- sortUnit(this.getCompilationUnit("/P/src/SuperReference.java"), expectedResult); //$NON-NLS-1$
+ sortUnit(this.getCompilationUnit("/P/src/SuperReference.js"), expectedResult); //$NON-NLS-1$
} finally {
- this.deleteFile("/P/src/SuperReference.java"); //$NON-NLS-1$
+ this.deleteFile("/P/src/SuperReference.js"); //$NON-NLS-1$
}
}
public void test011() throws CoreException {
try {
this.createFile(
- "/P/src/p/BaseTypes.java", //$NON-NLS-1$
+ "/P/src/p/BaseTypes.js", //$NON-NLS-1$
"/*******************************************************************************\r\n" + //$NON-NLS-1$
" * Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others.\r\n" + //$NON-NLS-1$
" * All rights reserved. This program and the accompanying materials \r\n" + //$NON-NLS-1$
@@ -876,15 +876,15 @@ public void test011() throws CoreException {
" final BaseTypeBinding ShortBinding = new BaseTypeBinding(TypeIds.T_short, \"short\".toCharArray(), new char[] {'S'}); //$NON-NLS-1$\r\n" + //$NON-NLS-1$
" final BaseTypeBinding VoidBinding = new BaseTypeBinding(TypeIds.T_void, \"void\".toCharArray(), new char[] {'V'}); //$NON-NLS-1$\r\n" + //$NON-NLS-1$
"}\r\n"; //$NON-NLS-1$
- sortUnit(this.getCompilationUnit("/P/src/p/BaseTypes.java"), expectedResult); //$NON-NLS-1$
+ sortUnit(this.getCompilationUnit("/P/src/p/BaseTypes.js"), expectedResult); //$NON-NLS-1$
} finally {
- this.deleteFile("/P/src/p/BaseTypes.java"); //$NON-NLS-1$
+ this.deleteFile("/P/src/p/BaseTypes.js"); //$NON-NLS-1$
}
}
public void test012() throws CoreException {
try {
this.createFile(
- "/P/src/p/X.java", //$NON-NLS-1$
+ "/P/src/p/X.js", //$NON-NLS-1$
"package p;\n" + //$NON-NLS-1$
"public class X {\n" + //$NON-NLS-1$
" \n" + //$NON-NLS-1$
@@ -922,16 +922,16 @@ public void test012() throws CoreException {
" return new C();\n" + //$NON-NLS-1$
" }\n" + //$NON-NLS-1$
"}"; //$NON-NLS-1$
- sortUnit(this.getCompilationUnit("/P/src/p/X.java"), expectedSource); //$NON-NLS-1$
+ sortUnit(this.getCompilationUnit("/P/src/p/X.js"), expectedSource); //$NON-NLS-1$
} finally {
- this.deleteFile("/P/src/p/X.java"); //$NON-NLS-1$
+ this.deleteFile("/P/src/p/X.js"); //$NON-NLS-1$
}
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=40954
public void test013() throws CoreException {
try {
this.createFile(
- "/P/src/p/X.java", //$NON-NLS-1$
+ "/P/src/p/X.js", //$NON-NLS-1$
"package p;\n" + //$NON-NLS-1$
"public class X {\n" + //$NON-NLS-1$
" X bar() {\n" + //$NON-NLS-1$
@@ -955,9 +955,9 @@ public void test013() throws CoreException {
" };\n" + //$NON-NLS-1$
" }\n" + //$NON-NLS-1$
"}"; //$NON-NLS-1$
- sortUnit(this.getCompilationUnit("/P/src/p/X.java"), expectedSource); //$NON-NLS-1$
+ sortUnit(this.getCompilationUnit("/P/src/p/X.js"), expectedSource); //$NON-NLS-1$
} finally {
- this.deleteFile("/P/src/p/X.java"); //$NON-NLS-1$
+ this.deleteFile("/P/src/p/X.js"); //$NON-NLS-1$
}
}
/**
@@ -966,7 +966,7 @@ public void test013() throws CoreException {
public void test014() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int j;\n" +
" \n" +
@@ -981,9 +981,9 @@ public void test014() throws CoreException {
" \n" +
" int j;\n" +
"}";
- sortUnit(this.getCompilationUnit("/P/src/X.java"), expectedResult);
+ sortUnit(this.getCompilationUnit("/P/src/X.js"), expectedResult);
} finally {
- this.deleteFile("/P/src/X.java");
+ this.deleteFile("/P/src/X.js");
}
}
/**
@@ -992,7 +992,7 @@ public void test014() throws CoreException {
public void test015() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" int j;\n" +
" \n" +
@@ -1011,9 +1011,9 @@ public void test015() throws CoreException {
" \n" +
" int j;\n" +
"}";
- sortUnit(this.getCompilationUnit("/P/src/X.java"), expectedResult);
+ sortUnit(this.getCompilationUnit("/P/src/X.js"), expectedResult);
} finally {
- this.deleteFile("/P/src/X.java");
+ this.deleteFile("/P/src/X.js");
}
}
/**
@@ -1022,7 +1022,7 @@ public void test015() throws CoreException {
public void test016() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" \n" +
" public void c() {\n" +
@@ -1095,9 +1095,9 @@ public void test016() throws CoreException {
" \n" +
" }\n" +
"}";
- sortUnit(this.getCompilationUnit("/P/src/X.java"), expectedResult);
+ sortUnit(this.getCompilationUnit("/P/src/X.js"), expectedResult);
} finally {
- this.deleteFile("/P/src/X.java");
+ this.deleteFile("/P/src/X.js");
}
}
/**
@@ -1106,7 +1106,7 @@ public void test016() throws CoreException {
public void test017() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" \n" +
" public void c() {\n" +
@@ -1179,15 +1179,15 @@ public void test017() throws CoreException {
" \n" +
" }\n" +
"}";
- sortUnit(this.getCompilationUnit("/P/src/X.java"), expectedResult);
+ sortUnit(this.getCompilationUnit("/P/src/X.js"), expectedResult);
} finally {
- this.deleteFile("/P/src/X.java");
+ this.deleteFile("/P/src/X.js");
}
}
public void test018() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" public void c() {\n" +
" }\n" +
@@ -1204,16 +1204,16 @@ public void test018() throws CoreException {
" public void c() {\n" +
" }\n" +
"}";
- sortUnit(this.getCompilationUnit("/P/src/X.java"), expectedResult);
+ sortUnit(this.getCompilationUnit("/P/src/X.js"), expectedResult);
} finally {
- this.deleteFile("/P/src/X.java");
+ this.deleteFile("/P/src/X.js");
}
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=80036
public void test019() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public enum X {\n" +
" Z, A, C, B;\n" +
"}"
@@ -1222,16 +1222,16 @@ public void test019() throws CoreException {
"public enum X {\n" +
" A, B, C, Z;\n" +
"}";
- sortUnit(AST.JLS3, this.getCompilationUnit("/P/src/X.java"), expectedResult);
+ sortUnit(AST.JLS3, this.getCompilationUnit("/P/src/X.js"), expectedResult);
} finally {
- this.deleteFile("/P/src/X.java");
+ this.deleteFile("/P/src/X.js");
}
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=80036
public void test020() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public enum X {\n" +
" A , B, C;\n" +
" \n" +
@@ -1252,16 +1252,16 @@ public void test020() throws CoreException {
" \n" +
" }\n" +
"}";
- sortUnit(AST.JLS3, this.getCompilationUnit("/P/src/X.java"), expectedResult);
+ sortUnit(AST.JLS3, this.getCompilationUnit("/P/src/X.js"), expectedResult);
} finally {
- this.deleteFile("/P/src/X.java");
+ this.deleteFile("/P/src/X.js");
}
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=80036
public void test021() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
"\n" +
" public enum Suit {\n" +
@@ -1298,16 +1298,16 @@ public void test021() throws CoreException {
" \n" +
" public void method2() { }\n" +
"}";
- sortUnit(AST.JLS3, this.getCompilationUnit("/P/src/X.java"), expectedResult);
+ sortUnit(AST.JLS3, this.getCompilationUnit("/P/src/X.js"), expectedResult);
} finally {
- this.deleteFile("/P/src/X.java");
+ this.deleteFile("/P/src/X.js");
}
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=80036
public void test022() throws CoreException {
try {
this.createFile(
- "/P/src/BuildUtilities.java",
+ "/P/src/BuildUtilities.js",
"/*******************************************************************************" +
" * Copyright (c) 2000, 2006 IBM Corporation and others." +
" * All rights reserved. This program and the accompanying materials" +
@@ -1644,16 +1644,16 @@ public void test022() throws CoreException {
" private BuildUtilities() {\n" +
" }\n" +
"}";
- sortUnit(this.getCompilationUnit("/P/src/BuildUtilities.java"), expectedResult);
+ sortUnit(this.getCompilationUnit("/P/src/BuildUtilities.js"), expectedResult);
} finally {
- this.deleteFile("/P/src/BuildUtilities.java");
+ this.deleteFile("/P/src/BuildUtilities.js");
}
}
// Sorting annotation type declaration
public void test023() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public @interface X {\n" +
" String name();\n" +
" int id() default 0;\n" +
@@ -1670,16 +1670,16 @@ public void test023() throws CoreException {
" int id() default 0;\n" +
" String name();\n" +
"}";
- sortUnit(AST.JLS3, this.getCompilationUnit("/P/src/X.java"), expectedResult);
+ sortUnit(AST.JLS3, this.getCompilationUnit("/P/src/X.js"), expectedResult);
} finally {
- this.deleteFile("/P/src/X.java");
+ this.deleteFile("/P/src/X.js");
}
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=81329
public void test024() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void foo() {\n" +
" class Local {\n" +
@@ -1704,16 +1704,16 @@ public void test024() throws CoreException {
" }\n" +
" }\n" +
"}";
- sortUnit(AST.JLS3, this.getCompilationUnit("/P/src/X.java"), expectedResult);
+ sortUnit(AST.JLS3, this.getCompilationUnit("/P/src/X.js"), expectedResult);
} finally {
- this.deleteFile("/P/src/X.java");
+ this.deleteFile("/P/src/X.js");
}
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=81329
public void test025() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"interface Jpf {\n" +
" @interface Action {\n" +
" ValidatableProperty[] validatableProperties();\n" +
@@ -1756,16 +1756,16 @@ public void test025() throws CoreException {
" return null;\n" +
" }\n" +
"}";
- sortUnit(AST.JLS3, this.getCompilationUnit("/P/src/X.java"), expectedResult);
+ sortUnit(AST.JLS3, this.getCompilationUnit("/P/src/X.js"), expectedResult);
} finally {
- this.deleteFile("/P/src/X.java");
+ this.deleteFile("/P/src/X.js");
}
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=95388
public void test026() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X {\n" +
" void z() {\n" +
" }\n" +
@@ -1792,16 +1792,16 @@ public void test026() throws CoreException {
" void z() {\n" +
" }\n" +
"}";
- sortUnit(this.getCompilationUnit("/P/src/X.java"), expectedResult);
+ sortUnit(this.getCompilationUnit("/P/src/X.js"), expectedResult);
} finally {
- this.deleteFile("/P/src/X.java");
+ this.deleteFile("/P/src/X.js");
}
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=96583
public void test027() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public final class X\n" +
"{\n" +
" static\n" +
@@ -1836,9 +1836,9 @@ public void test027() throws CoreException {
" {\n" +
" }\n" +
"}";
- sortUnit(this.getCompilationUnit("/P/src/X.java"), expectedResult);
+ sortUnit(this.getCompilationUnit("/P/src/X.js"), expectedResult);
} finally {
- this.deleteFile("/P/src/X.java");
+ this.deleteFile("/P/src/X.js");
}
}
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=101453
@@ -1846,7 +1846,7 @@ public void test027() throws CoreException {
public void test028() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public final class X\n" +
"{\n" +
"/** JavaDoc comment2 */\n" +
@@ -1863,7 +1863,7 @@ public void test028() throws CoreException {
"/** JavaDoc comment2 */\n" +
"int j;\n" +
"}";
- oldAPISortUnit(this.getCompilationUnit("/P/src/X.java"), expectedResult, false, new Comparator() {
+ oldAPISortUnit(this.getCompilationUnit("/P/src/X.js"), expectedResult, false, new Comparator() {
public int compare(Object o1, Object o2) {
BodyDeclaration bodyDeclaration1 = (BodyDeclaration) o1;
BodyDeclaration bodyDeclaration2 = (BodyDeclaration) o2;
@@ -1878,14 +1878,14 @@ public void test028() throws CoreException {
}
});
} finally {
- this.deleteFile("/P/src/X.java");
+ this.deleteFile("/P/src/X.js");
}
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=101885
public void test029() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public enum X {\n" +
" Z, A, C, B;\n" +
"}"
@@ -1894,7 +1894,7 @@ public void test029() throws CoreException {
"public enum X {\n" +
" Z, A, C, B;\n" +
"}";
- sortUnit(AST.JLS3, this.getCompilationUnit("/P/src/X.java"), expectedResult, false, new Comparator() {
+ sortUnit(AST.JLS3, this.getCompilationUnit("/P/src/X.js"), expectedResult, false, new Comparator() {
public int compare(Object o1, Object o2) {
BodyDeclaration bodyDeclaration1 = (BodyDeclaration) o1;
BodyDeclaration bodyDeclaration2 = (BodyDeclaration) o2;
@@ -1904,14 +1904,14 @@ public void test029() throws CoreException {
}
});
} finally {
- this.deleteFile("/P/src/X.java");
+ this.deleteFile("/P/src/X.js");
}
}
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=113722
public void test030() throws CoreException {
try {
this.createFile(
- "/P/src/I.java",
+ "/P/src/I.js",
"public interface I<T> {\n" +
" public I<T> foo(A<T> A);\n" +
" public <S> I<S> foo2(C<T,S> c);\n" +
@@ -1932,16 +1932,16 @@ public void test030() throws CoreException {
" public <K> I<K<K,T> bar3(C<T,K> c);\n" +
" public <K,E> I<K<K,E> bar3(C<T,K> c, C<T,E> c2);\n" +
"}";
- sortUnit(AST.JLS3, this.getCompilationUnit("/P/src/I.java"), expectedResult);
+ sortUnit(AST.JLS3, this.getCompilationUnit("/P/src/I.js"), expectedResult);
} finally {
- this.deleteFile("/P/src/I.java");
+ this.deleteFile("/P/src/I.js");
}
}
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=113722
public void test031() throws CoreException {
try {
this.createFile(
- "/P/src/I.java",
+ "/P/src/I.js",
"public interface I<T> {\n" +
" public I<T> foo(A<T> A);\n" +
" public <S> I<S> foo2(C<T,S> c);\n" +
@@ -1962,16 +1962,16 @@ public void test031() throws CoreException {
" public <S> I<S> foo3(C<T,I<S>> c);\n" +
" public I<T> foo(A<T> A);\n" +
"}";
- sortUnit(AST.JLS3, this.getCompilationUnit("/P/src/I.java"), expectedResult);
+ sortUnit(AST.JLS3, this.getCompilationUnit("/P/src/I.js"), expectedResult);
} finally {
- this.deleteFile("/P/src/I.java");
+ this.deleteFile("/P/src/I.js");
}
}
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=113722
public void test032() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"import java.util.*;\n" +
"public interface X<T> {\n" +
" <K> List<Map<K,T> foo(Map<T,K> m);\n" +
@@ -1984,9 +1984,9 @@ public void test032() throws CoreException {
" <K> List<Map<K,T> foo(Map<T,K> m);\n" +
" <K,E> List<Map<K,E> bar(Map<T,K> m, Map<T,E> e);\n" +
"}";
- sortUnit(AST.JLS3, this.getCompilationUnit("/P/src/X.java"), expectedResult);
+ sortUnit(AST.JLS3, this.getCompilationUnit("/P/src/X.js"), expectedResult);
} finally {
- this.deleteFile("/P/src/X.java");
+ this.deleteFile("/P/src/X.js");
}
}
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=171066
@@ -1995,7 +1995,7 @@ public void test033() throws CoreException {
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public enum X {\n" +
" Z, A, C, B;\n" +
"}"
@@ -2004,7 +2004,7 @@ public void test033() throws CoreException {
"public enum X {\n" +
" A, B, C, Z;\n" +
"}";
- unit = this.getCompilationUnit("/P/src/X.java");
+ unit = this.getCompilationUnit("/P/src/X.js");
unit.becomeWorkingCopy(null, null);
String source = unit.getSource();
Document document = new Document(source);
@@ -2041,7 +2041,7 @@ public void test033() throws CoreException {
}
assertEquals("Different output", expectedResult, document.get());
} finally {
- this.deleteFile("/P/src/X.java");
+ this.deleteFile("/P/src/X.js");
if (unit != null) {
unit.discardWorkingCopy();
}
@@ -2052,12 +2052,12 @@ public void test034() throws CoreException {
ICompilationUnit unit = null;
try {
this.createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public enum X {\n" +
" Z, A, C, B;\n" +
"}"
);
- unit = this.getCompilationUnit("/P/src/X.java");
+ unit = this.getCompilationUnit("/P/src/X.js");
unit.becomeWorkingCopy(null, null);
CompilerOptions options = new CompilerOptions(unit.getJavaProject().getOptions(true));
ASTParser parser = ASTParser.newParser(AST.JLS3);
@@ -2079,7 +2079,7 @@ public void test034() throws CoreException {
TextEdit edit = CompilationUnitSorter.sort(ast , comparator, 0, null, new NullProgressMonitor());
assertNull("Should be null", edit);
} finally {
- this.deleteFile("/P/src/X.java");
+ this.deleteFile("/P/src/X.js");
if (unit != null) {
unit.discardWorkingCopy();
}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ThreadSafetyTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ThreadSafetyTests.java
index b7f3d3b..0a2e724 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ThreadSafetyTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ThreadSafetyTests.java
@@ -77,8 +77,8 @@ public void testDeadlock01() throws CoreException {
System.out.println(Thread.currentThread() + " got workspace lock");
step1.release();
step2.acquire(); // ensure the java model lock is taken
- ThreadSafetyTests.this.createFile("/P/X.java", "public class X {}");
- System.out.println(Thread.currentThread() + " created file X.java");
+ ThreadSafetyTests.this.createFile("/P/X.js", "public class X {}");
+ System.out.println(Thread.currentThread() + " created file X.js");
}
}, null);
} catch (CoreException e) {
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchyNotificationTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchyNotificationTests.java
index c93b7b0..de7c279 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchyNotificationTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchyNotificationTests.java
@@ -121,7 +121,7 @@ public void testAddAnonymousInRegion() throws CoreException {
ITypeHierarchy h = null;
ICompilationUnit copy = null;
try {
- copy = getCompilationUnit("TypeHierarchyNotification", "src", "p3", "A.java");
+ copy = getCompilationUnit("TypeHierarchyNotification", "src", "p3", "A.js");
copy.becomeWorkingCopy(null, null);
IRegion region = JavaCore.newRegion();
@@ -156,7 +156,7 @@ public void testAddAnonymousInRegion() throws CoreException {
*/
public void testAddCompilationUnit1() throws CoreException {
IJavaProject javaProject = getJavaProject("TypeHierarchyNotification");
- ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.js");
IType type= cu.getType("X");
ITypeHierarchy h = type.newTypeHierarchy(javaProject, null);
h.addTypeHierarchyChangedListener(this);
@@ -164,7 +164,7 @@ public void testAddCompilationUnit1() throws CoreException {
// a cu with no types part of the hierarchy
IPackageFragment pkg = getPackageFragment("TypeHierarchyNotification", "src", "p");
ICompilationUnit newCU1 = pkg.createCompilationUnit(
- "Z1.java",
+ "Z1.js",
"package p;\n" +
"\n" +
"public class Z1 {\n" +
@@ -190,7 +190,7 @@ public void testAddCompilationUnit1() throws CoreException {
*/
public void testAddCompilationUnit2() throws CoreException {
IJavaProject javaProject = getJavaProject("TypeHierarchyNotification");
- ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.js");
IType type= cu.getType("X");
ITypeHierarchy h = type.newTypeHierarchy(javaProject, null);
h.addTypeHierarchyChangedListener(this);
@@ -198,7 +198,7 @@ public void testAddCompilationUnit2() throws CoreException {
// a cu with a top level type which is part of the hierarchy
IPackageFragment pkg = getPackageFragment("TypeHierarchyNotification", "src", "p");
ICompilationUnit newCU2 = pkg.createCompilationUnit(
- "Z2.java",
+ "Z2.js",
"package p;\n" +
"\n" +
"public class Z2 extends e.E {\n" +
@@ -209,7 +209,7 @@ public void testAddCompilationUnit2() throws CoreException {
assertCreation(newCU2);
this.assertOneChange(h);
h.refresh(null);
- IType eE = getCompilationUnit("TypeHierarchyNotification", "src", "e", "E.java").getType("E");
+ IType eE = getCompilationUnit("TypeHierarchyNotification", "src", "e", "E.js").getType("E");
IType[] subtypes = h.getSubtypes(eE);
assertTrue("Should be one subtype of e.E", subtypes.length == 1);
assertEquals("Subtype of e.E should be p.Z2", newCU2.getType("Z2"), subtypes[0]);
@@ -225,7 +225,7 @@ public void testAddCompilationUnit2() throws CoreException {
*/
public void testAddCompilationUnit3() throws CoreException {
IJavaProject javaProject = getJavaProject("TypeHierarchyNotification");
- ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.js");
IType type= cu.getType("X");
ITypeHierarchy h = type.newTypeHierarchy(javaProject, null);
h.addTypeHierarchyChangedListener(this);
@@ -233,7 +233,7 @@ public void testAddCompilationUnit3() throws CoreException {
// a cu with an inner type which is part of the hierarchy
IPackageFragment pkg = getPackageFragment("TypeHierarchyNotification", "src", "p");
ICompilationUnit newCU3 = pkg.createCompilationUnit(
- "Z3.java",
+ "Z3.js",
"package p;\n" +
"\n" +
"public class Z3 {\n" +
@@ -246,7 +246,7 @@ public void testAddCompilationUnit3() throws CoreException {
assertCreation(newCU3);
this.assertOneChange(h);
h.refresh(null);
- IType dD = getCompilationUnit("TypeHierarchyNotification", "src", "d", "D.java").getType("D");
+ IType dD = getCompilationUnit("TypeHierarchyNotification", "src", "d", "D.js").getType("D");
IType[] subtypes = h.getSubtypes(dD);
assertTrue("Should be one subtype of d.D", subtypes.length == 1);
assertEquals("Subtype of d.D should be p.Z3.InnerZ", newCU3.getType("Z3").getType("InnerZ"), subtypes[0]);
@@ -271,7 +271,7 @@ public void testAddCompilationUnitInRegion() throws CoreException, IOException {
// a cu with no types part of the region
IPackageFragment pkg = getPackageFragment("TypeHierarchyDependent", "", "");
ICompilationUnit newCU1 = pkg.createCompilationUnit(
- "Z1.java",
+ "Z1.js",
"\n" +
"public class Z1 {\n" +
"\n" +
@@ -293,7 +293,7 @@ public void testAddCompilationUnitInRegion() throws CoreException, IOException {
// a cu with a type which is part of the region and is a subtype of an existing type of the region
pkg = getPackageFragment("TypeHierarchyNotification", "src", "p");
ICompilationUnit newCU2 = pkg.createCompilationUnit(
- "Z2.java",
+ "Z2.js",
"package p;\n" +
"\n" +
"public class Z2 extends e.E {\n" +
@@ -304,7 +304,7 @@ public void testAddCompilationUnitInRegion() throws CoreException, IOException {
assertCreation(newCU2);
this.assertOneChange(h);
h.refresh(null);
- IType eE = getCompilationUnit("TypeHierarchyNotification", "src", "e", "E.java").getType("E");
+ IType eE = getCompilationUnit("TypeHierarchyNotification", "src", "e", "E.js").getType("E");
IType[] subtypes = h.getSubtypes(eE);
assertTrue("Should be one subtype of e.E", subtypes.length == 1);
assertEquals("Subtype of e.E should be p.Z2", newCU2.getType("Z2"), subtypes[0]);
@@ -317,7 +317,7 @@ public void testAddCompilationUnitInRegion() throws CoreException, IOException {
// a cu with a type which is part of the region and is not a sub type of an existing type of the region
ICompilationUnit newCU3 = pkg.createCompilationUnit(
- "Z3.java",
+ "Z3.js",
"package p;\n" +
"\n" +
"public class Z3 extends Throwable {\n" +
@@ -347,14 +347,14 @@ public void testAddCompilationUnitInRegion() throws CoreException, IOException {
*/
public void testAddExternalCompilationUnit() throws CoreException {
IJavaProject javaProject = getJavaProject("TypeHierarchyNotification");
- ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.js");
IType type= cu.getType("X");
ITypeHierarchy h = type.newTypeHierarchy(javaProject, null);
h.addTypeHierarchyChangedListener(this);
IPackageFragment pkg = getPackageFragment("TypeHierarchyNotification", "src", "p.other");
ICompilationUnit newCU= pkg.createCompilationUnit(
- "Z.java",
+ "Z.js",
"package p.other;\n" +
"\n" +
"public class Z {\n" +
@@ -379,7 +379,7 @@ public void testAddExternalCompilationUnit() throws CoreException {
*/
public void testAddExternalPackage() throws CoreException {
IJavaProject javaProject = getJavaProject("TypeHierarchyNotification");
- ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.js");
IType type= cu.getType("X");
ITypeHierarchy h = type.newTypeHierarchy(javaProject, null);
@@ -409,7 +409,7 @@ public void testAddExternalPackage() throws CoreException {
*/
public void testAddExternalProject() throws CoreException {
IJavaProject project= getJavaProject("TypeHierarchyNotification");
- ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.js");
IType type = cu.getType("X");
ITypeHierarchy h = type.newTypeHierarchy(project, null);
h.addTypeHierarchyChangedListener(this);
@@ -428,8 +428,8 @@ public void testAddExternalProject() throws CoreException {
*/
public void testAddListenerTwice() throws CoreException {
IJavaProject project = getJavaProject("TypeHierarchyNotification");
- ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java");
- ICompilationUnit superCU = getCompilationUnit("TypeHierarchyNotification", "src", "b", "B.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.js");
+ ICompilationUnit superCU = getCompilationUnit("TypeHierarchyNotification", "src", "b", "B.js");
IType type = cu.getType("X");
ITypeHierarchy h = type.newTypeHierarchy(project, null);
@@ -450,7 +450,7 @@ public void testAddListenerTwice() throws CoreException {
*/
public void testAddPackage() throws CoreException {
IJavaProject javaProject = getJavaProject("TypeHierarchyNotification");
- ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.js");
IType type= cu.getType("X");
ITypeHierarchy h = type.newTypeHierarchy(javaProject, null);
h.addTypeHierarchyChangedListener(this);
@@ -470,7 +470,7 @@ public void testAddPackage() throws CoreException {
*/
public void testAddPackageFragmentRoot() throws CoreException {
IJavaProject project = getJavaProject("TypeHierarchyNotification");
- ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.js");
IType type= cu.getType("X");
ITypeHierarchy h = type.newTypeHierarchy(project, null);
h.addTypeHierarchyChangedListener(this);
@@ -502,7 +502,7 @@ public void testAddPackageFragmentRoot() throws CoreException {
*/
public void testAddProject() throws CoreException {
IJavaProject project= getJavaProject("TypeHierarchyNotification");
- ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.js");
IType type = cu.getType("X");
ITypeHierarchy h = type.newTypeHierarchy(project, null);
h.addTypeHierarchyChangedListener(this);
@@ -544,7 +544,7 @@ public void testAddProject() throws CoreException {
public void testAddRemoveClassFile() throws CoreException {
// Create type hierarchy on 'java.lang.LinkageError' in 'Minimal.zip'
IJavaProject project = getJavaProject("TypeHierarchyNotification");
- ICompilationUnit unit = getCompilationUnit("TypeHierarchyNotification", "src", "p", "MyError.java");
+ ICompilationUnit unit = getCompilationUnit("TypeHierarchyNotification", "src", "p", "MyError.js");
IType type = unit.getType("MyError");
ITypeHierarchy h = type.newTypeHierarchy(project, null);
h.addTypeHierarchyChangedListener(this);
@@ -593,12 +593,12 @@ public void testChangeFocusModifier() throws CoreException {
createJavaProject("P1");
createFolder("/P1/p");
createFile(
- "/P1/p/X.java",
+ "/P1/p/X.js",
"package p1;\n" +
"public class X {\n" +
"}"
);
- workingCopy = getCompilationUnit("/P1/p/X.java");
+ workingCopy = getCompilationUnit("/P1/p/X.js");
workingCopy.becomeWorkingCopy(null/*no pb requestor*/, null/*no progress*/);
h = workingCopy.getType("X").newTypeHierarchy(null);
h.addTypeHierarchyChangedListener(this);
@@ -626,7 +626,7 @@ public void testChangeFocusModifier() throws CoreException {
*/
public void testCloseProject() throws Exception {
IJavaProject javaProject = getJavaProject("TypeHierarchyNotification");
- ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.js");
IType type= cu.getType("X");
ITypeHierarchy h = type.newTypeHierarchy(javaProject, null);
h.addTypeHierarchyChangedListener(this);
@@ -644,7 +644,7 @@ public void testCloseProject() throws Exception {
*/
public void testEditExtendsSourceType() throws CoreException {
IJavaProject javaProject = getJavaProject("TypeHierarchyNotification");
- ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.js");
IType type= cu.getType("X");
ITypeHierarchy h = type.newTypeHierarchy(javaProject, null);
h.addTypeHierarchyChangedListener(this);
@@ -669,12 +669,12 @@ public void testAddDependentProject() throws CoreException {
createJavaProject("P1");
createFolder("/P1/p");
createFile(
- "/P1/p/X.java",
+ "/P1/p/X.js",
"package p1;\n" +
"public class X {\n" +
"}"
);
- h = getCompilationUnit("/P1/p/X.java").getType("X").newTypeHierarchy(null);
+ h = getCompilationUnit("/P1/p/X.js").getType("X").newTypeHierarchy(null);
h.addTypeHierarchyChangedListener(this);
createJavaProject("P2", new String[] {""}, new String[0], new String[] {"/P1"}, "");
assertOneChange(h);
@@ -690,7 +690,7 @@ public void testAddDependentProject() throws CoreException {
*/
public void testAddExtendsSourceType1() throws CoreException {
IJavaProject javaProject = getJavaProject("TypeHierarchyNotification");
- ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p2", "A.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p2", "A.js");
IType type= cu.getType("A");
ITypeHierarchy h = type.newTypeHierarchy(javaProject, null);
h.addTypeHierarchyChangedListener(this);
@@ -712,7 +712,7 @@ public void testAddExtendsSourceType2() throws CoreException {
ITypeHierarchy h = null;
ICompilationUnit copy = null;
try {
- copy = getCompilationUnit("TypeHierarchyNotification", "src", "p2", "A.java");
+ copy = getCompilationUnit("TypeHierarchyNotification", "src", "p2", "A.js");
copy.becomeWorkingCopy(null, null);
IRegion region = JavaCore.newRegion();
@@ -751,11 +751,11 @@ public void testAddExtendsSourceType2() throws CoreException {
*/
public void testAddExtendsSourceType3() throws CoreException {
IJavaProject javaProject = getJavaProject("TypeHierarchyNotification");
- ICompilationUnit copy = getCompilationUnit("TypeHierarchyNotification", "src", "p2", "B.java");
+ ICompilationUnit copy = getCompilationUnit("TypeHierarchyNotification", "src", "p2", "B.js");
ITypeHierarchy h = null;
try {
copy.becomeWorkingCopy(null, null);
- h = getCompilationUnit("TypeHierarchyNotification", "src", "p2", "A.java").getType("A").newTypeHierarchy(javaProject, null);
+ h = getCompilationUnit("TypeHierarchyNotification", "src", "p2", "A.js").getType("A").newTypeHierarchy(javaProject, null);
h.addTypeHierarchyChangedListener(this);
// add p2.A as the superclass of p2.B
@@ -784,12 +784,12 @@ public void testAddExtendsSourceType3() throws CoreException {
*/
public void testEditExternalSourceType() throws CoreException {
IJavaProject javaProject = getJavaProject("TypeHierarchyNotification");
- ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.js");
IType type= cu.getType("X");
ITypeHierarchy h = type.newTypeHierarchy(javaProject, null);
h.addTypeHierarchyChangedListener(this);
- ICompilationUnit cu2= getCompilationUnit("TypeHierarchyNotification", "src", "p", "External.java");
+ ICompilationUnit cu2= getCompilationUnit("TypeHierarchyNotification", "src", "p", "External.js");
IField field= cu2.getType("External").getField("field");
try {
field.delete(false, null);
@@ -804,7 +804,7 @@ public void testEditExternalSourceType() throws CoreException {
*/
public void testEditFieldSourceType() throws CoreException {
IJavaProject javaProject = getJavaProject("TypeHierarchyNotification");
- ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.js");
IType type= cu.getType("X");
ITypeHierarchy h = type.newTypeHierarchy(javaProject, null);
h.addTypeHierarchyChangedListener(this);
@@ -829,7 +829,7 @@ public void testEditFieldSourceType() throws CoreException {
*/
public void testEditImportSourceType() throws CoreException {
IJavaProject javaProject = getJavaProject("TypeHierarchyNotification");
- ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.js");
IType type = cu.getType("X");
ITypeHierarchy h = type.newTypeHierarchy(javaProject, null);
h.addTypeHierarchyChangedListener(this);
@@ -870,8 +870,8 @@ public void testEditSourceTypes() throws CoreException {
// TBD: Find a way to do 2 changes in 2 different CUs at once
IJavaProject project= getJavaProject("TypeHierarchyNotification");
- final ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java");
- final ICompilationUnit superCU = getCompilationUnit("TypeHierarchyNotification", "src", "b", "B.java");
+ final ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.js");
+ final ICompilationUnit superCU = getCompilationUnit("TypeHierarchyNotification", "src", "b", "B.js");
IType type = cu.getType("X");
ITypeHierarchy h = type.newTypeHierarchy(project, null);
h.addTypeHierarchyChangedListener(this);
@@ -904,8 +904,8 @@ public void testEditSourceTypes() throws CoreException {
*/
public void testEditSuperType() throws CoreException {
IJavaProject project= getJavaProject("TypeHierarchyNotification");
- ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java");
- ICompilationUnit superCU = getCompilationUnit("TypeHierarchyNotification", "src", "b", "B.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.js");
+ ICompilationUnit superCU = getCompilationUnit("TypeHierarchyNotification", "src", "b", "B.js");
IType type = cu.getType("X");
IType superType= superCU.getType("B");
ITypeHierarchy h = type.newTypeHierarchy(project, null);
@@ -929,8 +929,8 @@ public void testEditSuperType() throws CoreException {
*/
public void testRemoveCompilationUnit() throws CoreException {
IJavaProject project = getJavaProject("TypeHierarchyNotification");
- ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java");
- ICompilationUnit superCU = getCompilationUnit("TypeHierarchyNotification", "src", "b", "B.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.js");
+ ICompilationUnit superCU = getCompilationUnit("TypeHierarchyNotification", "src", "b", "B.js");
IType type = cu.getType("X");
ITypeHierarchy h = type.newTypeHierarchy(project, null);
h.addTypeHierarchyChangedListener(this);
@@ -948,8 +948,8 @@ public void testRemoveCompilationUnit() throws CoreException {
*/
public void testRemoveExternalCompilationUnit() throws CoreException {
IJavaProject project = getJavaProject("TypeHierarchyNotification");
- ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java");
- ICompilationUnit otherCU = getCompilationUnit("TypeHierarchyNotification", "src", "p", "External.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.js");
+ ICompilationUnit otherCU = getCompilationUnit("TypeHierarchyNotification", "src", "p", "External.js");
IType type = cu.getType("X");
ITypeHierarchy h = type.newTypeHierarchy(project, null);
h.addTypeHierarchyChangedListener(this);
@@ -967,7 +967,7 @@ public void testRemoveExternalCompilationUnit() throws CoreException {
*/
public void testRemoveExternalPackage() throws CoreException {
IJavaProject project = getJavaProject("TypeHierarchyNotification");
- ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.js");
IType type = cu.getType("X");
ITypeHierarchy h = type.newTypeHierarchy(project, null);
h.addTypeHierarchyChangedListener(this);
@@ -987,7 +987,7 @@ public void testRemoveExternalPackage() throws CoreException {
*/
public void testRemoveExternalPackageFragmentRoot() throws CoreException {
IJavaProject project= getJavaProject("TypeHierarchyNotification");
- ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.js");
IType type = cu.getType("X");
ITypeHierarchy h = type.newTypeHierarchy(project, null);
h.addTypeHierarchyChangedListener(this);
@@ -1027,8 +1027,8 @@ public void testRemoveExternalProject() throws CoreException {
try {
this.createJavaProject("External", new String[] {""}, new String[] {"JCL_LIB"}, new String[]{"/TypeHierarchyNotification"}, "");
this.createFolder("/External/p");
- this.createFile("/External/p/Y.java", "package p; public class Y extends X {}");
- ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java");
+ this.createFile("/External/p/Y.js", "package p; public class Y extends X {}");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.js");
IType type = cu.getType("X");
ITypeHierarchy h = type.newTypeHierarchy(null);
h.addTypeHierarchyChangedListener(this);
@@ -1048,8 +1048,8 @@ public void testRemoveExternalProject() throws CoreException {
*/
public void testRemoveListener() throws CoreException {
IJavaProject project= getJavaProject("TypeHierarchyNotification");
- final ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java");
- final ICompilationUnit superCU = getCompilationUnit("TypeHierarchyNotification", "src", "b", "B.java");
+ final ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.js");
+ final ICompilationUnit superCU = getCompilationUnit("TypeHierarchyNotification", "src", "b", "B.js");
IType type = cu.getType("X");
ITypeHierarchy h = type.newTypeHierarchy(project, null);
ITypeHierarchyChangedListener listener= new ITypeHierarchyChangedListener() {
@@ -1089,7 +1089,7 @@ public void testRemoveListener() throws CoreException {
*/
public void testRemovePackage() throws CoreException {
IJavaProject project = getJavaProject("TypeHierarchyNotification");
- ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.js");
IType type = cu.getType("X");
ITypeHierarchy h = type.newTypeHierarchy(project, null);
h.addTypeHierarchyChangedListener(this);
@@ -1107,7 +1107,7 @@ public void testRemovePackage() throws CoreException {
*/
public void testRemovePackageFragmentRoots() throws CoreException {
IJavaProject project = getJavaProject("TypeHierarchyNotification");
- ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.js");
IType type = cu.getType("X");
ITypeHierarchy h = type.newTypeHierarchy(project, null);
h.addTypeHierarchyChangedListener(this);
@@ -1128,7 +1128,7 @@ public void testRemoveProject() throws CoreException, IOException {
try {
setUpJavaProject("TypeHierarchyDependent");
IJavaProject project= getJavaProject("TypeHierarchyDependent");
- ICompilationUnit cu = getCompilationUnit("TypeHierarchyDependent", "", "", "Dependent.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchyDependent", "", "", "Dependent.js");
IType type = cu.getType("Dependent");
h = type.newTypeHierarchy(project, null);
h.addTypeHierarchyChangedListener(this);
@@ -1160,7 +1160,7 @@ public void testRemoveProject() throws CoreException, IOException {
*/
public void testRemoveType() throws CoreException {
IJavaProject project= getJavaProject("TypeHierarchyNotification");
- ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.js");
IType type = cu.getType("X");
ITypeHierarchy h = type.newTypeHierarchy(project, null);
h.addTypeHierarchyChangedListener(this);
@@ -1177,13 +1177,13 @@ public void testRemoveType() throws CoreException {
*/
public void testRenameCompilationUnit() throws CoreException {
IJavaProject javaProject = getJavaProject("TypeHierarchyNotification");
- ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.js");
IType type= cu.getType("X");
ITypeHierarchy h = type.newTypeHierarchy(javaProject, null);
h.addTypeHierarchyChangedListener(this);
try {
- cu.rename("X2.java", false, null);
+ cu.rename("X2.js", false, null);
this.assertOneChange(h);
} finally {
h.removeTypeHierarchyChangedListener(this);
@@ -1194,14 +1194,14 @@ public void testRenameCompilationUnit() throws CoreException {
*/
public void testRenameExternalCompilationUnit() throws CoreException {
IJavaProject javaProject = getJavaProject("TypeHierarchyNotification");
- ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.js");
IType type= cu.getType("X");
ITypeHierarchy h = type.newTypeHierarchy(javaProject, null);
h.addTypeHierarchyChangedListener(this);
- ICompilationUnit cu2= getCompilationUnit("TypeHierarchyNotification", "src", "p", "External.java");
+ ICompilationUnit cu2= getCompilationUnit("TypeHierarchyNotification", "src", "p", "External.js");
try {
- cu2.rename("External2.java", false, null);
+ cu2.rename("External2.js", false, null);
assertTrue("Should not receive changes", !this.changeReceived);
} finally {
h.removeTypeHierarchyChangedListener(this);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchySerializationTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchySerializationTests.java
index 0cc66a2..f41cd17 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchySerializationTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchySerializationTests.java
@@ -159,47 +159,47 @@ private static void testFocusHierarchy(IType type, IJavaProject project) throws
compare(type.getFullyQualifiedName(), h1, h2);
}
public void test001() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit(PROJECTNAME, "src", "p1", "X.java");
+ ICompilationUnit cu = getCompilationUnit(PROJECTNAME, "src", "p1", "X.js");
IType type = cu.getType("X");
testFocusHierarchy(type, project);
}
public void test002() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit(PROJECTNAME, "src", "p1", "Y.java");
+ ICompilationUnit cu = getCompilationUnit(PROJECTNAME, "src", "p1", "Y.js");
IType type = cu.getType("Y");
testFocusHierarchy(type, project);
}
public void test003() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit(PROJECTNAME, "src", "p1", "Z.java");
+ ICompilationUnit cu = getCompilationUnit(PROJECTNAME, "src", "p1", "Z.js");
IType type = cu.getType("Z");
testFocusHierarchy(type, project);
}
public void test004() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit(PROJECTNAME, "src", "p1", "I1.java");
+ ICompilationUnit cu = getCompilationUnit(PROJECTNAME, "src", "p1", "I1.js");
IType type = cu.getType("I1");
testFocusHierarchy(type, project);
}
public void test005() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit(PROJECTNAME, "src", "p1", "I2.java");
+ ICompilationUnit cu = getCompilationUnit(PROJECTNAME, "src", "p1", "I2.js");
IType type = cu.getType("I2");
testFocusHierarchy(type, project);
}
public void test006() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit(PROJECTNAME, "src", "p1", "I3.java");
+ ICompilationUnit cu = getCompilationUnit(PROJECTNAME, "src", "p1", "I3.js");
IType type = cu.getType("I3");
testFocusHierarchy(type, project);
}
public void test007() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit(PROJECTNAME, "src", "p1", "I4.java");
+ ICompilationUnit cu = getCompilationUnit(PROJECTNAME, "src", "p1", "I4.js");
IType type = cu.getType("I4");
testFocusHierarchy(type, project);
}
public void test008() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit(PROJECTNAME, "src", "p1", "I5.java");
+ ICompilationUnit cu = getCompilationUnit(PROJECTNAME, "src", "p1", "I5.js");
IType type = cu.getType("I5");
testFocusHierarchy(type, project);
}
public void test009() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit(PROJECTNAME, "src", "p1", "I6.java");
+ ICompilationUnit cu = getCompilationUnit(PROJECTNAME, "src", "p1", "I6.js");
IType type = cu.getType("I6");
testFocusHierarchy(type, project);
}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchyTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchyTests.java
index 41e178e..bf5df31 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchyTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchyTests.java
@@ -49,11 +49,11 @@ public void setUpSuite() throws Exception {
setUpJavaProject("TypeHierarchy");
addLibrary("myLib.jar", "myLibsrc.zip", new String[] {
- "my/pkg/X.java",
+ "my/pkg/X.js",
"package my.pkg;\n" +
"public class X {\n" +
"}",
- "my/pkg/Y.java",
+ "my/pkg/Y.js",
"package my.pkg;\n" +
"public class Y {\n" +
" void foo() {\n" +
@@ -69,88 +69,88 @@ public void setUpSuite() throws Exception {
IJavaProject project15 = createJavaProject("TypeHierarchy15", new String[] {"src"}, new String[] {"JCL15_LIB"}, "bin", "1.5");
addLibrary(project15, "lib15.jar", "lib15src.zip", new String[] {
- "util/AbstractList.java",
+ "util/AbstractList.js",
"package util;\n" +
"public class AbstractList<E> {\n" +
"}",
- "util/ArrayList.java",
+ "util/ArrayList.js",
"package util;\n" +
"public class ArrayList<E> extends AbstractList<E> implements List<E> {\n" +
"}",
- "util/List.java",
+ "util/List.js",
"package util;\n" +
"public interface List<E> {\n" +
"}",
- "util/Map.java",
+ "util/Map.js",
"package util;\n" +
"public class Map<K,V> extends AbstractList<V> {\n" +
"}",
}, JavaCore.VERSION_1_5);
createFile(
- "/TypeHierarchy15/src/X.java",
+ "/TypeHierarchy15/src/X.js",
"import util.*;\n" +
"public class X<E> extends ArrayList<E> implements List<E> {\n" +
"}"
);
createFile(
- "/TypeHierarchy15/src/Y.java",
+ "/TypeHierarchy15/src/Y.js",
"import util.*;\n" +
"public class Y extends ArrayList implements List {\n" +
"}"
);
createFile(
- "/TypeHierarchy15/src/I.java",
+ "/TypeHierarchy15/src/I.js",
"public interface I<E> {\n" +
"}"
);
createFile(
- "/TypeHierarchy15/src/A.java",
+ "/TypeHierarchy15/src/A.js",
"public class A<E> implements I<E> {\n" +
"}"
);
createFile(
- "/TypeHierarchy15/src/X99606.java",
+ "/TypeHierarchy15/src/X99606.js",
"public class X99606 extends Y99606<X99606.Color> {\n" +
" static class Color {}\n" +
"}"
);
createFile(
- "/TypeHierarchy15/src/Y99606.java",
+ "/TypeHierarchy15/src/Y99606.js",
"public class Y99606<T> {\n" +
"}"
);
createFile(
- "/TypeHierarchy15/src/A108740.java",
+ "/TypeHierarchy15/src/A108740.js",
"class A108740<T> {}"
);
createFile(
- "/TypeHierarchy15/src/B108740.java",
+ "/TypeHierarchy15/src/B108740.js",
"class B108740<T> extends A108740<C108740> {}"
);
createFile(
- "/TypeHierarchy15/src/C108740.java",
+ "/TypeHierarchy15/src/C108740.js",
"class C108740 extends B108740<C108740> {}"
);
createFile(
- "/TypeHierarchy15/src/D108740.java",
+ "/TypeHierarchy15/src/D108740.js",
"class D108740 extends B108740<D108740> {}"
);
createFile(
- "/TypeHierarchy15/src/CycleParent.java",
+ "/TypeHierarchy15/src/CycleParent.js",
"class CycleParent extends CycleBase<CycleChild> {}"
);
createFile(
- "/TypeHierarchy15/src/CycleBase.java",
+ "/TypeHierarchy15/src/CycleBase.js",
"class CycleBase<T extends CycleBase> {}"
);
createFile(
- "/TypeHierarchy15/src/CycleChild.java",
+ "/TypeHierarchy15/src/CycleChild.js",
"class CycleChild extends CycleParent implements Comparable<CycleChild> {\n" +
" public int compareTo(CycleChild o) { return 0; }\n" +
"}"
);
createFile(
- "/TypeHierarchy15/src/Try.java",
+ "/TypeHierarchy15/src/Try.js",
"public enum Try {\n" +
" THIS,\n" +
" THAT(),\n" +
@@ -174,7 +174,7 @@ public void tearDownSuite() throws Exception {
* Ensures that a hierarchy on an anonymous type in an initializer is correct.
*/
public void testAnonymousType01() throws JavaModelException {
- IType typeA = getCompilationUnit("TypeHierarchy", "src", "p7", "A.java").getType("A");
+ IType typeA = getCompilationUnit("TypeHierarchy", "src", "p7", "A.js").getType("A");
IType type = typeA.getInitializer(1).getType("", 1);
ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
assertHierarchyEquals(
@@ -189,7 +189,7 @@ public void testAnonymousType01() throws JavaModelException {
* Ensures that a hierarchy on an anonymous type in a second initializer is correct.
*/
public void testAnonymousType02() throws JavaModelException {
- IType typeA = getCompilationUnit("TypeHierarchy", "src", "p7", "A.java").getType("A");
+ IType typeA = getCompilationUnit("TypeHierarchy", "src", "p7", "A.js").getType("A");
IType type = typeA.getInitializer(2).getType("", 1);
ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
assertHierarchyEquals(
@@ -204,7 +204,7 @@ public void testAnonymousType02() throws JavaModelException {
* Ensures that a hierarchy on an anonymous type in a field declaration is correct.
*/
public void testAnonymousType03() throws JavaModelException {
- IType typeA = getCompilationUnit("TypeHierarchy", "src", "p7", "A.java").getType("A");
+ IType typeA = getCompilationUnit("TypeHierarchy", "src", "p7", "A.js").getType("A");
IType type = typeA.getField("field1").getType("", 1);
ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
assertHierarchyEquals(
@@ -219,7 +219,7 @@ public void testAnonymousType03() throws JavaModelException {
* Ensures that a hierarchy on an anonymous type in a field declaration is correct.
*/
public void testAnonymousType04() throws JavaModelException {
- IType typeA = getCompilationUnit("TypeHierarchy", "src", "p7", "A.java").getType("A");
+ IType typeA = getCompilationUnit("TypeHierarchy", "src", "p7", "A.js").getType("A");
IType type = typeA.getField("field2").getType("", 1);
ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
assertHierarchyEquals(
@@ -243,7 +243,7 @@ public void testAnonymousType04() throws JavaModelException {
* Ensures that a hierarchy on an anonymous type in a method declaration is correct.
*/
public void testAnonymousType05() throws JavaModelException {
- IType typeA = getCompilationUnit("TypeHierarchy", "src", "p7", "A.java").getType("A");
+ IType typeA = getCompilationUnit("TypeHierarchy", "src", "p7", "A.js").getType("A");
IType type = typeA.getMethod("foo", new String[] {}).getType("", 1);
ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
assertHierarchyEquals(
@@ -259,7 +259,7 @@ public void testAnonymousType05() throws JavaModelException {
* (regression test for bug 44506 Type hierarchy is missing anonymous type)
*/
public void testAnonymousType06() throws JavaModelException {
- IType typeA = getCompilationUnit("TypeHierarchy", "src", "p8", "X.java").getType("X");
+ IType typeA = getCompilationUnit("TypeHierarchy", "src", "p8", "X.js").getType("X");
IType type = typeA.getMethod("foo", new String[] {}).getType("", 1);
ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
assertHierarchyEquals(
@@ -285,7 +285,7 @@ public void testAnonymousType07() throws CoreException {
* (regression test for bug 120667 [hierarchy] Type hierarchy for enum type does not include anonymous subtypes)
*/
public void testAnonymousType08() throws CoreException {
- IType type = getCompilationUnit("TypeHierarchy15/src/Try.java").getType("Try");
+ IType type = getCompilationUnit("TypeHierarchy15/src/Try.js").getType("Try");
ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
assertHierarchyEquals(
"Focus: Try [in Try.java [in <default> [in src [in TypeHierarchy15]]]]\n" +
@@ -303,7 +303,7 @@ public void testAnonymousType08() throws CoreException {
* (regression test for bug 120667 [hierarchy] Type hierarchy for enum type does not include anonymous subtypes)
*/
public void testAnonymousType09() throws CoreException {
- IType type = getCompilationUnit("TypeHierarchy15/src/Try.java").getType("Try").getField("ANONYMOUS").getType("", 1);
+ IType type = getCompilationUnit("TypeHierarchy15/src/Try.js").getType("Try").getField("ANONYMOUS").getType("", 1);
ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
assertHierarchyEquals(
"Focus: <anonymous #1> [in ANONYMOUS [in Try [in Try.java [in <default> [in src [in TypeHierarchy15]]]]]]\n" +
@@ -321,7 +321,7 @@ public void testAnonymousType09() throws CoreException {
* (regression test for bug 122444 [hierarchy] Type hierarchy of inner member type misses anonymous subtypes)
*/
public void testAnonymousType10() throws CoreException {
- ICompilationUnit cu = getCompilationUnit("TypeHierarchy/src/q7/X.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchy/src/q7/X.js");
cu.open(null);
IType type = cu.getType("X").getType("Member");
ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
@@ -365,7 +365,7 @@ public void testBinaryInWrongPackage() throws CoreException {
createJavaProject("P", new String[] {"src"}, new String[] {"JCL_LIB", "lib"}, "bin");
createFolder("/P/src/p");
createFile(
- "/P/src/p/X.java",
+ "/P/src/p/X.js",
"pakage p;\n" +
"public class X {\n" +
"}"
@@ -389,7 +389,7 @@ public void testBinaryInWrongPackage() throws CoreException {
* (regression test for bug 48459 NPE in Type hierarchy)
*/
public void testBinarySubclass() throws JavaModelException {
- IType type = getCompilationUnit("TypeHierarchy/src/p48459/p1/X48459.java").getType("X48459");
+ IType type = getCompilationUnit("TypeHierarchy/src/p48459/p1/X48459.js").getType("X48459");
ITypeHierarchy h = type.newTypeHierarchy(null);
assertHierarchyEquals(
"Focus: X48459 [in X48459.java [in p48459.p1 [in src [in TypeHierarchy]]]]\n" +
@@ -462,11 +462,11 @@ public void testBinaryTypeHiddenByOtherJar() throws CoreException, IOException {
externalJar1 = Util.getOutputDirectory() + File.separator + "test1.jar";
Util.createJar(
new String[] {
- "p/X.java",
+ "p/X.js",
"package p;\n" +
"public class X {\n" +
"}" ,
- "p/Y.java",
+ "p/Y.js",
"package p;\n" +
"public class Y extends X {\n" +
"}"
@@ -477,11 +477,11 @@ public void testBinaryTypeHiddenByOtherJar() throws CoreException, IOException {
externalJar2 = Util.getOutputDirectory() + File.separator + "test2.jar";
Util.createJar(
new String[] {
- "p/X.java",
+ "p/X.js",
"package p;\n" +
"public class X {\n" +
"}" ,
- "p/Y.java",
+ "p/Y.js",
"package p;\n" +
"public class Y extends X {\n" +
"}"
@@ -517,11 +517,11 @@ public void testBinaryTypeInDotClassJar() throws CoreException, IOException {
externalJar = Util.getOutputDirectory() + File.separator + "test.classic.jar";
Util.createJar(
new String[] {
- "p/X.java",
+ "p/X.js",
"package p;\n" +
"public class X {\n" +
"}" ,
- "p/Y.java",
+ "p/Y.js",
"package p;\n" +
"public class Y {\n" +
" void foo() {\n" +
@@ -554,7 +554,7 @@ public void testBinaryTypeInDotClassJar() throws CoreException, IOException {
*/
public void testCancel() throws JavaModelException {
boolean isCanceled = false;
- IType type = getCompilationUnit("TypeHierarchy", "src", "p1", "X.java").getType("X");
+ IType type = getCompilationUnit("TypeHierarchy", "src", "p1", "X.js").getType("X");
IRegion region = JavaCore.newRegion();
region.add(getPackageFragmentRoot("TypeHierarchy", "src"));
try {
@@ -586,7 +586,7 @@ public void testContains() throws JavaModelException {
assertTrue("I must be included", this.typeHierarchy.contains(type));
}
public void testCycle() throws JavaModelException {
- IType type = getCompilationUnit("/TypeHierarchy/src/cycle/X.java").getType("X");
+ IType type = getCompilationUnit("/TypeHierarchy/src/cycle/X.js").getType("X");
ITypeHierarchy hierarchy = type.newSupertypeHierarchy(null);
assertHierarchyEquals(
"Focus: X [in X.java [in cycle [in src [in TypeHierarchy]]]]\n" +
@@ -597,7 +597,7 @@ public void testCycle() throws JavaModelException {
);
}
public void testCycle2() throws JavaModelException {
- IType type = getCompilationUnit("/TypeHierarchy15/src/CycleParent.java").getType("CycleParent");
+ IType type = getCompilationUnit("/TypeHierarchy15/src/CycleParent.js").getType("CycleParent");
ITypeHierarchy hierarchy = type.newSupertypeHierarchy(null);
assertHierarchyEquals(
"Focus: CycleParent [in CycleParent.java [in <default> [in src [in TypeHierarchy15]]]]\n" +
@@ -616,11 +616,11 @@ public void testEfficiencyMultipleProjects() throws CoreException {
createJavaProject("P1", new String[] {""}, new String[] {"JCL_LIB"}, "");
createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P1"}, "");
createJavaProject("P3", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P1"}, "");
- createFile("/P1/X.java", "public class X {}");
- createFile("/P3/Y.java", "public class Y extends X {}");
- createFile("/P3/Z.java", "public class Z extends X {}");
- createFile("/P2/W.java", "public class W extends X {}");
- IType type = getCompilationUnit("/P1/X.java").getType("X");
+ createFile("/P1/X.js", "public class X {}");
+ createFile("/P3/Y.js", "public class Y extends X {}");
+ createFile("/P3/Z.js", "public class Z extends X {}");
+ createFile("/P2/W.js", "public class W extends X {}");
+ IType type = getCompilationUnit("/P1/X.js").getType("X");
class ProgressCounter extends TestProgressMonitor {
int count = 0;
public boolean isCanceled() {
@@ -642,12 +642,12 @@ public void testEfficiencyMultipleProjects() throws CoreException {
public void testEmptyWorkingCopyPotentialSubtype() throws JavaModelException {
ICompilationUnit workingCopy = null;
try {
- workingCopy = getCompilationUnit("/TypeHierarchy/src/q4/Y.java");
+ workingCopy = getCompilationUnit("/TypeHierarchy/src/q4/Y.js");
workingCopy.becomeWorkingCopy(null, null);
workingCopy.getBuffer().setContents("");
workingCopy.makeConsistent(null);
- IType type = getCompilationUnit("/TypeHierarchy/src/q4/X.java").getType("X");
+ IType type = getCompilationUnit("/TypeHierarchy/src/q4/X.js").getType("X");
ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
assertHierarchyEquals(
"Focus: X [in X.java [in q4 [in src [in TypeHierarchy]]]]\n" +
@@ -664,7 +664,7 @@ public void testEmptyWorkingCopyPotentialSubtype() throws JavaModelException {
* Ensures that a hierarchy on a type with local and anonymous types is correct.
*/
public void testFocusWithLocalAndAnonymousTypes() throws JavaModelException {
- IType type = getCompilationUnit("TypeHierarchy", "src", "p7", "X.java").getType("X");
+ IType type = getCompilationUnit("TypeHierarchy", "src", "p7", "X.js").getType("X");
ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
assertHierarchyEquals(
"Focus: X [in X.java [in p7 [in src [in TypeHierarchy]]]]\n" +
@@ -687,7 +687,7 @@ public void testFocusWithLocalAndAnonymousTypes() throws JavaModelException {
* Ensures that a hierarchy on a generic type can be opened
*/
public void testGeneric01() throws JavaModelException {
- IType type = getCompilationUnit("/TypeHierarchy15/src/X.java").getType("X");
+ IType type = getCompilationUnit("/TypeHierarchy15/src/X.js").getType("X");
ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
assertHierarchyEquals(
"Focus: X [in X.java [in <default> [in src [in TypeHierarchy15]]]]\n" +
@@ -723,7 +723,7 @@ public void testGeneric02() throws JavaModelException {
* Ensures that a hierarchy on a generic type can be opened
*/
public void testGeneric03() throws JavaModelException {
- IType type = getCompilationUnit("/TypeHierarchy15/src/Y.java").getType("Y");
+ IType type = getCompilationUnit("/TypeHierarchy15/src/Y.js").getType("Y");
ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
assertHierarchyEquals(
"Focus: Y [in Y.java [in <default> [in src [in TypeHierarchy15]]]]\n" +
@@ -742,7 +742,7 @@ public void testGeneric03() throws JavaModelException {
* (regression test for bug 72348 [1.5][Type Hierarchy] Super type hierarchy of class extending generic type is empty)
*/
public void testGeneric04() throws JavaModelException {
- IType type = getCompilationUnit("/TypeHierarchy15/src/X.java").getType("X");
+ IType type = getCompilationUnit("/TypeHierarchy15/src/X.js").getType("X");
ITypeHierarchy hierarchy = type.newSupertypeHierarchy(null);
assertHierarchyEquals(
"Focus: X [in X.java [in <default> [in src [in TypeHierarchy15]]]]\n" +
@@ -761,7 +761,7 @@ public void testGeneric04() throws JavaModelException {
* (regression test for bug 82004 [model][5.0] 3.1M4 type hierarchy for generic interface)
*/
public void testGeneric05() throws JavaModelException {
- IType type = getCompilationUnit("/TypeHierarchy15/src/I.java").getType("I");
+ IType type = getCompilationUnit("/TypeHierarchy15/src/I.js").getType("I");
ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
assertHierarchyEquals(
"Focus: I [in I.java [in <default> [in src [in TypeHierarchy15]]]]\n" +
@@ -787,7 +787,7 @@ public void testGeneric06() throws CoreException {
* (regression test for bug 99606 Subtype not found if parameterized on inner class)
*/
public void testGeneric07() throws JavaModelException {
- IType type = getCompilationUnit("/TypeHierarchy15/src/Y99606.java").getType("Y99606");
+ IType type = getCompilationUnit("/TypeHierarchy15/src/Y99606.js").getType("Y99606");
ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
assertHierarchyEquals(
"Focus: Y99606 [in Y99606.java [in <default> [in src [in TypeHierarchy15]]]]\n" +
@@ -800,7 +800,7 @@ public void testGeneric07() throws JavaModelException {
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=108740
public void testGeneric08() throws JavaModelException {
- IType type = getCompilationUnit("/TypeHierarchy15/src/D108740.java").getType("D108740");
+ IType type = getCompilationUnit("/TypeHierarchy15/src/D108740.js").getType("D108740");
ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
assertHierarchyEquals(
"Focus: D108740 [in D108740.java [in <default> [in src [in TypeHierarchy15]]]]\n" +
@@ -819,21 +819,21 @@ public void testGeneric08() throws JavaModelException {
public void testGeneric09() throws CoreException {
try {
createFile(
- "/TypeHierarchy15/src/I1_136095.java",
+ "/TypeHierarchy15/src/I1_136095.js",
"public interface I1_136095<E> {\n" +
"}"
);
createFile(
- "/TypeHierarchy15/src/I2_136095.java",
+ "/TypeHierarchy15/src/I2_136095.js",
"public interface I2_136095 extends I1_136095<String>{\n" +
"}"
);
createFile(
- "/TypeHierarchy15/src/X_136095.java",
+ "/TypeHierarchy15/src/X_136095.js",
"public abstract class X_136095 implements I1_136095<Integer>, I2_136095 {\n" +
"}"
);
- IType type = getCompilationUnit("/TypeHierarchy15/src/X_136095.java").getType("X_136095");
+ IType type = getCompilationUnit("/TypeHierarchy15/src/X_136095.js").getType("X_136095");
ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
assertHierarchyEquals(
"Focus: X_136095 [in X_136095.java [in <default> [in src [in TypeHierarchy15]]]]\n" +
@@ -846,9 +846,9 @@ public void testGeneric09() throws CoreException {
hierarchy
);
} finally {
- deleteFile("/TypeHierarchy15/src/I1_136095.java");
- deleteFile("/TypeHierarchy15/src/I2_136095.java");
- deleteFile("/TypeHierarchy15/src/X_136095.java");
+ deleteFile("/TypeHierarchy15/src/I1_136095.js");
+ deleteFile("/TypeHierarchy15/src/I2_136095.js");
+ deleteFile("/TypeHierarchy15/src/X_136095.js");
}
}
/*
@@ -858,20 +858,20 @@ public void testGeneric09() throws CoreException {
public void testGeneric10() throws CoreException {
try {
createFile(
- "/TypeHierarchy15/src/Y_140340.java",
+ "/TypeHierarchy15/src/Y_140340.js",
"public class Y_140340 {\n" +
" public static class Z {\n" +
" }\n" +
"}"
);
createFile(
- "/TypeHierarchy15/src/X_140340.java",
+ "/TypeHierarchy15/src/X_140340.js",
"public class X_140340 implements I1_140340<Y_140340.Z> {\n" +
"}\n" +
"interface I1_140340<T> {\n" +
"}"
);
- IType type = getCompilationUnit("/TypeHierarchy15/src/X_140340.java").getType("X_140340");
+ IType type = getCompilationUnit("/TypeHierarchy15/src/X_140340.js").getType("X_140340");
ITypeHierarchy hierarchy = type.newSupertypeHierarchy(null);
assertHierarchyEquals(
"Focus: X_140340 [in X_140340.java [in <default> [in src [in TypeHierarchy15]]]]\n" +
@@ -882,8 +882,8 @@ public void testGeneric10() throws CoreException {
hierarchy
);
} finally {
- deleteFile("/TypeHierarchy15/src/Y_140340.java");
- deleteFile("/TypeHierarchy15/src/X_140340.java");
+ deleteFile("/TypeHierarchy15/src/Y_140340.js");
+ deleteFile("/TypeHierarchy15/src/X_140340.js");
}
}
/**
@@ -922,7 +922,7 @@ public void testGetAllInterfacesInRegion() {
* hierarchy.
*/
public void testGetAllSubtypes() throws JavaModelException {
- IType type = getCompilationUnit("TypeHierarchy", "src", "p1", "X.java").getType("X");
+ IType type = getCompilationUnit("TypeHierarchy", "src", "p1", "X.js").getType("X");
ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
IType[] types = hierarchy.getAllSubtypes(type);
this.assertTypesEqual(
@@ -957,7 +957,7 @@ public void testGetAllSubtypesFromBinary() throws JavaModelException {
* hierarchy.
*/
public void testGetAllSuperclasses() throws JavaModelException {
- IType type = getCompilationUnit("TypeHierarchy", "src", "p1", "Z.java").getType("Z");
+ IType type = getCompilationUnit("TypeHierarchy", "src", "p1", "Z.js").getType("Z");
ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
IType[] types = hierarchy.getAllSuperclasses(type);
assertTypesEqual(
@@ -1013,7 +1013,7 @@ public void testGetAllSuperclassesFromBinary2() throws JavaModelException {
* hierarchy.
*/
public void testGetAllSuperInterfaces() throws JavaModelException {
- IType type = getCompilationUnit("TypeHierarchy", "src", "p1", "Z.java").getType("Z");
+ IType type = getCompilationUnit("TypeHierarchy", "src", "p1", "Z.js").getType("Z");
ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
IType[] types = hierarchy.getAllSuperInterfaces(type);
assertTypesEqual(
@@ -1027,7 +1027,7 @@ public void testGetAllSuperInterfaces() throws JavaModelException {
* hierarchy.
*/
public void testGetAllSupertypes() throws JavaModelException {
- IType type = getCompilationUnit("TypeHierarchy", "src", "p1", "Z.java").getType("Z");
+ IType type = getCompilationUnit("TypeHierarchy", "src", "p1", "Z.js").getType("Z");
ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
IType[] types = hierarchy.getAllSupertypes(type);
assertTypesEqual(
@@ -1045,7 +1045,7 @@ public void testGetAllSupertypes() throws JavaModelException {
* (regression test for bug 23644 hierarchy: getAllSuperTypes does not include all superinterfaces?)
*/
public void testGetAllSupertypes2() throws JavaModelException {
- IType type = getCompilationUnit("TypeHierarchy", "src", "p3", "B.java").getType("B");
+ IType type = getCompilationUnit("TypeHierarchy", "src", "p3", "B.js").getType("B");
ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
IType[] types = hierarchy.getAllSupertypes(type);
assertTypesEqual(
@@ -1061,7 +1061,7 @@ public void testGetAllSupertypes2() throws JavaModelException {
* hierarchy.
*/
public void testGetAllTypes() throws JavaModelException {
- IType type = getCompilationUnit("TypeHierarchy", "src", "p1", "Y.java").getType("Y");
+ IType type = getCompilationUnit("TypeHierarchy", "src", "p1", "Y.js").getType("Y");
ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
this.assertTypesEqual(
"Unexpected types in hierarchy of Y",
@@ -1091,7 +1091,7 @@ public void testGetCachedFlags() throws JavaModelException {
* hierarchy.
*/
public void testGetExtendingInterfaces() throws JavaModelException {
- IType type = getCompilationUnit("TypeHierarchy", "src", "p2", "I.java").getType("I");
+ IType type = getCompilationUnit("TypeHierarchy", "src", "p2", "I.js").getType("I");
ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
IType[] types = hierarchy.getExtendingInterfaces(type);
this.assertTypesEqual(
@@ -1101,7 +1101,7 @@ public void testGetExtendingInterfaces() throws JavaModelException {
types
);
- type = getCompilationUnit("TypeHierarchy", "src", "p2", "X.java").getType("X");
+ type = getCompilationUnit("TypeHierarchy", "src", "p2", "X.js").getType("X");
hierarchy = type.newTypeHierarchy(null);
types = hierarchy.getExtendingInterfaces(type);
this.assertTypesEqual(
@@ -1115,7 +1115,7 @@ public void testGetExtendingInterfaces() throws JavaModelException {
* hierarchy.
*/
public void testGetImplementingClasses() throws JavaModelException {
- IType type = getCompilationUnit("TypeHierarchy", "src", "p2", "I.java").getType("I");
+ IType type = getCompilationUnit("TypeHierarchy", "src", "p2", "I.js").getType("I");
ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
IType[] types = hierarchy.getImplementingClasses(type);
this.assertTypesEqual(
@@ -1124,7 +1124,7 @@ public void testGetImplementingClasses() throws JavaModelException {
types
);
- type = getCompilationUnit("TypeHierarchy", "src", "p2", "X.java").getType("X");
+ type = getCompilationUnit("TypeHierarchy", "src", "p2", "X.js").getType("X");
hierarchy = type.newTypeHierarchy(null);
types = hierarchy.getImplementingClasses(type);
this.assertTypesEqual(
@@ -1149,7 +1149,7 @@ public void testGetRootClasses() {
* hierarchy.
*/
public void testGetRootInterfaces() throws JavaModelException {
- IType type = getCompilationUnit("TypeHierarchy", "src", "p2", "Y.java").getType("Y");
+ IType type = getCompilationUnit("TypeHierarchy", "src", "p2", "Y.js").getType("Y");
ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
IType[] types = hierarchy.getRootInterfaces();
assertTypesEqual(
@@ -1223,7 +1223,7 @@ public void testGetSuperclassInRegion() throws JavaModelException {
r.add(p);
ITypeHierarchy hierarchy = p.getJavaProject().newTypeHierarchy(r, null);
- IType type = getCompilationUnit("TypeHierarchy", "src", "p1", "Y.java").getType("Y");
+ IType type = getCompilationUnit("TypeHierarchy", "src", "p1", "Y.js").getType("Y");
IType superclass= hierarchy.getSuperclass(type);
assertEquals("Unexpected super class of Y", "X", superclass.getElementName());
}
@@ -1293,7 +1293,7 @@ public void testImplementBinaryInnerInterface() throws JavaModelException {
* Ensures that a hierarchy on an inner type is correctly rooted.
*/
public void testInnerType1() throws JavaModelException {
- IType type = getCompilationUnit("TypeHierarchy", "src", "p5", "X.java").getType("X").getType("Inner");
+ IType type = getCompilationUnit("TypeHierarchy", "src", "p5", "X.js").getType("X").getType("Inner");
ITypeHierarchy hierarchy = null;
try {
hierarchy = type.newTypeHierarchy(null);
@@ -1314,7 +1314,7 @@ public void testInnerType1() throws JavaModelException {
* (regression test for bug 43274 Type hierarchy broken)
*/
public void testInnerType2() throws JavaModelException {
- IType type = getCompilationUnit("TypeHierarchy", "src", "p6", "A.java").getType("A").getType("Inner");
+ IType type = getCompilationUnit("TypeHierarchy", "src", "p6", "A.js").getType("A").getType("Inner");
ITypeHierarchy hierarchy = null;
try {
hierarchy = type.newTypeHierarchy(null);
@@ -1333,7 +1333,7 @@ public void testInnerType2() throws JavaModelException {
* Ensures that a hierarchy on a local type in an initializer is correct.
*/
public void testLocalType1() throws JavaModelException {
- IType typeA = getCompilationUnit("TypeHierarchy", "src", "p7", "A.java").getType("A");
+ IType typeA = getCompilationUnit("TypeHierarchy", "src", "p7", "A.js").getType("A");
IType type = typeA.getInitializer(1).getType("Y1", 1);
ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
assertHierarchyEquals(
@@ -1349,7 +1349,7 @@ public void testLocalType1() throws JavaModelException {
* Ensures that a hierarchy on a local type in a second initializer is correct.
*/
public void testLocalType2() throws JavaModelException {
- IType typeA = getCompilationUnit("TypeHierarchy", "src", "p7", "A.java").getType("A");
+ IType typeA = getCompilationUnit("TypeHierarchy", "src", "p7", "A.js").getType("A");
IType type = typeA.getInitializer(2).getType("Y3", 1);
ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
assertHierarchyEquals(
@@ -1363,7 +1363,7 @@ public void testLocalType2() throws JavaModelException {
* Ensures that a hierarchy on a local type in a method declaration is correct.
*/
public void testLocalType3() throws JavaModelException {
- IType typeA = getCompilationUnit("TypeHierarchy", "src", "p7", "A.java").getType("A");
+ IType typeA = getCompilationUnit("TypeHierarchy", "src", "p7", "A.js").getType("A");
IType type = typeA.getMethod("foo", new String[] {}).getType("Y2", 1);
ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
assertHierarchyEquals(
@@ -1380,7 +1380,7 @@ public void testLocalType3() throws JavaModelException {
* (regression test for bug 44073 Override methods action does not work for local types [code manipulation])
*/
public void testLocalType4() throws JavaModelException {
- IType typeA = getCompilationUnit("TypeHierarchy", "src", "p7", "A.java").getType("A");
+ IType typeA = getCompilationUnit("TypeHierarchy", "src", "p7", "A.js").getType("A");
IType type = typeA.getMethod("foo", new String[] {}).getType("Y1", 1);
ITypeHierarchy hierarchy = type.newSupertypeHierarchy(null);
assertHierarchyEquals(
@@ -1399,7 +1399,7 @@ public void testMemberTypeSubtypeDifferentProject() throws CoreException {
try {
createJavaProject("P1");
createFile(
- "/P1/X.java",
+ "/P1/X.js",
"public class X {\n" +
" public class Member {\n" +
" }\n" +
@@ -1407,11 +1407,11 @@ public void testMemberTypeSubtypeDifferentProject() throws CoreException {
);
createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P1"}, "");
createFile(
- "/P2/Y.java",
+ "/P2/Y.js",
"public class Y extends X.Member {\n" +
"}"
);
- IType focus = getCompilationUnit("/P1/X.java").getType("X").getType("Member");
+ IType focus = getCompilationUnit("/P1/X.js").getType("X").getType("Member");
ITypeHierarchy hierarchy = focus.newTypeHierarchy(null/*no progress*/);
assertHierarchyEquals(
"Focus: Member [in X [in X.java [in <default> [in <project root> [in P1]]]]]\n" +
@@ -1429,7 +1429,7 @@ public void testMemberTypeSubtypeDifferentProject() throws CoreException {
* (regression test for bug 24691 Missing interface makes hierarchy incomplete)
*/
public void testMissingInterface() throws JavaModelException {
- IType type = getCompilationUnit("TypeHierarchy", "src", "p4", "X.java").getType("X");
+ IType type = getCompilationUnit("TypeHierarchy", "src", "p4", "X.js").getType("X");
ITypeHierarchy hierarchy = null;
try {
hierarchy = type.newTypeHierarchy(null);
@@ -1449,7 +1449,7 @@ public void testMissingInterface() throws JavaModelException {
*/
public void testPotentialSubtypeNotInClasspath() throws JavaModelException {
IJavaProject project = getJavaProject("TypeHierarchy");
- ICompilationUnit cu = getCompilationUnit("TypeHierarchy", "src", "p1", "X.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchy", "src", "p1", "X.js");
IType type = cu.getType("X");
ITypeHierarchy h = type.newTypeHierarchy(project, null);
IType[] types = h.getSubtypes(type);
@@ -1518,17 +1518,17 @@ public void testRegion4() throws CoreException {
IJavaProject p2 = createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P1"}, "");
IJavaProject p3 = createJavaProject("P3", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P1"}, "");
createFile(
- "/P1/X.java",
+ "/P1/X.js",
"public class X {\n" +
"}"
);
createFile(
- "/P2/Y.java",
+ "/P2/Y.js",
"public class Y extends X X {\n" +
"}"
);
createFile(
- "/P3/Z.java",
+ "/P3/Z.js",
"public class Z extends X X {\n" +
"}"
);
@@ -1572,7 +1572,7 @@ public void testResilienceToMissingBinaries() throws CoreException {
createJavaProject("P", new String[] {"src"}, new String[] {"JCL_LIB", "/TypeHierarchy/test144976.jar"}, "bin");
createFolder("/P/src/tools/");
createFile(
- "/P/src/tools/DisplayTestResult2.java",
+ "/P/src/tools/DisplayTestResult2.js",
"pakage tools;\n" +
"import servlet.*;\n" +
"public class DisplayTestResult2 extends TmrServlet2 {\n" +
@@ -1580,19 +1580,19 @@ public void testResilienceToMissingBinaries() throws CoreException {
);
createFolder("/P/src/servlet/");
createFile(
- "/P/src/servlet/TmrServlet2.java",
+ "/P/src/servlet/TmrServlet2.js",
"pakage servlet;\n" +
"public class TmrServlet2 extends TmrServlet {\n" +
"}"
);
createFile(
- "/P/src/servlet/TmrServlet.java",
+ "/P/src/servlet/TmrServlet.js",
"pakage servlet;\n" +
"import gk.*;\n" +
"public class TmrServlet extends GKServlet {\n" +
"}"
);
- IType type = getCompilationUnit("P", "src", "tools", "DisplayTestResult2.java").getType("DisplayTestResult2");
+ IType type = getCompilationUnit("P", "src", "tools", "DisplayTestResult2.js").getType("DisplayTestResult2");
ITypeHierarchy hierarchy = type.newSupertypeHierarchy(null);
assertNotNull(hierarchy.getSupertypes(type));
assertHierarchyEquals(
@@ -1620,10 +1620,10 @@ public void testResolvedTypeAsFocus() throws CoreException {
"}\n" +
"class Y<E> {\n" +
"}";
- createFile("/P/X.java", source);
+ createFile("/P/X.js", source);
int start = source.indexOf("Y");
int end = source.indexOf("<String>");
- IJavaElement[] elements = getCompilationUnit("/P/X.java").codeSelect(start, end-start);
+ IJavaElement[] elements = getCompilationUnit("/P/X.js").codeSelect(start, end-start);
IType focus = (IType) elements[0];
ITypeHierarchy hierarchy = focus.newTypeHierarchy(null);
assertElementsEqual(
@@ -1644,24 +1644,24 @@ public void testRootOrder() throws CoreException, IOException {
IJavaProject project = createJavaProject("P", new String[] {"abc"}, new String[] {"JCL_LIB"}, "bin");
createFolder("/P/abc/p");
createFile(
- "/P/abc/p/X.java",
+ "/P/abc/p/X.js",
"package p;\n"+
"public class X {}"
);
createFile(
- "/P/abc/p/Y.java",
+ "/P/abc/p/Y.js",
"package p;\n"+
"public class Y extends X {}"
);
addLibrary(project, "lib.jar", "libsrc.zip", new String[] {
- "p/X.java",
+ "p/X.js",
"package p;\n"+
"public class X {}",
- "p/Y.java",
+ "p/Y.js",
"package p;\n"+
"public class Y extends X {}"
}, "1.4");
- IType type = getCompilationUnit("/P/abc/p/X.java").getType("X");
+ IType type = getCompilationUnit("/P/abc/p/X.js").getType("X");
ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
assertHierarchyEquals(
"Focus: X [in X.java [in p [in abc [in P]]]]\n" +
@@ -1679,7 +1679,7 @@ public void testRootOrder() throws CoreException, IOException {
*/
public void testSourceTypeGetSuperclass() throws JavaModelException {
//unqualified superclass in a source type
- ICompilationUnit cu = getCompilationUnit("TypeHierarchy", "src", "p1", "Y.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchy", "src", "p1", "Y.js");
IType type = cu.getType("Y");
ITypeHierarchy h = type.newSupertypeHierarchy(null);
IType superclass = h.getSuperclass(type);
@@ -1692,7 +1692,7 @@ public void testSourceTypeGetSuperclass() throws JavaModelException {
*/
public void testSourceTypeGetSuperclass2() throws JavaModelException {
//no superclass specified for a source type
- ICompilationUnit cu = getCompilationUnit("TypeHierarchy", "src", "p1", "X.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchy", "src", "p1", "X.js");
IType type = cu.getType("X");
ITypeHierarchy h = type.newSupertypeHierarchy(null);
IType superclass = h.getSuperclass(type);
@@ -1705,7 +1705,7 @@ public void testSourceTypeGetSuperclass2() throws JavaModelException {
*/
public void testSourceTypeGetSuperclass3() throws JavaModelException {
//no superclass specified for a source type
- ICompilationUnit cu = getCompilationUnit("TypeHierarchy", "src", "p1", "Deep.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchy", "src", "p1", "Deep.js");
IType type = cu.getType("Deep");
ITypeHierarchy h = type.newSupertypeHierarchy(null);
IType superclass = h.getSuperclass(type);
@@ -1717,7 +1717,7 @@ public void testSourceTypeGetSuperclass3() throws JavaModelException {
* in the same compilation unit.
*/
public void testSourceTypeGetSuperclass4() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("TypeHierarchy", "src", "p1", "A.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchy", "src", "p1", "A.js");
IType type = cu.getType("A");
ITypeHierarchy h = type.newSupertypeHierarchy(null);
IType superclass = h.getSuperclass(type);
@@ -1729,7 +1729,7 @@ public void testSourceTypeGetSuperclass4() throws JavaModelException {
* Ensures that the superinterfaces can be retrieved for a source type's superinterfaces.
*/
public void testSourceTypeGetSuperInterfaces() throws JavaModelException {
- ICompilationUnit cu = getCompilationUnit("TypeHierarchy", "src", "p1", "Y.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchy", "src", "p1", "Y.js");
IType type = cu.getType("Y");
ITypeHierarchy h = type.newSupertypeHierarchy(null);
IType[] superInterfaces = h.getSuperInterfaces(type);
@@ -1751,7 +1751,7 @@ public void testSupertypeHierarchyGetSubclasses() throws JavaModelException {
"",
types);
- ICompilationUnit cu = getCompilationUnit("TypeHierarchy", "src", "p1", "Y.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchy", "src", "p1", "Y.js");
type = cu.getType("Y");
hierarchy = type.newSupertypeHierarchy(null);
types = hierarchy.getSubclasses(type);
@@ -1772,7 +1772,7 @@ public void testSupertypeHierarchyGetSubtypes() throws JavaModelException {
"",
types);
- ICompilationUnit cu = getCompilationUnit("TypeHierarchy", "src", "p1", "Y.java");
+ ICompilationUnit cu = getCompilationUnit("TypeHierarchy", "src", "p1", "Y.js");
type = cu.getType("Y");
hierarchy = type.newSupertypeHierarchy(null);
types = hierarchy.getSubtypes(type);
@@ -1786,7 +1786,7 @@ public void testSupertypeHierarchyGetSubtypes() throws JavaModelException {
* (regression test for bug 3446 type hierarchy: incorrect behavior wrt working copies (1GLDHOA))
*/
public void testSupertypeHierarchyOnWorkingCopy() throws JavaModelException {
- ICompilationUnit cu = this.getCompilationUnit("TypeHierarchy", "src", "wc", "X.java");
+ ICompilationUnit cu = this.getCompilationUnit("TypeHierarchy", "src", "wc", "X.js");
ICompilationUnit workingCopy = null;
try {
workingCopy = cu.getWorkingCopy(null);
@@ -1832,7 +1832,7 @@ public void testSuperTypeHierarchyWithMissingBinary() throws JavaModelException
System.arraycopy(originalClasspath, 0, newClasspath, 0, length);
newClasspath[length] = JavaCore.newLibraryEntry(new Path("/TypeHierarchy/test49809.jar"), null, null);
project.setRawClasspath(newClasspath, null);
- ICompilationUnit cu = getCompilationUnit("/TypeHierarchy/src/q3/Z.java");
+ ICompilationUnit cu = getCompilationUnit("/TypeHierarchy/src/q3/Z.js");
IType type = cu.getType("Z");
ITypeHierarchy hierarchy = type.newSupertypeHierarchy(null);
assertHierarchyEquals(
@@ -1850,7 +1850,7 @@ public void testSuperTypeHierarchyWithMissingBinary() throws JavaModelException
* Ensures that a hierarchy where the super type is not visible can still be constructed.
*/
public void testVisibility1() throws JavaModelException {
- IType type = getCompilationUnit("/TypeHierarchy/src/q6/Y.java").getType("Y");
+ IType type = getCompilationUnit("/TypeHierarchy/src/q6/Y.js").getType("Y");
ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
assertHierarchyEquals(
"Focus: Y [in Y.java [in q6 [in src [in TypeHierarchy]]]]\n" +
@@ -1865,7 +1865,7 @@ public void testVisibility1() throws JavaModelException {
* Ensures that a hierarchy where the super interface is not visible can still be constructed.
*/
public void testVisibility2() throws JavaModelException {
- IType type = getCompilationUnit("/TypeHierarchy/src/q6/Z.java").getType("Z");
+ IType type = getCompilationUnit("/TypeHierarchy/src/q6/Z.js").getType("Z");
ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
assertHierarchyEquals(
"Focus: Z [in Z.java [in q6 [in src [in TypeHierarchy]]]]\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeResolveTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeResolveTests.java
index 8cb9ad4..65f834f 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeResolveTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeResolveTests.java
@@ -63,7 +63,7 @@ private String resultToString(String[][] result) {
public void setUpSuite() throws Exception {
super.setUpSuite();
this.setUpJavaProject("TypeResolve");
- this.cu = this.getCompilationUnit("TypeResolve", "src", "p", "TypeResolve.java");
+ this.cu = this.getCompilationUnit("TypeResolve", "src", "p", "TypeResolve.js");
}
static {
// TESTS_NUMBERS = new int[] { 182, 183 };
@@ -84,7 +84,7 @@ public void tearDownSuite() throws Exception {
* (regression test for bug 23829 IType::resolveType incorrectly returns null)
*/
public void testResolveInSecondaryType() throws JavaModelException {
- IType type = this.getCompilationUnit("/TypeResolve/src/p3/B.java").getType("Test");
+ IType type = this.getCompilationUnit("/TypeResolve/src/p3/B.js").getType("Test");
String[][] types = type.resolveType("B");
assertEquals(
"Unexpected result",
@@ -109,12 +109,12 @@ public void testResolveParameterizedType() throws CoreException {
try {
createJavaProject("P", new String[] {"src"}, new String[] {"JCL15_LIB"}, "bin", "1.5");
createFile(
- "/P/src/X.java",
+ "/P/src/X.js",
"public class X<T> {\n" +
" X<String> field;\n" +
"}"
);
- IType type = getCompilationUnit("/P/src/X.java").getType("X");
+ IType type = getCompilationUnit("/P/src/X.js").getType("X");
String[][] types = type.resolveType("X<String>");
assertEquals(
"Unexpected result",
@@ -150,7 +150,7 @@ public void testResolveTypeInInner() throws JavaModelException {
* (regression test for bug 48350 IType#resolveType(String) fails on local types)
*/
public void testResolveTypeInInner2() throws JavaModelException {
- IType type = this.getCompilationUnit("/TypeResolve/src/p5/A.java").getType("A").getMethod("foo", new String[] {}).getType("Local", 1);
+ IType type = this.getCompilationUnit("/TypeResolve/src/p5/A.js").getType("A").getMethod("foo", new String[] {}).getType("Local", 1);
String[][] types = type.resolveType("Object");
assertEquals(
@@ -212,7 +212,7 @@ public void testResolveString() throws JavaModelException {
* Resolve the type "A.Inner".
*/
public void testResolveInnerType1() throws JavaModelException {
- IType type = this.getCompilationUnit("/TypeResolve/src/p4/B.java").getType("B");
+ IType type = this.getCompilationUnit("/TypeResolve/src/p4/B.js").getType("B");
String[][] types = type.resolveType("A.Inner");
assertEquals(
"Unexpected result",
@@ -223,7 +223,7 @@ public void testResolveInnerType1() throws JavaModelException {
* Resolve the type "p4.A.Inner".
*/
public void testResolveInnerType2() throws JavaModelException {
- IType type = this.getCompilationUnit("/TypeResolve/src/p4/B.java").getType("B");
+ IType type = this.getCompilationUnit("/TypeResolve/src/p4/B.js").getType("B");
String[][] types = type.resolveType("p4.A.Inner");
assertEquals(
"Unexpected result",
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyNotInClasspathTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyNotInClasspathTests.java
index 51597ce..6d91e7f 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyNotInClasspathTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyNotInClasspathTests.java
@@ -41,7 +41,7 @@ public void setUp() throws Exception {
try {
this.createJavaProject("P", new String[] {"src"}, "bin");
this.createFolder("P/txt");
- IFile file = this.createFile("P/txt/X.java",
+ IFile file = this.createFile("P/txt/X.js",
"public class X {\n" +
"}");
ICompilationUnit cu = (ICompilationUnit)JavaCore.create(file);
@@ -94,8 +94,8 @@ public void testCommitWorkingCopy2() throws CoreException {
try {
createJavaProject( "P2", new String[] {"src"}, null, null, null, "bin", null, null, new String[][] {new String[] {"p1/"}}, "1.4");
createFolder("/P2/src/p1/p2");
- createFile("/P2/src/p1/p2/X.java", "");
- copy = getCompilationUnit("P2", "src", "p1.p2", "X.java").getWorkingCopy(null);
+ createFile("/P2/src/p1/p2/X.js", "");
+ copy = getCompilationUnit("P2", "src", "p1.p2", "X.js").getWorkingCopy(null);
copy.getBuffer().setContents("public class X {}");
copy.makeConsistent(null);
copy.commitWorkingCopy(false, null);
@@ -122,7 +122,7 @@ public void testGetSource() throws CoreException {
"package junit.test;\n" +
"public class X {\n" +
"}";
- IFile file = this.createFile("/P1/src/junit/test/X.java", source);
+ IFile file = this.createFile("/P1/src/junit/test/X.js", source);
ICompilationUnit cu = JavaCore.createCompilationUnitFrom(file);
copy = cu.getWorkingCopy(null);
assertEquals(
@@ -145,7 +145,7 @@ public void testReconcileNonExistingProject() throws CoreException {
ICompilationUnit wc = null;
try {
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- IFile file = root.getProject("NonExisting").getFile("A.java");
+ IFile file = root.getProject("NonExisting").getFile("A.js");
wc = JavaCore.createCompilationUnitFrom(file).getWorkingCopy(null);
wc.reconcile(ICompilationUnit.NO_AST, false, null, null);
} finally {
@@ -162,7 +162,7 @@ public void testReconcileSimpleProject() throws CoreException {
ICompilationUnit wc = null;
try {
IProject project = createProject("SimpleProject");
- IFile file = project.getFile("A.java");
+ IFile file = project.getFile("A.js");
wc = JavaCore.createCompilationUnitFrom(file);
ReconcilerTests.ProblemRequestor pbRequestor = new ReconcilerTests.ProblemRequestor();
wc.becomeWorkingCopy(pbRequestor, null);
@@ -184,7 +184,7 @@ public void testReconcileSimpleProject2() throws CoreException {
ICompilationUnit wc = null;
try {
IProject project = createProject("SimpleProject");
- IFile file = project.getFile("A.java");
+ IFile file = project.getFile("A.js");
wc = JavaCore.createCompilationUnitFrom(file);
ReconcilerTests.ProblemRequestor pbRequestor = new ReconcilerTests.ProblemRequestor();
wc.becomeWorkingCopy(pbRequestor, null);
@@ -205,7 +205,7 @@ public void testSimpleProject() throws CoreException {
try {
createProject("SimpleProject");
IFile file = createFile(
- "/SimpleProject/X.java",
+ "/SimpleProject/X.js",
"public class X {\n" +
"}"
);
@@ -260,7 +260,7 @@ public void testIsOnClasspath() throws CoreException {
"package junit.test;\n" +
"public class X {\n" +
"}";
- IFile file = this.createFile("/SimpleProject/src/junit/test/X.java", source);
+ IFile file = this.createFile("/SimpleProject/src/junit/test/X.js", source);
ICompilationUnit cu = JavaCore.createCompilationUnitFrom(file);
copy = cu.getWorkingCopy(null);
@@ -281,7 +281,7 @@ public void testReconcileAndCommit1() throws CoreException {
this.createFolder("/JavaProject/src/native.1");
String source =
"class X {}";
- IFile file = this.createFile("/JavaProject/src/native.1/X.java", source);
+ IFile file = this.createFile("/JavaProject/src/native.1/X.js", source);
ICompilationUnit cu = JavaCore.createCompilationUnitFrom(file);
copy = cu.getWorkingCopy(null);
@@ -319,7 +319,7 @@ public void testReconcileAndCommit2() throws CoreException {
this.createFolder("/SimpleProject/src/native.1");
String source =
"class X {}";
- IFile file = this.createFile("/SimpleProject/src/native.1/X.java", source);
+ IFile file = this.createFile("/SimpleProject/src/native.1/X.js", source);
ICompilationUnit cu = JavaCore.createCompilationUnitFrom(file);
copy = cu.getWorkingCopy(null);
@@ -357,7 +357,7 @@ public void testReconcileAndCommit3() throws CoreException {
this.createFolder("/SimpleProject/src/native.1");
String source =
"class X {}";
- IFile file = this.createFile("/SimpleProject/src/native.1/X.java", source);
+ IFile file = this.createFile("/SimpleProject/src/native.1/X.js", source);
primary = JavaCore.createCompilationUnitFrom(file);
primary.becomeWorkingCopy(null, null);
@@ -395,7 +395,7 @@ public void testReconcileAndCommit4() throws CoreException {
this.createFolder("/SimpleProject/src/native.1");
String source =
"class X {}";
- IFile file = this.createFile("/SimpleProject/src/native.1/some invalid name.java", source);
+ IFile file = this.createFile("/SimpleProject/src/native.1/some invalid name.js", source);
primary = JavaCore.createCompilationUnitFrom(file);
primary.becomeWorkingCopy(null, null);
@@ -435,7 +435,7 @@ public void testReconcileAndCommit5() throws CoreException {
String source =
"package p; \n" +
"public class X {}";
- IFile file = this.createFile("/JavaProject/src/invalid unit name.java", source);
+ IFile file = this.createFile("/JavaProject/src/invalid unit name.js", source);
ICompilationUnit cu = JavaCore.createCompilationUnitFrom(file);
copy = cu.getWorkingCopy(null);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyOwnerTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyOwnerTests.java
index 77c95aa..b6cedac 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyOwnerTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyOwnerTests.java
@@ -61,7 +61,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
createJavaProject("P");
createFile(
- "P/X.java",
+ "P/X.js",
"public class X {\n" +
"}"
);
@@ -107,7 +107,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
* Tests that a primary compilation unit can become a working copy.
*/
public void testBecomeWorkingCopy1() throws CoreException {
- this.workingCopy = getCompilationUnit("P/X.java");
+ this.workingCopy = getCompilationUnit("P/X.js");
assertTrue("should not be in working copy mode", !this.workingCopy.isWorkingCopy());
this.workingCopy.becomeWorkingCopy(null, null);
@@ -118,7 +118,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
* Tests that a working copy remains a working copy when becomeWorkingCopy() is called.
*/
public void testBecomeWorkingCopy2() throws CoreException {
- this.workingCopy = getCompilationUnit("P/X.java").getWorkingCopy(new TestWorkingCopyOwner(), null, null);
+ this.workingCopy = getCompilationUnit("P/X.js").getWorkingCopy(new TestWorkingCopyOwner(), null, null);
assertTrue("should be in working copy mode", this.workingCopy.isWorkingCopy());
this.workingCopy.becomeWorkingCopy(null, null);
@@ -130,7 +130,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
* there is no underlying resource.
*/
public void testBecomeWorkingCopy3() throws CoreException {
- this.workingCopy = getCompilationUnit("P/Y.java");
+ this.workingCopy = getCompilationUnit("P/Y.js");
this.workingCopy.becomeWorkingCopy(null, null);
assertSortedElementsEqual(
@@ -144,7 +144,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
* Ensure an OperationCanceledException is correcly thrown when progress monitor is canceled
*/
public void testBecomeWorkingCopy4() throws CoreException {
- this.workingCopy = getCompilationUnit("P/X.java");
+ this.workingCopy = getCompilationUnit("P/X.js");
// count the number of time isCanceled() is called when converting this source unit
CancelCounter counter = new CancelCounter();
@@ -173,11 +173,11 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
public void testCommitPrimaryWorkingCopy() throws CoreException {
try {
IFile file = createFile(
- "P/Y.java",
+ "P/Y.js",
"public class Y {\n" +
"}"
);
- this.workingCopy = getCompilationUnit("P/Y.java");
+ this.workingCopy = getCompilationUnit("P/Y.js");
this.workingCopy.becomeWorkingCopy(null, null);
String newContents =
"public class Y {\n" +
@@ -191,7 +191,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
newContents,
new String(Util.getResourceContentsAsCharArray(file)));
} finally {
- deleteFile("P/Y.java");
+ deleteFile("P/Y.js");
}
}
@@ -202,11 +202,11 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
public void testDeltaCommitPrimaryWorkingCopy1() throws CoreException {
try {
createFile(
- "P/Y.java",
+ "P/Y.js",
"public class Y {\n" +
"}"
);
- this.workingCopy = getCompilationUnit("P/Y.java");
+ this.workingCopy = getCompilationUnit("P/Y.js");
this.workingCopy.becomeWorkingCopy(null, null);
this.workingCopy.getBuffer().setContents(
"public class Y {\n" +
@@ -227,7 +227,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
);
} finally {
stopDeltas();
- deleteFile("P/Y.java");
+ deleteFile("P/Y.js");
}
}
@@ -237,11 +237,11 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
public void testDeltaCommitPrimaryWorkingCopy2() throws CoreException {
try {
createFile(
- "P/Y.java",
+ "P/Y.js",
"public class Y {\n" +
"}"
);
- this.workingCopy = getCompilationUnit("P/Y.java");
+ this.workingCopy = getCompilationUnit("P/Y.js");
this.workingCopy.becomeWorkingCopy(null, null);
this.workingCopy.getBuffer().setContents(
"public class Y {\n" +
@@ -263,7 +263,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
);
} finally {
stopDeltas();
- deleteFile("P/Y.java");
+ deleteFile("P/Y.js");
}
}
@@ -273,11 +273,11 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
public void testDeltaCreateNonPrimaryWorkingCopy() throws CoreException {
try {
createFile(
- "P/Y.java",
+ "P/Y.js",
"public class Y {\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("P/Y.java");
+ ICompilationUnit cu = getCompilationUnit("P/Y.js");
startDeltas();
this.workingCopy = cu.getWorkingCopy(null);
assertDeltas(
@@ -289,7 +289,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
);
} finally {
stopDeltas();
- deleteFile("P/Y.java");
+ deleteFile("P/Y.js");
}
}
@@ -300,11 +300,11 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
public void testDeltaBecomeWorkingCopy1() throws CoreException {
try {
createFile(
- "P/Y.java",
+ "P/Y.js",
"public class Y {\n" +
"}"
);
- this.workingCopy = getCompilationUnit("P/Y.java");
+ this.workingCopy = getCompilationUnit("P/Y.js");
startDeltas();
this.workingCopy.becomeWorkingCopy(null, null);
assertDeltas(
@@ -316,7 +316,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
);
} finally {
stopDeltas();
- deleteFile("P/Y.java");
+ deleteFile("P/Y.js");
}
}
@@ -328,7 +328,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
*/
public void testDeltaBecomeWorkingCopy2() throws CoreException {
try {
- this.workingCopy = getCompilationUnit("P/Y.java");
+ this.workingCopy = getCompilationUnit("P/Y.js");
startDeltas();
this.workingCopy.becomeWorkingCopy(null, null);
assertDeltas(
@@ -350,11 +350,11 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
public void testDeltaDiscardNonPrimaryWorkingCopy() throws CoreException {
try {
createFile(
- "P/Y.java",
+ "P/Y.js",
"public class Y {\n" +
"}"
);
- ICompilationUnit cu = getCompilationUnit("P/Y.java");
+ ICompilationUnit cu = getCompilationUnit("P/Y.js");
this.workingCopy = cu.getWorkingCopy(null);
startDeltas();
@@ -368,7 +368,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
);
} finally {
stopDeltas();
- deleteFile("P/Y.java");
+ deleteFile("P/Y.js");
}
}
@@ -379,11 +379,11 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
public void testDeltaDiscardPrimaryWorkingCopy1() throws CoreException {
try {
createFile(
- "P/Y.java",
+ "P/Y.js",
"public class Y {\n" +
"}"
);
- this.workingCopy = getCompilationUnit("P/Y.java");
+ this.workingCopy = getCompilationUnit("P/Y.js");
this.workingCopy.becomeWorkingCopy(null, null);
startDeltas();
@@ -397,7 +397,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
);
} finally {
stopDeltas();
- deleteFile("P/Y.java");
+ deleteFile("P/Y.js");
}
}
@@ -411,11 +411,11 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
public void testDeltaDiscardPrimaryWorkingCopy2() throws CoreException {
try {
createFile(
- "P/Y.java",
+ "P/Y.js",
"public class Y {\n" +
"}"
);
- this.workingCopy = getCompilationUnit("P/Y.java");
+ this.workingCopy = getCompilationUnit("P/Y.js");
this.workingCopy.becomeWorkingCopy(null, null);
this.workingCopy.getType("Y").createField("int x;", null, false, null);
@@ -432,7 +432,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
);
} finally {
stopDeltas();
- deleteFile("P/Y.java");
+ deleteFile("P/Y.js");
}
}
@@ -443,7 +443,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
*/
public void testDeltaDiscardPrimaryWorkingCopy3() throws CoreException {
try {
- this.workingCopy = getCompilationUnit("P/Y.java");
+ this.workingCopy = getCompilationUnit("P/Y.js");
this.workingCopy.becomeWorkingCopy(null, null);
startDeltas();
@@ -467,7 +467,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
*/
public void testDeltaDiscardPrimaryWorkingCopy4() throws CoreException {
try {
- this.workingCopy = getCompilationUnit("P/X.java");
+ this.workingCopy = getCompilationUnit("P/X.js");
this.workingCopy.becomeWorkingCopy(null, null);
this.workingCopy.getBuffer().setContents("/*annotation*/public class X {}");
@@ -491,7 +491,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
public void testDiscardWorkingCopy1() throws CoreException {
ICompilationUnit cu = null;
try {
- cu = getCompilationUnit("P/X.java");
+ cu = getCompilationUnit("P/X.js");
cu.becomeWorkingCopy(null, null);
assertTrue("should be in working copy mode", cu.isWorkingCopy());
@@ -511,7 +511,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
public void testDiscardWorkingCopy2() throws CoreException {
ICompilationUnit cu = null;
try {
- cu = getCompilationUnit("P/X.java");
+ cu = getCompilationUnit("P/X.js");
cu.becomeWorkingCopy(null, null);
cu.becomeWorkingCopy(null, null);
cu.becomeWorkingCopy(null, null);
@@ -539,7 +539,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
*/
public void testDiscardWorkingCopy3() throws CoreException {
try {
- ICompilationUnit cu = getCompilationUnit("P/X.java");
+ ICompilationUnit cu = getCompilationUnit("P/X.js");
TestWorkingCopyOwner owner = new TestWorkingCopyOwner();
this.workingCopy = cu.getWorkingCopy(owner, null, null);
this.workingCopy = cu.getWorkingCopy(owner, null, null);
@@ -573,7 +573,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
* Tests that a non-primary working copy that is discarded cannot be reopened.
*/
public void testDiscardWorkingCopy4() throws CoreException {
- ICompilationUnit cu = getCompilationUnit("P/X.java");
+ ICompilationUnit cu = getCompilationUnit("P/X.js");
TestWorkingCopyOwner owner = new TestWorkingCopyOwner();
this.workingCopy = cu.getWorkingCopy(owner, null, null);
@@ -603,7 +603,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
public void testDiscardWorkingCopy5() throws CoreException {
ICompilationUnit cu = null;
try {
- cu = getCompilationUnit("P/Y.java");
+ cu = getCompilationUnit("P/Y.js");
cu.becomeWorkingCopy(null, null);
cu.discardWorkingCopy();
@@ -625,11 +625,11 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
public void testGetCorrespondingResource() throws CoreException {
ICompilationUnit cu = null;
try {
- cu = getCompilationUnit("P/X.java");
+ cu = getCompilationUnit("P/X.js");
cu.becomeWorkingCopy(null, null);
assertResourceNamesEqual(
"Unexpected resource",
- "X.java",
+ "X.js",
new Object[] {cu.getCorrespondingResource()});
} finally {
if (cu != null) {
@@ -642,7 +642,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
* Ensures that getOwner() returns the correct owner for a non-primary working copy.
*/
public void testGetOwner1() throws CoreException {
- ICompilationUnit cu = getCompilationUnit("P/X.java");
+ ICompilationUnit cu = getCompilationUnit("P/X.js");
TestWorkingCopyOwner owner = new TestWorkingCopyOwner();
this.workingCopy = cu.getWorkingCopy(owner, null, null);
@@ -653,7 +653,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
* Ensures that getOwner() returns null for a primary compilation unit.
*/
public void testGetOwner2() {
- ICompilationUnit cu = getCompilationUnit("P/X.java");
+ ICompilationUnit cu = getCompilationUnit("P/X.js");
assertEquals("Unexpected owner", null, cu.getOwner());
}
@@ -661,7 +661,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
* Ensures that getPrimary() on a non-primary working copy returns the primary compilation unit.
*/
public void testGetPrimary1() throws CoreException {
- ICompilationUnit cu = getCompilationUnit("P/X.java");
+ ICompilationUnit cu = getCompilationUnit("P/X.js");
TestWorkingCopyOwner owner = new TestWorkingCopyOwner();
this.workingCopy = cu.getWorkingCopy(owner, null, null);
@@ -672,7 +672,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
* Ensures that getPrimary() on a primary working copy returns the same handle.
*/
public void testGetPrimary2() throws CoreException {
- this.workingCopy = getCompilationUnit("P/X.java");
+ this.workingCopy = getCompilationUnit("P/X.js");
this.workingCopy.becomeWorkingCopy(null, null);
assertEquals("Unexpected compilation unit", this.workingCopy, this.workingCopy.getPrimary());
@@ -683,7 +683,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
* an element ofthe primary compilation unit.
*/
public void testGetPrimaryElement1() throws CoreException {
- ICompilationUnit cu = getCompilationUnit("P/X.java");
+ ICompilationUnit cu = getCompilationUnit("P/X.js");
TestWorkingCopyOwner owner = new TestWorkingCopyOwner();
this.workingCopy = cu.getWorkingCopy(owner, null, null);
IJavaElement element = this.workingCopy.getType("X");
@@ -695,7 +695,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
* Ensures that getPrimaryElement() on an element of primary working copy returns the same handle.
*/
public void testGetPrimaryElement2() throws CoreException {
- this.workingCopy = getCompilationUnit("P/X.java");
+ this.workingCopy = getCompilationUnit("P/X.js");
this.workingCopy.becomeWorkingCopy(null, null);
IJavaElement element = this.workingCopy.getType("X");
@@ -735,7 +735,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
);
// create working copy on existing cu
- ICompilationUnit cu1 = getCompilationUnit("P/X.java");
+ ICompilationUnit cu1 = getCompilationUnit("P/X.js");
workingCopy11 = cu1.getWorkingCopy(owner1, null, null);
assertSortedElementsEqual(
"Unexpected working copies (2)",
@@ -744,7 +744,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
);
// create working copy on non-existing cu
- ICompilationUnit cu2 = getCompilationUnit("P/Y.java");
+ ICompilationUnit cu2 = getCompilationUnit("P/Y.js");
workingCopy12 = cu2.getWorkingCopy(owner1, null, null);
assertSortedElementsEqual(
"Unexpected working copies (3)",
@@ -798,7 +798,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
*/
public void testGetWorkingCopy1() throws CoreException {
try {
- ICompilationUnit cu = getCompilationUnit("P/X.java");
+ ICompilationUnit cu = getCompilationUnit("P/X.js");
TestWorkingCopyOwner owner = new TestWorkingCopyOwner();
this.workingCopy = cu.getWorkingCopy(owner, null, null);
@@ -821,7 +821,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
ICompilationUnit workingCopy1 = null;
ICompilationUnit workingCopy2 = null;
try {
- ICompilationUnit cu = getCompilationUnit("P/X.java");
+ ICompilationUnit cu = getCompilationUnit("P/X.js");
TestWorkingCopyOwner owner1 = new TestWorkingCopyOwner();
workingCopy1 = cu.getWorkingCopy(owner1, null, null);
TestWorkingCopyOwner owner2 = new TestWorkingCopyOwner();
@@ -846,13 +846,13 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
public void testHierarchy() throws CoreException {
try {
createFile(
- "/P/Y.java",
+ "/P/Y.js",
"public class Y extends X {\n" +
"}"
);
WorkingCopyOwner owner = new TestWorkingCopyOwner();
- this.workingCopy = getCompilationUnit("/P/Y.java").getWorkingCopy(owner, null/*no problem requestor*/, null/*no progress*/);
- IType focus = getCompilationUnit("/P/X.java").getType("X");
+ this.workingCopy = getCompilationUnit("/P/Y.js").getWorkingCopy(owner, null/*no problem requestor*/, null/*no progress*/);
+ IType focus = getCompilationUnit("/P/X.js").getType("X");
ITypeHierarchy hierarchy = focus.newTypeHierarchy(owner, null/*no progress*/);
IType[] subtypes = hierarchy.getSubtypes(focus);
assertTypesEqual(
@@ -860,7 +860,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
"Y\n",
subtypes);
} finally {
- deleteFile("/P/Y.java");
+ deleteFile("/P/Y.js");
}
}
@@ -873,13 +873,13 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
try {
createFolder("/P/p1");
createFile(
- "/P/p1/Y.java",
+ "/P/p1/Y.js",
"package p1;\n" +
"public class Y {\n" +
"}"
);
createFolder("/P/p2");
- this.workingCopy = getCompilationUnit("P/p1/Y.java");
+ this.workingCopy = getCompilationUnit("P/p1/Y.js");
this.workingCopy.becomeWorkingCopy(null, null);
// ensure the package is open
@@ -901,7 +901,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
*/
public void testNewWorkingCopy01() throws JavaModelException {
this.workingCopy = newExternalWorkingCopy(
- "X.java",
+ "X.js",
"public class X {\n" +
"}"
);
@@ -913,7 +913,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
*/
public void testNewWorkingCopy02() throws CoreException {
this.workingCopy = newExternalWorkingCopy(
- "X.java",
+ "X.js",
"public class X {\n" +
"}"
);
@@ -929,11 +929,11 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
*/
public void testNewWorkingCopy03() throws CoreException {
this.workingCopy = newExternalWorkingCopy(
- "X.java",
+ "X.js",
"public class X {\n" +
"}"
);
- assertEquals("Unexpected path", "/" + ExternalJavaProject.EXTERNAL_PROJECT_NAME + "/X.java", this.workingCopy.getPath().toString());
+ assertEquals("Unexpected path", "/" + ExternalJavaProject.EXTERNAL_PROJECT_NAME + "/X.js", this.workingCopy.getPath().toString());
}
/*
@@ -941,7 +941,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
*/
public void testNewWorkingCopy04() throws CoreException {
this.workingCopy = newExternalWorkingCopy(
- "X.java",
+ "X.js",
"public class X {\n" +
"}"
);
@@ -953,7 +953,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
*/
public void testNewWorkingCopy05() throws CoreException {
this.workingCopy = newExternalWorkingCopy(
- "X.java",
+ "X.js",
"public class X {\n" +
"}"
);
@@ -980,7 +980,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
*/
public void testNewWorkingCopy06() throws CoreException {
this.workingCopy = newExternalWorkingCopy(
- "X.java",
+ "X.js",
"public class X {\n" +
"}"
);
@@ -1003,7 +1003,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
*/
public void testNewWorkingCopy07() throws CoreException {
this.workingCopy = newExternalWorkingCopy(
- "X.java",
+ "X.js",
"public class X {\n" +
"}"
);
@@ -1031,7 +1031,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
return buffer;
}
};
- this.workingCopy = owner.newWorkingCopy("X.java", null/*no classpath*/, null/*no problem requestor*/, null/*no progress monitor*/);
+ this.workingCopy = owner.newWorkingCopy("X.js", null/*no classpath*/, null/*no problem requestor*/, null/*no progress monitor*/);
this.workingCopy.commitWorkingCopy(true, null);
assertFalse("Should not have unsaved changes", this.workingCopy.hasUnsavedChanges());
}
@@ -1042,7 +1042,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
*/
public void testNewWorkingCopy09() throws CoreException {
this.workingCopy = newExternalWorkingCopy(
- "X.java",
+ "X.js",
"public class X {\n" +
"}"
);
@@ -1059,14 +1059,14 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
ICompilationUnit workingCopy2 = null;
try {
TestWorkingCopyOwner owner = new TestWorkingCopyOwner();
- workingCopy1 = getCompilationUnit("P/X.java").getWorkingCopy(owner, null, null);
+ workingCopy1 = getCompilationUnit("P/X.js").getWorkingCopy(owner, null, null);
workingCopy1.getBuffer().setContents(
"public class X implements I {\n" +
"}"
);
workingCopy1.makeConsistent(null);
- workingCopy2 = getCompilationUnit("P/I.java").getWorkingCopy(owner, null, null);
+ workingCopy2 = getCompilationUnit("P/I.js").getWorkingCopy(owner, null, null);
workingCopy2.getBuffer().setContents(
"public interface I {\n" +
"}"
@@ -1102,7 +1102,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
*/
public void testParseCompilationUnit2() throws CoreException {
TestWorkingCopyOwner owner = new TestWorkingCopyOwner();
- this.workingCopy = getCompilationUnit("P/Y.java").getWorkingCopy(owner, null, null);
+ this.workingCopy = getCompilationUnit("P/Y.js").getWorkingCopy(owner, null, null);
this.workingCopy.getBuffer().setContents(
"public class Y {\n" +
"}"
@@ -1114,7 +1114,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
"}").toCharArray();
ASTParser parser = ASTParser.newParser(AST.JLS2);
parser.setSource(source);
- parser.setUnitName("Z.java");
+ parser.setUnitName("Z.js");
parser.setProject(getJavaProject("P"));
parser.setWorkingCopyOwner(owner);
parser.setResolveBindings(true);
@@ -1156,7 +1156,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
// create libsrc and attach source
createFolder("P1/libsrc");
createFile(
- "P1/libsrc/X.java",
+ "P1/libsrc/X.js",
"public class X extends Y {\n" +
"}"
);
@@ -1164,11 +1164,11 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
lib.attachSource(new Path("/P1/libsrc"), null, null);
// create Y.java in src folder
- createFile("P1/src/Y.java", "");
+ createFile("P1/src/Y.js", "");
// create working copy on Y.java
TestWorkingCopyOwner owner = new TestWorkingCopyOwner();
- this.workingCopy = getCompilationUnit("P1/src/Y.java").getWorkingCopy(owner, null, null);
+ this.workingCopy = getCompilationUnit("P1/src/Y.js").getWorkingCopy(owner, null, null);
this.workingCopy.getBuffer().setContents(
"public class Y {\n" +
"}"
@@ -1200,7 +1200,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
* Ensures that searching takes the owner's working copies into account.
*/
public void testSearch1() throws CoreException {
- ICompilationUnit cu = getCompilationUnit("P/Y.java");
+ ICompilationUnit cu = getCompilationUnit("P/Y.js");
TestWorkingCopyOwner owner = new TestWorkingCopyOwner();
this.workingCopy = cu.getWorkingCopy(owner, null, null);
this.workingCopy.getBuffer().setContents(
@@ -1231,7 +1231,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
* Ensures that searching takes the owner's working copies into account.
*/
public void testSearch2() throws CoreException {
- ICompilationUnit cu = getCompilationUnit("P/X.java");
+ ICompilationUnit cu = getCompilationUnit("P/X.js");
TestWorkingCopyOwner owner = new TestWorkingCopyOwner();
this.workingCopy = cu.getWorkingCopy(owner, null, null);
@@ -1262,8 +1262,8 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
*/
public void testSearch3() throws CoreException {
try {
- createFile("/P/Y.java", "");
- this.workingCopy = getCompilationUnit("P/Y.java");
+ createFile("/P/Y.js", "");
+ this.workingCopy = getCompilationUnit("P/Y.js");
this.workingCopy.becomeWorkingCopy(null, null);
// create type Y in working copy
@@ -1294,7 +1294,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
"Y.java Y [Y]",
resultCollector.toString());
} finally {
- deleteFile("/P/Y.java");
+ deleteFile("/P/Y.js");
}
}
@@ -1306,8 +1306,8 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
ICompilationUnit primaryWorkingCopy = null;
try {
createFolder("P/p");
- createFile("/P/p/Y.java", "");
- primaryWorkingCopy = getCompilationUnit("P/p/Y.java");
+ createFile("/P/p/Y.js", "");
+ primaryWorkingCopy = getCompilationUnit("P/p/Y.js");
primaryWorkingCopy.becomeWorkingCopy(null, null);
// create type Y in working copy
@@ -1318,7 +1318,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
primaryWorkingCopy.makeConsistent(null);
// create new working copy on X.java and add type X
- this.workingCopy = getCompilationUnit("P/p/X.java").getWorkingCopy(null);
+ this.workingCopy = getCompilationUnit("P/p/X.js").getWorkingCopy(null);
this.workingCopy.getBuffer().setContents(
"package p;\n" +
"public class X {\n" +
@@ -1348,7 +1348,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
if (primaryWorkingCopy != null) {
primaryWorkingCopy.discardWorkingCopy();
}
- deleteFile("/P/p/Y.java");
+ deleteFile("/P/p/Y.js");
}
}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopySearchTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopySearchTests.java
index 7684e72..a58ddaa 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopySearchTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopySearchTests.java
@@ -45,7 +45,7 @@ public class WorkingCopySearchTests extends JavaSearchTests {
protected void setUp() throws Exception {
super.setUp();
try {
- this.workingCopy = this.getCompilationUnit("JavaSearch", "src", "wc", "X.java").getWorkingCopy(null);
+ this.workingCopy = this.getCompilationUnit("JavaSearch", "src", "wc", "X.js").getWorkingCopy(null);
} catch (JavaModelException e) {
e.printStackTrace();
}
@@ -64,7 +64,7 @@ public class WorkingCopySearchTests extends JavaSearchTests {
* Hierarchy scope on a working copy test.
*/
public void testHierarchyScopeOnWorkingCopy() throws CoreException {
- ICompilationUnit unit = this. getCompilationUnit("JavaSearch", "src", "a9", "A.java");
+ ICompilationUnit unit = this. getCompilationUnit("JavaSearch", "src", "a9", "A.js");
ICompilationUnit copy = unit.getWorkingCopy(null);
try {
IType type = copy.getType("A");
@@ -181,7 +181,7 @@ public class WorkingCopySearchTests extends JavaSearchTests {
* (regression test for bug 44884 Wrong list displayed while code completion)
*/
public void testAllTypeNames3() throws CoreException {
- ICompilationUnit wc = getCompilationUnit("/JavaSearch/wc3/X44884.java");
+ ICompilationUnit wc = getCompilationUnit("/JavaSearch/wc3/X44884.js");
try {
wc.becomeWorkingCopy(null, null);
wc.getBuffer().setContents(
@@ -220,7 +220,7 @@ public class WorkingCopySearchTests extends JavaSearchTests {
* (regression test for bug 44884 Wrong list displayed while code completion)
*/
public void testAllTypeNames4() throws CoreException {
- ICompilationUnit wc = getCompilationUnit("/JavaSearch/wc3/X44884.java");
+ ICompilationUnit wc = getCompilationUnit("/JavaSearch/wc3/X44884.js");
try {
wc.becomeWorkingCopy(null, null);
wc.getBuffer().setContents(
@@ -295,14 +295,14 @@ public class WorkingCopySearchTests extends JavaSearchTests {
projects[0] = createJavaProject("P1");
projects[1] = createJavaProject("P2");
workingCopies = new ICompilationUnit[2];
- workingCopies[0] = getWorkingCopy("/P1/p1/A1.java",
+ workingCopies[0] = getWorkingCopy("/P1/p1/A1.js",
"package p1;\n" +
"public class A1 {\n" +
" public static class A1Inner1 {}" +
" public static class A1Inner2 {}" +
"}"
);
- workingCopies[1] = getWorkingCopy("/P2/p2/A2.java",
+ workingCopies[1] = getWorkingCopy("/P2/p2/A2.js",
"package p2;\n" +
"public class A2 {\n" +
" public static class A2Inner1 {}" +
@@ -364,8 +364,8 @@ public class WorkingCopySearchTests extends JavaSearchTests {
public void testMoveType() throws CoreException {
// move type X from working copy in one package to a working copy in another package
- ICompilationUnit workingCopy1 = getCompilationUnit("JavaSearch", "src", "wc1", "X.java").getWorkingCopy(null);
- ICompilationUnit workingCopy2 = getCompilationUnit("JavaSearch", "src", "wc2", "Y.java").getWorkingCopy(null);
+ ICompilationUnit workingCopy1 = getCompilationUnit("JavaSearch", "src", "wc1", "X.js").getWorkingCopy(null);
+ ICompilationUnit workingCopy2 = getCompilationUnit("JavaSearch", "src", "wc2", "Y.js").getWorkingCopy(null);
try {
workingCopy1.getType("X").move(workingCopy2, null, null, true, null);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyTests.java
index 82b9b37..7c24ba4 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyTests.java
@@ -50,28 +50,15 @@ protected void setUp() throws Exception {
new String[] {"src"},
new String[] {this.getExternalJCLPathString(), "lib"},
"bin");
- this.createFolder("P/src/x/y");
- this.createFile("P/src/x/y/A.java",
- "package x.y;\n" +
- "import java.io.File;\n" +
- "public class A {\n" +
- " public class Inner {\n" +
- " public class InnerInner {\n" +
- " }\n" +
- " int innerField;\n" +
- " void innerMethod() {\n" +
- " }\n" +
+// this.createFolder("P/src");
+ this.createFile("P/src/A.js",
+ " var FIELD;\n" +
+ " var field1;\n" +
+ " var field2;\n" +
+ " function foo() {\n" +
" }\n" +
- " static String FIELD;\n" +
- " {\n" +
- " FIELD = File.pathSeparator;\n" +
- " }\n" +
- " int field1;\n" +
- " boolean field2;\n" +
- " public void foo() {\n" +
- " }\n" +
- "}");
- this.cu = this.getCompilationUnit("P/src/x/y/A.java");
+ "");
+ this.cu = this.getCompilationUnit("P/src/A.js");
this.copy = cu.getWorkingCopy(null);
} catch (CoreException e) {
e.printStackTrace();
@@ -89,11 +76,9 @@ protected void tearDown() throws Exception {
*/
public void testCancelMakeConsistent() throws JavaModelException {
String newContents =
- "package x.y;\n" +
- "public class A {\n" +
- " public void bar() {\n" +
+ " function bar() {\n" +
" }\n" +
- "}";
+ "";
this.copy.getBuffer().setContents(newContents);
NullProgressMonitor monitor = new NullProgressMonitor();
monitor.setCanceled(true);
@@ -109,10 +94,7 @@ public void testCancelMakeConsistent() throws JavaModelException {
*/
public void testChangeContent() throws CoreException {
String newContents =
- "package x.y;\n" +
- "public class A {\n" +
- " public void bar() {\n" +
- " }\n" +
+ " function bar() {\n" +
"}";
this.copy.getBuffer().setContents(newContents);
this.copy.reconcile(ICompilationUnit.NO_AST, false, null, null);
@@ -162,10 +144,7 @@ public void testChangeContentOfReadOnlyCU2() throws CoreException {
return;
}
String newContents =
- "package x.y;\n" +
- "public class A {\n" +
- " public void bar() {\n" +
- " }\n" +
+ " function bar() {\n" +
"}";
IResource resource = this.cu.getUnderlyingResource();
IProject project = resource.getProject();
@@ -195,36 +174,36 @@ public void testChangeContentOfReadOnlyCU2() throws CoreException {
*/
public void testContents() throws CoreException {
String originalSource = this.cu.getSource();
- IType type = this.cu.getType("A");
+ IField type = this.cu.getField("field1");
assertDeletion(type);
assertSourceEquals("source code of copy should still be original", originalSource, this.copy.getSource());
}
-/**
- * Test creating a working copy on a class file with a customized buffer.
- */
-public void testOnClassFile() throws JavaModelException, IOException {
- // ensure the external JCL is copied
- setupExternalJCL("jclMin");
-
- this.attachSource(this.getPackageFragmentRoot("P", this.getExternalJCLPathString()), this.getExternalJCLSourcePath().toOSString(), "src");
- IClassFile classFile = this.getClassFile("P", this.getExternalJCLPathString(), "java.lang", "Object.class");
- WorkingCopyOwner owner = new TestWorkingCopyOwner();
- ICompilationUnit customizedCopy = classFile.getWorkingCopy(owner, null);
- try {
- IBuffer buffer = customizedCopy.getBuffer();
- assertTrue("Unexpected buffer", buffer instanceof TestBuffer);
- assertTrue("Buffer should be initialized with source", buffer.getCharacters().length > 0);
- } finally {
- customizedCopy.discardWorkingCopy();
- }
-}
+///**
+// * Test creating a working copy on a class file with a customized buffer.
+// */
+//public void testOnClassFile() throws JavaModelException, IOException {
+// // ensure the external JCL is copied
+// setupExternalJCL("jclMin");
+//
+// this.attachSource(this.getPackageFragmentRoot("P", this.getExternalJCLPathString()), this.getExternalJCLSourcePath().toOSString(), "src");
+// IClassFile classFile = this.getClassFile("P", this.getExternalJCLPathString(), "java.lang", "Object.class");
+// WorkingCopyOwner owner = new TestWorkingCopyOwner();
+// ICompilationUnit customizedCopy = classFile.getWorkingCopy(owner, null);
+// try {
+// IBuffer buffer = customizedCopy.getBuffer();
+// assertTrue("Unexpected buffer", buffer instanceof TestBuffer);
+// assertTrue("Buffer should be initialized with source", buffer.getCharacters().length > 0);
+// } finally {
+// customizedCopy.discardWorkingCopy();
+// }
+//}
/**
* Create the compilation unit place holder for the working copy tests.
*/
public void testCreation() {
- assertTrue("Failed to create X.java compilation unit", this.cu != null && this.cu.exists());
- assertTrue("Failed to create working copy on X.java", this.copy != null && this.copy.exists());
+ assertTrue("Failed to create X.js compilation unit", this.cu != null && this.cu.exists());
+ assertTrue("Failed to create working copy on X.js", this.copy != null && this.copy.exists());
}
/**
@@ -263,9 +242,8 @@ public void testDelete2Fields() throws CoreException {
JavaCore.run(
new IWorkspaceRunnable() {
public void run(IProgressMonitor monitor) throws CoreException {
- IType type = copy.getType("A");
- IField field1 = type.getField("field1");
- IField field2 = type.getField("field2");
+ IField field1 = copy.getField("field1");
+ IField field2 = copy.getField("field2");
field1.delete(false, monitor);
field2.delete(false, monitor);
}
@@ -273,9 +251,8 @@ public void testDelete2Fields() throws CoreException {
null);
assertDeltas(
"Unexpected delta",
- "A[*]: {CHILDREN | FINE GRAINED}\n" +
- " field1[-]: {}\n" +
- " field2[-]: {}"
+ "field1[-]: {}\n" +
+ "field2[-]: {}"
);
} finally {
stopDeltas();
@@ -293,21 +270,21 @@ public void testGeneral() throws JavaModelException, CoreException {
assertTrue("copy and actual should not be equal", !this.copy.equals(this.cu));
- IType copyType= this.copy.getType("A");
+ IField copyfield= this.copy.getField("field1");
assertEquals("primary should be the samel", this.cu, this.cu.getPrimary());
assertEquals("getting working copy from a copy should yield original copy", this.copy, this.copy.getWorkingCopy(null));
boolean ex= false;
- assertDeletion(copyType);
+ assertDeletion(copyfield);
// closing the package should not close the copy
((IOpenable)this.cu.getParent()).close();
assertTrue("copy should still be open", this.copy.isOpen());
// verify original still present
- assertTrue("actual type should still be present", this.cu.getType("A").exists());
+ assertTrue("actual type should still be present", this.cu.getField("field1").exists());
// getAnother working copy
ICompilationUnit copy2= this.cu.getWorkingCopy(null);
@@ -315,10 +292,10 @@ public void testGeneral() throws JavaModelException, CoreException {
assertTrue("working copies should be unique ", !(this.copy.equals(copy2)));
// delete a method from the 2nd working copy.
- IMethod method= copy2.getType("A").getMethod("foo", null);
+ IMethod method= copy2.getMethod("foo", null);
assertDeletion(method);
- IMethod originalMethod= this.cu.getType("A").getMethod("foo", null);
+ IMethod originalMethod= this.cu.getMethod("foo", null);
assertTrue("method should still be present in original", originalMethod.exists());
// commit the changes from the 2nd copy.
@@ -345,7 +322,7 @@ public void testGeneral() throws JavaModelException, CoreException {
}
// now the type should be gone.
- assertTrue("original type should no longer be present", !this.cu.getType("A").exists());
+ assertTrue("original type should no longer be present", !this.cu.getField("field1").exists());
this.copy.close();
@@ -370,25 +347,25 @@ public void testGeneral() throws JavaModelException, CoreException {
copy2.discardWorkingCopy();
}
}
-/**
- * Ensures that the primary element of a binary element is itself.
- */
-public void testGetPrimaryBinaryElement() throws CoreException {
- /* Evaluate the following in a scrapbook:
- org.eclipse.wst.jsdt.core.tests.model.ModifyingResourceTests.generateClassFile(
- "A",
- "public class A {\n" +
- "}")
- */
- byte[] bytes = new byte[] {
- -54, -2, -70, -66, 0, 3, 0, 45, 0, 10, 1, 0, 1, 65, 7, 0, 1, 1, 0, 16, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 79, 98, 106, 101, 99, 116, 7, 0, 3, 1, 0, 6, 60, 105, 110, 105, 116, 62, 1, 0, 3, 40, 41, 86, 1, 0, 4, 67, 111, 100, 101, 12, 0, 5, 0, 6, 10, 0, 4, 0, 8, 0, 33, 0, 2, 0, 4, 0, 0, 0,
- 0, 0, 1, 0, 1, 0, 5, 0, 6, 0, 1, 0, 7, 0, 0, 0, 17, 0, 1, 0, 1, 0, 0, 0, 5, 42, -73, 0, 9, -79, 0, 0, 0, 0, 0, 0,
- };
- this.createFile("P/lib/A.class", bytes);
- IClassFile cf = this.getClassFile("P/lib/A.class");
- IJavaElement primary = cf.getPrimaryElement();
- assertEquals("Primary element should be the same", cf, primary);
-}
+///**
+// * Ensures that the primary element of a binary element is itself.
+// */
+//public void testGetPrimaryBinaryElement() throws CoreException {
+// /* Evaluate the following in a scrapbook:
+// org.eclipse.wst.jsdt.core.tests.model.ModifyingResourceTests.generateClassFile(
+// "A",
+// "public class A {\n" +
+// "}")
+// */
+// byte[] bytes = new byte[] {
+// -54, -2, -70, -66, 0, 3, 0, 45, 0, 10, 1, 0, 1, 65, 7, 0, 1, 1, 0, 16, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 79, 98, 106, 101, 99, 116, 7, 0, 3, 1, 0, 6, 60, 105, 110, 105, 116, 62, 1, 0, 3, 40, 41, 86, 1, 0, 4, 67, 111, 100, 101, 12, 0, 5, 0, 6, 10, 0, 4, 0, 8, 0, 33, 0, 2, 0, 4, 0, 0, 0,
+// 0, 0, 1, 0, 1, 0, 5, 0, 6, 0, 1, 0, 7, 0, 0, 0, 17, 0, 1, 0, 1, 0, 0, 0, 5, 42, -73, 0, 9, -79, 0, 0, 0, 0, 0, 0,
+// };
+// this.createFile("P/lib/A.class", bytes);
+// IClassFile cf = this.getClassFile("P/lib/A.class");
+// IJavaElement primary = cf.getPrimaryElement();
+// assertEquals("Primary element should be the same", cf, primary);
+//}
/**
* Ensures that the primary cu can be retrieved.
*/
@@ -401,75 +378,73 @@ public void testGetPrimaryCU() {
* Ensures that the primary field can be retrieved.
*/
public void testGetPrimaryField() {
- IType type = this.copy.getType("A");
- IJavaElement primary = type.getField("FIELD").getPrimaryElement();
- assertTrue("Element is not a field", primary instanceof IField && !((ICompilationUnit)primary.getParent().getParent()).isWorkingCopy());
- assertTrue("Element should exist", primary.exists());
-}
-/**
- * Ensures that the primary import declaration can be retrieved.
- */
-public void testGetPrimaryImportDeclaration() {
- IImportDeclaration imprt = copy.getImport("java.io.File");
- IJavaElement primary = imprt.getPrimaryElement();
- assertTrue("Element should exist", primary.exists());
-}
-/**
- * Ensures that the primary import container can be retrieved.
- */
-public void testGetPrimaryImportContainer() {
- IImportContainer container = this.copy.getImportContainer();
- IJavaElement primary = container.getPrimaryElement();
- assertTrue("Element should not be null", primary != null);
- assertTrue("Element should exist", primary.exists());
-}
-/**
- * Ensures that the primary initializer can be retrieved.
- */
-public void testGetPrimaryInitializer() {
- IType type= copy.getType("A");
- IJavaElement primary= type.getInitializer(1).getPrimaryElement();
- assertTrue("Element should exist", primary.exists());
-}
-/**
- */
-public void testGetPrimaryInnerField() {
- IType innerType = this.copy.getType("A").getType("Inner");
- IJavaElement primary = innerType.getField("innerField").getPrimaryElement();
- assertTrue("Element is not a field", primary instanceof IField);
- assertTrue("Element should exist", primary.exists());
-}
-/**
- */
-public void testGetPrimaryInnerMethod() throws JavaModelException {
- IType innerType = this.copy.getType("A").getType("Inner");
- IJavaElement primary = innerType.getMethods()[0].getPrimaryElement();
- assertTrue("Element is not a method", primary instanceof IMethod);
- assertTrue("Element should exist", primary.exists());
-}
-/**
- */
-public void testGetPrimaryInnerType() {
- IType innerInnerType = this.copy.getType("A").getType("Inner").getType("InnerInner");
- IJavaElement primary = innerInnerType.getPrimaryElement();
- assertTrue("Element is not a method", primary instanceof IType);
+ IJavaElement primary = this.copy.getField("FIELD").getPrimaryElement();
+ assertTrue("Element is not a field", primary instanceof IField && !((ICompilationUnit)primary.getParent()).isWorkingCopy());
assertTrue("Element should exist", primary.exists());
-
- Vector hierarchy = new Vector(5);
- IJavaElement parent= primary.getParent();
- while (parent.getElementType() > IJavaElement.COMPILATION_UNIT) {
- hierarchy.addElement(parent);
- parent = parent.getParent();
- }
- hierarchy.addElement(parent);
- assertTrue("Compilation Unit should not be a working copy", !((ICompilationUnit)hierarchy.lastElement()).isWorkingCopy());
}
+///**
+// * Ensures that the primary import declaration can be retrieved.
+// */
+//public void testGetPrimaryImportDeclaration() {
+// IImportDeclaration imprt = copy.getImport("java.io.File");
+// IJavaElement primary = imprt.getPrimaryElement();
+// assertTrue("Element should exist", primary.exists());
+//}
+///**
+// * Ensures that the primary import container can be retrieved.
+// */
+//public void testGetPrimaryImportContainer() {
+// IImportContainer container = this.copy.getImportContainer();
+// IJavaElement primary = container.getPrimaryElement();
+// assertTrue("Element should not be null", primary != null);
+// assertTrue("Element should exist", primary.exists());
+//}
+/////**
+//// * Ensures that the primary initializer can be retrieved.
+//// */
+////public void testGetPrimaryInitializer() {
+//// IType type= copy.getType("A");
+//// IJavaElement primary= type.getInitializer(1).getPrimaryElement();
+//// assertTrue("Element should exist", primary.exists());
+////}
+///**
+// */
+//public void testGetPrimaryInnerField() {
+// IType innerType = this.copy.getType("A").getType("Inner");
+// IJavaElement primary = innerType.getField("innerField").getPrimaryElement();
+// assertTrue("Element is not a field", primary instanceof IField);
+// assertTrue("Element should exist", primary.exists());
+//}
+///**
+// */
+//public void testGetPrimaryInnerMethod() throws JavaModelException {
+// IType innerType = this.copy.getType("A").getType("Inner");
+// IJavaElement primary = innerType.getMethods()[0].getPrimaryElement();
+// assertTrue("Element is not a method", primary instanceof IMethod);
+// assertTrue("Element should exist", primary.exists());
+//}
+///**
+// */
+//public void testGetPrimaryInnerType() {
+// IType innerInnerType = this.copy.getType("A").getType("Inner").getType("InnerInner");
+// IJavaElement primary = innerInnerType.getPrimaryElement();
+// assertTrue("Element is not a method", primary instanceof IType);
+// assertTrue("Element should exist", primary.exists());
+//
+// Vector hierarchy = new Vector(5);
+// IJavaElement parent= primary.getParent();
+// while (parent.getElementType() > IJavaElement.COMPILATION_UNIT) {
+// hierarchy.addElement(parent);
+// parent = parent.getParent();
+// }
+// hierarchy.addElement(parent);
+// assertTrue("Compilation Unit should not be a working copy", !((ICompilationUnit)hierarchy.lastElement()).isWorkingCopy());
+//}
/**
* Ensures that the primary method can be retrieved.
*/
public void testGetPrimaryMethod() throws JavaModelException {
- IType type = this.copy.getType("A");
- IJavaElement primary= type.getMethods()[0].getPrimaryElement();
+ IJavaElement primary= this.copy.getMethods()[0].getPrimaryElement();
assertTrue("Element is not a method", primary instanceof IMethod);
assertTrue("Element should exist", primary.exists());
}
@@ -479,75 +454,58 @@ public void testGetPrimaryMethod() throws JavaModelException {
* unit.
*/
public void testRenameMethod() throws JavaModelException {
- IType type = this.copy.getType("A");
- IMethod method = type.getMethods()[0];
+ IMethod method = this.copy.getMethods()[0];
IJavaElement primary= method.getPrimaryElement();
method.rename("bar", false, null);
- assertEquals("Invalid name of working copy method", "bar", type.getMethods()[0].getElementName());
+ assertEquals("Invalid name of working copy method", "bar", this.copy.getMethods()[0].getElementName());
assertEquals("Invalid name of primary method", "foo", primary.getElementName());
}
-/**
- * Ensures that the primary package declaration can be retrieved.
- */
-public void testGetPrimaryPackageDeclaration() {
- IPackageDeclaration pkg = this.copy.getPackageDeclaration("x.y");
- IJavaElement primary = pkg.getPrimaryElement();
- assertTrue("Element should exist", primary.exists());
-}
-/**
- * Ensures that the primary type can be retrieved.
- */
-public void testGetPrimaryType() {
- IType type = this.copy.getType("A");
- IJavaElement primary= type.getPrimaryElement();
- assertTrue("Element should exist", primary.exists());
-}
+///**
+// * Ensures that the primary package declaration can be retrieved.
+// */
+//public void testGetPrimaryPackageDeclaration() {
+// IPackageDeclaration pkg = this.copy.getPackageDeclaration("x.y");
+// IJavaElement primary = pkg.getPrimaryElement();
+// assertTrue("Element should exist", primary.exists());
+//}
+///**
+// * Ensures that the primary type can be retrieved.
+// */
+//public void testGetPrimaryType() {
+// IType type = this.copy.getType("A");
+// IJavaElement primary= type.getPrimaryElement();
+// assertTrue("Element should exist", primary.exists());
+//}
/**
* Ensures that a type can be moved to another working copy.
* (regression test for bug 7881 IType.move() clobbers editing buffer of destination element)
*/
public void testMoveTypeToAnotherWorkingCopy() throws CoreException {
this.createFile(
- "P/src/x/y/B.java",
- "package x.y;\n" +
- "public class B {\n" +
+ "P/src/B.js",
+ "function B() {\n" +
"}");
- ICompilationUnit cu2 = this.getCompilationUnit("P/src/x/y/B.java");
+ ICompilationUnit cu2 = this.getCompilationUnit("P/src/B.js");
ICompilationUnit copy2 = cu2.getWorkingCopy(null);
try {
- IType classA = this.copy.getType("A");
- IType classB = copy2.getType("B");
- classA.move(classB, null, null, false, null);
- assertTrue("A should not exist", !classA.exists());
- assertTrue("B.A should exist", classB.getType("A").exists());
+ IField fld1 = this.copy.getField("field1");
+// IType classB = copy2.getType("B");
+ fld1.move(copy2, null, null, false, null);
+ assertTrue("A should not exist", !fld1.exists());
+ assertTrue("B.A should exist", copy2.getField("field1").exists());
assertTrue("Buffer for A should not be null", this.copy.getBuffer() != null);
assertSourceEquals("Invalid content for A",
- "package x.y;\n" +
- "import java.io.File;",
+ " var FIELD;\n" +
+ " var field2;\n" +
+ " function foo() {\n" +
+ " }\n" ,
this.copy.getBuffer().getContents());
assertTrue("Buffer for B should not be null", copy2.getBuffer() != null);
assertSourceEquals("Invalid content for B",
- "package x.y;\n" +
- "public class B {\n" +
- "\n" +
- " public class A {\n" +
- " public class Inner {\n" +
- " public class InnerInner {\n" +
- " }\n" +
- " int innerField;\n" +
- " void innerMethod() {\n" +
- " }\n" +
- " }\n" +
- " static String FIELD;\n" +
- " {\n" +
- " FIELD = File.pathSeparator;\n" +
- " }\n" +
- " int field1;\n" +
- " boolean field2;\n" +
- " public void foo() {\n" +
- " }\n" +
- " }\n" +
- "}",
+ "var field1;\n" +
+ "\n" +
+ "function B() {\n" +
+ "}",
copy2.getBuffer().getContents());
} finally {
copy2.discardWorkingCopy();
@@ -591,9 +549,9 @@ public void testShared2() throws JavaModelException {
public void testMultipleCommit() {
// Add a method to the working copy
- IType gp = this.copy.getType("A");
+// IType gp = this.copy.getType("A");
try {
- gp.createMethod("public void anotherMethod() {}\n",null, false, null);
+ this.copy.createMethod("function anotherMethod() {}\n",null, false, null);
} catch (JavaModelException jme) {
assertTrue("creation failed", false);
}
@@ -607,11 +565,11 @@ public void testMultipleCommit() {
// new method added
assertTrue("method should exist after commit",
- this.cu.getType("A").getMethod("anotherMethod", new String[]{}).exists());
+ this.cu.getMethod("anotherMethod", new String[]{}).exists());
//add another method
try {
- gp.createMethod("public void anotherAnotherMethod() {}\n", null, false, null);
+ this.copy.createMethod("function anotherAnotherMethod() {}\n", null, false, null);
} catch (JavaModelException x) {
assertTrue("Creation failed 2", false);
}
@@ -625,14 +583,14 @@ public void testMultipleCommit() {
// new method added
assertTrue("second method added should exist after commit",
- this.cu.getType("A").getMethod("anotherAnotherMethod", new String[]{}).exists());
+ this.cu.getMethod("anotherAnotherMethod", new String[]{}).exists());
}
/**
* Creates a working copy on a non-existing compilation unit.
* (regression test for bug 8921 DCR - Need a way to create a working copy ignoring existing files)
*/
public void testNonExistingCU() throws JavaModelException {
- ICompilationUnit nonExistingCU = this.getCompilationUnit("P/src/x/y/NonExisting.java");
+ ICompilationUnit nonExistingCU = this.getCompilationUnit("P/src/NonExisting.js");
ICompilationUnit workingCopy = null;
try {
// getBuffer()
@@ -649,7 +607,7 @@ public void testNonExistingCU() throws JavaModelException {
assertEquals("Unexpected orginal element", nonExistingCU, workingCopy.getPrimaryElement());
// getPath()
- assertEquals("Unexpected path", new Path("/P/src/x/y/NonExisting.java"), ((IJavaElement)workingCopy).getPath());
+ assertEquals("Unexpected path", new Path("/P/src/NonExisting.js"), ((IJavaElement)workingCopy).getPath());
// getResource()
assertEquals("Unexpected resource", nonExistingCU.getResource(), ((IJavaElement)workingCopy).getResource());
@@ -668,7 +626,7 @@ public void testNonExistingCU() throws JavaModelException {
// makeConsistent()
((IOpenable)workingCopy).getBuffer().setContents(
- "public class X {\n" +
+ "function X() {\n" +
"}");
assertTrue("Working copy should not be consistent", !((IOpenable)workingCopy).isConsistent());
((IOpenable)workingCopy).makeConsistent(null);
@@ -676,7 +634,7 @@ public void testNonExistingCU() throws JavaModelException {
// save()
((IOpenable)workingCopy).getBuffer().setContents(
- "public class Y {\n" +
+ "function Y() {\n" +
"}");
((IOpenable)workingCopy).save(null, false);
assertTrue("Working copy should be consistent after save", ((IOpenable)workingCopy).isConsistent());
@@ -708,7 +666,7 @@ public void testOperations() throws JavaModelException {
// rename working copy
boolean ex= false;
try {
- this.copy.rename("someName.java", false, null);
+ this.copy.rename("someName.js", false, null);
} catch (JavaModelException jme) {
assertTrue("Incorrect status code for attempting to rename working copy", jme.getStatus().getCode() == IJavaModelStatusConstants.INVALID_ELEMENT_TYPES);
ex= true;
@@ -718,7 +676,7 @@ public void testOperations() throws JavaModelException {
// move to same location as primary cu
ex= false;
try {
- this.copy.move(this.cu.getParent(), null, "someName.java", false, null);
+ this.copy.move(this.cu.getParent(), null, "someName.js", false, null);
} catch (JavaModelException jme) {
assertTrue("Incorrect status code for attempting to move working copy", jme.getStatus().getCode() == IJavaModelStatusConstants.INVALID_ELEMENT_TYPES);
ex= true;
@@ -727,7 +685,7 @@ public void testOperations() throws JavaModelException {
// copy working copy to default package
IPackageFragment pkg= getPackageFragment("P", "src", "");
- this.copy.copy(pkg, null, "someName.java", false, null);
+ this.copy.copy(pkg, null, "someName.js", false, null);
assertCreation(this.copy);
}
}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingExpressionsTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingExpressionsTest.java
index d2eae8c..da3f846 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingExpressionsTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingExpressionsTest.java
@@ -44,16 +44,13 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
/** @deprecated using deprecated code */
public void testArrayAccess() throws Exception {
- IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
+ IPackageFragment pack1= this.sourceFolder.createPackageFragment("", false, null);
StringBuffer buf= new StringBuffer();
- buf.append("package test1;\n");
- buf.append("public class E {\n");
- buf.append(" int[] o= new int[] { 1, 2, 3 };\n");
- buf.append(" public void foo() {\n");
- buf.append(" o[3 /* comment*/ - 1]= this.o[3 - 1];\n");
- buf.append(" }\n");
- buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ buf.append(" function foo() {\n");
+ buf.append(" o[3 /* comment*/ - 1]= this.o[3 - 1];\n");
+ buf.append(" }\n");
+ buf.append("");
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -61,8 +58,8 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
AST ast= astRoot.getAST();
assertTrue("Parse errors", (astRoot.getFlags() & ASTNode.MALFORMED) == 0);
- TypeDeclaration type= findTypeDeclaration(astRoot, "E");
- MethodDeclaration methodDecl= findMethodDeclaration(type, "foo");
+// TypeDeclaration type= findTypeDeclaration(astRoot, "E");
+ MethodDeclaration methodDecl= findMethodDeclaration(astRoot, "foo");
Block block= methodDecl.getBody();
List statements= block.statements();
assertTrue("Number of statements not 1", statements.size() == 1);
@@ -87,13 +84,9 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
String preview= evaluateRewrite(cu, rewrite);
buf= new StringBuffer();
- buf.append("package test1;\n");
- buf.append("public class E {\n");
- buf.append(" int[] o= new int[] { 1, 2, 3 };\n");
- buf.append(" public void foo() {\n");
- buf.append(" o[1]= o[3 /* comment*/ - 1];\n");
- buf.append(" }\n");
- buf.append("}\n");
+ buf.append(" function foo() {\n");
+ buf.append(" o[1]= o[3 /* comment*/ - 1];\n");
+ buf.append(" }\n");
assertEqualString(preview, buf.toString());
}
@@ -114,7 +107,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
buf.append(" new int[2][][]);\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -237,7 +230,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
buf.append(" new int[] { 1, 2, 3 });\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -320,7 +313,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
buf.append(" i-= j= 3;\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -383,7 +376,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
buf.append(" z= y.toList();\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -448,7 +441,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
buf.append(" z= foo().y.toList();\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -506,7 +499,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -575,7 +568,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
buf.append(" };\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -662,7 +655,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
buf.append(" new <A, A>Inner();\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -735,7 +728,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
buf.append(" i= (k == 0) ? 1 : 2;\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -790,7 +783,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
buf.append(" foo().i= goo().i;\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -845,7 +838,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
buf.append(" k= 1 + 2 + 3 + 4 + 5;\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -925,7 +918,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
buf.append(" goo(k()instanceof Vector);\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -961,8 +954,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
SimpleName name= ast.newSimpleName("x");
rewrite.replace(expr.getLeftOperand(), name, null);
- }
-
+ }
String preview= evaluateRewrite(cu, rewrite);
buf= new StringBuffer();
@@ -989,7 +981,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
buf.append(" foo(1, 2).goo();\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1066,7 +1058,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
buf.append(" m(y, a);\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1146,7 +1138,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
buf.append(" foo(foo(1, 2), 3);\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1208,7 +1200,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
buf.append(" this.<String>foo(3);\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
AST ast= astRoot.getAST();
@@ -1258,7 +1250,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
buf.append(" i= (1 + 2) * 3;\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1307,7 +1299,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
buf.append(" i= --x;\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1355,7 +1347,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
buf.append(" i= x--;\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1409,7 +1401,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
buf.append(" Outer.super(foo(goo(x)), 1);\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1487,7 +1479,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
buf.append(" x.<String>super(i);\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
AST ast= astRoot.getAST();
@@ -1538,7 +1530,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
buf.append(" x.<String>super(i);\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
AST ast= astRoot.getAST();
@@ -1588,7 +1580,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
buf.append(" super.x= Outer.super.y;\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1640,7 +1632,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
buf.append(" Outer.super.foo(foo(X.goo()), 1);\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1719,7 +1711,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
buf.append(" X.super.<String>foo(3);\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
AST ast= astRoot.getAST();
@@ -1769,7 +1761,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
buf.append(" return Outer.this;\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1824,7 +1816,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
buf.append(" return E.class;\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1872,7 +1864,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
buf.append(" return hello;\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1914,7 +1906,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
buf.append(" return 1;\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1956,7 +1948,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
buf.append(" return true;\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1998,7 +1990,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
buf.append(" return \"Hello\";\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -2040,7 +2032,7 @@ public class ASTRewritingExpressionsTest extends ASTRewritingTest {
buf.append(" return 'x';\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingGroupNodeTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingGroupNodeTest.java
index 4a4c7fc..bb011c8 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingGroupNodeTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingGroupNodeTest.java
@@ -59,7 +59,7 @@ public class ASTRewritingGroupNodeTest extends ASTRewritingTest {
buf.append(" return;\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -109,7 +109,7 @@ public class ASTRewritingGroupNodeTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingInsertBoundTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingInsertBoundTest.java
index c12e766..a9b37d7 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingInsertBoundTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingInsertBoundTest.java
@@ -95,7 +95,7 @@ public class ASTRewritingInsertBoundTest extends ASTRewritingTest {
buf.append("\n");
buf.append("//c4\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
AST ast= astRoot.getAST();
@@ -160,7 +160,7 @@ public class ASTRewritingInsertBoundTest extends ASTRewritingTest {
buf.append("\n");
buf.append("//c4\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
AST ast= astRoot.getAST();
@@ -229,7 +229,7 @@ public class ASTRewritingInsertBoundTest extends ASTRewritingTest {
buf.append("\n");
buf.append("//c4\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
AST ast= astRoot.getAST();
@@ -301,7 +301,7 @@ public class ASTRewritingInsertBoundTest extends ASTRewritingTest {
buf.append("\n");
buf.append("//c4\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
AST ast= astRoot.getAST();
@@ -364,7 +364,7 @@ public class ASTRewritingInsertBoundTest extends ASTRewritingTest {
buf.append("\n");
buf.append("//c4\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
AST ast= astRoot.getAST();
@@ -437,7 +437,7 @@ public class ASTRewritingInsertBoundTest extends ASTRewritingTest {
buf.append("\n");
buf.append("//c4\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
AST ast= astRoot.getAST();
@@ -504,7 +504,7 @@ public class ASTRewritingInsertBoundTest extends ASTRewritingTest {
buf.append("\n");
buf.append("//c4\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
@@ -552,7 +552,7 @@ public class ASTRewritingInsertBoundTest extends ASTRewritingTest {
buf.append("\n");
buf.append("//c4\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
@@ -603,7 +603,7 @@ public class ASTRewritingInsertBoundTest extends ASTRewritingTest {
buf.append("\n");
buf.append("//c4\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
@@ -651,7 +651,7 @@ public class ASTRewritingInsertBoundTest extends ASTRewritingTest {
buf.append("\n");
buf.append("//c4\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
@@ -698,7 +698,7 @@ public class ASTRewritingInsertBoundTest extends ASTRewritingTest {
buf.append("\n");
buf.append("//c4\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
AST ast= astRoot.getAST();
@@ -760,7 +760,7 @@ public class ASTRewritingInsertBoundTest extends ASTRewritingTest {
buf.append("\n");
buf.append("//c4\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
AST ast= astRoot.getAST();
@@ -833,7 +833,7 @@ public class ASTRewritingInsertBoundTest extends ASTRewritingTest {
buf.append("\n");
buf.append("//c4\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
AST ast= astRoot.getAST();
@@ -899,7 +899,7 @@ public class ASTRewritingInsertBoundTest extends ASTRewritingTest {
buf.append("\n");
buf.append("//c4\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
AST ast= astRoot.getAST();
@@ -962,7 +962,7 @@ public class ASTRewritingInsertBoundTest extends ASTRewritingTest {
buf.append("\n");
buf.append("//c4\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
AST ast= astRoot.getAST();
@@ -1034,7 +1034,7 @@ public class ASTRewritingInsertBoundTest extends ASTRewritingTest {
buf.append("\n");
buf.append("//c4\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
AST ast= astRoot.getAST();
@@ -1099,7 +1099,7 @@ public class ASTRewritingInsertBoundTest extends ASTRewritingTest {
buf.append("\n");
buf.append("//c4\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
AST ast= astRoot.getAST();
@@ -1165,7 +1165,7 @@ public class ASTRewritingInsertBoundTest extends ASTRewritingTest {
buf.append("\n");
buf.append("//c4\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
AST ast= astRoot.getAST();
@@ -1230,7 +1230,7 @@ public class ASTRewritingInsertBoundTest extends ASTRewritingTest {
buf.append("\n");
buf.append("//c4\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
AST ast= astRoot.getAST();
@@ -1305,7 +1305,7 @@ public class ASTRewritingInsertBoundTest extends ASTRewritingTest {
buf.append("\n");
buf.append("//c4\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
AST ast= astRoot.getAST();
@@ -1380,7 +1380,7 @@ public class ASTRewritingInsertBoundTest extends ASTRewritingTest {
buf.append("\n");
buf.append("//c4\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
AST ast= astRoot.getAST();
@@ -1439,7 +1439,7 @@ public class ASTRewritingInsertBoundTest extends ASTRewritingTest {
buf.append("\n");
buf.append("//c4\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
AST ast= astRoot.getAST();
@@ -1499,7 +1499,7 @@ public class ASTRewritingInsertBoundTest extends ASTRewritingTest {
buf.append("\n");
buf.append("//c4\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
AST ast= astRoot.getAST();
@@ -1560,7 +1560,7 @@ public class ASTRewritingInsertBoundTest extends ASTRewritingTest {
buf.append("\n");
buf.append("//c4\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
AST ast= astRoot.getAST();
@@ -1622,7 +1622,7 @@ public class ASTRewritingInsertBoundTest extends ASTRewritingTest {
buf.append("\n");
buf.append(" //c4\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingJavadocTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingJavadocTest.java
index fdf6ee6..c2d1bd9 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingJavadocTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingJavadocTest.java
@@ -56,7 +56,7 @@ public class ASTRewritingJavadocTest extends ASTRewritingTest {
buf.append(" public void gee(String name) {\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -105,7 +105,7 @@ public class ASTRewritingJavadocTest extends ASTRewritingTest {
buf.append(" public void gee(String name) {\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -155,7 +155,7 @@ public class ASTRewritingJavadocTest extends ASTRewritingTest {
buf.append(" public void gee(String name) {\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -206,7 +206,7 @@ public class ASTRewritingJavadocTest extends ASTRewritingTest {
buf.append(" public void gee(String name) {\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -256,7 +256,7 @@ public class ASTRewritingJavadocTest extends ASTRewritingTest {
buf.append(" public void gee(String name) {\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -309,7 +309,7 @@ public class ASTRewritingJavadocTest extends ASTRewritingTest {
buf.append(" public void gee(String name) {\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -366,7 +366,7 @@ public class ASTRewritingJavadocTest extends ASTRewritingTest {
buf.append(" public void gee(String name) {\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -419,7 +419,7 @@ public class ASTRewritingJavadocTest extends ASTRewritingTest {
buf.append(" public void gee(String name) {\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -471,7 +471,7 @@ public class ASTRewritingJavadocTest extends ASTRewritingTest {
buf.append(" public void gee(String name) {\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -536,7 +536,7 @@ public class ASTRewritingJavadocTest extends ASTRewritingTest {
buf.append(" public void gee(String name) {\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -591,7 +591,7 @@ public class ASTRewritingJavadocTest extends ASTRewritingTest {
buf.append(" public void gee(String name) {\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -635,7 +635,7 @@ public class ASTRewritingJavadocTest extends ASTRewritingTest {
buf.append(" public void gee(String name) {\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -680,7 +680,7 @@ public class ASTRewritingJavadocTest extends ASTRewritingTest {
buf.append(" public void gee(String name) {\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
@@ -719,7 +719,7 @@ public class ASTRewritingJavadocTest extends ASTRewritingTest {
buf.append(" * @author xy\n");
buf.append(" */\n");
buf.append("package test1;\n");
- ICompilationUnit cu= pack1.createCompilationUnit("package-info.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("package-info.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
@@ -747,7 +747,7 @@ public class ASTRewritingJavadocTest extends ASTRewritingTest {
buf.append(" public void gee(String name) {\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
@@ -801,7 +801,7 @@ public class ASTRewritingJavadocTest extends ASTRewritingTest {
buf.append(" public void gee(String name) {\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
AST ast= astRoot.getAST();
@@ -848,7 +848,7 @@ public class ASTRewritingJavadocTest extends ASTRewritingTest {
buf.append("\n");
buf.append(" public int count;\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
AST ast= astRoot.getAST();
@@ -898,7 +898,7 @@ public class ASTRewritingJavadocTest extends ASTRewritingTest {
buf.append(" static {\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -931,7 +931,7 @@ public class ASTRewritingJavadocTest extends ASTRewritingTest {
buf.append(" */\n");
buf.append("public class E {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
@@ -967,7 +967,7 @@ public class ASTRewritingJavadocTest extends ASTRewritingTest {
buf.append(" static {\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1019,7 +1019,7 @@ public class ASTRewritingJavadocTest extends ASTRewritingTest {
buf.append(" static {\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingMethodDeclTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingMethodDeclTest.java
index 1845d97..ed4e188 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingMethodDeclTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingMethodDeclTest.java
@@ -59,7 +59,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append(" public abstract void kee(int p1, int p2, int p3) throws IllegalArgumentException, IllegalAccessException, SecurityException;\n");
buf.append(" public abstract void lee(int p1, int p2, int p3) throws IllegalArgumentException, IllegalAccessException, SecurityException;\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -179,7 +179,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append(" void hee(int p1, int p2) {}\n");
buf.append(" public void hee(int p1, byte p2) {}\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -236,7 +236,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append(" public <X> void hee(int p1, byte p2) {}\n");
buf.append(" public<X>void hee(int p1, byte p2) {}\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -288,7 +288,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append(" /** javadoc comment */\n");
buf.append(" /* comment */ void gee3() {}\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -391,7 +391,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append(" /** javadoc comment */\n");
buf.append(" public /* comment */ void gee3() {}\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -496,7 +496,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append(" /** javadoc comment */\n");
buf.append(" /* comment */ void gee3() {}\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -610,7 +610,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append(" /** javadoc comment */\n");
buf.append(" public /* comment */ void gee3() {}\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -711,7 +711,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append(" public abstract void kee(int p1, int p2, int p3) throws IllegalArgumentException, IllegalAccessException, SecurityException;\n");
buf.append(" public abstract void lee(int p1, int p2, int p3) throws IllegalArgumentException, IllegalAccessException, SecurityException;\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -816,7 +816,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append("public class E {\n");
buf.append(" public void setMyProp(String property1) {}\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
AST ast= astRoot.getAST();
@@ -861,7 +861,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append(" public abstract void kee(int p1, int p2, int p3) throws IllegalArgumentException, IllegalAccessException, SecurityException;\n");
buf.append(" public abstract void lee(int p1, int p2, int p3) throws IllegalArgumentException, IllegalAccessException, SecurityException;\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1043,7 +1043,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append("public abstract class E {\n");
buf.append(" public abstract void lee(int p1, int p2, int p3) throws IllegalArgumentException, IllegalAccessException, SecurityException;\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1099,7 +1099,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append(" public abstract void kee(int p1, int p2, int p3) throws IllegalArgumentException, IllegalAccessException, SecurityException;\n");
buf.append(" public abstract void lee(int p1, int p2, int p3) throws IllegalArgumentException, IllegalAccessException, SecurityException;\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1203,7 +1203,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append("public abstract class E {\n");
buf.append(" public E(int p1, int p2, int p3) {}\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1261,7 +1261,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append(" // user comment\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1314,7 +1314,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append(" public abstract void kee(int p1, int p2, int p3) throws IllegalArgumentException, IllegalAccessException, SecurityException;\n");
buf.append(" public abstract void lee(int p1, int p2, int p3) throws IllegalArgumentException, IllegalAccessException, SecurityException;\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1390,7 +1390,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append(" public Object foo6(int i)[][] throws IllegalArgumentException { return null; }\n");
buf.append(" public Object foo7(int i)[][] { return null; }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1493,7 +1493,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append(" /** javadoc comment */\n");
buf.append(" Object foo9() { return null; }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1610,7 +1610,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append(" @Deprecated\n");
buf.append(" public Object foo4() { return null; }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1669,7 +1669,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append(" @Deprecated()Object foo3() { return null; }\n");
buf.append(" @Deprecated()Object foo4() { return null; }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1728,7 +1728,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append(" int i2= 1, k2= 2, n2= 3;\n");
buf.append(" static final int i3= 1, k3= 2, n3= 3;\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("A.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("A.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1809,7 +1809,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append(" static {\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("A.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("A.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1866,7 +1866,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append("public abstract class E {\n");
buf.append(" public Object foo1(int i, boolean b) { return null; }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1910,7 +1910,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append("public abstract class E {\n");
buf.append(" public Object foo1(int i, boolean b) { return null; }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1950,7 +1950,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append(" private int DD()[]{\n");
buf.append(" };\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("DD.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("DD.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1994,7 +1994,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append(" private void foo2(){\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("DD.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("DD.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -2041,7 +2041,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append(" private void foo2(){\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("DD.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("DD.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -2100,7 +2100,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append(" private void foo2(){\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("DD.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("DD.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -2150,7 +2150,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append(" private void foo2(){\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("DD.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("DD.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -2201,7 +2201,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append(" private void foo2(){\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("DD.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("DD.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -2262,7 +2262,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append(" private void foo1(){\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("DD.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("DD.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
AST ast= astRoot.getAST();
@@ -2308,7 +2308,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append(" private void foo2(String format, Object[] args) {\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("DD.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("DD.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
AST ast= astRoot.getAST();
@@ -2349,7 +2349,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append(" String value2() default 1;\n");
buf.append(" String value3() default 2;\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("DD.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("DD.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
AST ast= astRoot.getAST();
@@ -2393,7 +2393,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append("public enum DD {\n");
buf.append(" E1(1), E2, E3(), E4(1, 2)\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("DD.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("DD.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
AST ast= astRoot.getAST();
@@ -2461,7 +2461,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("DD.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("DD.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
AST ast= astRoot.getAST();
@@ -2599,7 +2599,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append("public enum DD {\n");
buf.append(" RED, BROWN(), GREEN(){};\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("DD.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("DD.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -2632,7 +2632,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append(" return 0;\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("A.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("A.js", buf.toString(), false, null);
// Get method declaration and its body
CompilationUnit astRoot= createAST(cu);
@@ -2685,7 +2685,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
buf.append("@An(1)\n");
buf.append("class E {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingMoveCodeTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingMoveCodeTest.java
index f7ce296..92bb1f8 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingMoveCodeTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingMoveCodeTest.java
@@ -53,7 +53,7 @@ public class ASTRewritingMoveCodeTest extends ASTRewritingTest {
buf.append(" public void foo() {\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -105,7 +105,7 @@ public class ASTRewritingMoveCodeTest extends ASTRewritingTest {
buf.append("}\n");
buf.append("interface G {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -216,7 +216,7 @@ public class ASTRewritingMoveCodeTest extends ASTRewritingTest {
buf.append("}\n");
buf.append("interface G {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -324,7 +324,7 @@ public class ASTRewritingMoveCodeTest extends ASTRewritingTest {
buf.append("}\n");
buf.append("interface G {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -444,7 +444,7 @@ public class ASTRewritingMoveCodeTest extends ASTRewritingTest {
buf.append("}\n");
buf.append("interface G {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -559,7 +559,7 @@ public class ASTRewritingMoveCodeTest extends ASTRewritingTest {
buf.append("}\n");
buf.append("interface G {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -657,7 +657,7 @@ public class ASTRewritingMoveCodeTest extends ASTRewritingTest {
buf.append("}\n");
buf.append("interface G {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -738,7 +738,7 @@ public class ASTRewritingMoveCodeTest extends ASTRewritingTest {
buf.append(" public void goo() {\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -795,7 +795,7 @@ public class ASTRewritingMoveCodeTest extends ASTRewritingTest {
buf.append(" x= 1;\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -864,7 +864,7 @@ public class ASTRewritingMoveCodeTest extends ASTRewritingTest {
buf.append(" x= 1;\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -929,7 +929,7 @@ public class ASTRewritingMoveCodeTest extends ASTRewritingTest {
buf.append(" goo(xoo(/*hello*/), k * 2);\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -982,7 +982,7 @@ public class ASTRewritingMoveCodeTest extends ASTRewritingTest {
buf.append(" goo(xoo(/*hello*/), k * 2);\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1040,7 +1040,7 @@ public class ASTRewritingMoveCodeTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1092,7 +1092,7 @@ public class ASTRewritingMoveCodeTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1146,7 +1146,7 @@ public class ASTRewritingMoveCodeTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1211,7 +1211,7 @@ public class ASTRewritingMoveCodeTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1279,7 +1279,7 @@ public class ASTRewritingMoveCodeTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1328,7 +1328,7 @@ public class ASTRewritingMoveCodeTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1390,7 +1390,7 @@ public class ASTRewritingMoveCodeTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1454,7 +1454,7 @@ public class ASTRewritingMoveCodeTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1509,7 +1509,7 @@ public class ASTRewritingMoveCodeTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1562,7 +1562,7 @@ public class ASTRewritingMoveCodeTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1623,7 +1623,7 @@ public class ASTRewritingMoveCodeTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1681,7 +1681,7 @@ public class ASTRewritingMoveCodeTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1725,7 +1725,7 @@ public class ASTRewritingMoveCodeTest extends ASTRewritingTest {
buf.append(" i--;\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1773,7 +1773,7 @@ public class ASTRewritingMoveCodeTest extends ASTRewritingTest {
buf.append(" foo();\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1820,7 +1820,7 @@ public class ASTRewritingMoveCodeTest extends ASTRewritingTest {
buf.append(" foo();\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1867,7 +1867,7 @@ public class ASTRewritingMoveCodeTest extends ASTRewritingTest {
buf.append(" int i= (String) o.indexOf('1');\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
AST ast= astRoot.getAST();
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingStatementsTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingStatementsTest.java
index 0fc97fc..117f2f7 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingStatementsTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingStatementsTest.java
@@ -54,7 +54,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -99,7 +99,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" return;\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("D.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("D.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -152,7 +152,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" return new Integer(3);\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -208,7 +208,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -248,7 +248,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" return;\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("D.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("D.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -295,7 +295,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" return new Integer(3);\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -335,7 +335,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -379,7 +379,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" return;\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("D.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("D.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -428,7 +428,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" break label;\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -494,7 +494,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" this(\"Hello\", true);\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -563,7 +563,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" <String, String>this(\"Hello\", true);\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -624,7 +624,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" continue label;\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -690,7 +690,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" } while (i == j);\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -760,7 +760,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" while (true);\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -874,7 +874,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" i= 0;\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -934,7 +934,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1093,7 +1093,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" foo();\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1205,7 +1205,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1285,7 +1285,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1368,7 +1368,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" hoo(11);\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1457,7 +1457,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" hoo(11);\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1568,7 +1568,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" hoo(11);\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1660,7 +1660,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" hoo(11);\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1779,7 +1779,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" hoo(11);\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1899,7 +1899,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1980,7 +1980,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" return;\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -2049,7 +2049,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -2151,7 +2151,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -2282,7 +2282,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -2426,7 +2426,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -2561,7 +2561,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -2619,7 +2619,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" return/*com*/ 1;\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -2708,7 +2708,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" assert(true) : \"Hello\";\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -2789,7 +2789,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -2909,7 +2909,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -2968,7 +2968,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" throw new Exception('d');\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -3043,7 +3043,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -3161,7 +3161,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -3210,7 +3210,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" final int i3= 1, k3= 2, n3= 3;\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("A.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("A.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -3296,7 +3296,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -3360,7 +3360,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" foo();\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -3474,7 +3474,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -3530,7 +3530,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingTest.java
index 5224248..e7c222b 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingTest.java
@@ -150,6 +150,22 @@ public class ASTRewritingTest extends AbstractJavaModelTests {
return null;
}
+
+ public static MethodDeclaration findMethodDeclaration(CompilationUnit astRoot, String simpleTypeName) {
+ List statements= astRoot.statements();
+ for (int i= 0; i < statements.size(); i++) {
+ Object obj=statements.get(i);
+ if (obj instanceof MethodDeclaration) {
+ MethodDeclaration elem= (MethodDeclaration)obj;
+ if (simpleTypeName.equals(elem.getName().getIdentifier())) {
+ return elem;
+ }
+ }
+ }
+ return null;
+ }
+
+
public static MethodDeclaration findMethodDeclaration(TypeDeclaration typeDecl, String methodName) {
MethodDeclaration[] methods= typeDecl.getMethods();
for (int i= 0; i < methods.length; i++) {
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingTrackingTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingTrackingTest.java
index 5501927..88d8f4a 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingTrackingTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingTrackingTest.java
@@ -61,7 +61,7 @@ public class ASTRewritingTrackingTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
AST ast= astRoot.getAST();
@@ -128,7 +128,7 @@ public class ASTRewritingTrackingTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
AST ast= astRoot.getAST();
@@ -200,7 +200,7 @@ public class ASTRewritingTrackingTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
AST ast= astRoot.getAST();
@@ -277,7 +277,7 @@ public class ASTRewritingTrackingTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
AST ast= astRoot.getAST();
@@ -349,7 +349,7 @@ public class ASTRewritingTrackingTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
AST ast= astRoot.getAST();
@@ -417,7 +417,7 @@ public class ASTRewritingTrackingTest extends ASTRewritingTest {
buf.append(" public void foo(String s, int i) {\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
AST ast= astRoot.getAST();
@@ -471,7 +471,7 @@ public class ASTRewritingTrackingTest extends ASTRewritingTest {
buf.append(" return s;\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
AST ast= astRoot.getAST();
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingTypeDeclTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingTypeDeclTest.java
index 43718d5..ba40e17 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingTypeDeclTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingTypeDeclTest.java
@@ -72,7 +72,7 @@ public class ASTRewritingTypeDeclTest extends ASTRewritingTest {
buf.append("}\n");
buf.append("interface G {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -186,7 +186,7 @@ public class ASTRewritingTypeDeclTest extends ASTRewritingTest {
buf.append("}\n");
buf.append("interface G {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -297,7 +297,7 @@ public class ASTRewritingTypeDeclTest extends ASTRewritingTest {
buf.append("}\n");
buf.append("interface G {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -398,7 +398,7 @@ public class ASTRewritingTypeDeclTest extends ASTRewritingTest {
buf.append("}\n");
buf.append("interface G {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -498,7 +498,7 @@ public class ASTRewritingTypeDeclTest extends ASTRewritingTest {
buf.append("}\n");
buf.append("class F {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -564,7 +564,7 @@ public class ASTRewritingTypeDeclTest extends ASTRewritingTest {
buf.append("class H <T> {}\n");
buf.append("class I<T> extends A {}\n");
buf.append("class J<T>extends A {}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -610,7 +610,7 @@ public class ASTRewritingTypeDeclTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("T.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("T.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
assertTrue("Errors in AST", (astRoot.getFlags() & ASTNode.MALFORMED) == 0);
@@ -644,7 +644,7 @@ public class ASTRewritingTypeDeclTest extends ASTRewritingTest {
buf.append(" };\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E2.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E2.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -728,7 +728,7 @@ public class ASTRewritingTypeDeclTest extends ASTRewritingTest {
buf.append("import java.text.*;\n");
buf.append("public class Z {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("Z.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("Z.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -786,7 +786,7 @@ public class ASTRewritingTypeDeclTest extends ASTRewritingTest {
buf.append("package test1;\n");
buf.append("public class Z {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("Z.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("Z.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -818,7 +818,7 @@ public class ASTRewritingTypeDeclTest extends ASTRewritingTest {
buf.append("package test1;\n");
buf.append("public class Z {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("Z.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("Z.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -845,7 +845,7 @@ public class ASTRewritingTypeDeclTest extends ASTRewritingTest {
StringBuffer buf= new StringBuffer();
buf.append("public class Z {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("Z.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("Z.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -879,7 +879,7 @@ public class ASTRewritingTypeDeclTest extends ASTRewritingTest {
buf.append(" public void foo(int i, final int[] k, int[] x[]) {\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -941,7 +941,7 @@ public class ASTRewritingTypeDeclTest extends ASTRewritingTest {
buf.append(" int i, j, k= 0, x[][], y[]= {0, 1};\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1024,7 +1024,7 @@ public class ASTRewritingTypeDeclTest extends ASTRewritingTest {
buf.append(" public void hee() {\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1069,7 +1069,7 @@ public class ASTRewritingTypeDeclTest extends ASTRewritingTest {
buf.append(" public void hee() {\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1119,7 +1119,7 @@ public class ASTRewritingTypeDeclTest extends ASTRewritingTest {
buf.append(" public void hee() {\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1162,7 +1162,7 @@ public class ASTRewritingTypeDeclTest extends ASTRewritingTest {
buf.append("package test1;\n");
buf.append("public class E {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1216,7 +1216,7 @@ public class ASTRewritingTypeDeclTest extends ASTRewritingTest {
buf.append("package test1;\n");
buf.append("public enum E {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1253,7 +1253,7 @@ public class ASTRewritingTypeDeclTest extends ASTRewritingTest {
buf.append("public enum E {\n");
buf.append(" A, B, C\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1297,7 +1297,7 @@ public class ASTRewritingTypeDeclTest extends ASTRewritingTest {
buf.append("public enum E {\n");
buf.append(" A, B, C;\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1343,7 +1343,7 @@ public class ASTRewritingTypeDeclTest extends ASTRewritingTest {
buf.append(" private void foo(String str) {\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1377,7 +1377,7 @@ public class ASTRewritingTypeDeclTest extends ASTRewritingTest {
buf.append(" private void foo2(String str) {\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1415,7 +1415,7 @@ public class ASTRewritingTypeDeclTest extends ASTRewritingTest {
buf.append("public enum E {\n");
buf.append(" A\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1442,7 +1442,7 @@ public class ASTRewritingTypeDeclTest extends ASTRewritingTest {
buf.append("package test1;\n");
buf.append("public enum E {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1476,7 +1476,7 @@ public class ASTRewritingTypeDeclTest extends ASTRewritingTest {
buf.append(" */\n");
buf.append("public @interface E {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -1523,7 +1523,7 @@ public class ASTRewritingTypeDeclTest extends ASTRewritingTest {
buf.append("public class E {\n");
buf.append(" X<?, ?, ? extends A, ? super B, ? extends A, ? super B> x;\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ImportRewriteTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ImportRewriteTest.java
index 314fb98..b06a011 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ImportRewriteTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ImportRewriteTest.java
@@ -100,7 +100,7 @@ public class ImportRewriteTest extends AbstractJavaModelTests {
buf.append("\n");
buf.append("public class C {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
String[] order= new String[] { "java", "com", "pack" };
@@ -143,7 +143,7 @@ public class ImportRewriteTest extends AbstractJavaModelTests {
buf.append("\n");
buf.append("public class C {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
String[] order= new String[] { "java.util", "java.new", "p" };
@@ -178,7 +178,7 @@ public class ImportRewriteTest extends AbstractJavaModelTests {
buf.append("\n");
buf.append("public class C {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
String[] order= new String[] { "java.util", "java.new", "p" };
@@ -216,7 +216,7 @@ public class ImportRewriteTest extends AbstractJavaModelTests {
buf.append("\n");
buf.append("public class C {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
String[] order= new String[] { "java", "java.util", "com", "pack" };
@@ -249,7 +249,7 @@ public class ImportRewriteTest extends AbstractJavaModelTests {
buf.append("\n");
buf.append("public class C {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
String[] order= new String[] { "java", "java.util", "com", "pack" };
@@ -284,7 +284,7 @@ public class ImportRewriteTest extends AbstractJavaModelTests {
buf.append("\n");
buf.append("public class C {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
String[] order= new String[] { "java", "com", "pack" };
@@ -318,7 +318,7 @@ public class ImportRewriteTest extends AbstractJavaModelTests {
buf.append("\n");
buf.append("public class C {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
String[] order= new String[] { "java", "com", "pack" };
@@ -348,7 +348,7 @@ public class ImportRewriteTest extends AbstractJavaModelTests {
buf.append("\n");
buf.append("public class C {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
String[] order= new String[] { };
@@ -380,7 +380,7 @@ public class ImportRewriteTest extends AbstractJavaModelTests {
buf.append("\n");
buf.append("public class C {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
String[] order= new String[] { "java.awt", "java" };
@@ -412,7 +412,7 @@ public class ImportRewriteTest extends AbstractJavaModelTests {
buf.append("\n");
buf.append("public class C {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
String[] order= new String[] { "java" };
@@ -443,7 +443,7 @@ public class ImportRewriteTest extends AbstractJavaModelTests {
buf.append("\n");
buf.append("public class C {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
String[] order= new String[] { "java" };
@@ -473,7 +473,7 @@ public class ImportRewriteTest extends AbstractJavaModelTests {
buf.append("\n");
buf.append("public class C {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
String[] order= new String[] { "#", "java" };
@@ -507,7 +507,7 @@ public class ImportRewriteTest extends AbstractJavaModelTests {
buf.append("\n");
buf.append("public class C {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
String[] order= new String[] { "#", "java" };
@@ -543,7 +543,7 @@ public class ImportRewriteTest extends AbstractJavaModelTests {
buf.append("\n");
buf.append("public class C {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
String[] order= new String[] { "#", "java" };
@@ -592,7 +592,7 @@ public class ImportRewriteTest extends AbstractJavaModelTests {
if (idx != -1) {
name= typeName.substring(0, idx);
}
- pack1.createCompilationUnit(name + ".java", content, false, null);
+ pack1.createCompilationUnit(name + ".js", content, false, null);
}
@@ -616,14 +616,14 @@ public class ImportRewriteTest extends AbstractJavaModelTests {
buf.append(" }\n");
buf.append("}\n");
String content= buf.toString();
- ICompilationUnit cu1= pack1.createCompilationUnit("A.java", content, false, null);
+ ICompilationUnit cu1= pack1.createCompilationUnit("A.js", content, false, null);
buf= new StringBuffer();
buf.append("package test1;\n");
buf.append("public class B {\n");
buf.append("}\n");
String content2= buf.toString();
- ICompilationUnit cu2= pack1.createCompilationUnit("B.java", content2, false, null);
+ ICompilationUnit cu2= pack1.createCompilationUnit("B.js", content2, false, null);
String[] order= new String[] { "java.util", "java.io", "java.net" };
int threshold= 99;
@@ -689,14 +689,14 @@ public class ImportRewriteTest extends AbstractJavaModelTests {
buf.append(" }\n");
buf.append("}\n");
String content= buf.toString();
- ICompilationUnit cu1= pack1.createCompilationUnit("A.java", content, false, null);
+ ICompilationUnit cu1= pack1.createCompilationUnit("A.js", content, false, null);
buf= new StringBuffer();
buf.append("package test1;\n");
buf.append("public class B {\n");
buf.append("}\n");
String content2= buf.toString();
- ICompilationUnit cu2= pack1.createCompilationUnit("B.java", content2, false, null);
+ ICompilationUnit cu2= pack1.createCompilationUnit("B.js", content2, false, null);
String[] order= new String[] { "java.util", "java.io", "java.net" };
int threshold= 99;
@@ -738,7 +738,7 @@ public class ImportRewriteTest extends AbstractJavaModelTests {
buf.append("public class C {\n");
buf.append(" public final static int CONST= 9;\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("C.js", buf.toString(), false, null);
String[] order= new String[] { "#", "java" };
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/LineCommentOffsetsTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/LineCommentOffsetsTest.java
index 0efb042..894addc 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/LineCommentOffsetsTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/LineCommentOffsetsTest.java
@@ -69,7 +69,7 @@ public class LineCommentOffsetsTest extends ASTRewritingTest {
buf.append("{//comment Y\n");
buf.append("}//comment Y");
String contents= buf.toString();
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", contents, false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", contents, false, null);
CompilationUnit astRoot= createAST3(cu);
@@ -139,7 +139,7 @@ public class LineCommentOffsetsTest extends ASTRewritingTest {
buf.append("} // comment Y");
String content= buf.toString();
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", content, false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", content, false, null);
CompilationUnit astRoot= createAST(cu);
LineCommentEndOffsets offsets= new LineCommentEndOffsets(astRoot.getCommentList());
@@ -190,7 +190,7 @@ public class LineCommentOffsetsTest extends ASTRewritingTest {
buf.append("} // comment Y");
String content= buf.toString();
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", content, false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", content, false, null);
CompilationUnit astRoot= createAST(cu);
LineCommentEndOffsets offsets= new LineCommentEndOffsets(astRoot.getCommentList());
@@ -226,7 +226,7 @@ public class LineCommentOffsetsTest extends ASTRewritingTest {
buf.append("public class E implements A //comment\n");
buf.append("{\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -259,7 +259,7 @@ public class LineCommentOffsetsTest extends ASTRewritingTest {
buf.append("public class E //comment\n");
buf.append("{\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -292,7 +292,7 @@ public class LineCommentOffsetsTest extends ASTRewritingTest {
buf.append("public class E //implements List\n");
buf.append("{\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -331,7 +331,7 @@ public class LineCommentOffsetsTest extends ASTRewritingTest {
buf.append(" );\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -375,7 +375,7 @@ public class LineCommentOffsetsTest extends ASTRewritingTest {
buf.append(" // comment\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -425,7 +425,7 @@ public class LineCommentOffsetsTest extends ASTRewritingTest {
buf.append(" return;\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -466,7 +466,7 @@ public class LineCommentOffsetsTest extends ASTRewritingTest {
buf.append(" }\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -505,7 +505,7 @@ public class LineCommentOffsetsTest extends ASTRewritingTest {
buf.append("public class E \n");
buf.append("{\n");
buf.append("}//comment");
- ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("E.js", buf.toString(), false, null);
CompilationUnit astRoot= createAST3(cu);
ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingCopyTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingCopyTest.java
index 0d65e7e..f79a8bd 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingCopyTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingCopyTest.java
@@ -55,7 +55,7 @@ public class ASTRewritingModifyingCopyTest extends ASTRewritingModifyingTest {
buf.append("class Z {\n");
buf.append("\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -105,7 +105,7 @@ public class ASTRewritingModifyingCopyTest extends ASTRewritingModifyingTest {
buf.append("class Z {\n");
buf.append("\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -153,7 +153,7 @@ public class ASTRewritingModifyingCopyTest extends ASTRewritingModifyingTest {
buf.append("class Y {\n");
buf.append("\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -200,7 +200,7 @@ public class ASTRewritingModifyingCopyTest extends ASTRewritingModifyingTest {
buf.append("class Y {\n");
buf.append("\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -248,7 +248,7 @@ public class ASTRewritingModifyingCopyTest extends ASTRewritingModifyingTest {
buf.append("class Y {\n");
buf.append("\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -298,7 +298,7 @@ public class ASTRewritingModifyingCopyTest extends ASTRewritingModifyingTest {
buf.append(" bar3();\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -341,7 +341,7 @@ public class ASTRewritingModifyingCopyTest extends ASTRewritingModifyingTest {
IPackageFragment pack1= fSourceFolder.createPackageFragment("test", false, null);
StringBuffer buf= new StringBuffer();
buf.append("package test; public class Test { }");
- ICompilationUnit cu= pack1.createCompilationUnit("Test.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("Test.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -398,7 +398,7 @@ public class ASTRewritingModifyingCopyTest extends ASTRewritingModifyingTest {
// buf.append(" \n");
// buf.append(" }\n");
// buf.append("}\n");
-// ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+// ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
//
// CompilationUnit astRoot= parseCompilationUnit(cu, false);
//
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingInsertTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingInsertTest.java
index 53b1168..3f86afd 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingInsertTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingInsertTest.java
@@ -50,7 +50,7 @@ public class ASTRewritingModifyingInsertTest extends ASTRewritingModifyingTest {
buf.append("import java.awt.*;\n");
buf.append("public class X {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -95,7 +95,7 @@ public class ASTRewritingModifyingInsertTest extends ASTRewritingModifyingTest {
buf.append("class Z {\n");
buf.append("\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -145,7 +145,7 @@ public class ASTRewritingModifyingInsertTest extends ASTRewritingModifyingTest {
buf.append("class Z {\n");
buf.append("\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -194,7 +194,7 @@ public class ASTRewritingModifyingInsertTest extends ASTRewritingModifyingTest {
buf.append("class Z {\n");
buf.append("\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -237,7 +237,7 @@ public class ASTRewritingModifyingInsertTest extends ASTRewritingModifyingTest {
// buf.append("public class X {\n");
// buf.append("\n");
// buf.append("}\n");
-// ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+// ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
//
// CompilationUnit astRoot= parseCompilationUnit(cu, false);
//
@@ -281,7 +281,7 @@ public class ASTRewritingModifyingInsertTest extends ASTRewritingModifyingTest {
buf.append("\n");
buf.append("public class X {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -322,7 +322,7 @@ public class ASTRewritingModifyingInsertTest extends ASTRewritingModifyingTest {
buf.append(" \n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -366,7 +366,7 @@ public class ASTRewritingModifyingInsertTest extends ASTRewritingModifyingTest {
// buf.append(" \n");
// buf.append(" }\n");
// buf.append("}\n");
-// ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+// ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
//
// CompilationUnit astRoot= parseCompilationUnit(cu, false);
//
@@ -419,7 +419,7 @@ public class ASTRewritingModifyingInsertTest extends ASTRewritingModifyingTest {
// buf.append(" \n");
// buf.append(" }\n");
// buf.append("}\n");
-// ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+// ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
//
// CompilationUnit astRoot= parseCompilationUnit(cu, false);
//
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingMoveTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingMoveTest.java
index 6fb2116..0d1c3a1 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingMoveTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingMoveTest.java
@@ -54,7 +54,7 @@ public class ASTRewritingModifyingMoveTest extends ASTRewritingModifyingTest {
buf.append("class Z {\n");
buf.append("\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -96,7 +96,7 @@ public class ASTRewritingModifyingMoveTest extends ASTRewritingModifyingTest {
buf.append("class Z {\n");
buf.append("\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -145,7 +145,7 @@ public class ASTRewritingModifyingMoveTest extends ASTRewritingModifyingTest {
buf.append("class Z {\n");
buf.append("\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -188,7 +188,7 @@ public class ASTRewritingModifyingMoveTest extends ASTRewritingModifyingTest {
buf.append("class Z {\n");
buf.append("\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -228,7 +228,7 @@ public class ASTRewritingModifyingMoveTest extends ASTRewritingModifyingTest {
buf.append("class Z {\n");
buf.append("\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -270,7 +270,7 @@ public class ASTRewritingModifyingMoveTest extends ASTRewritingModifyingTest {
buf.append("class Z {\n");
buf.append("\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -313,7 +313,7 @@ public class ASTRewritingModifyingMoveTest extends ASTRewritingModifyingTest {
buf.append("class Z {\n");
buf.append("\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -359,7 +359,7 @@ public class ASTRewritingModifyingMoveTest extends ASTRewritingModifyingTest {
buf.append("class Y {\n");
buf.append("\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -403,7 +403,7 @@ public class ASTRewritingModifyingMoveTest extends ASTRewritingModifyingTest {
buf.append(" bar3();\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -452,7 +452,7 @@ public class ASTRewritingModifyingMoveTest extends ASTRewritingModifyingTest {
// buf.append(" \n");
// buf.append(" }\n");
// buf.append("}\n");
-// ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+// ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
//
// CompilationUnit astRoot= parseCompilationUnit(cu, false);
//
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingOtherTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingOtherTest.java
index e285d91..119a169 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingOtherTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingOtherTest.java
@@ -46,7 +46,7 @@ public class ASTRewritingModifyingOtherTest extends ASTRewritingModifyingTest {
buf.append("package test0000;\n");
buf.append("public class X {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -63,7 +63,7 @@ public class ASTRewritingModifyingOtherTest extends ASTRewritingModifyingTest {
buf.append("package test0001;\n");
buf.append("public class X {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -89,7 +89,7 @@ public class ASTRewritingModifyingOtherTest extends ASTRewritingModifyingTest {
buf.append("import java.awt.*;\n");
buf.append("public class X {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -126,7 +126,7 @@ public class ASTRewritingModifyingOtherTest extends ASTRewritingModifyingTest {
buf.append("import java.awt.*;\n");
buf.append("public class X {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -162,7 +162,7 @@ public class ASTRewritingModifyingOtherTest extends ASTRewritingModifyingTest {
buf.append("class Z {\n");
buf.append("\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -207,7 +207,7 @@ public class ASTRewritingModifyingOtherTest extends ASTRewritingModifyingTest {
// buf.append(" \n");
// buf.append(" }\n");
// buf.append("}\n");
-// ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+// ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
//
// CompilationUnit astRoot= parseCompilationUnit(cu, false);
//
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingRemoveTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingRemoveTest.java
index 4635863..17206b2 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingRemoveTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingRemoveTest.java
@@ -47,7 +47,7 @@ public class ASTRewritingModifyingRemoveTest extends ASTRewritingModifyingTest {
buf.append("package test0001;\n");
buf.append("public class X {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -73,7 +73,7 @@ public class ASTRewritingModifyingRemoveTest extends ASTRewritingModifyingTest {
buf.append("import java.awt.*;\n");
buf.append("public class X {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -107,7 +107,7 @@ public class ASTRewritingModifyingRemoveTest extends ASTRewritingModifyingTest {
buf.append("class Z {\n");
buf.append("\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -144,7 +144,7 @@ public class ASTRewritingModifyingRemoveTest extends ASTRewritingModifyingTest {
buf.append("class Z {\n");
buf.append("\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -187,7 +187,7 @@ public class ASTRewritingModifyingRemoveTest extends ASTRewritingModifyingTest {
// buf.append("public class X {\n");
// buf.append("\n");
// buf.append("}\n");
-// ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+// ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
//
// CompilationUnit astRoot= parseCompilationUnit(cu, false);
//
@@ -224,7 +224,7 @@ public class ASTRewritingModifyingRemoveTest extends ASTRewritingModifyingTest {
buf.append(" bar3();\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -267,7 +267,7 @@ public class ASTRewritingModifyingRemoveTest extends ASTRewritingModifyingTest {
// buf.append(" \n");
// buf.append(" }\n");
// buf.append("}\n");
-// ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+// ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
//
// CompilationUnit astRoot= parseCompilationUnit(cu, false);
//
@@ -310,7 +310,7 @@ public class ASTRewritingModifyingRemoveTest extends ASTRewritingModifyingTest {
// buf.append(" \n");
// buf.append(" }\n");
// buf.append("}\n");
-// ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+// ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
//
// CompilationUnit astRoot= parseCompilationUnit(cu, false);
//
@@ -354,7 +354,7 @@ public class ASTRewritingModifyingRemoveTest extends ASTRewritingModifyingTest {
buf.append(" void foo2() {\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -396,7 +396,7 @@ public class ASTRewritingModifyingRemoveTest extends ASTRewritingModifyingTest {
buf.append("\n");
buf.append(" // comment5\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -437,7 +437,7 @@ public class ASTRewritingModifyingRemoveTest extends ASTRewritingModifyingTest {
buf.append(" private void foo2(){\n");
buf.append(" }\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingReplaceTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingReplaceTest.java
index 0509ebb..3c0a6bb 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingReplaceTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingReplaceTest.java
@@ -46,7 +46,7 @@ public class ASTRewritingModifyingReplaceTest extends ASTRewritingModifyingTest
buf.append("package test0001;\n");
buf.append("public class X {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -70,7 +70,7 @@ public class ASTRewritingModifyingReplaceTest extends ASTRewritingModifyingTest
buf.append("package test0002;\n");
buf.append("public class X {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -101,7 +101,7 @@ public class ASTRewritingModifyingReplaceTest extends ASTRewritingModifyingTest
buf.append("import java.awt.*;\n");
buf.append("public class X {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -133,7 +133,7 @@ public class ASTRewritingModifyingReplaceTest extends ASTRewritingModifyingTest
buf.append("import java.awt.*;\n");
buf.append("public class X {\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -170,7 +170,7 @@ public class ASTRewritingModifyingReplaceTest extends ASTRewritingModifyingTest
buf.append("class Z {\n");
buf.append("\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
@@ -214,7 +214,7 @@ public class ASTRewritingModifyingReplaceTest extends ASTRewritingModifyingTest
buf.append("class Z {\n");
buf.append("\n");
buf.append("}\n");
- ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+ ICompilationUnit cu= pack1.createCompilationUnit("X.js", buf.toString(), false, null);
CompilationUnit astRoot= createCU(cu, false);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/attach.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/attach.jar
new file mode 100644
index 0000000..2a34147
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/attach.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/attach2.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/attach2.jar
new file mode 100644
index 0000000..de4b989
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/attach2.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/attach2src.zip b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/attach2src.zip
new file mode 100644
index 0000000..15cb0ec
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/attach2src.zip
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/attachsrc.new.zip b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/attachsrc.new.zip
new file mode 100644
index 0000000..8b17f5a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/attachsrc.new.zip
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/attachsrc.zip b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/attachsrc.zip
new file mode 100644
index 0000000..02f0d58
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/attachsrc.zip
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/b153133.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/b153133.jar
new file mode 100644
index 0000000..ca6b4a6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/b153133.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/full.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/full.jar
new file mode 100644
index 0000000..cf3beba
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/full.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/fullsrc.zip b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/fullsrc.zip
new file mode 100644
index 0000000..e13584f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/fullsrc.zip
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/src.zip b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/src.zip
new file mode 100644
index 0000000..8ec045f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/src.zip
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/src/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/src/A.js
new file mode 100644
index 0000000..60e5072
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/src/A.js
@@ -0,0 +1,2 @@
+public class A {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/srcLib/p/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/srcLib/p/X.js
new file mode 100644
index 0000000..b325efd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/srcLib/p/X.js
@@ -0,0 +1,5 @@
+package p;
+public class X {
+ public void foo() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test.jar
new file mode 100644
index 0000000..b4575c8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test2.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test2.jar
new file mode 100644
index 0000000..45d4b00
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test2.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test4.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test4.jar
new file mode 100644
index 0000000..a0c845b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test4.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test4_src.zip b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test4_src.zip
new file mode 100644
index 0000000..c5e7250
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test4_src.zip
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test5.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test5.jar
new file mode 100644
index 0000000..62fc165
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test5.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test6.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test6.jar
new file mode 100644
index 0000000..820ea35
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test6.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test6src.zip b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test6src.zip
new file mode 100644
index 0000000..14f6852
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test6src.zip
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/update.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/update.jar
new file mode 100644
index 0000000..5e0fec3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/update.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc.zip b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc.zip
new file mode 100644
index 0000000..b93bb3d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc.zip
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/allclasses-frame.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/allclasses-frame.html
new file mode 100644
index 0000000..c4639e6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/allclasses-frame.html
@@ -0,0 +1,52 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:10 CEST 2006 -->
+<TITLE>
+All Classes
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
+
+
+</HEAD>
+
+<BODY BGCOLOR="white">
+<FONT size="+1" CLASS="FrameHeadingFont">
+<B>All Classes</B></FONT>
+<BR>
+
+<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
+<TR>
+<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="p1/p2/Annot.html" title="annotation in p1.p2" target="classFrame">Annot</A>
+<BR>
+<A HREF="p1/p2/Annot.D.html" title="class in p1.p2" target="classFrame">Annot.D</A>
+<BR>
+<A HREF="p1/p2/Annot2.html" title="annotation in p1.p2" target="classFrame">Annot2</A>
+<BR>
+<A HREF="p1/p2/p3/C.html" title="interface in p1.p2.p3" target="classFrame"><I>C</I></A>
+<BR>
+<A HREF="p1/p2/p3/D.html" title="class in p1.p2.p3" target="classFrame">D</A>
+<BR>
+<A HREF="p1/p2/E.html" title="enum in p1.p2" target="classFrame">E</A>
+<BR>
+<A HREF="p1/p2/TestClass.html" title="class in p1.p2" target="classFrame">TestClass</A>
+<BR>
+<A HREF="p1/p2/X.html" title="class in p1.p2" target="classFrame">X</A>
+<BR>
+<A HREF="p2/X.html" title="class in p2" target="classFrame">X</A>
+<BR>
+<A HREF="p2/Y.html" title="class in p2" target="classFrame">Y</A>
+<BR>
+<A HREF="p1/p2/Z.html" title="class in p1.p2" target="classFrame">Z</A>
+<BR>
+<A HREF="p2/Z.html" title="class in p2" target="classFrame">Z</A>
+<BR>
+</FONT></TD>
+</TR>
+</TABLE>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/allclasses-noframe.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/allclasses-noframe.html
new file mode 100644
index 0000000..902721a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/allclasses-noframe.html
@@ -0,0 +1,52 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:10 CEST 2006 -->
+<TITLE>
+All Classes
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
+
+
+</HEAD>
+
+<BODY BGCOLOR="white">
+<FONT size="+1" CLASS="FrameHeadingFont">
+<B>All Classes</B></FONT>
+<BR>
+
+<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
+<TR>
+<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="p1/p2/Annot.html" title="annotation in p1.p2">Annot</A>
+<BR>
+<A HREF="p1/p2/Annot.D.html" title="class in p1.p2">Annot.D</A>
+<BR>
+<A HREF="p1/p2/Annot2.html" title="annotation in p1.p2">Annot2</A>
+<BR>
+<A HREF="p1/p2/p3/C.html" title="interface in p1.p2.p3"><I>C</I></A>
+<BR>
+<A HREF="p1/p2/p3/D.html" title="class in p1.p2.p3">D</A>
+<BR>
+<A HREF="p1/p2/E.html" title="enum in p1.p2">E</A>
+<BR>
+<A HREF="p1/p2/TestClass.html" title="class in p1.p2">TestClass</A>
+<BR>
+<A HREF="p1/p2/X.html" title="class in p1.p2">X</A>
+<BR>
+<A HREF="p2/X.html" title="class in p2">X</A>
+<BR>
+<A HREF="p2/Y.html" title="class in p2">Y</A>
+<BR>
+<A HREF="p1/p2/Z.html" title="class in p1.p2">Z</A>
+<BR>
+<A HREF="p2/Z.html" title="class in p2">Z</A>
+<BR>
+</FONT></TD>
+</TR>
+</TABLE>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/constant-values.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/constant-values.html
new file mode 100644
index 0000000..b1b7e20
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/constant-values.html
@@ -0,0 +1,142 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:09 CEST 2006 -->
+<TITLE>
+Constant Field Values
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="Constant Field Values";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="index.html?constant-values.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="constant-values.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<CENTER>
+<H1>
+Constant Field Values</H1>
+</CENTER>
+<HR SIZE="4" NOSHADE>
+<B>Contents</B><UL>
+</UL>
+
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="index.html?constant-values.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="constant-values.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/deprecated-list.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/deprecated-list.html
new file mode 100644
index 0000000..6f387b1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/deprecated-list.html
@@ -0,0 +1,142 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:10 CEST 2006 -->
+<TITLE>
+Deprecated List
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="Deprecated List";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Deprecated</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="index.html?deprecated-list.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="deprecated-list.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<CENTER>
+<H2>
+<B>Deprecated API</B></H2>
+</CENTER>
+<HR SIZE="4" NOSHADE>
+<B>Contents</B><UL>
+</UL>
+
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Deprecated</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="index.html?deprecated-list.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="deprecated-list.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/help-doc.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/help-doc.html
new file mode 100644
index 0000000..0f27c1a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/help-doc.html
@@ -0,0 +1,219 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:10 CEST 2006 -->
+<TITLE>
+API Help
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="API Help";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Help</B></FONT>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="index.html?help-doc.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="help-doc.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<CENTER>
+<H1>
+How This API Document Is Organized</H1>
+</CENTER>
+This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.<H3>
+Overview</H3>
+<BLOCKQUOTE>
+
+<P>
+The <A HREF="overview-summary.html">Overview</A> page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.</BLOCKQUOTE>
+<H3>
+Package</H3>
+<BLOCKQUOTE>
+
+<P>
+Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:<UL>
+<LI>Interfaces (italic)<LI>Classes<LI>Enums<LI>Exceptions<LI>Errors<LI>Annotation Types</UL>
+</BLOCKQUOTE>
+<H3>
+Class/Interface</H3>
+<BLOCKQUOTE>
+
+<P>
+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:<UL>
+<LI>Class inheritance diagram<LI>Direct Subclasses<LI>All Known Subinterfaces<LI>All Known Implementing Classes<LI>Class/interface declaration<LI>Class/interface description
+<P>
+<LI>Nested Class Summary<LI>Field Summary<LI>Constructor Summary<LI>Method Summary
+<P>
+<LI>Field Detail<LI>Constructor Detail<LI>Method Detail</UL>
+Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.</BLOCKQUOTE>
+</BLOCKQUOTE>
+<H3>
+Annotation Type</H3>
+<BLOCKQUOTE>
+
+<P>
+Each annotation type has its own separate page with the following sections:<UL>
+<LI>Annotation Type declaration<LI>Annotation Type description<LI>Required Element Summary<LI>Optional Element Summary<LI>Element Detail</UL>
+</BLOCKQUOTE>
+</BLOCKQUOTE>
+<H3>
+Enum</H3>
+<BLOCKQUOTE>
+
+<P>
+Each enum has its own separate page with the following sections:<UL>
+<LI>Enum declaration<LI>Enum description<LI>Enum Constant Summary<LI>Enum Constant Detail</UL>
+</BLOCKQUOTE>
+<H3>
+Use</H3>
+<BLOCKQUOTE>
+Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.</BLOCKQUOTE>
+<H3>
+Tree (Class Hierarchy)</H3>
+<BLOCKQUOTE>
+There is a <A HREF="overview-tree.html">Class Hierarchy</A> page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with <code>java.lang.Object</code>. The interfaces do not inherit from <code>java.lang.Object</code>.<UL>
+<LI>When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.<LI>When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.</UL>
+</BLOCKQUOTE>
+<H3>
+Deprecated API</H3>
+<BLOCKQUOTE>
+The <A HREF="deprecated-list.html">Deprecated API</A> page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.</BLOCKQUOTE>
+<H3>
+Index</H3>
+<BLOCKQUOTE>
+The <A HREF="index-files/index-1.html">Index</A> contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.</BLOCKQUOTE>
+<H3>
+Prev/Next</H3>
+These links take you to the next or previous class, interface, package, or related page.<H3>
+Frames/No Frames</H3>
+These links show and hide the HTML frames. All pages are available with or without frames.
+<P>
+<H3>
+Serialized Form</H3>
+Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
+<P>
+<H3>
+Constant Field Values</H3>
+The <a href="constant-values.html">Constant Field Values</a> page lists the static final fields and their values.
+<P>
+<FONT SIZE="-1">
+<EM>
+This help file applies to API documentation generated using the standard doclet.</EM>
+</FONT>
+<BR>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Help</B></FONT>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="index.html?help-doc.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="help-doc.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-1.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-1.html
new file mode 100644
index 0000000..05716e1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-1.html
@@ -0,0 +1,141 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:09 CEST 2006 -->
+<TITLE>
+A-Index
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="A-Index";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV LETTER&nbsp;
+&nbsp;<A HREF="index-2.html"><B>NEXT LETTER</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?index-filesindex-1.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="index-1.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<A HREF="index-1.html">A</A> <A HREF="index-2.html">B</A> <A HREF="index-3.html">C</A> <A HREF="index-4.html">D</A> <A HREF="index-5.html">E</A> <A HREF="index-6.html">F</A> <A HREF="index-7.html">M</A> <A HREF="index-8.html">O</A> <A HREF="index-9.html">P</A> <A HREF="index-10.html">T</A> <A HREF="index-11.html">V</A> <A HREF="index-12.html">X</A> <A HREF="index-13.html">Y</A> <A HREF="index-14.html">Z</A> <HR>
+<A NAME="_A_"><!-- --></A><H2>
+<B>A</B></H2>
+<DL>
+<DT><A HREF="../p1/p2/Annot.html" title="annotation in p1.p2"><B>Annot</B></A> - Annotation Type in <A HREF="../p1/p2/package-summary.html">p1.p2</A><DD>&nbsp;<DT><A HREF="../p1/p2/Annot.D.html" title="class in p1.p2"><B>Annot.D</B></A> - Class in <A HREF="../p1/p2/package-summary.html">p1.p2</A><DD>&nbsp;<DT><A HREF="../p1/p2/Annot.D.html#Annot.D()"><B>Annot.D()</B></A> -
+Constructor for class p1.p2.<A HREF="../p1/p2/Annot.D.html" title="class in p1.p2">Annot.D</A>
+<DD>&nbsp;
+<DT><A HREF="../p1/p2/Annot2.html" title="annotation in p1.p2"><B>Annot2</B></A> - Annotation Type in <A HREF="../p1/p2/package-summary.html">p1.p2</A><DD>&nbsp;</DL>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV LETTER&nbsp;
+&nbsp;<A HREF="index-2.html"><B>NEXT LETTER</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?index-filesindex-1.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="index-1.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<A HREF="index-1.html">A</A> <A HREF="index-2.html">B</A> <A HREF="index-3.html">C</A> <A HREF="index-4.html">D</A> <A HREF="index-5.html">E</A> <A HREF="index-6.html">F</A> <A HREF="index-7.html">M</A> <A HREF="index-8.html">O</A> <A HREF="index-9.html">P</A> <A HREF="index-10.html">T</A> <A HREF="index-11.html">V</A> <A HREF="index-12.html">X</A> <A HREF="index-13.html">Y</A> <A HREF="index-14.html">Z</A> <HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-10.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-10.html
new file mode 100644
index 0000000..a45d9af
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-10.html
@@ -0,0 +1,144 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:10 CEST 2006 -->
+<TITLE>
+T-Index
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="T-Index";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="index-9.html"><B>PREV LETTER</B></A>&nbsp;
+&nbsp;<A HREF="index-11.html"><B>NEXT LETTER</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?index-filesindex-10.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="index-10.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<A HREF="index-1.html">A</A> <A HREF="index-2.html">B</A> <A HREF="index-3.html">C</A> <A HREF="index-4.html">D</A> <A HREF="index-5.html">E</A> <A HREF="index-6.html">F</A> <A HREF="index-7.html">M</A> <A HREF="index-8.html">O</A> <A HREF="index-9.html">P</A> <A HREF="index-10.html">T</A> <A HREF="index-11.html">V</A> <A HREF="index-12.html">X</A> <A HREF="index-13.html">Y</A> <A HREF="index-14.html">Z</A> <HR>
+<A NAME="_T_"><!-- --></A><H2>
+<B>T</B></H2>
+<DL>
+<DT><A HREF="../p1/p2/TestClass.html" title="class in p1.p2"><B>TestClass</B></A> - Class in <A HREF="../p1/p2/package-summary.html">p1.p2</A><DD>&nbsp;<DT><A HREF="../p1/p2/TestClass.html#TestClass()"><B>TestClass()</B></A> -
+Constructor for class p1.p2.<A HREF="../p1/p2/TestClass.html" title="class in p1.p2">TestClass</A>
+<DD>&nbsp;
+<DT><A HREF="../p1/p2/p3/C.html#toArray(T[])"><B>toArray(T[])</B></A> -
+Method in interface p1.p2.p3.<A HREF="../p1/p2/p3/C.html" title="interface in p1.p2.p3">C</A>
+<DD>Javadoc for foo(T[])
+</DL>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="index-9.html"><B>PREV LETTER</B></A>&nbsp;
+&nbsp;<A HREF="index-11.html"><B>NEXT LETTER</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?index-filesindex-10.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="index-10.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<A HREF="index-1.html">A</A> <A HREF="index-2.html">B</A> <A HREF="index-3.html">C</A> <A HREF="index-4.html">D</A> <A HREF="index-5.html">E</A> <A HREF="index-6.html">F</A> <A HREF="index-7.html">M</A> <A HREF="index-8.html">O</A> <A HREF="index-9.html">P</A> <A HREF="index-10.html">T</A> <A HREF="index-11.html">V</A> <A HREF="index-12.html">X</A> <A HREF="index-13.html">Y</A> <A HREF="index-14.html">Z</A> <HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-11.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-11.html
new file mode 100644
index 0000000..3859202
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-11.html
@@ -0,0 +1,145 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:10 CEST 2006 -->
+<TITLE>
+V-Index
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="V-Index";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="index-10.html"><B>PREV LETTER</B></A>&nbsp;
+&nbsp;<A HREF="index-12.html"><B>NEXT LETTER</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?index-filesindex-11.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="index-11.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<A HREF="index-1.html">A</A> <A HREF="index-2.html">B</A> <A HREF="index-3.html">C</A> <A HREF="index-4.html">D</A> <A HREF="index-5.html">E</A> <A HREF="index-6.html">F</A> <A HREF="index-7.html">M</A> <A HREF="index-8.html">O</A> <A HREF="index-9.html">P</A> <A HREF="index-10.html">T</A> <A HREF="index-11.html">V</A> <A HREF="index-12.html">X</A> <A HREF="index-13.html">Y</A> <A HREF="index-14.html">Z</A> <HR>
+<A NAME="_V_"><!-- --></A><H2>
+<B>V</B></H2>
+<DL>
+<DT><A HREF="../p1/p2/E.html#valueOf(java.lang.String)"><B>valueOf(String)</B></A> -
+Static method in enum p1.p2.<A HREF="../p1/p2/E.html" title="enum in p1.p2">E</A>
+<DD>Returns the enum constant of this type with the specified name.
+<DT><A HREF="../p1/p2/E.html#values()"><B>values()</B></A> -
+Static method in enum p1.p2.<A HREF="../p1/p2/E.html" title="enum in p1.p2">E</A>
+<DD>Returns an array containing the constants of this enum type, in
+the order they're declared.
+</DL>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="index-10.html"><B>PREV LETTER</B></A>&nbsp;
+&nbsp;<A HREF="index-12.html"><B>NEXT LETTER</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?index-filesindex-11.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="index-11.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<A HREF="index-1.html">A</A> <A HREF="index-2.html">B</A> <A HREF="index-3.html">C</A> <A HREF="index-4.html">D</A> <A HREF="index-5.html">E</A> <A HREF="index-6.html">F</A> <A HREF="index-7.html">M</A> <A HREF="index-8.html">O</A> <A HREF="index-9.html">P</A> <A HREF="index-10.html">T</A> <A HREF="index-11.html">V</A> <A HREF="index-12.html">X</A> <A HREF="index-13.html">Y</A> <A HREF="index-14.html">Z</A> <HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-12.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-12.html
new file mode 100644
index 0000000..556b9b6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-12.html
@@ -0,0 +1,150 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:10 CEST 2006 -->
+<TITLE>
+X-Index
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="X-Index";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="index-11.html"><B>PREV LETTER</B></A>&nbsp;
+&nbsp;<A HREF="index-13.html"><B>NEXT LETTER</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?index-filesindex-12.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="index-12.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<A HREF="index-1.html">A</A> <A HREF="index-2.html">B</A> <A HREF="index-3.html">C</A> <A HREF="index-4.html">D</A> <A HREF="index-5.html">E</A> <A HREF="index-6.html">F</A> <A HREF="index-7.html">M</A> <A HREF="index-8.html">O</A> <A HREF="index-9.html">P</A> <A HREF="index-10.html">T</A> <A HREF="index-11.html">V</A> <A HREF="index-12.html">X</A> <A HREF="index-13.html">Y</A> <A HREF="index-14.html">Z</A> <HR>
+<A NAME="_X_"><!-- --></A><H2>
+<B>X</B></H2>
+<DL>
+<DT><A HREF="../p1/p2/X.html" title="class in p1.p2"><B>X</B></A> - Class in <A HREF="../p1/p2/package-summary.html">p1.p2</A><DD>Class X javadoc<DT><A HREF="../p1/p2/X.html#X(int)"><B>X(int)</B></A> -
+Constructor for class p1.p2.<A HREF="../p1/p2/X.html" title="class in p1.p2">X</A>
+<DD>Javadoc for constructor X(int)
+<DT><A HREF="../p2/X.html" title="class in p2"><B>X</B></A> - Class in <A HREF="../p2/package-summary.html">p2</A><DD>&nbsp;<DT><A HREF="../p2/X.html#X()"><B>X()</B></A> -
+Constructor for class p2.<A HREF="../p2/X.html" title="class in p2">X</A>
+<DD>&nbsp;
+<DT><A HREF="../p1/p2/X.A.html" title="class in p1.p2"><B>X.A</B></A> - Class in <A HREF="../p1/p2/package-summary.html">p1.p2</A><DD>Javadoc for member type A<DT><A HREF="../p1/p2/X.A.html#X.A(float)"><B>X.A(float)</B></A> -
+Constructor for class p1.p2.<A HREF="../p1/p2/X.A.html" title="class in p1.p2">X.A</A>
+<DD>Javadoc for constructor of A
+<DT><A HREF="../p1/p2/X.B.html" title="class in p1.p2"><B>X.B</B></A> - Class in <A HREF="../p1/p2/package-summary.html">p1.p2</A><DD>&nbsp;<DT><A HREF="../p1/p2/X.B.html#X.B()"><B>X.B()</B></A> -
+Constructor for class p1.p2.<A HREF="../p1/p2/X.B.html" title="class in p1.p2">X.B</A>
+<DD>&nbsp;
+</DL>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="index-11.html"><B>PREV LETTER</B></A>&nbsp;
+&nbsp;<A HREF="index-13.html"><B>NEXT LETTER</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?index-filesindex-12.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="index-12.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<A HREF="index-1.html">A</A> <A HREF="index-2.html">B</A> <A HREF="index-3.html">C</A> <A HREF="index-4.html">D</A> <A HREF="index-5.html">E</A> <A HREF="index-6.html">F</A> <A HREF="index-7.html">M</A> <A HREF="index-8.html">O</A> <A HREF="index-9.html">P</A> <A HREF="index-10.html">T</A> <A HREF="index-11.html">V</A> <A HREF="index-12.html">X</A> <A HREF="index-13.html">Y</A> <A HREF="index-14.html">Z</A> <HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-13.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-13.html
new file mode 100644
index 0000000..7460c19
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-13.html
@@ -0,0 +1,141 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:10 CEST 2006 -->
+<TITLE>
+Y-Index
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="Y-Index";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="index-12.html"><B>PREV LETTER</B></A>&nbsp;
+&nbsp;<A HREF="index-14.html"><B>NEXT LETTER</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?index-filesindex-13.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="index-13.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<A HREF="index-1.html">A</A> <A HREF="index-2.html">B</A> <A HREF="index-3.html">C</A> <A HREF="index-4.html">D</A> <A HREF="index-5.html">E</A> <A HREF="index-6.html">F</A> <A HREF="index-7.html">M</A> <A HREF="index-8.html">O</A> <A HREF="index-9.html">P</A> <A HREF="index-10.html">T</A> <A HREF="index-11.html">V</A> <A HREF="index-12.html">X</A> <A HREF="index-13.html">Y</A> <A HREF="index-14.html">Z</A> <HR>
+<A NAME="_Y_"><!-- --></A><H2>
+<B>Y</B></H2>
+<DL>
+<DT><A HREF="../p2/Y.html" title="class in p2"><B>Y</B></A> - Class in <A HREF="../p2/package-summary.html">p2</A><DD>&nbsp;<DT><A HREF="../p2/Y.html#Y()"><B>Y()</B></A> -
+Constructor for class p2.<A HREF="../p2/Y.html" title="class in p2">Y</A>
+<DD>&nbsp;
+</DL>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="index-12.html"><B>PREV LETTER</B></A>&nbsp;
+&nbsp;<A HREF="index-14.html"><B>NEXT LETTER</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?index-filesindex-13.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="index-13.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<A HREF="index-1.html">A</A> <A HREF="index-2.html">B</A> <A HREF="index-3.html">C</A> <A HREF="index-4.html">D</A> <A HREF="index-5.html">E</A> <A HREF="index-6.html">F</A> <A HREF="index-7.html">M</A> <A HREF="index-8.html">O</A> <A HREF="index-9.html">P</A> <A HREF="index-10.html">T</A> <A HREF="index-11.html">V</A> <A HREF="index-12.html">X</A> <A HREF="index-13.html">Y</A> <A HREF="index-14.html">Z</A> <HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-14.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-14.html
new file mode 100644
index 0000000..3e7439c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-14.html
@@ -0,0 +1,141 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:10 CEST 2006 -->
+<TITLE>
+Z-Index
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="Z-Index";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="index-13.html"><B>PREV LETTER</B></A>&nbsp;
+&nbsp;NEXT LETTER</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?index-filesindex-14.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="index-14.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<A HREF="index-1.html">A</A> <A HREF="index-2.html">B</A> <A HREF="index-3.html">C</A> <A HREF="index-4.html">D</A> <A HREF="index-5.html">E</A> <A HREF="index-6.html">F</A> <A HREF="index-7.html">M</A> <A HREF="index-8.html">O</A> <A HREF="index-9.html">P</A> <A HREF="index-10.html">T</A> <A HREF="index-11.html">V</A> <A HREF="index-12.html">X</A> <A HREF="index-13.html">Y</A> <A HREF="index-14.html">Z</A> <HR>
+<A NAME="_Z_"><!-- --></A><H2>
+<B>Z</B></H2>
+<DL>
+<DT><A HREF="../p1/p2/Z.html" title="class in p1.p2"><B>Z</B></A> - Class in <A HREF="../p1/p2/package-summary.html">p1.p2</A><DD>Description for class Z<DT><A HREF="../p2/Z.html" title="class in p2"><B>Z</B></A>&lt;<A HREF="../p2/Z.html" title="type parameter in Z">T</A>&gt; - Class in <A HREF="../p2/package-summary.html">p2</A><DD>&nbsp;<DT><A HREF="../p2/Z.html#Z()"><B>Z()</B></A> -
+Constructor for class p2.<A HREF="../p2/Z.html" title="class in p2">Z</A>
+<DD>&nbsp;
+</DL>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="index-13.html"><B>PREV LETTER</B></A>&nbsp;
+&nbsp;NEXT LETTER</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?index-filesindex-14.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="index-14.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<A HREF="index-1.html">A</A> <A HREF="index-2.html">B</A> <A HREF="index-3.html">C</A> <A HREF="index-4.html">D</A> <A HREF="index-5.html">E</A> <A HREF="index-6.html">F</A> <A HREF="index-7.html">M</A> <A HREF="index-8.html">O</A> <A HREF="index-9.html">P</A> <A HREF="index-10.html">T</A> <A HREF="index-11.html">V</A> <A HREF="index-12.html">X</A> <A HREF="index-13.html">Y</A> <A HREF="index-14.html">Z</A> <HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-15.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-15.html
new file mode 100644
index 0000000..deb3895
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-15.html
@@ -0,0 +1,141 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 11:39:03 CEST 2006 -->
+<TITLE>
+Z-Index
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="Z-Index";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="index-14.html"><B>PREV LETTER</B></A>&nbsp;
+&nbsp;NEXT LETTER</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?index-filesindex-15.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="index-15.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<A HREF="index-1.html">A</A> <A HREF="index-2.html">B</A> <A HREF="index-3.html">C</A> <A HREF="index-4.html">D</A> <A HREF="index-5.html">E</A> <A HREF="index-6.html">F</A> <A HREF="index-7.html">M</A> <A HREF="index-8.html">O</A> <A HREF="index-9.html">P</A> <A HREF="index-10.html">T</A> <A HREF="index-11.html">V</A> <A HREF="index-12.html">W</A> <A HREF="index-13.html">X</A> <A HREF="index-14.html">Y</A> <A HREF="index-15.html">Z</A> <HR>
+<A NAME="_Z_"><!-- --></A><H2>
+<B>Z</B></H2>
+<DL>
+<DT><A HREF="../p1/p2/Z.html" title="class in p1.p2"><B>Z</B></A> - Class in <A HREF="../p1/p2/package-summary.html">p1.p2</A><DD>Description for class Z<DT><A HREF="../p2/Z.html" title="class in p2"><B>Z</B></A>&lt;<A HREF="../p2/Z.html" title="type parameter in Z">T</A>&gt; - Class in <A HREF="../p2/package-summary.html">p2</A><DD>&nbsp;<DT><A HREF="../p2/Z.html#Z()"><B>Z()</B></A> -
+Constructor for class p2.<A HREF="../p2/Z.html" title="class in p2">Z</A>
+<DD>&nbsp;
+</DL>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="index-14.html"><B>PREV LETTER</B></A>&nbsp;
+&nbsp;NEXT LETTER</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?index-filesindex-15.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="index-15.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<A HREF="index-1.html">A</A> <A HREF="index-2.html">B</A> <A HREF="index-3.html">C</A> <A HREF="index-4.html">D</A> <A HREF="index-5.html">E</A> <A HREF="index-6.html">F</A> <A HREF="index-7.html">M</A> <A HREF="index-8.html">O</A> <A HREF="index-9.html">P</A> <A HREF="index-10.html">T</A> <A HREF="index-11.html">V</A> <A HREF="index-12.html">W</A> <A HREF="index-13.html">X</A> <A HREF="index-14.html">Y</A> <A HREF="index-15.html">Z</A> <HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-2.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-2.html
new file mode 100644
index 0000000..eaa1312
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-2.html
@@ -0,0 +1,156 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:09 CEST 2006 -->
+<TITLE>
+B-Index
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="B-Index";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="index-1.html"><B>PREV LETTER</B></A>&nbsp;
+&nbsp;<A HREF="index-3.html"><B>NEXT LETTER</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?index-filesindex-2.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="index-2.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<A HREF="index-1.html">A</A> <A HREF="index-2.html">B</A> <A HREF="index-3.html">C</A> <A HREF="index-4.html">D</A> <A HREF="index-5.html">E</A> <A HREF="index-6.html">F</A> <A HREF="index-7.html">M</A> <A HREF="index-8.html">O</A> <A HREF="index-9.html">P</A> <A HREF="index-10.html">T</A> <A HREF="index-11.html">V</A> <A HREF="index-12.html">X</A> <A HREF="index-13.html">Y</A> <A HREF="index-14.html">Z</A> <HR>
+<A NAME="_B_"><!-- --></A><H2>
+<B>B</B></H2>
+<DL>
+<DT><A HREF="../p1/p2/p3/C.html#bar()"><B>bar()</B></A> -
+Method in interface p1.p2.p3.<A HREF="../p1/p2/p3/C.html" title="interface in p1.p2.p3">C</A>
+<DD>Javadoc for bar()
+<DT><A HREF="../p1/p2/X.html#bar(java.util.ArrayList)"><B>bar(ArrayList&lt;String&gt;)</B></A> -
+Method in class p1.p2.<A HREF="../p1/p2/X.html" title="class in p1.p2">X</A>
+<DD>&nbsp;
+<DT><A HREF="../p1/p2/p3/C.html#bar1(int, E)"><B>bar1(int, E)</B></A> -
+Method in interface p1.p2.p3.<A HREF="../p1/p2/p3/C.html" title="interface in p1.p2.p3">C</A>
+<DD>Javadoc for bar1
+<DT><A HREF="../p1/p2/p3/C.html#bar3(p1.p2.p3.D)"><B>bar3(D&lt;?&gt;)</B></A> -
+Method in interface p1.p2.p3.<A HREF="../p1/p2/p3/C.html" title="interface in p1.p2.p3">C</A>
+<DD>Javadoc for bar3
+<DT><A HREF="../p1/p2/p3/C.html#bar4(int, p1.p2.p3.D)"><B>bar4(int, D&lt;? extends E&gt;)</B></A> -
+Method in interface p1.p2.p3.<A HREF="../p1/p2/p3/C.html" title="interface in p1.p2.p3">C</A>
+<DD>Javadoc for bar4
+<DT><A HREF="../p1/p2/p3/C.html#bar5(java.util.Map, int, java.util.Map)"><B>bar5(Map&lt;K, V&gt;, int, Map&lt;K, V&gt;)</B></A> -
+Method in interface p1.p2.p3.<A HREF="../p1/p2/p3/C.html" title="interface in p1.p2.p3">C</A>
+<DD>Javadoc for bar5
+</DL>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="index-1.html"><B>PREV LETTER</B></A>&nbsp;
+&nbsp;<A HREF="index-3.html"><B>NEXT LETTER</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?index-filesindex-2.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="index-2.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<A HREF="index-1.html">A</A> <A HREF="index-2.html">B</A> <A HREF="index-3.html">C</A> <A HREF="index-4.html">D</A> <A HREF="index-5.html">E</A> <A HREF="index-6.html">F</A> <A HREF="index-7.html">M</A> <A HREF="index-8.html">O</A> <A HREF="index-9.html">P</A> <A HREF="index-10.html">T</A> <A HREF="index-11.html">V</A> <A HREF="index-12.html">X</A> <A HREF="index-13.html">Y</A> <A HREF="index-14.html">Z</A> <HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-3.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-3.html
new file mode 100644
index 0000000..f4924a5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-3.html
@@ -0,0 +1,138 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:09 CEST 2006 -->
+<TITLE>
+C-Index
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="C-Index";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="index-2.html"><B>PREV LETTER</B></A>&nbsp;
+&nbsp;<A HREF="index-4.html"><B>NEXT LETTER</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?index-filesindex-3.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="index-3.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<A HREF="index-1.html">A</A> <A HREF="index-2.html">B</A> <A HREF="index-3.html">C</A> <A HREF="index-4.html">D</A> <A HREF="index-5.html">E</A> <A HREF="index-6.html">F</A> <A HREF="index-7.html">M</A> <A HREF="index-8.html">O</A> <A HREF="index-9.html">P</A> <A HREF="index-10.html">T</A> <A HREF="index-11.html">V</A> <A HREF="index-12.html">X</A> <A HREF="index-13.html">Y</A> <A HREF="index-14.html">Z</A> <HR>
+<A NAME="_C_"><!-- --></A><H2>
+<B>C</B></H2>
+<DL>
+<DT><A HREF="../p1/p2/p3/C.html" title="interface in p1.p2.p3"><B>C</B></A>&lt;<A HREF="../p1/p2/p3/C.html" title="type parameter in C">E</A>&gt; - Interface in <A HREF="../p1/p2/p3/package-summary.html">p1.p2.p3</A><DD>&nbsp;</DL>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="index-2.html"><B>PREV LETTER</B></A>&nbsp;
+&nbsp;<A HREF="index-4.html"><B>NEXT LETTER</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?index-filesindex-3.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="index-3.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<A HREF="index-1.html">A</A> <A HREF="index-2.html">B</A> <A HREF="index-3.html">C</A> <A HREF="index-4.html">D</A> <A HREF="index-5.html">E</A> <A HREF="index-6.html">F</A> <A HREF="index-7.html">M</A> <A HREF="index-8.html">O</A> <A HREF="index-9.html">P</A> <A HREF="index-10.html">T</A> <A HREF="index-11.html">V</A> <A HREF="index-12.html">X</A> <A HREF="index-13.html">Y</A> <A HREF="index-14.html">Z</A> <HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-4.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-4.html
new file mode 100644
index 0000000..7b16f80
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-4.html
@@ -0,0 +1,144 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:09 CEST 2006 -->
+<TITLE>
+D-Index
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="D-Index";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="index-3.html"><B>PREV LETTER</B></A>&nbsp;
+&nbsp;<A HREF="index-5.html"><B>NEXT LETTER</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?index-filesindex-4.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="index-4.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<A HREF="index-1.html">A</A> <A HREF="index-2.html">B</A> <A HREF="index-3.html">C</A> <A HREF="index-4.html">D</A> <A HREF="index-5.html">E</A> <A HREF="index-6.html">F</A> <A HREF="index-7.html">M</A> <A HREF="index-8.html">O</A> <A HREF="index-9.html">P</A> <A HREF="index-10.html">T</A> <A HREF="index-11.html">V</A> <A HREF="index-12.html">X</A> <A HREF="index-13.html">Y</A> <A HREF="index-14.html">Z</A> <HR>
+<A NAME="_D_"><!-- --></A><H2>
+<B>D</B></H2>
+<DL>
+<DT><A HREF="../p1/p2/p3/C.html#d()"><B>d()</B></A> -
+Method in interface p1.p2.p3.<A HREF="../p1/p2/p3/C.html" title="interface in p1.p2.p3">C</A>
+<DD>Javadoc for d()
+<DT><A HREF="../p1/p2/p3/D.html" title="class in p1.p2.p3"><B>D</B></A>&lt;<A HREF="../p1/p2/p3/D.html" title="type parameter in D">E</A>&gt; - Class in <A HREF="../p1/p2/p3/package-summary.html">p1.p2.p3</A><DD>&nbsp;<DT><A HREF="../p1/p2/p3/D.html#D()"><B>D()</B></A> -
+Constructor for class p1.p2.p3.<A HREF="../p1/p2/p3/D.html" title="class in p1.p2.p3">D</A>
+<DD>&nbsp;
+</DL>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="index-3.html"><B>PREV LETTER</B></A>&nbsp;
+&nbsp;<A HREF="index-5.html"><B>NEXT LETTER</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?index-filesindex-4.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="index-4.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<A HREF="index-1.html">A</A> <A HREF="index-2.html">B</A> <A HREF="index-3.html">C</A> <A HREF="index-4.html">D</A> <A HREF="index-5.html">E</A> <A HREF="index-6.html">F</A> <A HREF="index-7.html">M</A> <A HREF="index-8.html">O</A> <A HREF="index-9.html">P</A> <A HREF="index-10.html">T</A> <A HREF="index-11.html">V</A> <A HREF="index-12.html">X</A> <A HREF="index-13.html">Y</A> <A HREF="index-14.html">Z</A> <HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-5.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-5.html
new file mode 100644
index 0000000..accc1de
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-5.html
@@ -0,0 +1,141 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:09 CEST 2006 -->
+<TITLE>
+E-Index
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="E-Index";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="index-4.html"><B>PREV LETTER</B></A>&nbsp;
+&nbsp;<A HREF="index-6.html"><B>NEXT LETTER</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?index-filesindex-5.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="index-5.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<A HREF="index-1.html">A</A> <A HREF="index-2.html">B</A> <A HREF="index-3.html">C</A> <A HREF="index-4.html">D</A> <A HREF="index-5.html">E</A> <A HREF="index-6.html">F</A> <A HREF="index-7.html">M</A> <A HREF="index-8.html">O</A> <A HREF="index-9.html">P</A> <A HREF="index-10.html">T</A> <A HREF="index-11.html">V</A> <A HREF="index-12.html">X</A> <A HREF="index-13.html">Y</A> <A HREF="index-14.html">Z</A> <HR>
+<A NAME="_E_"><!-- --></A><H2>
+<B>E</B></H2>
+<DL>
+<DT><A HREF="../p1/p2/E.html" title="enum in p1.p2"><B>E</B></A> - Enum in <A HREF="../p1/p2/package-summary.html">p1.p2</A><DD>Declaration of enum type E<DT><A HREF="../p1/p2/p3/C.html#equals(java.lang.Object)"><B>equals(Object)</B></A> -
+Method in interface p1.p2.p3.<A HREF="../p1/p2/p3/C.html" title="interface in p1.p2.p3">C</A>
+<DD>Javadoc of equals
+</DL>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="index-4.html"><B>PREV LETTER</B></A>&nbsp;
+&nbsp;<A HREF="index-6.html"><B>NEXT LETTER</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?index-filesindex-5.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="index-5.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<A HREF="index-1.html">A</A> <A HREF="index-2.html">B</A> <A HREF="index-3.html">C</A> <A HREF="index-4.html">D</A> <A HREF="index-5.html">E</A> <A HREF="index-6.html">F</A> <A HREF="index-7.html">M</A> <A HREF="index-8.html">O</A> <A HREF="index-9.html">P</A> <A HREF="index-10.html">T</A> <A HREF="index-11.html">V</A> <A HREF="index-12.html">X</A> <A HREF="index-13.html">Y</A> <A HREF="index-14.html">Z</A> <HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-6.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-6.html
new file mode 100644
index 0000000..4dcac69
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-6.html
@@ -0,0 +1,171 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:09 CEST 2006 -->
+<TITLE>
+F-Index
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="F-Index";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="index-5.html"><B>PREV LETTER</B></A>&nbsp;
+&nbsp;<A HREF="index-7.html"><B>NEXT LETTER</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?index-filesindex-6.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="index-6.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<A HREF="index-1.html">A</A> <A HREF="index-2.html">B</A> <A HREF="index-3.html">C</A> <A HREF="index-4.html">D</A> <A HREF="index-5.html">E</A> <A HREF="index-6.html">F</A> <A HREF="index-7.html">M</A> <A HREF="index-8.html">O</A> <A HREF="index-9.html">P</A> <A HREF="index-10.html">T</A> <A HREF="index-11.html">V</A> <A HREF="index-12.html">X</A> <A HREF="index-13.html">Y</A> <A HREF="index-14.html">Z</A> <HR>
+<A NAME="_F_"><!-- --></A><H2>
+<B>F</B></H2>
+<DL>
+<DT><A HREF="../p1/p2/X.html#f"><B>f</B></A> -
+Variable in class p1.p2.<A HREF="../p1/p2/X.html" title="class in p1.p2">X</A>
+<DD>Javadoc for field f
+<DT><A HREF="../p1/p2/X.html#f2"><B>f2</B></A> -
+Variable in class p1.p2.<A HREF="../p1/p2/X.html" title="class in p1.p2">X</A>
+<DD>&nbsp;
+<DT><A HREF="../p1/p2/X.html#f3"><B>f3</B></A> -
+Variable in class p1.p2.<A HREF="../p1/p2/X.html" title="class in p1.p2">X</A>
+<DD>Real javadoc for f3
+<DT><A HREF="../p1/p2/E.html#field"><B>field</B></A> -
+Variable in enum p1.p2.<A HREF="../p1/p2/E.html" title="enum in p1.p2">E</A>
+<DD>&nbsp;
+<DT><A HREF="../p1/p2/X.html#foo(int, long, java.lang.String)"><B>foo(int, long, String)</B></A> -
+Method in class p1.p2.<A HREF="../p1/p2/X.html" title="class in p1.p2">X</A>
+<DD>Javadoc for method foo
+<DT><A HREF="../p1/p2/X.html#foo(java.util.Enumeration)"><B>foo(Enumeration)</B></A> -
+Method in class p1.p2.<A HREF="../p1/p2/X.html" title="class in p1.p2">X</A>
+<DD>&nbsp;
+<DT><A HREF="../p1/p2/Z.html#foo()"><B>foo()</B></A> -
+Static method in class p1.p2.<A HREF="../p1/p2/Z.html" title="class in p1.p2">Z</A>
+<DD>&nbsp;
+<DT><A HREF="../p2/X.html#foo()"><B>foo()</B></A> -
+Method in class p2.<A HREF="../p2/X.html" title="class in p2">X</A>
+<DD>test case for bug 140879 Spontaneous error "java.util.Set cannot be resolved..."
+<DT><A HREF="../p2/Y.html#foo()"><B>foo()</B></A> -
+Method in class p2.<A HREF="../p2/Y.html" title="class in p2">Y</A>
+<DD>&nbsp;
+<DT><A HREF="../p1/p2/X.html#foo2(java.lang.Integer)"><B>foo2(Integer)</B></A> -
+Method in class p1.p2.<A HREF="../p1/p2/X.html" title="class in p1.p2">X</A>
+<DD>Javadoc for method foo2
+<DT><A HREF="../p1/p2/X.html#foo2()"><B>foo2()</B></A> -
+Method in class p1.p2.<A HREF="../p1/p2/X.html" title="class in p1.p2">X</A>
+<DD>&nbsp;
+</DL>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="index-5.html"><B>PREV LETTER</B></A>&nbsp;
+&nbsp;<A HREF="index-7.html"><B>NEXT LETTER</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?index-filesindex-6.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="index-6.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<A HREF="index-1.html">A</A> <A HREF="index-2.html">B</A> <A HREF="index-3.html">C</A> <A HREF="index-4.html">D</A> <A HREF="index-5.html">E</A> <A HREF="index-6.html">F</A> <A HREF="index-7.html">M</A> <A HREF="index-8.html">O</A> <A HREF="index-9.html">P</A> <A HREF="index-10.html">T</A> <A HREF="index-11.html">V</A> <A HREF="index-12.html">X</A> <A HREF="index-13.html">Y</A> <A HREF="index-14.html">Z</A> <HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-7.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-7.html
new file mode 100644
index 0000000..7c6f564
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-7.html
@@ -0,0 +1,147 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:09 CEST 2006 -->
+<TITLE>
+M-Index
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="M-Index";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="index-6.html"><B>PREV LETTER</B></A>&nbsp;
+&nbsp;<A HREF="index-8.html"><B>NEXT LETTER</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?index-filesindex-7.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="index-7.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<A HREF="index-1.html">A</A> <A HREF="index-2.html">B</A> <A HREF="index-3.html">C</A> <A HREF="index-4.html">D</A> <A HREF="index-5.html">E</A> <A HREF="index-6.html">F</A> <A HREF="index-7.html">M</A> <A HREF="index-8.html">O</A> <A HREF="index-9.html">P</A> <A HREF="index-10.html">T</A> <A HREF="index-11.html">V</A> <A HREF="index-12.html">X</A> <A HREF="index-13.html">Y</A> <A HREF="index-14.html">Z</A> <HR>
+<A NAME="_M_"><!-- --></A><H2>
+<B>M</B></H2>
+<DL>
+<DT><A HREF="../p1/p2/p3/C.html#m(E)"><B>m(E)</B></A> -
+Method in interface p1.p2.p3.<A HREF="../p1/p2/p3/C.html" title="interface in p1.p2.p3">C</A>
+<DD>Javadoc for m(E)
+<DT><A HREF="../p1/p2/p3/C.html#m1(int, E)"><B>m1(int, E)</B></A> -
+Method in interface p1.p2.p3.<A HREF="../p1/p2/p3/C.html" title="interface in p1.p2.p3">C</A>
+<DD>Javadoc for m1
+<DT><A HREF="../p1/p2/p3/C.html#m2(int)"><B>m2(int)</B></A> -
+Method in interface p1.p2.p3.<A HREF="../p1/p2/p3/C.html" title="interface in p1.p2.p3">C</A>
+<DD>Javadoc for m2
+</DL>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="index-6.html"><B>PREV LETTER</B></A>&nbsp;
+&nbsp;<A HREF="index-8.html"><B>NEXT LETTER</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?index-filesindex-7.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="index-7.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<A HREF="index-1.html">A</A> <A HREF="index-2.html">B</A> <A HREF="index-3.html">C</A> <A HREF="index-4.html">D</A> <A HREF="index-5.html">E</A> <A HREF="index-6.html">F</A> <A HREF="index-7.html">M</A> <A HREF="index-8.html">O</A> <A HREF="index-9.html">P</A> <A HREF="index-10.html">T</A> <A HREF="index-11.html">V</A> <A HREF="index-12.html">X</A> <A HREF="index-13.html">Y</A> <A HREF="index-14.html">Z</A> <HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-8.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-8.html
new file mode 100644
index 0000000..128b2f7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-8.html
@@ -0,0 +1,141 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:09 CEST 2006 -->
+<TITLE>
+O-Index
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="O-Index";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="index-7.html"><B>PREV LETTER</B></A>&nbsp;
+&nbsp;<A HREF="index-9.html"><B>NEXT LETTER</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?index-filesindex-8.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="index-8.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<A HREF="index-1.html">A</A> <A HREF="index-2.html">B</A> <A HREF="index-3.html">C</A> <A HREF="index-4.html">D</A> <A HREF="index-5.html">E</A> <A HREF="index-6.html">F</A> <A HREF="index-7.html">M</A> <A HREF="index-8.html">O</A> <A HREF="index-9.html">P</A> <A HREF="index-10.html">T</A> <A HREF="index-11.html">V</A> <A HREF="index-12.html">X</A> <A HREF="index-13.html">Y</A> <A HREF="index-14.html">Z</A> <HR>
+<A NAME="_O_"><!-- --></A><H2>
+<B>O</B></H2>
+<DL>
+<DT><A HREF="../p1/p2/Z.html#out"><B>out</B></A> -
+Static variable in class p1.p2.<A HREF="../p1/p2/Z.html" title="class in p1.p2">Z</A>
+<DD>Javadoc for field out
+</DL>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="index-7.html"><B>PREV LETTER</B></A>&nbsp;
+&nbsp;<A HREF="index-9.html"><B>NEXT LETTER</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?index-filesindex-8.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="index-8.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<A HREF="index-1.html">A</A> <A HREF="index-2.html">B</A> <A HREF="index-3.html">C</A> <A HREF="index-4.html">D</A> <A HREF="index-5.html">E</A> <A HREF="index-6.html">F</A> <A HREF="index-7.html">M</A> <A HREF="index-8.html">O</A> <A HREF="index-9.html">P</A> <A HREF="index-10.html">T</A> <A HREF="index-11.html">V</A> <A HREF="index-12.html">X</A> <A HREF="index-13.html">Y</A> <A HREF="index-14.html">Z</A> <HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-9.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-9.html
new file mode 100644
index 0000000..8ba0f09
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-9.html
@@ -0,0 +1,138 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:09 CEST 2006 -->
+<TITLE>
+P-Index
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="P-Index";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="index-8.html"><B>PREV LETTER</B></A>&nbsp;
+&nbsp;<A HREF="index-10.html"><B>NEXT LETTER</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?index-filesindex-9.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="index-9.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<A HREF="index-1.html">A</A> <A HREF="index-2.html">B</A> <A HREF="index-3.html">C</A> <A HREF="index-4.html">D</A> <A HREF="index-5.html">E</A> <A HREF="index-6.html">F</A> <A HREF="index-7.html">M</A> <A HREF="index-8.html">O</A> <A HREF="index-9.html">P</A> <A HREF="index-10.html">T</A> <A HREF="index-11.html">V</A> <A HREF="index-12.html">X</A> <A HREF="index-13.html">Y</A> <A HREF="index-14.html">Z</A> <HR>
+<A NAME="_P_"><!-- --></A><H2>
+<B>P</B></H2>
+<DL>
+<DT><A HREF="../p1/p2/p3/package-summary.html"><B>p1.p2.p3</B></A> - package p1.p2.p3<DD>&nbsp;<DT><A HREF="../p2/package-summary.html"><B>p2</B></A> - package p2<DD>&nbsp;</DL>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="index-8.html"><B>PREV LETTER</B></A>&nbsp;
+&nbsp;<A HREF="index-10.html"><B>NEXT LETTER</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?index-filesindex-9.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="index-9.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<A HREF="index-1.html">A</A> <A HREF="index-2.html">B</A> <A HREF="index-3.html">C</A> <A HREF="index-4.html">D</A> <A HREF="index-5.html">E</A> <A HREF="index-6.html">F</A> <A HREF="index-7.html">M</A> <A HREF="index-8.html">O</A> <A HREF="index-9.html">P</A> <A HREF="index-10.html">T</A> <A HREF="index-11.html">V</A> <A HREF="index-12.html">X</A> <A HREF="index-13.html">Y</A> <A HREF="index-14.html">Z</A> <HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index.html
new file mode 100644
index 0000000..1bede3a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc on Mon Jun 05 12:35:10 CEST 2006-->
+<TITLE>
+Generated Documentation (Untitled)
+</TITLE>
+<SCRIPT type="text/javascript">
+ targetPage = "" + window.location.search;
+ if (targetPage != "" && targetPage != "undefined")
+ targetPage = targetPage.substring(1);
+ function loadFrames() {
+ if (targetPage != "" && targetPage != "undefined")
+ top.classFrame.location = top.targetPage;
+ }
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+</HEAD>
+<FRAMESET cols="20%,80%" title="" onLoad="top.loadFrames()">
+<FRAMESET rows="30%,70%" title="" onLoad="top.loadFrames()">
+<FRAME src="overview-frame.html" name="packageListFrame" title="All Packages">
+<FRAME src="allclasses-frame.html" name="packageFrame" title="All classes and interfaces (except non-static nested types)">
+</FRAMESET>
+<FRAME src="overview-summary.html" name="classFrame" title="Package, class and interface descriptions" scrolling="yes">
+<NOFRAMES>
+<H2>
+Frame Alert</H2>
+
+<P>
+This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
+<BR>
+Link to<A HREF="overview-summary.html">Non-frame version.</A>
+</NOFRAMES>
+</FRAMESET>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/overview-frame.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/overview-frame.html
new file mode 100644
index 0000000..1bf3f3b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/overview-frame.html
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:08 CEST 2006 -->
+<TITLE>
+Overview
+</TITLE>
+
+<META NAME="keywords" CONTENT="Overview">
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
+
+
+</HEAD>
+
+<BODY BGCOLOR="white">
+
+<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
+<TR>
+<TH ALIGN="left" NOWRAP><FONT size="+1" CLASS="FrameTitleFont">
+<B></B></FONT></TH>
+</TR>
+</TABLE>
+
+<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
+<TR>
+<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="allclasses-frame.html" target="packageFrame">All Classes</A></FONT>
+<P>
+<FONT size="+1" CLASS="FrameHeadingFont">
+Packages</FONT>
+<BR>
+<FONT CLASS="FrameItemFont"><A HREF="p1/p2/package-frame.html" target="packageFrame">p1.p2</A></FONT>
+<BR>
+<FONT CLASS="FrameItemFont"><A HREF="p1/p2/p3/package-frame.html" target="packageFrame">p1.p2.p3</A></FONT>
+<BR>
+<FONT CLASS="FrameItemFont"><A HREF="p2/package-frame.html" target="packageFrame">p2</A></FONT>
+<BR>
+</TD>
+</TR>
+</TABLE>
+
+<P>
+&nbsp;
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/overview-summary.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/overview-summary.html
new file mode 100644
index 0000000..5f221dd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/overview-summary.html
@@ -0,0 +1,156 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:10 CEST 2006 -->
+<TITLE>
+Overview
+</TITLE>
+
+<META NAME="keywords" CONTENT="Overview">
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="Overview";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Overview</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="index.html?overview-summary.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="overview-summary.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Packages</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD WIDTH="20%"><B><A HREF="p1/p2/package-summary.html">p1.p2</A></B></TD>
+<TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD WIDTH="20%"><B><A HREF="p1/p2/p3/package-summary.html">p1.p2.p3</A></B></TD>
+<TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD WIDTH="20%"><B><A HREF="p2/package-summary.html">p2</A></B></TD>
+<TD>&nbsp;</TD>
+</TR>
+</TABLE>
+
+<P>
+&nbsp;<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Overview</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="index.html?overview-summary.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="overview-summary.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/overview-tree.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/overview-tree.html
new file mode 100644
index 0000000..0778a6e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/overview-tree.html
@@ -0,0 +1,172 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:09 CEST 2006 -->
+<TITLE>
+Class Hierarchy
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="Class Hierarchy";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="index.html?overview-tree.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="overview-tree.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<CENTER>
+<H2>
+Hierarchy For All Packages</H2>
+</CENTER>
+<DL>
+<DT><B>Package Hierarchies:</B><DD><A HREF="p1/p2/package-tree.html">p1.p2</A>, <A HREF="p1/p2/p3/package-tree.html">p1.p2.p3</A>, <A HREF="p2/package-tree.html">p2</A></DL>
+<HR>
+<H2>
+Class Hierarchy
+</H2>
+<UL>
+<LI TYPE="circle">java.lang.Object<UL>
+<LI TYPE="circle">p1.p2.<A HREF="p1/p2/Annot.D.html" title="class in p1.p2"><B>Annot.D</B></A><LI TYPE="circle">p1.p2.p3.<A HREF="p1/p2/p3/D.html" title="class in p1.p2.p3"><B>D</B></A>&lt;E&gt;<LI TYPE="circle">p1.p2.<A HREF="p1/p2/TestClass.html" title="class in p1.p2"><B>TestClass</B></A><LI TYPE="circle">p1.p2.<A HREF="p1/p2/X.html" title="class in p1.p2"><B>X</B></A><LI TYPE="circle">p2.<A HREF="p2/X.html" title="class in p2"><B>X</B></A><UL>
+<LI TYPE="circle">p2.<A HREF="p2/Y.html" title="class in p2"><B>Y</B></A></UL>
+<LI TYPE="circle">p1.p2.<A HREF="p1/p2/X.A.html" title="class in p1.p2"><B>X.A</B></A><LI TYPE="circle">p1.p2.<A HREF="p1/p2/X.B.html" title="class in p1.p2"><B>X.B</B></A><LI TYPE="circle">p1.p2.<A HREF="p1/p2/Z.html" title="class in p1.p2"><B>Z</B></A><LI TYPE="circle">p2.<A HREF="p2/Z.html" title="class in p2"><B>Z</B></A>&lt;T&gt;</UL>
+</UL>
+<H2>
+Interface Hierarchy
+</H2>
+<UL>
+<LI TYPE="circle">p1.p2.p3.<A HREF="p1/p2/p3/C.html" title="interface in p1.p2.p3"><B>C</B></A>&lt;E&gt;</UL>
+<H2>
+Annotation Type Hierarchy
+</H2>
+<UL>
+<LI TYPE="circle">p1.p2.<A HREF="p1/p2/Annot2.html" title="annotation in p1.p2"><B>Annot2</B></A> (implements java.lang.annotation.Annotation)
+<LI TYPE="circle">p1.p2.<A HREF="p1/p2/Annot.html" title="annotation in p1.p2"><B>Annot</B></A> (implements java.lang.annotation.Annotation)
+</UL>
+<H2>
+Enum Hierarchy
+</H2>
+<UL>
+<LI TYPE="circle">java.lang.Object<UL>
+<LI TYPE="circle">java.lang.Enum&lt;E&gt; (implements java.lang.Comparable&lt;T&gt;, java.io.Serializable)
+<UL>
+<LI TYPE="circle">p1.p2.<A HREF="p1/p2/E.html" title="enum in p1.p2"><B>E</B></A></UL>
+</UL>
+</UL>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="index.html?overview-tree.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="overview-tree.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/Annot.D.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/Annot.D.html
new file mode 100644
index 0000000..b21a7b2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/Annot.D.html
@@ -0,0 +1,224 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:07 CEST 2006 -->
+<TITLE>
+Annot.D
+</TITLE>
+
+<META NAME="keywords" CONTENT="p1.p2.Annot.D class">
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="Annot.D";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Annot.D.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="../../p1/p2/Annot.html" title="annotation in p1.p2"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../p1/p2/Annot2.html" title="annotation in p1.p2"><B>NEXT CLASS</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../index.html?p1/p2/Annot.D.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="Annot.D.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+<TR>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+ SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#methods_inherited_from_class_java.lang.Object">METHOD</A></FONT></TD>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;METHOD</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<!-- ======== START OF CLASS DATA ======== -->
+<H2>
+<FONT SIZE="-1">
+p1.p2</FONT>
+<BR>
+Class Annot.D</H2>
+<PRE>
+java.lang.Object
+ <IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>p1.p2.Annot.D</B>
+</PRE>
+<DL>
+<DT><B>Enclosing class:</B><DD><A HREF="../../p1/p2/Annot.html" title="annotation in p1.p2">Annot</A></DD>
+</DL>
+<HR>
+<DL>
+<DT><PRE>public static class <B>Annot.D</B><DT>extends java.lang.Object</DL>
+</PRE>
+
+<P>
+<HR>
+
+<P>
+
+<!-- ======== CONSTRUCTOR SUMMARY ======== -->
+
+<A NAME="constructor_summary"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Constructor Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><CODE><B><A HREF="../../p1/p2/Annot.D.html#Annot.D()">Annot.D</A></B>()</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<!-- ========== METHOD SUMMARY =========== -->
+
+<A NAME="method_summary"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Method Summary</B></FONT></TH>
+</TR>
+</TABLE>
+&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
+<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+
+<!-- ========= CONSTRUCTOR DETAIL ======== -->
+
+<A NAME="constructor_detail"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
+<B>Constructor Detail</B></FONT></TH>
+</TR>
+</TABLE>
+
+<A NAME="Annot.D()"><!-- --></A><H3>
+Annot.D</H3>
+<PRE>
+public <B>Annot.D</B>()</PRE>
+<DL>
+</DL>
+<!-- ========= END OF CLASS DATA ========= -->
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Annot.D.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="../../p1/p2/Annot.html" title="annotation in p1.p2"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../p1/p2/Annot2.html" title="annotation in p1.p2"><B>NEXT CLASS</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../index.html?p1/p2/Annot.D.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="Annot.D.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+<TR>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+ SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#methods_inherited_from_class_java.lang.Object">METHOD</A></FONT></TD>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;METHOD</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/Annot.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/Annot.html
new file mode 100644
index 0000000..d849b7c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/Annot.html
@@ -0,0 +1,235 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:06 CEST 2006 -->
+<TITLE>
+Annot
+</TITLE>
+
+<META NAME="keywords" CONTENT="p1.p2.Annot class">
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="Annot";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Annot.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV CLASS&nbsp;
+&nbsp;<A HREF="../../p1/p2/Annot.D.html" title="class in p1.p2"><B>NEXT CLASS</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../index.html?p1/p2/Annot.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="Annot.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+<TR>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+ SUMMARY:&nbsp;<A HREF="#annotation_type_required_element_summary">REQUIRED</A>&nbsp;|&nbsp;<A HREF="#annotation_type_optional_element_summary">OPTIONAL</A></FONT></TD>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+DETAIL:&nbsp;<A HREF="#annotation_type_element_detail">ELEMENT</A></FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<!-- ======== START OF CLASS DATA ======== -->
+<H2>
+<FONT SIZE="-1">
+p1.p2</FONT>
+<BR>
+Annotation Type Annot</H2>
+<HR>
+<DL>
+<DT><PRE>public @interface <B>Annot</B></DL>
+</PRE>
+
+<P>
+<HR>
+
+<P>
+<!-- =========== ANNOTATION TYPE REQUIRED MEMBER SUMMARY =========== -->
+
+<A NAME="annotation_type_required_element_summary"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Required Element Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../p1/p2/Annot.html#name()">name</A></B></CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== -->
+
+<A NAME="annotation_type_optional_element_summary"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Optional Element Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../p1/p2/Annot.html#name2()">name2</A></B></CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+
+<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== -->
+
+<A NAME="annotation_type_element_detail"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
+<B>Element Detail</B></FONT></TH>
+</TR>
+</TABLE>
+
+<A NAME="name()"><!-- --></A><H3>
+name</H3>
+<PRE>
+public abstract java.lang.String <B>name</B></PRE>
+<DL>
+<DD><DL>
+</DL>
+</DD>
+<DD><DL>
+</DL>
+</DL>
+<A NAME="name2()"><!-- --></A><H3>
+name2</H3>
+<PRE>
+public abstract java.lang.String <B>name2</B></PRE>
+<DL>
+<DD><DL>
+</DL>
+</DD>
+<DD><DL>
+</DL>
+<DL>
+<DT><B>Default:</B><DD>""</DD>
+</DL>
+</DL>
+<!-- ========= END OF CLASS DATA ========= -->
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Annot.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV CLASS&nbsp;
+&nbsp;<A HREF="../../p1/p2/Annot.D.html" title="class in p1.p2"><B>NEXT CLASS</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../index.html?p1/p2/Annot.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="Annot.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+<TR>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+ SUMMARY:&nbsp;<A HREF="#annotation_type_required_element_summary">REQUIRED</A>&nbsp;|&nbsp;<A HREF="#annotation_type_optional_element_summary">OPTIONAL</A></FONT></TD>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+DETAIL:&nbsp;<A HREF="#annotation_type_element_detail">ELEMENT</A></FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/Annot2.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/Annot2.html
new file mode 100644
index 0000000..700dcdd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/Annot2.html
@@ -0,0 +1,198 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:07 CEST 2006 -->
+<TITLE>
+Annot2
+</TITLE>
+
+<META NAME="keywords" CONTENT="p1.p2.Annot2 class">
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="Annot2";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Annot2.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="../../p1/p2/Annot.D.html" title="class in p1.p2"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../p1/p2/E.html" title="enum in p1.p2"><B>NEXT CLASS</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../index.html?p1/p2/Annot2.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="Annot2.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+<TR>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+ SUMMARY:&nbsp;REQUIRED&nbsp;|&nbsp;<A HREF="#annotation_type_optional_element_summary">OPTIONAL</A></FONT></TD>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+DETAIL:&nbsp;<A HREF="#annotation_type_element_detail">ELEMENT</A></FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<!-- ======== START OF CLASS DATA ======== -->
+<H2>
+<FONT SIZE="-1">
+p1.p2</FONT>
+<BR>
+Annotation Type Annot2</H2>
+<HR>
+<DL>
+<DT><PRE>public @interface <B>Annot2</B></DL>
+</PRE>
+
+<P>
+<HR>
+
+<P>
+<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== -->
+
+<A NAME="annotation_type_optional_element_summary"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Optional Element Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../p1/p2/Annot2.html#name2()">name2</A></B></CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Description of name2</TD>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+<A NAME="name2()"><!-- --></A><H3>
+name2</H3>
+<PRE>
+public abstract java.lang.String <B>name2</B></PRE>
+<DL>
+<DD>Description of name2
+<P>
+<DD><DL>
+</DL>
+</DD>
+<DD><DL>
+</DL>
+<DL>
+<DT><B>Default:</B><DD>""</DD>
+</DL>
+</DL>
+<!-- ========= END OF CLASS DATA ========= -->
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Annot2.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="../../p1/p2/Annot.D.html" title="class in p1.p2"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../p1/p2/E.html" title="enum in p1.p2"><B>NEXT CLASS</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../index.html?p1/p2/Annot2.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="Annot2.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+<TR>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+ SUMMARY:&nbsp;REQUIRED&nbsp;|&nbsp;<A HREF="#annotation_type_optional_element_summary">OPTIONAL</A></FONT></TD>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+DETAIL:&nbsp;<A HREF="#annotation_type_element_detail">ELEMENT</A></FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/E.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/E.html
new file mode 100644
index 0000000..4acf888
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/E.html
@@ -0,0 +1,362 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:07 CEST 2006 -->
+<TITLE>
+E
+</TITLE>
+
+<META NAME="keywords" CONTENT="p1.p2.E class">
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="E";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/E.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="../../p1/p2/Annot2.html" title="annotation in p1.p2"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../p1/p2/TestClass.html" title="class in p1.p2"><B>NEXT CLASS</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../index.html?p1/p2/E.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="E.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+<TR>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+ SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#enum_constant_summary">ENUM CONSTANTS</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+DETAIL:&nbsp;<A HREF="#enum_constant_detail">ENUM CONSTANTS</A>&nbsp;|&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<!-- ======== START OF CLASS DATA ======== -->
+<H2>
+<FONT SIZE="-1">
+p1.p2</FONT>
+<BR>
+Enum E</H2>
+<PRE>
+java.lang.Object
+ <IMG SRC="../../resources/inherit.gif" ALT="extended by ">java.lang.Enum&lt;<A HREF="../../p1/p2/E.html" title="enum in p1.p2">E</A>&gt;
+ <IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>p1.p2.E</B>
+</PRE>
+<DL>
+<DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable, java.lang.Comparable&lt;<A HREF="../../p1/p2/E.html" title="enum in p1.p2">E</A>&gt;</DD>
+</DL>
+<HR>
+<DL>
+<DT><PRE>public enum <B>E</B><DT>extends java.lang.Enum&lt;<A HREF="../../p1/p2/E.html" title="enum in p1.p2">E</A>&gt;</DL>
+</PRE>
+
+<P>
+Declaration of enum type E
+<P>
+
+<P>
+<HR>
+
+<P>
+<!-- =========== ENUM CONSTANT SUMMARY =========== -->
+
+<A NAME="enum_constant_summary"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Enum Constant Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><CODE><B><A HREF="../../p1/p2/E.html#C">C</A></B></CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constant C</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><CODE><B><A HREF="../../p1/p2/E.html#D">D</A></B></CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constant D</TD>
+</TR>
+</TABLE>
+&nbsp;<!-- =========== FIELD SUMMARY =========== -->
+
+<A NAME="field_summary"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Field Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../p1/p2/E.html#field">field</A></B></CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<!-- ========== METHOD SUMMARY =========== -->
+
+<A NAME="method_summary"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Method Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>static&nbsp;<A HREF="../../p1/p2/E.html" title="enum in p1.p2">E</A></CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../p1/p2/E.html#valueOf(java.lang.String)">valueOf</A></B>(java.lang.String&nbsp;name)</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the enum constant of this type with the specified name.</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>static&nbsp;<A HREF="../../p1/p2/E.html" title="enum in p1.p2">E</A>[]</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../p1/p2/E.html#values()">values</A></B>()</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an array containing the constants of this enum type, in
+the order they're declared.</TD>
+</TR>
+</TABLE>
+&nbsp;<A NAME="methods_inherited_from_class_java.lang.Enum"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
+<TH ALIGN="left"><B>Methods inherited from class java.lang.Enum</B></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><CODE>compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf</CODE></TD>
+</TR>
+</TABLE>
+&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
+<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><CODE>getClass, notify, notifyAll, wait, wait, wait</CODE></TD>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+
+<!-- ============ ENUM CONSTANT DETAIL =========== -->
+
+<A NAME="enum_constant_detail"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
+<B>Enum Constant Detail</B></FONT></TH>
+</TR>
+</TABLE>
+
+<A NAME="D"><!-- --></A><H3>
+D</H3>
+<PRE>
+public static final <A HREF="../../p1/p2/E.html" title="enum in p1.p2">E</A> <B>D</B></PRE>
+<DL>
+<DD>Constant D
+<P>
+<DL>
+</DL>
+</DL>
+<HR>
+
+<A NAME="C"><!-- --></A><H3>
+C</H3>
+<PRE>
+public static final <A HREF="../../p1/p2/E.html" title="enum in p1.p2">E</A> <B>C</B></PRE>
+<DL>
+<DD>Constant C
+<P>
+<DL>
+</DL>
+</DL>
+
+<!-- ============ FIELD DETAIL =========== -->
+
+<A NAME="field_detail"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
+<B>Field Detail</B></FONT></TH>
+</TR>
+</TABLE>
+
+<A NAME="field"><!-- --></A><H3>
+field</H3>
+<PRE>
+public java.lang.String <B>field</B></PRE>
+<DL>
+<DL>
+</DL>
+</DL>
+
+<!-- ============ METHOD DETAIL ========== -->
+
+<A NAME="method_detail"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
+<B>Method Detail</B></FONT></TH>
+</TR>
+</TABLE>
+
+<A NAME="values()"><!-- --></A><H3>
+values</H3>
+<PRE>
+public static final <A HREF="../../p1/p2/E.html" title="enum in p1.p2">E</A>[] <B>values</B>()</PRE>
+<DL>
+<DD>Returns an array containing the constants of this enum type, in
+the order they're declared. This method may be used to iterate
+over the constants as follows:
+<pre>
+for(E c : E.values())
+ System.out.println(c);
+</pre>
+<P>
+<DD><DL>
+
+<DT><B>Returns:</B><DD>an array containing the constants of this enum type, in
+the order they're declared</DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="valueOf(java.lang.String)"><!-- --></A><H3>
+valueOf</H3>
+<PRE>
+public static <A HREF="../../p1/p2/E.html" title="enum in p1.p2">E</A> <B>valueOf</B>(java.lang.String&nbsp;name)</PRE>
+<DL>
+<DD>Returns the enum constant of this type with the specified name.
+The string must match <I>exactly</I> an identifier used to declare an
+enum constant in this type. (Extraneous whitespace characters are
+not permitted.)
+<P>
+<DD><DL>
+<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the enum constant to be returned.
+<DT><B>Returns:</B><DD>the enum constant with the specified name
+<DT><B>Throws:</B>
+<DD><CODE>java.lang.IllegalArgumentException</CODE> - if this enum type has no constant
+with the specified name</DL>
+</DD>
+</DL>
+<!-- ========= END OF CLASS DATA ========= -->
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/E.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="../../p1/p2/Annot2.html" title="annotation in p1.p2"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../p1/p2/TestClass.html" title="class in p1.p2"><B>NEXT CLASS</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../index.html?p1/p2/E.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="E.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+<TR>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+ SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#enum_constant_summary">ENUM CONSTANTS</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+DETAIL:&nbsp;<A HREF="#enum_constant_detail">ENUM CONSTANTS</A>&nbsp;|&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/TestClass.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/TestClass.html
new file mode 100644
index 0000000..a77ba97
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/TestClass.html
@@ -0,0 +1,221 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:07 CEST 2006 -->
+<TITLE>
+TestClass
+</TITLE>
+
+<META NAME="keywords" CONTENT="p1.p2.TestClass class">
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="TestClass";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/TestClass.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="../../p1/p2/E.html" title="enum in p1.p2"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../p1/p2/X.html" title="class in p1.p2"><B>NEXT CLASS</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../index.html?p1/p2/TestClass.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="TestClass.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+<TR>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+ SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#methods_inherited_from_class_java.lang.Object">METHOD</A></FONT></TD>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;METHOD</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<!-- ======== START OF CLASS DATA ======== -->
+<H2>
+<FONT SIZE="-1">
+p1.p2</FONT>
+<BR>
+Class TestClass</H2>
+<PRE>
+java.lang.Object
+ <IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>p1.p2.TestClass</B>
+</PRE>
+<HR>
+<DL>
+<DT><PRE>public abstract class <B>TestClass</B><DT>extends java.lang.Object</DL>
+</PRE>
+
+<P>
+<HR>
+
+<P>
+
+<!-- ======== CONSTRUCTOR SUMMARY ======== -->
+
+<A NAME="constructor_summary"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Constructor Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><CODE><B><A HREF="../../p1/p2/TestClass.html#TestClass()">TestClass</A></B>()</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<!-- ========== METHOD SUMMARY =========== -->
+
+<A NAME="method_summary"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Method Summary</B></FONT></TH>
+</TR>
+</TABLE>
+&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
+<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+
+<!-- ========= CONSTRUCTOR DETAIL ======== -->
+
+<A NAME="constructor_detail"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
+<B>Constructor Detail</B></FONT></TH>
+</TR>
+</TABLE>
+
+<A NAME="TestClass()"><!-- --></A><H3>
+TestClass</H3>
+<PRE>
+public <B>TestClass</B>()</PRE>
+<DL>
+</DL>
+<!-- ========= END OF CLASS DATA ========= -->
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/TestClass.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="../../p1/p2/E.html" title="enum in p1.p2"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../p1/p2/X.html" title="class in p1.p2"><B>NEXT CLASS</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../index.html?p1/p2/TestClass.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="TestClass.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+<TR>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+ SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#methods_inherited_from_class_java.lang.Object">METHOD</A></FONT></TD>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;METHOD</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/X.A.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/X.A.html
new file mode 100644
index 0000000..b648267
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/X.A.html
@@ -0,0 +1,230 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:07 CEST 2006 -->
+<TITLE>
+X.A
+</TITLE>
+
+<META NAME="keywords" CONTENT="p1.p2.X.A class">
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="X.A";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/X.A.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="../../p1/p2/X.html" title="class in p1.p2"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../p1/p2/X.B.html" title="class in p1.p2"><B>NEXT CLASS</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../index.html?p1/p2/X.A.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="X.A.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+<TR>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+ SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#methods_inherited_from_class_java.lang.Object">METHOD</A></FONT></TD>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;METHOD</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<!-- ======== START OF CLASS DATA ======== -->
+<H2>
+<FONT SIZE="-1">
+p1.p2</FONT>
+<BR>
+Class X.A</H2>
+<PRE>
+java.lang.Object
+ <IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>p1.p2.X.A</B>
+</PRE>
+<DL>
+<DT><B>Enclosing class:</B><DD><A HREF="../../p1/p2/X.html" title="class in p1.p2">X</A></DD>
+</DL>
+<HR>
+<DL>
+<DT><PRE>public class <B>X.A</B><DT>extends java.lang.Object</DL>
+</PRE>
+
+<P>
+Javadoc for member type A
+<P>
+
+<P>
+<HR>
+
+<P>
+
+<!-- ======== CONSTRUCTOR SUMMARY ======== -->
+
+<A NAME="constructor_summary"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Constructor Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><CODE><B><A HREF="../../p1/p2/X.A.html#X.A(float)">X.A</A></B>(float&nbsp;f)</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Javadoc for constructor of A</TD>
+</TR>
+</TABLE>
+&nbsp;
+<!-- ========== METHOD SUMMARY =========== -->
+
+<A NAME="method_summary"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Method Summary</B></FONT></TH>
+</TR>
+</TABLE>
+&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
+<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+
+<!-- ========= CONSTRUCTOR DETAIL ======== -->
+
+<A NAME="constructor_detail"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
+<B>Constructor Detail</B></FONT></TH>
+</TR>
+</TABLE>
+
+<A NAME="X.A(float)"><!-- --></A><H3>
+X.A</H3>
+<PRE>
+public <B>X.A</B>(float&nbsp;f)</PRE>
+<DL>
+<DD>Javadoc for constructor of A
+<P>
+</DL>
+<!-- ========= END OF CLASS DATA ========= -->
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/X.A.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="../../p1/p2/X.html" title="class in p1.p2"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../p1/p2/X.B.html" title="class in p1.p2"><B>NEXT CLASS</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../index.html?p1/p2/X.A.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="X.A.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+<TR>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+ SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#methods_inherited_from_class_java.lang.Object">METHOD</A></FONT></TD>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;METHOD</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/X.B.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/X.B.html
new file mode 100644
index 0000000..c2565f2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/X.B.html
@@ -0,0 +1,224 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:07 CEST 2006 -->
+<TITLE>
+X.B
+</TITLE>
+
+<META NAME="keywords" CONTENT="p1.p2.X.B class">
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="X.B";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/X.B.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="../../p1/p2/X.A.html" title="class in p1.p2"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../p1/p2/Z.html" title="class in p1.p2"><B>NEXT CLASS</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../index.html?p1/p2/X.B.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="X.B.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+<TR>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+ SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#methods_inherited_from_class_java.lang.Object">METHOD</A></FONT></TD>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;METHOD</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<!-- ======== START OF CLASS DATA ======== -->
+<H2>
+<FONT SIZE="-1">
+p1.p2</FONT>
+<BR>
+Class X.B</H2>
+<PRE>
+java.lang.Object
+ <IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>p1.p2.X.B</B>
+</PRE>
+<DL>
+<DT><B>Enclosing class:</B><DD><A HREF="../../p1/p2/X.html" title="class in p1.p2">X</A></DD>
+</DL>
+<HR>
+<DL>
+<DT><PRE>public class <B>X.B</B><DT>extends java.lang.Object</DL>
+</PRE>
+
+<P>
+<HR>
+
+<P>
+
+<!-- ======== CONSTRUCTOR SUMMARY ======== -->
+
+<A NAME="constructor_summary"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Constructor Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><CODE><B><A HREF="../../p1/p2/X.B.html#X.B()">X.B</A></B>()</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<!-- ========== METHOD SUMMARY =========== -->
+
+<A NAME="method_summary"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Method Summary</B></FONT></TH>
+</TR>
+</TABLE>
+&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
+<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+
+<!-- ========= CONSTRUCTOR DETAIL ======== -->
+
+<A NAME="constructor_detail"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
+<B>Constructor Detail</B></FONT></TH>
+</TR>
+</TABLE>
+
+<A NAME="X.B()"><!-- --></A><H3>
+X.B</H3>
+<PRE>
+public <B>X.B</B>()</PRE>
+<DL>
+</DL>
+<!-- ========= END OF CLASS DATA ========= -->
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/X.B.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="../../p1/p2/X.A.html" title="class in p1.p2"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../p1/p2/Z.html" title="class in p1.p2"><B>NEXT CLASS</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../index.html?p1/p2/X.B.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="X.B.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+<TR>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+ SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#methods_inherited_from_class_java.lang.Object">METHOD</A></FONT></TD>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;METHOD</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/X.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/X.html
new file mode 100644
index 0000000..a61ab87
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/X.html
@@ -0,0 +1,440 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:07 CEST 2006 -->
+<TITLE>
+X
+</TITLE>
+
+<META NAME="keywords" CONTENT="p1.p2.X class">
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="X";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/X.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="../../p1/p2/TestClass.html" title="class in p1.p2"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../p1/p2/X.A.html" title="class in p1.p2"><B>NEXT CLASS</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../index.html?p1/p2/X.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="X.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+<TR>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+ SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<!-- ======== START OF CLASS DATA ======== -->
+<H2>
+<FONT SIZE="-1">
+p1.p2</FONT>
+<BR>
+Class X</H2>
+<PRE>
+java.lang.Object
+ <IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>p1.p2.X</B>
+</PRE>
+<HR>
+<DL>
+<DT><PRE>public class <B>X</B><DT>extends java.lang.Object</DL>
+</PRE>
+
+<P>
+Class X javadoc
+<P>
+
+<P>
+<HR>
+
+<P>
+<!-- ======== NESTED CLASS SUMMARY ======== -->
+
+<A NAME="nested_class_summary"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Nested Class Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;class</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../p1/p2/X.A.html" title="class in p1.p2">X.A</A></B></CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Javadoc for member type A</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;class</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../p1/p2/X.B.html" title="class in p1.p2">X.B</A></B></CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;<!-- =========== FIELD SUMMARY =========== -->
+
+<A NAME="field_summary"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Field Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;int</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../p1/p2/X.html#f">f</A></B></CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Javadoc for field f</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;int</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../p1/p2/X.html#f2">f2</A></B></CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../p1/p2/X.html#f3">f3</A></B></CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Real javadoc for f3</TD>
+</TR>
+</TABLE>
+&nbsp;
+<!-- ======== CONSTRUCTOR SUMMARY ======== -->
+
+<A NAME="constructor_summary"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Constructor Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><CODE><B><A HREF="../../p1/p2/X.html#X(int)">X</A></B>(int&nbsp;i)</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Javadoc for constructor X(int)</TD>
+</TR>
+</TABLE>
+&nbsp;
+<!-- ========== METHOD SUMMARY =========== -->
+
+<A NAME="method_summary"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Method Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;void</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../p1/p2/X.html#bar(java.util.ArrayList)">bar</A></B>(java.util.ArrayList&lt;java.lang.String&gt;&nbsp;array)</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;void</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../p1/p2/X.html#foo(java.util.Enumeration)">foo</A></B>(java.util.Enumeration&nbsp;enumeration)</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;void</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../p1/p2/X.html#foo(int, long, java.lang.String)">foo</A></B>(int&nbsp;i,
+ long&nbsp;l,
+ java.lang.String&nbsp;s)</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Javadoc for method foo</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;void</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../p1/p2/X.html#foo2()">foo2</A></B>()</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;void</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../p1/p2/X.html#foo2(java.lang.Integer)">foo2</A></B>(java.lang.Integer&nbsp;i)</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Javadoc for method foo2</TD>
+</TR>
+</TABLE>
+&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
+<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+
+<!-- ============ FIELD DETAIL =========== -->
+
+<A NAME="field_detail"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
+<B>Field Detail</B></FONT></TH>
+</TR>
+</TABLE>
+
+<A NAME="f"><!-- --></A><H3>
+f</H3>
+<PRE>
+public int <B>f</B></PRE>
+<DL>
+<DD>Javadoc for field f
+<P>
+<DL>
+</DL>
+</DL>
+<HR>
+
+<A NAME="f3"><!-- --></A><H3>
+f3</H3>
+<PRE>
+public java.lang.String <B>f3</B></PRE>
+<DL>
+<DD>Real javadoc for f3
+<P>
+<DL>
+</DL>
+</DL>
+<HR>
+
+<A NAME="f2"><!-- --></A><H3>
+f2</H3>
+<PRE>
+public int <B>f2</B></PRE>
+<DL>
+<DL>
+</DL>
+</DL>
+
+<!-- ========= CONSTRUCTOR DETAIL ======== -->
+
+<A NAME="constructor_detail"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
+<B>Constructor Detail</B></FONT></TH>
+</TR>
+</TABLE>
+
+<A NAME="X(int)"><!-- --></A><H3>
+X</H3>
+<PRE>
+public <B>X</B>(int&nbsp;i)</PRE>
+<DL>
+<DD>Javadoc for constructor X(int)
+<P>
+</DL>
+
+<!-- ============ METHOD DETAIL ========== -->
+
+<A NAME="method_detail"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
+<B>Method Detail</B></FONT></TH>
+</TR>
+</TABLE>
+
+<A NAME="foo(int, long, java.lang.String)"><!-- --></A><H3>
+foo</H3>
+<PRE>
+public void <B>foo</B>(int&nbsp;i,
+ long&nbsp;l,
+ java.lang.String&nbsp;s)</PRE>
+<DL>
+<DD>Javadoc for method foo
+<P>
+<DD><DL>
+<DT><B>Parameters:</B><DD><CODE>i</CODE> - the given int<DD><CODE>l</CODE> - the given long<DD><CODE>s</CODE> - the given string</DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="foo2(java.lang.Integer)"><!-- --></A><H3>
+foo2</H3>
+<PRE>
+public void <B>foo2</B>(java.lang.Integer&nbsp;i)</PRE>
+<DL>
+<DD>Javadoc for method foo2
+<P>
+<DD><DL>
+</DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="foo2()"><!-- --></A><H3>
+foo2</H3>
+<PRE>
+public void <B>foo2</B>()</PRE>
+<DL>
+<DD><DL>
+</DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="foo(java.util.Enumeration)"><!-- --></A><H3>
+foo</H3>
+<PRE>
+public void <B>foo</B>(java.util.Enumeration&nbsp;enumeration)</PRE>
+<DL>
+<DD><DL>
+</DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="bar(java.util.ArrayList)"><!-- --></A><H3>
+bar</H3>
+<PRE>
+public void <B>bar</B>(java.util.ArrayList&lt;java.lang.String&gt;&nbsp;array)</PRE>
+<DL>
+<DD><DL>
+</DL>
+</DD>
+</DL>
+<!-- ========= END OF CLASS DATA ========= -->
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/X.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="../../p1/p2/TestClass.html" title="class in p1.p2"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../p1/p2/X.A.html" title="class in p1.p2"><B>NEXT CLASS</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../index.html?p1/p2/X.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="X.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+<TR>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+ SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/Z.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/Z.html
new file mode 100644
index 0000000..bead511
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/Z.html
@@ -0,0 +1,258 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:07 CEST 2006 -->
+<TITLE>
+Z
+</TITLE>
+
+<META NAME="keywords" CONTENT="p1.p2.Z class">
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="Z";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Z.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="../../p1/p2/X.B.html" title="class in p1.p2"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;NEXT CLASS</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../index.html?p1/p2/Z.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="Z.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+<TR>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+ SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<!-- ======== START OF CLASS DATA ======== -->
+<H2>
+<FONT SIZE="-1">
+p1.p2</FONT>
+<BR>
+Class Z</H2>
+<PRE>
+java.lang.Object
+ <IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>p1.p2.Z</B>
+</PRE>
+<HR>
+<DL>
+<DT><PRE>public class <B>Z</B><DT>extends java.lang.Object</DL>
+</PRE>
+
+<P>
+Description for class Z
+<P>
+
+<P>
+<HR>
+
+<P>
+<!-- =========== FIELD SUMMARY =========== -->
+
+<A NAME="field_summary"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Field Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>static&nbsp;java.io.PrintStream</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../p1/p2/Z.html#out">out</A></B></CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Javadoc for field out</TD>
+</TR>
+</TABLE>
+&nbsp;
+<!-- ========== METHOD SUMMARY =========== -->
+
+<A NAME="method_summary"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Method Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>static&nbsp;void</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../p1/p2/Z.html#foo()">foo</A></B>()</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
+<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+
+<!-- ============ FIELD DETAIL =========== -->
+
+<A NAME="field_detail"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
+<B>Field Detail</B></FONT></TH>
+</TR>
+</TABLE>
+
+<A NAME="out"><!-- --></A><H3>
+out</H3>
+<PRE>
+public static java.io.PrintStream <B>out</B></PRE>
+<DL>
+<DD>Javadoc for field out
+<P>
+<DL>
+</DL>
+</DL>
+
+<!-- ============ METHOD DETAIL ========== -->
+
+<A NAME="method_detail"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
+<B>Method Detail</B></FONT></TH>
+</TR>
+</TABLE>
+
+<A NAME="foo()"><!-- --></A><H3>
+foo</H3>
+<PRE>
+public static void <B>foo</B>()</PRE>
+<DL>
+<DD><DL>
+</DL>
+</DD>
+</DL>
+<!-- ========= END OF CLASS DATA ========= -->
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Z.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="../../p1/p2/X.B.html" title="class in p1.p2"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;NEXT CLASS</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../index.html?p1/p2/Z.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="Z.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+<TR>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+ SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/Annot.D.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/Annot.D.html
new file mode 100644
index 0000000..0ae9c62
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/Annot.D.html
@@ -0,0 +1,140 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:09 CEST 2006 -->
+<TITLE>
+Uses of Class p1.p2.Annot.D
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="Uses of Class p1.p2.Annot.D";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../p1/p2/Annot.D.html" title="class in p1.p2"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../index.html?p1/p2/\class-useAnnot.D.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="Annot.D.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<CENTER>
+<H2>
+<B>Uses of Class<br>p1.p2.Annot.D</B></H2>
+</CENTER>
+No usage of p1.p2.Annot.D
+<P>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../p1/p2/Annot.D.html" title="class in p1.p2"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../index.html?p1/p2/\class-useAnnot.D.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="Annot.D.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/Annot.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/Annot.html
new file mode 100644
index 0000000..ff2dd47
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/Annot.html
@@ -0,0 +1,140 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:09 CEST 2006 -->
+<TITLE>
+Uses of Class p1.p2.Annot
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="Uses of Class p1.p2.Annot";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../p1/p2/Annot.html" title="annotation in p1.p2"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../index.html?p1/p2/\class-useAnnot.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="Annot.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<CENTER>
+<H2>
+<B>Uses of Class<br>p1.p2.Annot</B></H2>
+</CENTER>
+No usage of p1.p2.Annot
+<P>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../p1/p2/Annot.html" title="annotation in p1.p2"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../index.html?p1/p2/\class-useAnnot.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="Annot.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/Annot2.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/Annot2.html
new file mode 100644
index 0000000..c465468
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/Annot2.html
@@ -0,0 +1,140 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:09 CEST 2006 -->
+<TITLE>
+Uses of Class p1.p2.Annot2
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="Uses of Class p1.p2.Annot2";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../p1/p2/Annot2.html" title="annotation in p1.p2"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../index.html?p1/p2/\class-useAnnot2.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="Annot2.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<CENTER>
+<H2>
+<B>Uses of Class<br>p1.p2.Annot2</B></H2>
+</CENTER>
+No usage of p1.p2.Annot2
+<P>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../p1/p2/Annot2.html" title="annotation in p1.p2"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../index.html?p1/p2/\class-useAnnot2.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="Annot2.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/E.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/E.html
new file mode 100644
index 0000000..455ae9d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/E.html
@@ -0,0 +1,185 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:09 CEST 2006 -->
+<TITLE>
+Uses of Class p1.p2.E
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="Uses of Class p1.p2.E";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../p1/p2/E.html" title="enum in p1.p2"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../index.html?p1/p2/\class-useE.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="E.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<CENTER>
+<H2>
+<B>Uses of Class<br>p1.p2.E</B></H2>
+</CENTER>
+
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+Packages that use <A HREF="../../../p1/p2/E.html" title="enum in p1.p2">E</A></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><A HREF="#p1.p2"><B>p1.p2</B></A></TD>
+<TD>&nbsp;&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+<A NAME="p1.p2"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+Uses of <A HREF="../../../p1/p2/E.html" title="enum in p1.p2">E</A> in <A HREF="../../../p1/p2/package-summary.html">p1.p2</A></FONT></TH>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../p1/p2/package-summary.html">p1.p2</A> that return <A HREF="../../../p1/p2/E.html" title="enum in p1.p2">E</A></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>static&nbsp;<A HREF="../../../p1/p2/E.html" title="enum in p1.p2">E</A></CODE></FONT></TD>
+<TD><CODE><B>E.</B><B><A HREF="../../../p1/p2/E.html#valueOf(java.lang.String)">valueOf</A></B>(java.lang.String&nbsp;name)</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the enum constant of this type with the specified name.</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>static&nbsp;<A HREF="../../../p1/p2/E.html" title="enum in p1.p2">E</A>[]</CODE></FONT></TD>
+<TD><CODE><B>E.</B><B><A HREF="../../../p1/p2/E.html#values()">values</A></B>()</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an array containing the constants of this enum type, in
+the order they're declared.</TD>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../p1/p2/E.html" title="enum in p1.p2"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../index.html?p1/p2/\class-useE.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="E.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/TestClass.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/TestClass.html
new file mode 100644
index 0000000..ceb4279
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/TestClass.html
@@ -0,0 +1,140 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:09 CEST 2006 -->
+<TITLE>
+Uses of Class p1.p2.TestClass
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="Uses of Class p1.p2.TestClass";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../p1/p2/TestClass.html" title="class in p1.p2"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../index.html?p1/p2/\class-useTestClass.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="TestClass.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<CENTER>
+<H2>
+<B>Uses of Class<br>p1.p2.TestClass</B></H2>
+</CENTER>
+No usage of p1.p2.TestClass
+<P>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../p1/p2/TestClass.html" title="class in p1.p2"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../index.html?p1/p2/\class-useTestClass.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="TestClass.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/X.A.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/X.A.html
new file mode 100644
index 0000000..055b071
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/X.A.html
@@ -0,0 +1,140 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:09 CEST 2006 -->
+<TITLE>
+Uses of Class p1.p2.X.A
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="Uses of Class p1.p2.X.A";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../p1/p2/X.A.html" title="class in p1.p2"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../index.html?p1/p2/\class-useX.A.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="X.A.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<CENTER>
+<H2>
+<B>Uses of Class<br>p1.p2.X.A</B></H2>
+</CENTER>
+No usage of p1.p2.X.A
+<P>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../p1/p2/X.A.html" title="class in p1.p2"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../index.html?p1/p2/\class-useX.A.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="X.A.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/X.B.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/X.B.html
new file mode 100644
index 0000000..210202b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/X.B.html
@@ -0,0 +1,140 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:09 CEST 2006 -->
+<TITLE>
+Uses of Class p1.p2.X.B
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="Uses of Class p1.p2.X.B";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../p1/p2/X.B.html" title="class in p1.p2"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../index.html?p1/p2/\class-useX.B.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="X.B.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<CENTER>
+<H2>
+<B>Uses of Class<br>p1.p2.X.B</B></H2>
+</CENTER>
+No usage of p1.p2.X.B
+<P>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../p1/p2/X.B.html" title="class in p1.p2"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../index.html?p1/p2/\class-useX.B.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="X.B.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/X.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/X.html
new file mode 100644
index 0000000..ce18a68
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/X.html
@@ -0,0 +1,140 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:09 CEST 2006 -->
+<TITLE>
+Uses of Class p1.p2.X
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="Uses of Class p1.p2.X";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../p1/p2/X.html" title="class in p1.p2"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../index.html?p1/p2/\class-useX.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="X.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<CENTER>
+<H2>
+<B>Uses of Class<br>p1.p2.X</B></H2>
+</CENTER>
+No usage of p1.p2.X
+<P>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../p1/p2/X.html" title="class in p1.p2"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../index.html?p1/p2/\class-useX.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="X.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/Z.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/Z.html
new file mode 100644
index 0000000..6d03fc4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/Z.html
@@ -0,0 +1,140 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:09 CEST 2006 -->
+<TITLE>
+Uses of Class p1.p2.Z
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="Uses of Class p1.p2.Z";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../p1/p2/Z.html" title="class in p1.p2"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../index.html?p1/p2/\class-useZ.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="Z.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<CENTER>
+<H2>
+<B>Uses of Class<br>p1.p2.Z</B></H2>
+</CENTER>
+No usage of p1.p2.Z
+<P>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../p1/p2/Z.html" title="class in p1.p2"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../index.html?p1/p2/\class-useZ.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="Z.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/C.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/C.html
new file mode 100644
index 0000000..32188f8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/C.html
@@ -0,0 +1,442 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:08 CEST 2006 -->
+<TITLE>
+C
+</TITLE>
+
+<META NAME="keywords" CONTENT="p1.p2.p3.C interface">
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="C";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/C.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV CLASS&nbsp;
+&nbsp;<A HREF="../../../p1/p2/p3/D.html" title="class in p1.p2.p3"><B>NEXT CLASS</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../index.html?p1/p2/p3/C.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="C.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+<TR>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+ SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<!-- ======== START OF CLASS DATA ======== -->
+<H2>
+<FONT SIZE="-1">
+p1.p2.p3</FONT>
+<BR>
+Interface C&lt;E&gt;</H2>
+<HR>
+<DL>
+<DT><PRE>public interface <B>C&lt;E&gt;</B></DL>
+</PRE>
+
+<P>
+<HR>
+
+<P>
+
+<!-- ========== METHOD SUMMARY =========== -->
+
+<A NAME="method_summary"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Method Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;java.lang.Object[]</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../p1/p2/p3/C.html#bar()">bar</A></B>()</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Javadoc for bar()</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;<A HREF="../../../p1/p2/p3/C.html" title="type parameter in C">E</A></CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../p1/p2/p3/C.html#bar1(int, E)">bar1</A></B>(int&nbsp;i,
+ <A HREF="../../../p1/p2/p3/C.html" title="type parameter in C">E</A>&nbsp;e)</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Javadoc for bar1</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;boolean</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../p1/p2/p3/C.html#bar3(p1.p2.p3.D)">bar3</A></B>(<A HREF="../../../p1/p2/p3/D.html" title="class in p1.p2.p3">D</A>&lt;?&gt;&nbsp;c)</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Javadoc for bar3</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;boolean</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../p1/p2/p3/C.html#bar4(int, p1.p2.p3.D)">bar4</A></B>(int&nbsp;i,
+ <A HREF="../../../p1/p2/p3/D.html" title="class in p1.p2.p3">D</A>&lt;? extends <A HREF="../../../p1/p2/p3/C.html" title="type parameter in C">E</A>&gt;&nbsp;c)</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Javadoc for bar4</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
+<TR ALIGN="right" VALIGN="">
+<TD NOWRAP><FONT SIZE="-1">
+<CODE>&lt;K,V&gt; java.util.Map&lt;K,V&gt;</CODE></FONT></TD>
+</TR>
+</TABLE>
+</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../p1/p2/p3/C.html#bar5(java.util.Map, int, java.util.Map)">bar5</A></B>(java.util.Map&lt;K,V&gt;&nbsp;m,
+ int&nbsp;j,
+ java.util.Map&lt;K,V&gt;&nbsp;m2)</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Javadoc for bar5</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;<A HREF="../../../p1/p2/p3/D.html" title="class in p1.p2.p3">D</A>&lt;<A HREF="../../../p1/p2/p3/C.html" title="type parameter in C">E</A>&gt;</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../p1/p2/p3/C.html#d()">d</A></B>()</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Javadoc for d()</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;boolean</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../p1/p2/p3/C.html#equals(java.lang.Object)">equals</A></B>(java.lang.Object&nbsp;o)</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Javadoc of equals</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;boolean</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../p1/p2/p3/C.html#m(E)">m</A></B>(<A HREF="../../../p1/p2/p3/C.html" title="type parameter in C">E</A>&nbsp;o)</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Javadoc for m(E)</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;void</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../p1/p2/p3/C.html#m1(int, E)">m1</A></B>(int&nbsp;i,
+ <A HREF="../../../p1/p2/p3/C.html" title="type parameter in C">E</A>&nbsp;e)</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Javadoc for m1</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;<A HREF="../../../p1/p2/p3/C.html" title="type parameter in C">E</A></CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../p1/p2/p3/C.html#m2(int)">m2</A></B>(int&nbsp;index)</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Javadoc for m2</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
+<TR ALIGN="right" VALIGN="">
+<TD NOWRAP><FONT SIZE="-1">
+<CODE>&lt;T&gt; T[]</CODE></FONT></TD>
+</TR>
+</TABLE>
+</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../p1/p2/p3/C.html#toArray(T[])">toArray</A></B>(T[]&nbsp;a)</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Javadoc for foo(T[])</TD>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+
+<!-- ============ METHOD DETAIL ========== -->
+
+<A NAME="method_detail"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
+<B>Method Detail</B></FONT></TH>
+</TR>
+</TABLE>
+
+<A NAME="d()"><!-- --></A><H3>
+d</H3>
+<PRE>
+<A HREF="../../../p1/p2/p3/D.html" title="class in p1.p2.p3">D</A>&lt;<A HREF="../../../p1/p2/p3/C.html" title="type parameter in C">E</A>&gt; <B>d</B>()</PRE>
+<DL>
+<DD>Javadoc for d()
+<P>
+<DD><DL>
+</DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="bar()"><!-- --></A><H3>
+bar</H3>
+<PRE>
+java.lang.Object[] <B>bar</B>()</PRE>
+<DL>
+<DD>Javadoc for bar()
+<P>
+<DD><DL>
+</DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="toArray(java.lang.Object)"><!-- --></A><A NAME="toArray(T[])"><!-- --></A><H3>
+toArray</H3>
+<PRE>
+&lt;T&gt; T[] <B>toArray</B>(T[]&nbsp;a)</PRE>
+<DL>
+<DD>Javadoc for foo(T[])
+<P>
+<DD><DL>
+</DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="m(java.lang.Object)"><!-- --></A><A NAME="m(E)"><!-- --></A><H3>
+m</H3>
+<PRE>
+boolean <B>m</B>(<A HREF="../../../p1/p2/p3/C.html" title="type parameter in C">E</A>&nbsp;o)</PRE>
+<DL>
+<DD>Javadoc for m(E)
+<P>
+<DD><DL>
+</DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="bar4(int, p1.p2.p3.D)"><!-- --></A><H3>
+bar4</H3>
+<PRE>
+boolean <B>bar4</B>(int&nbsp;i,
+ <A HREF="../../../p1/p2/p3/D.html" title="class in p1.p2.p3">D</A>&lt;? extends <A HREF="../../../p1/p2/p3/C.html" title="type parameter in C">E</A>&gt;&nbsp;c)</PRE>
+<DL>
+<DD>Javadoc for bar4
+<P>
+<DD><DL>
+</DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="bar3(p1.p2.p3.D)"><!-- --></A><H3>
+bar3</H3>
+<PRE>
+boolean <B>bar3</B>(<A HREF="../../../p1/p2/p3/D.html" title="class in p1.p2.p3">D</A>&lt;?&gt;&nbsp;c)</PRE>
+<DL>
+<DD>Javadoc for bar3
+<P>
+<DD><DL>
+</DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="bar5(java.util.Map, int, java.util.Map)"><!-- --></A><H3>
+bar5</H3>
+<PRE>
+&lt;K,V&gt; java.util.Map&lt;K,V&gt; <B>bar5</B>(java.util.Map&lt;K,V&gt;&nbsp;m,
+ int&nbsp;j,
+ java.util.Map&lt;K,V&gt;&nbsp;m2)</PRE>
+<DL>
+<DD>Javadoc for bar5
+<P>
+<DD><DL>
+</DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="equals(java.lang.Object)"><!-- --></A><H3>
+equals</H3>
+<PRE>
+boolean <B>equals</B>(java.lang.Object&nbsp;o)</PRE>
+<DL>
+<DD>Javadoc of equals
+<P>
+<DD><DL>
+<DT><B>Overrides:</B><DD><CODE>equals</CODE> in class <CODE>java.lang.Object</CODE></DL>
+</DD>
+<DD><DL>
+</DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="bar1(int,java.lang.Object)"><!-- --></A><A NAME="bar1(int, E)"><!-- --></A><H3>
+bar1</H3>
+<PRE>
+<A HREF="../../../p1/p2/p3/C.html" title="type parameter in C">E</A> <B>bar1</B>(int&nbsp;i,
+ <A HREF="../../../p1/p2/p3/C.html" title="type parameter in C">E</A>&nbsp;e)</PRE>
+<DL>
+<DD>Javadoc for bar1
+<P>
+<DD><DL>
+</DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="m1(int,java.lang.Object)"><!-- --></A><A NAME="m1(int, E)"><!-- --></A><H3>
+m1</H3>
+<PRE>
+void <B>m1</B>(int&nbsp;i,
+ <A HREF="../../../p1/p2/p3/C.html" title="type parameter in C">E</A>&nbsp;e)</PRE>
+<DL>
+<DD>Javadoc for m1
+<P>
+<DD><DL>
+</DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="m2(int)"><!-- --></A><H3>
+m2</H3>
+<PRE>
+<A HREF="../../../p1/p2/p3/C.html" title="type parameter in C">E</A> <B>m2</B>(int&nbsp;index)</PRE>
+<DL>
+<DD>Javadoc for m2
+<P>
+<DD><DL>
+</DL>
+</DD>
+</DL>
+<!-- ========= END OF CLASS DATA ========= -->
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/C.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV CLASS&nbsp;
+&nbsp;<A HREF="../../../p1/p2/p3/D.html" title="class in p1.p2.p3"><B>NEXT CLASS</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../index.html?p1/p2/p3/C.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="C.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+<TR>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+ SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/D.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/D.html
new file mode 100644
index 0000000..4532a44
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/D.html
@@ -0,0 +1,221 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:08 CEST 2006 -->
+<TITLE>
+D
+</TITLE>
+
+<META NAME="keywords" CONTENT="p1.p2.p3.D class">
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="D";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/D.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="../../../p1/p2/p3/C.html" title="interface in p1.p2.p3"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;NEXT CLASS</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../index.html?p1/p2/p3/D.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="D.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+<TR>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+ SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#methods_inherited_from_class_java.lang.Object">METHOD</A></FONT></TD>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;METHOD</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<!-- ======== START OF CLASS DATA ======== -->
+<H2>
+<FONT SIZE="-1">
+p1.p2.p3</FONT>
+<BR>
+Class D&lt;E&gt;</H2>
+<PRE>
+java.lang.Object
+ <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>p1.p2.p3.D&lt;E&gt;</B>
+</PRE>
+<HR>
+<DL>
+<DT><PRE>public class <B>D&lt;E&gt;</B><DT>extends java.lang.Object</DL>
+</PRE>
+
+<P>
+<HR>
+
+<P>
+
+<!-- ======== CONSTRUCTOR SUMMARY ======== -->
+
+<A NAME="constructor_summary"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Constructor Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><CODE><B><A HREF="../../../p1/p2/p3/D.html#D()">D</A></B>()</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<!-- ========== METHOD SUMMARY =========== -->
+
+<A NAME="method_summary"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Method Summary</B></FONT></TH>
+</TR>
+</TABLE>
+&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
+<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+
+<!-- ========= CONSTRUCTOR DETAIL ======== -->
+
+<A NAME="constructor_detail"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
+<B>Constructor Detail</B></FONT></TH>
+</TR>
+</TABLE>
+
+<A NAME="D()"><!-- --></A><H3>
+D</H3>
+<PRE>
+public <B>D</B>()</PRE>
+<DL>
+</DL>
+<!-- ========= END OF CLASS DATA ========= -->
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/D.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="../../../p1/p2/p3/C.html" title="interface in p1.p2.p3"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;NEXT CLASS</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../index.html?p1/p2/p3/D.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="D.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+<TR>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+ SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#methods_inherited_from_class_java.lang.Object">METHOD</A></FONT></TD>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;METHOD</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/class-use/C.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/class-use/C.html
new file mode 100644
index 0000000..575fbd5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/class-use/C.html
@@ -0,0 +1,140 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:09 CEST 2006 -->
+<TITLE>
+Uses of Interface p1.p2.p3.C
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="Uses of Interface p1.p2.p3.C";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../p1/p2/p3/C.html" title="interface in p1.p2.p3"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../../index.html?p1/p2/p3/\class-useC.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="C.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<CENTER>
+<H2>
+<B>Uses of Interface<br>p1.p2.p3.C</B></H2>
+</CENTER>
+No usage of p1.p2.p3.C
+<P>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../p1/p2/p3/C.html" title="interface in p1.p2.p3"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../../index.html?p1/p2/p3/\class-useC.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="C.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/class-use/D.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/class-use/D.html
new file mode 100644
index 0000000..d44945b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/class-use/D.html
@@ -0,0 +1,201 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:09 CEST 2006 -->
+<TITLE>
+Uses of Class p1.p2.p3.D
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="Uses of Class p1.p2.p3.D";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../p1/p2/p3/D.html" title="class in p1.p2.p3"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../../index.html?p1/p2/p3/\class-useD.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="D.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<CENTER>
+<H2>
+<B>Uses of Class<br>p1.p2.p3.D</B></H2>
+</CENTER>
+
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+Packages that use <A HREF="../../../../p1/p2/p3/D.html" title="class in p1.p2.p3">D</A></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><A HREF="#p1.p2.p3"><B>p1.p2.p3</B></A></TD>
+<TD>&nbsp;&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+<A NAME="p1.p2.p3"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+Uses of <A HREF="../../../../p1/p2/p3/D.html" title="class in p1.p2.p3">D</A> in <A HREF="../../../../p1/p2/p3/package-summary.html">p1.p2.p3</A></FONT></TH>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../p1/p2/p3/package-summary.html">p1.p2.p3</A> that return <A HREF="../../../../p1/p2/p3/D.html" title="class in p1.p2.p3">D</A></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;<A HREF="../../../../p1/p2/p3/D.html" title="class in p1.p2.p3">D</A>&lt;<A HREF="../../../../p1/p2/p3/C.html" title="type parameter in C">E</A>&gt;</CODE></FONT></TD>
+<TD><CODE><B>C.</B><B><A HREF="../../../../p1/p2/p3/C.html#d()">d</A></B>()</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Javadoc for d()</TD>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../p1/p2/p3/package-summary.html">p1.p2.p3</A> with parameters of type <A HREF="../../../../p1/p2/p3/D.html" title="class in p1.p2.p3">D</A></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;boolean</CODE></FONT></TD>
+<TD><CODE><B>C.</B><B><A HREF="../../../../p1/p2/p3/C.html#bar3(p1.p2.p3.D)">bar3</A></B>(<A HREF="../../../../p1/p2/p3/D.html" title="class in p1.p2.p3">D</A>&lt;?&gt;&nbsp;c)</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Javadoc for bar3</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;boolean</CODE></FONT></TD>
+<TD><CODE><B>C.</B><B><A HREF="../../../../p1/p2/p3/C.html#bar4(int, p1.p2.p3.D)">bar4</A></B>(int&nbsp;i,
+ <A HREF="../../../../p1/p2/p3/D.html" title="class in p1.p2.p3">D</A>&lt;? extends <A HREF="../../../../p1/p2/p3/C.html" title="type parameter in C">E</A>&gt;&nbsp;c)</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Javadoc for bar4</TD>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../p1/p2/p3/D.html" title="class in p1.p2.p3"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../../index.html?p1/p2/p3/\class-useD.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="D.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/package-frame.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/package-frame.html
new file mode 100644
index 0000000..96f1be5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/package-frame.html
@@ -0,0 +1,43 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:08 CEST 2006 -->
+<TITLE>
+p1.p2.p3
+</TITLE>
+
+<META NAME="keywords" CONTENT="p1.p2.p3 package">
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
+
+
+</HEAD>
+
+<BODY BGCOLOR="white">
+<FONT size="+1" CLASS="FrameTitleFont">
+<A HREF="../../../p1/p2/p3/package-summary.html" target="classFrame">p1.p2.p3</A></FONT>
+<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
+<TR>
+<TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont">
+Interfaces</FONT>&nbsp;
+<FONT CLASS="FrameItemFont">
+<BR>
+<A HREF="C.html" title="interface in p1.p2.p3" target="classFrame"><I>C</I></A></FONT></TD>
+</TR>
+</TABLE>
+
+
+<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
+<TR>
+<TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont">
+Classes</FONT>&nbsp;
+<FONT CLASS="FrameItemFont">
+<BR>
+<A HREF="D.html" title="class in p1.p2.p3" target="classFrame">D</A></FONT></TD>
+</TR>
+</TABLE>
+
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/package-summary.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/package-summary.html
new file mode 100644
index 0000000..6d3d855
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/package-summary.html
@@ -0,0 +1,168 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:08 CEST 2006 -->
+<TITLE>
+p1.p2.p3
+</TITLE>
+
+<META NAME="keywords" CONTENT="p1.p2.p3 package">
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="p1.p2.p3";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="../../../p1/p2/package-summary.html"><B>PREV PACKAGE</B></A>&nbsp;
+&nbsp;<A HREF="../../../p2/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../index.html?p1/p2/p3/package-summary.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<H2>
+Package p1.p2.p3
+</H2>
+
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Interface Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD WIDTH="15%"><B><A HREF="../../../p1/p2/p3/C.html" title="interface in p1.p2.p3">C&lt;E&gt;</A></B></TD>
+<TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+
+<P>
+
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Class Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD WIDTH="15%"><B><A HREF="../../../p1/p2/p3/D.html" title="class in p1.p2.p3">D&lt;E&gt;</A></B></TD>
+<TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+
+<P>
+<DL>
+</DL>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="../../../p1/p2/package-summary.html"><B>PREV PACKAGE</B></A>&nbsp;
+&nbsp;<A HREF="../../../p2/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../index.html?p1/p2/p3/package-summary.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/package-tree.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/package-tree.html
new file mode 100644
index 0000000..2c64726
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/package-tree.html
@@ -0,0 +1,154 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:08 CEST 2006 -->
+<TITLE>
+p1.p2.p3 Class Hierarchy
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="p1.p2.p3 Class Hierarchy";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="../../../p1/p2/package-tree.html"><B>PREV</B></A>&nbsp;
+&nbsp;<A HREF="../../../p2/package-tree.html"><B>NEXT</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../index.html?p1/p2/p3/package-tree.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="package-tree.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<CENTER>
+<H2>
+Hierarchy For Package p1.p2.p3
+</H2>
+</CENTER>
+<DL>
+<DT><B>Package Hierarchies:</B><DD><A HREF="../../../overview-tree.html">All Packages</A></DL>
+<HR>
+<H2>
+Class Hierarchy
+</H2>
+<UL>
+<LI TYPE="circle">java.lang.Object<UL>
+<LI TYPE="circle">p1.p2.p3.<A HREF="../../../p1/p2/p3/D.html" title="class in p1.p2.p3"><B>D</B></A>&lt;E&gt;</UL>
+</UL>
+<H2>
+Interface Hierarchy
+</H2>
+<UL>
+<LI TYPE="circle">p1.p2.p3.<A HREF="../../../p1/p2/p3/C.html" title="interface in p1.p2.p3"><B>C</B></A>&lt;E&gt;</UL>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="../../../p1/p2/package-tree.html"><B>PREV</B></A>&nbsp;
+&nbsp;<A HREF="../../../p2/package-tree.html"><B>NEXT</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../index.html?p1/p2/p3/package-tree.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="package-tree.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/package-use.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/package-use.html
new file mode 100644
index 0000000..8140f18
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/package-use.html
@@ -0,0 +1,166 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:09 CEST 2006 -->
+<TITLE>
+Uses of Package p1.p2.p3
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="Uses of Package p1.p2.p3";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../index.html?p1/p2/p3/package-use.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="package-use.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<CENTER>
+<H2>
+<B>Uses of Package<br>p1.p2.p3</B></H2>
+</CENTER>
+
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+Packages that use <A HREF="../../../p1/p2/p3/package-summary.html">p1.p2.p3</A></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><A HREF="#p1.p2.p3"><B>p1.p2.p3</B></A></TD>
+<TD>&nbsp;&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+<A NAME="p1.p2.p3"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+Classes in <A HREF="../../../p1/p2/p3/package-summary.html">p1.p2.p3</A> used by <A HREF="../../../p1/p2/p3/package-summary.html">p1.p2.p3</A></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><B><A HREF="../../../p1/p2/p3/class-use/D.html#p1.p2.p3"><B>D</B></A></B>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../../index.html?p1/p2/p3/package-use.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="package-use.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/package-frame.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/package-frame.html
new file mode 100644
index 0000000..52f9c05
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/package-frame.html
@@ -0,0 +1,62 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:08 CEST 2006 -->
+<TITLE>
+p1.p2
+</TITLE>
+
+<META NAME="keywords" CONTENT="p1.p2 package">
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
+
+
+</HEAD>
+
+<BODY BGCOLOR="white">
+<FONT size="+1" CLASS="FrameTitleFont">
+<A HREF="../../p1/p2/package-summary.html" target="classFrame">p1.p2</A></FONT>
+<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
+<TR>
+<TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont">
+Classes</FONT>&nbsp;
+<FONT CLASS="FrameItemFont">
+<BR>
+<A HREF="Annot.D.html" title="class in p1.p2" target="classFrame">Annot.D</A>
+<BR>
+<A HREF="TestClass.html" title="class in p1.p2" target="classFrame">TestClass</A>
+<BR>
+<A HREF="X.html" title="class in p1.p2" target="classFrame">X</A>
+<BR>
+<A HREF="Z.html" title="class in p1.p2" target="classFrame">Z</A></FONT></TD>
+</TR>
+</TABLE>
+
+
+<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
+<TR>
+<TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont">
+Enums</FONT>&nbsp;
+<FONT CLASS="FrameItemFont">
+<BR>
+<A HREF="E.html" title="enum in p1.p2" target="classFrame">E</A></FONT></TD>
+</TR>
+</TABLE>
+
+
+<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
+<TR>
+<TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont">
+Annotation Types</FONT>&nbsp;
+<FONT CLASS="FrameItemFont">
+<BR>
+<A HREF="Annot.html" title="annotation in p1.p2" target="classFrame">Annot</A>
+<BR>
+<A HREF="Annot2.html" title="annotation in p1.p2" target="classFrame">Annot2</A></FONT></TD>
+</TR>
+</TABLE>
+
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/package-summary.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/package-summary.html
new file mode 100644
index 0000000..0e02524
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/package-summary.html
@@ -0,0 +1,198 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:08 CEST 2006 -->
+<TITLE>
+p1.p2
+</TITLE>
+
+<META NAME="keywords" CONTENT="p1.p2 package">
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="p1.p2";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV PACKAGE&nbsp;
+&nbsp;<A HREF="../../p1/p2/p3/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../index.html?p1/p2/package-summary.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<H2>
+Package p1.p2
+</H2>
+
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Class Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD WIDTH="15%"><B><A HREF="../../p1/p2/Annot.D.html" title="class in p1.p2">Annot.D</A></B></TD>
+<TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD WIDTH="15%"><B><A HREF="../../p1/p2/TestClass.html" title="class in p1.p2">TestClass</A></B></TD>
+<TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD WIDTH="15%"><B><A HREF="../../p1/p2/X.html" title="class in p1.p2">X</A></B></TD>
+<TD>Class X javadoc</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD WIDTH="15%"><B><A HREF="../../p1/p2/Z.html" title="class in p1.p2">Z</A></B></TD>
+<TD>Description for class Z</TD>
+</TR>
+</TABLE>
+&nbsp;
+
+<P>
+
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Enum Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD WIDTH="15%"><B><A HREF="../../p1/p2/E.html" title="enum in p1.p2">E</A></B></TD>
+<TD>Declaration of enum type E</TD>
+</TR>
+</TABLE>
+&nbsp;
+
+<P>
+
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Annotation Types Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD WIDTH="15%"><B><A HREF="../../p1/p2/Annot.html" title="annotation in p1.p2">Annot</A></B></TD>
+<TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD WIDTH="15%"><B><A HREF="../../p1/p2/Annot2.html" title="annotation in p1.p2">Annot2</A></B></TD>
+<TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+
+<P>
+<DL>
+</DL>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV PACKAGE&nbsp;
+&nbsp;<A HREF="../../p1/p2/p3/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../index.html?p1/p2/package-summary.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/package-tree.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/package-tree.html
new file mode 100644
index 0000000..68487f1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/package-tree.html
@@ -0,0 +1,166 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:08 CEST 2006 -->
+<TITLE>
+p1.p2 Class Hierarchy
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="p1.p2 Class Hierarchy";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;<A HREF="../../p1/p2/p3/package-tree.html"><B>NEXT</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../index.html?p1/p2/package-tree.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="package-tree.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<CENTER>
+<H2>
+Hierarchy For Package p1.p2
+</H2>
+</CENTER>
+<DL>
+<DT><B>Package Hierarchies:</B><DD><A HREF="../../overview-tree.html">All Packages</A></DL>
+<HR>
+<H2>
+Class Hierarchy
+</H2>
+<UL>
+<LI TYPE="circle">java.lang.Object<UL>
+<LI TYPE="circle">p1.p2.<A HREF="../../p1/p2/Annot.D.html" title="class in p1.p2"><B>Annot.D</B></A><LI TYPE="circle">p1.p2.<A HREF="../../p1/p2/TestClass.html" title="class in p1.p2"><B>TestClass</B></A><LI TYPE="circle">p1.p2.<A HREF="../../p1/p2/X.html" title="class in p1.p2"><B>X</B></A><LI TYPE="circle">p1.p2.<A HREF="../../p1/p2/X.A.html" title="class in p1.p2"><B>X.A</B></A><LI TYPE="circle">p1.p2.<A HREF="../../p1/p2/X.B.html" title="class in p1.p2"><B>X.B</B></A><LI TYPE="circle">p1.p2.<A HREF="../../p1/p2/Z.html" title="class in p1.p2"><B>Z</B></A></UL>
+</UL>
+<H2>
+Annotation Type Hierarchy
+</H2>
+<UL>
+<LI TYPE="circle">p1.p2.<A HREF="../../p1/p2/Annot2.html" title="annotation in p1.p2"><B>Annot2</B></A> (implements java.lang.annotation.Annotation)
+<LI TYPE="circle">p1.p2.<A HREF="../../p1/p2/Annot.html" title="annotation in p1.p2"><B>Annot</B></A> (implements java.lang.annotation.Annotation)
+</UL>
+<H2>
+Enum Hierarchy
+</H2>
+<UL>
+<LI TYPE="circle">java.lang.Object<UL>
+<LI TYPE="circle">java.lang.Enum&lt;E&gt; (implements java.lang.Comparable&lt;T&gt;, java.io.Serializable)
+<UL>
+<LI TYPE="circle">p1.p2.<A HREF="../../p1/p2/E.html" title="enum in p1.p2"><B>E</B></A></UL>
+</UL>
+</UL>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;<A HREF="../../p1/p2/p3/package-tree.html"><B>NEXT</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../index.html?p1/p2/package-tree.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="package-tree.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/package-use.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/package-use.html
new file mode 100644
index 0000000..c285575
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/package-use.html
@@ -0,0 +1,166 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:09 CEST 2006 -->
+<TITLE>
+Uses of Package p1.p2
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="Uses of Package p1.p2";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../index.html?p1/p2/package-use.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="package-use.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<CENTER>
+<H2>
+<B>Uses of Package<br>p1.p2</B></H2>
+</CENTER>
+
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+Packages that use <A HREF="../../p1/p2/package-summary.html">p1.p2</A></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><A HREF="#p1.p2"><B>p1.p2</B></A></TD>
+<TD>&nbsp;&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+<A NAME="p1.p2"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+Classes in <A HREF="../../p1/p2/package-summary.html">p1.p2</A> used by <A HREF="../../p1/p2/package-summary.html">p1.p2</A></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><B><A HREF="../../p1/p2/class-use/E.html#p1.p2"><B>E</B></A></B>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Declaration of enum type E</TD>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../index.html?p1/p2/package-use.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="package-use.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/X.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/X.html
new file mode 100644
index 0000000..8f15b95
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/X.html
@@ -0,0 +1,254 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:08 CEST 2006 -->
+<TITLE>
+X
+</TITLE>
+
+<META NAME="keywords" CONTENT="p2.X class">
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="X";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/X.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV CLASS&nbsp;
+&nbsp;<A HREF="../p2/Y.html" title="class in p2"><B>NEXT CLASS</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?p2/X.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="X.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+<TR>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+ SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<!-- ======== START OF CLASS DATA ======== -->
+<H2>
+<FONT SIZE="-1">
+p2</FONT>
+<BR>
+Class X</H2>
+<PRE>
+java.lang.Object
+ <IMG SRC="../resources/inherit.gif" ALT="extended by "><B>p2.X</B>
+</PRE>
+<DL>
+<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../p2/Y.html" title="class in p2">Y</A></DD>
+</DL>
+<HR>
+<DL>
+<DT><PRE>public class <B>X</B><DT>extends java.lang.Object</DL>
+</PRE>
+
+<P>
+<HR>
+
+<P>
+
+<!-- ======== CONSTRUCTOR SUMMARY ======== -->
+
+<A NAME="constructor_summary"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Constructor Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><CODE><B><A HREF="../p2/X.html#X()">X</A></B>()</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<!-- ========== METHOD SUMMARY =========== -->
+
+<A NAME="method_summary"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Method Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;<A HREF="../p2/Z.html" title="class in p2">Z</A>&lt;java.lang.String&gt;</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../p2/X.html#foo()">foo</A></B>()</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;test case for bug 140879 Spontaneous error "java.util.Set cannot be resolved..."</TD>
+</TR>
+</TABLE>
+&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
+<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+
+<!-- ========= CONSTRUCTOR DETAIL ======== -->
+
+<A NAME="constructor_detail"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
+<B>Constructor Detail</B></FONT></TH>
+</TR>
+</TABLE>
+
+<A NAME="X()"><!-- --></A><H3>
+X</H3>
+<PRE>
+public <B>X</B>()</PRE>
+<DL>
+</DL>
+
+<!-- ============ METHOD DETAIL ========== -->
+
+<A NAME="method_detail"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
+<B>Method Detail</B></FONT></TH>
+</TR>
+</TABLE>
+
+<A NAME="foo()"><!-- --></A><H3>
+foo</H3>
+<PRE>
+public <A HREF="../p2/Z.html" title="class in p2">Z</A>&lt;java.lang.String&gt; <B>foo</B>()</PRE>
+<DL>
+<DD>test case for bug 140879 Spontaneous error "java.util.Set cannot be resolved..."
+<P>
+<DD><DL>
+</DL>
+</DD>
+</DL>
+<!-- ========= END OF CLASS DATA ========= -->
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/X.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV CLASS&nbsp;
+&nbsp;<A HREF="../p2/Y.html" title="class in p2"><B>NEXT CLASS</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?p2/X.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="X.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+<TR>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+ SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/Y.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/Y.html
new file mode 100644
index 0000000..7483a56
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/Y.html
@@ -0,0 +1,256 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:08 CEST 2006 -->
+<TITLE>
+Y
+</TITLE>
+
+<META NAME="keywords" CONTENT="p2.Y class">
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="Y";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Y.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="../p2/X.html" title="class in p2"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../p2/Z.html" title="class in p2"><B>NEXT CLASS</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?p2/Y.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="Y.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+<TR>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+ SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<!-- ======== START OF CLASS DATA ======== -->
+<H2>
+<FONT SIZE="-1">
+p2</FONT>
+<BR>
+Class Y</H2>
+<PRE>
+java.lang.Object
+ <IMG SRC="../resources/inherit.gif" ALT="extended by "><A HREF="../p2/X.html" title="class in p2">p2.X</A>
+ <IMG SRC="../resources/inherit.gif" ALT="extended by "><B>p2.Y</B>
+</PRE>
+<HR>
+<DL>
+<DT><PRE>public class <B>Y</B><DT>extends <A HREF="../p2/X.html" title="class in p2">X</A></DL>
+</PRE>
+
+<P>
+<HR>
+
+<P>
+
+<!-- ======== CONSTRUCTOR SUMMARY ======== -->
+
+<A NAME="constructor_summary"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Constructor Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><CODE><B><A HREF="../p2/Y.html#Y()">Y</A></B>()</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<!-- ========== METHOD SUMMARY =========== -->
+
+<A NAME="method_summary"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Method Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;<A HREF="../p2/Z.html" title="class in p2">Z</A>&lt;java.lang.String&gt;</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../p2/Y.html#foo()">foo</A></B>()</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;test case for bug 140879 Spontaneous error "java.util.Set cannot be resolved..."</TD>
+</TR>
+</TABLE>
+&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
+<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+
+<!-- ========= CONSTRUCTOR DETAIL ======== -->
+
+<A NAME="constructor_detail"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
+<B>Constructor Detail</B></FONT></TH>
+</TR>
+</TABLE>
+
+<A NAME="Y()"><!-- --></A><H3>
+Y</H3>
+<PRE>
+public <B>Y</B>()</PRE>
+<DL>
+</DL>
+
+<!-- ============ METHOD DETAIL ========== -->
+
+<A NAME="method_detail"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
+<B>Method Detail</B></FONT></TH>
+</TR>
+</TABLE>
+
+<A NAME="foo()"><!-- --></A><H3>
+foo</H3>
+<PRE>
+public <A HREF="../p2/Z.html" title="class in p2">Z</A>&lt;java.lang.String&gt; <B>foo</B>()</PRE>
+<DL>
+<DD><B>Description copied from class: <CODE><A HREF="../p2/X.html#foo()">X</A></CODE></B></DD>
+<DD>test case for bug 140879 Spontaneous error "java.util.Set cannot be resolved..."
+<P>
+<DD><DL>
+<DT><B>Overrides:</B><DD><CODE><A HREF="../p2/X.html#foo()">foo</A></CODE> in class <CODE><A HREF="../p2/X.html" title="class in p2">X</A></CODE></DL>
+</DD>
+<DD><DL>
+</DL>
+</DD>
+</DL>
+<!-- ========= END OF CLASS DATA ========= -->
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Y.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="../p2/X.html" title="class in p2"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../p2/Z.html" title="class in p2"><B>NEXT CLASS</B></A></FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?p2/Y.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="Y.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+<TR>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+ SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/Z.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/Z.html
new file mode 100644
index 0000000..be63283
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/Z.html
@@ -0,0 +1,221 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:08 CEST 2006 -->
+<TITLE>
+Z
+</TITLE>
+
+<META NAME="keywords" CONTENT="p2.Z class">
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="Z";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Z.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="../p2/Y.html" title="class in p2"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;NEXT CLASS</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?p2/Z.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="Z.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+<TR>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+ SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#methods_inherited_from_class_java.lang.Object">METHOD</A></FONT></TD>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;METHOD</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<!-- ======== START OF CLASS DATA ======== -->
+<H2>
+<FONT SIZE="-1">
+p2</FONT>
+<BR>
+Class Z&lt;T&gt;</H2>
+<PRE>
+java.lang.Object
+ <IMG SRC="../resources/inherit.gif" ALT="extended by "><B>p2.Z&lt;T&gt;</B>
+</PRE>
+<HR>
+<DL>
+<DT><PRE>public class <B>Z&lt;T&gt;</B><DT>extends java.lang.Object</DL>
+</PRE>
+
+<P>
+<HR>
+
+<P>
+
+<!-- ======== CONSTRUCTOR SUMMARY ======== -->
+
+<A NAME="constructor_summary"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Constructor Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><CODE><B><A HREF="../p2/Z.html#Z()">Z</A></B>()</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<!-- ========== METHOD SUMMARY =========== -->
+
+<A NAME="method_summary"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Method Summary</B></FONT></TH>
+</TR>
+</TABLE>
+&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
+<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+
+<!-- ========= CONSTRUCTOR DETAIL ======== -->
+
+<A NAME="constructor_detail"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
+<B>Constructor Detail</B></FONT></TH>
+</TR>
+</TABLE>
+
+<A NAME="Z()"><!-- --></A><H3>
+Z</H3>
+<PRE>
+public <B>Z</B>()</PRE>
+<DL>
+</DL>
+<!-- ========= END OF CLASS DATA ========= -->
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Z.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="../p2/Y.html" title="class in p2"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;NEXT CLASS</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?p2/Z.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="Z.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+<TR>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+ SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#methods_inherited_from_class_java.lang.Object">METHOD</A></FONT></TD>
+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
+DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;METHOD</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/class-use/X.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/class-use/X.html
new file mode 100644
index 0000000..a6220bc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/class-use/X.html
@@ -0,0 +1,176 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:09 CEST 2006 -->
+<TITLE>
+Uses of Class p2.X
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="Uses of Class p2.X";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../p2/X.html" title="class in p2"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../index.html?p2/\class-useX.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="X.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<CENTER>
+<H2>
+<B>Uses of Class<br>p2.X</B></H2>
+</CENTER>
+
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+Packages that use <A HREF="../../p2/X.html" title="class in p2">X</A></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><A HREF="#p2"><B>p2</B></A></TD>
+<TD>&nbsp;&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+<A NAME="p2"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+Uses of <A HREF="../../p2/X.html" title="class in p2">X</A> in <A HREF="../../p2/package-summary.html">p2</A></FONT></TH>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
+<TH ALIGN="left" COLSPAN="2">Subclasses of <A HREF="../../p2/X.html" title="class in p2">X</A> in <A HREF="../../p2/package-summary.html">p2</A></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;class</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../p2/Y.html" title="class in p2">Y</A></B></CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../p2/X.html" title="class in p2"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../index.html?p2/\class-useX.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="X.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/class-use/Y.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/class-use/Y.html
new file mode 100644
index 0000000..9e4523b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/class-use/Y.html
@@ -0,0 +1,140 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:09 CEST 2006 -->
+<TITLE>
+Uses of Class p2.Y
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="Uses of Class p2.Y";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../p2/Y.html" title="class in p2"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../index.html?p2/\class-useY.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="Y.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<CENTER>
+<H2>
+<B>Uses of Class<br>p2.Y</B></H2>
+</CENTER>
+No usage of p2.Y
+<P>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../p2/Y.html" title="class in p2"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../index.html?p2/\class-useY.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="Y.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/class-use/Z.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/class-use/Z.html
new file mode 100644
index 0000000..b6af94a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/class-use/Z.html
@@ -0,0 +1,184 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:09 CEST 2006 -->
+<TITLE>
+Uses of Class p2.Z
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="Uses of Class p2.Z";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../p2/Z.html" title="class in p2"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../index.html?p2/\class-useZ.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="Z.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<CENTER>
+<H2>
+<B>Uses of Class<br>p2.Z</B></H2>
+</CENTER>
+
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+Packages that use <A HREF="../../p2/Z.html" title="class in p2">Z</A></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><A HREF="#p2"><B>p2</B></A></TD>
+<TD>&nbsp;&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+<A NAME="p2"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+Uses of <A HREF="../../p2/Z.html" title="class in p2">Z</A> in <A HREF="../../p2/package-summary.html">p2</A></FONT></TH>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../p2/package-summary.html">p2</A> that return <A HREF="../../p2/Z.html" title="class in p2">Z</A></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;<A HREF="../../p2/Z.html" title="class in p2">Z</A>&lt;java.lang.String&gt;</CODE></FONT></TD>
+<TD><CODE><B>Y.</B><B><A HREF="../../p2/Y.html#foo()">foo</A></B>()</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;<A HREF="../../p2/Z.html" title="class in p2">Z</A>&lt;java.lang.String&gt;</CODE></FONT></TD>
+<TD><CODE><B>X.</B><B><A HREF="../../p2/X.html#foo()">foo</A></B>()</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;test case for bug 140879 Spontaneous error "java.util.Set cannot be resolved..."</TD>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../p2/Z.html" title="class in p2"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../../index.html?p2/\class-useZ.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="Z.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/package-frame.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/package-frame.html
new file mode 100644
index 0000000..8384c36
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/package-frame.html
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:08 CEST 2006 -->
+<TITLE>
+p2
+</TITLE>
+
+<META NAME="keywords" CONTENT="p2 package">
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
+
+
+</HEAD>
+
+<BODY BGCOLOR="white">
+<FONT size="+1" CLASS="FrameTitleFont">
+<A HREF="../p2/package-summary.html" target="classFrame">p2</A></FONT>
+<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
+<TR>
+<TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont">
+Classes</FONT>&nbsp;
+<FONT CLASS="FrameItemFont">
+<BR>
+<A HREF="X.html" title="class in p2" target="classFrame">X</A>
+<BR>
+<A HREF="Y.html" title="class in p2" target="classFrame">Y</A>
+<BR>
+<A HREF="Z.html" title="class in p2" target="classFrame">Z</A></FONT></TD>
+</TR>
+</TABLE>
+
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/package-summary.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/package-summary.html
new file mode 100644
index 0000000..55bc304
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/package-summary.html
@@ -0,0 +1,162 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:08 CEST 2006 -->
+<TITLE>
+p2
+</TITLE>
+
+<META NAME="keywords" CONTENT="p2 package">
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="p2";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="../p1/p2/p3/package-summary.html"><B>PREV PACKAGE</B></A>&nbsp;
+&nbsp;NEXT PACKAGE</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?p2/package-summary.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<H2>
+Package p2
+</H2>
+
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Class Summary</B></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD WIDTH="15%"><B><A HREF="../p2/X.html" title="class in p2">X</A></B></TD>
+<TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD WIDTH="15%"><B><A HREF="../p2/Y.html" title="class in p2">Y</A></B></TD>
+<TD>&nbsp;</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD WIDTH="15%"><B><A HREF="../p2/Z.html" title="class in p2">Z&lt;T&gt;</A></B></TD>
+<TD>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+
+<P>
+<DL>
+</DL>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="../p1/p2/p3/package-summary.html"><B>PREV PACKAGE</B></A>&nbsp;
+&nbsp;NEXT PACKAGE</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?p2/package-summary.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/package-tree.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/package-tree.html
new file mode 100644
index 0000000..f2addcc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/package-tree.html
@@ -0,0 +1,151 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:08 CEST 2006 -->
+<TITLE>
+p2 Class Hierarchy
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="p2 Class Hierarchy";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="../p1/p2/p3/package-tree.html"><B>PREV</B></A>&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?p2/package-tree.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="package-tree.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<CENTER>
+<H2>
+Hierarchy For Package p2
+</H2>
+</CENTER>
+<DL>
+<DT><B>Package Hierarchies:</B><DD><A HREF="../overview-tree.html">All Packages</A></DL>
+<HR>
+<H2>
+Class Hierarchy
+</H2>
+<UL>
+<LI TYPE="circle">java.lang.Object<UL>
+<LI TYPE="circle">p2.<A HREF="../p2/X.html" title="class in p2"><B>X</B></A><UL>
+<LI TYPE="circle">p2.<A HREF="../p2/Y.html" title="class in p2"><B>Y</B></A></UL>
+<LI TYPE="circle">p2.<A HREF="../p2/Z.html" title="class in p2"><B>Z</B></A>&lt;T&gt;</UL>
+</UL>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;<A HREF="../p1/p2/p3/package-tree.html"><B>PREV</B></A>&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?p2/package-tree.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="package-tree.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/package-use.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/package-use.html
new file mode 100644
index 0000000..ef12ac4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/package-use.html
@@ -0,0 +1,172 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.5.0_07) on Mon Jun 05 12:35:09 CEST 2006 -->
+<TITLE>
+Uses of Package p2
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="Uses of Package p2";
+}
+</SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?p2/package-use.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="package-use.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<CENTER>
+<H2>
+<B>Uses of Package<br>p2</B></H2>
+</CENTER>
+
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+Packages that use <A HREF="../p2/package-summary.html">p2</A></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><A HREF="#p2"><B>p2</B></A></TD>
+<TD>&nbsp;&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+<A NAME="p2"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+Classes in <A HREF="../p2/package-summary.html">p2</A> used by <A HREF="../p2/package-summary.html">p2</A></FONT></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><B><A HREF="../p2/class-use/X.html#p2"><B>X</B></A></B>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><B><A HREF="../p2/class-use/Z.html#p2"><B>Z</B></A></B>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+<P>
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
+ <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+&nbsp;PREV&nbsp;
+&nbsp;NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="../index.html?p2/package-use.html" target="_top"><B>FRAMES</B></A> &nbsp;
+&nbsp;<A HREF="package-use.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
+&nbsp;<SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/package-list b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/package-list
new file mode 100644
index 0000000..8bfe472
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/package-list
@@ -0,0 +1,3 @@
+p1.p2
+p1.p2.p3
+p2
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/resources/inherit.gif b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/resources/inherit.gif
new file mode 100644
index 0000000..c814867
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/resources/inherit.gif
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/stylesheet.css b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/stylesheet.css
new file mode 100644
index 0000000..14c3737
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/stylesheet.css
@@ -0,0 +1,29 @@
+/* Javadoc style sheet */
+
+/* Define colors, fonts and other style attributes here to override the defaults */
+
+/* Page background color */
+body { background-color: #FFFFFF }
+
+/* Headings */
+h1 { font-size: 145% }
+
+/* Table colors */
+.TableHeadingColor { background: #CCCCFF } /* Dark mauve */
+.TableSubHeadingColor { background: #EEEEFF } /* Light mauve */
+.TableRowColor { background: #FFFFFF } /* White */
+
+/* Font used in left-hand frame lists */
+.FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif }
+.FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif }
+.FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif }
+
+/* Navigation bar fonts and colors */
+.NavBarCell1 { background-color:#EEEEFF;} /* Light mauve */
+.NavBarCell1Rev { background-color:#00008B;} /* Dark Blue */
+.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;}
+.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;}
+
+.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
+.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/lib/test6.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/lib/test6.jar
new file mode 100644
index 0000000..da96f39
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/lib/test6.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/lib/test6src.zip b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/lib/test6src.zip
new file mode 100644
index 0000000..8437e15
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/lib/test6src.zip
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/src/p1/p2/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/src/p1/p2/X.js
new file mode 100644
index 0000000..3fc2df5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/src/p1/p2/X.js
@@ -0,0 +1,68 @@
+package p1.p2;
+
+import java.util.Enumeration;
+
+/**
+ * Class X javadoc
+ */
+public class X {
+ /**
+ * Javadoc for initializer
+ */
+ static {
+ }
+
+ /**
+ * Javadoc for field f
+ */
+ public int f;
+
+ /**
+ * Javadoc for method foo
+ */
+ public void foo(int i, long l, String s) {
+ }
+
+ /**
+ * Javadoc for member type A
+ */
+ public class A {
+ }
+
+ /**
+ * Javadoc for constructor X(int)
+ */
+ X(int i) {
+ }
+
+ /**
+ * Javadoc for f3
+ */
+ /*
+ * Not a javadoc comment
+ */
+ /**
+ * Real javadoc for f3
+ */
+ public String f3;
+
+ public int f2;
+
+ public void foo2() {
+ }
+
+ public class B {
+ }
+
+ X() {
+ }
+
+ {
+ }
+
+ public void foo(Enumeration enumeration) {
+ if (enumeration.hasMoreElements()) {
+ System.out.println("Has more elements");
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/src/p1/p2/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/src/p1/p2/Y.js
new file mode 100644
index 0000000..6f3744d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/src/p1/p2/Y.js
@@ -0,0 +1,8 @@
+package p1.p2;
+
+public class Y {
+
+ void foo() {
+ new X().foo(1, 1, "");
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/lib.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/lib.jar
new file mode 100644
index 0000000..599826b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/lib.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/libSrc.zip b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/libSrc.zip
new file mode 100644
index 0000000..295f08f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/libSrc.zip
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectArgument1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectArgument1.js
new file mode 100644
index 0000000..85d5af7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectArgument1.js
@@ -0,0 +1,5 @@
+public class CorrectArgument1 {
+ void foo(int bar0){
+ bar = 5;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectException1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectException1.js
new file mode 100644
index 0000000..9cb431c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectException1.js
@@ -0,0 +1,5 @@
+public class CorrectException1 {
+ void foo() throws aaa.bbbz.AnException {
+
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectException2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectException2.js
new file mode 100644
index 0000000..fd574c9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectException2.js
@@ -0,0 +1,5 @@
+public class CorrectException2 {
+ void foo() throws aaa.bbb.AnExceptionz {
+
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectField1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectField1.js
new file mode 100644
index 0000000..9153bf6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectField1.js
@@ -0,0 +1,6 @@
+public class CorrectField1 {
+ public int bar0;
+ void foo(){
+ bar = 5;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectField2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectField2.js
new file mode 100644
index 0000000..c5dfb78
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectField2.js
@@ -0,0 +1,7 @@
+public class CorrectField2 {
+ public int bar0;
+ void foo(){
+ CorrectField2 cf = new CorrectField2();
+ cf.bar = 5;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectFieldType1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectFieldType1.js
new file mode 100644
index 0000000..1158f40
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectFieldType1.js
@@ -0,0 +1,3 @@
+public class CorrectFieldType1 {
+ aaa.dddz.AClass field;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectFieldType2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectFieldType2.js
new file mode 100644
index 0000000..0c271ee
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectFieldType2.js
@@ -0,0 +1,3 @@
+public class CorrectFieldType2 {
+ aaa.ddd.AClassz field;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectFieldType3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectFieldType3.js
new file mode 100644
index 0000000..218cfae
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectFieldType3.js
@@ -0,0 +1,5 @@
+import aaa.ddd.*;
+
+public class CorrectFieldType3 {
+ AClassz field;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectImport1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectImport1.js
new file mode 100644
index 0000000..662ef96
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectImport1.js
@@ -0,0 +1,5 @@
+import aaa.dddz.AClass;
+
+public class CorrectImport1 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectImport2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectImport2.js
new file mode 100644
index 0000000..a67c83d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectImport2.js
@@ -0,0 +1,5 @@
+import aaa.dddz.*;
+
+public class CorrectImport2 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectImport3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectImport3.js
new file mode 100644
index 0000000..977c7b5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectImport3.js
@@ -0,0 +1,5 @@
+import aaa.ddd.AClassz;
+
+public class CorrectImport3 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectLocalVariable1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectLocalVariable1.js
new file mode 100644
index 0000000..dd1e67b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectLocalVariable1.js
@@ -0,0 +1,6 @@
+public class CorrectLocalVariable1 {
+ void foo(){
+ int bar0;
+ bar = 5;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectLocalVariableType1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectLocalVariableType1.js
new file mode 100644
index 0000000..d1a111c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectLocalVariableType1.js
@@ -0,0 +1,5 @@
+public class CorrectLocalVariableType1 {
+ void foo(){
+ aaa.dddz.AClass local;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectLocalVariableType2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectLocalVariableType2.js
new file mode 100644
index 0000000..a1e653a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectLocalVariableType2.js
@@ -0,0 +1,5 @@
+public class CorrectLocalVariableType2 {
+ void foo(){
+ aaa.ddd.AClassz local;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectMethod1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectMethod1.js
new file mode 100644
index 0000000..78263a7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectMethod1.js
@@ -0,0 +1,9 @@
+public class CorrectMethod1 {
+ public void bar0(){
+
+ }
+
+ void foo(){
+ bar();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectMethod2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectMethod2.js
new file mode 100644
index 0000000..8049033
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectMethod2.js
@@ -0,0 +1,10 @@
+public class CorrectMethod2 {
+ public void bar0(){
+
+ }
+
+ void foo(){
+ CorrectMethod2 cm = new CorrectMethod2();
+ cm.bar();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectReturnType1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectReturnType1.js
new file mode 100644
index 0000000..012b4a8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectReturnType1.js
@@ -0,0 +1,5 @@
+public class CorrectReturnType1 {
+ public aaa.dddz.AClass foo(){
+ return new aaa.ddd.AClass();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectReturnType2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectReturnType2.js
new file mode 100644
index 0000000..3ddc8fe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectReturnType2.js
@@ -0,0 +1,5 @@
+public class CorrectReturnType2 {
+ public aaa.ddd.AClassz foo(){
+ return new aaa.ddd.AClass();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectSuperClass1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectSuperClass1.js
new file mode 100644
index 0000000..c218ca1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectSuperClass1.js
@@ -0,0 +1,3 @@
+public class CorrectSuperClass1 extends aaa.dddz.AClass {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectSuperClass2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectSuperClass2.js
new file mode 100644
index 0000000..9cfc324
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectSuperClass2.js
@@ -0,0 +1,3 @@
+public class CorrectSuperClass2 extends aaa.ddd.AClassz {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectSuperInterface1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectSuperInterface1.js
new file mode 100644
index 0000000..bcc2ecf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectSuperInterface1.js
@@ -0,0 +1,3 @@
+public class CorrectSuperInterface1 implements aaa.bbb.cccz.AListener {
+ public void foo(){}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectSuperInterface2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectSuperInterface2.js
new file mode 100644
index 0000000..b88ab30
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectSuperInterface2.js
@@ -0,0 +1,3 @@
+public class CorrectSuperInterface2 implements aaa.bbb.ccc.AListenerz {
+ public void foo(){}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/core/compiler/package.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/core/compiler/package.html
new file mode 100644
index 0000000..b039ea2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/core/compiler/package.html
@@ -0,0 +1,17 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="Author" content="IBM">
+ <meta name="GENERATOR" content="Mozilla/4.73 [en] (Windows NT 5.0; U) [Netscape]">
+ <title>Package-level Javadoc</title>
+</head>
+<body>
+This package contains compiler associated infrastructure APIs.
+<h2>
+Package Specification</h2>
+
+<p><br>This package contains some compiler tooling APIs, allowing to perform operations at a lower-level
+than using the JavaModel.
+</body>
+</html>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser1.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser1.rsc
new file mode 100644
index 0000000..8271e20
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser1.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser10.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser10.rsc
new file mode 100644
index 0000000..fcc0acd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser10.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser11.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser11.rsc
new file mode 100644
index 0000000..4f26c0a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser11.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser12.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser12.rsc
new file mode 100644
index 0000000..6038286
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser12.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser13.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser13.rsc
new file mode 100644
index 0000000..430fb0d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser13.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser14.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser14.rsc
new file mode 100644
index 0000000..d85614f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser14.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser15.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser15.rsc
new file mode 100644
index 0000000..f65f970
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser15.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser16.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser16.rsc
new file mode 100644
index 0000000..8be2e6f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser16.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser17.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser17.rsc
new file mode 100644
index 0000000..d99247e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser17.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser18.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser18.rsc
new file mode 100644
index 0000000..cfaebfe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser18.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser19.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser19.rsc
new file mode 100644
index 0000000..3e90944
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser19.rsc
@@ -0,0 +1,2 @@
+ffFFFBBhAAA!BFeAdAI
+KK!BBB gJJH!G!!!! \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser2.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser2.rsc
new file mode 100644
index 0000000..35fe970
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser2.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser20.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser20.rsc
new file mode 100644
index 0000000..8d4a2fb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser20.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser21.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser21.rsc
new file mode 100644
index 0000000..3bddccf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser21.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser3.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser3.rsc
new file mode 100644
index 0000000..a42e8f5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser3.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser4.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser4.rsc
new file mode 100644
index 0000000..5a84572
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser4.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser5.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser5.rsc
new file mode 100644
index 0000000..445bfcd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser5.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser6.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser6.rsc
new file mode 100644
index 0000000..191c809
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser6.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser7.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser7.rsc
new file mode 100644
index 0000000..1c66e3b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser7.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser8.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser8.rsc
new file mode 100644
index 0000000..12470cd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser8.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser9.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser9.rsc
new file mode 100644
index 0000000..41dc251
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser9.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/readableNames.properties b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/readableNames.properties
new file mode 100644
index 0000000..c2a8bb8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/readableNames.properties
@@ -0,0 +1,296 @@
+,opt=,
+AbstractMethodDeclaration=AbstractMethodDeclaration
+AdditionalBound1=AdditionalBound1
+AdditionalBound=AdditionalBound
+AdditionalBoundList1=AdditionalBoundList1
+AdditionalBoundList=AdditionalBoundList
+AdditiveExpression=Expression
+AdditiveExpression_NotName=Expression
+AllocationHeader=AllocationHeader
+AndExpression=Expression
+AndExpression_NotName=Expression
+Annotation=Annotation
+AnnotationTypeBody=AnnotationTypeBody
+AnnotationTypeDeclaration=AnnotationTypeDeclaration
+AnnotationTypeDeclarationHeader=AnnotationTypeDeclarationHeader
+AnnotationTypeMemberDeclaration=AnnotationTypeMemberDeclaration
+AnnotationTypeMemberDeclarationHeader=AnnotationTypeMemberDeclarationHeader
+AnnotationTypeMemberDeclarations=AnnotationTypeMemberDeclarations
+AnnotationTypeMemberDeclarationsopt=AnnotationTypeMemberDeclarationsopt
+AnnotationTypeMemberHeaderExtendedDims=AnnotationTypeMemberHeaderExtendedDims
+ArgumentList=ArgumentList
+ArgumentListopt=ArgumentList
+Arguments=Arguments
+Argumentsopt=Argumentsopt
+ArrayAccess=ArrayAccess
+ArrayCreationHeader=ArrayCreationHeader
+ArrayCreationWithArrayInitializer=ArrayCreationWithArrayInitializer
+ArrayCreationWithoutArrayInitializer=ArrayCreationWithoutArrayInitializer
+ArrayInitializer=ArrayInitializer
+ArrayType=ArrayType
+ArrayTypeWithTypeArgumentsName=ArrayTypeWithTypeArgumentsName
+AssertStatement=AssertStatement
+Assignment=Assignment
+AssignmentExpression=Expression
+AssignmentExpression_NotName=Expression
+AssignmentOperator=AssignmentOperator
+Block=Block
+BlockStatement=BlockStatement
+BlockStatements=BlockStatements
+BlockStatementsopt=BlockStatements
+BooleanLiteral=BooleanLiteral
+BreakStatement=BreakStatement
+CastExpression=CastExpression
+CatchClause=CatchClause
+CatchHeader=CatchHeader
+Catches=Catches
+Catchesopt=Catches
+ClassBody=ClassBody
+ClassBodyDeclaration=ClassBodyDeclaration
+ClassBodyDeclarations=ClassBodyDeclarations
+ClassBodyDeclarationsopt=ClassBodyDeclarations
+ClassBodySimpleNameopt=ClassBody
+ClassBodyopt=ClassBody
+ClassDeclaration=ClassDeclaration
+ClassHeader=ClassHeader
+ClassHeaderExtends=ClassHeaderExtends
+ClassHeaderExtendsopt=ClassHeaderExtends
+ClassHeaderImplements=ClassHeaderImplements
+ClassHeaderImplementsopt=ClassHeaderImplements
+ClassHeaderName1=ClassHeaderName
+ClassHeaderName=ClassHeaderName
+ClassInstanceCreationExpression=ClassInstanceCreationExpression
+ClassInstanceCreationExpressionName=ClassInstanceCreationExpressionName
+ClassMemberDeclaration=ClassMemberDeclaration
+ClassOrInterface=Type
+ClassOrInterfaceType=Type
+ClassType=ClassType
+ClassTypeElt=ClassType
+ClassTypeList=ClassTypeList
+CompilationUnit=CompilationUnit
+ConditionalAndExpression=Expression
+ConditionalAndExpression_NotName=Expression
+ConditionalExpression=Expression
+ConditionalExpression_NotName=Expression
+ConditionalOrExpression=Expression
+ConditionalOrExpression_NotName=Expression
+ConstantDeclaration=ConstantDeclaration
+ConstantExpression=ConstantExpression
+ConstructorDeclaration=ConstructorDeclaration
+ConstructorHeader=ConstructorDeclaration
+ConstructorHeaderName=ConstructorHeaderName
+ContinueStatement=ContinueStatement
+DefaultValue=DefaultValue
+DefaultValueopt=DefaultValueopt
+Diet=Diet
+DimWithOrWithOutExpr=Dimension
+DimWithOrWithOutExprs=Dimensions
+Dims=Dimensions
+DimsLoop=Dimensions
+Dimsopt=Dimensions
+DoStatement=DoStatement
+EmptyStatement=EmptyStatement
+EnhancedForStatement=EnhancedForStatement
+EnhancedForStatementHeader=EnhancedForStatementHeader
+EnhancedForStatementNoShortIf=EnhancedForStatementNoShortIf
+EnterAnonymousClassBody=EnterAnonymousClassBody
+EnterAnonymousClassBodySimpleName=EnterAnonymousClassBodySimpleName
+EnterCompilationUnit=EnterCompilationUnit
+EnterVariable=EnterVariable
+EnumBody=EnumBody
+EnumBodyDeclarationsopt=EnumBodyDeclarationsopt
+EnumConstant=EnumConstant
+EnumConstantHeader=EnumConstantHeader
+EnumConstants=EnumConstants
+EnumDeclaration=EnumDeclaration
+EnumDeclarations=EnumDeclarations
+EnumHeader=EnumHeader
+EqualityExpression=Expression
+EqualityExpression_NotName=Expression
+ExclusiveOrExpression=Expression
+ExclusiveOrExpression_NotName=Expression
+ExitTryBlock=ExitTryBlock
+ExitVariableWithInitialization=ExitVariableWithInitialization
+ExitVariableWithoutInitialization=ExitVariableWithoutInitialization
+ExplicitConstructorInvocation=ExplicitConstructorInvocation
+Expression=Expression
+ExpressionStatement=Statement
+Expression_NotName=Expression
+Expressionopt=Expression
+FieldAccess=FieldAccess
+FieldDeclaration=FieldDeclaration
+Finally=Finally
+FloatingPointType=FloatingPointType
+ForInit=ForInit
+ForInitopt=ForInit
+ForStatement=ForStatement
+ForStatementNoShortIf=ForStatement
+ForUpdate=ForUpdate
+ForUpdateopt=ForUpdate
+ForceNoDiet=ForceNoDiet
+FormalParameter=FormalParameter
+FormalParameterList=FormalParameterList
+FormalParameterListopt=FormalParameterList
+GenericMethodDeclaration=GenericMethodDeclaration
+Goal=Goal
+Header=Header
+IfThenElseStatement=IfStatement
+IfThenElseStatementNoShortIf=IfStatement
+IfThenStatement=IfStatement
+ImportDeclaration=ImportDeclaration
+ImportDeclarations=ImportDeclarations
+InclusiveOrExpression=Expression
+InclusiveOrExpression_NotName=Expression
+Initializer=Initializer
+InsideCastExpression=InsideCastExpression
+InsideCastExpressionLL1=InsideCastExpression
+InsideCastExpressionWithQualifiedGenerics=InsideCastExpression
+InstanceofExpression=Expression
+InstanceofExpression_NotName=Expression
+IntegralType=IntegralType
+InterfaceBody=InterfaceBody
+InterfaceDeclaration=InterfaceDeclaration
+InterfaceHeader=InterfaceHeader
+InterfaceHeaderExtends=InterfaceHeaderExtends
+InterfaceHeaderExtendsopt=InterfaceHeaderExtends
+InterfaceHeaderName1=InterfaceHeaderName
+InterfaceHeaderName=InterfaceHeaderName
+InterfaceMemberDeclaration=InterfaceMemberDeclaration
+InterfaceMemberDeclarations=InterfaceMemberDeclarations
+InterfaceMemberDeclarationsopt=InterfaceMemberDeclarations
+InterfaceType=InterfaceType
+InterfaceTypeList=InterfaceTypeList
+InternalCompilationUnit=CompilationUnit
+InvalidArrayInitializerAssignement=ArrayInitializerAssignement
+InvalidConstructorDeclaration=InvalidConstructorDeclaration
+InvalidInterfaceDeclaration=InvalidInterfaceDeclaration
+InvalidMethodDeclaration=InvalidMethodDeclaration
+LabeledStatement=LabeledStatement
+LabeledStatementNoShortIf=LabeledStatement
+Literal=Literal
+LocalVariableDeclaration=LocalVariableDeclaration
+LocalVariableDeclarationStatement=LocalVariableDeclarationStatement
+MarkerAnnotation=MarkerAnnotation
+MemberValue=MemberValue
+MemberValueArrayInitializer=MemberValueArrayInitializer
+MemberValuePair=MemberValuePair
+MemberValuePairs=MemberValuePairs
+MemberValuePairsopt=MemberValuePairsopt
+MemberValues=MemberValues
+MethodBody=MethodBody
+MethodDeclaration=MethodDeclaration
+MethodHeader=MethodDeclaration
+MethodHeaderExtendedDims=MethodHeaderExtendedDims
+MethodHeaderName=MethodHeaderName
+MethodHeaderRightParen=)
+MethodHeaderThrowsClause=MethodHeaderThrowsClause
+MethodHeaderThrowsClauseopt=MethodHeaderThrowsClause
+MethodInvocation=MethodInvocation
+Modifier=Modifier
+Modifiers=Modifiers
+Modifiersopt=Modifiers
+MultiplicativeExpression=Expression
+MultiplicativeExpression_NotName=Expression
+Name=Name
+NestedMethod=NestedMethod
+NestedType=NestedType
+NormalAnnotation=NormalAnnotation
+NumericType=NumericType
+OneDimLoop=Dimension
+OnlySynchronized=OnlySynchronized
+OnlyTypeArguments=TypeArguments
+OnlyTypeArgumentsForCastExpression=TypeArguments
+OpenBlock=OpenBlock
+PackageDeclaration=PackageDeclaration
+PackageDeclarationName=PackageDeclarationName
+PostDecrementExpression=PostDecrementExpression
+PostIncrementExpression=PostIncrementExpression
+PostfixExpression=Expression
+PostfixExpression_NotName=Expression
+PreDecrementExpression=PreDecrementExpression
+PreIncrementExpression=PreIncrementExpression
+Primary=Expression
+PrimaryNoNewArray=Expression
+PrimitiveType=PrimitiveType
+PushLPAREN=(
+PushLeftBrace=PushLeftBrace
+PushModifiers=PushModifiers
+PushPosition=PushPosition
+PushRPAREN=)
+PushRealModifiers=PushModifiers
+QualifiedName=QualifiedName
+ReduceImports=ReduceImports
+ReferenceType1=ReferenceType1
+ReferenceType2=ReferenceType2
+ReferenceType3=ReferenceType3
+ReferenceType=ReferenceType
+RelationalExpression=Expression
+RelationalExpression_NotName=Expression
+RestoreDiet=RestoreDiet
+ReturnStatement=ReturnStatement
+ShiftExpression=Expression
+ShiftExpression_NotName=Expression
+SimpleName=SimpleName
+SingleMemberAnnotation=SingleMemberAnnotation
+SingleStaticImportDeclaration=SingleStaticImportDeclaration
+SingleStaticImportDeclarationName=SingleStaticImportDeclarationName
+SingleTypeImportDeclaration=SingleTypeImportDeclaration
+SingleTypeImportDeclarationName=SingleTypeImportDeclarationName
+Statement=Statement
+StatementExpression=Expression
+StatementExpressionList=StatementExpressionList
+StatementNoShortIf=Statement
+StatementWithoutTrailingSubstatement=Statement
+StaticImportOnDemandDeclaration=StaticImportOnDemandDeclaration
+StaticImportOnDemandDeclarationName=StaticImportOnDemandDeclarationName
+StaticInitializer=StaticInitializer
+StaticOnly=StaticOnly
+SwitchBlock=SwitchBlock
+SwitchBlockStatement=SwitchBlockStatement
+SwitchBlockStatements=SwitchBlockStatements
+SwitchLabel=SwitchLabel
+SwitchLabels=SwitchLabels
+SwitchStatement=SwitchStatement
+SynchronizedStatement=SynchronizedStatement
+ThrowStatement=ThrowStatement
+TryBlock=Block
+TryStatement=TryStatement
+Type=Type
+TypeArgument1=TypeArgument1
+TypeArgument2=TypeArgument2
+TypeArgument3=TypeArgument3
+TypeArgument=TypeArgument
+TypeArgumentList1=TypeArgumentList1
+TypeArgumentList2=TypeArgumentList2
+TypeArgumentList3=TypeArgumentList3
+TypeArgumentList=TypeArgumentList
+TypeArguments=TypeArguments
+TypeDeclaration=TypeDeclaration
+TypeDeclarations=TypeDeclarations
+TypeImportOnDemandDeclaration=TypeImportOnDemandDeclaration
+TypeImportOnDemandDeclarationName=TypeImportOnDemandDeclarationName
+TypeParameter1=TypeParameter1
+TypeParameter=TypeParameter
+TypeParameterHeader=TypeParameter
+TypeParameterList1=TypeParameterList1
+TypeParameterList=TypeParameterList
+TypeParameters=TypeParameters
+UnaryExpression=Expression
+UnaryExpressionNotPlusMinus=Expression
+UnaryExpressionNotPlusMinus_NotName=Expression
+UnaryExpression_NotName=Expression
+VariableDeclarator=VariableDeclarator
+VariableDeclaratorId=VariableDeclaratorId
+VariableDeclarators=VariableDeclarators
+VariableInitializer=VariableInitializer
+VariableInitializers=VariableInitializers
+WhileStatement=WhileStatement
+WhileStatementNoShortIf=WhileStatement
+Wildcard1=Wildcard1
+Wildcard2=Wildcard2
+Wildcard3=Wildcard3
+Wildcard=Wildcard
+WildcardBounds1=WildcardBounds1
+WildcardBounds2=WildcardBounds2
+WildcardBounds3=WildcardBound3
+WildcardBounds=WildcardBounds
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/problem/messages.properties b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/problem/messages.properties
new file mode 100644
index 0000000..911bd6b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/problem/messages.properties
@@ -0,0 +1,465 @@
+###############################################################################
+# Copyright (c) 2000, 2004 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Common Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/cpl-v10.html
+#
+# Contributors:
+# IBM Corporation - initial API and implementation
+###############################################################################
+0 = {0}
+1 = super cannot be used in java.lang.Object
+2 = {0} cannot be resolved to a type
+3 = The type {0} is not visible
+4 = The type {0} is ambiguous
+5 = The type {0} is deprecated
+6 = The nested type {0} cannot be referenced using its binary name
+7 = The private type {0} is never used locally
+
+15 = Incompatible operand types {0} and {1}
+16 = Incompatible conditional operand types {0} and {1}
+17 = Type mismatch: cannot convert from {0} to {1}
+18 = The static member type {0}.{1} should be accessed directly
+
+20 = No enclosing instance of type {0} is accessible to invoke the super constructor. Must define a constructor and explicitly qualify its super constructor invocation with an instance of {0} (e.g. x.super() where x is an instance of {0}).
+21 = No enclosing instance of type {0} is accessible. Must qualify the allocation with an enclosing instance of type {0} (e.g. x.new A() where x is an instance of {0}).
+22 = No enclosing instance of the type {0} is accessible in scope
+23 = Illegal enclosing instance specification for type {0}
+24 = Cannot define static initializer in inner type {0}
+25 = Cannot refer to a non-final variable {0} inside an inner class defined in a different method
+26 = The member interface {0} can only be defined inside a top-level class or interface
+27 = Cannot use an expression of the type {0} as a valid enclosing instance
+28 = No enclosing instance of type {0} is available due to some intermediate constructor invocation
+29 = An anonymous class cannot subclass the final class {0}
+
+50 = {0} cannot be resolved
+51 = The local variable {0} may not have been initialized
+52 = void is an invalid type for the variable {0}
+53 = An array of void is an invalid type for the variable {0}
+54 = An array of void is an invalid type
+55 = Duplicate local variable {0}
+56 = Duplicate parameter {0}
+57 = The final local variable {0} may already have been assigned
+58 = The final local variable {0} cannot be assigned. It must be blank and not using a compound assignment
+
+60 = The final local variable {0} cannot be assigned, since it is defined in an enclosing type
+61 = The local variable {0} is never read
+62 = The parameter {0} is never read
+63 = The code of method {0}({1}) is exceeding the 65535 bytes limit
+64 = The code for the static initializer is exceeding the 65535 bytes limit
+65 = Too many parameters, parameter {0} is exceeding the limit of 255 words eligible for method parameters
+66 = Too many local variables, local variable {0} is exceeding the limit of 65535 words eligible for method local variables
+67 = Too many synthetic parameters, emulated parameter {0} is exceeding the limit of 255 words eligible for method parameters
+68 = Too many array dimensions. Maximum is 255
+69 = The code of constructor {0}({1}) is exceeding the 65535 bytes limit
+70 = {0} cannot be resolved or is not a field
+71 = The field {0} is not visible
+72 = The field {0} is ambiguous
+73 = The field {0}.{1} is deprecated
+74 = Cannot make a static reference to the non-static field {0}
+75 = Cannot reference a field before it is defined
+76 = The static field {0}.{1} should be accessed in a static way
+77 = The private field {0}.{1} is never read locally
+78 = The static field {0}.{1} should be accessed directly
+79 = Unqualified access to the field {0}.{1}
+80 = The final field {0}.{1} cannot be assigned. It must be blank in this context, not qualified and not in compound assignment
+81 = The blank final field {0} may not have been initialized
+82 = The final field {0} may already have been assigned
+
+90 = The local variable {0} is hiding another local variable defined in an enclosing type scope
+91 = The local variable {0} is hiding a field from type {1}
+92 = The field {0}.{1} is hiding another local variable defined in an enclosing type scope
+93 = The field {0}.{1} is hiding a field from type {2}
+94 = The parameter {0} is hiding another local variable defined in an enclosing type scope
+95 = The parameter {0} is hiding a field from type {1}
+96 = The serializable class {0} does not declare a static final serialVersionUID field of type long
+
+100 = The method {1}({2}) is undefined for the type {0}
+101 = The method {1}({2}) from the type {0} is not visible
+102 = The method {1}({2}) is ambiguous for the type {0}
+103 = The method {1}({2}) from the type {0} is deprecated
+104 = Cannot directly invoke the abstract method {1}({2}) for the type {0}
+105 = Void methods cannot return a value
+106 = Cannot return a void result
+107 = This method requires a body instead of a semicolon
+108 = This method must return a result of type {0}
+
+110 = This method has a constructor name
+111 = Return type for the method is missing
+112 = Native methods do not specify a body
+113 = Abstract methods do not specify a body
+114 = Cannot invoke {1}({2}) on the primitive type {0}
+115 = The method {1}({2}) in the type {0} is not applicable for the arguments ({3})
+116 = Cannot invoke {1}({2}) on the array type {0}
+117 = The static method {1}({2}) from the type {0} should be accessed in a static way
+118 = The private method {1}({2}) from the type {0} is never used locally
+119 = The static method {1}({2}) from the type {0} should be accessed directly
+
+130 = The constructor {0}({1}) is undefined
+131 = The constructor {0}({1}) is not visible
+132 = The constructor {0}({1}) is ambiguous
+133 = The constructor {0}({1}) is deprecated
+134 = The private constructor {0}({1}) is never used locally
+135 = Cannot refer to an instance field {0} while explicitly invoking a constructor
+136 = Cannot refer to an instance method while explicitly invoking a constructor
+137 = Recursive constructor invocation {0}({1})
+138 = Cannot refer to ''this'' nor ''super'' while explicitly invoking a constructor
+139 = Constructor call must be the first statement in a constructor
+140 = Implicit super constructor {0}({1}) is undefined for default constructor. Must define an explicit constructor
+141 = Implicit super constructor {0}({1}) is not visible for default constructor. Must define an explicit constructor
+142 = Implicit super constructor {0}({1}) is ambiguous for default constructor. Must define an explicit constructor
+143 = Implicit super constructor {0}({1}) is undefined. Must explicitly invoke another constructor
+144 = Implicit super constructor {0}({1}) is not visible. Must explicitly invoke another constructor
+145 = Implicit super constructor {0}({1}) is ambiguous. Must explicitly invoke another constructor
+146 = Default constructor cannot handle exception type {0} thrown by implicit super constructor. Must define an explicit constructor
+147 = Unhandled exception type {0} thrown by implicit super constructor
+
+150 = The type of the expression must be an array type but it resolved to {0}
+151 = Must explicitly convert the char[] to a String
+152 = String constant is exceeding the limit of 65535 bytes of UTF8 encoding
+153 = case expressions must be constant expressions
+154 = The literal {1} of type {0} is out of range
+156 = Cannot cast from {0} to {1}
+157 = Cannot instantiate the type {0}, since it is not a concrete class
+158 = Cannot define dimension expressions when an array initializer is provided
+159 = Variable must provide either dimension expressions or an array initializer
+160 = The operator {0} is undefined for the argument type(s) {1}
+161 = Unreachable code
+162 = Cannot return from within an initializer
+163 = Initializer does not complete normally
+164 = Expression must return a value
+165 = Unreachable catch block for {0}. Only more specific exceptions are thrown and handled by previous catch block(s).
+166 = The default case is already defined
+167 = Unreachable catch block for {0}. This exception is never thrown from the try statement body
+168 = Unhandled exception type {0}
+169 = case constant must be a char, byte, short, or int instead of {0}
+170 = Duplicate case
+171 = Duplicate label {0}
+172 = break cannot be used outside of a loop or a switch
+173 = continue cannot be used outside of a loop
+174 = The label {0} is missing
+175 = {0} is not a valid type''s argument for the synchronized statement
+176 = null is not a valid argument for the synchronized statement
+177 = Cannot throw null
+178 = The assignment to variable {0} has no effect
+179 = Possible accidental assignment in place of a comparison. A condition expression should not be reduced to an assignment
+180 = Unnecessary semicolon
+181 = Unnecessary cast to type {1} for expression of type {0}
+182 = Unnecessary cast to type {1} for expression of type {0}. It is already compatible with the argument type {2}
+183 = The expression of type {0} is already an instance of type {1}
+184 = finally block does not complete normally
+185 = The declared exception {3} is not actually thrown by the method {1}({2}) from type {0}
+186 = The declared exception {2} is not actually thrown by the constructor {0}({1})
+187 = Unreachable catch block for {0}. It is already handled by the catch block for {1}
+188 = Empty control-flow statement
+189 = Statement unnecessarily nested within else clause. The corresponding then clause does not complete normally
+
+190 = Read access to enclosing field {0}.{1} is emulated by a synthetic accessor method. Increasing its visibility will improve your performance
+191 = Write access to enclosing field {0}.{1} is emulated by a synthetic accessor method. Increasing its visibility will improve your performance
+192 = Access to enclosing method {1}({2}) from the type {0} is emulated by a synthetic accessor method. Increasing its visibility will improve your performance
+193 = Access to enclosing constructor {0}({1}) is emulated by a synthetic accessor method. Increasing its visibility will improve your performance
+195 = The method {1} is defined in an inherited type and an enclosing scope
+196 = The field {0} is defined in an inherited type and an enclosing scope
+197 = The type {0} is defined in an inherited type and an enclosing scope
+198 = Cannot allocate the member type {0} using its compound name when qualified by an enclosing instance. The member type name is resolved relatively to the qualifying instance type
+
+200 = Cannot use {0} in a static context
+201 = Cannot make a static reference to the non-static method {1}({2}) from the type {0}
+202 = Cannot specify an array dimension after an empty dimension
+203 = Invalid cast type expression
+204 = Syntax error on token "{0}", {1} expected
+205 = Syntax error on token "{0}", no accurate correction available
+206 = Invalid argument to operation ++/--
+207 = Interfaces cannot have constructors
+208 = Array constants can only be used in initializers
+209 = Syntax error on keyword "{0}"; {1} expected
+210 = Syntax error on keyword "{0}", no accurate correction available
+
+220 = Unmatched bracket
+221 = The primitive type {0} of {1} does not have a field {2}
+222 = Invalid expression as statement
+223 = The left-hand side of an assignment must be a variable
+224 = Missing semicolon
+225 = Invalid parenthesized expression
+
+230 = Syntax error on token "{0}", {1} expected before this token
+231 = Syntax error on token "{0}", {1} expected after this token
+232 = Syntax error on token "{0}", delete this token
+233 = Syntax error on tokens, delete these tokens
+234 = Syntax error on tokens, they can be merge to form {0}
+235 = Syntax error on token "{0}", invalid {1}
+236 = Syntax error on token(s), misplaced construct(s)
+237 = Syntax error on tokens, {0} expected instead
+238 = Syntax error on tokens, no accurate correction available
+239 = Syntax error, unexpected {0}
+240 = Syntax error, insert "{0}" to complete {1}
+241 = Syntax error, insert "{0}" to complete scope
+242 = Syntax error, insert "{0}" to complete phrase
+
+250 = Unexpected end of file
+251 = Invalid hex literal number
+252 = Invalid octal literal number
+253 = Invalid character constant
+254 = Invalid escape sequence (valid ones are \\b \\t \\n \\f \\r \\" \\'' \\\\ )
+255 = Invalid input
+256 = Invalid unicode
+257 = Invalid float literal number
+258 = Null source string
+259 = String literal is not properly closed by a double-quote
+260 = Unexpected end of comment
+261 = Non-externalized string literal; it should be followed by //$NON-NLS-<n>$
+262 = Invalid digit (valid ones are 0..9)
+
+300 = The interface {0} cannot define an initializer
+301 = Duplicate modifier for the type {0}
+302 = Illegal modifier for the class {0}; only public, abstract & final are permitted
+303 = Illegal modifier for the interface {0}; only public & abstract are permitted
+304 = Illegal modifier for the member class {0}; only public, protected, private, static, abstract & final are permitted
+305 = Illegal modifier for the member interface {0}; only public, protected, private, static & abstract are permitted
+306 = Illegal modifier for the local class {0}; only one of abstract or final is permitted
+307 = Access to the type {0} is restricted as specified by {1}
+308 = The class {0} can be either abstract or final, not both
+309 = The interface member type {0} can only be public
+310 = The member type {0} can only set one of public / protected / private
+311 = The member type {0} cannot be declared static; static types can only be declared in static or top level types
+312 = The interface {0} cannot be the superclass of {1}; a superclass must be a class
+313 = The type {1} cannot subclass the final class {0}
+314 = Duplicate interface {0} for the type {1}
+315 = The class {0} cannot be a superinterface of {1}; a superinterface must be an interface
+316 = Cycle detected: the type {0} cannot extend/implement itself or one of its own member types
+317 = A cycle exists in the type hierarchy between {0} and {1}
+318 = Nested type {0} hides an enclosing type
+319 = Duplicate nested type {0}
+320 = Cannot throw the type {0}
+321 = The package {0} collides with a type
+322 = The type {1} collides with a package
+323 = The type {1} is already defined
+324 = The type {0} cannot be resolved. It is indirectly referenced from required .class files
+325 = The public type {1} must be defined in its own file
+326 = A package must be specified in {0} or a default package created
+327 = The hierarchy of the type {0} is inconsistent
+328 = The declared package does not match the expected package {0}
+329 = The type java.lang.Object cannot have a superclass or superinterfaces
+
+###[obsolete] 330 = {0} cannot be resolved or is not a valid superclass
+###[obsolete] 331 = Superclass {0} is not visible
+###[obsolete] 332 = Superclass {0} is ambiguous
+###[obsolete] 333 = Superclass {0} cannot be referenced using its binary name
+###[obsolete] 334 = Superclass {0} is defined in an inherited type and an enclosing scope
+###[obsolete] 335 = {0} cannot be resolved or is not a valid superinterface
+###[obsolete] 336 = Superinterface {0} is not visible
+###[obsolete] 337 = Superinterface {0} is ambiguous
+###[obsolete] 338 = Superinterface {0} cannot be referenced using its binary name
+###[obsolete] 339 = Superinterface {0} is defined in an inherited type and an enclosing scope
+
+340 = Duplicate field {0}.{1}
+341 = Duplicate modifier for the field {0}
+342 = Illegal modifier for the field {0}; only public, protected, private, static, final, transient & volatile are permitted
+343 = Illegal modifier for the interface field {0}; only public, static & final are permitted
+344 = The field {0} can only set one of public / protected / private
+345 = The field {0} can be either final or volatile, not both
+346 = The field {0} cannot be declared static; static fields can only be declared in static or top level types
+
+###[obsolete] 350 = {2} cannot be resolved (or is not a valid type) for the field {1}.{0}
+###[obsolete] 351 = The type {2} is not visible for the field {1}.{0}
+###[obsolete] 352 = The type {2} is ambiguous for the field {1}.{0}
+###[obsolete] 353 = The field type {2} cannot be referenced using its binary name
+###[obsolete] 354 = The field type {2} is defined in an inherited type and an enclosing scope
+
+355 = Duplicate method {0}({2}) in type {1}
+356 = Illegal modifier for parameter {0}; only final is permitted
+357 = Duplicate modifier for the method {1} in type {0}
+358 = Illegal modifier for the method {1} in type {0}
+359 = Illegal modifier for the interface method {1} in type {0}; only public & abstract are permitted
+360 = The method {1} in type {0} can only set one of public / protected / private
+361 = The method {1} cannot be declared static; static methods can only be declared in a static or top level type
+362 = The abstract method {1} in type {0} can only set a visibility modifier, one of public or protected
+363 = The abstract method {1} in type {0} can only be defined by an abstract class
+364 = void is an invalid type for the parameter {1} of the method {0}
+365 = An array of void is an invalid type for the parameter {1} of the method {0}
+366 = An array of void is an invalid return type for the method {0}
+367 = The native method {1} cannot also be declared strictfp
+368 = Duplicate modifier for parameter {0}
+
+###[obsolete] 370 = {2} cannot be resolved (or is not a valid type) for the parameter {1} of the method {0}
+###[obsolete] 371 = The type {2} is not visible for the parameter {1} of the method {0}
+###[obsolete] 372 = The type {2} is ambiguous for the parameter {1} of the method {0}
+###[obsolete] 373 = The parameter type {2} cannot be referenced using its binary name
+###[obsolete] 374 = The parameter type {2} is defined in an inherited type and an enclosing scope
+###[obsolete] 375 = {1} cannot be resolved (or is not an exception type) for the method {0}
+###[obsolete] 376 = The exception type {1} is not visible for the method {0}
+###[obsolete] 377 = The exception type {1} is ambiguous for the method {0}
+###[obsolete] 378 = The exception type {1} cannot be referenced using its binary name
+###[obsolete] 379 = The exception type {1} is defined in an inherited type and an enclosing scope
+###[obsolete] 380 = {1} cannot be resolved (or is not a valid return type) for the method {0}
+###[obsolete] 381 = The return type {1} is not visible for the method {0}
+###[obsolete] 382 = The return type {1} is ambiguous for the method {0}
+###[obsolete] 383 = The return type {1} cannot be referenced using its binary name
+###[obsolete] 384 = The return type {1} is defined in an inherited type and an enclosing scope
+
+385 = The import {0} conflicts with a type defined in the same file
+386 = The import {0} collides with another imported type
+387 = Only a type can be imported. {0} resolves to a package
+388 = The import {0} is never used
+390 = The import {0} cannot be resolved
+
+###[obsolete] 391 = The imported type {0} is not visible
+###[obsolete] 392 = The imported type {0} is ambiguous
+###[obsolete] 393 = The imported type {0} cannot be referenced using its binary name
+###[obsolete] 394 = The imported type {0} is defined in an inherited type and an enclosing scope
+
+395 = Duplicate modifier for the variable {0}
+396 = Illegal modifier for the variable {0}; only final is permitted
+
+400 = Class must implement the inherited abstract method {0}
+401 = Cannot override the final method from {0}
+402 = Exception {0} is not compatible with throws clause in {1}
+403 = Exception {0} in throws clause of {1} is not compatible with {2}
+404 = The return type is incompatible with {0}
+405 = The inherited method {0} cannot hide the public abstract method in {1}
+406 = This instance method cannot override the static method from {0}
+407 = This static method cannot hide the instance method from {0}
+408 = The static method {0} conflicts with the abstract method in {1}
+409 = Cannot reduce the visibility of the inherited method from {0}
+410 = The method {0} does not override the inherited method from {1} since it is private to a different package.
+411 = This class must implement the inherited abstract method {1}, but cannot override it since it is not visible from {0}. Either make the type abstract or make the inherited method visible.
+412 = The method {0} overrides a deprecated method from {1}
+413 = The return type is incompatible with {0}, thus this interface cannot be implemented
+414 = Exception {0} is not compatible with throws clause in {1}, thus this interface cannot be implemented
+
+420 = Code snippet support cannot find the class {0}
+421 = Code snippet support cannot find the method {0}.{1}({2})
+422 = super cannot be used in the code snippet code
+
+430 = Too many constants, the constant pool for {0} would exceed 65536 entries
+431 = The type generates a string that requires more than 65535 bytes to encode in Utf8 format in the constant pool
+
+432 = Too many fields for type {0}. Maximum is 65535
+433 = Too many methods for type {0}. Maximum is 65535
+
+440 = ''assert'' should not be used as an identifier, since it is a reserved keyword from source level 1.4 on
+441 = ''enum'' should not be used as an identifier, since it is a reserved keyword from source level 1.5 on
+
+450 = {0} {1}
+
+460 = Empty block should be documented
+
+### DOC
+470 = Unexpected tag
+471 = Missing tag for parameter {0}
+472 = Missing parameter name
+473 = Duplicate tag for parameter
+474 = Parameter {0} is not declared
+475 = Missing tag for return type
+476 = Duplicate tag for return type
+477 = Missing tag for declared exception {0}
+478 = Missing class name
+479 = Invalid class name
+480 = Duplicate tag for thrown exception
+481 = Exception {0} is not declared
+482 = Missing reference
+483 = Invalid reference
+484 = Malformed link reference
+485 = Invalid parameters declaration
+486 = Missing comment for {0} declaration
+487 = Invalid tag
+488 = {0} cannot be resolved or is not a field
+489 = The field {0} is not visible
+490 = The field {0} is ambiguous
+491 = The field {0}.{1} is deprecated
+492 = The constructor {0}({1}) is undefined
+493 = The constructor {0}({1}) is not visible
+494 = The constructor {0}({1}) is ambiguous
+495 = The constructor {0}({1}) is deprecated
+496 = The method {1}({2}) is undefined for the type {0}
+497 = The method {1}({2}) from the type {0} is not visible
+498 = The method {1}({2}) is ambiguous for the type {0}
+499 = The method {1}({2}) from the type {0} is deprecated
+500 = Cannot invoke {1}({2}) on the primitive type {0}
+501 = The method {1}({2}) in the type {0} is not applicable for the arguments ({3})
+502 = Cannot invoke {1}({2}) on the array type {0}
+503 = {0} cannot be resolved to a type
+504 = The type {0} is not visible
+505 = The type {0} is ambiguous
+506 = The type {0} is deprecated
+507 = The nested type {0} cannot be referenced using its binary name
+508 = The method {1} is defined in an inherited type and an enclosing scope
+509 = The field {0} is defined in an inherited type and an enclosing scope
+510 = The type {0} is defined in an inherited type and an enclosing scope
+511 = {0} is an ambiguous method reference or is not a field
+512 = Missing closing brace for inline tag
+513 = Missing #: "{0}"
+514 = Malformed reference (missing end space separator)
+515 = Missing return type description
+516 = Only static field reference is allowed for @value tag
+517 = Unexpected text
+519 = Javadoc:
+
+### GENERICS
+520 = Duplicate type parameter {0}
+521 = Cannot refer to the type parameter {0} as a supertype
+522 = Cannot make a static reference to the type parameter {0}
+523 = The type java.lang.Object cannot be declared as a generic
+524 = The type {0} is not generic; it cannot be parameterized with arguments <{1}>
+525 = Incorrect number of arguments for type {0}; it cannot be parameterized with arguments <{1}>
+526 = Bound mismatch: The type {0} is not a valid substitute for the bounded parameter <{2} extends {3}> of the type {1}
+527 = Method {0}({2}) has the same erasure {0}({3}) as another method in type {1}
+528 = Illegal forward reference to type parameter {0}
+529 = The type {0} is not an interface; it cannot be specified as a bounded parameter
+530 = Unsafe type operation: Should not invoke the constructor {0}({1}) of raw type {0}. References to generic type {2} should be parameterized
+531 = Unsafe type operation: Should not invoke the method {0}({1}) of raw type {2}. References to generic type {3} should be parameterized
+532 = Unsafe type operation: Should not convert expression of raw type {0} to type {1}. References to generic type {2} should be parameterized
+533 = Cannot use the type parameter {0} in a catch block
+534 = Cannot use the parameterized type {0} either in catch block or throws clause
+535 = Cannot create a generic array of {0}
+536 = Unsafe type operation: Should not assign expression of type {0} to the field {1} of raw type {2}. References to generic type {3} should be parameterized
+537 = The type parameter {0} should not be bounded by the final type {1}. Final types cannot be further extended
+538 = Inconsistent classfile encountered: The undefined type parameter {0} is referenced from within {1}
+539 = The interface {2} cannot be implemented simultaneously with different arguments: {0} and {1}
+540 = Bound mismatch: The constructor {0}({1}) of type {2} is not applicable for the arguments ({3}). The wildcard parameter {5} has no lower bound, and may actually be more restrictive than argument {4}
+541 = Bound mismatch: The method {0}({1}) of type {2} is not applicable for the arguments ({3}). The wildcard parameter {5} has no lower bound, and may actually be more restrictive than argument {4}
+542 = Bound mismatch: Cannot assign expression of type {0} to wildcard type {1}. The wildcard type has no lower bound, and may actually be more restrictive than expression type
+543 = Bound mismatch: The generic method {0}({1}) of type {2} is not applicable for the arguments ({3}) since the type {4} is not a valid substitute for the bounded parameter <{5} extends {6}>
+544 = Bound mismatch: The generic constructor {0}({1}) of type {2} is not applicable for the arguments ({3}) since the type {4} is not a valid substitute for the bounded parameter <{5} extends {6}>
+545 = Unsafe type operation: The cast from {0} to parameterized type {1} will not check conformance of type arguments at runtime
+546 = Cannot perform instanceof check against parameterized type {0}. Use instead its raw form {1} since generic type information will be erased at runtime
+547 = Cannot perform instanceof check against type parameter {0}. Use instead its erasure {1} since generic type information will be erased at runtime
+548 = The method {0}({1}) of type {2} is not generic; it cannot be parameterized with arguments <{3}>
+549 = Incorrect number of type arguments for generic method <{3}>{0}({1}) of type {2}; it cannot be parameterized with arguments <{4}>
+550 = The parameterized method <{3}>{0}({1}) of type {2} is not applicable for the arguments ({4})
+551 = The constructor {0}({1}) of type {2} is not generic; it cannot be parameterized with arguments <{3}>
+552 = Incorrect number of type arguments for generic constructor <{3}>{0}({1}) of type {2}; it cannot be parameterized with arguments <{4}>
+553 = The parameterized constructor <{3}>{0}({1}) of type {2} is not applicable for the arguments ({4})
+554 = The method {0}({1}) of raw type {2} is no more generic; it cannot be parameterized with arguments <{3}>
+555 = The constructor {0}({1}) of raw type {2} is no more generic; it cannot be parameterized with arguments <{3}>
+556 = The type {1} cannot extend or implement {0}. A supertype may not specify any wildcard
+557 = The generic class {0} may not subclass java.lang.Throwable
+558 = Illegal class literal for the type parameter {0}
+559 = Unsafe type operation: The return type {0} of the method {1}({2}) of type {3} needs unchecked conversion to conform to the return type {4} of inherited method
+560 = Name clash : The method {0}({1}) of type {2} has the same erasure as {0}({3}) of type {4} but does not override it
+561 = The member type {0}<{1}> must be qualified with a parameterized type, since it is not static
+562 = The member type {0} must be parameterized, since it is qualified with a parameterized type
+563 = The member type {0} cannot be qualified with a parameterized type, since it is static. Remove arguments from qualifying type {1}
+
+### FOREACH
+580 = Type mismatch: cannot convert from element type {0} to {1}
+581 = Can only iterate over an array or an instance of java.lang.Iterable
+
+### SOURCE LEVEL
+590 = Syntax error, type parameters are only available if source level is 1.5
+591 = Syntax error, static imports are only available if source level is 1.5
+592 = Syntax error, ''for each'' statements are only available if source level is 1.5
+593 = Syntax error, parameterized types are only available if source level is 1.5
+594 = Syntax error, enum declarations are only available if source level is 1.5
+595 = Syntax error, varargs are only available if source level is 1.5
+596 = Syntax error, annotations are only available if source level is 1.5
+597 = Syntax error, annotation declarations are only available if source level is 1.5
+
+### ANNOTATIONS
+600 = This annotation type member declaration has a constructor name
+601 = Extended dimensions are illegal in an annotation type member declaration
+602 = Package annotations must be in file package-info.java
+
+### CORRUPTED BINARIES
+700 = The class file {0} contains a signature ''{1}'' ill-formed at position {2}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/util/messages.properties b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/util/messages.properties
new file mode 100644
index 0000000..7a53316
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/util/messages.properties
@@ -0,0 +1,66 @@
+###############################################################################
+# Copyright (c) 2000, 2004 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Common Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/cpl-v10.html
+#
+# Contributors:
+# IBM Corporation - initial API and implementation
+###############################################################################
+### Eclipse Java Core Compiler messages.
+
+### compilation
+compilation.unresolvedProblem = Unresolved compilation problem: \n
+compilation.unresolvedProblems = Unresolved compilation problems: \n
+compilation.request = [parsing {2} - #{0}/{1}]
+compilation.loadBinary = [reading {0}.class]
+compilation.process = [analyzing {2} - #{0}/{1}]
+compilation.write = [writing {1} - #{0}]
+compilation.done = [completed {2} - #{0}/{1}]
+compilation.units = [{0} units compiled]
+compilation.unit = [{0} unit compiled]
+compilation.internalError = Internal compiler error
+
+### output
+output.isFile = The outDir is a file : {0}
+output.isFileNotDirectory = The outDir is a file not a directory.
+output.dirName = The output dir name is : {0}
+output.notValidAll = The outDir is not a valid directory name. All the directories cannot be created.
+output.fileName = file name : {0}
+output.notValid = The outDir is not a valid directory name. The directory cannot be created.
+
+### problem
+problem.noSourceInformation = \n!! no source information available !!
+problem.atLine = (at line {0})
+
+### abort
+abort.invalidAttribute = SANITY CHECK: Invalid attribute for local variable {0}
+abort.missingCode = Missing code implementation in the compiler
+abort.againstSourceModel = Cannot compile against source model {0} issued from {1}
+
+### accept
+accept.cannot = Cannot accept the compilation unit:
+
+### parser
+parser.incorrectPath = The path for the javadcl.java file is incorrect
+parser.moveFiles = MOVE FILES IN THE Runtime DIRECTORY OF Parser.class
+parser.syntaxRecovery = SYNTAX RECOVERY
+parser.regularParse = REGULAR PARSE
+parser.missingFile = missing file {0}
+parser.corruptedFile = corrupted file {0}
+parser.endOfFile = end of file
+parser.endOfConstructor = end of constructor
+parser.endOfMethod = end of method
+parser.endOfInitializer = end of initializer
+
+### ast
+ast.missingCode = Missing code gen implementation
+
+### constant
+constant.cannotCastedInto = {0} constant cannot be casted into {1}
+constant.cannotConvertedTo = {0} constant cannot be converted to {1}
+
+### miscellaneous
+error.undefinedTypeVariable = Undefined type variable: {0}
+error.missingBound = The class files for {0} and {1} are out of sync \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/core/compiler/CharOperation.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/core/compiler/CharOperation.js
new file mode 100644
index 0000000..7b6ae22
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/core/compiler/CharOperation.js
@@ -0,0 +1,2747 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.core.compiler;
+
+/**
+ * This class is a collection of helper methods to manipulate char arrays.
+ *
+ * @since 2.1
+ */
+public final class CharOperation {
+
+ /**
+ * Constant for an empty char array
+ */
+ public static final char[] NO_CHAR = new char[0];
+
+ /**
+ * Constant for an empty char array with two dimensions.
+ */
+ public static final char[][] NO_CHAR_CHAR = new char[0][];
+
+ /**
+ * Constant for an empty String array.
+ * @since 3.1
+ */
+ public static final String[] NO_STRINGS = new String[0];
+
+ /**
+ * Answers a new array with appending the suffix character at the end of the array.
+ * <br>
+ * <br>
+ * For example:<br>
+ * <ol>
+ * <li><pre>
+ * array = { 'a', 'b' }
+ * suffix = 'c'
+ * => result = { 'a', 'b' , 'c' }
+ * </pre>
+ * </li>
+ * <li><pre>
+ * array = null
+ * suffix = 'c'
+ * => result = { 'c' }
+ * </pre></li>
+ * </ol>
+ *
+ * @param array the array that is concanated with the suffix character
+ * @param suffix the suffix character
+ * @return the new array
+ */
+ public static final char[] append(char[] array, char suffix) {
+ if (array == null)
+ return new char[] { suffix };
+ int length = array.length;
+ System.arraycopy(array, 0, array = new char[length + 1], 0, length);
+ array[length] = suffix;
+ return array;
+ }
+ /**
+ * Append the given subarray to the target array starting at the given index in the target array.
+ * The start of the subarray is inclusive, the end is exclusive.
+ * Answers a new target array if it needs to grow, otherwise answers the same target array.
+ * <br>
+ * For example:<br>
+ * <ol>
+ * <li><pre>
+ * target = { 'a', 'b', '0' }
+ * index = 2
+ * array = { 'c', 'd' }
+ * start = 0
+ * end = 1
+ * => result = { 'a', 'b' , 'c' }
+ * </pre>
+ * </li>
+ * <li><pre>
+ * target = { 'a', 'b' }
+ * index = 2
+ * array = { 'c', 'd' }
+ * start = 0
+ * end = 1
+ * => result = { 'a', 'b' , 'c', '0', '0' , '0' } (new array)
+ * </pre></li>
+ * <li><pre>
+ * target = { 'a', 'b', 'c' }
+ * index = 1
+ * array = { 'c', 'd', 'e', 'f' }
+ * start = 1
+ * end = 4
+ * => result = { 'a', 'd' , 'e', 'f', '0', '0', '0', '0' } (new array)
+ * </pre></li>
+ * </ol>
+ *
+ * @param target the given target
+ * @param index the given index
+ * @param array the given array
+ * @param start the given start index
+ * @param end the given end index
+ *
+ * @return the new array
+ * @throws NullPointerException if the target array is null
+ */
+ public static final char[] append(char[] target, int index, char[] array, int start, int end) {
+ int targetLength = target.length;
+ int subLength = end-start;
+ int newTargetLength = subLength+index;
+ if (newTargetLength > targetLength) {
+ System.arraycopy(target, 0, target = new char[newTargetLength*2], 0, index);
+ }
+ System.arraycopy(array, start, target, index, subLength);
+ return target;
+ }
+
+ /**
+ * Answers the concatenation of the two arrays. It answers null if the two arrays are null.
+ * If the first array is null, then the second array is returned.
+ * If the second array is null, then the first array is returned.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * first = null
+ * second = null
+ * => result = null
+ * </pre>
+ * </li>
+ * <li><pre>
+ * first = { { ' a' } }
+ * second = null
+ * => result = { { ' a' } }
+ * </pre>
+ * </li>
+ * <li><pre>
+ * first = null
+ * second = { { ' a' } }
+ * => result = { { ' a' } }
+ * </pre>
+ * </li>
+ * <li><pre>
+ * first = { { ' b' } }
+ * second = { { ' a' } }
+ * => result = { { ' b' }, { ' a' } }
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param first the first array to concatenate
+ * @param second the second array to concatenate
+ * @return the concatenation of the two arrays, or null if the two arrays are null.
+ */
+ public static final char[][] arrayConcat(char[][] first, char[][] second) {
+ if (first == null)
+ return second;
+ if (second == null)
+ return first;
+
+ int length1 = first.length;
+ int length2 = second.length;
+ char[][] result = new char[length1 + length2][];
+ System.arraycopy(first, 0, result, 0, length1);
+ System.arraycopy(second, 0, result, length1, length2);
+ return result;
+ }
+ /**
+ * Returns the char arrays as an array of Strings
+ *
+ * @param charArrays the char array to convert
+ * @return the char arrays as an array of Strings or null if the given char arrays is null.
+ * @since 3.0
+ */
+ public static String[] charArrayToStringArray(char[][] charArrays) {
+ if (charArrays == null)
+ return null;
+ int length = charArrays.length;
+ if (length == 0)
+ return NO_STRINGS;
+ String[] strings= new String[length];
+ for (int i= 0; i < length; i++)
+ strings[i]= new String(charArrays[i]);
+ return strings;
+ }
+ /**
+ * Returns the char array as a String
+
+ * @param charArray the char array to convert
+ * @return the char array as a String or null if the given char array is null.
+ * @since 3.0
+ */
+ public static String charToString(char[] charArray) {
+ if (charArray == null) return null;
+ return new String(charArray);
+ }
+
+ /**
+ * Answers a new array adding the second array at the end of first array.
+ * It answers null if the first and second are null.
+ * If the first array is null, then a new array char[][] is created with second.
+ * If the second array is null, then the first array is returned.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * first = null
+ * second = { 'a' }
+ * => result = { { ' a' } }
+ * </pre>
+ * <li><pre>
+ * first = { { ' a' } }
+ * second = null
+ * => result = { { ' a' } }
+ * </pre>
+ * </li>
+ * <li><pre>
+ * first = { { ' a' } }
+ * second = { ' b' }
+ * => result = { { ' a' } , { ' b' } }
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param first the first array to concatenate
+ * @param second the array to add at the end of the first array
+ * @return a new array adding the second array at the end of first array, or null if the two arrays are null.
+ */
+ public static final char[][] arrayConcat(char[][] first, char[] second) {
+ if (second == null)
+ return first;
+ if (first == null)
+ return new char[][] { second };
+
+ int length = first.length;
+ char[][] result = new char[length + 1][];
+ System.arraycopy(first, 0, result, 0, length);
+ result[length] = second;
+ return result;
+ }
+
+ /**
+ * Compares the contents of the two arrays array and prefix. Returns
+ * <ul>
+ * <li>zero if the array starts with the prefix contents</li>
+ * <li>the difference between the first two characters that are not equal </li>
+ * <li>one if array length is lower than the prefix length and that the prefix starts with the
+ * array contents.</li>
+ * </ul>
+ * <p>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * array = null
+ * prefix = null
+ * => result = NullPointerException
+ * </pre>
+ * </li>
+ * <li><pre>
+ * array = { 'a', 'b', 'c', 'd', 'e' }
+ * prefix = { 'a', 'b', 'c'}
+ * => result = 0
+ * </pre>
+ * </li>
+ * <li><pre>
+ * array = { 'a', 'b', 'c', 'd', 'e' }
+ * prefix = { 'a', 'B', 'c'}
+ * => result = 32
+ * </pre>
+ * </li>
+ * <li><pre>
+ * array = { 'd', 'b', 'c', 'd', 'e' }
+ * prefix = { 'a', 'b', 'c'}
+ * => result = 3
+ * </pre>
+ * </li>
+ * <li><pre>
+ * array = { 'a', 'b', 'c', 'd', 'e' }
+ * prefix = { 'd', 'b', 'c'}
+ * => result = -3
+ * </pre>
+ * </li>
+ * <li><pre>
+ * array = { 'a', 'a', 'c', 'd', 'e' }
+ * prefix = { 'a', 'e', 'c'}
+ * => result = -4
+ * </pre>
+ * </li>
+ * </ol>
+ * </p>
+ *
+ * @param array the given array
+ * @param prefix the given prefix
+ * @return the result of the comparison (>=0 if array>prefix)
+ * @throws NullPointerException if either array or prefix is null
+ */
+ public static final int compareWith(char[] array, char[] prefix) {
+ int arrayLength = array.length;
+ int prefixLength = prefix.length;
+ int min = Math.min(arrayLength, prefixLength);
+ int i = 0;
+ while (min-- != 0) {
+ char c1 = array[i];
+ char c2 = prefix[i++];
+ if (c1 != c2)
+ return c1 - c2;
+ }
+ if (prefixLength == i)
+ return 0;
+ return -1; // array is shorter than prefix (e.g. array:'ab' < prefix:'abc').
+ }
+
+ /**
+ * Answers the concatenation of the two arrays. It answers null if the two arrays are null.
+ * If the first array is null, then the second array is returned.
+ * If the second array is null, then the first array is returned.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * first = null
+ * second = { 'a' }
+ * => result = { ' a' }
+ * </pre>
+ * </li>
+ * <li><pre>
+ * first = { ' a' }
+ * second = null
+ * => result = { ' a' }
+ * </pre>
+ * </li>
+ * <li><pre>
+ * first = { ' a' }
+ * second = { ' b' }
+ * => result = { ' a' , ' b' }
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param first the first array to concatenate
+ * @param second the second array to concatenate
+ * @return the concatenation of the two arrays, or null if the two arrays are null.
+ */
+ public static final char[] concat(char[] first, char[] second) {
+ if (first == null)
+ return second;
+ if (second == null)
+ return first;
+
+ int length1 = first.length;
+ int length2 = second.length;
+ char[] result = new char[length1 + length2];
+ System.arraycopy(first, 0, result, 0, length1);
+ System.arraycopy(second, 0, result, length1, length2);
+ return result;
+ }
+
+ /**
+ * Answers the concatenation of the three arrays. It answers null if the three arrays are null.
+ * If first is null, it answers the concatenation of second and third.
+ * If second is null, it answers the concatenation of first and third.
+ * If third is null, it answers the concatenation of first and second.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * first = null
+ * second = { 'a' }
+ * third = { 'b' }
+ * => result = { ' a', 'b' }
+ * </pre>
+ * </li>
+ * <li><pre>
+ * first = { 'a' }
+ * second = null
+ * third = { 'b' }
+ * => result = { ' a', 'b' }
+ * </pre>
+ * </li>
+ * <li><pre>
+ * first = { 'a' }
+ * second = { 'b' }
+ * third = null
+ * => result = { ' a', 'b' }
+ * </pre>
+ * </li>
+ * <li><pre>
+ * first = null
+ * second = null
+ * third = null
+ * => result = null
+ * </pre>
+ * </li>
+ * <li><pre>
+ * first = { 'a' }
+ * second = { 'b' }
+ * third = { 'c' }
+ * => result = { 'a', 'b', 'c' }
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param first the first array to concatenate
+ * @param second the second array to concatenate
+ * @param third the third array to concatenate
+ *
+ * @return the concatenation of the three arrays, or null if the three arrays are null.
+ */
+ public static final char[] concat(
+ char[] first,
+ char[] second,
+ char[] third) {
+ if (first == null)
+ return concat(second, third);
+ if (second == null)
+ return concat(first, third);
+ if (third == null)
+ return concat(first, second);
+
+ int length1 = first.length;
+ int length2 = second.length;
+ int length3 = third.length;
+ char[] result = new char[length1 + length2 + length3];
+ System.arraycopy(first, 0, result, 0, length1);
+ System.arraycopy(second, 0, result, length1, length2);
+ System.arraycopy(third, 0, result, length1 + length2, length3);
+ return result;
+ }
+
+ /**
+ * Answers the concatenation of the two arrays inserting the separator character between the two arrays.
+ * It answers null if the two arrays are null.
+ * If the first array is null, then the second array is returned.
+ * If the second array is null, then the first array is returned.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * first = null
+ * second = { 'a' }
+ * separator = '/'
+ * => result = { ' a' }
+ * </pre>
+ * </li>
+ * <li><pre>
+ * first = { ' a' }
+ * second = null
+ * separator = '/'
+ * => result = { ' a' }
+ * </pre>
+ * </li>
+ * <li><pre>
+ * first = { ' a' }
+ * second = { ' b' }
+ * separator = '/'
+ * => result = { ' a' , '/', 'b' }
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param first the first array to concatenate
+ * @param second the second array to concatenate
+ * @param separator the character to insert
+ * @return the concatenation of the two arrays inserting the separator character
+ * between the two arrays , or null if the two arrays are null.
+ */
+ public static final char[] concat(
+ char[] first,
+ char[] second,
+ char separator) {
+ if (first == null)
+ return second;
+ if (second == null)
+ return first;
+
+ int length1 = first.length;
+ if (length1 == 0)
+ return second;
+ int length2 = second.length;
+ if (length2 == 0)
+ return first;
+
+ char[] result = new char[length1 + length2 + 1];
+ System.arraycopy(first, 0, result, 0, length1);
+ result[length1] = separator;
+ System.arraycopy(second, 0, result, length1 + 1, length2);
+ return result;
+ }
+
+ /**
+ * Answers the concatenation of the three arrays inserting the sep1 character between the
+ * first two arrays and sep2 between the last two.
+ * It answers null if the three arrays are null.
+ * If the first array is null, then it answers the concatenation of second and third inserting
+ * the sep2 character between them.
+ * If the second array is null, then it answers the concatenation of first and third inserting
+ * the sep1 character between them.
+ * If the third array is null, then it answers the concatenation of first and second inserting
+ * the sep1 character between them.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * first = null
+ * sep1 = '/'
+ * second = { 'a' }
+ * sep2 = ':'
+ * third = { 'b' }
+ * => result = { ' a' , ':', 'b' }
+ * </pre>
+ * </li>
+ * <li><pre>
+ * first = { 'a' }
+ * sep1 = '/'
+ * second = null
+ * sep2 = ':'
+ * third = { 'b' }
+ * => result = { ' a' , '/', 'b' }
+ * </pre>
+ * </li>
+ * <li><pre>
+ * first = { 'a' }
+ * sep1 = '/'
+ * second = { 'b' }
+ * sep2 = ':'
+ * third = null
+ * => result = { ' a' , '/', 'b' }
+ * </pre>
+ * </li>
+ * <li><pre>
+ * first = { 'a' }
+ * sep1 = '/'
+ * second = { 'b' }
+ * sep2 = ':'
+ * third = { 'c' }
+ * => result = { ' a' , '/', 'b' , ':', 'c' }
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param first the first array to concatenate
+ * @param sep1 the character to insert
+ * @param second the second array to concatenate
+ * @param sep2 the character to insert
+ * @param third the second array to concatenate
+ * @return the concatenation of the three arrays inserting the sep1 character between the
+ * two arrays and sep2 between the last two.
+ */
+ public static final char[] concat(
+ char[] first,
+ char sep1,
+ char[] second,
+ char sep2,
+ char[] third) {
+ if (first == null)
+ return concat(second, third, sep2);
+ if (second == null)
+ return concat(first, third, sep1);
+ if (third == null)
+ return concat(first, second, sep1);
+
+ int length1 = first.length;
+ int length2 = second.length;
+ int length3 = third.length;
+ char[] result = new char[length1 + length2 + length3 + 2];
+ System.arraycopy(first, 0, result, 0, length1);
+ result[length1] = sep1;
+ System.arraycopy(second, 0, result, length1 + 1, length2);
+ result[length1 + length2 + 1] = sep2;
+ System.arraycopy(third, 0, result, length1 + length2 + 2, length3);
+ return result;
+ }
+
+ /**
+ * Answers a new array with prepending the prefix character and appending the suffix
+ * character at the end of the array. If array is null, it answers a new array containing the
+ * prefix and the suffix characters.
+ * <br>
+ * <br>
+ * For example:<br>
+ * <ol>
+ * <li><pre>
+ * prefix = 'a'
+ * array = { 'b' }
+ * suffix = 'c'
+ * => result = { 'a', 'b' , 'c' }
+ * </pre>
+ * </li>
+ * <li><pre>
+ * prefix = 'a'
+ * array = null
+ * suffix = 'c'
+ * => result = { 'a', 'c' }
+ * </pre></li>
+ * </ol>
+ *
+ * @param prefix the prefix character
+ * @param array the array that is concanated with the prefix and suffix characters
+ * @param suffix the suffix character
+ * @return the new array
+ */
+ public static final char[] concat(char prefix, char[] array, char suffix) {
+ if (array == null)
+ return new char[] { prefix, suffix };
+
+ int length = array.length;
+ char[] result = new char[length + 2];
+ result[0] = prefix;
+ System.arraycopy(array, 0, result, 1, length);
+ result[length + 1] = suffix;
+ return result;
+ }
+
+ /**
+ * Answers the concatenation of the given array parts using the given separator between each
+ * part and appending the given name at the end.
+ * <br>
+ * <br>
+ * For example:<br>
+ * <ol>
+ * <li><pre>
+ * name = { 'c' }
+ * array = { { 'a' }, { 'b' } }
+ * separator = '.'
+ * => result = { 'a', '.', 'b' , '.', 'c' }
+ * </pre>
+ * </li>
+ * <li><pre>
+ * name = null
+ * array = { { 'a' }, { 'b' } }
+ * separator = '.'
+ * => result = { 'a', '.', 'b' }
+ * </pre></li>
+ * <li><pre>
+ * name = { ' c' }
+ * array = null
+ * separator = '.'
+ * => result = { 'c' }
+ * </pre></li>
+ * </ol>
+ *
+ * @param name the given name
+ * @param array the given array
+ * @param separator the given separator
+ * @return the concatenation of the given array parts using the given separator between each
+ * part and appending the given name at the end
+ */
+ public static final char[] concatWith(
+ char[] name,
+ char[][] array,
+ char separator) {
+ int nameLength = name == null ? 0 : name.length;
+ if (nameLength == 0)
+ return concatWith(array, separator);
+
+ int length = array == null ? 0 : array.length;
+ if (length == 0)
+ return name;
+
+ int size = nameLength;
+ int index = length;
+ while (--index >= 0)
+ if (array[index].length > 0)
+ size += array[index].length + 1;
+ char[] result = new char[size];
+ index = size;
+ for (int i = length - 1; i >= 0; i--) {
+ int subLength = array[i].length;
+ if (subLength > 0) {
+ index -= subLength;
+ System.arraycopy(array[i], 0, result, index, subLength);
+ result[--index] = separator;
+ }
+ }
+ System.arraycopy(name, 0, result, 0, nameLength);
+ return result;
+ }
+
+ /**
+ * Answers the concatenation of the given array parts using the given separator between each
+ * part and appending the given name at the end.
+ * <br>
+ * <br>
+ * For example:<br>
+ * <ol>
+ * <li><pre>
+ * name = { 'c' }
+ * array = { { 'a' }, { 'b' } }
+ * separator = '.'
+ * => result = { 'a', '.', 'b' , '.', 'c' }
+ * </pre>
+ * </li>
+ * <li><pre>
+ * name = null
+ * array = { { 'a' }, { 'b' } }
+ * separator = '.'
+ * => result = { 'a', '.', 'b' }
+ * </pre></li>
+ * <li><pre>
+ * name = { ' c' }
+ * array = null
+ * separator = '.'
+ * => result = { 'c' }
+ * </pre></li>
+ * </ol>
+ *
+ * @param array the given array
+ * @param name the given name
+ * @param separator the given separator
+ * @return the concatenation of the given array parts using the given separator between each
+ * part and appending the given name at the end
+ */
+ public static final char[] concatWith(
+ char[][] array,
+ char[] name,
+ char separator) {
+ int nameLength = name == null ? 0 : name.length;
+ if (nameLength == 0)
+ return concatWith(array, separator);
+
+ int length = array == null ? 0 : array.length;
+ if (length == 0)
+ return name;
+
+ int size = nameLength;
+ int index = length;
+ while (--index >= 0)
+ if (array[index].length > 0)
+ size += array[index].length + 1;
+ char[] result = new char[size];
+ index = 0;
+ for (int i = 0; i < length; i++) {
+ int subLength = array[i].length;
+ if (subLength > 0) {
+ System.arraycopy(array[i], 0, result, index, subLength);
+ index += subLength;
+ result[index++] = separator;
+ }
+ }
+ System.arraycopy(name, 0, result, index, nameLength);
+ return result;
+ }
+
+ /**
+ * Answers the concatenation of the given array parts using the given separator between each part.
+ * <br>
+ * <br>
+ * For example:<br>
+ * <ol>
+ * <li><pre>
+ * array = { { 'a' }, { 'b' } }
+ * separator = '.'
+ * => result = { 'a', '.', 'b' }
+ * </pre>
+ * </li>
+ * <li><pre>
+ * array = null
+ * separator = '.'
+ * => result = { }
+ * </pre></li>
+ * </ol>
+ *
+ * @param array the given array
+ * @param separator the given separator
+ * @return the concatenation of the given array parts using the given separator between each part
+ */
+ public static final char[] concatWith(char[][] array, char separator) {
+ int length = array == null ? 0 : array.length;
+ if (length == 0)
+ return CharOperation.NO_CHAR;
+
+ int size = length - 1;
+ int index = length;
+ while (--index >= 0) {
+ if (array[index].length == 0)
+ size--;
+ else
+ size += array[index].length;
+ }
+ if (size <= 0)
+ return CharOperation.NO_CHAR;
+ char[] result = new char[size];
+ index = length;
+ while (--index >= 0) {
+ length = array[index].length;
+ if (length > 0) {
+ System.arraycopy(
+ array[index],
+ 0,
+ result,
+ (size -= length),
+ length);
+ if (--size >= 0)
+ result[size] = separator;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Answers true if the array contains an occurrence of character, false otherwise.
+ *
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * character = 'c'
+ * array = { { ' a' }, { ' b' } }
+ * result => false
+ * </pre>
+ * </li>
+ * <li><pre>
+ * character = 'a'
+ * array = { { ' a' }, { ' b' } }
+ * result => true
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param character the character to search
+ * @param array the array in which the search is done
+ * @return true if the array contains an occurrence of character, false otherwise.
+ * @throws NullPointerException if array is null.
+ */
+ public static final boolean contains(char character, char[][] array) {
+ for (int i = array.length; --i >= 0;) {
+ char[] subarray = array[i];
+ for (int j = subarray.length; --j >= 0;)
+ if (subarray[j] == character)
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Answers true if the array contains an occurrence of character, false otherwise.
+ *
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * character = 'c'
+ * array = { ' b' }
+ * result => false
+ * </pre>
+ * </li>
+ * <li><pre>
+ * character = 'a'
+ * array = { ' a' , ' b' }
+ * result => true
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param character the character to search
+ * @param array the array in which the search is done
+ * @return true if the array contains an occurrence of character, false otherwise.
+ * @throws NullPointerException if array is null.
+ */
+ public static final boolean contains(char character, char[] array) {
+ for (int i = array.length; --i >= 0;)
+ if (array[i] == character)
+ return true;
+ return false;
+ }
+
+ /**
+ * Answers a deep copy of the toCopy array.
+ *
+ * @param toCopy the array to copy
+ * @return a deep copy of the toCopy array.
+ */
+ public static final char[][] deepCopy(char[][] toCopy) {
+ int toCopyLength = toCopy.length;
+ char[][] result = new char[toCopyLength][];
+ for (int i = 0; i < toCopyLength; i++) {
+ char[] toElement = toCopy[i];
+ int toElementLength = toElement.length;
+ char[] resultElement = new char[toElementLength];
+ System.arraycopy(toElement, 0, resultElement, 0, toElementLength);
+ result[i] = resultElement;
+ }
+ return result;
+ }
+
+ /**
+ * Return true if array ends with the sequence of characters contained in toBeFound,
+ * otherwise false.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * array = { 'a', 'b', 'c', 'd' }
+ * toBeFound = { 'b', 'c' }
+ * result => false
+ * </pre>
+ * </li>
+ * <li><pre>
+ * array = { 'a', 'b', 'c' }
+ * toBeFound = { 'b', 'c' }
+ * result => true
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param array the array to check
+ * @param toBeFound the array to find
+ * @return true if array ends with the sequence of characters contained in toBeFound,
+ * otherwise false.
+ * @throws NullPointerException if array is null or toBeFound is null
+ */
+ public static final boolean endsWith(char[] array, char[] toBeFound) {
+ int i = toBeFound.length;
+ int j = array.length - i;
+
+ if (j < 0)
+ return false;
+ while (--i >= 0)
+ if (toBeFound[i] != array[i + j])
+ return false;
+ return true;
+ }
+
+ /**
+ * Answers true if the two arrays are identical character by character, otherwise false.
+ * The equality is case sensitive.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * first = null
+ * second = null
+ * result => true
+ * </pre>
+ * </li>
+ * <li><pre>
+ * first = { { } }
+ * second = null
+ * result => false
+ * </pre>
+ * </li>
+ * <li><pre>
+ * first = { { 'a' } }
+ * second = { { 'a' } }
+ * result => true
+ * </pre>
+ * </li>
+ * <li><pre>
+ * first = { { 'A' } }
+ * second = { { 'a' } }
+ * result => false
+ * </pre>
+ * </li>
+ * </ol>
+ * @param first the first array
+ * @param second the second array
+ * @return true if the two arrays are identical character by character, otherwise false
+ */
+ public static final boolean equals(char[][] first, char[][] second) {
+ if (first == second)
+ return true;
+ if (first == null || second == null)
+ return false;
+ if (first.length != second.length)
+ return false;
+
+ for (int i = first.length; --i >= 0;)
+ if (!equals(first[i], second[i]))
+ return false;
+ return true;
+ }
+
+ /**
+ * If isCaseSensite is true, answers true if the two arrays are identical character
+ * by character, otherwise false.
+ * If it is false, answers true if the two arrays are identical character by
+ * character without checking the case, otherwise false.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * first = null
+ * second = null
+ * isCaseSensitive = true
+ * result => true
+ * </pre>
+ * </li>
+ * <li><pre>
+ * first = { { } }
+ * second = null
+ * isCaseSensitive = true
+ * result => false
+ * </pre>
+ * </li>
+ * <li><pre>
+ * first = { { 'A' } }
+ * second = { { 'a' } }
+ * isCaseSensitive = true
+ * result => false
+ * </pre>
+ * </li>
+ * <li><pre>
+ * first = { { 'A' } }
+ * second = { { 'a' } }
+ * isCaseSensitive = false
+ * result => true
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param first the first array
+ * @param second the second array
+ * @param isCaseSensitive check whether or not the equality should be case sensitive
+ * @return true if the two arrays are identical character by character according to the value
+ * of isCaseSensitive, otherwise false
+ */
+ public static final boolean equals(
+ char[][] first,
+ char[][] second,
+ boolean isCaseSensitive) {
+
+ if (isCaseSensitive) {
+ return equals(first, second);
+ }
+ if (first == second)
+ return true;
+ if (first == null || second == null)
+ return false;
+ if (first.length != second.length)
+ return false;
+
+ for (int i = first.length; --i >= 0;)
+ if (!equals(first[i], second[i], false))
+ return false;
+ return true;
+ }
+
+ /**
+ * Answers true if the two arrays are identical character by character, otherwise false.
+ * The equality is case sensitive.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * first = null
+ * second = null
+ * result => true
+ * </pre>
+ * </li>
+ * <li><pre>
+ * first = { }
+ * second = null
+ * result => false
+ * </pre>
+ * </li>
+ * <li><pre>
+ * first = { 'a' }
+ * second = { 'a' }
+ * result => true
+ * </pre>
+ * </li>
+ * <li><pre>
+ * first = { 'a' }
+ * second = { 'A' }
+ * result => false
+ * </pre>
+ * </li>
+ * </ol>
+ * @param first the first array
+ * @param second the second array
+ * @return true if the two arrays are identical character by character, otherwise false
+ */
+ public static final boolean equals(char[] first, char[] second) {
+ if (first == second)
+ return true;
+ if (first == null || second == null)
+ return false;
+ if (first.length != second.length)
+ return false;
+
+ for (int i = first.length; --i >= 0;)
+ if (first[i] != second[i])
+ return false;
+ return true;
+ }
+
+ /**
+ * Answers true if the first array is identical character by character to a portion of the second array
+ * delimited from position secondStart (inclusive) to secondEnd(exclusive), otherwise false.
+ * The equality is case sensitive.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * first = null
+ * second = null
+ * secondStart = 0
+ * secondEnd = 0
+ * result => true
+ * </pre>
+ * </li>
+ * <li><pre>
+ * first = { }
+ * second = null
+ * secondStart = 0
+ * secondEnd = 0
+ * result => false
+ * </pre>
+ * </li>
+ * <li><pre>
+ * first = { 'a' }
+ * second = { 'a' }
+ * secondStart = 0
+ * secondEnd = 1
+ * result => true
+ * </pre>
+ * </li>
+ * <li><pre>
+ * first = { 'a' }
+ * second = { 'A' }
+ * secondStart = 0
+ * secondEnd = 1
+ * result => false
+ * </pre>
+ * </li>
+ * </ol>
+ * @param first the first array
+ * @param second the second array
+ * @param secondStart inclusive start position in the second array to compare
+ * @param secondEnd exclusive end position in the second array to compare
+ * @return true if the first array is identical character by character to fragment of second array ranging from secondStart to secondEnd-1, otherwise false
+ * @since 3.0
+ */
+ public static final boolean equals(char[] first, char[] second, int secondStart, int secondEnd) {
+ if (first == second)
+ return true;
+ if (first == null || second == null)
+ return false;
+ if (first.length != secondEnd - secondStart)
+ return false;
+
+ for (int i = first.length; --i >= 0;)
+ if (first[i] != second[i+secondStart])
+ return false;
+ return true;
+ }
+
+ /**
+ * If isCaseSensite is true, answers true if the two arrays are identical character
+ * by character, otherwise false.
+ * If it is false, answers true if the two arrays are identical character by
+ * character without checking the case, otherwise false.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * first = null
+ * second = null
+ * isCaseSensitive = true
+ * result => true
+ * </pre>
+ * </li>
+ * <li><pre>
+ * first = { }
+ * second = null
+ * isCaseSensitive = true
+ * result => false
+ * </pre>
+ * </li>
+ * <li><pre>
+ * first = { 'A' }
+ * second = { 'a' }
+ * isCaseSensitive = true
+ * result => false
+ * </pre>
+ * </li>
+ * <li><pre>
+ * first = { 'A' }
+ * second = { 'a' }
+ * isCaseSensitive = false
+ * result => true
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param first the first array
+ * @param second the second array
+ * @param isCaseSensitive check whether or not the equality should be case sensitive
+ * @return true if the two arrays are identical character by character according to the value
+ * of isCaseSensitive, otherwise false
+ */
+ public static final boolean equals(
+ char[] first,
+ char[] second,
+ boolean isCaseSensitive) {
+
+ if (isCaseSensitive) {
+ return equals(first, second);
+ }
+ if (first == second)
+ return true;
+ if (first == null || second == null)
+ return false;
+ if (first.length != second.length)
+ return false;
+
+ for (int i = first.length; --i >= 0;)
+ if (Character.toLowerCase(first[i])
+ != Character.toLowerCase(second[i]))
+ return false;
+ return true;
+ }
+ /**
+ * If isCaseSensite is true, the equality is case sensitive, otherwise it is case insensitive.
+ *
+ * Answers true if the name contains the fragment at the starting index startIndex, otherwise false.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * fragment = { 'b', 'c' , 'd' }
+ * name = { 'a', 'b', 'c' , 'd' }
+ * startIndex = 1
+ * isCaseSensitive = true
+ * result => true
+ * </pre>
+ * </li>
+ * <li><pre>
+ * fragment = { 'b', 'c' , 'd' }
+ * name = { 'a', 'b', 'C' , 'd' }
+ * startIndex = 1
+ * isCaseSensitive = true
+ * result => false
+ * </pre>
+ * </li>
+ * <li><pre>
+ * fragment = { 'b', 'c' , 'd' }
+ * name = { 'a', 'b', 'C' , 'd' }
+ * startIndex = 0
+ * isCaseSensitive = false
+ * result => false
+ * </pre>
+ * </li>
+ * <li><pre>
+ * fragment = { 'b', 'c' , 'd' }
+ * name = { 'a', 'b'}
+ * startIndex = 0
+ * isCaseSensitive = true
+ * result => false
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param fragment the fragment to check
+ * @param name the array to check
+ * @param startIndex the starting index
+ * @param isCaseSensitive check whether or not the equality should be case sensitive
+ * @return true if the name contains the fragment at the starting index startIndex according to the
+ * value of isCaseSensitive, otherwise false.
+ * @throws NullPointerException if fragment or name is null.
+ */
+ public static final boolean fragmentEquals(
+ char[] fragment,
+ char[] name,
+ int startIndex,
+ boolean isCaseSensitive) {
+
+ int max = fragment.length;
+ if (name.length < max + startIndex)
+ return false;
+ if (isCaseSensitive) {
+ for (int i = max;
+ --i >= 0;
+ ) // assumes the prefix is not larger than the name
+ if (fragment[i] != name[i + startIndex])
+ return false;
+ return true;
+ }
+ for (int i = max;
+ --i >= 0;
+ ) // assumes the prefix is not larger than the name
+ if (Character.toLowerCase(fragment[i])
+ != Character.toLowerCase(name[i + startIndex]))
+ return false;
+ return true;
+ }
+
+ /**
+ * Answers a hashcode for the array
+ *
+ * @param array the array for which a hashcode is required
+ * @return the hashcode
+ * @throws NullPointerException if array is null
+ */
+ public static final int hashCode(char[] array) {
+ int hash = 0;
+ int offset = 0;
+ int length = array.length;
+ if (length < 16) {
+ for (int i = length; i > 0; i--)
+ hash = (hash * 37) + array[offset++];
+ } else {
+ // only sample some characters
+ int skip = length / 8;
+ for (int i = length; i > 0; i -= skip, offset += skip)
+ hash = (hash * 39) + array[offset];
+ }
+ return hash & 0x7FFFFFFF;
+ }
+ /**
+ * Answers true if c is a whitespace according to the JLS (&#92;u000a, &#92;u000c, &#92;u000d, &#92;u0009), otherwise false.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * c = ' '
+ * result => true
+ * </pre>
+ * </li>
+ * <li><pre>
+ * c = '&#92;u3000'
+ * result => false
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param c the character to check
+ * @return true if c is a whitespace according to the JLS, otherwise false.
+ */
+ public static boolean isWhitespace(char c) {
+ switch (c) {
+ case 10 : /* \ u000a: LINE FEED */
+ case 12 : /* \ u000c: FORM FEED */
+ case 13 : /* \ u000d: CARRIAGE RETURN */
+ case 32 : /* \ u0020: SPACE */
+ case 9 : /* \ u0009: HORIZONTAL TABULATION */
+ return true;
+ default :
+ return false;
+ }
+ }
+
+ /**
+ * Answers the first index in the array for which the corresponding character is
+ * equal to toBeFound. Answers -1 if no occurrence of this character is found.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * toBeFound = 'c'
+ * array = { ' a', 'b', 'c', 'd' }
+ * result => 2
+ * </pre>
+ * </li>
+ * <li><pre>
+ * toBeFound = 'e'
+ * array = { ' a', 'b', 'c', 'd' }
+ * result => -1
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param toBeFound the character to search
+ * @param array the array to be searched
+ * @return the first index in the array for which the corresponding character is
+ * equal to toBeFound, -1 otherwise
+ * @throws NullPointerException if array is null
+ */
+ public static final int indexOf(char toBeFound, char[] array) {
+ for (int i = 0; i < array.length; i++)
+ if (toBeFound == array[i])
+ return i;
+ return -1;
+ }
+
+ /**
+ * Answers the first index in the array for which the corresponding character is
+ * equal to toBeFound starting the search at index start.
+ * Answers -1 if no occurrence of this character is found.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * toBeFound = 'c'
+ * array = { ' a', 'b', 'c', 'd' }
+ * start = 2
+ * result => 2
+ * </pre>
+ * </li>
+ * <li><pre>
+ * toBeFound = 'c'
+ * array = { ' a', 'b', 'c', 'd' }
+ * start = 3
+ * result => -1
+ * </pre>
+ * </li>
+ * <li><pre>
+ * toBeFound = 'e'
+ * array = { ' a', 'b', 'c', 'd' }
+ * start = 1
+ * result => -1
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param toBeFound the character to search
+ * @param array the array to be searched
+ * @param start the starting index
+ * @return the first index in the array for which the corresponding character is
+ * equal to toBeFound, -1 otherwise
+ * @throws NullPointerException if array is null
+ * @throws ArrayIndexOutOfBoundsException if start is lower than 0
+ */
+ public static final int indexOf(char toBeFound, char[] array, int start) {
+ for (int i = start; i < array.length; i++)
+ if (toBeFound == array[i])
+ return i;
+ return -1;
+ }
+
+ /**
+ * Answers the last index in the array for which the corresponding character is
+ * equal to toBeFound starting from the end of the array.
+ * Answers -1 if no occurrence of this character is found.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * toBeFound = 'c'
+ * array = { ' a', 'b', 'c', 'd' , 'c', 'e' }
+ * result => 4
+ * </pre>
+ * </li>
+ * <li><pre>
+ * toBeFound = 'e'
+ * array = { ' a', 'b', 'c', 'd' }
+ * result => -1
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param toBeFound the character to search
+ * @param array the array to be searched
+ * @return the last index in the array for which the corresponding character is
+ * equal to toBeFound starting from the end of the array, -1 otherwise
+ * @throws NullPointerException if array is null
+ */
+ public static final int lastIndexOf(char toBeFound, char[] array) {
+ for (int i = array.length; --i >= 0;)
+ if (toBeFound == array[i])
+ return i;
+ return -1;
+ }
+
+ /**
+ * Answers the last index in the array for which the corresponding character is
+ * equal to toBeFound stopping at the index startIndex.
+ * Answers -1 if no occurrence of this character is found.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * toBeFound = 'c'
+ * array = { ' a', 'b', 'c', 'd' }
+ * startIndex = 2
+ * result => 2
+ * </pre>
+ * </li>
+ * <li><pre>
+ * toBeFound = 'c'
+ * array = { ' a', 'b', 'c', 'd', 'e' }
+ * startIndex = 3
+ * result => -1
+ * </pre>
+ * </li>
+ * <li><pre>
+ * toBeFound = 'e'
+ * array = { ' a', 'b', 'c', 'd' }
+ * startIndex = 0
+ * result => -1
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param toBeFound the character to search
+ * @param array the array to be searched
+ * @param startIndex the stopping index
+ * @return the last index in the array for which the corresponding character is
+ * equal to toBeFound stopping at the index startIndex, -1 otherwise
+ * @throws NullPointerException if array is null
+ * @throws ArrayIndexOutOfBoundsException if startIndex is lower than 0
+ */
+ public static final int lastIndexOf(
+ char toBeFound,
+ char[] array,
+ int startIndex) {
+ for (int i = array.length; --i >= startIndex;)
+ if (toBeFound == array[i])
+ return i;
+ return -1;
+ }
+
+ /**
+ * Answers the last index in the array for which the corresponding character is
+ * equal to toBeFound starting from endIndex to startIndex.
+ * Answers -1 if no occurrence of this character is found.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * toBeFound = 'c'
+ * array = { ' a', 'b', 'c', 'd' }
+ * startIndex = 2
+ * endIndex = 2
+ * result => 2
+ * </pre>
+ * </li>
+ * <li><pre>
+ * toBeFound = 'c'
+ * array = { ' a', 'b', 'c', 'd', 'e' }
+ * startIndex = 3
+ * endIndex = 4
+ * result => -1
+ * </pre>
+ * </li>
+ * <li><pre>
+ * toBeFound = 'e'
+ * array = { ' a', 'b', 'c', 'd' }
+ * startIndex = 0
+ * endIndex = 3
+ * result => -1
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param toBeFound the character to search
+ * @param array the array to be searched
+ * @param startIndex the stopping index
+ * @param endIndex the starting index
+ * @return the last index in the array for which the corresponding character is
+ * equal to toBeFound starting from endIndex to startIndex, -1 otherwise
+ * @throws NullPointerException if array is null
+ * @throws ArrayIndexOutOfBoundsException if endIndex is greater or equals to array length or starting is lower than 0
+ */
+ public static final int lastIndexOf(
+ char toBeFound,
+ char[] array,
+ int startIndex,
+ int endIndex) {
+ for (int i = endIndex; --i >= startIndex;)
+ if (toBeFound == array[i])
+ return i;
+ return -1;
+ }
+
+ /**
+ * Answers the last portion of a name given a separator.
+ * <br>
+ * <br>
+ * For example,
+ * <pre>
+ * lastSegment("java.lang.Object".toCharArray(),'.') --> Object
+ * </pre>
+ *
+ * @param array the array
+ * @param separator the given separator
+ * @return the last portion of a name given a separator
+ * @throws NullPointerException if array is null
+ */
+ final static public char[] lastSegment(char[] array, char separator) {
+ int pos = lastIndexOf(separator, array);
+ if (pos < 0)
+ return array;
+ return subarray(array, pos + 1, array.length);
+ }
+
+ /**
+ * Answers true if the pattern matches the given name, false otherwise. This char[] pattern matching
+ * accepts wild-cards '*' and '?'.
+ *
+ * When not case sensitive, the pattern is assumed to already be lowercased, the
+ * name will be lowercased character per character as comparing.
+ * If name is null, the answer is false.
+ * If pattern is null, the answer is true if name is not null.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * pattern = { '?', 'b', '*' }
+ * name = { 'a', 'b', 'c' , 'd' }
+ * isCaseSensitive = true
+ * result => true
+ * </pre>
+ * </li>
+ * <li><pre>
+ * pattern = { '?', 'b', '?' }
+ * name = { 'a', 'b', 'c' , 'd' }
+ * isCaseSensitive = true
+ * result => false
+ * </pre>
+ * </li>
+ * <li><pre>
+ * pattern = { 'b', '*' }
+ * name = { 'a', 'b', 'c' , 'd' }
+ * isCaseSensitive = true
+ * result => false
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param pattern the given pattern
+ * @param name the given name
+ * @param isCaseSensitive flag to know whether or not the matching should be case sensitive
+ * @return true if the pattern matches the given name, false otherwise
+ */
+ public static final boolean match(
+ char[] pattern,
+ char[] name,
+ boolean isCaseSensitive) {
+
+ if (name == null)
+ return false; // null name cannot match
+ if (pattern == null)
+ return true; // null pattern is equivalent to '*'
+
+ return match(
+ pattern,
+ 0,
+ pattern.length,
+ name,
+ 0,
+ name.length,
+ isCaseSensitive);
+ }
+
+ /**
+ * Answers true if the a sub-pattern matches the subpart of the given name, false otherwise.
+ * char[] pattern matching, accepting wild-cards '*' and '?'. Can match only subset of name/pattern.
+ * end positions are non-inclusive.
+ * The subpattern is defined by the patternStart and pattternEnd positions.
+ * When not case sensitive, the pattern is assumed to already be lowercased, the
+ * name will be lowercased character per character as comparing.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * pattern = { '?', 'b', '*' }
+ * patternStart = 1
+ * patternEnd = 3
+ * name = { 'a', 'b', 'c' , 'd' }
+ * nameStart = 1
+ * nameEnd = 4
+ * isCaseSensitive = true
+ * result => true
+ * </pre>
+ * </li>
+ * <li><pre>
+ * pattern = { '?', 'b', '*' }
+ * patternStart = 1
+ * patternEnd = 2
+ * name = { 'a', 'b', 'c' , 'd' }
+ * nameStart = 1
+ * nameEnd = 2
+ * isCaseSensitive = true
+ * result => false
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param pattern the given pattern
+ * @param patternStart the given pattern start
+ * @param patternEnd the given pattern end
+ * @param name the given name
+ * @param nameStart the given name start
+ * @param nameEnd the given name end
+ * @param isCaseSensitive flag to know if the matching should be case sensitive
+ * @return true if the a sub-pattern matches the subpart of the given name, false otherwise
+ */
+ public static final boolean match(
+ char[] pattern,
+ int patternStart,
+ int patternEnd,
+ char[] name,
+ int nameStart,
+ int nameEnd,
+ boolean isCaseSensitive) {
+
+ if (name == null)
+ return false; // null name cannot match
+ if (pattern == null)
+ return true; // null pattern is equivalent to '*'
+ int iPattern = patternStart;
+ int iName = nameStart;
+
+ if (patternEnd < 0)
+ patternEnd = pattern.length;
+ if (nameEnd < 0)
+ nameEnd = name.length;
+
+ /* check first segment */
+ char patternChar = 0;
+ while ((iPattern < patternEnd)
+ && (patternChar = pattern[iPattern]) != '*') {
+ if (iName == nameEnd)
+ return false;
+ if (patternChar
+ != (isCaseSensitive
+ ? name[iName]
+ : Character.toLowerCase(name[iName]))
+ && patternChar != '?') {
+ return false;
+ }
+ iName++;
+ iPattern++;
+ }
+ /* check sequence of star+segment */
+ int segmentStart;
+ if (patternChar == '*') {
+ segmentStart = ++iPattern; // skip star
+ } else {
+ segmentStart = 0; // force iName check
+ }
+ int prefixStart = iName;
+ checkSegment : while (iName < nameEnd) {
+ if (iPattern == patternEnd) {
+ iPattern = segmentStart; // mismatch - restart current segment
+ iName = ++prefixStart;
+ continue checkSegment;
+ }
+ /* segment is ending */
+ if ((patternChar = pattern[iPattern]) == '*') {
+ segmentStart = ++iPattern; // skip start
+ if (segmentStart == patternEnd) {
+ return true;
+ }
+ prefixStart = iName;
+ continue checkSegment;
+ }
+ /* check current name character */
+ if ((isCaseSensitive ? name[iName] : Character.toLowerCase(name[iName]))
+ != patternChar
+ && patternChar != '?') {
+ iPattern = segmentStart; // mismatch - restart current segment
+ iName = ++prefixStart;
+ continue checkSegment;
+ }
+ iName++;
+ iPattern++;
+ }
+
+ return (segmentStart == patternEnd)
+ || (iName == nameEnd && iPattern == patternEnd)
+ || (iPattern == patternEnd - 1 && pattern[iPattern] == '*');
+ }
+
+ /**
+ * Answers true if the pattern matches the filepath using the pathSepatator, false otherwise.
+ *
+ * Path char[] pattern matching, accepting wild-cards '**', '*' and '?' (using Ant directory tasks
+ * conventions, also see "http://jakarta.apache.org/ant/manual/dirtasks.html#defaultexcludes").
+ * Path pattern matching is enhancing regular pattern matching in supporting extra rule where '**' represent
+ * any folder combination.
+ * Special rule:
+ * - foo\ is equivalent to foo\**
+ * When not case sensitive, the pattern is assumed to already be lowercased, the
+ * name will be lowercased character per character as comparing.
+ *
+ * @param pattern the given pattern
+ * @param filepath the given path
+ * @param isCaseSensitive to find out whether or not the matching should be case sensitive
+ * @param pathSeparator the given path separator
+ * @return true if the pattern matches the filepath using the pathSepatator, false otherwise
+ */
+ public static final boolean pathMatch(
+ char[] pattern,
+ char[] filepath,
+ boolean isCaseSensitive,
+ char pathSeparator) {
+
+ if (filepath == null)
+ return false; // null name cannot match
+ if (pattern == null)
+ return true; // null pattern is equivalent to '*'
+
+ // offsets inside pattern
+ int pSegmentStart = pattern[0] == pathSeparator ? 1 : 0;
+ int pLength = pattern.length;
+ int pSegmentEnd = CharOperation.indexOf(pathSeparator, pattern, pSegmentStart+1);
+ if (pSegmentEnd < 0) pSegmentEnd = pLength;
+
+ // special case: pattern foo\ is equivalent to foo\**
+ boolean freeTrailingDoubleStar = pattern[pLength - 1] == pathSeparator;
+
+ // offsets inside filepath
+ int fSegmentStart, fLength = filepath.length;
+ if (filepath[0] != pathSeparator){
+ fSegmentStart = 0;
+ } else {
+ fSegmentStart = 1;
+ }
+ if (fSegmentStart != pSegmentStart) {
+ return false; // both must start with a separator or none.
+ }
+ int fSegmentEnd = CharOperation.indexOf(pathSeparator, filepath, fSegmentStart+1);
+ if (fSegmentEnd < 0) fSegmentEnd = fLength;
+
+ // first segments
+ while (pSegmentStart < pLength
+ && !(pSegmentEnd == pLength && freeTrailingDoubleStar
+ || (pSegmentEnd == pSegmentStart + 2
+ && pattern[pSegmentStart] == '*'
+ && pattern[pSegmentStart + 1] == '*'))) {
+
+ if (fSegmentStart >= fLength)
+ return false;
+ if (!CharOperation
+ .match(
+ pattern,
+ pSegmentStart,
+ pSegmentEnd,
+ filepath,
+ fSegmentStart,
+ fSegmentEnd,
+ isCaseSensitive)) {
+ return false;
+ }
+
+ // jump to next segment
+ pSegmentEnd =
+ CharOperation.indexOf(
+ pathSeparator,
+ pattern,
+ pSegmentStart = pSegmentEnd + 1);
+ // skip separator
+ if (pSegmentEnd < 0)
+ pSegmentEnd = pLength;
+
+ fSegmentEnd =
+ CharOperation.indexOf(
+ pathSeparator,
+ filepath,
+ fSegmentStart = fSegmentEnd + 1);
+ // skip separator
+ if (fSegmentEnd < 0) fSegmentEnd = fLength;
+ }
+
+ /* check sequence of doubleStar+segment */
+ int pSegmentRestart;
+ if ((pSegmentStart >= pLength && freeTrailingDoubleStar)
+ || (pSegmentEnd == pSegmentStart + 2
+ && pattern[pSegmentStart] == '*'
+ && pattern[pSegmentStart + 1] == '*')) {
+ pSegmentEnd =
+ CharOperation.indexOf(
+ pathSeparator,
+ pattern,
+ pSegmentStart = pSegmentEnd + 1);
+ // skip separator
+ if (pSegmentEnd < 0) pSegmentEnd = pLength;
+ pSegmentRestart = pSegmentStart;
+ } else {
+ if (pSegmentStart >= pLength) return fSegmentStart >= fLength; // true if filepath is done too.
+ pSegmentRestart = 0; // force fSegmentStart check
+ }
+ int fSegmentRestart = fSegmentStart;
+ checkSegment : while (fSegmentStart < fLength) {
+
+ if (pSegmentStart >= pLength) {
+ if (freeTrailingDoubleStar) return true;
+ // mismatch - restart current path segment
+ pSegmentEnd =
+ CharOperation.indexOf(pathSeparator, pattern, pSegmentStart = pSegmentRestart);
+ if (pSegmentEnd < 0) pSegmentEnd = pLength;
+
+ fSegmentRestart =
+ CharOperation.indexOf(pathSeparator, filepath, fSegmentRestart + 1);
+ // skip separator
+ if (fSegmentRestart < 0) {
+ fSegmentRestart = fLength;
+ } else {
+ fSegmentRestart++;
+ }
+ fSegmentEnd =
+ CharOperation.indexOf(pathSeparator, filepath, fSegmentStart = fSegmentRestart);
+ if (fSegmentEnd < 0) fSegmentEnd = fLength;
+ continue checkSegment;
+ }
+
+ /* path segment is ending */
+ if (pSegmentEnd == pSegmentStart + 2
+ && pattern[pSegmentStart] == '*'
+ && pattern[pSegmentStart + 1] == '*') {
+ pSegmentEnd =
+ CharOperation.indexOf(pathSeparator, pattern, pSegmentStart = pSegmentEnd + 1);
+ // skip separator
+ if (pSegmentEnd < 0) pSegmentEnd = pLength;
+ pSegmentRestart = pSegmentStart;
+ fSegmentRestart = fSegmentStart;
+ if (pSegmentStart >= pLength) return true;
+ continue checkSegment;
+ }
+ /* chech current path segment */
+ if (!CharOperation.match(
+ pattern,
+ pSegmentStart,
+ pSegmentEnd,
+ filepath,
+ fSegmentStart,
+ fSegmentEnd,
+ isCaseSensitive)) {
+ // mismatch - restart current path segment
+ pSegmentEnd =
+ CharOperation.indexOf(pathSeparator, pattern, pSegmentStart = pSegmentRestart);
+ if (pSegmentEnd < 0) pSegmentEnd = pLength;
+
+ fSegmentRestart =
+ CharOperation.indexOf(pathSeparator, filepath, fSegmentRestart + 1);
+ // skip separator
+ if (fSegmentRestart < 0) {
+ fSegmentRestart = fLength;
+ } else {
+ fSegmentRestart++;
+ }
+ fSegmentEnd =
+ CharOperation.indexOf(pathSeparator, filepath, fSegmentStart = fSegmentRestart);
+ if (fSegmentEnd < 0) fSegmentEnd = fLength;
+ continue checkSegment;
+ }
+ // jump to next segment
+ pSegmentEnd =
+ CharOperation.indexOf(
+ pathSeparator,
+ pattern,
+ pSegmentStart = pSegmentEnd + 1);
+ // skip separator
+ if (pSegmentEnd < 0)
+ pSegmentEnd = pLength;
+
+ fSegmentEnd =
+ CharOperation.indexOf(
+ pathSeparator,
+ filepath,
+ fSegmentStart = fSegmentEnd + 1);
+ // skip separator
+ if (fSegmentEnd < 0)
+ fSegmentEnd = fLength;
+ }
+
+ return (pSegmentRestart >= pSegmentEnd)
+ || (fSegmentStart >= fLength && pSegmentStart >= pLength)
+ || (pSegmentStart == pLength - 2
+ && pattern[pSegmentStart] == '*'
+ && pattern[pSegmentStart + 1] == '*')
+ || (pSegmentStart == pLength && freeTrailingDoubleStar);
+ }
+
+ /**
+ * Answers the number of occurrences of the given character in the given array, 0 if any.
+ *
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * toBeFound = 'b'
+ * array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
+ * result => 3
+ * </pre>
+ * </li>
+ * <li><pre>
+ * toBeFound = 'c'
+ * array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
+ * result => 0
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param toBeFound the given character
+ * @param array the given array
+ * @return the number of occurrences of the given character in the given array, 0 if any
+ * @throws NullPointerException if array is null
+ */
+ public static final int occurencesOf(char toBeFound, char[] array) {
+ int count = 0;
+ for (int i = 0; i < array.length; i++)
+ if (toBeFound == array[i])
+ count++;
+ return count;
+ }
+
+ /**
+ * Answers the number of occurrences of the given character in the given array starting
+ * at the given index, 0 if any.
+ *
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * toBeFound = 'b'
+ * array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
+ * start = 2
+ * result => 2
+ * </pre>
+ * </li>
+ * <li><pre>
+ * toBeFound = 'c'
+ * array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
+ * start = 0
+ * result => 0
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param toBeFound the given character
+ * @param array the given array
+ * @param start the given index
+ * @return the number of occurrences of the given character in the given array, 0 if any
+ * @throws NullPointerException if array is null
+ * @throws ArrayIndexOutOfBoundsException if start is lower than 0
+ */
+ public static final int occurencesOf(
+ char toBeFound,
+ char[] array,
+ int start) {
+ int count = 0;
+ for (int i = start; i < array.length; i++)
+ if (toBeFound == array[i])
+ count++;
+ return count;
+ }
+
+ /**
+ * Answers true if the given name starts with the given prefix, false otherwise.
+ * The comparison is case sensitive.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * prefix = { 'a' , 'b' }
+ * name = { 'a' , 'b', 'b', 'a', 'b', 'a' }
+ * result => true
+ * </pre>
+ * </li>
+ * <li><pre>
+ * prefix = { 'a' , 'c' }
+ * name = { 'a' , 'b', 'b', 'a', 'b', 'a' }
+ * result => false
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param prefix the given prefix
+ * @param name the given name
+ * @return true if the given name starts with the given prefix, false otherwise
+ * @throws NullPointerException if the given name is null or if the given prefix is null
+ */
+ public static final boolean prefixEquals(char[] prefix, char[] name) {
+
+ int max = prefix.length;
+ if (name.length < max)
+ return false;
+ for (int i = max;
+ --i >= 0;
+ ) // assumes the prefix is not larger than the name
+ if (prefix[i] != name[i])
+ return false;
+ return true;
+ }
+
+ /**
+ * Answers true if the given name starts with the given prefix, false otherwise.
+ * isCaseSensitive is used to find out whether or not the comparison should be case sensitive.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * prefix = { 'a' , 'B' }
+ * name = { 'a' , 'b', 'b', 'a', 'b', 'a' }
+ * isCaseSensitive = false
+ * result => true
+ * </pre>
+ * </li>
+ * <li><pre>
+ * prefix = { 'a' , 'B' }
+ * name = { 'a' , 'b', 'b', 'a', 'b', 'a' }
+ * isCaseSensitive = true
+ * result => false
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param prefix the given prefix
+ * @param name the given name
+ * @param isCaseSensitive to find out whether or not the comparison should be case sensitive
+ * @return true if the given name starts with the given prefix, false otherwise
+ * @throws NullPointerException if the given name is null or if the given prefix is null
+ */
+ public static final boolean prefixEquals(
+ char[] prefix,
+ char[] name,
+ boolean isCaseSensitive) {
+
+ int max = prefix.length;
+ if (name.length < max)
+ return false;
+ if (isCaseSensitive) {
+ for (int i = max;
+ --i >= 0;
+ ) // assumes the prefix is not larger than the name
+ if (prefix[i] != name[i])
+ return false;
+ return true;
+ }
+
+ for (int i = max;
+ --i >= 0;
+ ) // assumes the prefix is not larger than the name
+ if (Character.toLowerCase(prefix[i])
+ != Character.toLowerCase(name[i]))
+ return false;
+ return true;
+ }
+
+ /**
+ * Replace all occurrence of the character to be replaced with the remplacement character in the
+ * given array.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
+ * toBeReplaced = 'b'
+ * replacementChar = 'a'
+ * result => No returned value, but array is now equals to { 'a' , 'a', 'a', 'a', 'a', 'a' }
+ * </pre>
+ * </li>
+ * <li><pre>
+ * array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
+ * toBeReplaced = 'c'
+ * replacementChar = 'a'
+ * result => No returned value, but array is now equals to { 'a' , 'b', 'b', 'a', 'b', 'a' }
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param array the given array
+ * @param toBeReplaced the character to be replaced
+ * @param replacementChar the replacement character
+ * @throws NullPointerException if the given array is null
+ */
+ public static final void replace(
+ char[] array,
+ char toBeReplaced,
+ char replacementChar) {
+ if (toBeReplaced != replacementChar) {
+ for (int i = 0, max = array.length; i < max; i++) {
+ if (array[i] == toBeReplaced)
+ array[i] = replacementChar;
+ }
+ }
+ }
+
+ /**
+ * Answers a new array of characters with substitutions. No side-effect is operated on the original
+ * array, in case no substitution happened, then the result is the same as the
+ * original one.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
+ * toBeReplaced = { 'b' }
+ * replacementChar = { 'a', 'a' }
+ * result => { 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a' }
+ * </pre>
+ * </li>
+ * <li><pre>
+ * array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
+ * toBeReplaced = { 'c' }
+ * replacementChar = { 'a' }
+ * result => { 'a' , 'b', 'b', 'a', 'b', 'a' }
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param array the given array
+ * @param toBeReplaced characters to be replaced
+ * @param replacementChars the replacement characters
+ * @return a new array of characters with substitutions or the given array if none
+ * @throws NullPointerException if the given array is null
+ */
+ public static final char[] replace(
+ char[] array,
+ char[] toBeReplaced,
+ char[] replacementChars) {
+
+ int max = array.length;
+ int replacedLength = toBeReplaced.length;
+ int replacementLength = replacementChars.length;
+
+ int[] starts = new int[5];
+ int occurrenceCount = 0;
+
+ if (!equals(toBeReplaced, replacementChars)) {
+
+ next : for (int i = 0; i < max; i++) {
+ int j = 0;
+ while (j < replacedLength) {
+ if (i + j == max)
+ continue next;
+ if (array[i + j] != toBeReplaced[j++])
+ continue next;
+ }
+ if (occurrenceCount == starts.length) {
+ System.arraycopy(
+ starts,
+ 0,
+ starts = new int[occurrenceCount * 2],
+ 0,
+ occurrenceCount);
+ }
+ starts[occurrenceCount++] = i;
+ }
+ }
+ if (occurrenceCount == 0)
+ return array;
+ char[] result =
+ new char[max
+ + occurrenceCount * (replacementLength - replacedLength)];
+ int inStart = 0, outStart = 0;
+ for (int i = 0; i < occurrenceCount; i++) {
+ int offset = starts[i] - inStart;
+ System.arraycopy(array, inStart, result, outStart, offset);
+ inStart += offset;
+ outStart += offset;
+ System.arraycopy(
+ replacementChars,
+ 0,
+ result,
+ outStart,
+ replacementLength);
+ inStart += replacedLength;
+ outStart += replacementLength;
+ }
+ System.arraycopy(array, inStart, result, outStart, max - inStart);
+ return result;
+ }
+
+ /**
+ * Replace all occurrence of the character to be replaced with the remplacement character
+ * in a copy of the given array. Returns the given array if no occurrences of the character
+ * to be replaced are found.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
+ * toBeReplaced = 'b'
+ * replacementChar = 'a'
+ * result => A new array that is equals to { 'a' , 'a', 'a', 'a', 'a', 'a' }
+ * </pre>
+ * </li>
+ * <li><pre>
+ * array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
+ * toBeReplaced = 'c'
+ * replacementChar = 'a'
+ * result => The original array that remains unchanged.
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param array the given array
+ * @param toBeReplaced the character to be replaced
+ * @param replacementChar the replacement character
+ * @throws NullPointerException if the given array is null
+ * @since 3.1
+ */
+ public static final char[] replaceOnCopy(
+ char[] array,
+ char toBeReplaced,
+ char replacementChar) {
+
+ char[] result = null;
+ for (int i = 0, length = array.length; i < length; i++) {
+ char c = array[i];
+ if (c == toBeReplaced) {
+ if (result == null) {
+ result = new char[length];
+ System.arraycopy(array, 0, result, 0, i);
+ }
+ result[i] = replacementChar;
+ } else if (result != null) {
+ result[i] = c;
+ }
+ }
+ if (result == null) return array;
+ return result;
+ }
+
+ /**
+ * Return a new array which is the split of the given array using the given divider and triming each subarray to remove
+ * whitespaces equals to ' '.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * divider = 'b'
+ * array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
+ * result => { { 'a' }, { }, { 'a' }, { 'a' } }
+ * </pre>
+ * </li>
+ * <li><pre>
+ * divider = 'c'
+ * array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
+ * result => { { 'a', 'b', 'b', 'a', 'b', 'a' } }
+ * </pre>
+ * </li>
+ * <li><pre>
+ * divider = 'b'
+ * array = { 'a' , ' ', 'b', 'b', 'a', 'b', 'a' }
+ * result => { { 'a' }, { }, { 'a' }, { 'a' } }
+ * </pre>
+ * </li>
+ * <li><pre>
+ * divider = 'c'
+ * array = { ' ', ' ', 'a' , 'b', 'b', 'a', 'b', 'a', ' ' }
+ * result => { { 'a', 'b', 'b', 'a', 'b', 'a' } }
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param divider the given divider
+ * @param array the given array
+ * @return a new array which is the split of the given array using the given divider and triming each subarray to remove
+ * whitespaces equals to ' '
+ */
+ public static final char[][] splitAndTrimOn(char divider, char[] array) {
+ int length = array == null ? 0 : array.length;
+ if (length == 0)
+ return NO_CHAR_CHAR;
+
+ int wordCount = 1;
+ for (int i = 0; i < length; i++)
+ if (array[i] == divider)
+ wordCount++;
+ char[][] split = new char[wordCount][];
+ int last = 0, currentWord = 0;
+ for (int i = 0; i < length; i++) {
+ if (array[i] == divider) {
+ int start = last, end = i - 1;
+ while (start < i && array[start] == ' ')
+ start++;
+ while (end > start && array[end] == ' ')
+ end--;
+ split[currentWord] = new char[end - start + 1];
+ System.arraycopy(
+ array,
+ start,
+ split[currentWord++],
+ 0,
+ end - start + 1);
+ last = i + 1;
+ }
+ }
+ int start = last, end = length - 1;
+ while (start < length && array[start] == ' ')
+ start++;
+ while (end > start && array[end] == ' ')
+ end--;
+ split[currentWord] = new char[end - start + 1];
+ System.arraycopy(
+ array,
+ start,
+ split[currentWord++],
+ 0,
+ end - start + 1);
+ return split;
+ }
+
+ /**
+ * Return a new array which is the split of the given array using the given divider.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * divider = 'b'
+ * array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
+ * result => { { 'a' }, { }, { 'a' }, { 'a' } }
+ * </pre>
+ * </li>
+ * <li><pre>
+ * divider = 'c'
+ * array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
+ * result => { { 'a', 'b', 'b', 'a', 'b', 'a' } }
+ * </pre>
+ * </li>
+ * <li><pre>
+ * divider = 'c'
+ * array = { ' ', ' ', 'a' , 'b', 'b', 'a', 'b', 'a', ' ' }
+ * result => { { ' ', 'a', 'b', 'b', 'a', 'b', 'a', ' ' } }
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param divider the given divider
+ * @param array the given array
+ * @return a new array which is the split of the given array using the given divider
+ */
+ public static final char[][] splitOn(char divider, char[] array) {
+ int length = array == null ? 0 : array.length;
+ if (length == 0)
+ return NO_CHAR_CHAR;
+
+ int wordCount = 1;
+ for (int i = 0; i < length; i++)
+ if (array[i] == divider)
+ wordCount++;
+ char[][] split = new char[wordCount][];
+ int last = 0, currentWord = 0;
+ for (int i = 0; i < length; i++) {
+ if (array[i] == divider) {
+ split[currentWord] = new char[i - last];
+ System.arraycopy(
+ array,
+ last,
+ split[currentWord++],
+ 0,
+ i - last);
+ last = i + 1;
+ }
+ }
+ split[currentWord] = new char[length - last];
+ System.arraycopy(array, last, split[currentWord], 0, length - last);
+ return split;
+ }
+
+ /**
+ * Return a new array which is the split of the given array using the given divider. The given end
+ * is exclusive and the given start is inclusive.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * divider = 'b'
+ * array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
+ * start = 2
+ * end = 5
+ * result => { { }, { 'a' }, { } }
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param divider the given divider
+ * @param array the given array
+ * @param start the given starting index
+ * @param end the given ending index
+ * @return a new array which is the split of the given array using the given divider
+ * @throws ArrayIndexOutOfBoundsException if start is lower than 0 or end is greater than the array length
+ */
+ public static final char[][] splitOn(
+ char divider,
+ char[] array,
+ int start,
+ int end) {
+ int length = array == null ? 0 : array.length;
+ if (length == 0 || start > end)
+ return NO_CHAR_CHAR;
+
+ int wordCount = 1;
+ for (int i = start; i < end; i++)
+ if (array[i] == divider)
+ wordCount++;
+ char[][] split = new char[wordCount][];
+ int last = start, currentWord = 0;
+ for (int i = start; i < end; i++) {
+ if (array[i] == divider) {
+ split[currentWord] = new char[i - last];
+ System.arraycopy(
+ array,
+ last,
+ split[currentWord++],
+ 0,
+ i - last);
+ last = i + 1;
+ }
+ }
+ split[currentWord] = new char[end - last];
+ System.arraycopy(array, last, split[currentWord], 0, end - last);
+ return split;
+ }
+
+ /**
+ * Answers a new array which is a copy of the given array starting at the given start and
+ * ending at the given end. The given start is inclusive and the given end is exclusive.
+ * Answers null if start is greater than end, if start is lower than 0 or if end is greater
+ * than the length of the given array. If end equals -1, it is converted to the array length.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * array = { { 'a' } , { 'b' } }
+ * start = 0
+ * end = 1
+ * result => { { 'a' } }
+ * </pre>
+ * </li>
+ * <li><pre>
+ * array = { { 'a' } , { 'b' } }
+ * start = 0
+ * end = -1
+ * result => { { 'a' }, { 'b' } }
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param array the given array
+ * @param start the given starting index
+ * @param end the given ending index
+ * @return a new array which is a copy of the given array starting at the given start and
+ * ending at the given end
+ * @throws NullPointerException if the given array is null
+ */
+ public static final char[][] subarray(char[][] array, int start, int end) {
+ if (end == -1)
+ end = array.length;
+ if (start > end)
+ return null;
+ if (start < 0)
+ return null;
+ if (end > array.length)
+ return null;
+
+ char[][] result = new char[end - start][];
+ System.arraycopy(array, start, result, 0, end - start);
+ return result;
+ }
+
+ /**
+ * Answers a new array which is a copy of the given array starting at the given start and
+ * ending at the given end. The given start is inclusive and the given end is exclusive.
+ * Answers null if start is greater than end, if start is lower than 0 or if end is greater
+ * than the length of the given array. If end equals -1, it is converted to the array length.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * array = { 'a' , 'b' }
+ * start = 0
+ * end = 1
+ * result => { 'a' }
+ * </pre>
+ * </li>
+ * <li><pre>
+ * array = { 'a', 'b' }
+ * start = 0
+ * end = -1
+ * result => { 'a' , 'b' }
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param array the given array
+ * @param start the given starting index
+ * @param end the given ending index
+ * @return a new array which is a copy of the given array starting at the given start and
+ * ending at the given end
+ * @throws NullPointerException if the given array is null
+ */
+ public static final char[] subarray(char[] array, int start, int end) {
+ if (end == -1)
+ end = array.length;
+ if (start > end)
+ return null;
+ if (start < 0)
+ return null;
+ if (end > array.length)
+ return null;
+
+ char[] result = new char[end - start];
+ System.arraycopy(array, start, result, 0, end - start);
+ return result;
+ }
+ /**
+ * Answers the result of a char[] conversion to lowercase. Answers null if the given chars array is null.
+ * <br>
+ * NOTE: If no conversion was necessary, then answers back the argument one.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * chars = { 'a' , 'b' }
+ * result => { 'a' , 'b' }
+ * </pre>
+ * </li>
+ * <li><pre>
+ * array = { 'A', 'b' }
+ * result => { 'a' , 'b' }
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param chars the chars to convert
+ * @return the result of a char[] conversion to lowercase
+ */
+ final static public char[] toLowerCase(char[] chars) {
+ if (chars == null)
+ return null;
+ int length = chars.length;
+ char[] lowerChars = null;
+ for (int i = 0; i < length; i++) {
+ char c = chars[i];
+ char lc = Character.toLowerCase(c);
+ if ((c != lc) || (lowerChars != null)) {
+ if (lowerChars == null) {
+ System.arraycopy(
+ chars,
+ 0,
+ lowerChars = new char[length],
+ 0,
+ i);
+ }
+ lowerChars[i] = lc;
+ }
+ }
+ return lowerChars == null ? chars : lowerChars;
+ }
+
+ /**
+ * Answers a new array removing leading and trailing spaces (' '). Answers the given array if there is no
+ * space characters to remove.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * chars = { ' ', 'a' , 'b', ' ', ' ' }
+ * result => { 'a' , 'b' }
+ * </pre>
+ * </li>
+ * <li><pre>
+ * array = { 'A', 'b' }
+ * result => { 'A' , 'b' }
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param chars the given array
+ * @return a new array removing leading and trailing spaces (' ')
+ */
+ final static public char[] trim(char[] chars) {
+
+ if (chars == null)
+ return null;
+
+ int start = 0, length = chars.length, end = length - 1;
+ while (start < length && chars[start] == ' ') {
+ start++;
+ }
+ while (end > start && chars[end] == ' ') {
+ end--;
+ }
+ if (start != 0 || end != length - 1) {
+ return subarray(chars, start, end + 1);
+ }
+ return chars;
+ }
+
+ /**
+ * Answers a string which is the concatenation of the given array using the '.' as a separator.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * array = { { 'a' } , { 'b' } }
+ * result => "a.b"
+ * </pre>
+ * </li>
+ * <li><pre>
+ * array = { { ' ', 'a' } , { 'b' } }
+ * result => " a.b"
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param array the given array
+ * @return a string which is the concatenation of the given array using the '.' as a separator
+ */
+ final static public String toString(char[][] array) {
+ char[] result = concatWith(array, '.');
+ return new String(result);
+ }
+ /**
+ * Answers an array of strings from the given array of char array.
+ *
+ * @param array the given array
+ * @return an array of strings
+ * @since 3.0
+ */
+ final static public String[] toStrings(char[][] array) {
+ if (array == null) return NO_STRINGS;
+ int length = array.length;
+ if (length == 0) return NO_STRINGS;
+ String[] result = new String[length];
+ for (int i = 0; i < length; i++)
+ result[i] = new String(array[i]);
+ return result;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/core/compiler/IProblem.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/core/compiler/IProblem.js
new file mode 100644
index 0000000..f0b0899
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/core/compiler/IProblem.js
@@ -0,0 +1,983 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * IBM Corporation - added the following constants
+ * NonStaticAccessToStaticField
+ * NonStaticAccessToStaticMethod
+ * Task
+ * ExpressionShouldBeAVariable
+ * AssignmentHasNoEffect
+ * IBM Corporation - added the following constants
+ * TooManySyntheticArgumentSlots
+ * TooManyArrayDimensions
+ * TooManyBytesForStringConstant
+ * TooManyMethods
+ * TooManyFields
+ * NonBlankFinalLocalAssignment
+ * ObjectCannotHaveSuperTypes
+ * MissingSemiColon
+ * InvalidParenthesizedExpression
+ * EnclosingInstanceInConstructorCall
+ * BytecodeExceeds64KLimitForConstructor
+ * IncompatibleReturnTypeForNonInheritedInterfaceMethod
+ * UnusedPrivateMethod
+ * UnusedPrivateConstructor
+ * UnusedPrivateType
+ * UnusedPrivateField
+ * IncompatibleExceptionInThrowsClauseForNonInheritedInterfaceMethod
+ * InvalidExplicitConstructorCall
+ * IBM Corporation - added the following constants
+ * PossibleAccidentalBooleanAssignment
+ * SuperfluousSemicolon
+ * IndirectAccessToStaticField
+ * IndirectAccessToStaticMethod
+ * IndirectAccessToStaticType
+ * BooleanMethodThrowingException
+ * UnnecessaryCast
+ * UnnecessaryArgumentCast
+ * UnnecessaryInstanceof
+ * FinallyMustCompleteNormally
+ * UnusedMethodDeclaredThrownException
+ * UnusedConstructorDeclaredThrownException
+ * InvalidCatchBlockSequence
+ * UnqualifiedFieldAccess
+ * IBM Corporation - added the following constants
+ * Javadoc
+ * JavadocUnexpectedTag
+ * JavadocMissingParamTag
+ * JavadocMissingParamName
+ * JavadocDuplicateParamName
+ * JavadocInvalidParamName
+ * JavadocMissingReturnTag
+ * JavadocDuplicateReturnTag
+ * JavadocMissingThrowsTag
+ * JavadocMissingThrowsClassName
+ * JavadocInvalidThrowsClass
+ * JavadocDuplicateThrowsClassName
+ * JavadocInvalidThrowsClassName
+ * JavadocMissingSeeReference
+ * JavadocInvalidSeeReference
+ * JavadocInvalidSeeHref
+ * JavadocInvalidSeeArgs
+ * JavadocMissing
+ * JavadocInvalidTag
+ * JavadocMessagePrefix
+ * EmptyControlFlowStatement
+ * IBM Corporation - added the following constants
+ * IllegalUsageOfQualifiedTypeReference
+ * InvalidDigit
+ ****************************************************************************/
+package org.eclipse.wst.jsdt.core.compiler;
+
+import org.eclipse.wst.jsdt.internal.compiler.lookup.ProblemReasons;
+
+/**
+ * Description of a Java problem, as detected by the compiler or some of the underlying
+ * technology reusing the compiler.
+ * A problem provides access to:
+ * <ul>
+ * <li> its location (originating source file name, source position, line number), </li>
+ * <li> its message description and a predicate to check its severity (warning or error). </li>
+ * <li> its ID : an number identifying the very nature of this problem. All possible IDs are listed
+ * as constants on this interface. </li>
+ * </ul>
+ *
+ * Note: the compiler produces IProblems internally, which are turned into markers by the JavaBuilder
+ * so as to persist problem descriptions. This explains why there is no API allowing to reach IProblem detected
+ * when compiling. However, the Java problem markers carry equivalent information to IProblem, in particular
+ * their ID (attribute "id") is set to one of the IDs defined on this interface.
+ *
+ * @since 2.0
+ */
+public interface IProblem {
+
+ /**
+ * Answer back the original arguments recorded into the problem.
+ * @return the original arguments recorded into the problem
+ */
+ String[] getArguments();
+
+ /**
+ * Returns the problem id
+ *
+ * @return the problem id
+ */
+ int getID();
+
+ /**
+ * Answer a localized, human-readable message string which describes the problem.
+ *
+ * @return a localized, human-readable message string which describes the problem
+ */
+ String getMessage();
+
+ /**
+ * Answer the file name in which the problem was found.
+ *
+ * @return the file name in which the problem was found
+ */
+ char[] getOriginatingFileName();
+
+ /**
+ * Answer the end position of the problem (inclusive), or -1 if unknown.
+ *
+ * @return the end position of the problem (inclusive), or -1 if unknown
+ */
+ int getSourceEnd();
+
+ /**
+ * Answer the line number in source where the problem begins.
+ *
+ * @return the line number in source where the problem begins
+ */
+ int getSourceLineNumber();
+
+ /**
+ * Answer the start position of the problem (inclusive), or -1 if unknown.
+ *
+ * @return the start position of the problem (inclusive), or -1 if unknown
+ */
+ int getSourceStart();
+
+ /**
+ * Checks the severity to see if the Error bit is set.
+ *
+ * @return true if the Error bit is set for the severity, false otherwise
+ */
+ boolean isError();
+
+ /**
+ * Checks the severity to see if the Error bit is not set.
+ *
+ * @return true if the Error bit is not set for the severity, false otherwise
+ */
+ boolean isWarning();
+
+ /**
+ * Set the end position of the problem (inclusive), or -1 if unknown.
+ * Used for shifting problem positions.
+ *
+ * @param sourceEnd the given end position
+ */
+ void setSourceEnd(int sourceEnd);
+
+ /**
+ * Set the line number in source where the problem begins.
+ *
+ * @param lineNumber the given line number
+ */
+ void setSourceLineNumber(int lineNumber);
+
+ /**
+ * Set the start position of the problem (inclusive), or -1 if unknown.
+ * Used for shifting problem positions.
+ *
+ * @param sourceStart the given start position
+ */
+ void setSourceStart(int sourceStart);
+
+ /**
+ * Problem Categories
+ * The high bits of a problem ID contains information about the category of a problem.
+ * For example, (problemID & TypeRelated) != 0, indicates that this problem is type related.
+ *
+ * A problem category can help to implement custom problem filters. Indeed, when numerous problems
+ * are listed, focusing on import related problems first might be relevant.
+ *
+ * When a problem is tagged as Internal, it means that no change other than a local source code change
+ * can fix the corresponding problem.
+ */
+ int TypeRelated = 0x01000000;
+ int FieldRelated = 0x02000000;
+ int MethodRelated = 0x04000000;
+ int ConstructorRelated = 0x08000000;
+ int ImportRelated = 0x10000000;
+ int Internal = 0x20000000;
+ int Syntax = 0x40000000;
+ /**
+ * @since 3.0
+ */
+ int Javadoc = 0x80000000;
+
+ /**
+ * Mask to use in order to filter out the category portion of the problem ID.
+ */
+ int IgnoreCategoriesMask = 0xFFFFFF;
+
+ /**
+ * Below are listed all available problem IDs. Note that this list could be augmented in the future,
+ * as new features are added to the Java core implementation.
+ */
+
+ /**
+ * ID reserved for referencing an internal error inside the JavaCore implementation which
+ * may be surfaced as a problem associated with the compilation unit which caused it to occur.
+ */
+ int Unclassified = 0;
+
+ /**
+ * General type related problems
+ */
+ int ObjectHasNoSuperclass = TypeRelated + 1;
+ int UndefinedType = TypeRelated + 2;
+ int NotVisibleType = TypeRelated + 3;
+ int AmbiguousType = TypeRelated + 4;
+ int UsingDeprecatedType = TypeRelated + 5;
+ int InternalTypeNameProvided = TypeRelated + 6;
+ /** @since 2.1 */
+ int UnusedPrivateType = Internal + TypeRelated + 7;
+
+ int IncompatibleTypesInEqualityOperator = TypeRelated + 15;
+ int IncompatibleTypesInConditionalOperator = TypeRelated + 16;
+ int TypeMismatch = TypeRelated + 17;
+ /** @since 3.0 */
+ int IndirectAccessToStaticType = Internal + TypeRelated + 18;
+
+ /**
+ * Inner types related problems
+ */
+ int MissingEnclosingInstanceForConstructorCall = TypeRelated + 20;
+ int MissingEnclosingInstance = TypeRelated + 21;
+ int IncorrectEnclosingInstanceReference = TypeRelated + 22;
+ int IllegalEnclosingInstanceSpecification = TypeRelated + 23;
+ int CannotDefineStaticInitializerInLocalType = Internal + 24;
+ int OuterLocalMustBeFinal = Internal + 25;
+ int CannotDefineInterfaceInLocalType = Internal + 26;
+ int IllegalPrimitiveOrArrayTypeForEnclosingInstance = TypeRelated + 27;
+ /** @since 2.1 */
+ int EnclosingInstanceInConstructorCall = Internal + 28;
+ int AnonymousClassCannotExtendFinalClass = TypeRelated + 29;
+
+ // variables
+ int UndefinedName = 50;
+ int UninitializedLocalVariable = Internal + 51;
+ int VariableTypeCannotBeVoid = Internal + 52;
+ int VariableTypeCannotBeVoidArray = Internal + 53;
+ int CannotAllocateVoidArray = Internal + 54;
+ // local variables
+ int RedefinedLocal = Internal + 55;
+ int RedefinedArgument = Internal + 56;
+ // final local variables
+ int DuplicateFinalLocalInitialization = Internal + 57;
+ /** @since 2.1 */
+ int NonBlankFinalLocalAssignment = Internal + 58;
+
+ int FinalOuterLocalAssignment = Internal + 60;
+ int LocalVariableIsNeverUsed = Internal + 61;
+ int ArgumentIsNeverUsed = Internal + 62;
+ int BytecodeExceeds64KLimit = Internal + 63;
+ int BytecodeExceeds64KLimitForClinit = Internal + 64;
+ int TooManyArgumentSlots = Internal + 65;
+ int TooManyLocalVariableSlots = Internal + 66;
+ /** @since 2.1 */
+ int TooManySyntheticArgumentSlots = Internal + 67;
+ /** @since 2.1 */
+ int TooManyArrayDimensions = Internal + 68;
+ /** @since 2.1 */
+ int BytecodeExceeds64KLimitForConstructor = Internal + 69;
+
+ // fields
+ int UndefinedField = FieldRelated + 70;
+ int NotVisibleField = FieldRelated + 71;
+ int AmbiguousField = FieldRelated + 72;
+ int UsingDeprecatedField = FieldRelated + 73;
+ int NonStaticFieldFromStaticInvocation = FieldRelated + 74;
+ int ReferenceToForwardField = FieldRelated + Internal + 75;
+ /** @since 2.1 */
+ int NonStaticAccessToStaticField = Internal + FieldRelated + 76;
+ /** @since 2.1 */
+ int UnusedPrivateField = Internal + FieldRelated + 77;
+ /** @since 3.0 */
+ int IndirectAccessToStaticField = Internal + FieldRelated + 78;
+ /** @since 3.0 */
+ int UnqualifiedFieldAccess = Internal + FieldRelated + 79;
+
+ // blank final fields
+ int FinalFieldAssignment = FieldRelated + 80;
+ int UninitializedBlankFinalField = FieldRelated + 81;
+ int DuplicateBlankFinalFieldInitialization = FieldRelated + 82;
+
+ // variable hiding
+ /**
+ * The local variable {0} is hiding another local variable defined in an enclosing type scope
+ * @since 3.0
+ */
+ int LocalVariableHidingLocalVariable = Internal + 90;
+
+ /**
+ * The local variable {0} is hiding the field {1}.{2}
+ * @since 3.0
+ */
+ int LocalVariableHidingField = Internal + FieldRelated + 91;
+
+ /**
+ * The field {0}.{1} is hiding another local variable defined in an enclosing type scope
+ * @since 3.0
+ */
+ int FieldHidingLocalVariable = Internal + FieldRelated + 92;
+
+ /**
+ * The field {0}.{1} is hiding the field {2}.{3}
+ * @since 3.0
+ */
+ int FieldHidingField = Internal + FieldRelated + 93;
+
+ /**
+ * The argument {0} is hiding another local variable defined in an enclosing type scope
+ * @since 3.0
+ */
+ int ArgumentHidingLocalVariable = Internal + 94;
+
+ /**
+ * The argument {0} is hiding the field {2}.{3}
+ * @since 3.0
+ */
+ int ArgumentHidingField = Internal + 95;
+ /** @since 3.1 */
+ int MissingSerialVersion = Internal + 96;
+
+ // methods
+ int UndefinedMethod = MethodRelated + 100;
+ int NotVisibleMethod = MethodRelated + 101;
+ int AmbiguousMethod = MethodRelated + 102;
+ int UsingDeprecatedMethod = MethodRelated + 103;
+ int DirectInvocationOfAbstractMethod = MethodRelated + 104;
+ int VoidMethodReturnsValue = MethodRelated + 105;
+ int MethodReturnsVoid = MethodRelated + 106;
+ int MethodRequiresBody = Internal + MethodRelated + 107;
+ int ShouldReturnValue = Internal + MethodRelated + 108;
+ int MethodButWithConstructorName = MethodRelated + 110;
+ int MissingReturnType = TypeRelated + 111;
+ int BodyForNativeMethod = Internal + MethodRelated + 112;
+ int BodyForAbstractMethod = Internal + MethodRelated + 113;
+ int NoMessageSendOnBaseType = MethodRelated + 114;
+ int ParameterMismatch = MethodRelated + 115;
+ int NoMessageSendOnArrayType = MethodRelated + 116;
+ /** @since 2.1 */
+ int NonStaticAccessToStaticMethod = Internal + MethodRelated + 117;
+ /** @since 2.1 */
+ int UnusedPrivateMethod = Internal + MethodRelated + 118;
+ /** @since 3.0 */
+ int IndirectAccessToStaticMethod = Internal + MethodRelated + 119;
+
+
+ // constructors
+ int UndefinedConstructor = ConstructorRelated + 130;
+ int NotVisibleConstructor = ConstructorRelated + 131;
+ int AmbiguousConstructor = ConstructorRelated + 132;
+ int UsingDeprecatedConstructor = ConstructorRelated + 133;
+ /** @since 2.1 */
+ int UnusedPrivateConstructor = Internal + MethodRelated + 134;
+ // explicit constructor calls
+ int InstanceFieldDuringConstructorInvocation = ConstructorRelated + 135;
+ int InstanceMethodDuringConstructorInvocation = ConstructorRelated + 136;
+ int RecursiveConstructorInvocation = ConstructorRelated + 137;
+ int ThisSuperDuringConstructorInvocation = ConstructorRelated + 138;
+ /** @since 3.0 */
+ int InvalidExplicitConstructorCall = ConstructorRelated + Syntax + 139;
+ // implicit constructor calls
+ int UndefinedConstructorInDefaultConstructor = ConstructorRelated + 140;
+ int NotVisibleConstructorInDefaultConstructor = ConstructorRelated + 141;
+ int AmbiguousConstructorInDefaultConstructor = ConstructorRelated + 142;
+ int UndefinedConstructorInImplicitConstructorCall = ConstructorRelated + 143;
+ int NotVisibleConstructorInImplicitConstructorCall = ConstructorRelated + 144;
+ int AmbiguousConstructorInImplicitConstructorCall = ConstructorRelated + 145;
+ int UnhandledExceptionInDefaultConstructor = TypeRelated + 146;
+ int UnhandledExceptionInImplicitConstructorCall = TypeRelated + 147;
+
+ // expressions
+ int ArrayReferenceRequired = Internal + 150;
+ int NoImplicitStringConversionForCharArrayExpression = Internal + 151;
+ // constant expressions
+ int StringConstantIsExceedingUtf8Limit = Internal + 152;
+ int NonConstantExpression = 153;
+ int NumericValueOutOfRange = Internal + 154;
+ // cast expressions
+ int IllegalCast = TypeRelated + 156;
+ // allocations
+ int InvalidClassInstantiation = TypeRelated + 157;
+ int CannotDefineDimensionExpressionsWithInit = Internal + 158;
+ int MustDefineEitherDimensionExpressionsOrInitializer = Internal + 159;
+ // operators
+ int InvalidOperator = Internal + 160;
+ // statements
+ int CodeCannotBeReached = Internal + 161;
+ int CannotReturnInInitializer = Internal + 162;
+ int InitializerMustCompleteNormally = Internal + 163;
+ // assert
+ int InvalidVoidExpression = Internal + 164;
+ // try
+ int MaskedCatch = TypeRelated + 165;
+ int DuplicateDefaultCase = 166;
+ int UnreachableCatch = TypeRelated + MethodRelated + 167;
+ int UnhandledException = TypeRelated + 168;
+ // switch
+ int IncorrectSwitchType = TypeRelated + 169;
+ int DuplicateCase = FieldRelated + 170;
+ // labelled
+ int DuplicateLabel = Internal + 171;
+ int InvalidBreak = Internal + 172;
+ int InvalidContinue = Internal + 173;
+ int UndefinedLabel = Internal + 174;
+ //synchronized
+ int InvalidTypeToSynchronized = Internal + 175;
+ int InvalidNullToSynchronized = Internal + 176;
+ // throw
+ int CannotThrowNull = Internal + 177;
+ // assignment
+ /** @since 2.1 */
+ int AssignmentHasNoEffect = Internal + 178;
+ /** @since 3.0 */
+ int PossibleAccidentalBooleanAssignment = Internal + 179;
+ /** @since 3.0 */
+ int SuperfluousSemicolon = Internal + 180;
+ /** @since 3.0 */
+ int UnnecessaryCast = Internal + TypeRelated + 181;
+ /** @since 3.0 */
+ int UnnecessaryArgumentCast = Internal + TypeRelated + 182;
+ /** @since 3.0 */
+ int UnnecessaryInstanceof = Internal + TypeRelated + 183;
+ /** @since 3.0 */
+ int FinallyMustCompleteNormally = Internal + 184;
+ /** @since 3.0 */
+ int UnusedMethodDeclaredThrownException = Internal + 185;
+ /** @since 3.0 */
+ int UnusedConstructorDeclaredThrownException = Internal + 186;
+ /** @since 3.0 */
+ int InvalidCatchBlockSequence = Internal + TypeRelated + 187;
+ /** @since 3.0 */
+ int EmptyControlFlowStatement = Internal + TypeRelated + 188;
+ /** @since 3.0 */
+ int UnnecessaryElse = Internal + 189;
+
+ // inner emulation
+ int NeedToEmulateFieldReadAccess = FieldRelated + 190;
+ int NeedToEmulateFieldWriteAccess = FieldRelated + 191;
+ int NeedToEmulateMethodAccess = MethodRelated + 192;
+ int NeedToEmulateConstructorAccess = MethodRelated + 193;
+
+ //inherited name hides enclosing name (sort of ambiguous)
+ int InheritedMethodHidesEnclosingName = MethodRelated + 195;
+ int InheritedFieldHidesEnclosingName = FieldRelated + 196;
+ int InheritedTypeHidesEnclosingName = TypeRelated + 197;
+
+ /** @since 3.1 */
+ int IllegalUsageOfQualifiedTypeReference = Internal + Syntax + 198;
+
+ // miscellaneous
+ int ThisInStaticContext = Internal + 200;
+ int StaticMethodRequested = Internal + MethodRelated + 201;
+ int IllegalDimension = Internal + 202;
+ int InvalidTypeExpression = Internal + 203;
+ int ParsingError = Syntax + Internal + 204;
+ int ParsingErrorNoSuggestion = Syntax + Internal + 205;
+ int InvalidUnaryExpression = Syntax + Internal + 206;
+
+ // syntax errors
+ int InterfaceCannotHaveConstructors = Syntax + Internal + 207;
+ int ArrayConstantsOnlyInArrayInitializers = Syntax + Internal + 208;
+ int ParsingErrorOnKeyword = Syntax + Internal + 209;
+ int ParsingErrorOnKeywordNoSuggestion = Syntax + Internal + 210;
+
+ int UnmatchedBracket = Syntax + Internal + 220;
+ int NoFieldOnBaseType = FieldRelated + 221;
+ int InvalidExpressionAsStatement = Syntax + Internal + 222;
+ /** @since 2.1 */
+ int ExpressionShouldBeAVariable = Syntax + Internal + 223;
+ /** @since 2.1 */
+ int MissingSemiColon = Syntax + Internal + 224;
+ /** @since 2.1 */
+ int InvalidParenthesizedExpression = Syntax + Internal + 225;
+
+ /** @since 3.0 */
+ int ParsingErrorInsertTokenBefore = Syntax + Internal + 230;
+ /** @since 3.0 */
+ int ParsingErrorInsertTokenAfter = Syntax + Internal + 231;
+ /** @since 3.0 */
+ int ParsingErrorDeleteToken = Syntax + Internal + 232;
+ /** @since 3.0 */
+ int ParsingErrorDeleteTokens = Syntax + Internal + 233;
+ /** @since 3.0 */
+ int ParsingErrorMergeTokens = Syntax + Internal + 234;
+ /** @since 3.0 */
+ int ParsingErrorInvalidToken = Syntax + Internal + 235;
+ /** @since 3.0 */
+ int ParsingErrorMisplacedConstruct = Syntax + Internal + 236;
+ /** @since 3.0 */
+ int ParsingErrorReplaceTokens = Syntax + Internal + 237;
+ /** @since 3.0 */
+ int ParsingErrorNoSuggestionForTokens = Syntax + Internal + 238;
+ /** @since 3.0 */
+ int ParsingErrorUnexpectedEOF = Syntax + Internal + 239;
+ /** @since 3.0 */
+ int ParsingErrorInsertToComplete = Syntax + Internal + 240;
+ /** @since 3.0 */
+ int ParsingErrorInsertToCompleteScope = Syntax + Internal + 241;
+ /** @since 3.0 */
+ int ParsingErrorInsertToCompletePhrase = Syntax + Internal + 242;
+
+ // scanner errors
+ int EndOfSource = Syntax + Internal + 250;
+ int InvalidHexa = Syntax + Internal + 251;
+ int InvalidOctal = Syntax + Internal + 252;
+ int InvalidCharacterConstant = Syntax + Internal + 253;
+ int InvalidEscape = Syntax + Internal + 254;
+ int InvalidInput = Syntax + Internal + 255;
+ int InvalidUnicodeEscape = Syntax + Internal + 256;
+ int InvalidFloat = Syntax + Internal + 257;
+ int NullSourceString = Syntax + Internal + 258;
+ int UnterminatedString = Syntax + Internal + 259;
+ int UnterminatedComment = Syntax + Internal + 260;
+ /** @since 3.1 */
+ int InvalidDigit = Syntax + Internal + 262;
+
+ // type related problems
+ int InterfaceCannotHaveInitializers = TypeRelated + 300;
+ int DuplicateModifierForType = TypeRelated + 301;
+ int IllegalModifierForClass = TypeRelated + 302;
+ int IllegalModifierForInterface = TypeRelated + 303;
+ int IllegalModifierForMemberClass = TypeRelated + 304;
+ int IllegalModifierForMemberInterface = TypeRelated + 305;
+ int IllegalModifierForLocalClass = TypeRelated + 306;
+ int ForbiddenReference = TypeRelated + 307;
+ int IllegalModifierCombinationFinalAbstractForClass = TypeRelated + 308;
+ int IllegalVisibilityModifierForInterfaceMemberType = TypeRelated + 309;
+ int IllegalVisibilityModifierCombinationForMemberType = TypeRelated + 310;
+ int IllegalStaticModifierForMemberType = TypeRelated + 311;
+ int SuperclassMustBeAClass = TypeRelated + 312;
+ int ClassExtendFinalClass = TypeRelated + 313;
+ int DuplicateSuperInterface = TypeRelated + 314;
+ int SuperInterfaceMustBeAnInterface = TypeRelated + 315;
+ int HierarchyCircularitySelfReference = TypeRelated + 316;
+ int HierarchyCircularity = TypeRelated + 317;
+ int HidingEnclosingType = TypeRelated + 318;
+ int DuplicateNestedType = TypeRelated + 319;
+ int CannotThrowType = TypeRelated + 320;
+ int PackageCollidesWithType = TypeRelated + 321;
+ int TypeCollidesWithPackage = TypeRelated + 322;
+ int DuplicateTypes = TypeRelated + 323;
+ int IsClassPathCorrect = TypeRelated + 324;
+ int PublicClassMustMatchFileName = TypeRelated + 325;
+ int MustSpecifyPackage = 326;
+ int HierarchyHasProblems = TypeRelated + 327;
+ int PackageIsNotExpectedPackage = 328;
+ /** @since 2.1 */
+ int ObjectCannotHaveSuperTypes = 329;
+
+ /** @deprecated - problem is no longer generated, UndefinedType is used instead */
+ int SuperclassNotFound = TypeRelated + 329 + ProblemReasons.NotFound; // TypeRelated + 330
+ /** @deprecated - problem is no longer generated, NotVisibleType is used instead */
+ int SuperclassNotVisible = TypeRelated + 329 + ProblemReasons.NotVisible; // TypeRelated + 331
+ /** @deprecated - problem is no longer generated, use AmbiguousType is used instead */
+ int SuperclassAmbiguous = TypeRelated + 329 + ProblemReasons.Ambiguous; // TypeRelated + 332
+ /** @deprecated - problem is no longer generated, use InternalTypeNameProvided is used instead */
+ int SuperclassInternalNameProvided = TypeRelated + 329 + ProblemReasons.InternalNameProvided; // TypeRelated + 333
+ /** @deprecated - problem is no longer generated, use InheritedTypeHidesEnclosingName is used instead */
+ int SuperclassInheritedNameHidesEnclosingName = TypeRelated + 329 + ProblemReasons.InheritedNameHidesEnclosingName; // TypeRelated + 334
+
+ /** @deprecated - problem is no longer generated, UndefinedType is used instead */
+ int InterfaceNotFound = TypeRelated + 334 + ProblemReasons.NotFound; // TypeRelated + 335
+ /** @deprecated - problem is no longer generated, NotVisibleType is used instead */
+ int InterfaceNotVisible = TypeRelated + 334 + ProblemReasons.NotVisible; // TypeRelated + 336
+ /** @deprecated - problem is no longer generated, use AmbiguousType is used instead */
+ int InterfaceAmbiguous = TypeRelated + 334 + ProblemReasons.Ambiguous; // TypeRelated + 337
+ /** @deprecated - problem is no longer generated, use InternalTypeNameProvided is used instead */
+ int InterfaceInternalNameProvided = TypeRelated + 334 + ProblemReasons.InternalNameProvided; // TypeRelated + 338
+ /** @deprecated - problem is no longer generated, use InheritedTypeHidesEnclosingName is used instead */
+ int InterfaceInheritedNameHidesEnclosingName = TypeRelated + 334 + ProblemReasons.InheritedNameHidesEnclosingName; // TypeRelated + 339
+
+ // field related problems
+ int DuplicateField = FieldRelated + 340;
+ int DuplicateModifierForField = FieldRelated + 341;
+ int IllegalModifierForField = FieldRelated + 342;
+ int IllegalModifierForInterfaceField = FieldRelated + 343;
+ int IllegalVisibilityModifierCombinationForField = FieldRelated + 344;
+ int IllegalModifierCombinationFinalVolatileForField = FieldRelated + 345;
+ int UnexpectedStaticModifierForField = FieldRelated + 346;
+
+ /** @deprecated - problem is no longer generated, UndefinedType is used instead */
+ int FieldTypeNotFound = FieldRelated + 349 + ProblemReasons.NotFound; // FieldRelated + 350
+ /** @deprecated - problem is no longer generated, NotVisibleType is used instead */
+ int FieldTypeNotVisible = FieldRelated + 349 + ProblemReasons.NotVisible; // FieldRelated + 351
+ /** @deprecated - problem is no longer generated, use AmbiguousType is used instead */
+ int FieldTypeAmbiguous = FieldRelated + 349 + ProblemReasons.Ambiguous; // FieldRelated + 352
+ /** @deprecated - problem is no longer generated, use InternalTypeNameProvided is used instead */
+ int FieldTypeInternalNameProvided = FieldRelated + 349 + ProblemReasons.InternalNameProvided; // FieldRelated + 353
+ /** @deprecated - problem is no longer generated, use InheritedTypeHidesEnclosingName is used instead */
+ int FieldTypeInheritedNameHidesEnclosingName = FieldRelated + 349 + ProblemReasons.InheritedNameHidesEnclosingName; // FieldRelated + 354
+
+ // method related problems
+ int DuplicateMethod = MethodRelated + 355;
+ int IllegalModifierForArgument = MethodRelated + 356;
+ int DuplicateModifierForMethod = MethodRelated + 357;
+ int IllegalModifierForMethod = MethodRelated + 358;
+ int IllegalModifierForInterfaceMethod = MethodRelated + 359;
+ int IllegalVisibilityModifierCombinationForMethod = MethodRelated + 360;
+ int UnexpectedStaticModifierForMethod = MethodRelated + 361;
+ int IllegalAbstractModifierCombinationForMethod = MethodRelated + 362;
+ int AbstractMethodInAbstractClass = MethodRelated + 363;
+ int ArgumentTypeCannotBeVoid = MethodRelated + 364;
+ int ArgumentTypeCannotBeVoidArray = MethodRelated + 365;
+ int ReturnTypeCannotBeVoidArray = MethodRelated + 366;
+ int NativeMethodsCannotBeStrictfp = MethodRelated + 367;
+ int DuplicateModifierForArgument = MethodRelated + 368;
+
+ /** @deprecated - problem is no longer generated, UndefinedType is used instead */
+ int ArgumentTypeNotFound = MethodRelated + 369 + ProblemReasons.NotFound; // MethodRelated + 370
+ /** @deprecated - problem is no longer generated, NotVisibleType is used instead */
+ int ArgumentTypeNotVisible = MethodRelated + 369 + ProblemReasons.NotVisible; // MethodRelated + 371
+ /** @deprecated - problem is no longer generated, use AmbiguousType is used instead */
+ int ArgumentTypeAmbiguous = MethodRelated + 369 + ProblemReasons.Ambiguous; // MethodRelated + 372
+ /** @deprecated - problem is no longer generated, use InternalTypeNameProvided is used instead */
+ int ArgumentTypeInternalNameProvided = MethodRelated + 369 + ProblemReasons.InternalNameProvided; // MethodRelated + 373
+ /** @deprecated - problem is no longer generated, use InheritedTypeHidesEnclosingName is used instead */
+ int ArgumentTypeInheritedNameHidesEnclosingName = MethodRelated + 369 + ProblemReasons.InheritedNameHidesEnclosingName; // MethodRelated + 374
+
+ /** @deprecated - problem is no longer generated, UndefinedType is used instead */
+ int ExceptionTypeNotFound = MethodRelated + 374 + ProblemReasons.NotFound; // MethodRelated + 375
+ /** @deprecated - problem is no longer generated, NotVisibleType is used instead */
+ int ExceptionTypeNotVisible = MethodRelated + 374 + ProblemReasons.NotVisible; // MethodRelated + 376
+ /** @deprecated - problem is no longer generated, use AmbiguousType is used instead */
+ int ExceptionTypeAmbiguous = MethodRelated + 374 + ProblemReasons.Ambiguous; // MethodRelated + 377
+ /** @deprecated - problem is no longer generated, use InternalTypeNameProvided is used instead */
+ int ExceptionTypeInternalNameProvided = MethodRelated + 374 + ProblemReasons.InternalNameProvided; // MethodRelated + 378
+ /** @deprecated - problem is no longer generated, use InheritedTypeHidesEnclosingName is used instead */
+ int ExceptionTypeInheritedNameHidesEnclosingName = MethodRelated + 374 + ProblemReasons.InheritedNameHidesEnclosingName; // MethodRelated + 379
+
+ /** @deprecated - problem is no longer generated, UndefinedType is used instead */
+ int ReturnTypeNotFound = MethodRelated + 379 + ProblemReasons.NotFound; // MethodRelated + 380
+ /** @deprecated - problem is no longer generated, NotVisibleType is used instead */
+ int ReturnTypeNotVisible = MethodRelated + 379 + ProblemReasons.NotVisible; // MethodRelated + 381
+ /** @deprecated - problem is no longer generated, use AmbiguousType is used instead */
+ int ReturnTypeAmbiguous = MethodRelated + 379 + ProblemReasons.Ambiguous; // MethodRelated + 382
+ /** @deprecated - problem is no longer generated, use InternalTypeNameProvided is used instead */
+ int ReturnTypeInternalNameProvided = MethodRelated + 379 + ProblemReasons.InternalNameProvided; // MethodRelated + 383
+ /** @deprecated - problem is no longer generated, use InheritedTypeHidesEnclosingName is used instead */
+ int ReturnTypeInheritedNameHidesEnclosingName = MethodRelated + 379 + ProblemReasons.InheritedNameHidesEnclosingName; // MethodRelated + 384
+
+ // import related problems
+ int ConflictingImport = ImportRelated + 385;
+ int DuplicateImport = ImportRelated + 386;
+ int CannotImportPackage = ImportRelated + 387;
+ int UnusedImport = ImportRelated + 388;
+
+ int ImportNotFound = ImportRelated + 389 + ProblemReasons.NotFound; // ImportRelated + 390
+ /** @deprecated - problem is no longer generated, NotVisibleType is used instead */
+ int ImportNotVisible = ImportRelated + 389 + ProblemReasons.NotVisible; // ImportRelated + 391
+ /** @deprecated - problem is no longer generated, use AmbiguousType is used instead */
+ int ImportAmbiguous = ImportRelated + 389 + ProblemReasons.Ambiguous; // ImportRelated + 392
+ /** @deprecated - problem is no longer generated, use InternalTypeNameProvided is used instead */
+ int ImportInternalNameProvided = ImportRelated + 389 + ProblemReasons.InternalNameProvided; // ImportRelated + 393
+ /** @deprecated - problem is no longer generated, use InheritedTypeHidesEnclosingName is used instead */
+ int ImportInheritedNameHidesEnclosingName = ImportRelated + 389 + ProblemReasons.InheritedNameHidesEnclosingName; // ImportRelated + 394
+
+ // local variable related problems
+ int DuplicateModifierForVariable = MethodRelated + 395;
+ int IllegalModifierForVariable = MethodRelated + 396;
+
+ // method verifier problems
+ int AbstractMethodMustBeImplemented = MethodRelated + 400;
+ int FinalMethodCannotBeOverridden = MethodRelated + 401;
+ int IncompatibleExceptionInThrowsClause = MethodRelated + 402;
+ int IncompatibleExceptionInInheritedMethodThrowsClause = MethodRelated + 403;
+ int IncompatibleReturnType = MethodRelated + 404;
+ int InheritedMethodReducesVisibility = MethodRelated + 405;
+ int CannotOverrideAStaticMethodWithAnInstanceMethod = MethodRelated + 406;
+ int CannotHideAnInstanceMethodWithAStaticMethod = MethodRelated + 407;
+ int StaticInheritedMethodConflicts = MethodRelated + 408;
+ int MethodReducesVisibility = MethodRelated + 409;
+ int OverridingNonVisibleMethod = MethodRelated + 410;
+ int AbstractMethodCannotBeOverridden = MethodRelated + 411;
+ int OverridingDeprecatedMethod = MethodRelated + 412;
+ /** @since 2.1 */
+ int IncompatibleReturnTypeForNonInheritedInterfaceMethod = MethodRelated + 413;
+ /** @since 2.1 */
+ int IncompatibleExceptionInThrowsClauseForNonInheritedInterfaceMethod = MethodRelated + 414;
+
+ // code snippet support
+ int CodeSnippetMissingClass = Internal + 420;
+ int CodeSnippetMissingMethod = Internal + 421;
+ int NonExternalizedStringLiteral = Internal + 261;
+ int CannotUseSuperInCodeSnippet = Internal + 422;
+
+ //constant pool
+ int TooManyConstantsInConstantPool = Internal + 430;
+ /** @since 2.1 */
+ int TooManyBytesForStringConstant = Internal + 431;
+
+ // static constraints
+ /** @since 2.1 */
+ int TooManyFields = Internal + 432;
+ /** @since 2.1 */
+ int TooManyMethods = Internal + 433;
+
+ // 1.4 features
+ // assertion warning
+ int UseAssertAsAnIdentifier = Internal + 440;
+
+ // 1.5 features
+ int UseEnumAsAnIdentifier = Internal + 441;
+
+ // detected task
+ /** @since 2.1 */
+ int Task = Internal + 450;
+
+ // block
+ /** @since 3.0 */
+ int UndocumentedEmptyBlock = Internal + 460;
+
+ /*
+ * Javadoc comments
+ */
+ /** @since 3.0 */
+ int JavadocUnexpectedTag = Javadoc + Internal + 470;
+ /** @since 3.0 */
+ int JavadocMissingParamTag = Javadoc + Internal + 471;
+ /** @since 3.0 */
+ int JavadocMissingParamName = Javadoc + Internal + 472;
+ /** @since 3.0 */
+ int JavadocDuplicateParamName = Javadoc + Internal + 473;
+ /** @since 3.0 */
+ int JavadocInvalidParamName = Javadoc + Internal + 474;
+ /** @since 3.0 */
+ int JavadocMissingReturnTag = Javadoc + Internal + 475;
+ /** @since 3.0 */
+ int JavadocDuplicateReturnTag = Javadoc + Internal + 476;
+ /** @since 3.0 */
+ int JavadocMissingThrowsTag = Javadoc + Internal + 477;
+ /** @since 3.0 */
+ int JavadocMissingThrowsClassName = Javadoc + Internal + 478;
+ /** @since 3.0 */
+ int JavadocInvalidThrowsClass = Javadoc + Internal + 479;
+ /** @since 3.0 */
+ int JavadocDuplicateThrowsClassName = Javadoc + Internal + 480;
+ /** @since 3.0 */
+ int JavadocInvalidThrowsClassName = Javadoc + Internal + 481;
+ /** @since 3.0 */
+ int JavadocMissingReference = Javadoc + Internal + 482;
+ /** @since 3.0 */
+ int JavadocInvalidReference = Javadoc + Internal + 483;
+ /** @since 3.0 */
+ int JavadocInvalidSeeHref = Javadoc + Internal + 484;
+ /** @since 3.0 */
+ int JavadocInvalidSeeArgs = Javadoc + Internal + 485;
+ /** @since 3.0 */
+ int JavadocMissing = Javadoc + Internal + 486;
+ /** @since 3.0 */
+ int JavadocInvalidTag = Javadoc + Internal + 487;
+ /*
+ * ID for field errors in Javadoc
+ */
+ /** @since 3.0 */
+ int JavadocUndefinedField = Javadoc + Internal + 488;
+ /** @since 3.0 */
+ int JavadocNotVisibleField = Javadoc + Internal + 489;
+ /** @since 3.0 */
+ int JavadocAmbiguousField = Javadoc + Internal + 490;
+ /** @since 3.0 */
+ int JavadocUsingDeprecatedField = Javadoc + Internal + 491;
+ /*
+ * IDs for constructor errors in Javadoc
+ */
+ /** @since 3.0 */
+ int JavadocUndefinedConstructor = Javadoc + Internal + 492;
+ /** @since 3.0 */
+ int JavadocNotVisibleConstructor = Javadoc + Internal + 493;
+ /** @since 3.0 */
+ int JavadocAmbiguousConstructor = Javadoc + Internal + 494;
+ /** @since 3.0 */
+ int JavadocUsingDeprecatedConstructor = Javadoc + Internal + 495;
+ /*
+ * IDs for method errors in Javadoc
+ */
+ /** @since 3.0 */
+ int JavadocUndefinedMethod = Javadoc + Internal + 496;
+ /** @since 3.0 */
+ int JavadocNotVisibleMethod = Javadoc + Internal + 497;
+ /** @since 3.0 */
+ int JavadocAmbiguousMethod = Javadoc + Internal + 498;
+ /** @since 3.0 */
+ int JavadocUsingDeprecatedMethod = Javadoc + Internal + 499;
+ /** @since 3.0 */
+ int JavadocNoMessageSendOnBaseType = Javadoc + Internal + 500;
+ /** @since 3.0 */
+ int JavadocParameterMismatch = Javadoc + Internal + 501;
+ /** @since 3.0 */
+ int JavadocNoMessageSendOnArrayType = Javadoc + Internal + 502;
+ /*
+ * IDs for type errors in Javadoc
+ */
+ /** @since 3.0 */
+ int JavadocUndefinedType = Javadoc + Internal + 503;
+ /** @since 3.0 */
+ int JavadocNotVisibleType = Javadoc + Internal + 504;
+ /** @since 3.0 */
+ int JavadocAmbiguousType = Javadoc + Internal + 505;
+ /** @since 3.0 */
+ int JavadocUsingDeprecatedType = Javadoc + Internal + 506;
+ /** @since 3.0 */
+ int JavadocInternalTypeNameProvided = Javadoc + Internal + 507;
+ /** @since 3.0 */
+ int JavadocInheritedMethodHidesEnclosingName = Javadoc + Internal + 508;
+ /** @since 3.0 */
+ int JavadocInheritedFieldHidesEnclosingName = Javadoc + Internal + 509;
+ /** @since 3.0 */
+ int JavadocInheritedNameHidesEnclosingTypeName = Javadoc + Internal + 510;
+ /** @since 3.0 */
+ int JavadocAmbiguousMethodReference = Javadoc + Internal + 511;
+ /** @since 3.0 */
+ int JavadocUnterminatedInlineTag = Javadoc + Internal + 512;
+ /** @since 3.0 */
+ int JavadocMissingHashCharacter = Javadoc + Internal + 513;
+ /** @since 3.0 */
+ int JavadocMalformedSeeReference = Javadoc + Internal + 514;
+ /** @since 3.0 */
+ int JavadocEmptyReturnTag = Javadoc + Internal + 515;
+ /** @since 3.1 */
+ int JavadocInvalidValueReference = Javadoc + Internal + 516;
+ /** @since 3.1 */
+ int JavadocUnexpectedText = Javadoc + Internal + 517;
+ /** @since 3.0 */
+ int JavadocMessagePrefix = Internal + 519;
+
+ /**
+ * Generics
+ */
+ /** @since 3.1 */
+ int DuplicateTypeVariable = Internal + 520;
+ /** @since 3.1 */
+ int IllegalTypeVariableSuperReference = Internal + 521;
+ /** @since 3.1 */
+ int TypeVariableReferenceFromStaticContext = Internal + 522;
+ /** @since 3.1 */
+ int ObjectCannotBeGeneric = Internal + 523;
+ /** @since 3.1 */
+ int NonGenericType = TypeRelated + 524;
+ /** @since 3.1 */
+ int IncorrectArityForParameterizedType = TypeRelated + 525;
+ /** @since 3.1 */
+ int TypeArgumentMismatch = TypeRelated + 526;
+ /** @since 3.1 */
+ int DuplicateMethodErasure = TypeRelated + 527;
+ /** @since 3.1 */
+ int ReferenceToForwardTypeVariable = TypeRelated + 528;
+ /** @since 3.1 */
+ int BoundsMustBeAnInterface = TypeRelated + 529;
+ /** @since 3.1 */
+ int UnsafeRawConstructorInvocation = TypeRelated + 530;
+ /** @since 3.1 */
+ int UnsafeRawMethodInvocation = TypeRelated + 531;
+ /** @since 3.1 */
+ int UnsafeRawConversion = TypeRelated + 532;
+ /** @since 3.1 */
+ int InvalidTypeVariableExceptionType = TypeRelated + 533;
+ /** @since 3.1 */
+ int InvalidParameterizedExceptionType = TypeRelated + 534;
+ /** @since 3.1 */
+ int IllegalGenericArray = TypeRelated + 535;
+ /** @since 3.1 */
+ int UnsafeRawFieldAssignment = TypeRelated + 536;
+ /** @since 3.1 */
+ int FinalBoundForTypeVariable = TypeRelated + 537;
+ /** @since 3.1 */
+ int UndefinedTypeVariable = Internal + 538;
+ /** @since 3.1 */
+ int SuperInterfacesCollide = TypeRelated + 539;
+ /** @since 3.1 */
+ int WildcardConstructorInvocation = TypeRelated + 540;
+ /** @since 3.1 */
+ int WildcardMethodInvocation = TypeRelated + 541;
+ /** @since 3.1 */
+ int WildcardFieldAssignment = TypeRelated + 542;
+ /** @since 3.1 */
+ int GenericMethodTypeArgumentMismatch = TypeRelated + 543;
+ /** @since 3.1 */
+ int GenericConstructorTypeArgumentMismatch = TypeRelated + 544;
+ /** @since 3.1 */
+ int UnsafeGenericCast = TypeRelated + 545;
+ /** @since 3.1 */
+ int IllegalInstanceofParameterizedType = Internal + 546;
+ /** @since 3.1 */
+ int IllegalInstanceofTypeParameter = Internal + 547;
+ /** @since 3.1 */
+ int NonGenericMethod = TypeRelated + 548;
+ /** @since 3.1 */
+ int IncorrectArityForParameterizedMethod = TypeRelated + 549;
+ /** @since 3.1 */
+ int ParameterizedMethodArgumentTypeMismatch = TypeRelated + 550;
+ /** @since 3.1 */
+ int NonGenericConstructor = TypeRelated + 551;
+ /** @since 3.1 */
+ int IncorrectArityForParameterizedConstructor = TypeRelated + 552;
+ /** @since 3.1 */
+ int ParameterizedConstructorArgumentTypeMismatch = TypeRelated + 553;
+ /** @since 3.1 */
+ int TypeArgumentsForRawGenericMethod = TypeRelated + 554;
+ /** @since 3.1 */
+ int TypeArgumentsForRawGenericConstructor = TypeRelated + 555;
+ /** @since 3.1 */
+ int SuperTypeUsingWildcard = TypeRelated + 556;
+ /** @since 3.1 */
+ int GenericTypeCannotExtendThrowable = TypeRelated + 557;
+ /** @since 3.1 */
+ int IllegalClassLiteralForTypeVariable = TypeRelated + 558;
+ /** @since 3.1 */
+ int UnsafeReturnTypeOverride = MethodRelated + 559;
+ /** @since 3.1 */
+ int MethodNameClash = MethodRelated + 560;
+ /** @since 3.1 */
+ int RawMemberTypeCannotBeParameterized = TypeRelated + 561;
+ /** @since 3.1 */
+ int MissingArgumentsForParameterizedMemberType = TypeRelated + 562;
+ /** @since 3.1 */
+ int StaticMemberOfParameterizedType = TypeRelated + 563;
+
+ /**
+ * Foreach
+ */
+ /** @since 3.1 */
+ int IncompatibleTypesInForeach = TypeRelated + 580;
+ /** @since 3.1 */
+ int InvalidTypeForCollection = Internal + 581;
+
+ /**
+ * 1.5 Syntax errors (when source level < 1.5)
+ */
+ /** @since 3.1 */
+ int InvalidUsageOfTypeParameters = Syntax + Internal + 590;
+ /** @since 3.1 */
+ int InvalidUsageOfStaticImports = Syntax + Internal + 591;
+ /** @since 3.1 */
+ int InvalidUsageOfForeachStatements = Syntax + Internal + 592;
+ /** @since 3.1 */
+ int InvalidUsageOfTypeArguments = Syntax + Internal + 593;
+ /** @since 3.1 */
+ int InvalidUsageOfEnumDeclarations = Syntax + Internal + 594;
+ /** @since 3.1 */
+ int InvalidUsageOfVarargs = Syntax + Internal + 595;
+ /** @since 3.1 */
+ int InvalidUsageOfAnnotations = Syntax + Internal + 596;
+ /** @since 3.1 */
+ int InvalidUsageOfAnnotationDeclarations = Syntax + Internal + 597;
+
+ /**
+ * Annotation
+ */
+ /** @since 3.0 */
+ int AnnotationButConstructorName = MethodRelated + 600;
+ /** @since 3.0 */
+ int IllegalExtendedDimensions = MethodRelated + 601;
+ /** @since 3.0 */
+ int InvalidFileNameForPackageAnnotations = Syntax + Internal + 602;
+
+ /**
+ * Corrupted binaries
+ */
+ int CorruptedSignature = Internal + 700;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/core/compiler/InvalidInputException.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/core/compiler/InvalidInputException.js
new file mode 100644
index 0000000..3ae990d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/core/compiler/InvalidInputException.js
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.wst.jsdt.core.compiler;
+
+/**
+ * Exception thrown by a scanner when encountering lexical errors.
+ */
+public class InvalidInputException extends Exception {
+
+ private static final long serialVersionUID = 2909732853499731592L; // backward compatible
+
+ /**
+ * Creates a new exception with no detail message.
+ */
+ public InvalidInputException() {
+ super();
+ }
+ /**
+ * Creates a new exception with the given detail message.
+ * @param message the detail message
+ */
+ public InvalidInputException(String message) {
+ super(message);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/core/compiler/package.html b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/core/compiler/package.html
new file mode 100644
index 0000000..b039ea2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/core/compiler/package.html
@@ -0,0 +1,17 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="Author" content="IBM">
+ <meta name="GENERATOR" content="Mozilla/4.73 [en] (Windows NT 5.0; U) [Netscape]">
+ <title>Package-level Javadoc</title>
+</head>
+<body>
+This package contains compiler associated infrastructure APIs.
+<h2>
+Package Specification</h2>
+
+<p><br>This package contains some compiler tooling APIs, allowing to perform operations at a lower-level
+than using the JavaModel.
+</body>
+</html>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ASTVisitor.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ASTVisitor.js
new file mode 100644
index 0000000..20a5de7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ASTVisitor.js
@@ -0,0 +1,924 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler;
+
+import org.eclipse.wst.jsdt.core.compiler.*;
+import org.eclipse.wst.jsdt.internal.compiler.ast.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+/**
+ * A visitor for iterating through the parse tree.
+ */
+public abstract class ASTVisitor {
+
+ public void acceptProblem(IProblem problem) {
+ // do nothing by default
+ }
+ public void endVisit(
+ AllocationExpression allocationExpression,
+ BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(AND_AND_Expression and_and_Expression, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(
+ AnnotationTypeDeclaration annotationTypeDeclaration,
+ BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(
+ AnnotationTypeDeclaration annotationTypeDeclaration,
+ ClassScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(
+ AnnotationTypeDeclaration annotationTypeDeclaration,
+ CompilationUnitScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(
+ AnnotationTypeMemberDeclaration annotationTypeDeclaration,
+ ClassScope classScope) {
+ // do nothing by default
+ }
+ public void endVisit(Argument argument, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(
+ ArrayAllocationExpression arrayAllocationExpression,
+ BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(ArrayInitializer arrayInitializer, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(
+ ArrayQualifiedTypeReference arrayQualifiedTypeReference,
+ BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(
+ ArrayQualifiedTypeReference arrayQualifiedTypeReference,
+ ClassScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(ArrayReference arrayReference, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(ArrayTypeReference arrayTypeReference, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(ArrayTypeReference arrayTypeReference, ClassScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(AssertStatement assertStatement, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(Assignment assignment, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(BinaryExpression binaryExpression, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(Block block, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(BreakStatement breakStatement, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(CaseStatement caseStatement, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(CastExpression castExpression, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(CharLiteral charLiteral, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(ClassLiteralAccess classLiteral, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(Clinit clinit, ClassScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(
+ CompilationUnitDeclaration compilationUnitDeclaration,
+ CompilationUnitScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(CompoundAssignment compoundAssignment, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(
+ ConditionalExpression conditionalExpression,
+ BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(
+ ConstructorDeclaration constructorDeclaration,
+ ClassScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(ContinueStatement continueStatement, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(DoStatement doStatement, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(DoubleLiteral doubleLiteral, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(EmptyStatement emptyStatement, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(EnumConstant enumDeclaration, ClassScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(EnumDeclaration enumDeclaration, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(EnumDeclaration enumDeclaration, ClassScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(EnumDeclaration enumDeclaration, CompilationUnitScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(EqualExpression equalExpression, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(
+ ExplicitConstructorCall explicitConstructor,
+ BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(
+ ExtendedStringLiteral extendedStringLiteral,
+ BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(FalseLiteral falseLiteral, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(FieldDeclaration fieldDeclaration, MethodScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(FieldReference fieldReference, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(FloatLiteral floatLiteral, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(ForeachStatement forStatement, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(ForStatement forStatement, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(IfStatement ifStatement, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(ImportReference importRef, CompilationUnitScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(Initializer initializer, MethodScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(
+ InstanceOfExpression instanceOfExpression,
+ BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(IntLiteral intLiteral, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(JavadocArgumentExpression expression, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(JavadocArrayQualifiedTypeReference typeRef, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(JavadocArraySingleTypeReference typeRef, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(JavadocFieldReference fieldRef, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(JavadocMessageSend messageSend, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(JavadocQualifiedTypeReference typeRef, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(JavadocReturnStatement statement, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(JavadocSingleNameReference argument, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(JavadocSingleTypeReference typeRef, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(LabeledStatement labeledStatement, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(LocalDeclaration localDeclaration, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(LongLiteral longLiteral, BlockScope scope) {
+ // do nothing by default
+ }
+ /**
+ * @param annotation
+ * @param scope
+ * @since 3.1
+ */
+ public void endVisit(MarkerAnnotation annotation, BlockScope scope) {
+ // do nothing by default
+ }
+ /**
+ * @param annotation
+ * @param scope
+ * @since 3.1
+ */
+ public void endVisit(MarkerAnnotation annotation, ClassScope scope) {
+ // do nothing by default
+ }
+ /**
+ * @param annotation
+ * @param scope
+ * @since 3.1
+ */
+ public void endVisit(MarkerAnnotation annotation, CompilationUnitScope scope) {
+ // do nothing by default
+ }
+ /**
+ * @param pair
+ * @param scope
+ */
+ public void endVisit(MemberValuePair pair, BlockScope scope) {
+ // do nothing by default
+ }
+ /**
+ * @param pair
+ * @param scope
+ */
+ public void endVisit(MemberValuePair pair, ClassScope scope) {
+ // do nothing by default
+ }
+ /**
+ * @param pair
+ * @param scope
+ */
+ public void endVisit(MemberValuePair pair, CompilationUnitScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(MessageSend messageSend, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(MethodDeclaration methodDeclaration, ClassScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(StringLiteralConcatenation literal, BlockScope scope) {
+ // do nothing by default
+ }
+ /**
+ * @param annotation
+ * @param scope
+ * @since 3.1
+ */
+ public void endVisit(NormalAnnotation annotation, BlockScope scope) {
+ // do nothing by default
+ }
+ /**
+ * @param annotation
+ * @param scope
+ * @since 3.1
+ */
+ public void endVisit(NormalAnnotation annotation, ClassScope scope) {
+ // do nothing by default
+ }
+ /**
+ * @param annotation
+ * @param scope
+ * @since 3.1
+ */
+ public void endVisit(NormalAnnotation annotation, CompilationUnitScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(NullLiteral nullLiteral, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(OR_OR_Expression or_or_Expression, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference, ClassScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(ParameterizedSingleTypeReference parameterizedSingleTypeReference, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(ParameterizedSingleTypeReference parameterizedSingleTypeReference, ClassScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(PostfixExpression postfixExpression, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(PrefixExpression prefixExpression, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(
+ QualifiedAllocationExpression qualifiedAllocationExpression,
+ BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(
+ QualifiedNameReference qualifiedNameReference,
+ BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(
+ QualifiedSuperReference qualifiedSuperReference,
+ BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(
+ QualifiedThisReference qualifiedThisReference,
+ BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(
+ QualifiedTypeReference qualifiedTypeReference,
+ BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(
+ QualifiedTypeReference qualifiedTypeReference,
+ ClassScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(ReturnStatement returnStatement, BlockScope scope) {
+ // do nothing by default
+ }
+ /**
+ * @param annotation
+ * @param scope
+ * @since 3.1
+ */
+ public void endVisit(SingleMemberAnnotation annotation, BlockScope scope) {
+ // do nothing by default
+ }
+ /**
+ * @param annotation
+ * @param scope
+ * @since 3.1
+ */
+ public void endVisit(SingleMemberAnnotation annotation, ClassScope scope) {
+ // do nothing by default
+ }
+ /**
+ * @param annotation
+ * @param scope
+ * @since 3.1
+ */
+ public void endVisit(SingleMemberAnnotation annotation, CompilationUnitScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(
+ SingleNameReference singleNameReference,
+ BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(
+ SingleTypeReference singleTypeReference,
+ BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(
+ SingleTypeReference singleTypeReference,
+ ClassScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(StringLiteral stringLiteral, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(SuperReference superReference, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(SwitchStatement switchStatement, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(
+ SynchronizedStatement synchronizedStatement,
+ BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(ThisReference thisReference, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(ThrowStatement throwStatement, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(TrueLiteral trueLiteral, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(TryStatement tryStatement, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(
+ TypeDeclaration localTypeDeclaration,
+ BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(
+ TypeDeclaration memberTypeDeclaration,
+ ClassScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(
+ TypeDeclaration typeDeclaration,
+ CompilationUnitScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(TypeParameter typeParameter, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(TypeParameter typeParameter, ClassScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(UnaryExpression unaryExpression, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(WhileStatement whileStatement, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(Wildcard wildcard, BlockScope scope) {
+ // do nothing by default
+ }
+ public void endVisit(Wildcard wildcard, ClassScope scope) {
+ // do nothing by default
+ }
+ public boolean visit(
+ AllocationExpression allocationExpression,
+ BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(AND_AND_Expression and_and_Expression, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(
+ AnnotationTypeDeclaration annotationTypeDeclaration,
+ BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(
+ AnnotationTypeDeclaration annotationTypeDeclaration,
+ ClassScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(
+ AnnotationTypeDeclaration annotationTypeDeclaration,
+ CompilationUnitScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(
+ AnnotationTypeMemberDeclaration annotationTypeDeclaration,
+ ClassScope classScope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(Argument argument, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(
+ ArrayAllocationExpression arrayAllocationExpression,
+ BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(ArrayInitializer arrayInitializer, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(
+ ArrayQualifiedTypeReference arrayQualifiedTypeReference,
+ BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(
+ ArrayQualifiedTypeReference arrayQualifiedTypeReference,
+ ClassScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(ArrayReference arrayReference, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(ArrayTypeReference arrayTypeReference, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(ArrayTypeReference arrayTypeReference, ClassScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(AssertStatement assertStatement, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(Assignment assignment, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(BinaryExpression binaryExpression, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(Block block, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(BreakStatement breakStatement, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(CaseStatement caseStatement, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(CastExpression castExpression, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(CharLiteral charLiteral, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(ClassLiteralAccess classLiteral, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(Clinit clinit, ClassScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(
+ CompilationUnitDeclaration compilationUnitDeclaration,
+ CompilationUnitScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(CompoundAssignment compoundAssignment, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(
+ ConditionalExpression conditionalExpression,
+ BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(
+ ConstructorDeclaration constructorDeclaration,
+ ClassScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(ContinueStatement continueStatement, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(DoStatement doStatement, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(DoubleLiteral doubleLiteral, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(EmptyStatement emptyStatement, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(EnumConstant enumConstant, ClassScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(EnumDeclaration enumDeclaration, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(EnumDeclaration enumDeclaration, ClassScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(EnumDeclaration enumDeclaration, CompilationUnitScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(EqualExpression equalExpression, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(
+ ExplicitConstructorCall explicitConstructor,
+ BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(
+ ExtendedStringLiteral extendedStringLiteral,
+ BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(FalseLiteral falseLiteral, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(FieldDeclaration fieldDeclaration, MethodScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(FieldReference fieldReference, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(FloatLiteral floatLiteral, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(ForeachStatement forStatement, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(ForStatement forStatement, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(IfStatement ifStatement, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(ImportReference importRef, CompilationUnitScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(Initializer initializer, MethodScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(
+ InstanceOfExpression instanceOfExpression,
+ BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(IntLiteral intLiteral, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(JavadocArgumentExpression expression, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(JavadocArrayQualifiedTypeReference typeRef, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(JavadocArraySingleTypeReference typeRef, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(JavadocFieldReference fieldRef, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(JavadocMessageSend messageSend, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(JavadocQualifiedTypeReference typeRef, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(JavadocReturnStatement statement, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(JavadocSingleNameReference argument, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(JavadocSingleTypeReference typeRef, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(LabeledStatement labeledStatement, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(LocalDeclaration localDeclaration, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(LongLiteral longLiteral, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ /**
+ * @param annotation
+ * @param scope
+ * @since 3.1
+ */
+ public boolean visit(MarkerAnnotation annotation, BlockScope scope) {
+ return true;
+ }
+ /**
+ * @param annotation
+ * @param scope
+ * @since 3.1
+ */
+ public boolean visit(MarkerAnnotation annotation, ClassScope scope) {
+ return true;
+ }
+ /**
+ * @param annotation
+ * @param scope
+ * @since 3.1
+ */
+ public boolean visit(MarkerAnnotation annotation, CompilationUnitScope scope) {
+ return true;
+ }
+ /**
+ * @param pair
+ * @param scope
+ * @since 3.1
+ */
+ public boolean visit(MemberValuePair pair, BlockScope scope) {
+ return true;
+ }
+ /**
+ * @param pair
+ * @param scope
+ * @since 3.1
+ */
+ public boolean visit(MemberValuePair pair, ClassScope scope) {
+ return true;
+ }
+ /**
+ * @param pair
+ * @param scope
+ * @since 3.1
+ */
+ public boolean visit(MemberValuePair pair, CompilationUnitScope scope) {
+ return true;
+ }
+ public boolean visit(MessageSend messageSend, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(MethodDeclaration methodDeclaration, ClassScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(
+ StringLiteralConcatenation literal,
+ BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ /**
+ * @param annotation
+ * @param scope
+ * @since 3.1
+ */
+ public boolean visit(NormalAnnotation annotation, BlockScope scope) {
+ return true;
+ }
+ /**
+ * @param annotation
+ * @param scope
+ * @since 3.1
+ */
+ public boolean visit(NormalAnnotation annotation, ClassScope scope) {
+ return true;
+ }
+ /**
+ * @param annotation
+ * @param scope
+ * @since 3.1
+ */
+ public boolean visit(NormalAnnotation annotation, CompilationUnitScope scope) {
+ return true;
+ }
+ public boolean visit(NullLiteral nullLiteral, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(OR_OR_Expression or_or_Expression, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference, ClassScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(ParameterizedSingleTypeReference parameterizedSingleTypeReference, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(ParameterizedSingleTypeReference parameterizedSingleTypeReference, ClassScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(PostfixExpression postfixExpression, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(PrefixExpression prefixExpression, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(
+ QualifiedAllocationExpression qualifiedAllocationExpression,
+ BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(
+ QualifiedNameReference qualifiedNameReference,
+ BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(
+ QualifiedSuperReference qualifiedSuperReference,
+ BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(
+ QualifiedThisReference qualifiedThisReference,
+ BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(
+ QualifiedTypeReference qualifiedTypeReference,
+ BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(
+ QualifiedTypeReference qualifiedTypeReference,
+ ClassScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(ReturnStatement returnStatement, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ /**
+ * @param annotation
+ * @param scope
+ * @since 3.1
+ */
+ public boolean visit(SingleMemberAnnotation annotation, BlockScope scope) {
+ return true;
+ }
+ /**
+ * @param annotation
+ * @param scope
+ * @since 3.1
+ */
+ public boolean visit(SingleMemberAnnotation annotation, ClassScope scope) {
+ return true;
+ }
+ /**
+ * @param annotation
+ * @param scope
+ * @since 3.1
+ */
+ public boolean visit(SingleMemberAnnotation annotation, CompilationUnitScope scope) {
+ return true;
+ }
+ public boolean visit(
+ SingleNameReference singleNameReference,
+ BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(
+ SingleTypeReference singleTypeReference,
+ BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(
+ SingleTypeReference singleTypeReference,
+ ClassScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(StringLiteral stringLiteral, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(SuperReference superReference, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(SwitchStatement switchStatement, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(
+ SynchronizedStatement synchronizedStatement,
+ BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(ThisReference thisReference, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(ThrowStatement throwStatement, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(TrueLiteral trueLiteral, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(TryStatement tryStatement, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(
+ TypeDeclaration localTypeDeclaration,
+ BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(
+ TypeDeclaration memberTypeDeclaration,
+ ClassScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(
+ TypeDeclaration typeDeclaration,
+ CompilationUnitScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(TypeParameter typeParameter, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(TypeParameter typeParameter, ClassScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(UnaryExpression unaryExpression, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(WhileStatement whileStatement, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(Wildcard wildcard, BlockScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+ public boolean visit(Wildcard wildcard, ClassScope scope) {
+ return true; // do nothing by default, keep traversing
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ClassFile.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ClassFile.js
new file mode 100644
index 0000000..157a108
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ClassFile.js
@@ -0,0 +1,3040 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler;
+
+import java.io.*;
+import java.util.StringTokenizer;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.core.compiler.IProblem;
+import org.eclipse.wst.jsdt.internal.compiler.ast.*;
+import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.wst.jsdt.internal.compiler.impl.Constant;
+import org.eclipse.wst.jsdt.internal.compiler.impl.StringConstant;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemSeverities;
+import org.eclipse.wst.jsdt.internal.compiler.util.Util;
+
+/**
+ * Represents a class file wrapper on bytes, it is aware of its actual
+ * type name.
+ *
+ * Public APIs are listed below:
+ *
+ * byte[] getBytes();
+ * Answer the actual bytes of the class file
+ *
+ * char[][] getCompoundName();
+ * Answer the compound name of the class file.
+ * For example, {{java}, {util}, {Hashtable}}.
+ *
+ * byte[] getReducedBytes();
+ * Answer a smaller byte format, which is only contains some structural
+ * information. Those bytes are decodable with a regular class file reader,
+ * such as DietClassFileReader
+ */
+public class ClassFile
+ implements AttributeNamesConstants, CompilerModifiers, TypeConstants, TypeIds {
+ public SourceTypeBinding referenceBinding;
+ public ConstantPool constantPool;
+ public ClassFile enclosingClassFile;
+ // used to generate private access methods
+ public int produceDebugAttributes;
+ public ReferenceBinding[] innerClassesBindings;
+ public int numberOfInnerClasses;
+ public byte[] header;
+ // the header contains all the bytes till the end of the constant pool
+ public byte[] contents;
+ // that collection contains all the remaining bytes of the .class file
+ public int headerOffset;
+ public int contentsOffset;
+ public int constantPoolOffset;
+ public int methodCountOffset;
+ public int methodCount;
+ protected boolean creatingProblemType;
+ public static final int INITIAL_CONTENTS_SIZE = 400;
+ public static final int INITIAL_HEADER_SIZE = 1500;
+ public boolean ownSharedArrays = false; // flag set when header/contents are set to shared arrays
+ public static final int INNER_CLASSES_SIZE = 5;
+ public CodeStream codeStream;
+ public long targetJDK;
+
+ /**
+ * INTERNAL USE-ONLY
+ * This methods creates a new instance of the receiver.
+ */
+ public ClassFile() {
+ // default constructor for subclasses
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * This methods creates a new instance of the receiver.
+ *
+ * @param aType org.eclipse.wst.jsdt.internal.compiler.lookup.SourceTypeBinding
+ * @param enclosingClassFile org.eclipse.wst.jsdt.internal.compiler.ClassFile
+ * @param creatingProblemType <CODE>boolean</CODE>
+ */
+ public ClassFile(
+ SourceTypeBinding aType,
+ ClassFile enclosingClassFile,
+ boolean creatingProblemType) {
+
+ this.referenceBinding = aType;
+ initByteArrays();
+
+ // generate the magic numbers inside the header
+ header[headerOffset++] = (byte) (0xCAFEBABEL >> 24);
+ header[headerOffset++] = (byte) (0xCAFEBABEL >> 16);
+ header[headerOffset++] = (byte) (0xCAFEBABEL >> 8);
+ header[headerOffset++] = (byte) (0xCAFEBABEL >> 0);
+
+ final CompilerOptions options = aType.scope.environment().options;
+ this.targetJDK = options.targetJDK;
+ header[headerOffset++] = (byte) (this.targetJDK >> 8); // minor high
+ header[headerOffset++] = (byte) (this.targetJDK >> 0); // minor low
+ header[headerOffset++] = (byte) (this.targetJDK >> 24); // major high
+ header[headerOffset++] = (byte) (this.targetJDK >> 16); // major low
+
+ constantPoolOffset = headerOffset;
+ headerOffset += 2;
+ constantPool = new ConstantPool(this);
+
+ // Modifier manipulations for classfile
+ int accessFlags = aType.getAccessFlags();
+ if (aType.isPrivate()) { // rewrite private to non-public
+ accessFlags &= ~AccPublic;
+ }
+ if (aType.isProtected()) { // rewrite protected into public
+ accessFlags |= AccPublic;
+ }
+ // clear all bits that are illegal for a class or an interface
+ accessFlags
+ &= ~(
+ AccStrictfp
+ | AccProtected
+ | AccPrivate
+ | AccStatic
+ | AccSynchronized
+ | AccNative);
+
+ // set the AccSuper flag (has to be done after clearing AccSynchronized - since same value)
+ if (aType.isClass()) {
+ accessFlags |= AccSuper;
+ }
+
+ this.enclosingClassFile = enclosingClassFile;
+ // innerclasses get their names computed at code gen time
+
+ // now we continue to generate the bytes inside the contents array
+ contents[contentsOffset++] = (byte) (accessFlags >> 8);
+ contents[contentsOffset++] = (byte) accessFlags;
+ int classNameIndex = constantPool.literalIndex(aType);
+ contents[contentsOffset++] = (byte) (classNameIndex >> 8);
+ contents[contentsOffset++] = (byte) classNameIndex;
+ int superclassNameIndex;
+ if (aType.isInterface()) {
+ superclassNameIndex = constantPool.literalIndexForJavaLangObject();
+ } else {
+ superclassNameIndex =
+ (aType.superclass == null ? 0 : constantPool.literalIndex(aType.superclass));
+ }
+ contents[contentsOffset++] = (byte) (superclassNameIndex >> 8);
+ contents[contentsOffset++] = (byte) superclassNameIndex;
+ ReferenceBinding[] superInterfacesBinding = aType.superInterfaces();
+ int interfacesCount = superInterfacesBinding.length;
+ contents[contentsOffset++] = (byte) (interfacesCount >> 8);
+ contents[contentsOffset++] = (byte) interfacesCount;
+ for (int i = 0; i < interfacesCount; i++) {
+ int interfaceIndex = constantPool.literalIndex(superInterfacesBinding[i]);
+ contents[contentsOffset++] = (byte) (interfaceIndex >> 8);
+ contents[contentsOffset++] = (byte) interfaceIndex;
+ }
+ produceDebugAttributes = options.produceDebugAttributes;
+ innerClassesBindings = new ReferenceBinding[INNER_CLASSES_SIZE];
+ this.creatingProblemType = creatingProblemType;
+ codeStream = new CodeStream(this, this.targetJDK);
+
+ // retrieve the enclosing one guaranteed to be the one matching the propagated flow info
+ // 1FF9ZBU: LFCOM:ALL - Local variable attributes busted (Sanity check)
+ ClassFile outermostClassFile = this.outerMostEnclosingClassFile();
+ if (this == outermostClassFile) {
+ codeStream.maxFieldCount = aType.scope.referenceType().maxFieldCount;
+ } else {
+ codeStream.maxFieldCount = outermostClassFile.codeStream.maxFieldCount;
+ }
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * Generate the byte for a problem method info that correspond to a boggus method.
+ *
+ * @param method org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration
+ * @param methodBinding org.eclipse.wst.jsdt.internal.compiler.nameloopkup.MethodBinding
+ */
+ public void addAbstractMethod(
+ AbstractMethodDeclaration method,
+ MethodBinding methodBinding) {
+
+ // force the modifiers to be public and abstract
+ methodBinding.modifiers = AccPublic | AccAbstract;
+
+ this.generateMethodInfoHeader(methodBinding);
+ int methodAttributeOffset = this.contentsOffset;
+ int attributeNumber = this.generateMethodInfoAttribute(methodBinding);
+ this.completeMethodInfo(methodAttributeOffset, attributeNumber);
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * This methods generate all the attributes for the receiver.
+ * For a class they could be:
+ * - source file attribute
+ * - inner classes attribute
+ * - deprecated attribute
+ */
+ public void addAttributes() {
+ // update the method count
+ contents[methodCountOffset++] = (byte) (methodCount >> 8);
+ contents[methodCountOffset] = (byte) methodCount;
+
+ int attributeNumber = 0;
+ // leave two bytes for the number of attributes and store the current offset
+ int attributeOffset = contentsOffset;
+ contentsOffset += 2;
+
+ // source attribute
+ if ((produceDebugAttributes & CompilerOptions.Source) != 0) {
+ String fullFileName =
+ new String(referenceBinding.scope.referenceCompilationUnit().getFileName());
+ fullFileName = fullFileName.replace('\\', '/');
+ int lastIndex = fullFileName.lastIndexOf('/');
+ if (lastIndex != -1) {
+ fullFileName = fullFileName.substring(lastIndex + 1, fullFileName.length());
+ }
+ // check that there is enough space to write all the bytes for the field info corresponding
+ // to the @fieldBinding
+ if (contentsOffset + 8 >= contents.length) {
+ resizeContents(8);
+ }
+ int sourceAttributeNameIndex =
+ constantPool.literalIndex(AttributeNamesConstants.SourceName);
+ contents[contentsOffset++] = (byte) (sourceAttributeNameIndex >> 8);
+ contents[contentsOffset++] = (byte) sourceAttributeNameIndex;
+ // The length of a source file attribute is 2. This is a fixed-length
+ // attribute
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 2;
+ // write the source file name
+ int fileNameIndex = constantPool.literalIndex(fullFileName.toCharArray());
+ contents[contentsOffset++] = (byte) (fileNameIndex >> 8);
+ contents[contentsOffset++] = (byte) fileNameIndex;
+ attributeNumber++;
+ }
+ // Deprecated attribute
+ if (referenceBinding.isDeprecated()) {
+ // check that there is enough space to write all the bytes for the field info corresponding
+ // to the @fieldBinding
+ if (contentsOffset + 6 >= contents.length) {
+ resizeContents(6);
+ }
+ int deprecatedAttributeNameIndex =
+ constantPool.literalIndex(AttributeNamesConstants.DeprecatedName);
+ contents[contentsOffset++] = (byte) (deprecatedAttributeNameIndex >> 8);
+ contents[contentsOffset++] = (byte) deprecatedAttributeNameIndex;
+ // the length of a deprecated attribute is equals to 0
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ attributeNumber++;
+ }
+ // Inner class attribute
+ if (numberOfInnerClasses != 0) {
+ // Generate the inner class attribute
+ int exSize = 8 * numberOfInnerClasses + 8;
+ if (exSize + contentsOffset >= this.contents.length) {
+ resizeContents(exSize);
+ }
+ // Now we now the size of the attribute and the number of entries
+ // attribute name
+ int attributeNameIndex =
+ constantPool.literalIndex(AttributeNamesConstants.InnerClassName);
+ contents[contentsOffset++] = (byte) (attributeNameIndex >> 8);
+ contents[contentsOffset++] = (byte) attributeNameIndex;
+ int value = (numberOfInnerClasses << 3) + 2;
+ contents[contentsOffset++] = (byte) (value >> 24);
+ contents[contentsOffset++] = (byte) (value >> 16);
+ contents[contentsOffset++] = (byte) (value >> 8);
+ contents[contentsOffset++] = (byte) value;
+ contents[contentsOffset++] = (byte) (numberOfInnerClasses >> 8);
+ contents[contentsOffset++] = (byte) numberOfInnerClasses;
+ for (int i = 0; i < numberOfInnerClasses; i++) {
+ ReferenceBinding innerClass = innerClassesBindings[i];
+ int accessFlags = innerClass.getAccessFlags();
+ int innerClassIndex = constantPool.literalIndex(innerClass);
+ // inner class index
+ contents[contentsOffset++] = (byte) (innerClassIndex >> 8);
+ contents[contentsOffset++] = (byte) innerClassIndex;
+ // outer class index: anonymous and local have no outer class index
+ if (innerClass.isMemberType()) {
+ // member or member of local
+ int outerClassIndex = constantPool.literalIndex(innerClass.enclosingType());
+ contents[contentsOffset++] = (byte) (outerClassIndex >> 8);
+ contents[contentsOffset++] = (byte) outerClassIndex;
+ } else {
+ // equals to 0 if the innerClass is not a member type
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ }
+ // name index
+ if (!innerClass.isAnonymousType()) {
+ int nameIndex = constantPool.literalIndex(innerClass.sourceName());
+ contents[contentsOffset++] = (byte) (nameIndex >> 8);
+ contents[contentsOffset++] = (byte) nameIndex;
+ } else {
+ // equals to 0 if the innerClass is an anonymous type
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ }
+ // access flag
+ if (innerClass.isAnonymousType()) {
+ accessFlags |= AccPrivate;
+ } else
+ if (innerClass.isLocalType() && !innerClass.isMemberType()) {
+ accessFlags |= AccPrivate;
+ }
+ contents[contentsOffset++] = (byte) (accessFlags >> 8);
+ contents[contentsOffset++] = (byte) accessFlags;
+ }
+ attributeNumber++;
+ }
+ // add signature attribute
+ char[] genericSignature = referenceBinding.genericSignature();
+ if (genericSignature != null) {
+ // check that there is enough space to write all the bytes for the field info corresponding
+ // to the @fieldBinding
+ if (contentsOffset + 8 >= contents.length) {
+ resizeContents(8);
+ }
+ int signatureAttributeNameIndex =
+ constantPool.literalIndex(AttributeNamesConstants.SignatureName);
+ contents[contentsOffset++] = (byte) (signatureAttributeNameIndex >> 8);
+ contents[contentsOffset++] = (byte) signatureAttributeNameIndex;
+ // the length of a signature attribute is equals to 2
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 2;
+ int signatureIndex =
+ constantPool.literalIndex(genericSignature);
+ contents[contentsOffset++] = (byte) (signatureIndex >> 8);
+ contents[contentsOffset++] = (byte) signatureIndex;
+ attributeNumber++;
+ }
+
+ // update the number of attributes
+ if (attributeOffset + 2 >= this.contents.length) {
+ resizeContents(2);
+ }
+ contents[attributeOffset++] = (byte) (attributeNumber >> 8);
+ contents[attributeOffset] = (byte) attributeNumber;
+
+ // resynchronize all offsets of the classfile
+ header = constantPool.poolContent;
+ headerOffset = constantPool.currentOffset;
+ int constantPoolCount = constantPool.currentIndex;
+ header[constantPoolOffset++] = (byte) (constantPoolCount >> 8);
+ header[constantPoolOffset] = (byte) constantPoolCount;
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * This methods generate all the default abstract method infos that correpond to
+ * the abstract methods inherited from superinterfaces.
+ */
+ public void addDefaultAbstractMethods() { // default abstract methods
+ MethodBinding[] defaultAbstractMethods =
+ referenceBinding.getDefaultAbstractMethods();
+ for (int i = 0, max = defaultAbstractMethods.length; i < max; i++) {
+ generateMethodInfoHeader(defaultAbstractMethods[i]);
+ int methodAttributeOffset = contentsOffset;
+ int attributeNumber = generateMethodInfoAttribute(defaultAbstractMethods[i]);
+ completeMethodInfo(methodAttributeOffset, attributeNumber);
+ }
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * This methods generates the bytes for the field binding passed like a parameter
+ * @param fieldBinding org.eclipse.wst.jsdt.internal.compiler.lookup.FieldBinding
+ */
+ public void addFieldInfo(FieldBinding fieldBinding) {
+ int attributeNumber = 0;
+ // check that there is enough space to write all the bytes for the field info corresponding
+ // to the @fieldBinding
+ if (contentsOffset + 30 >= contents.length) {
+ resizeContents(30);
+ }
+ // Now we can generate all entries into the byte array
+ // First the accessFlags
+ int accessFlags = fieldBinding.getAccessFlags();
+ if (targetJDK < ClassFileConstants.JDK1_5) {
+ // pre 1.5, synthetic was an attribute, not a modifier
+ accessFlags &= ~AccSynthetic;
+ }
+ contents[contentsOffset++] = (byte) (accessFlags >> 8);
+ contents[contentsOffset++] = (byte) accessFlags;
+ // Then the nameIndex
+ int nameIndex = constantPool.literalIndex(fieldBinding.name);
+ contents[contentsOffset++] = (byte) (nameIndex >> 8);
+ contents[contentsOffset++] = (byte) nameIndex;
+ // Then the descriptorIndex
+ int descriptorIndex = constantPool.literalIndex(fieldBinding.type.signature());
+ contents[contentsOffset++] = (byte) (descriptorIndex >> 8);
+ contents[contentsOffset++] = (byte) descriptorIndex;
+ // leave some space for the number of attributes
+ int fieldAttributeOffset = contentsOffset;
+ contentsOffset += 2;
+ // 4.7.2 only static constant fields get a ConstantAttribute
+ // Generate the constantValueAttribute
+ if (fieldBinding.isConstantValue()){
+ if (contentsOffset + 8 >= contents.length) {
+ resizeContents(8);
+ }
+ // Now we generate the constant attribute corresponding to the fieldBinding
+ int constantValueNameIndex =
+ constantPool.literalIndex(AttributeNamesConstants.ConstantValueName);
+ contents[contentsOffset++] = (byte) (constantValueNameIndex >> 8);
+ contents[contentsOffset++] = (byte) constantValueNameIndex;
+ // The attribute length = 2 in case of a constantValue attribute
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 2;
+ attributeNumber++;
+ // Need to add the constant_value_index
+ Constant fieldConstant = fieldBinding.constant();
+ switch (fieldConstant.typeID()) {
+ case T_boolean :
+ int booleanValueIndex =
+ constantPool.literalIndex(fieldConstant.booleanValue() ? 1 : 0);
+ contents[contentsOffset++] = (byte) (booleanValueIndex >> 8);
+ contents[contentsOffset++] = (byte) booleanValueIndex;
+ break;
+ case T_byte :
+ case T_char :
+ case T_int :
+ case T_short :
+ int integerValueIndex =
+ constantPool.literalIndex(fieldConstant.intValue());
+ contents[contentsOffset++] = (byte) (integerValueIndex >> 8);
+ contents[contentsOffset++] = (byte) integerValueIndex;
+ break;
+ case T_float :
+ int floatValueIndex =
+ constantPool.literalIndex(fieldConstant.floatValue());
+ contents[contentsOffset++] = (byte) (floatValueIndex >> 8);
+ contents[contentsOffset++] = (byte) floatValueIndex;
+ break;
+ case T_double :
+ int doubleValueIndex =
+ constantPool.literalIndex(fieldConstant.doubleValue());
+ contents[contentsOffset++] = (byte) (doubleValueIndex >> 8);
+ contents[contentsOffset++] = (byte) doubleValueIndex;
+ break;
+ case T_long :
+ int longValueIndex =
+ constantPool.literalIndex(fieldConstant.longValue());
+ contents[contentsOffset++] = (byte) (longValueIndex >> 8);
+ contents[contentsOffset++] = (byte) longValueIndex;
+ break;
+ case T_String :
+ int stringValueIndex =
+ constantPool.literalIndex(
+ ((StringConstant) fieldConstant).stringValue());
+ if (stringValueIndex == -1) {
+ if (!creatingProblemType) {
+ // report an error and abort: will lead to a problem type classfile creation
+ TypeDeclaration typeDeclaration = referenceBinding.scope.referenceContext;
+ FieldDeclaration[] fieldDecls = typeDeclaration.fields;
+ for (int i = 0, max = fieldDecls.length; i < max; i++) {
+ if (fieldDecls[i].binding == fieldBinding) {
+ // problem should abort
+ typeDeclaration.scope.problemReporter().stringConstantIsExceedingUtf8Limit(
+ fieldDecls[i]);
+ }
+ }
+ } else {
+ // already inside a problem type creation : no constant for this field
+ contentsOffset = fieldAttributeOffset + 2;
+ // +2 is necessary to keep the two byte space for the attribute number
+ attributeNumber--;
+ }
+ } else {
+ contents[contentsOffset++] = (byte) (stringValueIndex >> 8);
+ contents[contentsOffset++] = (byte) stringValueIndex;
+ }
+ }
+ }
+ if (this.targetJDK < ClassFileConstants.JDK1_5 && fieldBinding.isSynthetic()) {
+ if (contentsOffset + 6 >= contents.length) {
+ resizeContents(6);
+ }
+ int syntheticAttributeNameIndex =
+ constantPool.literalIndex(AttributeNamesConstants.SyntheticName);
+ contents[contentsOffset++] = (byte) (syntheticAttributeNameIndex >> 8);
+ contents[contentsOffset++] = (byte) syntheticAttributeNameIndex;
+ // the length of a synthetic attribute is equals to 0
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ attributeNumber++;
+ }
+ if (fieldBinding.isDeprecated()) {
+ if (contentsOffset + 6 >= contents.length) {
+ resizeContents(6);
+ }
+ int deprecatedAttributeNameIndex =
+ constantPool.literalIndex(AttributeNamesConstants.DeprecatedName);
+ contents[contentsOffset++] = (byte) (deprecatedAttributeNameIndex >> 8);
+ contents[contentsOffset++] = (byte) deprecatedAttributeNameIndex;
+ // the length of a deprecated attribute is equals to 0
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ attributeNumber++;
+ }
+ // add signature attribute
+ char[] genericSignature = fieldBinding.genericSignature();
+ if (genericSignature != null) {
+ // check that there is enough space to write all the bytes for the field info corresponding
+ // to the @fieldBinding
+ if (contentsOffset + 8 >= contents.length) {
+ resizeContents(8);
+ }
+ int signatureAttributeNameIndex =
+ constantPool.literalIndex(AttributeNamesConstants.SignatureName);
+ contents[contentsOffset++] = (byte) (signatureAttributeNameIndex >> 8);
+ contents[contentsOffset++] = (byte) signatureAttributeNameIndex;
+ // the length of a signature attribute is equals to 2
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 2;
+ int signatureIndex =
+ constantPool.literalIndex(genericSignature);
+ contents[contentsOffset++] = (byte) (signatureIndex >> 8);
+ contents[contentsOffset++] = (byte) signatureIndex;
+ attributeNumber++;
+ }
+ contents[fieldAttributeOffset++] = (byte) (attributeNumber >> 8);
+ contents[fieldAttributeOffset] = (byte) attributeNumber;
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * This methods generate all the fields infos for the receiver.
+ * This includes:
+ * - a field info for each defined field of that class
+ * - a field info for each synthetic field (e.g. this$0)
+ */
+ public void addFieldInfos() {
+ SourceTypeBinding currentBinding = referenceBinding;
+ FieldBinding[] syntheticFields = currentBinding.syntheticFields();
+ int fieldCount =
+ currentBinding.fieldCount()
+ + (syntheticFields == null ? 0 : syntheticFields.length);
+
+ // write the number of fields
+ if (fieldCount > 0xFFFF) {
+ referenceBinding.scope.problemReporter().tooManyFields(referenceBinding.scope.referenceType());
+ }
+ contents[contentsOffset++] = (byte) (fieldCount >> 8);
+ contents[contentsOffset++] = (byte) fieldCount;
+
+ FieldBinding[] fieldBindings = currentBinding.fields();
+ for (int i = 0, max = fieldBindings.length; i < max; i++) {
+ addFieldInfo(fieldBindings[i]);
+ }
+ if (syntheticFields != null) {
+ for (int i = 0, max = syntheticFields.length; i < max; i++) {
+ addFieldInfo(syntheticFields[i]);
+ }
+ }
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * This methods stores the bindings for each inner class. They will be used to know which entries
+ * have to be generated for the inner classes attributes.
+ * @param refBinding org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding
+ */
+ public void addInnerClasses(ReferenceBinding refBinding) {
+ // check first if that reference binding is there
+ for (int i = 0; i < numberOfInnerClasses; i++) {
+ if (innerClassesBindings[i] == refBinding)
+ return;
+ }
+ int length = innerClassesBindings.length;
+ if (numberOfInnerClasses == length) {
+ System.arraycopy(
+ innerClassesBindings,
+ 0,
+ innerClassesBindings = new ReferenceBinding[length * 2],
+ 0,
+ length);
+ }
+ innerClassesBindings[numberOfInnerClasses++] = refBinding;
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * Generate the byte for a problem clinit method info that correspond to a boggus method.
+ *
+ * @param problems org.eclipse.wst.jsdt.internal.compiler.problem.Problem[]
+ */
+ public void addProblemClinit(IProblem[] problems) {
+ generateMethodInfoHeaderForClinit();
+ // leave two spaces for the number of attributes
+ contentsOffset -= 2;
+ int attributeOffset = contentsOffset;
+ contentsOffset += 2;
+ int attributeNumber = 0;
+
+ int codeAttributeOffset = contentsOffset;
+ generateCodeAttributeHeader();
+ codeStream.resetForProblemClinit(this);
+ String problemString = "" ; //$NON-NLS-1$
+ int problemLine = 0;
+ if (problems != null) {
+ int max = problems.length;
+ StringBuffer buffer = new StringBuffer(25);
+ int count = 0;
+ for (int i = 0; i < max; i++) {
+ IProblem problem = problems[i];
+ if ((problem != null) && (problem.isError())) {
+ buffer.append("\t" +problem.getMessage() + "\n" ); //$NON-NLS-1$ //$NON-NLS-2$
+ count++;
+ if (problemLine == 0) {
+ problemLine = problem.getSourceLineNumber();
+ }
+ problems[i] = null;
+ }
+ } // insert the top line afterwards, once knowing how many problems we have to consider
+ if (count > 1) {
+ buffer.insert(0, Util.bind("compilation.unresolvedProblems" )); //$NON-NLS-1$
+ } else {
+ buffer.insert(0, Util.bind("compilation.unresolvedProblem" )); //$NON-NLS-1$
+ }
+ problemString = buffer.toString();
+ }
+
+ // return codeStream.generateCodeAttributeForProblemMethod(comp.options.runtimeExceptionNameForCompileError, "")
+ codeStream.generateCodeAttributeForProblemMethod(problemString);
+ attributeNumber++; // code attribute
+ completeCodeAttributeForClinit(
+ codeAttributeOffset,
+ referenceBinding
+ .scope
+ .referenceCompilationUnit()
+ .compilationResult
+ .lineSeparatorPositions,
+ problemLine);
+ contents[attributeOffset++] = (byte) (attributeNumber >> 8);
+ contents[attributeOffset] = (byte) attributeNumber;
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * Generate the byte for a problem method info that correspond to a boggus constructor.
+ *
+ * @param method org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration
+ * @param methodBinding org.eclipse.wst.jsdt.internal.compiler.nameloopkup.MethodBinding
+ * @param problems org.eclipse.wst.jsdt.internal.compiler.problem.Problem[]
+ */
+ public void addProblemConstructor(
+ AbstractMethodDeclaration method,
+ MethodBinding methodBinding,
+ IProblem[] problems) {
+
+ // always clear the strictfp/native/abstract bit for a problem method
+ generateMethodInfoHeader(methodBinding, methodBinding.modifiers & ~(AccStrictfp | AccNative | AccAbstract));
+ int methodAttributeOffset = contentsOffset;
+ int attributeNumber = generateMethodInfoAttribute(methodBinding);
+
+ // Code attribute
+ attributeNumber++;
+ int codeAttributeOffset = contentsOffset;
+ generateCodeAttributeHeader();
+ codeStream.reset(method, this);
+ String problemString = "" ; //$NON-NLS-1$
+ int problemLine = 0;
+ if (problems != null) {
+ int max = problems.length;
+ StringBuffer buffer = new StringBuffer(25);
+ int count = 0;
+ for (int i = 0; i < max; i++) {
+ IProblem problem = problems[i];
+ if ((problem != null) && (problem.isError())) {
+ buffer.append("\t" +problem.getMessage() + "\n" ); //$NON-NLS-1$ //$NON-NLS-2$
+ count++;
+ if (problemLine == 0) {
+ problemLine = problem.getSourceLineNumber();
+ }
+ }
+ } // insert the top line afterwards, once knowing how many problems we have to consider
+ if (count > 1) {
+ buffer.insert(0, Util.bind("compilation.unresolvedProblems" )); //$NON-NLS-1$
+ } else {
+ buffer.insert(0, Util.bind("compilation.unresolvedProblem" )); //$NON-NLS-1$
+ }
+ problemString = buffer.toString();
+ }
+
+ // return codeStream.generateCodeAttributeForProblemMethod(comp.options.runtimeExceptionNameForCompileError, "")
+ codeStream.generateCodeAttributeForProblemMethod(problemString);
+ completeCodeAttributeForProblemMethod(
+ method,
+ methodBinding,
+ codeAttributeOffset,
+ ((SourceTypeBinding) methodBinding.declaringClass)
+ .scope
+ .referenceCompilationUnit()
+ .compilationResult
+ .lineSeparatorPositions,
+ problemLine);
+ completeMethodInfo(methodAttributeOffset, attributeNumber);
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * Generate the byte for a problem method info that correspond to a boggus constructor.
+ * Reset the position inside the contents byte array to the savedOffset.
+ *
+ * @param method org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration
+ * @param methodBinding org.eclipse.wst.jsdt.internal.compiler.nameloopkup.MethodBinding
+ * @param problems org.eclipse.wst.jsdt.internal.compiler.problem.Problem[]
+ * @param savedOffset <CODE>int</CODE>
+ */
+ public void addProblemConstructor(
+ AbstractMethodDeclaration method,
+ MethodBinding methodBinding,
+ IProblem[] problems,
+ int savedOffset) {
+ // we need to move back the contentsOffset to the value at the beginning of the method
+ contentsOffset = savedOffset;
+ methodCount--; // we need to remove the method that causes the problem
+ addProblemConstructor(method, methodBinding, problems);
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * Generate the byte for a problem method info that correspond to a boggus method.
+ *
+ * @param method org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration
+ * @param methodBinding org.eclipse.wst.jsdt.internal.compiler.nameloopkup.MethodBinding
+ * @param problems org.eclipse.wst.jsdt.internal.compiler.problem.Problem[]
+ */
+ public void addProblemMethod(
+ AbstractMethodDeclaration method,
+ MethodBinding methodBinding,
+ IProblem[] problems) {
+ if (methodBinding.isAbstract() && methodBinding.declaringClass.isInterface()) {
+ method.abort(ProblemSeverities.AbortType, null);
+ }
+ // always clear the strictfp/native/abstract bit for a problem method
+ generateMethodInfoHeader(methodBinding, methodBinding.modifiers & ~(AccStrictfp | AccNative | AccAbstract));
+ int methodAttributeOffset = contentsOffset;
+ int attributeNumber = generateMethodInfoAttribute(methodBinding);
+
+ // Code attribute
+ attributeNumber++;
+
+ int codeAttributeOffset = contentsOffset;
+ generateCodeAttributeHeader();
+ codeStream.reset(method, this);
+ String problemString = "" ; //$NON-NLS-1$
+ int problemLine = 0;
+ if (problems != null) {
+ int max = problems.length;
+ StringBuffer buffer = new StringBuffer(25);
+ int count = 0;
+ for (int i = 0; i < max; i++) {
+ IProblem problem = problems[i];
+ if ((problem != null)
+ && (problem.isError())
+ && (problem.getSourceStart() >= method.declarationSourceStart)
+ && (problem.getSourceEnd() <= method.declarationSourceEnd)) {
+ buffer.append("\t" +problem.getMessage() + "\n" ); //$NON-NLS-1$ //$NON-NLS-2$
+ count++;
+ if (problemLine == 0) {
+ problemLine = problem.getSourceLineNumber();
+ }
+ problems[i] = null;
+ }
+ } // insert the top line afterwards, once knowing how many problems we have to consider
+ if (count > 1) {
+ buffer.insert(0, Util.bind("compilation.unresolvedProblems" )); //$NON-NLS-1$
+ } else {
+ buffer.insert(0, Util.bind("compilation.unresolvedProblem" )); //$NON-NLS-1$
+ }
+ problemString = buffer.toString();
+ }
+
+ // return codeStream.generateCodeAttributeForProblemMethod(comp.options.runtimeExceptionNameForCompileError, "")
+ codeStream.generateCodeAttributeForProblemMethod(problemString);
+ completeCodeAttributeForProblemMethod(
+ method,
+ methodBinding,
+ codeAttributeOffset,
+ ((SourceTypeBinding) methodBinding.declaringClass)
+ .scope
+ .referenceCompilationUnit()
+ .compilationResult
+ .lineSeparatorPositions,
+ problemLine);
+ completeMethodInfo(methodAttributeOffset, attributeNumber);
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * Generate the byte for a problem method info that correspond to a boggus method.
+ * Reset the position inside the contents byte array to the savedOffset.
+ *
+ * @param method org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration
+ * @param methodBinding org.eclipse.wst.jsdt.internal.compiler.nameloopkup.MethodBinding
+ * @param problems org.eclipse.wst.jsdt.internal.compiler.problem.Problem[]
+ * @param savedOffset <CODE>int</CODE>
+ */
+ public void addProblemMethod(
+ AbstractMethodDeclaration method,
+ MethodBinding methodBinding,
+ IProblem[] problems,
+ int savedOffset) {
+ // we need to move back the contentsOffset to the value at the beginning of the method
+ contentsOffset = savedOffset;
+ methodCount--; // we need to remove the method that causes the problem
+ addProblemMethod(method, methodBinding, problems);
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * Generate the byte for all the special method infos.
+ * They are:
+ * - synthetic access methods
+ * - default abstract methods
+ */
+ public void addSpecialMethods() {
+
+ // add all methods (default abstract methods and synthetic)
+
+ // default abstract methods
+ generateMissingAbstractMethods(referenceBinding.scope.referenceType().missingAbstractMethods, referenceBinding.scope.referenceCompilationUnit().compilationResult);
+
+ MethodBinding[] defaultAbstractMethods = this.referenceBinding.getDefaultAbstractMethods();
+ for (int i = 0, max = defaultAbstractMethods.length; i < max; i++) {
+ generateMethodInfoHeader(defaultAbstractMethods[i]);
+ int methodAttributeOffset = contentsOffset;
+ int attributeNumber = generateMethodInfoAttribute(defaultAbstractMethods[i]);
+ completeMethodInfo(methodAttributeOffset, attributeNumber);
+ }
+ // add synthetic methods infos
+ SyntheticAccessMethodBinding[] syntheticAccessMethods = this.referenceBinding.syntheticAccessMethods();
+ if (syntheticAccessMethods != null) {
+ for (int i = 0, max = syntheticAccessMethods.length; i < max; i++) {
+ SyntheticAccessMethodBinding accessMethodBinding = syntheticAccessMethods[i];
+ switch (accessMethodBinding.accessType) {
+ case SyntheticAccessMethodBinding.FieldReadAccess :
+ // generate a method info to emulate an reading access to
+ // a non-accessible field
+ addSyntheticFieldReadAccessMethod(accessMethodBinding);
+ break;
+ case SyntheticAccessMethodBinding.FieldWriteAccess :
+ // generate a method info to emulate an writing access to
+ // a non-accessible field
+ addSyntheticFieldWriteAccessMethod(accessMethodBinding);
+ break;
+ case SyntheticAccessMethodBinding.MethodAccess :
+ case SyntheticAccessMethodBinding.SuperMethodAccess :
+ case SyntheticAccessMethodBinding.BridgeMethodAccess :
+ // generate a method info to emulate an access to a non-accessible method / super-method or bridge method
+ addSyntheticMethodAccessMethod(accessMethodBinding);
+ break;
+ case SyntheticAccessMethodBinding.ConstructorAccess :
+ // generate a method info to emulate an access to a non-accessible constructor
+ addSyntheticConstructorAccessMethod(accessMethodBinding);
+ break;
+ }
+ }
+ }
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * Generate the byte for problem method infos that correspond to missing abstract methods.
+ * http://dev.eclipse.org/bugs/show_bug.cgi?id=3179
+ *
+ * @param methodDeclarations Array of all missing abstract methods
+ */
+ public void generateMissingAbstractMethods(MethodDeclaration[] methodDeclarations, CompilationResult compilationResult) {
+ if (methodDeclarations != null) {
+ for (int i = 0, max = methodDeclarations.length; i < max; i++) {
+ MethodDeclaration methodDeclaration = methodDeclarations[i];
+ MethodBinding methodBinding = methodDeclaration.binding;
+ String readableName = new String(methodBinding.readableName());
+ IProblem[] problems = compilationResult.problems;
+ int problemsCount = compilationResult.problemCount;
+ for (int j = 0; j < problemsCount; j++) {
+ IProblem problem = problems[j];
+ if (problem != null
+ && problem.getID() == IProblem.AbstractMethodMustBeImplemented
+ && problem.getMessage().indexOf(readableName) != -1) {
+ // we found a match
+ addMissingAbstractProblemMethod(methodDeclaration, methodBinding, problem, compilationResult);
+ }
+ }
+ }
+ }
+ }
+
+ private void addMissingAbstractProblemMethod(MethodDeclaration methodDeclaration, MethodBinding methodBinding, IProblem problem, CompilationResult compilationResult) {
+ // always clear the strictfp/native/abstract bit for a problem method
+ generateMethodInfoHeader(methodBinding, methodBinding.modifiers & ~(AccStrictfp | AccNative | AccAbstract));
+ int methodAttributeOffset = contentsOffset;
+ int attributeNumber = generateMethodInfoAttribute(methodBinding);
+
+ // Code attribute
+ attributeNumber++;
+
+ int codeAttributeOffset = contentsOffset;
+ generateCodeAttributeHeader();
+ StringBuffer buffer = new StringBuffer(25);
+ buffer.append("\t" + problem.getMessage() + "\n" ); //$NON-NLS-1$ //$NON-NLS-2$
+ buffer.insert(0, Util.bind("compilation.unresolvedProblem" )); //$NON-NLS-1$
+ String problemString = buffer.toString();
+
+ codeStream.init(this);
+ codeStream.preserveUnusedLocals = true;
+ codeStream.initializeMaxLocals(methodBinding);
+
+ // return codeStream.generateCodeAttributeForProblemMethod(comp.options.runtimeExceptionNameForCompileError, "")
+ codeStream.generateCodeAttributeForProblemMethod(problemString);
+
+ completeCodeAttributeForMissingAbstractProblemMethod(
+ methodBinding,
+ codeAttributeOffset,
+ compilationResult.lineSeparatorPositions,
+ problem.getSourceLineNumber());
+
+ completeMethodInfo(methodAttributeOffset, attributeNumber);
+ }
+
+ /**
+ *
+ */
+ public void completeCodeAttributeForMissingAbstractProblemMethod(
+ MethodBinding binding,
+ int codeAttributeOffset,
+ int[] startLineIndexes,
+ int problemLine) {
+ // reinitialize the localContents with the byte modified by the code stream
+ this.contents = codeStream.bCodeStream;
+ int localContentsOffset = codeStream.classFileOffset;
+ // codeAttributeOffset is the position inside localContents byte array before we started to write// any information about the codeAttribute// That means that to write the attribute_length you need to offset by 2 the value of codeAttributeOffset// to get the right position, 6 for the max_stack etc...
+ int max_stack = codeStream.stackMax;
+ this.contents[codeAttributeOffset + 6] = (byte) (max_stack >> 8);
+ this.contents[codeAttributeOffset + 7] = (byte) max_stack;
+ int max_locals = codeStream.maxLocals;
+ this.contents[codeAttributeOffset + 8] = (byte) (max_locals >> 8);
+ this.contents[codeAttributeOffset + 9] = (byte) max_locals;
+ int code_length = codeStream.position;
+ this.contents[codeAttributeOffset + 10] = (byte) (code_length >> 24);
+ this.contents[codeAttributeOffset + 11] = (byte) (code_length >> 16);
+ this.contents[codeAttributeOffset + 12] = (byte) (code_length >> 8);
+ this.contents[codeAttributeOffset + 13] = (byte) code_length;
+ // write the exception table
+ if (localContentsOffset + 50 >= this.contents.length) {
+ resizeContents(50);
+ }
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = 0;
+ // debug attributes
+ int codeAttributeAttributeOffset = localContentsOffset;
+ int attributeNumber = 0; // leave two bytes for the attribute_length
+ localContentsOffset += 2; // first we handle the linenumber attribute
+
+ if (codeStream.generateLineNumberAttributes) {
+ /* Create and add the line number attribute (used for debugging)
+ * Build the pairs of:
+ * (bytecodePC lineNumber)
+ * according to the table of start line indexes and the pcToSourceMap table
+ * contained into the codestream
+ */
+ int lineNumberNameIndex =
+ constantPool.literalIndex(AttributeNamesConstants.LineNumberTableName);
+ this.contents[localContentsOffset++] = (byte) (lineNumberNameIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) lineNumberNameIndex;
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = 6;
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = 1;
+ if (problemLine == 0) {
+ problemLine = searchLineNumber(startLineIndexes, binding.sourceStart());
+ }
+ // first entry at pc = 0
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = (byte) (problemLine >> 8);
+ this.contents[localContentsOffset++] = (byte) problemLine;
+ // now we change the size of the line number attribute
+ attributeNumber++;
+ }
+
+ // then we do the local variable attribute
+ // update the number of attributes// ensure first that there is enough space available inside the localContents array
+ if (codeAttributeAttributeOffset + 2 >= this.contents.length) {
+ resizeContents(2);
+ }
+ this.contents[codeAttributeAttributeOffset++] = (byte) (attributeNumber >> 8);
+ this.contents[codeAttributeAttributeOffset] = (byte) attributeNumber;
+ // update the attribute length
+ int codeAttributeLength = localContentsOffset - (codeAttributeOffset + 6);
+ this.contents[codeAttributeOffset + 2] = (byte) (codeAttributeLength >> 24);
+ this.contents[codeAttributeOffset + 3] = (byte) (codeAttributeLength >> 16);
+ this.contents[codeAttributeOffset + 4] = (byte) (codeAttributeLength >> 8);
+ this.contents[codeAttributeOffset + 5] = (byte) codeAttributeLength;
+ contentsOffset = localContentsOffset;
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * Generate the byte for a problem method info that correspond to a synthetic method that
+ * generate an access to a private constructor.
+ *
+ * @param methodBinding org.eclipse.wst.jsdt.internal.compiler.nameloopkup.SyntheticAccessMethodBinding
+ */
+ public void addSyntheticConstructorAccessMethod(SyntheticAccessMethodBinding methodBinding) {
+ generateMethodInfoHeader(methodBinding);
+ // We know that we won't get more than 2 attribute: the code attribute + synthetic attribute
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 2;
+ // Code attribute
+ int codeAttributeOffset = contentsOffset;
+ generateCodeAttributeHeader();
+ codeStream.init(this);
+ codeStream.generateSyntheticBodyForConstructorAccess(methodBinding);
+ completeCodeAttributeForSyntheticAccessMethod(
+ methodBinding,
+ codeAttributeOffset,
+ ((SourceTypeBinding) methodBinding.declaringClass)
+ .scope
+ .referenceCompilationUnit()
+ .compilationResult
+ .lineSeparatorPositions);
+ // add the synthetic attribute
+ int syntheticAttributeNameIndex =
+ constantPool.literalIndex(AttributeNamesConstants.SyntheticName);
+ contents[contentsOffset++] = (byte) (syntheticAttributeNameIndex >> 8);
+ contents[contentsOffset++] = (byte) syntheticAttributeNameIndex;
+ // the length of a synthetic attribute is equals to 0
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * Generate the byte for a problem method info that correspond to a synthetic method that
+ * generate an read access to a private field.
+ *
+ * @param methodBinding org.eclipse.wst.jsdt.internal.compiler.nameloopkup.SyntheticAccessMethodBinding
+ */
+ public void addSyntheticFieldReadAccessMethod(SyntheticAccessMethodBinding methodBinding) {
+ generateMethodInfoHeader(methodBinding);
+ // We know that we won't get more than 2 attribute: the code attribute + synthetic attribute
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 2;
+ // Code attribute
+ int codeAttributeOffset = contentsOffset;
+ generateCodeAttributeHeader();
+ codeStream.init(this);
+ codeStream.generateSyntheticBodyForFieldReadAccess(methodBinding);
+ completeCodeAttributeForSyntheticAccessMethod(
+ methodBinding,
+ codeAttributeOffset,
+ ((SourceTypeBinding) methodBinding.declaringClass)
+ .scope
+ .referenceCompilationUnit()
+ .compilationResult
+ .lineSeparatorPositions);
+ // add the synthetic attribute
+ int syntheticAttributeNameIndex =
+ constantPool.literalIndex(AttributeNamesConstants.SyntheticName);
+ contents[contentsOffset++] = (byte) (syntheticAttributeNameIndex >> 8);
+ contents[contentsOffset++] = (byte) syntheticAttributeNameIndex;
+ // the length of a synthetic attribute is equals to 0
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * Generate the byte for a problem method info that correspond to a synthetic method that
+ * generate an write access to a private field.
+ *
+ * @param methodBinding org.eclipse.wst.jsdt.internal.compiler.nameloopkup.SyntheticAccessMethodBinding
+ */
+ public void addSyntheticFieldWriteAccessMethod(SyntheticAccessMethodBinding methodBinding) {
+ generateMethodInfoHeader(methodBinding);
+ // We know that we won't get more than 2 attribute: the code attribute + synthetic attribute
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 2;
+ // Code attribute
+ int codeAttributeOffset = contentsOffset;
+ generateCodeAttributeHeader();
+ codeStream.init(this);
+ codeStream.generateSyntheticBodyForFieldWriteAccess(methodBinding);
+ completeCodeAttributeForSyntheticAccessMethod(
+ methodBinding,
+ codeAttributeOffset,
+ ((SourceTypeBinding) methodBinding.declaringClass)
+ .scope
+ .referenceCompilationUnit()
+ .compilationResult
+ .lineSeparatorPositions);
+ // add the synthetic attribute
+ int syntheticAttributeNameIndex =
+ constantPool.literalIndex(AttributeNamesConstants.SyntheticName);
+ contents[contentsOffset++] = (byte) (syntheticAttributeNameIndex >> 8);
+ contents[contentsOffset++] = (byte) syntheticAttributeNameIndex;
+ // the length of a synthetic attribute is equals to 0
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * Generate the byte for a problem method info that correspond to a synthetic method that
+ * generate an access to a private method.
+ *
+ * @param methodBinding org.eclipse.wst.jsdt.internal.compiler.nameloopkup.SyntheticAccessMethodBinding
+ */
+ public void addSyntheticMethodAccessMethod(SyntheticAccessMethodBinding methodBinding) {
+ generateMethodInfoHeader(methodBinding);
+ // We know that we won't get more than 2 attribute: the code attribute + synthetic attribute
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 2;
+ // Code attribute
+ int codeAttributeOffset = contentsOffset;
+ generateCodeAttributeHeader();
+ codeStream.init(this);
+ codeStream.generateSyntheticBodyForMethodAccess(methodBinding);
+ completeCodeAttributeForSyntheticAccessMethod(
+ methodBinding,
+ codeAttributeOffset,
+ ((SourceTypeBinding) methodBinding.declaringClass)
+ .scope
+ .referenceCompilationUnit()
+ .compilationResult
+ .lineSeparatorPositions);
+ // add the synthetic attribute
+ int syntheticAttributeNameIndex =
+ constantPool.literalIndex(AttributeNamesConstants.SyntheticName);
+ contents[contentsOffset++] = (byte) (syntheticAttributeNameIndex >> 8);
+ contents[contentsOffset++] = (byte) syntheticAttributeNameIndex;
+ // the length of a synthetic attribute is equals to 0
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * Build all the directories and subdirectories corresponding to the packages names
+ * into the directory specified in parameters.
+ *
+ * outputPath is formed like:
+ * c:\temp\ the last character is a file separator
+ * relativeFileName is formed like:
+ * java\lang\String.class *
+ *
+ * @param outputPath java.lang.String
+ * @param relativeFileName java.lang.String
+ * @return java.lang.String
+ */
+ public static String buildAllDirectoriesInto(
+ String outputPath,
+ String relativeFileName)
+ throws IOException {
+ char fileSeparatorChar = File.separatorChar;
+ String fileSeparator = File.separator;
+ File f;
+ // First we ensure that the outputPath exists
+ outputPath = outputPath.replace('/', fileSeparatorChar);
+ // To be able to pass the mkdirs() method we need to remove the extra file separator at the end of the outDir name
+ if (outputPath.endsWith(fileSeparator)) {
+ outputPath = outputPath.substring(0, outputPath.length() - 1);
+ }
+ f = new File(outputPath);
+ if (f.exists()) {
+ if (!f.isDirectory()) {
+ System.out.println(Util.bind("output.isFile" , f.getAbsolutePath())); //$NON-NLS-1$
+ throw new IOException(Util.bind("output.isFileNotDirectory" )); //$NON-NLS-1$
+ }
+ } else {
+ // we have to create that directory
+ if (!f.mkdirs()) {
+ System.out.println(Util.bind("output.dirName" , f.getAbsolutePath())); //$NON-NLS-1$
+ throw new IOException(Util.bind("output.notValidAll" )); //$NON-NLS-1$
+ }
+ }
+ StringBuffer outDir = new StringBuffer(outputPath);
+ outDir.append(fileSeparator);
+ StringTokenizer tokenizer =
+ new StringTokenizer(relativeFileName, fileSeparator);
+ String token = tokenizer.nextToken();
+ while (tokenizer.hasMoreTokens()) {
+ f = new File(outDir.append(token).append(fileSeparator).toString());
+ if (f.exists()) {
+ // The outDir already exists, so we proceed the next entry
+ // System.out.println("outDir: " + outDir + " already exists.");
+ } else {
+ // Need to add the outDir
+ if (!f.mkdir()) {
+ System.out.println(Util.bind("output.fileName" , f.getName())); //$NON-NLS-1$
+ throw new IOException(Util.bind("output.notValid" )); //$NON-NLS-1$
+ }
+ }
+ token = tokenizer.nextToken();
+ }
+ // token contains the last one
+ return outDir.append(token).toString();
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * That method completes the creation of the code attribute by setting
+ * - the attribute_length
+ * - max_stack
+ * - max_locals
+ * - code_length
+ * - exception table
+ * - and debug attributes if necessary.
+ *
+ * @param codeAttributeOffset <CODE>int</CODE>
+ */
+ public void completeCodeAttribute(int codeAttributeOffset) {
+ // reinitialize the localContents with the byte modified by the code stream
+ this.contents = codeStream.bCodeStream;
+ int localContentsOffset = codeStream.classFileOffset;
+ // codeAttributeOffset is the position inside localContents byte array before we started to write
+ // any information about the codeAttribute
+ // That means that to write the attribute_length you need to offset by 2 the value of codeAttributeOffset
+ // to get the right position, 6 for the max_stack etc...
+ int code_length = codeStream.position;
+ if (code_length > 65535) {
+ codeStream.methodDeclaration.scope.problemReporter().bytecodeExceeds64KLimit(
+ codeStream.methodDeclaration);
+ }
+ if (localContentsOffset + 20 >= this.contents.length) {
+ resizeContents(20);
+ }
+ int max_stack = codeStream.stackMax;
+ this.contents[codeAttributeOffset + 6] = (byte) (max_stack >> 8);
+ this.contents[codeAttributeOffset + 7] = (byte) max_stack;
+ int max_locals = codeStream.maxLocals;
+ this.contents[codeAttributeOffset + 8] = (byte) (max_locals >> 8);
+ this.contents[codeAttributeOffset + 9] = (byte) max_locals;
+ this.contents[codeAttributeOffset + 10] = (byte) (code_length >> 24);
+ this.contents[codeAttributeOffset + 11] = (byte) (code_length >> 16);
+ this.contents[codeAttributeOffset + 12] = (byte) (code_length >> 8);
+ this.contents[codeAttributeOffset + 13] = (byte) code_length;
+
+ // write the exception table
+ int exceptionHandlersNumber = codeStream.exceptionHandlersCounter;
+ ExceptionLabel[] exceptionHandlers = codeStream.exceptionHandlers;
+ int exSize = exceptionHandlersNumber * 8 + 2;
+ if (exSize + localContentsOffset >= this.contents.length) {
+ resizeContents(exSize);
+ }
+ // there is no exception table, so we need to offset by 2 the current offset and move
+ // on the attribute generation
+ this.contents[localContentsOffset++] = (byte) (exceptionHandlersNumber >> 8);
+ this.contents[localContentsOffset++] = (byte) exceptionHandlersNumber;
+ for (int i = 0, max = codeStream.exceptionHandlersIndex; i < max; i++) {
+ ExceptionLabel exceptionHandler = exceptionHandlers[i];
+ if (exceptionHandler != null) {
+ int start = exceptionHandler.start;
+ this.contents[localContentsOffset++] = (byte) (start >> 8);
+ this.contents[localContentsOffset++] = (byte) start;
+ int end = exceptionHandler.end;
+ this.contents[localContentsOffset++] = (byte) (end >> 8);
+ this.contents[localContentsOffset++] = (byte) end;
+ int handlerPC = exceptionHandler.position;
+ this.contents[localContentsOffset++] = (byte) (handlerPC >> 8);
+ this.contents[localContentsOffset++] = (byte) handlerPC;
+ if (exceptionHandler.exceptionType == null) {
+ // any exception handler
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = 0;
+ } else {
+ int nameIndex;
+ if (exceptionHandler.exceptionType == BaseTypes.NullBinding) {
+ /* represents ClassNotFoundException, see class literal access*/
+ nameIndex = constantPool.literalIndexForJavaLangClassNotFoundException();
+ } else {
+ nameIndex = constantPool.literalIndex(exceptionHandler.exceptionType);
+ }
+ this.contents[localContentsOffset++] = (byte) (nameIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) nameIndex;
+ }
+ }
+ }
+ // debug attributes
+ int codeAttributeAttributeOffset = localContentsOffset;
+ int attributeNumber = 0;
+ // leave two bytes for the attribute_length
+ localContentsOffset += 2;
+
+ // first we handle the linenumber attribute
+ if (codeStream.generateLineNumberAttributes) {
+ /* Create and add the line number attribute (used for debugging)
+ * Build the pairs of:
+ * (bytecodePC lineNumber)
+ * according to the table of start line indexes and the pcToSourceMap table
+ * contained into the codestream
+ */
+ int[] pcToSourceMapTable;
+ if (((pcToSourceMapTable = codeStream.pcToSourceMap) != null)
+ && (codeStream.pcToSourceMapSize != 0)) {
+ int lineNumberNameIndex =
+ constantPool.literalIndex(AttributeNamesConstants.LineNumberTableName);
+ if (localContentsOffset + 8 >= this.contents.length) {
+ resizeContents(8);
+ }
+ this.contents[localContentsOffset++] = (byte) (lineNumberNameIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) lineNumberNameIndex;
+ int lineNumberTableOffset = localContentsOffset;
+ localContentsOffset += 6;
+ // leave space for attribute_length and line_number_table_length
+ int numberOfEntries = 0;
+ int length = codeStream.pcToSourceMapSize;
+ for (int i = 0; i < length;) {
+ // write the entry
+ if (localContentsOffset + 4 >= this.contents.length) {
+ resizeContents(4);
+ }
+ int pc = pcToSourceMapTable[i++];
+ this.contents[localContentsOffset++] = (byte) (pc >> 8);
+ this.contents[localContentsOffset++] = (byte) pc;
+ int lineNumber = pcToSourceMapTable[i++];
+ this.contents[localContentsOffset++] = (byte) (lineNumber >> 8);
+ this.contents[localContentsOffset++] = (byte) lineNumber;
+ numberOfEntries++;
+ }
+ // now we change the size of the line number attribute
+ int lineNumberAttr_length = numberOfEntries * 4 + 2;
+ this.contents[lineNumberTableOffset++] = (byte) (lineNumberAttr_length >> 24);
+ this.contents[lineNumberTableOffset++] = (byte) (lineNumberAttr_length >> 16);
+ this.contents[lineNumberTableOffset++] = (byte) (lineNumberAttr_length >> 8);
+ this.contents[lineNumberTableOffset++] = (byte) lineNumberAttr_length;
+ this.contents[lineNumberTableOffset++] = (byte) (numberOfEntries >> 8);
+ this.contents[lineNumberTableOffset++] = (byte) numberOfEntries;
+ attributeNumber++;
+ }
+ }
+ // then we do the local variable attribute
+ if (codeStream.generateLocalVariableTableAttributes) {
+ int localVariableTableOffset = localContentsOffset;
+ int numberOfEntries = 0;
+ int localVariableNameIndex =
+ constantPool.literalIndex(AttributeNamesConstants.LocalVariableTableName);
+ final boolean methodDeclarationIsStatic = codeStream.methodDeclaration.isStatic();
+ int maxOfEntries = 8 + 10 * (methodDeclarationIsStatic ? 0 : 1);
+ for (int i = 0; i < codeStream.allLocalsCounter; i++) {
+ maxOfEntries += 10 * codeStream.locals[i].initializationCount;
+ }
+ // reserve enough space
+ if (localContentsOffset + maxOfEntries >= this.contents.length) {
+ resizeContents(maxOfEntries);
+ }
+ this.contents[localContentsOffset++] = (byte) (localVariableNameIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) localVariableNameIndex;
+ localContentsOffset += 6;
+ // leave space for attribute_length and local_variable_table_length
+ int nameIndex;
+ int descriptorIndex;
+ SourceTypeBinding declaringClassBinding = null;
+ if (!methodDeclarationIsStatic) {
+ numberOfEntries++;
+ this.contents[localContentsOffset++] = 0; // the startPC for this is always 0
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = (byte) (code_length >> 8);
+ this.contents[localContentsOffset++] = (byte) code_length;
+ nameIndex = constantPool.literalIndex(QualifiedNamesConstants.This);
+ this.contents[localContentsOffset++] = (byte) (nameIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) nameIndex;
+ declaringClassBinding = (SourceTypeBinding) codeStream.methodDeclaration.binding.declaringClass;
+ descriptorIndex =
+ constantPool.literalIndex(
+ declaringClassBinding.signature());
+ this.contents[localContentsOffset++] = (byte) (descriptorIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) descriptorIndex;
+ this.contents[localContentsOffset++] = 0;// the resolved position for this is always 0
+ this.contents[localContentsOffset++] = 0;
+ }
+ // used to remember the local variable with a generic type
+ int genericLocalVariablesCounter = 0;
+ LocalVariableBinding[] genericLocalVariables = null;
+ int numberOfGenericEntries = 0;
+
+ for (int i = 0, max = codeStream.allLocalsCounter; i < max; i++) {
+ LocalVariableBinding localVariable = codeStream.locals[i];
+ final TypeBinding localVariableTypeBinding = localVariable.type;
+ boolean isParameterizedType = localVariableTypeBinding.isParameterizedType() || localVariableTypeBinding.isTypeVariable();
+ if (localVariable.initializationCount != 0 && isParameterizedType) {
+ if (genericLocalVariables == null) {
+ // we cannot have more than max locals
+ genericLocalVariables = new LocalVariableBinding[max];
+ }
+ genericLocalVariables[genericLocalVariablesCounter++] = localVariable;
+ }
+ for (int j = 0; j < localVariable.initializationCount; j++) {
+ int startPC = localVariable.initializationPCs[j << 1];
+ int endPC = localVariable.initializationPCs[(j << 1) + 1];
+ if (startPC != endPC) { // only entries for non zero length
+ if (endPC == -1) {
+ localVariable.declaringScope.problemReporter().abortDueToInternalError(
+ Util.bind("abort.invalidAttribute" , new String(localVariable.name)), //$NON-NLS-1$
+ (ASTNode) localVariable.declaringScope.methodScope().referenceContext);
+ }
+ if (isParameterizedType) {
+ numberOfGenericEntries++;
+ }
+ // now we can safely add the local entry
+ numberOfEntries++;
+ this.contents[localContentsOffset++] = (byte) (startPC >> 8);
+ this.contents[localContentsOffset++] = (byte) startPC;
+ int length = endPC - startPC;
+ this.contents[localContentsOffset++] = (byte) (length >> 8);
+ this.contents[localContentsOffset++] = (byte) length;
+ nameIndex = constantPool.literalIndex(localVariable.name);
+ this.contents[localContentsOffset++] = (byte) (nameIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) nameIndex;
+ descriptorIndex = constantPool.literalIndex(localVariableTypeBinding.signature());
+ this.contents[localContentsOffset++] = (byte) (descriptorIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) descriptorIndex;
+ int resolvedPosition = localVariable.resolvedPosition;
+ this.contents[localContentsOffset++] = (byte) (resolvedPosition >> 8);
+ this.contents[localContentsOffset++] = (byte) resolvedPosition;
+ }
+ }
+ }
+ int value = numberOfEntries * 10 + 2;
+ localVariableTableOffset += 2;
+ this.contents[localVariableTableOffset++] = (byte) (value >> 24);
+ this.contents[localVariableTableOffset++] = (byte) (value >> 16);
+ this.contents[localVariableTableOffset++] = (byte) (value >> 8);
+ this.contents[localVariableTableOffset++] = (byte) value;
+ this.contents[localVariableTableOffset++] = (byte) (numberOfEntries >> 8);
+ this.contents[localVariableTableOffset] = (byte) numberOfEntries;
+ attributeNumber++;
+
+ final boolean currentInstanceIsGeneric =
+ !methodDeclarationIsStatic
+ && declaringClassBinding != null
+ && declaringClassBinding.typeVariables != NoTypeVariables;
+ if (genericLocalVariablesCounter != 0 || currentInstanceIsGeneric) {
+ // add the local variable type table attribute
+ numberOfGenericEntries += (currentInstanceIsGeneric ? 1 : 0);
+ maxOfEntries = 8 + numberOfGenericEntries * 10;
+ // reserve enough space
+ if (localContentsOffset + maxOfEntries >= this.contents.length) {
+ resizeContents(maxOfEntries);
+ }
+ int localVariableTypeNameIndex =
+ constantPool.literalIndex(AttributeNamesConstants.LocalVariableTypeTableName);
+ this.contents[localContentsOffset++] = (byte) (localVariableTypeNameIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) localVariableTypeNameIndex;
+ value = numberOfGenericEntries * 10 + 2;
+ this.contents[localContentsOffset++] = (byte) (value >> 24);
+ this.contents[localContentsOffset++] = (byte) (value >> 16);
+ this.contents[localContentsOffset++] = (byte) (value >> 8);
+ this.contents[localContentsOffset++] = (byte) value;
+ this.contents[localContentsOffset++] = (byte) (numberOfGenericEntries >> 8);
+ this.contents[localContentsOffset++] = (byte) numberOfGenericEntries;
+ if (currentInstanceIsGeneric) {
+ this.contents[localContentsOffset++] = 0; // the startPC for this is always 0
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = (byte) (code_length >> 8);
+ this.contents[localContentsOffset++] = (byte) code_length;
+ nameIndex = constantPool.literalIndex(QualifiedNamesConstants.This);
+ this.contents[localContentsOffset++] = (byte) (nameIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) nameIndex;
+ descriptorIndex = constantPool.literalIndex(declaringClassBinding.genericTypeSignature());
+ this.contents[localContentsOffset++] = (byte) (descriptorIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) descriptorIndex;
+ this.contents[localContentsOffset++] = 0;// the resolved position for this is always 0
+ this.contents[localContentsOffset++] = 0;
+ }
+
+ for (int i = 0; i < genericLocalVariablesCounter; i++) {
+ LocalVariableBinding localVariable = genericLocalVariables[i];
+ for (int j = 0; j < localVariable.initializationCount; j++) {
+ int startPC = localVariable.initializationPCs[j << 1];
+ int endPC = localVariable.initializationPCs[(j << 1) + 1];
+ if (startPC != endPC) {
+ // only entries for non zero length
+ // now we can safely add the local entry
+ this.contents[localContentsOffset++] = (byte) (startPC >> 8);
+ this.contents[localContentsOffset++] = (byte) startPC;
+ int length = endPC - startPC;
+ this.contents[localContentsOffset++] = (byte) (length >> 8);
+ this.contents[localContentsOffset++] = (byte) length;
+ nameIndex = constantPool.literalIndex(localVariable.name);
+ this.contents[localContentsOffset++] = (byte) (nameIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) nameIndex;
+ descriptorIndex = constantPool.literalIndex(localVariable.type.genericTypeSignature());
+ this.contents[localContentsOffset++] = (byte) (descriptorIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) descriptorIndex;
+ int resolvedPosition = localVariable.resolvedPosition;
+ this.contents[localContentsOffset++] = (byte) (resolvedPosition >> 8);
+ this.contents[localContentsOffset++] = (byte) resolvedPosition;
+ }
+ }
+ }
+ attributeNumber++;
+ }
+ }
+ // update the number of attributes
+ // ensure first that there is enough space available inside the localContents array
+ if (codeAttributeAttributeOffset + 2 >= this.contents.length) {
+ resizeContents(2);
+ }
+ this.contents[codeAttributeAttributeOffset++] = (byte) (attributeNumber >> 8);
+ this.contents[codeAttributeAttributeOffset] = (byte) attributeNumber;
+
+ // update the attribute length
+ int codeAttributeLength = localContentsOffset - (codeAttributeOffset + 6);
+ this.contents[codeAttributeOffset + 2] = (byte) (codeAttributeLength >> 24);
+ this.contents[codeAttributeOffset + 3] = (byte) (codeAttributeLength >> 16);
+ this.contents[codeAttributeOffset + 4] = (byte) (codeAttributeLength >> 8);
+ this.contents[codeAttributeOffset + 5] = (byte) codeAttributeLength;
+ contentsOffset = localContentsOffset;
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * That method completes the creation of the code attribute by setting
+ * - the attribute_length
+ * - max_stack
+ * - max_locals
+ * - code_length
+ * - exception table
+ * - and debug attributes if necessary.
+ *
+ * @param codeAttributeOffset <CODE>int</CODE>
+ */
+ public void completeCodeAttributeForClinit(int codeAttributeOffset) {
+ // reinitialize the contents with the byte modified by the code stream
+ this.contents = codeStream.bCodeStream;
+ int localContentsOffset = codeStream.classFileOffset;
+ // codeAttributeOffset is the position inside contents byte array before we started to write
+ // any information about the codeAttribute
+ // That means that to write the attribute_length you need to offset by 2 the value of codeAttributeOffset
+ // to get the right position, 6 for the max_stack etc...
+ int code_length = codeStream.position;
+ if (code_length > 65535) {
+ codeStream.methodDeclaration.scope.problemReporter().bytecodeExceeds64KLimit(
+ codeStream.methodDeclaration.scope.referenceType());
+ }
+ if (localContentsOffset + 20 >= this.contents.length) {
+ resizeContents(20);
+ }
+ int max_stack = codeStream.stackMax;
+ this.contents[codeAttributeOffset + 6] = (byte) (max_stack >> 8);
+ this.contents[codeAttributeOffset + 7] = (byte) max_stack;
+ int max_locals = codeStream.maxLocals;
+ this.contents[codeAttributeOffset + 8] = (byte) (max_locals >> 8);
+ this.contents[codeAttributeOffset + 9] = (byte) max_locals;
+ this.contents[codeAttributeOffset + 10] = (byte) (code_length >> 24);
+ this.contents[codeAttributeOffset + 11] = (byte) (code_length >> 16);
+ this.contents[codeAttributeOffset + 12] = (byte) (code_length >> 8);
+ this.contents[codeAttributeOffset + 13] = (byte) code_length;
+
+ // write the exception table
+ int exceptionHandlersNumber = codeStream.exceptionHandlersCounter;
+ ExceptionLabel[] exceptionHandlers = codeStream.exceptionHandlers;
+ int exSize = exceptionHandlersNumber * 8 + 2;
+ if (exSize + localContentsOffset >= this.contents.length) {
+ resizeContents(exSize);
+ }
+ // there is no exception table, so we need to offset by 2 the current offset and move
+ // on the attribute generation
+ this.contents[localContentsOffset++] = (byte) (exceptionHandlersNumber >> 8);
+ this.contents[localContentsOffset++] = (byte) exceptionHandlersNumber;
+ for (int i = 0, max = codeStream.exceptionHandlersIndex; i < max; i++) {
+ ExceptionLabel exceptionHandler = exceptionHandlers[i];
+ if (exceptionHandler != null) {
+ int start = exceptionHandler.start;
+ this.contents[localContentsOffset++] = (byte) (start >> 8);
+ this.contents[localContentsOffset++] = (byte) start;
+ int end = exceptionHandler.end;
+ this.contents[localContentsOffset++] = (byte) (end >> 8);
+ this.contents[localContentsOffset++] = (byte) end;
+ int handlerPC = exceptionHandler.position;
+ this.contents[localContentsOffset++] = (byte) (handlerPC >> 8);
+ this.contents[localContentsOffset++] = (byte) handlerPC;
+ if (exceptionHandler.exceptionType == null) {
+ // any exception handler
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = 0;
+ } else {
+ int nameIndex;
+ if (exceptionHandler.exceptionType == BaseTypes.NullBinding) {
+ /* represents denote ClassNotFoundException, see class literal access*/
+ nameIndex = constantPool.literalIndexForJavaLangClassNotFoundException();
+ } else {
+ nameIndex = constantPool.literalIndex(exceptionHandler.exceptionType);
+ }
+ this.contents[localContentsOffset++] = (byte) (nameIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) nameIndex;
+ }
+ }
+ }
+ // debug attributes
+ int codeAttributeAttributeOffset = localContentsOffset;
+ int attributeNumber = 0;
+ // leave two bytes for the attribute_length
+ localContentsOffset += 2;
+
+ // first we handle the linenumber attribute
+ if (codeStream.generateLineNumberAttributes) {
+ /* Create and add the line number attribute (used for debugging)
+ * Build the pairs of:
+ * (bytecodePC lineNumber)
+ * according to the table of start line indexes and the pcToSourceMap table
+ * contained into the codestream
+ */
+ int[] pcToSourceMapTable;
+ if (((pcToSourceMapTable = codeStream.pcToSourceMap) != null)
+ && (codeStream.pcToSourceMapSize != 0)) {
+ int lineNumberNameIndex =
+ constantPool.literalIndex(AttributeNamesConstants.LineNumberTableName);
+ if (localContentsOffset + 8 >= this.contents.length) {
+ resizeContents(8);
+ }
+ this.contents[localContentsOffset++] = (byte) (lineNumberNameIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) lineNumberNameIndex;
+ int lineNumberTableOffset = localContentsOffset;
+ localContentsOffset += 6;
+ // leave space for attribute_length and line_number_table_length
+ int numberOfEntries = 0;
+ int length = codeStream.pcToSourceMapSize;
+ for (int i = 0; i < length;) {
+ // write the entry
+ if (localContentsOffset + 4 >= this.contents.length) {
+ resizeContents(4);
+ }
+ int pc = pcToSourceMapTable[i++];
+ this.contents[localContentsOffset++] = (byte) (pc >> 8);
+ this.contents[localContentsOffset++] = (byte) pc;
+ int lineNumber = pcToSourceMapTable[i++];
+ this.contents[localContentsOffset++] = (byte) (lineNumber >> 8);
+ this.contents[localContentsOffset++] = (byte) lineNumber;
+ numberOfEntries++;
+ }
+ // now we change the size of the line number attribute
+ int lineNumberAttr_length = numberOfEntries * 4 + 2;
+ this.contents[lineNumberTableOffset++] = (byte) (lineNumberAttr_length >> 24);
+ this.contents[lineNumberTableOffset++] = (byte) (lineNumberAttr_length >> 16);
+ this.contents[lineNumberTableOffset++] = (byte) (lineNumberAttr_length >> 8);
+ this.contents[lineNumberTableOffset++] = (byte) lineNumberAttr_length;
+ this.contents[lineNumberTableOffset++] = (byte) (numberOfEntries >> 8);
+ this.contents[lineNumberTableOffset++] = (byte) numberOfEntries;
+ attributeNumber++;
+ }
+ }
+ // then we do the local variable attribute
+ if (codeStream.generateLocalVariableTableAttributes) {
+ int localVariableTableOffset = localContentsOffset;
+ int numberOfEntries = 0;
+ // codeAttribute.addLocalVariableTableAttribute(this);
+ if ((codeStream.pcToSourceMap != null)
+ && (codeStream.pcToSourceMapSize != 0)) {
+ int localVariableNameIndex =
+ constantPool.literalIndex(AttributeNamesConstants.LocalVariableTableName);
+ if (localContentsOffset + 8 >= this.contents.length) {
+ resizeContents(8);
+ }
+ this.contents[localContentsOffset++] = (byte) (localVariableNameIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) localVariableNameIndex;
+ localContentsOffset += 6;
+
+ // leave space for attribute_length and local_variable_table_length
+ int nameIndex;
+ int descriptorIndex;
+
+ // used to remember the local variable with a generic type
+ int genericLocalVariablesCounter = 0;
+ LocalVariableBinding[] genericLocalVariables = null;
+ int numberOfGenericEntries = 0;
+
+ for (int i = 0, max = codeStream.allLocalsCounter; i < max; i++) {
+ LocalVariableBinding localVariable = codeStream.locals[i];
+ final TypeBinding localVariableTypeBinding = localVariable.type;
+ boolean isParameterizedType = localVariableTypeBinding.isParameterizedType() || localVariableTypeBinding.isTypeVariable();
+ if (localVariable.initializationCount != 0 && isParameterizedType) {
+ if (genericLocalVariables == null) {
+ // we cannot have more than max locals
+ genericLocalVariables = new LocalVariableBinding[max];
+ }
+ genericLocalVariables[genericLocalVariablesCounter++] = localVariable;
+ }
+ for (int j = 0; j < localVariable.initializationCount; j++) {
+ int startPC = localVariable.initializationPCs[j << 1];
+ int endPC = localVariable.initializationPCs[(j << 1) + 1];
+ if (startPC != endPC) { // only entries for non zero length
+ if (endPC == -1) {
+ localVariable.declaringScope.problemReporter().abortDueToInternalError(
+ Util.bind("abort.invalidAttribute" , new String(localVariable.name)), //$NON-NLS-1$
+ (ASTNode) localVariable.declaringScope.methodScope().referenceContext);
+ }
+ if (localContentsOffset + 10 >= this.contents.length) {
+ resizeContents(10);
+ }
+ // now we can safely add the local entry
+ numberOfEntries++;
+ if (isParameterizedType) {
+ numberOfGenericEntries++;
+ }
+ this.contents[localContentsOffset++] = (byte) (startPC >> 8);
+ this.contents[localContentsOffset++] = (byte) startPC;
+ int length = endPC - startPC;
+ this.contents[localContentsOffset++] = (byte) (length >> 8);
+ this.contents[localContentsOffset++] = (byte) length;
+ nameIndex = constantPool.literalIndex(localVariable.name);
+ this.contents[localContentsOffset++] = (byte) (nameIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) nameIndex;
+ descriptorIndex = constantPool.literalIndex(localVariableTypeBinding.signature());
+ this.contents[localContentsOffset++] = (byte) (descriptorIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) descriptorIndex;
+ int resolvedPosition = localVariable.resolvedPosition;
+ this.contents[localContentsOffset++] = (byte) (resolvedPosition >> 8);
+ this.contents[localContentsOffset++] = (byte) resolvedPosition;
+ }
+ }
+ }
+ int value = numberOfEntries * 10 + 2;
+ localVariableTableOffset += 2;
+ this.contents[localVariableTableOffset++] = (byte) (value >> 24);
+ this.contents[localVariableTableOffset++] = (byte) (value >> 16);
+ this.contents[localVariableTableOffset++] = (byte) (value >> 8);
+ this.contents[localVariableTableOffset++] = (byte) value;
+ this.contents[localVariableTableOffset++] = (byte) (numberOfEntries >> 8);
+ this.contents[localVariableTableOffset] = (byte) numberOfEntries;
+ attributeNumber++;
+
+ if (genericLocalVariablesCounter != 0) {
+ // add the local variable type table attribute
+ // reserve enough space
+ int maxOfEntries = 8 + numberOfGenericEntries * 10;
+
+ if (localContentsOffset + maxOfEntries >= this.contents.length) {
+ resizeContents(maxOfEntries);
+ }
+ int localVariableTypeNameIndex =
+ constantPool.literalIndex(AttributeNamesConstants.LocalVariableTypeTableName);
+ this.contents[localContentsOffset++] = (byte) (localVariableTypeNameIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) localVariableTypeNameIndex;
+ value = numberOfGenericEntries * 10 + 2;
+ this.contents[localContentsOffset++] = (byte) (value >> 24);
+ this.contents[localContentsOffset++] = (byte) (value >> 16);
+ this.contents[localContentsOffset++] = (byte) (value >> 8);
+ this.contents[localContentsOffset++] = (byte) value;
+ this.contents[localContentsOffset++] = (byte) (numberOfGenericEntries >> 8);
+ this.contents[localContentsOffset++] = (byte) numberOfGenericEntries;
+ for (int i = 0; i < genericLocalVariablesCounter; i++) {
+ LocalVariableBinding localVariable = genericLocalVariables[i];
+ for (int j = 0; j < localVariable.initializationCount; j++) {
+ int startPC = localVariable.initializationPCs[j << 1];
+ int endPC = localVariable.initializationPCs[(j << 1) + 1];
+ if (startPC != endPC) { // only entries for non zero length
+ // now we can safely add the local entry
+ this.contents[localContentsOffset++] = (byte) (startPC >> 8);
+ this.contents[localContentsOffset++] = (byte) startPC;
+ int length = endPC - startPC;
+ this.contents[localContentsOffset++] = (byte) (length >> 8);
+ this.contents[localContentsOffset++] = (byte) length;
+ nameIndex = constantPool.literalIndex(localVariable.name);
+ this.contents[localContentsOffset++] = (byte) (nameIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) nameIndex;
+ descriptorIndex = constantPool.literalIndex(localVariable.type.genericTypeSignature());
+ this.contents[localContentsOffset++] = (byte) (descriptorIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) descriptorIndex;
+ int resolvedPosition = localVariable.resolvedPosition;
+ this.contents[localContentsOffset++] = (byte) (resolvedPosition >> 8);
+ this.contents[localContentsOffset++] = (byte) resolvedPosition;
+ }
+ }
+ }
+ attributeNumber++;
+ }
+ }
+ }
+ // update the number of attributes
+ // ensure first that there is enough space available inside the contents array
+ if (codeAttributeAttributeOffset + 2 >= this.contents.length) {
+ resizeContents(2);
+ }
+ this.contents[codeAttributeAttributeOffset++] = (byte) (attributeNumber >> 8);
+ this.contents[codeAttributeAttributeOffset] = (byte) attributeNumber;
+ // update the attribute length
+ int codeAttributeLength = localContentsOffset - (codeAttributeOffset + 6);
+ this.contents[codeAttributeOffset + 2] = (byte) (codeAttributeLength >> 24);
+ this.contents[codeAttributeOffset + 3] = (byte) (codeAttributeLength >> 16);
+ this.contents[codeAttributeOffset + 4] = (byte) (codeAttributeLength >> 8);
+ this.contents[codeAttributeOffset + 5] = (byte) codeAttributeLength;
+ contentsOffset = localContentsOffset;
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * That method completes the creation of the code attribute by setting
+ * - the attribute_length
+ * - max_stack
+ * - max_locals
+ * - code_length
+ * - exception table
+ * - and debug attributes if necessary.
+ *
+ * @param codeAttributeOffset <CODE>int</CODE>
+ * @param startLineIndexes int[]
+ */
+ public void completeCodeAttributeForClinit(
+ int codeAttributeOffset,
+ int[] startLineIndexes,
+ int problemLine) {
+ // reinitialize the contents with the byte modified by the code stream
+ this.contents = codeStream.bCodeStream;
+ int localContentsOffset = codeStream.classFileOffset;
+ // codeAttributeOffset is the position inside contents byte array before we started to write
+ // any information about the codeAttribute
+ // That means that to write the attribute_length you need to offset by 2 the value of codeAttributeOffset
+ // to get the right position, 6 for the max_stack etc...
+ int code_length = codeStream.position;
+ if (code_length > 65535) {
+ codeStream.methodDeclaration.scope.problemReporter().bytecodeExceeds64KLimit(
+ codeStream.methodDeclaration.scope.referenceType());
+ }
+ if (localContentsOffset + 20 >= this.contents.length) {
+ resizeContents(20);
+ }
+ int max_stack = codeStream.stackMax;
+ this.contents[codeAttributeOffset + 6] = (byte) (max_stack >> 8);
+ this.contents[codeAttributeOffset + 7] = (byte) max_stack;
+ int max_locals = codeStream.maxLocals;
+ this.contents[codeAttributeOffset + 8] = (byte) (max_locals >> 8);
+ this.contents[codeAttributeOffset + 9] = (byte) max_locals;
+ this.contents[codeAttributeOffset + 10] = (byte) (code_length >> 24);
+ this.contents[codeAttributeOffset + 11] = (byte) (code_length >> 16);
+ this.contents[codeAttributeOffset + 12] = (byte) (code_length >> 8);
+ this.contents[codeAttributeOffset + 13] = (byte) code_length;
+
+ // write the exception table
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = 0;
+
+ // debug attributes
+ int codeAttributeAttributeOffset = localContentsOffset;
+ int attributeNumber = 0; // leave two bytes for the attribute_length
+ localContentsOffset += 2; // first we handle the linenumber attribute
+
+ // first we handle the linenumber attribute
+ if (codeStream.generateLineNumberAttributes) {
+ if (localContentsOffset + 20 >= this.contents.length) {
+ resizeContents(20);
+ }
+ /* Create and add the line number attribute (used for debugging)
+ * Build the pairs of:
+ * (bytecodePC lineNumber)
+ * according to the table of start line indexes and the pcToSourceMap table
+ * contained into the codestream
+ */
+ int lineNumberNameIndex =
+ constantPool.literalIndex(AttributeNamesConstants.LineNumberTableName);
+ this.contents[localContentsOffset++] = (byte) (lineNumberNameIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) lineNumberNameIndex;
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = 6;
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = 1;
+ // first entry at pc = 0
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = (byte) (problemLine >> 8);
+ this.contents[localContentsOffset++] = (byte) problemLine;
+ // now we change the size of the line number attribute
+ attributeNumber++;
+ }
+ // then we do the local variable attribute
+ if (codeStream.generateLocalVariableTableAttributes) {
+ int localVariableNameIndex =
+ constantPool.literalIndex(AttributeNamesConstants.LocalVariableTableName);
+ if (localContentsOffset + 8 >= this.contents.length) {
+ resizeContents(8);
+ }
+ this.contents[localContentsOffset++] = (byte) (localVariableNameIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) localVariableNameIndex;
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = 2;
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = 0;
+ attributeNumber++;
+ }
+ // update the number of attributes
+ // ensure first that there is enough space available inside the contents array
+ if (codeAttributeAttributeOffset + 2 >= this.contents.length) {
+ resizeContents(2);
+ }
+ this.contents[codeAttributeAttributeOffset++] = (byte) (attributeNumber >> 8);
+ this.contents[codeAttributeAttributeOffset] = (byte) attributeNumber;
+ // update the attribute length
+ int codeAttributeLength = localContentsOffset - (codeAttributeOffset + 6);
+ this.contents[codeAttributeOffset + 2] = (byte) (codeAttributeLength >> 24);
+ this.contents[codeAttributeOffset + 3] = (byte) (codeAttributeLength >> 16);
+ this.contents[codeAttributeOffset + 4] = (byte) (codeAttributeLength >> 8);
+ this.contents[codeAttributeOffset + 5] = (byte) codeAttributeLength;
+ contentsOffset = localContentsOffset;
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * That method completes the creation of the code attribute by setting
+ * - the attribute_length
+ * - max_stack
+ * - max_locals
+ * - code_length
+ * - exception table
+ * - and debug attributes if necessary.
+ *
+ * @param codeAttributeOffset <CODE>int</CODE>
+ */
+ public void completeCodeAttributeForProblemMethod(
+ AbstractMethodDeclaration method,
+ MethodBinding binding,
+ int codeAttributeOffset,
+ int[] startLineIndexes,
+ int problemLine) {
+ // reinitialize the localContents with the byte modified by the code stream
+ this.contents = codeStream.bCodeStream;
+ int localContentsOffset = codeStream.classFileOffset;
+ // codeAttributeOffset is the position inside localContents byte array before we started to write// any information about the codeAttribute// That means that to write the attribute_length you need to offset by 2 the value of codeAttributeOffset// to get the right position, 6 for the max_stack etc...
+ int max_stack = codeStream.stackMax;
+ this.contents[codeAttributeOffset + 6] = (byte) (max_stack >> 8);
+ this.contents[codeAttributeOffset + 7] = (byte) max_stack;
+ int max_locals = codeStream.maxLocals;
+ this.contents[codeAttributeOffset + 8] = (byte) (max_locals >> 8);
+ this.contents[codeAttributeOffset + 9] = (byte) max_locals;
+ int code_length = codeStream.position;
+ this.contents[codeAttributeOffset + 10] = (byte) (code_length >> 24);
+ this.contents[codeAttributeOffset + 11] = (byte) (code_length >> 16);
+ this.contents[codeAttributeOffset + 12] = (byte) (code_length >> 8);
+ this.contents[codeAttributeOffset + 13] = (byte) code_length;
+ // write the exception table
+ if (localContentsOffset + 50 >= this.contents.length) {
+ resizeContents(50);
+ }
+
+ // write the exception table
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = 0;
+ // debug attributes
+ int codeAttributeAttributeOffset = localContentsOffset;
+ int attributeNumber = 0; // leave two bytes for the attribute_length
+ localContentsOffset += 2; // first we handle the linenumber attribute
+
+ if (codeStream.generateLineNumberAttributes) {
+ if (localContentsOffset + 20 >= this.contents.length) {
+ resizeContents(20);
+ }
+ /* Create and add the line number attribute (used for debugging)
+ * Build the pairs of:
+ * (bytecodePC lineNumber)
+ * according to the table of start line indexes and the pcToSourceMap table
+ * contained into the codestream
+ */
+ int lineNumberNameIndex =
+ constantPool.literalIndex(AttributeNamesConstants.LineNumberTableName);
+ this.contents[localContentsOffset++] = (byte) (lineNumberNameIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) lineNumberNameIndex;
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = 6;
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = 1;
+ if (problemLine == 0) {
+ problemLine = searchLineNumber(startLineIndexes, binding.sourceStart());
+ }
+ // first entry at pc = 0
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = (byte) (problemLine >> 8);
+ this.contents[localContentsOffset++] = (byte) problemLine;
+ // now we change the size of the line number attribute
+ attributeNumber++;
+ }
+ // then we do the local variable attribute
+ if (codeStream.generateLocalVariableTableAttributes) {
+ // compute the resolved position for the arguments of the method
+ int argSize;
+ int localVariableTableOffset = localContentsOffset;
+ int numberOfEntries = 0;
+ // codeAttribute.addLocalVariableTableAttribute(this);
+ int localVariableNameIndex =
+ constantPool.literalIndex(AttributeNamesConstants.LocalVariableTableName);
+ if (localContentsOffset + 8 >= this.contents.length) {
+ resizeContents(8);
+ }
+ this.contents[localContentsOffset++] = (byte) (localVariableNameIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) localVariableNameIndex;
+ localContentsOffset += 6;
+ // leave space for attribute_length and local_variable_table_length
+ int descriptorIndex;
+ int nameIndex;
+ SourceTypeBinding declaringClassBinding = null;
+ final boolean methodDeclarationIsStatic = codeStream.methodDeclaration.isStatic();
+ if (!methodDeclarationIsStatic) {
+ numberOfEntries++;
+ if (localContentsOffset + 10 >= this.contents.length) {
+ resizeContents(10);
+ }
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = (byte) (code_length >> 8);
+ this.contents[localContentsOffset++] = (byte) code_length;
+ nameIndex = constantPool.literalIndex(QualifiedNamesConstants.This);
+ this.contents[localContentsOffset++] = (byte) (nameIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) nameIndex;
+ declaringClassBinding = (SourceTypeBinding) codeStream.methodDeclaration.binding.declaringClass;
+ descriptorIndex =
+ constantPool.literalIndex(declaringClassBinding.signature());
+ this.contents[localContentsOffset++] = (byte) (descriptorIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) descriptorIndex;
+ // the resolved position for this is always 0
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = 0;
+ }
+ // used to remember the local variable with a generic type
+ int genericLocalVariablesCounter = 0;
+ LocalVariableBinding[] genericLocalVariables = null;
+ int numberOfGenericEntries = 0;
+
+ if (binding.isConstructor()) {
+ ReferenceBinding declaringClass = binding.declaringClass;
+ if (declaringClass.isNestedType()) {
+ NestedTypeBinding methodDeclaringClass = (NestedTypeBinding) declaringClass;
+ argSize = methodDeclaringClass.enclosingInstancesSlotSize;
+ SyntheticArgumentBinding[] syntheticArguments;
+ if ((syntheticArguments = methodDeclaringClass.syntheticEnclosingInstances()) != null) {
+ for (int i = 0, max = syntheticArguments.length; i < max; i++) {
+ LocalVariableBinding localVariable = syntheticArguments[i];
+ final TypeBinding localVariableTypeBinding = localVariable.type;
+ if (localVariableTypeBinding.isParameterizedType() || localVariableTypeBinding.isTypeVariable()) {
+ if (genericLocalVariables == null) {
+ // we cannot have more than max locals
+ genericLocalVariables = new LocalVariableBinding[max];
+ }
+ genericLocalVariables[genericLocalVariablesCounter++] = localVariable;
+ numberOfGenericEntries++;
+ }
+ if (localContentsOffset + 10 >= this.contents.length) {
+ resizeContents(10);
+ }
+ // now we can safely add the local entry
+ numberOfEntries++;
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = (byte) (code_length >> 8);
+ this.contents[localContentsOffset++] = (byte) code_length;
+ nameIndex = constantPool.literalIndex(localVariable.name);
+ this.contents[localContentsOffset++] = (byte) (nameIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) nameIndex;
+ descriptorIndex = constantPool.literalIndex(localVariableTypeBinding.signature());
+ this.contents[localContentsOffset++] = (byte) (descriptorIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) descriptorIndex;
+ int resolvedPosition = localVariable.resolvedPosition;
+ this.contents[localContentsOffset++] = (byte) (resolvedPosition >> 8);
+ this.contents[localContentsOffset++] = (byte) resolvedPosition;
+ }
+ }
+ } else {
+ argSize = 1;
+ }
+ } else {
+ argSize = binding.isStatic() ? 0 : 1;
+ }
+
+ int genericArgumentsCounter = 0;
+ int[] genericArgumentsNameIndexes = null;
+ int[] genericArgumentsResolvedPositions = null;
+ TypeBinding[] genericArgumentsTypeBindings = null;
+
+ if (method.binding != null) {
+ TypeBinding[] parameters = method.binding.parameters;
+ Argument[] arguments = method.arguments;
+ if ((parameters != null) && (arguments != null)) {
+ for (int i = 0, max = parameters.length; i < max; i++) {
+ TypeBinding argumentBinding = parameters[i];
+ if (localContentsOffset + 10 >= this.contents.length) {
+ resizeContents(10);
+ }
+ // now we can safely add the local entry
+ numberOfEntries++;
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = (byte) (code_length >> 8);
+ this.contents[localContentsOffset++] = (byte) code_length;
+ nameIndex = constantPool.literalIndex(arguments[i].name);
+ this.contents[localContentsOffset++] = (byte) (nameIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) nameIndex;
+ int resolvedPosition = argSize;
+ if (argumentBinding.isParameterizedType() || argumentBinding.isTypeVariable()) {
+ if (genericArgumentsCounter == 0) {
+ // we cannot have more than max locals
+ genericArgumentsNameIndexes = new int[max];
+ genericArgumentsResolvedPositions = new int[max];
+ genericArgumentsTypeBindings = new TypeBinding[max];
+ }
+ genericArgumentsNameIndexes[genericArgumentsCounter] = nameIndex;
+ genericArgumentsResolvedPositions[genericArgumentsCounter] = resolvedPosition;
+ genericArgumentsTypeBindings[genericArgumentsCounter++] = argumentBinding;
+ }
+ descriptorIndex = constantPool.literalIndex(argumentBinding.signature());
+ this.contents[localContentsOffset++] = (byte) (descriptorIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) descriptorIndex;
+ if ((argumentBinding == BaseTypes.LongBinding)
+ || (argumentBinding == BaseTypes.DoubleBinding))
+ argSize += 2;
+ else
+ argSize++;
+ this.contents[localContentsOffset++] = (byte) (resolvedPosition >> 8);
+ this.contents[localContentsOffset++] = (byte) resolvedPosition;
+ }
+ }
+ }
+ int value = numberOfEntries * 10 + 2;
+ localVariableTableOffset += 2;
+ this.contents[localVariableTableOffset++] = (byte) (value >> 24);
+ this.contents[localVariableTableOffset++] = (byte) (value >> 16);
+ this.contents[localVariableTableOffset++] = (byte) (value >> 8);
+ this.contents[localVariableTableOffset++] = (byte) value;
+ this.contents[localVariableTableOffset++] = (byte) (numberOfEntries >> 8);
+ this.contents[localVariableTableOffset] = (byte) numberOfEntries;
+ attributeNumber++;
+
+ final boolean currentInstanceIsGeneric =
+ !methodDeclarationIsStatic
+ && declaringClassBinding != null
+ && declaringClassBinding.typeVariables != NoTypeVariables;
+ if (genericLocalVariablesCounter != 0 || genericArgumentsCounter != 0 || currentInstanceIsGeneric) {
+ // add the local variable type table attribute
+ numberOfEntries = numberOfGenericEntries + genericArgumentsCounter + (currentInstanceIsGeneric ? 1 : 0);
+ // reserve enough space
+ int maxOfEntries = 8 + numberOfEntries * 10;
+ if (localContentsOffset + maxOfEntries >= this.contents.length) {
+ resizeContents(maxOfEntries);
+ }
+ int localVariableTypeNameIndex =
+ constantPool.literalIndex(AttributeNamesConstants.LocalVariableTypeTableName);
+ this.contents[localContentsOffset++] = (byte) (localVariableTypeNameIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) localVariableTypeNameIndex;
+ value = numberOfEntries * 10 + 2;
+ this.contents[localContentsOffset++] = (byte) (value >> 24);
+ this.contents[localContentsOffset++] = (byte) (value >> 16);
+ this.contents[localContentsOffset++] = (byte) (value >> 8);
+ this.contents[localContentsOffset++] = (byte) value;
+ this.contents[localContentsOffset++] = (byte) (numberOfEntries >> 8);
+ this.contents[localContentsOffset++] = (byte) numberOfEntries;
+ if (currentInstanceIsGeneric) {
+ numberOfEntries++;
+ this.contents[localContentsOffset++] = 0; // the startPC for this is always 0
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = (byte) (code_length >> 8);
+ this.contents[localContentsOffset++] = (byte) code_length;
+ nameIndex = constantPool.literalIndex(QualifiedNamesConstants.This);
+ this.contents[localContentsOffset++] = (byte) (nameIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) nameIndex;
+ descriptorIndex = constantPool.literalIndex(declaringClassBinding.genericTypeSignature());
+ this.contents[localContentsOffset++] = (byte) (descriptorIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) descriptorIndex;
+ this.contents[localContentsOffset++] = 0;// the resolved position for this is always 0
+ this.contents[localContentsOffset++] = 0;
+ }
+
+ for (int i = 0; i < genericLocalVariablesCounter; i++) {
+ LocalVariableBinding localVariable = genericLocalVariables[i];
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = (byte) (code_length >> 8);
+ this.contents[localContentsOffset++] = (byte) code_length;
+ nameIndex = constantPool.literalIndex(localVariable.name);
+ this.contents[localContentsOffset++] = (byte) (nameIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) nameIndex;
+ descriptorIndex = constantPool.literalIndex(localVariable.type.genericTypeSignature());
+ this.contents[localContentsOffset++] = (byte) (descriptorIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) descriptorIndex;
+ int resolvedPosition = localVariable.resolvedPosition;
+ this.contents[localContentsOffset++] = (byte) (resolvedPosition >> 8);
+ this.contents[localContentsOffset++] = (byte) resolvedPosition;
+ }
+ for (int i = 0; i < genericArgumentsCounter; i++) {
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = 0;
+ this.contents[localContentsOffset++] = (byte) (code_length >> 8);
+ this.contents[localContentsOffset++] = (byte) code_length;
+ nameIndex = genericArgumentsNameIndexes[i];
+ this.contents[localContentsOffset++] = (byte) (nameIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) nameIndex;
+ descriptorIndex = constantPool.literalIndex(genericArgumentsTypeBindings[i].genericTypeSignature());
+ this.contents[localContentsOffset++] = (byte) (descriptorIndex >> 8);
+ this.contents[localContentsOffset++] = (byte) descriptorIndex;
+ int resolvedPosition = genericArgumentsResolvedPositions[i];
+ this.contents[localContentsOffset++] = (byte) (resolvedPosition >> 8);
+ this.contents[localContentsOffset++] = (byte) resolvedPosition;
+ }
+ attributeNumber++;
+ }
+ }
+ // update the number of attributes// ensure first that there is enough space available inside the localContents array
+ if (codeAttributeAttributeOffset + 2 >= this.contents.length) {
+ resizeContents(2);
+ }
+ this.contents[codeAttributeAttributeOffset++] = (byte) (attributeNumber >> 8);
+ this.contents[codeAttributeAttributeOffset] = (byte) attributeNumber;
+ // update the attribute length
+ int codeAttributeLength = localContentsOffset - (codeAttributeOffset + 6);
+ this.contents[codeAttributeOffset + 2] = (byte) (codeAttributeLength >> 24);
+ this.contents[codeAttributeOffset + 3] = (byte) (codeAttributeLength >> 16);
+ this.contents[codeAttributeOffset + 4] = (byte) (codeAttributeLength >> 8);
+ this.contents[codeAttributeOffset + 5] = (byte) codeAttributeLength;
+ contentsOffset = localContentsOffset;
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * That method completes the creation of the code attribute by setting
+ * - the attribute_length
+ * - max_stack
+ * - max_locals
+ * - code_length
+ * - exception table
+ * - and debug attributes if necessary.
+ *
+ * @param binding org.eclipse.wst.jsdt.internal.compiler.lookup.SyntheticAccessMethodBinding
+ * @param codeAttributeOffset <CODE>int</CODE>
+ */
+ public void completeCodeAttributeForSyntheticAccessMethod(
+ SyntheticAccessMethodBinding binding,
+ int codeAttributeOffset,
+ int[] startLineIndexes) {
+ // reinitialize the contents with the byte modified by the code stream
+ this.contents = codeStream.bCodeStream;
+ int localContentsOffset = codeStream.classFileOffset;
+ // codeAttributeOffset is the position inside contents byte array before we started to write
+ // any information about the codeAttribute
+ // That means that to write the attribute_length you need to offset by 2 the value of codeAttributeOffset
+ // to get the right position, 6 for the max_stack etc...
+ int max_stack = codeStream.stackMax;
+ contents[codeAttributeOffset + 6] = (byte) (max_stack >> 8);
+ contents[codeAttributeOffset + 7] = (byte) max_stack;
+ int max_locals = codeStream.maxLocals;
+ contents[codeAttributeOffset + 8] = (byte) (max_locals >> 8);
+ contents[codeAttributeOffset + 9] = (byte) max_locals;
+ int code_length = codeStream.position;
+ contents[codeAttributeOffset + 10] = (byte) (code_length >> 24);
+ contents[codeAttributeOffset + 11] = (byte) (code_length >> 16);
+ contents[codeAttributeOffset + 12] = (byte) (code_length >> 8);
+ contents[codeAttributeOffset + 13] = (byte) code_length;
+ if ((localContentsOffset + 40) >= this.contents.length) {
+ resizeContents(40);
+ }
+ // there is no exception table, so we need to offset by 2 the current offset and move
+ // on the attribute generation
+ contents[localContentsOffset++] = 0;
+ contents[localContentsOffset++] = 0;
+ // debug attributes
+ int codeAttributeAttributeOffset = localContentsOffset;
+ int attributeNumber = 0;
+ // leave two bytes for the attribute_length
+ localContentsOffset += 2;
+
+ // first we handle the linenumber attribute
+ if (codeStream.generateLineNumberAttributes) {
+ int index = 0;
+ int lineNumberNameIndex =
+ constantPool.literalIndex(AttributeNamesConstants.LineNumberTableName);
+ contents[localContentsOffset++] = (byte) (lineNumberNameIndex >> 8);
+ contents[localContentsOffset++] = (byte) lineNumberNameIndex;
+ int lineNumberTableOffset = localContentsOffset;
+ localContentsOffset += 6;
+ // leave space for attribute_length and line_number_table_length
+ // Seems like do would be better, but this preserves the existing behavior.
+ index = searchLineNumber(startLineIndexes, binding.sourceStart);
+ contents[localContentsOffset++] = 0;
+ contents[localContentsOffset++] = 0;
+ contents[localContentsOffset++] = (byte) (index >> 8);
+ contents[localContentsOffset++] = (byte) index;
+ // now we change the size of the line number attribute
+ contents[lineNumberTableOffset++] = 0;
+ contents[lineNumberTableOffset++] = 0;
+ contents[lineNumberTableOffset++] = 0;
+ contents[lineNumberTableOffset++] = 6;
+ contents[lineNumberTableOffset++] = 0;
+ contents[lineNumberTableOffset++] = 1;
+ attributeNumber++;
+ }
+ // then we do the local variable attribute
+ if (codeStream.generateLocalVariableTableAttributes) {
+ int localVariableTableOffset = localContentsOffset;
+ int numberOfEntries = 0;
+ int localVariableNameIndex =
+ constantPool.literalIndex(AttributeNamesConstants.LocalVariableTableName);
+ if (localContentsOffset + 8 > this.contents.length) {
+ resizeContents(8);
+ }
+ contents[localContentsOffset++] = (byte) (localVariableNameIndex >> 8);
+ contents[localContentsOffset++] = (byte) localVariableNameIndex;
+ localContentsOffset += 6;
+ // leave space for attribute_length and local_variable_table_length
+ int nameIndex;
+ int descriptorIndex;
+
+ // used to remember the local variable with a generic type
+ int genericLocalVariablesCounter = 0;
+ LocalVariableBinding[] genericLocalVariables = null;
+ int numberOfGenericEntries = 0;
+
+ for (int i = 0, max = codeStream.allLocalsCounter; i < max; i++) {
+ LocalVariableBinding localVariable = codeStream.locals[i];
+ final TypeBinding localVariableTypeBinding = localVariable.type;
+ boolean isParameterizedType = localVariableTypeBinding.isParameterizedType() || localVariableTypeBinding.isTypeVariable();
+ if (localVariable.initializationCount != 0 && isParameterizedType) {
+ if (genericLocalVariables == null) {
+ // we cannot have more than max locals
+ genericLocalVariables = new LocalVariableBinding[max];
+ }
+ genericLocalVariables[genericLocalVariablesCounter++] = localVariable;
+ }
+ for (int j = 0; j < localVariable.initializationCount; j++) {
+ int startPC = localVariable.initializationPCs[j << 1];
+ int endPC = localVariable.initializationPCs[(j << 1) + 1];
+ if (startPC != endPC) { // only entries for non zero length
+ if (endPC == -1) {
+ localVariable.declaringScope.problemReporter().abortDueToInternalError(
+ Util.bind("abort.invalidAttribute" , new String(localVariable.name)), //$NON-NLS-1$
+ (ASTNode) localVariable.declaringScope.methodScope().referenceContext);
+ }
+ if (localContentsOffset + 10 > this.contents.length) {
+ resizeContents(10);
+ }
+ // now we can safely add the local entry
+ numberOfEntries++;
+ if (isParameterizedType) {
+ numberOfGenericEntries++;
+ }
+ contents[localContentsOffset++] = (byte) (startPC >> 8);
+ contents[localContentsOffset++] = (byte) startPC;
+ int length = endPC - startPC;
+ contents[localContentsOffset++] = (byte) (length >> 8);
+ contents[localContentsOffset++] = (byte) length;
+ nameIndex = constantPool.literalIndex(localVariable.name);
+ contents[localContentsOffset++] = (byte) (nameIndex >> 8);
+ contents[localContentsOffset++] = (byte) nameIndex;
+ descriptorIndex = constantPool.literalIndex(localVariableTypeBinding.signature());
+ contents[localContentsOffset++] = (byte) (descriptorIndex >> 8);
+ contents[localContentsOffset++] = (byte) descriptorIndex;
+ int resolvedPosition = localVariable.resolvedPosition;
+ contents[localContentsOffset++] = (byte) (resolvedPosition >> 8);
+ contents[localContentsOffset++] = (byte) resolvedPosition;
+ }
+ }
+ }
+ int value = numberOfEntries * 10 + 2;
+ localVariableTableOffset += 2;
+ contents[localVariableTableOffset++] = (byte) (value >> 24);
+ contents[localVariableTableOffset++] = (byte) (value >> 16);
+ contents[localVariableTableOffset++] = (byte) (value >> 8);
+ contents[localVariableTableOffset++] = (byte) value;
+ contents[localVariableTableOffset++] = (byte) (numberOfEntries >> 8);
+ contents[localVariableTableOffset] = (byte) numberOfEntries;
+ attributeNumber++;
+
+ if (genericLocalVariablesCounter != 0) {
+ // add the local variable type table attribute
+ int maxOfEntries = 8 + numberOfGenericEntries * 10;
+ // reserve enough space
+ if (localContentsOffset + maxOfEntries >= this.contents.length) {
+ resizeContents(maxOfEntries);
+ }
+ int localVariableTypeNameIndex =
+ constantPool.literalIndex(AttributeNamesConstants.LocalVariableTypeTableName);
+ contents[localContentsOffset++] = (byte) (localVariableTypeNameIndex >> 8);
+ contents[localContentsOffset++] = (byte) localVariableTypeNameIndex;
+ value = numberOfGenericEntries * 10 + 2;
+ contents[localContentsOffset++] = (byte) (value >> 24);
+ contents[localContentsOffset++] = (byte) (value >> 16);
+ contents[localContentsOffset++] = (byte) (value >> 8);
+ contents[localContentsOffset++] = (byte) value;
+ contents[localContentsOffset++] = (byte) (numberOfGenericEntries >> 8);
+ contents[localContentsOffset++] = (byte) numberOfGenericEntries;
+
+ for (int i = 0; i < genericLocalVariablesCounter; i++) {
+ LocalVariableBinding localVariable = genericLocalVariables[i];
+ for (int j = 0; j < localVariable.initializationCount; j++) {
+ int startPC = localVariable.initializationPCs[j << 1];
+ int endPC = localVariable.initializationPCs[(j << 1) + 1];
+ if (startPC != endPC) { // only entries for non zero length
+ // now we can safely add the local entry
+ contents[localContentsOffset++] = (byte) (startPC >> 8);
+ contents[localContentsOffset++] = (byte) startPC;
+ int length = endPC - startPC;
+ contents[localContentsOffset++] = (byte) (length >> 8);
+ contents[localContentsOffset++] = (byte) length;
+ nameIndex = constantPool.literalIndex(localVariable.name);
+ contents[localContentsOffset++] = (byte) (nameIndex >> 8);
+ contents[localContentsOffset++] = (byte) nameIndex;
+ descriptorIndex = constantPool.literalIndex(localVariable.type.genericTypeSignature());
+ contents[localContentsOffset++] = (byte) (descriptorIndex >> 8);
+ contents[localContentsOffset++] = (byte) descriptorIndex;
+ int resolvedPosition = localVariable.resolvedPosition;
+ contents[localContentsOffset++] = (byte) (resolvedPosition >> 8);
+ contents[localContentsOffset++] = (byte) resolvedPosition;
+ }
+ }
+ }
+ attributeNumber++;
+ }
+ }
+ // update the number of attributes
+ // ensure first that there is enough space available inside the contents array
+ if (codeAttributeAttributeOffset + 2 >= this.contents.length) {
+ resizeContents(2);
+ }
+ contents[codeAttributeAttributeOffset++] = (byte) (attributeNumber >> 8);
+ contents[codeAttributeAttributeOffset] = (byte) attributeNumber;
+
+ // update the attribute length
+ int codeAttributeLength = localContentsOffset - (codeAttributeOffset + 6);
+ contents[codeAttributeOffset + 2] = (byte) (codeAttributeLength >> 24);
+ contents[codeAttributeOffset + 3] = (byte) (codeAttributeLength >> 16);
+ contents[codeAttributeOffset + 4] = (byte) (codeAttributeLength >> 8);
+ contents[codeAttributeOffset + 5] = (byte) codeAttributeLength;
+ contentsOffset = localContentsOffset;
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * Complete the creation of a method info by setting up the number of attributes at the right offset.
+ *
+ * @param methodAttributeOffset <CODE>int</CODE>
+ * @param attributeNumber <CODE>int</CODE>
+ */
+ public void completeMethodInfo(
+ int methodAttributeOffset,
+ int attributeNumber) {
+ // update the number of attributes
+ contents[methodAttributeOffset++] = (byte) (attributeNumber >> 8);
+ contents[methodAttributeOffset] = (byte) attributeNumber;
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * Request the creation of a ClassFile compatible representation of a problematic type
+ *
+ * @param typeDeclaration org.eclipse.wst.jsdt.internal.compiler.ast.TypeDeclaration
+ * @param unitResult org.eclipse.wst.jsdt.internal.compiler.CompilationUnitResult
+ */
+ public static void createProblemType(
+ TypeDeclaration typeDeclaration,
+ CompilationResult unitResult) {
+ SourceTypeBinding typeBinding = typeDeclaration.binding;
+ ClassFile classFile = new ClassFile(typeBinding, null, true);
+
+ // TODO (olivier) handle cases where a field cannot be generated (name too long)
+ // TODO (olivier) handle too many methods
+ // inner attributes
+ if (typeBinding.isMemberType())
+ classFile.recordEnclosingTypeAttributes(typeBinding);
+
+ // add its fields
+ FieldBinding[] fields = typeBinding.fields;
+ if ((fields != null) && (fields != NoFields)) {
+ for (int i = 0, max = fields.length; i < max; i++) {
+ if (fields[i].constant() == null) {
+ FieldReference.getConstantFor(fields[i], null, false, null);
+ }
+ }
+ classFile.addFieldInfos();
+ } else {
+ // we have to set the number of fields to be equals to 0
+ classFile.contents[classFile.contentsOffset++] = 0;
+ classFile.contents[classFile.contentsOffset++] = 0;
+ }
+ // leave some space for the methodCount
+ classFile.setForMethodInfos();
+ // add its user defined methods
+ MethodBinding[] methods = typeBinding.methods;
+ AbstractMethodDeclaration[] methodDeclarations = typeDeclaration.methods;
+ int maxMethodDecl = methodDeclarations == null ? 0 : methodDeclarations.length;
+ int problemsLength;
+ IProblem[] problems = unitResult.getErrors();
+ if (problems == null) {
+ problems = new IProblem[0];
+ }
+ IProblem[] problemsCopy = new IProblem[problemsLength = problems.length];
+ System.arraycopy(problems, 0, problemsCopy, 0, problemsLength);
+ if (methods != null) {
+ if (typeBinding.isInterface()) {
+ // we cannot create problem methods for an interface. So we have to generate a clinit
+ // which should contain all the problem
+ classFile.addProblemClinit(problemsCopy);
+ for (int i = 0, max = methods.length; i < max; i++) {
+ MethodBinding methodBinding;
+ if ((methodBinding = methods[i]) != null) {
+ // find the corresponding method declaration
+ for (int j = 0; j < maxMethodDecl; j++) {
+ if ((methodDeclarations[j] != null)
+ && (methodDeclarations[j].binding == methods[i])) {
+ if (!methodBinding.isConstructor()) {
+ classFile.addAbstractMethod(methodDeclarations[j], methodBinding);
+ }
+ break;
+ }
+ }
+ }
+ }
+ } else {
+ for (int i = 0, max = methods.length; i < max; i++) {
+ MethodBinding methodBinding;
+ if ((methodBinding = methods[i]) != null) {
+ // find the corresponding method declaration
+ for (int j = 0; j < maxMethodDecl; j++) {
+ if ((methodDeclarations[j] != null)
+ && (methodDeclarations[j].binding == methods[i])) {
+ AbstractMethodDeclaration methodDecl;
+ if ((methodDecl = methodDeclarations[j]).isConstructor()) {
+ classFile.addProblemConstructor(methodDecl, methodBinding, problemsCopy);
+ } else {
+ classFile.addProblemMethod(methodDecl, methodBinding, problemsCopy);
+ }
+ break;
+ }
+ }
+ }
+ }
+ }
+ // add abstract methods
+ classFile.addDefaultAbstractMethods();
+ }
+ // propagate generation of (problem) member types
+ if (typeDeclaration.memberTypes != null) {
+ for (int i = 0, max = typeDeclaration.memberTypes.length; i < max; i++) {
+ TypeDeclaration memberType = typeDeclaration.memberTypes[i];
+ if (memberType.binding != null) {
+ classFile.recordNestedMemberAttribute(memberType.binding);
+ ClassFile.createProblemType(memberType, unitResult);
+ }
+ }
+ }
+ classFile.addAttributes();
+ unitResult.record(typeBinding.constantPoolName(), classFile);
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * This methods returns a char[] representing the file name of the receiver
+ *
+ * @return char[]
+ */
+ public char[] fileName() {
+ return constantPool.UTF8Cache.returnKeyFor(1);
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * That method generates the header of a code attribute.
+ * - the index inside the constant pool for the attribute name ("Code")
+ * - leave some space for attribute_length(4), max_stack(2), max_locals(2), code_length(4).
+ */
+ public void generateCodeAttributeHeader() {
+ if (contentsOffset + 20 >= this.contents.length) {
+ resizeContents(20);
+ }
+ int constantValueNameIndex =
+ constantPool.literalIndex(AttributeNamesConstants.CodeName);
+ contents[contentsOffset++] = (byte) (constantValueNameIndex >> 8);
+ contents[contentsOffset++] = (byte) constantValueNameIndex;
+ // leave space for attribute_length(4), max_stack(2), max_locals(2), code_length(4)
+ contentsOffset += 12;
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * That method generates the attributes of a code attribute.
+ * They could be:
+ * - an exception attribute for each try/catch found inside the method
+ * - a deprecated attribute
+ * - a synthetic attribute for synthetic access methods
+ *
+ * It returns the number of attributes created for the code attribute.
+ *
+ * @param methodBinding org.eclipse.wst.jsdt.internal.compiler.lookup.MethodBinding
+ * @return <CODE>int</CODE>
+ */
+ public int generateMethodInfoAttribute(MethodBinding methodBinding) {
+ // leave two bytes for the attribute_number
+ contentsOffset += 2;
+ // now we can handle all the attribute for that method info:
+ // it could be:
+ // - a CodeAttribute
+ // - a ExceptionAttribute
+ // - a DeprecatedAttribute
+ // - a SyntheticAttribute
+
+ // Exception attribute
+ ReferenceBinding[] thrownsExceptions;
+ int attributeNumber = 0;
+ if ((thrownsExceptions = methodBinding.thrownExceptions) != NoExceptions) {
+ // The method has a throw clause. So we need to add an exception attribute
+ // check that there is enough space to write all the bytes for the exception attribute
+ int length = thrownsExceptions.length;
+ int exSize = 8 + length * 2;
+ if (exSize + contentsOffset >= this.contents.length) {
+ resizeContents(exSize);
+ }
+ int exceptionNameIndex =
+ constantPool.literalIndex(AttributeNamesConstants.ExceptionsName);
+ contents[contentsOffset++] = (byte) (exceptionNameIndex >> 8);
+ contents[contentsOffset++] = (byte) exceptionNameIndex;
+ // The attribute length = length * 2 + 2 in case of a exception attribute
+ int attributeLength = length * 2 + 2;
+ contents[contentsOffset++] = (byte) (attributeLength >> 24);
+ contents[contentsOffset++] = (byte) (attributeLength >> 16);
+ contents[contentsOffset++] = (byte) (attributeLength >> 8);
+ contents[contentsOffset++] = (byte) attributeLength;
+ contents[contentsOffset++] = (byte) (length >> 8);
+ contents[contentsOffset++] = (byte) length;
+ for (int i = 0; i < length; i++) {
+ int exceptionIndex = constantPool.literalIndex(thrownsExceptions[i]);
+ contents[contentsOffset++] = (byte) (exceptionIndex >> 8);
+ contents[contentsOffset++] = (byte) exceptionIndex;
+ }
+ attributeNumber++;
+ }
+ if (methodBinding.isDeprecated()) {
+ // Deprecated attribute
+ // Check that there is enough space to write the deprecated attribute
+ if (contentsOffset + 6 >= this.contents.length) {
+ resizeContents(6);
+ }
+ int deprecatedAttributeNameIndex =
+ constantPool.literalIndex(AttributeNamesConstants.DeprecatedName);
+ contents[contentsOffset++] = (byte) (deprecatedAttributeNameIndex >> 8);
+ contents[contentsOffset++] = (byte) deprecatedAttributeNameIndex;
+ // the length of a deprecated attribute is equals to 0
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+
+ attributeNumber++;
+ }
+ if (this.targetJDK < ClassFileConstants.JDK1_5 && methodBinding.isSynthetic()) {
+ // Synthetic attribute
+ // Check that there is enough space to write the deprecated attribute
+ if (contentsOffset + 6 >= this.contents.length) {
+ resizeContents(6);
+ }
+ int syntheticAttributeNameIndex =
+ constantPool.literalIndex(AttributeNamesConstants.SyntheticName);
+ contents[contentsOffset++] = (byte) (syntheticAttributeNameIndex >> 8);
+ contents[contentsOffset++] = (byte) syntheticAttributeNameIndex;
+ // the length of a synthetic attribute is equals to 0
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+
+ attributeNumber++;
+ }
+ // add signature attribute
+ char[] genericSignature = methodBinding.genericSignature();
+ if (genericSignature != null) {
+ // check that there is enough space to write all the bytes for the field info corresponding
+ // to the @fieldBinding
+ if (contentsOffset + 8 >= this.contents.length) {
+ resizeContents(8);
+ }
+ int signatureAttributeNameIndex =
+ constantPool.literalIndex(AttributeNamesConstants.SignatureName);
+ contents[contentsOffset++] = (byte) (signatureAttributeNameIndex >> 8);
+ contents[contentsOffset++] = (byte) signatureAttributeNameIndex;
+ // the length of a signature attribute is equals to 2
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 2;
+ int signatureIndex =
+ constantPool.literalIndex(genericSignature);
+ contents[contentsOffset++] = (byte) (signatureIndex >> 8);
+ contents[contentsOffset++] = (byte) signatureIndex;
+ attributeNumber++;
+ }
+ return attributeNumber;
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * That method generates the header of a method info:
+ * The header consists in:
+ * - the access flags
+ * - the name index of the method name inside the constant pool
+ * - the descriptor index of the signature of the method inside the constant pool.
+ *
+ * @param methodBinding org.eclipse.wst.jsdt.internal.compiler.lookup.MethodBinding
+ */
+ public void generateMethodInfoHeader(MethodBinding methodBinding) {
+ generateMethodInfoHeader(methodBinding, methodBinding.modifiers);
+ }
+ /**
+ * INTERNAL USE-ONLY
+ * That method generates the header of a method info:
+ * The header consists in:
+ * - the access flags
+ * - the name index of the method name inside the constant pool
+ * - the descriptor index of the signature of the method inside the constant pool.
+ *
+ * @param methodBinding org.eclipse.wst.jsdt.internal.compiler.lookup.MethodBinding
+ * @param accessFlags the access flags
+ */
+ public void generateMethodInfoHeader(MethodBinding methodBinding, int accessFlags) {
+ // check that there is enough space to write all the bytes for the method info corresponding
+ // to the @methodBinding
+ methodCount++; // add one more method
+ if (contentsOffset + 10 >= this.contents.length) {
+ resizeContents(10);
+ }
+ if (targetJDK < ClassFileConstants.JDK1_5) {
+ // pre 1.5, synthetic was an attribute, not a modifier
+ accessFlags &= ~AccSynthetic;
+ }
+ if (methodBinding.isRequiredToClearPrivateModifier()) {
+ accessFlags &= ~AccPrivate;
+ }
+ contents[contentsOffset++] = (byte) (accessFlags >> 8);
+ contents[contentsOffset++] = (byte) accessFlags;
+ int nameIndex = constantPool.literalIndex(methodBinding.selector);
+ contents[contentsOffset++] = (byte) (nameIndex >> 8);
+ contents[contentsOffset++] = (byte) nameIndex;
+ int descriptorIndex = constantPool.literalIndex(methodBinding.signature());
+ contents[contentsOffset++] = (byte) (descriptorIndex >> 8);
+ contents[contentsOffset++] = (byte) descriptorIndex;
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * That method generates the method info header of a clinit:
+ * The header consists in:
+ * - the access flags (always default access + static)
+ * - the name index of the method name (always <clinit>) inside the constant pool
+ * - the descriptor index of the signature (always ()V) of the method inside the constant pool.
+ */
+ public void generateMethodInfoHeaderForClinit() {
+ // check that there is enough space to write all the bytes for the method info corresponding
+ // to the @methodBinding
+ methodCount++; // add one more method
+ if (contentsOffset + 10 >= this.contents.length) {
+ resizeContents(10);
+ }
+ contents[contentsOffset++] = (byte) ((AccDefault | AccStatic) >> 8);
+ contents[contentsOffset++] = (byte) (AccDefault | AccStatic);
+ int nameIndex = constantPool.literalIndex(QualifiedNamesConstants.Clinit);
+ contents[contentsOffset++] = (byte) (nameIndex >> 8);
+ contents[contentsOffset++] = (byte) nameIndex;
+ int descriptorIndex =
+ constantPool.literalIndex(QualifiedNamesConstants.ClinitSignature);
+ contents[contentsOffset++] = (byte) (descriptorIndex >> 8);
+ contents[contentsOffset++] = (byte) descriptorIndex;
+ // We know that we won't get more than 1 attribute: the code attribute
+ contents[contentsOffset++] = 0;
+ contents[contentsOffset++] = 1;
+ }
+
+ /**
+ * EXTERNAL API
+ * Answer the actual bytes of the class file
+ *
+ * This method encodes the receiver structure into a byte array which is the content of the classfile.
+ * Returns the byte array that represents the encoded structure of the receiver.
+ *
+ * @return byte[]
+ */
+ public byte[] getBytes() {
+ byte[] fullContents = new byte[headerOffset + contentsOffset];
+ System.arraycopy(header, 0, fullContents, 0, headerOffset);
+ System.arraycopy(contents, 0, fullContents, headerOffset, contentsOffset);
+ return fullContents;
+ }
+
+ /**
+ * EXTERNAL API
+ * Answer the compound name of the class file.
+ * @return char[][]
+ * e.g. {{java}, {util}, {Hashtable}}.
+ */
+ public char[][] getCompoundName() {
+ return CharOperation.splitOn('/', fileName());
+ }
+
+ protected void initByteArrays() {
+ LookupEnvironment env = this.referenceBinding.scope.environment();
+ synchronized (env) {
+ if (env.sharedArraysUsed) {
+ this.ownSharedArrays = false;
+ int members = referenceBinding.methods().length + referenceBinding.fields().length;
+ this.header = new byte[INITIAL_HEADER_SIZE];
+ this.contents = new byte[members < 15 ? INITIAL_CONTENTS_SIZE : INITIAL_HEADER_SIZE];
+ } else {
+ this.ownSharedArrays = env.sharedArraysUsed = true;
+ this.header = env.sharedClassFileHeader;
+ this.contents = env.sharedClassFileContents;
+ }
+ }
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * Returns the most enclosing classfile of the receiver. This is used know to store the constant pool name
+ * for all inner types of the receiver.
+ * @return org.eclipse.wst.jsdt.internal.compiler.codegen.ClassFile
+ */
+ public ClassFile outerMostEnclosingClassFile() {
+ ClassFile current = this;
+ while (current.enclosingClassFile != null)
+ current = current.enclosingClassFile;
+ return current;
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * This is used to store a new inner class. It checks that the binding @binding doesn't already exist inside the
+ * collection of inner classes. Add all the necessary classes in the right order to fit to the specifications.
+ *
+ * @param binding org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding
+ */
+ public void recordEnclosingTypeAttributes(ReferenceBinding binding) {
+ // add all the enclosing types
+ ReferenceBinding enclosingType = referenceBinding.enclosingType();
+ int depth = 0;
+ while (enclosingType != null) {
+ depth++;
+ enclosingType = enclosingType.enclosingType();
+ }
+ enclosingType = referenceBinding;
+ ReferenceBinding enclosingTypes[];
+ if (depth >= 2) {
+ enclosingTypes = new ReferenceBinding[depth];
+ for (int i = depth - 1; i >= 0; i--) {
+ enclosingTypes[i] = enclosingType;
+ enclosingType = enclosingType.enclosingType();
+ }
+ for (int i = 0; i < depth; i++) {
+ addInnerClasses(enclosingTypes[i]);
+ }
+ } else {
+ addInnerClasses(referenceBinding);
+ }
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * This is used to store a new inner class. It checks that the binding @binding doesn't already exist inside the
+ * collection of inner classes. Add all the necessary classes in the right order to fit to the specifications.
+ *
+ * @param binding org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding
+ */
+ public void recordNestedLocalAttribute(ReferenceBinding binding) {
+ // add all the enclosing types
+ ReferenceBinding enclosingType = referenceBinding.enclosingType();
+ int depth = 0;
+ while (enclosingType != null) {
+ depth++;
+ enclosingType = enclosingType.enclosingType();
+ }
+ enclosingType = referenceBinding;
+ ReferenceBinding enclosingTypes[];
+ if (depth >= 2) {
+ enclosingTypes = new ReferenceBinding[depth];
+ for (int i = depth - 1; i >= 0; i--) {
+ enclosingTypes[i] = enclosingType;
+ enclosingType = enclosingType.enclosingType();
+ }
+ for (int i = 0; i < depth; i++)
+ addInnerClasses(enclosingTypes[i]);
+ } else {
+ addInnerClasses(binding);
+ }
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * This is used to store a new inner class. It checks that the binding @binding doesn't already exist inside the
+ * collection of inner classes. Add all the necessary classes in the right order to fit to the specifications.
+ *
+ * @param binding org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding
+ */
+ public void recordNestedMemberAttribute(ReferenceBinding binding) {
+ addInnerClasses(binding);
+ }
+
+ /**
+ * Resize the pool contents
+ */
+ private final void resizeContents(int minimalSize) {
+ int length = this.contents.length;
+ int toAdd = length;
+ if (toAdd < minimalSize)
+ toAdd = minimalSize;
+ System.arraycopy(this.contents, 0, this.contents = new byte[length + toAdd], 0, length);
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * Search the line number corresponding to a specific position
+ */
+ public static final int searchLineNumber(
+ int[] startLineIndexes,
+ int position) {
+ // this code is completely useless, but it is the same implementation than
+ // org.eclipse.wst.jsdt.internal.compiler.problem.ProblemHandler.searchLineNumber(int[], int)
+ // if (startLineIndexes == null)
+ // return 1;
+ int length = startLineIndexes.length;
+ if (length == 0)
+ return 1;
+ int g = 0, d = length - 1;
+ int m = 0;
+ while (g <= d) {
+ m = (g + d) / 2;
+ if (position < startLineIndexes[m]) {
+ d = m - 1;
+ } else
+ if (position > startLineIndexes[m]) {
+ g = m + 1;
+ } else {
+ return m + 1;
+ }
+ }
+ if (position < startLineIndexes[m]) {
+ return m + 1;
+ }
+ return m + 2;
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * This methods leaves the space for method counts recording.
+ */
+ public void setForMethodInfos() {
+ // leave some space for the methodCount
+ methodCountOffset = contentsOffset;
+ contentsOffset += 2;
+ }
+
+ /**
+ * INTERNAL USE-ONLY
+ * outputPath is formed like:
+ * c:\temp\ the last character is a file separator
+ * relativeFileName is formed like:
+ * java\lang\String.class
+ * @param generatePackagesStructure a flag to know if the packages structure has to be generated.
+ * @param outputPath the output directory
+ * @param relativeFileName java.lang.String
+ * @param contents byte[]
+ *
+ */
+ public static void writeToDisk(
+ boolean generatePackagesStructure,
+ String outputPath,
+ String relativeFileName,
+ byte[] contents)
+ throws IOException {
+
+ BufferedOutputStream output = null;
+ if (generatePackagesStructure) {
+ output = new BufferedOutputStream(
+ new FileOutputStream(
+ new File(buildAllDirectoriesInto(outputPath, relativeFileName))));
+ } else {
+ String fileName = null;
+ char fileSeparatorChar = File.separatorChar;
+ String fileSeparator = File.separator;
+ // First we ensure that the outputPath exists
+ outputPath = outputPath.replace('/', fileSeparatorChar);
+ // To be able to pass the mkdirs() method we need to remove the extra file separator at the end of the outDir name
+ int indexOfPackageSeparator = relativeFileName.lastIndexOf(fileSeparatorChar);
+ if (indexOfPackageSeparator == -1) {
+ if (outputPath.endsWith(fileSeparator)) {
+ fileName = outputPath + relativeFileName;
+ } else {
+ fileName = outputPath + fileSeparator + relativeFileName;
+ }
+ } else {
+ int length = relativeFileName.length();
+ if (outputPath.endsWith(fileSeparator)) {
+ fileName = outputPath + relativeFileName.substring(indexOfPackageSeparator + 1, length);
+ } else {
+ fileName = outputPath + fileSeparator + relativeFileName.substring(indexOfPackageSeparator + 1, length);
+ }
+ }
+ output = new BufferedOutputStream(
+ new FileOutputStream(
+ new File(fileName)));
+ }
+ try {
+ output.write(contents);
+ } finally {
+ output.flush();
+ output.close();
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/CompilationResult.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/CompilationResult.js
new file mode 100644
index 0000000..45dc35d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/CompilationResult.js
@@ -0,0 +1,433 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler;
+
+/**
+ * A compilation result consists of all information returned by the compiler for
+ * a single compiled compilation source unit. This includes:
+ * <ul>
+ * <li> the compilation unit that was compiled
+ * <li> for each type produced by compiling the compilation unit, its binary and optionally its principal structure
+ * <li> any problems (errors or warnings) produced
+ * <li> dependency info
+ * </ul>
+ *
+ * The principle structure and binary may be null if the compiler could not produce them.
+ * If neither could be produced, there is no corresponding entry for the type.
+ *
+ * The dependency info includes type references such as supertypes, field types, method
+ * parameter and return types, local variable types, types of intermediate expressions, etc.
+ * It also includes the namespaces (packages) in which names were looked up.
+ * It does <em>not</em> include finer grained dependencies such as information about
+ * specific fields and methods which were referenced, but does contain their
+ * declaring types and any other types used to locate such fields or methods.
+ */
+
+import org.eclipse.wst.jsdt.core.compiler.*;
+import org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.env.*;
+import org.eclipse.wst.jsdt.internal.compiler.impl.ReferenceContext;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.SourceTypeBinding;
+
+import java.util.*;
+
+public class CompilationResult {
+
+ public IProblem problems[];
+ public IProblem tasks[];
+ public int problemCount;
+ public int taskCount;
+ public ICompilationUnit compilationUnit;
+ private Map problemsMap;
+ private Map firstErrorsMap;
+ private int maxProblemPerUnit;
+ public char[][][] qualifiedReferences;
+ public char[][] simpleNameReferences;
+
+ public int lineSeparatorPositions[];
+ public Hashtable compiledTypes = new Hashtable(11);
+ public int unitIndex, totalUnitsKnown;
+ public boolean hasBeenAccepted = false;
+ public char[] fileName;
+ public boolean hasInconsistentToplevelHierarchies = false; // record the fact some toplevel types have inconsistent hierarchies
+
+ public CompilationResult(
+ char[] fileName,
+ int unitIndex,
+ int totalUnitsKnown,
+ int maxProblemPerUnit){
+
+ this.fileName = fileName;
+ this.unitIndex = unitIndex;
+ this.totalUnitsKnown = totalUnitsKnown;
+ this.maxProblemPerUnit = maxProblemPerUnit;
+ }
+
+ public CompilationResult(
+ ICompilationUnit compilationUnit,
+ int unitIndex,
+ int totalUnitsKnown,
+ int maxProblemPerUnit){
+
+ this.fileName = compilationUnit.getFileName();
+ this.compilationUnit = compilationUnit;
+ this.unitIndex = unitIndex;
+ this.totalUnitsKnown = totalUnitsKnown;
+ this.maxProblemPerUnit = maxProblemPerUnit;
+ }
+
+ private int computePriority(IProblem problem){
+
+ final int P_STATIC = 10000;
+ final int P_OUTSIDE_METHOD = 40000;
+ final int P_FIRST_ERROR = 20000;
+ final int P_ERROR = 100000;
+
+ int priority = 10000 - problem.getSourceLineNumber(); // early problems first
+ if (priority < 0) priority = 0;
+ if (problem.isError()){
+ priority += P_ERROR;
+ }
+ ReferenceContext context = problemsMap == null ? null : (ReferenceContext) problemsMap.get(problem);
+ if (context != null){
+ if (context instanceof AbstractMethodDeclaration){
+ AbstractMethodDeclaration method = (AbstractMethodDeclaration) context;
+ if (method.isStatic()) {
+ priority += P_STATIC;
+ }
+ } else {
+ priority += P_OUTSIDE_METHOD;
+ }
+ } else {
+ priority += P_OUTSIDE_METHOD;
+ }
+ if (firstErrorsMap.containsKey(problem)){
+ priority += P_FIRST_ERROR;
+ }
+ return priority;
+ }
+
+
+ public IProblem[] getAllProblems() {
+ IProblem[] onlyProblems = this.getProblems();
+ int onlyProblemCount = onlyProblems != null ? onlyProblems.length : 0;
+ IProblem[] onlyTasks = this.getTasks();
+ int onlyTaskCount = onlyTasks != null ? onlyTasks.length : 0;
+ if (onlyTaskCount == 0) {
+ return onlyProblems;
+ }
+ if (onlyProblemCount == 0) {
+ return onlyTasks;
+ }
+
+ int totalNumberOfProblem = onlyProblemCount + onlyTaskCount;
+ IProblem[] allProblems = new IProblem[totalNumberOfProblem];
+ int allProblemIndex = 0;
+ int taskIndex = 0;
+ int problemIndex = 0;
+ while (taskIndex + problemIndex < totalNumberOfProblem) {
+ IProblem nextTask = null;
+ IProblem nextProblem = null;
+ if (taskIndex < onlyTaskCount) {
+ nextTask = onlyTasks[taskIndex];
+ }
+ if (problemIndex < onlyProblemCount) {
+ nextProblem = onlyProblems[problemIndex];
+ }
+ // select the next problem
+ IProblem currentProblem = null;
+ if (nextProblem != null) {
+ if (nextTask != null) {
+ if (nextProblem.getSourceStart() < nextTask.getSourceStart()) {
+ currentProblem = nextProblem;
+ problemIndex++;
+ } else {
+ currentProblem = nextTask;
+ taskIndex++;
+ }
+ } else {
+ currentProblem = nextProblem;
+ problemIndex++;
+ }
+ } else {
+ if (nextTask != null) {
+ currentProblem = nextTask;
+ taskIndex++;
+ }
+ }
+ allProblems[allProblemIndex++] = currentProblem;
+ }
+ return allProblems;
+ }
+
+ public ClassFile[] getClassFiles() {
+ Enumeration files = compiledTypes.elements();
+ ClassFile[] classFiles = new ClassFile[compiledTypes.size()];
+ int index = 0;
+ while (files.hasMoreElements()){
+ classFiles[index++] = (ClassFile)files.nextElement();
+ }
+ return classFiles;
+ }
+
+ /**
+ * Answer the initial compilation unit corresponding to the present compilation result
+ */
+ public ICompilationUnit getCompilationUnit(){
+ return compilationUnit;
+ }
+
+ /**
+ * Answer the initial file name
+ */
+ public char[] getFileName(){
+ return fileName;
+ }
+
+ /**
+ * Answer the errors encountered during compilation.
+ */
+ public IProblem[] getErrors() {
+
+ IProblem[] reportedProblems = getProblems();
+ int errorCount = 0;
+ for (int i = 0; i < this.problemCount; i++) {
+ if (reportedProblems[i].isError()) errorCount++;
+ }
+ if (errorCount == this.problemCount) return reportedProblems;
+ IProblem[] errors = new IProblem[errorCount];
+ int index = 0;
+ for (int i = 0; i < this.problemCount; i++) {
+ if (reportedProblems[i].isError()) errors[index++] = reportedProblems[i];
+ }
+ return errors;
+ }
+
+ /**
+ * Answer the problems (errors and warnings) encountered during compilation.
+ *
+ * This is not a compiler internal API - it has side-effects !
+ * It is intended to be used only once all problems have been detected,
+ * and makes sure the problems slot as the exact size of the number of
+ * problems.
+ */
+ public IProblem[] getProblems() {
+
+ // Re-adjust the size of the problems if necessary.
+ if (problems != null) {
+
+ if (this.problemCount != problems.length) {
+ System.arraycopy(problems, 0, (problems = new IProblem[problemCount]), 0, problemCount);
+ }
+
+ if (this.maxProblemPerUnit > 0 && this.problemCount > this.maxProblemPerUnit){
+ quickPrioritize(problems, 0, problemCount - 1);
+ this.problemCount = this.maxProblemPerUnit;
+ System.arraycopy(problems, 0, (problems = new IProblem[problemCount]), 0, problemCount);
+ }
+
+ // Sort problems per source positions.
+ quickSort(problems, 0, problems.length-1);
+ }
+ return problems;
+ }
+
+ /**
+ * Answer the tasks (TO-DO, ...) encountered during compilation.
+ *
+ * This is not a compiler internal API - it has side-effects !
+ * It is intended to be used only once all problems have been detected,
+ * and makes sure the problems slot as the exact size of the number of
+ * problems.
+ */
+ public IProblem[] getTasks() {
+
+ // Re-adjust the size of the tasks if necessary.
+ if (this.tasks != null) {
+
+ if (this.taskCount != this.tasks.length) {
+ System.arraycopy(this.tasks, 0, (this.tasks = new IProblem[this.taskCount]), 0, this.taskCount);
+ }
+ quickSort(tasks, 0, tasks.length-1);
+ }
+ return this.tasks;
+ }
+
+ public boolean hasErrors() {
+
+ if (problems != null)
+ for (int i = 0; i < problemCount; i++) {
+ if (problems[i].isError())
+ return true;
+ }
+ return false;
+ }
+
+ public boolean hasProblems() {
+
+ return problemCount != 0;
+ }
+
+ public boolean hasSyntaxError(){
+
+ if (problems != null)
+ for (int i = 0; i < problemCount; i++) {
+ IProblem problem = problems[i];
+ if ((problem.getID() & IProblem.Syntax) != 0 && problem.isError())
+ return true;
+ }
+ return false;
+ }
+
+ public boolean hasTasks() {
+ return this.taskCount != 0;
+ }
+
+ public boolean hasWarnings() {
+
+ if (problems != null)
+ for (int i = 0; i < problemCount; i++) {
+ if (problems[i].isWarning())
+ return true;
+ }
+ return false;
+ }
+
+ private static void quickSort(IProblem[] list, int left, int right) {
+
+ if (left >= right) return;
+
+ // sort the problems by their source start position... starting with 0
+ int original_left = left;
+ int original_right = right;
+ int mid = list[(left + right) / 2].getSourceStart();
+ do {
+ while (list[left].getSourceStart() < mid)
+ left++;
+ while (mid < list[right].getSourceStart())
+ right--;
+ if (left <= right) {
+ IProblem tmp = list[left];
+ list[left] = list[right];
+ list[right] = tmp;
+ left++;
+ right--;
+ }
+ } while (left <= right);
+ if (original_left < right)
+ quickSort(list, original_left, right);
+ if (left < original_right)
+ quickSort(list, left, original_right);
+ }
+
+ private void quickPrioritize(IProblem[] list, int left, int right) {
+
+ if (left >= right) return;
+
+ // sort the problems by their priority... starting with the highest priority
+ int original_left = left;
+ int original_right = right;
+ int mid = computePriority(list[(left + right) / 2]);
+ do {
+ while (computePriority(list[right]) < mid)
+ right--;
+ while (mid < computePriority(list[left]))
+ left++;
+ if (left <= right) {
+ IProblem tmp = list[left];
+ list[left] = list[right];
+ list[right] = tmp;
+ left++;
+ right--;
+ }
+ } while (left <= right);
+ if (original_left < right)
+ quickPrioritize(list, original_left, right);
+ if (left < original_right)
+ quickPrioritize(list, left, original_right);
+ }
+
+ /**
+ * For now, remember the compiled type using its compound name.
+ */
+ public void record(char[] typeName, ClassFile classFile) {
+
+ SourceTypeBinding sourceType = classFile.referenceBinding;
+ if (!sourceType.isLocalType() && sourceType.isHierarchyInconsistent()) {
+ this.hasInconsistentToplevelHierarchies = true;
+ }
+ compiledTypes.put(typeName, classFile);
+ }
+
+ public void record(IProblem newProblem, ReferenceContext referenceContext) {
+
+ if (newProblem.getID() == IProblem.Task) {
+ recordTask(newProblem);
+ return;
+ }
+ if (problemCount == 0) {
+ problems = new IProblem[5];
+ } else if (problemCount == problems.length) {
+ System.arraycopy(problems, 0, (problems = new IProblem[problemCount * 2]), 0, problemCount);
+ }
+ problems[problemCount++] = newProblem;
+ if (referenceContext != null){
+ if (problemsMap == null) problemsMap = new Hashtable(5);
+ if (firstErrorsMap == null) firstErrorsMap = new Hashtable(5);
+ if (newProblem.isError() && !referenceContext.hasErrors()) firstErrorsMap.put(newProblem, newProblem);
+ problemsMap.put(newProblem, referenceContext);
+ }
+ }
+
+ private void recordTask(IProblem newProblem) {
+ if (this.taskCount == 0) {
+ this.tasks = new IProblem[5];
+ } else if (this.taskCount == this.tasks.length) {
+ System.arraycopy(this.tasks, 0, (this.tasks = new IProblem[this.taskCount * 2]), 0, this.taskCount);
+ }
+ this.tasks[this.taskCount++] = newProblem;
+ }
+
+ public CompilationResult tagAsAccepted(){
+
+ this.hasBeenAccepted = true;
+ this.problemsMap = null; // flush
+ return this;
+ }
+
+ public String toString(){
+
+ StringBuffer buffer = new StringBuffer();
+ if (this.fileName != null){
+ buffer.append("Filename : ").append(this.fileName).append('\n'); //$NON-NLS-1$
+ }
+ if (this.compiledTypes != null){
+ buffer.append("COMPILED type(s) \n"); //$NON-NLS-1$
+ Enumeration typeNames = this.compiledTypes.keys();
+ while (typeNames.hasMoreElements()) {
+ char[] typeName = (char[]) typeNames.nextElement();
+ buffer.append("\t - ").append(typeName).append('\n'); //$NON-NLS-1$
+
+ }
+ } else {
+ buffer.append("No COMPILED type\n"); //$NON-NLS-1$
+ }
+ if (problems != null){
+ buffer.append(this.problemCount).append(" PROBLEM(s) detected \n"); //$NON-NLS-1$//$NON-NLS-2$
+ for (int i = 0; i < this.problemCount; i++){
+ buffer.append("\t - ").append(this.problems[i]).append('\n'); //$NON-NLS-1$
+ }
+ } else {
+ buffer.append("No PROBLEM\n"); //$NON-NLS-1$
+ }
+ return buffer.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/Compiler.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/Compiler.js
new file mode 100644
index 0000000..55a0ed4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/Compiler.js
@@ -0,0 +1,610 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler;
+
+import org.eclipse.wst.jsdt.core.compiler.*;
+import org.eclipse.wst.jsdt.internal.compiler.env.*;
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.ast.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+import org.eclipse.wst.jsdt.internal.compiler.parser.*;
+import org.eclipse.wst.jsdt.internal.compiler.problem.*;
+import org.eclipse.wst.jsdt.internal.compiler.util.*;
+
+import java.io.*;
+import java.util.*;
+
+public class Compiler implements ITypeRequestor, ProblemSeverities {
+ public Parser parser;
+ public ICompilerRequestor requestor;
+ public CompilerOptions options;
+ public ProblemReporter problemReporter;
+
+ // management of unit to be processed
+ //public CompilationUnitResult currentCompilationUnitResult;
+ public CompilationUnitDeclaration[] unitsToProcess;
+ public int totalUnits; // (totalUnits-1) gives the last unit in unitToProcess
+
+ // name lookup
+ public LookupEnvironment lookupEnvironment;
+
+ // ONCE STABILIZED, THESE SHOULD RETURN TO A FINAL FIELD
+ public static boolean DEBUG = false;
+ public int parseThreshold = -1;
+ // number of initial units parsed at once (-1: none)
+
+ /*
+ * Static requestor reserved to listening compilation results in debug mode,
+ * so as for example to monitor compiler activity independantly from a particular
+ * builder implementation. It is reset at the end of compilation, and should not
+ * persist any information after having been reset.
+ */
+ public static IDebugRequestor DebugRequestor = null;
+
+ /**
+ * Answer a new compiler using the given name environment and compiler options.
+ * The environment and options will be in effect for the lifetime of the compiler.
+ * When the compiler is run, compilation results are sent to the given requestor.
+ *
+ * @param environment org.eclipse.wst.jsdt.internal.compiler.api.env.INameEnvironment
+ * Environment used by the compiler in order to resolve type and package
+ * names. The name environment implements the actual connection of the compiler
+ * to the outside world (e.g. in batch mode the name environment is performing
+ * pure file accesses, reuse previous build state or connection to repositories).
+ * Note: the name environment is responsible for implementing the actual classpath
+ * rules.
+ *
+ * @param policy org.eclipse.wst.jsdt.internal.compiler.api.problem.IErrorHandlingPolicy
+ * Configurable part for problem handling, allowing the compiler client to
+ * specify the rules for handling problems (stop on first error or accumulate
+ * them all) and at the same time perform some actions such as opening a dialog
+ * in UI when compiling interactively.
+ * @see org.eclipse.wst.jsdt.internal.compiler.DefaultErrorHandlingPolicies
+ *
+ * @param requestor org.eclipse.wst.jsdt.internal.compiler.api.ICompilerRequestor
+ * Component which will receive and persist all compilation results and is intended
+ * to consume them as they are produced. Typically, in a batch compiler, it is
+ * responsible for writing out the actual .class files to the file system.
+ * @see org.eclipse.wst.jsdt.internal.compiler.CompilationResult
+ *
+ * @param problemFactory org.eclipse.wst.jsdt.internal.compiler.api.problem.IProblemFactory
+ * Factory used inside the compiler to create problem descriptors. It allows the
+ * compiler client to supply its own representation of compilation problems in
+ * order to avoid object conversions. Note that the factory is not supposed
+ * to accumulate the created problems, the compiler will gather them all and hand
+ * them back as part of the compilation unit result.
+ */
+ public Compiler(
+ INameEnvironment environment,
+ IErrorHandlingPolicy policy,
+ Map settings,
+ final ICompilerRequestor requestor,
+ IProblemFactory problemFactory) {
+
+ // create a problem handler given a handling policy
+ this.options = new CompilerOptions(settings);
+
+ // wrap requestor in DebugRequestor if one is specified
+ if(DebugRequestor == null) {
+ this.requestor = requestor;
+ } else {
+ this.requestor = new ICompilerRequestor(){
+ public void acceptResult(CompilationResult result){
+ if (DebugRequestor.isActive()){
+ DebugRequestor.acceptDebugResult(result);
+ }
+ requestor.acceptResult(result);
+ }
+ };
+ }
+ this.problemReporter =
+ new ProblemReporter(policy, this.options, problemFactory);
+ this.lookupEnvironment =
+ new LookupEnvironment(this, options, problemReporter, environment);
+ initializeParser();
+ }
+
+ /**
+ * Answer a new compiler using the given name environment and compiler options.
+ * The environment and options will be in effect for the lifetime of the compiler.
+ * When the compiler is run, compilation results are sent to the given requestor.
+ *
+ * @param environment org.eclipse.wst.jsdt.internal.compiler.api.env.INameEnvironment
+ * Environment used by the compiler in order to resolve type and package
+ * names. The name environment implements the actual connection of the compiler
+ * to the outside world (e.g. in batch mode the name environment is performing
+ * pure file accesses, reuse previous build state or connection to repositories).
+ * Note: the name environment is responsible for implementing the actual classpath
+ * rules.
+ *
+ * @param policy org.eclipse.wst.jsdt.internal.compiler.api.problem.IErrorHandlingPolicy
+ * Configurable part for problem handling, allowing the compiler client to
+ * specify the rules for handling problems (stop on first error or accumulate
+ * them all) and at the same time perform some actions such as opening a dialog
+ * in UI when compiling interactively.
+ * @see org.eclipse.wst.jsdt.internal.compiler.DefaultErrorHandlingPolicies
+ *
+ * @param requestor org.eclipse.wst.jsdt.internal.compiler.api.ICompilerRequestor
+ * Component which will receive and persist all compilation results and is intended
+ * to consume them as they are produced. Typically, in a batch compiler, it is
+ * responsible for writing out the actual .class files to the file system.
+ * @see org.eclipse.wst.jsdt.internal.compiler.CompilationResult
+ *
+ * @param problemFactory org.eclipse.wst.jsdt.internal.compiler.api.problem.IProblemFactory
+ * Factory used inside the compiler to create problem descriptors. It allows the
+ * compiler client to supply its own representation of compilation problems in
+ * order to avoid object conversions. Note that the factory is not supposed
+ * to accumulate the created problems, the compiler will gather them all and hand
+ * them back as part of the compilation unit result.
+ * @param parseLiteralExpressionsAsConstants <code>boolean</code>
+ * This parameter is used to optimize the literals or leave them as they are in the source.
+ * If you put true, "Hello" + " world" will be converted to "Hello world".
+ */
+ public Compiler(
+ INameEnvironment environment,
+ IErrorHandlingPolicy policy,
+ Map settings,
+ final ICompilerRequestor requestor,
+ IProblemFactory problemFactory,
+ boolean parseLiteralExpressionsAsConstants) {
+
+ // create a problem handler given a handling policy
+ this.options = new CompilerOptions(settings);
+
+ // wrap requestor in DebugRequestor if one is specified
+ if(DebugRequestor == null) {
+ this.requestor = requestor;
+ } else {
+ this.requestor = new ICompilerRequestor(){
+ public void acceptResult(CompilationResult result){
+ if (DebugRequestor.isActive()){
+ DebugRequestor.acceptDebugResult(result);
+ }
+ requestor.acceptResult(result);
+ }
+ };
+ }
+ this.problemReporter = new ProblemReporter(policy, this.options, problemFactory);
+ this.lookupEnvironment = new LookupEnvironment(this, options, problemReporter, environment);
+ initializeParser();
+ }
+
+ /**
+ * Add an additional binary type
+ */
+ public void accept(IBinaryType binaryType, PackageBinding packageBinding) {
+ if (options.verbose) {
+ System.out.println(
+ Util.bind(
+ "compilation.loadBinary" , //$NON-NLS-1$
+ new String[] {
+ new String(binaryType.getName())}));
+// new Exception("TRACE BINARY").printStackTrace(System.out);
+// System.out.println();
+ }
+ lookupEnvironment.createBinaryTypeFrom(binaryType, packageBinding);
+ }
+
+ /**
+ * Add an additional compilation unit into the loop
+ * -> build compilation unit declarations, their bindings and record their results.
+ */
+ public void accept(ICompilationUnit sourceUnit) {
+ // Switch the current policy and compilation result for this unit to the requested one.
+ CompilationResult unitResult =
+ new CompilationResult(sourceUnit, totalUnits, totalUnits, this.options.maxProblemsPerUnit);
+ try {
+ if (options.verbose) {
+ String count = String.valueOf(totalUnits + 1);
+ System.out.println(
+ Util.bind(
+ "compilation.request" , //$NON-NLS-1$
+ new String[] {
+ count,
+ count,
+ new String(sourceUnit.getFileName())}));
+ }
+ // diet parsing for large collection of unit
+ CompilationUnitDeclaration parsedUnit;
+ if (totalUnits < parseThreshold) {
+ parsedUnit = parser.parse(sourceUnit, unitResult);
+ } else {
+ parsedUnit = parser.dietParse(sourceUnit, unitResult);
+ }
+ // initial type binding creation
+ lookupEnvironment.buildTypeBindings(parsedUnit);
+ this.addCompilationUnit(sourceUnit, parsedUnit);
+
+ // binding resolution
+ lookupEnvironment.completeTypeBindings(parsedUnit);
+ } catch (AbortCompilationUnit e) {
+ // at this point, currentCompilationUnitResult may not be sourceUnit, but some other
+ // one requested further along to resolve sourceUnit.
+ if (unitResult.compilationUnit == sourceUnit) { // only report once
+ requestor.acceptResult(unitResult.tagAsAccepted());
+ } else {
+ throw e; // want to abort enclosing request to compile
+ }
+ }
+ }
+
+ /**
+ * Add additional source types
+ */
+ public void accept(ISourceType[] sourceTypes, PackageBinding packageBinding) {
+ problemReporter.abortDueToInternalError(
+ Util.bind(
+ "abort.againstSourceModel" , //$NON-NLS-1$
+ String.valueOf(sourceTypes[0].getName()),
+ String.valueOf(sourceTypes[0].getFileName())));
+ }
+
+ protected void addCompilationUnit(
+ ICompilationUnit sourceUnit,
+ CompilationUnitDeclaration parsedUnit) {
+
+ // append the unit to the list of ones to process later on
+ int size = unitsToProcess.length;
+ if (totalUnits == size)
+ // when growing reposition units starting at position 0
+ System.arraycopy(
+ unitsToProcess,
+ 0,
+ (unitsToProcess = new CompilationUnitDeclaration[size * 2]),
+ 0,
+ totalUnits);
+ unitsToProcess[totalUnits++] = parsedUnit;
+ }
+
+ /**
+ * Add the initial set of compilation units into the loop
+ * -> build compilation unit declarations, their bindings and record their results.
+ */
+ protected void beginToCompile(ICompilationUnit[] sourceUnits) {
+ int maxUnits = sourceUnits.length;
+ totalUnits = 0;
+ unitsToProcess = new CompilationUnitDeclaration[maxUnits];
+
+ // Switch the current policy and compilation result for this unit to the requested one.
+ for (int i = 0; i < maxUnits; i++) {
+ CompilationUnitDeclaration parsedUnit;
+ CompilationResult unitResult =
+ new CompilationResult(sourceUnits[i], i, maxUnits, this.options.maxProblemsPerUnit);
+ try {
+ if (options.verbose) {
+ System.out.println(
+ Util.bind(
+ "compilation.request" , //$NON-NLS-1$
+ new String[] {
+ String.valueOf(i + 1),
+ String.valueOf(maxUnits),
+ new String(sourceUnits[i].getFileName())}));
+ }
+ // diet parsing for large collection of units
+ if (totalUnits < parseThreshold) {
+ parsedUnit = parser.parse(sourceUnits[i], unitResult);
+ } else {
+ parsedUnit = parser.dietParse(sourceUnits[i], unitResult);
+ }
+ // initial type binding creation
+ lookupEnvironment.buildTypeBindings(parsedUnit);
+ this.addCompilationUnit(sourceUnits[i], parsedUnit);
+ //} catch (AbortCompilationUnit e) {
+ // requestor.acceptResult(unitResult.tagAsAccepted());
+ } finally {
+ sourceUnits[i] = null; // no longer hold onto the unit
+ }
+ }
+ // binding resolution
+ lookupEnvironment.completeTypeBindings();
+ }
+
+ /**
+ * General API
+ * -> compile each of supplied files
+ * -> recompile any required types for which we have an incomplete principle structure
+ */
+ public void compile(ICompilationUnit[] sourceUnits) {
+ CompilationUnitDeclaration unit = null;
+ int i = 0;
+ try {
+ // build and record parsed units
+
+ beginToCompile(sourceUnits);
+
+ // process all units (some more could be injected in the loop by the lookup environment)
+ for (; i < totalUnits; i++) {
+ unit = unitsToProcess[i];
+ try {
+ if (options.verbose)
+ System.out.println(
+ Util.bind(
+ "compilation.process" , //$NON-NLS-1$
+ new String[] {
+ String.valueOf(i + 1),
+ String.valueOf(totalUnits),
+ new String(unitsToProcess[i].getFileName())}));
+ process(unit, i);
+ } finally {
+ // cleanup compilation unit result
+ unit.cleanUp();
+ }
+ unitsToProcess[i] = null; // release reference to processed unit declaration
+ requestor.acceptResult(unit.compilationResult.tagAsAccepted());
+ if (options.verbose)
+ System.out.println(Util.bind("compilation.done", //$NON-NLS-1$
+ new String[] {
+ String.valueOf(i + 1),
+ String.valueOf(totalUnits),
+ new String(unit.getFileName())}));
+ }
+ } catch (AbortCompilation e) {
+ this.handleInternalException(e, unit);
+ } catch (Error e) {
+ this.handleInternalException(e, unit, null);
+ throw e; // rethrow
+ } catch (RuntimeException e) {
+ this.handleInternalException(e, unit, null);
+ throw e; // rethrow
+ } finally {
+ this.reset();
+ }
+ if (options.verbose) {
+ if (totalUnits > 1) {
+ System.out.println(
+ Util.bind("compilation.units" , String.valueOf(totalUnits))); //$NON-NLS-1$
+ } else {
+ System.out.println(
+ Util.bind("compilation.unit" , String.valueOf(totalUnits))); //$NON-NLS-1$
+ }
+ }
+ }
+
+ /*
+ * Compiler crash recovery in case of unexpected runtime exceptions
+ */
+ protected void handleInternalException(
+ Throwable internalException,
+ CompilationUnitDeclaration unit,
+ CompilationResult result) {
+
+ /* find a compilation result */
+ if ((unit != null)) // basing result upon the current unit if available
+ result = unit.compilationResult; // current unit being processed ?
+ if ((result == null) && (unitsToProcess != null) && (totalUnits > 0))
+ result = unitsToProcess[totalUnits - 1].compilationResult;
+ // last unit in beginToCompile ?
+
+ boolean needToPrint = true;
+ if (result != null) {
+ /* create and record a compilation problem */
+ StringWriter stringWriter = new StringWriter();
+ PrintWriter writer = new PrintWriter(stringWriter);
+ internalException.printStackTrace(writer);
+ StringBuffer buffer = stringWriter.getBuffer();
+
+ String[] pbArguments = new String[] {
+ Util.bind("compilation.internalError" ) //$NON-NLS-1$
+ + "\n" //$NON-NLS-1$
+ + buffer.toString()};
+
+ result
+ .record(
+ problemReporter
+ .createProblem(
+ result.getFileName(),
+ IProblem.Unclassified,
+ pbArguments,
+ pbArguments,
+ Error, // severity
+ 0, // source start
+ 0, // source end
+ 0), // line number
+ unit);
+
+ /* hand back the compilation result */
+ if (!result.hasBeenAccepted) {
+ requestor.acceptResult(result.tagAsAccepted());
+ needToPrint = false;
+ }
+ }
+ if (needToPrint) {
+ /* dump a stack trace to the console */
+ internalException.printStackTrace();
+ }
+ }
+
+ /*
+ * Compiler recovery in case of internal AbortCompilation event
+ */
+ protected void handleInternalException(
+ AbortCompilation abortException,
+ CompilationUnitDeclaration unit) {
+
+ /* special treatment for SilentAbort: silently cancelling the compilation process */
+ if (abortException.isSilent) {
+ if (abortException.silentException == null) {
+ return;
+ }
+ throw abortException.silentException;
+ }
+
+ /* uncomment following line to see where the abort came from */
+ // abortException.printStackTrace();
+
+ // Exception may tell which compilation result it is related, and which problem caused it
+ CompilationResult result = abortException.compilationResult;
+ if ((result == null) && (unit != null)) {
+ result = unit.compilationResult; // current unit being processed ?
+ }
+ // Lookup environment may be in middle of connecting types
+ if ((result == null) && lookupEnvironment.unitBeingCompleted != null) {
+ result = lookupEnvironment.unitBeingCompleted.compilationResult;
+ }
+ if ((result == null) && (unitsToProcess != null) && (totalUnits > 0))
+ result = unitsToProcess[totalUnits - 1].compilationResult;
+ // last unit in beginToCompile ?
+ if (result != null && !result.hasBeenAccepted) {
+ /* distant problem which could not be reported back there? */
+ if (abortException.problem != null) {
+ recordDistantProblem: {
+ IProblem distantProblem = abortException.problem;
+ IProblem[] knownProblems = result.problems;
+ for (int i = 0; i < result.problemCount; i++) {
+ if (knownProblems[i] == distantProblem) { // already recorded
+ break recordDistantProblem;
+ }
+ }
+ if (distantProblem instanceof DefaultProblem) { // fixup filename TODO (philippe) should improve API to make this official
+ ((DefaultProblem) distantProblem).setOriginatingFileName(result.getFileName());
+ }
+ result .record(distantProblem, unit);
+ }
+ } else {
+ /* distant internal exception which could not be reported back there */
+ if (abortException.exception != null) {
+ this.handleInternalException(abortException.exception, null, result);
+ return;
+ }
+ }
+ /* hand back the compilation result */
+ if (!result.hasBeenAccepted) {
+ requestor.acceptResult(result.tagAsAccepted());
+ }
+ } else {
+ abortException.printStackTrace();
+ }
+ }
+
+ public void initializeParser() {
+
+ this.parser = new Parser(this.problemReporter, this.options.parseLiteralExpressionsAsConstants);
+ }
+
+ /**
+ * Process a compilation unit already parsed and build.
+ */
+ public void process(CompilationUnitDeclaration unit, int i) {
+
+ this.parser.getMethodBodies(unit);
+
+ // fault in fields & methods
+ if (unit.scope != null)
+ unit.scope.faultInTypes();
+
+ // verify inherited methods
+ if (unit.scope != null)
+ unit.scope.verifyMethods(lookupEnvironment.methodVerifier());
+
+ // type checking
+ unit.resolve();
+
+ // flow analysis
+ unit.analyseCode();
+
+ // code generation
+ unit.generateCode();
+
+ // reference info
+ if (options.produceReferenceInfo && unit.scope != null)
+ unit.scope.storeDependencyInfo();
+
+ // refresh the total number of units known at this stage
+ unit.compilationResult.totalUnitsKnown = totalUnits;
+ }
+ public void reset() {
+ lookupEnvironment.reset();
+ parser.scanner.source = null;
+ unitsToProcess = null;
+ if (DebugRequestor != null) DebugRequestor.reset();
+ }
+
+ /**
+ * Internal API used to resolve a given compilation unit. Can run a subset of the compilation process
+ */
+ public CompilationUnitDeclaration resolve(
+ CompilationUnitDeclaration unit,
+ ICompilationUnit sourceUnit,
+ boolean verifyMethods,
+ boolean analyzeCode,
+ boolean generateCode) {
+
+ try {
+ if (unit == null) {
+ // build and record parsed units
+ parseThreshold = 0; // will request a full parse
+ beginToCompile(new ICompilationUnit[] { sourceUnit });
+ // process all units (some more could be injected in the loop by the lookup environment)
+ unit = unitsToProcess[0];
+ } else {
+ // initial type binding creation
+ lookupEnvironment.buildTypeBindings(unit);
+
+ // binding resolution
+ lookupEnvironment.completeTypeBindings();
+ }
+ this.parser.getMethodBodies(unit);
+ if (unit.scope != null) {
+ // fault in fields & methods
+ unit.scope.faultInTypes();
+ if (unit.scope != null && verifyMethods) {
+ // http://dev.eclipse.org/bugs/show_bug.cgi?id=23117
+ // verify inherited methods
+ unit.scope.verifyMethods(lookupEnvironment.methodVerifier());
+ }
+ // type checking
+ unit.resolve();
+
+ // flow analysis
+ if (analyzeCode) unit.analyseCode();
+
+ // code generation
+ if (generateCode) unit.generateCode();
+ }
+ if (unitsToProcess != null) unitsToProcess[0] = null; // release reference to processed unit declaration
+ requestor.acceptResult(unit.compilationResult.tagAsAccepted());
+ return unit;
+ } catch (AbortCompilation e) {
+ this.handleInternalException(e, unit);
+ return unit == null ? unitsToProcess[0] : unit;
+ } catch (Error e) {
+ this.handleInternalException(e, unit, null);
+ throw e; // rethrow
+ } catch (RuntimeException e) {
+ this.handleInternalException(e, unit, null);
+ throw e; // rethrow
+ } finally {
+ // No reset is performed there anymore since,
+ // within the CodeAssist (or related tools),
+ // the compiler may be called *after* a call
+ // to this resolve(...) method. And such a call
+ // needs to have a compiler with a non-empty
+ // environment.
+ // this.reset();
+ }
+ }
+ /**
+ * Internal API used to resolve a given compilation unit. Can run a subset of the compilation process
+ */
+ public CompilationUnitDeclaration resolve(
+ ICompilationUnit sourceUnit,
+ boolean verifyMethods,
+ boolean analyzeCode,
+ boolean generateCode) {
+
+ return resolve(
+ null,
+ sourceUnit,
+ verifyMethods,
+ analyzeCode,
+ generateCode);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ConfigurableOption.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ConfigurableOption.js
new file mode 100644
index 0000000..5d160cc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ConfigurableOption.js
@@ -0,0 +1,227 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler;
+
+/**
+ * Generic option description, which can be modified independently from the
+ * component it belongs to.
+ *
+ * @deprecated backport 1.0 internal functionality
+ */
+
+import java.util.*;
+
+public class ConfigurableOption {
+ private String componentName;
+ private String optionName;
+ private int id;
+
+ private String category;
+ private String name;
+ private String description;
+ private int currentValueIndex;
+ private int defaultValueIndex;
+ private String[] possibleValues;
+
+ // special value for <possibleValues> indicating that
+ // the <currentValueIndex> is the actual value
+ public final static String[] NoDiscreteValue = {};
+/**
+ * INTERNAL USE ONLY
+ *
+ * Initialize an instance of this class according to a specific locale
+ *
+ * @param loc java.util.Locale
+ */
+public ConfigurableOption(
+ String componentName,
+ String optionName,
+ Locale loc,
+ int currentValueIndex) {
+
+ this.componentName = componentName;
+ this.optionName = optionName;
+ this.currentValueIndex = currentValueIndex;
+
+ ResourceBundle resource = null;
+ try {
+ String location = componentName.substring(0, componentName.lastIndexOf('.'));
+ resource = ResourceBundle.getBundle(location + ".options", loc); //$NON-NLS-1$
+ } catch (MissingResourceException e) {
+ category = "Missing ressources entries for" + componentName + " options"; //$NON-NLS-1$ //$NON-NLS-2$
+ name = "Missing ressources entries for"+ componentName + " options"; //$NON-NLS-1$ //$NON-NLS-2$
+ description = "Missing ressources entries for" + componentName + " options"; //$NON-NLS-1$ //$NON-NLS-2$
+ possibleValues = new String[0];
+ id = -1;
+ }
+ if (resource == null) return;
+ try {
+ id = Integer.parseInt(resource.getString(optionName + ".number")); //$NON-NLS-1$
+ } catch (MissingResourceException e) {
+ id = -1;
+ } catch (NumberFormatException e) {
+ id = -1;
+ }
+ try {
+ category = resource.getString(optionName + ".category"); //$NON-NLS-1$
+ } catch (MissingResourceException e) {
+ category = "Missing ressources entries for" + componentName + " options"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ try {
+ name = resource.getString(optionName + ".name"); //$NON-NLS-1$
+ } catch (MissingResourceException e) {
+ name = "Missing ressources entries for"+ componentName + " options"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ try {
+ StringTokenizer tokenizer = new StringTokenizer(resource.getString(optionName + ".possibleValues"), "|"); //$NON-NLS-1$ //$NON-NLS-2$
+ int numberOfValues = Integer.parseInt(tokenizer.nextToken());
+ if(numberOfValues == -1){
+ possibleValues = NoDiscreteValue;
+ } else {
+ possibleValues = new String[numberOfValues];
+ int index = 0;
+ while (tokenizer.hasMoreTokens()) {
+ possibleValues[index] = tokenizer.nextToken();
+ index++;
+ }
+ }
+ } catch (MissingResourceException e) {
+ possibleValues = new String[0];
+ } catch (NoSuchElementException e) {
+ possibleValues = new String[0];
+ } catch (NumberFormatException e) {
+ possibleValues = new String[0];
+ }
+ try {
+ description = resource.getString(optionName + ".description"); //$NON-NLS-1$
+ } catch (MissingResourceException e) {
+ description = "Missing ressources entries for"+ componentName + " options"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+}
+/**
+ * Return a String that represents the localized category of the receiver.
+ * @return java.lang.String
+ */
+public String getCategory() {
+ return category;
+}
+/**
+ * Return a String that identifies the component owner (typically the qualified
+ * type name of the class which it corresponds to).
+ *
+ * e.g. "org.eclipse.wst.jsdt.internal.compiler.api.Compiler"
+ *
+ * @return java.lang.String
+ */
+public String getComponentName() {
+ return componentName;
+}
+/**
+ * Answer the index (in possibleValues array) of the current setting for this
+ * particular option.
+ *
+ * In case the set of possibleValues is NoDiscreteValue, then this index is the
+ * actual value (e.g. max line lenght set to 80).
+ *
+ * @return int
+ */
+public int getCurrentValueIndex() {
+ return currentValueIndex;
+}
+/**
+ * Answer the index (in possibleValues array) of the default setting for this
+ * particular option.
+ *
+ * In case the set of possibleValues is NoDiscreteValue, then this index is the
+ * actual value (e.g. max line lenght set to 80).
+ *
+ * @return int
+ */
+public int getDefaultValueIndex() {
+ return defaultValueIndex;
+}
+/**
+ * Return an String that represents the localized description of the receiver.
+ *
+ * @return java.lang.String
+ */
+public String getDescription() {
+ return description;
+}
+/**
+ * Internal ID which allows the configurable component to identify this particular option.
+ *
+ * @return int
+ */
+public int getID() {
+ return id;
+}
+/**
+ * Return a String that represents the localized name of the receiver.
+ * @return java.lang.String
+ */
+public String getName() {
+ return name;
+}
+/**
+ * Return an array of String that represents the localized possible values of the receiver.
+ * @return java.lang.String[]
+ */
+public String[] getPossibleValues() {
+ return possibleValues;
+}
+/**
+ * Change the index (in possibleValues array) of the current setting for this
+ * particular option.
+ *
+ * In case the set of possibleValues is NoDiscreteValue, then this index is the
+ * actual value (e.g. max line lenght set to 80).
+ */
+public void setValueIndex(int newIndex) {
+ currentValueIndex = newIndex;
+}
+public String toString() {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("Configurable option for "); //$NON-NLS-1$
+ buffer.append(this.componentName).append("\n"); //$NON-NLS-1$
+ buffer.append("- category: ").append(this.category).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
+ buffer.append("- name: ").append(this.name).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
+ /* display current value */
+ buffer.append("- current value: "); //$NON-NLS-1$
+ if (possibleValues == NoDiscreteValue){
+ buffer.append(this.currentValueIndex);
+ } else {
+ buffer.append(this.possibleValues[this.currentValueIndex]);
+ }
+ buffer.append("\n"); //$NON-NLS-1$
+
+ /* display possible values */
+ if (possibleValues != NoDiscreteValue){
+ buffer.append("- possible values: ["); //$NON-NLS-1$
+ for (int i = 0, max = possibleValues.length; i < max; i++) {
+ if (i != 0)
+ buffer.append(", "); //$NON-NLS-1$
+ buffer.append(possibleValues[i]);
+ }
+ buffer.append("]\n"); //$NON-NLS-1$
+ buffer.append("- curr. val. index: ").append(currentValueIndex).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ buffer.append("- description: ").append(description).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
+ return buffer.toString();
+}
+ /**
+ * Gets the optionName.
+ * @return Returns a String
+ */
+ public String getOptionName() {
+ return optionName;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/DefaultErrorHandlingPolicies.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/DefaultErrorHandlingPolicies.js
new file mode 100644
index 0000000..3f6e081
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/DefaultErrorHandlingPolicies.js
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler;
+
+public class DefaultErrorHandlingPolicies {
+
+/*
+ * Accumulate all problems, then exit without proceeding.
+ *
+ * Typically, the #proceedWithProblems(Problem[]) should
+ * show the problems.
+ *
+ */
+public static IErrorHandlingPolicy exitAfterAllProblems() {
+ return new IErrorHandlingPolicy() {
+ public boolean stopOnFirstError() {
+ return false;
+ }
+ public boolean proceedOnErrors(){
+ return false;
+ }
+ };
+}
+/*
+ * Exit without proceeding on the first problem wich appears
+ * to be an error.
+ *
+ */
+public static IErrorHandlingPolicy exitOnFirstError() {
+ return new IErrorHandlingPolicy() {
+ public boolean stopOnFirstError() {
+ return true;
+ }
+ public boolean proceedOnErrors(){
+ return false;
+ }
+ };
+}
+/*
+ * Proceed on the first error met.
+ *
+ */
+public static IErrorHandlingPolicy proceedOnFirstError() {
+ return new IErrorHandlingPolicy() {
+ public boolean stopOnFirstError() {
+ return true;
+ }
+ public boolean proceedOnErrors(){
+ return true;
+ }
+ };
+}
+/*
+ * Accumulate all problems, then proceed with them.
+ *
+ */
+public static IErrorHandlingPolicy proceedWithAllProblems() {
+ return new IErrorHandlingPolicy() {
+ public boolean stopOnFirstError() {
+ return false;
+ }
+ public boolean proceedOnErrors(){
+ return true;
+ }
+ };
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ICompilerRequestor.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ICompilerRequestor.js
new file mode 100644
index 0000000..ddc5a00
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ICompilerRequestor.js
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler;
+
+/**
+ * A callback interface for receiving compilation results.
+ */
+public interface ICompilerRequestor {
+
+ /**
+ * Accept a compilation result.
+ */
+ public void acceptResult(CompilationResult result);
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/IDebugRequestor.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/IDebugRequestor.js
new file mode 100644
index 0000000..5823f05
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/IDebugRequestor.js
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler;
+
+public interface IDebugRequestor {
+
+ /*
+ * Debug callback method allowing to take into account a new compilation result.
+ * Any side-effect performed on the actual result might interfere with the
+ * original compiler requestor, and should be prohibited.
+ */
+ void acceptDebugResult(CompilationResult result);
+
+ /*
+ * Answers true when in active mode
+ */
+ boolean isActive();
+
+ /*
+ * Activate debug callbacks
+ */
+ void activate();
+
+ /*
+ * Deactivate debug callbacks
+ */
+ void deactivate();
+
+ /*
+ * Reset debug requestor after compilation has finished
+ */
+ void reset();
+}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/IErrorHandlingPolicy.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/IErrorHandlingPolicy.js
new file mode 100644
index 0000000..1b07efc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/IErrorHandlingPolicy.js
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler;
+
+/*
+ * Handler policy is responsible to answer the 2 following
+ * questions:
+ * 1. should the handler stop on first problem which appears
+ * to be a real error (that is, not a warning),
+ * 2. should it proceed once it has gathered all problems
+ *
+ * The intent is that one can supply its own policy to implement
+ * some interactive error handling strategy where some UI would
+ * display problems and ask user if he wants to proceed or not.
+ */
+
+public interface IErrorHandlingPolicy {
+ boolean proceedOnErrors();
+ boolean stopOnFirstError();
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/IProblemFactory.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/IProblemFactory.js
new file mode 100644
index 0000000..348dedf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/IProblemFactory.js
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler;
+
+import java.util.Locale;
+
+import org.eclipse.wst.jsdt.core.compiler.*;
+
+/*
+ * Factory used from inside the compiler to build the actual problems
+ * which are handed back in the compilation result.
+ *
+ * This allows sharing the internal problem representation with the environment.
+ *
+ * Note: The factory is responsible for computing and storing a localized error message.
+ */
+
+public interface IProblemFactory {
+
+ IProblem createProblem(
+ char[] originatingFileName,
+ int problemId,
+ String[] problemArguments,
+ String[] messageArguments, // shorter versions of the problemArguments
+ int severity,
+ int startPosition,
+ int endPosition,
+ int lineNumber);
+
+ Locale getLocale();
+
+ String getLocalizedMessage(int problemId, String[] messageArguments);
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AND_AND_Expression.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AND_AND_Expression.js
new file mode 100644
index 0000000..0362b8b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AND_AND_Expression.js
@@ -0,0 +1,269 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+//dedicated treatment for the &&
+public class AND_AND_Expression extends BinaryExpression {
+
+ int rightInitStateIndex = -1;
+ int mergedInitStateIndex = -1;
+
+ public AND_AND_Expression(Expression left, Expression right, int operator) {
+ super(left, right, operator);
+ }
+
+ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
+
+ Constant cst = this.left.optimizedBooleanConstant();
+ boolean isLeftOptimizedTrue = cst != NotAConstant && cst.booleanValue() == true;
+ boolean isLeftOptimizedFalse = cst != NotAConstant && cst.booleanValue() == false;
+
+ if (isLeftOptimizedTrue) {
+ // TRUE && anything
+ // need to be careful of scenario:
+ // (x && y) && !z, if passing the left info to the right, it would
+ // be swapped by the !
+ FlowInfo mergedInfo = left.analyseCode(currentScope, flowContext, flowInfo)
+ .unconditionalInits();
+ mergedInfo = right.analyseCode(currentScope, flowContext, mergedInfo);
+ mergedInitStateIndex = currentScope.methodScope()
+ .recordInitializationStates(mergedInfo);
+ return mergedInfo;
+ }
+
+ FlowInfo leftInfo = left.analyseCode(currentScope, flowContext, flowInfo);
+ // need to be careful of scenario:
+ // (x && y) && !z, if passing the left info to the right, it would be
+ // swapped by the !
+ FlowInfo rightInfo = leftInfo.initsWhenTrue().unconditionalInits().copy();
+ rightInitStateIndex = currentScope.methodScope().recordInitializationStates(rightInfo);
+
+ int previousMode = rightInfo.reachMode();
+ if (isLeftOptimizedFalse) {
+ rightInfo.setReachMode(FlowInfo.UNREACHABLE);
+ }
+ rightInfo = right.analyseCode(currentScope, flowContext, rightInfo);
+ FlowInfo trueMergedInfo = rightInfo.initsWhenTrue().copy();
+ rightInfo.setReachMode(previousMode); // reset after trueMergedInfo got extracted
+ FlowInfo mergedInfo = FlowInfo.conditional(
+ trueMergedInfo,
+ leftInfo.initsWhenFalse().copy().unconditionalInits().mergedWith(
+ rightInfo.initsWhenFalse().copy().unconditionalInits()));
+ mergedInitStateIndex = currentScope.methodScope().recordInitializationStates(mergedInfo);
+ return mergedInfo;
+ }
+
+ /**
+ * Code generation for a binary operation
+ */
+ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
+
+ int pc = codeStream.position;
+ if (constant != Constant.NotAConstant) {
+ // inlined value
+ if (valueRequired)
+ codeStream.generateConstant(constant, implicitConversion);
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ return;
+ }
+ Constant cst = right.constant;
+ if (cst != NotAConstant) {
+ // <expr> && true --> <expr>
+ if (cst.booleanValue() == true) {
+ this.left.generateCode(currentScope, codeStream, valueRequired);
+ } else {
+ // <expr> && false --> false
+ this.left.generateCode(currentScope, codeStream, false);
+ if (valueRequired) codeStream.iconst_0();
+ }
+ if (mergedInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(currentScope, mergedInitStateIndex);
+ }
+ codeStream.generateImplicitConversion(implicitConversion);
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ return;
+ }
+
+ Label falseLabel = new Label(codeStream), endLabel;
+ cst = left.optimizedBooleanConstant();
+ boolean leftIsConst = cst != NotAConstant;
+ boolean leftIsTrue = leftIsConst && cst.booleanValue() == true;
+
+ cst = right.optimizedBooleanConstant();
+ boolean rightIsConst = cst != NotAConstant;
+ boolean rightIsTrue = rightIsConst && cst.booleanValue() == true;
+
+ generateOperands : {
+ if (leftIsConst) {
+ left.generateCode(currentScope, codeStream, false);
+ if (!leftIsTrue) {
+ break generateOperands; // no need to generate right operand
+ }
+ } else {
+ left.generateOptimizedBoolean(currentScope, codeStream, null, falseLabel, true);
+ // need value, e.g. if (a == 1 && ((b = 2) > 0)) {} -> shouldn't initialize 'b' if a!=1
+ }
+ if (rightInitStateIndex != -1) {
+ codeStream.addDefinitelyAssignedVariables(currentScope, rightInitStateIndex);
+ }
+ if (rightIsConst) {
+ right.generateCode(currentScope, codeStream, false);
+ } else {
+ right.generateOptimizedBoolean(currentScope, codeStream, null, falseLabel, valueRequired);
+ }
+ }
+ if (mergedInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(currentScope, mergedInitStateIndex);
+ }
+ /*
+ * improving code gen for such a case: boolean b = i < 0 && false since
+ * the label has never been used, we have the inlined value on the
+ * stack.
+ */
+ if (valueRequired) {
+ if (leftIsConst && !leftIsTrue) {
+ codeStream.iconst_0();
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ } else {
+ if (rightIsConst && !rightIsTrue) {
+ codeStream.iconst_0();
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ } else {
+ codeStream.iconst_1();
+ }
+ if (falseLabel.hasForwardReferences()) {
+ if ((bits & ValueForReturnMASK) != 0) {
+ codeStream.ireturn();
+ falseLabel.place();
+ codeStream.iconst_0();
+ } else {
+ codeStream.goto_(endLabel = new Label(codeStream));
+ codeStream.decrStackSize(1);
+ falseLabel.place();
+ codeStream.iconst_0();
+ endLabel.place();
+ }
+ } else {
+ falseLabel.place();
+ }
+ }
+ codeStream.generateImplicitConversion(implicitConversion);
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ } else {
+ falseLabel.place();
+ }
+ }
+
+ /**
+ * Boolean operator code generation Optimized operations are: &&
+ */
+ public void generateOptimizedBoolean(BlockScope currentScope, CodeStream codeStream,
+ Label trueLabel, Label falseLabel, boolean valueRequired) {
+
+ if (constant != Constant.NotAConstant) {
+ super.generateOptimizedBoolean(currentScope, codeStream, trueLabel, falseLabel,
+ valueRequired);
+ return;
+ }
+
+ // <expr> && true --> <expr>
+ Constant cst = right.constant;
+ if (cst != NotAConstant && cst.booleanValue() == true) {
+ int pc = codeStream.position;
+ this.left.generateOptimizedBoolean(currentScope, codeStream, trueLabel, falseLabel, valueRequired);
+ if (mergedInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(currentScope, mergedInitStateIndex);
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ return;
+ }
+ cst = left.optimizedBooleanConstant();
+ boolean leftIsConst = cst != NotAConstant;
+ boolean leftIsTrue = leftIsConst && cst.booleanValue() == true;
+
+ cst = right.optimizedBooleanConstant();
+ boolean rightIsConst = cst != NotAConstant;
+ boolean rightIsTrue = rightIsConst && cst.booleanValue() == true;
+
+ // default case
+ generateOperands : {
+ if (falseLabel == null) {
+ if (trueLabel != null) {
+ // implicit falling through the FALSE case
+ Label internalFalseLabel = new Label(codeStream);
+ left.generateOptimizedBoolean(currentScope, codeStream, null,
+ internalFalseLabel, !leftIsConst);
+ // need value, e.g. if (a == 1 && ((b = 2) > 0)) {} -> shouldn't initialize 'b' if a!=1
+ if (leftIsConst && !leftIsTrue) {
+ internalFalseLabel.place();
+ break generateOperands; // no need to generate right operand
+ }
+ if (rightInitStateIndex != -1) {
+ codeStream
+ .addDefinitelyAssignedVariables(currentScope, rightInitStateIndex);
+ }
+ right.generateOptimizedBoolean(currentScope, codeStream, trueLabel, null,
+ valueRequired && !rightIsConst);
+ if (valueRequired && rightIsConst && rightIsTrue) {
+ codeStream.goto_(trueLabel);
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ }
+ internalFalseLabel.place();
+ }
+ } else {
+ // implicit falling through the TRUE case
+ if (trueLabel == null) {
+ left.generateOptimizedBoolean(currentScope, codeStream, null, falseLabel, !leftIsConst);
+ // need value, e.g. if (a == 1 && ((b = 2) > 0)) {} -> shouldn't initialize 'b' if a!=1
+ if (leftIsConst && !leftIsTrue) {
+ codeStream.goto_(falseLabel);
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ break generateOperands; // no need to generate right operand
+ }
+ if (rightInitStateIndex != -1) {
+ codeStream
+ .addDefinitelyAssignedVariables(currentScope, rightInitStateIndex);
+ }
+ right.generateOptimizedBoolean(currentScope, codeStream, null, falseLabel,
+ valueRequired && !rightIsConst);
+ if (valueRequired && rightIsConst && !rightIsTrue) {
+ codeStream.goto_(falseLabel);
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ }
+ } else {
+ // no implicit fall through TRUE/FALSE --> should never occur
+ }
+ }
+ }
+ if (mergedInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(currentScope, mergedInitStateIndex);
+ }
+ }
+
+ public boolean isCompactableOperation() {
+ return false;
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+ if (visitor.visit(this, scope)) {
+ left.traverse(visitor, scope);
+ right.traverse(visitor, scope);
+ }
+ visitor.endVisit(this, scope);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ASTNode.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ASTNode.js
new file mode 100644
index 0000000..787ce8f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ASTNode.js
@@ -0,0 +1,298 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+
+public abstract class ASTNode implements BaseTypes, CompilerModifiers, TypeConstants, TypeIds {
+
+ public int sourceStart, sourceEnd;
+
+ //some global provision for the hierarchy
+ public final static Constant NotAConstant = Constant.NotAConstant;
+
+ // storage for internal flags (32 bits) BIT USAGE
+ public final static int Bit1 = 0x1; // return type (operator) | name reference kind (name ref) | add assertion (type decl) | useful empty statement (empty statement)
+ public final static int Bit2 = 0x2; // return type (operator) | name reference kind (name ref) | has local type (type, method, field decl)
+ public final static int Bit3 = 0x4; // return type (operator) | name reference kind (name ref) | implicit this (this ref)
+ public final static int Bit4 = 0x8; // return type (operator) | first assignment to local (local decl) | undocumented empty block (block, type and method decl)
+ public final static int Bit5 = 0x10; // value for return (expression) | has all method bodies (unit) | supertype ref (type ref)
+ public final static int Bit6 = 0x20; // depth (name ref, msg) | only value required (binary expression) | ignore need cast check (cast expression)
+ public final static int Bit7 = 0x40; // depth (name ref, msg) | operator (operator) | need runtime checkcast (cast expression)
+ public final static int Bit8 = 0x80; // depth (name ref, msg) | operator (operator)
+ public final static int Bit9 = 0x100; // depth (name ref, msg) | operator (operator) | is local type (type decl)
+ public final static int Bit10= 0x200; // depth (name ref, msg) | operator (operator) | is anonymous type (type decl)
+ public final static int Bit11 = 0x400; // depth (name ref, msg) | operator (operator) | is member type (type decl)
+ public final static int Bit12 = 0x800; // depth (name ref, msg) | operator (operator)
+ public final static int Bit13 = 0x1000; // depth (name ref, msg)
+ public final static int Bit14 = 0x2000; // strictly assigned (reference lhs)
+ public final static int Bit15 = 0x4000; // is unnecessary cast (expression)
+ public final static int Bit16 = 0x8000; // in javadoc comment (name ref, type ref, msg)
+ public final static int Bit17 = 0x10000; // compound assigned (reference lhs)
+ public final static int Bit18 = 0x20000;
+ public final static int Bit19 = 0x40000;
+ public final static int Bit20 = 0x80000;
+ public final static int Bit21 = 0x100000;
+ public final static int Bit22 = 0x200000; // parenthesis count (expression)
+ public final static int Bit23 = 0x400000; // parenthesis count (expression)
+ public final static int Bit24 = 0x800000; // parenthesis count (expression)
+ public final static int Bit25 = 0x1000000; // parenthesis count (expression)
+ public final static int Bit26 = 0x2000000; // parenthesis count (expression)
+ public final static int Bit27 = 0x4000000; // parenthesis count (expression)
+ public final static int Bit28 = 0x8000000; // parenthesis count (expression)
+ public final static int Bit29 = 0x10000000; // parenthesis count (expression)
+ public final static int Bit30 = 0x20000000; // assignment with no effect (assignment) | elseif (if statement)
+ public final static int Bit31 = 0x40000000; // local declaration reachable (local decl)
+ public final static int Bit32 = 0x80000000; // reachable (statement)
+
+ public final static long Bit32L = 0x80000000L;
+ public final static long Bit33L = 0x100000000L;
+ public final static long Bit34L = 0x200000000L;
+ public final static long Bit35L = 0x400000000L;
+ public final static long Bit36L = 0x800000000L;
+ public final static long Bit37L = 0x1000000000L;
+ public final static long Bit38L = 0x2000000000L;
+ public final static long Bit39L = 0x4000000000L;
+ public final static long Bit40L = 0x8000000000L;
+
+ public int bits = IsReachableMASK; // reachable by default
+
+ // for operators
+ public static final int ReturnTypeIDMASK = Bit1|Bit2|Bit3|Bit4;
+ public static final int OperatorSHIFT = 6; // Bit7 -> Bit12
+ public static final int OperatorMASK = Bit7|Bit8|Bit9|Bit10|Bit11|Bit12; // 6 bits for operator ID
+
+ // for binary expressions
+ public static final int ValueForReturnMASK = Bit5;
+ public static final int OnlyValueRequiredMASK = Bit6;
+
+ // for cast expressions
+ public static final int UnnecessaryCastMask = Bit15;
+ public static final int NeedRuntimeCheckCastMASK = Bit7;
+ public static final int IgnoreNeedForCastCheckMASK = Bit6;
+
+ // for name references
+ public static final int RestrictiveFlagMASK = Bit1|Bit2|Bit3;
+ public static final int FirstAssignmentToLocalMASK = Bit4;
+
+ // for this reference
+ public static final int IsImplicitThisMask = Bit3;
+
+ // for single name references
+ public static final int DepthSHIFT = 5; // Bit6 -> Bit13
+ public static final int DepthMASK = Bit6|Bit7|Bit8|Bit9|Bit10|Bit11|Bit12|Bit13; // 8 bits for actual depth value (max. 255)
+
+ // for statements
+ public static final int IsReachableMASK = Bit32;
+ public static final int IsLocalDeclarationReachableMASK = Bit31;
+
+ // for type declaration
+ public static final int AddAssertionMASK = Bit1;
+ public static final int IsLocalTypeMASK = Bit9;
+ public static final int IsAnonymousTypeMASK = Bit10; // used to test for anonymous
+ public static final int AnonymousAndLocalMask = IsAnonymousTypeMASK | IsLocalTypeMASK; // used to set anonymous marker
+ public static final int IsMemberTypeMASK = Bit11; // local member do not know it is local at parse time (need to look at binding)
+
+ // for type, method and field declarations
+ public static final int HasLocalTypeMASK = Bit2; // cannot conflict with AddAssertionMASK
+
+ // for expression
+ public static final int ParenthesizedSHIFT = 21; // Bit22 -> Bit29
+ public static final int ParenthesizedMASK = Bit22|Bit23|Bit24|Bit25|Bit26|Bit27|Bit28|Bit29; // 8 bits for parenthesis count value (max. 255)
+
+ // for assignment
+ public static final int IsAssignmentWithNoEffectMASK = Bit30;
+
+ // for references on lhs of assignment
+ public static final int IsStrictlyAssignedMASK = Bit14; // set only for true assignments, as opposed to compound ones
+ public static final int IsCompoundAssignedMASK = Bit17; // set only for compound assignments, as opposed to other ones
+
+ // for empty statement
+ public static final int IsUsefulEmptyStatementMASK = Bit1;
+
+ // for block and method declaration
+ public static final int UndocumentedEmptyBlockMASK = Bit4;
+
+ // for compilation unit
+ public static final int HasAllMethodBodies = Bit5;
+
+ // for references in Javadoc comments
+ public static final int InsideJavadoc = Bit16;
+
+ // for if statement
+ public static final int IsElseIfStatement = Bit30;
+
+ // for type reference
+ public static final int IsSuperType = Bit5;
+
+
+ public ASTNode() {
+
+ super();
+ }
+ public static void checkInvocationArguments(BlockScope scope, Expression receiver, TypeBinding receiverType, MethodBinding method, Expression[] arguments, TypeBinding[] argumentTypes, boolean argsContainCast, InvocationSite invocationSite) {
+ boolean unsafeWildcardInvocation = false;
+ for (int i = 0; i < arguments.length; i++) {
+ TypeBinding parameterType = method.parameters[i];
+ TypeBinding argumentType = argumentTypes[i];
+ arguments[i].computeConversion(scope, parameterType, argumentType);
+ if (argumentType != NullBinding && parameterType.isWildcard() && ((WildcardBinding)parameterType).kind != Wildcard.SUPER) {
+ unsafeWildcardInvocation = true;
+ } else if (argumentType != parameterType
+ && argumentType.isRawType()
+ && (parameterType.isBoundParameterizedType() || parameterType.isGenericType())) {
+ scope.problemReporter().unsafeRawConversion(arguments[i], argumentType, parameterType);
+ }
+ }
+ if (argsContainCast) {
+ CastExpression.checkNeedForArgumentCasts(scope, receiver, receiverType, method, arguments, argumentTypes, invocationSite);
+ }
+ if (unsafeWildcardInvocation) {
+ scope.problemReporter().wildcardInvocation((ASTNode)invocationSite, receiverType, method, argumentTypes);
+ } else if (receiverType.isRawType() && method.hasSubstitutedParameters()) {
+ scope.problemReporter().unsafeRawInvocation((ASTNode)invocationSite, receiverType, method);
+ }
+ }
+ public ASTNode concreteStatement() {
+ return this;
+ }
+
+ /* Answer true if the field use is considered deprecated.
+ * An access in the same compilation unit is allowed.
+ */
+ public final boolean isFieldUseDeprecated(FieldBinding field, Scope scope, boolean isStrictlyAssigned) {
+
+ if (!isStrictlyAssigned && field.isPrivate() && !scope.isDefinedInField(field)) {
+ // ignore cases where field is used from within inside itself
+ field.modifiers |= AccPrivateUsed;
+ }
+
+ if (!field.isViewedAsDeprecated()) return false;
+
+ // inside same unit - no report
+ if (scope.isDefinedInSameUnit(field.declaringClass)) return false;
+
+ // if context is deprecated, may avoid reporting
+ if (!scope.environment().options.reportDeprecationInsideDeprecatedCode && scope.isInsideDeprecatedCode()) return false;
+ return true;
+ }
+
+ public boolean isImplicitThis() {
+
+ return false;
+ }
+
+ /* Answer true if the method use is considered deprecated.
+ * An access in the same compilation unit is allowed.
+ */
+ public final boolean isMethodUseDeprecated(MethodBinding method, Scope scope) {
+
+ if (method.isPrivate() && !scope.isDefinedInMethod(method)) {
+ // ignore cases where method is used from within inside itself (e.g. direct recursions)
+ method.original().modifiers |= AccPrivateUsed;
+ }
+
+ if (!method.isViewedAsDeprecated()) return false;
+
+ // inside same unit - no report
+ if (scope.isDefinedInSameUnit(method.declaringClass)) return false;
+
+ // if context is deprecated, may avoid reporting
+ if (!scope.environment().options.reportDeprecationInsideDeprecatedCode && scope.isInsideDeprecatedCode()) return false;
+ return true;
+ }
+
+ public boolean isSuper() {
+
+ return false;
+ }
+
+ public boolean isThis() {
+
+ return false;
+ }
+
+ /* Answer true if the type use is considered deprecated.
+ * An access in the same compilation unit is allowed.
+ */
+ public final boolean isTypeUseDeprecated(TypeBinding type, Scope scope) {
+
+ if (type.isArrayType())
+ type = ((ArrayBinding) type).leafComponentType;
+ if (type.isBaseType())
+ return false;
+
+ ReferenceBinding refType = (ReferenceBinding) type;
+
+ if (refType.isPrivate() && !scope.isDefinedInType(refType)) {
+ // ignore cases where type is used from within inside itself
+ ((ReferenceBinding)refType.erasure()).modifiers |= AccPrivateUsed;
+ }
+
+ if (!refType.isViewedAsDeprecated()) return false;
+
+ // inside same unit - no report
+ if (scope.isDefinedInSameUnit(refType)) return false;
+
+ // if context is deprecated, may avoid reporting
+ if (!scope.environment().options.reportDeprecationInsideDeprecatedCode && scope.isInsideDeprecatedCode()) return false;
+ return true;
+ }
+
+ public abstract StringBuffer print(int indent, StringBuffer output);
+
+ public static StringBuffer printIndent(int indent, StringBuffer output) {
+
+ for (int i = indent; i > 0; i--) output.append(" "); //$NON-NLS-1$
+ return output;
+ }
+
+ public static StringBuffer printModifiers(int modifiers, StringBuffer output) {
+
+ if ((modifiers & AccPublic) != 0)
+ output.append("public "); //$NON-NLS-1$
+ if ((modifiers & AccPrivate) != 0)
+ output.append("private "); //$NON-NLS-1$
+ if ((modifiers & AccProtected) != 0)
+ output.append("protected "); //$NON-NLS-1$
+ if ((modifiers & AccStatic) != 0)
+ output.append("static "); //$NON-NLS-1$
+ if ((modifiers & AccFinal) != 0)
+ output.append("final "); //$NON-NLS-1$
+ if ((modifiers & AccSynchronized) != 0)
+ output.append("synchronized "); //$NON-NLS-1$
+ if ((modifiers & AccVolatile) != 0)
+ output.append("volatile "); //$NON-NLS-1$
+ if ((modifiers & AccTransient) != 0)
+ output.append("transient "); //$NON-NLS-1$
+ if ((modifiers & AccNative) != 0)
+ output.append("native "); //$NON-NLS-1$
+ if ((modifiers & AccAbstract) != 0)
+ output.append("abstract "); //$NON-NLS-1$
+ return output;
+ }
+ public int sourceStart() {
+ return this.sourceStart;
+ }
+ public int sourceEnd() {
+ return this.sourceEnd;
+ }
+ public String toString() {
+
+ return print(0, new StringBuffer(30)).toString();
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+ // do nothing by default
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AbstractMethodDeclaration.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AbstractMethodDeclaration.js
new file mode 100644
index 0000000..1b47a6e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AbstractMethodDeclaration.js
@@ -0,0 +1,421 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.core.compiler.*;
+import org.eclipse.wst.jsdt.internal.compiler.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.FlowInfo;
+import org.eclipse.wst.jsdt.internal.compiler.flow.InitializationFlowContext;
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+import org.eclipse.wst.jsdt.internal.compiler.problem.*;
+import org.eclipse.wst.jsdt.internal.compiler.parser.*;
+
+public abstract class AbstractMethodDeclaration
+ extends ASTNode
+ implements ProblemSeverities, ReferenceContext {
+
+ public MethodScope scope;
+ //it is not relevent for constructor but it helps to have the name of the constructor here
+ //which is always the name of the class.....parsing do extra work to fill it up while it do not have to....
+ public char[] selector;
+ public int declarationSourceStart;
+ public int declarationSourceEnd;
+ public int modifiers;
+ public int modifiersSourceStart;
+ public Annotation[] annotations;
+ public Argument[] arguments;
+ public TypeReference[] thrownExceptions;
+ public Statement[] statements;
+ public int explicitDeclarations;
+ public MethodBinding binding;
+ public boolean ignoreFurtherInvestigation = false;
+ public boolean needFreeReturn = false;
+
+ public Javadoc javadoc;
+
+ public int bodyStart;
+ public int bodyEnd = -1;
+ public CompilationResult compilationResult;
+
+ public boolean errorInSignature = false;
+
+ AbstractMethodDeclaration(CompilationResult compilationResult){
+ this.compilationResult = compilationResult;
+ }
+
+ /*
+ * We cause the compilation task to abort to a given extent.
+ */
+ public void abort(int abortLevel, IProblem problem) {
+
+ switch (abortLevel) {
+ case AbortCompilation :
+ throw new AbortCompilation(this.compilationResult, problem);
+ case AbortCompilationUnit :
+ throw new AbortCompilationUnit(this.compilationResult, problem);
+ case AbortType :
+ throw new AbortType(this.compilationResult, problem);
+ default :
+ throw new AbortMethod(this.compilationResult, problem);
+ }
+ }
+
+ public abstract void analyseCode(ClassScope classScope, InitializationFlowContext initializationContext, FlowInfo info);
+
+ /**
+ * Bind and add argument's binding into the scope of the method
+ */
+ public void bindArguments() {
+
+ if (this.arguments != null) {
+ // by default arguments in abstract/native methods are considered to be used (no complaint is expected)
+ boolean used = this.binding == null || this.binding.isAbstract() || this.binding.isNative();
+
+ int length = this.arguments.length;
+ for (int i = 0; i < length; i++) {
+ TypeBinding argType = this.binding == null ? null : this.binding.parameters[i];
+ this.arguments[i].bind(this.scope, argType, used);
+ }
+ }
+ }
+
+ /**
+ * Record the thrown exception type bindings in the corresponding type references.
+ */
+ public void bindThrownExceptions() {
+
+ if (this.thrownExceptions != null
+ && this.binding != null
+ && this.binding.thrownExceptions != null) {
+ int thrownExceptionLength = this.thrownExceptions.length;
+ int length = this.binding.thrownExceptions.length;
+ if (length == thrownExceptionLength) {
+ for (int i = 0; i < length; i++) {
+ this.thrownExceptions[i].resolvedType = this.binding.thrownExceptions[i];
+ }
+ } else {
+ int bindingIndex = 0;
+ for (int i = 0; i < thrownExceptionLength && bindingIndex < length; i++) {
+ TypeReference thrownException = this.thrownExceptions[i];
+ ReferenceBinding thrownExceptionBinding = this.binding.thrownExceptions[bindingIndex];
+ char[][] bindingCompoundName = thrownExceptionBinding.compoundName;
+ if (thrownException instanceof SingleTypeReference) {
+ // single type reference
+ int lengthName = bindingCompoundName.length;
+ char[] thrownExceptionTypeName = thrownException.getTypeName()[0];
+ if (CharOperation.equals(thrownExceptionTypeName, bindingCompoundName[lengthName - 1])) {
+ thrownException.resolvedType = thrownExceptionBinding;
+ bindingIndex++;
+ }
+ } else {
+ // qualified type reference
+ if (CharOperation.equals(thrownException.getTypeName(), bindingCompoundName)) {
+ thrownException.resolvedType = thrownExceptionBinding;
+ bindingIndex++;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public CompilationResult compilationResult() {
+
+ return this.compilationResult;
+ }
+
+ /**
+ * Bytecode generation for a method
+ * @param classScope
+ * @param classFile
+ */
+ public void generateCode(ClassScope classScope, ClassFile classFile) {
+
+ int problemResetPC = 0;
+ classFile.codeStream.wideMode = false; // reset wideMode to false
+ if (this.ignoreFurtherInvestigation) {
+ // method is known to have errors, dump a problem method
+ if (this.binding == null)
+ return; // handle methods with invalid signature or duplicates
+ int problemsLength;
+ IProblem[] problems =
+ this.scope.referenceCompilationUnit().compilationResult.getProblems();
+ IProblem[] problemsCopy = new IProblem[problemsLength = problems.length];
+ System.arraycopy(problems, 0, problemsCopy, 0, problemsLength);
+ classFile.addProblemMethod(this, this.binding, problemsCopy);
+ return;
+ }
+ // regular code generation
+ try {
+ problemResetPC = classFile.contentsOffset;
+ this.generateCode(classFile);
+ } catch (AbortMethod e) {
+ // a fatal error was detected during code generation, need to restart code gen if possible
+ if (e.compilationResult == CodeStream.RESTART_IN_WIDE_MODE) {
+ // a branch target required a goto_w, restart code gen in wide mode.
+ try {
+ classFile.contentsOffset = problemResetPC;
+ classFile.methodCount--;
+ classFile.codeStream.wideMode = true; // request wide mode
+ this.generateCode(classFile); // restart method generation
+ } catch (AbortMethod e2) {
+ int problemsLength;
+ IProblem[] problems =
+ this.scope.referenceCompilationUnit().compilationResult.getAllProblems();
+ IProblem[] problemsCopy = new IProblem[problemsLength = problems.length];
+ System.arraycopy(problems, 0, problemsCopy, 0, problemsLength);
+ classFile.addProblemMethod(this, this.binding, problemsCopy, problemResetPC);
+ }
+ } else {
+ // produce a problem method accounting for this fatal error
+ int problemsLength;
+ IProblem[] problems =
+ this.scope.referenceCompilationUnit().compilationResult.getAllProblems();
+ IProblem[] problemsCopy = new IProblem[problemsLength = problems.length];
+ System.arraycopy(problems, 0, problemsCopy, 0, problemsLength);
+ classFile.addProblemMethod(this, this.binding, problemsCopy, problemResetPC);
+ }
+ }
+ }
+
+ private void generateCode(ClassFile classFile) {
+
+ classFile.generateMethodInfoHeader(this.binding);
+ int methodAttributeOffset = classFile.contentsOffset;
+ int attributeNumber = classFile.generateMethodInfoAttribute(this.binding);
+ if ((!this.binding.isNative()) && (!this.binding.isAbstract())) {
+ int codeAttributeOffset = classFile.contentsOffset;
+ classFile.generateCodeAttributeHeader();
+ CodeStream codeStream = classFile.codeStream;
+ codeStream.reset(this, classFile);
+ // initialize local positions
+ this.scope.computeLocalVariablePositions(this.binding.isStatic() ? 0 : 1, codeStream);
+
+ // arguments initialization for local variable debug attributes
+ if (this.arguments != null) {
+ for (int i = 0, max = this.arguments.length; i < max; i++) {
+ LocalVariableBinding argBinding;
+ codeStream.addVisibleLocalVariable(argBinding = this.arguments[i].binding);
+ argBinding.recordInitializationStartPC(0);
+ }
+ }
+ if (this.statements != null) {
+ for (int i = 0, max = this.statements.length; i < max; i++)
+ this.statements[i].generateCode(this.scope, codeStream);
+ }
+ if (this.needFreeReturn) {
+ codeStream.return_();
+ }
+ // local variable attributes
+ codeStream.exitUserScope(this.scope);
+ codeStream.recordPositionsFrom(0, this.declarationSourceEnd);
+ classFile.completeCodeAttribute(codeAttributeOffset);
+ attributeNumber++;
+ } else {
+ checkArgumentsSize();
+ }
+ classFile.completeMethodInfo(methodAttributeOffset, attributeNumber);
+
+ // if a problem got reported during code gen, then trigger problem method creation
+ if (this.ignoreFurtherInvestigation) {
+ throw new AbortMethod(this.scope.referenceCompilationUnit().compilationResult, null);
+ }
+ }
+
+ private void checkArgumentsSize() {
+ TypeBinding[] parameters = this.binding.parameters;
+ int size = 1; // an abstact method or a native method cannot be static
+ for (int i = 0, max = parameters.length; i < max; i++) {
+ TypeBinding parameter = parameters[i];
+ if (parameter == LongBinding || parameter == DoubleBinding) {
+ size += 2;
+ } else {
+ size++;
+ }
+ if (size > 0xFF) {
+ this.scope.problemReporter().noMoreAvailableSpaceForArgument(this.scope.locals[i], this.scope.locals[i].declaration);
+ }
+ }
+ }
+
+ public boolean hasErrors() {
+ return this.ignoreFurtherInvestigation;
+ }
+
+ public boolean isAbstract() {
+
+ if (this.binding != null)
+ return this.binding.isAbstract();
+ return (this.modifiers & AccAbstract) != 0;
+ }
+
+ public boolean isClinit() {
+
+ return false;
+ }
+
+ public boolean isConstructor() {
+
+ return false;
+ }
+
+ public boolean isDefaultConstructor() {
+
+ return false;
+ }
+
+ public boolean isInitializationMethod() {
+
+ return false;
+ }
+
+ public boolean isMethod() {
+
+ return false;
+ }
+
+ public boolean isNative() {
+
+ if (this.binding != null)
+ return this.binding.isNative();
+ return (this.modifiers & AccNative) != 0;
+ }
+
+ public boolean isStatic() {
+
+ if (this.binding != null)
+ return this.binding.isStatic();
+ return (this.modifiers & AccStatic) != 0;
+ }
+
+ /**
+ * Fill up the method body with statement
+ * @param parser
+ * @param unit
+ */
+ public abstract void parseStatements(
+ Parser parser,
+ CompilationUnitDeclaration unit);
+
+ public StringBuffer print(int tab, StringBuffer output) {
+
+ printIndent(tab, output);
+ printModifiers(this.modifiers, output);
+
+ TypeParameter[] typeParams = typeParameters();
+ if (typeParams != null) {
+ output.append('<');//$NON-NLS-1$
+ int max = typeParams.length - 1;
+ for (int j = 0; j < max; j++) {
+ typeParams[j].print(0, output);
+ output.append(", ");//$NON-NLS-1$
+ }
+ typeParams[max].print(0, output);
+ output.append('>');
+ }
+
+ printReturnType(0, output).append(this.selector).append('(');
+ if (this.arguments != null) {
+ for (int i = 0; i < this.arguments.length; i++) {
+ if (i > 0) output.append(", "); //$NON-NLS-1$
+ this.arguments[i].print(0, output);
+ }
+ }
+ output.append(')');
+ if (this.thrownExceptions != null) {
+ output.append(" throws "); //$NON-NLS-1$
+ for (int i = 0; i < this.thrownExceptions.length; i++) {
+ if (i > 0) output.append(", "); //$NON-NLS-1$
+ this.thrownExceptions[i].print(0, output);
+ }
+ }
+ printBody(tab + 1, output);
+ return output;
+ }
+
+ public StringBuffer printBody(int indent, StringBuffer output) {
+
+ if (isAbstract() || (this.modifiers & AccSemicolonBody) != 0)
+ return output.append(';');
+
+ output.append(" {"); //$NON-NLS-1$
+ if (this.statements != null) {
+ for (int i = 0; i < this.statements.length; i++) {
+ output.append('\n');
+ this.statements[i].printStatement(indent, output);
+ }
+ }
+ output.append('\n'); //$NON-NLS-1$
+ printIndent(indent == 0 ? 0 : indent - 1, output).append('}');
+ return output;
+ }
+
+ public StringBuffer printReturnType(int indent, StringBuffer output) {
+
+ return output;
+ }
+
+ public void resolve(ClassScope upperScope) {
+
+ if (this.binding == null) {
+ this.ignoreFurtherInvestigation = true;
+ }
+
+ try {
+ bindArguments();
+ bindThrownExceptions();
+ resolveJavadoc();
+ resolveStatements();
+ } catch (AbortMethod e) { // ========= abort on fatal error =============
+ this.ignoreFurtherInvestigation = true;
+ }
+ }
+
+ public void resolveJavadoc() {
+
+ if (this.binding == null) return;
+ if (this.javadoc != null) {
+ this.javadoc.resolve(this.scope);
+ return;
+ }
+ if (this.binding.declaringClass != null && !this.binding.declaringClass.isLocalType()) {
+ this.scope.problemReporter().javadocMissing(this.sourceStart, this.sourceEnd, this.binding.modifiers);
+ }
+ }
+
+ public void resolveStatements() {
+
+ if (this.statements != null) {
+ for (int i = 0, length = this.statements.length; i < length; i++) {
+ this.statements[i].resolve(this.scope);
+ }
+ } else if ((this.bits & UndocumentedEmptyBlockMASK) != 0) {
+ this.scope.problemReporter().undocumentedEmptyBlock(this.bodyStart-1, this.bodyEnd+1);
+ }
+ }
+
+ public void tagAsHavingErrors() {
+
+ this.ignoreFurtherInvestigation = true;
+ }
+
+ public void traverse(
+ ASTVisitor visitor,
+ ClassScope classScope) {
+ // default implementation: subclass will define it
+ }
+
+ public TypeParameter[] typeParameters() {
+ return null;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AbstractVariableDeclaration.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AbstractVariableDeclaration.js
new file mode 100644
index 0000000..0607c48
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AbstractVariableDeclaration.js
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.flow.FlowContext;
+import org.eclipse.wst.jsdt.internal.compiler.flow.FlowInfo;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.InvocationSite;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding;
+
+public abstract class AbstractVariableDeclaration extends Statement implements InvocationSite {
+ public int declarationEnd;
+ public int declarationSourceEnd;
+ public int declarationSourceStart;
+ public int hiddenVariableDepth; // used to diagnose hiding scenarii
+ public Expression initialization;
+ public int modifiers;
+ public int modifiersSourceStart;
+ public Annotation[] annotations;
+
+ public char[] name;
+
+ public TypeReference type;
+
+ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
+ return flowInfo;
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.InvocationSite#genericTypeArguments()
+ */
+ public TypeBinding[] genericTypeArguments() {
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.InvocationSite#isSuperAccess()
+ */
+ public boolean isSuperAccess() {
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.InvocationSite#isTypeAccess()
+ */
+ public boolean isTypeAccess() {
+ return false;
+ }
+
+
+ public StringBuffer printStatement(int indent, StringBuffer output) {
+
+ printIndent(indent, output);
+ printModifiers(this.modifiers, output);
+ type.print(0, output).append(' ').append(this.name);
+ if (initialization != null) {
+ output.append(" = "); //$NON-NLS-1$
+ initialization.printExpression(indent, output);
+ }
+ return output.append(';');
+ }
+
+ public void resolve(BlockScope scope) {
+ // do nothing by default (redefined for local variables)
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.InvocationSite#setActualReceiverType(org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding)
+ */
+ public void setActualReceiverType(ReferenceBinding receiverType) {
+ // do nothing by default
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.InvocationSite#setDepth(int)
+ */
+ public void setDepth(int depth) {
+
+ this.hiddenVariableDepth = depth;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.InvocationSite#setFieldIndex(int)
+ */
+ public void setFieldIndex(int depth) {
+ // do nothing by default
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AllocationExpression.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AllocationExpression.js
new file mode 100644
index 0000000..bcb824c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AllocationExpression.js
@@ -0,0 +1,317 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class AllocationExpression extends Expression implements InvocationSite {
+
+ public TypeReference type;
+ public Expression[] arguments;
+ public MethodBinding binding; // exact binding resulting from lookup
+ protected MethodBinding codegenBinding; // actual binding used for code generation (if no synthetic accessor)
+ MethodBinding syntheticAccessor; // synthetic accessor for inner-emulation
+ public TypeReference[] typeArguments;
+ public TypeBinding[] genericTypeArguments;
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ // check captured variables are initialized in current context (26134)
+ checkCapturedLocalInitializationIfNecessary(this.binding.declaringClass, currentScope, flowInfo);
+
+ // process arguments
+ if (arguments != null) {
+ for (int i = 0, count = arguments.length; i < count; i++) {
+ flowInfo =
+ arguments[i]
+ .analyseCode(currentScope, flowContext, flowInfo)
+ .unconditionalInits();
+ }
+ }
+ // record some dependency information for exception types
+ ReferenceBinding[] thrownExceptions;
+ if (((thrownExceptions = this.binding.thrownExceptions).length) != 0) {
+ // check exception handling
+ flowContext.checkExceptionHandlers(
+ thrownExceptions,
+ this,
+ flowInfo,
+ currentScope);
+ }
+ manageEnclosingInstanceAccessIfNecessary(currentScope, flowInfo);
+ manageSyntheticAccessIfNecessary(currentScope, flowInfo);
+
+ return flowInfo;
+ }
+
+ public void checkCapturedLocalInitializationIfNecessary(ReferenceBinding checkedType, BlockScope currentScope, FlowInfo flowInfo) {
+
+ if (checkedType.isLocalType()
+ && !checkedType.isAnonymousType()
+ && !currentScope.isDefinedInType(checkedType)) { // only check external allocations
+ NestedTypeBinding nestedType = (NestedTypeBinding) checkedType;
+ SyntheticArgumentBinding[] syntheticArguments = nestedType.syntheticOuterLocalVariables();
+ if (syntheticArguments != null)
+ for (int i = 0, count = syntheticArguments.length; i < count; i++){
+ SyntheticArgumentBinding syntheticArgument = syntheticArguments[i];
+ LocalVariableBinding targetLocal;
+ if ((targetLocal = syntheticArgument.actualOuterLocalVariable) == null) continue;
+ if (targetLocal.declaration != null && !flowInfo.isDefinitelyAssigned(targetLocal)){
+ currentScope.problemReporter().uninitializedLocalVariable(targetLocal, this);
+ }
+ }
+
+ }
+ }
+
+ public Expression enclosingInstance() {
+ return null;
+ }
+
+ public void generateCode(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ boolean valueRequired) {
+
+ int pc = codeStream.position;
+ ReferenceBinding allocatedType = this.codegenBinding.declaringClass;
+
+ codeStream.new_(allocatedType);
+ if (valueRequired) {
+ codeStream.dup();
+ }
+ // better highlight for allocation: display the type individually
+ codeStream.recordPositionsFrom(pc, type.sourceStart);
+
+ // handling innerclass instance allocation - enclosing instance arguments
+ if (allocatedType.isNestedType()) {
+ codeStream.generateSyntheticEnclosingInstanceValues(
+ currentScope,
+ allocatedType,
+ enclosingInstance(),
+ this);
+ }
+ // generate the arguments for constructor
+ if (arguments != null) {
+ for (int i = 0, count = arguments.length; i < count; i++) {
+ arguments[i].generateCode(currentScope, codeStream, true);
+ }
+ }
+ // handling innerclass instance allocation - outer local arguments
+ if (allocatedType.isNestedType()) {
+ codeStream.generateSyntheticOuterArgumentValues(
+ currentScope,
+ allocatedType,
+ this);
+ }
+ // invoke constructor
+ if (syntheticAccessor == null) {
+ codeStream.invokespecial(this.codegenBinding);
+ } else {
+ // synthetic accessor got some extra arguments appended to its signature, which need values
+ for (int i = 0,
+ max = syntheticAccessor.parameters.length - this.codegenBinding.parameters.length;
+ i < max;
+ i++) {
+ codeStream.aconst_null();
+ }
+ codeStream.invokespecial(syntheticAccessor);
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.InvocationSite#genericTypeArguments()
+ */
+ public TypeBinding[] genericTypeArguments() {
+ return this.genericTypeArguments;
+ }
+
+ public boolean isSuperAccess() {
+
+ return false;
+ }
+
+ public boolean isTypeAccess() {
+
+ return true;
+ }
+
+ /* Inner emulation consists in either recording a dependency
+ * link only, or performing one level of propagation.
+ *
+ * Dependency mechanism is used whenever dealing with source target
+ * types, since by the time we reach them, we might not yet know their
+ * exact need.
+ */
+ public void manageEnclosingInstanceAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo) {
+
+ if (!flowInfo.isReachable()) return;
+ ReferenceBinding allocatedType;
+
+ // perform some emulation work in case there is some and we are inside a local type only
+ if ((allocatedType = binding.declaringClass).isNestedType()
+ && currentScope.enclosingSourceType().isLocalType()) {
+
+ if (allocatedType.isLocalType()) {
+ ((LocalTypeBinding) allocatedType).addInnerEmulationDependent(currentScope, false);
+ // request cascade of accesses
+ } else {
+ // locally propagate, since we already now the desired shape for sure
+ currentScope.propagateInnerEmulation(allocatedType, false);
+ // request cascade of accesses
+ }
+ }
+ }
+
+ public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo) {
+
+ if (!flowInfo.isReachable()) return;
+
+ // if constructor from parameterized type got found, use the original constructor at codegen time
+ this.codegenBinding = this.binding.original();
+
+ if (this.codegenBinding.isPrivate()
+ && (currentScope.enclosingSourceType() != this.codegenBinding.declaringClass)) {
+
+ if (currentScope.environment().options.isPrivateConstructorAccessChangingVisibility) {
+ this.codegenBinding.tagForClearingPrivateModifier();
+ // constructor will not be dumped as private, no emulation required thus
+ } else {
+ syntheticAccessor =
+ ((SourceTypeBinding) this.codegenBinding.declaringClass).addSyntheticMethod(this.codegenBinding, isSuperAccess());
+ currentScope.problemReporter().needToEmulateMethodAccess(this.codegenBinding, this);
+ }
+ }
+ }
+
+ public StringBuffer printExpression(int indent, StringBuffer output) {
+
+ output.append("new "); //$NON-NLS-1$
+ if (typeArguments != null) {
+ output.append('<');//$NON-NLS-1$
+ int max = typeArguments.length - 1;
+ for (int j = 0; j < max; j++) {
+ typeArguments[j].print(0, output);
+ output.append(", ");//$NON-NLS-1$
+ }
+ typeArguments[max].print(0, output);
+ output.append('>');
+ }
+ type.printExpression(0, output);
+ output.append('(');
+ if (arguments != null) {
+ for (int i = 0; i < arguments.length; i++) {
+ if (i > 0) output.append(", "); //$NON-NLS-1$
+ arguments[i].printExpression(0, output);
+ }
+ }
+ return output.append(')');
+ }
+
+ public TypeBinding resolveType(BlockScope scope) {
+
+ // Propagate the type checking to the arguments, and check if the constructor is defined.
+ constant = NotAConstant;
+ this.resolvedType = type.resolveType(scope);
+ // will check for null after args are resolved
+
+ // resolve type arguments (for generic constructor call)
+ if (this.typeArguments != null) {
+ int length = this.typeArguments.length;
+ boolean argHasError = false; // typeChecks all arguments
+ this.genericTypeArguments = new TypeBinding[length];
+ for (int i = 0; i < length; i++) {
+ if ((this.genericTypeArguments[i] = this.typeArguments[i].resolveType(scope)) == null) {
+ argHasError = true;
+ }
+ }
+ if (argHasError) {
+ return null;
+ }
+ }
+
+ // buffering the arguments' types
+ boolean argsContainCast = false;
+ TypeBinding[] argumentTypes = NoParameters;
+ if (arguments != null) {
+ boolean argHasError = false;
+ int length = arguments.length;
+ argumentTypes = new TypeBinding[length];
+ for (int i = 0; i < length; i++) {
+ Expression argument = this.arguments[i];
+ if (argument instanceof CastExpression) {
+ argument.bits |= IgnoreNeedForCastCheckMASK; // will check later on
+ argsContainCast = true;
+ }
+ if ((argumentTypes[i] = argument.resolveType(scope)) == null) {
+ argHasError = true;
+ }
+ }
+ if (argHasError) {
+ return this.resolvedType;
+ }
+ }
+ if (this.resolvedType == null)
+ return null;
+
+ if (!this.resolvedType.canBeInstantiated()) {
+ scope.problemReporter().cannotInstantiate(type, this.resolvedType);
+ return this.resolvedType;
+ }
+ ReferenceBinding allocationType = (ReferenceBinding) this.resolvedType;
+ if (!(binding = scope.getConstructor(allocationType, argumentTypes, this)).isValidBinding()) {
+ if (binding.declaringClass == null)
+ binding.declaringClass = allocationType;
+ scope.problemReporter().invalidConstructor(this, binding);
+ return this.resolvedType;
+ }
+ if (isMethodUseDeprecated(binding, scope))
+ scope.problemReporter().deprecatedMethod(binding, this);
+ if (this.arguments != null)
+ checkInvocationArguments(scope, null, allocationType, this.binding, this.arguments, argumentTypes, argsContainCast, this);
+ return allocationType;
+ }
+
+ public void setActualReceiverType(ReferenceBinding receiverType) {
+ // ignored
+ }
+
+ public void setDepth(int i) {
+ // ignored
+ }
+
+ public void setFieldIndex(int i) {
+ // ignored
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+
+ if (visitor.visit(this, scope)) {
+ if (this.typeArguments != null) {
+ for (int i = 0, typeArgumentsLength = this.typeArguments.length; i < typeArgumentsLength; i++) {
+ this.typeArguments[i].traverse(visitor, scope);
+ }
+ }
+ this.type.traverse(visitor, scope);
+ if (this.arguments != null) {
+ for (int i = 0, argumentsLength = this.arguments.length; i < argumentsLength; i++)
+ this.arguments[i].traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Annotation.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Annotation.js
new file mode 100644
index 0000000..25f651f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Annotation.js
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.CompilationUnitScope;
+
+/**
+ * Annotation
+ */
+public abstract class Annotation extends Expression {
+
+ public char[][] tokens;
+ public long[] sourcePositions;
+ public int declarationSourceEnd;
+
+ public StringBuffer printExpression(int indent, StringBuffer output) {
+ output.append('@');
+ for (int i = 0; i < tokens.length; i++) {
+ if (i > 0) output.append('.');
+ output.append(tokens[i]);
+ }
+ return output;
+ }
+ public abstract void traverse(ASTVisitor visitor, BlockScope scope);
+ public abstract void traverse(ASTVisitor visitor, ClassScope scope);
+ public abstract void traverse(ASTVisitor visitor, CompilationUnitScope scope);
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AnnotationTypeDeclaration.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AnnotationTypeDeclaration.js
new file mode 100644
index 0000000..086ec3e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AnnotationTypeDeclaration.js
@@ -0,0 +1,283 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.CompilationUnitScope;
+import org.eclipse.wst.jsdt.internal.compiler.problem.AbortType;
+
+/**
+ * Annotation type declaration
+ */
+public class AnnotationTypeDeclaration extends TypeDeclaration {
+
+ public AnnotationTypeMemberDeclaration[] annotationTypeMemberDeclarations;
+
+ /**
+ * @param compilationResult
+ */
+ public AnnotationTypeDeclaration(CompilationResult compilationResult) {
+ super(compilationResult);
+ }
+
+ public StringBuffer printHeader(int indent, StringBuffer output) {
+
+ printModifiers(this.modifiers, output);
+ output.append("@interface "); //$NON-NLS-1$ //$NON-NLS-2$
+ output.append(name);
+ if (typeParameters != null) {
+ output.append("<");//$NON-NLS-1$
+ for (int i = 0; i < typeParameters.length; i++) {
+ if (i > 0) output.append( ", "); //$NON-NLS-1$
+ typeParameters[i].print(0, output);
+ }
+ output.append(">");//$NON-NLS-1$
+ }
+ if (superclass != null) {
+ output.append(" extends "); //$NON-NLS-1$
+ superclass.print(0, output);
+ }
+ if (superInterfaces != null && superInterfaces.length > 0) {
+ output.append(isInterface() ? " extends " : " implements ");//$NON-NLS-2$ //$NON-NLS-1$
+ for (int i = 0; i < superInterfaces.length; i++) {
+ if (i > 0) output.append( ", "); //$NON-NLS-1$
+ superInterfaces[i].print(0, output);
+ }
+ }
+ return output;
+ }
+
+ public StringBuffer printBody(int indent, StringBuffer output) {
+
+ output.append(" {"); //$NON-NLS-1$
+ if (this.enums != null) {
+ for (int i = 0; i < this.enums.length; i++) {
+ if (this.enums[i] != null) {
+ output.append('\n');
+ this.enums[i].print(indent + 1, output);
+ }
+ }
+ }
+ if (this.annotationTypeMemberDeclarations != null) {
+ for (int i = 0; i < this.annotationTypeMemberDeclarations.length; i++) {
+ if (this.annotationTypeMemberDeclarations[i] != null) {
+ output.append('\n');
+ this.annotationTypeMemberDeclarations[i].print(indent + 1, output);
+ }
+ }
+ }
+ if (memberTypes != null) {
+ for (int i = 0; i < memberTypes.length; i++) {
+ if (memberTypes[i] != null) {
+ output.append('\n');
+ memberTypes[i].print(indent + 1, output);
+ }
+ }
+ }
+ if (fields != null) {
+ for (int fieldI = 0; fieldI < fields.length; fieldI++) {
+ if (fields[fieldI] != null) {
+ output.append('\n');
+ fields[fieldI].print(indent + 1, output);
+ }
+ }
+ }
+ if (methods != null) {
+ for (int i = 0; i < methods.length; i++) {
+ if (methods[i] != null) {
+ output.append('\n');
+ methods[i].print(indent + 1, output);
+ }
+ }
+ }
+ output.append('\n');
+ return printIndent(indent, output).append('}');
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope unitScope) {
+
+ if (ignoreFurtherInvestigation)
+ return;
+ try {
+ if (visitor.visit(this, unitScope)) {
+ if (this.typeParameters != null) {
+ int length = this.typeParameters.length;
+ for (int i = 0; i < length; i++) {
+ this.typeParameters[i].traverse(visitor, scope);
+ }
+ }
+ if (this.superclass != null)
+ this.superclass.traverse(visitor, scope);
+ if (this.superInterfaces != null) {
+ int length = this.superInterfaces.length;
+ for (int i = 0; i < length; i++)
+ this.superInterfaces[i].traverse(visitor, scope);
+ }
+ if (this.memberTypes != null) {
+ int length = this.memberTypes.length;
+ for (int i = 0; i < length; i++)
+ this.memberTypes[i].traverse(visitor, scope);
+ }
+ if (this.enums != null) {
+ int length = this.enums.length;
+ for (int i = 0; i < length; i++) {
+ this.enums[i].traverse(visitor, scope);
+ }
+ }
+ if (this.annotationTypeMemberDeclarations != null) {
+ int length = this.annotationTypeMemberDeclarations.length;
+ for (int i = 0; i < length; i++) {
+ this.annotationTypeMemberDeclarations[i].traverse(visitor, scope);
+ }
+ }
+ if (this.fields != null) {
+ int length = this.fields.length;
+ for (int i = 0; i < length; i++) {
+ FieldDeclaration field;
+ if ((field = this.fields[i]).isStatic()) {
+ field.traverse(visitor, staticInitializerScope);
+ } else {
+ field.traverse(visitor, initializerScope);
+ }
+ }
+ }
+ if (this.methods != null) {
+ int length = methods.length;
+ for (int i = 0; i < length; i++)
+ this.methods[i].traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, unitScope);
+ } catch (AbortType e) {
+ // silent abort
+ }
+ }
+ public void traverse(ASTVisitor visitor, ClassScope classScope) {
+
+ if (ignoreFurtherInvestigation)
+ return;
+ try {
+ if (visitor.visit(this, classScope)) {
+ if (this.typeParameters != null) {
+ int typeParametersLength = this.typeParameters.length;
+ for (int i = 0; i < typeParametersLength; i++) {
+ this.typeParameters[i].traverse(visitor, scope);
+ }
+ }
+ if (this.superclass != null)
+ this.superclass.traverse(visitor, scope);
+ if (this.superInterfaces != null) {
+ int length = this.superInterfaces.length;
+ for (int i = 0; i < length; i++)
+ this.superInterfaces[i].traverse(visitor, scope);
+ }
+ if (this.memberTypes != null) {
+ int length = this.memberTypes.length;
+ for (int i = 0; i < length; i++)
+ this.memberTypes[i].traverse(visitor, scope);
+ }
+ if (this.enums != null) {
+ int length = this.enums.length;
+ for (int i = 0; i < length; i++) {
+ this.enums[i].traverse(visitor, scope);
+ }
+ }
+ if (this.annotationTypeMemberDeclarations != null) {
+ int length = this.annotationTypeMemberDeclarations.length;
+ for (int i = 0; i < length; i++) {
+ this.annotationTypeMemberDeclarations[i].traverse(visitor, scope);
+ }
+ }
+ if (this.fields != null) {
+ int length = this.fields.length;
+ for (int i = 0; i < length; i++) {
+ FieldDeclaration field;
+ if ((field = this.fields[i]).isStatic()) {
+ field.traverse(visitor, staticInitializerScope);
+ } else {
+ field.traverse(visitor, initializerScope);
+ }
+ }
+ }
+ if (this.methods != null) {
+ int length = this.methods.length;
+ for (int i = 0; i < length; i++)
+ this.methods[i].traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, classScope);
+ } catch (AbortType e) {
+ // silent abort
+ }
+ }
+
+ public void traverse(ASTVisitor visitor, CompilationUnitScope unitScope) {
+
+ if (ignoreFurtherInvestigation)
+ return;
+ try {
+ if (visitor.visit(this, unitScope)) {
+ if (this.typeParameters != null) {
+ int length = this.typeParameters.length;
+ for (int i = 0; i < length; i++) {
+ this.typeParameters[i].traverse(visitor, scope);
+ }
+ }
+ if (this.superclass != null)
+ this.superclass.traverse(visitor, scope);
+ if (this.superInterfaces != null) {
+ int length = this.superInterfaces.length;
+ for (int i = 0; i < length; i++)
+ this.superInterfaces[i].traverse(visitor, scope);
+ }
+ if (this.memberTypes != null) {
+ int length = this.memberTypes.length;
+ for (int i = 0; i < length; i++)
+ this.memberTypes[i].traverse(visitor, scope);
+ }
+ if (this.enums != null) {
+ int length = this.enums.length;
+ for (int i = 0; i < length; i++) {
+ this.enums[i].traverse(visitor, scope);
+ }
+ }
+ if (this.annotationTypeMemberDeclarations != null) {
+ int length = this.annotationTypeMemberDeclarations.length;
+ for (int i = 0; i < length; i++) {
+ this.annotationTypeMemberDeclarations[i].traverse(visitor, scope);
+ }
+ }
+ if (this.fields != null) {
+ int length = this.fields.length;
+ for (int i = 0; i < length; i++) {
+ FieldDeclaration field;
+ if ((field = this.fields[i]).isStatic()) {
+ field.traverse(visitor, staticInitializerScope);
+ } else {
+ field.traverse(visitor, initializerScope);
+ }
+ }
+ }
+ if (this.methods != null) {
+ int length = this.methods.length;
+ for (int i = 0; i < length; i++)
+ this.methods[i].traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, unitScope);
+ } catch (AbortType e) {
+ // silent abort
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AnnotationTypeMemberDeclaration.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AnnotationTypeMemberDeclaration.js
new file mode 100644
index 0000000..cf66855
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AnnotationTypeMemberDeclaration.js
@@ -0,0 +1,158 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
+import org.eclipse.wst.jsdt.internal.compiler.flow.ExceptionHandlingFlowContext;
+import org.eclipse.wst.jsdt.internal.compiler.flow.FlowInfo;
+import org.eclipse.wst.jsdt.internal.compiler.flow.InitializationFlowContext;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding;
+import org.eclipse.wst.jsdt.internal.compiler.parser.Parser;
+import org.eclipse.wst.jsdt.internal.compiler.problem.AbortMethod;
+
+public class AnnotationTypeMemberDeclaration extends AbstractMethodDeclaration {
+
+ public TypeReference returnType;
+ public Expression memberValue;
+ public int extendedDimensions;
+
+ /**
+ * MethodDeclaration constructor comment.
+ */
+ public AnnotationTypeMemberDeclaration(CompilationResult compilationResult) {
+ super(compilationResult);
+ }
+
+ public void analyseCode(
+ ClassScope classScope,
+ InitializationFlowContext initializationContext,
+ FlowInfo flowInfo) {
+
+ // starting of the code analysis for methods
+ if (ignoreFurtherInvestigation) {
+ return;
+ }
+ if (this.extendedDimensions != 0) {
+ scope.problemReporter().illegalExtendedDimensions(this);
+ }
+ try {
+ if (binding == null) {
+ return;
+ }
+
+ if (this.binding.isPrivate() && !this.binding.isPrivateUsed()) {
+ if (!classScope.referenceCompilationUnit().compilationResult.hasSyntaxError()) {
+ scope.problemReporter().unusedPrivateMethod(this);
+ }
+ }
+
+ // may be in a non necessary <clinit> for innerclass with static final constant fields
+ if (binding.isAbstract() || binding.isNative())
+ return;
+
+ ExceptionHandlingFlowContext methodContext =
+ new ExceptionHandlingFlowContext(
+ initializationContext,
+ this,
+ binding.thrownExceptions,
+ scope,
+ FlowInfo.DEAD_END);
+
+ // propagate to statements
+ if (statements != null) {
+ boolean didAlreadyComplain = false;
+ for (int i = 0, count = statements.length; i < count; i++) {
+ Statement stat = statements[i];
+ if (!stat.complainIfUnreachable(flowInfo, scope, didAlreadyComplain)) {
+ flowInfo = stat.analyseCode(scope, methodContext, flowInfo);
+ } else {
+ didAlreadyComplain = true;
+ }
+ }
+ }
+ // check for missing returning path
+ TypeBinding returnTypeBinding = binding.returnType;
+ if ((returnTypeBinding == VoidBinding) || isAbstract()) {
+ this.needFreeReturn = flowInfo.isReachable();
+ } else {
+ if (flowInfo != FlowInfo.DEAD_END) {
+ scope.problemReporter().shouldReturn(returnTypeBinding, this);
+ }
+ }
+ // check unreachable catch blocks
+ methodContext.complainIfUnusedExceptionHandlers(this);
+ } catch (AbortMethod e) {
+ this.ignoreFurtherInvestigation = true;
+ }
+ }
+
+
+ public void parseStatements(Parser parser, CompilationUnitDeclaration unit) {
+ // nothing to do
+ // annotation type member declaration don't have any body
+ }
+
+ public StringBuffer printReturnType(int indent, StringBuffer output) {
+
+ if (returnType == null) return output;
+ return returnType.printExpression(0, output).append(' ');
+ }
+
+ public void resolve(ClassScope upperScope) {
+ if (this.binding == null) {
+ this.ignoreFurtherInvestigation = true;
+ }
+
+ try {
+ resolveStatements();
+ resolveJavadoc();
+ } catch (AbortMethod e) { // ========= abort on fatal error =============
+ this.ignoreFurtherInvestigation = true;
+ }
+ }
+
+ public void resolveStatements() {
+
+ // ========= abort on fatal error =============
+ if (this.returnType != null && this.binding != null) {
+ this.returnType.resolvedType = this.binding.returnType;
+ // record the return type binding
+ }
+ // check if method with constructor name
+ if (CharOperation.equals(scope.enclosingSourceType().sourceName, selector)) {
+ scope.problemReporter().annotationTypeMemberDeclarationWithConstructorName(this);
+ }
+ super.resolveStatements();
+ }
+
+ public void traverse(
+ ASTVisitor visitor,
+ ClassScope classScope) {
+
+ if (visitor.visit(this, classScope)) {
+ if (this.annotations != null) {
+ int annotationsLength = this.annotations.length;
+ for (int i = 0; i < annotationsLength; i++)
+ this.annotations[i].traverse(visitor, scope);
+ }
+ if (returnType != null) {
+ returnType.traverse(visitor, scope);
+ }
+ if (memberValue != null) {
+ memberValue.traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, classScope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Argument.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Argument.js
new file mode 100644
index 0000000..3f26f11
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Argument.js
@@ -0,0 +1,132 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class Argument extends LocalDeclaration {
+
+ // prefix for setter method (to recognize special hiding argument)
+ private final static char[] SET = "set".toCharArray(); //$NON-NLS-1$
+ public boolean isVarArgs;
+
+ public Argument(char[] name, long posNom, TypeReference tr, int modifiers, boolean isVarArgs) {
+
+ super(name, (int) (posNom >>> 32), (int) posNom);
+ this.declarationSourceEnd = (int) posNom;
+ this.modifiers = modifiers;
+ type = tr;
+ this.bits |= IsLocalDeclarationReachableMASK;
+ this.isVarArgs = isVarArgs;
+ }
+
+ public void bind(MethodScope scope, TypeBinding typeBinding, boolean used) {
+
+ if (this.type != null)
+ this.type.resolvedType = typeBinding; // TODO (philippe) no longer necessary as when binding got resolved, it was recorded already (SourceTypeBinding#resolveTypesFor(MethodBinding))
+ // record the resolved type into the type reference
+ int modifierFlag = this.modifiers;
+
+ Binding existingVariable = scope.getBinding(name, BindingIds.VARIABLE, this, false /*do not resolve hidden field*/);
+ if (existingVariable != null && existingVariable.isValidBinding()){
+ if (existingVariable instanceof LocalVariableBinding && this.hiddenVariableDepth == 0) {
+ scope.problemReporter().redefineArgument(this);
+ return;
+ }
+ boolean isSpecialArgument = false;
+ if (existingVariable instanceof FieldBinding) {
+ if (scope.isInsideConstructor()) {
+ isSpecialArgument = true; // constructor argument
+ } else {
+ AbstractMethodDeclaration methodDecl = scope.referenceMethod();
+ if (methodDecl != null && CharOperation.prefixEquals(SET, methodDecl.selector)) {
+ isSpecialArgument = true; // setter argument
+ }
+ }
+ }
+ scope.problemReporter().localVariableHiding(this, existingVariable, isSpecialArgument);
+ }
+
+ scope.addLocalVariable(
+ this.binding =
+ new LocalVariableBinding(this, typeBinding, modifierFlag, true));
+ //true stand for argument instead of just local
+ this.binding.declaration = this;
+ this.binding.useFlag = used ? LocalVariableBinding.USED : LocalVariableBinding.UNUSED;
+ }
+
+ public StringBuffer print(int indent, StringBuffer output) {
+
+ printIndent(indent, output);
+ printModifiers(this.modifiers, output);
+ if (type == null) {
+ output.append("<no type> "); //$NON-NLS-1$
+ } else {
+ type.print(0, output).append(' ');
+ }
+ return output.append(this.name);
+ }
+
+ public StringBuffer printStatement(int indent, StringBuffer output) {
+
+ return print(indent, output).append(';');
+ }
+
+ public TypeBinding resolveForCatch(BlockScope scope) {
+
+ // resolution on an argument of a catch clause
+ // provide the scope with a side effect : insertion of a LOCAL
+ // that represents the argument. The type must be from JavaThrowable
+
+ TypeBinding exceptionType = this.type.resolveType(scope);
+ if (exceptionType == null) return null;
+ if (exceptionType.isGenericType() || exceptionType.isParameterizedType()) {
+ scope.problemReporter().invalidParameterizedExceptionType(exceptionType, this);
+ return null;
+ }
+ if (exceptionType.isTypeVariable()) {
+ scope.problemReporter().invalidTypeVariableAsException(exceptionType, this);
+ return null;
+ }
+ TypeBinding throwable = scope.getJavaLangThrowable();
+ if (!exceptionType.isCompatibleWith(throwable)) {
+ scope.problemReporter().typeMismatchError(exceptionType, throwable, this);
+ return null;
+ }
+
+ Binding existingVariable = scope.getBinding(name, BindingIds.VARIABLE, this, false /*do not resolve hidden field*/);
+ if (existingVariable != null && existingVariable.isValidBinding()){
+ if (existingVariable instanceof LocalVariableBinding && this.hiddenVariableDepth == 0) {
+ scope.problemReporter().redefineArgument(this);
+ return null;
+ }
+ scope.problemReporter().localVariableHiding(this, existingVariable, false);
+ }
+
+ binding = new LocalVariableBinding(this, exceptionType, modifiers, false); // argument decl, but local var (where isArgument = false)
+ scope.addLocalVariable(binding);
+ binding.setConstant(NotAConstant);
+ return exceptionType;
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+
+ if (visitor.visit(this, scope)) {
+ if (type != null)
+ type.traverse(visitor, scope);
+ if (initialization != null)
+ initialization.traverse(visitor, scope);
+ }
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ArrayAllocationExpression.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ArrayAllocationExpression.js
new file mode 100644
index 0000000..b47b831
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ArrayAllocationExpression.js
@@ -0,0 +1,191 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class ArrayAllocationExpression extends Expression {
+
+ public TypeReference type;
+
+ //dimensions.length gives the number of dimensions, but the
+ // last ones may be nulled as in new int[4][5][][]
+ public Expression[] dimensions;
+ public ArrayInitializer initializer;
+
+ /**
+ * ArrayAllocationExpression constructor comment.
+ */
+ public ArrayAllocationExpression() {
+ super();
+ }
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+ for (int i = 0, max = dimensions.length; i < max; i++) {
+ Expression dim;
+ if ((dim = dimensions[i]) != null) {
+ flowInfo = dim.analyseCode(currentScope, flowContext, flowInfo);
+ }
+ }
+ if (initializer != null) {
+ return initializer.analyseCode(currentScope, flowContext, flowInfo);
+ }
+ return flowInfo;
+ }
+
+ /**
+ * Code generation for a array allocation expression
+ */
+ public void generateCode(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ boolean valueRequired) {
+
+ int pc = codeStream.position;
+
+ if (initializer != null) {
+ initializer.generateCode(currentScope, codeStream, valueRequired);
+ return;
+ }
+
+ int nonNullDimensionsLength = 0;
+ for (int i = 0, max = dimensions.length; i < max; i++)
+ if (dimensions[i] != null) {
+ dimensions[i].generateCode(currentScope, codeStream, true);
+ nonNullDimensionsLength++;
+ }
+
+ // Generate a sequence of bytecodes corresponding to an array allocation
+ if (this.resolvedType.dimensions() == 1) {
+ // Mono-dimensional array
+ codeStream.newArray(currentScope, (ArrayBinding)this.resolvedType);
+ } else {
+ // Multi-dimensional array
+ codeStream.multianewarray(this.resolvedType, nonNullDimensionsLength);
+ }
+
+ if (valueRequired) {
+ codeStream.generateImplicitConversion(implicitConversion);
+ } else {
+ codeStream.pop();
+ }
+
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+
+
+ public StringBuffer printExpression(int indent, StringBuffer output) {
+
+ output.append("new "); //$NON-NLS-1$
+ type.print(0, output);
+ for (int i = 0; i < dimensions.length; i++) {
+ if (dimensions[i] == null)
+ output.append("[]"); //$NON-NLS-1$
+ else {
+ output.append('[');
+ dimensions[i].printExpression(0, output);
+ output.append(']');
+ }
+ }
+ if (initializer != null) initializer.printExpression(0, output);
+ return output;
+ }
+
+ public TypeBinding resolveType(BlockScope scope) {
+
+ // Build an array type reference using the current dimensions
+ // The parser does not check for the fact that dimension may be null
+ // only at the -end- like new int [4][][]. The parser allows new int[][4][]
+ // so this must be checked here......(this comes from a reduction to LL1 grammar)
+
+ TypeBinding referenceType = type.resolveType(scope);
+
+ // will check for null after dimensions are checked
+ constant = Constant.NotAConstant;
+ if (referenceType == VoidBinding) {
+ scope.problemReporter().cannotAllocateVoidArray(this);
+ referenceType = null;
+ }
+
+ // check the validity of the dimension syntax (and test for all null dimensions)
+ int explicitDimIndex = -1;
+ for (int i = dimensions.length; --i >= 0;) {
+ if (dimensions[i] != null) {
+ if (explicitDimIndex < 0) explicitDimIndex = i;
+ } else if (explicitDimIndex> 0) {
+ // should not have an empty dimension before an non-empty one
+ scope.problemReporter().incorrectLocationForEmptyDimension(this, i);
+ }
+ }
+
+ // explicitDimIndex < 0 says if all dimensions are nulled
+ // when an initializer is given, no dimension must be specified
+ if (initializer == null) {
+ if (explicitDimIndex < 0) {
+ scope.problemReporter().mustDefineDimensionsOrInitializer(this);
+ }
+ } else if (explicitDimIndex >= 0) {
+ scope.problemReporter().cannotDefineDimensionsAndInitializer(this);
+ }
+
+ // dimensions resolution
+ for (int i = 0; i <= explicitDimIndex; i++) {
+ if (dimensions[i] != null) {
+ TypeBinding dimensionType = dimensions[i].resolveTypeExpecting(scope, IntBinding);
+ if (dimensionType != null) {
+ dimensions[i].computeConversion(scope, IntBinding, dimensionType);
+ }
+ }
+ }
+
+ // building the array binding
+ if (referenceType != null) {
+ if (dimensions.length > 255) {
+ scope.problemReporter().tooManyDimensions(this);
+ }
+ // allow new List<?>[5]
+ if (referenceType.isBoundParameterizedType() || referenceType.isGenericType() || referenceType.isTypeVariable()) {
+ scope.problemReporter().illegalGenericArray(referenceType, this);
+ }
+ this.resolvedType = scope.createArrayType(referenceType, dimensions.length);
+
+ // check the initializer
+ if (initializer != null) {
+ if ((initializer.resolveTypeExpecting(scope, this.resolvedType)) != null)
+ initializer.binding = (ArrayBinding)this.resolvedType;
+ }
+ }
+ return this.resolvedType;
+ }
+
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+
+ if (visitor.visit(this, scope)) {
+ int dimensionsLength = dimensions.length;
+ type.traverse(visitor, scope);
+ for (int i = 0; i < dimensionsLength; i++) {
+ if (dimensions[i] != null)
+ dimensions[i].traverse(visitor, scope);
+ }
+ if (initializer != null)
+ initializer.traverse(visitor, scope);
+ }
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ArrayInitializer.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ArrayInitializer.js
new file mode 100644
index 0000000..ddcb5c6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ArrayInitializer.js
@@ -0,0 +1,209 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class ArrayInitializer extends Expression {
+
+ public Expression[] expressions;
+ public ArrayBinding binding; //the type of the { , , , }
+
+ /**
+ * ArrayInitializer constructor comment.
+ */
+ public ArrayInitializer() {
+
+ super();
+ }
+
+ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
+
+ if (expressions != null) {
+ for (int i = 0, max = expressions.length; i < max; i++) {
+ flowInfo = expressions[i].analyseCode(currentScope, flowContext, flowInfo).unconditionalInits();
+ }
+ }
+ return flowInfo;
+ }
+
+ /**
+ * Code generation for a array initializer
+ */
+ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
+
+ // Flatten the values and compute the dimensions, by iterating in depth into nested array initializers
+ int pc = codeStream.position;
+ int expressionLength = (expressions == null) ? 0: expressions.length;
+ codeStream.generateInlinedValue(expressionLength);
+ codeStream.newArray(currentScope, binding);
+ if (expressions != null) {
+ // binding is an ArrayType, so I can just deal with the dimension
+ int elementsTypeID = binding.dimensions > 1 ? -1 : binding.leafComponentType.id;
+ for (int i = 0; i < expressionLength; i++) {
+ Expression expr;
+ if ((expr = expressions[i]).constant != NotAConstant) {
+ switch (elementsTypeID) { // filter out initializations to default values
+ case T_int :
+ case T_short :
+ case T_byte :
+ case T_char :
+ case T_long :
+ if (expr.constant.longValue() != 0) {
+ codeStream.dup();
+ codeStream.generateInlinedValue(i);
+ expr.generateCode(currentScope, codeStream, true);
+ codeStream.arrayAtPut(elementsTypeID, false);
+ }
+ break;
+ case T_float :
+ case T_double :
+ double constantValue = expr.constant.doubleValue();
+ if (constantValue == -0.0 || constantValue != 0) {
+ codeStream.dup();
+ codeStream.generateInlinedValue(i);
+ expr.generateCode(currentScope, codeStream, true);
+ codeStream.arrayAtPut(elementsTypeID, false);
+ }
+ break;
+ case T_boolean :
+ if (expr.constant.booleanValue() != false) {
+ codeStream.dup();
+ codeStream.generateInlinedValue(i);
+ expr.generateCode(currentScope, codeStream, true);
+ codeStream.arrayAtPut(elementsTypeID, false);
+ }
+ break;
+ default :
+ if (!(expr instanceof NullLiteral)) {
+ codeStream.dup();
+ codeStream.generateInlinedValue(i);
+ expr.generateCode(currentScope, codeStream, true);
+ codeStream.arrayAtPut(elementsTypeID, false);
+ }
+ }
+ } else if (!(expr instanceof NullLiteral)) {
+ codeStream.dup();
+ codeStream.generateInlinedValue(i);
+ expr.generateCode(currentScope, codeStream, true);
+ codeStream.arrayAtPut(elementsTypeID, false);
+ }
+ }
+ }
+ if (!valueRequired) {
+ codeStream.pop();
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+
+ public StringBuffer printExpression(int indent, StringBuffer output) {
+
+ output.append('{');
+ if (expressions != null) {
+ int j = 20 ;
+ for (int i = 0 ; i < expressions.length ; i++) {
+ if (i > 0) output.append(", "); //$NON-NLS-1$
+ expressions[i].printExpression(0, output);
+ j -- ;
+ if (j == 0) {
+ output.append('\n');
+ printIndent(indent+1, output);
+ j = 20;
+ }
+ }
+ }
+ return output.append('}');
+ }
+
+ public TypeBinding resolveTypeExpecting(BlockScope scope, TypeBinding expectedTb) {
+ // Array initializers can only occur on the right hand side of an assignment
+ // expression, therefore the expected type contains the valid information
+ // concerning the type that must be enforced by the elements of the array initializer.
+
+ // this method is recursive... (the test on isArrayType is the stop case)
+
+ constant = NotAConstant;
+ if (expectedTb.isArrayType()) {
+ binding = (ArrayBinding) expectedTb;
+ if (expressions == null)
+ return binding;
+ TypeBinding expectedElementsTb = binding.elementsType();
+ if (expectedElementsTb.isBaseType()) {
+ for (int i = 0, length = expressions.length; i < length; i++) {
+ Expression expression = expressions[i];
+ TypeBinding expressionTb =
+ (expression instanceof ArrayInitializer)
+ ? expression.resolveTypeExpecting(scope, expectedElementsTb)
+ : expression.resolveType(scope);
+ if (expressionTb == null)
+ return null;
+
+ // Compile-time conversion required?
+ if (expression.isConstantValueOfTypeAssignableToType(expressionTb, expectedElementsTb)) {
+ expression.computeConversion(scope, expectedElementsTb, expressionTb);
+ } else if (BaseTypeBinding.isWidening(expectedElementsTb.id, expressionTb.id)) {
+ expression.computeConversion(scope, expectedElementsTb, expressionTb);
+ } else {
+ scope.problemReporter().typeMismatchError(expressionTb, expectedElementsTb, expression);
+ return null;
+ }
+ }
+ } else {
+ for (int i = 0, length = expressions.length; i < length; i++)
+ if (expressions[i].resolveTypeExpecting(scope, expectedElementsTb) == null)
+ return null;
+ }
+ return binding;
+ }
+
+ // infer initializer type for error reporting based on first element
+ TypeBinding leafElementType = null;
+ int dim = 1;
+ if (expressions == null) {
+ leafElementType = scope.getJavaLangObject();
+ } else {
+ Expression currentExpression = expressions[0];
+ while(currentExpression != null && currentExpression instanceof ArrayInitializer) {
+ dim++;
+ Expression[] subExprs = ((ArrayInitializer) currentExpression).expressions;
+ if (subExprs == null){
+ leafElementType = scope.getJavaLangObject();
+ currentExpression = null;
+ break;
+ }
+ currentExpression = ((ArrayInitializer) currentExpression).expressions[0];
+ }
+ if (currentExpression != null) {
+ leafElementType = currentExpression.resolveType(scope);
+ }
+ }
+ if (leafElementType != null) {
+ TypeBinding probableTb = scope.createArrayType(leafElementType, dim);
+ scope.problemReporter().typeMismatchError(probableTb, expectedTb, this);
+ }
+ return null;
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+
+ if (visitor.visit(this, scope)) {
+ if (expressions != null) {
+ int expressionsLength = expressions.length;
+ for (int i = 0; i < expressionsLength; i++)
+ expressions[i].traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ArrayQualifiedTypeReference.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ArrayQualifiedTypeReference.js
new file mode 100644
index 0000000..8b676fd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ArrayQualifiedTypeReference.js
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+import org.eclipse.wst.jsdt.internal.compiler.problem.AbortCompilation;
+
+public class ArrayQualifiedTypeReference extends QualifiedTypeReference {
+ int dimensions;
+
+ public ArrayQualifiedTypeReference(char[][] sources , int dim, long[] poss) {
+
+ super( sources , poss);
+ dimensions = dim ;
+ }
+
+ public int dimensions() {
+
+ return dimensions;
+ }
+
+ /**
+ * @return char[][]
+ */
+ public char [][] getParameterizedTypeName(){
+ int dim = this.dimensions;
+ char[] dimChars = new char[dim*2];
+ for (int i = 0; i < dim; i++) {
+ int index = i*2;
+ dimChars[index] = '[';
+ dimChars[index+1] = ']';
+ }
+ int length = this.tokens.length;
+ char[][] qParamName = new char[length][];
+ System.arraycopy(this.tokens, 0, qParamName, 0, length-1);
+ qParamName[length-1] = CharOperation.concat(this.tokens[length-1], dimChars);
+ return qParamName;
+ }
+
+ protected TypeBinding getTypeBinding(Scope scope) {
+
+ if (this.resolvedType != null)
+ return this.resolvedType;
+ if (dimensions > 255) {
+ scope.problemReporter().tooManyDimensions(this);
+ }
+ try {
+ TypeBinding leafComponentType = scope.getType(this.tokens, this.tokens.length);
+ return scope.createArrayType(leafComponentType, dimensions);
+ } catch (AbortCompilation e) {
+ e.updateContext(this, scope.referenceCompilationUnit().compilationResult);
+ throw e;
+ }
+ }
+
+ public StringBuffer printExpression(int indent, StringBuffer output){
+
+ super.printExpression(indent, output);
+ for (int i = 0 ; i < dimensions ; i++) {
+ output.append("[]"); //$NON-NLS-1$
+ }
+ return output;
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+
+ visitor.visit(this, scope);
+ visitor.endVisit(this, scope);
+ }
+
+ public void traverse(ASTVisitor visitor, ClassScope scope) {
+
+ visitor.visit(this, scope);
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ArrayReference.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ArrayReference.js
new file mode 100644
index 0000000..dd73960
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ArrayReference.js
@@ -0,0 +1,213 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class ArrayReference extends Reference {
+
+ public Expression receiver;
+ public Expression position;
+
+ public ArrayReference(Expression rec, Expression pos) {
+ this.receiver = rec;
+ this.position = pos;
+ sourceStart = rec.sourceStart;
+ }
+
+ public FlowInfo analyseAssignment(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo,
+ Assignment assignment,
+ boolean compoundAssignment) {
+
+ if (assignment.expression == null) {
+ return analyseCode(currentScope, flowContext, flowInfo).unconditionalInits();
+ }
+ return assignment
+ .expression
+ .analyseCode(
+ currentScope,
+ flowContext,
+ analyseCode(currentScope, flowContext, flowInfo).unconditionalInits())
+ .unconditionalInits();
+ }
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ return position.analyseCode(
+ currentScope,
+ flowContext,
+ receiver.analyseCode(currentScope, flowContext, flowInfo));
+ }
+
+ public void generateAssignment(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ Assignment assignment,
+ boolean valueRequired) {
+
+ receiver.generateCode(currentScope, codeStream, true);
+ if (receiver instanceof CastExpression // ((type[])null)[0]
+ && ((CastExpression)receiver).innermostCastedExpression().resolvedType == NullBinding){
+ codeStream.checkcast(receiver.resolvedType);
+ }
+ position.generateCode(currentScope, codeStream, true);
+ assignment.expression.generateCode(currentScope, codeStream, true);
+ codeStream.arrayAtPut(this.resolvedType.id, valueRequired);
+ if (valueRequired) {
+ codeStream.generateImplicitConversion(assignment.implicitConversion);
+ }
+ }
+
+ /**
+ * Code generation for a array reference
+ */
+ public void generateCode(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ boolean valueRequired) {
+
+ int pc = codeStream.position;
+ receiver.generateCode(currentScope, codeStream, true);
+ if (receiver instanceof CastExpression // ((type[])null)[0]
+ && ((CastExpression)receiver).innermostCastedExpression().resolvedType == NullBinding){
+ codeStream.checkcast(receiver.resolvedType);
+ }
+ position.generateCode(currentScope, codeStream, true);
+ codeStream.arrayAt(this.resolvedType.id);
+ // Generating code for the potential runtime type checking
+ if (valueRequired) {
+ codeStream.generateImplicitConversion(implicitConversion);
+ } else {
+ if (this.resolvedType == LongBinding
+ || this.resolvedType == DoubleBinding) {
+ codeStream.pop2();
+ } else {
+ codeStream.pop();
+ }
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+
+ public void generateCompoundAssignment(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ Expression expression,
+ int operator,
+ int assignmentImplicitConversion,
+ boolean valueRequired) {
+
+ receiver.generateCode(currentScope, codeStream, true);
+ if (receiver instanceof CastExpression // ((type[])null)[0]
+ && ((CastExpression)receiver).innermostCastedExpression().resolvedType == NullBinding){
+ codeStream.checkcast(receiver.resolvedType);
+ }
+ position.generateCode(currentScope, codeStream, true);
+ codeStream.dup2();
+ codeStream.arrayAt(this.resolvedType.id);
+ int operationTypeID;
+ if ((operationTypeID = implicitConversion >> 4) == T_String) {
+ codeStream.generateStringConcatenationAppend(currentScope, null, expression);
+ } else {
+ // promote the array reference to the suitable operation type
+ codeStream.generateImplicitConversion(implicitConversion);
+ // generate the increment value (will by itself be promoted to the operation value)
+ if (expression == IntLiteral.One) { // prefix operation
+ codeStream.generateConstant(expression.constant, implicitConversion);
+ } else {
+ expression.generateCode(currentScope, codeStream, true);
+ }
+ // perform the operation
+ codeStream.sendOperator(operator, operationTypeID);
+ // cast the value back to the array reference type
+ codeStream.generateImplicitConversion(assignmentImplicitConversion);
+ }
+ codeStream.arrayAtPut(this.resolvedType.id, valueRequired);
+ }
+
+ public void generatePostIncrement(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ CompoundAssignment postIncrement,
+ boolean valueRequired) {
+
+ receiver.generateCode(currentScope, codeStream, true);
+ if (receiver instanceof CastExpression // ((type[])null)[0]
+ && ((CastExpression)receiver).innermostCastedExpression().resolvedType == NullBinding){
+ codeStream.checkcast(receiver.resolvedType);
+ }
+ position.generateCode(currentScope, codeStream, true);
+ codeStream.dup2();
+ codeStream.arrayAt(this.resolvedType.id);
+ if (valueRequired) {
+ if ((this.resolvedType == LongBinding)
+ || (this.resolvedType == DoubleBinding)) {
+ codeStream.dup2_x2();
+ } else {
+ codeStream.dup_x2();
+ }
+ }
+ codeStream.generateConstant(
+ postIncrement.expression.constant,
+ implicitConversion);
+ codeStream.sendOperator(postIncrement.operator, this.resolvedType.id);
+ codeStream.generateImplicitConversion(
+ postIncrement.assignmentImplicitConversion);
+ codeStream.arrayAtPut(this.resolvedType.id, false);
+ }
+
+ public StringBuffer printExpression(int indent, StringBuffer output) {
+
+ receiver.printExpression(0, output).append('[');
+ return position.printExpression(0, output).append(']');
+ }
+
+ public TypeBinding resolveType(BlockScope scope) {
+
+ constant = Constant.NotAConstant;
+ if (receiver instanceof CastExpression // no cast check for ((type[])null)[0]
+ && ((CastExpression)receiver).innermostCastedExpression() instanceof NullLiteral) {
+ this.receiver.bits |= IgnoreNeedForCastCheckMASK; // will check later on
+ }
+ TypeBinding arrayType = receiver.resolveType(scope);
+ if (arrayType != null) {
+ receiver.computeConversion(scope, arrayType, arrayType);
+ if (arrayType.isArrayType()) {
+ this.resolvedType = ((ArrayBinding) arrayType).elementsType();
+ } else {
+ scope.problemReporter().referenceMustBeArrayTypeAt(arrayType, this);
+ }
+ }
+ TypeBinding positionType = position.resolveTypeExpecting(scope, IntBinding);
+ if (positionType != null) {
+ position.computeConversion(scope, IntBinding, positionType);
+ }
+ return this.resolvedType;
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+
+ if (visitor.visit(this, scope)) {
+ receiver.traverse(visitor, scope);
+ position.traverse(visitor, scope);
+ }
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ArrayTypeReference.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ArrayTypeReference.js
new file mode 100644
index 0000000..aece1cc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ArrayTypeReference.js
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.Scope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding;
+
+public class ArrayTypeReference extends SingleTypeReference {
+ public int dimensions;
+
+ /**
+ * ArrayTypeReference constructor comment.
+ * @param source char[]
+ * @param dimensions int
+ * @param pos int
+ */
+ public ArrayTypeReference(char[] source, int dimensions, long pos) {
+
+ super(source, pos);
+ this.dimensions = dimensions ;
+ }
+
+ public int dimensions() {
+
+ return dimensions;
+ }
+ /**
+ * @return char[][]
+ */
+ public char [][] getParameterizedTypeName(){
+ int dim = this.dimensions;
+ char[] dimChars = new char[dim*2];
+ for (int i = 0; i < dim; i++) {
+ int index = i*2;
+ dimChars[index] = '[';
+ dimChars[index+1] = ']';
+ }
+ return new char[][]{ CharOperation.concat(token, dimChars) };
+ }
+ protected TypeBinding getTypeBinding(Scope scope) {
+
+ if (this.resolvedType != null) return this.resolvedType;
+ if (dimensions > 255) {
+ scope.problemReporter().tooManyDimensions(this);
+ }
+ TypeBinding leafComponentType = scope.getType(token);
+ return scope.createArrayType(leafComponentType, dimensions);
+
+ }
+
+ public StringBuffer printExpression(int indent, StringBuffer output){
+
+ super.printExpression(indent, output) ;
+ for (int i= 0 ; i < dimensions ; i++) {
+ output.append("[]"); //$NON-NLS-1$
+ }
+ return output;
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+
+ visitor.visit(this, scope);
+ visitor.endVisit(this, scope);
+ }
+
+ public void traverse(ASTVisitor visitor, ClassScope scope) {
+
+ visitor.visit(this, scope);
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AssertStatement.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AssertStatement.js
new file mode 100644
index 0000000..c761a24
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AssertStatement.js
@@ -0,0 +1,198 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.impl.Constant;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+
+public class AssertStatement extends Statement {
+
+ public Expression assertExpression, exceptionArgument;
+
+ // for local variable attribute
+ int preAssertInitStateIndex = -1;
+ private FieldBinding assertionSyntheticFieldBinding;
+
+ public AssertStatement(
+ Expression exceptionArgument,
+ Expression assertExpression,
+ int startPosition) {
+
+ this.assertExpression = assertExpression;
+ this.exceptionArgument = exceptionArgument;
+ sourceStart = startPosition;
+ sourceEnd = exceptionArgument.sourceEnd;
+ }
+
+ public AssertStatement(Expression assertExpression, int startPosition) {
+
+ this.assertExpression = assertExpression;
+ sourceStart = startPosition;
+ sourceEnd = assertExpression.sourceEnd;
+ }
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ preAssertInitStateIndex = currentScope.methodScope().recordInitializationStates(flowInfo);
+
+ Constant cst = this.assertExpression.optimizedBooleanConstant();
+ boolean isOptimizedTrueAssertion = cst != NotAConstant && cst.booleanValue() == true;
+ boolean isOptimizedFalseAssertion = cst != NotAConstant && cst.booleanValue() == false;
+
+ FlowInfo assertInfo = flowInfo.copy();
+ if (isOptimizedTrueAssertion) {
+ assertInfo.setReachMode(FlowInfo.UNREACHABLE);
+ }
+ assertInfo = assertExpression.analyseCode(currentScope, flowContext, assertInfo).unconditionalInits();
+
+ if (exceptionArgument != null) {
+ // only gets evaluated when escaping - results are not taken into account
+ FlowInfo exceptionInfo = exceptionArgument.analyseCode(currentScope, flowContext, assertInfo.copy());
+
+ if (!isOptimizedTrueAssertion){
+ flowContext.checkExceptionHandlers(
+ currentScope.getJavaLangAssertionError(),
+ this,
+ exceptionInfo,
+ currentScope);
+ }
+ }
+
+ if (!isOptimizedTrueAssertion){
+ // add the assert support in the clinit
+ manageSyntheticAccessIfNecessary(currentScope, flowInfo);
+ }
+ if (isOptimizedFalseAssertion) {
+ return flowInfo; // if assertions are enabled, the following code will be unreachable
+ } else {
+ return flowInfo.mergedWith(assertInfo.unconditionalInits());
+ }
+ }
+
+ public void generateCode(BlockScope currentScope, CodeStream codeStream) {
+
+ if ((bits & IsReachableMASK) == 0) {
+ return;
+ }
+ int pc = codeStream.position;
+
+ if (this.assertionSyntheticFieldBinding != null) {
+ Label assertionActivationLabel = new Label(codeStream);
+ codeStream.getstatic(this.assertionSyntheticFieldBinding);
+ codeStream.ifne(assertionActivationLabel);
+
+ Label falseLabel = new Label(codeStream);
+ this.assertExpression.generateOptimizedBoolean(currentScope, codeStream, (falseLabel = new Label(codeStream)), null , true);
+ codeStream.newJavaLangAssertionError();
+ codeStream.dup();
+ if (exceptionArgument != null) {
+ exceptionArgument.generateCode(currentScope, codeStream, true);
+ codeStream.invokeJavaLangAssertionErrorConstructor(exceptionArgument.implicitConversion & 0xF);
+ } else {
+ codeStream.invokeJavaLangAssertionErrorDefaultConstructor();
+ }
+ codeStream.athrow();
+ falseLabel.place();
+ assertionActivationLabel.place();
+ }
+
+ // May loose some local variable initializations : affecting the local variable attributes
+ if (preAssertInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(currentScope, preAssertInitStateIndex);
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+
+ public void resolve(BlockScope scope) {
+
+ assertExpression.resolveTypeExpecting(scope, BooleanBinding);
+ if (exceptionArgument != null) {
+ TypeBinding exceptionArgumentType = exceptionArgument.resolveType(scope);
+ if (exceptionArgumentType != null){
+ int id = exceptionArgumentType.id;
+ switch(id) {
+ case T_void :
+ scope.problemReporter().illegalVoidExpression(exceptionArgument);
+ default:
+ id = T_Object;
+ case T_boolean :
+ case T_byte :
+ case T_char :
+ case T_short :
+ case T_double :
+ case T_float :
+ case T_int :
+ case T_long :
+ case T_String :
+ exceptionArgument.implicitConversion = (id << 4) + id;
+ }
+ }
+ }
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+
+ if (visitor.visit(this, scope)) {
+ assertExpression.traverse(visitor, scope);
+ if (exceptionArgument != null) {
+ exceptionArgument.traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, scope);
+ }
+
+ public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo) {
+
+ if (!flowInfo.isReachable()) return;
+
+ // need assertion flag: $assertionsDisabled on outer most source clas
+ // (in case of static member of interface, will use the outermost static member - bug 22334)
+ SourceTypeBinding outerMostClass = currentScope.enclosingSourceType();
+ while (outerMostClass.isLocalType()){
+ ReferenceBinding enclosing = outerMostClass.enclosingType();
+ if (enclosing == null || enclosing.isInterface()) break;
+ outerMostClass = (SourceTypeBinding) enclosing;
+ }
+
+ this.assertionSyntheticFieldBinding = outerMostClass.addSyntheticField(this, currentScope);
+
+ // find <clinit> and enable assertion support
+ TypeDeclaration typeDeclaration = outerMostClass.scope.referenceType();
+ AbstractMethodDeclaration[] methods = typeDeclaration.methods;
+ for (int i = 0, max = methods.length; i < max; i++) {
+ AbstractMethodDeclaration method = methods[i];
+ if (method.isClinit()) {
+ ((Clinit) method).setAssertionSupport(assertionSyntheticFieldBinding, currentScope.environment().options.sourceLevel < ClassFileConstants.JDK1_5);
+ break;
+ }
+ }
+ }
+
+ public StringBuffer printStatement(int tab, StringBuffer output) {
+
+ printIndent(tab, output);
+ output.append("assert "); //$NON-NLS-1$
+ this.assertExpression.printExpression(0, output);
+ if (this.exceptionArgument != null) {
+ output.append(": "); //$NON-NLS-1$
+ this.exceptionArgument.printExpression(0, output);
+ }
+ return output.append(';');
+ }
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Assignment.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Assignment.js
new file mode 100644
index 0000000..21cb020
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Assignment.js
@@ -0,0 +1,204 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * Genady Beriozkin - added support for reporting assignment with no effect
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class Assignment extends Expression {
+
+ public Expression lhs;
+ public Expression expression;
+
+ public Assignment(Expression lhs, Expression expression, int sourceEnd) {
+ //lhs is always a reference by construction ,
+ //but is build as an expression ==> the checkcast cannot fail
+
+ this.lhs = lhs;
+ lhs.bits |= IsStrictlyAssignedMASK; // tag lhs as assigned
+
+ this.expression = expression;
+
+ this.sourceStart = lhs.sourceStart;
+ this.sourceEnd = sourceEnd;
+ }
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+ // record setting a variable: various scenarii are possible, setting an array reference,
+ // a field reference, a blank final field reference, a field of an enclosing instance or
+ // just a local variable.
+
+ return ((Reference) lhs)
+ .analyseAssignment(currentScope, flowContext, flowInfo, this, false)
+ .unconditionalInits();
+ }
+
+ void checkAssignmentEffect(BlockScope scope) {
+
+ Binding left = getDirectBinding(this.lhs);
+ if (left != null && left == getDirectBinding(this.expression)) {
+ scope.problemReporter().assignmentHasNoEffect(this, left.shortReadableName());
+ this.bits |= IsAssignmentWithNoEffectMASK; // record assignment has no effect
+ }
+ }
+
+ void checkAssignment(BlockScope scope, TypeBinding lhsType, TypeBinding rhsType) {
+
+ FieldBinding leftField = getLastField(this.lhs);
+ if (leftField != null && rhsType != NullBinding && lhsType.isWildcard() && ((WildcardBinding)lhsType).kind != Wildcard.SUPER) {
+ scope.problemReporter().wildcardAssignment(lhsType, rhsType, this.expression);
+ } else if (leftField != null && leftField.declaringClass != null /*length pseudo field*/&& leftField.declaringClass.isRawType()
+ && (rhsType.isParameterizedType() || rhsType.isGenericType())) {
+ scope.problemReporter().unsafeRawFieldAssignment(leftField, rhsType, this.lhs);
+ } else if (rhsType.isRawType() && (lhsType.isBoundParameterizedType() || lhsType.isGenericType())) {
+ scope.problemReporter().unsafeRawConversion(this.expression, rhsType, lhsType);
+ }
+ }
+
+ public void generateCode(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ boolean valueRequired) {
+
+ // various scenarii are possible, setting an array reference,
+ // a field reference, a blank final field reference, a field of an enclosing instance or
+ // just a local variable.
+
+ int pc = codeStream.position;
+ if ((this.bits & IsAssignmentWithNoEffectMASK) != 0) {
+ if (valueRequired) {
+ this.expression.generateCode(currentScope, codeStream, true);
+ }
+ } else {
+ ((Reference) lhs).generateAssignment(currentScope, codeStream, this, valueRequired);
+ // variable may have been optimized out
+ // the lhs is responsible to perform the implicitConversion generation for the assignment since optimized for unused local assignment.
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+
+ Binding getDirectBinding(Expression someExpression) {
+ if (someExpression instanceof SingleNameReference) {
+ return ((SingleNameReference)someExpression).binding;
+ } else if (someExpression instanceof FieldReference) {
+ FieldReference fieldRef = (FieldReference)someExpression;
+ if (fieldRef.receiver.isThis() && !(fieldRef.receiver instanceof QualifiedThisReference)) {
+ return fieldRef.binding;
+ }
+ }
+ return null;
+ }
+ FieldBinding getLastField(Expression someExpression) {
+ if (someExpression instanceof SingleNameReference) {
+ if ((someExpression.bits & RestrictiveFlagMASK) == BindingIds.FIELD) {
+ return (FieldBinding) ((SingleNameReference)someExpression).binding;
+ }
+ } else if (someExpression instanceof FieldReference) {
+ return ((FieldReference)someExpression).binding;
+ } else if (someExpression instanceof QualifiedNameReference) {
+ QualifiedNameReference qName = (QualifiedNameReference) someExpression;
+ if (qName.otherBindings == null && ((someExpression.bits & RestrictiveFlagMASK) == BindingIds.FIELD)) {
+ return (FieldBinding)qName.binding;
+ } else {
+ return qName.otherBindings[qName.otherBindings.length - 1];
+ }
+ }
+ return null;
+ }
+ public StringBuffer print(int indent, StringBuffer output) {
+
+ //no () when used as a statement
+ printIndent(indent, output);
+ return printExpressionNoParenthesis(indent, output);
+ }
+ public StringBuffer printExpression(int indent, StringBuffer output) {
+
+ //subclass redefine printExpressionNoParenthesis()
+ output.append('(');
+ return printExpressionNoParenthesis(0, output).append(')');
+ }
+
+ public StringBuffer printExpressionNoParenthesis(int indent, StringBuffer output) {
+
+ lhs.printExpression(indent, output).append(" = "); //$NON-NLS-1$
+ return expression.printExpression(0, output);
+ }
+
+ public StringBuffer printStatement(int indent, StringBuffer output) {
+
+ //no () when used as a statement
+ return print(indent, output).append(';');
+ }
+
+ public TypeBinding resolveType(BlockScope scope) {
+
+ // due to syntax lhs may be only a NameReference, a FieldReference or an ArrayReference
+ constant = NotAConstant;
+ if (!(this.lhs instanceof Reference) || this.lhs.isThis()) {
+ scope.problemReporter().expressionShouldBeAVariable(this.lhs);
+ return null;
+ }
+ TypeBinding lhsType = this.resolvedType = lhs.resolveType(scope);
+ expression.setExpectedType(lhsType); // needed in case of generic method invocation
+ TypeBinding rhsType = expression.resolveType(scope);
+ if (lhsType == null || rhsType == null) {
+ return null;
+ }
+ checkAssignmentEffect(scope);
+
+ // Compile-time conversion of base-types : implicit narrowing integer into byte/short/character
+ // may require to widen the rhs expression at runtime
+ if ((expression.isConstantValueOfTypeAssignableToType(rhsType, lhsType)
+ || (lhsType.isBaseType() && BaseTypeBinding.isWidening(lhsType.id, rhsType.id)))
+ || rhsType.isCompatibleWith(lhsType)) {
+ expression.computeConversion(scope, lhsType, rhsType);
+ checkAssignment(scope, lhsType, rhsType);
+ return this.resolvedType;
+ }
+ scope.problemReporter().typeMismatchError(rhsType, lhsType, expression);
+ return lhsType;
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.Expression#resolveTypeExpecting(org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope, org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding)
+ */
+ public TypeBinding resolveTypeExpecting(
+ BlockScope scope,
+ TypeBinding expectedType) {
+
+ TypeBinding type = super.resolveTypeExpecting(scope, expectedType);
+ if (type == null) return null;
+ TypeBinding lhsType = this.resolvedType;
+ TypeBinding rhsType = this.expression.resolvedType;
+ // signal possible accidental boolean assignment (instead of using '==' operator)
+ if (expectedType == BooleanBinding
+ && lhsType == BooleanBinding
+ && (this.lhs.bits & IsStrictlyAssignedMASK) != 0) {
+ scope.problemReporter().possibleAccidentalBooleanAssignment(this);
+ }
+ checkAssignment(scope, lhsType, rhsType);
+ return type;
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+
+ if (visitor.visit(this, scope)) {
+ lhs.traverse(visitor, scope);
+ expression.traverse(visitor, scope);
+ }
+ visitor.endVisit(this, scope);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/BinaryExpression.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/BinaryExpression.js
new file mode 100644
index 0000000..37ba3ad
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/BinaryExpression.js
@@ -0,0 +1,1764 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class BinaryExpression extends OperatorExpression {
+
+ public Expression left, right;
+ public Constant optimizedBooleanConstant;
+
+ public BinaryExpression(Expression left, Expression right, int operator) {
+
+ this.left = left;
+ this.right = right;
+ this.bits |= operator << OperatorSHIFT; // encode operator
+ this.sourceStart = left.sourceStart;
+ this.sourceEnd = right.sourceEnd;
+ }
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ return right
+ .analyseCode(
+ currentScope,
+ flowContext,
+ left.analyseCode(currentScope, flowContext, flowInfo).unconditionalInits())
+ .unconditionalInits();
+ }
+
+ public void computeConstant(BlockScope scope, int leftId, int rightId) {
+
+ //compute the constant when valid
+ if ((this.left.constant != Constant.NotAConstant)
+ && (this.right.constant != Constant.NotAConstant)) {
+ try {
+ this.constant =
+ Constant.computeConstantOperation(
+ this.left.constant,
+ leftId,
+ (this.bits & OperatorMASK) >> OperatorSHIFT,
+ this.right.constant,
+ rightId);
+ } catch (ArithmeticException e) {
+ this.constant = Constant.NotAConstant;
+ // 1.2 no longer throws an exception at compile-time
+ //scope.problemReporter().compileTimeConstantThrowsArithmeticException(this);
+ }
+ } else {
+ this.constant = Constant.NotAConstant;
+ //add some work for the boolean operators & |
+ this.optimizedBooleanConstant(
+ leftId,
+ (this.bits & OperatorMASK) >> OperatorSHIFT,
+ rightId);
+ }
+ }
+
+ public Constant optimizedBooleanConstant() {
+
+ return this.optimizedBooleanConstant == null ? this.constant : this.optimizedBooleanConstant;
+ }
+
+ /**
+ * Code generation for a binary operation
+ */
+ public void generateCode(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ boolean valueRequired) {
+
+ int pc = codeStream.position;
+ Label falseLabel, endLabel;
+ if (constant != Constant.NotAConstant) {
+ if (valueRequired)
+ codeStream.generateConstant(constant, implicitConversion);
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ return;
+ }
+ bits |= OnlyValueRequiredMASK;
+ switch ((bits & OperatorMASK) >> OperatorSHIFT) {
+ case PLUS :
+ switch (bits & ReturnTypeIDMASK) {
+ case T_String :
+ codeStream.generateStringConcatenationAppend(currentScope, left, right);
+ if (!valueRequired)
+ codeStream.pop();
+ break;
+ case T_int :
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired)
+ codeStream.iadd();
+ break;
+ case T_long :
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired)
+ codeStream.ladd();
+ break;
+ case T_double :
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired)
+ codeStream.dadd();
+ break;
+ case T_float :
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired)
+ codeStream.fadd();
+ break;
+ }
+ break;
+ case MINUS :
+ switch (bits & ReturnTypeIDMASK) {
+ case T_int :
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired)
+ codeStream.isub();
+ break;
+ case T_long :
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired)
+ codeStream.lsub();
+ break;
+ case T_double :
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired)
+ codeStream.dsub();
+ break;
+ case T_float :
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired)
+ codeStream.fsub();
+ break;
+ }
+ break;
+ case MULTIPLY :
+ switch (bits & ReturnTypeIDMASK) {
+ case T_int :
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired)
+ codeStream.imul();
+ break;
+ case T_long :
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired)
+ codeStream.lmul();
+ break;
+ case T_double :
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired)
+ codeStream.dmul();
+ break;
+ case T_float :
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired)
+ codeStream.fmul();
+ break;
+ }
+ break;
+ case DIVIDE :
+ switch (bits & ReturnTypeIDMASK) {
+ case T_int :
+ left.generateCode(currentScope, codeStream, true);
+ right.generateCode(currentScope, codeStream, true);
+ codeStream.idiv();
+ if (!valueRequired)
+ codeStream.pop();
+ break;
+ case T_long :
+ left.generateCode(currentScope, codeStream, true);
+ right.generateCode(currentScope, codeStream, true);
+ codeStream.ldiv();
+ if (!valueRequired)
+ codeStream.pop2();
+ break;
+ case T_double :
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired)
+ codeStream.ddiv();
+ break;
+ case T_float :
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired)
+ codeStream.fdiv();
+ break;
+ }
+ break;
+ case REMAINDER :
+ switch (bits & ReturnTypeIDMASK) {
+ case T_int :
+ left.generateCode(currentScope, codeStream, true);
+ right.generateCode(currentScope, codeStream, true);
+ codeStream.irem();
+ if (!valueRequired)
+ codeStream.pop();
+ break;
+ case T_long :
+ left.generateCode(currentScope, codeStream, true);
+ right.generateCode(currentScope, codeStream, true);
+ codeStream.lrem();
+ if (!valueRequired)
+ codeStream.pop2();
+ break;
+ case T_double :
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired)
+ codeStream.drem();
+ break;
+ case T_float :
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired)
+ codeStream.frem();
+ break;
+ }
+ break;
+ case AND :
+ switch (bits & ReturnTypeIDMASK) {
+ case T_int :
+ // 0 & x
+ if ((left.constant != Constant.NotAConstant)
+ && (left.constant.typeID() == T_int)
+ && (left.constant.intValue() == 0)) {
+ right.generateCode(currentScope, codeStream, false);
+ if (valueRequired)
+ codeStream.iconst_0();
+ } else {
+ // x & 0
+ if ((right.constant != Constant.NotAConstant)
+ && (right.constant.typeID() == T_int)
+ && (right.constant.intValue() == 0)) {
+ left.generateCode(currentScope, codeStream, false);
+ if (valueRequired)
+ codeStream.iconst_0();
+ } else {
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired)
+ codeStream.iand();
+ }
+ }
+ break;
+ case T_long :
+ // 0 & x
+ if ((left.constant != Constant.NotAConstant)
+ && (left.constant.typeID() == T_long)
+ && (left.constant.longValue() == 0L)) {
+ right.generateCode(currentScope, codeStream, false);
+ if (valueRequired)
+ codeStream.lconst_0();
+ } else {
+ // x & 0
+ if ((right.constant != Constant.NotAConstant)
+ && (right.constant.typeID() == T_long)
+ && (right.constant.longValue() == 0L)) {
+ left.generateCode(currentScope, codeStream, false);
+ if (valueRequired)
+ codeStream.lconst_0();
+ } else {
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired)
+ codeStream.land();
+ }
+ }
+ break;
+ case T_boolean : // logical and
+ generateOptimizedLogicalAnd(
+ currentScope,
+ codeStream,
+ null,
+ (falseLabel = new Label(codeStream)),
+ valueRequired);
+ /* improving code gen for such a case: boolean b = i < 0 && false;
+ * since the label has never been used, we have the inlined value on the stack. */
+ if (falseLabel.hasForwardReferences()) {
+ if (valueRequired) {
+ codeStream.iconst_1();
+ if ((bits & ValueForReturnMASK) != 0) {
+ codeStream.ireturn();
+ falseLabel.place();
+ codeStream.iconst_0();
+ } else {
+ codeStream.goto_(endLabel = new Label(codeStream));
+ codeStream.decrStackSize(1);
+ falseLabel.place();
+ codeStream.iconst_0();
+ endLabel.place();
+ }
+ } else {
+ falseLabel.place();
+ }
+ }
+ }
+ break;
+ case OR :
+ switch (bits & ReturnTypeIDMASK) {
+ case T_int :
+ // 0 | x
+ if ((left.constant != Constant.NotAConstant)
+ && (left.constant.typeID() == T_int)
+ && (left.constant.intValue() == 0)) {
+ right.generateCode(currentScope, codeStream, valueRequired);
+ } else {
+ // x | 0
+ if ((right.constant != Constant.NotAConstant)
+ && (right.constant.typeID() == T_int)
+ && (right.constant.intValue() == 0)) {
+ left.generateCode(currentScope, codeStream, valueRequired);
+ } else {
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired)
+ codeStream.ior();
+ }
+ }
+ break;
+ case T_long :
+ // 0 | x
+ if ((left.constant != Constant.NotAConstant)
+ && (left.constant.typeID() == T_long)
+ && (left.constant.longValue() == 0L)) {
+ right.generateCode(currentScope, codeStream, valueRequired);
+ } else {
+ // x | 0
+ if ((right.constant != Constant.NotAConstant)
+ && (right.constant.typeID() == T_long)
+ && (right.constant.longValue() == 0L)) {
+ left.generateCode(currentScope, codeStream, valueRequired);
+ } else {
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired)
+ codeStream.lor();
+ }
+ }
+ break;
+ case T_boolean : // logical or
+ generateOptimizedLogicalOr(
+ currentScope,
+ codeStream,
+ null,
+ (falseLabel = new Label(codeStream)),
+ valueRequired);
+ /* improving code gen for such a case: boolean b = i < 0 || true;
+ * since the label has never been used, we have the inlined value on the stack. */
+ if (falseLabel.hasForwardReferences()) {
+ if (valueRequired) {
+ codeStream.iconst_1();
+ if ((bits & ValueForReturnMASK) != 0) {
+ codeStream.ireturn();
+ falseLabel.place();
+ codeStream.iconst_0();
+ } else {
+ codeStream.goto_(endLabel = new Label(codeStream));
+ codeStream.decrStackSize(1);
+ falseLabel.place();
+ codeStream.iconst_0();
+ endLabel.place();
+ }
+ } else {
+ falseLabel.place();
+ }
+ }
+ }
+ break;
+ case XOR :
+ switch (bits & ReturnTypeIDMASK) {
+ case T_int :
+ // 0 ^ x
+ if ((left.constant != Constant.NotAConstant)
+ && (left.constant.typeID() == T_int)
+ && (left.constant.intValue() == 0)) {
+ right.generateCode(currentScope, codeStream, valueRequired);
+ } else {
+ // x ^ 0
+ if ((right.constant != Constant.NotAConstant)
+ && (right.constant.typeID() == T_int)
+ && (right.constant.intValue() == 0)) {
+ left.generateCode(currentScope, codeStream, valueRequired);
+ } else {
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired)
+ codeStream.ixor();
+ }
+ }
+ break;
+ case T_long :
+ // 0 ^ x
+ if ((left.constant != Constant.NotAConstant)
+ && (left.constant.typeID() == T_long)
+ && (left.constant.longValue() == 0L)) {
+ right.generateCode(currentScope, codeStream, valueRequired);
+ } else {
+ // x ^ 0
+ if ((right.constant != Constant.NotAConstant)
+ && (right.constant.typeID() == T_long)
+ && (right.constant.longValue() == 0L)) {
+ left.generateCode(currentScope, codeStream, valueRequired);
+ } else {
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired)
+ codeStream.lxor();
+ }
+ }
+ break;
+ case T_boolean :
+ generateOptimizedLogicalXor(
+ currentScope,
+ codeStream,
+ null,
+ (falseLabel = new Label(codeStream)),
+ valueRequired);
+ /* improving code gen for such a case: boolean b = i < 0 ^ bool;
+ * since the label has never been used, we have the inlined value on the stack. */
+ if (falseLabel.hasForwardReferences()) {
+ if (valueRequired) {
+ codeStream.iconst_1();
+ if ((bits & ValueForReturnMASK) != 0) {
+ codeStream.ireturn();
+ falseLabel.place();
+ codeStream.iconst_0();
+ } else {
+ codeStream.goto_(endLabel = new Label(codeStream));
+ codeStream.decrStackSize(1);
+ falseLabel.place();
+ codeStream.iconst_0();
+ endLabel.place();
+ }
+ } else {
+ falseLabel.place();
+ }
+ }
+ }
+ break;
+ case LEFT_SHIFT :
+ switch (bits & ReturnTypeIDMASK) {
+ case T_int :
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired)
+ codeStream.ishl();
+ break;
+ case T_long :
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired)
+ codeStream.lshl();
+ }
+ break;
+ case RIGHT_SHIFT :
+ switch (bits & ReturnTypeIDMASK) {
+ case T_int :
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired)
+ codeStream.ishr();
+ break;
+ case T_long :
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired)
+ codeStream.lshr();
+ }
+ break;
+ case UNSIGNED_RIGHT_SHIFT :
+ switch (bits & ReturnTypeIDMASK) {
+ case T_int :
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired)
+ codeStream.iushr();
+ break;
+ case T_long :
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired)
+ codeStream.lushr();
+ }
+ break;
+ case GREATER :
+ generateOptimizedGreaterThan(
+ currentScope,
+ codeStream,
+ null,
+ (falseLabel = new Label(codeStream)),
+ valueRequired);
+ if (valueRequired) {
+ codeStream.iconst_1();
+ if ((bits & ValueForReturnMASK) != 0) {
+ codeStream.ireturn();
+ falseLabel.place();
+ codeStream.iconst_0();
+ } else {
+ codeStream.goto_(endLabel = new Label(codeStream));
+ codeStream.decrStackSize(1);
+ falseLabel.place();
+ codeStream.iconst_0();
+ endLabel.place();
+ }
+ }
+ break;
+ case GREATER_EQUAL :
+ generateOptimizedGreaterThanOrEqual(
+ currentScope,
+ codeStream,
+ null,
+ (falseLabel = new Label(codeStream)),
+ valueRequired);
+ if (valueRequired) {
+ codeStream.iconst_1();
+ if ((bits & ValueForReturnMASK) != 0) {
+ codeStream.ireturn();
+ falseLabel.place();
+ codeStream.iconst_0();
+ } else {
+ codeStream.goto_(endLabel = new Label(codeStream));
+ codeStream.decrStackSize(1);
+ falseLabel.place();
+ codeStream.iconst_0();
+ endLabel.place();
+ }
+ }
+ break;
+ case LESS :
+ generateOptimizedLessThan(
+ currentScope,
+ codeStream,
+ null,
+ (falseLabel = new Label(codeStream)),
+ valueRequired);
+ if (valueRequired) {
+ codeStream.iconst_1();
+ if ((bits & ValueForReturnMASK) != 0) {
+ codeStream.ireturn();
+ falseLabel.place();
+ codeStream.iconst_0();
+ } else {
+ codeStream.goto_(endLabel = new Label(codeStream));
+ codeStream.decrStackSize(1);
+ falseLabel.place();
+ codeStream.iconst_0();
+ endLabel.place();
+ }
+ }
+ break;
+ case LESS_EQUAL :
+ generateOptimizedLessThanOrEqual(
+ currentScope,
+ codeStream,
+ null,
+ (falseLabel = new Label(codeStream)),
+ valueRequired);
+ if (valueRequired) {
+ codeStream.iconst_1();
+ if ((bits & ValueForReturnMASK) != 0) {
+ codeStream.ireturn();
+ falseLabel.place();
+ codeStream.iconst_0();
+ } else {
+ codeStream.goto_(endLabel = new Label(codeStream));
+ codeStream.decrStackSize(1);
+ falseLabel.place();
+ codeStream.iconst_0();
+ endLabel.place();
+ }
+ }
+ }
+ if (valueRequired) {
+ codeStream.generateImplicitConversion(implicitConversion);
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+
+ /**
+ * Boolean operator code generation
+ * Optimized operations are: <, <=, >, >=, &, |, ^
+ */
+ public void generateOptimizedBoolean(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ Label trueLabel,
+ Label falseLabel,
+ boolean valueRequired) {
+
+ if ((constant != Constant.NotAConstant) && (constant.typeID() == T_boolean)) {
+ super.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ trueLabel,
+ falseLabel,
+ valueRequired);
+ return;
+ }
+ switch ((bits & OperatorMASK) >> OperatorSHIFT) {
+ case LESS :
+ generateOptimizedLessThan(
+ currentScope,
+ codeStream,
+ trueLabel,
+ falseLabel,
+ valueRequired);
+ return;
+ case LESS_EQUAL :
+ generateOptimizedLessThanOrEqual(
+ currentScope,
+ codeStream,
+ trueLabel,
+ falseLabel,
+ valueRequired);
+ return;
+ case GREATER :
+ generateOptimizedGreaterThan(
+ currentScope,
+ codeStream,
+ trueLabel,
+ falseLabel,
+ valueRequired);
+ return;
+ case GREATER_EQUAL :
+ generateOptimizedGreaterThanOrEqual(
+ currentScope,
+ codeStream,
+ trueLabel,
+ falseLabel,
+ valueRequired);
+ return;
+ case AND :
+ generateOptimizedLogicalAnd(
+ currentScope,
+ codeStream,
+ trueLabel,
+ falseLabel,
+ valueRequired);
+ return;
+ case OR :
+ generateOptimizedLogicalOr(
+ currentScope,
+ codeStream,
+ trueLabel,
+ falseLabel,
+ valueRequired);
+ return;
+ case XOR :
+ generateOptimizedLogicalXor(
+ currentScope,
+ codeStream,
+ trueLabel,
+ falseLabel,
+ valueRequired);
+ return;
+ }
+ super.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ trueLabel,
+ falseLabel,
+ valueRequired);
+ }
+
+ /**
+ * Boolean generation for >
+ */
+ public void generateOptimizedGreaterThan(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ Label trueLabel,
+ Label falseLabel,
+ boolean valueRequired) {
+
+ int promotedTypeID = left.implicitConversion >> 4;
+ // both sides got promoted in the same way
+ if (promotedTypeID == T_int) {
+ // 0 > x
+ if ((left.constant != NotAConstant) && (left.constant.intValue() == 0)) {
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired) {
+ if (falseLabel == null) {
+ if (trueLabel != null) {
+ // implicitly falling through the FALSE case
+ codeStream.iflt(trueLabel);
+ }
+ } else {
+ if (trueLabel == null) {
+ // implicitly falling through the TRUE case
+ codeStream.ifge(falseLabel);
+ } else {
+ // no implicit fall through TRUE/FALSE --> should never occur
+ }
+ }
+ }
+ // reposition the endPC
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ return;
+ }
+ // x > 0
+ if ((right.constant != NotAConstant) && (right.constant.intValue() == 0)) {
+ left.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired) {
+ if (falseLabel == null) {
+ if (trueLabel != null) {
+ // implicitly falling through the FALSE case
+ codeStream.ifgt(trueLabel);
+ }
+ } else {
+ if (trueLabel == null) {
+ // implicitly falling through the TRUE case
+ codeStream.ifle(falseLabel);
+ } else {
+ // no implicit fall through TRUE/FALSE --> should never occur
+ }
+ }
+ }
+ // reposition the endPC
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ return;
+ }
+ }
+ // default comparison
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired) {
+ if (falseLabel == null) {
+ if (trueLabel != null) {
+ // implicit falling through the FALSE case
+ switch (promotedTypeID) {
+ case T_int :
+ codeStream.if_icmpgt(trueLabel);
+ break;
+ case T_float :
+ codeStream.fcmpl();
+ codeStream.ifgt(trueLabel);
+ break;
+ case T_long :
+ codeStream.lcmp();
+ codeStream.ifgt(trueLabel);
+ break;
+ case T_double :
+ codeStream.dcmpl();
+ codeStream.ifgt(trueLabel);
+ }
+ // reposition the endPC
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ return;
+ }
+ } else {
+ if (trueLabel == null) {
+ // implicit falling through the TRUE case
+ switch (promotedTypeID) {
+ case T_int :
+ codeStream.if_icmple(falseLabel);
+ break;
+ case T_float :
+ codeStream.fcmpl();
+ codeStream.ifle(falseLabel);
+ break;
+ case T_long :
+ codeStream.lcmp();
+ codeStream.ifle(falseLabel);
+ break;
+ case T_double :
+ codeStream.dcmpl();
+ codeStream.ifle(falseLabel);
+ }
+ // reposition the endPC
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ return;
+ } else {
+ // no implicit fall through TRUE/FALSE --> should never occur
+ }
+ }
+ }
+ }
+
+ /**
+ * Boolean generation for >=
+ */
+ public void generateOptimizedGreaterThanOrEqual(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ Label trueLabel,
+ Label falseLabel,
+ boolean valueRequired) {
+
+ int promotedTypeID = left.implicitConversion >> 4;
+ // both sides got promoted in the same way
+ if (promotedTypeID == T_int) {
+ // 0 >= x
+ if ((left.constant != NotAConstant) && (left.constant.intValue() == 0)) {
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired) {
+ if (falseLabel == null) {
+ if (trueLabel != null) {
+ // implicitly falling through the FALSE case
+ codeStream.ifle(trueLabel);
+ }
+ } else {
+ if (trueLabel == null) {
+ // implicitly falling through the TRUE case
+ codeStream.ifgt(falseLabel);
+ } else {
+ // no implicit fall through TRUE/FALSE --> should never occur
+ }
+ }
+ }
+ // reposition the endPC
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ return;
+ }
+ // x >= 0
+ if ((right.constant != NotAConstant) && (right.constant.intValue() == 0)) {
+ left.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired) {
+ if (falseLabel == null) {
+ if (trueLabel != null) {
+ // implicitly falling through the FALSE case
+ codeStream.ifge(trueLabel);
+ }
+ } else {
+ if (trueLabel == null) {
+ // implicitly falling through the TRUE case
+ codeStream.iflt(falseLabel);
+ } else {
+ // no implicit fall through TRUE/FALSE --> should never occur
+ }
+ }
+ }
+ // reposition the endPC
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ return;
+ }
+ }
+ // default comparison
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired) {
+ if (falseLabel == null) {
+ if (trueLabel != null) {
+ // implicit falling through the FALSE case
+ switch (promotedTypeID) {
+ case T_int :
+ codeStream.if_icmpge(trueLabel);
+ break;
+ case T_float :
+ codeStream.fcmpl();
+ codeStream.ifge(trueLabel);
+ break;
+ case T_long :
+ codeStream.lcmp();
+ codeStream.ifge(trueLabel);
+ break;
+ case T_double :
+ codeStream.dcmpl();
+ codeStream.ifge(trueLabel);
+ }
+ // reposition the endPC
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ return;
+ }
+ } else {
+ if (trueLabel == null) {
+ // implicit falling through the TRUE case
+ switch (promotedTypeID) {
+ case T_int :
+ codeStream.if_icmplt(falseLabel);
+ break;
+ case T_float :
+ codeStream.fcmpl();
+ codeStream.iflt(falseLabel);
+ break;
+ case T_long :
+ codeStream.lcmp();
+ codeStream.iflt(falseLabel);
+ break;
+ case T_double :
+ codeStream.dcmpl();
+ codeStream.iflt(falseLabel);
+ }
+ // reposition the endPC
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ return;
+ } else {
+ // no implicit fall through TRUE/FALSE --> should never occur
+ }
+ }
+ }
+ }
+
+ /**
+ * Boolean generation for <
+ */
+ public void generateOptimizedLessThan(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ Label trueLabel,
+ Label falseLabel,
+ boolean valueRequired) {
+
+ int promotedTypeID = left.implicitConversion >> 4;
+ // both sides got promoted in the same way
+ if (promotedTypeID == T_int) {
+ // 0 < x
+ if ((left.constant != NotAConstant) && (left.constant.intValue() == 0)) {
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired) {
+ if (falseLabel == null) {
+ if (trueLabel != null) {
+ // implicitly falling through the FALSE case
+ codeStream.ifgt(trueLabel);
+ }
+ } else {
+ if (trueLabel == null) {
+ // implicitly falling through the TRUE case
+ codeStream.ifle(falseLabel);
+ } else {
+ // no implicit fall through TRUE/FALSE --> should never occur
+ }
+ }
+ }
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ return;
+ }
+ // x < 0
+ if ((right.constant != NotAConstant) && (right.constant.intValue() == 0)) {
+ left.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired) {
+ if (falseLabel == null) {
+ if (trueLabel != null) {
+ // implicitly falling through the FALSE case
+ codeStream.iflt(trueLabel);
+ }
+ } else {
+ if (trueLabel == null) {
+ // implicitly falling through the TRUE case
+ codeStream.ifge(falseLabel);
+ } else {
+ // no implicit fall through TRUE/FALSE --> should never occur
+ }
+ }
+ }
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ return;
+ }
+ }
+ // default comparison
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired) {
+ if (falseLabel == null) {
+ if (trueLabel != null) {
+ // implicit falling through the FALSE case
+ switch (promotedTypeID) {
+ case T_int :
+ codeStream.if_icmplt(trueLabel);
+ break;
+ case T_float :
+ codeStream.fcmpg();
+ codeStream.iflt(trueLabel);
+ break;
+ case T_long :
+ codeStream.lcmp();
+ codeStream.iflt(trueLabel);
+ break;
+ case T_double :
+ codeStream.dcmpg();
+ codeStream.iflt(trueLabel);
+ }
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ return;
+ }
+ } else {
+ if (trueLabel == null) {
+ // implicit falling through the TRUE case
+ switch (promotedTypeID) {
+ case T_int :
+ codeStream.if_icmpge(falseLabel);
+ break;
+ case T_float :
+ codeStream.fcmpg();
+ codeStream.ifge(falseLabel);
+ break;
+ case T_long :
+ codeStream.lcmp();
+ codeStream.ifge(falseLabel);
+ break;
+ case T_double :
+ codeStream.dcmpg();
+ codeStream.ifge(falseLabel);
+ }
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ return;
+ } else {
+ // no implicit fall through TRUE/FALSE --> should never occur
+ }
+ }
+ }
+ }
+
+ /**
+ * Boolean generation for <=
+ */
+ public void generateOptimizedLessThanOrEqual(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ Label trueLabel,
+ Label falseLabel,
+ boolean valueRequired) {
+
+ int promotedTypeID = left.implicitConversion >> 4;
+ // both sides got promoted in the same way
+ if (promotedTypeID == T_int) {
+ // 0 <= x
+ if ((left.constant != NotAConstant) && (left.constant.intValue() == 0)) {
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired) {
+ if (falseLabel == null) {
+ if (trueLabel != null) {
+ // implicitly falling through the FALSE case
+ codeStream.ifge(trueLabel);
+ }
+ } else {
+ if (trueLabel == null) {
+ // implicitly falling through the TRUE case
+ codeStream.iflt(falseLabel);
+ } else {
+ // no implicit fall through TRUE/FALSE --> should never occur
+ }
+ }
+ }
+ // reposition the endPC
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ return;
+ }
+ // x <= 0
+ if ((right.constant != NotAConstant) && (right.constant.intValue() == 0)) {
+ left.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired) {
+ if (falseLabel == null) {
+ if (trueLabel != null) {
+ // implicitly falling through the FALSE case
+ codeStream.ifle(trueLabel);
+ }
+ } else {
+ if (trueLabel == null) {
+ // implicitly falling through the TRUE case
+ codeStream.ifgt(falseLabel);
+ } else {
+ // no implicit fall through TRUE/FALSE --> should never occur
+ }
+ }
+ }
+ // reposition the endPC
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ return;
+ }
+ }
+ // default comparison
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired) {
+ if (falseLabel == null) {
+ if (trueLabel != null) {
+ // implicit falling through the FALSE case
+ switch (promotedTypeID) {
+ case T_int :
+ codeStream.if_icmple(trueLabel);
+ break;
+ case T_float :
+ codeStream.fcmpg();
+ codeStream.ifle(trueLabel);
+ break;
+ case T_long :
+ codeStream.lcmp();
+ codeStream.ifle(trueLabel);
+ break;
+ case T_double :
+ codeStream.dcmpg();
+ codeStream.ifle(trueLabel);
+ }
+ // reposition the endPC
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ return;
+ }
+ } else {
+ if (trueLabel == null) {
+ // implicit falling through the TRUE case
+ switch (promotedTypeID) {
+ case T_int :
+ codeStream.if_icmpgt(falseLabel);
+ break;
+ case T_float :
+ codeStream.fcmpg();
+ codeStream.ifgt(falseLabel);
+ break;
+ case T_long :
+ codeStream.lcmp();
+ codeStream.ifgt(falseLabel);
+ break;
+ case T_double :
+ codeStream.dcmpg();
+ codeStream.ifgt(falseLabel);
+ }
+ // reposition the endPC
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ return;
+ } else {
+ // no implicit fall through TRUE/FALSE --> should never occur
+ }
+ }
+ }
+ }
+
+ /**
+ * Boolean generation for &
+ */
+ public void generateOptimizedLogicalAnd(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ Label trueLabel,
+ Label falseLabel,
+ boolean valueRequired) {
+
+ Constant condConst;
+ if ((left.implicitConversion & 0xF) == T_boolean) {
+ if ((condConst = left.optimizedBooleanConstant()) != NotAConstant) {
+ if (condConst.booleanValue() == true) {
+ // <something equivalent to true> & x
+ left.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ trueLabel,
+ falseLabel,
+ false);
+ if ((bits & OnlyValueRequiredMASK) != 0) {
+ right.generateCode(currentScope, codeStream, valueRequired);
+ } else {
+ right.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ trueLabel,
+ falseLabel,
+ valueRequired);
+ }
+ } else {
+ // <something equivalent to false> & x
+ left.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ trueLabel,
+ falseLabel,
+ false);
+ Label internalTrueLabel = new Label(codeStream);
+ right.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ trueLabel,
+ falseLabel,
+ false);
+ internalTrueLabel.place();
+ if (valueRequired) {
+ if ((bits & OnlyValueRequiredMASK) != 0) {
+ codeStream.iconst_0();
+ } else {
+ if (falseLabel != null) {
+ // implicit falling through the TRUE case
+ codeStream.goto_(falseLabel);
+ }
+ }
+ }
+ // reposition the endPC
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ }
+ return;
+ }
+ if ((condConst = right.optimizedBooleanConstant()) != NotAConstant) {
+ if (condConst.booleanValue() == true) {
+ // x & <something equivalent to true>
+ if ((bits & OnlyValueRequiredMASK) != 0) {
+ left.generateCode(currentScope, codeStream, valueRequired);
+ } else {
+ left.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ trueLabel,
+ falseLabel,
+ valueRequired);
+ }
+ right.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ trueLabel,
+ falseLabel,
+ false);
+ } else {
+ // x & <something equivalent to false>
+ Label internalTrueLabel = new Label(codeStream);
+ left.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ internalTrueLabel,
+ falseLabel,
+ false);
+ internalTrueLabel.place();
+ right.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ trueLabel,
+ falseLabel,
+ false);
+ if (valueRequired) {
+ if ((bits & OnlyValueRequiredMASK) != 0) {
+ codeStream.iconst_0();
+ } else {
+ if (falseLabel != null) {
+ // implicit falling through the TRUE case
+ codeStream.goto_(falseLabel);
+ }
+ }
+ }
+ // reposition the endPC
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ }
+ return;
+ }
+ }
+ // default case
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired) {
+ codeStream.iand();
+ if ((bits & OnlyValueRequiredMASK) == 0) {
+ if (falseLabel == null) {
+ if (trueLabel != null) {
+ // implicit falling through the FALSE case
+ codeStream.ifne(trueLabel);
+ }
+ } else {
+ // implicit falling through the TRUE case
+ if (trueLabel == null) {
+ codeStream.ifeq(falseLabel);
+ } else {
+ // no implicit fall through TRUE/FALSE --> should never occur
+ }
+ }
+ }
+ }
+ // reposition the endPC
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ }
+
+ /**
+ * Boolean generation for |
+ */
+ public void generateOptimizedLogicalOr(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ Label trueLabel,
+ Label falseLabel,
+ boolean valueRequired) {
+
+ Constant condConst;
+ if ((left.implicitConversion & 0xF) == T_boolean) {
+ if ((condConst = left.optimizedBooleanConstant()) != NotAConstant) {
+ if (condConst.booleanValue() == true) {
+ // <something equivalent to true> | x
+ left.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ trueLabel,
+ falseLabel,
+ false);
+ Label internalFalseLabel = new Label(codeStream);
+ right.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ trueLabel,
+ internalFalseLabel,
+ false);
+ internalFalseLabel.place();
+ if (valueRequired) {
+ if ((bits & OnlyValueRequiredMASK) != 0) {
+ codeStream.iconst_1();
+ } else {
+ if (trueLabel != null) {
+ codeStream.goto_(trueLabel);
+ }
+ }
+ }
+ // reposition the endPC
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ } else {
+ // <something equivalent to false> | x
+ left.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ trueLabel,
+ falseLabel,
+ false);
+ if ((bits & OnlyValueRequiredMASK) != 0) {
+ right.generateCode(currentScope, codeStream, valueRequired);
+ } else {
+ right.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ trueLabel,
+ falseLabel,
+ valueRequired);
+ }
+ }
+ return;
+ }
+ if ((condConst = right.optimizedBooleanConstant()) != NotAConstant) {
+ if (condConst.booleanValue() == true) {
+ // x | <something equivalent to true>
+ Label internalFalseLabel = new Label(codeStream);
+ left.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ trueLabel,
+ internalFalseLabel,
+ false);
+ internalFalseLabel.place();
+ right.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ trueLabel,
+ falseLabel,
+ false);
+ if (valueRequired) {
+ if ((bits & OnlyValueRequiredMASK) != 0) {
+ codeStream.iconst_1();
+ } else {
+ if (trueLabel != null) {
+ codeStream.goto_(trueLabel);
+ }
+ }
+ }
+ // reposition the endPC
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ } else {
+ // x | <something equivalent to false>
+ if ((bits & OnlyValueRequiredMASK) != 0) {
+ left.generateCode(currentScope, codeStream, valueRequired);
+ } else {
+ left.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ trueLabel,
+ falseLabel,
+ valueRequired);
+ }
+ right.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ trueLabel,
+ falseLabel,
+ false);
+ }
+ return;
+ }
+ }
+ // default case
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired) {
+ codeStream.ior();
+ if ((bits & OnlyValueRequiredMASK) == 0) {
+ if (falseLabel == null) {
+ if (trueLabel != null) {
+ // implicit falling through the FALSE case
+ codeStream.ifne(trueLabel);
+ }
+ } else {
+ // implicit falling through the TRUE case
+ if (trueLabel == null) {
+ codeStream.ifeq(falseLabel);
+ } else {
+ // no implicit fall through TRUE/FALSE --> should never occur
+ }
+ }
+ }
+ }
+ // reposition the endPC
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ }
+
+ /**
+ * Boolean generation for ^
+ */
+ public void generateOptimizedLogicalXor(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ Label trueLabel,
+ Label falseLabel,
+ boolean valueRequired) {
+
+ Constant condConst;
+ if ((left.implicitConversion & 0xF) == T_boolean) {
+ if ((condConst = left.optimizedBooleanConstant()) != NotAConstant) {
+ if (condConst.booleanValue() == true) {
+ // <something equivalent to true> ^ x
+ left.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ trueLabel,
+ falseLabel,
+ false);
+ right.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ falseLabel,
+ trueLabel,
+ valueRequired);
+ } else {
+ // <something equivalent to false> ^ x
+ left.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ trueLabel,
+ falseLabel,
+ false);
+ if ((bits & OnlyValueRequiredMASK) != 0) {
+ right.generateCode(currentScope, codeStream, valueRequired);
+ } else {
+ right.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ trueLabel,
+ falseLabel,
+ valueRequired);
+ }
+ }
+ return;
+ }
+ if ((condConst = right.optimizedBooleanConstant()) != NotAConstant) {
+ if (condConst.booleanValue() == true) {
+ // x ^ <something equivalent to true>
+ left.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ falseLabel,
+ trueLabel,
+ valueRequired);
+ right.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ trueLabel,
+ falseLabel,
+ false);
+ } else {
+ // x ^ <something equivalent to false>
+ if ((bits & OnlyValueRequiredMASK) != 0) {
+ left.generateCode(currentScope, codeStream, valueRequired);
+ } else {
+ left.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ trueLabel,
+ falseLabel,
+ valueRequired);
+ }
+ right.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ trueLabel,
+ falseLabel,
+ false);
+ }
+ return;
+ }
+ }
+ // default case
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired) {
+ codeStream.ixor();
+ if ((bits & OnlyValueRequiredMASK) == 0) {
+ if (falseLabel == null) {
+ if (trueLabel != null) {
+ // implicit falling through the FALSE case
+ codeStream.ifne(trueLabel);
+ }
+ } else {
+ // implicit falling through the TRUE case
+ if (trueLabel == null) {
+ codeStream.ifeq(falseLabel);
+ } else {
+ // no implicit fall through TRUE/FALSE --> should never occur
+ }
+ }
+ }
+ }
+ // reposition the endPC
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ }
+
+ public void generateOptimizedStringConcatenation(
+ BlockScope blockScope,
+ CodeStream codeStream,
+ int typeID) {
+
+ /* In the case trying to make a string concatenation, there is no need to create a new
+ * string buffer, thus use a lower-level API for code generation involving only the
+ * appending of arguments to the existing StringBuffer
+ */
+
+ if ((((bits & OperatorMASK) >> OperatorSHIFT) == PLUS)
+ && ((bits & ReturnTypeIDMASK) == T_String)) {
+ if (constant != NotAConstant) {
+ codeStream.generateConstant(constant, implicitConversion);
+ codeStream.invokeStringConcatenationAppendForType(implicitConversion & 0xF);
+ } else {
+ int pc = codeStream.position;
+ left.generateOptimizedStringConcatenation(
+ blockScope,
+ codeStream,
+ left.implicitConversion & 0xF);
+ codeStream.recordPositionsFrom(pc, left.sourceStart);
+ pc = codeStream.position;
+ right.generateOptimizedStringConcatenation(
+ blockScope,
+ codeStream,
+ right.implicitConversion & 0xF);
+ codeStream.recordPositionsFrom(pc, right.sourceStart);
+ }
+ } else {
+ super.generateOptimizedStringConcatenation(blockScope, codeStream, typeID);
+ }
+ }
+
+ public void generateOptimizedStringConcatenationCreation(
+ BlockScope blockScope,
+ CodeStream codeStream,
+ int typeID) {
+
+ /* In the case trying to make a string concatenation, there is no need to create a new
+ * string buffer, thus use a lower-level API for code generation involving only the
+ * appending of arguments to the existing StringBuffer
+ */
+
+ if ((((bits & OperatorMASK) >> OperatorSHIFT) == PLUS)
+ && ((bits & ReturnTypeIDMASK) == T_String)) {
+ if (constant != NotAConstant) {
+ codeStream.newStringContatenation(); // new: java.lang.StringBuffer
+ codeStream.dup();
+ codeStream.ldc(constant.stringValue());
+ codeStream.invokeStringConcatenationStringConstructor();
+ // invokespecial: java.lang.StringBuffer.<init>(Ljava.lang.String;)V
+ } else {
+ int pc = codeStream.position;
+ left.generateOptimizedStringConcatenationCreation(
+ blockScope,
+ codeStream,
+ left.implicitConversion & 0xF);
+ codeStream.recordPositionsFrom(pc, left.sourceStart);
+ pc = codeStream.position;
+ right.generateOptimizedStringConcatenation(
+ blockScope,
+ codeStream,
+ right.implicitConversion & 0xF);
+ codeStream.recordPositionsFrom(pc, right.sourceStart);
+ }
+ } else {
+ super.generateOptimizedStringConcatenationCreation(blockScope, codeStream, typeID);
+ }
+ }
+
+ public boolean isCompactableOperation() {
+
+ return true;
+ }
+
+ public void optimizedBooleanConstant(int leftId, int operator, int rightId) {
+
+ switch (operator) {
+ case AND :
+ if ((leftId != T_boolean) || (rightId != T_boolean))
+ return;
+ case AND_AND :
+ Constant cst;
+ if ((cst = left.optimizedBooleanConstant()) != NotAConstant) {
+ if (cst.booleanValue() == false) { // left is equivalent to false
+ optimizedBooleanConstant = cst; // constant(false)
+ return;
+ } else { //left is equivalent to true
+ if ((cst = right.optimizedBooleanConstant()) != NotAConstant) {
+ optimizedBooleanConstant = cst;
+ // the conditional result is equivalent to the right conditional value
+ }
+ return;
+ }
+ }
+ if ((cst = right.optimizedBooleanConstant()) != NotAConstant) {
+ if (cst.booleanValue() == false) { // right is equivalent to false
+ optimizedBooleanConstant = cst; // constant(false)
+ }
+ }
+ return;
+ case OR :
+ if ((leftId != T_boolean) || (rightId != T_boolean))
+ return;
+ case OR_OR :
+ if ((cst = left.optimizedBooleanConstant()) != NotAConstant) {
+ if (cst.booleanValue() == true) { // left is equivalent to true
+ optimizedBooleanConstant = cst; // constant(true)
+ return;
+ } else { //left is equivalent to false
+ if ((cst = right.optimizedBooleanConstant()) != NotAConstant) {
+ optimizedBooleanConstant = cst;
+ }
+ return;
+ }
+ }
+ if ((cst = right.optimizedBooleanConstant()) != NotAConstant) {
+ if (cst.booleanValue() == true) { // right is equivalent to true
+ optimizedBooleanConstant = cst; // constant(true)
+ }
+ }
+ }
+ }
+
+ public StringBuffer printExpressionNoParenthesis(int indent, StringBuffer output) {
+
+ left.printExpression(indent, output).append(' ').append(operatorToString()).append(' ');
+ return right.printExpression(0, output);
+ }
+
+ public TypeBinding resolveType(BlockScope scope) {
+
+ boolean leftIsCast, rightIsCast;
+ if ((leftIsCast = left instanceof CastExpression) == true) left.bits |= IgnoreNeedForCastCheckMASK; // will check later on
+ TypeBinding leftType = left.resolveType(scope);
+
+ if ((rightIsCast = right instanceof CastExpression) == true) right.bits |= IgnoreNeedForCastCheckMASK; // will check later on
+ TypeBinding rightType = right.resolveType(scope);
+
+ // use the id of the type to navigate into the table
+ if (leftType == null || rightType == null) {
+ constant = Constant.NotAConstant;
+ return null;
+ }
+ int leftTypeId = leftType.id;
+ int rightTypeId = rightType.id;
+ if (leftTypeId > 15
+ || rightTypeId > 15) { // must convert String + Object || Object + String
+ if (leftTypeId == T_String) {
+ rightTypeId = T_Object;
+ } else if (rightTypeId == T_String) {
+ leftTypeId = T_Object;
+ } else {
+ constant = Constant.NotAConstant;
+ scope.problemReporter().invalidOperator(this, leftType, rightType);
+ return null;
+ }
+ }
+ if (((bits & OperatorMASK) >> OperatorSHIFT) == PLUS) {
+ if (leftTypeId == T_String) {
+ this.left.computeConversion(scope, leftType, leftType);
+ if (rightType.isArrayType() && ((ArrayBinding) rightType).elementsType() == CharBinding) {
+ scope.problemReporter().signalNoImplicitStringConversionForCharArrayExpression(right);
+ }
+ }
+ if (rightTypeId == T_String) {
+ this.right.computeConversion(scope, rightType, rightType);
+ if (leftType.isArrayType() && ((ArrayBinding) leftType).elementsType() == CharBinding) {
+ scope.problemReporter().signalNoImplicitStringConversionForCharArrayExpression(left);
+ }
+ }
+ }
+
+ // the code is an int
+ // (cast) left Op (cast) right --> result
+ // 0000 0000 0000 0000 0000
+ // <<16 <<12 <<8 <<4 <<0
+
+ // Don't test for result = 0. If it is zero, some more work is done.
+ // On the one hand when it is not zero (correct code) we avoid doing the test
+ int operator = (bits & OperatorMASK) >> OperatorSHIFT;
+ int operatorSignature = OperatorSignatures[operator][(leftTypeId << 4) + rightTypeId];
+ left.implicitConversion = operatorSignature >>> 12;
+ right.implicitConversion = (operatorSignature >>> 4) & 0x000FF;
+
+ bits |= operatorSignature & 0xF;
+ switch (operatorSignature & 0xF) { // record the current ReturnTypeID
+ // only switch on possible result type.....
+ case T_boolean :
+ this.resolvedType = BooleanBinding;
+ break;
+ case T_byte :
+ this.resolvedType = ByteBinding;
+ break;
+ case T_char :
+ this.resolvedType = CharBinding;
+ break;
+ case T_double :
+ this.resolvedType = DoubleBinding;
+ break;
+ case T_float :
+ this.resolvedType = FloatBinding;
+ break;
+ case T_int :
+ this.resolvedType = IntBinding;
+ break;
+ case T_long :
+ this.resolvedType = LongBinding;
+ break;
+ case T_String :
+ this.resolvedType = scope.getJavaLangString();
+ break;
+ default : //error........
+ constant = Constant.NotAConstant;
+ scope.problemReporter().invalidOperator(this, leftType, rightType);
+ return null;
+ }
+
+ // check need for operand cast
+ if (leftIsCast || rightIsCast) {
+ CastExpression.checkNeedForArgumentCasts(scope, operator, operatorSignature, left, leftTypeId, leftIsCast, right, rightTypeId, rightIsCast);
+ }
+ // compute the constant when valid
+ computeConstant(scope, leftTypeId, rightTypeId);
+ return this.resolvedType;
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+
+ if (visitor.visit(this, scope)) {
+ left.traverse(visitor, scope);
+ right.traverse(visitor, scope);
+ }
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Block.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Block.js
new file mode 100644
index 0000000..c3adc8d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Block.js
@@ -0,0 +1,142 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class Block extends Statement {
+
+ public Statement[] statements;
+ public int explicitDeclarations;
+ // the number of explicit declaration , used to create scope
+ public BlockScope scope;
+
+ public Block(int explicitDeclarations) {
+ this.explicitDeclarations = explicitDeclarations;
+ }
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ // empty block
+ if (statements == null) return flowInfo;
+ boolean didAlreadyComplain = false;
+ for (int i = 0, max = statements.length; i < max; i++) {
+ Statement stat = statements[i];
+ if (!stat.complainIfUnreachable(flowInfo, scope, didAlreadyComplain)) {
+ flowInfo = stat.analyseCode(scope, flowContext, flowInfo);
+ } else {
+ didAlreadyComplain = true;
+ }
+ }
+ return flowInfo;
+ }
+ /**
+ * Code generation for a block
+ */
+ public void generateCode(BlockScope currentScope, CodeStream codeStream) {
+
+ if ((bits & IsReachableMASK) == 0) {
+ return;
+ }
+ int pc = codeStream.position;
+ if (statements != null) {
+ for (int i = 0, max = statements.length; i < max; i++) {
+ statements[i].generateCode(scope, codeStream);
+ }
+ } // for local variable debug attributes
+ if (scope != currentScope) { // was really associated with its own scope
+ codeStream.exitUserScope(scope);
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+
+ public boolean isEmptyBlock() {
+
+ return statements == null;
+ }
+
+ public StringBuffer printBody(int indent, StringBuffer output) {
+
+ if (this.statements == null) return output;
+ for (int i = 0; i < statements.length; i++) {
+ statements[i].printStatement(indent + 1, output);
+ output.append('\n');
+ }
+ return output;
+ }
+
+ public StringBuffer printStatement(int indent, StringBuffer output) {
+
+ printIndent(indent, output);
+ output.append("{\n"); //$NON-NLS-1$
+ printBody(indent, output);
+ return printIndent(indent, output).append('}');
+ }
+
+ public void resolve(BlockScope upperScope) {
+
+ if ((this.bits & UndocumentedEmptyBlockMASK) != 0) {
+ upperScope.problemReporter().undocumentedEmptyBlock(this.sourceStart, this.sourceEnd);
+ }
+ if (statements != null) {
+ scope =
+ explicitDeclarations == 0
+ ? upperScope
+ : new BlockScope(upperScope, explicitDeclarations);
+ for (int i = 0, length = statements.length; i < length; i++) {
+ statements[i].resolve(scope);
+ }
+ }
+ }
+
+ public void resolveUsing(BlockScope givenScope) {
+
+ if ((this.bits & UndocumentedEmptyBlockMASK) != 0) {
+ givenScope.problemReporter().undocumentedEmptyBlock(this.sourceStart, this.sourceEnd);
+ }
+ // this optimized resolve(...) is sent only on none empty blocks
+ scope = givenScope;
+ if (statements != null) {
+ for (int i = 0, length = statements.length; i < length; i++) {
+ statements[i].resolve(scope);
+ }
+ }
+ }
+
+ public void traverse(
+ ASTVisitor visitor,
+ BlockScope blockScope) {
+
+ if (visitor.visit(this, blockScope)) {
+ if (statements != null) {
+ for (int i = 0, length = statements.length; i < length; i++)
+ statements[i].traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, blockScope);
+ }
+
+ /**
+ * Dispatch the call on its last statement.
+ */
+ public void branchChainTo(Label label) {
+ if (this.statements != null) {
+ this.statements[statements.length - 1].branchChainTo(label);
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/BranchStatement.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/BranchStatement.js
new file mode 100644
index 0000000..b663f17
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/BranchStatement.js
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public abstract class BranchStatement extends Statement {
+ public char[] label;
+ public Label targetLabel;
+ public SubRoutineStatement[] subroutines;
+/**
+ * BranchStatement constructor comment.
+ */
+public BranchStatement(char[] l, int s,int e) {
+ label = l ;
+ sourceStart = s;
+ sourceEnd = e;
+}
+/**
+ * Branch code generation
+ *
+ * generate the finallyInvocationSequence.
+ */
+public void generateCode(BlockScope currentScope, CodeStream codeStream) {
+
+ if ((bits & IsReachableMASK) == 0) {
+ return;
+ }
+ int pc = codeStream.position;
+
+ // generation of code responsible for invoking the finally
+ // blocks in sequence
+ if (subroutines != null){
+ for (int i = 0, max = subroutines.length; i < max; i++){
+ SubRoutineStatement sub = subroutines[i];
+ sub.generateSubRoutineInvocation(currentScope, codeStream);
+ if (sub.isSubRoutineEscaping()) {
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ SubRoutineStatement.reenterExceptionHandlers(subroutines, i, codeStream);
+ return;
+ }
+ sub.exitAnyExceptionHandler();
+ }
+ }
+ codeStream.goto_(targetLabel);
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ SubRoutineStatement.reenterExceptionHandlers(subroutines, -1, codeStream);
+}
+public void resolve(BlockScope scope) {
+ // nothing to do during name resolution
+}
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/BreakStatement.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/BreakStatement.js
new file mode 100644
index 0000000..8d6cb72
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/BreakStatement.js
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class BreakStatement extends BranchStatement {
+
+ public BreakStatement(char[] label, int sourceStart, int e) {
+ super(label, sourceStart, e);
+ }
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ // here requires to generate a sequence of finally blocks invocations depending corresponding
+ // to each of the traversed try statements, so that execution will terminate properly.
+
+ // lookup the label, this should answer the returnContext
+ FlowContext targetContext = (label == null)
+ ? flowContext.getTargetContextForDefaultBreak()
+ : flowContext.getTargetContextForBreakLabel(label);
+
+ if (targetContext == null) {
+ if (label == null) {
+ currentScope.problemReporter().invalidBreak(this);
+ } else {
+ currentScope.problemReporter().undefinedLabel(this);
+ }
+ return flowInfo; // pretend it did not break since no actual target
+ }
+
+ targetLabel = targetContext.breakLabel();
+ FlowContext traversedContext = flowContext;
+ int subIndex = 0, maxSub = 5;
+ subroutines = new SubRoutineStatement[maxSub];
+
+ do {
+ SubRoutineStatement sub;
+ if ((sub = traversedContext.subRoutine()) != null) {
+ if (subIndex == maxSub) {
+ System.arraycopy(subroutines, 0, (subroutines = new SubRoutineStatement[maxSub*=2]), 0, subIndex); // grow
+ }
+ subroutines[subIndex++] = sub;
+ if (sub.isSubRoutineEscaping()) {
+ break;
+ }
+ }
+ traversedContext.recordReturnFrom(flowInfo.unconditionalInits());
+
+ ASTNode node;
+ if ((node = traversedContext.associatedNode) instanceof TryStatement) {
+ TryStatement tryStatement = (TryStatement) node;
+ flowInfo.addInitializationsFrom(tryStatement.subRoutineInits); // collect inits
+ } else if (traversedContext == targetContext) {
+ // only record break info once accumulated through subroutines, and only against target context
+ targetContext.recordBreakFrom(flowInfo);
+ break;
+ }
+ } while ((traversedContext = traversedContext.parent) != null);
+
+ // resize subroutines
+ if (subIndex != maxSub) {
+ System.arraycopy(subroutines, 0, (subroutines = new SubRoutineStatement[subIndex]), 0, subIndex);
+ }
+ return FlowInfo.DEAD_END;
+ }
+
+ public StringBuffer printStatement(int tab, StringBuffer output) {
+
+ printIndent(tab, output).append("break "); //$NON-NLS-1$
+ if (label != null) output.append(label);
+ return output.append(';');
+ }
+
+ public void traverse(
+ ASTVisitor visitor,
+ BlockScope blockscope) {
+
+ visitor.visit(this, blockscope);
+ visitor.endVisit(this, blockscope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/CaseStatement.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/CaseStatement.js
new file mode 100644
index 0000000..d9ab25b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/CaseStatement.js
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class CaseStatement extends Statement {
+
+ public Expression constantExpression;
+ public CaseLabel targetLabel;
+ public CaseStatement(Expression constantExpression, int sourceEnd, int sourceStart) {
+ this.constantExpression = constantExpression;
+ this.sourceEnd = sourceEnd;
+ this.sourceStart = sourceStart;
+ }
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ if (constantExpression != null) {
+ if (constantExpression.constant == NotAConstant) {
+ currentScope.problemReporter().caseExpressionMustBeConstant(constantExpression);
+ }
+ this.constantExpression.analyseCode(currentScope, flowContext, flowInfo);
+ }
+ return flowInfo;
+ }
+
+ public StringBuffer printStatement(int tab, StringBuffer output) {
+
+ printIndent(tab, output);
+ if (constantExpression == null) {
+ output.append("default : "); //$NON-NLS-1$
+ } else {
+ output.append("case "); //$NON-NLS-1$
+ constantExpression.printExpression(0, output).append(" : "); //$NON-NLS-1$
+ }
+ return output.append(';');
+ }
+
+ /**
+ * Case code generation
+ *
+ */
+ public void generateCode(BlockScope currentScope, CodeStream codeStream) {
+
+ if ((bits & IsReachableMASK) == 0) {
+ return;
+ }
+ int pc = codeStream.position;
+ targetLabel.place();
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+
+ /**
+ * No-op : should use resolveCase(...) instead.
+ */
+ public void resolve(BlockScope scope) {
+ // no-op : should use resolveCase(...) instead.
+ }
+
+ public Constant resolveCase(
+ BlockScope scope,
+ TypeBinding switchType,
+ SwitchStatement switchStatement) {
+
+ scope.switchCase = this; // record entering in a switch case block
+
+ if (constantExpression == null) {
+ // remember the default case into the associated switch statement
+ if (switchStatement.defaultCase != null)
+ scope.problemReporter().duplicateDefaultCase(this);
+
+ // on error the last default will be the selected one ...
+ switchStatement.defaultCase = this;
+ return null;
+ }
+ // add into the collection of cases of the associated switch statement
+ switchStatement.cases[switchStatement.caseCount++] = this;
+ TypeBinding caseType = constantExpression.resolveType(scope);
+ if (caseType == null || switchType == null) return null;
+ if (constantExpression.isConstantValueOfTypeAssignableToType(caseType, switchType))
+ return constantExpression.constant;
+ if (caseType.isCompatibleWith(switchType))
+ return constantExpression.constant;
+ scope.problemReporter().typeMismatchError(caseType, switchType, constantExpression);
+ return null;
+ }
+
+
+ public void traverse(
+ ASTVisitor visitor,
+ BlockScope blockScope) {
+
+ if (visitor.visit(this, blockScope)) {
+ if (constantExpression != null) constantExpression.traverse(visitor, blockScope);
+ }
+ visitor.endVisit(this, blockScope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/CastExpression.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/CastExpression.js
new file mode 100644
index 0000000..64a1d99
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/CastExpression.js
@@ -0,0 +1,420 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * Nick Teryaev - fix for bug (https://bugs.eclipse.org/bugs/show_bug.cgi?id=40752)
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemSeverities;
+
+public class CastExpression extends Expression {
+
+ public Expression expression;
+ public Expression type;
+ public TypeBinding expectedType; // when assignment conversion to a given expected type: String s = (String) t;
+
+ //expression.implicitConversion holds the cast for baseType casting
+ public CastExpression(Expression expression, Expression type) {
+ this.expression = expression;
+ this.type = type;
+
+ //due to the fact an expression may start with ( and that a cast also start with (
+ //the field is an expression....it can be a TypeReference OR a NameReference Or
+ //an expression <--this last one is invalid.......
+
+ //if (type instanceof TypeReference )
+ // flag = IsTypeReference ;
+ //else
+ // if (type instanceof NameReference)
+ // flag = IsNameReference ;
+ // else
+ // flag = IsExpression ;
+
+ }
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ return expression
+ .analyseCode(currentScope, flowContext, flowInfo)
+ .unconditionalInits();
+ }
+
+ /**
+ * Casting an enclosing instance will considered as useful if removing it would actually bind to a different type
+ */
+ public static void checkNeedForEnclosingInstanceCast(BlockScope scope, Expression enclosingInstance, TypeBinding enclosingInstanceType, TypeBinding memberType) {
+
+ if (scope.environment().options.getSeverity(CompilerOptions.UnnecessaryTypeCheck) == ProblemSeverities.Ignore) return;
+
+ TypeBinding castedExpressionType = ((CastExpression)enclosingInstance).expression.resolvedType;
+ if (castedExpressionType == null) return; // cannot do better
+ // obvious identity cast
+ if (castedExpressionType == enclosingInstanceType) {
+ scope.problemReporter().unnecessaryCast((CastExpression)enclosingInstance);
+ } else if (castedExpressionType == NullBinding){
+ return; // tolerate null enclosing instance cast
+ } else {
+ TypeBinding alternateEnclosingInstanceType = castedExpressionType;
+ if (castedExpressionType.isBaseType() || castedExpressionType.isArrayType()) return; // error case
+ if (memberType == scope.getMemberType(memberType.sourceName(), (ReferenceBinding) alternateEnclosingInstanceType)) {
+ scope.problemReporter().unnecessaryCast((CastExpression)enclosingInstance);
+ }
+ }
+ }
+
+ /**
+ * Only complain for identity cast, since other type of casts may be useful: e.g. ~((~(long) 0) << 32) is different from: ~((~0) << 32)
+ */
+ public static void checkNeedForArgumentCast(BlockScope scope, int operator, int operatorSignature, Expression expression, int expressionTypeId) {
+
+ if (scope.environment().options.getSeverity(CompilerOptions.UnnecessaryTypeCheck) == ProblemSeverities.Ignore) return;
+
+ // check need for left operand cast
+ int alternateLeftTypeId = expressionTypeId;
+ if ((expression.bits & UnnecessaryCastMask) == 0 && expression.resolvedType.isBaseType()) {
+ // narrowing conversion on base type may change value, thus necessary
+ return;
+ } else {
+ TypeBinding alternateLeftType = ((CastExpression)expression).expression.resolvedType;
+ if (alternateLeftType == null) return; // cannot do better
+ if ((alternateLeftTypeId = alternateLeftType.id) == expressionTypeId) { // obvious identity cast
+ scope.problemReporter().unnecessaryCast((CastExpression)expression);
+ return;
+ } else if (alternateLeftTypeId == T_null) {
+ alternateLeftTypeId = expressionTypeId; // tolerate null argument cast
+ return;
+ }
+ }
+/* tolerate widening cast in unary expressions, as may be used when combined in binary expressions (41680)
+ int alternateOperatorSignature = OperatorExpression.OperatorSignatures[operator][(alternateLeftTypeId << 4) + alternateLeftTypeId];
+ // (cast) left Op (cast) right --> result
+ // 1111 0000 1111 0000 1111
+ // <<16 <<12 <<8 <<4 <<0
+ final int CompareMASK = (0xF<<16) + (0xF<<8) + 0xF; // mask hiding compile-time types
+ if ((operatorSignature & CompareMASK) == (alternateOperatorSignature & CompareMASK)) { // same promotions and result
+ scope.problemReporter().unnecessaryCastForArgument((CastExpression)expression, TypeBinding.wellKnownType(scope, expression.implicitConversion >> 4));
+ }
+*/
+ }
+
+ /**
+ * Cast expressions will considered as useful if removing them all would actually bind to a different method
+ * (no fine grain analysis on per casted argument basis, simply separate widening cast from narrowing ones)
+ */
+ public static void checkNeedForArgumentCasts(BlockScope scope, Expression receiver, TypeBinding receiverType, MethodBinding binding, Expression[] arguments, TypeBinding[] argumentTypes, final InvocationSite invocationSite) {
+
+ if (scope.environment().options.getSeverity(CompilerOptions.UnnecessaryTypeCheck) == ProblemSeverities.Ignore) return;
+
+ int length = argumentTypes.length;
+
+ // iterate over arguments, and retrieve original argument types (before cast)
+ TypeBinding[] rawArgumentTypes = argumentTypes;
+ for (int i = 0; i < length; i++) {
+ Expression argument = arguments[i];
+ if (argument instanceof CastExpression) {
+ // narrowing conversion on base type may change value, thus necessary
+ if ((argument.bits & UnnecessaryCastMask) == 0 && argument.resolvedType.isBaseType()) {
+ continue;
+ }
+ TypeBinding castedExpressionType = ((CastExpression)argument).expression.resolvedType;
+ if (castedExpressionType == null) return; // cannot do better
+ // obvious identity cast
+ if (castedExpressionType == argumentTypes[i]) {
+ scope.problemReporter().unnecessaryCast((CastExpression)argument);
+ } else if (castedExpressionType == NullBinding){
+ continue; // tolerate null argument cast
+ } else {
+ if (rawArgumentTypes == argumentTypes) {
+ System.arraycopy(rawArgumentTypes, 0, rawArgumentTypes = new TypeBinding[length], 0, length);
+ }
+ // retain original argument type
+ rawArgumentTypes[i] = castedExpressionType;
+ }
+ }
+ }
+ // perform alternate lookup with original types
+ if (rawArgumentTypes != argumentTypes) {
+ checkAlternateBinding(scope, receiver, receiverType, binding, arguments, argumentTypes, rawArgumentTypes, invocationSite);
+ }
+ }
+
+ /**
+ * Check binary operator casted arguments
+ */
+ public static void checkNeedForArgumentCasts(BlockScope scope, int operator, int operatorSignature, Expression left, int leftTypeId, boolean leftIsCast, Expression right, int rightTypeId, boolean rightIsCast) {
+
+ if (scope.environment().options.getSeverity(CompilerOptions.UnnecessaryTypeCheck) == ProblemSeverities.Ignore) return;
+
+ // check need for left operand cast
+ int alternateLeftTypeId = leftTypeId;
+ if (leftIsCast) {
+ if ((left.bits & UnnecessaryCastMask) == 0 && left.resolvedType.isBaseType()) {
+ // narrowing conversion on base type may change value, thus necessary
+ leftIsCast = false;
+ } else {
+ TypeBinding alternateLeftType = ((CastExpression)left).expression.resolvedType;
+ if (alternateLeftType == null) return; // cannot do better
+ if ((alternateLeftTypeId = alternateLeftType.id) == leftTypeId) { // obvious identity cast
+ scope.problemReporter().unnecessaryCast((CastExpression)left);
+ leftIsCast = false;
+ } else if (alternateLeftTypeId == T_null) {
+ alternateLeftTypeId = leftTypeId; // tolerate null argument cast
+ leftIsCast = false;
+ }
+ }
+ }
+ // check need for right operand cast
+ int alternateRightTypeId = rightTypeId;
+ if (rightIsCast) {
+ if ((right.bits & UnnecessaryCastMask) == 0 && right.resolvedType.isBaseType()) {
+ // narrowing conversion on base type may change value, thus necessary
+ rightIsCast = false;
+ } else {
+ TypeBinding alternateRightType = ((CastExpression)right).expression.resolvedType;
+ if (alternateRightType == null) return; // cannot do better
+ if ((alternateRightTypeId = alternateRightType.id) == rightTypeId) { // obvious identity cast
+ scope.problemReporter().unnecessaryCast((CastExpression)right);
+ rightIsCast = false;
+ } else if (alternateRightTypeId == T_null) {
+ alternateRightTypeId = rightTypeId; // tolerate null argument cast
+ rightIsCast = false;
+ }
+ }
+ }
+ if (leftIsCast || rightIsCast) {
+ if (alternateLeftTypeId > 15 || alternateRightTypeId > 15) { // must convert String + Object || Object + String
+ if (alternateLeftTypeId == T_String) {
+ alternateRightTypeId = T_Object;
+ } else if (alternateRightTypeId == T_String) {
+ alternateLeftTypeId = T_Object;
+ } else {
+ return; // invalid operator
+ }
+ }
+ int alternateOperatorSignature = OperatorExpression.OperatorSignatures[operator][(alternateLeftTypeId << 4) + alternateRightTypeId];
+ // (cast) left Op (cast) right --> result
+ // 1111 0000 1111 0000 1111
+ // <<16 <<12 <<8 <<4 <<0
+ final int CompareMASK = (0xF<<16) + (0xF<<8) + 0xF; // mask hiding compile-time types
+ if ((operatorSignature & CompareMASK) == (alternateOperatorSignature & CompareMASK)) { // same promotions and result
+ if (leftIsCast) scope.problemReporter().unnecessaryCastForArgument((CastExpression)left, TypeBinding.wellKnownType(scope, left.implicitConversion >> 4));
+ if (rightIsCast) scope.problemReporter().unnecessaryCastForArgument((CastExpression)right, TypeBinding.wellKnownType(scope, right.implicitConversion >> 4));
+ }
+ }
+ }
+
+ private static void checkAlternateBinding(BlockScope scope, Expression receiver, TypeBinding receiverType, MethodBinding binding, Expression[] arguments, TypeBinding[] originalArgumentTypes, TypeBinding[] alternateArgumentTypes, final InvocationSite invocationSite) {
+
+ InvocationSite fakeInvocationSite = new InvocationSite(){
+ public TypeBinding[] genericTypeArguments() { return null; }
+ public boolean isSuperAccess(){ return invocationSite.isSuperAccess(); }
+ public boolean isTypeAccess() { return invocationSite.isTypeAccess(); }
+ public void setActualReceiverType(ReferenceBinding actualReceiverType) { /* ignore */}
+ public void setDepth(int depth) { /* ignore */}
+ public void setFieldIndex(int depth){ /* ignore */}
+ public int sourceStart() { return 0; }
+ public int sourceEnd() { return 0; }
+ };
+ MethodBinding bindingIfNoCast;
+ if (binding.isConstructor()) {
+ bindingIfNoCast = scope.getConstructor((ReferenceBinding)receiverType, alternateArgumentTypes, fakeInvocationSite);
+ } else {
+ bindingIfNoCast = receiver.isImplicitThis()
+ ? scope.getImplicitMethod(binding.selector, alternateArgumentTypes, fakeInvocationSite)
+ : scope.getMethod(receiverType, binding.selector, alternateArgumentTypes, fakeInvocationSite);
+ }
+ if (bindingIfNoCast == binding) {
+ for (int i = 0, length = originalArgumentTypes.length; i < length; i++) {
+ if (originalArgumentTypes[i] != alternateArgumentTypes[i]) {
+ scope.problemReporter().unnecessaryCastForArgument((CastExpression)arguments[i], binding.parameters[i]);
+ }
+ }
+ }
+ }
+
+ public boolean checkUnsafeCast(Scope scope, TypeBinding castType, TypeBinding expressionType, TypeBinding match, boolean isNarrowing) {
+ if (match == castType) {
+ if (!isNarrowing) tagAsUnnecessaryCast(scope, castType);
+ return true;
+ }
+ if (castType.isBoundParameterizedType() || castType.isGenericType()) {
+ if (match.isProvablyDistinctFrom(isNarrowing ? expressionType : castType)) {
+ reportIllegalCast(scope, castType, expressionType);
+ return false;
+ }
+ if (isNarrowing ? !expressionType.isEquivalentTo(match) : !match.isEquivalentTo(castType)) {
+ scope.problemReporter().unsafeCast(this);
+ return true;
+ }
+ if ((castType.tagBits & TagBits.HasWildcard) == 0) {
+ if ((!match.isParameterizedType() && !match.isGenericType())
+ || expressionType.isRawType()) {
+ scope.problemReporter().unsafeCast(this);
+ return true;
+ }
+ }
+ }
+ if (!isNarrowing) tagAsUnnecessaryCast(scope, castType);
+ return true;
+ }
+
+ /**
+ * Cast expression code generation
+ *
+ * @param currentScope org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ * @param valueRequired boolean
+ */
+ public void generateCode(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ boolean valueRequired) {
+
+ int pc = codeStream.position;
+ boolean needRuntimeCheckcast = (this.bits & NeedRuntimeCheckCastMASK) != 0;
+ if (constant != NotAConstant) {
+ if (valueRequired || needRuntimeCheckcast) { // Added for: 1F1W9IG: IVJCOM:WINNT - Compiler omits casting check
+ codeStream.generateConstant(constant, implicitConversion);
+ if (needRuntimeCheckcast) {
+ codeStream.checkcast(this.resolvedType);
+ if (!valueRequired)
+ codeStream.pop();
+ }
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ return;
+ }
+ expression.generateCode(
+ currentScope,
+ codeStream,
+ valueRequired || needRuntimeCheckcast);
+ if (needRuntimeCheckcast) {
+ codeStream.checkcast(this.resolvedType);
+ if (!valueRequired)
+ codeStream.pop();
+ } else {
+ if (valueRequired)
+ codeStream.generateImplicitConversion(implicitConversion);
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+
+ public Expression innermostCastedExpression(){
+ Expression current = this.expression;
+ while (current instanceof CastExpression) {
+ current = ((CastExpression) current).expression;
+ }
+ return current;
+ }
+
+ public StringBuffer printExpression(int indent, StringBuffer output) {
+
+ output.append('(');
+ type.print(0, output).append(") "); //$NON-NLS-1$
+ return expression.printExpression(0, output);
+ }
+
+ public void reportIllegalCast(Scope scope, TypeBinding castType, TypeBinding expressionType) {
+ scope.problemReporter().typeCastError(this, castType, expressionType);
+ }
+
+ public TypeBinding resolveType(BlockScope scope) {
+ // compute a new constant if the cast is effective
+
+ // due to the fact an expression may start with ( and that a cast can also start with (
+ // the field is an expression....it can be a TypeReference OR a NameReference Or
+ // any kind of Expression <-- this last one is invalid.......
+
+ constant = Constant.NotAConstant;
+ implicitConversion = T_undefined;
+
+ if ((type instanceof TypeReference) || (type instanceof NameReference)
+ && ((type.bits & ASTNode.ParenthesizedMASK) >> ASTNode.ParenthesizedSHIFT) == 0) { // no extra parenthesis around type: ((A))exp
+
+ this.resolvedType = type.resolveType(scope);
+ expression.setExpectedType(this.resolvedType); // needed in case of generic method invocation
+ TypeBinding expressionType = expression.resolveType(scope);
+ if (this.resolvedType != null && expressionType != null) {
+ checkCastTypesCompatibility(scope, this.resolvedType, expressionType, this.expression);
+ this.expression.computeConversion(scope, this.resolvedType, expressionType);
+ if ((this.bits & UnnecessaryCastMask) != 0) {
+ if ((this.bits & IgnoreNeedForCastCheckMASK) == 0) {
+ if (!usedForGenericMethodReturnTypeInference()) // used for generic type inference ?
+ scope.problemReporter().unnecessaryCast(this);
+ }
+ }
+ }
+ return this.resolvedType;
+ } else { // expression as a cast
+ TypeBinding expressionType = expression.resolveType(scope);
+ if (expressionType == null) return null;
+ scope.problemReporter().invalidTypeReference(type);
+ return null;
+ }
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.Expression#setExpectedType(org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding)
+ */
+ public void setExpectedType(TypeBinding expectedType) {
+ this.expectedType = expectedType;
+ }
+
+ /**
+ * Determines whether apparent unnecessary cast wasn't actually used to
+ * perform return type inference of generic method invocation.
+ */
+ private boolean usedForGenericMethodReturnTypeInference() {
+ if (this.expression instanceof MessageSend) {
+ MethodBinding method = ((MessageSend)this.expression).binding;
+ if (method instanceof ParameterizedGenericMethodBinding
+ && ((ParameterizedGenericMethodBinding)method).inferredReturnType) {
+ if (this.expectedType == null)
+ return true;
+ if (this.resolvedType != this.expectedType)
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.Expression#tagAsNeedCheckCast()
+ */
+ public void tagAsNeedCheckCast() {
+ this.bits |= NeedRuntimeCheckCastMASK;
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.Expression#tagAsUnnecessaryCast(Scope, TypeBinding)
+ */
+ public void tagAsUnnecessaryCast(Scope scope, TypeBinding castType) {
+ if (this.expression.resolvedType == null) return; // cannot do better if expression is not bound
+ this.bits |= UnnecessaryCastMask;
+ }
+
+ public void traverse(
+ ASTVisitor visitor,
+ BlockScope blockScope) {
+
+ if (visitor.visit(this, blockScope)) {
+ type.traverse(visitor, blockScope);
+ expression.traverse(visitor, blockScope);
+ }
+ visitor.endVisit(this, blockScope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/CharLiteral.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/CharLiteral.js
new file mode 100644
index 0000000..3b77ca4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/CharLiteral.js
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class CharLiteral extends NumberLiteral {
+ char value;
+public CharLiteral(char[] token, int s, int e) {
+ super(token, s, e);
+ computeValue();
+}
+public void computeConstant() {
+ //The source is a char[3] first and last char are '
+ //This is true for both regular char AND unicode char
+ //BUT not for escape char like '\b' which are char[4]....
+
+ constant = Constant.fromValue(value);
+}
+private void computeValue() {
+ //The source is a char[3] first and last char are '
+ //This is true for both regular char AND unicode char
+ //BUT not for escape char like '\b' which are char[4]....
+
+ if ((value = source[1]) != '\\')
+ return;
+ char digit;
+ switch (digit = source[2]) {
+ case 'b' :
+ value = '\b';
+ break;
+ case 't' :
+ value = '\t';
+ break;
+ case 'n' :
+ value = '\n';
+ break;
+ case 'f' :
+ value = '\f';
+ break;
+ case 'r' :
+ value = '\r';
+ break;
+ case '\"' :
+ value = '\"';
+ break;
+ case '\'' :
+ value = '\'';
+ break;
+ case '\\' :
+ value = '\\';
+ break;
+ default : //octal (well-formed: ended by a ' )
+ int number = Character.getNumericValue(digit);
+ if ((digit = source[3]) != '\'')
+ number = (number * 8) + Character.getNumericValue(digit);
+ else {
+ constant = Constant.fromValue(value = (char) number);
+ break;
+ }
+ if ((digit = source[4]) != '\'')
+ number = (number * 8) + Character.getNumericValue(digit);
+ value = (char) number;
+ break;
+ }
+}
+/**
+ * CharLiteral code generation
+ *
+ * @param currentScope org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ * @param valueRequired boolean
+ */
+public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
+ int pc = codeStream.position;
+ if (valueRequired)
+ if ((implicitConversion >> 4) == T_char)
+ codeStream.generateInlinedValue(value);
+ else
+ codeStream.generateConstant(constant, implicitConversion);
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+}
+public TypeBinding literalType(BlockScope scope) {
+ return CharBinding;
+}
+public void traverse(ASTVisitor visitor, BlockScope blockScope) {
+ visitor.visit(this, blockScope);
+ visitor.endVisit(this, blockScope);
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ClassLiteralAccess.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ClassLiteralAccess.js
new file mode 100644
index 0000000..16b98c8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ClassLiteralAccess.js
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class ClassLiteralAccess extends Expression {
+
+ public TypeReference type;
+ public TypeBinding targetType;
+ FieldBinding syntheticField;
+
+ public ClassLiteralAccess(int sourceEnd, TypeReference t) {
+ type = t;
+ this.sourceStart = t.sourceStart;
+ this.sourceEnd = sourceEnd;
+ }
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ // if reachable, request the addition of a synthetic field for caching the class descriptor
+ SourceTypeBinding sourceType =
+ currentScope.outerMostMethodScope().enclosingSourceType();
+ if ((!(sourceType.isInterface()
+ // no field generated in interface case (would'nt verify) see 1FHHEZL
+ || sourceType.isBaseType()))
+ && currentScope.environment().options.sourceLevel <= ClassFileConstants.JDK1_5) {
+ syntheticField = sourceType.addSyntheticField(targetType, currentScope);
+ }
+ return flowInfo;
+ }
+
+ /**
+ * MessageSendDotClass code generation
+ *
+ * @param currentScope org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ * @param valueRequired boolean
+ */
+ public void generateCode(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ boolean valueRequired) {
+ int pc = codeStream.position;
+
+ // in interface case, no caching occurs, since cannot make a cache field for interface
+ if (valueRequired) {
+ codeStream.generateClassLiteralAccessForType(type.resolvedType, syntheticField);
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+
+ public StringBuffer printExpression(int indent, StringBuffer output) {
+
+ return type.print(0, output).append(".class"); //$NON-NLS-1$
+ }
+
+ public TypeBinding resolveType(BlockScope scope) {
+
+ constant = NotAConstant;
+ if ((targetType = type.resolveType(scope)) == null)
+ return null;
+
+ if (targetType.isArrayType()
+ && ((ArrayBinding) targetType).leafComponentType == VoidBinding) {
+ scope.problemReporter().cannotAllocateVoidArray(this);
+ return null;
+ } else if (targetType.isTypeVariable()) {
+ scope.problemReporter().illegalClassLiteralForTypeVariable((TypeVariableBinding)targetType, this);
+ }
+ ReferenceBinding classType = scope.getJavaLangClass();
+ if (classType.isGenericType()) {
+ // Integer.class --> Class<Integer>, perform boxing of base types (int.class --> Class<Integer>)
+ this.resolvedType = scope.createParameterizedType(classType, new TypeBinding[]{ scope.boxing(targetType) }, null/*not a member*/);
+ } else {
+ this.resolvedType = classType;
+ }
+ return this.resolvedType;
+ }
+
+ public void traverse(
+ ASTVisitor visitor,
+ BlockScope blockScope) {
+
+ if (visitor.visit(this, blockScope)) {
+ type.traverse(visitor, blockScope);
+ }
+ visitor.endVisit(this, blockScope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Clinit.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Clinit.js
new file mode 100644
index 0000000..6ec9bfb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Clinit.js
@@ -0,0 +1,248 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.*;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+import org.eclipse.wst.jsdt.internal.compiler.parser.*;
+import org.eclipse.wst.jsdt.internal.compiler.problem.*;
+
+public class Clinit extends AbstractMethodDeclaration {
+
+ public final static char[] ConstantPoolName = "<clinit>".toCharArray(); //$NON-NLS-1$
+
+ private FieldBinding assertionSyntheticFieldBinding = null;
+ private FieldBinding classLiteralSyntheticField = null;
+
+ public Clinit(CompilationResult compilationResult) {
+ super(compilationResult);
+ modifiers = 0;
+ selector = ConstantPoolName;
+ }
+
+ public void analyseCode(
+ ClassScope classScope,
+ InitializationFlowContext staticInitializerFlowContext,
+ FlowInfo flowInfo) {
+
+ if (ignoreFurtherInvestigation)
+ return;
+ try {
+ ExceptionHandlingFlowContext clinitContext =
+ new ExceptionHandlingFlowContext(
+ staticInitializerFlowContext.parent,
+ this,
+ NoExceptions,
+ scope,
+ FlowInfo.DEAD_END);
+
+ // check for missing returning path
+ this.needFreeReturn = flowInfo.isReachable();
+
+ // check missing blank final field initializations
+ flowInfo = flowInfo.mergedWith(staticInitializerFlowContext.initsOnReturn);
+ FieldBinding[] fields = scope.enclosingSourceType().fields();
+ for (int i = 0, count = fields.length; i < count; i++) {
+ FieldBinding field;
+ if ((field = fields[i]).isStatic()
+ && field.isFinal()
+ && (!flowInfo.isDefinitelyAssigned(fields[i]))) {
+ scope.problemReporter().uninitializedBlankFinalField(
+ field,
+ scope.referenceType().declarationOf(field.original()));
+ // can complain against the field decl, since only one <clinit>
+ }
+ }
+ // check static initializers thrown exceptions
+ staticInitializerFlowContext.checkInitializerExceptions(
+ scope,
+ clinitContext,
+ flowInfo);
+ } catch (AbortMethod e) {
+ this.ignoreFurtherInvestigation = true;
+ }
+ }
+
+ /**
+ * Bytecode generation for a <clinit> method
+ *
+ * @param classScope org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope
+ * @param classFile org.eclipse.wst.jsdt.internal.compiler.codegen.ClassFile
+ */
+ public void generateCode(ClassScope classScope, ClassFile classFile) {
+
+ int clinitOffset = 0;
+ if (ignoreFurtherInvestigation) {
+ // should never have to add any <clinit> problem method
+ return;
+ }
+ try {
+ clinitOffset = classFile.contentsOffset;
+ this.generateCode(classScope, classFile, clinitOffset);
+ } catch (AbortMethod e) {
+ // should never occur
+ // the clinit referenceContext is the type declaration
+ // All clinit problems will be reported against the type: AbortType instead of AbortMethod
+ // reset the contentsOffset to the value before generating the clinit code
+ // decrement the number of method info as well.
+ // This is done in the addProblemMethod and addProblemConstructor for other
+ // cases.
+ if (e.compilationResult == CodeStream.RESTART_IN_WIDE_MODE) {
+ // a branch target required a goto_w, restart code gen in wide mode.
+ try {
+ classFile.contentsOffset = clinitOffset;
+ classFile.methodCount--;
+ classFile.codeStream.wideMode = true; // request wide mode
+ this.generateCode(classScope, classFile, clinitOffset);
+ // restart method generation
+ } catch (AbortMethod e2) {
+ classFile.contentsOffset = clinitOffset;
+ classFile.methodCount--;
+ }
+ } else {
+ // produce a problem method accounting for this fatal error
+ classFile.contentsOffset = clinitOffset;
+ classFile.methodCount--;
+ }
+ }
+ }
+
+ /**
+ * Bytecode generation for a <clinit> method
+ *
+ * @param classScope org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope
+ * @param classFile org.eclipse.wst.jsdt.internal.compiler.codegen.ClassFile
+ */
+ private void generateCode(
+ ClassScope classScope,
+ ClassFile classFile,
+ int clinitOffset) {
+
+ ConstantPool constantPool = classFile.constantPool;
+ int constantPoolOffset = constantPool.currentOffset;
+ int constantPoolIndex = constantPool.currentIndex;
+ classFile.generateMethodInfoHeaderForClinit();
+ int codeAttributeOffset = classFile.contentsOffset;
+ classFile.generateCodeAttributeHeader();
+ CodeStream codeStream = classFile.codeStream;
+ this.resolve(classScope);
+
+ codeStream.reset(this, classFile);
+ TypeDeclaration declaringType = classScope.referenceContext;
+
+ // initialize local positions - including initializer scope.
+ MethodScope staticInitializerScope = declaringType.staticInitializerScope;
+ staticInitializerScope.computeLocalVariablePositions(0, codeStream);
+
+ // 1.4 feature
+ // This has to be done before any other initialization
+ if (this.assertionSyntheticFieldBinding != null) {
+ // generate code related to the activation of assertion for this class
+ codeStream.generateClassLiteralAccessForType(
+ classScope.enclosingSourceType(),
+ classLiteralSyntheticField);
+ codeStream.invokeJavaLangClassDesiredAssertionStatus();
+ Label falseLabel = new Label(codeStream);
+ codeStream.ifne(falseLabel);
+ codeStream.iconst_1();
+ Label jumpLabel = new Label(codeStream);
+ codeStream.goto_(jumpLabel);
+ falseLabel.place();
+ codeStream.iconst_0();
+ jumpLabel.place();
+ codeStream.putstatic(this.assertionSyntheticFieldBinding);
+ }
+ // generate initializers
+ if (declaringType.fields != null) {
+ for (int i = 0, max = declaringType.fields.length; i < max; i++) {
+ FieldDeclaration fieldDecl;
+ if ((fieldDecl = declaringType.fields[i]).isStatic()) {
+ fieldDecl.generateCode(staticInitializerScope, codeStream);
+ }
+ }
+ }
+ if (codeStream.position == 0) {
+ // do not need to output a Clinit if no bytecodes
+ // so we reset the offset inside the byte array contents.
+ classFile.contentsOffset = clinitOffset;
+ // like we don't addd a method we need to undo the increment on the method count
+ classFile.methodCount--;
+ // reset the constant pool to its state before the clinit
+ constantPool.resetForClinit(constantPoolIndex, constantPoolOffset);
+ } else {
+ if (this.needFreeReturn) {
+ int oldPosition = codeStream.position;
+ codeStream.return_();
+ codeStream.updateLocalVariablesAttribute(oldPosition);
+ }
+ // Record the end of the clinit: point to the declaration of the class
+ codeStream.recordPositionsFrom(0, declaringType.sourceStart);
+ classFile.completeCodeAttributeForClinit(codeAttributeOffset);
+ }
+ }
+
+ public boolean isClinit() {
+
+ return true;
+ }
+
+ public boolean isInitializationMethod() {
+
+ return true;
+ }
+
+ public boolean isStatic() {
+
+ return true;
+ }
+
+ public void parseStatements(Parser parser, CompilationUnitDeclaration unit) {
+ //the clinit is filled by hand ....
+ }
+
+ public StringBuffer print(int tab, StringBuffer output) {
+
+ printIndent(tab, output).append("<clinit>()"); //$NON-NLS-1$
+ printBody(tab + 1, output);
+ return output;
+ }
+
+ public void resolve(ClassScope classScope) {
+
+ this.scope = new MethodScope(classScope, classScope.referenceContext, true);
+ }
+
+ public void traverse(
+ ASTVisitor visitor,
+ ClassScope classScope) {
+
+ visitor.visit(this, classScope);
+ visitor.endVisit(this, classScope);
+ }
+
+ // 1.4 feature
+ public void setAssertionSupport(FieldBinding assertionSyntheticFieldBinding, boolean needClassLiteralField) {
+
+ this.assertionSyntheticFieldBinding = assertionSyntheticFieldBinding;
+
+ // we need to add the field right now, because the field infos are generated before the methods
+ SourceTypeBinding sourceType =
+ this.scope.outerMostMethodScope().enclosingSourceType();
+ if (needClassLiteralField) {
+ this.classLiteralSyntheticField =
+ sourceType.addSyntheticField(sourceType, scope);
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/CompilationUnitDeclaration.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/CompilationUnitDeclaration.js
new file mode 100644
index 0000000..132dc2f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/CompilationUnitDeclaration.js
@@ -0,0 +1,323 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.core.compiler.*;
+import org.eclipse.wst.jsdt.internal.compiler.*;
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+import org.eclipse.wst.jsdt.internal.compiler.problem.*;
+
+public class CompilationUnitDeclaration
+ extends ASTNode
+ implements ProblemSeverities, ReferenceContext {
+
+ private static final char[] PACKAGE_INFO_FILE_NAME = "package-info.java".toCharArray(); //$NON-NLS-1$
+
+ public ImportReference currentPackage;
+ public ImportReference[] imports;
+ public TypeDeclaration[] types;
+ public int[][] comments;
+
+ public boolean ignoreFurtherInvestigation = false; // once pointless to investigate due to errors
+ public boolean ignoreMethodBodies = false;
+ public CompilationUnitScope scope;
+ public ProblemReporter problemReporter;
+ public CompilationResult compilationResult;
+
+ public LocalTypeBinding[] localTypes;
+ public int localTypeCount = 0;
+
+ public boolean isPropagatingInnerClassEmulation;
+
+ public CompilationUnitDeclaration(
+ ProblemReporter problemReporter,
+ CompilationResult compilationResult,
+ int sourceLength) {
+
+ this.problemReporter = problemReporter;
+ this.compilationResult = compilationResult;
+
+ //by definition of a compilation unit....
+ sourceStart = 0;
+ sourceEnd = sourceLength - 1;
+
+ }
+
+ /*
+ * We cause the compilation task to abort to a given extent.
+ */
+ public void abort(int abortLevel, IProblem problem) {
+
+ switch (abortLevel) {
+ case AbortType :
+ throw new AbortType(this.compilationResult, problem);
+ case AbortMethod :
+ throw new AbortMethod(this.compilationResult, problem);
+ default :
+ throw new AbortCompilationUnit(this.compilationResult, problem);
+ }
+ }
+
+ /*
+ * Dispatch code analysis AND request saturation of inner emulation
+ */
+ public void analyseCode() {
+
+ if (ignoreFurtherInvestigation)
+ return;
+ try {
+ if (types != null) {
+ for (int i = 0, count = types.length; i < count; i++) {
+ types[i].analyseCode(scope);
+ }
+ }
+ // request inner emulation propagation
+ propagateInnerEmulationForAllLocalTypes();
+ } catch (AbortCompilationUnit e) {
+ this.ignoreFurtherInvestigation = true;
+ return;
+ }
+ }
+
+ /*
+ * When unit result is about to be accepted, removed back pointers
+ * to compiler structures.
+ */
+ public void cleanUp() {
+ if (this.types != null) {
+ for (int i = 0, max = this.types.length; i < max; i++) {
+ cleanUp(this.types[i]);
+ }
+ for (int i = 0, max = this.localTypeCount; i < max; i++) {
+ LocalTypeBinding localType = localTypes[i];
+ // null out the type's scope backpointers
+ localType.scope = null; // local members are already in the list
+ }
+ }
+ ClassFile[] classFiles = compilationResult.getClassFiles();
+ for (int i = 0, max = classFiles.length; i < max; i++) {
+ // clear the classFile back pointer to the bindings
+ ClassFile classFile = classFiles[i];
+ // null out the classfile backpointer to a type binding
+ classFile.referenceBinding = null;
+ classFile.codeStream = null; // codeStream holds onto ast and scopes
+ classFile.innerClassesBindings = null;
+ }
+ }
+ private void cleanUp(TypeDeclaration type) {
+ if (type.memberTypes != null) {
+ for (int i = 0, max = type.memberTypes.length; i < max; i++){
+ cleanUp(type.memberTypes[i]);
+ }
+ }
+ if (type.binding != null) {
+ // null out the type's scope backpointers
+ type.binding.scope = null;
+ }
+ }
+
+ public void checkUnusedImports(){
+
+ if (this.scope.imports != null){
+ for (int i = 0, max = this.scope.imports.length; i < max; i++){
+ ImportBinding importBinding = this.scope.imports[i];
+ ImportReference importReference = importBinding.reference;
+ if (importReference != null && !importReference.used){
+ scope.problemReporter().unusedImport(importReference);
+ }
+ }
+ }
+ }
+
+ public CompilationResult compilationResult() {
+ return compilationResult;
+ }
+
+ /*
+ * Finds the matching type amoung this compilation unit types.
+ * Returns null if no type with this name is found.
+ * The type name is a compound name
+ * eg. if we're looking for X.A.B then a type name would be {X, A, B}
+ */
+ public TypeDeclaration declarationOfType(char[][] typeName) {
+
+ for (int i = 0; i < this.types.length; i++) {
+ TypeDeclaration typeDecl = this.types[i].declarationOfType(typeName);
+ if (typeDecl != null) {
+ return typeDecl;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Bytecode generation
+ */
+ public void generateCode() {
+
+ if (ignoreFurtherInvestigation) {
+ if (types != null) {
+ for (int i = 0, count = types.length; i < count; i++) {
+ types[i].ignoreFurtherInvestigation = true;
+ // propagate the flag to request problem type creation
+ types[i].generateCode(scope);
+ }
+ }
+ return;
+ }
+ try {
+ if (types != null) {
+ for (int i = 0, count = types.length; i < count; i++)
+ types[i].generateCode(scope);
+ }
+ } catch (AbortCompilationUnit e) {
+ // ignore
+ }
+ }
+
+ public char[] getFileName() {
+
+ return compilationResult.getFileName();
+ }
+
+ public char[] getMainTypeName() {
+
+ if (compilationResult.compilationUnit == null) {
+ char[] fileName = compilationResult.getFileName();
+
+ int start = CharOperation.lastIndexOf('/', fileName) + 1;
+ if (start == 0 || start < CharOperation.lastIndexOf('\\', fileName))
+ start = CharOperation.lastIndexOf('\\', fileName) + 1;
+
+ int end = CharOperation.lastIndexOf('.', fileName);
+ if (end == -1)
+ end = fileName.length;
+
+ return CharOperation.subarray(fileName, start, end);
+ } else {
+ return compilationResult.compilationUnit.getMainTypeName();
+ }
+ }
+
+ public boolean isEmpty() {
+
+ return (currentPackage == null) && (imports == null) && (types == null);
+ }
+
+ public boolean hasErrors() {
+ return this.ignoreFurtherInvestigation;
+ }
+
+ public StringBuffer print(int indent, StringBuffer output) {
+
+ if (currentPackage != null) {
+ printIndent(indent, output).append("package "); //$NON-NLS-1$
+ currentPackage.print(0, output, false).append(";\n"); //$NON-NLS-1$
+ }
+ if (imports != null)
+ for (int i = 0; i < imports.length; i++) {
+ printIndent(indent, output).append("import "); //$NON-NLS-1$
+ imports[i].print(0, output).append(";\n"); //$NON-NLS-1$
+ }
+
+ if (types != null) {
+ for (int i = 0; i < types.length; i++) {
+ types[i].print(indent, output).append("\n"); //$NON-NLS-1$
+ }
+ }
+ return output;
+ }
+
+ /*
+ * Force inner local types to update their innerclass emulation
+ */
+ public void propagateInnerEmulationForAllLocalTypes() {
+
+ isPropagatingInnerClassEmulation = true;
+ for (int i = 0, max = this.localTypeCount; i < max; i++) {
+
+ LocalTypeBinding localType = localTypes[i];
+ // only propagate for reachable local types
+ if ((localType.scope.referenceType().bits & IsReachableMASK) != 0) {
+ localType.updateInnerEmulationDependents();
+ }
+ }
+ }
+
+ /*
+ * Keep track of all local types, so as to update their innerclass
+ * emulation later on.
+ */
+ public void record(LocalTypeBinding localType) {
+
+ if (this.localTypeCount == 0) {
+ this.localTypes = new LocalTypeBinding[5];
+ } else if (this.localTypeCount == this.localTypes.length) {
+ System.arraycopy(this.localTypes, 0, (this.localTypes = new LocalTypeBinding[this.localTypeCount * 2]), 0, this.localTypeCount);
+ }
+ this.localTypes[this.localTypeCount++] = localType;
+ }
+
+ public void resolve() {
+ if (this.currentPackage != null) {
+ if (this.currentPackage.annotations != null
+ && !CharOperation.endsWith(getFileName(), PACKAGE_INFO_FILE_NAME)) {
+ scope.problemReporter().invalidFileNameForPackageAnnotations(this.currentPackage.annotations[0]);
+ }
+ }
+ try {
+ if (types != null) {
+ for (int i = 0, count = types.length; i < count; i++) {
+ types[i].resolve(scope);
+ }
+ }
+ if (!this.compilationResult.hasSyntaxError()) checkUnusedImports();
+ } catch (AbortCompilationUnit e) {
+ this.ignoreFurtherInvestigation = true;
+ return;
+ }
+ }
+
+ public void tagAsHavingErrors() {
+ ignoreFurtherInvestigation = true;
+ }
+
+ public void traverse(
+ ASTVisitor visitor,
+ CompilationUnitScope unitScope) {
+
+ if (ignoreFurtherInvestigation)
+ return;
+ try {
+ if (visitor.visit(this, this.scope)) {
+ if (currentPackage != null) {
+ currentPackage.traverse(visitor, this.scope);
+ }
+ if (imports != null) {
+ int importLength = imports.length;
+ for (int i = 0; i < importLength; i++) {
+ imports[i].traverse(visitor, this.scope);
+ }
+ }
+ if (types != null) {
+ int typesLength = types.length;
+ for (int i = 0; i < typesLength; i++) {
+ types[i].traverse(visitor, this.scope);
+ }
+ }
+ }
+ visitor.endVisit(this, this.scope);
+ } catch (AbortCompilationUnit e) {
+ // ignore
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/CompoundAssignment.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/CompoundAssignment.js
new file mode 100644
index 0000000..d52f8d8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/CompoundAssignment.js
@@ -0,0 +1,158 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class CompoundAssignment extends Assignment implements OperatorIds {
+ public int operator;
+ public int assignmentImplicitConversion;
+
+ // var op exp is equivalent to var = (varType) var op exp
+ // assignmentImplicitConversion stores the cast needed for the assignment
+
+ public CompoundAssignment(Expression lhs, Expression expression,int operator, int sourceEnd) {
+ //lhs is always a reference by construction ,
+ //but is build as an expression ==> the checkcast cannot fail
+
+ super(lhs, expression, sourceEnd);
+ lhs.bits &= ~IsStrictlyAssignedMASK; // tag lhs as NON assigned - it is also a read access
+ lhs.bits |= IsCompoundAssignedMASK; // tag lhs as assigned by compound
+ this.operator = operator ;
+ }
+
+ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
+ // record setting a variable: various scenarii are possible, setting an array reference,
+ // a field reference, a blank final field reference, a field of an enclosing instance or
+ // just a local variable.
+
+ return ((Reference) lhs).analyseAssignment(currentScope, flowContext, flowInfo, this, true).unconditionalInits();
+ }
+
+ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
+
+ // various scenarii are possible, setting an array reference,
+ // a field reference, a blank final field reference, a field of an enclosing instance or
+ // just a local variable.
+
+ int pc = codeStream.position;
+ ((Reference) lhs).generateCompoundAssignment(currentScope, codeStream, expression, operator, assignmentImplicitConversion, valueRequired);
+ if (valueRequired) {
+ codeStream.generateImplicitConversion(implicitConversion);
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+
+ public String operatorToString() {
+ switch (operator) {
+ case PLUS :
+ return "+="; //$NON-NLS-1$
+ case MINUS :
+ return "-="; //$NON-NLS-1$
+ case MULTIPLY :
+ return "*="; //$NON-NLS-1$
+ case DIVIDE :
+ return "/="; //$NON-NLS-1$
+ case AND :
+ return "&="; //$NON-NLS-1$
+ case OR :
+ return "|="; //$NON-NLS-1$
+ case XOR :
+ return "^="; //$NON-NLS-1$
+ case REMAINDER :
+ return "%="; //$NON-NLS-1$
+ case LEFT_SHIFT :
+ return "<<="; //$NON-NLS-1$
+ case RIGHT_SHIFT :
+ return ">>="; //$NON-NLS-1$
+ case UNSIGNED_RIGHT_SHIFT :
+ return ">>>="; //$NON-NLS-1$
+ }
+ return "unknown operator"; //$NON-NLS-1$
+ }
+
+ public StringBuffer printExpressionNoParenthesis(int indent, StringBuffer output) {
+
+ lhs.printExpression(indent, output).append(' ').append(operatorToString()).append(' ');
+ return expression.printExpression(0, output) ;
+ }
+
+ public TypeBinding resolveType(BlockScope scope) {
+ constant = NotAConstant;
+ if (!(this.lhs instanceof Reference) || this.lhs.isThis()) {
+ scope.problemReporter().expressionShouldBeAVariable(this.lhs);
+ return null;
+ }
+ TypeBinding lhsType = lhs.resolveType(scope);
+ TypeBinding expressionType = expression.resolveType(scope);
+ if (lhsType == null || expressionType == null)
+ return null;
+
+ int lhsId = lhsType.id;
+ int expressionId = expressionType.id;
+ if (restrainUsageToNumericTypes() && !lhsType.isNumericType()) {
+ scope.problemReporter().operatorOnlyValidOnNumericType(this, lhsType, expressionType);
+ return null;
+ }
+ if (lhsId > 15 || expressionId > 15) {
+ if (lhsId != T_String) { // String += Thread is valid whereas Thread += String is not
+ scope.problemReporter().invalidOperator(this, lhsType, expressionType);
+ return null;
+ }
+ expressionId = T_Object; // use the Object has tag table
+ }
+
+ // the code is an int
+ // (cast) left Op (cast) rigth --> result
+ // 0000 0000 0000 0000 0000
+ // <<16 <<12 <<8 <<4 <<0
+
+ // the conversion is stored INTO the reference (info needed for the code gen)
+ int result = OperatorExpression.OperatorSignatures[operator][ (lhsId << 4) + expressionId];
+ if (result == T_undefined) {
+ scope.problemReporter().invalidOperator(this, lhsType, expressionType);
+ return null;
+ }
+ if (operator == PLUS){
+ if(lhsId == T_JavaLangObject) {
+ // <Object> += <String> is illegal (39248)
+ scope.problemReporter().invalidOperator(this, lhsType, expressionType);
+ return null;
+ } else {
+ // <int | boolean> += <String> is illegal
+ if ((lhsType.isNumericType() || lhsId == T_boolean) && !expressionType.isNumericType()){
+ scope.problemReporter().invalidOperator(this, lhsType, expressionType);
+ return null;
+ }
+ }
+ }
+ // TODO (philippe) should retrofit in using #computeConversion
+ lhs.implicitConversion = result >>> 12;
+ expression.implicitConversion = (result >>> 4) & 0x000FF;
+ assignmentImplicitConversion = (lhsId << 4) + (result & 0x0000F);
+ return this.resolvedType = lhsType;
+ }
+
+ public boolean restrainUsageToNumericTypes(){
+ return false ;
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+ if (visitor.visit(this, scope)) {
+ lhs.traverse(visitor, scope);
+ expression.traverse(visitor, scope);
+ }
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ConditionalExpression.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ConditionalExpression.js
new file mode 100644
index 0000000..6299b09
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ConditionalExpression.js
@@ -0,0 +1,416 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class ConditionalExpression extends OperatorExpression {
+
+ public Expression condition, valueIfTrue, valueIfFalse;
+ public Constant optimizedBooleanConstant;
+ public Constant optimizedIfTrueConstant;
+ public Constant optimizedIfFalseConstant;
+
+ // for local variables table attributes
+ int trueInitStateIndex = -1;
+ int falseInitStateIndex = -1;
+ int mergedInitStateIndex = -1;
+
+ public ConditionalExpression(
+ Expression condition,
+ Expression valueIfTrue,
+ Expression valueIfFalse) {
+ this.condition = condition;
+ this.valueIfTrue = valueIfTrue;
+ this.valueIfFalse = valueIfFalse;
+ sourceStart = condition.sourceStart;
+ sourceEnd = valueIfFalse.sourceEnd;
+ }
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ Constant cst = this.condition.optimizedBooleanConstant();
+ boolean isConditionOptimizedTrue = cst != NotAConstant && cst.booleanValue() == true;
+ boolean isConditionOptimizedFalse = cst != NotAConstant && cst.booleanValue() == false;
+
+ int mode = flowInfo.reachMode();
+ flowInfo = condition.analyseCode(currentScope, flowContext, flowInfo, cst == NotAConstant);
+
+ // process the if-true part
+ FlowInfo trueFlowInfo = flowInfo.initsWhenTrue().copy();
+ if (isConditionOptimizedFalse) {
+ trueFlowInfo.setReachMode(FlowInfo.UNREACHABLE);
+ }
+ trueInitStateIndex = currentScope.methodScope().recordInitializationStates(trueFlowInfo);
+ trueFlowInfo = valueIfTrue.analyseCode(currentScope, flowContext, trueFlowInfo);
+
+ // process the if-false part
+ FlowInfo falseFlowInfo = flowInfo.initsWhenFalse().copy();
+ if (isConditionOptimizedTrue) {
+ falseFlowInfo.setReachMode(FlowInfo.UNREACHABLE);
+ }
+ falseInitStateIndex = currentScope.methodScope().recordInitializationStates(falseFlowInfo);
+ falseFlowInfo = valueIfFalse.analyseCode(currentScope, flowContext, falseFlowInfo);
+
+ // merge if-true & if-false initializations
+ FlowInfo mergedInfo;
+ if (isConditionOptimizedTrue){
+ mergedInfo = trueFlowInfo.addPotentialInitializationsFrom(falseFlowInfo);
+ } else if (isConditionOptimizedFalse) {
+ mergedInfo = falseFlowInfo.addPotentialInitializationsFrom(trueFlowInfo);
+ } else {
+ // if ((t && (v = t)) ? t : t && (v = f)) r = v; -- ok
+ cst = this.optimizedIfTrueConstant;
+ boolean isValueIfTrueOptimizedTrue = cst != null && cst != NotAConstant && cst.booleanValue() == true;
+ boolean isValueIfTrueOptimizedFalse = cst != null && cst != NotAConstant && cst.booleanValue() == false;
+
+ cst = this.optimizedIfFalseConstant;
+ boolean isValueIfFalseOptimizedTrue = cst != null && cst != NotAConstant && cst.booleanValue() == true;
+ boolean isValueIfFalseOptimizedFalse = cst != null && cst != NotAConstant && cst.booleanValue() == false;
+
+ UnconditionalFlowInfo trueInfoWhenTrue = trueFlowInfo.initsWhenTrue().copy().unconditionalInits();
+ if (isValueIfTrueOptimizedFalse) trueInfoWhenTrue.setReachMode(FlowInfo.UNREACHABLE);
+
+ UnconditionalFlowInfo falseInfoWhenTrue = falseFlowInfo.initsWhenTrue().copy().unconditionalInits();
+ if (isValueIfFalseOptimizedFalse) falseInfoWhenTrue.setReachMode(FlowInfo.UNREACHABLE);
+
+ UnconditionalFlowInfo trueInfoWhenFalse = trueFlowInfo.initsWhenFalse().copy().unconditionalInits();
+ if (isValueIfTrueOptimizedTrue) trueInfoWhenFalse.setReachMode(FlowInfo.UNREACHABLE);
+
+ UnconditionalFlowInfo falseInfoWhenFalse = falseFlowInfo.initsWhenFalse().copy().unconditionalInits();
+ if (isValueIfFalseOptimizedTrue) falseInfoWhenFalse.setReachMode(FlowInfo.UNREACHABLE);
+
+ mergedInfo =
+ FlowInfo.conditional(
+ trueInfoWhenTrue.mergedWith(falseInfoWhenTrue),
+ trueInfoWhenFalse.mergedWith(falseInfoWhenFalse));
+ }
+ mergedInitStateIndex =
+ currentScope.methodScope().recordInitializationStates(mergedInfo);
+ mergedInfo.setReachMode(mode);
+ return mergedInfo;
+ }
+
+ /**
+ * Code generation for the conditional operator ?:
+ *
+ * @param currentScope org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ * @param valueRequired boolean
+ */
+ public void generateCode(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ boolean valueRequired) {
+
+ int pc = codeStream.position;
+ Label endifLabel, falseLabel;
+ if (constant != NotAConstant) {
+ if (valueRequired)
+ codeStream.generateConstant(constant, implicitConversion);
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ return;
+ }
+ Constant cst = condition.constant;
+ Constant condCst = condition.optimizedBooleanConstant();
+ boolean needTruePart =
+ !(((cst != NotAConstant) && (cst.booleanValue() == false))
+ || ((condCst != NotAConstant) && (condCst.booleanValue() == false)));
+ boolean needFalsePart =
+ !(((cst != NotAConstant) && (cst.booleanValue() == true))
+ || ((condCst != NotAConstant) && (condCst.booleanValue() == true)));
+ endifLabel = new Label(codeStream);
+
+ // Generate code for the condition
+ boolean needConditionValue = (cst == NotAConstant) && (condCst == NotAConstant);
+ condition.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ null,
+ (falseLabel = new Label(codeStream)),
+ needConditionValue);
+
+ if (trueInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(
+ currentScope,
+ trueInitStateIndex);
+ codeStream.addDefinitelyAssignedVariables(currentScope, trueInitStateIndex);
+ }
+ // Then code generation
+ if (needTruePart) {
+ valueIfTrue.generateCode(currentScope, codeStream, valueRequired);
+ if (needFalsePart) {
+ // Jump over the else part
+ int position = codeStream.position;
+ codeStream.goto_(endifLabel);
+ codeStream.updateLastRecordedEndPC(position);
+ // Tune codestream stack size
+ if (valueRequired) {
+ codeStream.decrStackSize(this.resolvedType == LongBinding || this.resolvedType == DoubleBinding ? 2 : 1);
+ }
+ }
+ }
+ if (needFalsePart) {
+ falseLabel.place();
+ if (falseInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(
+ currentScope,
+ falseInitStateIndex);
+ codeStream.addDefinitelyAssignedVariables(currentScope, falseInitStateIndex);
+ }
+ valueIfFalse.generateCode(currentScope, codeStream, valueRequired);
+ // End of if statement
+ endifLabel.place();
+ }
+ // May loose some local variable initializations : affecting the local variable attributes
+ if (mergedInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(
+ currentScope,
+ mergedInitStateIndex);
+ }
+ // implicit conversion
+ if (valueRequired)
+ codeStream.generateImplicitConversion(implicitConversion);
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+
+ /**
+ * Optimized boolean code generation for the conditional operator ?:
+ */
+ public void generateOptimizedBoolean(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ Label trueLabel,
+ Label falseLabel,
+ boolean valueRequired) {
+
+ if ((constant != Constant.NotAConstant) && (constant.typeID() == T_boolean) // constant
+ || (valueIfTrue.implicitConversion >> 4) != T_boolean) { // non boolean values
+ super.generateOptimizedBoolean(currentScope, codeStream, trueLabel, falseLabel, valueRequired);
+ return;
+ }
+ Constant cst = condition.constant;
+ Constant condCst = condition.optimizedBooleanConstant();
+ boolean needTruePart =
+ !(((cst != NotAConstant) && (cst.booleanValue() == false))
+ || ((condCst != NotAConstant) && (condCst.booleanValue() == false)));
+ boolean needFalsePart =
+ !(((cst != NotAConstant) && (cst.booleanValue() == true))
+ || ((condCst != NotAConstant) && (condCst.booleanValue() == true)));
+
+ Label internalFalseLabel, endifLabel = new Label(codeStream);
+
+ // Generate code for the condition
+ boolean needConditionValue = (cst == NotAConstant) && (condCst == NotAConstant);
+ condition.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ null,
+ internalFalseLabel = new Label(codeStream),
+ needConditionValue);
+
+ if (trueInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(
+ currentScope,
+ trueInitStateIndex);
+ codeStream.addDefinitelyAssignedVariables(currentScope, trueInitStateIndex);
+ }
+ // Then code generation
+ if (needTruePart) {
+ valueIfTrue.generateOptimizedBoolean(currentScope, codeStream, trueLabel, falseLabel, valueRequired);
+
+ if (needFalsePart) {
+ // Jump over the else part
+ int position = codeStream.position;
+ codeStream.goto_(endifLabel);
+ codeStream.updateLastRecordedEndPC(position);
+ // No need to decrement codestream stack size
+ // since valueIfTrue was already consumed by branch bytecode
+ }
+ }
+ if (needFalsePart) {
+ internalFalseLabel.place();
+ if (falseInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(currentScope, falseInitStateIndex);
+ codeStream.addDefinitelyAssignedVariables(currentScope, falseInitStateIndex);
+ }
+ valueIfFalse.generateOptimizedBoolean(currentScope, codeStream, trueLabel, falseLabel, valueRequired);
+
+ // End of if statement
+ endifLabel.place();
+ }
+ // May loose some local variable initializations : affecting the local variable attributes
+ if (mergedInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(currentScope, mergedInitStateIndex);
+ }
+ // no implicit conversion for boolean values
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ }
+
+ public Constant optimizedBooleanConstant() {
+
+ return this.optimizedBooleanConstant == null ? this.constant : this.optimizedBooleanConstant;
+ }
+
+ public StringBuffer printExpressionNoParenthesis(int indent, StringBuffer output) {
+
+ condition.printExpression(indent, output).append(" ? "); //$NON-NLS-1$
+ valueIfTrue.printExpression(0, output).append(" : "); //$NON-NLS-1$
+ return valueIfFalse.printExpression(0, output);
+ }
+
+ public TypeBinding resolveType(BlockScope scope) {
+ // specs p.368
+ constant = NotAConstant;
+ TypeBinding conditionType = condition.resolveTypeExpecting(scope, BooleanBinding);
+
+ if (valueIfTrue instanceof CastExpression) valueIfTrue.bits |= IgnoreNeedForCastCheckMASK; // will check later on
+ TypeBinding valueIfTrueType = valueIfTrue.resolveType(scope);
+
+ if (valueIfFalse instanceof CastExpression) valueIfFalse.bits |= IgnoreNeedForCastCheckMASK; // will check later on
+ TypeBinding valueIfFalseType = valueIfFalse.resolveType(scope);
+
+ if (conditionType == null || valueIfTrueType == null || valueIfFalseType == null)
+ return null;
+
+ // Propagate the constant value from the valueIfTrue and valueIFFalse expression if it is possible
+ Constant condConstant, trueConstant, falseConstant;
+ if ((condConstant = condition.constant) != NotAConstant
+ && (trueConstant = valueIfTrue.constant) != NotAConstant
+ && (falseConstant = valueIfFalse.constant) != NotAConstant) {
+ // all terms are constant expression so we can propagate the constant
+ // from valueIFTrue or valueIfFalse to teh receiver constant
+ constant = condConstant.booleanValue() ? trueConstant : falseConstant;
+ }
+ if (valueIfTrueType == valueIfFalseType) { // harmed the implicit conversion
+ valueIfTrue.computeConversion(scope, valueIfTrueType, valueIfTrueType);
+ valueIfFalse.implicitConversion = valueIfTrue.implicitConversion;
+ if (valueIfTrueType == BooleanBinding) {
+ this.optimizedIfTrueConstant = valueIfTrue.optimizedBooleanConstant();
+ this.optimizedIfFalseConstant = valueIfFalse.optimizedBooleanConstant();
+ if (this.optimizedIfTrueConstant != NotAConstant
+ && this.optimizedIfFalseConstant != NotAConstant
+ && this.optimizedIfTrueConstant.booleanValue() == this.optimizedIfFalseConstant.booleanValue()) {
+ // a ? true : true / a ? false : false
+ this.optimizedBooleanConstant = optimizedIfTrueConstant;
+ } else if ((condConstant = condition.optimizedBooleanConstant()) != NotAConstant) { // Propagate the optimized boolean constant if possible
+ this.optimizedBooleanConstant = condConstant.booleanValue()
+ ? this.optimizedIfTrueConstant
+ : this.optimizedIfFalseConstant;
+ }
+ }
+ return this.resolvedType = valueIfTrueType;
+ }
+ // Determine the return type depending on argument types
+ // Numeric types
+ if (valueIfTrueType.isNumericType() && valueIfFalseType.isNumericType()) {
+ // (Short x Byte) or (Byte x Short)"
+ if ((valueIfTrueType == ByteBinding && valueIfFalseType == ShortBinding)
+ || (valueIfTrueType == ShortBinding && valueIfFalseType == ByteBinding)) {
+ valueIfTrue.computeConversion(scope, ShortBinding, valueIfTrueType);
+ valueIfFalse.computeConversion(scope, ShortBinding, valueIfFalseType);
+ return this.resolvedType = ShortBinding;
+ }
+ // <Byte|Short|Char> x constant(Int) ---> <Byte|Short|Char> and reciprocally
+ if ((valueIfTrueType == ByteBinding || valueIfTrueType == ShortBinding || valueIfTrueType == CharBinding)
+ && (valueIfFalseType == IntBinding
+ && valueIfFalse.isConstantValueOfTypeAssignableToType(valueIfFalseType, valueIfTrueType))) {
+ valueIfTrue.computeConversion(scope, valueIfTrueType, valueIfTrueType);
+ valueIfFalse.computeConversion(scope, valueIfTrueType, valueIfFalseType);
+ return this.resolvedType = valueIfTrueType;
+ }
+ if ((valueIfFalseType == ByteBinding
+ || valueIfFalseType == ShortBinding
+ || valueIfFalseType == CharBinding)
+ && (valueIfTrueType == IntBinding
+ && valueIfTrue.isConstantValueOfTypeAssignableToType(valueIfTrueType, valueIfFalseType))) {
+ valueIfTrue.computeConversion(scope, valueIfFalseType, valueIfTrueType);
+ valueIfFalse.computeConversion(scope, valueIfFalseType, valueIfFalseType);
+ return this.resolvedType = valueIfFalseType;
+ }
+ // Manual binary numeric promotion
+ // int
+ if (BaseTypeBinding.isNarrowing(valueIfTrueType.id, T_int)
+ && BaseTypeBinding.isNarrowing(valueIfFalseType.id, T_int)) {
+ valueIfTrue.computeConversion(scope, IntBinding, valueIfTrueType);
+ valueIfFalse.computeConversion(scope, IntBinding, valueIfFalseType);
+ return this.resolvedType = IntBinding;
+ }
+ // long
+ if (BaseTypeBinding.isNarrowing(valueIfTrueType.id, T_long)
+ && BaseTypeBinding.isNarrowing(valueIfFalseType.id, T_long)) {
+ valueIfTrue.computeConversion(scope, LongBinding, valueIfTrueType);
+ valueIfFalse.computeConversion(scope, LongBinding, valueIfFalseType);
+ return this.resolvedType = LongBinding;
+ }
+ // float
+ if (BaseTypeBinding.isNarrowing(valueIfTrueType.id, T_float)
+ && BaseTypeBinding.isNarrowing(valueIfFalseType.id, T_float)) {
+ valueIfTrue.computeConversion(scope, FloatBinding, valueIfTrueType);
+ valueIfFalse.computeConversion(scope, FloatBinding, valueIfFalseType);
+ return this.resolvedType = FloatBinding;
+ }
+ // double
+ valueIfTrue.computeConversion(scope, DoubleBinding, valueIfTrueType);
+ valueIfFalse.computeConversion(scope, DoubleBinding, valueIfFalseType);
+ return this.resolvedType = DoubleBinding;
+ }
+ // Type references (null null is already tested)
+ if ((valueIfTrueType.isBaseType() && valueIfTrueType != NullBinding)
+ || (valueIfFalseType.isBaseType() && valueIfFalseType != NullBinding)) {
+ scope.problemReporter().conditionalArgumentsIncompatibleTypes(
+ this,
+ valueIfTrueType,
+ valueIfFalseType);
+ return null;
+ }
+ if (valueIfFalseType.isCompatibleWith(valueIfTrueType)) {
+ valueIfTrue.computeConversion(scope, valueIfTrueType, valueIfTrueType);
+ valueIfFalse.computeConversion(scope, valueIfTrueType, valueIfFalseType);
+ return this.resolvedType = valueIfTrueType;
+ }
+ if (valueIfTrueType.isCompatibleWith(valueIfFalseType)) {
+ valueIfTrue.computeConversion(scope, valueIfFalseType, valueIfTrueType);
+ valueIfFalse.computeConversion(scope, valueIfFalseType, valueIfFalseType);
+ return this.resolvedType = valueIfFalseType;
+ }
+ // 1.5 addition: allow most common type
+ if (scope.environment().options.sourceLevel >= ClassFileConstants.JDK1_5) {
+ TypeBinding commonType = scope.lowerUpperBound(new TypeBinding[] { valueIfTrueType, valueIfFalseType });
+// TypeBinding commonType = scope.mostSpecificCommonType(new TypeBinding[] { valueIfTrueType, valueIfFalseType });
+ if (commonType != null) {
+ return this.resolvedType = commonType;
+ }
+ }
+ scope.problemReporter().conditionalArgumentsIncompatibleTypes(
+ this,
+ valueIfTrueType,
+ valueIfFalseType);
+ return null;
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+ if (visitor.visit(this, scope)) {
+ condition.traverse(visitor, scope);
+ valueIfTrue.traverse(visitor, scope);
+ valueIfFalse.traverse(visitor, scope);
+ }
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ConstructorDeclaration.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ConstructorDeclaration.js
new file mode 100644
index 0000000..278f87e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ConstructorDeclaration.js
@@ -0,0 +1,467 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import java.util.ArrayList;
+
+import org.eclipse.wst.jsdt.core.compiler.*;
+import org.eclipse.wst.jsdt.internal.compiler.*;
+import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+import org.eclipse.wst.jsdt.internal.compiler.parser.*;
+import org.eclipse.wst.jsdt.internal.compiler.problem.*;
+
+public class ConstructorDeclaration extends AbstractMethodDeclaration {
+
+ public ExplicitConstructorCall constructorCall;
+ public final static char[] ConstantPoolName = "<init>".toCharArray(); //$NON-NLS-1$
+ public boolean isDefaultConstructor = false;
+ public TypeParameter[] typeParameters;
+
+ public ConstructorDeclaration(CompilationResult compilationResult){
+ super(compilationResult);
+ }
+
+ public void analyseCode(
+ ClassScope classScope,
+ InitializationFlowContext initializerFlowContext,
+ FlowInfo flowInfo) {
+
+ if (ignoreFurtherInvestigation)
+ return;
+
+ if (this.binding != null && this.binding.isPrivate() && !this.binding.isPrivateUsed()) {
+ if (!classScope.referenceCompilationUnit().compilationResult.hasSyntaxError()) {
+ scope.problemReporter().unusedPrivateConstructor(this);
+ }
+ }
+
+ // check constructor recursion, once all constructor got resolved
+ if (isRecursive(null /*lazy initialized visited list*/)) {
+ this.scope.problemReporter().recursiveConstructorInvocation(this.constructorCall);
+ }
+
+ try {
+ ExceptionHandlingFlowContext constructorContext =
+ new ExceptionHandlingFlowContext(
+ initializerFlowContext.parent,
+ this,
+ binding.thrownExceptions,
+ scope,
+ FlowInfo.DEAD_END);
+ initializerFlowContext.checkInitializerExceptions(
+ scope,
+ constructorContext,
+ flowInfo);
+
+ // anonymous constructor can gain extra thrown exceptions from unhandled ones
+ if (binding.declaringClass.isAnonymousType()) {
+ ArrayList computedExceptions = constructorContext.extendedExceptions;
+ if (computedExceptions != null){
+ int size;
+ if ((size = computedExceptions.size()) > 0){
+ ReferenceBinding[] actuallyThrownExceptions;
+ computedExceptions.toArray(actuallyThrownExceptions = new ReferenceBinding[size]);
+ binding.thrownExceptions = actuallyThrownExceptions;
+ }
+ }
+ }
+
+ // propagate to constructor call
+ if (constructorCall != null) {
+ // if calling 'this(...)', then flag all non-static fields as definitely
+ // set since they are supposed to be set inside other local constructor
+ if (constructorCall.accessMode == ExplicitConstructorCall.This) {
+ FieldBinding[] fields = binding.declaringClass.fields();
+ for (int i = 0, count = fields.length; i < count; i++) {
+ FieldBinding field;
+ if (!(field = fields[i]).isStatic()) {
+ flowInfo.markAsDefinitelyAssigned(field);
+ }
+ }
+ }
+ flowInfo = constructorCall.analyseCode(scope, constructorContext, flowInfo);
+ }
+ // propagate to statements
+ if (statements != null) {
+ boolean didAlreadyComplain = false;
+ for (int i = 0, count = statements.length; i < count; i++) {
+ Statement stat = statements[i];
+ if (!stat.complainIfUnreachable(flowInfo, scope, didAlreadyComplain)) {
+ flowInfo = stat.analyseCode(scope, constructorContext, flowInfo);
+ } else {
+ didAlreadyComplain = true;
+ }
+ }
+ }
+ // check for missing returning path
+ this.needFreeReturn = flowInfo.isReachable();
+
+ // check missing blank final field initializations
+ if ((constructorCall != null)
+ && (constructorCall.accessMode != ExplicitConstructorCall.This)) {
+ flowInfo = flowInfo.mergedWith(constructorContext.initsOnReturn);
+ FieldBinding[] fields = binding.declaringClass.fields();
+ for (int i = 0, count = fields.length; i < count; i++) {
+ FieldBinding field;
+ if ((!(field = fields[i]).isStatic())
+ && field.isFinal()
+ && (!flowInfo.isDefinitelyAssigned(fields[i]))) {
+ scope.problemReporter().uninitializedBlankFinalField(
+ field,
+ isDefaultConstructor ? (ASTNode) scope.referenceType() : this);
+ }
+ }
+ }
+ // check unreachable catch blocks
+ constructorContext.complainIfUnusedExceptionHandlers(this);
+ } catch (AbortMethod e) {
+ this.ignoreFurtherInvestigation = true;
+ }
+ }
+
+ /**
+ * Bytecode generation for a constructor
+ *
+ * @param classScope org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope
+ * @param classFile org.eclipse.wst.jsdt.internal.compiler.codegen.ClassFile
+ */
+ public void generateCode(ClassScope classScope, ClassFile classFile) {
+
+ int problemResetPC = 0;
+ if (ignoreFurtherInvestigation) {
+ if (this.binding == null)
+ return; // Handle methods with invalid signature or duplicates
+ int problemsLength;
+ IProblem[] problems =
+ scope.referenceCompilationUnit().compilationResult.getProblems();
+ IProblem[] problemsCopy = new IProblem[problemsLength = problems.length];
+ System.arraycopy(problems, 0, problemsCopy, 0, problemsLength);
+ classFile.addProblemConstructor(this, binding, problemsCopy);
+ return;
+ }
+ try {
+ problemResetPC = classFile.contentsOffset;
+ this.internalGenerateCode(classScope, classFile);
+ } catch (AbortMethod e) {
+ if (e.compilationResult == CodeStream.RESTART_IN_WIDE_MODE) {
+ // a branch target required a goto_w, restart code gen in wide mode.
+ try {
+ classFile.contentsOffset = problemResetPC;
+ classFile.methodCount--;
+ classFile.codeStream.wideMode = true; // request wide mode
+ this.internalGenerateCode(classScope, classFile); // restart method generation
+ } catch (AbortMethod e2) {
+ int problemsLength;
+ IProblem[] problems =
+ scope.referenceCompilationUnit().compilationResult.getAllProblems();
+ IProblem[] problemsCopy = new IProblem[problemsLength = problems.length];
+ System.arraycopy(problems, 0, problemsCopy, 0, problemsLength);
+ classFile.addProblemConstructor(this, binding, problemsCopy, problemResetPC);
+ }
+ } else {
+ int problemsLength;
+ IProblem[] problems =
+ scope.referenceCompilationUnit().compilationResult.getAllProblems();
+ IProblem[] problemsCopy = new IProblem[problemsLength = problems.length];
+ System.arraycopy(problems, 0, problemsCopy, 0, problemsLength);
+ classFile.addProblemConstructor(this, binding, problemsCopy, problemResetPC);
+ }
+ }
+ }
+
+ public void generateSyntheticFieldInitializationsIfNecessary(
+ MethodScope methodScope,
+ CodeStream codeStream,
+ ReferenceBinding declaringClass) {
+
+ if (!declaringClass.isNestedType()) return;
+
+ NestedTypeBinding nestedType = (NestedTypeBinding) declaringClass;
+
+ SyntheticArgumentBinding[] syntheticArgs = nestedType.syntheticEnclosingInstances();
+ for (int i = 0, max = syntheticArgs == null ? 0 : syntheticArgs.length; i < max; i++) {
+ SyntheticArgumentBinding syntheticArg;
+ if ((syntheticArg = syntheticArgs[i]).matchingField != null) {
+ codeStream.aload_0();
+ codeStream.load(syntheticArg);
+ codeStream.putfield(syntheticArg.matchingField);
+ }
+ }
+ syntheticArgs = nestedType.syntheticOuterLocalVariables();
+ for (int i = 0, max = syntheticArgs == null ? 0 : syntheticArgs.length; i < max; i++) {
+ SyntheticArgumentBinding syntheticArg;
+ if ((syntheticArg = syntheticArgs[i]).matchingField != null) {
+ codeStream.aload_0();
+ codeStream.load(syntheticArg);
+ codeStream.putfield(syntheticArg.matchingField);
+ }
+ }
+ }
+
+ private void internalGenerateCode(ClassScope classScope, ClassFile classFile) {
+
+ classFile.generateMethodInfoHeader(binding);
+ int methodAttributeOffset = classFile.contentsOffset;
+ int attributeNumber = classFile.generateMethodInfoAttribute(binding);
+ if ((!binding.isNative()) && (!binding.isAbstract())) {
+
+ TypeDeclaration declaringType = classScope.referenceContext;
+ int codeAttributeOffset = classFile.contentsOffset;
+ classFile.generateCodeAttributeHeader();
+ CodeStream codeStream = classFile.codeStream;
+ codeStream.reset(this, classFile);
+
+ // initialize local positions - including initializer scope.
+ ReferenceBinding declaringClass = binding.declaringClass;
+
+ int argSlotSize = 1; // this==aload0
+
+ if (declaringClass.isNestedType()){
+ NestedTypeBinding nestedType = (NestedTypeBinding) declaringClass;
+ this.scope.extraSyntheticArguments = nestedType.syntheticOuterLocalVariables();
+ scope.computeLocalVariablePositions(// consider synthetic arguments if any
+ nestedType.enclosingInstancesSlotSize + 1,
+ codeStream);
+ argSlotSize += nestedType.enclosingInstancesSlotSize;
+ argSlotSize += nestedType.outerLocalVariablesSlotSize;
+ } else {
+ scope.computeLocalVariablePositions(1, codeStream);
+ }
+
+ if (arguments != null) {
+ for (int i = 0, max = arguments.length; i < max; i++) {
+ // arguments initialization for local variable debug attributes
+ LocalVariableBinding argBinding;
+ codeStream.addVisibleLocalVariable(argBinding = arguments[i].binding);
+ argBinding.recordInitializationStartPC(0);
+ TypeBinding argType;
+ if ((argType = argBinding.type) == LongBinding || (argType == DoubleBinding)) {
+ argSlotSize += 2;
+ } else {
+ argSlotSize++;
+ }
+ }
+ }
+
+ MethodScope initializerScope = declaringType.initializerScope;
+ initializerScope.computeLocalVariablePositions(argSlotSize, codeStream); // offset by the argument size (since not linked to method scope)
+
+ boolean needFieldInitializations = constructorCall == null || constructorCall.accessMode != ExplicitConstructorCall.This;
+
+ // post 1.4 source level, synthetic initializations occur prior to explicit constructor call
+ boolean preInitSyntheticFields = scope.environment().options.targetJDK >= ClassFileConstants.JDK1_4;
+
+ if (needFieldInitializations && preInitSyntheticFields){
+ generateSyntheticFieldInitializationsIfNecessary(scope, codeStream, declaringClass);
+ }
+ // generate constructor call
+ if (constructorCall != null) {
+ constructorCall.generateCode(scope, codeStream);
+ }
+ // generate field initialization - only if not invoking another constructor call of the same class
+ if (needFieldInitializations) {
+ if (!preInitSyntheticFields){
+ generateSyntheticFieldInitializationsIfNecessary(scope, codeStream, declaringClass);
+ }
+ // generate user field initialization
+ if (declaringType.fields != null) {
+ for (int i = 0, max = declaringType.fields.length; i < max; i++) {
+ FieldDeclaration fieldDecl;
+ if (!(fieldDecl = declaringType.fields[i]).isStatic()) {
+ fieldDecl.generateCode(initializerScope, codeStream);
+ }
+ }
+ }
+ }
+ // generate statements
+ if (statements != null) {
+ for (int i = 0, max = statements.length; i < max; i++) {
+ statements[i].generateCode(scope, codeStream);
+ }
+ }
+ if (this.needFreeReturn) {
+ codeStream.return_();
+ }
+ // local variable attributes
+ codeStream.exitUserScope(scope);
+ codeStream.recordPositionsFrom(0, this.bodyEnd);
+ classFile.completeCodeAttribute(codeAttributeOffset);
+ attributeNumber++;
+ }
+ classFile.completeMethodInfo(methodAttributeOffset, attributeNumber);
+
+ // if a problem got reported during code gen, then trigger problem method creation
+ if (ignoreFurtherInvestigation) {
+ throw new AbortMethod(scope.referenceCompilationUnit().compilationResult, null);
+ }
+ }
+
+ public boolean isConstructor() {
+
+ return true;
+ }
+
+ public boolean isDefaultConstructor() {
+
+ return this.isDefaultConstructor;
+ }
+
+ public boolean isInitializationMethod() {
+
+ return true;
+ }
+
+ /*
+ * Returns true if the constructor is directly involved in a cycle.
+ * Given most constructors aren't, we only allocate the visited list
+ * lazily.
+ */
+ public boolean isRecursive(ArrayList visited) {
+
+ if (this.binding == null
+ || this.constructorCall == null
+ || this.constructorCall.binding == null
+ || this.constructorCall.isSuperAccess()
+ || !this.constructorCall.binding.isValidBinding()) {
+ return false;
+ }
+
+ ConstructorDeclaration targetConstructor =
+ ((ConstructorDeclaration)this.scope.referenceType().declarationOf(constructorCall.binding.original()));
+ if (this == targetConstructor) return true; // direct case
+
+ if (visited == null) { // lazy allocation
+ visited = new ArrayList(1);
+ } else {
+ int index = visited.indexOf(this);
+ if (index >= 0) return index == 0; // only blame if directly part of the cycle
+ }
+ visited.add(this);
+
+ return targetConstructor.isRecursive(visited);
+ }
+
+ public void parseStatements(Parser parser, CompilationUnitDeclaration unit) {
+
+ //fill up the constructor body with its statements
+ if (ignoreFurtherInvestigation)
+ return;
+ if (isDefaultConstructor){
+ constructorCall = SuperReference.implicitSuperConstructorCall();
+ constructorCall.sourceStart = sourceStart;
+ constructorCall.sourceEnd = sourceEnd;
+ return;
+ }
+ parser.parse(this, unit);
+
+ }
+
+ public StringBuffer printBody(int indent, StringBuffer output) {
+
+ output.append(" {"); //$NON-NLS-1$
+ if (constructorCall != null) {
+ output.append('\n');
+ constructorCall.printStatement(indent, output); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ if (statements != null) {
+ for (int i = 0; i < statements.length; i++) {
+ output.append('\n');
+ statements[i].printStatement(indent, output); //$NON-NLS-1$
+ }
+ }
+ output.append('\n');
+ printIndent(indent == 0 ? 0 : indent - 1, output).append('}');
+ return output;
+ }
+
+ public void resolveJavadoc() {
+
+ if (this.binding == null || this.javadoc != null) {
+ super.resolveJavadoc();
+ } else if (!isDefaultConstructor) {
+ this.scope.problemReporter().javadocMissing(this.sourceStart, this.sourceEnd, this.binding.modifiers);
+ }
+ }
+
+ /*
+ * Type checking for constructor, just another method, except for special check
+ * for recursive constructor invocations.
+ */
+ public void resolveStatements() {
+
+ if (!CharOperation.equals(scope.enclosingSourceType().sourceName, selector)){
+ scope.problemReporter().missingReturnType(this);
+ }
+
+ // if null ==> an error has occurs at parsing time ....
+ if (this.constructorCall != null) {
+ // e.g. using super() in java.lang.Object
+ if (this.binding != null
+ && this.binding.declaringClass.id == T_Object
+ && this.constructorCall.accessMode != ExplicitConstructorCall.This) {
+ if (this.constructorCall.accessMode == ExplicitConstructorCall.Super) {
+ scope.problemReporter().cannotUseSuperInJavaLangObject(this.constructorCall);
+ }
+ this.constructorCall = null;
+ } else {
+ this.constructorCall.resolve(this.scope);
+ }
+ }
+ if ((modifiers & AccSemicolonBody) != 0) {
+ scope.problemReporter().methodNeedBody(this);
+ }
+ super.resolveStatements();
+ }
+
+ public void traverse(
+ ASTVisitor visitor,
+ ClassScope classScope) {
+
+
+ if (visitor.visit(this, classScope)) {
+ if (this.annotations != null) {
+ int annotationsLength = this.annotations.length;
+ for (int i = 0; i < annotationsLength; i++)
+ this.annotations[i].traverse(visitor, scope);
+ }
+ if (this.typeParameters != null) {
+ int typeParametersLength = this.typeParameters.length;
+ for (int i = 0; i < typeParametersLength; i++) {
+ this.typeParameters[i].traverse(visitor, scope);
+ }
+ }
+ if (arguments != null) {
+ int argumentLength = arguments.length;
+ for (int i = 0; i < argumentLength; i++)
+ arguments[i].traverse(visitor, scope);
+ }
+ if (thrownExceptions != null) {
+ int thrownExceptionsLength = thrownExceptions.length;
+ for (int i = 0; i < thrownExceptionsLength; i++)
+ thrownExceptions[i].traverse(visitor, scope);
+ }
+ if (constructorCall != null)
+ constructorCall.traverse(visitor, scope);
+ if (statements != null) {
+ int statementsLength = statements.length;
+ for (int i = 0; i < statementsLength; i++)
+ statements[i].traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, classScope);
+ }
+ public TypeParameter[] typeParameters() {
+ return this.typeParameters;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ContinueStatement.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ContinueStatement.js
new file mode 100644
index 0000000..f127a20
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ContinueStatement.js
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class ContinueStatement extends BranchStatement {
+
+ public ContinueStatement(char[] l, int s, int e) {
+
+ super(l, s, e);
+ }
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ // here requires to generate a sequence of finally blocks invocations depending corresponding
+ // to each of the traversed try statements, so that execution will terminate properly.
+
+ // lookup the label, this should answer the returnContext
+ FlowContext targetContext = (label == null)
+ ? flowContext.getTargetContextForDefaultContinue()
+ : flowContext.getTargetContextForContinueLabel(label);
+
+ if (targetContext == null) {
+ if (label == null) {
+ currentScope.problemReporter().invalidContinue(this);
+ } else {
+ currentScope.problemReporter().undefinedLabel(this);
+ }
+ return flowInfo; // pretend it did not continue since no actual target
+ }
+
+ if (targetContext == FlowContext.NotContinuableContext) {
+ currentScope.problemReporter().invalidContinue(this);
+ return flowInfo; // pretend it did not continue since no actual target
+ }
+ targetLabel = targetContext.continueLabel();
+ FlowContext traversedContext = flowContext;
+ int subIndex = 0, maxSub = 5;
+ subroutines = new SubRoutineStatement[maxSub];
+
+ do {
+ SubRoutineStatement sub;
+ if ((sub = traversedContext.subRoutine()) != null) {
+ if (subIndex == maxSub) {
+ System.arraycopy(subroutines, 0, (subroutines = new SubRoutineStatement[maxSub*=2]), 0, subIndex); // grow
+ }
+ subroutines[subIndex++] = sub;
+ if (sub.isSubRoutineEscaping()) {
+ break;
+ }
+ }
+ traversedContext.recordReturnFrom(flowInfo.unconditionalInits());
+
+ ASTNode node;
+ if ((node = traversedContext.associatedNode) instanceof TryStatement) {
+ TryStatement tryStatement = (TryStatement) node;
+ flowInfo.addInitializationsFrom(tryStatement.subRoutineInits); // collect inits
+ } else if (traversedContext == targetContext) {
+ // only record continue info once accumulated through subroutines, and only against target context
+ targetContext.recordContinueFrom(flowInfo);
+ break;
+ }
+ } while ((traversedContext = traversedContext.parent) != null);
+
+ // resize subroutines
+ if (subIndex != maxSub) {
+ System.arraycopy(subroutines, 0, (subroutines = new SubRoutineStatement[subIndex]), 0, subIndex);
+ }
+ return FlowInfo.DEAD_END;
+ }
+
+ public StringBuffer printStatement(int tab, StringBuffer output) {
+
+ printIndent(tab, output).append("continue "); //$NON-NLS-1$
+ if (label != null) output.append(label);
+ return output.append(';');
+ }
+
+ public void traverse(
+ ASTVisitor visitor,
+ BlockScope blockScope) {
+
+ visitor.visit(this, blockScope);
+ visitor.endVisit(this, blockScope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/DoStatement.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/DoStatement.js
new file mode 100644
index 0000000..5877703
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/DoStatement.js
@@ -0,0 +1,173 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class DoStatement extends Statement {
+
+ public Expression condition;
+ public Statement action;
+
+ private Label breakLabel, continueLabel;
+
+ // for local variables table attributes
+ int mergedInitStateIndex = -1;
+
+ public DoStatement(Expression condition, Statement action, int s, int e) {
+
+ this.sourceStart = s;
+ this.sourceEnd = e;
+ this.condition = condition;
+ this.action = action;
+ // remember useful empty statement
+ if (action instanceof EmptyStatement) action.bits |= IsUsefulEmptyStatementMASK;
+ }
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ breakLabel = new Label();
+ continueLabel = new Label();
+ LoopingFlowContext loopingContext =
+ new LoopingFlowContext(
+ flowContext,
+ this,
+ breakLabel,
+ continueLabel,
+ currentScope);
+
+ Constant cst = condition.constant;
+ boolean isConditionTrue = cst != NotAConstant && cst.booleanValue() == true;
+ cst = condition.optimizedBooleanConstant();
+ boolean isConditionOptimizedTrue = cst != NotAConstant && cst.booleanValue() == true;
+ boolean isConditionOptimizedFalse = cst != NotAConstant && cst.booleanValue() == false;
+
+ int previousMode = flowInfo.reachMode();
+
+ if ((action != null) && !action.isEmptyBlock()) {
+ flowInfo = action.analyseCode(currentScope, loopingContext, flowInfo);
+
+ // code generation can be optimized when no need to continue in the loop
+ if (!flowInfo.isReachable() && !loopingContext.initsOnContinue.isReachable()) {
+ continueLabel = null;
+ }
+ }
+ /* Reset reach mode, to address following scenario.
+ * final blank;
+ * do { if (true) break; else blank = 0; } while(false);
+ * blank = 1; // may be initialized already
+ */
+ flowInfo.setReachMode(previousMode);
+
+ flowInfo =
+ condition.analyseCode(
+ currentScope,
+ loopingContext,
+ (action == null
+ ? flowInfo
+ : (flowInfo.mergedWith(loopingContext.initsOnContinue))));
+ if (!isConditionOptimizedFalse && continueLabel != null) {
+ loopingContext.complainOnFinalAssignmentsInLoop(currentScope, flowInfo);
+ }
+
+ // end of loop
+ FlowInfo mergedInfo = FlowInfo.mergedOptimizedBranches(
+ loopingContext.initsOnBreak,
+ isConditionOptimizedTrue,
+ flowInfo.initsWhenFalse(),
+ false, // never consider opt false case for DO loop, since break can always occur (47776)
+ !isConditionTrue /*do{}while(true); unreachable(); */);
+ mergedInitStateIndex = currentScope.methodScope().recordInitializationStates(mergedInfo);
+ return mergedInfo;
+ }
+
+ /**
+ * Do statement code generation
+ *
+ */
+ public void generateCode(BlockScope currentScope, CodeStream codeStream) {
+
+ if ((bits & IsReachableMASK) == 0) {
+ return;
+ }
+ int pc = codeStream.position;
+
+ // labels management
+ Label actionLabel = new Label(codeStream);
+ actionLabel.place();
+ breakLabel.initialize(codeStream);
+ if (continueLabel != null) {
+ continueLabel.initialize(codeStream);
+ }
+
+ // generate action
+ if (action != null) {
+ action.generateCode(currentScope, codeStream);
+ }
+ // generate condition
+ if (continueLabel != null) {
+ continueLabel.place();
+ condition.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ actionLabel,
+ null,
+ true);
+ }
+ breakLabel.place();
+
+ // May loose some local variable initializations : affecting the local variable attributes
+ if (mergedInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(currentScope, mergedInitStateIndex);
+ codeStream.addDefinitelyAssignedVariables(currentScope, mergedInitStateIndex);
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+
+ }
+
+ public StringBuffer printStatement(int indent, StringBuffer output) {
+
+ printIndent(indent, output).append("do"); //$NON-NLS-1$
+ if (action == null)
+ output.append(" ;\n"); //$NON-NLS-1$
+ else {
+ output.append('\n');
+ action.printStatement(indent + 1, output).append('\n');
+ }
+ output.append("while ("); //$NON-NLS-1$
+ return condition.printExpression(0, output).append(");"); //$NON-NLS-1$
+ }
+ public void resolve(BlockScope scope) {
+
+ TypeBinding type = condition.resolveTypeExpecting(scope, BooleanBinding);
+ condition.computeConversion(scope, type, type);
+ if (action != null)
+ action.resolve(scope);
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+
+ if (visitor.visit(this, scope)) {
+ if (action != null) {
+ action.traverse(visitor, scope);
+ }
+ condition.traverse(visitor, scope);
+ }
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/DoubleLiteral.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/DoubleLiteral.js
new file mode 100644
index 0000000..e9536a6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/DoubleLiteral.js
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+import org.eclipse.wst.jsdt.internal.compiler.util.FloatUtil;
+
+public class DoubleLiteral extends NumberLiteral {
+ double value;
+ public DoubleLiteral(char[] token, int s, int e) {
+ super(token, s, e);
+ }
+ public void computeConstant() {
+ Double computedValue;
+ try {
+ computedValue = Double.valueOf(String.valueOf(source));
+ } catch (NumberFormatException e) {
+ // hex floating point literal
+ // being rejected by 1.4 libraries where Double.valueOf(...) doesn't handle hex decimal floats
+ try {
+ double v = FloatUtil.valueOfHexDoubleLiteral(source);
+ if (v == Double.POSITIVE_INFINITY) {
+ // error: the number is too large to represent
+ return;
+ }
+ if (Double.isNaN(v)) {
+ // error: the number is too small to represent
+ return;
+ }
+ value = v;
+ constant = Constant.fromValue(v);
+ } catch (NumberFormatException e1) {
+ // if the computation of the constant fails
+ }
+ return;
+ }
+
+ final double doubleValue = computedValue.doubleValue();
+ if (doubleValue > Double.MAX_VALUE) {
+ // error: the number is too large to represent
+ return;
+ }
+ if (doubleValue < Double.MIN_VALUE) {
+ // see 1F6IGUU
+ // a true 0 only has '0' and '.' in mantissa
+ // 1.0e-5000d is non-zero, but underflows to 0
+ boolean isHexaDecimal = false;
+ label : for (int i = 0; i < source.length; i++) { //it is welled formated so just test against '0' and potential . D d
+ switch (source[i]) {
+ case '0' :
+ case '.' :
+ break;
+ case 'x' :
+ case 'X' :
+ isHexaDecimal = true;
+ break;
+ case 'e' :
+ case 'E' :
+ case 'f' :
+ case 'F' :
+ case 'd' :
+ case 'D' :
+ if (isHexaDecimal) {
+ return;
+ }
+ // starting the exponent - mantissa is all zero
+ // no exponent - mantissa is all zero
+ break label;
+ case 'p' :
+ case 'P' :
+ break label;
+ default :
+ // error: the number is too small to represent
+ return;
+ }
+ }
+ }
+ value = doubleValue;
+ constant = Constant.fromValue(value);
+ }
+ /**
+ * Code generation for the double literak
+ *
+ * @param currentScope org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ * @param valueRequired boolean
+ */
+ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
+ int pc = codeStream.position;
+ if (valueRequired)
+ if ((implicitConversion >> 4) == T_double)
+ codeStream.generateInlinedValue(value);
+ else
+ codeStream.generateConstant(constant, implicitConversion);
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+ public TypeBinding literalType(BlockScope scope) {
+ return DoubleBinding;
+ }
+ public void traverse(ASTVisitor visitor, BlockScope blockScope) {
+ visitor.visit(this, blockScope);
+ visitor.endVisit(this, blockScope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/EmptyStatement.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/EmptyStatement.js
new file mode 100644
index 0000000..c7c9e13
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/EmptyStatement.js
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream;
+import org.eclipse.wst.jsdt.internal.compiler.flow.FlowContext;
+import org.eclipse.wst.jsdt.internal.compiler.flow.FlowInfo;
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+
+public class EmptyStatement extends Statement {
+
+ public EmptyStatement(int startPosition, int endPosition) {
+ this.sourceStart = startPosition;
+ this.sourceEnd = endPosition;
+ }
+
+ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
+ return flowInfo;
+ }
+
+ // Report an error if necessary
+ public boolean complainIfUnreachable(FlowInfo flowInfo, BlockScope scope, boolean didAlreadyComplain) {
+
+ // before 1.4, empty statements are tolerated anywhere
+ if (scope.environment().options.complianceLevel < ClassFileConstants.JDK1_4) {
+ return false;
+ }
+ return super.complainIfUnreachable(flowInfo, scope, didAlreadyComplain);
+ }
+
+ public void generateCode(BlockScope currentScope, CodeStream codeStream){
+ // no bytecode, no need to check for reachability or recording source positions
+ }
+
+ public StringBuffer printStatement(int tab, StringBuffer output) {
+ return printIndent(tab, output).append(';');
+ }
+
+ public void resolve(BlockScope scope) {
+ if ((bits & IsUsefulEmptyStatementMASK) == 0) {
+ scope.problemReporter().superfluousSemicolon(this.sourceStart, this.sourceEnd);
+ } else {
+ scope.problemReporter().emptyControlFlowStatement(this.sourceStart, this.sourceEnd);
+ }
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+ visitor.visit(this, scope);
+ visitor.endVisit(this, scope);
+ }
+
+
+}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/EnumConstant.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/EnumConstant.js
new file mode 100644
index 0000000..3512823
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/EnumConstant.js
@@ -0,0 +1,208 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.CompilationUnitScope;
+import org.eclipse.wst.jsdt.internal.compiler.problem.AbortType;
+
+/**
+ * Enum constant node
+ */
+public class EnumConstant extends TypeDeclaration {
+
+ public Expression[] arguments;
+
+ public EnumConstant(CompilationResult compilationResult) {
+ super(compilationResult);
+ this.compilationResult = compilationResult;
+ }
+
+ public StringBuffer print(int indent, StringBuffer output) {
+ output.append(name);
+ if (arguments != null) {
+ output.append('(');
+ int length = arguments.length;
+ for (int i = 0; i < length - 1; i++) {
+ arguments[i].print(0, output);
+ output.append(", ");//$NON-NLS-1$
+ }
+ arguments[length - 1].print(0, output);
+ output.append(')');
+ }
+ printBody(indent, output);
+ return output;
+ }
+
+ /**
+ * Iteration for a package member type
+ *
+ */
+ public void traverse(
+ ASTVisitor visitor,
+ CompilationUnitScope unitScope) {
+
+ if (ignoreFurtherInvestigation)
+ return;
+ try {
+ if (visitor.visit(this, unitScope)) {
+ if (this.annotations != null) {
+ int annotationsLength = this.annotations.length;
+ for (int i = 0; i < annotationsLength; i++)
+ this.annotations[i].traverse(visitor, scope);
+ }
+ if (this.arguments != null) {
+ int length = this.arguments.length;
+ for (int i = 0; i < length; i++)
+ this.arguments[i].traverse(visitor, scope);
+ }
+ if (this.memberTypes != null) {
+ int length = this.memberTypes.length;
+ for (int i = 0; i < length; i++)
+ this.memberTypes[i].traverse(visitor, scope);
+ }
+ if (this.enums != null) {
+ int length = this.enums.length;
+ for (int i = 0; i < length; i++)
+ this.enums[i].traverse(visitor, scope);
+ }
+ if (this.fields != null) {
+ int length = this.fields.length;
+ for (int i = 0; i < length; i++) {
+ FieldDeclaration field;
+ if ((field = this.fields[i]).isStatic()) {
+ field.traverse(visitor, staticInitializerScope);
+ } else {
+ field.traverse(visitor, initializerScope);
+ }
+ }
+ }
+ if (this.methods != null) {
+ int length = this.methods.length;
+ for (int i = 0; i < length; i++)
+ this.methods[i].traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, unitScope);
+ } catch (AbortType e) {
+ // silent abort
+ }
+ }
+
+ /**
+ * Iteration for a local innertype
+ *
+ */
+ public void traverse(ASTVisitor visitor, BlockScope blockScope) {
+
+ if (ignoreFurtherInvestigation)
+ return;
+ try {
+ if (visitor.visit(this, blockScope)) {
+ if (this.annotations != null) {
+ int annotationsLength = this.annotations.length;
+ for (int i = 0; i < annotationsLength; i++)
+ this.annotations[i].traverse(visitor, scope);
+ }
+ if (this.arguments != null) {
+ int length = this.arguments.length;
+ for (int i = 0; i < length; i++)
+ this.arguments[i].traverse(visitor, scope);
+ }
+ if (this.memberTypes != null) {
+ int length = this.memberTypes.length;
+ for (int i = 0; i < length; i++)
+ this.memberTypes[i].traverse(visitor, scope);
+ }
+ if (this.enums != null) {
+ int length = this.enums.length;
+ for (int i = 0; i < length; i++)
+ this.enums[i].traverse(visitor, scope);
+ }
+ if (this.fields != null) {
+ int length = this.fields.length;
+ for (int i = 0; i < length; i++) {
+ FieldDeclaration field;
+ if ((field = this.fields[i]).isStatic()) {
+ field.traverse(visitor, staticInitializerScope);
+ } else {
+ field.traverse(visitor, initializerScope);
+ }
+ }
+ }
+ if (this.methods != null) {
+ int length = this.methods.length;
+ for (int i = 0; i < length; i++)
+ this.methods[i].traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, blockScope);
+ } catch (AbortType e) {
+ // silent abort
+ }
+ }
+
+ /**
+ * Iteration for a member innertype
+ *
+ */
+ public void traverse(ASTVisitor visitor, ClassScope classScope) {
+
+ if (ignoreFurtherInvestigation)
+ return;
+ try {
+ if (visitor.visit(this, classScope)) {
+ if (this.annotations != null) {
+ int annotationsLength = this.annotations.length;
+ for (int i = 0; i < annotationsLength; i++)
+ this.annotations[i].traverse(visitor, scope);
+ }
+ if (this.arguments != null) {
+ int length = this.arguments.length;
+ for (int i = 0; i < length; i++)
+ this.arguments[i].traverse(visitor, scope);
+ }
+ if (this.memberTypes != null) {
+ int length = this.memberTypes.length;
+ for (int i = 0; i < length; i++)
+ this.memberTypes[i].traverse(visitor, scope);
+ }
+ if (this.enums != null) {
+ int length = this.enums.length;
+ for (int i = 0; i < length; i++)
+ this.enums[i].traverse(visitor, scope);
+ }
+ if (this.fields != null) {
+ int length = this.fields.length;
+ for (int i = 0; i < length; i++) {
+ FieldDeclaration field;
+ if ((field = this.fields[i]).isStatic()) {
+ field.traverse(visitor, staticInitializerScope);
+ } else {
+ field.traverse(visitor, initializerScope);
+ }
+ }
+ }
+ if (this.methods != null) {
+ int length = this.methods.length;
+ for (int i = 0; i < length; i++)
+ this.methods[i].traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, classScope);
+ } catch (AbortType e) {
+ // silent abort
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/EnumDeclaration.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/EnumDeclaration.js
new file mode 100644
index 0000000..d92d99b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/EnumDeclaration.js
@@ -0,0 +1,242 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.CompilationUnitScope;
+import org.eclipse.wst.jsdt.internal.compiler.problem.AbortType;
+
+/**
+ * Enum declaration
+ */
+public class EnumDeclaration extends TypeDeclaration {
+
+ public EnumConstant[] enumConstants;
+
+ /**
+ * @param compilationResult
+ */
+ public EnumDeclaration(CompilationResult compilationResult) {
+ super(compilationResult);
+ }
+
+ public StringBuffer printBody(int indent, StringBuffer output) {
+
+ output.append(" {"); //$NON-NLS-1$
+ if (enumConstants != null) {
+ int length = enumConstants.length;
+ output.append('\n');
+ for (int i = 0; i < length - 1; i++) {
+ if (enumConstants[i] != null) {
+ enumConstants[i].print(indent + 1, output);
+ output.append(",\n");//$NON-NLS-1$
+ }
+ }
+ enumConstants[length - 1].print(indent + 1, output);
+ output.append("\n;\n");//$NON-NLS-1$
+ }
+ if (this.enums != null) {
+ for (int i = 0; i < this.enums.length; i++) {
+ if (this.enums[i] != null) {
+ output.append('\n');
+ this.enums[i].print(indent + 1, output);
+ }
+ }
+ }
+ if (memberTypes != null) {
+ for (int i = 0; i < memberTypes.length; i++) {
+ if (memberTypes[i] != null) {
+ output.append('\n');
+ memberTypes[i].print(indent + 1, output);
+ }
+ }
+ }
+ if (fields != null) {
+ for (int fieldI = 0; fieldI < fields.length; fieldI++) {
+ if (fields[fieldI] != null) {
+ output.append('\n');
+ fields[fieldI].print(indent + 1, output);
+ }
+ }
+ }
+ if (methods != null) {
+ for (int i = 0; i < methods.length; i++) {
+ if (methods[i] != null) {
+ output.append('\n');
+ methods[i].print(indent + 1, output);
+ }
+ }
+ }
+ output.append('\n');
+ return printIndent(indent, output).append('}');
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope blockScope) {
+
+ if (ignoreFurtherInvestigation)
+ return;
+ try {
+ if (visitor.visit(this, blockScope)) {
+ if (this.typeParameters != null) {
+ int length = this.typeParameters.length;
+ for (int i = 0; i < length; i++) {
+ this.typeParameters[i].traverse(visitor, scope);
+ }
+ }
+ if (this.superclass != null)
+ this.superclass.traverse(visitor, scope);
+ if (this.superInterfaces != null) {
+ int length = this.superInterfaces.length;
+ for (int i = 0; i < length; i++)
+ this.superInterfaces[i].traverse(visitor, scope);
+ }
+ if (this.memberTypes != null) {
+ int length = this.memberTypes.length;
+ for (int i = 0; i < length; i++)
+ this.memberTypes[i].traverse(visitor, scope);
+ }
+ if (this.enums != null) {
+ int length = this.enums.length;
+ for (int i = 0; i < length; i++) {
+ this.enums[i].traverse(visitor, scope);
+ }
+ }
+ if (this.fields != null) {
+ int length = this.fields.length;
+ for (int i = 0; i < length; i++) {
+ FieldDeclaration field;
+ if ((field = this.fields[i]).isStatic()) {
+ field.traverse(visitor, staticInitializerScope);
+ } else {
+ field.traverse(visitor, initializerScope);
+ }
+ }
+ }
+ if (this.methods != null) {
+ int length = methods.length;
+ for (int i = 0; i < length; i++)
+ this.methods[i].traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, blockScope);
+ } catch (AbortType e) {
+ // silent abort
+ }
+ }
+ public void traverse(ASTVisitor visitor, ClassScope classScope) {
+
+ if (ignoreFurtherInvestigation)
+ return;
+ try {
+ if (visitor.visit(this, classScope)) {
+ if (this.typeParameters != null) {
+ int typeParametersLength = this.typeParameters.length;
+ for (int i = 0; i < typeParametersLength; i++) {
+ this.typeParameters[i].traverse(visitor, scope);
+ }
+ }
+ if (this.superclass != null)
+ this.superclass.traverse(visitor, scope);
+ if (this.superInterfaces != null) {
+ int length = this.superInterfaces.length;
+ for (int i = 0; i < length; i++)
+ this.superInterfaces[i].traverse(visitor, scope);
+ }
+ if (this.memberTypes != null) {
+ int length = this.memberTypes.length;
+ for (int i = 0; i < length; i++)
+ this.memberTypes[i].traverse(visitor, scope);
+ }
+ if (this.enums != null) {
+ int length = this.enums.length;
+ for (int i = 0; i < length; i++) {
+ this.enums[i].traverse(visitor, scope);
+ }
+ }
+ if (this.fields != null) {
+ int length = this.fields.length;
+ for (int i = 0; i < length; i++) {
+ FieldDeclaration field;
+ if ((field = this.fields[i]).isStatic()) {
+ field.traverse(visitor, staticInitializerScope);
+ } else {
+ field.traverse(visitor, initializerScope);
+ }
+ }
+ }
+ if (this.methods != null) {
+ int length = this.methods.length;
+ for (int i = 0; i < length; i++)
+ this.methods[i].traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, classScope);
+ } catch (AbortType e) {
+ // silent abort
+ }
+ }
+
+ public void traverse(ASTVisitor visitor, CompilationUnitScope unitScope) {
+
+ if (ignoreFurtherInvestigation)
+ return;
+ try {
+ if (visitor.visit(this, unitScope)) {
+ if (this.typeParameters != null) {
+ int length = this.typeParameters.length;
+ for (int i = 0; i < length; i++) {
+ this.typeParameters[i].traverse(visitor, scope);
+ }
+ }
+ if (this.superclass != null)
+ this.superclass.traverse(visitor, scope);
+ if (this.superInterfaces != null) {
+ int length = this.superInterfaces.length;
+ for (int i = 0; i < length; i++)
+ this.superInterfaces[i].traverse(visitor, scope);
+ }
+ if (this.memberTypes != null) {
+ int length = this.memberTypes.length;
+ for (int i = 0; i < length; i++)
+ this.memberTypes[i].traverse(visitor, scope);
+ }
+ if (this.enums != null) {
+ int length = this.enums.length;
+ for (int i = 0; i < length; i++) {
+ this.enums[i].traverse(visitor, scope);
+ }
+ }
+ if (this.fields != null) {
+ int length = this.fields.length;
+ for (int i = 0; i < length; i++) {
+ FieldDeclaration field;
+ if ((field = this.fields[i]).isStatic()) {
+ field.traverse(visitor, staticInitializerScope);
+ } else {
+ field.traverse(visitor, initializerScope);
+ }
+ }
+ }
+ if (this.methods != null) {
+ int length = this.methods.length;
+ for (int i = 0; i < length; i++)
+ this.methods[i].traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, unitScope);
+ } catch (AbortType e) {
+ // silent abort
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/EqualExpression.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/EqualExpression.js
new file mode 100644
index 0000000..7837252
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/EqualExpression.js
@@ -0,0 +1,454 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class EqualExpression extends BinaryExpression {
+
+ public EqualExpression(Expression left, Expression right,int operator) {
+ super(left,right,operator);
+ }
+ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
+ if (((bits & OperatorMASK) >> OperatorSHIFT) == EQUAL_EQUAL) {
+ if ((left.constant != NotAConstant) && (left.constant.typeID() == T_boolean)) {
+ if (left.constant.booleanValue()) { // true == anything
+ // this is equivalent to the right argument inits
+ return right.analyseCode(currentScope, flowContext, flowInfo);
+ } else { // false == anything
+ // this is equivalent to the right argument inits negated
+ return right.analyseCode(currentScope, flowContext, flowInfo).asNegatedCondition();
+ }
+ }
+ if ((right.constant != NotAConstant) && (right.constant.typeID() == T_boolean)) {
+ if (right.constant.booleanValue()) { // anything == true
+ // this is equivalent to the right argument inits
+ return left.analyseCode(currentScope, flowContext, flowInfo);
+ } else { // anything == false
+ // this is equivalent to the right argument inits negated
+ return left.analyseCode(currentScope, flowContext, flowInfo).asNegatedCondition();
+ }
+ }
+ return right.analyseCode(
+ currentScope, flowContext,
+ left.analyseCode(currentScope, flowContext, flowInfo).unconditionalInits()).unconditionalInits();
+ } else { //NOT_EQUAL :
+ if ((left.constant != NotAConstant) && (left.constant.typeID() == T_boolean)) {
+ if (!left.constant.booleanValue()) { // false != anything
+ // this is equivalent to the right argument inits
+ return right.analyseCode(currentScope, flowContext, flowInfo);
+ } else { // true != anything
+ // this is equivalent to the right argument inits negated
+ return right.analyseCode(currentScope, flowContext, flowInfo).asNegatedCondition();
+ }
+ }
+ if ((right.constant != NotAConstant) && (right.constant.typeID() == T_boolean)) {
+ if (!right.constant.booleanValue()) { // anything != false
+ // this is equivalent to the right argument inits
+ return left.analyseCode(currentScope, flowContext, flowInfo);
+ } else { // anything != true
+ // this is equivalent to the right argument inits negated
+ return left.analyseCode(currentScope, flowContext, flowInfo).asNegatedCondition();
+ }
+ }
+ return right.analyseCode(
+ currentScope, flowContext,
+ left.analyseCode(currentScope, flowContext, flowInfo).unconditionalInits()).asNegatedCondition().unconditionalInits();
+ }
+ }
+
+ public final void computeConstant(TypeBinding leftType, TypeBinding rightType) {
+ if ((this.left.constant != NotAConstant) && (this.right.constant != NotAConstant)) {
+ this.constant =
+ Constant.computeConstantOperationEQUAL_EQUAL(
+ left.constant,
+ leftType.id,
+ EQUAL_EQUAL,
+ right.constant,
+ rightType.id);
+ if (((this.bits & OperatorMASK) >> OperatorSHIFT) == NOT_EQUAL)
+ constant = Constant.fromValue(!constant.booleanValue());
+ } else {
+ this.constant = NotAConstant;
+ // no optimization for null == null
+ }
+ }
+ /**
+ * Normal == or != code generation.
+ *
+ * @param currentScope org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ * @param valueRequired boolean
+ */
+ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
+
+ if (constant != NotAConstant) {
+ int pc = codeStream.position;
+ if (valueRequired)
+ codeStream.generateConstant(constant, implicitConversion);
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ return;
+ }
+ Label falseLabel;
+ bits |= OnlyValueRequiredMASK;
+ generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ null,
+ falseLabel = new Label(codeStream),
+ valueRequired);
+ if (falseLabel.hasForwardReferences()) {
+ if (valueRequired){
+ // comparison is TRUE
+ codeStream.iconst_1();
+ if ((bits & ValueForReturnMASK) != 0){
+ codeStream.ireturn();
+ // comparison is FALSE
+ falseLabel.place();
+ codeStream.iconst_0();
+ } else {
+ Label endLabel = new Label(codeStream);
+ codeStream.goto_(endLabel);
+ codeStream.decrStackSize(1);
+ // comparison is FALSE
+ falseLabel.place();
+ codeStream.iconst_0();
+ endLabel.place();
+ }
+ } else {
+ falseLabel.place();
+ }
+ }
+ }
+ /**
+ * Boolean operator code generation
+ * Optimized operations are: == and !=
+ */
+ public void generateOptimizedBoolean(BlockScope currentScope, CodeStream codeStream, Label trueLabel, Label falseLabel, boolean valueRequired) {
+
+ if (constant != Constant.NotAConstant) {
+ super.generateOptimizedBoolean(currentScope, codeStream, trueLabel, falseLabel, valueRequired);
+ return;
+ }
+ if (((bits & OperatorMASK) >> OperatorSHIFT) == EQUAL_EQUAL) {
+ if ((left.implicitConversion & 0xF) /*compile-time*/ == T_boolean) {
+ generateOptimizedBooleanEqual(currentScope, codeStream, trueLabel, falseLabel, valueRequired);
+ } else {
+ generateOptimizedNonBooleanEqual(currentScope, codeStream, trueLabel, falseLabel, valueRequired);
+ }
+ } else {
+ if ((left.implicitConversion & 0xF) /*compile-time*/ == T_boolean) {
+ generateOptimizedBooleanEqual(currentScope, codeStream, falseLabel, trueLabel, valueRequired);
+ } else {
+ generateOptimizedNonBooleanEqual(currentScope, codeStream, falseLabel, trueLabel, valueRequired);
+ }
+ }
+ }
+ /**
+ * Boolean generation for == with boolean operands
+ *
+ * Note this code does not optimize conditional constants !!!!
+ */
+ public void generateOptimizedBooleanEqual(BlockScope currentScope, CodeStream codeStream, Label trueLabel, Label falseLabel, boolean valueRequired) {
+
+ // optimized cases: true == x, false == x
+ if (left.constant != NotAConstant) {
+ boolean inline = left.constant.booleanValue();
+ right.generateOptimizedBoolean(currentScope, codeStream, (inline ? trueLabel : falseLabel), (inline ? falseLabel : trueLabel), valueRequired);
+ return;
+ } // optimized cases: x == true, x == false
+ if (right.constant != NotAConstant) {
+ boolean inline = right.constant.booleanValue();
+ left.generateOptimizedBoolean(currentScope, codeStream, (inline ? trueLabel : falseLabel), (inline ? falseLabel : trueLabel), valueRequired);
+ return;
+ }
+ // default case
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired) {
+ if (falseLabel == null) {
+ if (trueLabel != null) {
+ // implicit falling through the FALSE case
+ codeStream.if_icmpeq(trueLabel);
+ }
+ } else {
+ // implicit falling through the TRUE case
+ if (trueLabel == null) {
+ codeStream.if_icmpne(falseLabel);
+ } else {
+ // no implicit fall through TRUE/FALSE --> should never occur
+ }
+ }
+ }
+ // reposition the endPC
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ }
+ /**
+ * Boolean generation for == with non-boolean operands
+ *
+ */
+ public void generateOptimizedNonBooleanEqual(BlockScope currentScope, CodeStream codeStream, Label trueLabel, Label falseLabel, boolean valueRequired) {
+
+ int pc = codeStream.position;
+ Constant inline;
+ if ((inline = right.constant) != NotAConstant) {
+ // optimized case: x == 0
+ if (((left.implicitConversion >> 4) == T_int) && (inline.intValue() == 0)) {
+ left.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired) {
+ if (falseLabel == null) {
+ if (trueLabel != null) {
+ // implicit falling through the FALSE case
+ codeStream.ifeq(trueLabel);
+ }
+ } else {
+ // implicit falling through the TRUE case
+ if (trueLabel == null) {
+ codeStream.ifne(falseLabel);
+ } else {
+ // no implicit fall through TRUE/FALSE --> should never occur
+ }
+ }
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ return;
+ }
+ }
+ if ((inline = left.constant) != NotAConstant) {
+ // optimized case: 0 == x
+ if (((left.implicitConversion >> 4) == T_int)
+ && (inline.intValue() == 0)) {
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired) {
+ if (falseLabel == null) {
+ if (trueLabel != null) {
+ // implicit falling through the FALSE case
+ codeStream.ifeq(trueLabel);
+ }
+ } else {
+ // implicit falling through the TRUE case
+ if (trueLabel == null) {
+ codeStream.ifne(falseLabel);
+ } else {
+ // no implicit fall through TRUE/FALSE --> should never occur
+ }
+ }
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ return;
+ }
+ }
+ // null cases
+ // optimized case: x == null
+ if (right instanceof NullLiteral) {
+ if (left instanceof NullLiteral) {
+ // null == null
+ if (valueRequired) {
+ if ((bits & OnlyValueRequiredMASK) != 0) {
+ if (((bits & OperatorMASK) >> OperatorSHIFT) == EQUAL_EQUAL) {
+ codeStream.iconst_1();
+ } else {
+ codeStream.iconst_0();
+ }
+ } else {
+ if (falseLabel == null) {
+ // implicit falling through the FALSE case
+ if (trueLabel != null) {
+ codeStream.goto_(trueLabel);
+ }
+ }
+ }
+ }
+ } else {
+ left.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired) {
+ if (falseLabel == null) {
+ if (trueLabel != null) {
+ // implicit falling through the FALSE case
+ codeStream.ifnull(trueLabel);
+ }
+ } else {
+ // implicit falling through the TRUE case
+ if (trueLabel == null) {
+ codeStream.ifnonnull(falseLabel);
+ } else {
+ // no implicit fall through TRUE/FALSE --> should never occur
+ }
+ }
+ }
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ return;
+ } else if (left instanceof NullLiteral) { // optimized case: null == x
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired) {
+ if (falseLabel == null) {
+ if (trueLabel != null) {
+ // implicit falling through the FALSE case
+ codeStream.ifnull(trueLabel);
+ }
+ } else {
+ // implicit falling through the TRUE case
+ if (trueLabel == null) {
+ codeStream.ifnonnull(falseLabel);
+ } else {
+ // no implicit fall through TRUE/FALSE --> should never occur
+ }
+ }
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ return;
+ }
+
+ // default case
+ left.generateCode(currentScope, codeStream, valueRequired);
+ right.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired) {
+ if (falseLabel == null) {
+ if (trueLabel != null) {
+ // implicit falling through the FALSE case
+ switch (left.implicitConversion >> 4) { // operand runtime type
+ case T_int :
+ codeStream.if_icmpeq(trueLabel);
+ break;
+ case T_float :
+ codeStream.fcmpl();
+ codeStream.ifeq(trueLabel);
+ break;
+ case T_long :
+ codeStream.lcmp();
+ codeStream.ifeq(trueLabel);
+ break;
+ case T_double :
+ codeStream.dcmpl();
+ codeStream.ifeq(trueLabel);
+ break;
+ default :
+ codeStream.if_acmpeq(trueLabel);
+ }
+ }
+ } else {
+ // implicit falling through the TRUE case
+ if (trueLabel == null) {
+ switch (left.implicitConversion >> 4) { // operand runtime type
+ case T_int :
+ codeStream.if_icmpne(falseLabel);
+ break;
+ case T_float :
+ codeStream.fcmpl();
+ codeStream.ifne(falseLabel);
+ break;
+ case T_long :
+ codeStream.lcmp();
+ codeStream.ifne(falseLabel);
+ break;
+ case T_double :
+ codeStream.dcmpl();
+ codeStream.ifne(falseLabel);
+ break;
+ default :
+ codeStream.if_acmpne(falseLabel);
+ }
+ } else {
+ // no implicit fall through TRUE/FALSE --> should never occur
+ }
+ }
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+ public boolean isCompactableOperation() {
+ return false;
+ }
+ public TypeBinding resolveType(BlockScope scope) {
+
+ boolean leftIsCast, rightIsCast;
+ if ((leftIsCast = left instanceof CastExpression) == true) left.bits |= IgnoreNeedForCastCheckMASK; // will check later on
+ TypeBinding leftType = left.resolveType(scope);
+
+ if ((rightIsCast = right instanceof CastExpression) == true) right.bits |= IgnoreNeedForCastCheckMASK; // will check later on
+ TypeBinding rightType = right.resolveType(scope);
+
+ // always return BooleanBinding
+ if (leftType == null || rightType == null){
+ constant = NotAConstant;
+ return null;
+ }
+
+ // both base type
+ if (leftType.isBaseType() && rightType.isBaseType()) {
+ // the code is an int
+ // (cast) left == (cast) right --> result
+ // 0000 0000 0000 0000 0000
+ // <<16 <<12 <<8 <<4 <<0
+ int operatorSignature = OperatorSignatures[EQUAL_EQUAL][ (leftType.id << 4) + rightType.id];
+ left.implicitConversion = operatorSignature >>> 12;
+ right.implicitConversion = (operatorSignature >>> 4) & 0x000FF;
+ bits |= operatorSignature & 0xF;
+ if ((operatorSignature & 0x0000F) == T_undefined) {
+ constant = Constant.NotAConstant;
+ scope.problemReporter().invalidOperator(this, leftType, rightType);
+ return null;
+ }
+ // check need for operand cast
+ if (leftIsCast || rightIsCast) {
+ CastExpression.checkNeedForArgumentCasts(scope, EQUAL_EQUAL, operatorSignature, left, leftType.id, leftIsCast, right, rightType.id, rightIsCast);
+ }
+ computeConstant(leftType, rightType);
+ return this.resolvedType = BooleanBinding;
+ }
+
+ // Object references
+ // spec 15.20.3
+ if (this.checkCastTypesCompatibility(scope, leftType, rightType, null)
+ || this.checkCastTypesCompatibility(scope, rightType, leftType, null)) {
+
+ // (special case for String)
+ if ((rightType.id == T_String) && (leftType.id == T_String)) {
+ computeConstant(leftType, rightType);
+ } else {
+ constant = NotAConstant;
+ }
+ if (rightType.id == T_String) {
+ right.implicitConversion = String2String;
+ }
+ if (leftType.id == T_String) {
+ left.implicitConversion = String2String;
+ }
+ // check need for operand cast
+ boolean unnecessaryLeftCast = (left.bits & UnnecessaryCastMask) != 0;
+ boolean unnecessaryRightCast = (right.bits & UnnecessaryCastMask) != 0;
+ if (unnecessaryLeftCast || unnecessaryRightCast) {
+ TypeBinding alternateLeftType = unnecessaryLeftCast ? ((CastExpression)left).expression.resolvedType : leftType;
+ TypeBinding alternateRightType = unnecessaryRightCast ? ((CastExpression)right).expression.resolvedType : rightType;
+ if (this.checkCastTypesCompatibility(scope, alternateLeftType, alternateRightType, null)
+ || this.checkCastTypesCompatibility(scope, alternateRightType, alternateLeftType, null)) {
+ if (unnecessaryLeftCast) scope.problemReporter().unnecessaryCast((CastExpression)left);
+ if (unnecessaryRightCast) scope.problemReporter().unnecessaryCast((CastExpression)right);
+ }
+ }
+ return this.resolvedType = BooleanBinding;
+ }
+ constant = NotAConstant;
+ scope.problemReporter().notCompatibleTypesError(this, leftType, rightType);
+ return null;
+ }
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+ if (visitor.visit(this, scope)) {
+ left.traverse(visitor, scope);
+ right.traverse(visitor, scope);
+ }
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ExplicitConstructorCall.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ExplicitConstructorCall.js
new file mode 100644
index 0000000..ce80ae6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ExplicitConstructorCall.js
@@ -0,0 +1,366 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class ExplicitConstructorCall extends Statement implements InvocationSite {
+
+ public Expression[] arguments;
+ public Expression qualification;
+ public MethodBinding binding; // exact binding resulting from lookup
+ protected MethodBinding codegenBinding; // actual binding used for code generation (if no synthetic accessor)
+ MethodBinding syntheticAccessor; // synthetic accessor for inner-emulation
+ public int accessMode;
+ public TypeReference[] typeArguments;
+ public TypeBinding[] genericTypeArguments;
+
+ public final static int ImplicitSuper = 1;
+ public final static int Super = 2;
+ public final static int This = 3;
+
+ public VariableBinding[][] implicitArguments;
+ boolean discardEnclosingInstance;
+
+ // TODO Remove once DOMParser is activated
+ public int typeArgumentsSourceStart;
+
+ public ExplicitConstructorCall(int accessMode) {
+ this.accessMode = accessMode;
+ }
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ // must verify that exceptions potentially thrown by this expression are caught in the method.
+
+ try {
+ ((MethodScope) currentScope).isConstructorCall = true;
+
+ // process enclosing instance
+ if (qualification != null) {
+ flowInfo =
+ qualification
+ .analyseCode(currentScope, flowContext, flowInfo)
+ .unconditionalInits();
+ }
+ // process arguments
+ if (arguments != null) {
+ for (int i = 0, max = arguments.length; i < max; i++) {
+ flowInfo =
+ arguments[i]
+ .analyseCode(currentScope, flowContext, flowInfo)
+ .unconditionalInits();
+ }
+ }
+
+ ReferenceBinding[] thrownExceptions;
+ if ((thrownExceptions = binding.thrownExceptions) != NoExceptions) {
+ // check exceptions
+ flowContext.checkExceptionHandlers(
+ thrownExceptions,
+ (accessMode == ImplicitSuper)
+ ? (ASTNode) currentScope.methodScope().referenceContext
+ : (ASTNode) this,
+ flowInfo,
+ currentScope);
+ }
+ manageEnclosingInstanceAccessIfNecessary(currentScope, flowInfo);
+ manageSyntheticAccessIfNecessary(currentScope, flowInfo);
+ return flowInfo;
+ } finally {
+ ((MethodScope) currentScope).isConstructorCall = false;
+ }
+ }
+
+ /**
+ * Constructor call code generation
+ *
+ * @param currentScope org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ */
+ public void generateCode(BlockScope currentScope, CodeStream codeStream) {
+
+ if ((bits & IsReachableMASK) == 0) {
+ return;
+ }
+ try {
+ ((MethodScope) currentScope).isConstructorCall = true;
+
+ int pc = codeStream.position;
+ codeStream.aload_0();
+
+ // handling innerclass constructor invocation
+ ReferenceBinding targetType = this.codegenBinding.declaringClass;
+ // handling innerclass instance allocation - enclosing instance arguments
+ if (targetType.isNestedType()) {
+ codeStream.generateSyntheticEnclosingInstanceValues(
+ currentScope,
+ targetType,
+ discardEnclosingInstance ? null : qualification,
+ this);
+ }
+ // regular code gen
+ if (arguments != null) {
+ for (int i = 0, max = arguments.length; i < max; i++) {
+ arguments[i].generateCode(currentScope, codeStream, true);
+ }
+ }
+ // handling innerclass instance allocation - outer local arguments
+ if (targetType.isNestedType()) {
+ codeStream.generateSyntheticOuterArgumentValues(
+ currentScope,
+ targetType,
+ this);
+ }
+ if (syntheticAccessor != null) {
+ // synthetic accessor got some extra arguments appended to its signature, which need values
+ for (int i = 0,
+ max = syntheticAccessor.parameters.length - this.codegenBinding.parameters.length;
+ i < max;
+ i++) {
+ codeStream.aconst_null();
+ }
+ codeStream.invokespecial(syntheticAccessor);
+ } else {
+ codeStream.invokespecial(this.codegenBinding);
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ } finally {
+ ((MethodScope) currentScope).isConstructorCall = false;
+ }
+ }
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.InvocationSite#genericTypeArguments()
+ */
+ public TypeBinding[] genericTypeArguments() {
+ return this.genericTypeArguments;
+ }
+ public boolean isImplicitSuper() {
+ //return true if I'm of these compiler added statement super();
+
+ return (accessMode == ImplicitSuper);
+ }
+
+ public boolean isSuperAccess() {
+
+ return accessMode != This;
+ }
+
+ public boolean isTypeAccess() {
+
+ return true;
+ }
+
+ /* Inner emulation consists in either recording a dependency
+ * link only, or performing one level of propagation.
+ *
+ * Dependency mechanism is used whenever dealing with source target
+ * types, since by the time we reach them, we might not yet know their
+ * exact need.
+ */
+ void manageEnclosingInstanceAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo) {
+ ReferenceBinding superType;
+
+ if (!flowInfo.isReachable()) return;
+ // perform some emulation work in case there is some and we are inside a local type only
+ if ((superType = binding.declaringClass).isNestedType()
+ && currentScope.enclosingSourceType().isLocalType()) {
+
+ if (superType.isLocalType()) {
+ ((LocalTypeBinding) superType).addInnerEmulationDependent(currentScope, qualification != null);
+ } else {
+ // locally propagate, since we already now the desired shape for sure
+ currentScope.propagateInnerEmulation(superType, qualification != null);
+ }
+ }
+ }
+
+ public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo) {
+
+ if (!flowInfo.isReachable()) return;
+ // if constructor from parameterized type got found, use the original constructor at codegen time
+ this.codegenBinding = this.binding.original();
+
+ // perform some emulation work in case there is some and we are inside a local type only
+ if (binding.isPrivate() && accessMode != This) {
+
+ if (currentScope.environment().options.isPrivateConstructorAccessChangingVisibility) {
+ this.codegenBinding.tagForClearingPrivateModifier();
+ // constructor will not be dumped as private, no emulation required thus
+ } else {
+ syntheticAccessor =
+ ((SourceTypeBinding) this.codegenBinding.declaringClass).addSyntheticMethod(this.codegenBinding, isSuperAccess());
+ currentScope.problemReporter().needToEmulateMethodAccess(this.codegenBinding, this);
+ }
+ }
+ }
+
+ public StringBuffer printStatement(int indent, StringBuffer output) {
+
+ printIndent(indent, output);
+ if (qualification != null) qualification.printExpression(0, output).append('.');
+ if (typeArguments != null) {
+ output.append('<');//$NON-NLS-1$
+ int max = typeArguments.length - 1;
+ for (int j = 0; j < max; j++) {
+ typeArguments[j].print(0, output);
+ output.append(", ");//$NON-NLS-1$
+ }
+ typeArguments[max].print(0, output);
+ output.append('>');
+ }
+ if (accessMode == This) {
+ output.append("this("); //$NON-NLS-1$
+ } else {
+ output.append("super("); //$NON-NLS-1$
+ }
+ if (arguments != null) {
+ for (int i = 0; i < arguments.length; i++) {
+ if (i > 0) output.append(", "); //$NON-NLS-1$
+ arguments[i].printExpression(0, output);
+ }
+ }
+ return output.append(");"); //$NON-NLS-1$
+ }
+
+ public void resolve(BlockScope scope) {
+ // the return type should be void for a constructor.
+ // the test is made into getConstructor
+
+ // mark the fact that we are in a constructor call.....
+ // unmark at all returns
+ MethodScope methodScope = scope.methodScope();
+ try {
+ AbstractMethodDeclaration methodDeclaration = methodScope.referenceMethod();
+ if (methodDeclaration == null
+ || !methodDeclaration.isConstructor()
+ || ((ConstructorDeclaration) methodDeclaration).constructorCall != this) {
+ scope.problemReporter().invalidExplicitConstructorCall(this);
+ return;
+ }
+ methodScope.isConstructorCall = true;
+ ReferenceBinding receiverType = scope.enclosingSourceType();
+ if (accessMode != This)
+ receiverType = receiverType.superclass();
+
+ if (receiverType == null) {
+ return;
+ }
+
+ // qualification should be from the type of the enclosingType
+ if (qualification != null) {
+ if (accessMode != Super) {
+ scope.problemReporter().unnecessaryEnclosingInstanceSpecification(
+ qualification,
+ receiverType);
+ }
+ ReferenceBinding enclosingType = receiverType.enclosingType();
+ if (enclosingType == null) {
+ scope.problemReporter().unnecessaryEnclosingInstanceSpecification(
+ qualification,
+ receiverType);
+ discardEnclosingInstance = true;
+ } else {
+ TypeBinding qTb = qualification.resolveTypeExpecting(scope, enclosingType);
+ qualification.computeConversion(scope, qTb, qTb);
+ }
+ }
+ // resolve type arguments (for generic constructor call)
+ if (this.typeArguments != null) {
+ int length = this.typeArguments.length;
+ boolean argHasError = false; // typeChecks all arguments
+ this.genericTypeArguments = new TypeBinding[length];
+ for (int i = 0; i < length; i++) {
+ if ((this.genericTypeArguments[i] = this.typeArguments[i].resolveType(scope)) == null) {
+ argHasError = true;
+ }
+ }
+ if (argHasError) {
+ return;
+ }
+ }
+
+ // arguments buffering for the method lookup
+ TypeBinding[] argumentTypes = NoParameters;
+ boolean argsContainCast = false;
+ if (arguments != null) {
+ boolean argHasError = false; // typeChecks all arguments
+ int length = arguments.length;
+ argumentTypes = new TypeBinding[length];
+ for (int i = 0; i < length; i++) {
+ Expression argument = this.arguments[i];
+ if (argument instanceof CastExpression) {
+ argument.bits |= IgnoreNeedForCastCheckMASK; // will check later on
+ argsContainCast = true;
+ }
+ if ((argumentTypes[i] = argument.resolveType(scope)) == null) {
+ argHasError = true;
+ }
+ }
+ if (argHasError) {
+ return;
+ }
+ }
+ if ((binding = scope.getConstructor(receiverType, argumentTypes, this)).isValidBinding()) {
+ if (isMethodUseDeprecated(binding, scope))
+ scope.problemReporter().deprecatedMethod(binding, this);
+ if (this.arguments != null)
+ checkInvocationArguments(scope, null, receiverType, binding, this.arguments, argumentTypes, argsContainCast, this);
+ if (binding.isPrivate()) {
+ binding.original().modifiers |= AccPrivateUsed;
+ }
+ } else {
+ if (binding.declaringClass == null)
+ binding.declaringClass = receiverType;
+ scope.problemReporter().invalidConstructor(this, binding);
+ }
+ } finally {
+ methodScope.isConstructorCall = false;
+ }
+ }
+
+ public void setActualReceiverType(ReferenceBinding receiverType) {
+ // ignored
+ }
+
+ public void setDepth(int depth) {
+ // ignore for here
+ }
+
+ public void setFieldIndex(int depth) {
+ // ignore for here
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+
+ if (visitor.visit(this, scope)) {
+ if (this.qualification != null) {
+ this.qualification.traverse(visitor, scope);
+ }
+ if (this.typeArguments != null) {
+ for (int i = 0, typeArgumentsLength = this.typeArguments.length; i < typeArgumentsLength; i++) {
+ this.typeArguments[i].traverse(visitor, scope);
+ }
+ }
+ if (this.arguments != null) {
+ for (int i = 0, argumentLength = this.arguments.length; i < argumentLength; i++)
+ this.arguments[i].traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Expression.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Expression.js
new file mode 100644
index 0000000..3f3d98c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Expression.js
@@ -0,0 +1,757 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import java.util.ArrayList;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+import org.eclipse.wst.jsdt.internal.compiler.problem.*;
+import org.eclipse.wst.jsdt.internal.compiler.util.Util;
+
+public abstract class Expression extends Statement {
+
+ public static final boolean isConstantValueRepresentable(
+ Constant constant,
+ int constantTypeID,
+ int targetTypeID) {
+
+ //true if there is no loss of precision while casting.
+ // constantTypeID == constant.typeID
+ if (targetTypeID == constantTypeID)
+ return true;
+ switch (targetTypeID) {
+ case T_char :
+ switch (constantTypeID) {
+ case T_char :
+ return true;
+ case T_double :
+ return constant.doubleValue() == constant.charValue();
+ case T_float :
+ return constant.floatValue() == constant.charValue();
+ case T_int :
+ return constant.intValue() == constant.charValue();
+ case T_short :
+ return constant.shortValue() == constant.charValue();
+ case T_byte :
+ return constant.byteValue() == constant.charValue();
+ case T_long :
+ return constant.longValue() == constant.charValue();
+ default :
+ return false;//boolean
+ }
+
+ case T_float :
+ switch (constantTypeID) {
+ case T_char :
+ return constant.charValue() == constant.floatValue();
+ case T_double :
+ return constant.doubleValue() == constant.floatValue();
+ case T_float :
+ return true;
+ case T_int :
+ return constant.intValue() == constant.floatValue();
+ case T_short :
+ return constant.shortValue() == constant.floatValue();
+ case T_byte :
+ return constant.byteValue() == constant.floatValue();
+ case T_long :
+ return constant.longValue() == constant.floatValue();
+ default :
+ return false;//boolean
+ }
+
+ case T_double :
+ switch (constantTypeID) {
+ case T_char :
+ return constant.charValue() == constant.doubleValue();
+ case T_double :
+ return true;
+ case T_float :
+ return constant.floatValue() == constant.doubleValue();
+ case T_int :
+ return constant.intValue() == constant.doubleValue();
+ case T_short :
+ return constant.shortValue() == constant.doubleValue();
+ case T_byte :
+ return constant.byteValue() == constant.doubleValue();
+ case T_long :
+ return constant.longValue() == constant.doubleValue();
+ default :
+ return false; //boolean
+ }
+
+ case T_byte :
+ switch (constantTypeID) {
+ case T_char :
+ return constant.charValue() == constant.byteValue();
+ case T_double :
+ return constant.doubleValue() == constant.byteValue();
+ case T_float :
+ return constant.floatValue() == constant.byteValue();
+ case T_int :
+ return constant.intValue() == constant.byteValue();
+ case T_short :
+ return constant.shortValue() == constant.byteValue();
+ case T_byte :
+ return true;
+ case T_long :
+ return constant.longValue() == constant.byteValue();
+ default :
+ return false; //boolean
+ }
+
+ case T_short :
+ switch (constantTypeID) {
+ case T_char :
+ return constant.charValue() == constant.shortValue();
+ case T_double :
+ return constant.doubleValue() == constant.shortValue();
+ case T_float :
+ return constant.floatValue() == constant.shortValue();
+ case T_int :
+ return constant.intValue() == constant.shortValue();
+ case T_short :
+ return true;
+ case T_byte :
+ return constant.byteValue() == constant.shortValue();
+ case T_long :
+ return constant.longValue() == constant.shortValue();
+ default :
+ return false; //boolean
+ }
+
+ case T_int :
+ switch (constantTypeID) {
+ case T_char :
+ return constant.charValue() == constant.intValue();
+ case T_double :
+ return constant.doubleValue() == constant.intValue();
+ case T_float :
+ return constant.floatValue() == constant.intValue();
+ case T_int :
+ return true;
+ case T_short :
+ return constant.shortValue() == constant.intValue();
+ case T_byte :
+ return constant.byteValue() == constant.intValue();
+ case T_long :
+ return constant.longValue() == constant.intValue();
+ default :
+ return false; //boolean
+ }
+
+ case T_long :
+ switch (constantTypeID) {
+ case T_char :
+ return constant.charValue() == constant.longValue();
+ case T_double :
+ return constant.doubleValue() == constant.longValue();
+ case T_float :
+ return constant.floatValue() == constant.longValue();
+ case T_int :
+ return constant.intValue() == constant.longValue();
+ case T_short :
+ return constant.shortValue() == constant.longValue();
+ case T_byte :
+ return constant.byteValue() == constant.longValue();
+ case T_long :
+ return true;
+ default :
+ return false; //boolean
+ }
+
+ default :
+ return false; //boolean
+ }
+ }
+
+ public Constant constant;
+
+ //Some expression may not be used - from a java semantic point
+ //of view only - as statements. Other may. In order to avoid the creation
+ //of wrappers around expression in order to tune them as expression
+ //Expression is a subclass of Statement. See the message isValidJavaStatement()
+
+ public int implicitConversion;
+ public TypeBinding resolvedType;
+
+ public Expression() {
+ super();
+ }
+
+ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
+
+ return flowInfo;
+ }
+
+ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, boolean valueRequired) {
+
+ return analyseCode(currentScope, flowContext, flowInfo);
+ }
+
+ /**
+ * Returns false if cast is not legal.
+ */
+ public final boolean checkCastTypesCompatibility(
+ BlockScope scope,
+ TypeBinding castType,
+ TypeBinding expressionType,
+ Expression expression) {
+
+ // see specifications 5.5
+ // handle errors and process constant when needed
+
+ // if either one of the type is null ==>
+ // some error has been already reported some where ==>
+ // we then do not report an obvious-cascade-error.
+
+ if (castType == null || expressionType == null) return true;
+
+ // identity conversion cannot be performed upfront, due to side-effects
+ // like constant propagation
+
+ if (castType.isBaseType()) {
+ if (expressionType.isBaseType()) {
+ if (expressionType == castType) {
+ if (expression != null) {
+ this.constant = expression.constant; //use the same constant
+ }
+ tagAsUnnecessaryCast(scope, castType);
+ return true;
+ }
+ boolean necessary = false;
+ if (expressionType.isCompatibleWith(castType)
+ || (necessary = BaseTypeBinding.isNarrowing(castType.id, expressionType.id))) {
+ if (expression != null) {
+ expression.implicitConversion = (castType.id << 4) + expressionType.id;
+ if (expression.constant != Constant.NotAConstant) {
+ constant = expression.constant.castTo(expression.implicitConversion);
+ }
+ }
+ if (!necessary) tagAsUnnecessaryCast(scope, castType);
+ return true;
+
+ }
+ }
+ reportIllegalCast(scope, castType, expressionType);
+ return false;
+ }
+
+ //-----------cast to something which is NOT a base type--------------------------
+ if (expressionType == NullBinding) {
+ tagAsUnnecessaryCast(scope, castType);
+ return true; //null is compatible with every thing
+ }
+ if (expressionType.isBaseType()) {
+ reportIllegalCast(scope, castType, expressionType);
+ return false;
+ }
+
+ if (expressionType.isArrayType()) {
+ if (castType == expressionType) {
+ tagAsUnnecessaryCast(scope, castType);
+ return true; // identity conversion
+ }
+
+ if (castType.isArrayType()) {
+ //------- (castType.isArray) expressionType.isArray -----------
+ TypeBinding exprElementType = ((ArrayBinding) expressionType).elementsType();
+ if (exprElementType.isBaseType()) {
+ // <---stop the recursion-------
+ if (((ArrayBinding) castType).elementsType() == exprElementType) {
+ tagAsNeedCheckCast();
+ return true;
+ } else {
+ reportIllegalCast(scope, castType, expressionType);
+ return false;
+ }
+ }
+ // recursively on the elements...
+ return checkCastTypesCompatibility(
+ scope,
+ ((ArrayBinding) castType).elementsType(),
+ exprElementType,
+ expression);
+ } else if (
+ castType.isClass()) {
+ //------(castType.isClass) expressionType.isArray ---------------
+ if (castType.id == T_Object) {
+ tagAsUnnecessaryCast(scope, castType);
+ return true;
+ }
+ } else { //------- (castType.isInterface) expressionType.isArray -----------
+ if (castType.id == T_JavaLangCloneable || castType.id == T_JavaIoSerializable) {
+ tagAsNeedCheckCast();
+ return true;
+ }
+ }
+ reportIllegalCast(scope, castType, expressionType);
+ return false;
+ }
+
+ if (expressionType.isClass()) {
+ if (castType.isArrayType()) {
+ // ---- (castType.isArray) expressionType.isClass -------
+ if (expressionType.id == T_Object) { // potential runtime error
+ tagAsNeedCheckCast();
+ return true;
+ }
+ } else if (castType.isClass()) { // ----- (castType.isClass) expressionType.isClass ------
+
+ ReferenceBinding match = ((ReferenceBinding)expressionType).findSuperTypeErasingTo((ReferenceBinding)castType.erasure());
+ if (match != null) {
+ if (expression != null && castType.id == T_String) this.constant = expression.constant; // (String) cst is still a constant
+ return checkUnsafeCast(scope, castType, expressionType, match, false);
+ }
+ match = ((ReferenceBinding)castType).findSuperTypeErasingTo((ReferenceBinding)expressionType.erasure());
+ if (match != null) {
+ tagAsNeedCheckCast();
+ return checkUnsafeCast(scope, castType, expressionType, match, true);
+ }
+ } else { // ----- (castType.isInterface) expressionType.isClass -------
+
+ ReferenceBinding match = ((ReferenceBinding)expressionType).findSuperTypeErasingTo((ReferenceBinding)castType.erasure());
+ if (match != null) {
+ return checkUnsafeCast(scope, castType, expressionType, match, false);
+ }
+ // a subclass may implement the interface ==> no check at compile time
+ if (!((ReferenceBinding) expressionType).isFinal()) {
+ tagAsNeedCheckCast();
+ match = ((ReferenceBinding)castType).findSuperTypeErasingTo((ReferenceBinding)expressionType.erasure());
+ if (match != null) {
+ return checkUnsafeCast(scope, castType, expressionType, match, true);
+ }
+ return true;
+ }
+ // no subclass for expressionType, thus compile-time check is valid
+ }
+ reportIllegalCast(scope, castType, expressionType);
+ return false;
+ }
+
+ // if (expressionType.isInterface()) { cannot be anything else
+ if (castType.isArrayType()) {
+ // ----- (castType.isArray) expressionType.isInterface ------
+ if (expressionType.id == T_JavaLangCloneable
+ || expressionType.id == T_JavaIoSerializable) {// potential runtime error
+ tagAsNeedCheckCast();
+ return true;
+ } else {
+ reportIllegalCast(scope, castType, expressionType);
+ return false;
+ }
+ } else if (castType.isClass()) { // ----- (castType.isClass) expressionType.isInterface --------
+
+ if (castType.id == T_Object) { // no runtime error
+ tagAsUnnecessaryCast(scope, castType);
+ return true;
+ }
+ if (((ReferenceBinding) castType).isFinal()) {
+ // no subclass for castType, thus compile-time check is valid
+ ReferenceBinding match = ((ReferenceBinding)castType).findSuperTypeErasingTo((ReferenceBinding)expressionType.erasure());
+ if (match == null) {
+ // potential runtime error
+ reportIllegalCast(scope, castType, expressionType);
+ return false;
+ }
+ }
+ } else { // ----- (castType.isInterface) expressionType.isInterface -------
+
+ ReferenceBinding match = ((ReferenceBinding)expressionType).findSuperTypeErasingTo((ReferenceBinding)castType.erasure());
+ if (match != null) {
+ return checkUnsafeCast(scope, castType, expressionType, match, false);
+ }
+
+ match = ((ReferenceBinding)castType).findSuperTypeErasingTo((ReferenceBinding)expressionType.erasure());
+ if (match != null) {
+ tagAsNeedCheckCast();
+ return checkUnsafeCast(scope, castType, expressionType, match, true);
+ } else {
+ MethodBinding[] castTypeMethods = getAllInheritedMethods((ReferenceBinding) castType);
+ MethodBinding[] expressionTypeMethods =
+ getAllInheritedMethods((ReferenceBinding) expressionType);
+ int exprMethodsLength = expressionTypeMethods.length;
+ for (int i = 0, castMethodsLength = castTypeMethods.length; i < castMethodsLength; i++) {
+ for (int j = 0; j < exprMethodsLength; j++) {
+ if ((castTypeMethods[i].returnType != expressionTypeMethods[j].returnType)
+ && (CharOperation.equals(castTypeMethods[i].selector, expressionTypeMethods[j].selector))
+ && castTypeMethods[i].areParametersEqual(expressionTypeMethods[j])) {
+ reportIllegalCast(scope, castType, expressionType);
+ return false;
+
+ }
+ }
+ }
+ }
+ }
+ tagAsNeedCheckCast();
+ return true;
+ }
+
+ private MethodBinding[] getAllInheritedMethods(ReferenceBinding binding) {
+ ArrayList collector = new ArrayList();
+ getAllInheritedMethods0(binding, collector);
+ return (MethodBinding[]) collector.toArray(new MethodBinding[collector.size()]);
+ }
+
+ private void getAllInheritedMethods0(ReferenceBinding binding, ArrayList collector) {
+ if (!binding.isInterface()) return;
+ MethodBinding[] methodBindings = binding.methods();
+ for (int i = 0, max = methodBindings.length; i < max; i++) {
+ collector.add(methodBindings[i]);
+ }
+ ReferenceBinding[] superInterfaces = binding.superInterfaces();
+ for (int i = 0, max = superInterfaces.length; i < max; i++) {
+ getAllInheritedMethods0(superInterfaces[i], collector);
+ }
+ }
+
+ public boolean checkUnsafeCast(Scope scope, TypeBinding castType, TypeBinding expressionType, TypeBinding match, boolean isNarrowing) {
+ if (match == castType) {
+ if (!isNarrowing) tagAsUnnecessaryCast(scope, castType);
+ return true;
+ }
+ if (castType.isBoundParameterizedType() || castType.isGenericType()) {
+ if (match.isProvablyDistinctFrom(isNarrowing ? expressionType : castType)) {
+ reportIllegalCast(scope, castType, expressionType);
+ return false;
+ }
+ }
+ if (!isNarrowing) tagAsUnnecessaryCast(scope, castType);
+ return true;
+ }
+
+ /**
+ * Base types need that the widening is explicitly done by the compiler using some bytecode like i2f.
+ * Also check unsafe type operations.
+ */
+ public void computeConversion(Scope scope, TypeBinding runtimeTimeType, TypeBinding compileTimeType) {
+
+ if (runtimeTimeType == null || compileTimeType == null)
+ return;
+ if (this.implicitConversion != 0) return; // already set independantly
+
+ switch (runtimeTimeType.id) {
+ case T_byte :
+ case T_short :
+ case T_char :
+ this.implicitConversion = (T_int << 4) + compileTimeType.id;
+ break;
+ case T_String :
+ case T_float :
+ case T_boolean :
+ case T_double :
+ case T_int : //implicitConversion may result in i2i which will result in NO code gen
+ case T_long :
+ this.implicitConversion = (runtimeTimeType.id << 4) + compileTimeType.id;
+ break;
+ default : // regular object ref
+// if (compileTimeType.isRawType() && runtimeTimeType.isBoundParameterizedType()) {
+// scope.problemReporter().unsafeRawExpression(this, compileTimeType, runtimeTimeType);
+// }
+ }
+ }
+
+ /**
+ * Expression statements are plain expressions, however they generate like
+ * normal expressions with no value required.
+ *
+ * @param currentScope org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ */
+ public void generateCode(BlockScope currentScope, CodeStream codeStream) {
+
+ if ((bits & IsReachableMASK) == 0) {
+ return;
+ }
+ generateCode(currentScope, codeStream, false);
+ }
+
+ /**
+ * Every expression is responsible for generating its implicit conversion when necessary.
+ *
+ * @param currentScope org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ * @param valueRequired boolean
+ */
+ public void generateCode(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ boolean valueRequired) {
+
+ if (constant != NotAConstant) {
+ // generate a constant expression
+ int pc = codeStream.position;
+ codeStream.generateConstant(constant, implicitConversion);
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ } else {
+ // actual non-constant code generation
+ throw new ShouldNotImplement(Util.bind("ast.missingCode")); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * Default generation of a boolean value
+ * @param currentScope
+ * @param codeStream
+ * @param trueLabel
+ * @param falseLabel
+ * @param valueRequired
+ */
+ public void generateOptimizedBoolean(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ Label trueLabel,
+ Label falseLabel,
+ boolean valueRequired) {
+
+ // a label valued to nil means: by default we fall through the case...
+ // both nil means we leave the value on the stack
+
+ if ((constant != Constant.NotAConstant) && (constant.typeID() == T_boolean)) {
+ int pc = codeStream.position;
+ if (constant.booleanValue() == true) {
+ // constant == true
+ if (valueRequired) {
+ if (falseLabel == null) {
+ // implicit falling through the FALSE case
+ if (trueLabel != null) {
+ codeStream.goto_(trueLabel);
+ }
+ }
+ }
+ } else {
+ if (valueRequired) {
+ if (falseLabel != null) {
+ // implicit falling through the TRUE case
+ if (trueLabel == null) {
+ codeStream.goto_(falseLabel);
+ }
+ }
+ }
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ return;
+ }
+ generateCode(currentScope, codeStream, valueRequired);
+ // branching
+ int position = codeStream.position;
+ if (valueRequired) {
+ if (falseLabel == null) {
+ if (trueLabel != null) {
+ // Implicit falling through the FALSE case
+ codeStream.ifne(trueLabel);
+ }
+ } else {
+ if (trueLabel == null) {
+ // Implicit falling through the TRUE case
+ codeStream.ifeq(falseLabel);
+ } else {
+ // No implicit fall through TRUE/FALSE --> should never occur
+ }
+ }
+ }
+ // reposition the endPC
+ codeStream.updateLastRecordedEndPC(position);
+ }
+
+ /* Optimized (java) code generation for string concatenations that involve StringBuffer
+ * creation: going through this path means that there is no need for a new StringBuffer
+ * creation, further operands should rather be only appended to the current one.
+ * By default: no optimization.
+ */
+ public void generateOptimizedStringConcatenation(
+ BlockScope blockScope,
+ CodeStream codeStream,
+ int typeID) {
+
+ if (typeID == T_String && this.constant != NotAConstant && this.constant.stringValue().length() == 0) {
+ return; // optimize str + ""
+ }
+ generateCode(blockScope, codeStream, true);
+ codeStream.invokeStringConcatenationAppendForType(typeID);
+ }
+
+ /* Optimized (java) code generation for string concatenations that involve StringBuffer
+ * creation: going through this path means that there is no need for a new StringBuffer
+ * creation, further operands should rather be only appended to the current one.
+ */
+ public void generateOptimizedStringConcatenationCreation(
+ BlockScope blockScope,
+ CodeStream codeStream,
+ int typeID) {
+
+ // Optimization only for integers and strings
+ if (typeID == T_Object) {
+ // in the case the runtime value of valueOf(Object) returns null, we have to use append(Object) instead of directly valueOf(Object)
+ // append(Object) returns append(valueOf(Object)), which means that the null case is handled by append(String).
+ codeStream.newStringContatenation();
+ codeStream.dup();
+ codeStream.invokeStringConcatenationDefaultConstructor();
+ generateCode(blockScope, codeStream, true);
+ codeStream.invokeStringConcatenationAppendForType(T_Object);
+ return;
+ }
+ codeStream.newStringContatenation();
+ codeStream.dup();
+ if (typeID == T_String || typeID == T_null) {
+ if (constant != NotAConstant) {
+ String stringValue = constant.stringValue();
+ if (stringValue.length() == 0) { // optimize ""+<str>
+ codeStream.invokeStringConcatenationDefaultConstructor();
+ return;
+ }
+ codeStream.ldc(stringValue);
+ } else {
+ generateCode(blockScope, codeStream, true);
+ codeStream.invokeStringValueOf(T_Object);
+ }
+ } else {
+ generateCode(blockScope, codeStream, true);
+ codeStream.invokeStringValueOf(typeID);
+ }
+ codeStream.invokeStringConcatenationStringConstructor();
+ }
+
+ public boolean isCompactableOperation() {
+
+ return false;
+ }
+
+ //Return true if the conversion is done AUTOMATICALLY by the vm
+ //while the javaVM is an int based-machine, thus for example pushing
+ //a byte onto the stack , will automatically create an int on the stack
+ //(this request some work d be done by the VM on signed numbers)
+ public boolean isConstantValueOfTypeAssignableToType(TypeBinding constantType, TypeBinding targetType) {
+
+ if (constant == Constant.NotAConstant)
+ return false;
+ if (constantType == targetType)
+ return true;
+ if (constantType.isBaseType() && targetType.isBaseType()) {
+ //No free assignment conversion from anything but to integral ones.
+ if ((constantType == IntBinding
+ || BaseTypeBinding.isWidening(T_int, constantType.id))
+ && (BaseTypeBinding.isNarrowing(targetType.id, T_int))) {
+ //use current explicit conversion in order to get some new value to compare with current one
+ return isConstantValueRepresentable(constant, constantType.id, targetType.id);
+ }
+ }
+ return false;
+ }
+
+ public boolean isTypeReference() {
+ return false;
+ }
+
+ /**
+ * Constant usable for bytecode pattern optimizations, but cannot be inlined
+ * since it is not strictly equivalent to the definition of constant expressions.
+ * In particular, some side-effects may be required to occur (only the end value
+ * is known).
+ * @return Constant known to be of boolean type
+ */
+ public Constant optimizedBooleanConstant() {
+ return this.constant;
+ }
+
+ public StringBuffer print(int indent, StringBuffer output) {
+ printIndent(indent, output);
+ return printExpression(indent, output);
+ }
+
+ public abstract StringBuffer printExpression(int indent, StringBuffer output);
+
+ public StringBuffer printStatement(int indent, StringBuffer output) {
+ return print(indent, output).append(";"); //$NON-NLS-1$
+ }
+
+ public void reportIllegalCast(Scope scope, TypeBinding castType, TypeBinding expressionType) {
+ // do nothing by default
+ }
+
+ public void resolve(BlockScope scope) {
+ // drops the returning expression's type whatever the type is.
+
+ this.resolveType(scope);
+ return;
+ }
+
+ public TypeBinding resolveType(BlockScope scope) {
+ // by default... subclasses should implement a better TC if required.
+
+ return null;
+ }
+
+ public TypeBinding resolveType(ClassScope classScope) {
+ // by default... subclasses should implement a better TB if required.
+ return null;
+ }
+
+ public TypeBinding resolveTypeExpecting(
+ BlockScope scope,
+ TypeBinding expectedType) {
+
+ this.setExpectedType(expectedType); // needed in case of generic method invocation
+ TypeBinding expressionType = this.resolveType(scope);
+ if (expressionType == null) return null;
+ if (expressionType == expectedType) return expressionType;
+
+ if (!expressionType.isCompatibleWith(expectedType)) {
+ scope.problemReporter().typeMismatchError(expressionType, expectedType, this);
+ return null;
+ }
+ return expressionType;
+ }
+
+ /**
+ * Record the type expectation before this expression is typechecked.
+ * e.g. String s = foo();, foo() will be tagged as being expected of type String
+ * Used to trigger proper inference of generic method invocations.
+ */
+ public void setExpectedType(TypeBinding expectedType) {
+ // do nothing by default
+ }
+
+ public void tagAsUnnecessaryCast(Scope scope, TypeBinding castType) {
+ // do nothing by default
+ }
+
+ public void tagAsNeedCheckCast() {
+ // do nothing by default
+ }
+
+ public Expression toTypeReference() {
+ //by default undefined
+
+ //this method is meanly used by the parser in order to transform
+ //an expression that is used as a type reference in a cast ....
+ //--appreciate the fact that castExpression and ExpressionWithParenthesis
+ //--starts with the same pattern.....
+
+ return this;
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+ // do nothing by default
+ }
+ public void traverse(ASTVisitor visitor, ClassScope scope) {
+ // do nothing by default
+ }
+ public void traverse(ASTVisitor visitor, CompilationUnitScope scope) {
+ // do nothing by default
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ExtendedStringLiteral.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ExtendedStringLiteral.js
new file mode 100644
index 0000000..21e01dd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ExtendedStringLiteral.js
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+
+public class ExtendedStringLiteral extends StringLiteral {
+
+ /**
+ * Build a string+char literal
+ */
+ public ExtendedStringLiteral(StringLiteral str, CharLiteral character) {
+
+ super(str.source, str.sourceStart, str.sourceEnd);
+ extendWith(character);
+ }
+
+ /**
+ * Build a two-strings literal
+ * */
+ public ExtendedStringLiteral(StringLiteral str1, StringLiteral str2) {
+
+ super(str1.source, str1.sourceStart, str1.sourceEnd);
+ extendWith(str2);
+ }
+
+ /**
+ * Add the lit source to mine, just as if it was mine
+ */
+ public ExtendedStringLiteral extendWith(CharLiteral lit) {
+
+ //update the source
+ int length = source.length;
+ System.arraycopy(source, 0, (source = new char[length + 1]), 0, length);
+ source[length] = lit.value;
+ //position at the end of all literals
+ sourceEnd = lit.sourceEnd;
+ return this;
+ }
+
+ /**
+ * Add the lit source to mine, just as if it was mine
+ */
+ public ExtendedStringLiteral extendWith(StringLiteral lit) {
+
+ //uddate the source
+ int length = source.length;
+ System.arraycopy(
+ source,
+ 0,
+ source = new char[length + lit.source.length],
+ 0,
+ length);
+ System.arraycopy(lit.source, 0, source, length, lit.source.length);
+ //position at the end of all literals
+ sourceEnd = lit.sourceEnd;
+ return this;
+ }
+
+ public StringBuffer printExpression(int indent, StringBuffer output) {
+
+ return output.append("ExtendedStringLiteral{").append(source).append('}'); //$NON-NLS-1$
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+
+ visitor.visit(this, scope);
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/FalseLiteral.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/FalseLiteral.js
new file mode 100644
index 0000000..5ef0163
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/FalseLiteral.js
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class FalseLiteral extends MagicLiteral {
+ static final char[] source = {'f', 'a', 'l', 's', 'e'};
+public FalseLiteral(int s , int e) {
+ super(s,e);
+}
+public void computeConstant() {
+
+ constant = Constant.fromValue(false);}
+/**
+ * Code generation for false literal
+ *
+ * @param currentScope org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ * @param valueRequired boolean
+ */
+public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
+ int pc = codeStream.position;
+ if (valueRequired)
+ codeStream.iconst_0();
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+}
+public void generateOptimizedBoolean(BlockScope currentScope, CodeStream codeStream, Label trueLabel, Label falseLabel, boolean valueRequired) {
+
+ // falseLabel being not nil means that we will not fall through into the FALSE case
+
+ int pc = codeStream.position;
+ if (valueRequired) {
+ if (falseLabel != null) {
+ // implicit falling through the TRUE case
+ if (trueLabel == null) {
+ codeStream.goto_(falseLabel);
+ }
+ }
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+}
+public TypeBinding literalType(BlockScope scope) {
+ return BooleanBinding;
+}
+/**
+ *
+ */
+public char[] source() {
+ return source;
+}
+public void traverse(ASTVisitor visitor, BlockScope scope) {
+ visitor.visit(this, scope);
+ visitor.endVisit(this, scope);
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/FieldDeclaration.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/FieldDeclaration.js
new file mode 100644
index 0000000..9224626
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/FieldDeclaration.js
@@ -0,0 +1,242 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class FieldDeclaration extends AbstractVariableDeclaration {
+ public FieldBinding binding;
+ boolean hasBeenResolved = false;
+ public Javadoc javadoc;
+
+ //allows to retrieve both the "type" part of the declaration (part1)
+ //and also the part that decribe the name and the init and optionally
+ //some other dimension ! ....
+ //public int[] a, b[] = X, c ;
+ //for b that would give for
+ // - part1 : public int[]
+ // - part2 : b[] = X,
+
+ public int endPart1Position;
+ public int endPart2Position;
+
+ public FieldDeclaration() {
+ // for subtypes or conversion
+ }
+
+ public FieldDeclaration(
+ char[] name,
+ int sourceStart,
+ int sourceEnd) {
+
+ this.name = name;
+
+ //due to some declaration like
+ // int x, y = 3, z , x ;
+ //the sourceStart and the sourceEnd is ONLY on the name
+ this.sourceStart = sourceStart;
+ this.sourceEnd = sourceEnd;
+ }
+
+ public FlowInfo analyseCode(
+ MethodScope initializationScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ if (this.binding != null && this.binding.isPrivate() && !this.binding.isPrivateUsed()) {
+ if (!initializationScope.referenceCompilationUnit().compilationResult.hasSyntaxError()) {
+ initializationScope.problemReporter().unusedPrivateField(this);
+ }
+ }
+ // cannot define static non-constant field inside nested class
+ if (this.binding != null
+ && this.binding.isValidBinding()
+ && this.binding.isStatic()
+ && !this.binding.isConstantValue()
+ && this.binding.declaringClass.isNestedType()
+ && this.binding.declaringClass.isClass()
+ && !this.binding.declaringClass.isStatic()) {
+ initializationScope.problemReporter().unexpectedStaticModifierForField(
+ (SourceTypeBinding) this.binding.declaringClass,
+ this);
+ }
+
+ if (this.initialization != null) {
+ flowInfo =
+ this.initialization
+ .analyseCode(initializationScope, flowContext, flowInfo)
+ .unconditionalInits();
+ flowInfo.markAsDefinitelyAssigned(this.binding);
+ }
+ return flowInfo;
+ }
+
+ /**
+ * Code generation for a field declaration:
+ * standard assignment to a field
+ *
+ * @param currentScope org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ */
+ public void generateCode(BlockScope currentScope, CodeStream codeStream) {
+
+ if ((this.bits & IsReachableMASK) == 0) {
+ return;
+ }
+ // do not generate initialization code if final and static (constant is then
+ // recorded inside the field itself).
+ int pc = codeStream.position;
+ boolean isStatic;
+ if (this.initialization != null
+ && !((isStatic = this.binding.isStatic()) && this.binding.isConstantValue())) {
+ // non-static field, need receiver
+ if (!isStatic)
+ codeStream.aload_0();
+ // generate initialization value
+ this.initialization.generateCode(currentScope, codeStream, true);
+ // store into field
+ if (isStatic) {
+ codeStream.putstatic(this.binding);
+ } else {
+ codeStream.putfield(this.binding);
+ }
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+
+ public boolean isField() {
+
+ return true;
+ }
+
+ public boolean isStatic() {
+
+ if (this.binding != null)
+ return this.binding.isStatic();
+ return (this.modifiers & AccStatic) != 0;
+ }
+
+ public void resolve(MethodScope initializationScope) {
+
+ // the two <constant = Constant.NotAConstant> could be regrouped into
+ // a single line but it is clearer to have two lines while the reason of their
+ // existence is not at all the same. See comment for the second one.
+
+ //--------------------------------------------------------
+ if (!this.hasBeenResolved && this.binding != null && this.binding.isValidBinding()) {
+
+ this.hasBeenResolved = true;
+
+ // check if field is hiding some variable - issue is that field binding already got inserted in scope
+ // thus must lookup separately in super type and outer context
+ ClassScope classScope = initializationScope.enclosingClassScope();
+
+ if (classScope != null) {
+ SourceTypeBinding declaringType = classScope.enclosingSourceType();
+ boolean checkLocal = true;
+ if (declaringType.superclass != null) {
+ Binding existingVariable = classScope.findField(declaringType.superclass, this.name, this, false /*do not resolve hidden field*/);
+ if (existingVariable != null && existingVariable.isValidBinding()){
+ initializationScope.problemReporter().fieldHiding(this, existingVariable);
+ checkLocal = false; // already found a matching field
+ }
+ }
+ if (checkLocal) {
+ Scope outerScope = classScope.parent;
+ // only corner case is: lookup of outer field through static declaringType, which isn't detected by #getBinding as lookup starts
+ // from outer scope. Subsequent static contexts are detected for free.
+ Binding existingVariable = outerScope.getBinding(this.name, BindingIds.VARIABLE, this, false /*do not resolve hidden field*/);
+ if (existingVariable != null && existingVariable.isValidBinding()
+ && (!(existingVariable instanceof FieldBinding)
+ || ((FieldBinding) existingVariable).isStatic()
+ || !declaringType.isStatic())) {
+ initializationScope.problemReporter().fieldHiding(this, existingVariable);
+ }
+ }
+ }
+
+ this.type.resolvedType = this.binding.type; // update binding for type reference
+
+ FieldBinding previousField = initializationScope.initializedField;
+ int previousFieldID = initializationScope.lastVisibleFieldID;
+ try {
+ initializationScope.initializedField = this.binding;
+ initializationScope.lastVisibleFieldID = this.binding.id;
+
+ // the resolution of the initialization hasn't been done
+ if (this.initialization == null) {
+ this.binding.setConstant(Constant.NotAConstant);
+ } else {
+ // break dead-lock cycles by forcing constant to NotAConstant
+ this.binding.setConstant(Constant.NotAConstant);
+
+ TypeBinding fieldType = this.binding.type;
+ TypeBinding initializationType;
+ this.initialization.setExpectedType(fieldType); // needed in case of generic method invocation
+ if (this.initialization instanceof ArrayInitializer) {
+
+ if ((initializationType = this.initialization.resolveTypeExpecting(initializationScope, fieldType)) != null) {
+ ((ArrayInitializer) this.initialization).binding = (ArrayBinding) initializationType;
+ this.initialization.computeConversion(initializationScope, fieldType, initializationType);
+ }
+ } else if ((initializationType = this.initialization.resolveType(initializationScope)) != null) {
+
+ if (this.initialization.isConstantValueOfTypeAssignableToType(initializationType, fieldType)
+ || (fieldType.isBaseType() && BaseTypeBinding.isWidening(fieldType.id, initializationType.id))
+ || initializationType.isCompatibleWith(fieldType)) {
+ this.initialization.computeConversion(initializationScope, fieldType, initializationType);
+ if (initializationType.isRawType() && (fieldType.isBoundParameterizedType() || fieldType.isGenericType())) {
+ initializationScope.problemReporter().unsafeRawConversion(this.initialization, initializationType, fieldType);
+ }
+ } else {
+ initializationScope.problemReporter().typeMismatchError(initializationType, fieldType, this);
+ }
+ if (this.binding.isFinal()){ // cast from constant actual type to variable type
+ this.binding.setConstant(this.initialization.constant.castTo((this.binding.type.id << 4) + this.initialization.constant.typeID()));
+ }
+ } else {
+ this.binding.setConstant(NotAConstant);
+ }
+ }
+ // Resolve Javadoc comment if one is present
+ if (this.javadoc != null) {
+ /*
+ if (classScope != null) {
+ this.javadoc.resolve(classScope);
+ }
+ */
+ this.javadoc.resolve(initializationScope);
+ } else if (this.binding != null && this.binding.declaringClass != null && !this.binding.declaringClass.isLocalType()) {
+ initializationScope.problemReporter().javadocMissing(this.sourceStart, this.sourceEnd, this.binding.modifiers);
+ }
+ } finally {
+ initializationScope.initializedField = previousField;
+ initializationScope.lastVisibleFieldID = previousFieldID;
+ if (this.binding.constant() == null)
+ this.binding.setConstant(Constant.NotAConstant);
+ }
+ }
+ }
+
+ public void traverse(ASTVisitor visitor, MethodScope scope) {
+
+ if (visitor.visit(this, scope)) {
+ this.type.traverse(visitor, scope);
+ if (this.initialization != null)
+ this.initialization.traverse(visitor, scope);
+ }
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/FieldReference.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/FieldReference.js
new file mode 100644
index 0000000..f6aa637
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/FieldReference.js
@@ -0,0 +1,545 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class FieldReference extends Reference implements InvocationSite {
+
+ public Expression receiver;
+ public char[] token;
+ public FieldBinding binding; // exact binding resulting from lookup
+ protected FieldBinding codegenBinding; // actual binding used for code generation (if no synthetic accessor)
+ public MethodBinding[] syntheticAccessors; // [0]=read accessor [1]=write accessor
+ public static final int READ = 0;
+ public static final int WRITE = 1;
+
+ public long nameSourcePosition; //(start<<32)+end
+ public TypeBinding receiverType;
+ public TypeBinding genericCast;
+
+ public FieldReference(char[] source, long pos) {
+
+ token = source;
+ nameSourcePosition = pos;
+ //by default the position are the one of the field (not true for super access)
+ sourceStart = (int) (pos >>> 32);
+ sourceEnd = (int) (pos & 0x00000000FFFFFFFFL);
+ bits |= BindingIds.FIELD;
+
+ }
+
+ public FlowInfo analyseAssignment(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo,
+ Assignment assignment,
+ boolean isCompound) {
+
+ // compound assignment extra work
+ if (isCompound) { // check the variable part is initialized if blank final
+ if (binding.isBlankFinal()
+ && receiver.isThis()
+ && currentScope.allowBlankFinalFieldAssignment(binding)
+ && (!flowInfo.isDefinitelyAssigned(binding))) {
+ currentScope.problemReporter().uninitializedBlankFinalField(binding, this);
+ // we could improve error msg here telling "cannot use compound assignment on final blank field"
+ }
+ manageSyntheticAccessIfNecessary(currentScope, flowInfo, true /*read-access*/);
+ }
+ flowInfo =
+ receiver
+ .analyseCode(currentScope, flowContext, flowInfo, !binding.isStatic())
+ .unconditionalInits();
+ if (assignment.expression != null) {
+ flowInfo =
+ assignment
+ .expression
+ .analyseCode(currentScope, flowContext, flowInfo)
+ .unconditionalInits();
+ }
+ manageSyntheticAccessIfNecessary(currentScope, flowInfo, false /*write-access*/);
+
+ // check if assigning a final field
+ if (binding.isFinal()) {
+ // in a context where it can be assigned?
+ if (binding.isBlankFinal()
+ && !isCompound
+ && receiver.isThis()
+ && !(receiver instanceof QualifiedThisReference)
+ && ((receiver.bits & ParenthesizedMASK) == 0) // (this).x is forbidden
+ && currentScope.allowBlankFinalFieldAssignment(binding)) {
+ if (flowInfo.isPotentiallyAssigned(binding)) {
+ currentScope.problemReporter().duplicateInitializationOfBlankFinalField(
+ binding,
+ this);
+ } else {
+ flowContext.recordSettingFinal(binding, this, flowInfo);
+ }
+ flowInfo.markAsDefinitelyAssigned(binding);
+ } else {
+ // assigning a final field outside an initializer or constructor or wrong reference
+ currentScope.problemReporter().cannotAssignToFinalField(binding, this);
+ }
+ }
+ return flowInfo;
+ }
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ return analyseCode(currentScope, flowContext, flowInfo, true);
+ }
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo,
+ boolean valueRequired) {
+
+ receiver.analyseCode(currentScope, flowContext, flowInfo, !binding.isStatic());
+ if (valueRequired) {
+ manageSyntheticAccessIfNecessary(currentScope, flowInfo, true /*read-access*/);
+ }
+ return flowInfo;
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.Expression#computeConversion(org.eclipse.wst.jsdt.internal.compiler.lookup.Scope, org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding, org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding)
+ */
+ public void computeConversion(Scope scope, TypeBinding runtimeTimeType, TypeBinding compileTimeType) {
+ if (runtimeTimeType == null || compileTimeType == null)
+ return;
+ // set the generic cast after the fact, once the type expectation is fully known (no need for strict cast)
+ if (this.binding != null && this.binding.isValidBinding()) {
+ FieldBinding originalBinding = this.binding.original();
+ if (originalBinding != this.binding) {
+ // extra cast needed if method return type has type variable
+ if ((originalBinding.type.tagBits & TagBits.HasTypeVariable) != 0 && runtimeTimeType.id != T_Object) {
+ this.genericCast = originalBinding.type.genericCast(runtimeTimeType);
+ }
+ }
+ }
+ super.computeConversion(scope, runtimeTimeType, compileTimeType);
+ }
+
+ public FieldBinding fieldBinding() {
+
+ return binding;
+ }
+
+ public void generateAssignment(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ Assignment assignment,
+ boolean valueRequired) {
+
+ receiver.generateCode(
+ currentScope,
+ codeStream,
+ !this.codegenBinding.isStatic());
+ assignment.expression.generateCode(currentScope, codeStream, true);
+ fieldStore(
+ codeStream,
+ this.codegenBinding,
+ syntheticAccessors == null ? null : syntheticAccessors[WRITE],
+ valueRequired);
+ if (valueRequired) {
+ codeStream.generateImplicitConversion(assignment.implicitConversion);
+ }
+ // no need for generic cast as value got dupped
+ }
+
+ /**
+ * Field reference code generation
+ *
+ * @param currentScope org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ * @param valueRequired boolean
+ */
+ public void generateCode(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ boolean valueRequired) {
+
+ int pc = codeStream.position;
+ if (constant != NotAConstant) {
+ if (valueRequired) {
+ codeStream.generateConstant(constant, implicitConversion);
+ }
+ } else {
+ boolean isStatic = this.codegenBinding.isStatic();
+ receiver.generateCode(currentScope, codeStream, !isStatic);
+ if (valueRequired) {
+ if (!this.codegenBinding.isConstantValue()) {
+ if (this.codegenBinding.declaringClass == null) { // array length
+ codeStream.arraylength();
+ } else {
+ if (syntheticAccessors == null || syntheticAccessors[READ] == null) {
+ if (isStatic) {
+ codeStream.getstatic(this.codegenBinding);
+ } else {
+ codeStream.getfield(this.codegenBinding);
+ }
+ } else {
+ codeStream.invokestatic(syntheticAccessors[READ]);
+ }
+ }
+ codeStream.generateImplicitConversion(implicitConversion);
+ if (this.genericCast != null) codeStream.checkcast(this.genericCast);
+ } else {
+ if (!isStatic) {
+ codeStream.invokeObjectGetClass(); // perform null check
+ codeStream.pop();
+ }
+ codeStream.generateConstant(this.codegenBinding.constant(), implicitConversion);
+ }
+ } else {
+ if (!isStatic){
+ codeStream.invokeObjectGetClass(); // perform null check
+ codeStream.pop();
+ }
+ }
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+
+ public void generateCompoundAssignment(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ Expression expression,
+ int operator,
+ int assignmentImplicitConversion,
+ boolean valueRequired) {
+
+ boolean isStatic;
+ receiver.generateCode(
+ currentScope,
+ codeStream,
+ !(isStatic = this.codegenBinding.isStatic()));
+ if (isStatic) {
+ if (syntheticAccessors == null || syntheticAccessors[READ] == null) {
+ codeStream.getstatic(this.codegenBinding);
+ } else {
+ codeStream.invokestatic(syntheticAccessors[READ]);
+ }
+ } else {
+ codeStream.dup();
+ if (syntheticAccessors == null || syntheticAccessors[READ] == null) {
+ codeStream.getfield(this.codegenBinding);
+ } else {
+ codeStream.invokestatic(syntheticAccessors[READ]);
+ }
+ }
+ int operationTypeID;
+ if ((operationTypeID = implicitConversion >> 4) == T_String) {
+ // no need for generic cast on previous #getfield since using Object string buffer methods.
+ codeStream.generateStringConcatenationAppend(currentScope, null, expression);
+ } else {
+ // promote the array reference to the suitable operation type
+ codeStream.generateImplicitConversion(implicitConversion);
+ // generate the increment value (will by itself be promoted to the operation value)
+ if (expression == IntLiteral.One) { // prefix operation
+ codeStream.generateConstant(expression.constant, implicitConversion);
+ } else {
+ expression.generateCode(currentScope, codeStream, true);
+ }
+ // perform the operation
+ codeStream.sendOperator(operator, operationTypeID);
+ // cast the value back to the array reference type
+ codeStream.generateImplicitConversion(assignmentImplicitConversion);
+ }
+ fieldStore(
+ codeStream,
+ this.codegenBinding,
+ syntheticAccessors == null ? null : syntheticAccessors[WRITE],
+ valueRequired);
+ // no need for generic cast as value got dupped
+ }
+
+ public void generatePostIncrement(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ CompoundAssignment postIncrement,
+ boolean valueRequired) {
+
+ boolean isStatic;
+ receiver.generateCode(
+ currentScope,
+ codeStream,
+ !(isStatic = this.codegenBinding.isStatic()));
+ if (isStatic) {
+ if (syntheticAccessors == null || syntheticAccessors[READ] == null) {
+ codeStream.getstatic(this.codegenBinding);
+ } else {
+ codeStream.invokestatic(syntheticAccessors[READ]);
+ }
+ } else {
+ codeStream.dup();
+ if (syntheticAccessors == null || syntheticAccessors[READ] == null) {
+ codeStream.getfield(this.codegenBinding);
+ } else {
+ codeStream.invokestatic(syntheticAccessors[READ]);
+ }
+ }
+ if (valueRequired) {
+ if (isStatic) {
+ if ((this.codegenBinding.type == LongBinding)
+ || (this.codegenBinding.type == DoubleBinding)) {
+ codeStream.dup2();
+ } else {
+ codeStream.dup();
+ }
+ } else { // Stack: [owner][old field value] ---> [old field value][owner][old field value]
+ if ((this.codegenBinding.type == LongBinding)
+ || (this.codegenBinding.type == DoubleBinding)) {
+ codeStream.dup2_x1();
+ } else {
+ codeStream.dup_x1();
+ }
+ }
+ }
+ codeStream.generateConstant(
+ postIncrement.expression.constant,
+ implicitConversion);
+ codeStream.sendOperator(postIncrement.operator, this.codegenBinding.type.id);
+ codeStream.generateImplicitConversion(
+ postIncrement.assignmentImplicitConversion);
+ fieldStore(codeStream, this.codegenBinding, syntheticAccessors == null ? null : syntheticAccessors[WRITE], false);
+ }
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.InvocationSite#genericTypeArguments()
+ */
+ public TypeBinding[] genericTypeArguments() {
+ return null;
+ }
+ public static final Constant getConstantFor(
+ FieldBinding binding,
+ Reference reference,
+ boolean isImplicit,
+ Scope referenceScope) {
+
+ //propagation of the constant.
+
+ //ref can be a FieldReference, a SingleNameReference or a QualifiedNameReference
+ //indexInQualification may have a value greater than zero only for QualifiednameReference
+ //if ref==null then indexInQualification==0 AND implicitReceiver == false. This case is a
+ //degenerated case where a fake reference field (null)
+ //is associted to a real FieldBinding in order
+ //to allow its constant computation using the regular path (in other words, find the fieldDeclaration
+ //and proceed to its type resolution). As implicitReceiver is false, no error reporting
+ //against ref will be used ==> no nullPointerException risk ....
+
+ //special treatment for langage-built-in field (their declaring class is null)
+ if (binding.declaringClass == null) {
+ //currently only one field "length" : the constant computation is never done
+ return NotAConstant;
+ }
+ if (!binding.isFinal()) {
+ binding.setConstant(NotAConstant);
+ return NotAConstant;
+ }
+ Constant fieldConstant = binding.constant();
+ if (fieldConstant != null) {
+ if (isImplicit || (reference instanceof QualifiedNameReference
+ && binding == ((QualifiedNameReference)reference).binding)) {
+ return fieldConstant;
+ }
+ return NotAConstant;
+ }
+
+ //The field has not been yet type checked.
+ //It also means that the field is not coming from a class that
+ //has already been compiled. It can only be from a class within
+ //compilation units to process. Thus the field is NOT from a BinaryTypeBinbing
+
+ FieldBinding originalField = binding.original();
+ SourceTypeBinding sourceType = (SourceTypeBinding) originalField.declaringClass;
+ TypeDeclaration typeDecl = sourceType.scope.referenceContext;
+ FieldDeclaration fieldDecl = typeDecl.declarationOf(originalField);
+
+ fieldDecl.resolve(originalField.isStatic() //side effect on binding
+ ? typeDecl.staticInitializerScope
+ : typeDecl.initializerScope);
+
+ if (isImplicit || (reference instanceof QualifiedNameReference
+ && binding == ((QualifiedNameReference)reference).binding)) {
+ return binding.constant();
+ }
+ return NotAConstant;
+ }
+
+ public boolean isSuperAccess() {
+
+ return receiver.isSuper();
+ }
+
+ public boolean isTypeAccess() {
+
+ return receiver != null && receiver.isTypeReference();
+ }
+
+ /*
+ * No need to emulate access to protected fields since not implicitly accessed
+ */
+ public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo, boolean isReadAccess) {
+
+ if (!flowInfo.isReachable()) return;
+ // if field from parameterized type got found, use the original field at codegen time
+ this.codegenBinding = this.binding.original();
+
+ if (binding.isPrivate()) {
+ if ((currentScope.enclosingSourceType() != this.codegenBinding.declaringClass) && !binding.isConstantValue()) {
+ if (syntheticAccessors == null)
+ syntheticAccessors = new MethodBinding[2];
+ syntheticAccessors[isReadAccess ? READ : WRITE] =
+ ((SourceTypeBinding) this.codegenBinding.declaringClass).addSyntheticMethod(this.codegenBinding, isReadAccess);
+ currentScope.problemReporter().needToEmulateFieldAccess(this.codegenBinding, this, isReadAccess);
+ return;
+ }
+
+ } else if (receiver instanceof QualifiedSuperReference) { // qualified super
+
+ // qualified super need emulation always
+ SourceTypeBinding destinationType =
+ (SourceTypeBinding) (((QualifiedSuperReference) receiver)
+ .currentCompatibleType);
+ if (syntheticAccessors == null)
+ syntheticAccessors = new MethodBinding[2];
+ syntheticAccessors[isReadAccess ? READ : WRITE] = destinationType.addSyntheticMethod(this.codegenBinding, isReadAccess);
+ currentScope.problemReporter().needToEmulateFieldAccess(this.codegenBinding, this, isReadAccess);
+ return;
+
+ } else if (binding.isProtected()) {
+
+ SourceTypeBinding enclosingSourceType;
+ if (((bits & DepthMASK) != 0)
+ && binding.declaringClass.getPackage()
+ != (enclosingSourceType = currentScope.enclosingSourceType()).getPackage()) {
+
+ SourceTypeBinding currentCompatibleType =
+ (SourceTypeBinding) enclosingSourceType.enclosingTypeAt(
+ (bits & DepthMASK) >> DepthSHIFT);
+ if (syntheticAccessors == null)
+ syntheticAccessors = new MethodBinding[2];
+ syntheticAccessors[isReadAccess ? READ : WRITE] = currentCompatibleType.addSyntheticMethod(this.codegenBinding, isReadAccess);
+ currentScope.problemReporter().needToEmulateFieldAccess(this.codegenBinding, this, isReadAccess);
+ return;
+ }
+ }
+ // if the binding declaring class is not visible, need special action
+ // for runtime compatibility on 1.2 VMs : change the declaring class of the binding
+ // NOTE: from target 1.2 on, field's declaring class is touched if any different from receiver type
+ if (this.binding.declaringClass != this.receiverType
+ && !this.receiverType.isArrayType()
+ && this.binding.declaringClass != null // array.length
+ && !this.binding.isConstantValue()
+ && ((currentScope.environment().options.targetJDK >= ClassFileConstants.JDK1_2
+ && this.binding.declaringClass.id != T_Object)
+ //no change for Object fields (in case there was)
+ || !this.codegenBinding.declaringClass.canBeSeenBy(currentScope))) {
+ this.codegenBinding =
+ currentScope.enclosingSourceType().getUpdatedFieldBinding(
+ this.codegenBinding,
+ (ReferenceBinding) this.receiverType.erasure());
+ }
+ }
+
+
+ public StringBuffer printExpression(int indent, StringBuffer output) {
+
+ return receiver.printExpression(0, output).append('.').append(token);
+ }
+
+ public TypeBinding resolveType(BlockScope scope) {
+
+ // Answer the signature type of the field.
+ // constants are propaged when the field is final
+ // and initialized with a (compile time) constant
+
+ //always ignore receiver cast, since may affect constant pool reference
+ boolean receiverCast = false;
+ if (this.receiver instanceof CastExpression) {
+ this.receiver.bits |= IgnoreNeedForCastCheckMASK; // will check later on
+ receiverCast = true;
+ }
+ this.receiverType = receiver.resolveType(scope);
+ if (this.receiverType == null) {
+ constant = NotAConstant;
+ return null;
+ }
+ if (receiverCast) {
+ // due to change of declaring class with receiver type, only identity cast should be notified
+ if (((CastExpression)this.receiver).expression.resolvedType == this.receiverType) {
+ scope.problemReporter().unnecessaryCast((CastExpression)this.receiver);
+ }
+ }
+ // the case receiverType.isArrayType and token = 'length' is handled by the scope API
+ this.codegenBinding = this.binding = scope.getField(this.receiverType, token, this);
+ if (!binding.isValidBinding()) {
+ constant = NotAConstant;
+ scope.problemReporter().invalidField(this, this.receiverType);
+ return null;
+ }
+ this.receiver.computeConversion(scope, this.receiverType, this.receiverType);
+ if (isFieldUseDeprecated(binding, scope, (this.bits & IsStrictlyAssignedMASK) !=0)) {
+ scope.problemReporter().deprecatedField(binding, this);
+ }
+ boolean isImplicitThisRcv = receiver.isImplicitThis();
+ constant = FieldReference.getConstantFor(binding, this, isImplicitThisRcv, scope);
+ if (!isImplicitThisRcv) {
+ constant = NotAConstant;
+ }
+ if (binding.isStatic()) {
+ // static field accessed through receiver? legal but unoptimal (optional warning)
+ if (!(isImplicitThisRcv
+ || (receiver instanceof NameReference
+ && (((NameReference) receiver).bits & BindingIds.TYPE) != 0))) {
+ scope.problemReporter().nonStaticAccessToStaticField(this, binding);
+ }
+ if (!isImplicitThisRcv && binding.declaringClass != receiverType) {
+ scope.problemReporter().indirectAccessToStaticField(this, binding);
+ }
+ }
+ return this.resolvedType = binding.type;
+ }
+
+ public void setActualReceiverType(ReferenceBinding receiverType) {
+ // ignored
+ }
+
+ public void setDepth(int depth) {
+
+ bits &= ~DepthMASK; // flush previous depth if any
+ if (depth > 0) {
+ bits |= (depth & 0xFF) << DepthSHIFT; // encoded on 8 bits
+ }
+ }
+
+ public void setFieldIndex(int index) {
+ // ignored
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+
+ if (visitor.visit(this, scope)) {
+ receiver.traverse(visitor, scope);
+ }
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/FloatLiteral.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/FloatLiteral.js
new file mode 100644
index 0000000..93a0848
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/FloatLiteral.js
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream;
+import org.eclipse.wst.jsdt.internal.compiler.impl.Constant;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding;
+import org.eclipse.wst.jsdt.internal.compiler.util.FloatUtil;
+
+public class FloatLiteral extends NumberLiteral {
+ float value;
+ final static float Float_MIN_VALUE = Float.intBitsToFloat(1); // work-around VAJ problem 1F6IGUU
+ public FloatLiteral(char[] token, int s, int e) {
+ super(token, s, e);
+ }
+ public void computeConstant() {
+ Float computedValue;
+ try {
+ computedValue = Float.valueOf(String.valueOf(source));
+ } catch (NumberFormatException e) {
+ // hex floating point literal
+ // being rejected by 1.4 libraries where Float.valueOf(...) doesn't handle hex decimal floats
+ try {
+ float v = FloatUtil.valueOfHexFloatLiteral(source);
+ if (v == Float.POSITIVE_INFINITY) {
+ // error: the number is too large to represent
+ return;
+ }
+ if (Float.isNaN(v)) {
+ // error: the number is too small to represent
+ return;
+ }
+ value = v;
+ constant = Constant.fromValue(v);
+ } catch (NumberFormatException e1) {
+ // if the computation of the constant fails
+ }
+ return;
+ }
+
+ final float floatValue = computedValue.floatValue();
+ if (floatValue > Float.MAX_VALUE) {
+ // error: the number is too large to represent
+ return;
+ }
+ if (floatValue < Float.MIN_VALUE) {
+ // see 1F6IGUU
+ // a true 0 only has '0' and '.' in mantissa
+ // 1.0e-5000d is non-zero, but underflows to 0
+ boolean isHexaDecimal = false;
+ label : for (int i = 0; i < source.length; i++) { //it is welled formated so just test against '0' and potential . D d
+ switch (source[i]) {
+ case '0' :
+ case '.' :
+ break;
+ case 'x' :
+ case 'X' :
+ isHexaDecimal = true;
+ break;
+ case 'e' :
+ case 'E' :
+ case 'f' :
+ case 'F' :
+ case 'd' :
+ case 'D' :
+ if (isHexaDecimal) {
+ return;
+ }
+ // starting the exponent - mantissa is all zero
+ // no exponent - mantissa is all zero
+ break label;
+ case 'p' :
+ case 'P' :
+ break label;
+ default :
+ // error: the number is too small to represent
+ return;
+ }
+ }
+ }
+ value = floatValue;
+ constant = Constant.fromValue(value);
+ }
+ /**
+ * Code generation for float literal
+ *
+ * @param currentScope org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ * @param valueRequired boolean
+ */
+ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
+ int pc = codeStream.position;
+ if (valueRequired)
+ if ((implicitConversion >> 4) == T_float)
+ codeStream.generateInlinedValue(value);
+ else
+ codeStream.generateConstant(constant, implicitConversion);
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+ public TypeBinding literalType(BlockScope scope) {
+ return FloatBinding;
+ }
+ public void traverse(ASTVisitor visitor, BlockScope blockScope) {
+ visitor.visit(this, blockScope);
+ visitor.endVisit(this, blockScope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ForStatement.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ForStatement.js
new file mode 100644
index 0000000..59cdef9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ForStatement.js
@@ -0,0 +1,325 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.impl.Constant;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class ForStatement extends Statement {
+
+ public Statement[] initializations;
+ public Expression condition;
+ public Statement[] increments;
+ public Statement action;
+
+ //when there is no local declaration, there is no need of a new scope
+ //scope is positionned either to a new scope, or to the "upper"scope (see resolveType)
+ public boolean neededScope;
+ public BlockScope scope;
+
+ private Label breakLabel, continueLabel;
+
+ // for local variables table attributes
+ int preCondInitStateIndex = -1;
+ int condIfTrueInitStateIndex = -1;
+ int mergedInitStateIndex = -1;
+
+ public ForStatement(
+ Statement[] initializations,
+ Expression condition,
+ Statement[] increments,
+ Statement action,
+ boolean neededScope,
+ int s,
+ int e) {
+
+ this.sourceStart = s;
+ this.sourceEnd = e;
+ this.initializations = initializations;
+ this.condition = condition;
+ this.increments = increments;
+ this.action = action;
+ // remember useful empty statement
+ if (action instanceof EmptyStatement) action.bits |= IsUsefulEmptyStatementMASK;
+ this.neededScope = neededScope;
+ }
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ breakLabel = new Label();
+ continueLabel = new Label();
+
+ // process the initializations
+ if (initializations != null) {
+ for (int i = 0, count = initializations.length; i < count; i++) {
+ flowInfo = initializations[i].analyseCode(scope, flowContext, flowInfo);
+ }
+ }
+ preCondInitStateIndex =
+ currentScope.methodScope().recordInitializationStates(flowInfo);
+
+ Constant cst = this.condition == null ? null : this.condition.constant;
+ boolean isConditionTrue = cst == null || (cst != NotAConstant && cst.booleanValue() == true);
+ boolean isConditionFalse = cst != null && (cst != NotAConstant && cst.booleanValue() == false);
+
+ cst = this.condition == null ? null : this.condition.optimizedBooleanConstant();
+ boolean isConditionOptimizedTrue = cst == null || (cst != NotAConstant && cst.booleanValue() == true);
+ boolean isConditionOptimizedFalse = cst != null && (cst != NotAConstant && cst.booleanValue() == false);
+
+ // process the condition
+ LoopingFlowContext condLoopContext = null;
+ if (condition != null) {
+ if (!isConditionTrue) {
+ flowInfo =
+ condition.analyseCode(
+ scope,
+ (condLoopContext =
+ new LoopingFlowContext(flowContext, this, null, null, scope)),
+ flowInfo);
+ }
+ }
+
+ // process the action
+ LoopingFlowContext loopingContext;
+ FlowInfo actionInfo;
+ if (action == null
+ || (action.isEmptyBlock() && currentScope.environment().options.complianceLevel <= ClassFileConstants.JDK1_3)) {
+ if (condLoopContext != null)
+ condLoopContext.complainOnFinalAssignmentsInLoop(scope, flowInfo);
+ if (isConditionTrue) {
+ return FlowInfo.DEAD_END;
+ } else {
+ if (isConditionFalse){
+ continueLabel = null; // for(;false;p());
+ }
+ actionInfo = flowInfo.initsWhenTrue().copy();
+ loopingContext =
+ new LoopingFlowContext(flowContext, this, breakLabel, continueLabel, scope);
+ }
+ } else {
+ loopingContext =
+ new LoopingFlowContext(flowContext, this, breakLabel, continueLabel, scope);
+ FlowInfo initsWhenTrue = flowInfo.initsWhenTrue();
+ condIfTrueInitStateIndex =
+ currentScope.methodScope().recordInitializationStates(initsWhenTrue);
+
+ if (isConditionFalse) {
+ actionInfo = FlowInfo.DEAD_END;
+ } else {
+ actionInfo = initsWhenTrue.copy();
+ if (isConditionOptimizedFalse){
+ actionInfo.setReachMode(FlowInfo.UNREACHABLE);
+ }
+ }
+ if (!this.action.complainIfUnreachable(actionInfo, scope, false)) {
+ actionInfo = action.analyseCode(scope, loopingContext, actionInfo);
+ }
+
+ // code generation can be optimized when no need to continue in the loop
+ if (!actionInfo.isReachable() && !loopingContext.initsOnContinue.isReachable()) {
+ continueLabel = null;
+ } else {
+ if (condLoopContext != null)
+ condLoopContext.complainOnFinalAssignmentsInLoop(scope, flowInfo);
+ actionInfo = actionInfo.mergedWith(loopingContext.initsOnContinue.unconditionalInits());
+ loopingContext.complainOnFinalAssignmentsInLoop(scope, actionInfo);
+ }
+ }
+ // for increments
+ if ((continueLabel != null) && (increments != null)) {
+ LoopingFlowContext loopContext =
+ new LoopingFlowContext(flowContext, this, null, null, scope);
+ for (int i = 0, count = increments.length; i < count; i++) {
+ actionInfo = increments[i].analyseCode(scope, loopContext, actionInfo);
+ }
+ loopContext.complainOnFinalAssignmentsInLoop(scope, actionInfo);
+ }
+
+ //end of loop
+ FlowInfo mergedInfo = FlowInfo.mergedOptimizedBranches(
+ loopingContext.initsOnBreak,
+ isConditionOptimizedTrue,
+ flowInfo.initsWhenFalse(),
+ isConditionOptimizedFalse,
+ !isConditionTrue /*for(;;){}while(true); unreachable(); */);
+ mergedInitStateIndex = currentScope.methodScope().recordInitializationStates(mergedInfo);
+ return mergedInfo;
+ }
+
+ /**
+ * For statement code generation
+ *
+ * @param currentScope org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ */
+ public void generateCode(BlockScope currentScope, CodeStream codeStream) {
+
+ if ((bits & IsReachableMASK) == 0) {
+ return;
+ }
+ int pc = codeStream.position;
+
+ // generate the initializations
+ if (initializations != null) {
+ for (int i = 0, max = initializations.length; i < max; i++) {
+ initializations[i].generateCode(scope, codeStream);
+ }
+ }
+
+ // label management
+ Label actionLabel = new Label(codeStream);
+ Label conditionLabel = new Label(codeStream);
+ breakLabel.initialize(codeStream);
+ if (continueLabel != null) {
+ continueLabel.initialize(codeStream);
+ }
+ // jump over the actionBlock
+ if ((condition != null)
+ && (condition.constant == NotAConstant)
+ && !((action == null || action.isEmptyBlock()) && (increments == null))) {
+ int jumpPC = codeStream.position;
+ codeStream.goto_(conditionLabel);
+ codeStream.recordPositionsFrom(jumpPC, condition.sourceStart);
+ }
+ // generate the loop action
+ actionLabel.place();
+ if (action != null) {
+ // Required to fix 1PR0XVS: LFRE:WINNT - Compiler: variable table for method appears incorrect
+ if (condIfTrueInitStateIndex != -1) {
+ // insert all locals initialized inside the condition into the action generated prior to the condition
+ codeStream.addDefinitelyAssignedVariables(
+ currentScope,
+ condIfTrueInitStateIndex);
+ }
+ action.generateCode(scope, codeStream);
+ }
+ // continuation point
+ if (continueLabel != null) {
+ continueLabel.place();
+ // generate the increments for next iteration
+ if (increments != null) {
+ for (int i = 0, max = increments.length; i < max; i++) {
+ increments[i].generateCode(scope, codeStream);
+ }
+ }
+ }
+
+ // May loose some local variable initializations : affecting the local variable attributes
+ if (preCondInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(currentScope, preCondInitStateIndex);
+ }
+
+ // generate the condition
+ conditionLabel.place();
+ if ((condition != null) && (condition.constant == NotAConstant)) {
+ condition.generateOptimizedBoolean(scope, codeStream, actionLabel, null, true);
+ } else {
+ if (continueLabel != null) {
+ codeStream.goto_(actionLabel);
+ }
+ }
+ breakLabel.place();
+
+ // May loose some local variable initializations : affecting the local variable attributes
+ if (neededScope) {
+ codeStream.exitUserScope(scope);
+ }
+ if (mergedInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(currentScope, mergedInitStateIndex);
+ codeStream.addDefinitelyAssignedVariables(currentScope, mergedInitStateIndex);
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+
+ public StringBuffer printStatement(int tab, StringBuffer output) {
+
+ printIndent(tab, output).append("for ("); //$NON-NLS-1$
+ //inits
+ if (initializations != null) {
+ for (int i = 0; i < initializations.length; i++) {
+ //nice only with expressions
+ if (i > 0) output.append(", "); //$NON-NLS-1$
+ initializations[i].print(0, output);
+ }
+ }
+ output.append("; "); //$NON-NLS-1$
+ //cond
+ if (condition != null) condition.printExpression(0, output);
+ output.append("; "); //$NON-NLS-1$
+ //updates
+ if (increments != null) {
+ for (int i = 0; i < increments.length; i++) {
+ if (i > 0) output.append(", "); //$NON-NLS-1$
+ increments[i].print(0, output);
+ }
+ }
+ output.append(") "); //$NON-NLS-1$
+ //block
+ if (action == null)
+ output.append(';');
+ else {
+ output.append('\n');
+ action.printStatement(tab + 1, output); //$NON-NLS-1$
+ }
+ return output.append(';');
+ }
+
+ public void resolve(BlockScope upperScope) {
+
+ // use the scope that will hold the init declarations
+ scope = neededScope ? new BlockScope(upperScope) : upperScope;
+ if (initializations != null)
+ for (int i = 0, length = initializations.length; i < length; i++)
+ initializations[i].resolve(scope);
+ if (condition != null) {
+ TypeBinding type = condition.resolveTypeExpecting(scope, BooleanBinding);
+ condition.computeConversion(scope, type, type);
+ }
+ if (increments != null)
+ for (int i = 0, length = increments.length; i < length; i++)
+ increments[i].resolve(scope);
+ if (action != null)
+ action.resolve(scope);
+ }
+
+ public void traverse(
+ ASTVisitor visitor,
+ BlockScope blockScope) {
+
+ if (visitor.visit(this, blockScope)) {
+ if (initializations != null) {
+ int initializationsLength = initializations.length;
+ for (int i = 0; i < initializationsLength; i++)
+ initializations[i].traverse(visitor, scope);
+ }
+
+ if (condition != null)
+ condition.traverse(visitor, scope);
+
+ if (increments != null) {
+ int incrementsLength = increments.length;
+ for (int i = 0; i < incrementsLength; i++)
+ increments[i].traverse(visitor, scope);
+ }
+
+ if (action != null)
+ action.traverse(visitor, scope);
+ }
+ visitor.endVisit(this, blockScope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ForeachStatement.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ForeachStatement.js
new file mode 100644
index 0000000..b082e42
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ForeachStatement.js
@@ -0,0 +1,393 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.Label;
+import org.eclipse.wst.jsdt.internal.compiler.flow.FlowContext;
+import org.eclipse.wst.jsdt.internal.compiler.flow.FlowInfo;
+import org.eclipse.wst.jsdt.internal.compiler.flow.LoopingFlowContext;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.ArrayBinding;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.LocalVariableBinding;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.MethodBinding;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.ParameterizedTypeBinding;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeConstants;
+
+public class ForeachStatement extends Statement {
+
+ public LocalDeclaration elementVariable;
+ public int elementVariableImplicitWidening = -1;
+ public Expression collection;
+ public Statement action;
+
+ // set the kind of foreach
+ private int kind;
+ // possible kinds of iterating behavior
+ private static final int ARRAY = 0;
+ private static final int RAW_ITERABLE = 1;
+ private static final int GENERIC_ITERABLE = 2;
+
+ private int arrayElementTypeID;
+
+ // loop labels
+ private Label breakLabel;
+ private Label continueLabel;
+
+ public BlockScope scope;
+
+ // secret variables for codegen
+ public LocalVariableBinding indexVariable;
+ public LocalVariableBinding collectionVariable; // to store the collection expression value
+ public LocalVariableBinding maxVariable;
+ // secret variable names
+ private static final char[] SecretIndexVariableName = " index".toCharArray(); //$NON-NLS-1$
+ private static final char[] SecretCollectionVariableName = " collection".toCharArray(); //$NON-NLS-1$
+ private static final char[] SecretMaxVariableName = " max".toCharArray(); //$NON-NLS-1$
+
+ int postCollectionInitStateIndex = -1;
+ int mergedInitStateIndex = -1;
+
+ public ForeachStatement(
+ LocalDeclaration elementVariable,
+ Expression collection,
+ int start) {
+
+ this.elementVariable = elementVariable;
+ this.collection = collection;
+ this.sourceStart = start;
+ this.kind = -1;
+ }
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+ // initialize break and continue labels
+ breakLabel = new Label();
+ continueLabel = new Label();
+
+ // process the element variable and collection
+ flowInfo = this.elementVariable.analyseCode(scope, flowContext, flowInfo);
+ flowInfo = this.collection.analyseCode(scope, flowContext, flowInfo);
+
+ // element variable will be assigned when iterating
+ flowInfo.markAsDefinitelyAssigned(this.elementVariable.binding);
+
+ this.postCollectionInitStateIndex = currentScope.methodScope().recordInitializationStates(flowInfo);
+
+ // process the action
+ LoopingFlowContext loopingContext = new LoopingFlowContext(flowContext, this, breakLabel, continueLabel, scope);
+ FlowInfo actionInfo = flowInfo.initsWhenTrue().copy();
+ if (!(action == null || (action.isEmptyBlock()
+ && currentScope.environment().options.complianceLevel <= ClassFileConstants.JDK1_3))) {
+
+ if (!this.action.complainIfUnreachable(actionInfo, scope, false)) {
+ actionInfo = action.analyseCode(scope, loopingContext, actionInfo);
+ }
+
+ // code generation can be optimized when no need to continue in the loop
+ if (!actionInfo.isReachable() && !loopingContext.initsOnContinue.isReachable()) {
+ continueLabel = null;
+ } else {
+ actionInfo = actionInfo.mergedWith(loopingContext.initsOnContinue.unconditionalInits());
+ loopingContext.complainOnFinalAssignmentsInLoop(scope, actionInfo);
+ }
+ }
+
+ // we need the variable to iterate the collection even if the
+ // element variable is not used
+ if (!(this.action == null
+ || this.action.isEmptyBlock()
+ || ((this.action.bits & IsUsefulEmptyStatementMASK) != 0))) {
+ switch(this.kind) {
+ case ARRAY :
+ this.collectionVariable.useFlag = LocalVariableBinding.USED;
+ this.indexVariable.useFlag = LocalVariableBinding.USED;
+ this.maxVariable.useFlag = LocalVariableBinding.USED;
+ break;
+ case RAW_ITERABLE :
+ case GENERIC_ITERABLE :
+ this.indexVariable.useFlag = LocalVariableBinding.USED;
+ break;
+ }
+ }
+ //end of loop
+ FlowInfo mergedInfo = FlowInfo.mergedOptimizedBranches(
+ loopingContext.initsOnBreak,
+ false,
+ flowInfo.initsWhenFalse(),
+ false,
+ true /*for(;;){}while(true); unreachable(); */);
+ return mergedInfo;
+ }
+
+ /**
+ * For statement code generation
+ *
+ * @param currentScope org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ */
+ public void generateCode(BlockScope currentScope, CodeStream codeStream) {
+
+ if ((bits & IsReachableMASK) == 0) {
+ return;
+ }
+ int pc = codeStream.position;
+ if (this.action == null
+ || this.action.isEmptyBlock()
+ || ((this.action.bits & IsUsefulEmptyStatementMASK) != 0)) {
+ codeStream.exitUserScope(scope);
+ if (mergedInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(currentScope, mergedInitStateIndex);
+ codeStream.addDefinitelyAssignedVariables(currentScope, mergedInitStateIndex);
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ return;
+ }
+ // generate the initializations
+ switch(this.kind) {
+ case ARRAY :
+ collection.generateCode(scope, codeStream, true);
+ codeStream.store(this.collectionVariable, false);
+ codeStream.iconst_0();
+ codeStream.store(this.indexVariable, false);
+ codeStream.load(this.collectionVariable);
+ codeStream.arraylength();
+ codeStream.store(this.maxVariable, false);
+ break;
+ case RAW_ITERABLE :
+ case GENERIC_ITERABLE :
+ collection.generateCode(scope, codeStream, true);
+ // declaringClass.iterator();
+ final TypeBinding collectionTypeBinding = collection.resolvedType;
+ MethodBinding iteratorMethodBinding =
+ new MethodBinding(
+ AccPublic,
+ "iterator".toCharArray(),//$NON-NLS-1$
+ scope.getJavaUtilIterator(),
+ TypeConstants.NoParameters,
+ TypeConstants.NoExceptions,
+ (ReferenceBinding) collectionTypeBinding);
+ if (collectionTypeBinding.isInterface()) {
+ codeStream.invokeinterface(iteratorMethodBinding);
+ } else {
+ codeStream.invokevirtual(iteratorMethodBinding);
+ }
+ codeStream.store(this.indexVariable, false);
+ break;
+ }
+
+ // label management
+ Label actionLabel = new Label(codeStream);
+ Label conditionLabel = new Label(codeStream);
+ breakLabel.initialize(codeStream);
+ if (this.continueLabel != null) {
+ this.continueLabel.initialize(codeStream);
+ }
+ // jump over the actionBlock
+ codeStream.goto_(conditionLabel);
+
+ // generate the loop action
+ actionLabel.place();
+
+ // generate the loop action
+ if (this.elementVariable.binding.resolvedPosition != -1) {
+ switch(this.kind) {
+ case ARRAY :
+ codeStream.load(this.collectionVariable);
+ codeStream.load(this.indexVariable);
+ codeStream.arrayAt(this.arrayElementTypeID);
+ if (this.elementVariableImplicitWidening != -1) {
+ codeStream.generateImplicitConversion(this.elementVariableImplicitWidening);
+ }
+ codeStream.store(this.elementVariable.binding, false);
+ break;
+ case RAW_ITERABLE :
+ case GENERIC_ITERABLE :
+ codeStream.load(this.indexVariable);
+ codeStream.invokeJavaUtilIteratorNext();
+ if (this.elementVariable.binding.type.id != T_JavaLangObject) {
+ codeStream.checkcast(this.elementVariable.binding.type);
+ }
+ codeStream.store(this.elementVariable.binding, false);
+ break;
+ }
+ codeStream.addVisibleLocalVariable(this.elementVariable.binding);
+ if (this.postCollectionInitStateIndex != -1) {
+ codeStream.addDefinitelyAssignedVariables(
+ currentScope,
+ this.postCollectionInitStateIndex);
+ }
+ }
+ this.action.generateCode(scope, codeStream);
+
+ // continuation point
+ int continuationPC = codeStream.position;
+ if (this.continueLabel != null) {
+ this.continueLabel.place();
+ // generate the increments for next iteration
+ switch(this.kind) {
+ case ARRAY :
+ codeStream.iinc(this.indexVariable.resolvedPosition, 1);
+ break;
+ case RAW_ITERABLE :
+ case GENERIC_ITERABLE :
+ break;
+ }
+ }
+ // generate the condition
+ conditionLabel.place();
+ if (this.postCollectionInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(currentScope, postCollectionInitStateIndex);
+ }
+ switch(this.kind) {
+ case ARRAY :
+ codeStream.load(this.indexVariable);
+ codeStream.load(this.maxVariable);
+ codeStream.if_icmplt(actionLabel);
+ break;
+ case RAW_ITERABLE :
+ case GENERIC_ITERABLE :
+ codeStream.load(this.indexVariable);
+ codeStream.invokeJavaUtilIteratorHasNext();
+ codeStream.ifne(actionLabel);
+ break;
+ }
+ codeStream.recordPositionsFrom(continuationPC, this.elementVariable.sourceStart);
+
+ breakLabel.place();
+ codeStream.exitUserScope(scope);
+ if (mergedInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(currentScope, mergedInitStateIndex);
+ codeStream.addDefinitelyAssignedVariables(currentScope, mergedInitStateIndex);
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+
+ public StringBuffer printStatement(int tab, StringBuffer output) {
+
+ printIndent(tab, output).append("for ("); //$NON-NLS-1$
+ this.elementVariable.print(0, output);
+ output.append(" : ");//$NON-NLS-1$
+ this.collection.print(0, output).append(") "); //$NON-NLS-1$
+ //block
+ if (this.action == null) {
+ output.append(';');
+ } else {
+ output.append('\n');
+ this.action.printStatement(tab + 1, output); //$NON-NLS-1$
+ }
+ return output;
+ }
+
+ public void resolve(BlockScope upperScope) {
+ // use the scope that will hold the init declarations
+ scope = new BlockScope(upperScope);
+ this.elementVariable.resolve(scope); // collection expression can see itemVariable
+ TypeBinding elementType = this.elementVariable.type.resolvedType;
+ TypeBinding collectionType = this.collection.resolveType(scope);
+ this.collection.computeConversion(scope, collectionType, collectionType);
+ boolean hasError = elementType == null || collectionType == null;
+
+ if (!hasError) {
+ if (collectionType.isArrayType()) { // for(E e : E[])
+ this.kind = ARRAY;
+ TypeBinding collectionElementType = ((ArrayBinding) collectionType).elementsType();
+ if (!collectionElementType.isCompatibleWith(elementType)) {
+ scope.problemReporter().notCompatibleTypesErrorInForeach(collection, collectionElementType, elementType);
+ }
+ // in case we need to do a conversion
+ this.arrayElementTypeID = collectionElementType.id;
+ if (elementType.isBaseType()) {
+ this.elementVariableImplicitWidening = (elementType.id << 4) + this.arrayElementTypeID;
+ }
+ } else if (collectionType instanceof ReferenceBinding) {
+ ReferenceBinding iterableType = ((ReferenceBinding)collectionType).findSuperTypeErasingTo(T_JavaLangIterable, false /*Iterable is not a class*/);
+ if (iterableType != null) {
+ if (iterableType.isParameterizedType()) { // for(E e : Iterable<E>)
+ ParameterizedTypeBinding parameterizedType = (ParameterizedTypeBinding)iterableType;
+ if (parameterizedType.arguments.length == 1) { // per construction can only be one
+ this.kind = GENERIC_ITERABLE;
+ TypeBinding collectionElementType = parameterizedType.arguments[0];
+ if (!collectionElementType.isCompatibleWith(elementType)) {
+ scope.problemReporter().notCompatibleTypesErrorInForeach(collection, collectionElementType, elementType);
+ }
+ // no conversion needed as only for reference types
+ }
+ } else if (iterableType.isGenericType()) { // for (T t : Iterable<T>) - in case used inside Iterable itself
+ if (iterableType.typeVariables().length == 1) {
+ this.kind = GENERIC_ITERABLE;
+ TypeBinding collectionElementType = iterableType.typeVariables()[0];
+ if (!collectionElementType.isCompatibleWith(elementType)) {
+ scope.problemReporter().notCompatibleTypesErrorInForeach(collection, collectionElementType, elementType);
+ }
+ }
+ } else if (iterableType.isRawType()) { // for(Object o : Iterable)
+ this.kind = RAW_ITERABLE;
+ TypeBinding collectionElementType = scope.getJavaLangObject();
+ if (!collectionElementType.isCompatibleWith(elementType)) {
+ scope.problemReporter().notCompatibleTypesErrorInForeach(collection, collectionElementType, elementType);
+ }
+ // no conversion needed as only for reference types
+ }
+ }
+ }
+ switch(this.kind) {
+ case ARRAY :
+ // allocate #index secret variable (of type int)
+ this.indexVariable = new LocalVariableBinding(SecretIndexVariableName, IntBinding, AccDefault, false);
+ scope.addLocalVariable(this.indexVariable);
+ this.indexVariable.setConstant(NotAConstant); // not inlinable
+
+ // allocate #max secret variable
+ this.maxVariable = new LocalVariableBinding(SecretMaxVariableName, IntBinding, AccDefault, false);
+ scope.addLocalVariable(this.maxVariable);
+ this.maxVariable.setConstant(NotAConstant); // not inlinable
+ // add #array secret variable (of collection type)
+ this.collectionVariable = new LocalVariableBinding(SecretCollectionVariableName, collectionType, AccDefault, false);
+ scope.addLocalVariable(this.collectionVariable);
+ this.collectionVariable.setConstant(NotAConstant); // not inlinable
+ break;
+ case RAW_ITERABLE :
+ case GENERIC_ITERABLE :
+ // allocate #index secret variable (of type Iterator)
+ this.indexVariable = new LocalVariableBinding(SecretIndexVariableName, scope.getJavaUtilIterator(), AccDefault, false);
+ scope.addLocalVariable(this.indexVariable);
+ this.indexVariable.setConstant(NotAConstant); // not inlinable
+ break;
+ default :
+ scope.problemReporter().invalidTypeForCollection(collection);
+ }
+ }
+ if (action != null) {
+ action.resolve(scope);
+ }
+ }
+
+ public void traverse(
+ ASTVisitor visitor,
+ BlockScope blockScope) {
+
+ if (visitor.visit(this, blockScope)) {
+ this.elementVariable.traverse(visitor, scope);
+ this.collection.traverse(visitor, scope);
+ if (action != null) {
+ action.traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, blockScope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/IfStatement.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/IfStatement.js
new file mode 100644
index 0000000..7c3e687
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/IfStatement.js
@@ -0,0 +1,242 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class IfStatement extends Statement {
+
+ //this class represents the case of only one statement in
+ //either else and/or then branches.
+
+ public Expression condition;
+ public Statement thenStatement;
+ public Statement elseStatement;
+
+ boolean thenExit;
+
+ // for local variables table attributes
+ int thenInitStateIndex = -1;
+ int elseInitStateIndex = -1;
+ int mergedInitStateIndex = -1;
+
+ public IfStatement(Expression condition, Statement thenStatement, int sourceStart, int sourceEnd) {
+
+ this.condition = condition;
+ this.thenStatement = thenStatement;
+ // remember useful empty statement
+ if (thenStatement instanceof EmptyStatement) thenStatement.bits |= IsUsefulEmptyStatementMASK;
+ this.sourceStart = sourceStart;
+ this.sourceEnd = sourceEnd;
+ }
+
+ public IfStatement(Expression condition, Statement thenStatement, Statement elseStatement, int sourceStart, int sourceEnd) {
+
+ this.condition = condition;
+ this.thenStatement = thenStatement;
+ // remember useful empty statement
+ if (thenStatement instanceof EmptyStatement) thenStatement.bits |= IsUsefulEmptyStatementMASK;
+ this.elseStatement = elseStatement;
+ if (elseStatement instanceof IfStatement) elseStatement.bits |= IsElseIfStatement;
+ this.sourceStart = sourceStart;
+ this.sourceEnd = sourceEnd;
+ }
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ // process the condition
+ flowInfo = condition.analyseCode(currentScope, flowContext, flowInfo);
+
+ Constant cst = this.condition.optimizedBooleanConstant();
+ boolean isConditionOptimizedTrue = cst != NotAConstant && cst.booleanValue() == true;
+ boolean isConditionOptimizedFalse = cst != NotAConstant && cst.booleanValue() == false;
+
+ // process the THEN part
+ FlowInfo thenFlowInfo = flowInfo.initsWhenTrue().copy();
+ if (isConditionOptimizedFalse) {
+ thenFlowInfo.setReachMode(FlowInfo.UNREACHABLE);
+ }
+ if (this.thenStatement != null) {
+ // Save info for code gen
+ thenInitStateIndex =
+ currentScope.methodScope().recordInitializationStates(thenFlowInfo);
+ if (!thenStatement.complainIfUnreachable(thenFlowInfo, currentScope, false)) {
+ thenFlowInfo =
+ thenStatement.analyseCode(currentScope, flowContext, thenFlowInfo);
+ }
+ }
+ // code gen: optimizing the jump around the ELSE part
+ this.thenExit = !thenFlowInfo.isReachable();
+
+ // process the ELSE part
+ FlowInfo elseFlowInfo = flowInfo.initsWhenFalse().copy();
+ if (isConditionOptimizedTrue) {
+ elseFlowInfo.setReachMode(FlowInfo.UNREACHABLE);
+ }
+ if (this.elseStatement != null) {
+ // signal else clause unnecessarily nested, tolerate else-if code pattern
+ if (thenFlowInfo == FlowInfo.DEAD_END
+ && (this.bits & IsElseIfStatement) == 0 // else of an else-if
+ && !(this.elseStatement instanceof IfStatement)) {
+ currentScope.problemReporter().unnecessaryElse(this.elseStatement);
+ }
+ // Save info for code gen
+ elseInitStateIndex =
+ currentScope.methodScope().recordInitializationStates(elseFlowInfo);
+ if (!elseStatement.complainIfUnreachable(elseFlowInfo, currentScope, false)) {
+ elseFlowInfo =
+ elseStatement.analyseCode(currentScope, flowContext, elseFlowInfo);
+ }
+ }
+
+ // merge THEN & ELSE initializations
+ FlowInfo mergedInfo = FlowInfo.mergedOptimizedBranches(
+ thenFlowInfo,
+ isConditionOptimizedTrue,
+ elseFlowInfo,
+ isConditionOptimizedFalse,
+ true /*if(true){ return; } fake-reachable(); */);
+ mergedInitStateIndex = currentScope.methodScope().recordInitializationStates(mergedInfo);
+ return mergedInfo;
+ }
+
+ /**
+ * If code generation
+ *
+ * @param currentScope org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ */
+ public void generateCode(BlockScope currentScope, CodeStream codeStream) {
+
+ if ((this.bits & IsReachableMASK) == 0) {
+ return;
+ }
+ int pc = codeStream.position;
+ Label endifLabel = new Label(codeStream);
+
+ // optimizing the then/else part code gen
+ Constant cst;
+ boolean hasThenPart =
+ !(((cst = this.condition.optimizedBooleanConstant()) != NotAConstant
+ && cst.booleanValue() == false)
+ || this.thenStatement == null
+ || this.thenStatement.isEmptyBlock());
+ boolean hasElsePart =
+ !((cst != NotAConstant && cst.booleanValue() == true)
+ || this.elseStatement == null
+ || this.elseStatement.isEmptyBlock());
+
+ if (hasThenPart) {
+ Label falseLabel;
+ // generate boolean condition
+ this.condition.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ null,
+ (falseLabel = new Label(codeStream)),
+ true);
+ // May loose some local variable initializations : affecting the local variable attributes
+ if (thenInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(currentScope, thenInitStateIndex);
+ codeStream.addDefinitelyAssignedVariables(currentScope, thenInitStateIndex);
+ }
+ // generate then statement
+ this.thenStatement.generateCode(currentScope, codeStream);
+ // jump around the else statement
+ if (hasElsePart && !thenExit) {
+ this.thenStatement.branchChainTo(endifLabel);
+ int position = codeStream.position;
+ codeStream.goto_(endifLabel);
+ codeStream.updateLastRecordedEndPC(position);
+ //goto is tagged as part of the thenAction block
+ }
+ falseLabel.place();
+ } else {
+ if (hasElsePart) {
+ // generate boolean condition
+ this.condition.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ endifLabel,
+ null,
+ true);
+ } else {
+ // generate condition side-effects
+ this.condition.generateCode(currentScope, codeStream, false);
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+ }
+ // generate else statement
+ if (hasElsePart) {
+ // May loose some local variable initializations : affecting the local variable attributes
+ if (elseInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(
+ currentScope,
+ elseInitStateIndex);
+ codeStream.addDefinitelyAssignedVariables(currentScope, elseInitStateIndex);
+ }
+ this.elseStatement.generateCode(currentScope, codeStream);
+ }
+ endifLabel.place();
+ // May loose some local variable initializations : affecting the local variable attributes
+ if (mergedInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(
+ currentScope,
+ mergedInitStateIndex);
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+
+ public StringBuffer printStatement(int indent, StringBuffer output) {
+
+ printIndent(indent, output).append("if ("); //$NON-NLS-1$
+ condition.printExpression(0, output).append(")\n"); //$NON-NLS-1$
+ thenStatement.printStatement(indent + 2, output);
+ if (elseStatement != null) {
+ output.append('\n');
+ printIndent(indent, output);
+ output.append("else\n"); //$NON-NLS-1$
+ elseStatement.printStatement(indent + 2, output);
+ }
+ return output;
+ }
+
+ public void resolve(BlockScope scope) {
+
+ TypeBinding type = condition.resolveTypeExpecting(scope, BooleanBinding);
+ condition.computeConversion(scope, type, type);
+ if (thenStatement != null)
+ thenStatement.resolve(scope);
+ if (elseStatement != null)
+ elseStatement.resolve(scope);
+ }
+
+ public void traverse(
+ ASTVisitor visitor,
+ BlockScope blockScope) {
+
+ if (visitor.visit(this, blockScope)) {
+ condition.traverse(visitor, blockScope);
+ if (thenStatement != null)
+ thenStatement.traverse(visitor, blockScope);
+ if (elseStatement != null)
+ elseStatement.traverse(visitor, blockScope);
+ }
+ visitor.endVisit(this, blockScope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ImplicitDocTypeReference.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ImplicitDocTypeReference.js
new file mode 100644
index 0000000..6321c29
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ImplicitDocTypeReference.js
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.Scope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding;
+
+public class ImplicitDocTypeReference extends TypeReference {
+
+ public char[] token;
+
+ public ImplicitDocTypeReference(char[] name, int pos) {
+ super();
+ this.token = name;
+ this.sourceStart = pos;
+ this.sourceEnd = pos;
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.TypeReference#copyDims(int)
+ */
+ public TypeReference copyDims(int dim) {
+ return null;
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.TypeReference#getTypeBinding(org.eclipse.wst.jsdt.internal.compiler.lookup.Scope)
+ */
+ protected TypeBinding getTypeBinding(Scope scope) {
+ this.constant = NotAConstant;
+ return this.resolvedType = scope.enclosingSourceType();
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.TypeReference#getTypeName()
+ */
+ public char[][] getTypeName() {
+ if (this.token != null) {
+ char[][] tokens = { this.token };
+ return tokens;
+ }
+ return null;
+ }
+ public boolean isThis() {
+ return true;
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.TypeReference#traverse(org.eclipse.wst.jsdt.internal.compiler.ASTVisitor, org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope)
+ */
+ public void traverse(ASTVisitor visitor, BlockScope classScope) {
+ // Do nothing
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.TypeReference#traverse(org.eclipse.wst.jsdt.internal.compiler.ASTVisitor, org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope)
+ */
+ public void traverse(ASTVisitor visitor, ClassScope classScope) {
+ // Do nothing
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.Expression#printExpression(int, java.lang.StringBuffer)
+ */
+ public StringBuffer printExpression(int indent, StringBuffer output) {
+ return new StringBuffer();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ImportReference.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ImportReference.js
new file mode 100644
index 0000000..386d225
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ImportReference.js
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class ImportReference extends ASTNode {
+
+ public char[][] tokens;
+ public long[] sourcePositions; //each entry is using the code : (start<<32) + end
+ public boolean onDemand = true; //most of the time
+ public int declarationEnd; // doesn't include an potential trailing comment
+ public int declarationSourceStart;
+ public int declarationSourceEnd;
+ public boolean used;
+ public int modifiers; // 1.5 addition for static imports
+ public Annotation[] annotations;
+
+ public ImportReference(
+ char[][] tokens,
+ long[] sourcePositions,
+ boolean onDemand,
+ int modifiers) {
+
+ this.tokens = tokens;
+ this.sourcePositions = sourcePositions;
+ this.onDemand = onDemand;
+ this.sourceEnd = (int) (sourcePositions[sourcePositions.length-1] & 0x00000000FFFFFFFF);
+ this.sourceStart = (int) (sourcePositions[0] >>> 32);
+ this.modifiers = modifiers;
+ }
+
+ public boolean isStatic() {
+ return (this.modifiers & AccStatic) != 0;
+ }
+
+ /**
+ * @return char[][]
+ */
+ public char[][] getImportName() {
+
+ return tokens;
+ }
+
+ public StringBuffer print(int indent, StringBuffer output) {
+
+ return print(indent, output, true);
+ }
+
+ public StringBuffer print(int tab, StringBuffer output, boolean withOnDemand) {
+
+ /* when withOnDemand is false, only the name is printed */
+ for (int i = 0; i < tokens.length; i++) {
+ if (i > 0) output.append('.');
+ output.append(tokens[i]);
+ }
+ if (withOnDemand && onDemand) {
+ output.append(".*"); //$NON-NLS-1$
+ }
+ return output;
+ }
+
+ public void traverse(ASTVisitor visitor, CompilationUnitScope scope) {
+
+ visitor.visit(this, scope);
+ if (this.annotations != null) {
+ int annotationsLength = this.annotations.length;
+ for (int i = 0; i < annotationsLength; i++)
+ this.annotations[i].traverse(visitor, scope);
+ }
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Initializer.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Initializer.js
new file mode 100644
index 0000000..2952373
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Initializer.js
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+import org.eclipse.wst.jsdt.internal.compiler.parser.*;
+
+public class Initializer extends FieldDeclaration {
+
+ public Block block;
+ public int lastVisibleFieldID;
+ public int bodyStart;
+ public int bodyEnd;
+
+ public boolean errorInSignature = false;
+
+ public Initializer(Block block, int modifiers) {
+ this.block = block;
+ this.modifiers = modifiers;
+
+ declarationSourceStart = sourceStart = block.sourceStart;
+ }
+
+ public FlowInfo analyseCode(
+ MethodScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ return block.analyseCode(currentScope, flowContext, flowInfo);
+ }
+
+ /**
+ * Code generation for a non-static initializer:
+ * standard block code gen
+ *
+ * @param currentScope org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ */
+ public void generateCode(BlockScope currentScope, CodeStream codeStream) {
+
+ if ((bits & IsReachableMASK) == 0) {
+ return;
+ }
+ int pc = codeStream.position;
+ block.generateCode(currentScope, codeStream);
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+
+ public boolean isField() {
+
+ return false;
+ }
+
+ public boolean isStatic() {
+
+ return (modifiers & AccStatic) != 0;
+ }
+
+ public void parseStatements(
+ Parser parser,
+ TypeDeclaration typeDeclaration,
+ CompilationUnitDeclaration unit) {
+
+ //fill up the method body with statement
+ parser.parse(this, typeDeclaration, unit);
+ }
+
+ public StringBuffer printStatement(int indent, StringBuffer output) {
+
+ if (modifiers != 0) {
+ printIndent(indent, output);
+ printModifiers(modifiers, output).append("{\n"); //$NON-NLS-1$
+ block.printBody(indent, output);
+ printIndent(indent, output).append('}');
+ return output;
+ } else {
+ return block.printStatement(indent, output);
+ }
+ }
+
+ public void resolve(MethodScope scope) {
+
+ FieldBinding previousField = scope.initializedField;
+ int previousFieldID = scope.lastVisibleFieldID;
+ try {
+ scope.initializedField = null;
+ scope.lastVisibleFieldID = lastVisibleFieldID;
+ if (isStatic()) {
+ ReferenceBinding declaringType = scope.enclosingSourceType();
+ if (declaringType.isNestedType() && !declaringType.isStatic())
+ scope.problemReporter().innerTypesCannotDeclareStaticInitializers(
+ declaringType,
+ this);
+ }
+ block.resolve(scope);
+ } finally {
+ scope.initializedField = previousField;
+ scope.lastVisibleFieldID = previousFieldID;
+ }
+ }
+
+ public void traverse(ASTVisitor visitor, MethodScope scope) {
+
+ if (visitor.visit(this, scope)) {
+ block.traverse(visitor, scope);
+ }
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/InstanceOfExpression.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/InstanceOfExpression.js
new file mode 100644
index 0000000..5738ea0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/InstanceOfExpression.js
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class InstanceOfExpression extends OperatorExpression {
+
+ public Expression expression;
+ public TypeReference type;
+
+ public InstanceOfExpression(
+ Expression expression,
+ TypeReference type,
+ int operator) {
+
+ this.expression = expression;
+ this.type = type;
+ this.bits |= operator << OperatorSHIFT;
+ this.sourceStart = expression.sourceStart;
+ this.sourceEnd = type.sourceEnd;
+ }
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ return expression
+ .analyseCode(currentScope, flowContext, flowInfo)
+ .unconditionalInits();
+ }
+
+ /**
+ * Code generation for instanceOfExpression
+ *
+ * @param currentScope org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ * @param valueRequired boolean
+ */
+ public void generateCode(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ boolean valueRequired) {
+
+ int pc = codeStream.position;
+ expression.generateCode(currentScope, codeStream, true);
+ codeStream.instance_of(type.resolvedType);
+ if (!valueRequired)
+ codeStream.pop();
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+
+ public StringBuffer printExpressionNoParenthesis(int indent, StringBuffer output) {
+
+ expression.printExpression(indent, output).append(" instanceof "); //$NON-NLS-1$
+ return type.print(0, output);
+ }
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.Expression#reportIllegalCast(org.eclipse.wst.jsdt.internal.compiler.lookup.Scope, org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding, org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding)
+ */
+ public void reportIllegalCast(Scope scope, TypeBinding castType, TypeBinding expressionType) {
+ scope.problemReporter().notCompatibleTypesError(this, expressionType, castType);
+ }
+ public TypeBinding resolveType(BlockScope scope) {
+
+ constant = NotAConstant;
+ TypeBinding expressionType = expression.resolveType(scope);
+ TypeBinding checkedType = type.resolveType(scope);
+ if (expressionType == null || checkedType == null)
+ return null;
+
+ if (checkedType.isTypeVariable() || checkedType.isParameterizedType() || checkedType.isGenericType()) {
+ scope.problemReporter().illegalInstanceOfGenericType(checkedType, this);
+ } else {
+ checkCastTypesCompatibility(scope, checkedType, expressionType, null);
+ }
+ return this.resolvedType = BooleanBinding;
+ }
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.Expression#tagAsUnnecessaryCast(Scope,TypeBinding)
+ */
+ public void tagAsUnnecessaryCast(Scope scope, TypeBinding castType) {
+ scope.problemReporter().unnecessaryInstanceof(this, castType);
+ }
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+
+ if (visitor.visit(this, scope)) {
+ expression.traverse(visitor, scope);
+ type.traverse(visitor, scope);
+ }
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/IntLiteral.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/IntLiteral.js
new file mode 100644
index 0000000..10f6f73
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/IntLiteral.js
@@ -0,0 +1,150 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class IntLiteral extends NumberLiteral {
+ public int value;
+
+ public static final IntLiteral
+ One = new IntLiteral(new char[]{'1'},0,0,1);//used for ++ and --
+
+ static final Constant FORMAT_ERROR = new DoubleConstant(1.0/0.0); // NaN;
+public IntLiteral(char[] token, int s, int e) {
+ super(token, s,e);
+}
+public IntLiteral(char[] token, int s,int e, int value) {
+ this(token, s,e);
+ this.value = value;
+}
+public IntLiteral(int intValue) {
+ //special optimized constructor : the cst is the argument
+
+ //value that should not be used
+ // tokens = null ;
+ // sourceStart = 0;
+ // sourceEnd = 0;
+ super(null,0,0);
+ constant = Constant.fromValue(intValue);
+ value = intValue;
+
+}
+public void computeConstant() {
+ //a special constant is use for the potential Integer.MAX_VALUE+1
+ //which is legal if used with a - as prefix....cool....
+ //notice that Integer.MIN_VALUE == -2147483648
+
+ long MAX = Integer.MAX_VALUE;
+ if (this == One) { constant = Constant.One; return ;}
+
+ int length = source.length;
+ long computedValue = 0L;
+ if (source[0] == '0')
+ { MAX = 0xFFFFFFFFL ; //a long in order to be positive !
+ if (length == 1) { constant = Constant.fromValue(0); return ;}
+ final int shift,radix;
+ int j ;
+ if ( (source[1] == 'x') || (source[1] == 'X') )
+ { shift = 4 ; j = 2; radix = 16;}
+ else
+ { shift = 3 ; j = 1; radix = 8;}
+ while (source[j]=='0')
+ { j++; //jump over redondant zero
+ if (j == length)
+ { //watch for 000000000000000000
+ constant = Constant.fromValue(value = (int)computedValue);
+ return ;}}
+
+ while (j<length)
+ { int digitValue ;
+ if ((digitValue = Character.digit(source[j++],radix)) < 0 )
+ { constant = FORMAT_ERROR; return ;}
+ computedValue = (computedValue<<shift) | digitValue ;
+ if (computedValue > MAX) return /*constant stays null*/ ;}}
+ else
+ { //-----------regular case : radix = 10-----------
+ for (int i = 0 ; i < length;i++)
+ { int digitValue ;
+ if ((digitValue = Character.digit(source[i],10)) < 0 )
+ { constant = FORMAT_ERROR; return ;}
+ computedValue = 10*computedValue + digitValue;
+ if (computedValue > MAX) return /*constant stays null*/ ; }}
+
+ constant = Constant.fromValue(value = (int)computedValue);
+
+}
+/**
+ * Code generation for int literal
+ *
+ * @param currentScope org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ * @param valueRequired boolean
+ */
+public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
+ int pc = codeStream.position;
+ if (valueRequired)
+ if ((implicitConversion >> 4) == T_int)
+ codeStream.generateInlinedValue(value);
+ else
+ codeStream.generateConstant(constant, implicitConversion);
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+}
+public TypeBinding literalType(BlockScope scope) {
+ return IntBinding;
+}
+public final boolean mayRepresentMIN_VALUE(){
+ //a special autorized int literral is 2147483648
+ //which is ONE over the limit. This special case
+ //only is used in combinaison with - to denote
+ //the minimal value of int -2147483648
+
+ return ((source.length == 10) &&
+ (source[0] == '2') &&
+ (source[1] == '1') &&
+ (source[2] == '4') &&
+ (source[3] == '7') &&
+ (source[4] == '4') &&
+ (source[5] == '8') &&
+ (source[6] == '3') &&
+ (source[7] == '6') &&
+ (source[8] == '4') &&
+ (source[9] == '8'));}
+public TypeBinding resolveType(BlockScope scope) {
+ // the format may be incorrect while the scanner could detect
+ // such an error only on painfull tests...easier and faster here
+
+ TypeBinding tb = super.resolveType(scope);
+ if (constant == FORMAT_ERROR) {
+ constant = NotAConstant;
+ scope.problemReporter().constantOutOfFormat(this);
+ this.resolvedType = null;
+ return null;
+ }
+ return tb;
+}
+public StringBuffer printExpression(int indent, StringBuffer output){
+
+ if (source == null) {
+ /* special optimized IntLiteral that are created by the compiler */
+ return output.append(String.valueOf(value));
+ }
+ return super.printExpression(indent, output);
+}
+
+public void traverse(ASTVisitor visitor, BlockScope scope) {
+ visitor.visit(this, scope);
+ visitor.endVisit(this, scope);
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/IntLiteralMinValue.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/IntLiteralMinValue.js
new file mode 100644
index 0000000..8558e73
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/IntLiteralMinValue.js
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+
+public class IntLiteralMinValue extends IntLiteral {
+
+ final static char[] CharValue = new char[]{'-','2','1','4','7','4','8','3','6','4','8'};
+ final static Constant MIN_VALUE = Constant.fromValue(Integer.MIN_VALUE) ;
+
+public IntLiteralMinValue() {
+ super(CharValue,0,0,Integer.MIN_VALUE);
+ constant = MIN_VALUE;
+}
+public void computeConstant(){
+
+ /*precomputed at creation time*/ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Javadoc.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Javadoc.js
new file mode 100644
index 0000000..c5601ab
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Javadoc.js
@@ -0,0 +1,495 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+import org.eclipse.wst.jsdt.internal.compiler.parser.AbstractCommentParser;
+
+/**
+ * Node representing a structured Javadoc comment
+ */
+public class Javadoc extends ASTNode {
+
+ public JavadocSingleNameReference[] parameters; // @param
+ public TypeReference[] thrownExceptions; // @throws, @exception
+ public JavadocReturnStatement returnStatement; // @return
+ public Expression[] references; // @see
+ public boolean inherited = false;
+ // bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=51600
+ // Store param references for tag with invalid syntax
+ public JavadocSingleNameReference[] invalidParameters; // @param
+
+ public Javadoc(int sourceStart, int sourceEnd) {
+ this.sourceStart = sourceStart;
+ this.sourceEnd = sourceEnd;
+ }
+
+ /*
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode#print(int, java.lang.StringBuffer)
+ */
+ public StringBuffer print(int indent, StringBuffer output) {
+ printIndent(indent, output).append("/**\n"); //$NON-NLS-1$
+ if (this.parameters != null) {
+ for (int i = 0, length = this.parameters.length; i < length; i++) {
+ printIndent(indent + 1, output).append(" * @param "); //$NON-NLS-1$
+ this.parameters[i].print(indent, output).append('\n');
+ }
+ }
+ if (this.returnStatement != null) {
+ printIndent(indent + 1, output).append(" * @return\n"); //$NON-NLS-1$
+ }
+ if (this.thrownExceptions != null) {
+ for (int i = 0, length = this.thrownExceptions.length; i < length; i++) {
+ printIndent(indent + 1, output).append(" * @throws "); //$NON-NLS-1$
+ this.thrownExceptions[i].print(indent, output).append('\n');
+ }
+ }
+ if (this.references != null) {
+ for (int i = 0, length = this.references.length; i < length; i++) {
+ printIndent(indent + 1, output).append(" * @see"); //$NON-NLS-1$
+ this.references[i].print(indent, output).append('\n');
+ }
+ }
+ printIndent(indent, output).append(" */\n"); //$NON-NLS-1$
+ return output;
+ }
+
+ /*
+ * Resolve type javadoc while a class scope
+ */
+ public void resolve(ClassScope classScope) {
+
+
+ // @param tags
+ int paramTagsSize = this.parameters == null ? 0 : this.parameters.length;
+ for (int i = 0; i < paramTagsSize; i++) {
+ JavadocSingleNameReference param = this.parameters[i];
+ classScope.problemReporter().javadocUnexpectedTag(param.tagSourceStart, param.tagSourceEnd);
+ }
+
+ // @return tags
+ if (this.returnStatement != null) {
+ classScope.problemReporter().javadocUnexpectedTag(this.returnStatement.sourceStart, this.returnStatement.sourceEnd);
+ }
+
+ // @throws/@exception tags
+ int throwsTagsLength = this.thrownExceptions == null ? 0 : this.thrownExceptions.length;
+ for (int i = 0; i < throwsTagsLength; i++) {
+ TypeReference typeRef = this.thrownExceptions[i];
+ int start, end;
+ if (typeRef instanceof JavadocSingleTypeReference) {
+ JavadocSingleTypeReference singleRef = (JavadocSingleTypeReference) typeRef;
+ start = singleRef.tagSourceStart;
+ end = singleRef.tagSourceEnd;
+ } else if (typeRef instanceof JavadocQualifiedTypeReference) {
+ JavadocQualifiedTypeReference qualifiedRef = (JavadocQualifiedTypeReference) typeRef;
+ start = qualifiedRef.tagSourceStart;
+ end = qualifiedRef.tagSourceEnd;
+ } else {
+ start = typeRef.sourceStart;
+ end = typeRef.sourceEnd;
+ }
+ classScope.problemReporter().javadocUnexpectedTag(start, end);
+ }
+
+ // @see tags
+ int seeTagsLength = this.references == null ? 0 : this.references.length;
+ for (int i = 0; i < seeTagsLength; i++) {
+ resolveReference(this.references[i], classScope);
+ }
+ }
+
+ /*
+ * Resolve method javadoc while a method scope
+ */
+ public void resolve(MethodScope methScope) {
+
+ // get method declaration
+ AbstractMethodDeclaration methDecl = methScope.referenceMethod();
+ boolean overriding = methDecl == null ? false : (methDecl.binding.modifiers & (AccImplementing+AccOverriding)) != 0;
+
+ // @see tags
+ int seeTagsLength = this.references == null ? 0 : this.references.length;
+ boolean superRef = false;
+ for (int i = 0; i < seeTagsLength; i++) {
+
+ // Resolve reference
+ resolveReference(this.references[i], methScope);
+
+ // see whether we can have a super reference
+ try {
+ if (methDecl != null && (methDecl.isConstructor() || overriding) && !superRef) {
+ if (this.references[i] instanceof JavadocMessageSend) {
+ JavadocMessageSend messageSend = (JavadocMessageSend) this.references[i];
+ // if binding is valid then look if we have a reference to an overriden method/constructor
+ if (messageSend.binding != null && messageSend.binding.isValidBinding()) {
+ if (methDecl.binding.declaringClass.isCompatibleWith(messageSend.receiverType) &&
+ CharOperation.equals(messageSend.selector, methDecl.selector) &&
+ (messageSend.binding.returnType == methDecl.binding.returnType)) {
+ if (messageSend.arguments == null && methDecl.arguments == null) {
+ superRef = true;
+ }
+ else if (messageSend.arguments != null && methDecl.arguments != null) {
+ superRef = methDecl.binding.areParametersEqual(messageSend.binding);
+ }
+ }
+ }
+ }
+ else if (this.references[i] instanceof JavadocAllocationExpression) {
+ JavadocAllocationExpression allocationExpr = (JavadocAllocationExpression) this.references[i];
+ // if binding is valid then look if we have a reference to an overriden method/constructor
+ if (allocationExpr.binding != null && allocationExpr.binding.isValidBinding()) {
+ if (methDecl.binding.declaringClass.isCompatibleWith(allocationExpr.resolvedType)) {
+ if (allocationExpr.arguments == null && methDecl.arguments == null) {
+ superRef = true;
+ }
+ else if (allocationExpr.arguments != null && methDecl.arguments != null) {
+ superRef = methDecl.binding.areParametersEqual(allocationExpr.binding);
+ }
+ }
+ }
+ }
+ }
+ }
+ catch (Exception e) {
+ // Something wrong happen, forget super ref...
+ }
+ }
+
+ // Store if a reference exists to an overriden method/constructor or the method is in a local type,
+ boolean reportMissing = methDecl == null || !((overriding && this.inherited) || superRef || (methDecl.binding.declaringClass != null && methDecl.binding.declaringClass.isLocalType()));
+
+ // @param tags
+ resolveParamTags(methScope, reportMissing);
+
+ // @return tags
+ if (this.returnStatement == null) {
+ if (reportMissing && methDecl != null) {
+ if (methDecl.isMethod()) {
+ MethodDeclaration meth = (MethodDeclaration) methDecl;
+ if (meth.binding.returnType != VoidBinding) {
+ // method with return should have @return tag
+ methScope.problemReporter().javadocMissingReturnTag(meth.returnType.sourceStart, meth.returnType.sourceEnd, methDecl.binding.modifiers);
+ }
+ }
+ }
+ } else {
+ this.returnStatement.resolve(methScope);
+ }
+
+ // @throws/@exception tags
+ resolveThrowsTags(methScope, reportMissing);
+
+ // Resolve param tags with invalid syntax
+ int length = this.invalidParameters == null ? 0 : this.invalidParameters.length;
+ for (int i = 0; i < length; i++) {
+ this.invalidParameters[i].resolve(methScope, false);
+ }
+ }
+
+ private void resolveReference(Expression reference, Scope scope) {
+
+ // Perform resolve
+ switch (scope.kind) {
+ case Scope.METHOD_SCOPE:
+ reference.resolveType((MethodScope)scope);
+ break;
+ case Scope.CLASS_SCOPE:
+ reference.resolveType((ClassScope)scope);
+ break;
+ }
+
+ // Verify field references
+ boolean verifyValues = scope.environment().options.sourceLevel >= ClassFileConstants.JDK1_5;
+ if (reference instanceof JavadocFieldReference) {
+ JavadocFieldReference fieldRef = (JavadocFieldReference) reference;
+
+ // Verify if this is a method reference
+ // see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=51911
+ if (fieldRef.methodBinding != null) {
+ // cannot refer to method for @value tag
+ if (fieldRef.tagValue == AbstractCommentParser.TAG_VALUE_VALUE) {
+ scope.problemReporter().javadocInvalidValueReference(fieldRef.sourceStart, fieldRef.sourceEnd);
+ }
+ else if (fieldRef.receiverType != null) {
+ fieldRef.superAccess = scope.enclosingSourceType().isCompatibleWith(fieldRef.receiverType);
+ fieldRef.methodBinding = scope.findMethod((ReferenceBinding)fieldRef.receiverType, fieldRef.token, new TypeBinding[0], fieldRef);
+ }
+ }
+
+ // Verify whether field ref should be static or not (for @value tags)
+ else if (verifyValues && fieldRef.binding != null && fieldRef.binding.isValidBinding()) {
+ if (fieldRef.tagValue == AbstractCommentParser.TAG_VALUE_VALUE && !fieldRef.binding.isStatic()) {
+ scope.problemReporter().javadocInvalidValueReference(fieldRef.sourceStart, fieldRef.sourceEnd);
+ }
+ }
+ }
+
+ // If not 1.5 level, verification is finished
+ if (!verifyValues) return;
+
+ // Verify that message reference are not used for @value tags
+ else if (reference instanceof JavadocMessageSend) {
+ JavadocMessageSend msgSend = (JavadocMessageSend) reference;
+ if (msgSend.tagValue == AbstractCommentParser.TAG_VALUE_VALUE) { // cannot refer to method for @value tag
+ scope.problemReporter().javadocInvalidValueReference(msgSend.sourceStart, msgSend.sourceEnd);
+ }
+ }
+
+ // Verify that constructorreference are not used for @value tags
+ else if (reference instanceof JavadocAllocationExpression) {
+ JavadocAllocationExpression alloc = (JavadocAllocationExpression) reference;
+ if (alloc.tagValue == AbstractCommentParser.TAG_VALUE_VALUE) { // cannot refer to method for @value tag
+ scope.problemReporter().javadocInvalidValueReference(alloc.sourceStart, alloc.sourceEnd);
+ }
+ }
+ }
+
+ /*
+ * Resolve @param tags while method scope
+ */
+ private void resolveParamTags(MethodScope methScope, boolean reportMissing) {
+ AbstractMethodDeclaration md = methScope.referenceMethod();
+ int paramTagsSize = this.parameters == null ? 0 : this.parameters.length;
+
+ // If no referenced method (field initializer for example) then report a problem for each param tag
+ if (md == null) {
+ for (int i = 0; i < paramTagsSize; i++) {
+ JavadocSingleNameReference param = this.parameters[i];
+ methScope.problemReporter().javadocUnexpectedTag(param.tagSourceStart, param.tagSourceEnd);
+ }
+ return;
+ }
+
+ // If no param tags then report a problem for each method argument
+ int argumentsSize = md.arguments == null ? 0 : md.arguments.length;
+ if (paramTagsSize == 0) {
+ if (reportMissing) {
+ for (int i = 0; i < argumentsSize; i++) {
+ Argument arg = md.arguments[i];
+ methScope.problemReporter().javadocMissingParamTag(arg, md.binding.modifiers);
+ }
+ }
+ } else {
+ LocalVariableBinding[] bindings = new LocalVariableBinding[paramTagsSize];
+ int maxBindings = 0;
+
+ // Scan all @param tags
+ for (int i = 0; i < paramTagsSize; i++) {
+ JavadocSingleNameReference param = this.parameters[i];
+ param.resolve(methScope);
+ if (param.binding != null && param.binding.isValidBinding()) {
+ // Verify duplicated tags
+ boolean found = false;
+ for (int j = 0; j < maxBindings && !found; j++) {
+ if (bindings[j] == param.binding) {
+ methScope.problemReporter().javadocDuplicatedParamTag(param, md.binding.modifiers);
+ found = true;
+ }
+ }
+ if (!found) {
+ bindings[maxBindings++] = (LocalVariableBinding) param.binding;
+ }
+ }
+ }
+
+ // Look for undocumented arguments
+ if (reportMissing) {
+ for (int i = 0; i < argumentsSize; i++) {
+ Argument arg = md.arguments[i];
+ boolean found = false;
+ for (int j = 0; j < maxBindings && !found; j++) {
+ LocalVariableBinding binding = bindings[j];
+ if (arg.binding == binding) {
+ found = true;
+ }
+ }
+ if (!found) {
+ methScope.problemReporter().javadocMissingParamTag(arg, md.binding.modifiers);
+ }
+ }
+ }
+ }
+ }
+
+ /*
+ * Resolve @throws/@exception tags while method scope
+ */
+ private void resolveThrowsTags(MethodScope methScope, boolean reportMissing) {
+ AbstractMethodDeclaration md = methScope.referenceMethod();
+ int throwsTagsLength = this.thrownExceptions == null ? 0 : this.thrownExceptions.length;
+
+ // If no referenced method (field initializer for example) then report a problem for each throws tag
+ if (md == null) {
+ for (int i = 0; i < throwsTagsLength; i++) {
+ TypeReference typeRef = this.thrownExceptions[i];
+ int start = typeRef.sourceStart;
+ int end = typeRef.sourceEnd;
+ if (typeRef instanceof JavadocQualifiedTypeReference) {
+ start = ((JavadocQualifiedTypeReference) typeRef).tagSourceStart;
+ end = ((JavadocQualifiedTypeReference) typeRef).tagSourceEnd;
+ } else if (typeRef instanceof JavadocSingleTypeReference) {
+ start = ((JavadocSingleTypeReference) typeRef).tagSourceStart;
+ end = ((JavadocSingleTypeReference) typeRef).tagSourceEnd;
+ }
+ methScope.problemReporter().javadocUnexpectedTag(start, end);
+ }
+ return;
+ }
+
+ // If no throws tags then report a problem for each method thrown exception
+ int boundExceptionLength = (md.binding == null || md.binding.thrownExceptions == null) ? 0 : md.binding.thrownExceptions.length;
+ int thrownExceptionLength = md.thrownExceptions == null ? 0 : md.thrownExceptions.length;
+ if (throwsTagsLength == 0) {
+ if (reportMissing) {
+ for (int i = 0; i < boundExceptionLength; i++) {
+ ReferenceBinding exceptionBinding = md.binding.thrownExceptions[i];
+ if (exceptionBinding != null && exceptionBinding.isValidBinding()) { // flag only valid class name
+ int j=i;
+ while (j<thrownExceptionLength && exceptionBinding != md.thrownExceptions[j].resolvedType) j++;
+ if (j<thrownExceptionLength) {
+ methScope.problemReporter().javadocMissingThrowsTag(md.thrownExceptions[j], md.binding.modifiers);
+ }
+ }
+ }
+ }
+ } else {
+ int maxRef = 0;
+ TypeReference[] typeReferences = new TypeReference[throwsTagsLength];
+
+ // Scan all @throws tags
+ for (int i = 0; i < throwsTagsLength; i++) {
+ TypeReference typeRef = this.thrownExceptions[i];
+ typeRef.resolve(methScope);
+ TypeBinding typeBinding = typeRef.resolvedType;
+
+ if (typeBinding != null && typeBinding.isValidBinding() && typeBinding.isClass()) {
+ typeReferences[maxRef++] = typeRef;
+ }
+ }
+
+ // Look for undocumented thrown exception
+ for (int i = 0; i < boundExceptionLength; i++) {
+ ReferenceBinding exceptionBinding = md.binding.thrownExceptions[i];
+ boolean found = false;
+ for (int j = 0; j < maxRef && !found; j++) {
+ if (typeReferences[j] != null) {
+ TypeBinding typeBinding = typeReferences[j].resolvedType;
+ if (exceptionBinding == typeBinding) {
+ found = true;
+ typeReferences[j] = null;
+ }
+ }
+ }
+ if (!found && reportMissing) {
+ if (exceptionBinding != null && exceptionBinding.isValidBinding()) { // flag only valid class name
+ int k=i;
+ while (k<thrownExceptionLength && exceptionBinding != md.thrownExceptions[k].resolvedType) k++;
+ if (k<thrownExceptionLength) {
+ methScope.problemReporter().javadocMissingThrowsTag(md.thrownExceptions[k], md.binding.modifiers);
+ }
+ }
+ }
+ }
+
+ // Verify additional @throws tags
+ for (int i = 0; i < maxRef; i++) {
+ TypeReference typeRef = typeReferences[i];
+ if (typeRef != null) {
+ boolean compatible = false;
+ // thrown exceptions subclasses are accepted
+ for (int j = 0; j<thrownExceptionLength && !compatible; j++) {
+ TypeBinding exceptionBinding = md.thrownExceptions[j].resolvedType;
+ if (exceptionBinding != null) {
+ compatible = typeRef.resolvedType.isCompatibleWith(exceptionBinding);
+ }
+ }
+
+ // If not compatible only complain on unchecked exception
+ if (!compatible &&
+ !typeRef.resolvedType.isCompatibleWith(methScope.getJavaLangRuntimeException()) &&
+ !typeRef.resolvedType.isCompatibleWith(methScope.getJavaLangError())) {
+ methScope.problemReporter().javadocInvalidThrowsClassName(typeRef, md.binding.modifiers);
+ }
+ }
+ }
+ }
+ }
+
+ /*
+ * Search node with a given staring position in javadoc objects arrays.
+ */
+ public ASTNode getNodeStartingAt(int start) {
+ // parameters array
+ if (this.parameters != null) {
+ for (int i=0; i<this.parameters.length; i++) {
+ JavadocSingleNameReference param = this.parameters[i];
+ if (param.sourceStart==start) {
+ return param;
+ }
+ }
+ }
+ // array of invalid syntax tags parameters
+ if (this.invalidParameters != null) {
+ for (int i=0; i<this.invalidParameters.length; i++) {
+ JavadocSingleNameReference param = this.invalidParameters[i];
+ if (param.sourceStart==start) {
+ return param;
+ }
+ }
+ }
+ // thrown exception array
+ if (this.thrownExceptions != null) {
+ for (int i=0; i<this.thrownExceptions.length; i++) {
+ TypeReference typeRef = this.thrownExceptions[i];
+ if (typeRef.sourceStart==start) {
+ return typeRef;
+ }
+ }
+ }
+ // references array
+ if (this.references != null) {
+ for (int i=0; i<this.references.length; i++) {
+ org.eclipse.wst.jsdt.internal.compiler.ast.Expression expression = this.references[i];
+ if (expression.sourceStart==start) {
+ return expression;
+ } else if (expression instanceof JavadocAllocationExpression) {
+ JavadocAllocationExpression allocationExpr = (JavadocAllocationExpression) this.references[i];
+ // if binding is valid then look at arguments
+ if (allocationExpr.binding != null && allocationExpr.binding.isValidBinding()) {
+ if (allocationExpr.arguments != null) {
+ for (int j=0; j<allocationExpr.arguments.length; j++) {
+ if (allocationExpr.arguments[j].sourceStart == start) {
+ return allocationExpr.arguments[j];
+ }
+ }
+ }
+ }
+ } else if (expression instanceof JavadocMessageSend) {
+ JavadocMessageSend messageSend = (JavadocMessageSend) this.references[i];
+ // if binding is valid then look at arguments
+ if (messageSend.binding != null && messageSend.binding.isValidBinding()) {
+ if (messageSend.arguments != null) {
+ for (int j=0; j<messageSend.arguments.length; j++) {
+ if (messageSend.arguments[j].sourceStart == start) {
+ return messageSend.arguments[j];
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return null;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocAllocationExpression.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocAllocationExpression.js
new file mode 100644
index 0000000..cd1b929
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocAllocationExpression.js
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding;
+
+public class JavadocAllocationExpression extends AllocationExpression {
+
+ public int tagSourceStart, tagSourceEnd;
+ public int tagValue;
+ public boolean superAccess = false;
+
+ public JavadocAllocationExpression(long pos) {
+ this.sourceStart = (int) (pos >>> 32);
+ this.sourceEnd = (int) pos;
+ this.bits |= InsideJavadoc;
+ }
+
+ /*
+ * Resolves type on a Block or Class scope.
+ */
+ private TypeBinding internalResolveType(Scope scope) {
+
+ // Propagate the type checking to the arguments, and check if the constructor is defined.
+ this.constant = NotAConstant;
+ if (this.type == null) {
+ this.resolvedType = scope.enclosingSourceType();
+ } else if (scope.kind == Scope.CLASS_SCOPE) {
+ this.resolvedType = this.type.resolveType((ClassScope)scope);
+ } else {
+ this.resolvedType = this.type.resolveType((BlockScope)scope);
+ }
+
+ // buffering the arguments' types
+ TypeBinding[] argumentTypes = NoParameters;
+ if (this.arguments != null) {
+ boolean argHasError = false;
+ int length = this.arguments.length;
+ argumentTypes = new TypeBinding[length];
+ for (int i = 0; i < length; i++) {
+ Expression argument = this.arguments[i];
+ if (scope.kind == Scope.CLASS_SCOPE) {
+ argumentTypes[i] = argument.resolveType((ClassScope)scope);
+ } else {
+ argumentTypes[i] = argument.resolveType((BlockScope)scope);
+ }
+ if (argumentTypes[i] == null) {
+ argHasError = true;
+ }
+ }
+ if (argHasError) {
+ return null;
+ }
+ }
+
+ // check resolved type
+ if (this.resolvedType == null) {
+ return null;
+ }
+ this.superAccess = scope.enclosingSourceType().isCompatibleWith(this.resolvedType);
+
+ ReferenceBinding allocationType = (ReferenceBinding) this.resolvedType;
+ this.binding = scope.getConstructor(allocationType, argumentTypes, this);
+ if (!this.binding.isValidBinding()) {
+ MethodBinding methodBinding = scope.getMethod(this.resolvedType, this.resolvedType.sourceName(), argumentTypes, this);
+ if (methodBinding.isValidBinding()) {
+ this.binding = methodBinding;
+ } else {
+ if (this.binding.declaringClass == null) {
+ this.binding.declaringClass = allocationType;
+ }
+ scope.problemReporter().javadocInvalidConstructor(this, this.binding, scope.getDeclarationModifiers());
+ }
+ return this.resolvedType;
+ }
+ if (isMethodUseDeprecated(this.binding, scope)) {
+ scope.problemReporter().javadocDeprecatedMethod(this.binding, this, scope.getDeclarationModifiers());
+ }
+ // TODO (frederic) add support for unsafe type operation warning
+ return allocationType;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.InvocationSite#isSuperAccess()
+ */
+ public boolean isSuperAccess() {
+ return this.superAccess;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.Expression#resolveType(org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope)
+ */
+ public TypeBinding resolveType(BlockScope scope) {
+ return internalResolveType(scope);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.Expression#resolveType(org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope)
+ */
+ public TypeBinding resolveType(ClassScope scope) {
+ return internalResolveType(scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocArgumentExpression.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocArgumentExpression.js
new file mode 100644
index 0000000..70ff2d8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocArgumentExpression.js
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.env.IConstants;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding;
+
+
+public class JavadocArgumentExpression extends Expression {
+ public char[] token;
+ public Argument argument;
+
+ public JavadocArgumentExpression(char[] name, int startPos, int endPos, TypeReference typeRef) {
+ this.token = name;
+ this.sourceStart = startPos;
+ this.sourceEnd = endPos;
+ long pos = (((long) startPos) << 32) + endPos;
+ this.argument = new Argument(name, pos, typeRef, IConstants.AccDefault, false);
+ this.bits |= InsideJavadoc;
+ }
+
+ /*
+ * Resolves type on a Block or Class scope.
+ */
+ private TypeBinding internalResolveType(Scope scope) {
+ this.constant = NotAConstant;
+ if (this.resolvedType != null) // is a shared type reference which was already resolved
+ return this.resolvedType.isValidBinding() ? this.resolvedType : null; // already reported error
+
+ if (this.argument != null) {
+ TypeReference typeRef = this.argument.type;
+ if (typeRef != null) {
+ this.resolvedType = typeRef.getTypeBinding(scope);
+ typeRef.resolvedType = this.resolvedType;
+ if (!this.resolvedType.isValidBinding()) {
+ scope.problemReporter().javadocInvalidType(typeRef, this.resolvedType, scope.getDeclarationModifiers());
+ return null;
+ }
+ if (isTypeUseDeprecated(this.resolvedType, scope)) {
+ scope.problemReporter().javadocDeprecatedType(this.resolvedType, typeRef, scope.getDeclarationModifiers());
+ return null;
+ }
+ return this.resolvedType = scope.convertToRawType(this.resolvedType);
+ }
+ }
+ return null;
+ }
+
+ public StringBuffer printExpression(int indent, StringBuffer output) {
+ if (this.argument == null) {
+ if (this.token != null) {
+ output.append(this.token);
+ }
+ }
+ else {
+ this.argument.print(indent, output);
+ }
+ return output;
+ }
+
+ public void resolve(BlockScope scope) {
+ if (this.argument != null) {
+ this.argument.resolve(scope);
+ }
+ }
+
+ public TypeBinding resolveType(BlockScope scope) {
+ return internalResolveType(scope);
+ }
+
+ public TypeBinding resolveType(ClassScope scope) {
+ return internalResolveType(scope);
+ }
+
+ /* (non-Javadoc)
+ * Redefine to capture javadoc specific signatures
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode#traverse(org.eclipse.wst.jsdt.internal.compiler.ASTVisitor, org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope)
+ */
+ public void traverse(ASTVisitor visitor, BlockScope blockScope) {
+ if (visitor.visit(this, blockScope)) {
+ if (this.argument != null) {
+ this.argument.traverse(visitor, blockScope);
+ }
+ }
+ visitor.endVisit(this, blockScope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocArrayQualifiedTypeReference.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocArrayQualifiedTypeReference.js
new file mode 100644
index 0000000..732290f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocArrayQualifiedTypeReference.js
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.Scope;
+
+
+
+public class JavadocArrayQualifiedTypeReference extends ArrayQualifiedTypeReference {
+
+ public int tagSourceStart, tagSourceEnd;
+
+ public JavadocArrayQualifiedTypeReference(JavadocQualifiedTypeReference typeRef, int dim) {
+ super(typeRef.tokens, dim, typeRef.sourcePositions);
+ }
+
+ protected void reportInvalidType(Scope scope) {
+ scope.problemReporter().javadocInvalidType(this, this.resolvedType, scope.getDeclarationModifiers());
+ }
+ protected void reportDeprecatedType(Scope scope) {
+ scope.problemReporter().javadocDeprecatedType(this.resolvedType, this, scope.getDeclarationModifiers());
+ }
+
+ /* (non-Javadoc)
+ * Redefine to capture javadoc specific signatures
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode#traverse(org.eclipse.wst.jsdt.internal.compiler.ASTVisitor, org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope)
+ */
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+ visitor.visit(this, scope);
+ visitor.endVisit(this, scope);
+ }
+
+ public void traverse(ASTVisitor visitor, ClassScope scope) {
+ visitor.visit(this, scope);
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocArraySingleTypeReference.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocArraySingleTypeReference.js
new file mode 100644
index 0000000..495531d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocArraySingleTypeReference.js
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.Scope;
+
+
+public class JavadocArraySingleTypeReference extends ArrayTypeReference {
+
+ public JavadocArraySingleTypeReference(char[] name, int dim, long pos) {
+ super(name, dim, pos);
+ this.bits |= InsideJavadoc;
+ }
+
+ protected void reportInvalidType(Scope scope) {
+ scope.problemReporter().javadocInvalidType(this, this.resolvedType, scope.getDeclarationModifiers());
+ }
+ protected void reportDeprecatedType(Scope scope) {
+ scope.problemReporter().javadocDeprecatedType(this.resolvedType, this, scope.getDeclarationModifiers());
+ }
+
+ /* (non-Javadoc)
+ * Redefine to capture javadoc specific signatures
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode#traverse(org.eclipse.wst.jsdt.internal.compiler.ASTVisitor, org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope)
+ */
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+ visitor.visit(this, scope);
+ visitor.endVisit(this, scope);
+ }
+
+ public void traverse(ASTVisitor visitor, ClassScope scope) {
+ visitor.visit(this, scope);
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocFieldReference.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocFieldReference.js
new file mode 100644
index 0000000..12fbdc2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocFieldReference.js
@@ -0,0 +1,143 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class JavadocFieldReference extends FieldReference {
+
+ public int tagSourceStart, tagSourceEnd;
+ public int tagValue;
+ public MethodBinding methodBinding;
+ public boolean superAccess = false;
+
+ public JavadocFieldReference(char[] source, long pos) {
+ super(source, pos);
+ this.bits |= InsideJavadoc;
+ }
+
+ /*
+ public Binding getBinding() {
+ if (this.methodBinding != null) {
+ return this.methodBinding;
+ }
+ return this.binding;
+ }
+ */
+
+ /*
+ * Resolves type on a Block or Class scope.
+ */
+ private TypeBinding internalResolveType(Scope scope) {
+
+ this.constant = NotAConstant;
+ if (this.receiver == null) {
+ this.receiverType = scope.enclosingSourceType();
+ } else if (scope.kind == Scope.CLASS_SCOPE) {
+ this.receiverType = this.receiver.resolveType((ClassScope) scope);
+ } else {
+ this.receiverType = this.receiver.resolveType((BlockScope)scope);
+ }
+ if (this.receiverType == null) {
+ return null;
+ }
+
+ Binding fieldBinding = (this.receiver != null && this.receiver.isThis())
+ ? scope.classScope().getBinding(this.token, this.bits & RestrictiveFlagMASK, this, true /*resolve*/)
+ : scope.getField(this.receiverType, this.token, this);
+ if (!fieldBinding.isValidBinding()) {
+ // implicit lookup may discover issues due to static/constructor contexts. javadoc must be resilient
+ switch (fieldBinding.problemId()) {
+ case ProblemReasons.NonStaticReferenceInConstructorInvocation:
+ case ProblemReasons.NonStaticReferenceInStaticContext:
+ case ProblemReasons.InheritedNameHidesEnclosingName :
+ FieldBinding closestMatch = ((ProblemFieldBinding)fieldBinding).closestMatch;
+ if (closestMatch != null) {
+ fieldBinding = closestMatch; // ignore problem if can reach target field through it
+ }
+ }
+ }
+ if (!fieldBinding.isValidBinding() || !(fieldBinding instanceof FieldBinding)) {
+ if (this.receiverType instanceof ReferenceBinding) {
+ ReferenceBinding refBinding = (ReferenceBinding) this.receiverType;
+ MethodBinding[] methodBindings = refBinding.getMethods(this.token);
+ if (methodBindings == null) {
+ scope.problemReporter().javadocInvalidField(this.sourceStart, this.sourceEnd, fieldBinding, this.receiverType, scope.getDeclarationModifiers());
+ } else {
+ switch (methodBindings.length) {
+ case 0:
+ scope.problemReporter().javadocInvalidField(this.sourceStart, this.sourceEnd, fieldBinding, this.receiverType, scope.getDeclarationModifiers());
+ break;
+ case 1:
+ this.methodBinding = methodBindings[0];
+ break;
+ default:
+ this.methodBinding = methodBindings[0];
+ scope.problemReporter().javadocAmbiguousMethodReference(this.sourceStart, this.sourceEnd, fieldBinding, scope.getDeclarationModifiers());
+ break;
+ }
+ }
+ }
+ return null;
+ }
+ this.binding = (FieldBinding) fieldBinding;
+
+ if (isFieldUseDeprecated(this.binding, scope, (this.bits & IsStrictlyAssignedMASK) != 0)) {
+ scope.problemReporter().javadocDeprecatedField(this.binding, this, scope.getDeclarationModifiers());
+ }
+ return this.resolvedType = this.binding.type;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.InvocationSite#isSuperAccess()
+ */
+ public boolean isSuperAccess() {
+ return this.superAccess;
+ }
+
+ public StringBuffer printExpression(int indent, StringBuffer output) {
+
+ if (this.receiver != null) {
+ this.receiver.printExpression(0, output);
+ }
+ output.append('#').append(this.token);
+ return output;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.Expression#resolveType(org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope)
+ */
+ public TypeBinding resolveType(BlockScope scope) {
+ return internalResolveType(scope);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.Expression#resolveType(org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope)
+ */
+ public TypeBinding resolveType(ClassScope scope) {
+ return internalResolveType(scope);
+ }
+
+ /* (non-Javadoc)
+ * Redefine to capture javadoc specific signatures
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode#traverse(org.eclipse.wst.jsdt.internal.compiler.ASTVisitor, org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope)
+ */
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+
+ if (visitor.visit(this, scope)) {
+ if (this.receiver != null) {
+ this.receiver.traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocImportReference.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocImportReference.js
new file mode 100644
index 0000000..d57ad49
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocImportReference.js
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+/**
+ */
+public class JavadocImportReference extends ImportReference {
+
+ public int tagSourceStart, tagSourceEnd;
+
+ /**
+ * @param tokens
+ * @param sourcePositions
+ * @param tagStart
+ * @param tagEnd
+ */
+ public JavadocImportReference(char[][] tokens, long[] sourcePositions, int tagStart, int tagEnd) {
+ super(tokens, sourcePositions, false, AccDefault);
+ this.tagSourceStart = tagStart;
+ this.tagSourceEnd = tagEnd;
+ this.bits |= InsideJavadoc;
+ }
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocMessageSend.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocMessageSend.js
new file mode 100644
index 0000000..e4b1991
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocMessageSend.js
@@ -0,0 +1,170 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+
+public class JavadocMessageSend extends MessageSend {
+
+ public int tagSourceStart, tagSourceEnd;
+ public int tagValue;
+ public boolean superAccess = false;
+
+ public JavadocMessageSend(char[] name, long pos) {
+ this.selector = name;
+ this.nameSourcePosition = pos;
+ this.sourceStart = (int) (this.nameSourcePosition >>> 32);
+ this.sourceEnd = (int) this.nameSourcePosition;
+ this.bits |= InsideJavadoc;
+ }
+ public JavadocMessageSend(char[] name, long pos, JavadocArgumentExpression[] arguments) {
+ this(name, pos);
+ this.arguments = arguments;
+ }
+
+ /*
+ * Resolves type on a Block or Class scope.
+ */
+ private TypeBinding internalResolveType(Scope scope) {
+ // Answer the signature return type
+ // Base type promotion
+ this.constant = NotAConstant;
+ if (this.receiver == null) {
+ this.receiverType = scope.enclosingSourceType();
+ } else if (scope.kind == Scope.CLASS_SCOPE) {
+ this.receiverType = this.receiver.resolveType((ClassScope) scope);
+ } else {
+ this.receiverType = this.receiver.resolveType((BlockScope) scope);
+ }
+
+ // will check for null after args are resolved
+ TypeBinding[] argumentTypes = NoParameters;
+ if (this.arguments != null) {
+ boolean argHasError = false; // typeChecks all arguments
+ int length = this.arguments.length;
+ argumentTypes = new TypeBinding[length];
+ for (int i = 0; i < length; i++){
+ Expression argument = this.arguments[i];
+ if (scope.kind == Scope.CLASS_SCOPE) {
+ argumentTypes[i] = argument.resolveType((ClassScope)scope);
+ } else {
+ argumentTypes[i] = argument.resolveType((BlockScope)scope);
+ }
+ if (argumentTypes[i] == null) {
+ argHasError = true;
+ }
+ }
+ if (argHasError) {
+ return null;
+ }
+ }
+
+ // check receiver type
+ if (this.receiverType == null) {
+ return null;
+ }
+ this.qualifyingType = this.receiverType;
+ this.superAccess = scope.enclosingSourceType().isCompatibleWith(this.receiverType);
+
+ // base type cannot receive any message
+ if (this.receiverType.isBaseType()) {
+ scope.problemReporter().javadocErrorNoMethodFor(this, this.receiverType, argumentTypes, scope.getDeclarationModifiers());
+ return null;
+ }
+ this.binding = (this.receiver != null && this.receiver.isThis())
+ ? scope.getImplicitMethod(this.selector, argumentTypes, this)
+ : scope.getMethod(this.receiverType, this.selector, argumentTypes, this);
+ if (!this.binding.isValidBinding()) {
+ // implicit lookup may discover issues due to static/constructor contexts. javadoc must be resilient
+ switch (this.binding.problemId()) {
+ case ProblemReasons.NonStaticReferenceInConstructorInvocation:
+ case ProblemReasons.NonStaticReferenceInStaticContext:
+ case ProblemReasons.InheritedNameHidesEnclosingName :
+ MethodBinding closestMatch = ((ProblemMethodBinding)this.binding).closestMatch;
+ if (closestMatch != null) {
+ this.binding = closestMatch; // ignore problem if can reach target method through it
+ }
+ }
+ }
+ if (!this.binding.isValidBinding()) {
+ if (this.binding.declaringClass == null) {
+ if (this.receiverType instanceof ReferenceBinding) {
+ this.binding.declaringClass = (ReferenceBinding) this.receiverType;
+ } else {
+ scope.problemReporter().javadocErrorNoMethodFor(this, this.receiverType, argumentTypes, scope.getDeclarationModifiers());
+ return null;
+ }
+ }
+ scope.problemReporter().javadocInvalidMethod(this, this.binding, scope.getDeclarationModifiers());
+ // record the closest match, for clients who may still need hint about possible method match
+ if (this.binding instanceof ProblemMethodBinding){
+ MethodBinding closestMatch = ((ProblemMethodBinding)this.binding).closestMatch;
+ if (closestMatch != null) this.binding = closestMatch;
+ }
+ return this.resolvedType = this.binding == null ? null : this.binding.returnType;
+ }
+ if (isMethodUseDeprecated(this.binding, scope)) {
+ scope.problemReporter().javadocDeprecatedMethod(this.binding, this, scope.getDeclarationModifiers());
+ }
+
+ return this.resolvedType = this.binding.returnType;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.InvocationSite#isSuperAccess()
+ */
+ public boolean isSuperAccess() {
+ return this.superAccess;
+ }
+
+ public StringBuffer printExpression(int indent, StringBuffer output){
+
+ if (this.receiver != null) {
+ this.receiver.printExpression(0, output);
+ }
+ output.append('#').append(this.selector).append('(');
+ if (this.arguments != null) {
+ for (int i = 0; i < this.arguments.length ; i ++) {
+ if (i > 0) output.append(", "); //$NON-NLS-1$
+ this.arguments[i].printExpression(0, output);
+ }
+ }
+ return output.append(')');
+ }
+
+ public TypeBinding resolveType(BlockScope scope) {
+ return internalResolveType(scope);
+ }
+
+ public TypeBinding resolveType(ClassScope scope) {
+ return internalResolveType(scope);
+ }
+
+ /* (non-Javadoc)
+ * Redefine to capture javadoc specific signatures
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode#traverse(org.eclipse.wst.jsdt.internal.compiler.ASTVisitor, org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope)
+ */
+ public void traverse(ASTVisitor visitor, BlockScope blockScope) {
+ if (visitor.visit(this, blockScope)) {
+ if (this.receiver != null) {
+ this.receiver.traverse(visitor, blockScope);
+ }
+ if (this.arguments != null) {
+ int argumentsLength = this.arguments.length;
+ for (int i = 0; i < argumentsLength; i++)
+ this.arguments[i].traverse(visitor, blockScope);
+ }
+ }
+ visitor.endVisit(this, blockScope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocQualifiedTypeReference.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocQualifiedTypeReference.js
new file mode 100644
index 0000000..6b11d32
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocQualifiedTypeReference.js
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.Binding;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.PackageBinding;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.Scope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding;
+
+
+
+public class JavadocQualifiedTypeReference extends QualifiedTypeReference {
+
+ public int tagSourceStart, tagSourceEnd;
+ public PackageBinding packageBinding;
+
+ public JavadocQualifiedTypeReference(char[][] sources, long[] pos, int tagStart, int tagEnd) {
+ super(sources, pos);
+ this.tagSourceStart = tagStart;
+ this.tagSourceEnd = tagEnd;
+ this.bits |= InsideJavadoc;
+ }
+
+ protected void reportInvalidType(Scope scope) {
+ scope.problemReporter().javadocInvalidType(this, this.resolvedType, scope.getDeclarationModifiers());
+ }
+ protected void reportDeprecatedType(Scope scope) {
+ scope.problemReporter().javadocDeprecatedType(this.resolvedType, this, scope.getDeclarationModifiers());
+ }
+
+ /* (non-Javadoc)
+ * Redefine to capture javadoc specific signatures
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode#traverse(org.eclipse.wst.jsdt.internal.compiler.ASTVisitor, org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope)
+ */
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+ visitor.visit(this, scope);
+ visitor.endVisit(this, scope);
+ }
+ public void traverse(ASTVisitor visitor, ClassScope scope) {
+ visitor.visit(this, scope);
+ visitor.endVisit(this, scope);
+ }
+
+ /*
+ *
+ */
+ private TypeBinding internalResolveType(Scope scope) {
+ // handle the error here
+ this.constant = NotAConstant;
+ if (this.resolvedType != null) // is a shared type reference which was already resolved
+ return this.resolvedType.isValidBinding() ? this.resolvedType : null; // already reported error
+
+ this.resolvedType = getTypeBinding(scope);
+ if (!this.resolvedType.isValidBinding()) {
+ Binding binding = scope.getTypeOrPackage(this.tokens);
+ if (binding instanceof PackageBinding) {
+ this.packageBinding = (PackageBinding) binding;
+ } else {
+ reportInvalidType(scope);
+ }
+ return null;
+ }
+ if (isTypeUseDeprecated(this.resolvedType, scope))
+ reportDeprecatedType(scope);
+ return this.resolvedType = scope.convertToRawType(this.resolvedType);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.Expression#resolveType(org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope)
+ * We need to override to handle package references
+ */
+ public TypeBinding resolveType(BlockScope blockScope) {
+ return internalResolveType(blockScope);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.Expression#resolveType(org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope)
+ * We need to override to handle package references
+ */
+ public TypeBinding resolveType(ClassScope classScope) {
+ return internalResolveType(classScope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocReturnStatement.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocReturnStatement.js
new file mode 100644
index 0000000..d40450d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocReturnStatement.js
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+
+public class JavadocReturnStatement extends ReturnStatement {
+ public char[] description;
+ public boolean empty = true;
+
+ public JavadocReturnStatement(int s, int e, char[] descr) {
+ super(null, s, e);
+ this.description = descr;
+ this.bits |= InsideJavadoc;
+ }
+
+ public void resolve(BlockScope scope) {
+ MethodScope methodScope = scope.methodScope();
+ MethodBinding methodBinding = null;
+ TypeBinding methodType =
+ (methodScope.referenceContext instanceof AbstractMethodDeclaration)
+ ? ((methodBinding = ((AbstractMethodDeclaration) methodScope.referenceContext).binding) == null
+ ? null
+ : methodBinding.returnType)
+ : VoidBinding;
+ if (methodType == null || methodType == VoidBinding) {
+ scope.problemReporter().javadocUnexpectedTag(this.sourceStart, this.sourceEnd);
+ } else if (this.empty) {
+ scope.problemReporter().javadocEmptyReturnTag(this.sourceStart, this.sourceEnd);
+ }
+ }
+
+ /* (non-Javadoc)
+ * Redefine to capture javadoc specific signatures
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode#traverse(org.eclipse.wst.jsdt.internal.compiler.ASTVisitor, org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope)
+ */
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+ visitor.visit(this, scope);
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocSingleNameReference.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocSingleNameReference.js
new file mode 100644
index 0000000..cbe3172
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocSingleNameReference.js
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class JavadocSingleNameReference extends SingleNameReference {
+
+ public int tagSourceStart, tagSourceEnd;
+
+ public JavadocSingleNameReference(char[] name, int startPosition, int endPosition) {
+ super(name, (((long) startPosition) << 32) + endPosition);
+ this.bits |= InsideJavadoc;
+ }
+
+ public void resolve(BlockScope scope) {
+ resolve(scope, true);
+ }
+
+ /**
+ * Resolve without warnings
+ */
+ public void resolve(BlockScope scope, boolean warn) {
+
+ LocalVariableBinding variableBinding = scope.findVariable(this.token);
+ if (variableBinding != null && variableBinding.isValidBinding() && variableBinding.isArgument) {
+ this.binding = variableBinding;
+ return;
+ }
+ if (warn) {
+ try {
+ MethodScope methScope = (MethodScope) scope;
+ scope.problemReporter().javadocInvalidParamName(this, methScope.referenceMethod().modifiers);
+ }
+ catch (Exception e) {
+ scope.problemReporter().javadocInvalidParamName(this, -1);
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * Redefine to capture javadoc specific signatures
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode#traverse(org.eclipse.wst.jsdt.internal.compiler.ASTVisitor, org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope)
+ */
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+ visitor.visit(this, scope);
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocSingleTypeReference.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocSingleTypeReference.js
new file mode 100644
index 0000000..81a4939
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocSingleTypeReference.js
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.Binding;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.PackageBinding;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.Scope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding;
+
+
+public class JavadocSingleTypeReference extends SingleTypeReference {
+
+ public int tagSourceStart, tagSourceEnd;
+ public PackageBinding packageBinding;
+
+ public JavadocSingleTypeReference(char[] source, long pos, int tagStart, int tagEnd) {
+ super(source, pos);
+ this.tagSourceStart = tagStart;
+ this.tagSourceEnd = tagEnd;
+ this.bits |= InsideJavadoc;
+ }
+
+ protected void reportInvalidType(Scope scope) {
+ scope.problemReporter().javadocInvalidType(this, this.resolvedType, scope.getDeclarationModifiers());
+ }
+ protected void reportDeprecatedType(Scope scope) {
+ scope.problemReporter().javadocDeprecatedType(this.resolvedType, this, scope.getDeclarationModifiers());
+ }
+
+ /* (non-Javadoc)
+ * Redefine to capture javadoc specific signatures
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode#traverse(org.eclipse.wst.jsdt.internal.compiler.ASTVisitor, org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope)
+ */
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+ visitor.visit(this, scope);
+ visitor.endVisit(this, scope);
+ }
+
+ public void traverse(ASTVisitor visitor, ClassScope scope) {
+ visitor.visit(this, scope);
+ visitor.endVisit(this, scope);
+ }
+ /*
+ *
+ */
+ private TypeBinding internalResolveType(Scope scope) {
+ // handle the error here
+ this.constant = NotAConstant;
+ if (this.resolvedType != null)// is a shared type reference which was already resolved
+ return this.resolvedType.isValidBinding() ? this.resolvedType : null; // already reported error
+
+ this.resolvedType = getTypeBinding(scope);
+ if (!this.resolvedType.isValidBinding()) {
+ char[][] tokens = { this.token };
+ Binding binding = scope.getTypeOrPackage(tokens);
+ if (binding instanceof PackageBinding) {
+ this.packageBinding = (PackageBinding) binding;
+ } else {
+ reportInvalidType(scope);
+ }
+ return null;
+ }
+ if (isTypeUseDeprecated(this.resolvedType, scope))
+ reportDeprecatedType(scope);
+ return this.resolvedType = scope.convertToRawType(this.resolvedType);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.Expression#resolveType(org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope)
+ * We need to override to handle package references
+ */
+ public TypeBinding resolveType(BlockScope blockScope) {
+ return internalResolveType(blockScope);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.Expression#resolveType(org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope)
+ * We need to override to handle package references
+ */
+ public TypeBinding resolveType(ClassScope classScope) {
+ return internalResolveType(classScope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/LabeledStatement.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/LabeledStatement.js
new file mode 100644
index 0000000..52e29bd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/LabeledStatement.js
@@ -0,0 +1,129 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class LabeledStatement extends Statement {
+
+ public Statement statement;
+ public char[] label;
+ public Label targetLabel;
+
+ // for local variables table attributes
+ int mergedInitStateIndex = -1;
+
+ /**
+ * LabeledStatement constructor comment.
+ */
+ public LabeledStatement(char[] label, Statement statement, int sourceStart, int sourceEnd) {
+
+ this.statement = statement;
+ // remember useful empty statement
+ if (statement instanceof EmptyStatement) statement.bits |= IsUsefulEmptyStatementMASK;
+ this.label = label;
+ this.sourceStart = sourceStart;
+ this.sourceEnd = sourceEnd;
+ }
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ // need to stack a context to store explicit label, answer inits in case of normal completion merged
+ // with those relative to the exit path from break statement occurring inside the labeled statement.
+ if (statement == null) {
+ return flowInfo;
+ } else {
+ LabelFlowContext labelContext;
+ FlowInfo mergedInfo =
+ statement
+ .analyseCode(
+ currentScope,
+ (labelContext =
+ new LabelFlowContext(
+ flowContext,
+ this,
+ label,
+ (targetLabel = new Label()),
+ currentScope)),
+ flowInfo)
+ .mergedWith(labelContext.initsOnBreak);
+ mergedInitStateIndex =
+ currentScope.methodScope().recordInitializationStates(mergedInfo);
+ return mergedInfo;
+ }
+ }
+
+ public ASTNode concreteStatement() {
+
+ // return statement.concreteStatement(); // for supporting nested labels: a:b:c: someStatement (see 21912)
+ return statement;
+ }
+
+ /**
+ * Code generation for labeled statement
+ *
+ * may not need actual source positions recording
+ *
+ * @param currentScope org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ */
+ public void generateCode(BlockScope currentScope, CodeStream codeStream) {
+
+ int pc = codeStream.position;
+ if (targetLabel != null) {
+ targetLabel.initialize(codeStream);
+ if (statement != null) {
+ statement.generateCode(currentScope, codeStream);
+ }
+ targetLabel.place();
+ }
+ // May loose some local variable initializations : affecting the local variable attributes
+ if (mergedInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(currentScope, mergedInitStateIndex);
+ codeStream.addDefinitelyAssignedVariables(currentScope, mergedInitStateIndex);
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+
+ public StringBuffer printStatement(int tab, StringBuffer output) {
+
+ printIndent(tab, output).append(label).append(": "); //$NON-NLS-1$
+ if (this.statement == null)
+ output.append(';');
+ else
+ this.statement.printStatement(0, output);
+ return output;
+ }
+
+ public void resolve(BlockScope scope) {
+
+ if (this.statement != null) {
+ this.statement.resolve(scope);
+ }
+ }
+
+
+ public void traverse(
+ ASTVisitor visitor,
+ BlockScope blockScope) {
+
+ if (visitor.visit(this, blockScope)) {
+ if (this.statement != null) this.statement.traverse(visitor, blockScope);
+ }
+ visitor.endVisit(this, blockScope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Literal.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Literal.js
new file mode 100644
index 0000000..ea1305e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Literal.js
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.flow.FlowContext;
+import org.eclipse.wst.jsdt.internal.compiler.flow.FlowInfo;
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public abstract class Literal extends Expression {
+
+ public Literal(int s, int e) {
+
+ sourceStart = s;
+ sourceEnd = e;
+ }
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ return flowInfo;
+ }
+
+ public abstract void computeConstant();
+
+ public abstract TypeBinding literalType(BlockScope scope);
+
+ public StringBuffer printExpression(int indent, StringBuffer output){
+
+ return output.append(source());
+ }
+
+ public TypeBinding resolveType(BlockScope scope) {
+ // compute the real value, which must range its type's range
+ this.resolvedType = literalType(scope);
+
+ // in case of error, constant did remain null
+ computeConstant();
+ if (constant == null) {
+ scope.problemReporter().constantOutOfRange(this, this.resolvedType);
+ constant = Constant.NotAConstant;
+ }
+ return this.resolvedType;
+ }
+
+ public abstract char[] source();
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/LocalDeclaration.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/LocalDeclaration.js
new file mode 100644
index 0000000..1df4695
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/LocalDeclaration.js
@@ -0,0 +1,226 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class LocalDeclaration extends AbstractVariableDeclaration {
+
+ public LocalVariableBinding binding;
+
+ public LocalDeclaration(
+ char[] name,
+ int sourceStart,
+ int sourceEnd) {
+
+ this.name = name;
+ this.sourceStart = sourceStart;
+ this.sourceEnd = sourceEnd;
+ this.declarationEnd = sourceEnd;
+ }
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ // record variable initialization if any
+ if (flowInfo.isReachable()) {
+ bits |= IsLocalDeclarationReachableMASK; // only set if actually reached
+ }
+ if (initialization == null)
+ return flowInfo;
+
+ flowInfo =
+ initialization
+ .analyseCode(currentScope, flowContext, flowInfo)
+ .unconditionalInits();
+
+ // final int i = (i = 0);
+ // no need to complain since (i = 0) part will get the blame
+ //if (binding.isFinal() && flowInfo.isPotentiallyAssigned(binding)) {
+ // currentScope.problemReporter().duplicateInitializationOfFinalLocal(binding, this);
+ //}
+
+ flowInfo.markAsDefinitelyAssigned(binding);
+ return flowInfo;
+ }
+
+ public void checkModifiers() {
+
+ //only potential valid modifier is <<final>>
+ if (((modifiers & AccJustFlag) & ~AccFinal) != 0)
+ //AccModifierProblem -> other (non-visibility problem)
+ //AccAlternateModifierProblem -> duplicate modifier
+ //AccModifierProblem | AccAlternateModifierProblem -> visibility problem"
+
+ modifiers = (modifiers & ~AccAlternateModifierProblem) | AccModifierProblem;
+ }
+
+ /**
+ * Code generation for a local declaration:
+ * i.e.&nbsp;normal assignment to a local variable + unused variable handling
+ */
+ public void generateCode(BlockScope currentScope, CodeStream codeStream) {
+
+ // even if not reachable, variable must be added to visible if allocated (28298)
+ if (binding.resolvedPosition != -1) {
+ codeStream.addVisibleLocalVariable(binding);
+ }
+ if ((bits & IsReachableMASK) == 0) {
+ return;
+ }
+ int pc = codeStream.position;
+ Constant inlinedValue;
+
+ // something to initialize?
+ if (initialization != null) {
+ // initialize to constant value?
+ if ((inlinedValue = initialization.constant) != NotAConstant) {
+ // forget initializing unused or final locals set to constant value (final ones are inlined)
+ if (binding.resolvedPosition != -1) { // may need to preserve variable
+ int initPC = codeStream.position;
+ codeStream.generateConstant(inlinedValue, initialization.implicitConversion);
+ codeStream.recordPositionsFrom(initPC, initialization.sourceStart);
+ codeStream.store(binding, false);
+ binding.recordInitializationStartPC(codeStream.position);
+ // codeStream.lastInitStateIndexWhenRemovingInits = -2; // reinitialize remove index
+ // codeStream.lastInitStateIndexWhenAddingInits = -2; // reinitialize add index
+ }
+ } else { // initializing to non-constant value
+ initialization.generateCode(currentScope, codeStream, true);
+ // if binding unused generate then discard the value
+ if (binding.resolvedPosition != -1) {
+ // 26903, need extra cast to store null in array local var
+ if (binding.type.isArrayType()
+ && (initialization.resolvedType == NullBinding // arrayLoc = null
+ || ((initialization instanceof CastExpression) // arrayLoc = (type[])null
+ && (((CastExpression)initialization).innermostCastedExpression().resolvedType == NullBinding)))){
+ codeStream.checkcast(binding.type);
+ }
+ codeStream.store(binding, false);
+ if (binding.initializationCount == 0) {
+ /* Variable may have been initialized during the code initializing it
+ e.g. int i = (i = 1);
+ */
+ binding.recordInitializationStartPC(codeStream.position);
+ // codeStream.lastInitStateIndexWhenRemovingInits = -2; // reinitialize remove index
+ // codeStream.lastInitStateIndexWhenAddingInits = -2; // reinitialize add index
+ }
+ } else {
+ if ((binding.type == LongBinding) || (binding.type == DoubleBinding)) {
+ codeStream.pop2();
+ } else {
+ codeStream.pop();
+ }
+ }
+ }
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+
+ public void resolve(BlockScope scope) {
+
+ // create a binding and add it to the scope
+ TypeBinding variableType = type.resolveType(scope);
+
+ checkModifiers();
+
+ if (variableType != null) {
+ if (variableType == VoidBinding) {
+ scope.problemReporter().variableTypeCannotBeVoid(this);
+ return;
+ }
+ if (variableType.isArrayType() && ((ArrayBinding) variableType).leafComponentType == VoidBinding) {
+ scope.problemReporter().variableTypeCannotBeVoidArray(this);
+ return;
+ }
+ }
+
+ Binding existingVariable = scope.getBinding(name, BindingIds.VARIABLE, this, false /*do not resolve hidden field*/);
+ boolean shouldInsertInScope = true;
+ if (existingVariable != null && existingVariable.isValidBinding()){
+ if (existingVariable instanceof LocalVariableBinding && this.hiddenVariableDepth == 0) {
+ shouldInsertInScope = false;
+ scope.problemReporter().redefineLocal(this);
+ } else {
+ scope.problemReporter().localVariableHiding(this, existingVariable, false);
+ }
+ }
+
+ if (shouldInsertInScope) {
+ if ((modifiers & AccFinal)!= 0 && this.initialization == null) {
+ modifiers |= AccBlankFinal;
+ }
+ binding = new LocalVariableBinding(this, variableType, modifiers, false);
+ scope.addLocalVariable(binding);
+ binding.setConstant(NotAConstant);
+ // allow to recursivelly target the binding....
+ // the correct constant is harmed if correctly computed at the end of this method
+ }
+
+ if (variableType == null) {
+ if (initialization != null)
+ initialization.resolveType(scope); // want to report all possible errors
+ return;
+ }
+
+ // store the constant for final locals
+ if (initialization != null) {
+ if (initialization instanceof ArrayInitializer) {
+ TypeBinding initializationType = initialization.resolveTypeExpecting(scope, variableType);
+ if (initializationType != null) {
+ ((ArrayInitializer) initialization).binding = (ArrayBinding) initializationType;
+ initialization.computeConversion(scope, variableType, initializationType);
+ }
+ } else {
+ this.initialization.setExpectedType(variableType);
+ TypeBinding initializationType = this.initialization.resolveType(scope);
+ if (initializationType != null) {
+ if (initialization.isConstantValueOfTypeAssignableToType(initializationType, variableType)
+ || (variableType.isBaseType() && BaseTypeBinding.isWidening(variableType.id, initializationType.id))
+ || initializationType.isCompatibleWith(variableType)) {
+ this.initialization.computeConversion(scope, variableType, initializationType);
+ if (initializationType.isRawType() && (variableType.isBoundParameterizedType() || variableType.isGenericType())) {
+ scope.problemReporter().unsafeRawConversion(this.initialization, initializationType, variableType);
+ }
+ } else {
+ scope.problemReporter().typeMismatchError(initializationType, variableType, this);
+ }
+ }
+ }
+
+ // change the constant in the binding when it is final
+ // (the optimization of the constant propagation will be done later on)
+ // cast from constant actual type to variable type
+ if (binding != null) {
+ binding.setConstant(
+ binding.isFinal()
+ ? initialization.constant.castTo((variableType.id << 4) + initialization.constant.typeID())
+ : NotAConstant);
+ }
+ }
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+
+ if (visitor.visit(this, scope)) {
+ type.traverse(visitor, scope);
+ if (initialization != null)
+ initialization.traverse(visitor, scope);
+ }
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/LongLiteral.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/LongLiteral.js
new file mode 100644
index 0000000..300cf6c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/LongLiteral.js
@@ -0,0 +1,141 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class LongLiteral extends NumberLiteral {
+ long value;
+
+ static final Constant FORMAT_ERROR = new DoubleConstant(1.0/0.0); // NaN;
+
+public LongLiteral(char[] token, int s,int e) {
+ super(token, s,e);
+}
+public LongLiteral(char[] token, int s,int e, long value) {
+ this(token, s,e);
+ this.value = value;
+}
+public void computeConstant() {
+ //the overflow (when radix=10) is tested using the fact that
+ //the value should always grow during its computation
+
+ int length = source.length - 1; //minus one because the last char is 'l' or 'L'
+
+ long computedValue ;
+ if (source[0] == '0')
+ { if (length == 1) { constant = Constant.fromValue(0L); return; }
+ final int shift,radix;
+ int j ;
+ if ( (source[1] == 'x') || (source[1] == 'X') )
+ { shift = 4 ; j = 2; radix = 16;}
+ else
+ { shift = 3 ; j = 1; radix = 8;}
+ int nbDigit = 0;
+ while (source[j]=='0')
+ { j++; //jump over redondant zero
+ if ( j == length)
+ { //watch for 0000000000000L
+ constant = Constant.fromValue(value = 0L);
+ return ;}}
+
+ int digitValue ;
+ if ((digitValue = Character.digit(source[j++],radix)) < 0 )
+ { constant = FORMAT_ERROR; return ;}
+ if (digitValue >= 8) nbDigit = 4;
+ else if (digitValue >= 4) nbDigit = 3;
+ else if (digitValue >= 2) nbDigit = 2;
+ else nbDigit = 1; //digitValue is not 0
+ computedValue = digitValue ;
+ while (j<length)
+ { if ((digitValue = Character.digit(source[j++],radix)) < 0 )
+ { constant = FORMAT_ERROR; return ;}
+ if ((nbDigit += shift) > 64) return /*constant stays null*/ ;
+ computedValue = (computedValue<<shift) | digitValue ;}}
+
+ else
+ { //-----------case radix=10-----------------
+ long previous = computedValue = 0;
+ for (int i = 0 ; i < length; i++)
+ { int digitValue ;
+ if ((digitValue = Character.digit(source[i], 10)) < 0 ) return /*constant stays null*/ ;
+ previous = computedValue;
+ computedValue = 10 * computedValue + digitValue ;
+ if (previous > computedValue) return /*constant stays null*/;}}
+
+ constant = Constant.fromValue(value = computedValue);
+}
+/**
+ * Code generation for long literal
+ *
+ * @param currentScope org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ * @param valueRequired boolean
+ */
+public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
+ int pc = codeStream.position;
+ if (valueRequired)
+ if ((implicitConversion >> 4) == T_long)
+ codeStream.generateInlinedValue(value);
+ else
+ codeStream.generateConstant(constant, implicitConversion);
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+}
+public TypeBinding literalType(BlockScope scope) {
+ return LongBinding;
+}
+public final boolean mayRepresentMIN_VALUE(){
+ //a special autorized int literral is 9223372036854775808L
+ //which is ONE over the limit. This special case
+ //only is used in combinaison with - to denote
+ //the minimal value of int -9223372036854775808L
+
+ return ((source.length == 20) &&
+ (source[0] == '9') &&
+ (source[1] == '2') &&
+ (source[2] == '2') &&
+ (source[3] == '3') &&
+ (source[4] == '3') &&
+ (source[5] == '7') &&
+ (source[6] == '2') &&
+ (source[7] == '0') &&
+ (source[8] == '3') &&
+ (source[9] == '6') &&
+ (source[10] == '8') &&
+ (source[11] == '5') &&
+ (source[12] == '4') &&
+ (source[13] == '7') &&
+ (source[14] == '7') &&
+ (source[15] == '5') &&
+ (source[16] == '8') &&
+ (source[17] == '0') &&
+ (source[18] == '8'));}
+public TypeBinding resolveType(BlockScope scope) {
+ // the format may be incorrect while the scanner could detect
+ // such error only on painfull tests...easier and faster here
+
+ TypeBinding tb = super.resolveType(scope);
+ if (constant == FORMAT_ERROR) {
+ constant = NotAConstant;
+ scope.problemReporter().constantOutOfFormat(this);
+ this.resolvedType = null;
+ return null;
+ }
+ return tb;
+}
+public void traverse(ASTVisitor visitor, BlockScope scope) {
+ visitor.visit(this, scope);
+ visitor.endVisit(this, scope);
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/LongLiteralMinValue.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/LongLiteralMinValue.js
new file mode 100644
index 0000000..950ae38
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/LongLiteralMinValue.js
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+
+public class LongLiteralMinValue extends LongLiteral {
+
+ final static char[] CharValue = new char[]{'-', '9','2','2','3','3','7','2','0','3','6','8','5','4','7','7','5','8','0','8','L'};
+ final static Constant MIN_VALUE = Constant.fromValue(Long.MIN_VALUE) ;
+
+public LongLiteralMinValue(){
+ super(CharValue,0,0,Long.MIN_VALUE);
+ constant = MIN_VALUE;
+}
+public void computeConstant() {
+
+ /*precomputed at creation time*/}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/MagicLiteral.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/MagicLiteral.js
new file mode 100644
index 0000000..0238b0d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/MagicLiteral.js
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+public abstract class MagicLiteral extends Literal {
+
+ public MagicLiteral(int start , int end) {
+
+ super(start,end);
+ }
+
+ public boolean isValidJavaStatement(){
+
+ return false ;
+ }
+
+ public char[] source() {
+
+ return null;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/MarkerAnnotation.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/MarkerAnnotation.js
new file mode 100644
index 0000000..daf855d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/MarkerAnnotation.js
@@ -0,0 +1,42 @@
+/*
+ * Created on 2004-03-11
+ *
+ * To change the template for this generated file go to
+ * Window - Preferences - Java - Code Generation - Code and Comments
+ */
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.CompilationUnitScope;
+
+public class MarkerAnnotation extends Annotation {
+
+ public MarkerAnnotation(char[][] tokens, long[] sourcePositions, int sourceStart) {
+ this.tokens = tokens;
+ this.sourcePositions = sourcePositions;
+ this.sourceStart = sourceStart;
+ this.sourceEnd = (int) sourcePositions[sourcePositions.length - 1];
+ }
+
+ public MarkerAnnotation(char[] token, long sourcePosition, int sourceStart) {
+ this.tokens = new char[][] { token };
+ this.sourcePositions = new long[] { sourcePosition };
+ this.sourceStart = sourceStart;
+ this.sourceEnd = (int) sourcePosition;
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+ visitor.visit(this, scope);
+ visitor.endVisit(this, scope);
+ }
+ public void traverse(ASTVisitor visitor, ClassScope scope) {
+ visitor.visit(this, scope);
+ visitor.endVisit(this, scope);
+ }
+ public void traverse(ASTVisitor visitor, CompilationUnitScope scope) {
+ visitor.visit(this, scope);
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/MemberValuePair.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/MemberValuePair.js
new file mode 100644
index 0000000..26b9f4c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/MemberValuePair.js
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.CompilationUnitScope;
+
+/**
+ * MemberValuePair node
+ */
+public class MemberValuePair extends ASTNode {
+
+ public char[] token;
+ public Expression value;
+
+ public MemberValuePair(char[] token, int sourceStart, int sourceEnd, Expression value) {
+ this.token = token;
+ this.sourceStart = sourceStart;
+ this.sourceEnd = sourceEnd;
+ this.value = value;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode#print(int, java.lang.StringBuffer)
+ */
+ public StringBuffer print(int indent, StringBuffer output) {
+ output
+ .append(token)
+ .append(" = "); //$NON-NLS-1$
+ value.print(indent, output);
+ return output;
+ }
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+ if (visitor.visit(this, scope)) {
+ if (this.value != null) {
+ this.value.traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, scope);
+ }
+ public void traverse(ASTVisitor visitor, ClassScope scope) {
+ if (visitor.visit(this, scope)) {
+ if (this.value != null) {
+ this.value.traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, scope);
+ }
+ public void traverse(ASTVisitor visitor, CompilationUnitScope scope) {
+ if (visitor.visit(this, scope)) {
+ if (this.value != null) {
+ this.value.traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/MessageSend.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/MessageSend.js
new file mode 100644
index 0000000..2314828
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/MessageSend.js
@@ -0,0 +1,399 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * Nick Teryaev - fix for bug (https://bugs.eclipse.org/bugs/show_bug.cgi?id=40752)
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class MessageSend extends Expression implements InvocationSite {
+
+ public Expression receiver ;
+ public char[] selector ;
+ public Expression[] arguments ;
+ public MethodBinding binding; // exact binding resulting from lookup
+ protected MethodBinding codegenBinding; // actual binding used for code generation (if no synthetic accessor)
+ MethodBinding syntheticAccessor; // synthetic accessor for inner-emulation
+ public TypeBinding expectedType; // for generic method invocation (return type inference)
+
+ public long nameSourcePosition ; //(start<<32)+end
+
+ public TypeBinding receiverType, qualifyingType;
+ public TypeBinding genericCast;
+ public TypeReference[] typeArguments;
+ public TypeBinding[] genericTypeArguments;
+
+public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
+
+ flowInfo = receiver.analyseCode(currentScope, flowContext, flowInfo, !binding.isStatic()).unconditionalInits();
+ if (arguments != null) {
+ int length = arguments.length;
+ for (int i = 0; i < length; i++) {
+ flowInfo = arguments[i].analyseCode(currentScope, flowContext, flowInfo).unconditionalInits();
+ }
+ }
+ ReferenceBinding[] thrownExceptions;
+ if ((thrownExceptions = binding.thrownExceptions) != NoExceptions) {
+ // must verify that exceptions potentially thrown by this expression are caught in the method
+ flowContext.checkExceptionHandlers(thrownExceptions, this, flowInfo, currentScope);
+ }
+ manageSyntheticAccessIfNecessary(currentScope, flowInfo);
+ return flowInfo;
+}
+/**
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.Expression#computeConversion(org.eclipse.wst.jsdt.internal.compiler.lookup.Scope, org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding, org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding)
+ */
+public void computeConversion(Scope scope, TypeBinding runtimeTimeType, TypeBinding compileTimeType) {
+ if (runtimeTimeType == null || compileTimeType == null)
+ return;
+ // set the generic cast after the fact, once the type expectation is fully known (no need for strict cast)
+ if (this.binding != null && this.binding.isValidBinding()) {
+ MethodBinding originalBinding = this.binding.original();
+ if (originalBinding != this.binding) {
+ // extra cast needed if method return type has type variable
+ if ((originalBinding.returnType.tagBits & TagBits.HasTypeVariable) != 0 && runtimeTimeType.id != T_Object) {
+ this.genericCast = originalBinding.returnType.genericCast(runtimeTimeType);
+ }
+ }
+ }
+ super.computeConversion(scope, runtimeTimeType, compileTimeType);
+}
+/**
+ * MessageSend code generation
+ *
+ * @param currentScope org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ * @param valueRequired boolean
+ */
+public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
+
+ int pc = codeStream.position;
+
+ // generate receiver/enclosing instance access
+ boolean isStatic = this.codegenBinding.isStatic();
+ // outer access ?
+ if (!isStatic && ((bits & DepthMASK) != 0) && receiver.isImplicitThis()){
+ // outer method can be reached through emulation if implicit access
+ ReferenceBinding targetType = currentScope.enclosingSourceType().enclosingTypeAt((bits & DepthMASK) >> DepthSHIFT);
+ Object[] path = currentScope.getEmulationPath(targetType, true /*only exact match*/, false/*consider enclosing arg*/);
+ codeStream.generateOuterAccess(path, this, targetType, currentScope);
+ } else {
+ receiver.generateCode(currentScope, codeStream, !isStatic);
+ }
+ // generate arguments
+ if (arguments != null){
+ for (int i = 0, max = arguments.length; i < max; i++){
+ arguments[i].generateCode(currentScope, codeStream, true);
+ }
+ }
+ // actual message invocation
+ if (syntheticAccessor == null){
+ if (isStatic){
+ codeStream.invokestatic(this.codegenBinding);
+ } else {
+ if( (receiver.isSuper()) || this.codegenBinding.isPrivate()){
+ codeStream.invokespecial(this.codegenBinding);
+ } else {
+ if (this.codegenBinding.declaringClass.isInterface()){
+ codeStream.invokeinterface(this.codegenBinding);
+ } else {
+ codeStream.invokevirtual(this.codegenBinding);
+ }
+ }
+ }
+ } else {
+ codeStream.invokestatic(syntheticAccessor);
+ }
+ // operation on the returned value
+ if (valueRequired){
+ // implicit conversion if necessary
+ codeStream.generateImplicitConversion(implicitConversion);
+ if (this.genericCast != null) codeStream.checkcast(this.genericCast);
+ } else {
+ // pop return value if any
+ switch(binding.returnType.id){
+ case T_long :
+ case T_double :
+ codeStream.pop2();
+ break;
+ case T_void :
+ break;
+ default:
+ codeStream.pop();
+ }
+ }
+ codeStream.recordPositionsFrom(pc, (int)(this.nameSourcePosition >>> 32)); // highlight selector
+}
+/**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.InvocationSite#genericTypeArguments()
+ */
+public TypeBinding[] genericTypeArguments() {
+ return this.genericTypeArguments;
+}
+public boolean isSuperAccess() {
+ return receiver.isSuper();
+}
+public boolean isTypeAccess() {
+ return receiver != null && receiver.isTypeReference();
+}
+public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo){
+
+ if (!flowInfo.isReachable()) return;
+
+ // if method from parameterized type got found, use the original method at codegen time
+ this.codegenBinding = this.binding.original();
+ if (this.binding.isPrivate()){
+
+ // depth is set for both implicit and explicit access (see MethodBinding#canBeSeenBy)
+ if (currentScope.enclosingSourceType() != this.codegenBinding.declaringClass){
+
+ syntheticAccessor = ((SourceTypeBinding)this.codegenBinding.declaringClass).addSyntheticMethod(this.codegenBinding, isSuperAccess());
+ currentScope.problemReporter().needToEmulateMethodAccess(this.codegenBinding, this);
+ return;
+ }
+
+ } else if (receiver instanceof QualifiedSuperReference){ // qualified super
+
+ // qualified super need emulation always
+ SourceTypeBinding destinationType = (SourceTypeBinding)(((QualifiedSuperReference)receiver).currentCompatibleType);
+ syntheticAccessor = destinationType.addSyntheticMethod(this.codegenBinding, isSuperAccess());
+ currentScope.problemReporter().needToEmulateMethodAccess(this.codegenBinding, this);
+ return;
+
+ } else if (binding.isProtected()){
+
+ SourceTypeBinding enclosingSourceType;
+ if (((bits & DepthMASK) != 0)
+ && this.codegenBinding.declaringClass.getPackage()
+ != (enclosingSourceType = currentScope.enclosingSourceType()).getPackage()){
+
+ SourceTypeBinding currentCompatibleType = (SourceTypeBinding)enclosingSourceType.enclosingTypeAt((bits & DepthMASK) >> DepthSHIFT);
+ syntheticAccessor = currentCompatibleType.addSyntheticMethod(this.codegenBinding, isSuperAccess());
+ currentScope.problemReporter().needToEmulateMethodAccess(this.codegenBinding, this);
+ return;
+ }
+ }
+
+ // if the binding declaring class is not visible, need special action
+ // for runtime compatibility on 1.2 VMs : change the declaring class of the binding
+ // NOTE: from target 1.2 on, method's declaring class is touched if any different from receiver type
+ // and not from Object or implicit static method call.
+ if (this.binding.declaringClass != this.qualifyingType
+ && !this.qualifyingType.isArrayType()
+ && ((currentScope.environment().options.targetJDK >= ClassFileConstants.JDK1_2
+ && (!receiver.isImplicitThis() || !this.codegenBinding.isStatic())
+ && this.binding.declaringClass.id != T_Object) // no change for Object methods
+ || !this.binding.declaringClass.canBeSeenBy(currentScope))) {
+
+ this.codegenBinding = currentScope.enclosingSourceType().getUpdatedMethodBinding(
+ this.codegenBinding, (ReferenceBinding) this.qualifyingType.erasure());
+
+ // Post 1.4.0 target, array clone() invocations are qualified with array type
+ // This is handled in array type #clone method binding resolution (see Scope and UpdatedMethodBinding)
+ }
+}
+
+public StringBuffer printExpression(int indent, StringBuffer output){
+
+ if (!receiver.isImplicitThis()) receiver.printExpression(0, output).append('.');
+ if (this.typeArguments != null) {
+ output.append('<');//$NON-NLS-1$
+ int max = typeArguments.length - 1;
+ for (int j = 0; j < max; j++) {
+ typeArguments[j].print(0, output);
+ output.append(", ");//$NON-NLS-1$
+ }
+ typeArguments[max].print(0, output);
+ output.append('>');
+ }
+ output.append(selector).append('(') ; //$NON-NLS-1$
+ if (arguments != null) {
+ for (int i = 0; i < arguments.length ; i ++) {
+ if (i > 0) output.append(", "); //$NON-NLS-1$
+ arguments[i].printExpression(0, output);
+ }
+ }
+ return output.append(')');
+}
+
+public TypeBinding resolveType(BlockScope scope) {
+ // Answer the signature return type
+ // Base type promotion
+
+ constant = NotAConstant;
+ boolean receiverCast = false, argsContainCast = false;
+ if (this.receiver instanceof CastExpression) {
+ this.receiver.bits |= IgnoreNeedForCastCheckMASK; // will check later on
+ receiverCast = true;
+ }
+ this.qualifyingType = this.receiverType = receiver.resolveType(scope);
+ if (receiverCast && this.receiverType != null) {
+ // due to change of declaring class with receiver type, only identity cast should be notified
+ if (((CastExpression)this.receiver).expression.resolvedType == this.receiverType) {
+ scope.problemReporter().unnecessaryCast((CastExpression)this.receiver);
+ }
+ }
+ // resolve type arguments (for generic constructor call)
+ if (this.typeArguments != null) {
+ int length = this.typeArguments.length;
+ boolean argHasError = false; // typeChecks all arguments
+ this.genericTypeArguments = new TypeBinding[length];
+ for (int i = 0; i < length; i++) {
+ if ((this.genericTypeArguments[i] = this.typeArguments[i].resolveType(scope)) == null) {
+ argHasError = true;
+ }
+ }
+ if (argHasError) {
+ return null;
+ }
+ }
+ // will check for null after args are resolved
+ TypeBinding[] argumentTypes = NoParameters;
+ if (arguments != null) {
+ boolean argHasError = false; // typeChecks all arguments
+ int length = arguments.length;
+ argumentTypes = new TypeBinding[length];
+ for (int i = 0; i < length; i++){
+ Expression argument = arguments[i];
+ if (argument instanceof CastExpression) {
+ argument.bits |= IgnoreNeedForCastCheckMASK; // will check later on
+ argsContainCast = true;
+ }
+ if ((argumentTypes[i] = argument.resolveType(scope)) == null){
+ argHasError = true;
+ }
+ }
+ if (argHasError) {
+ if(receiverType instanceof ReferenceBinding) {
+ // record any selector match, for clients who may still need hint about possible method match
+ this.binding = scope.findMethod((ReferenceBinding)receiverType, selector, new TypeBinding[]{}, this);
+ }
+ return null;
+ }
+ }
+ if (this.receiverType == null) {
+ return null;
+ }
+ // base type cannot receive any message
+ if (this.receiverType.isBaseType()) {
+ scope.problemReporter().errorNoMethodFor(this, this.receiverType, argumentTypes);
+ return null;
+ }
+ this.binding =
+ receiver.isImplicitThis()
+ ? scope.getImplicitMethod(selector, argumentTypes, this)
+ : scope.getMethod(this.receiverType, selector, argumentTypes, this);
+ if (!binding.isValidBinding()) {
+ if (binding.declaringClass == null) {
+ if (this.receiverType instanceof ReferenceBinding) {
+ binding.declaringClass = (ReferenceBinding) this.receiverType;
+ } else {
+ scope.problemReporter().errorNoMethodFor(this, this.receiverType, argumentTypes);
+ return null;
+ }
+ }
+ scope.problemReporter().invalidMethod(this, binding);
+ MethodBinding closestMatch = ((ProblemMethodBinding)binding).closestMatch;
+ switch (this.binding.problemId()) {
+ case ProblemReasons.Ambiguous :
+ case ProblemReasons.NotVisible :
+ case ProblemReasons.NonStaticReferenceInConstructorInvocation :
+ case ProblemReasons.NonStaticReferenceInStaticContext :
+ case ProblemReasons.ReceiverTypeNotVisible :
+ case ProblemReasons.ParameterBoundMismatch :
+ // only steal returnType in cases listed above
+ if (closestMatch != null) this.resolvedType = closestMatch.returnType;
+ default :
+ }
+ // record the closest match, for clients who may still need hint about possible method match
+ if (closestMatch != null) {
+ this.binding = closestMatch;
+ if (closestMatch.isPrivate() && !scope.isDefinedInMethod(closestMatch)) {
+ // ignore cases where method is used from within inside itself (e.g. direct recursions)
+ closestMatch.original().modifiers |= AccPrivateUsed;
+ }
+ }
+ return this.resolvedType;
+ }
+ if (!binding.isStatic()) {
+ // the "receiver" must not be a type, in other words, a NameReference that the TC has bound to a Type
+ if (receiver instanceof NameReference
+ && (((NameReference) receiver).bits & BindingIds.TYPE) != 0) {
+ scope.problemReporter().mustUseAStaticMethod(this, binding);
+ }
+ receiver.computeConversion(scope, receiverType, receiverType); // compute generic cast if necessary
+ } else {
+ // static message invoked through receiver? legal but unoptimal (optional warning).
+ if (!(receiver.isImplicitThis()
+ || receiver.isSuper()
+ || (receiver instanceof NameReference
+ && (((NameReference) receiver).bits & BindingIds.TYPE) != 0))) {
+ scope.problemReporter().nonStaticAccessToStaticMethod(this, binding);
+ }
+ if (!receiver.isImplicitThis() && binding.declaringClass != receiverType) {
+ scope.problemReporter().indirectAccessToStaticMethod(this, binding);
+ }
+ }
+ if (this.arguments != null)
+ checkInvocationArguments(scope, this.receiver, receiverType, binding, this.arguments, argumentTypes, argsContainCast, this);
+
+ //-------message send that are known to fail at compile time-----------
+ if (binding.isAbstract()) {
+ if (receiver.isSuper()) {
+ scope.problemReporter().cannotDireclyInvokeAbstractMethod(this, binding);
+ }
+ // abstract private methods cannot occur nor abstract static............
+ }
+ if (isMethodUseDeprecated(binding, scope))
+ scope.problemReporter().deprecatedMethod(binding, this);
+
+ return this.resolvedType = this.binding.returnType;
+}
+public void setActualReceiverType(ReferenceBinding receiverType) {
+ this.qualifyingType = receiverType;
+}
+/**
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.Expression#setExpectedType(org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding)
+ */
+public void setExpectedType(TypeBinding expectedType) {
+ this.expectedType = expectedType;
+}
+
+public void setDepth(int depth) {
+ bits &= ~DepthMASK; // flush previous depth if any
+ if (depth > 0) {
+ bits |= (depth & 0xFF) << DepthSHIFT; // encoded on 8 bits
+ }
+}
+public void setFieldIndex(int depth) {
+ // ignore for here
+}
+
+public void traverse(ASTVisitor visitor, BlockScope blockScope) {
+ if (visitor.visit(this, blockScope)) {
+ receiver.traverse(visitor, blockScope);
+ if (this.typeArguments != null) {
+ for (int i = 0, typeArgumentsLength = this.typeArguments.length; i < typeArgumentsLength; i++) {
+ this.typeArguments[i].traverse(visitor, blockScope);
+ }
+ }
+ if (arguments != null) {
+ int argumentsLength = arguments.length;
+ for (int i = 0; i < argumentsLength; i++)
+ arguments[i].traverse(visitor, blockScope);
+ }
+ }
+ visitor.endVisit(this, blockScope);
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/MethodDeclaration.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/MethodDeclaration.js
new file mode 100644
index 0000000..ae40cd9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/MethodDeclaration.js
@@ -0,0 +1,181 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.core.compiler.*;
+import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.flow.ExceptionHandlingFlowContext;
+import org.eclipse.wst.jsdt.internal.compiler.flow.FlowInfo;
+import org.eclipse.wst.jsdt.internal.compiler.flow.InitializationFlowContext;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+import org.eclipse.wst.jsdt.internal.compiler.parser.*;
+import org.eclipse.wst.jsdt.internal.compiler.problem.AbortMethod;
+
+public class MethodDeclaration extends AbstractMethodDeclaration {
+
+ public TypeReference returnType;
+ public TypeParameter[] typeParameters;
+
+ /**
+ * MethodDeclaration constructor comment.
+ */
+ public MethodDeclaration(CompilationResult compilationResult) {
+ super(compilationResult);
+ }
+
+ public void analyseCode(
+ ClassScope classScope,
+ InitializationFlowContext initializationContext,
+ FlowInfo flowInfo) {
+
+ // starting of the code analysis for methods
+ if (ignoreFurtherInvestigation)
+ return;
+ try {
+ if (binding == null)
+ return;
+
+ if (this.binding.isPrivate() && !this.binding.isPrivateUsed()) {
+ if (!classScope.referenceCompilationUnit().compilationResult.hasSyntaxError()) {
+ scope.problemReporter().unusedPrivateMethod(this);
+ }
+ }
+
+ // may be in a non necessary <clinit> for innerclass with static final constant fields
+ if (binding.isAbstract() || binding.isNative())
+ return;
+
+ ExceptionHandlingFlowContext methodContext =
+ new ExceptionHandlingFlowContext(
+ initializationContext,
+ this,
+ binding.thrownExceptions,
+ scope,
+ FlowInfo.DEAD_END);
+
+ // propagate to statements
+ if (statements != null) {
+ boolean didAlreadyComplain = false;
+ for (int i = 0, count = statements.length; i < count; i++) {
+ Statement stat = statements[i];
+ if (!stat.complainIfUnreachable(flowInfo, scope, didAlreadyComplain)) {
+ flowInfo = stat.analyseCode(scope, methodContext, flowInfo);
+ } else {
+ didAlreadyComplain = true;
+ }
+ }
+ }
+ // check for missing returning path
+ TypeBinding returnTypeBinding = binding.returnType;
+ if ((returnTypeBinding == VoidBinding) || isAbstract()) {
+ this.needFreeReturn = flowInfo.isReachable();
+ } else {
+ if (flowInfo != FlowInfo.DEAD_END) {
+ scope.problemReporter().shouldReturn(returnTypeBinding, this);
+ }
+ }
+ // check unreachable catch blocks
+ methodContext.complainIfUnusedExceptionHandlers(this);
+ } catch (AbortMethod e) {
+ this.ignoreFurtherInvestigation = true;
+ }
+ }
+
+ public boolean isMethod() {
+
+ return true;
+ }
+
+ public void parseStatements(Parser parser, CompilationUnitDeclaration unit) {
+
+ //fill up the method body with statement
+ if (ignoreFurtherInvestigation)
+ return;
+ parser.parse(this, unit);
+ }
+
+ public StringBuffer printReturnType(int indent, StringBuffer output) {
+
+ if (returnType == null) return output;
+ return returnType.printExpression(0, output).append(' ');
+ }
+
+ public void resolveStatements() {
+
+ // ========= abort on fatal error =============
+ if (this.returnType != null && this.binding != null) {
+ this.returnType.resolvedType = this.binding.returnType;
+ // record the return type binding
+ }
+ // check if method with constructor name
+ if (CharOperation.equals(scope.enclosingSourceType().sourceName, selector)) {
+ scope.problemReporter().methodWithConstructorName(this);
+ }
+
+ // by grammatical construction, interface methods are always abstract
+ if (!scope.enclosingSourceType().isInterface()){
+
+ // if a method has an semicolon body and is not declared as abstract==>error
+ // native methods may have a semicolon body
+ if ((modifiers & AccSemicolonBody) != 0) {
+ if ((modifiers & AccNative) == 0)
+ if ((modifiers & AccAbstract) == 0)
+ scope.problemReporter().methodNeedBody(this);
+ } else {
+ // the method HAS a body --> abstract native modifiers are forbiden
+ if (((modifiers & AccNative) != 0) || ((modifiers & AccAbstract) != 0))
+ scope.problemReporter().methodNeedingNoBody(this);
+ }
+ }
+ super.resolveStatements();
+ }
+
+ public void traverse(
+ ASTVisitor visitor,
+ ClassScope classScope) {
+
+ if (visitor.visit(this, classScope)) {
+ if (this.annotations != null) {
+ int annotationsLength = this.annotations.length;
+ for (int i = 0; i < annotationsLength; i++)
+ this.annotations[i].traverse(visitor, scope);
+ }
+ if (this.typeParameters != null) {
+ int typeParametersLength = this.typeParameters.length;
+ for (int i = 0; i < typeParametersLength; i++) {
+ this.typeParameters[i].traverse(visitor, scope);
+ }
+ }
+ if (returnType != null)
+ returnType.traverse(visitor, scope);
+ if (arguments != null) {
+ int argumentLength = arguments.length;
+ for (int i = 0; i < argumentLength; i++)
+ arguments[i].traverse(visitor, scope);
+ }
+ if (thrownExceptions != null) {
+ int thrownExceptionsLength = thrownExceptions.length;
+ for (int i = 0; i < thrownExceptionsLength; i++)
+ thrownExceptions[i].traverse(visitor, scope);
+ }
+ if (statements != null) {
+ int statementsLength = statements.length;
+ for (int i = 0; i < statementsLength; i++)
+ statements[i].traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, classScope);
+ }
+ public TypeParameter[] typeParameters() {
+ return this.typeParameters;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/NameReference.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/NameReference.js
new file mode 100644
index 0000000..68774eb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/NameReference.js
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public abstract class NameReference extends Reference implements InvocationSite, BindingIds {
+
+ public Binding binding, codegenBinding; //may be aTypeBinding-aFieldBinding-aLocalVariableBinding
+
+ public TypeBinding receiverType; // raw receiver type
+ public TypeBinding actualReceiverType; // modified receiver type - actual one according to namelookup
+
+ //the error printing
+ //some name reference are build as name reference but
+ //only used as type reference. When it happens, instead of
+ //creating a new objet (aTypeReference) we just flag a boolean
+ //This concesion is valuable while their are cases when the NameReference
+ //will be a TypeReference (static message sends.....) and there is
+ //no changeClass in java.
+public NameReference() {
+ super();
+ bits |= TYPE | VARIABLE; // restrictiveFlag
+
+}
+public FieldBinding fieldBinding() {
+ //this method should be sent ONLY after a check against isFieldReference()
+ //check its use doing senders.........
+
+ return (FieldBinding) binding ;
+}
+public boolean isSuperAccess() {
+ return false;
+}
+public boolean isTypeAccess() {
+ // null is acceptable when we are resolving the first part of a reference
+ return binding == null || binding instanceof ReferenceBinding;
+}
+public boolean isTypeReference() {
+ return binding instanceof ReferenceBinding;
+}
+public void setActualReceiverType(ReferenceBinding receiverType) {
+ this.actualReceiverType = receiverType;
+}
+public void setDepth(int depth) {
+ bits &= ~DepthMASK; // flush previous depth if any
+ if (depth > 0) {
+ bits |= (depth & 0xFF) << DepthSHIFT; // encoded on 8 bits
+ }
+}
+public void setFieldIndex(int index){
+ // ignored
+}
+
+public abstract String unboundReferenceErrorName();
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/NormalAnnotation.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/NormalAnnotation.js
new file mode 100644
index 0000000..f669527
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/NormalAnnotation.js
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.CompilationUnitScope;
+
+/**
+ * Normal annotation node
+ */
+public class NormalAnnotation extends Annotation {
+
+ public MemberValuePair[] memberValuePairs;
+
+ public NormalAnnotation(char[][] tokens, long[] sourcePositions, int sourceStart) {
+ this.tokens = tokens;
+ this.sourcePositions = sourcePositions;
+ this.sourceStart = sourceStart;
+ this.sourceEnd = (int) sourcePositions[sourcePositions.length - 1];
+ }
+
+ public NormalAnnotation(char[] token, long sourcePosition, int sourceStart) {
+ this.tokens = new char[][] { token };
+ this.sourcePositions = new long[] { sourcePosition };
+ this.sourceStart = sourceStart;
+ this.sourceEnd = (int) sourcePosition;
+ }
+
+ public StringBuffer printExpression(int indent, StringBuffer output) {
+ super.printExpression(indent, output);
+ output.append('(');
+ if (this.memberValuePairs != null) {
+ for (int i = 0, max = this.memberValuePairs.length; i < max; i++) {
+ if (i > 0) {
+ output.append(',');
+ }
+ this.memberValuePairs[i].print(indent, output);
+ }
+ }
+ output.append(')');
+ return output;
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+ if (visitor.visit(this, scope)) {
+ if (this.memberValuePairs != null) {
+ int memberValuePairsLength = this.memberValuePairs.length;
+ for (int i = 0; i < memberValuePairsLength; i++)
+ this.memberValuePairs[i].traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, scope);
+ }
+ public void traverse(ASTVisitor visitor, ClassScope scope) {
+ if (visitor.visit(this, scope)) {
+ if (this.memberValuePairs != null) {
+ int memberValuePairsLength = this.memberValuePairs.length;
+ for (int i = 0; i < memberValuePairsLength; i++)
+ this.memberValuePairs[i].traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, scope);
+ }
+ public void traverse(ASTVisitor visitor, CompilationUnitScope scope) {
+ if (visitor.visit(this, scope)) {
+ if (this.memberValuePairs != null) {
+ int memberValuePairsLength = this.memberValuePairs.length;
+ for (int i = 0; i < memberValuePairsLength; i++)
+ this.memberValuePairs[i].traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/NullLiteral.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/NullLiteral.js
new file mode 100644
index 0000000..ce4d0ba
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/NullLiteral.js
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class NullLiteral extends MagicLiteral {
+
+ static final char[] source = {'n' , 'u' , 'l' , 'l'};
+
+ public NullLiteral(int s , int e) {
+
+ super(s,e);
+ }
+
+ public void computeConstant() {
+
+ constant = NotAConstant;
+ }
+
+ /**
+ * Code generation for the null literal
+ *
+ * @param currentScope org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ * @param valueRequired boolean
+ */
+ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
+ int pc = codeStream.position;
+ if (valueRequired)
+ codeStream.aconst_null();
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+ public TypeBinding literalType(BlockScope scope) {
+ return NullBinding;
+ }
+
+ /**
+ *
+ */
+ public char[] source() {
+ return source;
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+ visitor.visit(this, scope);
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/NumberLiteral.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/NumberLiteral.js
new file mode 100644
index 0000000..e6e8238
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/NumberLiteral.js
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+public abstract class NumberLiteral extends Literal {
+
+ char[] source;
+
+ public NumberLiteral(char[] token, int s, int e) {
+
+ this(s,e) ;
+ source = token ;
+ }
+
+ public NumberLiteral(int s, int e) {
+ super (s,e) ;
+ }
+
+ public boolean isValidJavaStatement(){
+
+ return false ;
+ }
+
+ public char[] source(){
+
+ return source;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/OR_OR_Expression.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/OR_OR_Expression.js
new file mode 100644
index 0000000..51118e4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/OR_OR_Expression.js
@@ -0,0 +1,272 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+//dedicated treatment for the ||
+public class OR_OR_Expression extends BinaryExpression {
+
+ int rightInitStateIndex = -1;
+ int mergedInitStateIndex = -1;
+
+ public OR_OR_Expression(Expression left, Expression right, int operator) {
+ super(left, right, operator);
+ }
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ Constant cst = this.left.optimizedBooleanConstant();
+ boolean isLeftOptimizedTrue = cst != NotAConstant && cst.booleanValue() == true;
+ boolean isLeftOptimizedFalse = cst != NotAConstant && cst.booleanValue() == false;
+
+ if (isLeftOptimizedFalse) {
+ // FALSE || anything
+ // need to be careful of scenario:
+ // (x || y) || !z, if passing the left info to the right, it would be swapped by the !
+ FlowInfo mergedInfo = left.analyseCode(currentScope, flowContext, flowInfo).unconditionalInits();
+ mergedInfo = right.analyseCode(currentScope, flowContext, mergedInfo);
+ mergedInitStateIndex =
+ currentScope.methodScope().recordInitializationStates(mergedInfo);
+ return mergedInfo;
+ }
+
+ FlowInfo leftInfo = left.analyseCode(currentScope, flowContext, flowInfo);
+
+ // need to be careful of scenario:
+ // (x || y) || !z, if passing the left info to the right, it would be swapped by the !
+ FlowInfo rightInfo = leftInfo.initsWhenFalse().unconditionalInits().copy();
+ rightInitStateIndex =
+ currentScope.methodScope().recordInitializationStates(rightInfo);
+
+ int previousMode = rightInfo.reachMode();
+ if (isLeftOptimizedTrue){
+ rightInfo.setReachMode(FlowInfo.UNREACHABLE);
+ }
+ rightInfo = right.analyseCode(currentScope, flowContext, rightInfo);
+ FlowInfo falseMergedInfo = rightInfo.initsWhenFalse().copy();
+ rightInfo.setReachMode(previousMode); // reset after falseMergedInfo got extracted
+
+ FlowInfo mergedInfo = FlowInfo.conditional(
+ // merging two true initInfos for such a negative case: if ((t && (b = t)) || f) r = b; // b may not have been initialized
+ leftInfo.initsWhenTrue().copy().unconditionalInits().mergedWith(
+ rightInfo.initsWhenTrue().copy().unconditionalInits()),
+ falseMergedInfo);
+ mergedInitStateIndex =
+ currentScope.methodScope().recordInitializationStates(mergedInfo);
+ return mergedInfo;
+ }
+
+ /**
+ * Code generation for a binary operation
+ */
+ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
+
+ int pc = codeStream.position;
+ if (constant != Constant.NotAConstant) {
+ // inlined value
+ if (valueRequired)
+ codeStream.generateConstant(constant, implicitConversion);
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ return;
+ }
+ Constant cst = right.constant;
+ if (cst != NotAConstant) {
+ // <expr> || true --> true
+ if (cst.booleanValue() == true) {
+ this.left.generateCode(currentScope, codeStream, false);
+ if (valueRequired) codeStream.iconst_1();
+ } else {
+ // <expr>|| false --> <expr>
+ this.left.generateCode(currentScope, codeStream, valueRequired);
+ }
+ if (mergedInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(currentScope, mergedInitStateIndex);
+ }
+ codeStream.generateImplicitConversion(implicitConversion);
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ return;
+ }
+
+ Label trueLabel = new Label(codeStream), endLabel;
+ cst = left.optimizedBooleanConstant();
+ boolean leftIsConst = cst != NotAConstant;
+ boolean leftIsTrue = leftIsConst && cst.booleanValue() == true;
+
+ cst = right.optimizedBooleanConstant();
+ boolean rightIsConst = cst != NotAConstant;
+ boolean rightIsTrue = rightIsConst && cst.booleanValue() == true;
+
+ generateOperands : {
+ if (leftIsConst) {
+ left.generateCode(currentScope, codeStream, false);
+ if (leftIsTrue) {
+ break generateOperands; // no need to generate right operand
+ }
+ } else {
+ left.generateOptimizedBoolean(currentScope, codeStream, trueLabel, null, true);
+ // need value, e.g. if (a == 1 || ((b = 2) > 0)) {} -> shouldn't initialize 'b' if a==1
+ }
+ if (rightInitStateIndex != -1) {
+ codeStream.addDefinitelyAssignedVariables(currentScope, rightInitStateIndex);
+ }
+ if (rightIsConst) {
+ right.generateCode(currentScope, codeStream, false);
+ } else {
+ right.generateOptimizedBoolean(currentScope, codeStream, trueLabel, null, valueRequired);
+ }
+ }
+ if (mergedInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(currentScope, mergedInitStateIndex);
+ }
+ /*
+ * improving code gen for such a case: boolean b = i < 0 || true since
+ * the label has never been used, we have the inlined value on the
+ * stack.
+ */
+ if (valueRequired) {
+ if (leftIsConst && leftIsTrue) {
+ codeStream.iconst_1();
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ } else {
+ if (rightIsConst && rightIsTrue) {
+ codeStream.iconst_1();
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ } else {
+ codeStream.iconst_0();
+ }
+ if (trueLabel.hasForwardReferences()) {
+ if ((bits & ValueForReturnMASK) != 0) {
+ codeStream.ireturn();
+ trueLabel.place();
+ codeStream.iconst_1();
+ } else {
+ codeStream.goto_(endLabel = new Label(codeStream));
+ codeStream.decrStackSize(1);
+ trueLabel.place();
+ codeStream.iconst_1();
+ endLabel.place();
+ }
+ } else {
+ trueLabel.place();
+ }
+ }
+ codeStream.generateImplicitConversion(implicitConversion);
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ } else {
+ trueLabel.place();
+ }
+ }
+
+ /**
+ * Boolean operator code generation Optimized operations are: ||
+ */
+ public void generateOptimizedBoolean(BlockScope currentScope, CodeStream codeStream, Label trueLabel, Label falseLabel, boolean valueRequired) {
+
+ if (constant != Constant.NotAConstant) {
+ super.generateOptimizedBoolean(currentScope, codeStream, trueLabel, falseLabel, valueRequired);
+ return;
+ }
+
+ // <expr> || false --> <expr>
+ Constant cst = right.constant;
+ if (cst != NotAConstant && cst.booleanValue() == false) {
+ int pc = codeStream.position;
+ this.left.generateOptimizedBoolean(currentScope, codeStream, trueLabel, falseLabel, valueRequired);
+ if (mergedInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(currentScope, mergedInitStateIndex);
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ return;
+ }
+
+ cst = left.optimizedBooleanConstant();
+ boolean leftIsConst = cst != NotAConstant;
+ boolean leftIsTrue = leftIsConst && cst.booleanValue() == true;
+
+ cst = right.optimizedBooleanConstant();
+ boolean rightIsConst = cst != NotAConstant;
+ boolean rightIsTrue = rightIsConst && cst.booleanValue() == true;
+
+ // default case
+ generateOperands : {
+ if (falseLabel == null) {
+ if (trueLabel != null) {
+ // implicit falling through the FALSE case
+ left.generateOptimizedBoolean(currentScope, codeStream, trueLabel, null, !leftIsConst);
+ // need value, e.g. if (a == 1 || ((b = 2) > 0)) {} -> shouldn't initialize 'b' if a==1
+ if (leftIsConst && leftIsTrue) {
+ codeStream.goto_(trueLabel);
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ break generateOperands; // no need to generate right operand
+ }
+ if (rightInitStateIndex != -1) {
+ codeStream
+ .addDefinitelyAssignedVariables(currentScope, rightInitStateIndex);
+ }
+ right.generateOptimizedBoolean(currentScope, codeStream, trueLabel, null, valueRequired && !rightIsConst);
+ if (valueRequired && rightIsConst && rightIsTrue) {
+ codeStream.goto_(trueLabel);
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ }
+ }
+ } else {
+ // implicit falling through the TRUE case
+ if (trueLabel == null) {
+ Label internalTrueLabel = new Label(codeStream);
+ left.generateOptimizedBoolean(currentScope, codeStream, internalTrueLabel, null, !leftIsConst);
+ // need value, e.g. if (a == 1 || ((b = 2) > 0)) {} -> shouldn't initialize 'b' if a==1
+ if (leftIsConst && leftIsTrue) {
+ internalTrueLabel.place();
+ break generateOperands; // no need to generate right operand
+ }
+ if (rightInitStateIndex != -1) {
+ codeStream
+ .addDefinitelyAssignedVariables(currentScope, rightInitStateIndex);
+ }
+ right.generateOptimizedBoolean(currentScope, codeStream, null, falseLabel, valueRequired && !rightIsConst);
+ if (valueRequired && rightIsConst) {
+ if (!rightIsTrue) {
+ codeStream.goto_(falseLabel);
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ }
+ }
+ internalTrueLabel.place();
+ } else {
+ // no implicit fall through TRUE/FALSE --> should never occur
+ }
+ }
+ }
+ if (mergedInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(currentScope, mergedInitStateIndex);
+ }
+ }
+
+ public boolean isCompactableOperation() {
+ return false;
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+ if (visitor.visit(this, scope)) {
+ left.traverse(visitor, scope);
+ right.traverse(visitor, scope);
+ }
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/OperatorExpression.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/OperatorExpression.js
new file mode 100644
index 0000000..46e2194
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/OperatorExpression.js
@@ -0,0 +1,1564 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+public abstract class OperatorExpression extends Expression implements OperatorIds {
+
+ public static int[][] OperatorSignatures = new int[NumberOfTables][];
+
+ static {classInitialize();}
+
+ /**
+ * OperatorExpression constructor comment.
+ */
+ public OperatorExpression() {
+ super();
+ }
+ public static final void classInitialize() {
+ OperatorSignatures[AND] = get_AND();
+ OperatorSignatures[AND_AND] = get_AND_AND();
+ OperatorSignatures[DIVIDE] = get_DIVIDE();
+ OperatorSignatures[EQUAL_EQUAL] = get_EQUAL_EQUAL();
+ OperatorSignatures[GREATER] = get_GREATER();
+ OperatorSignatures[GREATER_EQUAL] = get_GREATER_EQUAL();
+ OperatorSignatures[LEFT_SHIFT] = get_LEFT_SHIFT();
+ OperatorSignatures[LESS] = get_LESS();
+ OperatorSignatures[LESS_EQUAL] = get_LESS_EQUAL();
+ OperatorSignatures[MINUS] = get_MINUS();
+ OperatorSignatures[MULTIPLY] = get_MULTIPLY();
+ OperatorSignatures[OR] = get_OR();
+ OperatorSignatures[OR_OR] = get_OR_OR();
+ OperatorSignatures[PLUS] = get_PLUS();
+ OperatorSignatures[REMAINDER] = get_REMAINDER();
+ OperatorSignatures[RIGHT_SHIFT] = get_RIGHT_SHIFT();
+ OperatorSignatures[UNSIGNED_RIGHT_SHIFT] = get_UNSIGNED_RIGHT_SHIFT();
+ OperatorSignatures[XOR] = get_XOR();
+ }
+
+ public static final String generateTableTestCase(){
+ //return a String which is a java method allowing to test
+ //the non zero entries of all tables
+
+ /*
+ org.eclipse.wst.jsdt.internal.compiler.ast.
+ OperatorExpression.generateTableTestCase();
+ */
+
+ int[] operators = new int[]{AND,AND_AND,DIVIDE,GREATER,GREATER_EQUAL,
+ LEFT_SHIFT,LESS,LESS_EQUAL,MINUS,MULTIPLY,OR,OR_OR,PLUS,REMAINDER,
+ RIGHT_SHIFT,UNSIGNED_RIGHT_SHIFT,XOR};
+
+ class Decode {
+ public final String constant(int code){
+ switch(code){
+ case T_boolean : return "true"; //$NON-NLS-1$
+ case T_byte : return "((byte) 3)"; //$NON-NLS-1$
+ case T_char : return "'A'"; //$NON-NLS-1$
+ case T_double : return "300.0d"; //$NON-NLS-1$
+ case T_float : return "100.0f"; //$NON-NLS-1$
+ case T_int : return "1"; //$NON-NLS-1$
+ case T_long : return "7L"; //$NON-NLS-1$
+ case T_String : return "\"hello-world\""; //$NON-NLS-1$
+ case T_null : return "null"; //$NON-NLS-1$
+ case T_short : return "((short) 5)"; //$NON-NLS-1$
+ case T_Object : return "null";} //$NON-NLS-1$
+ return "";} //$NON-NLS-1$
+
+ public final String type(int code){
+ switch(code){
+ case T_boolean : return "z"; //$NON-NLS-1$
+ case T_byte : return "b"; //$NON-NLS-1$
+ case T_char : return "c"; //$NON-NLS-1$
+ case T_double : return "d"; //$NON-NLS-1$
+ case T_float : return "f"; //$NON-NLS-1$
+ case T_int : return "i"; //$NON-NLS-1$
+ case T_long : return "l"; //$NON-NLS-1$
+ case T_String : return "str"; //$NON-NLS-1$
+ case T_null : return "null"; //$NON-NLS-1$
+ case T_short : return "s"; //$NON-NLS-1$
+ case T_Object : return "obj";} //$NON-NLS-1$
+ return "xxx";} //$NON-NLS-1$
+
+ public final String operator(int operator){
+ switch (operator) {
+ case EQUAL_EQUAL : return "=="; //$NON-NLS-1$
+ case LESS_EQUAL : return "<="; //$NON-NLS-1$
+ case GREATER_EQUAL :return ">="; //$NON-NLS-1$
+ case LEFT_SHIFT : return "<<"; //$NON-NLS-1$
+ case RIGHT_SHIFT : return ">>"; //$NON-NLS-1$
+ case UNSIGNED_RIGHT_SHIFT : return ">>>"; //$NON-NLS-1$
+ case OR_OR :return "||"; //$NON-NLS-1$
+ case AND_AND : return "&&"; //$NON-NLS-1$
+ case PLUS : return "+"; //$NON-NLS-1$
+ case MINUS : return "-"; //$NON-NLS-1$
+ case NOT : return "!"; //$NON-NLS-1$
+ case REMAINDER : return "%"; //$NON-NLS-1$
+ case XOR : return "^"; //$NON-NLS-1$
+ case AND : return "&"; //$NON-NLS-1$
+ case MULTIPLY : return "*"; //$NON-NLS-1$
+ case OR : return "|"; //$NON-NLS-1$
+ case TWIDDLE : return "~"; //$NON-NLS-1$
+ case DIVIDE : return "/"; //$NON-NLS-1$
+ case GREATER : return ">"; //$NON-NLS-1$
+ case LESS : return "<"; } //$NON-NLS-1$
+ return "????";} //$NON-NLS-1$
+ }
+
+
+ Decode decode = new Decode();
+ String s;
+
+ s = "\tpublic static void binaryOperationTablesTestCase(){\n" + //$NON-NLS-1$
+
+ "\t\t//TC test : all binary operation (described in tables)\n"+ //$NON-NLS-1$
+ "\t\t//method automatically generated by\n"+ //$NON-NLS-1$
+ "\t\t//org.eclipse.wst.jsdt.internal.compiler.ast.OperatorExpression.generateTableTestCase();\n"+ //$NON-NLS-1$
+
+ "\t\tString str0;\t String str\t= "+decode.constant(T_String)+";\n"+ //$NON-NLS-1$ //$NON-NLS-2$
+ "\t\tint i0;\t int i\t= "+decode.constant(T_int)+";\n"+ //$NON-NLS-1$ //$NON-NLS-2$
+ "\t\tboolean z0;\t boolean z\t= "+decode.constant(T_boolean)+";\n"+ //$NON-NLS-1$ //$NON-NLS-2$
+ "\t\tchar c0; \t char c\t= "+decode.constant(T_char)+";\n"+ //$NON-NLS-1$ //$NON-NLS-2$
+ "\t\tfloat f0; \t float f\t= "+decode.constant(T_float)+";\n"+ //$NON-NLS-1$ //$NON-NLS-2$
+ "\t\tdouble d0;\t double d\t= "+decode.constant(T_double)+";\n"+ //$NON-NLS-1$ //$NON-NLS-2$
+ "\t\tbyte b0; \t byte b\t= "+decode.constant(T_byte)+";\n"+ //$NON-NLS-1$ //$NON-NLS-2$
+ "\t\tshort s0; \t short s\t= "+decode.constant(T_short)+";\n"+ //$NON-NLS-1$ //$NON-NLS-2$
+ "\t\tlong l0; \t long l\t= "+decode.constant(T_long)+";\n"+ //$NON-NLS-1$ //$NON-NLS-2$
+ "\t\tObject obj0; \t Object obj\t= "+decode.constant(T_Object)+";\n"+ //$NON-NLS-1$ //$NON-NLS-2$
+ "\n"; //$NON-NLS-1$
+
+ int error = 0;
+ for (int i=0; i < operators.length; i++)
+ { int operator = operators[i];
+ for (int left=0; left<16;left++)
+ for (int right=0; right<16;right++)
+ { int result = (OperatorSignatures[operator][(left<<4)+right]) & 0x0000F;
+ if (result != T_undefined)
+
+ //1/ First regular computation then 2/ comparaison
+ //with a compile time constant (generated by the compiler)
+ // z0 = s >= s;
+ // if ( z0 != (((short) 5) >= ((short) 5)))
+ // System.out.println(155);
+
+ { s += "\t\t"+decode.type(result)+"0"+" = "+decode.type(left); //$NON-NLS-1$ //$NON-NLS-3$ //$NON-NLS-2$
+ s += " "+decode.operator(operator)+" "+decode.type(right)+";\n"; //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-3$
+ String begin = result == T_String ? "\t\tif (! " : "\t\tif ( "; //$NON-NLS-2$ //$NON-NLS-1$
+ String test = result == T_String ? ".equals(" : " != ("; //$NON-NLS-2$ //$NON-NLS-1$
+ s += begin +decode.type(result)+"0"+test //$NON-NLS-1$
+ +decode.constant(left)+" " //$NON-NLS-1$
+ +decode.operator(operator)+" " //$NON-NLS-1$
+ +decode.constant(right)+"))\n"; //$NON-NLS-1$
+ s += "\t\t\tSystem.out.println("+ (++error) +");\n"; //$NON-NLS-1$ //$NON-NLS-2$
+
+ }
+ }
+ }
+
+ return s += "\n\t\tSystem.out.println(\"binary tables test : done\");}"; //$NON-NLS-1$
+ }
+
+ public static final int[] get_AND(){
+
+ //the code is an int, only 20 bits are used, see below.
+ // (cast) left Op (cast) rigth --> result
+ // 0000 0000 0000 0000 0000
+ // <<16 <<12 <<8 <<4
+
+ int[] table = new int[16*16];
+
+ // table[(T_undefined<<4)+T_undefined] = T_undefined;
+ // table[(T_undefined<<4)+T_byte] = T_undefined;
+ // table[(T_undefined<<4)+T_long] = T_undefined;
+ // table[(T_undefined<<4)+T_short] = T_undefined;
+ // table[(T_undefined<<4)+T_void] = T_undefined;
+ // table[(T_undefined<<4)+T_String] = T_undefined;
+ // table[(T_undefined<<4)+T_Object] = T_undefined;
+ // table[(T_undefined<<4)+T_double] = T_undefined;
+ // table[(T_undefined<<4)+T_float] = T_undefined;
+ // table[(T_undefined<<4)+T_boolean] = T_undefined;
+ // table[(T_undefined<<4)+T_char] = T_undefined;
+ // table[(T_undefined<<4)+T_int] = T_undefined;
+ // table[(T_undefined<<4)+T_null] = T_undefined;
+
+ // table[(T_byte<<4)+T_undefined] = T_undefined;
+ table[(T_byte<<4)+T_byte] = (Byte2Int<<12) +(Byte2Int<<4) +T_int;
+ table[(T_byte<<4)+T_long] = (Byte2Long<<12)+(Long2Long<<4)+T_long;
+ table[(T_byte<<4)+T_short] = (Byte2Int<<12) +(Short2Int<<4)+T_int;
+ // table[(T_byte<<4)+T_void] = T_undefined;
+ // table[(T_byte<<4)+T_String] = T_undefined;
+ // table[(T_byte<<4)+T_Object] = T_undefined;
+ // table[(T_byte<<4)+T_double] = T_undefined;
+ // table[(T_byte<<4)+T_float] = T_undefined;
+ // table[(T_byte<<4)+T_boolean] = T_undefined;
+ table[(T_byte<<4)+T_char] = (Byte2Int<<12) +(Char2Int<<4) +T_int;
+ table[(T_byte<<4)+T_int] = (Byte2Int<<12) +(Int2Int<<4) +T_int;
+ // table[(T_byte<<4)+T_null] = T_undefined;
+
+ // table[(T_long<<4)+T_undefined] = T_undefined;
+ table[(T_long<<4)+T_byte] = (Long2Long<<12)+(Byte2Long<<4)+T_long;
+ table[(T_long<<4)+T_long] = (Long2Long<<12)+(Long2Long<<4)+T_long;
+ table[(T_long<<4)+T_short] = (Long2Long<<12)+(Short2Long<<4)+T_long;
+ // table[(T_long<<4)+T_void] = T_undefined;
+ // table[(T_long<<4)+T_String] = T_undefined;
+ // table[(T_long<<4)+T_Object] = T_undefined;
+ // table[(T_long<<4)+T_double] = T_undefined;
+ // table[(T_long<<4)+T_float] = T_undefined;
+ // table[(T_long<<4)+T_boolean] = T_undefined;
+ table[(T_long<<4)+T_char] = (Long2Long<<12)+(Char2Long<<4)+T_long;
+ table[(T_long<<4)+T_int] = (Long2Long<<12)+(Int2Long<<4)+T_long;
+ // table[(T_long<<4)+T_null] = T_undefined;
+
+ // table[(T_short<<4)+T_undefined] = T_undefined;
+ table[(T_short<<4)+T_byte] = (Short2Int<<12)+(Byte2Int<<4)+T_int;
+ table[(T_short<<4)+T_long] = (Short2Long<<12)+(Long2Long<<4)+T_long;
+ table[(T_short<<4)+T_short] = (Short2Int<<12)+(Short2Int<<4)+T_int;
+ // table[(T_short<<4)+T_void] = T_undefined;
+ // table[(T_short<<4)+T_String] = T_undefined;
+ // table[(T_short<<4)+T_Object] = T_undefined;
+ // table[(T_short<<4)+T_double] = T_undefined;
+ // table[(T_short<<4)+T_float] = T_undefined;
+ // table[(T_short<<4)+T_boolean] = T_undefined;
+ table[(T_short<<4)+T_char] = (Short2Int<<12)+(Char2Int<<4)+T_int;
+ table[(T_short<<4)+T_int] = (Short2Int<<12)+(Int2Int<<4)+T_int;
+ // table[(T_short<<4)+T_null] = T_undefined;
+
+ // table[(T_void<<4)+T_undefined] = T_undefined;
+ // table[(T_void<<4)+T_byte] = T_undefined;
+ // table[(T_void<<4)+T_long] = T_undefined;
+ // table[(T_void<<4)+T_short] = T_undefined;
+ // table[(T_void<<4)+T_void] = T_undefined;
+ // table[(T_void<<4)+T_String] = T_undefined;
+ // table[(T_void<<4)+T_Object] = T_undefined;
+ // table[(T_void<<4)+T_double] = T_undefined;
+ // table[(T_void<<4)+T_float] = T_undefined;
+ // table[(T_void<<4)+T_boolean] = T_undefined;
+ // table[(T_void<<4)+T_char] = T_undefined;
+ // table[(T_void<<4)+T_int] = T_undefined;
+ // table[(T_void<<4)+T_null] = T_undefined;
+
+ // table[(T_String<<4)+T_undefined] = T_undefined;
+ // table[(T_String<<4)+T_byte] = T_undefined;
+ // table[(T_String<<4)+T_long] = T_undefined;
+ // table[(T_String<<4)+T_short] = T_undefined;
+ // table[(T_String<<4)+T_void] = T_undefined;
+ // table[(T_String<<4)+T_String] = T_undefined;
+ // table[(T_String<<4)+T_Object] = T_undefined;
+ // table[(T_String<<4)+T_double] = T_undefined;
+ // table[(T_String<<4)+T_float] = T_undefined;
+ // table[(T_String<<4)+T_boolean] = T_undefined;
+ // table[(T_String<<4)+T_char] = T_undefined;
+ // table[(T_String<<4)+T_int] = T_undefined;
+ // table[(T_String<<4)+T_null] = T_undefined;
+
+ // table[(T_Object<<4)+T_undefined] = T_undefined;
+ // table[(T_Object<<4)+T_byte] = T_undefined;
+ // table[(T_Object<<4)+T_long] = T_undefined;
+ // table[(T_Object<<4)+T_short] = T_undefined;
+ // table[(T_Object<<4)+T_void] = T_undefined;
+ // table[(T_Object<<4)+T_String] = T_undefined;
+ // table[(T_Object<<4)+T_Object] = T_undefined;
+ // table[(T_Object<<4)+T_double] = T_undefined;
+ // table[(T_Object<<4)+T_float] = T_undefined;
+ // table[(T_Object<<4)+T_boolean] = T_undefined;
+ // table[(T_Object<<4)+T_char] = T_undefined;
+ // table[(T_Object<<4)+T_int] = T_undefined;
+ // table[(T_Object<<4)+T_null] = T_undefined;
+
+ // table[(T_double<<4)+T_undefined] = T_undefined;
+ // table[(T_double<<4)+T_byte] = T_undefined;
+ // table[(T_double<<4)+T_long] = T_undefined;
+ // table[(T_double<<4)+T_short] = T_undefined;
+ // table[(T_double<<4)+T_void] = T_undefined;
+ // table[(T_double<<4)+T_String] = T_undefined;
+ // table[(T_double<<4)+T_Object] = T_undefined;
+ // table[(T_double<<4)+T_double] = T_undefined;
+ // table[(T_double<<4)+T_float] = T_undefined;
+ // table[(T_double<<4)+T_boolean] = T_undefined;
+ // table[(T_double<<4)+T_char] = T_undefined;
+ // table[(T_double<<4)+T_int] = T_undefined;
+ // table[(T_double<<4)+T_null] = T_undefined;
+
+ // table[(T_float<<4)+T_undefined] = T_undefined;
+ // table[(T_float<<4)+T_byte] = T_undefined;
+ // table[(T_float<<4)+T_long] = T_undefined;
+ // table[(T_float<<4)+T_short] = T_undefined;
+ // table[(T_float<<4)+T_void] = T_undefined;
+ // table[(T_float<<4)+T_String] = T_undefined;
+ // table[(T_float<<4)+T_Object] = T_undefined;
+ // table[(T_float<<4)+T_double] = T_undefined;
+ // table[(T_float<<4)+T_float] = T_undefined;
+ // table[(T_float<<4)+T_boolean] = T_undefined;
+ // table[(T_float<<4)+T_char] = T_undefined;
+ // table[(T_float<<4)+T_int] = T_undefined;
+ // table[(T_float<<4)+T_null] = T_undefined;
+
+ // table[(T_boolean<<4)+T_undefined] = T_undefined;
+ // table[(T_boolean<<4)+T_byte] = T_undefined;
+ // table[(T_boolean<<4)+T_long] = T_undefined;
+ // table[(T_boolean<<4)+T_short] = T_undefined;
+ // table[(T_boolean<<4)+T_void] = T_undefined;
+ // table[(T_boolean<<4)+T_String] = T_undefined;
+ // table[(T_boolean<<4)+T_Object] = T_undefined;
+ // table[(T_boolean<<4)+T_double] = T_undefined;
+ // table[(T_boolean<<4)+T_float] = T_undefined;
+ table[(T_boolean<<4)+T_boolean] = (Boolean2Boolean << 12)+(Boolean2Boolean << 4)+T_boolean;
+ // table[(T_boolean<<4)+T_char] = T_undefined;
+ // table[(T_boolean<<4)+T_int] = T_undefined;
+ // table[(T_boolean<<4)+T_null] = T_undefined;
+
+ // table[(T_char<<4)+T_undefined] = T_undefined;
+ table[(T_char<<4)+T_byte] = (Char2Int<<12)+(Byte2Int<<4)+T_int;
+ table[(T_char<<4)+T_long] = (Char2Long<<12)+(Long2Long<<4)+T_long;
+ table[(T_char<<4)+T_short] = (Char2Int<<12)+(Short2Int<<4)+T_int;
+ // table[(T_char<<4)+T_void] = T_undefined;
+ // table[(T_char<<4)+T_String] = T_undefined;
+ // table[(T_char<<4)+T_Object] = T_undefined;
+ // table[(T_char<<4)+T_double] = T_undefined;
+ // table[(T_char<<4)+T_float] = T_undefined;
+ // table[(T_char<<4)+T_boolean] = T_undefined;
+ table[(T_char<<4)+T_char] = (Char2Int<<12)+(Char2Int<<4)+T_int;
+ table[(T_char<<4)+T_int] = (Char2Int<<12)+(Int2Int<<4)+T_int;
+ // table[(T_char<<4)+T_null] = T_undefined;
+
+ // table[(T_int<<4)+T_undefined] = T_undefined;
+ table[(T_int<<4)+T_byte] = (Int2Int<<12)+(Byte2Int<<4)+T_int;
+ table[(T_int<<4)+T_long] = (Int2Long<<12)+(Long2Long<<4)+T_long;
+ table[(T_int<<4)+T_short] = (Int2Int<<12)+(Short2Int<<4)+T_int;
+ // table[(T_int<<4)+T_void] = T_undefined;
+ // table[(T_int<<4)+T_String] = T_undefined;
+ // table[(T_int<<4)+T_Object] = T_undefined;
+ // table[(T_int<<4)+T_double] = T_undefined;
+ // table[(T_int<<4)+T_float] = T_undefined;
+ // table[(T_int<<4)+T_boolean] = T_undefined;
+ table[(T_int<<4)+T_char] = (Int2Int<<12)+(Char2Int<<4)+T_int;
+ table[(T_int<<4)+T_int] = (Int2Int<<12)+(Int2Int<<4)+T_int;
+ // table[(T_int<<4)+T_null] = T_undefined;
+
+ // table[(T_null<<4)+T_undefined] = T_undefined;
+ // table[(T_null<<4)+T_byte] = T_undefined;
+ // table[(T_null<<4)+T_long] = T_undefined;
+ // table[(T_null<<4)+T_short] = T_undefined;
+ // table[(T_null<<4)+T_void] = T_undefined;
+ // table[(T_null<<4)+T_String] = T_undefined;
+ // table[(T_null<<4)+T_Object] = T_undefined;
+ // table[(T_null<<4)+T_double] = T_undefined;
+ // table[(T_null<<4)+T_float] = T_undefined;
+ // table[(T_null<<4)+T_boolean] = T_undefined;
+ // table[(T_null<<4)+T_char] = T_undefined;
+ // table[(T_null<<4)+T_int] = T_undefined;
+ // table[(T_null<<4)+T_null] = T_undefined;
+
+ return table;
+ }
+
+ public static final int[] get_AND_AND(){
+
+ //the code is an int
+ // (cast) left Op (cast) rigth --> result
+ // 0000 0000 0000 0000 0000
+ // <<16 <<12 <<8 <<4
+
+ int[] table = new int[16*16];
+
+ // table[(T_undefined<<4)+T_undefined] = T_undefined;
+ // table[(T_undefined<<4)+T_byte] = T_undefined;
+ // table[(T_undefined<<4)+T_long] = T_undefined;
+ // table[(T_undefined<<4)+T_short] = T_undefined;
+ // table[(T_undefined<<4)+T_void] = T_undefined;
+ // table[(T_undefined<<4)+T_String] = T_undefined;
+ // table[(T_undefined<<4)+T_Object] = T_undefined;
+ // table[(T_undefined<<4)+T_double] = T_undefined;
+ // table[(T_undefined<<4)+T_float] = T_undefined;
+ // table[(T_undefined<<4)+T_boolean] = T_undefined;
+ // table[(T_undefined<<4)+T_char] = T_undefined;
+ // table[(T_undefined<<4)+T_int] = T_undefined;
+ // table[(T_undefined<<4)+T_null] = T_undefined;
+
+ // table[(T_byte<<4)+T_undefined] = T_undefined;
+ // table[(T_byte<<4)+T_byte] = T_undefined;
+ // table[(T_byte<<4)+T_long] = T_undefined;
+ // table[(T_byte<<4)+T_short] = T_undefined;
+ // table[(T_byte<<4)+T_void] = T_undefined;
+ // table[(T_byte<<4)+T_String] = T_undefined;
+ // table[(T_byte<<4)+T_Object] = T_undefined;
+ // table[(T_byte<<4)+T_double] = T_undefined;
+ // table[(T_byte<<4)+T_float] = T_undefined;
+ // table[(T_byte<<4)+T_boolean] = T_undefined;
+ // table[(T_byte<<4)+T_char] = T_undefined;
+ // table[(T_byte<<4)+T_int] = T_undefined;
+ // table[(T_byte<<4)+T_null] = T_undefined;
+
+ // table[(T_long<<4)+T_undefined] = T_undefined;
+ // table[(T_long<<4)+T_byte] = T_undefined;
+ // table[(T_long<<4)+T_long] = T_undefined;
+ // table[(T_long<<4)+T_short] = T_undefined;
+ // table[(T_long<<4)+T_void] = T_undefined;
+ // table[(T_long<<4)+T_String] = T_undefined;
+ // table[(T_long<<4)+T_Object] = T_undefined;
+ // table[(T_long<<4)+T_double] = T_undefined;
+ // table[(T_long<<4)+T_float] = T_undefined;
+ // table[(T_long<<4)+T_boolean] = T_undefined;
+ // table[(T_long<<4)+T_char] = T_undefined;
+ // table[(T_long<<4)+T_int] = T_undefined;
+ // table[(T_long<<4)+T_null] = T_undefined;
+
+ // table[(T_short<<4)+T_undefined] = T_undefined;
+ // table[(T_short<<4)+T_byte] = T_undefined;
+ // table[(T_short<<4)+T_long] = T_undefined;
+ // table[(T_short<<4)+T_short] = T_undefined;
+ // table[(T_short<<4)+T_void] = T_undefined;
+ // table[(T_short<<4)+T_String] = T_undefined;
+ // table[(T_short<<4)+T_Object] = T_undefined;
+ // table[(T_short<<4)+T_double] = T_undefined;
+ // table[(T_short<<4)+T_float] = T_undefined;
+ // table[(T_short<<4)+T_boolean] = T_undefined;
+ // table[(T_short<<4)+T_char] = T_undefined;
+ // table[(T_short<<4)+T_int] = T_undefined;
+ // table[(T_short<<4)+T_null] = T_undefined;
+
+ // table[(T_void<<4)+T_undefined] = T_undefined;
+ // table[(T_void<<4)+T_byte] = T_undefined;
+ // table[(T_void<<4)+T_long] = T_undefined;
+ // table[(T_void<<4)+T_short] = T_undefined;
+ // table[(T_void<<4)+T_void] = T_undefined;
+ // table[(T_void<<4)+T_String] = T_undefined;
+ // table[(T_void<<4)+T_Object] = T_undefined;
+ // table[(T_void<<4)+T_double] = T_undefined;
+ // table[(T_void<<4)+T_float] = T_undefined;
+ // table[(T_void<<4)+T_boolean] = T_undefined;
+ // table[(T_void<<4)+T_char] = T_undefined;
+ // table[(T_void<<4)+T_int] = T_undefined;
+ // table[(T_void<<4)+T_null] = T_undefined;
+
+ // table[(T_String<<4)+T_undefined] = T_undefined;
+ // table[(T_String<<4)+T_byte] = T_undefined;
+ // table[(T_String<<4)+T_long] = T_undefined;
+ // table[(T_String<<4)+T_short] = T_undefined;
+ // table[(T_String<<4)+T_void] = T_undefined;
+ // table[(T_String<<4)+T_String] = T_undefined;
+ // table[(T_String<<4)+T_Object] = T_undefined;
+ // table[(T_String<<4)+T_double] = T_undefined;
+ // table[(T_String<<4)+T_float] = T_undefined;
+ // table[(T_String<<4)+T_boolean] = T_undefined;
+ // table[(T_String<<4)+T_char] = T_undefined;
+ // table[(T_String<<4)+T_int] = T_undefined;
+ // table[(T_String<<4)+T_null] = T_undefined;
+
+ // table[(T_Object<<4)+T_undefined] = T_undefined;
+ // table[(T_Object<<4)+T_byte] = T_undefined;
+ // table[(T_Object<<4)+T_long] = T_undefined;
+ // table[(T_Object<<4)+T_short] = T_undefined;
+ // table[(T_Object<<4)+T_void] = T_undefined;
+ // table[(T_Object<<4)+T_String] = T_undefined;
+ // table[(T_Object<<4)+T_Object] = T_undefined;
+ // table[(T_Object<<4)+T_double] = T_undefined;
+ // table[(T_Object<<4)+T_float] = T_undefined;
+ // table[(T_Object<<4)+T_boolean] = T_undefined;
+ // table[(T_Object<<4)+T_char] = T_undefined;
+ // table[(T_Object<<4)+T_int] = T_undefined;
+ // table[(T_Object<<4)+T_null] = T_undefined;
+
+ // table[(T_double<<4)+T_undefined] = T_undefined;
+ // table[(T_double<<4)+T_byte] = T_undefined;
+ // table[(T_double<<4)+T_long] = T_undefined;
+ // table[(T_double<<4)+T_short] = T_undefined;
+ // table[(T_double<<4)+T_void] = T_undefined;
+ // table[(T_double<<4)+T_String] = T_undefined;
+ // table[(T_double<<4)+T_Object] = T_undefined;
+ // table[(T_double<<4)+T_double] = T_undefined;
+ // table[(T_double<<4)+T_float] = T_undefined;
+ // table[(T_double<<4)+T_boolean] = T_undefined;
+ // table[(T_double<<4)+T_char] = T_undefined;
+ // table[(T_double<<4)+T_int] = T_undefined;
+ // table[(T_double<<4)+T_null] = T_undefined;
+
+ // table[(T_float<<4)+T_undefined] = T_undefined;
+ // table[(T_float<<4)+T_byte] = T_undefined;
+ // table[(T_float<<4)+T_long] = T_undefined;
+ // table[(T_float<<4)+T_short] = T_undefined;
+ // table[(T_float<<4)+T_void] = T_undefined;
+ // table[(T_float<<4)+T_String] = T_undefined;
+ // table[(T_float<<4)+T_Object] = T_undefined;
+ // table[(T_float<<4)+T_double] = T_undefined;
+ // table[(T_float<<4)+T_float] = T_undefined;
+ // table[(T_float<<4)+T_boolean] = T_undefined;
+ // table[(T_float<<4)+T_char] = T_undefined;
+ // table[(T_float<<4)+T_int] = T_undefined;
+ // table[(T_float<<4)+T_null] = T_undefined;
+
+ // table[(T_boolean<<4)+T_undefined] = T_undefined;
+ // table[(T_boolean<<4)+T_byte] = T_undefined;
+ // table[(T_boolean<<4)+T_long] = T_undefined;
+ // table[(T_boolean<<4)+T_short] = T_undefined;
+ // table[(T_boolean<<4)+T_void] = T_undefined;
+ // table[(T_boolean<<4)+T_String] = T_undefined;
+ // table[(T_boolean<<4)+T_Object] = T_undefined;
+ // table[(T_boolean<<4)+T_double] = T_undefined;
+ // table[(T_boolean<<4)+T_float] = T_undefined;
+ table[(T_boolean<<4)+T_boolean] = (Boolean2Boolean<<12)+(Boolean2Boolean<<4)+T_boolean;
+ // table[(T_boolean<<4)+T_char] = T_undefined;
+ // table[(T_boolean<<4)+T_int] = T_undefined;
+ // table[(T_boolean<<4)+T_null] = T_undefined;
+
+ // table[(T_char<<4)+T_undefined] = T_undefined;
+ // table[(T_char<<4)+T_byte] = T_undefined;
+ // table[(T_char<<4)+T_long] = T_undefined;
+ // table[(T_char<<4)+T_short] = T_undefined;
+ // table[(T_char<<4)+T_void] = T_undefined;
+ // table[(T_char<<4)+T_String] = T_undefined;
+ // table[(T_char<<4)+T_Object] = T_undefined;
+ // table[(T_char<<4)+T_double] = T_undefined;
+ // table[(T_char<<4)+T_float] = T_undefined;
+ // table[(T_char<<4)+T_boolean] = T_undefined;
+ // table[(T_char<<4)+T_char] = T_undefined;
+ // table[(T_char<<4)+T_int] = T_undefined;
+ // table[(T_char<<4)+T_null] = T_undefined;
+
+ // table[(T_int<<4)+T_undefined] = T_undefined;
+ // table[(T_int<<4)+T_byte] = T_undefined;
+ // table[(T_int<<4)+T_long] = T_undefined;
+ // table[(T_int<<4)+T_short] = T_undefined;
+ // table[(T_int<<4)+T_void] = T_undefined;
+ // table[(T_int<<4)+T_String] = T_undefined;
+ // table[(T_int<<4)+T_Object] = T_undefined;
+ // table[(T_int<<4)+T_double] = T_undefined;
+ // table[(T_int<<4)+T_float] = T_undefined;
+ // table[(T_int<<4)+T_boolean] = T_undefined;
+ // table[(T_int<<4)+T_char] = T_undefined;
+ // table[(T_int<<4)+T_int] = T_undefined;
+ // table[(T_int<<4)+T_null] = T_undefined;
+
+ // table[(T_null<<4)+T_undefined] = T_undefined;
+ // table[(T_null<<4)+T_byte] = T_undefined;
+ // table[(T_null<<4)+T_long] = T_undefined;
+ // table[(T_null<<4)+T_short] = T_undefined;
+ // table[(T_null<<4)+T_void] = T_undefined;
+ // table[(T_null<<4)+T_String] = T_undefined;
+ // table[(T_null<<4)+T_Object] = T_undefined;
+ // table[(T_null<<4)+T_double] = T_undefined;
+ // table[(T_null<<4)+T_float] = T_undefined;
+ // table[(T_null<<4)+T_boolean] = T_undefined;
+ // table[(T_null<<4)+T_char] = T_undefined;
+ // table[(T_null<<4)+T_int] = T_undefined;
+ // table[(T_null<<4)+T_null] = T_undefined;
+ return table;
+ }
+
+ public static final int[] get_DIVIDE(){
+
+ //the code is an int
+ // (cast) left Op (cast) rigth --> result
+ // 0000 0000 0000 0000 0000
+ // <<16 <<12 <<8 <<4
+
+
+ // int[] table = new int[16*16];
+
+ return get_MINUS();
+ }
+
+ public static final int[] get_EQUAL_EQUAL(){
+
+ //the code is an int
+ // (cast) left Op (cast) rigth --> result
+ // 0000 0000 0000 0000 0000
+ // <<16 <<12 <<8 <<4
+
+ int[] table = new int[16*16];
+
+ // table[(T_undefined<<4)+T_undefined] = T_undefined;
+ // table[(T_undefined<<4)+T_byte] = T_undefined;
+ // table[(T_undefined<<4)+T_long] = T_undefined;
+ // table[(T_undefined<<4)+T_short] = T_undefined;
+ // table[(T_undefined<<4)+T_void] = T_undefined;
+ // table[(T_undefined<<4)+T_String] = T_undefined;
+ // table[(T_undefined<<4)+T_Object] = T_undefined;
+ // table[(T_undefined<<4)+T_double] = T_undefined;
+ // table[(T_undefined<<4)+T_float] = T_undefined;
+ // table[(T_undefined<<4)+T_boolean] = T_undefined;
+ // table[(T_undefined<<4)+T_char] = T_undefined;
+ // table[(T_undefined<<4)+T_int] = T_undefined;
+ // table[(T_undefined<<4)+T_null] = T_undefined;
+
+ // table[(T_byte<<4)+T_undefined] = T_undefined;
+ table[(T_byte<<4)+T_byte] = (Byte2Int<<12)+(Byte2Int<<4)+T_boolean;
+ table[(T_byte<<4)+T_long] = (Byte2Long<<12)+(Long2Long<<4)+T_boolean;
+ table[(T_byte<<4)+T_short] = (Byte2Int<<12)+(Short2Int<<4)+T_boolean;
+ // table[(T_byte<<4)+T_void] = T_undefined;
+ // table[(T_byte<<4)+T_String] = T_undefined;
+ // table[(T_byte<<4)+T_Object] = T_undefined;
+ table[(T_byte<<4)+T_double] = (Byte2Double<<12)+(Double2Double<<4)+T_boolean;
+ table[(T_byte<<4)+T_float] = (Byte2Float<<12)+(Float2Float<<4)+T_boolean;
+ // table[(T_byte<<4)+T_boolean] = T_undefined;
+ table[(T_byte<<4)+T_char] = (Byte2Int<<12)+(Char2Int<<4)+T_boolean;
+ table[(T_byte<<4)+T_int] = (Byte2Int<<12)+(Int2Int<<4)+T_boolean;
+ // table[(T_byte<<4)+T_null] = T_undefined;
+
+ // table[(T_long<<4)+T_undefined] = T_undefined;
+ table[(T_long<<4)+T_byte] = (Long2Long<<12)+(Byte2Long<<4)+T_boolean;
+ table[(T_long<<4)+T_long] = (Long2Long<<12)+(Long2Long<<4)+T_boolean;
+ table[(T_long<<4)+T_short] = (Long2Long<<12)+(Short2Long<<4)+T_boolean;
+ // table[(T_long<<4)+T_void] = T_undefined;
+ // table[(T_long<<4)+T_String] = T_undefined;
+ // table[(T_long<<4)+T_Object] = T_undefined;
+ table[(T_long<<4)+T_double] = (Long2Double<<12)+(Double2Double<<4)+T_boolean;
+ table[(T_long<<4)+T_float] = (Long2Float<<12)+(Float2Float<<4)+T_boolean;
+ // table[(T_long<<4)+T_boolean] = T_undefined;
+ table[(T_long<<4)+T_char] = (Long2Long<<12)+(Char2Long<<4)+T_boolean;
+ table[(T_long<<4)+T_int] = (Long2Long<<12)+(Int2Long<<4)+T_boolean;
+ // table[(T_long<<4)+T_null] = T_undefined;
+
+ // table[(T_short<<4)+T_undefined] = T_undefined;
+ table[(T_short<<4)+T_byte] = (Short2Int<<12)+(Byte2Int<<4)+T_boolean;
+ table[(T_short<<4)+T_long] = (Short2Long<<12)+(Long2Long<<4)+T_boolean;
+ table[(T_short<<4)+T_short] = (Short2Int<<12)+(Short2Int<<4)+T_boolean;
+ // table[(T_short<<4)+T_void] = T_undefined;
+ // table[(T_short<<4)+T_String] = T_undefined;
+ // table[(T_short<<4)+T_Object] = T_undefined;
+ table[(T_short<<4)+T_double] = (Short2Double<<12)+(Double2Double<<4)+T_boolean;
+ table[(T_short<<4)+T_float] = (Short2Float<<12)+(Float2Float<<4)+T_boolean;
+ // table[(T_short<<4)+T_boolean] = T_undefined;
+ table[(T_short<<4)+T_char] = (Short2Int<<12)+(Char2Int<<4)+T_boolean;
+ table[(T_short<<4)+T_int] = (Short2Int<<12)+(Int2Int<<4)+T_boolean;
+ // table[(T_short<<4)+T_null] = T_undefined;
+
+ // table[(T_void<<4)+T_undefined] = T_undefined;
+ // table[(T_void<<4)+T_byte] = T_undefined;
+ // table[(T_void<<4)+T_long] = T_undefined;
+ // table[(T_void<<4)+T_short] = T_undefined;
+ // table[(T_void<<4)+T_void] = T_undefined;
+ // table[(T_void<<4)+T_String] = T_undefined;
+ // table[(T_void<<4)+T_Object] = T_undefined;
+ // table[(T_void<<4)+T_double] = T_undefined;
+ // table[(T_void<<4)+T_float] = T_undefined;
+ // table[(T_void<<4)+T_boolean] = T_undefined;
+ // table[(T_void<<4)+T_char] = T_undefined;
+ // table[(T_void<<4)+T_int] = T_undefined;
+ // table[(T_void<<4)+T_null] = T_undefined;
+
+ // table[(T_String<<4)+T_undefined] = T_undefined;
+ // table[(T_String<<4)+T_byte] = T_undefined;
+ // table[(T_String<<4)+T_long] = T_undefined;
+ // table[(T_String<<4)+T_short] = T_undefined;
+ // table[(T_String<<4)+T_void] = T_undefined;
+ table[(T_String<<4)+T_String] = /*String2Object String2Object*/
+ (T_Object<<16)+(T_String<<12)+(T_Object<<8)+(T_String<<4)+T_boolean;
+ table[(T_String<<4)+T_Object] = /*String2Object Object2Object*/
+ (T_Object<<16)+(T_String<<12)+(T_Object<<8)+(T_Object<<4)+T_boolean;
+ // table[(T_String<<4)+T_double] = T_undefined;
+ // table[(T_String<<4)+T_float] = T_undefined;
+ // table[(T_String<<4)+T_boolean] = T_undefined;
+ // table[(T_String<<4)+T_char] = T_undefined;
+ // table[(T_String<<4)+T_int] = T_undefined;
+ table[(T_String<<4)+T_null] = /*Object2String null2Object */
+ (T_Object<<16)+(T_String<<12)+(T_Object<<8)+(T_null<<4)+T_boolean;
+
+ // table[(T_Object<<4)+T_undefined] = T_undefined;
+ // table[(T_Object<<4)+T_byte] = T_undefined;
+ // table[(T_Object<<4)+T_long] = T_undefined;
+ // table[(T_Object<<4)+T_short] = T_undefined;
+ // table[(T_Object<<4)+T_void] = T_undefined;
+ table[(T_Object<<4)+T_String] = /*Object2Object String2Object*/
+ (T_Object<<16)+(T_Object<<12)+(T_Object<<8)+(T_String<<4)+T_boolean;
+ table[(T_Object<<4)+T_Object] = /*Object2Object Object2Object*/
+ (T_Object<<16)+(T_Object<<12)+(T_Object<<8)+(T_Object<<4)+T_boolean;
+ // table[(T_Object<<4)+T_double] = T_undefined;
+ // table[(T_Object<<4)+T_float] = T_undefined;
+ // table[(T_Object<<4)+T_boolean] = T_undefined;
+ // table[(T_Object<<4)+T_char] = T_undefined;
+ // table[(T_Object<<4)+T_int] = T_undefined;
+ table[(T_Object<<4)+T_null] = /*Object2Object null2Object*/
+ (T_Object<<16)+(T_Object<<12)+(T_Object<<8)+(T_null<<4)+T_boolean;
+
+ // table[(T_double<<4)+T_undefined] = T_undefined;
+ table[(T_double<<4)+T_byte] = (Double2Double<<12)+(Byte2Double<<4)+T_boolean;
+ table[(T_double<<4)+T_long] = (Double2Double<<12)+(Long2Double<<4)+T_boolean;
+ table[(T_double<<4)+T_short] = (Double2Double<<12)+(Short2Double<<4)+T_boolean;
+ // table[(T_double<<4)+T_void] = T_undefined;
+ // table[(T_double<<4)+T_String] = T_undefined;
+ // table[(T_double<<4)+T_Object] = T_undefined;
+ table[(T_double<<4)+T_double] = (Double2Double<<12)+(Double2Double<<4)+T_boolean;
+ table[(T_double<<4)+T_float] = (Double2Double<<12)+(Float2Double<<4)+T_boolean;
+ // table[(T_double<<4)+T_boolean] = T_undefined;
+ table[(T_double<<4)+T_char] = (Double2Double<<12)+(Char2Double<<4)+T_boolean;
+ table[(T_double<<4)+T_int] = (Double2Double<<12)+(Int2Double<<4)+T_boolean;
+ // table[(T_double<<4)+T_null] = T_undefined;
+
+ // table[(T_float<<4)+T_undefined] = T_undefined;
+ table[(T_float<<4)+T_byte] = (Float2Float<<12)+(Byte2Float<<4)+T_boolean;
+ table[(T_float<<4)+T_long] = (Float2Float<<12)+(Long2Float<<4)+T_boolean;
+ table[(T_float<<4)+T_short] = (Float2Float<<12)+(Short2Float<<4)+T_boolean;
+ // table[(T_float<<4)+T_void] = T_undefined;
+ // table[(T_float<<4)+T_String] = T_undefined;
+ // table[(T_float<<4)+T_Object] = T_undefined;
+ table[(T_float<<4)+T_double] = (Float2Double<<12)+(Double2Double<<4)+T_boolean;
+ table[(T_float<<4)+T_float] = (Float2Float<<12)+(Float2Float<<4)+T_boolean;
+ // table[(T_float<<4)+T_boolean] = T_undefined;
+ table[(T_float<<4)+T_char] = (Float2Float<<12)+(Char2Float<<4)+T_boolean;
+ table[(T_float<<4)+T_int] = (Float2Float<<12)+(Int2Float<<4)+T_boolean;
+ // table[(T_float<<4)+T_null] = T_undefined;
+
+ // table[(T_boolean<<4)+T_undefined] = T_undefined;
+ // table[(T_boolean<<4)+T_byte] = T_undefined;
+ // table[(T_boolean<<4)+T_long] = T_undefined;
+ // table[(T_boolean<<4)+T_short] = T_undefined;
+ // table[(T_boolean<<4)+T_void] = T_undefined;
+ // table[(T_boolean<<4)+T_String] = T_undefined;
+ // table[(T_boolean<<4)+T_Object] = T_undefined;
+ // table[(T_boolean<<4)+T_double] = T_undefined;
+ // table[(T_boolean<<4)+T_float] = T_undefined;
+ table[(T_boolean<<4)+T_boolean] = (Boolean2Boolean<<12)+(Boolean2Boolean<<4)+T_boolean;
+ // table[(T_boolean<<4)+T_char] = T_undefined;
+ // table[(T_boolean<<4)+T_int] = T_undefined;
+ // table[(T_boolean<<4)+T_null] = T_undefined;
+
+ // table[(T_char<<4)+T_undefined] = T_undefined;
+ table[(T_char<<4)+T_byte] = (Char2Int<<12)+(Byte2Int<<4)+T_boolean;
+ table[(T_char<<4)+T_long] = (Char2Long<<12)+(Long2Long<<4)+T_boolean;
+ table[(T_char<<4)+T_short] = (Char2Int<<12)+(Short2Int<<4)+T_boolean;
+ // table[(T_char<<4)+T_void] = T_undefined;
+ // table[(T_char<<4)+T_String] = T_undefined;
+ // table[(T_char<<4)+T_Object] = T_undefined;
+ table[(T_char<<4)+T_double] = (Char2Double<<12)+(Double2Double<<4)+T_boolean;
+ table[(T_char<<4)+T_float] = (Char2Float<<12)+(Float2Float<<4)+T_boolean;
+ // table[(T_char<<4)+T_boolean] = T_undefined;
+ table[(T_char<<4)+T_char] = (Char2Int<<12)+(Char2Int<<4)+T_boolean;
+ table[(T_char<<4)+T_int] = (Char2Int<<12)+(Int2Int<<4)+T_boolean;
+ // table[(T_char<<4)+T_null] = T_undefined;
+
+ // table[(T_int<<4)+T_undefined] = T_undefined;
+ table[(T_int<<4)+T_byte] = (Int2Int<<12)+(Byte2Int<<4)+T_boolean;
+ table[(T_int<<4)+T_long] = (Int2Long<<12)+(Long2Long<<4)+T_boolean;
+ table[(T_int<<4)+T_short] = (Int2Int<<12)+(Short2Int<<4)+T_boolean;
+ // table[(T_int<<4)+T_void] = T_undefined;
+ // table[(T_int<<4)+T_String] = T_undefined;
+ // table[(T_int<<4)+T_Object] = T_undefined;
+ table[(T_int<<4)+T_double] = (Int2Double<<12)+(Double2Double<<4)+T_boolean;
+ table[(T_int<<4)+T_float] = (Int2Float<<12)+(Float2Float<<4)+T_boolean;
+ // table[(T_int<<4)+T_boolean] = T_undefined;
+ table[(T_int<<4)+T_char] = (Int2Int<<12)+(Char2Int<<4)+T_boolean;
+ table[(T_int<<4)+T_int] = (Int2Int<<12)+(Int2Int<<4)+T_boolean;
+ // table[(T_int<<4)+T_null] = T_undefined;
+
+ // table[(T_null<<4)+T_undefined] = T_undefined;
+ // table[(T_null<<4)+T_byte] = T_undefined;
+ // table[(T_null<<4)+T_long] = T_undefined;
+ // table[(T_null<<4)+T_short] = T_undefined;
+ // table[(T_null<<4)+T_void] = T_undefined;
+ table[(T_null<<4)+T_String] = /*null2Object String2Object*/
+ (T_Object<<16)+(T_null<<12)+(T_Object<<8)+(T_String<<4)+T_boolean;
+ table[(T_null<<4)+T_Object] = /*null2Object Object2Object*/
+ (T_Object<<16)+(T_null<<12)+(T_Object<<8)+(T_Object<<4)+T_boolean;
+ // table[(T_null<<4)+T_double] = T_undefined;
+ // table[(T_null<<4)+T_float] = T_undefined;
+ // table[(T_null<<4)+T_boolean] = T_undefined;
+ // table[(T_null<<4)+T_char] = T_undefined;
+ // table[(T_null<<4)+T_int] = T_undefined;
+ table[(T_null<<4)+T_null] = /*null2Object null2Object*/
+ (T_Object<<16)+(T_null<<12)+(T_Object<<8)+(T_null<<4)+T_boolean;
+ return table;
+ }
+
+ public static final int[] get_GREATER(){
+
+ //the code is an int
+ // (cast) left Op (cast) rigth --> result
+ // 0000 0000 0000 0000 0000
+ // <<16 <<12 <<8 <<4
+
+ // int[] table = new int[16*16];
+ return get_LESS();
+ }
+
+ public static final int[] get_GREATER_EQUAL(){
+
+ //the code is an int
+ // (cast) left Op (cast) rigth --> result
+ // 0000 0000 0000 0000 0000
+ // <<16 <<12 <<8 <<4
+
+ // int[] table = new int[16*16];
+ return get_LESS();
+ }
+
+ public static final int[] get_LEFT_SHIFT(){
+
+ //the code is an int
+ // (cast) left Op (cast) rigth --> result
+ // 0000 0000 0000 0000 0000
+ // <<16 <<12 <<8 <<4
+
+ int[] table = new int[16*16];
+
+ // table[(T_undefined<<4)+T_undefined] = T_undefined;
+ // table[(T_undefined<<4)+T_byte] = T_undefined;
+ // table[(T_undefined<<4)+T_long] = T_undefined;
+ // table[(T_undefined<<4)+T_short] = T_undefined;
+ // table[(T_undefined<<4)+T_void] = T_undefined;
+ // table[(T_undefined<<4)+T_String] = T_undefined;
+ // table[(T_undefined<<4)+T_Object] = T_undefined;
+ // table[(T_undefined<<4)+T_double] = T_undefined;
+ // table[(T_undefined<<4)+T_float] = T_undefined;
+ // table[(T_undefined<<4)+T_boolean] = T_undefined;
+ // table[(T_undefined<<4)+T_char] = T_undefined;
+ // table[(T_undefined<<4)+T_int] = T_undefined;
+ // table[(T_undefined<<4)+T_null] = T_undefined;
+
+ // table[(T_byte<<4)+T_undefined] = T_undefined;
+ table[(T_byte<<4)+T_byte] = (Byte2Int<<12)+(Byte2Int<<4)+T_int;
+ table[(T_byte<<4)+T_long] = (Byte2Int<<12)+(Long2Int<<4)+T_int;
+ table[(T_byte<<4)+T_short] = (Byte2Int<<12)+(Short2Int<<4)+T_int;
+ // table[(T_byte<<4)+T_void] = T_undefined;
+ // table[(T_byte<<4)+T_String] = T_undefined;
+ // table[(T_byte<<4)+T_Object] = T_undefined;
+ // table[(T_byte<<4)+T_double] = T_undefined;
+ // table[(T_byte<<4)+T_float] = T_undefined;
+ // table[(T_byte<<4)+T_boolean] = T_undefined;
+ table[(T_byte<<4)+T_char] = (Byte2Int<<12)+(Char2Int<<4)+T_int;
+ table[(T_byte<<4)+T_int] = (Byte2Int<<12)+(Int2Int<<4)+T_int;
+ // table[(T_byte<<4)+T_null] = T_undefined;
+
+ // table[(T_long<<4)+T_undefined] = T_undefined;
+ table[(T_long<<4)+T_byte] = (Long2Long<<12)+(Byte2Int<<4)+T_long;
+ table[(T_long<<4)+T_long] = (Long2Long<<12)+(Long2Int<<4)+T_long;
+ table[(T_long<<4)+T_short] = (Long2Long<<12)+(Short2Int<<4)+T_long;
+ // table[(T_long<<4)+T_void] = T_undefined;
+ // table[(T_long<<4)+T_String] = T_undefined;
+ // table[(T_long<<4)+T_Object] = T_undefined;
+ // table[(T_long<<4)+T_double] = T_undefined;
+ // table[(T_long<<4)+T_float] = T_undefined;
+ // table[(T_long<<4)+T_boolean] = T_undefined;
+ table[(T_long<<4)+T_char] = (Long2Long<<12)+(Char2Int<<4)+T_long;
+ table[(T_long<<4)+T_int] = (Long2Long<<12)+(Int2Int<<4)+T_long;
+ // table[(T_long<<4)+T_null] = T_undefined;
+
+ // table[(T_short<<4)+T_undefined] = T_undefined;
+ table[(T_short<<4)+T_byte] = (Short2Int<<12)+(Byte2Int<<4)+T_int;
+ table[(T_short<<4)+T_long] = (Short2Int<<12)+(Long2Int<<4)+T_int;
+ table[(T_short<<4)+T_short] = (Short2Int<<12)+(Short2Int<<4)+T_int;
+ // table[(T_short<<4)+T_void] = T_undefined;
+ // table[(T_short<<4)+T_String] = T_undefined;
+ // table[(T_short<<4)+T_Object] = T_undefined;
+ // table[(T_short<<4)+T_double] = T_undefined;
+ // table[(T_short<<4)+T_float] = T_undefined;
+ // table[(T_short<<4)+T_boolean] = T_undefined;
+ table[(T_short<<4)+T_char] = (Short2Int<<12)+(Char2Int<<4)+T_int;
+ table[(T_short<<4)+T_int] = (Short2Int<<12)+(Int2Int<<4)+T_int;
+ // table[(T_short<<4)+T_null] = T_undefined;
+
+ // table[(T_void<<4)+T_undefined] = T_undefined;
+ // table[(T_void<<4)+T_byte] = T_undefined;
+ // table[(T_void<<4)+T_long] = T_undefined;
+ // table[(T_void<<4)+T_short] = T_undefined;
+ // table[(T_void<<4)+T_void] = T_undefined;
+ // table[(T_void<<4)+T_String] = T_undefined;
+ // table[(T_void<<4)+T_Object] = T_undefined;
+ // table[(T_void<<4)+T_double] = T_undefined;
+ // table[(T_void<<4)+T_float] = T_undefined;
+ // table[(T_void<<4)+T_boolean] = T_undefined;
+ // table[(T_void<<4)+T_char] = T_undefined;
+ // table[(T_void<<4)+T_int] = T_undefined;
+ // table[(T_void<<4)+T_null] = T_undefined;
+
+ // table[(T_String<<4)+T_undefined] = T_undefined;
+ // table[(T_String<<4)+T_byte] = T_undefined;
+ // table[(T_String<<4)+T_long] = T_undefined;
+ // table[(T_String<<4)+T_short] = T_undefined;
+ // table[(T_String<<4)+T_void] = T_undefined;
+ // table[(T_String<<4)+T_String] = T_undefined;
+ // table[(T_String<<4)+T_Object] = T_undefined;
+ // table[(T_String<<4)+T_double] = T_undefined;
+ // table[(T_String<<4)+T_float] = T_undefined;
+ // table[(T_String<<4)+T_boolean] = T_undefined;
+ // table[(T_String<<4)+T_char] = T_undefined;
+ // table[(T_String<<4)+T_int] = T_undefined;
+ // table[(T_String<<4)+T_null] = T_undefined;
+
+ // table[(T_Object<<4)+T_undefined] = T_undefined;
+ // table[(T_Object<<4)+T_byte] = T_undefined;
+ // table[(T_Object<<4)+T_long] = T_undefined;
+ // table[(T_Object<<4)+T_short] = T_undefined;
+ // table[(T_Object<<4)+T_void] = T_undefined;
+ // table[(T_Object<<4)+T_String] = T_undefined;
+ // table[(T_Object<<4)+T_Object] = T_undefined;
+ // table[(T_Object<<4)+T_double] = T_undefined;
+ // table[(T_Object<<4)+T_float] = T_undefined;
+ // table[(T_Object<<4)+T_boolean] = T_undefined;
+ // table[(T_Object<<4)+T_char] = T_undefined;
+ // table[(T_Object<<4)+T_int] = T_undefined;
+ // table[(T_Object<<4)+T_null] = T_undefined;
+
+ // table[(T_double<<4)+T_undefined] = T_undefined;
+ // table[(T_double<<4)+T_byte] = T_undefined;
+ // table[(T_double<<4)+T_long] = T_undefined;
+ // table[(T_double<<4)+T_short] = T_undefined;
+ // table[(T_double<<4)+T_void] = T_undefined;
+ // table[(T_double<<4)+T_String] = T_undefined;
+ // table[(T_double<<4)+T_Object] = T_undefined;
+ // table[(T_double<<4)+T_double] = T_undefined;
+ // table[(T_double<<4)+T_float] = T_undefined;
+ // table[(T_double<<4)+T_boolean] = T_undefined;
+ // table[(T_double<<4)+T_char] = T_undefined;
+ // table[(T_double<<4)+T_int] = T_undefined;
+ // table[(T_double<<4)+T_null] = T_undefined;
+
+ // table[(T_float<<4)+T_undefined] = T_undefined;
+ // table[(T_float<<4)+T_byte] = T_undefined;
+ // table[(T_float<<4)+T_long] = T_undefined;
+ // table[(T_float<<4)+T_short] = T_undefined;
+ // table[(T_float<<4)+T_void] = T_undefined;
+ // table[(T_float<<4)+T_String] = T_undefined;
+ // table[(T_float<<4)+T_Object] = T_undefined;
+ // table[(T_float<<4)+T_double] = T_undefined;
+ // table[(T_float<<4)+T_float] = T_undefined;
+ // table[(T_float<<4)+T_boolean] = T_undefined;
+ // table[(T_float<<4)+T_char] = T_undefined;
+ // table[(T_float<<4)+T_int] = T_undefined;
+ // table[(T_float<<4)+T_null] = T_undefined;
+
+ // table[(T_boolean<<4)+T_undefined] = T_undefined;
+ // table[(T_boolean<<4)+T_byte] = T_undefined;
+ // table[(T_boolean<<4)+T_long] = T_undefined;
+ // table[(T_boolean<<4)+T_short] = T_undefined;
+ // table[(T_boolean<<4)+T_void] = T_undefined;
+ // table[(T_boolean<<4)+T_String] = T_undefined;
+ // table[(T_boolean<<4)+T_Object] = T_undefined;
+ // table[(T_boolean<<4)+T_double] = T_undefined;
+ // table[(T_boolean<<4)+T_float] = T_undefined;
+ // table[(T_boolean<<4)+T_boolean] = T_undefined;
+ // table[(T_boolean<<4)+T_char] = T_undefined;
+ // table[(T_boolean<<4)+T_int] = T_undefined;
+ // table[(T_boolean<<4)+T_null] = T_undefined;
+
+ // table[(T_char<<4)+T_undefined] = T_undefined;
+ table[(T_char<<4)+T_byte] = (Char2Int<<12)+(Byte2Int<<4)+T_int;
+ table[(T_char<<4)+T_long] = (Char2Int<<12)+(Long2Int<<4)+T_int;
+ table[(T_char<<4)+T_short] = (Char2Int<<12)+(Short2Int<<4)+T_int;
+ // table[(T_char<<4)+T_void] = T_undefined;
+ // table[(T_char<<4)+T_String] = T_undefined;
+ // table[(T_char<<4)+T_Object] = T_undefined;
+ // table[(T_char<<4)+T_double] = T_undefined;
+ // table[(T_char<<4)+T_float] = T_undefined;
+ // table[(T_char<<4)+T_boolean] = T_undefined;
+ table[(T_char<<4)+T_char] = (Char2Int<<12)+(Char2Int<<4)+T_int;
+ table[(T_char<<4)+T_int] = (Char2Int<<12)+(Int2Int<<4)+T_int;
+ // table[(T_char<<4)+T_null] = T_undefined;
+
+ // table[(T_int<<4)+T_undefined] = T_undefined;
+ table[(T_int<<4)+T_byte] = (Int2Int<<12)+(Byte2Int<<4)+T_int;
+ table[(T_int<<4)+T_long] = (Int2Int<<12)+(Long2Int<<4)+T_int;
+ table[(T_int<<4)+T_short] = (Int2Int<<12)+(Short2Int<<4)+T_int;
+ // table[(T_int<<4)+T_void] = T_undefined;
+ // table[(T_int<<4)+T_String] = T_undefined;
+ // table[(T_int<<4)+T_Object] = T_undefined;
+ // table[(T_int<<4)+T_double] = T_undefined;
+ // table[(T_int<<4)+T_float] = T_undefined;
+ // table[(T_int<<4)+T_boolean] = T_undefined;
+ table[(T_int<<4)+T_char] = (Int2Int<<12)+(Char2Int<<4)+T_int;
+ table[(T_int<<4)+T_int] = (Int2Int<<12)+(Int2Int<<4)+T_int;
+ // table[(T_int<<4)+T_null] = T_undefined;
+
+ // table[(T_null<<4)+T_undefined] = T_undefined;
+ // table[(T_null<<4)+T_byte] = T_undefined;
+ // table[(T_null<<4)+T_long] = T_undefined;
+ // table[(T_null<<4)+T_short] = T_undefined;
+ // table[(T_null<<4)+T_void] = T_undefined;
+ // table[(T_null<<4)+T_String] = T_undefined;
+ // table[(T_null<<4)+T_Object] = T_undefined;
+ // table[(T_null<<4)+T_double] = T_undefined;
+ // table[(T_null<<4)+T_float] = T_undefined;
+ // table[(T_null<<4)+T_boolean] = T_undefined;
+ // table[(T_null<<4)+T_char] = T_undefined;
+ // table[(T_null<<4)+T_int] = T_undefined;
+ // table[(T_null<<4)+T_null] = T_undefined;
+
+ return table;
+ }
+
+ public static final int[] get_LESS(){
+
+ //the code is an int
+ // (cast) left Op (cast) rigth --> result
+ // 0000 0000 0000 0000 0000
+ // <<16 <<12 <<8 <<4
+
+ int[] table = new int[16*16];
+
+ // table[(T_undefined<<4)+T_undefined] = T_undefined;
+ // table[(T_undefined<<4)+T_byte] = T_undefined;
+ // table[(T_undefined<<4)+T_long] = T_undefined;
+ // table[(T_undefined<<4)+T_short] = T_undefined;
+ // table[(T_undefined<<4)+T_void] = T_undefined;
+ // table[(T_undefined<<4)+T_String] = T_undefined;
+ // table[(T_undefined<<4)+T_Object] = T_undefined;
+ // table[(T_undefined<<4)+T_double] = T_undefined;
+ // table[(T_undefined<<4)+T_float] = T_undefined;
+ // table[(T_undefined<<4)+T_boolean] = T_undefined;
+ // table[(T_undefined<<4)+T_char] = T_undefined;
+ // table[(T_undefined<<4)+T_int] = T_undefined;
+ // table[(T_undefined<<4)+T_null] = T_undefined;
+
+ // table[(T_byte<<4)+T_undefined] = T_undefined;
+ table[(T_byte<<4)+T_byte] = (Byte2Int<<12)+(Byte2Int<<4)+T_boolean;
+ table[(T_byte<<4)+T_long] = (Byte2Long<<12)+(Long2Long<<4)+T_boolean;
+ table[(T_byte<<4)+T_short] = (Byte2Int<<12)+(Short2Int<<4)+T_boolean;
+ // table[(T_byte<<4)+T_void] = T_undefined;
+ // table[(T_byte<<4)+T_String] = T_undefined;
+ // table[(T_byte<<4)+T_Object] = T_undefined;
+ table[(T_byte<<4)+T_double] = (Byte2Double<<12)+(Double2Double<<4)+T_boolean;
+ table[(T_byte<<4)+T_float] = (Byte2Float<<12)+(Float2Float<<4)+T_boolean;
+ // table[(T_byte<<4)+T_boolean] = T_undefined;
+ table[(T_byte<<4)+T_char] = (Byte2Int<<12)+(Char2Int<<4)+T_boolean;
+ table[(T_byte<<4)+T_int] = (Byte2Int<<12)+(Int2Int<<4)+T_boolean;
+ // table[(T_byte<<4)+T_null] = T_undefined;
+
+ // table[(T_long<<4)+T_undefined] = T_undefined;
+ table[(T_long<<4)+T_byte] = (Long2Long<<12)+(Byte2Long<<4)+T_boolean;
+ table[(T_long<<4)+T_long] = (Long2Long<<12)+(Long2Long<<4)+T_boolean;
+ table[(T_long<<4)+T_short] = (Long2Long<<12)+(Short2Long<<4)+T_boolean;
+ // table[(T_long<<4)+T_void] = T_undefined;
+ // table[(T_long<<4)+T_String] = T_undefined;
+ // table[(T_long<<4)+T_Object] = T_undefined;
+ table[(T_long<<4)+T_double] = (Long2Double<<12)+(Double2Double<<4)+T_boolean;
+ table[(T_long<<4)+T_float] = (Long2Float<<12)+(Float2Float<<4)+T_boolean;
+ // table[(T_long<<4)+T_boolean] = T_undefined;
+ table[(T_long<<4)+T_char] = (Long2Long<<12)+(Char2Long<<4)+T_boolean;
+ table[(T_long<<4)+T_int] = (Long2Long<<12)+(Int2Long<<4)+T_boolean;
+ // table[(T_long<<4)+T_null] = T_undefined;
+
+ // table[(T_short<<4)+T_undefined] = T_undefined;
+ table[(T_short<<4)+T_byte] = (Short2Int<<12)+(Byte2Int<<4)+T_boolean;
+ table[(T_short<<4)+T_long] = (Short2Long<<12)+(Long2Long<<4)+T_boolean;
+ table[(T_short<<4)+T_short] = (Short2Int<<12)+(Short2Int<<4)+T_boolean;
+ // table[(T_short<<4)+T_void] = T_undefined;
+ // table[(T_short<<4)+T_String] = T_undefined;
+ // table[(T_short<<4)+T_Object] = T_undefined;
+ table[(T_short<<4)+T_double] = (Short2Double<<12)+(Double2Double<<4)+T_boolean;
+ table[(T_short<<4)+T_float] = (Short2Float<<12)+(Float2Float<<4)+T_boolean;
+ // table[(T_short<<4)+T_boolean] = T_undefined;
+ table[(T_short<<4)+T_char] = (Short2Int<<12)+(Char2Int<<4)+T_boolean;
+ table[(T_short<<4)+T_int] = (Short2Int<<12)+(Int2Int<<4)+T_boolean;
+ // table[(T_short<<4)+T_null] = T_undefined;
+
+ // table[(T_void<<4)+T_undefined] = T_undefined;
+ // table[(T_void<<4)+T_byte] = T_undefined;
+ // table[(T_void<<4)+T_long] = T_undefined;
+ // table[(T_void<<4)+T_short] = T_undefined;
+ // table[(T_void<<4)+T_void] = T_undefined;
+ // table[(T_void<<4)+T_String] = T_undefined;
+ // table[(T_void<<4)+T_Object] = T_undefined;
+ // table[(T_void<<4)+T_double] = T_undefined;
+ // table[(T_void<<4)+T_float] = T_undefined;
+ // table[(T_void<<4)+T_boolean] = T_undefined;
+ // table[(T_void<<4)+T_char] = T_undefined;
+ // table[(T_void<<4)+T_int] = T_undefined;
+ // table[(T_void<<4)+T_null] = T_undefined;
+
+ // table[(T_String<<4)+T_undefined] = T_undefined;
+ // table[(T_String<<4)+T_byte] = T_undefined;
+ // table[(T_String<<4)+T_long] = T_undefined;
+ // table[(T_String<<4)+T_short] = T_undefined;
+ // table[(T_String<<4)+T_void] = T_undefined;
+ // table[(T_String<<4)+T_String] = T_undefined;
+ // table[(T_String<<4)+T_Object] = T_undefined;
+ // table[(T_String<<4)+T_double] = T_undefined;
+ // table[(T_String<<4)+T_float] = T_undefined;
+ // table[(T_String<<4)+T_boolean] = T_undefined;
+ // table[(T_String<<4)+T_char] = T_undefined;
+ // table[(T_String<<4)+T_int] = T_undefined;
+ // table[(T_String<<4)+T_null] = T_undefined;
+
+ // table[(T_Object<<4)+T_undefined] = T_undefined;
+ // table[(T_Object<<4)+T_byte] = T_undefined;
+ // table[(T_Object<<4)+T_long] = T_undefined;
+ // table[(T_Object<<4)+T_short] = T_undefined;
+ // table[(T_Object<<4)+T_void] = T_undefined;
+ // table[(T_Object<<4)+T_String] = T_undefined;
+ // table[(T_Object<<4)+T_Object] = T_undefined;
+ // table[(T_Object<<4)+T_double] = T_undefined;
+ // table[(T_Object<<4)+T_float] = T_undefined;
+ // table[(T_Object<<4)+T_boolean] = T_undefined;
+ // table[(T_Object<<4)+T_char] = T_undefined;
+ // table[(T_Object<<4)+T_int] = T_undefined;
+ // table[(T_Object<<4)+T_null] = T_undefined;
+
+ // table[(T_double<<4)+T_undefined] = T_undefined;
+ table[(T_double<<4)+T_byte] = (Double2Double<<12)+(Byte2Double<<4)+T_boolean;
+ table[(T_double<<4)+T_long] = (Double2Double<<12)+(Long2Double<<4)+T_boolean;
+ table[(T_double<<4)+T_short] = (Double2Double<<12)+(Short2Double<<4)+T_boolean;
+ // table[(T_double<<4)+T_void] = T_undefined;
+ // table[(T_double<<4)+T_String] = T_undefined;
+ // table[(T_double<<4)+T_Object] = T_undefined;
+ table[(T_double<<4)+T_double] = (Double2Double<<12)+(Double2Double<<4)+T_boolean;
+ table[(T_double<<4)+T_float] = (Double2Double<<12)+(Float2Double<<4)+T_boolean;
+ // table[(T_double<<4)+T_boolean] = T_undefined;
+ table[(T_double<<4)+T_char] = (Double2Double<<12)+(Char2Double<<4)+T_boolean;
+ table[(T_double<<4)+T_int] = (Double2Double<<12)+(Int2Double<<4)+T_boolean;
+ // table[(T_double<<4)+T_null] = T_undefined;
+
+ // table[(T_float<<4)+T_undefined] = T_undefined;
+ table[(T_float<<4)+T_byte] = (Float2Float<<12)+(Byte2Float<<4)+T_boolean;
+ table[(T_float<<4)+T_long] = (Float2Float<<12)+(Long2Float<<4)+T_boolean;
+ table[(T_float<<4)+T_short] = (Float2Float<<12)+(Short2Float<<4)+T_boolean;
+ // table[(T_float<<4)+T_void] = T_undefined;
+ // table[(T_float<<4)+T_String] = T_undefined;
+ // table[(T_float<<4)+T_Object] = T_undefined;
+ table[(T_float<<4)+T_double] = (Float2Double<<12)+(Double2Double<<4)+T_boolean;
+ table[(T_float<<4)+T_float] = (Float2Float<<12)+(Float2Float<<4)+T_boolean;
+ // table[(T_float<<4)+T_boolean] = T_undefined;
+ table[(T_float<<4)+T_char] = (Float2Float<<12)+(Char2Float<<4)+T_boolean;
+ table[(T_float<<4)+T_int] = (Float2Float<<12)+(Int2Float<<4)+T_boolean;
+ // table[(T_float<<4)+T_null] = T_undefined;
+
+ // table[(T_boolean<<4)+T_undefined] = T_undefined;
+ // table[(T_boolean<<4)+T_byte] = T_undefined;
+ // table[(T_boolean<<4)+T_long] = T_undefined;
+ // table[(T_boolean<<4)+T_short] = T_undefined;
+ // table[(T_boolean<<4)+T_void] = T_undefined;
+ // table[(T_boolean<<4)+T_String] = T_undefined;
+ // table[(T_boolean<<4)+T_Object] = T_undefined;
+ // table[(T_boolean<<4)+T_double] = T_undefined;
+ // table[(T_boolean<<4)+T_float] = T_undefined;
+ // table[(T_boolean<<4)+T_boolean] = T_undefined;
+ // table[(T_boolean<<4)+T_char] = T_undefined;
+ // table[(T_boolean<<4)+T_int] = T_undefined;
+ // table[(T_boolean<<4)+T_null] = T_undefined;
+
+ // table[(T_char<<4)+T_undefined] = T_undefined;
+ table[(T_char<<4)+T_byte] = (Char2Int<<12)+(Byte2Int<<4)+T_boolean;
+ table[(T_char<<4)+T_long] = (Char2Long<<12)+(Long2Long<<4)+T_boolean;
+ table[(T_char<<4)+T_short] = (Char2Int<<12)+(Short2Int<<4)+T_boolean;
+ // table[(T_char<<4)+T_void] = T_undefined;
+ // table[(T_char<<4)+T_String] = T_undefined;
+ // table[(T_char<<4)+T_Object] = T_undefined;
+ table[(T_char<<4)+T_double] = (Char2Double<<12)+(Double2Double<<4)+T_boolean;
+ table[(T_char<<4)+T_float] = (Char2Float<<12)+(Float2Float<<4)+T_boolean;
+ // table[(T_char<<4)+T_boolean] = T_undefined;
+ table[(T_char<<4)+T_char] = (Char2Int<<12)+(Char2Int<<4)+T_boolean;
+ table[(T_char<<4)+T_int] = (Char2Int<<12)+(Int2Int<<4)+T_boolean;
+ // table[(T_char<<4)+T_null] = T_undefined;
+
+ // table[(T_int<<4)+T_undefined] = T_undefined;
+ table[(T_int<<4)+T_byte] = (Int2Int<<12)+(Byte2Int<<4)+T_boolean;
+ table[(T_int<<4)+T_long] = (Int2Long<<12)+(Long2Long<<4)+T_boolean;
+ table[(T_int<<4)+T_short] = (Int2Int<<12)+(Short2Int<<4)+T_boolean;
+ // table[(T_int<<4)+T_void] = T_undefined;
+ // table[(T_int<<4)+T_String] = T_undefined;
+ // table[(T_int<<4)+T_Object] = T_undefined;
+ table[(T_int<<4)+T_double] = (Int2Double<<12)+(Double2Double<<4)+T_boolean;
+ table[(T_int<<4)+T_float] = (Int2Float<<12)+(Float2Float<<4)+T_boolean;
+ // table[(T_int<<4)+T_boolean] = T_undefined;
+ table[(T_int<<4)+T_char] = (Int2Int<<12)+(Char2Int<<4)+T_boolean;
+ table[(T_int<<4)+T_int] = (Int2Int<<12)+(Int2Int<<4)+T_boolean;
+ // table[(T_int<<4)+T_null] = T_undefined;
+
+ // table[(T_null<<4)+T_undefined] = T_undefined;
+ // table[(T_null<<4)+T_byte] = T_undefined;
+ // table[(T_null<<4)+T_long] = T_undefined;
+ // table[(T_null<<4)+T_short] = T_undefined;
+ // table[(T_null<<4)+T_void] = T_undefined;
+ // table[(T_null<<4)+T_String] = T_undefined;
+ // table[(T_null<<4)+T_Object] = T_undefined;
+ // table[(T_null<<4)+T_double] = T_undefined;
+ // table[(T_null<<4)+T_float] = T_undefined;
+ // table[(T_null<<4)+T_boolean] = T_undefined;
+ // table[(T_null<<4)+T_char] = T_undefined;
+ // table[(T_null<<4)+T_int] = T_undefined;
+ // table[(T_null<<4)+T_null] = T_undefined;
+
+ return table;
+ }
+
+ public static final int[] get_LESS_EQUAL(){
+
+ //the code is an int
+ // (cast) left Op (cast) rigth --> result
+ // 0000 0000 0000 0000 0000
+ // <<16 <<12 <<8 <<4
+
+ // int[] table = new int[16*16];
+ return get_LESS();
+ }
+
+ public static final int[] get_MINUS(){
+
+ //the code is an int
+ // (cast) left Op (cast) rigth --> result
+ // 0000 0000 0000 0000 0000
+ // <<16 <<12 <<8 <<4
+
+ int[] table = new int[16*16];
+
+ table = (int[]) get_PLUS().clone();
+
+ // customization
+ table[(T_String<<4)+T_byte] = T_undefined;
+ table[(T_String<<4)+T_long] = T_undefined;
+ table[(T_String<<4)+T_short] = T_undefined;
+ table[(T_String<<4)+T_void] = T_undefined;
+ table[(T_String<<4)+T_String] = T_undefined;
+ table[(T_String<<4)+T_Object] = T_undefined;
+ table[(T_String<<4)+T_double] = T_undefined;
+ table[(T_String<<4)+T_float] = T_undefined;
+ table[(T_String<<4)+T_boolean] = T_undefined;
+ table[(T_String<<4)+T_char] = T_undefined;
+ table[(T_String<<4)+T_int] = T_undefined;
+ table[(T_String<<4)+T_null] = T_undefined;
+
+ table[(T_byte<<4) +T_String] = T_undefined;
+ table[(T_long<<4) +T_String] = T_undefined;
+ table[(T_short<<4) +T_String] = T_undefined;
+ table[(T_void<<4) +T_String] = T_undefined;
+ table[(T_Object<<4) +T_String] = T_undefined;
+ table[(T_double<<4) +T_String] = T_undefined;
+ table[(T_float<<4) +T_String] = T_undefined;
+ table[(T_boolean<<4)+T_String] = T_undefined;
+ table[(T_char<<4) +T_String] = T_undefined;
+ table[(T_int<<4) +T_String] = T_undefined;
+ table[(T_null<<4) +T_String] = T_undefined;
+
+ table[(T_null<<4) +T_null] = T_undefined;
+
+ return table;
+ }
+
+ public static final int[] get_MULTIPLY(){
+
+ //the code is an int
+ // (cast) left Op (cast) rigth --> result
+ // 0000 0000 0000 0000 0000
+ // <<16 <<12 <<8 <<4
+
+ // int[] table = new int[16*16];
+ return get_MINUS();
+ }
+
+ public static final int[] get_OR(){
+
+ //the code is an int
+ // (cast) left Op (cast) rigth --> result
+ // 0000 0000 0000 0000 0000
+ // <<16 <<12 <<8 <<4
+
+
+ // int[] table = new int[16*16];
+ return get_AND();
+ }
+
+ public static final int[] get_OR_OR(){
+
+ //the code is an int
+ // (cast) left Op (cast) rigth --> result
+ // 0000 0000 0000 0000 0000
+ // <<16 <<12 <<8 <<4
+
+ // int[] table = new int[16*16];
+ return get_AND_AND();
+ }
+
+ public static final int[] get_PLUS(){
+
+ //the code is an int
+ // (cast) left Op (cast) rigth --> result
+ // 0000 0000 0000 0000 0000
+ // <<16 <<12 <<8 <<4
+
+ int[] table = new int[16*16];
+
+ // table[(T_undefined<<4)+T_undefined] = T_undefined;
+ // table[(T_undefined<<4)+T_byte] = T_undefined;
+ // table[(T_undefined<<4)+T_long] = T_undefined;
+ // table[(T_undefined<<4)+T_short] = T_undefined;
+ // table[(T_undefined<<4)+T_void] = T_undefined;
+ // table[(T_undefined<<4)+T_String] = T_undefined;
+ // table[(T_undefined<<4)+T_Object] = T_undefined;
+ // table[(T_undefined<<4)+T_double] = T_undefined;
+ // table[(T_undefined<<4)+T_float] = T_undefined;
+ // table[(T_undefined<<4)+T_boolean] = T_undefined;
+ // table[(T_undefined<<4)+T_char] = T_undefined;
+ // table[(T_undefined<<4)+T_int] = T_undefined;
+ // table[(T_undefined<<4)+T_null] = T_undefined;
+
+ // table[(T_byte<<4)+T_undefined] = T_undefined;
+ table[(T_byte<<4)+T_byte] = (Byte2Int<<12)+(Byte2Int<<4)+T_int;
+ table[(T_byte<<4)+T_long] = (Byte2Long<<12)+(Long2Long<<4)+T_long;
+ table[(T_byte<<4)+T_short] = (Byte2Int<<12)+(Short2Int<<4)+T_int;
+ // table[(T_byte<<4)+T_void] = T_undefined;
+ table[(T_byte<<4)+T_String] = (Byte2Byte<<12)+(String2String<<4)+T_String;
+ // table[(T_byte<<4)+T_Object] = T_undefined;
+ table[(T_byte<<4)+T_double] = (Byte2Double<<12)+(Double2Double<<4)+T_double;
+ table[(T_byte<<4)+T_float] = (Byte2Float<<12)+(Float2Float<<4)+T_float;
+ // table[(T_byte<<4)+T_boolean] = T_undefined;
+ table[(T_byte<<4)+T_char] = (Byte2Int<<12)+(Char2Int<<4)+T_int;
+ table[(T_byte<<4)+T_int] = (Byte2Int<<12)+(Int2Int<<4)+T_int;
+ // table[(T_byte<<4)+T_null] = T_undefined;
+
+ // table[(T_long<<4)+T_undefined] = T_undefined;
+ table[(T_long<<4)+T_byte] = (Long2Long<<12)+(Byte2Long<<4)+T_long;
+ table[(T_long<<4)+T_long] = (Long2Long<<12)+(Long2Long<<4)+T_long;
+ table[(T_long<<4)+T_short] = (Long2Long<<12)+(Short2Long<<4)+T_long;
+ // table[(T_long<<4)+T_void] = T_undefined;
+ table[(T_long<<4)+T_String] = (Long2Long<<12)+(String2String<<4)+T_String;
+ // table[(T_long<<4)+T_Object] = T_undefined;
+ table[(T_long<<4)+T_double] = (Long2Double<<12)+(Double2Double<<4)+T_double;
+ table[(T_long<<4)+T_float] = (Long2Float<<12)+(Float2Float<<4)+T_float;
+ // table[(T_long<<4)+T_boolean] = T_undefined;
+ table[(T_long<<4)+T_char] = (Long2Long<<12)+(Char2Long<<4)+T_long;
+ table[(T_long<<4)+T_int] = (Long2Long<<12)+(Int2Long<<4)+T_long;
+ // table[(T_long<<4)+T_null] = T_undefined;
+
+ // table[(T_short<<4)+T_undefined] = T_undefined;
+ table[(T_short<<4)+T_byte] = (Short2Int<<12)+(Byte2Int<<4)+T_int;
+ table[(T_short<<4)+T_long] = (Short2Long<<12)+(Long2Long<<4)+T_long;
+ table[(T_short<<4)+T_short] = (Short2Int<<12)+(Short2Int<<4)+T_int;
+ // table[(T_short<<4)+T_void] = T_undefined;
+ table[(T_short<<4)+T_String] = (Short2Short<<12)+(String2String<<4)+T_String;
+ // table[(T_short<<4)+T_Object] = T_undefined;
+ table[(T_short<<4)+T_double] = (Short2Double<<12)+(Double2Double<<4)+T_double;
+ table[(T_short<<4)+T_float] = (Short2Float<<12)+(Float2Float<<4)+T_float;
+ // table[(T_short<<4)+T_boolean] = T_undefined;
+ table[(T_short<<4)+T_char] = (Short2Int<<12)+(Char2Int<<4)+T_int;
+ table[(T_short<<4)+T_int] = (Short2Int<<12)+(Int2Int<<4)+T_int;
+ // table[(T_short<<4)+T_null] = T_undefined;
+
+ // table[(T_void<<4)+T_undefined] = T_undefined;
+ // table[(T_void<<4)+T_byte] = T_undefined;
+ // table[(T_void<<4)+T_long] = T_undefined;
+ // table[(T_void<<4)+T_short] = T_undefined;
+ // table[(T_void<<4)+T_void] = T_undefined;
+ // table[(T_void<<4)+T_String] = T_undefined;
+ // table[(T_void<<4)+T_Object] = T_undefined;
+ // table[(T_void<<4)+T_double] = T_undefined;
+ // table[(T_void<<4)+T_float] = T_undefined;
+ // table[(T_void<<4)+T_boolean] = T_undefined;
+ // table[(T_void<<4)+T_char] = T_undefined;
+ // table[(T_void<<4)+T_int] = T_undefined;
+ // table[(T_void<<4)+T_null] = T_undefined;
+
+ // table[(T_String<<4)+T_undefined] = T_undefined;
+ table[(T_String<<4)+T_byte] = (String2String<<12)+(Byte2Byte<<4)+T_String;
+ table[(T_String<<4)+T_long] = (String2String<<12)+(Long2Long<<4)+T_String;
+ table[(T_String<<4)+T_short] = (String2String<<12)+(Short2Short<<4)+T_String;
+ // table[(T_String<<4)+T_void] = T_undefined;
+ table[(T_String<<4)+T_String] = (String2String<<12)+(String2String<<4)+T_String;
+ table[(T_String<<4)+T_Object] = (String2String<<12)+(Object2Object<<4)+T_String;
+ table[(T_String<<4)+T_double] = (String2String<<12)+(Double2Double<<4)+T_String;
+ table[(T_String<<4)+T_float] = (String2String<<12)+(Float2Float<<4)+T_String;
+ table[(T_String<<4)+T_boolean] = (String2String<<12)+(Boolean2Boolean<<4)+T_String;
+ table[(T_String<<4)+T_char] = (String2String<<12)+(Char2Char<<4)+T_String;
+ table[(T_String<<4)+T_int] = (String2String<<12)+(Int2Int<<4)+T_String;
+ table[(T_String<<4)+T_null] = (String2String<<12)+(T_null<<8)+(T_null<<4)+T_String;
+
+ // table[(T_Object<<4)+T_undefined] = T_undefined;
+ // table[(T_Object<<4)+T_byte] = T_undefined;
+ // table[(T_Object<<4)+T_long] = T_undefined;
+ // table[(T_Object<<4)+T_short] = T_undefined;
+ // table[(T_Object<<4)+T_void] = T_undefined;
+ table[(T_Object<<4)+T_String] = (Object2Object<<12)+(String2String<<4)+T_String;
+ // table[(T_Object<<4)+T_Object] = T_undefined;
+ // table[(T_Object<<4)+T_double] = T_undefined;
+ // table[(T_Object<<4)+T_float] = T_undefined;
+ // table[(T_Object<<4)+T_boolean] = T_undefined;
+ // table[(T_Object<<4)+T_char] = T_undefined;
+ // table[(T_Object<<4)+T_int] = T_undefined;
+ // table[(T_Object<<4)+T_null] = T_undefined;
+
+ // table[(T_double<<4)+T_undefined] = T_undefined;
+ table[(T_double<<4)+T_byte] = (Double2Double<<12)+(Byte2Double<<4)+T_double;
+ table[(T_double<<4)+T_long] = (Double2Double<<12)+(Long2Double<<4)+T_double;
+ table[(T_double<<4)+T_short] = (Double2Double<<12)+(Short2Double<<4)+T_double;
+ // table[(T_double<<4)+T_void] = T_undefined;
+ table[(T_double<<4)+T_String] = (Double2Double<<12)+(String2String<<4)+T_String;
+ // table[(T_double<<4)+T_Object] = T_undefined;
+ table[(T_double<<4)+T_double] = (Double2Double<<12)+(Double2Double<<4)+T_double;
+ table[(T_double<<4)+T_float] = (Double2Double<<12)+(Float2Double<<4)+T_double;
+ // table[(T_double<<4)+T_boolean] = T_undefined;
+ table[(T_double<<4)+T_char] = (Double2Double<<12)+(Char2Double<<4)+T_double;
+ table[(T_double<<4)+T_int] = (Double2Double<<12)+(Int2Double<<4)+T_double;
+ // table[(T_double<<4)+T_null] = T_undefined;
+
+ // table[(T_float<<4)+T_undefined] = T_undefined;
+ table[(T_float<<4)+T_byte] = (Float2Float<<12)+(Byte2Float<<4)+T_float;
+ table[(T_float<<4)+T_long] = (Float2Float<<12)+(Long2Float<<4)+T_float;
+ table[(T_float<<4)+T_short] = (Float2Float<<12)+(Short2Float<<4)+T_float;
+ // table[(T_float<<4)+T_void] = T_undefined;
+ table[(T_float<<4)+T_String] = (Float2Float<<12)+(String2String<<4)+T_String;
+ // table[(T_float<<4)+T_Object] = T_undefined;
+ table[(T_float<<4)+T_double] = (Float2Double<<12)+(Double2Double<<4)+T_double;
+ table[(T_float<<4)+T_float] = (Float2Float<<12)+(Float2Float<<4)+T_float;
+ // table[(T_float<<4)+T_boolean] = T_undefined;
+ table[(T_float<<4)+T_char] = (Float2Float<<12)+(Char2Float<<4)+T_float;
+ table[(T_float<<4)+T_int] = (Float2Float<<12)+(Int2Float<<4)+T_float;
+ // table[(T_float<<4)+T_null] = T_undefined;
+
+ // table[(T_boolean<<4)+T_undefined] = T_undefined;
+ // table[(T_boolean<<4)+T_byte] = T_undefined;
+ // table[(T_boolean<<4)+T_long] = T_undefined;
+ // table[(T_boolean<<4)+T_short] = T_undefined;
+ // table[(T_boolean<<4)+T_void] = T_undefined;
+ table[(T_boolean<<4)+T_String] = (Boolean2Boolean<<12)+(String2String<<4)+T_String;
+ // table[(T_boolean<<4)+T_Object] = T_undefined;
+ // table[(T_boolean<<4)+T_double] = T_undefined;
+ // table[(T_boolean<<4)+T_float] = T_undefined;
+ // table[(T_boolean<<4)+T_boolean] = T_undefined;
+ // table[(T_boolean<<4)+T_char] = T_undefined;
+ // table[(T_boolean<<4)+T_int] = T_undefined;
+ // table[(T_boolean<<4)+T_null] = T_undefined;
+
+ // table[(T_char<<4)+T_undefined] = T_undefined;
+ table[(T_char<<4)+T_byte] = (Char2Int<<12)+(Byte2Int<<4)+T_int;
+ table[(T_char<<4)+T_long] = (Char2Long<<12)+(Long2Long<<4)+T_long;
+ table[(T_char<<4)+T_short] = (Char2Int<<12)+(Short2Int<<4)+T_int;
+ // table[(T_char<<4)+T_void] = T_undefined;
+ table[(T_char<<4)+T_String] = (Char2Char<<12)+(String2String<<4)+T_String;
+ // table[(T_char<<4)+T_Object] = T_undefined;
+ table[(T_char<<4)+T_double] = (Char2Double<<12)+(Double2Double<<4)+T_double;
+ table[(T_char<<4)+T_float] = (Char2Float<<12)+(Float2Float<<4)+T_float;
+ // table[(T_char<<4)+T_boolean] = T_undefined;
+ table[(T_char<<4)+T_char] = (Char2Int<<12)+(Char2Int<<4)+T_int;
+ table[(T_char<<4)+T_int] = (Char2Int<<12)+(Int2Int<<4)+T_int;
+ // table[(T_char<<4)+T_null] = T_undefined;
+
+ // table[(T_int<<4)+T_undefined] = T_undefined;
+ table[(T_int<<4)+T_byte] = (Int2Int<<12)+(Byte2Int<<4)+T_int;
+ table[(T_int<<4)+T_long] = (Int2Long<<12)+(Long2Long<<4)+T_long;
+ table[(T_int<<4)+T_short] = (Int2Int<<12)+(Short2Int<<4)+T_int;
+ // table[(T_int<<4)+T_void] = T_undefined;
+ table[(T_int<<4)+T_String] = (Int2Int<<12)+(String2String<<4)+T_String;
+ // table[(T_int<<4)+T_Object] = T_undefined;
+ table[(T_int<<4)+T_double] = (Int2Double<<12)+(Double2Double<<4)+T_double;
+ table[(T_int<<4)+T_float] = (Int2Float<<12)+(Float2Float<<4)+T_float;
+ // table[(T_int<<4)+T_boolean] = T_undefined;
+ table[(T_int<<4)+T_char] = (Int2Int<<12)+(Char2Int<<4)+T_int;
+ table[(T_int<<4)+T_int] = (Int2Int<<12)+(Int2Int<<4)+T_int;
+ // table[(T_int<<4)+T_null] = T_undefined;
+
+ // table[(T_null<<4)+T_undefined] = T_undefined;
+ // table[(T_null<<4)+T_byte] = T_undefined;
+ // table[(T_null<<4)+T_long] = T_undefined;
+ // table[(T_null<<4)+T_short] = T_undefined;
+ // table[(T_null<<4)+T_void] = T_undefined;
+ table[(T_null<<4)+T_String] = (T_null<<16)+(T_null<<12)+(String2String<<4)+T_String;
+ // table[(T_null<<4)+T_Object] = T_undefined;
+ // table[(T_null<<4)+T_double] = T_undefined;
+ // table[(T_null<<4)+T_float] = T_undefined;
+ // table[(T_null<<4)+T_boolean] = T_undefined;
+ // table[(T_null<<4)+T_char] = T_undefined;
+ // table[(T_null<<4)+T_int] = T_undefined;
+ // table[(T_null<<4)+T_null] = (Null2String<<12)+(Null2String<<4)+T_String;;
+
+ return table;
+ }
+
+ public static final int[] get_REMAINDER(){
+
+ //the code is an int
+ // (cast) left Op (cast) rigth --> result
+ // 0000 0000 0000 0000 0000
+ // <<16 <<12 <<8 <<4
+
+ // int[] table = new int[16*16];
+ return get_MINUS();
+ }
+
+ public static final int[] get_RIGHT_SHIFT(){
+
+ //the code is an int
+ // (cast) left Op (cast) rigth --> result
+ // 0000 0000 0000 0000 0000
+ // <<16 <<12 <<8 <<4
+
+ // int[] table = new int[16*16];
+ return get_LEFT_SHIFT();
+ }
+
+ public static final int[] get_UNSIGNED_RIGHT_SHIFT(){
+
+ //the code is an int
+ // (cast) left Op (cast) rigth --> result
+ // 0000 0000 0000 0000 0000
+ // <<16 <<12 <<8 <<4
+
+ // int[] table = new int[16*16];
+ return get_LEFT_SHIFT();
+ }
+
+ public static final int[] get_XOR(){
+
+ //the code is an int
+ // (cast) left Op (cast) rigth --> result
+ // 0000 0000 0000 0000 0000
+ // <<16 <<12 <<8 <<4
+
+ // int[] table = new int[16*16];
+ return get_AND();
+ }
+
+ public String operatorToString() {
+ switch ((bits & OperatorMASK) >> OperatorSHIFT) {
+ case EQUAL_EQUAL :
+ return "=="; //$NON-NLS-1$
+ case LESS_EQUAL :
+ return "<="; //$NON-NLS-1$
+ case GREATER_EQUAL :
+ return ">="; //$NON-NLS-1$
+ case NOT_EQUAL :
+ return "!="; //$NON-NLS-1$
+ case LEFT_SHIFT :
+ return "<<"; //$NON-NLS-1$
+ case RIGHT_SHIFT :
+ return ">>"; //$NON-NLS-1$
+ case UNSIGNED_RIGHT_SHIFT :
+ return ">>>"; //$NON-NLS-1$
+ case OR_OR :
+ return "||"; //$NON-NLS-1$
+ case AND_AND :
+ return "&&"; //$NON-NLS-1$
+ case PLUS :
+ return "+"; //$NON-NLS-1$
+ case MINUS :
+ return "-"; //$NON-NLS-1$
+ case NOT :
+ return "!"; //$NON-NLS-1$
+ case REMAINDER :
+ return "%"; //$NON-NLS-1$
+ case XOR :
+ return "^"; //$NON-NLS-1$
+ case AND :
+ return "&"; //$NON-NLS-1$
+ case MULTIPLY :
+ return "*"; //$NON-NLS-1$
+ case OR :
+ return "|"; //$NON-NLS-1$
+ case TWIDDLE :
+ return "~"; //$NON-NLS-1$
+ case DIVIDE :
+ return "/"; //$NON-NLS-1$
+ case GREATER :
+ return ">"; //$NON-NLS-1$
+ case LESS :
+ return "<"; //$NON-NLS-1$
+ case QUESTIONCOLON :
+ return "?:"; //$NON-NLS-1$
+ case EQUAL :
+ return "="; //$NON-NLS-1$
+ }
+ return "unknown operator"; //$NON-NLS-1$
+ }
+
+ public StringBuffer printExpression(int indent, StringBuffer output){
+
+ output.append('(');
+ return printExpressionNoParenthesis(0, output).append(')');
+ }
+
+ public abstract StringBuffer printExpressionNoParenthesis(int indent, StringBuffer output);
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/OperatorIds.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/OperatorIds.js
new file mode 100644
index 0000000..058d6b5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/OperatorIds.js
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+public interface OperatorIds {
+ public static final int AND_AND = 0;
+ public static final int OR_OR = 1;
+ public static final int AND = 2;
+ public static final int OR = 3;
+ public static final int LESS = 4;
+ public static final int LESS_EQUAL = 5;
+ public static final int GREATER = 6;
+ public static final int GREATER_EQUAL = 7;
+ public static final int XOR = 8;
+ public static final int DIVIDE = 9;
+ public static final int LEFT_SHIFT = 10;
+ public static final int NOT = 11;
+ public static final int TWIDDLE = 12;
+ public static final int MINUS = 13;
+ public static final int PLUS = 14;
+ public static final int MULTIPLY = 15;
+ public static final int REMAINDER = 16;
+ public static final int RIGHT_SHIFT = 17;
+ public static final int EQUAL_EQUAL = 18;
+ public static final int UNSIGNED_RIGHT_SHIFT= 19;
+ public static final int NumberOfTables = 20;
+
+ public static final int QUESTIONCOLON = 23;
+
+ public static final int NOT_EQUAL = 29;
+ public static final int EQUAL = 30;
+ public static final int INSTANCEOF = 31;
+ public static final int PLUS_PLUS = 32;
+ public static final int MINUS_MINUS = 33;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.js
new file mode 100644
index 0000000..cf82dca
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.js
@@ -0,0 +1,287 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+/**
+ * Syntactic representation of a reference to a generic type.
+ * Note that it might also have a dimension.
+ */
+public class ParameterizedQualifiedTypeReference extends ArrayQualifiedTypeReference {
+
+ public TypeReference[][] typeArguments;
+ private boolean didResolve = false;
+
+ /**
+ * @param tokens
+ * @param dim
+ * @param positions
+ */
+ public ParameterizedQualifiedTypeReference(char[][] tokens, TypeReference[][] typeArguments, int dim, long[] positions) {
+
+ super(tokens, dim, positions);
+ this.typeArguments = typeArguments;
+ }
+ public void checkBounds(Scope scope) {
+ if (this.resolvedType == null) return;
+
+ checkBounds(
+ (ReferenceBinding) this.resolvedType.leafComponentType(),
+ scope,
+ this.typeArguments.length - 1);
+ }
+ public void checkBounds(ReferenceBinding type, Scope scope, int index) {
+ if (type.enclosingType() != null)
+ checkBounds(type.enclosingType(), scope, index - 1);
+
+ if (type.isParameterizedType()) {
+ ParameterizedTypeBinding parameterizedType = (ParameterizedTypeBinding) type;
+ ReferenceBinding currentType = parameterizedType.type;
+ TypeVariableBinding[] typeVariables = currentType.typeVariables();
+ TypeBinding[] argTypes = parameterizedType.arguments;
+ if (argTypes != null && typeVariables != null) { // argTypes may be null in error cases
+ for (int i = 0, argLength = typeVariables.length; i < argLength; i++)
+ if (!typeVariables[i].boundCheck(parameterizedType, argTypes[i]))
+ scope.problemReporter().typeMismatchError(argTypes[i], typeVariables[i], currentType, this.typeArguments[index][i]);
+ }
+ }
+ }
+ public TypeReference copyDims(int dim){
+ //return a type reference copy of me with some dimensions
+ //warning : the new type ref has a null binding
+ this.dimensions = dim;
+ return this;
+ }
+
+ /**
+ * @return char[][]
+ */
+ public char [][] getParameterizedTypeName(){
+ int length = this.tokens.length;
+ char[][] qParamName = new char[length][];
+ for (int i = 0; i < length; i++) {
+ TypeReference[] arguments = this.typeArguments[i];
+ if (arguments == null) {
+ qParamName[i] = this.tokens[i];
+ } else {
+ StringBuffer buffer = new StringBuffer(5);
+ buffer.append(this.tokens[i]);
+ buffer.append('<');
+ for (int j = 0, argLength =arguments.length; j < argLength; j++) {
+ if (j > 0) buffer.append(',');
+ buffer.append(CharOperation.concatWith(arguments[j].getParameterizedTypeName(), '.'));
+ }
+ buffer.append('>');
+ int nameLength = buffer.length();
+ qParamName[i] = new char[nameLength];
+ buffer.getChars(0, nameLength, qParamName[i], 0);
+ }
+ }
+ int dim = this.dimensions;
+ if (dim > 0) {
+ char[] dimChars = new char[dim*2];
+ for (int i = 0; i < dim; i++) {
+ int index = i*2;
+ dimChars[index] = '[';
+ dimChars[index+1] = ']';
+ }
+ qParamName[length-1] = CharOperation.concat(qParamName[length-1], dimChars);
+ }
+ return qParamName;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.ArrayQualifiedTypeReference#getTypeBinding(org.eclipse.wst.jsdt.internal.compiler.lookup.Scope)
+ */
+ protected TypeBinding getTypeBinding(Scope scope) {
+ return null; // not supported here - combined with resolveType(...)
+ }
+
+ /*
+ * No need to check for reference to raw type per construction
+ */
+ private TypeBinding internalResolveType(Scope scope) {
+
+ // handle the error here
+ this.constant = NotAConstant;
+ if (this.didResolve) { // is a shared type reference which was already resolved
+ if (this.resolvedType != null && !this.resolvedType.isValidBinding())
+ return null; // already reported error
+ return this.resolvedType;
+ }
+ this.didResolve = true;
+ Binding binding = scope.getPackage(this.tokens);
+ if (binding != null && !binding.isValidBinding()) {
+ this.resolvedType = (ReferenceBinding) binding;
+ reportInvalidType(scope);
+ return null;
+ }
+
+ PackageBinding packageBinding = binding == null ? null : (PackageBinding) binding;
+ boolean isClassScope = scope.kind == Scope.CLASS_SCOPE;
+ boolean typeIsConsistent = true;
+ ReferenceBinding qualifiedType = null;
+ for (int i = packageBinding == null ? 0 : packageBinding.compoundName.length, max = this.tokens.length; i < max; i++) {
+ findNextTypeBinding(i, scope, packageBinding);
+ if (!(this.resolvedType.isValidBinding())) {
+ reportInvalidType(scope);
+ return null;
+ }
+ ReferenceBinding currentType = (ReferenceBinding) this.resolvedType;
+ if (typeIsConsistent && currentType.isStatic() && qualifiedType != null && (qualifiedType.isParameterizedType() || qualifiedType.isGenericType())) {
+ scope.problemReporter().staticMemberOfParameterizedType(this, scope.createParameterizedType(currentType, null, qualifiedType));
+ typeIsConsistent = false;
+ }
+ // check generic and arity
+ TypeReference[] args = this.typeArguments[i];
+ if (args != null) {
+ int argLength = args.length;
+ TypeBinding[] argTypes = new TypeBinding[argLength];
+ boolean argHasError = false;
+ for (int j = 0; j < argLength; j++) {
+ TypeReference arg = args[j];
+ TypeBinding argType = isClassScope
+ ? arg.resolveTypeArgument((ClassScope) scope, currentType, j)
+ : arg.resolveTypeArgument((BlockScope) scope, currentType, j);
+ if (argType == null) {
+ argHasError = true;
+ } else {
+ argTypes[j] = argType;
+ }
+ }
+ if (argHasError) return null;
+// TODO (philippe) if ((this.bits & ASTNode.IsSuperType) != 0)
+ if (isClassScope)
+ if (((ClassScope) scope).detectCycle(currentType, this, argTypes))
+ return null;
+
+ TypeVariableBinding[] typeVariables = currentType.typeVariables();
+ if (typeVariables == NoTypeVariables) { // check generic
+ scope.problemReporter().nonGenericTypeCannotBeParameterized(this, currentType, argTypes);
+ return null;
+ } else if (argLength != typeVariables.length) { // check arity
+ scope.problemReporter().incorrectArityForParameterizedType(this, currentType, argTypes);
+ return null;
+ }
+ // check parameterizing non-static member type of raw type
+ if (typeIsConsistent && !currentType.isStatic() && qualifiedType != null && qualifiedType.isRawType()) {
+ scope.problemReporter().rawMemberTypeCannotBeParameterized(
+ this, scope.environment().createRawType(currentType, qualifiedType), argTypes);
+ typeIsConsistent = false;
+ }
+ ParameterizedTypeBinding parameterizedType = scope.createParameterizedType(currentType, argTypes, qualifiedType);
+ // check argument type compatibility now if not a class scope
+ if (!isClassScope) // otherwise will do it in Scope.connectTypeVariables()
+ for (int j = 0; j < argLength; j++)
+ if (!typeVariables[j].boundCheck(parameterizedType, argTypes[j]))
+ scope.problemReporter().typeMismatchError(argTypes[j], typeVariables[j], currentType, args[j]);
+ qualifiedType = parameterizedType;
+ } else {
+// TODO (philippe) if ((this.bits & ASTNode.IsSuperType) != 0)
+ if (isClassScope)
+ if (((ClassScope) scope).detectCycle(currentType, this, null))
+ return null;
+ if (currentType.isGenericType()) {
+ if (typeIsConsistent && qualifiedType != null && qualifiedType.isParameterizedType()) {
+ scope.problemReporter().parameterizedMemberTypeMissingArguments(this, scope.createParameterizedType(currentType, null, qualifiedType));
+ typeIsConsistent = false;
+ }
+ qualifiedType = scope.environment().createRawType(currentType, qualifiedType); // raw type
+ } else {
+ qualifiedType = (qualifiedType != null && qualifiedType.isParameterizedType())
+ ? scope.createParameterizedType(currentType, null, qualifiedType)
+ : currentType;
+ }
+ }
+ }
+ this.resolvedType = qualifiedType;
+ if (isTypeUseDeprecated(this.resolvedType, scope))
+ reportDeprecatedType(scope);
+ // array type ?
+ if (this.dimensions > 0) {
+ if (dimensions > 255)
+ scope.problemReporter().tooManyDimensions(this);
+ this.resolvedType = scope.createArrayType(this.resolvedType, dimensions);
+ }
+ return this.resolvedType;
+ }
+
+ public StringBuffer printExpression(int indent, StringBuffer output) {
+ int length = tokens.length;
+ for (int i = 0; i < length - 1; i++) {
+ output.append(tokens[i]);
+ TypeReference[] typeArgument = typeArguments[i];
+ if (typeArgument != null) {
+ output.append('<');//$NON-NLS-1$
+ int max = typeArgument.length - 1;
+ for (int j = 0; j < max; j++) {
+ typeArgument[j].print(0, output);
+ output.append(", ");//$NON-NLS-1$
+ }
+ typeArgument[max].print(0, output);
+ output.append('>');
+ }
+ output.append('.');
+ }
+ output.append(tokens[length - 1]);
+ TypeReference[] typeArgument = typeArguments[length - 1];
+ if (typeArgument != null) {
+ output.append('<');//$NON-NLS-1$
+ int max = typeArgument.length - 1;
+ for (int j = 0; j < max; j++) {
+ typeArgument[j].print(0, output);
+ output.append(", ");//$NON-NLS-1$
+ }
+ typeArgument[max].print(0, output);
+ output.append('>');
+ }
+ for (int i= 0 ; i < dimensions ; i++) {
+ output.append("[]"); //$NON-NLS-1$
+ }
+ return output;
+ }
+
+ public TypeBinding resolveType(BlockScope scope) {
+ return internalResolveType(scope);
+ }
+ public TypeBinding resolveType(ClassScope scope) {
+ return internalResolveType(scope);
+ }
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+ if (visitor.visit(this, scope)) {
+ for (int i = 0, max = this.typeArguments.length; i < max; i++) {
+ if (this.typeArguments[i] != null) {
+ for (int j = 0, max2 = this.typeArguments[i].length; j < max2; j++) {
+ this.typeArguments[i][j].traverse(visitor, scope);
+ }
+ }
+ }
+ }
+ visitor.endVisit(this, scope);
+ }
+
+ public void traverse(ASTVisitor visitor, ClassScope scope) {
+ if (visitor.visit(this, scope)) {
+ for (int i = 0, max = this.typeArguments.length; i < max; i++) {
+ if (this.typeArguments[i] != null) {
+ for (int j = 0, max2 = this.typeArguments[i].length; j < max2; j++) {
+ this.typeArguments[i][j].traverse(visitor, scope);
+ }
+ }
+ }
+ }
+ visitor.endVisit(this, scope);
+ }
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ParameterizedSingleTypeReference.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ParameterizedSingleTypeReference.js
new file mode 100644
index 0000000..5b71c59
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ParameterizedSingleTypeReference.js
@@ -0,0 +1,217 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+/**
+ * Syntactic representation of a reference to a generic type.
+ * Note that it might also have a dimension.
+ */
+public class ParameterizedSingleTypeReference extends ArrayTypeReference {
+
+ public TypeReference[] typeArguments;
+ private boolean didResolve = false;
+
+ public ParameterizedSingleTypeReference(char[] name, TypeReference[] typeArguments, int dim, long pos){
+ super(name, dim, pos);
+ this.typeArguments = typeArguments;
+ }
+ public void checkBounds(Scope scope) {
+ if (this.resolvedType == null) return;
+
+ if (this.resolvedType.leafComponentType() instanceof ParameterizedTypeBinding) {
+ ParameterizedTypeBinding parameterizedType = (ParameterizedTypeBinding) this.resolvedType.leafComponentType();
+ ReferenceBinding currentType = parameterizedType.type;
+ TypeVariableBinding[] typeVariables = currentType.typeVariables();
+ TypeBinding[] argTypes = parameterizedType.arguments;
+ if (argTypes != null && typeVariables != null) { // may be null in error cases
+ for (int i = 0, argLength = typeVariables.length; i < argLength; i++)
+ if (!typeVariables[i].boundCheck(parameterizedType, argTypes[i]))
+ scope.problemReporter().typeMismatchError(argTypes[i], typeVariables[i], currentType, this.typeArguments[i]);
+ }
+ }
+ }
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.TypeReference#copyDims(int)
+ */
+ public TypeReference copyDims(int dim) {
+ this.dimensions = dim;
+ return this;
+ }
+
+ /**
+ * @return char[][]
+ */
+ public char [][] getParameterizedTypeName(){
+ StringBuffer buffer = new StringBuffer(5);
+ buffer.append(this.token).append('<');
+ for (int i = 0, length = this.typeArguments.length; i < length; i++) {
+ if (i > 0) buffer.append(',');
+ buffer.append(CharOperation.concatWith(this.typeArguments[i].getParameterizedTypeName(), '.'));
+ }
+ buffer.append('>');
+ int nameLength = buffer.length();
+ char[] name = new char[nameLength];
+ buffer.getChars(0, nameLength, name, 0);
+ int dim = this.dimensions;
+ if (dim > 0) {
+ char[] dimChars = new char[dim*2];
+ for (int i = 0; i < dim; i++) {
+ int index = i*2;
+ dimChars[index] = '[';
+ dimChars[index+1] = ']';
+ }
+ name = CharOperation.concat(name, dimChars);
+ }
+ return new char[][]{ name };
+ }
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.ArrayQualifiedTypeReference#getTypeBinding(org.eclipse.wst.jsdt.internal.compiler.lookup.Scope)
+ */
+ protected TypeBinding getTypeBinding(Scope scope) {
+ return null; // not supported here - combined with resolveType(...)
+ }
+
+ /*
+ * No need to check for reference to raw type per construction
+ */
+ private TypeBinding internalResolveType(Scope scope, ReferenceBinding enclosingType) {
+
+ // handle the error here
+ this.constant = NotAConstant;
+ if (this.didResolve) { // is a shared type reference which was already resolved
+ if (this.resolvedType != null && !this.resolvedType.isValidBinding())
+ return null; // already reported error
+ return this.resolvedType;
+ }
+ this.didResolve = true;
+ if (enclosingType == null) {
+ this.resolvedType = scope.getType(token);
+ if (!(this.resolvedType.isValidBinding())) {
+ reportInvalidType(scope);
+ return null;
+ }
+ } else { // resolving member type (relatively to enclosingType)
+ this.resolvedType = scope.getMemberType(token, (ReferenceBinding)enclosingType.erasure());
+ if (!this.resolvedType.isValidBinding()) {
+ scope.problemReporter().invalidEnclosingType(this, this.resolvedType, enclosingType);
+ return null;
+ }
+ if (isTypeUseDeprecated(this.resolvedType, scope))
+ scope.problemReporter().deprecatedType(this.resolvedType, this);
+ }
+
+ // check generic and arity
+ boolean isClassScope = scope.kind == Scope.CLASS_SCOPE;
+ ReferenceBinding currentType = (ReferenceBinding) this.resolvedType;
+ int argLength = this.typeArguments.length;
+ TypeBinding[] argTypes = new TypeBinding[argLength];
+ boolean argHasError = false;
+ for (int i = 0; i < argLength; i++) {
+ TypeReference typeArgument = this.typeArguments[i];
+ TypeBinding argType = isClassScope
+ ? typeArgument.resolveTypeArgument((ClassScope) scope, currentType, i)
+ : typeArgument.resolveTypeArgument((BlockScope) scope, currentType, i);
+ if (argType == null) {
+ argHasError = true;
+ } else {
+ argTypes[i] = argType;
+ }
+ }
+ if (argHasError) return null;
+// TODO (philippe) if ((this.bits & ASTNode.IsSuperType) != 0)
+ if (isClassScope)
+ if (((ClassScope) scope).detectCycle(currentType, this, argTypes))
+ return null;
+
+ TypeVariableBinding[] typeVariables = currentType.typeVariables();
+ if (typeVariables == NoTypeVariables) { // check generic
+ scope.problemReporter().nonGenericTypeCannotBeParameterized(this, currentType, argTypes);
+ return null;
+ } else if (argLength != typeVariables.length) { // check arity
+ scope.problemReporter().incorrectArityForParameterizedType(this, currentType, argTypes);
+ return null;
+ }
+ // if generic type X<T> is referred to as parameterized X<T>, then answer itself
+ checkGeneric: {
+ for (int i = 0; i < argLength; i++)
+ if (typeVariables[i] != argTypes[i])
+ break checkGeneric;
+ return currentType;
+ }
+ ParameterizedTypeBinding parameterizedType = scope.createParameterizedType(currentType, argTypes, enclosingType);
+ // check argument type compatibility now if not a class scope
+ if (!isClassScope) // otherwise will do it in Scope.connectTypeVariables()
+ for (int i = 0; i < argLength; i++)
+ if (!typeVariables[i].boundCheck(parameterizedType, argTypes[i]))
+ scope.problemReporter().typeMismatchError(argTypes[i], typeVariables[i], currentType, this.typeArguments[i]);
+
+ this.resolvedType = parameterizedType;
+ if (isTypeUseDeprecated(this.resolvedType, scope))
+ reportDeprecatedType(scope);
+ // array type ?
+ if (this.dimensions > 0) {
+ if (dimensions > 255)
+ scope.problemReporter().tooManyDimensions(this);
+ this.resolvedType = scope.createArrayType(parameterizedType, dimensions);
+ }
+ return this.resolvedType;
+ }
+
+ public StringBuffer printExpression(int indent, StringBuffer output){
+ output.append(token);
+ output.append("<"); //$NON-NLS-1$
+ int max = typeArguments.length - 1;
+ for (int i= 0; i < max; i++) {
+ typeArguments[i].print(0, output);
+ output.append(", ");//$NON-NLS-1$
+ }
+ typeArguments[max].print(0, output);
+ output.append(">"); //$NON-NLS-1$
+ for (int i= 0 ; i < dimensions ; i++) {
+ output.append("[]"); //$NON-NLS-1$
+ }
+ return output;
+ }
+
+ public TypeBinding resolveType(BlockScope scope) {
+ return internalResolveType(scope, null);
+ }
+
+ public TypeBinding resolveType(ClassScope scope) {
+ return internalResolveType(scope, null);
+ }
+
+ public TypeBinding resolveTypeEnclosing(BlockScope scope, ReferenceBinding enclosingType) {
+ return internalResolveType(scope, enclosingType);
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+ if (visitor.visit(this, scope)) {
+ for (int i = 0, max = this.typeArguments.length; i < max; i++) {
+ this.typeArguments[i].traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, scope);
+ }
+
+ public void traverse(ASTVisitor visitor, ClassScope scope) {
+ if (visitor.visit(this, scope)) {
+ for (int i = 0, max = this.typeArguments.length; i < max; i++) {
+ this.typeArguments[i].traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/PostfixExpression.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/PostfixExpression.js
new file mode 100644
index 0000000..e04c73f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/PostfixExpression.js
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class PostfixExpression extends CompoundAssignment {
+
+ public PostfixExpression(Expression l, Expression e, int op, int pos) {
+
+ super(l, e, op, pos);
+ this.sourceStart = l.sourceStart;
+ this.sourceEnd = pos;
+ }
+
+ /**
+ * Code generation for PostfixExpression
+ *
+ * @param currentScope org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ * @param valueRequired boolean
+ */
+ public void generateCode(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ boolean valueRequired) {
+
+ // various scenarii are possible, setting an array reference,
+ // a field reference, a blank final field reference, a field of an enclosing instance or
+ // just a local variable.
+
+ int pc = codeStream.position;
+ ((Reference) lhs).generatePostIncrement(currentScope, codeStream, this, valueRequired);
+ if (valueRequired) {
+ codeStream.generateImplicitConversion(implicitConversion);
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+
+ public String operatorToString() {
+ switch (operator) {
+ case PLUS :
+ return "++"; //$NON-NLS-1$
+ case MINUS :
+ return "--"; //$NON-NLS-1$
+ }
+ return "unknown operator"; //$NON-NLS-1$
+ }
+
+ public StringBuffer printExpressionNoParenthesis(int indent, StringBuffer output) {
+
+ return lhs.printExpression(indent, output).append(' ').append(operatorToString());
+ }
+
+ public boolean restrainUsageToNumericTypes() {
+
+ return true;
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+
+ if (visitor.visit(this, scope)) {
+ lhs.traverse(visitor, scope);
+ }
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/PrefixExpression.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/PrefixExpression.js
new file mode 100644
index 0000000..5dedc57
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/PrefixExpression.js
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class PrefixExpression extends CompoundAssignment {
+
+ /**
+ * PrefixExpression constructor comment.
+ * @param l org.eclipse.wst.jsdt.internal.compiler.ast.Expression
+ * @param e org.eclipse.wst.jsdt.internal.compiler.ast.Expression
+ * @param op int
+ */
+ public PrefixExpression(Expression l, Expression e, int op, int pos) {
+
+ super(l, e, op, l.sourceEnd);
+ this.sourceStart = pos;
+ this.sourceEnd = l.sourceEnd;
+ }
+
+ public String operatorToString() {
+
+ switch (operator) {
+ case PLUS :
+ return "++"; //$NON-NLS-1$
+ case MINUS :
+ return "--"; //$NON-NLS-1$
+ }
+ return "unknown operator"; //$NON-NLS-1$
+ }
+
+ public StringBuffer printExpressionNoParenthesis(int indent, StringBuffer output) {
+
+ output.append(operatorToString()).append(' ');
+ return lhs.printExpression(0, output);
+ }
+
+ public boolean restrainUsageToNumericTypes() {
+
+ return true;
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+
+ if (visitor.visit(this, scope)) {
+ lhs.traverse(visitor, scope);
+ }
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/QualifiedAllocationExpression.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/QualifiedAllocationExpression.js
new file mode 100644
index 0000000..fad19f9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/QualifiedAllocationExpression.js
@@ -0,0 +1,359 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+/**
+ * Variation on allocation, where can optionally be specified any of:
+ * - leading enclosing instance
+ * - trailing anonymous type
+ * - generic type arguments for generic constructor invocation
+ */
+public class QualifiedAllocationExpression extends AllocationExpression {
+
+ //qualification may be on both side
+ public Expression enclosingInstance;
+ public TypeDeclaration anonymousType;
+ public ReferenceBinding superTypeBinding;
+
+ public QualifiedAllocationExpression() {
+ // for subtypes
+ }
+
+ public QualifiedAllocationExpression(TypeDeclaration anonymousType) {
+ this.anonymousType = anonymousType;
+ }
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ // analyse the enclosing instance
+ if (enclosingInstance != null) {
+ flowInfo = enclosingInstance.analyseCode(currentScope, flowContext, flowInfo);
+ }
+
+ // check captured variables are initialized in current context (26134)
+ checkCapturedLocalInitializationIfNecessary(
+ this.superTypeBinding == null ? this.binding.declaringClass : this.superTypeBinding,
+ currentScope,
+ flowInfo);
+
+ // process arguments
+ if (arguments != null) {
+ for (int i = 0, count = arguments.length; i < count; i++) {
+ flowInfo = arguments[i].analyseCode(currentScope, flowContext, flowInfo);
+ }
+ }
+
+ // analyse the anonymous nested type
+ if (anonymousType != null) {
+ flowInfo = anonymousType.analyseCode(currentScope, flowContext, flowInfo);
+ }
+
+ // record some dependency information for exception types
+ ReferenceBinding[] thrownExceptions;
+ if (((thrownExceptions = binding.thrownExceptions).length) != 0) {
+ // check exception handling
+ flowContext.checkExceptionHandlers(
+ thrownExceptions,
+ this,
+ flowInfo,
+ currentScope);
+ }
+ manageEnclosingInstanceAccessIfNecessary(currentScope, flowInfo);
+ manageSyntheticAccessIfNecessary(currentScope, flowInfo);
+ return flowInfo;
+ }
+
+ public Expression enclosingInstance() {
+
+ return enclosingInstance;
+ }
+
+ public void generateCode(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ boolean valueRequired) {
+
+ int pc = codeStream.position;
+ ReferenceBinding allocatedType = this.codegenBinding.declaringClass;
+ codeStream.new_(allocatedType);
+ if (valueRequired) {
+ codeStream.dup();
+ }
+ // better highlight for allocation: display the type individually
+ codeStream.recordPositionsFrom(pc, type.sourceStart);
+
+ // handling innerclass instance allocation - enclosing instance arguments
+ if (allocatedType.isNestedType()) {
+ codeStream.generateSyntheticEnclosingInstanceValues(
+ currentScope,
+ allocatedType,
+ enclosingInstance(),
+ this);
+ }
+ // generate the arguments for constructor
+ if (arguments != null) {
+ for (int i = 0, count = arguments.length; i < count; i++) {
+ arguments[i].generateCode(currentScope, codeStream, true);
+ }
+ }
+ // handling innerclass instance allocation - outer local arguments
+ if (allocatedType.isNestedType()) {
+ codeStream.generateSyntheticOuterArgumentValues(
+ currentScope,
+ allocatedType,
+ this);
+ }
+
+ // invoke constructor
+ if (syntheticAccessor == null) {
+ codeStream.invokespecial(this.codegenBinding);
+ } else {
+ // synthetic accessor got some extra arguments appended to its signature, which need values
+ for (int i = 0,
+ max = syntheticAccessor.parameters.length - this.codegenBinding.parameters.length;
+ i < max;
+ i++) {
+ codeStream.aconst_null();
+ }
+ codeStream.invokespecial(syntheticAccessor);
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+
+ if (anonymousType != null) {
+ anonymousType.generateCode(currentScope, codeStream);
+ }
+ }
+
+ public boolean isSuperAccess() {
+
+ // necessary to lookup super constructor of anonymous type
+ return anonymousType != null;
+ }
+
+ /* Inner emulation consists in either recording a dependency
+ * link only, or performing one level of propagation.
+ *
+ * Dependency mechanism is used whenever dealing with source target
+ * types, since by the time we reach them, we might not yet know their
+ * exact need.
+ */
+ public void manageEnclosingInstanceAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo) {
+
+ if (!flowInfo.isReachable()) return;
+ ReferenceBinding allocatedType;
+
+ // perform some emulation work in case there is some and we are inside a local type only
+ if ((allocatedType = binding.declaringClass).isNestedType()
+ && currentScope.enclosingSourceType().isLocalType()) {
+
+ if (allocatedType.isLocalType()) {
+ ((LocalTypeBinding) allocatedType).addInnerEmulationDependent(currentScope, enclosingInstance != null);
+ } else {
+ // locally propagate, since we already now the desired shape for sure
+ currentScope.propagateInnerEmulation(allocatedType, enclosingInstance != null);
+ }
+ }
+ }
+
+ public StringBuffer printExpression(int indent, StringBuffer output) {
+
+ if (enclosingInstance != null)
+ enclosingInstance.printExpression(0, output).append('.');
+ if (typeArguments != null) {
+ output.append('<');//$NON-NLS-1$
+ int max = typeArguments.length - 1;
+ for (int j = 0; j < max; j++) {
+ typeArguments[j].print(0, output);
+ output.append(", ");//$NON-NLS-1$
+ }
+ typeArguments[max].print(0, output);
+ output.append('>');
+ }
+ super.printExpression(0, output);
+ if (anonymousType != null) {
+ anonymousType.print(indent, output);
+ }
+ return output;
+ }
+
+ public TypeBinding resolveType(BlockScope scope) {
+
+ // added for code assist...cannot occur with 'normal' code
+ if (this.anonymousType == null && this.enclosingInstance == null) {
+ return super.resolveType(scope);
+ }
+
+ // Propagate the type checking to the arguments, and checks if the constructor is defined.
+ // ClassInstanceCreationExpression ::= Primary '.' 'new' SimpleName '(' ArgumentListopt ')' ClassBodyopt
+ // ClassInstanceCreationExpression ::= Name '.' 'new' SimpleName '(' ArgumentListopt ')' ClassBodyopt
+
+ constant = NotAConstant;
+ TypeBinding enclosingInstanceType = null;
+ TypeBinding receiverType = null;
+ boolean hasError = false;
+ boolean enclosingInstanceContainsCast = false;
+ boolean argsContainCast = false;
+
+ if (enclosingInstance != null) {
+ if (enclosingInstance instanceof CastExpression) {
+ enclosingInstance.bits |= IgnoreNeedForCastCheckMASK; // will check later on
+ enclosingInstanceContainsCast = true;
+ }
+ if ((enclosingInstanceType = enclosingInstance.resolveType(scope)) == null){
+ hasError = true;
+ } else if (enclosingInstanceType.isBaseType() || enclosingInstanceType.isArrayType()) {
+ scope.problemReporter().illegalPrimitiveOrArrayTypeForEnclosingInstance(
+ enclosingInstanceType,
+ enclosingInstance);
+ hasError = true;
+ } else if (type instanceof QualifiedTypeReference) {
+ scope.problemReporter().illegalUsageOfQualifiedTypeReference((QualifiedTypeReference)type);
+ hasError = true;
+ } else {
+ receiverType = ((SingleTypeReference) type).resolveTypeEnclosing(scope, (ReferenceBinding) enclosingInstanceType);
+ if (receiverType != null && enclosingInstanceContainsCast) {
+ CastExpression.checkNeedForEnclosingInstanceCast(scope, enclosingInstance, enclosingInstanceType, receiverType);
+ }
+ }
+ } else {
+ receiverType = type.resolveType(scope);
+ }
+ if (receiverType == null) {
+ hasError = true;
+ } else if (((ReferenceBinding) receiverType).isFinal() && this.anonymousType != null) {
+ scope.problemReporter().anonymousClassCannotExtendFinalClass(type, receiverType);
+ hasError = true;
+ }
+ // resolve type arguments (for generic constructor call)
+ if (this.typeArguments != null) {
+ int length = this.typeArguments.length;
+ this.genericTypeArguments = new TypeBinding[length];
+ for (int i = 0; i < length; i++) {
+ TypeBinding argType = this.typeArguments[i].resolveType(scope);
+ if (argType == null) return null; // error already reported
+ this.genericTypeArguments[i] = argType;
+ }
+ }
+
+ // will check for null after args are resolved
+ TypeBinding[] argumentTypes = NoParameters;
+ if (arguments != null) {
+ int length = arguments.length;
+ argumentTypes = new TypeBinding[length];
+ for (int i = 0; i < length; i++) {
+ Expression argument = this.arguments[i];
+ if (argument instanceof CastExpression) {
+ argument.bits |= IgnoreNeedForCastCheckMASK; // will check later on
+ argsContainCast = true;
+ }
+ if ((argumentTypes[i] = argument.resolveType(scope)) == null){
+ hasError = true;
+ }
+ }
+ }
+ // limit of fault-tolerance
+ if (hasError) return this.resolvedType = receiverType;
+ if (this.anonymousType == null) {
+ // qualified allocation with no anonymous type
+ ReferenceBinding allocationType = (ReferenceBinding) receiverType;
+ if (!receiverType.canBeInstantiated()) {
+ scope.problemReporter().cannotInstantiate(type, receiverType);
+ return this.resolvedType = receiverType;
+ }
+ if ((this.binding = scope.getConstructor(allocationType, argumentTypes, this)).isValidBinding()) {
+ if (isMethodUseDeprecated(binding, scope)) {
+ scope.problemReporter().deprecatedMethod(this.binding, this);
+ }
+ if (this.arguments != null)
+ checkInvocationArguments(scope, null, allocationType, binding, this.arguments, argumentTypes, argsContainCast, this);
+ } else {
+ if (this.binding.declaringClass == null) {
+ this.binding.declaringClass = allocationType;
+ }
+ scope.problemReporter().invalidConstructor(this, this.binding);
+ return this.resolvedType = receiverType;
+ }
+
+ // The enclosing instance must be compatible with the innermost enclosing type
+ ReferenceBinding expectedType = this.binding.declaringClass.enclosingType();
+ if (enclosingInstanceType.isCompatibleWith(expectedType)) {
+ enclosingInstance.computeConversion(scope, expectedType, enclosingInstanceType);
+ return receiverType;
+ }
+ scope.problemReporter().typeMismatchError(enclosingInstanceType, expectedType, this.enclosingInstance);
+ return this.resolvedType = receiverType;
+ }
+
+ // anonymous type scenario
+ // an anonymous class inherits from java.lang.Object when declared "after" an interface
+ this.superTypeBinding = receiverType.isInterface() ? scope.getJavaLangObject() : (ReferenceBinding) receiverType;
+ // insert anonymous type in scope
+ scope.addAnonymousType(this.anonymousType, (ReferenceBinding) receiverType);
+ this.anonymousType.resolve(scope);
+
+ // find anonymous super constructor
+ MethodBinding inheritedBinding = scope.getConstructor(this.superTypeBinding, argumentTypes, this);
+ if (!inheritedBinding.isValidBinding()) {
+ if (inheritedBinding.declaringClass == null) {
+ inheritedBinding.declaringClass = this.superTypeBinding;
+ }
+ scope.problemReporter().invalidConstructor(this, inheritedBinding);
+ return this.resolvedType = anonymousType.binding;
+ }
+ if (enclosingInstance != null) {
+ ReferenceBinding targetEnclosing = inheritedBinding.declaringClass.enclosingType();
+ if (targetEnclosing == null) {
+ scope.problemReporter().unnecessaryEnclosingInstanceSpecification(enclosingInstance, (ReferenceBinding)receiverType);
+ return this.resolvedType = anonymousType.binding;
+ } else if (!enclosingInstanceType.isCompatibleWith(targetEnclosing)) {
+ scope.problemReporter().typeMismatchError(enclosingInstanceType, targetEnclosing, enclosingInstance);
+ return this.resolvedType = anonymousType.binding;
+ }
+ enclosingInstance.computeConversion(scope, targetEnclosing, enclosingInstanceType);
+ }
+ if (this.arguments != null)
+ checkInvocationArguments(scope, null, this.superTypeBinding, inheritedBinding, this.arguments, argumentTypes, argsContainCast, this);
+
+ // Update the anonymous inner class : superclass, interface
+ binding = anonymousType.createsInternalConstructorWithBinding(inheritedBinding);
+ return this.resolvedType = anonymousType.binding; // 1.2 change
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+
+ if (visitor.visit(this, scope)) {
+ if (enclosingInstance != null)
+ enclosingInstance.traverse(visitor, scope);
+ if (this.typeArguments != null) {
+ for (int i = 0, typeArgumentsLength = this.typeArguments.length; i < typeArgumentsLength; i++) {
+ this.typeArguments[i].traverse(visitor, scope);
+ }
+ }
+ type.traverse(visitor, scope);
+ if (arguments != null) {
+ int argumentsLength = arguments.length;
+ for (int i = 0; i < argumentsLength; i++)
+ arguments[i].traverse(visitor, scope);
+ }
+ if (anonymousType != null)
+ anonymousType.traverse(visitor, scope);
+ }
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/QualifiedNameReference.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/QualifiedNameReference.js
new file mode 100644
index 0000000..1d753b0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/QualifiedNameReference.js
@@ -0,0 +1,877 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemSeverities;
+
+public class QualifiedNameReference extends NameReference {
+
+ public char[][] tokens;
+ public long[] sourcePositions;
+ public FieldBinding[] otherBindings, otherCodegenBindings;
+ int[] otherDepths;
+ public int indexOfFirstFieldBinding;//points (into tokens) for the first token that corresponds to first FieldBinding
+ SyntheticAccessMethodBinding syntheticWriteAccessor;
+ SyntheticAccessMethodBinding[] syntheticReadAccessors;
+ public TypeBinding genericCast;
+ public TypeBinding[] otherGenericCasts;
+
+ public QualifiedNameReference(
+ char[][] sources,
+ long[] positions,
+ int sourceStart,
+ int sourceEnd) {
+ super();
+ this.tokens = sources;
+ this.sourcePositions = positions;
+ this.sourceStart = sourceStart;
+ this.sourceEnd = sourceEnd;
+ }
+
+ public FlowInfo analyseAssignment(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo,
+ Assignment assignment,
+ boolean isCompound) {
+
+ // determine the rank until which we now we do not need any actual value for the field access
+ int otherBindingsCount = otherBindings == null ? 0 : otherBindings.length;
+ boolean needValue = otherBindingsCount == 0 || !this.otherBindings[0].isStatic();
+ FieldBinding lastFieldBinding = null;
+ switch (bits & RestrictiveFlagMASK) {
+ case FIELD : // reading a field
+ lastFieldBinding = (FieldBinding) binding;
+ if (needValue) {
+ manageSyntheticAccessIfNecessary(currentScope, lastFieldBinding, this.actualReceiverType, 0, flowInfo);
+ } // check if final blank field
+ if (lastFieldBinding.isBlankFinal()
+ && this.otherBindings != null // the last field binding is only assigned
+ && currentScope.allowBlankFinalFieldAssignment(lastFieldBinding)) {
+ if (!flowInfo.isDefinitelyAssigned(lastFieldBinding)) {
+ currentScope.problemReporter().uninitializedBlankFinalField(
+ lastFieldBinding,
+ this);
+ }
+ }
+ break;
+ case LOCAL :
+ // first binding is a local variable
+ LocalVariableBinding localBinding;
+ if (!flowInfo
+ .isDefinitelyAssigned(localBinding = (LocalVariableBinding) binding)) {
+ currentScope.problemReporter().uninitializedLocalVariable(localBinding, this);
+ }
+ if (flowInfo.isReachable()) {
+ localBinding.useFlag = LocalVariableBinding.USED;
+ } else if (localBinding.useFlag == LocalVariableBinding.UNUSED) {
+ localBinding.useFlag = LocalVariableBinding.FAKE_USED;
+ }
+ }
+
+ if (needValue) {
+ manageEnclosingInstanceAccessIfNecessary(currentScope, flowInfo);
+ // only for first binding
+ }
+ // all intermediate field accesses are read accesses
+ if (otherBindings != null) {
+ for (int i = 0; i < otherBindingsCount-1; i++) {
+ lastFieldBinding = otherBindings[i];
+ needValue = !otherBindings[i+1].isStatic();
+ if (needValue) {
+ manageSyntheticAccessIfNecessary(
+ currentScope,
+ lastFieldBinding,
+ i == 0
+ ? ((VariableBinding)binding).type
+ : otherBindings[i-1].type,
+ i + 1,
+ flowInfo);
+ }
+ }
+ lastFieldBinding = otherBindings[otherBindingsCount-1];
+ }
+
+ if (isCompound) {
+ if (binding == lastFieldBinding
+ && lastFieldBinding.isBlankFinal()
+ && currentScope.allowBlankFinalFieldAssignment(lastFieldBinding)
+ && (!flowInfo.isDefinitelyAssigned(lastFieldBinding))) {
+ currentScope.problemReporter().uninitializedBlankFinalField(
+ lastFieldBinding,
+ this);
+ }
+ TypeBinding lastReceiverType;
+ if (lastFieldBinding == binding){
+ lastReceiverType = this.actualReceiverType;
+ } else if (otherBindingsCount == 1){
+ lastReceiverType = ((VariableBinding)this.binding).type;
+ } else {
+ lastReceiverType = this.otherBindings[otherBindingsCount-2].type;
+ }
+ manageSyntheticAccessIfNecessary(
+ currentScope,
+ lastFieldBinding,
+ lastReceiverType,
+ lastFieldBinding == binding
+ ? 0
+ : otherBindingsCount,
+ flowInfo);
+ }
+
+ if (assignment.expression != null) {
+ flowInfo =
+ assignment
+ .expression
+ .analyseCode(currentScope, flowContext, flowInfo)
+ .unconditionalInits();
+ }
+
+ // the last field access is a write access
+ if (lastFieldBinding.isFinal()) {
+ // in a context where it can be assigned?
+ if (lastFieldBinding.isBlankFinal()
+ && !isCompound
+ && currentScope.allowBlankFinalFieldAssignment(lastFieldBinding)
+ && indexOfFirstFieldBinding == 1) {
+ if (flowInfo.isPotentiallyAssigned(lastFieldBinding)) {
+ currentScope.problemReporter().duplicateInitializationOfBlankFinalField(lastFieldBinding, this);
+ } else {
+ flowContext.recordSettingFinal(lastFieldBinding, this, flowInfo);
+ }
+ flowInfo.markAsDefinitelyAssigned(lastFieldBinding);
+ } else {
+ currentScope.problemReporter().cannotAssignToFinalField(lastFieldBinding, this);
+ if (currentScope.allowBlankFinalFieldAssignment(lastFieldBinding)) { // pretend it got assigned
+ flowInfo.markAsDefinitelyAssigned(lastFieldBinding);
+ }
+ }
+ }
+ // equivalent to valuesRequired[maxOtherBindings]
+ TypeBinding lastReceiverType;
+ if (lastFieldBinding == binding){
+ lastReceiverType = this.actualReceiverType;
+ } else if (otherBindingsCount == 1){
+ lastReceiverType = ((VariableBinding)this.binding).type;
+ } else {
+ lastReceiverType = this.otherBindings[otherBindingsCount-2].type;
+ }
+ manageSyntheticAccessIfNecessary(currentScope, lastFieldBinding, lastReceiverType, -1 /*write-access*/, flowInfo);
+
+ return flowInfo;
+ }
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ return analyseCode(currentScope, flowContext, flowInfo, true);
+ }
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo,
+ boolean valueRequired) {
+
+ // determine the rank until which we now we do not need any actual value for the field access
+ int otherBindingsCount = otherBindings == null ? 0 : otherBindings.length;
+
+ boolean needValue = otherBindingsCount == 0 ? valueRequired : !this.otherBindings[0].isStatic();
+ switch (bits & RestrictiveFlagMASK) {
+ case FIELD : // reading a field
+ if (needValue) {
+ manageSyntheticAccessIfNecessary(currentScope, (FieldBinding) binding, this.actualReceiverType, 0, flowInfo);
+ }
+ // check if reading a final blank field
+ FieldBinding fieldBinding;
+ if ((fieldBinding = (FieldBinding) binding).isBlankFinal()
+ && (indexOfFirstFieldBinding == 1)
+ // was an implicit reference to the first field binding
+ && currentScope.allowBlankFinalFieldAssignment(fieldBinding)
+ && (!flowInfo.isDefinitelyAssigned(fieldBinding))) {
+ currentScope.problemReporter().uninitializedBlankFinalField(fieldBinding, this);
+ }
+ break;
+ case LOCAL : // reading a local variable
+ LocalVariableBinding localBinding;
+ if (!flowInfo
+ .isDefinitelyAssigned(localBinding = (LocalVariableBinding) binding)) {
+ currentScope.problemReporter().uninitializedLocalVariable(localBinding, this);
+ }
+ if (flowInfo.isReachable()) {
+ localBinding.useFlag = LocalVariableBinding.USED;
+ } else if (localBinding.useFlag == LocalVariableBinding.UNUSED) {
+ localBinding.useFlag = LocalVariableBinding.FAKE_USED;
+ }
+ }
+ if (needValue) {
+ manageEnclosingInstanceAccessIfNecessary(currentScope, flowInfo);
+ // only for first binding
+ }
+ if (otherBindings != null) {
+ for (int i = 0; i < otherBindingsCount; i++) {
+ needValue = i < otherBindingsCount-1 ? !otherBindings[i+1].isStatic() : valueRequired;
+ if (needValue) {
+ manageSyntheticAccessIfNecessary(
+ currentScope,
+ otherBindings[i],
+ i == 0 ? ((VariableBinding)binding).type : otherBindings[i-1].type,
+ i + 1,
+ flowInfo);
+ }
+ }
+ }
+ return flowInfo;
+ }
+ /**
+ * Check and/or redirect the field access to the delegate receiver if any
+ */
+ public TypeBinding checkFieldAccess(BlockScope scope) {
+ // check for forward references
+ FieldBinding fieldBinding = (FieldBinding) binding;
+ MethodScope methodScope = scope.methodScope();
+ if (methodScope.enclosingSourceType() == fieldBinding.declaringClass
+ && methodScope.lastVisibleFieldID >= 0
+ && fieldBinding.id >= methodScope.lastVisibleFieldID) {
+ if ((!fieldBinding.isStatic() || methodScope.isStatic)
+ && this.indexOfFirstFieldBinding == 1)
+ scope.problemReporter().forwardReference(this, 0, scope.enclosingSourceType());
+ }
+ bits &= ~RestrictiveFlagMASK; // clear bits
+ bits |= FIELD;
+ return getOtherFieldBindings(scope);
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.Expression#computeConversion(org.eclipse.wst.jsdt.internal.compiler.lookup.Scope, org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding, org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding)
+ */
+ public void computeConversion(Scope scope, TypeBinding runtimeTimeType, TypeBinding compileTimeType) {
+ if (runtimeTimeType == null || compileTimeType == null)
+ return;
+ // set the generic cast after the fact, once the type expectation is fully known (no need for strict cast)
+ FieldBinding field = null;
+ int length = this.otherBindings == null ? 0 : this.otherBindings.length;
+ if (length == 0) {
+ if (this.binding != null && this.binding.isValidBinding()) {
+ field = (FieldBinding) this.binding;
+ }
+ } else {
+ field = this.otherBindings[length-1];
+ }
+ if (field != null) {
+ FieldBinding originalBinding = field.original();
+ if (originalBinding != field) {
+ // extra cast needed if method return type has type variable
+ if ((originalBinding.type.tagBits & TagBits.HasTypeVariable) != 0 && runtimeTimeType.id != T_Object) {
+ setGenericCast(length,originalBinding.type.genericCast(runtimeTimeType));
+ }
+ }
+ }
+ super.computeConversion(scope, runtimeTimeType, compileTimeType);
+ }
+
+ public void generateAssignment(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ Assignment assignment,
+ boolean valueRequired) {
+
+ FieldBinding lastFieldBinding = generateReadSequence(currentScope, codeStream);
+ assignment.expression.generateCode(currentScope, codeStream, true);
+ fieldStore(codeStream, lastFieldBinding, syntheticWriteAccessor, valueRequired);
+ // equivalent to valuesRequired[maxOtherBindings]
+ if (valueRequired) {
+ codeStream.generateImplicitConversion(assignment.implicitConversion);
+ }
+ }
+ public void generateCode(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ boolean valueRequired) {
+
+ int pc = codeStream.position;
+ if (constant != NotAConstant) {
+ if (valueRequired) {
+ codeStream.generateConstant(constant, implicitConversion);
+ }
+ } else {
+ FieldBinding lastFieldBinding = generateReadSequence(currentScope, codeStream);
+ if (valueRequired) {
+ if (lastFieldBinding.declaringClass == null) { // array length
+ codeStream.arraylength();
+ codeStream.generateImplicitConversion(implicitConversion);
+ } else {
+ if (lastFieldBinding.isConstantValue()) {
+ if (!lastFieldBinding.isStatic()){
+ codeStream.invokeObjectGetClass();
+ codeStream.pop();
+ }
+ // inline the last field constant
+ codeStream.generateConstant(lastFieldBinding.constant(), implicitConversion);
+ } else {
+ SyntheticAccessMethodBinding accessor =
+ syntheticReadAccessors == null
+ ? null
+ : syntheticReadAccessors[syntheticReadAccessors.length - 1];
+ if (accessor == null) {
+ if (lastFieldBinding.isStatic()) {
+ codeStream.getstatic(lastFieldBinding);
+ } else {
+ codeStream.getfield(lastFieldBinding);
+ }
+ } else {
+ codeStream.invokestatic(accessor);
+ }
+ codeStream.generateImplicitConversion(implicitConversion);
+ TypeBinding requiredGenericCast = getGenericCast(this.otherCodegenBindings == null ? 0 : this.otherCodegenBindings.length);
+ if (requiredGenericCast != null) codeStream.checkcast(requiredGenericCast);
+ }
+ }
+ } else {
+ if (lastFieldBinding != null && !lastFieldBinding.isStatic()){
+ codeStream.invokeObjectGetClass(); // perform null check
+ codeStream.pop();
+ }
+
+ }
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+ public void generateCompoundAssignment(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ Expression expression,
+ int operator,
+ int assignmentImplicitConversion,
+ boolean valueRequired) {
+
+ FieldBinding lastFieldBinding = generateReadSequence(currentScope, codeStream);
+ SyntheticAccessMethodBinding accessor =
+ syntheticReadAccessors == null
+ ? null
+ : syntheticReadAccessors[syntheticReadAccessors.length - 1];
+ if (lastFieldBinding.isStatic()) {
+ if (accessor == null) {
+ codeStream.getstatic(lastFieldBinding);
+ } else {
+ codeStream.invokestatic(accessor);
+ }
+ } else {
+ codeStream.dup();
+ if (accessor == null) {
+ codeStream.getfield(lastFieldBinding);
+ } else {
+ codeStream.invokestatic(accessor);
+ }
+ }
+ // the last field access is a write access
+ // perform the actual compound operation
+ int operationTypeID;
+ if ((operationTypeID = implicitConversion >> 4) == T_String) {
+ codeStream.generateStringConcatenationAppend(currentScope, null, expression);
+ } else {
+ // promote the array reference to the suitable operation type
+ codeStream.generateImplicitConversion(implicitConversion);
+ // generate the increment value (will by itself be promoted to the operation value)
+ if (expression == IntLiteral.One) { // prefix operation
+ codeStream.generateConstant(expression.constant, implicitConversion);
+ } else {
+ expression.generateCode(currentScope, codeStream, true);
+ }
+ // perform the operation
+ codeStream.sendOperator(operator, operationTypeID);
+ // cast the value back to the array reference type
+ codeStream.generateImplicitConversion(assignmentImplicitConversion);
+ }
+ // actual assignment
+ fieldStore(codeStream, lastFieldBinding, syntheticWriteAccessor, valueRequired);
+ // equivalent to valuesRequired[maxOtherBindings]
+ }
+ public void generatePostIncrement(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ CompoundAssignment postIncrement,
+ boolean valueRequired) {
+
+ FieldBinding lastFieldBinding = generateReadSequence(currentScope, codeStream);
+ SyntheticAccessMethodBinding accessor =
+ syntheticReadAccessors == null
+ ? null
+ : syntheticReadAccessors[syntheticReadAccessors.length - 1];
+ if (lastFieldBinding.isStatic()) {
+ if (accessor == null) {
+ codeStream.getstatic(lastFieldBinding);
+ } else {
+ codeStream.invokestatic(accessor);
+ }
+ } else {
+ codeStream.dup();
+ if (accessor == null) {
+ codeStream.getfield(lastFieldBinding);
+ } else {
+ codeStream.invokestatic(accessor);
+ }
+ }
+ // duplicate the old field value
+ if (valueRequired) {
+ if (lastFieldBinding.isStatic()) {
+ if ((lastFieldBinding.type == LongBinding)
+ || (lastFieldBinding.type == DoubleBinding)) {
+ codeStream.dup2();
+ } else {
+ codeStream.dup();
+ }
+ } else { // Stack: [owner][old field value] ---> [old field value][owner][old field value]
+ if ((lastFieldBinding.type == LongBinding)
+ || (lastFieldBinding.type == DoubleBinding)) {
+ codeStream.dup2_x1();
+ } else {
+ codeStream.dup_x1();
+ }
+ }
+ }
+ codeStream.generateConstant(
+ postIncrement.expression.constant,
+ implicitConversion);
+ codeStream.sendOperator(postIncrement.operator, lastFieldBinding.type.id);
+ codeStream.generateImplicitConversion(
+ postIncrement.assignmentImplicitConversion);
+ fieldStore(codeStream, lastFieldBinding, syntheticWriteAccessor, false);
+ }
+ /*
+ * Generate code for all bindings (local and fields) excluding the last one, which may then be generated code
+ * for a read or write access.
+ */
+ public FieldBinding generateReadSequence(BlockScope currentScope, CodeStream codeStream) {
+
+ // determine the rank until which we now we do not need any actual value for the field access
+ int otherBindingsCount = this.otherCodegenBindings == null ? 0 : otherCodegenBindings.length;
+ boolean needValue = otherBindingsCount == 0 || !this.otherBindings[0].isStatic();
+ FieldBinding lastFieldBinding = null;
+ TypeBinding lastGenericCast = null;
+
+ switch (bits & RestrictiveFlagMASK) {
+ case FIELD :
+ lastFieldBinding = (FieldBinding) this.codegenBinding;
+ lastGenericCast = this.genericCast;
+ // if first field is actually constant, we can inline it
+ if (lastFieldBinding.isConstantValue()) {
+ break;
+ }
+ if (needValue && !lastFieldBinding.isStatic()) {
+ if ((bits & DepthMASK) != 0) {
+ ReferenceBinding targetType = currentScope.enclosingSourceType().enclosingTypeAt((bits & DepthMASK) >> DepthSHIFT);
+ Object[] emulationPath = currentScope.getEmulationPath(targetType, true /*only exact match*/, false/*consider enclosing arg*/);
+ codeStream.generateOuterAccess(emulationPath, this, targetType, currentScope);
+ } else {
+ generateReceiver(codeStream);
+ }
+ }
+ break;
+ case LOCAL : // reading the first local variable
+ if (!needValue) break; // no value needed
+ LocalVariableBinding localBinding = (LocalVariableBinding) this.codegenBinding;
+ // regular local variable read
+ if (localBinding.isConstantValue()) {
+ codeStream.generateConstant(localBinding.constant(), 0);
+ // no implicit conversion
+ } else {
+ // outer local?
+ if ((bits & DepthMASK) != 0) {
+ // outer local can be reached either through a synthetic arg or a synthetic field
+ VariableBinding[] path = currentScope.getEmulationPath(localBinding);
+ codeStream.generateOuterAccess(path, this, localBinding, currentScope);
+ } else {
+ codeStream.load(localBinding);
+ }
+ }
+ }
+
+ // all intermediate field accesses are read accesses
+ // only the last field binding is a write access
+ if (this.otherCodegenBindings != null) {
+ for (int i = 0; i < otherBindingsCount; i++) {
+ FieldBinding nextField = this.otherCodegenBindings[i];
+ TypeBinding nextGenericCast = this.otherGenericCasts == null ? null : this.otherGenericCasts[i];
+ if (lastFieldBinding != null) {
+ needValue = !nextField.isStatic();
+ if (needValue) {
+ MethodBinding accessor =
+ syntheticReadAccessors == null ? null : syntheticReadAccessors[i];
+ if (accessor == null) {
+ if (lastFieldBinding.isConstantValue()) {
+ if (lastFieldBinding != this.codegenBinding && !lastFieldBinding.isStatic()) {
+ codeStream.invokeObjectGetClass(); // perform null check
+ codeStream.pop();
+ }
+ codeStream.generateConstant(lastFieldBinding.constant(), 0);
+ } else if (lastFieldBinding.isStatic()) {
+ codeStream.getstatic(lastFieldBinding);
+ } else {
+ codeStream.getfield(lastFieldBinding);
+ }
+ } else {
+ codeStream.invokestatic(accessor);
+ }
+ if (lastGenericCast != null) codeStream.checkcast(lastGenericCast);
+ } else {
+ if (this.codegenBinding != lastFieldBinding && !lastFieldBinding.isStatic()){
+ codeStream.invokeObjectGetClass(); // perform null check
+ codeStream.pop();
+ }
+ }
+ }
+ lastFieldBinding = nextField;
+ lastGenericCast = nextGenericCast;
+ }
+ }
+ return lastFieldBinding;
+ }
+ public void generateReceiver(CodeStream codeStream) {
+ codeStream.aload_0();
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.InvocationSite#genericTypeArguments()
+ */
+ public TypeBinding[] genericTypeArguments() {
+ return null;
+ }
+
+ // get the matching codegenBinding
+ protected FieldBinding getCodegenBinding(int index) {
+ if (index == 0){
+ return (FieldBinding)this.codegenBinding;
+ } else {
+ return this.otherCodegenBindings[index-1];
+ }
+ }
+
+ // get the matching generic cast
+ protected TypeBinding getGenericCast(int index) {
+ if (index == 0){
+ return this.genericCast;
+ } else {
+ if (this.otherGenericCasts == null) return null;
+ return this.otherGenericCasts[index-1];
+ }
+ }
+
+ public TypeBinding getOtherFieldBindings(BlockScope scope) {
+ // At this point restrictiveFlag may ONLY have two potential value : FIELD LOCAL (i.e cast <<(VariableBinding) binding>> is valid)
+ int length = tokens.length;
+ FieldBinding field;
+ if ((bits & FIELD) != 0) {
+ field = (FieldBinding) this.binding;
+ if (!field.isStatic()) {
+ //must check for the static status....
+ if (indexOfFirstFieldBinding > 1 //accessing to a field using a type as "receiver" is allowed only with static field
+ || scope.methodScope().isStatic) { // the field is the first token of the qualified reference....
+ scope.problemReporter().staticFieldAccessToNonStaticVariable(this, field);
+ return null;
+ }
+ } else {
+ // indirect static reference ?
+ if (indexOfFirstFieldBinding > 1
+ && field.declaringClass != actualReceiverType) {
+ scope.problemReporter().indirectAccessToStaticField(this, field);
+ }
+ }
+ // only last field is actually a write access if any
+ if (isFieldUseDeprecated(field, scope, (this.bits & IsStrictlyAssignedMASK) !=0 && indexOfFirstFieldBinding == length))
+ scope.problemReporter().deprecatedField(field, this);
+ } else {
+ field = null;
+ }
+ TypeBinding type = ((VariableBinding) binding).type;
+ int index = indexOfFirstFieldBinding;
+ if (index == length) { // restrictiveFlag == FIELD
+ this.constant = FieldReference.getConstantFor((FieldBinding) binding, this, false, scope);
+ return type;
+ }
+ // allocation of the fieldBindings array and its respective constants
+ int otherBindingsLength = length - index;
+ otherCodegenBindings = otherBindings = new FieldBinding[otherBindingsLength];
+ otherDepths = new int[otherBindingsLength];
+
+ // fill the first constant (the one of the binding)
+ this.constant = field != null
+ ? FieldReference.getConstantFor((FieldBinding) binding, this, false, scope)
+ : ((VariableBinding) binding).constant();
+ // save first depth, since will be updated by visibility checks of other bindings
+ int firstDepth = (bits & DepthMASK) >> DepthSHIFT;
+ // iteration on each field
+ while (index < length) {
+ char[] token = tokens[index];
+ if (type == null)
+ return null; // could not resolve type prior to this point
+
+ // set generic cast of for previous field (if any)
+ if (field != null) {
+ FieldBinding originalBinding = field.original();
+ if (originalBinding != field) {
+ // extra cast needed if method return type has type variable
+ if ((originalBinding.type.tagBits & TagBits.HasTypeVariable) != 0 && type.id != T_Object) {
+ setGenericCast(index-1,originalBinding.type.genericCast(type));
+ }
+ }
+ }
+ bits &= ~DepthMASK; // flush previous depth if any
+ field = scope.getField(type, token, this);
+ int place = index - indexOfFirstFieldBinding;
+ otherBindings[place] = field;
+ otherDepths[place] = (bits & DepthMASK) >> DepthSHIFT;
+ if (field.isValidBinding()) {
+ // only last field is actually a write access if any
+ if (isFieldUseDeprecated(field, scope, (this.bits & IsStrictlyAssignedMASK) !=0 && index+1 == length)) {
+ scope.problemReporter().deprecatedField(field, this);
+ }
+ Constant someConstant = FieldReference.getConstantFor(field, this, false, scope);
+ // constant propagation can only be performed as long as the previous one is a constant too.
+ if (this.constant != NotAConstant) {
+ this.constant = someConstant;
+ }
+
+ if (field.isStatic()) {
+ // static field accessed through receiver? legal but unoptimal (optional warning)
+ scope.problemReporter().nonStaticAccessToStaticField(this, field);
+ // indirect static reference ?
+ if (field.declaringClass != type) {
+ scope.problemReporter().indirectAccessToStaticField(this, field);
+ }
+ }
+ type = field.type;
+ index++;
+ } else {
+ constant = NotAConstant; //don't fill other constants slots...
+ scope.problemReporter().invalidField(this, field, index, type);
+ setDepth(firstDepth);
+ return null;
+ }
+ }
+ setDepth(firstDepth);
+ return (otherBindings[otherBindingsLength - 1]).type;
+ }
+ public void manageEnclosingInstanceAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo) {
+ if (!flowInfo.isReachable()) return;
+ //If inlinable field, forget the access emulation, the code gen will directly target it
+ if (((bits & DepthMASK) == 0) || (constant != NotAConstant)) {
+ return;
+ }
+ if ((bits & RestrictiveFlagMASK) == LOCAL) {
+ currentScope.emulateOuterAccess((LocalVariableBinding) binding);
+ }
+ }
+ /**
+ * index is <0 to denote write access emulation
+ */
+ public void manageSyntheticAccessIfNecessary(
+ BlockScope currentScope,
+ FieldBinding fieldBinding,
+ TypeBinding lastReceiverType,
+ int index,
+ FlowInfo flowInfo) {
+
+ if (!flowInfo.isReachable()) return;
+ // index == 0 denotes the first fieldBinding, index > 0 denotes one of the 'otherBindings', index < 0 denotes a write access (to last binding)
+ if (fieldBinding.isConstantValue())
+ return;
+
+ // if field from parameterized type got found, use the original field at codegen time
+ FieldBinding originalField = fieldBinding.original();
+ if (originalField != fieldBinding) {
+ setCodegenBinding(index < 0 ? (this.otherBindings == null ? 0 : this.otherBindings.length) : index, originalField);
+ }
+
+ if (fieldBinding.isPrivate()) { // private access
+ FieldBinding someCodegenBinding = getCodegenBinding(index < 0 ? (this.otherBindings == null ? 0 : this.otherBindings.length) : index);
+ if (someCodegenBinding.declaringClass != currentScope.enclosingSourceType()) {
+ setSyntheticAccessor(fieldBinding, index,
+ ((SourceTypeBinding) someCodegenBinding.declaringClass).addSyntheticMethod(someCodegenBinding, index >= 0 /*read-access?*/));
+ currentScope.problemReporter().needToEmulateFieldAccess(someCodegenBinding, this, index >= 0 /*read-access?*/);
+ return;
+ }
+ } else if (fieldBinding.isProtected()){
+ int depth = fieldBinding == binding
+ ? (bits & DepthMASK) >> DepthSHIFT
+ : otherDepths[index < 0 ? otherDepths.length-1 : index-1];
+
+ // implicit protected access
+ if (depth > 0 && (fieldBinding.declaringClass.getPackage() != currentScope.enclosingSourceType().getPackage())) {
+ FieldBinding someCodegenBinding = getCodegenBinding(index < 0 ? (this.otherBindings == null ? 0 : this.otherBindings.length) : index);
+ setSyntheticAccessor(fieldBinding, index,
+ ((SourceTypeBinding) currentScope.enclosingSourceType().enclosingTypeAt(depth)).addSyntheticMethod(someCodegenBinding, index >= 0 /*read-access?*/));
+ currentScope.problemReporter().needToEmulateFieldAccess(someCodegenBinding, this, index >= 0 /*read-access?*/);
+ return;
+ }
+ }
+ // if the binding declaring class is not visible, need special action
+ // for runtime compatibility on 1.2 VMs : change the declaring class of the binding
+ // NOTE: from target 1.2 on, field's declaring class is touched if any different from receiver type
+ if (fieldBinding.declaringClass != lastReceiverType
+ && !lastReceiverType.isArrayType()
+ && fieldBinding.declaringClass != null
+ && !fieldBinding.isConstantValue()
+ && ((currentScope.environment().options.targetJDK >= ClassFileConstants.JDK1_2
+ && (fieldBinding != binding || indexOfFirstFieldBinding > 1 || !fieldBinding.isStatic())
+ && fieldBinding.declaringClass.id != T_Object)
+ || !fieldBinding.declaringClass.canBeSeenBy(currentScope))){
+ setCodegenBinding(
+ index < 0 ? (this.otherBindings == null ? 0 : this.otherBindings.length) : index,
+ currentScope.enclosingSourceType().getUpdatedFieldBinding(
+ getCodegenBinding(index < 0 ? (this.otherBindings == null ? 0 : this.otherBindings.length) : index),
+ (ReferenceBinding)lastReceiverType.erasure()));
+ }
+ }
+
+ public StringBuffer printExpression(int indent, StringBuffer output) {
+
+ for (int i = 0; i < tokens.length; i++) {
+ if (i > 0) output.append('.');
+ output.append(tokens[i]);
+ }
+ return output;
+ }
+
+ /**
+ * Normal field binding did not work, try to bind to a field of the delegate receiver.
+ */
+ public TypeBinding reportError(BlockScope scope) {
+ if (binding instanceof ProblemFieldBinding) {
+ scope.problemReporter().invalidField(this, (FieldBinding) binding);
+ } else if (binding instanceof ProblemReferenceBinding) {
+ scope.problemReporter().invalidType(this, (TypeBinding) binding);
+ } else {
+ scope.problemReporter().unresolvableReference(this, binding);
+ }
+ return null;
+ }
+ public TypeBinding resolveType(BlockScope scope) {
+ // field and/or local are done before type lookups
+ // the only available value for the restrictiveFlag BEFORE
+ // the TC is Flag_Type Flag_LocalField and Flag_TypeLocalField
+ this.actualReceiverType = this.receiverType = scope.enclosingSourceType();
+ constant = Constant.NotAConstant;
+ if ((this.codegenBinding = this.binding = scope.getBinding(tokens, bits & RestrictiveFlagMASK, this, true /*resolve*/)).isValidBinding()) {
+ switch (bits & RestrictiveFlagMASK) {
+ case VARIABLE : //============only variable===========
+ case TYPE | VARIABLE :
+ if (binding instanceof LocalVariableBinding) {
+ if (!((LocalVariableBinding) binding).isFinal() && ((bits & DepthMASK) != 0))
+ scope.problemReporter().cannotReferToNonFinalOuterLocal(
+ (LocalVariableBinding) binding,
+ this);
+ bits &= ~RestrictiveFlagMASK; // clear bits
+ bits |= LOCAL;
+ return this.resolvedType = getOtherFieldBindings(scope);
+ }
+ if (binding instanceof FieldBinding) {
+ // check for forward references
+ FieldBinding fieldBinding = (FieldBinding) binding;
+ MethodScope methodScope = scope.methodScope();
+ if (methodScope.enclosingSourceType() == fieldBinding.declaringClass
+ && methodScope.lastVisibleFieldID >= 0
+ && fieldBinding.id >= methodScope.lastVisibleFieldID) {
+ if ((!fieldBinding.isStatic() || methodScope.isStatic)
+ && this.indexOfFirstFieldBinding == 1) {
+ scope.problemReporter().forwardReference(this, 0, scope.enclosingSourceType());
+ }
+ }
+ if (!fieldBinding.isStatic()
+ && this.indexOfFirstFieldBinding == 1
+ && scope.environment().options.getSeverity(CompilerOptions.UnqualifiedFieldAccess) != ProblemSeverities.Ignore) {
+ scope.problemReporter().unqualifiedFieldAccess(this, fieldBinding);
+ }
+ bits &= ~RestrictiveFlagMASK; // clear bits
+ bits |= FIELD;
+
+ // check for deprecated receiver type
+ // deprecation check for receiver type if not first token
+ if (indexOfFirstFieldBinding > 1) {
+ if (isTypeUseDeprecated(this.actualReceiverType, scope))
+ scope.problemReporter().deprecatedType(this.actualReceiverType, this);
+ }
+
+ return this.resolvedType = getOtherFieldBindings(scope);
+ }
+ // thus it was a type
+ bits &= ~RestrictiveFlagMASK; // clear bits
+ bits |= TYPE;
+ case TYPE : //=============only type ==============
+ TypeBinding type = (TypeBinding) binding;
+ if (isTypeUseDeprecated(type, scope))
+ scope.problemReporter().deprecatedType(type, this);
+ return this.resolvedType = scope.convertToRawType(type);
+ }
+ }
+ //========error cases===============
+ return this.resolvedType = this.reportError(scope);
+ }
+
+ // set the matching codegenBinding and generic cast
+ protected void setCodegenBinding(int index, FieldBinding someCodegenBinding) {
+
+ if (index == 0){
+ this.codegenBinding = someCodegenBinding;
+ } else {
+ int length = this.otherBindings.length;
+ if (this.otherCodegenBindings == this.otherBindings){
+ System.arraycopy(this.otherBindings, 0, this.otherCodegenBindings = new FieldBinding[length], 0, length);
+ }
+ this.otherCodegenBindings[index-1] = someCodegenBinding;
+ }
+ }
+
+ // set the matching codegenBinding and generic cast
+ protected void setGenericCast(int index, TypeBinding someGenericCast) {
+
+ if (index == 0){
+ this.genericCast = someGenericCast;
+ } else {
+ if (this.otherGenericCasts == null) {
+ this.otherGenericCasts = new TypeBinding[this.otherBindings.length];
+ }
+ this.otherGenericCasts[index-1] = someGenericCast;
+ }
+ }
+
+ // set the matching synthetic accessor
+ protected void setSyntheticAccessor(FieldBinding fieldBinding, int index, SyntheticAccessMethodBinding syntheticAccessor) {
+ if (index < 0) { // write-access ?
+ syntheticWriteAccessor = syntheticAccessor;
+ } else {
+ if (syntheticReadAccessors == null) {
+ syntheticReadAccessors = new SyntheticAccessMethodBinding[otherBindings == null ? 1 : otherBindings.length + 1];
+ }
+ syntheticReadAccessors[index] = syntheticAccessor;
+ }
+ }
+
+ public void setFieldIndex(int index) {
+ this.indexOfFirstFieldBinding = index;
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+ visitor.visit(this, scope);
+ visitor.endVisit(this, scope);
+ }
+ public String unboundReferenceErrorName() {
+ return new String(tokens[0]);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/QualifiedSuperReference.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/QualifiedSuperReference.js
new file mode 100644
index 0000000..02d743f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/QualifiedSuperReference.js
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class QualifiedSuperReference extends QualifiedThisReference {
+
+ public QualifiedSuperReference(TypeReference name, int pos, int sourceEnd) {
+ super(name, pos, sourceEnd);
+ }
+
+ public boolean isSuper() {
+
+ return true;
+ }
+
+ public boolean isThis() {
+
+ return false;
+ }
+
+ public StringBuffer printExpression(int indent, StringBuffer output) {
+
+ return qualification.print(0, output).append(".super"); //$NON-NLS-1$
+ }
+
+ public TypeBinding resolveType(BlockScope scope) {
+
+ if ((this.bits & ParenthesizedMASK) != 0) {
+ scope.problemReporter().invalidParenthesizedExpression(this);
+ return null;
+ }
+ super.resolveType(scope);
+ if (currentCompatibleType == null)
+ return null; // error case
+
+ if (currentCompatibleType.id == T_Object) {
+ scope.problemReporter().cannotUseSuperInJavaLangObject(this);
+ return null;
+ }
+ return this.resolvedType = currentCompatibleType.superclass();
+ }
+
+ public void traverse(
+ ASTVisitor visitor,
+ BlockScope blockScope) {
+
+ if (visitor.visit(this, blockScope)) {
+ qualification.traverse(visitor, blockScope);
+ }
+ visitor.endVisit(this, blockScope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/QualifiedThisReference.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/QualifiedThisReference.js
new file mode 100644
index 0000000..fe5aa41
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/QualifiedThisReference.js
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class QualifiedThisReference extends ThisReference {
+
+ public TypeReference qualification;
+ ReferenceBinding currentCompatibleType;
+
+ public QualifiedThisReference(TypeReference name, int sourceStart, int sourceEnd) {
+ super(sourceStart, sourceEnd);
+ qualification = name;
+ this.sourceStart = name.sourceStart;
+ }
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ return flowInfo;
+ }
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo,
+ boolean valueRequired) {
+
+ return flowInfo;
+ }
+
+ /**
+ * Code generation for QualifiedThisReference
+ *
+ * @param currentScope org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ * @param valueRequired boolean
+ */
+ public void generateCode(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ boolean valueRequired) {
+
+ int pc = codeStream.position;
+ if (valueRequired) {
+ if ((bits & DepthMASK) != 0) {
+ Object[] emulationPath =
+ currentScope.getEmulationPath(this.currentCompatibleType, true /*only exact match*/, false/*consider enclosing arg*/);
+ codeStream.generateOuterAccess(emulationPath, this, this.currentCompatibleType, currentScope);
+ } else {
+ // nothing particular after all
+ codeStream.aload_0();
+ }
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+
+ public TypeBinding resolveType(BlockScope scope) {
+
+ constant = NotAConstant;
+ TypeBinding type = this.resolvedType = this.qualification.resolveType(scope);
+ if (type == null) return null;
+ // X.this is not a raw type as denoting enclosing instance
+ if (type.isRawType()) {
+ RawTypeBinding rawType = (RawTypeBinding) type;
+ type = this.resolvedType = rawType.type; // unwrap
+ }
+ // the qualification MUST exactly match some enclosing type name
+ // Its possible to qualify 'this' by the name of the current class
+ int depth = 0;
+ this.currentCompatibleType = scope.referenceType().binding;
+ while (this.currentCompatibleType != null
+ && this.currentCompatibleType != type) {
+ depth++;
+ this.currentCompatibleType = this.currentCompatibleType.isStatic() ? null : this.currentCompatibleType.enclosingType();
+ }
+ bits &= ~DepthMASK; // flush previous depth if any
+ bits |= (depth & 0xFF) << DepthSHIFT; // encoded depth into 8 bits
+
+ if (this.currentCompatibleType == null) {
+ scope.problemReporter().noSuchEnclosingInstance(type, this, false);
+ return type;
+ }
+
+ // Ensure one cannot write code like: B() { super(B.this); }
+ if (depth == 0) {
+ checkAccess(scope.methodScope());
+ } // if depth>0, path emulation will diagnose bad scenarii
+ return type;
+ }
+
+ public StringBuffer printExpression(int indent, StringBuffer output) {
+
+ return qualification.print(0, output).append(".this"); //$NON-NLS-1$
+ }
+
+ public void traverse(
+ ASTVisitor visitor,
+ BlockScope blockScope) {
+
+ if (visitor.visit(this, blockScope)) {
+ qualification.traverse(visitor, blockScope);
+ }
+ visitor.endVisit(this, blockScope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/QualifiedTypeReference.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/QualifiedTypeReference.js
new file mode 100644
index 0000000..2b4f35a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/QualifiedTypeReference.js
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+import org.eclipse.wst.jsdt.internal.compiler.problem.AbortCompilation;
+
+public class QualifiedTypeReference extends TypeReference {
+
+ public char[][] tokens;
+ public long[] sourcePositions;
+
+ public QualifiedTypeReference(char[][] sources , long[] poss) {
+
+ tokens = sources ;
+ sourcePositions = poss ;
+ sourceStart = (int) (sourcePositions[0]>>>32) ;
+ sourceEnd = (int)(sourcePositions[sourcePositions.length-1] & 0x00000000FFFFFFFFL ) ;
+ }
+
+ public TypeReference copyDims(int dim){
+ //return a type reference copy of me with some dimensions
+ //warning : the new type ref has a null binding
+ return new ArrayQualifiedTypeReference(tokens, dim, sourcePositions);
+ }
+
+ protected TypeBinding findNextTypeBinding(int tokenIndex, Scope scope, PackageBinding packageBinding) {
+ try {
+ if (this.resolvedType == null) {
+ this.resolvedType = scope.getType(this.tokens[tokenIndex], packageBinding);
+ } else {
+ this.resolvedType = scope.getMemberType(this.tokens[tokenIndex], (ReferenceBinding) this.resolvedType);
+ if (this.resolvedType instanceof ProblemReferenceBinding) {
+ ProblemReferenceBinding problemBinding = (ProblemReferenceBinding) this.resolvedType;
+ this.resolvedType = new ProblemReferenceBinding(
+ org.eclipse.wst.jsdt.core.compiler.CharOperation.subarray(this.tokens, 0, tokenIndex + 1),
+ problemBinding.original,
+ this.resolvedType.problemId());
+ }
+ }
+ return this.resolvedType;
+ } catch (AbortCompilation e) {
+ e.updateContext(this, scope.referenceCompilationUnit().compilationResult);
+ throw e;
+ }
+ }
+
+ protected TypeBinding getTypeBinding(Scope scope) {
+
+ if (this.resolvedType != null)
+ return this.resolvedType;
+
+ Binding binding = scope.getPackage(this.tokens);
+ if (binding != null && !binding.isValidBinding())
+ return (ReferenceBinding) binding; // not found
+
+ PackageBinding packageBinding = binding == null ? null : (PackageBinding) binding;
+ boolean isClassScope = scope.kind == Scope.CLASS_SCOPE;
+ ReferenceBinding qualifiedType = null;
+ for (int i = packageBinding == null ? 0 : packageBinding.compoundName.length, max = this.tokens.length; i < max; i++) {
+ findNextTypeBinding(i, scope, packageBinding);
+ if (!this.resolvedType.isValidBinding())
+ return this.resolvedType;
+
+ if (isClassScope)
+ if (((ClassScope) scope).detectCycle(this.resolvedType, this, null)) // must connect hierarchy to find inherited member types
+ return null;
+ ReferenceBinding currentType = (ReferenceBinding) this.resolvedType;
+ if (currentType.isGenericType()) {
+ qualifiedType = scope.environment().createRawType(currentType, qualifiedType);
+ } else {
+ qualifiedType = (qualifiedType != null && (qualifiedType.isRawType() || qualifiedType.isParameterizedType()))
+ ? scope.createParameterizedType(currentType, null, qualifiedType)
+ : currentType;
+ }
+ }
+ this.resolvedType = qualifiedType;
+ return this.resolvedType;
+ }
+
+ public char[][] getTypeName(){
+
+ return tokens;
+ }
+
+ public StringBuffer printExpression(int indent, StringBuffer output) {
+
+ for (int i = 0; i < tokens.length; i++) {
+ if (i > 0) output.append('.');
+ output.append(tokens[i]);
+ }
+ return output;
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+
+ visitor.visit(this, scope);
+ visitor.endVisit(this, scope);
+ }
+
+ public void traverse(ASTVisitor visitor, ClassScope scope) {
+
+ visitor.visit(this, scope);
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Reference.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Reference.js
new file mode 100644
index 0000000..183ac7a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Reference.js
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public abstract class Reference extends Expression {
+/**
+ * BaseLevelReference constructor comment.
+ */
+public Reference() {
+ super();
+}
+public abstract FlowInfo analyseAssignment(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, Assignment assignment, boolean isCompound);
+
+public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
+ return flowInfo;
+}
+public FieldBinding fieldBinding() {
+ //this method should be sent one FIELD-tagged references
+ // (ref.bits & BindingIds.FIELD != 0)()
+ return null ;
+}
+public void fieldStore(CodeStream codeStream, FieldBinding fieldBinding, MethodBinding syntheticWriteAccessor, boolean valueRequired) {
+
+ if (fieldBinding.isStatic()) {
+ if (valueRequired) {
+ if ((fieldBinding.type == LongBinding) || (fieldBinding.type == DoubleBinding)) {
+ codeStream.dup2();
+ } else {
+ codeStream.dup();
+ }
+ }
+ if (syntheticWriteAccessor == null) {
+ codeStream.putstatic(fieldBinding);
+ } else {
+ codeStream.invokestatic(syntheticWriteAccessor);
+ }
+ } else { // Stack: [owner][new field value] ---> [new field value][owner][new field value]
+ if (valueRequired) {
+ if ((fieldBinding.type == LongBinding) || (fieldBinding.type == DoubleBinding)) {
+ codeStream.dup2_x1();
+ } else {
+ codeStream.dup_x1();
+ }
+ }
+ if (syntheticWriteAccessor == null) {
+ codeStream.putfield(fieldBinding);
+ } else {
+ codeStream.invokestatic(syntheticWriteAccessor);
+ }
+ }
+}
+public abstract void generateAssignment(BlockScope currentScope, CodeStream codeStream, Assignment assignment, boolean valueRequired);
+
+public abstract void generateCompoundAssignment(BlockScope currentScope, CodeStream codeStream, Expression expression, int operator, int assignmentImplicitConversion, boolean valueRequired);
+
+public abstract void generatePostIncrement(BlockScope currentScope, CodeStream codeStream, CompoundAssignment postIncrement, boolean valueRequired);
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ReturnStatement.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ReturnStatement.js
new file mode 100644
index 0000000..1e3c95b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ReturnStatement.js
@@ -0,0 +1,244 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class ReturnStatement extends Statement {
+
+ public Expression expression;
+ public boolean isSynchronized;
+ public SubRoutineStatement[] subroutines;
+ public boolean isAnySubRoutineEscaping = false;
+ public LocalVariableBinding saveValueVariable;
+
+ public ReturnStatement(Expression expr, int s, int e ) {
+ sourceStart = s;
+ sourceEnd = e;
+ expression = expr ;
+ }
+ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) { // here requires to generate a sequence of finally blocks invocations depending corresponding
+ // to each of the traversed try statements, so that execution will terminate properly.
+
+ // lookup the label, this should answer the returnContext
+
+ if (expression != null) {
+ flowInfo = expression.analyseCode(currentScope, flowContext, flowInfo);
+ }
+ // compute the return sequence (running the finally blocks)
+ FlowContext traversedContext = flowContext;
+ int subIndex = 0, maxSub = 5;
+ boolean saveValueNeeded = false;
+ boolean hasValueToSave = expression != null && expression.constant == NotAConstant;
+ do {
+ SubRoutineStatement sub;
+ if ((sub = traversedContext.subRoutine()) != null) {
+ if (this.subroutines == null){
+ this.subroutines = new SubRoutineStatement[maxSub];
+ }
+ if (subIndex == maxSub) {
+ System.arraycopy(this.subroutines, 0, (this.subroutines = new SubRoutineStatement[maxSub *= 2]), 0, subIndex); // grow
+ }
+ this.subroutines[subIndex++] = sub;
+ if (sub.isSubRoutineEscaping()) {
+ saveValueNeeded = false;
+ isAnySubRoutineEscaping = true;
+ break;
+ }
+ }
+ traversedContext.recordReturnFrom(flowInfo.unconditionalInits());
+
+ ASTNode node;
+ if ((node = traversedContext.associatedNode) instanceof SynchronizedStatement) {
+ isSynchronized = true;
+
+ } else if (node instanceof TryStatement) {
+ TryStatement tryStatement = (TryStatement) node;
+ flowInfo.addInitializationsFrom(tryStatement.subRoutineInits); // collect inits
+ if (hasValueToSave) {
+ if (this.saveValueVariable == null){ // closest subroutine secret variable is used
+ prepareSaveValueLocation(tryStatement);
+ }
+ saveValueNeeded = true;
+ }
+
+ } else if (traversedContext instanceof InitializationFlowContext) {
+ currentScope.problemReporter().cannotReturnInInitializer(this);
+ return FlowInfo.DEAD_END;
+ }
+ } while ((traversedContext = traversedContext.parent) != null);
+
+ // resize subroutines
+ if ((subroutines != null) && (subIndex != maxSub)) {
+ System.arraycopy(subroutines, 0, (subroutines = new SubRoutineStatement[subIndex]), 0, subIndex);
+ }
+
+ // secret local variable for return value (note that this can only occur in a real method)
+ if (saveValueNeeded) {
+ if (this.saveValueVariable != null) {
+ this.saveValueVariable.useFlag = LocalVariableBinding.USED;
+ }
+ } else {
+ this.saveValueVariable = null;
+ if (!isSynchronized && this.expression != null && this.expression.resolvedType == BooleanBinding) {
+ this.expression.bits |= ValueForReturnMASK;
+ }
+ }
+ return FlowInfo.DEAD_END;
+ }
+
+ /**
+ * Retrun statement code generation
+ *
+ * generate the finallyInvocationSequence.
+ *
+ * @param currentScope org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ */
+ public void generateCode(BlockScope currentScope, CodeStream codeStream) {
+ if ((bits & IsReachableMASK) == 0) {
+ return;
+ }
+ int pc = codeStream.position;
+ // generate the expression
+ if ((expression != null) && (expression.constant == NotAConstant)) {
+ expression.generateCode(currentScope, codeStream, needValue()); // no value needed if non-returning subroutine
+ generateStoreSaveValueIfNecessary(codeStream);
+ }
+
+ // generation of code responsible for invoking the finally blocks in sequence
+ if (subroutines != null) {
+ for (int i = 0, max = subroutines.length; i < max; i++) {
+ SubRoutineStatement sub = subroutines[i];
+ sub.generateSubRoutineInvocation(currentScope, codeStream);
+ if (sub.isSubRoutineEscaping()) {
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ SubRoutineStatement.reenterExceptionHandlers(subroutines, i, codeStream);
+ return;
+ }
+ sub.exitAnyExceptionHandler();
+ }
+ }
+ if (saveValueVariable != null) codeStream.load(saveValueVariable);
+
+ if ((expression != null) && (expression.constant != NotAConstant)) {
+ codeStream.generateConstant(expression.constant, expression.implicitConversion);
+ generateStoreSaveValueIfNecessary(codeStream);
+ }
+ // output the suitable return bytecode or wrap the value inside a descriptor for doits
+ this.generateReturnBytecode(codeStream);
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ SubRoutineStatement.reenterExceptionHandlers(subroutines, -1, codeStream);
+ }
+ /**
+ * Dump the suitable return bytecode for a return statement
+ *
+ */
+ public void generateReturnBytecode(CodeStream codeStream) {
+
+ if (expression == null) {
+ codeStream.return_();
+ } else {
+ switch (expression.implicitConversion >> 4) {
+ case T_boolean :
+ case T_int :
+ codeStream.ireturn();
+ break;
+ case T_float :
+ codeStream.freturn();
+ break;
+ case T_long :
+ codeStream.lreturn();
+ break;
+ case T_double :
+ codeStream.dreturn();
+ break;
+ default :
+ codeStream.areturn();
+ }
+ }
+ }
+ public void generateStoreSaveValueIfNecessary(CodeStream codeStream){
+ if (saveValueVariable != null) codeStream.store(saveValueVariable, false);
+ }
+ public boolean needValue(){
+ return (subroutines == null) || (saveValueVariable != null) || isSynchronized;
+ }
+ public void prepareSaveValueLocation(TryStatement targetTryStatement){
+
+ this.saveValueVariable = targetTryStatement.secretReturnValue;
+ }
+ public StringBuffer printStatement(int tab, StringBuffer output){
+
+ printIndent(tab, output).append("return "); //$NON-NLS-1$
+ if (expression != null )
+ expression.printExpression(0, output) ;
+ return output.append(';');
+ }
+
+ public void resolve(BlockScope scope) {
+
+ MethodScope methodScope = scope.methodScope();
+ MethodBinding methodBinding;
+ TypeBinding methodType =
+ (methodScope.referenceContext instanceof AbstractMethodDeclaration)
+ ? ((methodBinding = ((AbstractMethodDeclaration) methodScope.referenceContext).binding) == null
+ ? null
+ : methodBinding.returnType)
+ : VoidBinding;
+ TypeBinding expressionType;
+ if (methodType == VoidBinding) {
+ // the expression should be null
+ if (expression == null)
+ return;
+ if ((expressionType = expression.resolveType(scope)) != null)
+ scope.problemReporter().attemptToReturnNonVoidExpression(this, expressionType);
+ return;
+ }
+ if (expression == null) {
+ if (methodType != null) scope.problemReporter().shouldReturn(methodType, this);
+ return;
+ }
+ expression.setExpectedType(methodType); // needed in case of generic method invocation
+ if ((expressionType = expression.resolveType(scope)) == null) return;
+ if (expressionType == VoidBinding) {
+ scope.problemReporter().attemptToReturnVoidValue(this);
+ return;
+ }
+ if (methodType == null)
+ return;
+
+ if (expressionType.isRawType() && (methodType.isBoundParameterizedType() || methodType.isGenericType())) {
+ scope.problemReporter().unsafeRawConversion(this.expression, expressionType, methodType);
+ }
+
+ if (expression.isConstantValueOfTypeAssignableToType(expressionType, methodType)) {
+ // dealing with constant
+ expression.computeConversion(scope, methodType, expressionType);
+ return;
+ }
+ if (expressionType.isCompatibleWith(methodType)) {
+ expression.computeConversion(scope, methodType, expressionType);
+ return;
+ }
+ scope.problemReporter().typeMismatchError(expressionType, methodType, expression);
+ }
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+ if (visitor.visit(this, scope)) {
+ if (expression != null)
+ expression.traverse(visitor, scope);
+ }
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SingleMemberAnnotation.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SingleMemberAnnotation.js
new file mode 100644
index 0000000..abc054b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SingleMemberAnnotation.js
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.CompilationUnitScope;
+
+/**
+ * SingleMemberAnnotation node
+ */
+public class SingleMemberAnnotation extends Annotation {
+ public Expression memberValue;
+
+ public SingleMemberAnnotation(char[][] tokens, long[] sourcePositions, int sourceStart) {
+ this.tokens = tokens;
+ this.sourcePositions = sourcePositions;
+ this.sourceStart = sourceStart;
+ this.sourceEnd = (int) sourcePositions[sourcePositions.length - 1];
+ }
+
+ public SingleMemberAnnotation(char[] token, long sourcePosition, int sourceStart) {
+ this.tokens = new char[][] { token };
+ this.sourcePositions = new long[] { sourcePosition };
+ this.sourceStart = sourceStart;
+ this.sourceEnd = (int) sourcePosition;
+ }
+
+ public StringBuffer printExpression(int indent, StringBuffer output) {
+ super.printExpression(indent, output);
+ output.append('(');
+ this.memberValue.printExpression(indent, output);
+ return output.append(')');
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+ if (visitor.visit(this, scope)) {
+ if (this.memberValue != null) {
+ this.memberValue.traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, scope);
+ }
+ public void traverse(ASTVisitor visitor, ClassScope scope) {
+ if (visitor.visit(this, scope)) {
+ if (this.memberValue != null) {
+ this.memberValue.traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, scope);
+ }
+ public void traverse(ASTVisitor visitor, CompilationUnitScope scope) {
+ if (visitor.visit(this, scope)) {
+ if (this.memberValue != null) {
+ this.memberValue.traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SingleNameReference.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SingleNameReference.js
new file mode 100644
index 0000000..8f05a7e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SingleNameReference.js
@@ -0,0 +1,689 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemSeverities;
+
+public class SingleNameReference extends NameReference implements OperatorIds {
+
+ public char[] token;
+ public MethodBinding[] syntheticAccessors; // [0]=read accessor [1]=write accessor
+ public static final int READ = 0;
+ public static final int WRITE = 1;
+ public TypeBinding genericCast;
+
+ public SingleNameReference(char[] source, long pos) {
+ super();
+ token = source;
+ sourceStart = (int) (pos >>> 32);
+ sourceEnd = (int) pos;
+ }
+ public FlowInfo analyseAssignment(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, Assignment assignment, boolean isCompound) {
+
+ boolean isReachable = flowInfo.isReachable();
+ // compound assignment extra work
+ if (isCompound) { // check the variable part is initialized if blank final
+ switch (bits & RestrictiveFlagMASK) {
+ case FIELD : // reading a field
+ FieldBinding fieldBinding;
+ if ((fieldBinding = (FieldBinding) binding).isBlankFinal()
+ && currentScope.allowBlankFinalFieldAssignment(fieldBinding)) {
+ if (!flowInfo.isDefinitelyAssigned(fieldBinding)) {
+ currentScope.problemReporter().uninitializedBlankFinalField(fieldBinding, this);
+ }
+ }
+ manageSyntheticAccessIfNecessary(currentScope, flowInfo, true /*read-access*/);
+ break;
+ case LOCAL : // reading a local variable
+ // check if assigning a final blank field
+ LocalVariableBinding localBinding;
+ if (!flowInfo.isDefinitelyAssigned(localBinding = (LocalVariableBinding) binding)) {
+ currentScope.problemReporter().uninitializedLocalVariable(localBinding, this);
+ // we could improve error msg here telling "cannot use compound assignment on final local variable"
+ }
+ if (isReachable) {
+ localBinding.useFlag = LocalVariableBinding.USED;
+ } else if (localBinding.useFlag == LocalVariableBinding.UNUSED) {
+ localBinding.useFlag = LocalVariableBinding.FAKE_USED;
+ }
+ }
+ }
+ if (assignment.expression != null) {
+ flowInfo = assignment.expression.analyseCode(currentScope, flowContext, flowInfo).unconditionalInits();
+ }
+ switch (bits & RestrictiveFlagMASK) {
+ case FIELD : // assigning to a field
+ manageSyntheticAccessIfNecessary(currentScope, flowInfo, false /*write-access*/);
+
+ // check if assigning a final field
+ FieldBinding fieldBinding;
+ if ((fieldBinding = (FieldBinding) binding).isFinal()) {
+ // inside a context where allowed
+ if (!isCompound && fieldBinding.isBlankFinal() && currentScope.allowBlankFinalFieldAssignment(fieldBinding)) {
+ if (flowInfo.isPotentiallyAssigned(fieldBinding)) {
+ currentScope.problemReporter().duplicateInitializationOfBlankFinalField(fieldBinding, this);
+ } else {
+ flowContext.recordSettingFinal(fieldBinding, this, flowInfo);
+ }
+ flowInfo.markAsDefinitelyAssigned(fieldBinding);
+ } else {
+ currentScope.problemReporter().cannotAssignToFinalField(fieldBinding, this);
+ }
+ }
+ break;
+ case LOCAL : // assigning to a local variable
+ LocalVariableBinding localBinding = (LocalVariableBinding) binding;
+ if (!flowInfo.isDefinitelyAssigned(localBinding)){// for local variable debug attributes
+ bits |= FirstAssignmentToLocalMASK;
+ } else {
+ bits &= ~FirstAssignmentToLocalMASK;
+ }
+ if (localBinding.isFinal()) {
+ if ((bits & DepthMASK) == 0) {
+ // tolerate assignment to final local in unreachable code (45674)
+ if ((isReachable && isCompound) || !localBinding.isBlankFinal()){
+ currentScope.problemReporter().cannotAssignToFinalLocal(localBinding, this);
+ } else if (flowInfo.isPotentiallyAssigned(localBinding)) {
+ currentScope.problemReporter().duplicateInitializationOfFinalLocal(localBinding, this);
+ } else {
+ flowContext.recordSettingFinal(localBinding, this, flowInfo);
+ }
+ } else {
+ currentScope.problemReporter().cannotAssignToFinalOuterLocal(localBinding, this);
+ }
+ }
+ flowInfo.markAsDefinitelyAssigned(localBinding);
+ }
+ manageEnclosingInstanceAccessIfNecessary(currentScope, flowInfo);
+ return flowInfo;
+ }
+ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
+ return analyseCode(currentScope, flowContext, flowInfo, true);
+ }
+ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, boolean valueRequired) {
+
+ switch (bits & RestrictiveFlagMASK) {
+ case FIELD : // reading a field
+ if (valueRequired) {
+ manageSyntheticAccessIfNecessary(currentScope, flowInfo, true /*read-access*/);
+ }
+ // check if reading a final blank field
+ FieldBinding fieldBinding;
+ if ((fieldBinding = (FieldBinding) binding).isBlankFinal()
+ && currentScope.allowBlankFinalFieldAssignment(fieldBinding)) {
+ if (!flowInfo.isDefinitelyAssigned(fieldBinding)) {
+ currentScope.problemReporter().uninitializedBlankFinalField(fieldBinding, this);
+ }
+ }
+ break;
+ case LOCAL : // reading a local variable
+ LocalVariableBinding localBinding;
+ if (!flowInfo.isDefinitelyAssigned(localBinding = (LocalVariableBinding) binding)) {
+ currentScope.problemReporter().uninitializedLocalVariable(localBinding, this);
+ }
+ if (flowInfo.isReachable()) {
+ localBinding.useFlag = LocalVariableBinding.USED;
+ } else if (localBinding.useFlag == LocalVariableBinding.UNUSED) {
+ localBinding.useFlag = LocalVariableBinding.FAKE_USED;
+ }
+ }
+ if (valueRequired) {
+ manageEnclosingInstanceAccessIfNecessary(currentScope, flowInfo);
+ }
+ return flowInfo;
+ }
+ public TypeBinding checkFieldAccess(BlockScope scope) {
+
+ FieldBinding fieldBinding = (FieldBinding) binding;
+
+ bits &= ~RestrictiveFlagMASK; // clear bits
+ bits |= FIELD;
+ if (!((FieldBinding) binding).isStatic()) {
+ // must check for the static status....
+ if (scope.methodScope().isStatic) {
+ scope.problemReporter().staticFieldAccessToNonStaticVariable(this, fieldBinding);
+ constant = NotAConstant;
+ return fieldBinding.type;
+ }
+ }
+ constant = FieldReference.getConstantFor(fieldBinding, this, true, scope);
+
+ if (isFieldUseDeprecated(fieldBinding, scope, (this.bits & IsStrictlyAssignedMASK) !=0))
+ scope.problemReporter().deprecatedField(fieldBinding, this);
+
+ MethodScope ms = scope.methodScope();
+ if ((this.bits & IsStrictlyAssignedMASK) == 0
+ && ms.enclosingSourceType() == fieldBinding.declaringClass
+ && ms.lastVisibleFieldID >= 0
+ && fieldBinding.id >= ms.lastVisibleFieldID) {
+ //if the field is static and ms is not .... then it is valid
+ if (!fieldBinding.isStatic() || ms.isStatic)
+ scope.problemReporter().forwardReference(this, 0, scope.enclosingSourceType());
+ }
+ //====================================================
+
+ return fieldBinding.type;
+
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.Expression#computeConversion(org.eclipse.wst.jsdt.internal.compiler.lookup.Scope, org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding, org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding)
+ */
+ public void computeConversion(Scope scope, TypeBinding runtimeTimeType, TypeBinding compileTimeType) {
+ if (runtimeTimeType == null || compileTimeType == null)
+ return;
+ if ((bits & FIELD) != 0 && this.binding != null && this.binding.isValidBinding()) {
+ // set the generic cast after the fact, once the type expectation is fully known (no need for strict cast)
+ FieldBinding originalBinding = ((FieldBinding)this.binding).original();
+ if (originalBinding != this.binding) {
+ // extra cast needed if method return type has type variable
+ if ((originalBinding.type.tagBits & TagBits.HasTypeVariable) != 0 && runtimeTimeType.id != T_Object) {
+ this.genericCast = originalBinding.type.genericCast(runtimeTimeType);
+ }
+ }
+ }
+ super.computeConversion(scope, runtimeTimeType, compileTimeType);
+}
+
+ public void generateAssignment(BlockScope currentScope, CodeStream codeStream, Assignment assignment, boolean valueRequired) {
+
+ // optimizing assignment like: i = i + 1 or i = 1 + i
+ if (assignment.expression.isCompactableOperation()) {
+ BinaryExpression operation = (BinaryExpression) assignment.expression;
+ SingleNameReference variableReference;
+ if ((operation.left instanceof SingleNameReference) && ((variableReference = (SingleNameReference) operation.left).binding == binding)) {
+ // i = i + value, then use the variable on the right hand side, since it has the correct implicit conversion
+ variableReference.generateCompoundAssignment(currentScope, codeStream, syntheticAccessors == null ? null : syntheticAccessors[WRITE], operation.right, (operation.bits & OperatorMASK) >> OperatorSHIFT, operation.left.implicitConversion /*should be equivalent to no conversion*/, valueRequired);
+ return;
+ }
+ int operator = (operation.bits & OperatorMASK) >> OperatorSHIFT;
+ if ((operation.right instanceof SingleNameReference)
+ && ((operator == PLUS) || (operator == MULTIPLY)) // only commutative operations
+ && ((variableReference = (SingleNameReference) operation.right).binding == binding)
+ && (operation.left.constant != NotAConstant) // exclude non constant expressions, since could have side-effect
+ && ((operation.left.implicitConversion >> 4) != T_String) // exclude string concatenation which would occur backwards
+ && ((operation.right.implicitConversion >> 4) != T_String)) { // exclude string concatenation which would occur backwards
+ // i = value + i, then use the variable on the right hand side, since it has the correct implicit conversion
+ variableReference.generateCompoundAssignment(currentScope, codeStream, syntheticAccessors == null ? null : syntheticAccessors[WRITE], operation.left, operator, operation.right.implicitConversion /*should be equivalent to no conversion*/, valueRequired);
+ return;
+ }
+ }
+ switch (bits & RestrictiveFlagMASK) {
+ case FIELD : // assigning to a field
+ FieldBinding fieldBinding;
+ if (!(fieldBinding = (FieldBinding) this.codegenBinding).isStatic()) { // need a receiver?
+ if ((bits & DepthMASK) != 0) {
+ ReferenceBinding targetType = currentScope.enclosingSourceType().enclosingTypeAt((bits & DepthMASK) >> DepthSHIFT);
+ Object[] emulationPath = currentScope.getEmulationPath(targetType, true /*only exact match*/, false/*consider enclosing arg*/);
+ codeStream.generateOuterAccess(emulationPath, this, targetType, currentScope);
+ } else {
+ this.generateReceiver(codeStream);
+ }
+ }
+ assignment.expression.generateCode(currentScope, codeStream, true);
+ fieldStore(codeStream, fieldBinding, syntheticAccessors == null ? null : syntheticAccessors[WRITE], valueRequired);
+ if (valueRequired) {
+ codeStream.generateImplicitConversion(assignment.implicitConversion);
+ }
+ // no need for generic cast as value got dupped
+ return;
+ case LOCAL : // assigning to a local variable
+ LocalVariableBinding localBinding = (LocalVariableBinding) this.codegenBinding;
+ if (localBinding.resolvedPosition != -1) {
+ assignment.expression.generateCode(currentScope, codeStream, true);
+ } else {
+ if (assignment.expression.constant != NotAConstant) {
+ // assigning an unused local to a constant value = no actual assignment is necessary
+ if (valueRequired) {
+ codeStream.generateConstant(assignment.expression.constant, assignment.implicitConversion);
+ }
+ } else {
+ assignment.expression.generateCode(currentScope, codeStream, true);
+ /* Even though the value may not be required, we force it to be produced, and discard it later
+ on if it was actually not necessary, so as to provide the same behavior as JDK1.2beta3. */
+ if (valueRequired) {
+ codeStream.generateImplicitConversion(assignment.implicitConversion); // implicit conversion
+ } else {
+ if ((localBinding.type == LongBinding) || (localBinding.type == DoubleBinding)) {
+ codeStream.pop2();
+ } else {
+ codeStream.pop();
+ }
+ }
+ }
+ return;
+ }
+ // 26903, need extra cast to store null in array local var
+ if (localBinding.type.isArrayType()
+ && (assignment.expression.resolvedType == NullBinding // arrayLoc = null
+ || ((assignment.expression instanceof CastExpression) // arrayLoc = (type[])null
+ && (((CastExpression)assignment.expression).innermostCastedExpression().resolvedType == NullBinding)))){
+ codeStream.checkcast(localBinding.type);
+ }
+
+ // normal local assignment (since cannot store in outer local which are final locations)
+ codeStream.store(localBinding, valueRequired);
+ if ((bits & FirstAssignmentToLocalMASK) != 0) { // for local variable debug attributes
+ localBinding.recordInitializationStartPC(codeStream.position);
+ }
+ // implicit conversion
+ if (valueRequired) {
+ codeStream.generateImplicitConversion(assignment.implicitConversion);
+ }
+ }
+ }
+ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
+ int pc = codeStream.position;
+ if (constant != NotAConstant) {
+ if (valueRequired) {
+ codeStream.generateConstant(constant, implicitConversion);
+ }
+ } else {
+ switch (bits & RestrictiveFlagMASK) {
+ case FIELD : // reading a field
+ FieldBinding fieldBinding;
+ if (valueRequired) {
+ if (!(fieldBinding = (FieldBinding) this.codegenBinding).isConstantValue()) { // directly use inlined value for constant fields
+ boolean isStatic;
+ if (!(isStatic = fieldBinding.isStatic())) {
+ if ((bits & DepthMASK) != 0) {
+ ReferenceBinding targetType = currentScope.enclosingSourceType().enclosingTypeAt((bits & DepthMASK) >> DepthSHIFT);
+ Object[] emulationPath = currentScope.getEmulationPath(targetType, true /*only exact match*/, false/*consider enclosing arg*/);
+ codeStream.generateOuterAccess(emulationPath, this, targetType, currentScope);
+ } else {
+ generateReceiver(codeStream);
+ }
+ }
+ // managing private access
+ if ((syntheticAccessors == null) || (syntheticAccessors[READ] == null)) {
+ if (isStatic) {
+ codeStream.getstatic(fieldBinding);
+ } else {
+ codeStream.getfield(fieldBinding);
+ }
+ } else {
+ codeStream.invokestatic(syntheticAccessors[READ]);
+ }
+ codeStream.generateImplicitConversion(implicitConversion);
+ if (this.genericCast != null) codeStream.checkcast(this.genericCast);
+ } else { // directly use the inlined value
+ codeStream.generateConstant(fieldBinding.constant(), implicitConversion);
+ }
+ }
+ break;
+ case LOCAL : // reading a local
+ LocalVariableBinding localBinding = (LocalVariableBinding) this.codegenBinding;
+ if (valueRequired) {
+ // outer local?
+ if ((bits & DepthMASK) != 0) {
+ // outer local can be reached either through a synthetic arg or a synthetic field
+ VariableBinding[] path = currentScope.getEmulationPath(localBinding);
+ codeStream.generateOuterAccess(path, this, localBinding, currentScope);
+ } else {
+ // regular local variable read
+ codeStream.load(localBinding);
+ }
+ codeStream.generateImplicitConversion(implicitConversion);
+ }
+ }
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+ /*
+ * Regular API for compound assignment, relies on the fact that there is only one reference to the
+ * variable, which carries both synthetic read/write accessors.
+ * The APIs with an extra argument is used whenever there are two references to the same variable which
+ * are optimized in one access: e.g "a = a + 1" optimized into "a++".
+ */
+ public void generateCompoundAssignment(BlockScope currentScope, CodeStream codeStream, Expression expression, int operator, int assignmentImplicitConversion, boolean valueRequired) {
+
+ this.generateCompoundAssignment(
+ currentScope,
+ codeStream,
+ syntheticAccessors == null ? null : syntheticAccessors[WRITE],
+ expression,
+ operator,
+ assignmentImplicitConversion,
+ valueRequired);
+ }
+ /*
+ * The APIs with an extra argument is used whenever there are two references to the same variable which
+ * are optimized in one access: e.g "a = a + 1" optimized into "a++".
+ */
+ public void generateCompoundAssignment(BlockScope currentScope, CodeStream codeStream, MethodBinding writeAccessor, Expression expression, int operator, int assignmentImplicitConversion, boolean valueRequired) {
+ switch (bits & RestrictiveFlagMASK) {
+ case FIELD : // assigning to a field
+ FieldBinding fieldBinding;
+ if ((fieldBinding = (FieldBinding) this.codegenBinding).isStatic()) {
+ if ((syntheticAccessors == null) || (syntheticAccessors[READ] == null)) {
+ codeStream.getstatic(fieldBinding);
+ } else {
+ codeStream.invokestatic(syntheticAccessors[READ]);
+ }
+ } else {
+ if ((bits & DepthMASK) != 0) {
+ ReferenceBinding targetType = currentScope.enclosingSourceType().enclosingTypeAt((bits & DepthMASK) >> DepthSHIFT);
+ Object[] emulationPath = currentScope.getEmulationPath(targetType, true /*only exact match*/, false/*consider enclosing arg*/);
+ codeStream.generateOuterAccess(emulationPath, this, targetType, currentScope);
+ } else {
+ codeStream.aload_0();
+ }
+ codeStream.dup();
+ if ((syntheticAccessors == null) || (syntheticAccessors[READ] == null)) {
+ codeStream.getfield(fieldBinding);
+ } else {
+ codeStream.invokestatic(syntheticAccessors[READ]);
+ }
+ }
+ break;
+ case LOCAL : // assigning to a local variable (cannot assign to outer local)
+ LocalVariableBinding localBinding = (LocalVariableBinding) this.codegenBinding;
+ Constant assignConstant;
+ int increment;
+ // using incr bytecode if possible
+ switch (localBinding.type.id) {
+ case T_String :
+ codeStream.generateStringConcatenationAppend(currentScope, this, expression);
+ if (valueRequired) {
+ codeStream.dup();
+ }
+ codeStream.store(localBinding, false);
+ return;
+ case T_int :
+ if (((assignConstant = expression.constant) != NotAConstant)
+ && (assignConstant.typeID() != T_float) // only for integral types
+ && (assignConstant.typeID() != T_double)
+ && ((increment = assignConstant.intValue()) == (short) increment)) { // 16 bits value
+ switch (operator) {
+ case PLUS :
+ codeStream.iinc(localBinding.resolvedPosition, increment);
+ if (valueRequired) {
+ codeStream.load(localBinding);
+ }
+ return;
+ case MINUS :
+ codeStream.iinc(localBinding.resolvedPosition, -increment);
+ if (valueRequired) {
+ codeStream.load(localBinding);
+ }
+ return;
+ }
+ }
+ default :
+ codeStream.load(localBinding);
+ }
+ }
+ // perform the actual compound operation
+ int operationTypeID;
+ if ((operationTypeID = implicitConversion >> 4) == T_String || operationTypeID == T_Object) {
+ // we enter here if the single name reference is a field of type java.lang.String or if the type of the
+ // operation is java.lang.Object
+ // For example: o = o + ""; // where the compiled type of o is java.lang.Object.
+ codeStream.generateStringConcatenationAppend(currentScope, null, expression);
+ // no need for generic cast on previous #getfield since using Object string buffer methods.
+ } else {
+ // promote the array reference to the suitable operation type
+ codeStream.generateImplicitConversion(implicitConversion);
+ // generate the increment value (will by itself be promoted to the operation value)
+ if (expression == IntLiteral.One){ // prefix operation
+ codeStream.generateConstant(expression.constant, implicitConversion);
+ } else {
+ expression.generateCode(currentScope, codeStream, true);
+ }
+ // perform the operation
+ codeStream.sendOperator(operator, operationTypeID);
+ // cast the value back to the array reference type
+ codeStream.generateImplicitConversion(assignmentImplicitConversion);
+ }
+ // store the result back into the variable
+ switch (bits & RestrictiveFlagMASK) {
+ case FIELD : // assigning to a field
+ fieldStore(codeStream, (FieldBinding) this.codegenBinding, writeAccessor, valueRequired);
+ // no need for generic cast as value got dupped
+ return;
+ case LOCAL : // assigning to a local variable
+ LocalVariableBinding localBinding = (LocalVariableBinding) this.codegenBinding;
+ if (valueRequired) {
+ if ((localBinding.type == LongBinding) || (localBinding.type == DoubleBinding)) {
+ codeStream.dup2();
+ } else {
+ codeStream.dup();
+ }
+ }
+ codeStream.store(localBinding, false);
+ }
+ }
+
+ public void generatePostIncrement(BlockScope currentScope, CodeStream codeStream, CompoundAssignment postIncrement, boolean valueRequired) {
+ switch (bits & RestrictiveFlagMASK) {
+ case FIELD : // assigning to a field
+ FieldBinding fieldBinding;
+ if ((fieldBinding = (FieldBinding) this.codegenBinding).isStatic()) {
+ if ((syntheticAccessors == null) || (syntheticAccessors[READ] == null)) {
+ codeStream.getstatic(fieldBinding);
+ } else {
+ codeStream.invokestatic(syntheticAccessors[READ]);
+ }
+ } else {
+ if ((bits & DepthMASK) != 0) {
+ ReferenceBinding targetType = currentScope.enclosingSourceType().enclosingTypeAt((bits & DepthMASK) >> DepthSHIFT);
+ Object[] emulationPath = currentScope.getEmulationPath(targetType, true /*only exact match*/, false/*consider enclosing arg*/);
+ codeStream.generateOuterAccess(emulationPath, this, targetType, currentScope);
+ } else {
+ codeStream.aload_0();
+ }
+ codeStream.dup();
+ if ((syntheticAccessors == null) || (syntheticAccessors[READ] == null)) {
+ codeStream.getfield(fieldBinding);
+ } else {
+ codeStream.invokestatic(syntheticAccessors[READ]);
+ }
+ }
+ if (valueRequired) {
+ if (fieldBinding.isStatic()) {
+ if ((fieldBinding.type == LongBinding) || (fieldBinding.type == DoubleBinding)) {
+ codeStream.dup2();
+ } else {
+ codeStream.dup();
+ }
+ } else { // Stack: [owner][old field value] ---> [old field value][owner][old field value]
+ if ((fieldBinding.type == LongBinding) || (fieldBinding.type == DoubleBinding)) {
+ codeStream.dup2_x1();
+ } else {
+ codeStream.dup_x1();
+ }
+ }
+ }
+ codeStream.generateConstant(postIncrement.expression.constant, implicitConversion);
+ codeStream.sendOperator(postIncrement.operator, fieldBinding.type.id);
+ codeStream.generateImplicitConversion(postIncrement.assignmentImplicitConversion);
+ fieldStore(codeStream, fieldBinding, syntheticAccessors == null ? null : syntheticAccessors[WRITE], false);
+ // no need for generic cast
+ return;
+ case LOCAL : // assigning to a local variable
+ LocalVariableBinding localBinding = (LocalVariableBinding) this.codegenBinding;
+ // using incr bytecode if possible
+ if (localBinding.type == IntBinding) {
+ if (valueRequired) {
+ codeStream.load(localBinding);
+ }
+ if (postIncrement.operator == PLUS) {
+ codeStream.iinc(localBinding.resolvedPosition, 1);
+ } else {
+ codeStream.iinc(localBinding.resolvedPosition, -1);
+ }
+ } else {
+ codeStream.load(localBinding);
+ if (valueRequired){
+ if ((localBinding.type == LongBinding) || (localBinding.type == DoubleBinding)) {
+ codeStream.dup2();
+ } else {
+ codeStream.dup();
+ }
+ }
+ codeStream.generateConstant(postIncrement.expression.constant, implicitConversion);
+ codeStream.sendOperator(postIncrement.operator, localBinding.type.id);
+ codeStream.generateImplicitConversion(postIncrement.assignmentImplicitConversion);
+
+ codeStream.store(localBinding, false);
+ }
+ }
+ }
+
+ public void generateReceiver(CodeStream codeStream) {
+
+ codeStream.aload_0();
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.InvocationSite#genericTypeArguments()
+ */
+ public TypeBinding[] genericTypeArguments() {
+ return null;
+ }
+
+ public void manageEnclosingInstanceAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo) {
+
+ if (!flowInfo.isReachable()) return;
+ //If inlinable field, forget the access emulation, the code gen will directly target it
+ if (((bits & DepthMASK) == 0) || (constant != NotAConstant)) return;
+
+ if ((bits & RestrictiveFlagMASK) == LOCAL) {
+ currentScope.emulateOuterAccess((LocalVariableBinding) binding);
+ }
+ }
+ public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo, boolean isReadAccess) {
+
+ if (!flowInfo.isReachable()) return;
+
+ //If inlinable field, forget the access emulation, the code gen will directly target it
+ if (constant != NotAConstant)
+ return;
+
+ if ((bits & FIELD) != 0) {
+ FieldBinding fieldBinding = (FieldBinding) binding;
+ FieldBinding codegenField = fieldBinding.original();
+ this.codegenBinding = codegenField;
+ if (((bits & DepthMASK) != 0)
+ && (codegenField.isPrivate() // private access
+ || (codegenField.isProtected() // implicit protected access
+ && codegenField.declaringClass.getPackage() != currentScope.enclosingSourceType().getPackage()))) {
+ if (syntheticAccessors == null)
+ syntheticAccessors = new MethodBinding[2];
+ syntheticAccessors[isReadAccess ? READ : WRITE] =
+ ((SourceTypeBinding)currentScope.enclosingSourceType().
+ enclosingTypeAt((bits & DepthMASK) >> DepthSHIFT)).addSyntheticMethod(codegenField, isReadAccess);
+ currentScope.problemReporter().needToEmulateFieldAccess(codegenField, this, isReadAccess);
+ return;
+ }
+ // if the binding declaring class is not visible, need special action
+ // for runtime compatibility on 1.2 VMs : change the declaring class of the binding
+ // NOTE: from target 1.2 on, field's declaring class is touched if any different from receiver type
+ // and not from Object or implicit static field access.
+ if (fieldBinding.declaringClass != this.actualReceiverType
+ && !this.actualReceiverType.isArrayType()
+ && fieldBinding.declaringClass != null
+ && !fieldBinding.isConstantValue()
+ && ((currentScope.environment().options.targetJDK >= ClassFileConstants.JDK1_2
+ && !fieldBinding.isStatic()
+ && fieldBinding.declaringClass.id != T_Object) // no change for Object fields (if there was any)
+ || !codegenField.declaringClass.canBeSeenBy(currentScope))){
+ this.codegenBinding =
+ currentScope.enclosingSourceType().getUpdatedFieldBinding(
+ codegenField,
+ (ReferenceBinding)this.actualReceiverType.erasure());
+ }
+ }
+ }
+ public StringBuffer printExpression(int indent, StringBuffer output){
+
+ return output.append(token);
+ }
+
+ public TypeBinding reportError(BlockScope scope) {
+
+ //=====error cases=======
+ constant = Constant.NotAConstant;
+ if (binding instanceof ProblemFieldBinding) {
+ scope.problemReporter().invalidField(this, (FieldBinding) binding);
+ } else if (binding instanceof ProblemReferenceBinding) {
+ scope.problemReporter().invalidType(this, (TypeBinding) binding);
+ } else {
+ scope.problemReporter().unresolvableReference(this, binding);
+ }
+ return null;
+ }
+ public TypeBinding resolveType(BlockScope scope) {
+ // for code gen, harm the restrictiveFlag
+
+ this.actualReceiverType = this.receiverType = scope.enclosingSourceType();
+
+ if ((this.codegenBinding = this.binding = scope.getBinding(token, bits & RestrictiveFlagMASK, this, true /*resolve*/)).isValidBinding()) {
+ switch (bits & RestrictiveFlagMASK) {
+ case VARIABLE : // =========only variable============
+ case VARIABLE | TYPE : //====both variable and type============
+ if (binding instanceof VariableBinding) {
+ VariableBinding variable = (VariableBinding) binding;
+ if (binding instanceof LocalVariableBinding) {
+ bits &= ~RestrictiveFlagMASK; // clear bits
+ bits |= LOCAL;
+ if ((this.bits & IsStrictlyAssignedMASK) == 0) {
+ constant = variable.constant();
+ } else {
+ constant = NotAConstant;
+ }
+ if (!variable.isFinal() && (bits & DepthMASK) != 0) {
+ scope.problemReporter().cannotReferToNonFinalOuterLocal((LocalVariableBinding)variable, this);
+ }
+ return this.resolvedType = variable.type;
+ }
+ // a field
+ FieldBinding field = (FieldBinding) this.binding;
+ if (!field.isStatic() && scope.environment().options.getSeverity(CompilerOptions.UnqualifiedFieldAccess) != ProblemSeverities.Ignore) {
+ scope.problemReporter().unqualifiedFieldAccess(this, field);
+ }
+ return this.resolvedType = checkFieldAccess(scope);
+ }
+
+ // thus it was a type
+ bits &= ~RestrictiveFlagMASK; // clear bits
+ bits |= TYPE;
+ case TYPE : //========only type==============
+ constant = Constant.NotAConstant;
+ //deprecated test
+ TypeBinding type = (TypeBinding)binding;
+ if (isTypeUseDeprecated(type, scope))
+ scope.problemReporter().deprecatedType(type, this);
+ return this.resolvedType = scope.convertToRawType(type);
+ }
+ }
+
+ // error scenarii
+ return this.resolvedType = this.reportError(scope);
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+
+ visitor.visit(this, scope);
+ visitor.endVisit(this, scope);
+ }
+
+ public String unboundReferenceErrorName(){
+
+ return new String(token);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SingleTypeReference.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SingleTypeReference.js
new file mode 100644
index 0000000..c33f25e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SingleTypeReference.js
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class SingleTypeReference extends TypeReference {
+
+ public char[] token;
+
+ public SingleTypeReference(char[] source, long pos) {
+
+ token = source;
+ sourceStart = (int) (pos>>>32) ;
+ sourceEnd = (int) (pos & 0x00000000FFFFFFFFL) ;
+
+ }
+
+ public TypeReference copyDims(int dim){
+ //return a type reference copy of me with some dimensions
+ //warning : the new type ref has a null binding
+
+ return new ArrayTypeReference(token, dim,(((long)sourceStart)<<32)+sourceEnd);
+ }
+
+ protected TypeBinding getTypeBinding(Scope scope) {
+ if (this.resolvedType != null)
+ return this.resolvedType;
+
+ this.resolvedType = scope.getType(token);
+
+ if (scope.kind == Scope.CLASS_SCOPE && this.resolvedType.isValidBinding())
+ if (((ClassScope) scope).detectCycle(this.resolvedType, this, null))
+ return null;
+ return this.resolvedType;
+ }
+
+ public char [][] getTypeName() {
+ return new char[][] { token };
+ }
+
+ public StringBuffer printExpression(int indent, StringBuffer output){
+
+ return output.append(token);
+ }
+
+ public TypeBinding resolveTypeEnclosing(BlockScope scope, ReferenceBinding enclosingType) {
+
+ ReferenceBinding memberType = scope.getMemberType(token, enclosingType);
+ if (!memberType.isValidBinding()) {
+ scope.problemReporter().invalidEnclosingType(this, memberType, enclosingType);
+ return null;
+ }
+ if (isTypeUseDeprecated(memberType, scope))
+ scope.problemReporter().deprecatedType(memberType, this);
+ return this.resolvedType = scope.convertToRawType(memberType);
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+ visitor.visit(this, scope);
+ visitor.endVisit(this, scope);
+ }
+
+ public void traverse(ASTVisitor visitor, ClassScope scope) {
+ visitor.visit(this, scope);
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Statement.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Statement.js
new file mode 100644
index 0000000..38a7016
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Statement.js
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public abstract class Statement extends ASTNode {
+
+ public abstract FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo);
+
+ /**
+ * INTERNAL USE ONLY.
+ * This is used to redirect inter-statements jumps.
+ */
+ public void branchChainTo(Label label) {
+ // do nothing by default
+ }
+
+ // Report an error if necessary
+ public boolean complainIfUnreachable(FlowInfo flowInfo, BlockScope scope, boolean didAlreadyComplain) {
+
+ if ((flowInfo.reachMode() & FlowInfo.UNREACHABLE) != 0) {
+ this.bits &= ~ASTNode.IsReachableMASK;
+ boolean reported = flowInfo == FlowInfo.DEAD_END;
+ if (!didAlreadyComplain && reported) {
+ scope.problemReporter().unreachableCode(this);
+ }
+ return reported; // keep going for fake reachable
+ }
+ return false;
+ }
+
+ public abstract void generateCode(BlockScope currentScope, CodeStream codeStream);
+
+ public boolean isEmptyBlock() {
+ return false;
+ }
+
+ public boolean isValidJavaStatement() {
+ //the use of this method should be avoid in most cases
+ //and is here mostly for documentation purpose.....
+ //while the parser is responsable for creating
+ //welled formed expression statement, which results
+ //in the fact that java-non-semantic-expression-used-as-statement
+ //should not be parsable...thus not being built.
+ //It sounds like the java grammar as help the compiler job in removing
+ //-by construction- some statement that would have no effect....
+ //(for example all expression that may do side-effects are valid statement
+ // -this is an appromative idea.....-)
+
+ return true;
+ }
+
+ public StringBuffer print(int indent, StringBuffer output) {
+ return printStatement(indent, output);
+ }
+ public abstract StringBuffer printStatement(int indent, StringBuffer output);
+
+ public abstract void resolve(BlockScope scope);
+
+ public Constant resolveCase(BlockScope scope, TypeBinding testType, SwitchStatement switchStatement) {
+ // statement within a switch that are not case are treated as normal statement....
+
+ resolve(scope);
+ return null;
+ }
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/StringLiteral.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/StringLiteral.js
new file mode 100644
index 0000000..3c2f6dc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/StringLiteral.js
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream;
+import org.eclipse.wst.jsdt.internal.compiler.impl.Constant;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding;
+
+public class StringLiteral extends Literal {
+
+ char[] source;
+
+ public StringLiteral(char[] token, int s, int e) {
+
+ this(s,e);
+ source = token;
+ }
+
+ public StringLiteral(int s, int e) {
+
+ super(s,e);
+ }
+
+ public void computeConstant() {
+
+ constant = Constant.fromValue(String.valueOf(source));
+ }
+
+ public ExtendedStringLiteral extendWith(CharLiteral lit){
+
+ //add the lit source to mine, just as if it was mine
+ return new ExtendedStringLiteral(this,lit);
+ }
+
+ public ExtendedStringLiteral extendWith(StringLiteral lit){
+
+ //add the lit source to mine, just as if it was mine
+ return new ExtendedStringLiteral(this,lit);
+ }
+
+ /**
+ * Add the lit source to mine, just as if it was mine
+ */
+ public StringLiteralConcatenation extendsWith(StringLiteral lit) {
+ return new StringLiteralConcatenation(this, lit);
+ }
+ /**
+ * Code generation for string literal
+ */
+ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
+
+ int pc = codeStream.position;
+ if (valueRequired)
+ codeStream.ldc(constant.stringValue());
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+
+ public TypeBinding literalType(BlockScope scope) {
+
+ return scope.getJavaLangString();
+ }
+
+ public StringBuffer printExpression(int indent, StringBuffer output) {
+
+ // handle some special char.....
+ output.append('\"');
+ for (int i = 0; i < source.length; i++) {
+ switch (source[i]) {
+ case '\b' :
+ output.append("\\b"); //$NON-NLS-1$
+ break;
+ case '\t' :
+ output.append("\\t"); //$NON-NLS-1$
+ break;
+ case '\n' :
+ output.append("\\n"); //$NON-NLS-1$
+ break;
+ case '\f' :
+ output.append("\\f"); //$NON-NLS-1$
+ break;
+ case '\r' :
+ output.append("\\r"); //$NON-NLS-1$
+ break;
+ case '\"' :
+ output.append("\\\""); //$NON-NLS-1$
+ break;
+ case '\'' :
+ output.append("\\'"); //$NON-NLS-1$
+ break;
+ case '\\' : //take care not to display the escape as a potential real char
+ output.append("\\\\"); //$NON-NLS-1$
+ break;
+ default :
+ output.append(source[i]);
+ }
+ }
+ output.append('\"');
+ return output;
+ }
+
+ public char[] source() {
+
+ return source;
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+ visitor.visit(this, scope);
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/StringLiteralConcatenation.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/StringLiteralConcatenation.js
new file mode 100644
index 0000000..5eab2a3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/StringLiteralConcatenation.js
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+
+/**
+ * Flatten string literal
+ */
+public class StringLiteralConcatenation extends StringLiteral {
+ private static final int INITIAL_SIZE = 5;
+ public StringLiteral[] literals;
+ public int counter;
+ /**
+ * Build a two-strings literal
+ * */
+ public StringLiteralConcatenation(StringLiteral str1, StringLiteral str2) {
+ super(str1.sourceStart, str1.sourceEnd);
+ this.source = str1.source;
+ this.literals = new StringLiteral[INITIAL_SIZE];
+ this.counter = 0;
+ this.literals[this.counter++] = str1;
+ extendsWith(str2);
+ }
+
+ /**
+ * Add the lit source to mine, just as if it was mine
+ */
+ public StringLiteralConcatenation extendsWith(StringLiteral lit) {
+ this.sourceEnd = lit.sourceEnd;
+ final int literalsLength = this.literals.length;
+ if (this.counter == literalsLength) {
+ // resize
+ System.arraycopy(this.literals, 0, this.literals = new StringLiteral[literalsLength + INITIAL_SIZE], 0, literalsLength);
+ }
+ //uddate the source
+ int length = source.length;
+ System.arraycopy(
+ source,
+ 0,
+ source = new char[length + lit.source.length],
+ 0,
+ length);
+ System.arraycopy(lit.source, 0, source, length, lit.source.length);
+ this.literals[this.counter++] = lit;
+ return this;
+ }
+
+ public StringBuffer printExpression(int indent, StringBuffer output) {
+ output.append("StringLiteralConcatenation{"); //$NON-NLS-1$
+ for (int i = 0, max = this.counter; i < max; i++) {
+ this.literals[i].printExpression(indent, output);
+ output.append("+\n");//$NON-NLS-1$
+ }
+ return output.append('}');
+ }
+
+ public char[] source() {
+ return source;
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+ if (visitor.visit(this, scope)) {
+ for (int i = 0, max = this.counter; i < max; i++) {
+ this.literals[i].traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SubRoutineStatement.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SubRoutineStatement.js
new file mode 100644
index 0000000..303dd87
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SubRoutineStatement.js
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.ExceptionLabel;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+
+/**
+ * Extra behavior for statements which are generating subroutines
+ */
+public abstract class SubRoutineStatement extends Statement {
+
+ public static final ExceptionLabel[] NO_EXCEPTION_HANDLER = new ExceptionLabel[0];
+ ExceptionLabel[] anyExceptionLabels = NO_EXCEPTION_HANDLER;
+ int anyExceptionLabelsCount = 0;
+
+ public abstract boolean isSubRoutineEscaping();
+
+ public abstract void generateSubRoutineInvocation(BlockScope currentScope, CodeStream codeStream);
+
+ public ExceptionLabel enterAnyExceptionHandler(CodeStream codeStream) {
+
+ int length;
+ if ((length = this.anyExceptionLabelsCount) == this.anyExceptionLabels.length) {
+ System.arraycopy(this.anyExceptionLabels, 0 , this.anyExceptionLabels=new ExceptionLabel[length*2 + 1], 0, length);
+ }
+ ExceptionLabel exceptionLabel = new ExceptionLabel(codeStream, null);
+ this.anyExceptionLabels[this.anyExceptionLabelsCount++] = exceptionLabel;
+ return exceptionLabel;
+ }
+
+ public void exitAnyExceptionHandler() {
+ if (this.anyExceptionLabelsCount == 0) return;
+ ExceptionLabel currentLabel = this.anyExceptionLabels[this.anyExceptionLabelsCount-1];
+ if (currentLabel.start == currentLabel.codeStream.position) {
+ // discard empty exception handler
+ this.anyExceptionLabels[--this.anyExceptionLabelsCount] = null;
+ currentLabel.codeStream.removeExceptionHandler(currentLabel);
+ } else {
+ currentLabel.placeEnd();
+ }
+ }
+
+ public void placeAllAnyExceptionHandlers() {
+
+ for (int i = 0; i < this.anyExceptionLabelsCount; i++) {
+ this.anyExceptionLabels[i].place();
+ }
+ }
+
+ public static void reenterExceptionHandlers(SubRoutineStatement[] subroutines, int max, CodeStream codeStream) {
+ if (subroutines == null) return;
+ if (max < 0) max = subroutines.length;
+ for (int i = 0; i < max; i++) {
+ subroutines[i].enterAnyExceptionHandler(codeStream);
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SuperReference.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SuperReference.js
new file mode 100644
index 0000000..7933f7e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SuperReference.js
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.SourceTypeBinding;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding;
+
+public class SuperReference extends ThisReference {
+
+ public SuperReference(int sourceStart, int sourceEnd) {
+
+ super(sourceStart, sourceEnd);
+ }
+
+ public static ExplicitConstructorCall implicitSuperConstructorCall() {
+
+ return new ExplicitConstructorCall(ExplicitConstructorCall.ImplicitSuper);
+ }
+
+ public boolean isImplicitThis() {
+
+ return false;
+ }
+
+ public boolean isSuper() {
+
+ return true;
+ }
+
+ public boolean isThis() {
+
+ return false ;
+ }
+
+ public StringBuffer printExpression(int indent, StringBuffer output){
+
+ return output.append("super"); //$NON-NLS-1$
+
+ }
+
+ public TypeBinding resolveType(BlockScope scope) {
+
+ constant = NotAConstant;
+ if (!checkAccess(scope.methodScope()))
+ return null;
+ SourceTypeBinding enclosingTb = scope.enclosingSourceType();
+ if (enclosingTb.id == T_Object) {
+ scope.problemReporter().cannotUseSuperInJavaLangObject(this);
+ return null;
+ }
+ return this.resolvedType = enclosingTb.superclass;
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope blockScope) {
+ visitor.visit(this, blockScope);
+ visitor.endVisit(this, blockScope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SwitchStatement.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SwitchStatement.js
new file mode 100644
index 0000000..4b976ac
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SwitchStatement.js
@@ -0,0 +1,320 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class SwitchStatement extends Statement {
+
+ public Expression expression;
+ public Statement[] statements;
+ public BlockScope scope;
+ public int explicitDeclarations;
+ public Label breakLabel;
+ public CaseStatement[] cases;
+ public CaseStatement defaultCase;
+ public int caseCount = 0;
+ public int blockStart;
+
+ // for local variables table attributes
+ int preSwitchInitStateIndex = -1;
+ int mergedInitStateIndex = -1;
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ try {
+ flowInfo = expression.analyseCode(currentScope, flowContext, flowInfo);
+ SwitchFlowContext switchContext =
+ new SwitchFlowContext(flowContext, this, (breakLabel = new Label()));
+
+ // analyse the block by considering specially the case/default statements (need to bind them
+ // to the entry point)
+ FlowInfo caseInits = FlowInfo.DEAD_END;
+ // in case of statements before the first case
+ preSwitchInitStateIndex =
+ currentScope.methodScope().recordInitializationStates(flowInfo);
+ int caseIndex = 0;
+ if (statements != null) {
+ boolean didAlreadyComplain = false;
+ for (int i = 0, max = statements.length; i < max; i++) {
+ Statement statement = statements[i];
+ if ((caseIndex < caseCount) && (statement == cases[caseIndex])) { // statement is a case
+ this.scope.switchCase = cases[caseIndex]; // record entering in a switch case block
+ caseIndex++;
+ caseInits = caseInits.mergedWith(flowInfo.copy().unconditionalInits());
+ didAlreadyComplain = false; // reset complaint
+ } else if (statement == defaultCase) { // statement is the default case
+ this.scope.switchCase = defaultCase; // record entering in a switch case block
+ caseInits = caseInits.mergedWith(flowInfo.copy().unconditionalInits());
+ didAlreadyComplain = false; // reset complaint
+ }
+ if (!statement.complainIfUnreachable(caseInits, scope, didAlreadyComplain)) {
+ caseInits = statement.analyseCode(scope, switchContext, caseInits);
+ } else {
+ didAlreadyComplain = true;
+ }
+ }
+ }
+
+ // if no default case, then record it may jump over the block directly to the end
+ if (defaultCase == null) {
+ // only retain the potential initializations
+ flowInfo.addPotentialInitializationsFrom(
+ caseInits.mergedWith(switchContext.initsOnBreak));
+ mergedInitStateIndex =
+ currentScope.methodScope().recordInitializationStates(flowInfo);
+ return flowInfo;
+ }
+
+ // merge all branches inits
+ FlowInfo mergedInfo = caseInits.mergedWith(switchContext.initsOnBreak);
+ mergedInitStateIndex =
+ currentScope.methodScope().recordInitializationStates(mergedInfo);
+ return mergedInfo;
+ } finally {
+ if (this.scope != null) this.scope.switchCase = null; // no longer inside switch case block
+ }
+ }
+
+ /**
+ * Switch code generation
+ *
+ * @param currentScope org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ */
+ public void generateCode(BlockScope currentScope, CodeStream codeStream) {
+
+ try {
+ int[] sortedIndexes = new int[caseCount];
+ int[] localKeysCopy;
+ if ((bits & IsReachableMASK) == 0) {
+ return;
+ }
+ int pc = codeStream.position;
+
+ // prepare the labels and constants
+ breakLabel.initialize(codeStream);
+ CaseLabel[] caseLabels = new CaseLabel[caseCount];
+ int[] constants = new int[caseCount];
+ boolean needSwitch = caseCount != 0;
+ for (int i = 0; i < caseCount; i++) {
+ constants[i] = cases[i].constantExpression.constant.intValue();
+ cases[i].targetLabel = (caseLabels[i] = new CaseLabel(codeStream));
+ }
+
+ // we sort the keys to be able to generate the code for tableswitch or lookupswitch
+ for (int i = 0; i < caseCount; i++) {
+ sortedIndexes[i] = i;
+ }
+ System.arraycopy(
+ constants,
+ 0,
+ (localKeysCopy = new int[caseCount]),
+ 0,
+ caseCount);
+ CodeStream.sort(localKeysCopy, 0, caseCount - 1, sortedIndexes);
+ CaseLabel defaultLabel = new CaseLabel(codeStream);
+ if (defaultCase != null) {
+ defaultCase.targetLabel = defaultLabel;
+ }
+ // generate expression testes
+ expression.generateCode(currentScope, codeStream, needSwitch);
+
+ // generate the appropriate switch table/lookup bytecode
+ if (needSwitch) {
+ int max = localKeysCopy[caseCount - 1];
+ int min = localKeysCopy[0];
+ if ((long) (caseCount * 2.5) > ((long) max - (long) min)) {
+
+ // work-around 1.3 VM bug, if max>0x7FFF0000, must use lookup bytecode
+ // see http://dev.eclipse.org/bugs/show_bug.cgi?id=21557
+ if (max > 0x7FFF0000 && currentScope.environment().options.complianceLevel < ClassFileConstants.JDK1_4) {
+ codeStream.lookupswitch(defaultLabel, constants, sortedIndexes, caseLabels);
+
+ } else {
+ codeStream.tableswitch(
+ defaultLabel,
+ min,
+ max,
+ constants,
+ sortedIndexes,
+ caseLabels);
+ }
+ } else {
+ codeStream.lookupswitch(defaultLabel, constants, sortedIndexes, caseLabels);
+ }
+ codeStream.updateLastRecordedEndPC(codeStream.position);
+ }
+
+ // generate the switch block statements
+ int caseIndex = 0;
+ if (statements != null) {
+ for (int i = 0, maxCases = statements.length; i < maxCases; i++) {
+ Statement statement = statements[i];
+ if ((caseIndex < caseCount) && (statement == cases[caseIndex])) { // statements[i] is a case
+ this.scope.switchCase = cases[caseIndex]; // record entering in a switch case block
+ if (preSwitchInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(currentScope, preSwitchInitStateIndex);
+ }
+ caseIndex++;
+ } else {
+ if (statement == defaultCase) { // statements[i] is a case or a default case
+ this.scope.switchCase = defaultCase; // record entering in a switch case block
+ if (preSwitchInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(currentScope, preSwitchInitStateIndex);
+ }
+ }
+ }
+ statement.generateCode(scope, codeStream);
+ }
+ }
+ // place the trailing labels (for break and default case)
+ breakLabel.place();
+ if (defaultCase == null) {
+ defaultLabel.place();
+ }
+ // May loose some local variable initializations : affecting the local variable attributes
+ if (mergedInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(currentScope, mergedInitStateIndex);
+ codeStream.addDefinitelyAssignedVariables(currentScope, mergedInitStateIndex);
+ }
+ if (scope != currentScope) {
+ codeStream.exitUserScope(scope);
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ } finally {
+ if (this.scope != null) this.scope.switchCase = null; // no longer inside switch case block
+ }
+ }
+
+ public StringBuffer printStatement(int indent, StringBuffer output) {
+
+ printIndent(indent, output).append("switch ("); //$NON-NLS-1$
+ expression.printExpression(0, output).append(") {"); //$NON-NLS-1$
+ if (statements != null) {
+ for (int i = 0; i < statements.length; i++) {
+ output.append('\n');
+ if (statements[i] instanceof CaseStatement) {
+ statements[i].printStatement(indent, output);
+ } else {
+ statements[i].printStatement(indent+2, output);
+ }
+ }
+ }
+ output.append("\n"); //$NON-NLS-1$
+ return printIndent(indent, output).append('}');
+ }
+
+ public void resolve(BlockScope upperScope) {
+
+ try {
+ TypeBinding testType = expression.resolveType(upperScope);
+ if (testType == null)
+ return;
+ expression.computeConversion(upperScope, testType, testType);
+ if (!(expression.isConstantValueOfTypeAssignableToType(testType, IntBinding))) {
+ if (!testType.isCompatibleWith(IntBinding)) {
+ upperScope.problemReporter().incorrectSwitchType(expression, testType);
+ return;
+ }
+ }
+ if (statements != null) {
+ scope = explicitDeclarations == 0 ? upperScope : new BlockScope(upperScope);
+ int length;
+ // collection of cases is too big but we will only iterate until caseCount
+ cases = new CaseStatement[length = statements.length];
+ int[] casesValues = new int[length];
+ CaseStatement[] duplicateCaseStatements = null;
+ int duplicateCaseStatementsCounter = 0;
+ int counter = 0;
+ for (int i = 0; i < length; i++) {
+ Constant constant;
+ final Statement statement = statements[i];
+ if ((constant = statement.resolveCase(scope, testType, this)) != null) {
+ //----check for duplicate case statement------------
+ if (constant != NotAConstant) {
+ int key = constant.intValue();
+ for (int j = 0; j < counter; j++) {
+ if (casesValues[j] == key) {
+ final CaseStatement currentCaseStatement = (CaseStatement) statement;
+ if (duplicateCaseStatements == null) {
+ scope.problemReporter().duplicateCase(cases[j]);
+ scope.problemReporter().duplicateCase(currentCaseStatement);
+ duplicateCaseStatements = new CaseStatement[length];
+ duplicateCaseStatements[duplicateCaseStatementsCounter++] = cases[j];
+ duplicateCaseStatements[duplicateCaseStatementsCounter++] = currentCaseStatement;
+ } else {
+ boolean found = false;
+ searchReportedDuplicate: for (int k = 2; k < duplicateCaseStatementsCounter; k++) {
+ if (duplicateCaseStatements[k] == statement) {
+ found = true;
+ break searchReportedDuplicate;
+ }
+ }
+ if (!found) {
+ scope.problemReporter().duplicateCase(currentCaseStatement);
+ duplicateCaseStatements[duplicateCaseStatementsCounter++] = currentCaseStatement;
+ }
+ }
+ }
+ }
+ casesValues[counter++] = key;
+ }
+ }
+ }
+ } else {
+ if ((this.bits & UndocumentedEmptyBlockMASK) != 0) {
+ upperScope.problemReporter().undocumentedEmptyBlock(this.blockStart, this.sourceEnd);
+ }
+ }
+ } finally {
+ if (this.scope != null) this.scope.switchCase = null; // no longer inside switch case block
+ }
+ }
+
+ public void traverse(
+ ASTVisitor visitor,
+ BlockScope blockScope) {
+
+ if (visitor.visit(this, blockScope)) {
+ expression.traverse(visitor, scope);
+ if (statements != null) {
+ int statementsLength = statements.length;
+ for (int i = 0; i < statementsLength; i++)
+ statements[i].traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, blockScope);
+ }
+
+ /**
+ * Dispatch the call on its last statement.
+ */
+ public void branchChainTo(Label label) {
+
+ // in order to improve debug attributes for stepping (11431)
+ // we want to inline the jumps to #breakLabel which already got
+ // generated (if any), and have them directly branch to a better
+ // location (the argument label).
+ // we know at this point that the breakLabel already got placed
+ if (this.breakLabel.hasForwardReferences()) {
+ label.appendForwardReferencesFrom(this.breakLabel);
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SynchronizedStatement.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SynchronizedStatement.js
new file mode 100644
index 0000000..afce181
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SynchronizedStatement.js
@@ -0,0 +1,194 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class SynchronizedStatement extends SubRoutineStatement {
+
+ public Expression expression;
+ public Block block;
+ public BlockScope scope;
+ boolean blockExit;
+ public LocalVariableBinding synchroVariable;
+ static final char[] SecretLocalDeclarationName = " syncValue".toCharArray(); //$NON-NLS-1$
+
+ public SynchronizedStatement(
+ Expression expression,
+ Block statement,
+ int s,
+ int e) {
+
+ this.expression = expression;
+ this.block = statement;
+ sourceEnd = e;
+ sourceStart = s;
+ }
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ // TODO (philippe) shouldn't it be protected by a check whether reachable statement ?
+
+ // mark the synthetic variable as being used
+ synchroVariable.useFlag = LocalVariableBinding.USED;
+
+ // simple propagation to subnodes
+ flowInfo =
+ block.analyseCode(
+ scope,
+ new InsideSubRoutineFlowContext(flowContext, this),
+ expression.analyseCode(scope, flowContext, flowInfo));
+
+ // optimizing code gen
+ this.blockExit = !flowInfo.isReachable();
+
+ return flowInfo;
+ }
+
+ public boolean isSubRoutineEscaping() {
+
+ return false;
+ }
+
+ /**
+ * Synchronized statement code generation
+ *
+ * @param currentScope org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ */
+ public void generateCode(BlockScope currentScope, CodeStream codeStream) {
+
+ if ((bits & IsReachableMASK) == 0) {
+ return;
+ }
+ // in case the labels needs to be reinitialized
+ // when the code generation is restarted in wide mode
+ if (this.anyExceptionLabelsCount > 0) {
+ this.anyExceptionLabels = NO_EXCEPTION_HANDLER;
+ this.anyExceptionLabelsCount = 0;
+ }
+ int pc = codeStream.position;
+
+ // generate the synchronization expression
+ expression.generateCode(scope, codeStream, true);
+ if (block.isEmptyBlock()) {
+ if ((synchroVariable.type == LongBinding)
+ || (synchroVariable.type == DoubleBinding)) {
+ codeStream.dup2();
+ } else {
+ codeStream.dup();
+ }
+ // only take the lock
+ codeStream.monitorenter();
+ codeStream.monitorexit();
+ } else {
+ // enter the monitor
+ codeStream.store(synchroVariable, true);
+ codeStream.monitorenter();
+
+ // generate the body of the synchronized block
+ this.enterAnyExceptionHandler(codeStream);
+ block.generateCode(scope, codeStream);
+ Label endLabel = new Label(codeStream);
+ if (!blockExit) {
+ codeStream.load(synchroVariable);
+ codeStream.monitorexit();
+ this.exitAnyExceptionHandler();
+ codeStream.goto_(endLabel);
+ this.enterAnyExceptionHandler(codeStream);
+ }
+ // generate the body of the exception handler
+ this.placeAllAnyExceptionHandlers();
+ codeStream.incrStackSize(1);
+ codeStream.load(synchroVariable);
+ codeStream.monitorexit();
+ this.exitAnyExceptionHandler();
+ codeStream.athrow();
+ if (!blockExit) {
+ endLabel.place();
+ }
+ }
+ if (scope != currentScope) {
+ codeStream.exitUserScope(scope);
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.SubRoutineStatement#generateSubRoutineInvocation(org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope, org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream)
+ */
+ public void generateSubRoutineInvocation(
+ BlockScope currentScope,
+ CodeStream codeStream) {
+
+ codeStream.load(this.synchroVariable);
+ codeStream.monitorexit();
+ }
+
+ public void resolve(BlockScope upperScope) {
+
+ // special scope for secret locals optimization.
+ scope = new BlockScope(upperScope);
+ TypeBinding type = expression.resolveType(scope);
+ if (type == null)
+ return;
+ switch (type.id) {
+ case (T_boolean) :
+ case (T_char) :
+ case (T_float) :
+ case (T_double) :
+ case (T_byte) :
+ case (T_short) :
+ case (T_int) :
+ case (T_long) :
+ scope.problemReporter().invalidTypeToSynchronize(expression, type);
+ break;
+ case (T_void) :
+ scope.problemReporter().illegalVoidExpression(expression);
+ break;
+ case (T_null) :
+ scope.problemReporter().invalidNullToSynchronize(expression);
+ break;
+ }
+ //continue even on errors in order to have the TC done into the statements
+ synchroVariable = new LocalVariableBinding(SecretLocalDeclarationName, type, AccDefault, false);
+ scope.addLocalVariable(synchroVariable);
+ synchroVariable.setConstant(NotAConstant); // not inlinable
+ expression.computeConversion(scope, type, type);
+ block.resolveUsing(scope);
+ }
+
+ public StringBuffer printStatement(int indent, StringBuffer output) {
+
+ printIndent(indent, output);
+ output.append("synchronized ("); //$NON-NLS-1$
+ expression.printExpression(0, output).append(')');
+ output.append('\n');
+ return block.printStatement(indent + 1, output);
+ }
+
+ public void traverse(
+ ASTVisitor visitor,
+ BlockScope blockScope) {
+
+ if (visitor.visit(this, blockScope)) {
+ expression.traverse(visitor, scope);
+ block.traverse(visitor, scope);
+ }
+ visitor.endVisit(this, blockScope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ThisReference.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ThisReference.js
new file mode 100644
index 0000000..f5826c2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ThisReference.js
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.FlowContext;
+import org.eclipse.wst.jsdt.internal.compiler.flow.FlowInfo;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class ThisReference extends Reference {
+
+ public static ThisReference implicitThis(){
+
+ ThisReference implicitThis = new ThisReference(0, 0);
+ implicitThis.bits |= IsImplicitThisMask;
+ return implicitThis;
+ }
+
+ public ThisReference(int sourceStart, int sourceEnd) {
+
+ this.sourceStart = sourceStart;
+ this.sourceEnd = sourceEnd;
+ }
+
+ /*
+ * @see Reference#analyseAssignment(...)
+ */
+ public FlowInfo analyseAssignment(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, Assignment assignment, boolean isCompound) {
+
+ return flowInfo; // this cannot be assigned
+ }
+
+ public boolean checkAccess(MethodScope methodScope) {
+
+ // this/super cannot be used in constructor call
+ if (methodScope.isConstructorCall) {
+ methodScope.problemReporter().fieldsOrThisBeforeConstructorInvocation(this);
+ return false;
+ }
+
+ // static may not refer to this/super
+ if (methodScope.isStatic) {
+ methodScope.problemReporter().errorThisSuperInStatic(this);
+ return false;
+ }
+ return true;
+ }
+
+ /*
+ * @see Reference#generateAssignment(...)
+ */
+ public void generateAssignment(BlockScope currentScope, CodeStream codeStream, Assignment assignment, boolean valueRequired) {
+
+ // this cannot be assigned
+ }
+
+ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
+
+ int pc = codeStream.position;
+ if (valueRequired)
+ codeStream.aload_0();
+ if ((this.bits & IsImplicitThisMask) == 0) codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+
+ /*
+ * @see Reference#generateCompoundAssignment(...)
+ */
+ public void generateCompoundAssignment(BlockScope currentScope, CodeStream codeStream, Expression expression, int operator, int assignmentImplicitConversion, boolean valueRequired) {
+
+ // this cannot be assigned
+ }
+
+ /*
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.Reference#generatePostIncrement()
+ */
+ public void generatePostIncrement(BlockScope currentScope, CodeStream codeStream, CompoundAssignment postIncrement, boolean valueRequired) {
+
+ // this cannot be assigned
+ }
+
+ public boolean isImplicitThis() {
+
+ return (this.bits & IsImplicitThisMask) != 0;
+ }
+
+ public boolean isThis() {
+
+ return true ;
+ }
+
+ public StringBuffer printExpression(int indent, StringBuffer output){
+
+ if (this.isImplicitThis()) return output;
+ return output.append("this"); //$NON-NLS-1$
+ }
+
+ public TypeBinding resolveType(BlockScope scope) {
+
+ constant = NotAConstant;
+ if (!this.isImplicitThis() &&!checkAccess(scope.methodScope())) {
+ return null;
+ }
+ return this.resolvedType = scope.enclosingSourceType();
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope blockScope) {
+
+ visitor.visit(this, blockScope);
+ visitor.endVisit(this, blockScope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ThrowStatement.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ThrowStatement.js
new file mode 100644
index 0000000..1db70fc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ThrowStatement.js
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream;
+import org.eclipse.wst.jsdt.internal.compiler.flow.FlowContext;
+import org.eclipse.wst.jsdt.internal.compiler.flow.FlowInfo;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding;
+
+public class ThrowStatement extends Statement {
+ public Expression exception;
+ public TypeBinding exceptionType;
+
+ public ThrowStatement(Expression exception, int startPosition) {
+ this.exception = exception;
+ this.sourceStart = startPosition;
+ this.sourceEnd = exception.sourceEnd;
+ }
+
+ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
+
+ exception.analyseCode(currentScope, flowContext, flowInfo);
+ // need to check that exception thrown is actually caught somewhere
+ flowContext.checkExceptionHandlers(exceptionType, this, flowInfo, currentScope);
+ return FlowInfo.DEAD_END;
+ }
+
+ /**
+ * Throw code generation
+ *
+ * @param currentScope org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ */
+ public void generateCode(BlockScope currentScope, CodeStream codeStream) {
+
+ if ((bits & IsReachableMASK) == 0)
+ return;
+ int pc = codeStream.position;
+ exception.generateCode(currentScope, codeStream, true);
+ codeStream.athrow();
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+
+ public StringBuffer printStatement(int indent, StringBuffer output) {
+
+ printIndent(indent, output).append("throw "); //$NON-NLS-1$
+ exception.printExpression(0, output);
+ return output.append(';');
+ }
+
+ public void resolve(BlockScope scope) {
+
+ exceptionType = exception.resolveTypeExpecting(scope, scope.getJavaLangThrowable());
+
+ if (exceptionType == NullBinding
+ && scope.environment().options.complianceLevel <= ClassFileConstants.JDK1_3){
+ // if compliant with 1.4, this problem will not be reported
+ scope.problemReporter().cannotThrowNull(this);
+ }
+ exception.computeConversion(scope, exceptionType, exceptionType);
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope blockScope) {
+ if (visitor.visit(this, blockScope))
+ exception.traverse(visitor, blockScope);
+ visitor.endVisit(this, blockScope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/TrueLiteral.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/TrueLiteral.js
new file mode 100644
index 0000000..ed5e33f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/TrueLiteral.js
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.Label;
+import org.eclipse.wst.jsdt.internal.compiler.impl.Constant;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding;
+
+public class TrueLiteral extends MagicLiteral {
+ static final char[] source = {'t' , 'r' , 'u' , 'e'};
+public TrueLiteral(int s , int e) {
+ super(s,e);
+}
+public void computeConstant() {
+
+ constant = Constant.fromValue(true);}
+/**
+ * Code generation for the true literal
+ *
+ * @param currentScope org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ * @param valueRequired boolean
+ */
+public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
+ int pc = codeStream.position;
+ if (valueRequired)
+ codeStream.iconst_1();
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+}
+public void generateOptimizedBoolean(BlockScope currentScope, CodeStream codeStream, Label trueLabel, Label falseLabel, boolean valueRequired) {
+
+ // trueLabel being not nil means that we will not fall through into the TRUE case
+
+ int pc = codeStream.position;
+ // constant == true
+ if (valueRequired) {
+ if (falseLabel == null) {
+ // implicit falling through the FALSE case
+ if (trueLabel != null) {
+ codeStream.goto_(trueLabel);
+ }
+ }
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+}
+public TypeBinding literalType(BlockScope scope) {
+ return BooleanBinding;
+}
+/**
+ *
+ */
+public char[] source() {
+ return source;
+}
+public void traverse(ASTVisitor visitor, BlockScope scope) {
+ visitor.visit(this, scope);
+ visitor.endVisit(this, scope);
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/TryStatement.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/TryStatement.js
new file mode 100644
index 0000000..a667369
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/TryStatement.js
@@ -0,0 +1,562 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class TryStatement extends SubRoutineStatement {
+
+ public Block tryBlock;
+ public Block[] catchBlocks;
+ public Argument[] catchArguments;
+ public Block finallyBlock;
+ BlockScope scope;
+
+ private boolean isSubRoutineEscaping = false;
+ public UnconditionalFlowInfo subRoutineInits;
+
+ // should rename into subRoutineComplete to be set to false by default
+
+ ReferenceBinding[] caughtExceptionTypes;
+ boolean tryBlockExit;
+ boolean[] catchExits;
+ public int[] preserveExceptionHandler;
+
+ Label subRoutineStartLabel;
+ public LocalVariableBinding anyExceptionVariable,
+ returnAddressVariable,
+ secretReturnValue;
+
+ public final static char[] SecretReturnName = " returnAddress".toCharArray(); //$NON-NLS-1$
+ public final static char[] SecretAnyHandlerName = " anyExceptionHandler".toCharArray(); //$NON-NLS-1$
+ public static final char[] SecretLocalDeclarationName = " returnValue".toCharArray(); //$NON-NLS-1$
+
+ // for local variables table attributes
+ int preTryInitStateIndex = -1;
+ int mergedInitStateIndex = -1;
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ // Consider the try block and catch block so as to compute the intersection of initializations and
+ // the minimum exit relative depth amongst all of them. Then consider the subroutine, and append its
+ // initialization to the try/catch ones, if the subroutine completes normally. If the subroutine does not
+ // complete, then only keep this result for the rest of the analysis
+
+ // process the finally block (subroutine) - create a context for the subroutine
+
+ preTryInitStateIndex =
+ currentScope.methodScope().recordInitializationStates(flowInfo);
+
+ if (anyExceptionVariable != null) {
+ anyExceptionVariable.useFlag = LocalVariableBinding.USED;
+ }
+ if (returnAddressVariable != null) { // TODO (philippe) if subroutine is escaping, unused
+ returnAddressVariable.useFlag = LocalVariableBinding.USED;
+ }
+ InsideSubRoutineFlowContext insideSubContext;
+ FinallyFlowContext finallyContext;
+ UnconditionalFlowInfo subInfo;
+ if (subRoutineStartLabel == null) {
+ // no finally block
+ insideSubContext = null;
+ finallyContext = null;
+ subInfo = null;
+ } else {
+ // analyse finally block first
+ insideSubContext = new InsideSubRoutineFlowContext(flowContext, this);
+ subInfo =
+ finallyBlock
+ .analyseCode(
+ currentScope,
+ finallyContext = new FinallyFlowContext(flowContext, finallyBlock),
+ flowInfo.copy())
+ .unconditionalInits();
+ if (subInfo == FlowInfo.DEAD_END) {
+ isSubRoutineEscaping = true;
+ scope.problemReporter().finallyMustCompleteNormally(finallyBlock);
+ }
+ this.subRoutineInits = subInfo;
+ }
+ // process the try block in a context handling the local exceptions.
+ ExceptionHandlingFlowContext handlingContext =
+ new ExceptionHandlingFlowContext(
+ insideSubContext == null ? flowContext : insideSubContext,
+ tryBlock,
+ caughtExceptionTypes,
+ scope,
+ flowInfo.unconditionalInits());
+
+ FlowInfo tryInfo;
+ if (tryBlock.isEmptyBlock()) {
+ tryInfo = flowInfo;
+ tryBlockExit = false;
+ } else {
+ tryInfo = tryBlock.analyseCode(currentScope, handlingContext, flowInfo.copy());
+ tryBlockExit = !tryInfo.isReachable();
+ }
+
+ // check unreachable catch blocks
+ handlingContext.complainIfUnusedExceptionHandlers(scope, this);
+
+ // process the catch blocks - computing the minimal exit depth amongst try/catch
+ if (catchArguments != null) {
+ int catchCount;
+ catchExits = new boolean[catchCount = catchBlocks.length];
+ for (int i = 0; i < catchCount; i++) {
+ // keep track of the inits that could potentially have led to this exception handler (for final assignments diagnosis)
+ FlowInfo catchInfo =
+ flowInfo
+ .copy()
+ .unconditionalInits()
+ .addPotentialInitializationsFrom(
+ handlingContext.initsOnException(caughtExceptionTypes[i]).unconditionalInits())
+ .addPotentialInitializationsFrom(tryInfo.unconditionalInits())
+ .addPotentialInitializationsFrom(handlingContext.initsOnReturn);
+
+ // catch var is always set
+ catchInfo.markAsDefinitelyAssigned(catchArguments[i].binding);
+ /*
+ "If we are about to consider an unchecked exception handler, potential inits may have occured inside
+ the try block that need to be detected , e.g.
+ try { x = 1; throwSomething();} catch(Exception e){ x = 2} "
+ "(uncheckedExceptionTypes notNil and: [uncheckedExceptionTypes at: index])
+ ifTrue: [catchInits addPotentialInitializationsFrom: tryInits]."
+ */
+ // TODO (philippe) should only tag as unreachable if the catchblock cannot be reached?
+ //??? if (!handlingContext.initsOnException(caughtExceptionTypes[i]).isReachable()){
+ if (tryBlock.statements == null) {
+ catchInfo.setReachMode(FlowInfo.UNREACHABLE);
+ }
+ catchInfo =
+ catchBlocks[i].analyseCode(
+ currentScope,
+ insideSubContext == null ? flowContext : insideSubContext,
+ catchInfo);
+ catchExits[i] = !catchInfo.isReachable();
+ tryInfo = tryInfo.mergedWith(catchInfo.unconditionalInits());
+ }
+ }
+ if (subRoutineStartLabel == null) {
+ mergedInitStateIndex =
+ currentScope.methodScope().recordInitializationStates(tryInfo);
+ return tryInfo;
+ }
+
+
+ // we also need to check potential multiple assignments of final variables inside the finally block
+ // need to include potential inits from returns inside the try/catch parts - 1GK2AOF
+ finallyContext.complainOnRedundantFinalAssignments(
+ tryInfo.isReachable()
+ ? (tryInfo.addPotentialInitializationsFrom(insideSubContext.initsOnReturn))
+ : insideSubContext.initsOnReturn,
+ currentScope);
+ if (subInfo == FlowInfo.DEAD_END) {
+ mergedInitStateIndex =
+ currentScope.methodScope().recordInitializationStates(subInfo);
+ return subInfo;
+ } else {
+ FlowInfo mergedInfo = tryInfo.addInitializationsFrom(subInfo);
+ mergedInitStateIndex =
+ currentScope.methodScope().recordInitializationStates(mergedInfo);
+ return mergedInfo;
+ }
+ }
+
+ public boolean isSubRoutineEscaping() {
+
+ return isSubRoutineEscaping;
+ }
+
+ /**
+ * Try statement code generation with or without jsr bytecode use
+ * post 1.5 target level, cannot use jsr bytecode, must instead inline finally block
+ * returnAddress is only allocated if jsr is allowed
+ */
+ public void generateCode(BlockScope currentScope, CodeStream codeStream) {
+ if ((bits & IsReachableMASK) == 0) {
+ return;
+ }
+ // in case the labels needs to be reinitialized
+ // when the code generation is restarted in wide mode
+ if (this.anyExceptionLabelsCount > 0) {
+ this.anyExceptionLabels = NO_EXCEPTION_HANDLER;
+ this.anyExceptionLabelsCount = 0;
+ }
+ int pc = codeStream.position;
+ final int NO_FINALLY = 0; // no finally block
+ final int FINALLY_SUBROUTINE = 1; // finally is generated as a subroutine (using jsr/ret bytecodes)
+ final int FINALLY_DOES_NOT_COMPLETE = 2; // non returning finally is optimized with only one instance of finally block
+ final int FINALLY_MUST_BE_INLINED = 3; // finally block must be inlined since cannot use jsr/ret bytecodes >1.5
+ int finallyMode;
+ if (subRoutineStartLabel == null) {
+ finallyMode = NO_FINALLY;
+ } else {
+ if (this.isSubRoutineEscaping) {
+ finallyMode = FINALLY_DOES_NOT_COMPLETE;
+ } else if (scope.environment().options.inlineJsrBytecode) {
+ finallyMode = FINALLY_MUST_BE_INLINED;
+ } else {
+ finallyMode = FINALLY_SUBROUTINE;
+ }
+ }
+ boolean requiresNaturalExit = false;
+ // preparing exception labels
+ int maxCatches;
+ ExceptionLabel[] exceptionLabels =
+ new ExceptionLabel[maxCatches =
+ catchArguments == null ? 0 : catchArguments.length];
+ for (int i = 0; i < maxCatches; i++) {
+ exceptionLabels[i] = new ExceptionLabel(codeStream, catchArguments[i].binding.type);
+ }
+ if (subRoutineStartLabel != null) {
+ subRoutineStartLabel.initialize(codeStream);
+ this.enterAnyExceptionHandler(codeStream);
+ }
+ // generate the try block
+ tryBlock.generateCode(scope, codeStream);
+ boolean tryBlockHasSomeCode = codeStream.position != pc;
+ // flag telling if some bytecodes were issued inside the try block
+
+ // place end positions of user-defined exception labels
+ if (tryBlockHasSomeCode) {
+ // natural exit may require subroutine invocation (if finally != null)
+ Label naturalExitLabel = new Label(codeStream);
+ if (!tryBlockExit) {
+ int position = codeStream.position;
+ switch(finallyMode) {
+ case FINALLY_SUBROUTINE :
+ case FINALLY_MUST_BE_INLINED :
+ requiresNaturalExit = true;
+ // fall through
+ case NO_FINALLY :
+ codeStream.goto_(naturalExitLabel);
+ break;
+ case FINALLY_DOES_NOT_COMPLETE :
+ codeStream.goto_(subRoutineStartLabel);
+ break;
+ }
+ codeStream.updateLastRecordedEndPC(position);
+ //goto is tagged as part of the try block
+ }
+ for (int i = 0; i < maxCatches; i++) {
+ exceptionLabels[i].placeEnd();
+ }
+ /* generate sequence of handler, all starting by storing the TOS (exception
+ thrown) into their own catch variables, the one specified in the source
+ that must denote the handled exception.
+ */
+ if (catchArguments != null) {
+ for (int i = 0; i < maxCatches; i++) {
+ // May loose some local variable initializations : affecting the local variable attributes
+ if (preTryInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(currentScope, preTryInitStateIndex);
+ }
+ exceptionLabels[i].place();
+ codeStream.incrStackSize(1);
+ // optimizing the case where the exception variable is not actually used
+ LocalVariableBinding catchVar;
+ int varPC = codeStream.position;
+ if ((catchVar = catchArguments[i].binding).resolvedPosition != -1) {
+ codeStream.store(catchVar, false);
+ catchVar.recordInitializationStartPC(codeStream.position);
+ codeStream.addVisibleLocalVariable(catchVar);
+ } else {
+ codeStream.pop();
+ }
+ codeStream.recordPositionsFrom(varPC, catchArguments[i].sourceStart);
+ // Keep track of the pcs at diverging point for computing the local attribute
+ // since not passing the catchScope, the block generation will exitUserScope(catchScope)
+ catchBlocks[i].generateCode(scope, codeStream);
+ if (!catchExits[i]) {
+ switch(finallyMode) {
+ case FINALLY_SUBROUTINE :
+ case FINALLY_MUST_BE_INLINED :
+ requiresNaturalExit = true;
+ // fall through
+ case NO_FINALLY :
+ codeStream.goto_(naturalExitLabel);
+ break;
+ case FINALLY_DOES_NOT_COMPLETE :
+ codeStream.goto_(subRoutineStartLabel);
+ break;
+ }
+ }
+ }
+ }
+ this.exitAnyExceptionHandler();
+ // extra handler for trailing natural exit (will be fixed up later on when natural exit is generated below)
+ ExceptionLabel naturalExitExceptionHandler =
+ finallyMode == FINALLY_SUBROUTINE && requiresNaturalExit ? new ExceptionLabel(codeStream, null) : null;
+
+ // addition of a special handler so as to ensure that any uncaught exception (or exception thrown
+ // inside catch blocks) will run the finally block
+ int finallySequenceStartPC = codeStream.position;
+ if (subRoutineStartLabel != null) {
+ this.placeAllAnyExceptionHandlers();
+ if (naturalExitExceptionHandler != null) naturalExitExceptionHandler.place();
+
+ if (preTryInitStateIndex != -1) {
+ // reset initialization state, as for a normal catch block
+ codeStream.removeNotDefinitelyAssignedVariables(currentScope, preTryInitStateIndex);
+ }
+
+ codeStream.incrStackSize(1);
+ switch(finallyMode) {
+ case FINALLY_SUBROUTINE :
+ codeStream.store(anyExceptionVariable, false);
+ codeStream.jsr(subRoutineStartLabel);
+ codeStream.recordPositionsFrom(finallySequenceStartPC, finallyBlock.sourceStart);
+ int position = codeStream.position;
+ codeStream.load(anyExceptionVariable);
+ codeStream.athrow();
+ codeStream.recordPositionsFrom(position, finallyBlock.sourceEnd);
+ subRoutineStartLabel.place();
+ codeStream.incrStackSize(1);
+ position = codeStream.position;
+ codeStream.store(returnAddressVariable, false);
+ codeStream.recordPositionsFrom(position, finallyBlock.sourceStart);
+ finallyBlock.generateCode(scope, codeStream);
+ position = codeStream.position;
+ codeStream.ret(returnAddressVariable.resolvedPosition);
+// codeStream.updateLastRecordedEndPC(position);
+ codeStream.recordPositionsFrom(
+ position,
+ finallyBlock.sourceEnd);
+ // the ret bytecode is part of the subroutine
+ break;
+ case FINALLY_MUST_BE_INLINED :
+ codeStream.store(anyExceptionVariable, false);
+ codeStream.recordPositionsFrom(finallySequenceStartPC, finallyBlock.sourceStart);
+ this.finallyBlock.generateCode(currentScope, codeStream);
+ position = codeStream.position;
+ codeStream.load(anyExceptionVariable);
+ codeStream.athrow();
+ subRoutineStartLabel.place();
+ codeStream.recordPositionsFrom(position, finallyBlock.sourceEnd);
+ break;
+ case FINALLY_DOES_NOT_COMPLETE :
+ codeStream.pop();
+ subRoutineStartLabel.place();
+ codeStream.recordPositionsFrom(finallySequenceStartPC, finallyBlock.sourceStart);
+ finallyBlock.generateCode(scope, codeStream);
+ break;
+ }
+ // will naturally fall into subsequent code after subroutine invocation
+ naturalExitLabel.place();
+ if (requiresNaturalExit) {
+ switch(finallyMode) {
+ case FINALLY_SUBROUTINE :
+ int position = codeStream.position;
+ // fix up natural exit handler
+ naturalExitExceptionHandler.placeStart();
+ codeStream.jsr(subRoutineStartLabel);
+ naturalExitExceptionHandler.placeEnd();
+ codeStream.recordPositionsFrom(
+ position,
+ finallyBlock.sourceEnd);
+ break;
+ case FINALLY_MUST_BE_INLINED :
+ // May loose some local variable initializations : affecting the local variable attributes
+ // needed since any exception handler got inlined subroutine
+ if (preTryInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(currentScope, preTryInitStateIndex);
+ }
+ // entire sequence for finally is associated to finally block
+ finallyBlock.generateCode(scope, codeStream);
+ break;
+ case FINALLY_DOES_NOT_COMPLETE :
+ break;
+ }
+ }
+ } else {
+ // no subroutine, simply position end label (natural exit == end)
+ naturalExitLabel.place();
+ }
+ } else {
+ // try block had no effect, only generate the body of the finally block if any
+ if (subRoutineStartLabel != null) {
+ finallyBlock.generateCode(scope, codeStream);
+ }
+ }
+ // May loose some local variable initializations : affecting the local variable attributes
+ if (mergedInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(currentScope, mergedInitStateIndex);
+ codeStream.addDefinitelyAssignedVariables(currentScope, mergedInitStateIndex);
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.SubRoutineStatement#generateSubRoutineInvocation(org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope, org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream)
+ */
+ public void generateSubRoutineInvocation(
+ BlockScope currentScope,
+ CodeStream codeStream) {
+
+ if (this.isSubRoutineEscaping) {
+ codeStream.goto_(this.subRoutineStartLabel);
+ } else {
+ if (currentScope.environment().options.inlineJsrBytecode) {
+ // cannot use jsr bytecode, then simply inline the subroutine
+ this.finallyBlock.generateCode(currentScope, codeStream);
+ } else {
+ // classic subroutine invocation, distinguish case of non-returning subroutine
+ codeStream.jsr(this.subRoutineStartLabel);
+ }
+ }
+ }
+
+ public StringBuffer printStatement(int indent, StringBuffer output) {
+ printIndent(indent, output).append("try \n"); //$NON-NLS-1$
+ tryBlock.printStatement(indent + 1, output); //$NON-NLS-1$
+
+ //catches
+ if (catchBlocks != null)
+ for (int i = 0; i < catchBlocks.length; i++) {
+ output.append('\n');
+ printIndent(indent, output).append("catch ("); //$NON-NLS-1$
+ catchArguments[i].print(0, output).append(") "); //$NON-NLS-1$
+ catchBlocks[i].printStatement(indent + 1, output);
+ }
+ //finally
+ if (finallyBlock != null) {
+ output.append('\n');
+ printIndent(indent, output).append("finally\n"); //$NON-NLS-1$
+ finallyBlock.printStatement(indent + 1, output);
+ }
+
+ return output;
+ }
+
+ public void resolve(BlockScope upperScope) {
+
+ // special scope for secret locals optimization.
+ this.scope = new BlockScope(upperScope);
+
+ BlockScope tryScope = new BlockScope(scope);
+ BlockScope finallyScope = null;
+
+ if (finallyBlock != null) {
+ if (finallyBlock.isEmptyBlock()) {
+ if ((finallyBlock.bits & UndocumentedEmptyBlockMASK) != 0) {
+ scope.problemReporter().undocumentedEmptyBlock(finallyBlock.sourceStart, finallyBlock.sourceEnd);
+ }
+ } else {
+ finallyScope = new BlockScope(scope, false); // don't add it yet to parent scope
+
+ // provision for returning and forcing the finally block to run
+ MethodScope methodScope = scope.methodScope();
+
+ // the type does not matter as long as it is not a base type
+ if (!upperScope.environment().options.inlineJsrBytecode) {
+ this.returnAddressVariable =
+ new LocalVariableBinding(SecretReturnName, upperScope.getJavaLangObject(), AccDefault, false);
+ finallyScope.addLocalVariable(returnAddressVariable);
+ this.returnAddressVariable.setConstant(NotAConstant); // not inlinable
+ }
+ this.subRoutineStartLabel = new Label();
+
+ this.anyExceptionVariable =
+ new LocalVariableBinding(SecretAnyHandlerName, scope.getJavaLangThrowable(), AccDefault, false);
+ finallyScope.addLocalVariable(this.anyExceptionVariable);
+ this.anyExceptionVariable.setConstant(NotAConstant); // not inlinable
+
+ if (!methodScope.isInsideInitializer()) {
+ MethodBinding methodBinding =
+ ((AbstractMethodDeclaration) methodScope.referenceContext).binding;
+ if (methodBinding != null) {
+ TypeBinding methodReturnType = methodBinding.returnType;
+ if (methodReturnType.id != T_void) {
+ this.secretReturnValue =
+ new LocalVariableBinding(
+ SecretLocalDeclarationName,
+ methodReturnType,
+ AccDefault,
+ false);
+ finallyScope.addLocalVariable(this.secretReturnValue);
+ this.secretReturnValue.setConstant(NotAConstant); // not inlinable
+ }
+ }
+ }
+ finallyBlock.resolveUsing(finallyScope);
+ // force the finally scope to have variable positions shifted after its try scope and catch ones
+ finallyScope.shiftScopes = new BlockScope[catchArguments == null ? 1 : catchArguments.length+1];
+ finallyScope.shiftScopes[0] = tryScope;
+ }
+ }
+ this.tryBlock.resolveUsing(tryScope);
+
+ // arguments type are checked against JavaLangThrowable in resolveForCatch(..)
+ if (this.catchBlocks != null) {
+ int length = this.catchArguments.length;
+ TypeBinding[] argumentTypes = new TypeBinding[length];
+ boolean catchHasError = false;
+ for (int i = 0; i < length; i++) {
+ BlockScope catchScope = new BlockScope(scope);
+ if (finallyScope != null){
+ finallyScope.shiftScopes[i+1] = catchScope;
+ }
+ // side effect on catchScope in resolveForCatch(..)
+ if ((argumentTypes[i] = catchArguments[i].resolveForCatch(catchScope)) == null) {
+ catchHasError = true;
+ }
+ catchBlocks[i].resolveUsing(catchScope);
+ }
+ if (catchHasError) {
+ return;
+ }
+ // Verify that the catch clause are ordered in the right way:
+ // more specialized first.
+ this.caughtExceptionTypes = new ReferenceBinding[length];
+ for (int i = 0; i < length; i++) {
+ caughtExceptionTypes[i] = (ReferenceBinding) argumentTypes[i];
+ for (int j = 0; j < i; j++) {
+ if (caughtExceptionTypes[i].isCompatibleWith(argumentTypes[j])) {
+ scope.problemReporter().wrongSequenceOfExceptionTypesError(this, caughtExceptionTypes[i], i, argumentTypes[j]);
+ }
+ }
+ }
+ } else {
+ caughtExceptionTypes = new ReferenceBinding[0];
+ }
+
+ if (finallyScope != null){
+ // add finallyScope as last subscope, so it can be shifted behind try/catch subscopes.
+ // the shifting is necessary to achieve no overlay in between the finally scope and its
+ // sibling in term of local variable positions.
+ this.scope.addSubscope(finallyScope);
+ }
+ }
+
+ public void traverse(
+ ASTVisitor visitor,
+ BlockScope blockScope) {
+
+ if (visitor.visit(this, blockScope)) {
+ tryBlock.traverse(visitor, scope);
+ if (catchArguments != null) {
+ for (int i = 0, max = catchBlocks.length; i < max; i++) {
+ catchArguments[i].traverse(visitor, scope);
+ catchBlocks[i].traverse(visitor, scope);
+ }
+ }
+ if (finallyBlock != null)
+ finallyBlock.traverse(visitor, scope);
+ }
+ visitor.endVisit(this, blockScope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/TypeDeclaration.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/TypeDeclaration.js
new file mode 100644
index 0000000..2caf39e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/TypeDeclaration.js
@@ -0,0 +1,1202 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.core.compiler.*;
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.*;
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+import org.eclipse.wst.jsdt.internal.compiler.parser.*;
+import org.eclipse.wst.jsdt.internal.compiler.problem.*;
+
+public class TypeDeclaration
+ extends Statement
+ implements ProblemSeverities, ReferenceContext {
+
+ public static final char[] ANONYMOUS_EMPTY_NAME = new char[] {};
+
+ public int modifiers = AccDefault;
+ public int modifiersSourceStart;
+ public Annotation[] annotations;
+ public char[] name;
+ public TypeReference superclass;
+ public TypeReference[] superInterfaces;
+ public FieldDeclaration[] fields;
+ public AbstractMethodDeclaration[] methods;
+ public TypeDeclaration[] memberTypes;
+ public SourceTypeBinding binding;
+ public ClassScope scope;
+ public MethodScope initializerScope;
+ public MethodScope staticInitializerScope;
+ public boolean ignoreFurtherInvestigation = false;
+ public int maxFieldCount;
+ public int declarationSourceStart;
+ public int declarationSourceEnd;
+ public int bodyStart;
+ public int bodyEnd; // doesn't include the trailing comment if any.
+ protected boolean hasBeenGenerated = false;
+ public CompilationResult compilationResult;
+ public MethodDeclaration[] missingAbstractMethods;
+ public Javadoc javadoc;
+
+ public QualifiedAllocationExpression allocation; // for anonymous only
+ public TypeDeclaration enclosingType; // for member types only
+
+ // 1.5 support
+ public EnumDeclaration[] enums;
+ public TypeParameter[] typeParameters;
+
+ public TypeDeclaration(CompilationResult compilationResult){
+ this.compilationResult = compilationResult;
+ }
+
+ /*
+ * We cause the compilation task to abort to a given extent.
+ */
+ public void abort(int abortLevel, IProblem problem) {
+
+ switch (abortLevel) {
+ case AbortCompilation :
+ throw new AbortCompilation(this.compilationResult, problem);
+ case AbortCompilationUnit :
+ throw new AbortCompilationUnit(this.compilationResult, problem);
+ case AbortMethod :
+ throw new AbortMethod(this.compilationResult, problem);
+ default :
+ throw new AbortType(this.compilationResult, problem);
+ }
+ }
+ /**
+ * This method is responsible for adding a <clinit> method declaration to the type method collections.
+ * Note that this implementation is inserting it in first place (as VAJ or javac), and that this
+ * impacts the behavior of the method ConstantPool.resetForClinit(int. int), in so far as
+ * the latter will have to reset the constant pool state accordingly (if it was added first, it does
+ * not need to preserve some of the method specific cached entries since this will be the first method).
+ * inserts the clinit method declaration in the first position.
+ *
+ * @see org.eclipse.wst.jsdt.internal.compiler.codegen.ConstantPool#resetForClinit(int, int)
+ */
+ public final void addClinit() {
+
+ //see comment on needClassInitMethod
+ if (needClassInitMethod()) {
+ int length;
+ AbstractMethodDeclaration[] methodDeclarations;
+ if ((methodDeclarations = this.methods) == null) {
+ length = 0;
+ methodDeclarations = new AbstractMethodDeclaration[1];
+ } else {
+ length = methodDeclarations.length;
+ System.arraycopy(
+ methodDeclarations,
+ 0,
+ (methodDeclarations = new AbstractMethodDeclaration[length + 1]),
+ 1,
+ length);
+ }
+ Clinit clinit = new Clinit(this.compilationResult);
+ methodDeclarations[0] = clinit;
+ // clinit is added in first location, so as to minimize the use of ldcw (big consumer of constant inits)
+ clinit.declarationSourceStart = clinit.sourceStart = sourceStart;
+ clinit.declarationSourceEnd = clinit.sourceEnd = sourceEnd;
+ clinit.bodyEnd = sourceEnd;
+ this.methods = methodDeclarations;
+ }
+ }
+
+ /*
+ * INTERNAL USE ONLY - Creates a fake method declaration for the corresponding binding.
+ * It is used to report errors for missing abstract methods.
+ */
+ public MethodDeclaration addMissingAbstractMethodFor(MethodBinding methodBinding) {
+ TypeBinding[] argumentTypes = methodBinding.parameters;
+ int argumentsLength = argumentTypes.length;
+ //the constructor
+ MethodDeclaration methodDeclaration = new MethodDeclaration(this.compilationResult);
+ methodDeclaration.selector = methodBinding.selector;
+ methodDeclaration.sourceStart = sourceStart;
+ methodDeclaration.sourceEnd = sourceEnd;
+ methodDeclaration.modifiers = methodBinding.getAccessFlags() & ~AccAbstract;
+
+ if (argumentsLength > 0) {
+ String baseName = "arg";//$NON-NLS-1$
+ Argument[] arguments = (methodDeclaration.arguments = new Argument[argumentsLength]);
+ for (int i = argumentsLength; --i >= 0;) {
+ arguments[i] = new Argument((baseName + i).toCharArray(), 0L, null /*type ref*/, AccDefault, false /*not vararg*/);
+ }
+ }
+
+ //adding the constructor in the methods list
+ if (this.missingAbstractMethods == null) {
+ this.missingAbstractMethods = new MethodDeclaration[] { methodDeclaration };
+ } else {
+ MethodDeclaration[] newMethods;
+ System.arraycopy(
+ this.missingAbstractMethods,
+ 0,
+ newMethods = new MethodDeclaration[this.missingAbstractMethods.length + 1],
+ 1,
+ this.missingAbstractMethods.length);
+ newMethods[0] = methodDeclaration;
+ this.missingAbstractMethods = newMethods;
+ }
+
+ //============BINDING UPDATE==========================
+ methodDeclaration.binding = new MethodBinding(
+ methodDeclaration.modifiers, //methodDeclaration
+ methodBinding.selector,
+ methodBinding.returnType,
+ argumentsLength == 0 ? NoParameters : argumentTypes, //arguments bindings
+ methodBinding.thrownExceptions, //exceptions
+ binding); //declaringClass
+
+ methodDeclaration.scope = new MethodScope(scope, methodDeclaration, true);
+ methodDeclaration.bindArguments();
+
+/* if (binding.methods == null) {
+ binding.methods = new MethodBinding[] { methodDeclaration.binding };
+ } else {
+ MethodBinding[] newMethods;
+ System.arraycopy(
+ binding.methods,
+ 0,
+ newMethods = new MethodBinding[binding.methods.length + 1],
+ 1,
+ binding.methods.length);
+ newMethods[0] = methodDeclaration.binding;
+ binding.methods = newMethods;
+ }*/
+ //===================================================
+
+ return methodDeclaration;
+ }
+
+ /**
+ * Flow analysis for a local innertype
+ *
+ */
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ if (ignoreFurtherInvestigation)
+ return flowInfo;
+ try {
+ if (flowInfo.isReachable()) {
+ bits |= IsReachableMASK;
+ LocalTypeBinding localType = (LocalTypeBinding) binding;
+ localType.setConstantPoolName(currentScope.compilationUnitScope().computeConstantPoolName(localType));
+ }
+ manageEnclosingInstanceAccessIfNecessary(currentScope, flowInfo);
+ updateMaxFieldCount(); // propagate down the max field count
+ internalAnalyseCode(flowContext, flowInfo);
+ } catch (AbortType e) {
+ this.ignoreFurtherInvestigation = true;
+ }
+ return flowInfo;
+ }
+
+ /**
+ * Flow analysis for a member innertype
+ *
+ */
+ public void analyseCode(ClassScope enclosingClassScope) {
+
+ if (ignoreFurtherInvestigation)
+ return;
+ try {
+ // propagate down the max field count
+ updateMaxFieldCount();
+ internalAnalyseCode(null, FlowInfo.initial(maxFieldCount));
+ } catch (AbortType e) {
+ this.ignoreFurtherInvestigation = true;
+ }
+ }
+
+ /**
+ * Flow analysis for a local member innertype
+ *
+ */
+ public void analyseCode(
+ ClassScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ if (ignoreFurtherInvestigation)
+ return;
+ try {
+ if (flowInfo.isReachable()) {
+ bits |= IsReachableMASK;
+ LocalTypeBinding localType = (LocalTypeBinding) binding;
+ localType.setConstantPoolName(currentScope.compilationUnitScope().computeConstantPoolName(localType));
+ }
+ manageEnclosingInstanceAccessIfNecessary(currentScope, flowInfo);
+ updateMaxFieldCount(); // propagate down the max field count
+ internalAnalyseCode(flowContext, flowInfo);
+ } catch (AbortType e) {
+ this.ignoreFurtherInvestigation = true;
+ }
+ }
+
+ /**
+ * Flow analysis for a package member type
+ *
+ */
+ public void analyseCode(CompilationUnitScope unitScope) {
+
+ if (ignoreFurtherInvestigation)
+ return;
+ try {
+ internalAnalyseCode(null, FlowInfo.initial(maxFieldCount));
+ } catch (AbortType e) {
+ this.ignoreFurtherInvestigation = true;
+ }
+ }
+
+ /*
+ * Check for constructor vs. method with no return type.
+ * Answers true if at least one constructor is defined
+ */
+ public boolean checkConstructors(Parser parser) {
+
+ //if a constructor has not the name of the type,
+ //convert it into a method with 'null' as its return type
+ boolean hasConstructor = false;
+ if (methods != null) {
+ for (int i = methods.length; --i >= 0;) {
+ AbstractMethodDeclaration am;
+ if ((am = methods[i]).isConstructor()) {
+ if (!CharOperation.equals(am.selector, name)) {
+ // the constructor was in fact a method with no return type
+ // unless an explicit constructor call was supplied
+ ConstructorDeclaration c = (ConstructorDeclaration) am;
+ if (c.constructorCall == null || c.constructorCall.isImplicitSuper()) { //changed to a method
+ MethodDeclaration m = parser.convertToMethodDeclaration(c, this.compilationResult);
+ methods[i] = m;
+ }
+ } else {
+ if (this.isInterface()) {
+ // report the problem and continue the parsing
+ parser.problemReporter().interfaceCannotHaveConstructors(
+ (ConstructorDeclaration) am);
+ }
+ hasConstructor = true;
+ }
+ }
+ }
+ }
+ return hasConstructor;
+ }
+
+ public CompilationResult compilationResult() {
+
+ return this.compilationResult;
+ }
+
+ public ConstructorDeclaration createsInternalConstructor(
+ boolean needExplicitConstructorCall,
+ boolean needToInsert) {
+
+ //Add to method'set, the default constuctor that just recall the
+ //super constructor with no arguments
+ //The arguments' type will be positionned by the TC so just use
+ //the default int instead of just null (consistency purpose)
+
+ //the constructor
+ ConstructorDeclaration constructor = new ConstructorDeclaration(this.compilationResult);
+ constructor.isDefaultConstructor = true;
+ constructor.selector = name;
+ if (modifiers != AccDefault) {
+ constructor.modifiers =
+ (((this.bits & ASTNode.IsMemberTypeMASK) != 0) && (modifiers & AccPrivate) != 0)
+ ? AccDefault
+ : modifiers & AccVisibilityMASK;
+ }
+
+ //if you change this setting, please update the
+ //SourceIndexer2.buildTypeDeclaration(TypeDeclaration,char[]) method
+ constructor.declarationSourceStart = constructor.sourceStart = sourceStart;
+ constructor.declarationSourceEnd =
+ constructor.sourceEnd = constructor.bodyEnd = sourceEnd;
+
+ //the super call inside the constructor
+ if (needExplicitConstructorCall) {
+ constructor.constructorCall = SuperReference.implicitSuperConstructorCall();
+ constructor.constructorCall.sourceStart = sourceStart;
+ constructor.constructorCall.sourceEnd = sourceEnd;
+ }
+
+ //adding the constructor in the methods list
+ if (needToInsert) {
+ if (methods == null) {
+ methods = new AbstractMethodDeclaration[] { constructor };
+ } else {
+ AbstractMethodDeclaration[] newMethods;
+ System.arraycopy(
+ methods,
+ 0,
+ newMethods = new AbstractMethodDeclaration[methods.length + 1],
+ 1,
+ methods.length);
+ newMethods[0] = constructor;
+ methods = newMethods;
+ }
+ }
+ return constructor;
+ }
+
+ // anonymous type constructor creation
+ public MethodBinding createsInternalConstructorWithBinding(MethodBinding inheritedConstructorBinding) {
+
+ //Add to method'set, the default constuctor that just recall the
+ //super constructor with the same arguments
+ String baseName = "$anonymous"; //$NON-NLS-1$
+ TypeBinding[] argumentTypes = inheritedConstructorBinding.parameters;
+ int argumentsLength = argumentTypes.length;
+ //the constructor
+ ConstructorDeclaration cd = new ConstructorDeclaration(this.compilationResult);
+ cd.selector = new char[] { 'x' }; //no maining
+ cd.sourceStart = sourceStart;
+ cd.sourceEnd = sourceEnd;
+ cd.modifiers = modifiers & AccVisibilityMASK;
+ cd.isDefaultConstructor = true;
+
+ if (argumentsLength > 0) {
+ Argument[] arguments = (cd.arguments = new Argument[argumentsLength]);
+ for (int i = argumentsLength; --i >= 0;) {
+ arguments[i] = new Argument((baseName + i).toCharArray(), 0L, null /*type ref*/, AccDefault, false /*not vararg*/);
+ }
+ }
+
+ //the super call inside the constructor
+ cd.constructorCall = SuperReference.implicitSuperConstructorCall();
+ cd.constructorCall.sourceStart = sourceStart;
+ cd.constructorCall.sourceEnd = sourceEnd;
+
+ if (argumentsLength > 0) {
+ Expression[] args;
+ args = cd.constructorCall.arguments = new Expression[argumentsLength];
+ for (int i = argumentsLength; --i >= 0;) {
+ args[i] = new SingleNameReference((baseName + i).toCharArray(), 0L);
+ }
+ }
+
+ //adding the constructor in the methods list
+ if (methods == null) {
+ methods = new AbstractMethodDeclaration[] { cd };
+ } else {
+ AbstractMethodDeclaration[] newMethods;
+ System.arraycopy(
+ methods,
+ 0,
+ newMethods = new AbstractMethodDeclaration[methods.length + 1],
+ 1,
+ methods.length);
+ newMethods[0] = cd;
+ methods = newMethods;
+ }
+
+ //============BINDING UPDATE==========================
+ cd.binding = new MethodBinding(
+ cd.modifiers, //methodDeclaration
+ argumentsLength == 0 ? NoParameters : argumentTypes, //arguments bindings
+ inheritedConstructorBinding.thrownExceptions, //exceptions
+ binding); //declaringClass
+
+ cd.scope = new MethodScope(scope, cd, true);
+ cd.bindArguments();
+ cd.constructorCall.resolve(cd.scope);
+
+ if (binding.methods == null) {
+ binding.methods = new MethodBinding[] { cd.binding };
+ } else {
+ MethodBinding[] newMethods;
+ System.arraycopy(
+ binding.methods,
+ 0,
+ newMethods = new MethodBinding[binding.methods.length + 1],
+ 1,
+ binding.methods.length);
+ newMethods[0] = cd.binding;
+ binding.methods = newMethods;
+ }
+ //===================================================
+
+ return cd.binding;
+ }
+
+ /*
+ * Find the matching parse node, answers null if nothing found
+ */
+ public FieldDeclaration declarationOf(FieldBinding fieldBinding) {
+
+ if (fieldBinding != null) {
+ for (int i = 0, max = this.fields.length; i < max; i++) {
+ FieldDeclaration fieldDecl;
+ if ((fieldDecl = this.fields[i]).binding == fieldBinding)
+ return fieldDecl;
+ }
+ }
+ return null;
+ }
+
+ /*
+ * Find the matching parse node, answers null if nothing found
+ */
+ public TypeDeclaration declarationOf(MemberTypeBinding memberTypeBinding) {
+
+ if (memberTypeBinding != null) {
+ for (int i = 0, max = this.memberTypes.length; i < max; i++) {
+ TypeDeclaration memberTypeDecl;
+ if ((memberTypeDecl = this.memberTypes[i]).binding == memberTypeBinding)
+ return memberTypeDecl;
+ }
+ }
+ return null;
+ }
+
+ /*
+ * Find the matching parse node, answers null if nothing found
+ */
+ public AbstractMethodDeclaration declarationOf(MethodBinding methodBinding) {
+
+ if (methodBinding != null) {
+ for (int i = 0, max = this.methods.length; i < max; i++) {
+ AbstractMethodDeclaration methodDecl;
+
+ if ((methodDecl = this.methods[i]).binding == methodBinding)
+ return methodDecl;
+ }
+ }
+ return null;
+ }
+
+ /*
+ * Finds the matching type amoung this type's member types.
+ * Returns null if no type with this name is found.
+ * The type name is a compound name relative to this type
+ * eg. if this type is X and we're looking for Y.X.A.B
+ * then a type name would be {X, A, B}
+ */
+ public TypeDeclaration declarationOfType(char[][] typeName) {
+
+ int typeNameLength = typeName.length;
+ if (typeNameLength < 1 || !CharOperation.equals(typeName[0], this.name)) {
+ return null;
+ }
+ if (typeNameLength == 1) {
+ return this;
+ }
+ char[][] subTypeName = new char[typeNameLength - 1][];
+ System.arraycopy(typeName, 1, subTypeName, 0, typeNameLength - 1);
+ for (int i = 0; i < this.memberTypes.length; i++) {
+ TypeDeclaration typeDecl = this.memberTypes[i].declarationOfType(subTypeName);
+ if (typeDecl != null) {
+ return typeDecl;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Generic bytecode generation for type
+ */
+ public void generateCode(ClassFile enclosingClassFile) {
+
+ if (hasBeenGenerated)
+ return;
+ hasBeenGenerated = true;
+ if (ignoreFurtherInvestigation) {
+ if (binding == null)
+ return;
+ ClassFile.createProblemType(
+ this,
+ scope.referenceCompilationUnit().compilationResult);
+ return;
+ }
+ try {
+ // create the result for a compiled type
+ ClassFile classFile = new ClassFile(binding, enclosingClassFile, false);
+ // generate all fiels
+ classFile.addFieldInfos();
+
+ // record the inner type inside its own .class file to be able
+ // to generate inner classes attributes
+ if (binding.isMemberType())
+ classFile.recordEnclosingTypeAttributes(binding);
+ if (binding.isLocalType()) {
+ enclosingClassFile.recordNestedLocalAttribute(binding);
+ classFile.recordNestedLocalAttribute(binding);
+ }
+ if (memberTypes != null) {
+ for (int i = 0, max = memberTypes.length; i < max; i++) {
+ // record the inner type inside its own .class file to be able
+ // to generate inner classes attributes
+ classFile.recordNestedMemberAttribute(memberTypes[i].binding);
+ memberTypes[i].generateCode(scope, classFile);
+ }
+ }
+ // generate all methods
+ classFile.setForMethodInfos();
+ if (methods != null) {
+ for (int i = 0, max = methods.length; i < max; i++) {
+ methods[i].generateCode(scope, classFile);
+ }
+ }
+ // generate all synthetic and abstract methods
+ classFile.addSpecialMethods();
+
+ if (ignoreFurtherInvestigation) { // trigger problem type generation for code gen errors
+ throw new AbortType(scope.referenceCompilationUnit().compilationResult, null);
+ }
+
+ // finalize the compiled type result
+ classFile.addAttributes();
+ scope.referenceCompilationUnit().compilationResult.record(
+ binding.constantPoolName(),
+ classFile);
+ } catch (AbortType e) {
+ if (binding == null)
+ return;
+ ClassFile.createProblemType(
+ this,
+ scope.referenceCompilationUnit().compilationResult);
+ }
+ }
+
+ /**
+ * Bytecode generation for a local inner type (API as a normal statement code gen)
+ */
+ public void generateCode(BlockScope blockScope, CodeStream codeStream) {
+
+ if ((this.bits & IsReachableMASK) == 0) {
+ return;
+ }
+ if (hasBeenGenerated) return;
+ int pc = codeStream.position;
+ if (binding != null) ((NestedTypeBinding) binding).computeSyntheticArgumentSlotSizes();
+ generateCode(codeStream.classFile);
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+
+ /**
+ * Bytecode generation for a member inner type
+ */
+ public void generateCode(ClassScope classScope, ClassFile enclosingClassFile) {
+
+ if (hasBeenGenerated) return;
+ if (binding != null) ((NestedTypeBinding) binding).computeSyntheticArgumentSlotSizes();
+ generateCode(enclosingClassFile);
+ }
+
+ /**
+ * Bytecode generation for a package member
+ */
+ public void generateCode(CompilationUnitScope unitScope) {
+
+ generateCode((ClassFile) null);
+ }
+
+ public boolean hasErrors() {
+ return this.ignoreFurtherInvestigation;
+ }
+
+ /**
+ * Common flow analysis for all types
+ *
+ */
+ public void internalAnalyseCode(FlowContext flowContext, FlowInfo flowInfo) {
+
+ if (this.binding.isPrivate() && !this.binding.isPrivateUsed()) {
+ if (!scope.referenceCompilationUnit().compilationResult.hasSyntaxError()) {
+ scope.problemReporter().unusedPrivateType(this);
+ }
+ }
+
+ InitializationFlowContext initializerContext = new InitializationFlowContext(null, this, initializerScope);
+ InitializationFlowContext staticInitializerContext = new InitializationFlowContext(null, this, staticInitializerScope);
+ FlowInfo nonStaticFieldInfo = flowInfo.copy().unconditionalInits().discardFieldInitializations();
+ FlowInfo staticFieldInfo = flowInfo.copy().unconditionalInits().discardFieldInitializations();
+ if (fields != null) {
+ for (int i = 0, count = fields.length; i < count; i++) {
+ FieldDeclaration field = fields[i];
+ if (field.isStatic()) {
+ /*if (field.isField()){
+ staticInitializerContext.handledExceptions = NoExceptions; // no exception is allowed jls8.3.2
+ } else {*/
+ staticInitializerContext.handledExceptions = AnyException; // tolerate them all, and record them
+ /*}*/
+ staticFieldInfo =
+ field.analyseCode(
+ staticInitializerScope,
+ staticInitializerContext,
+ staticFieldInfo);
+ // in case the initializer is not reachable, use a reinitialized flowInfo and enter a fake reachable
+ // branch, since the previous initializer already got the blame.
+ if (staticFieldInfo == FlowInfo.DEAD_END) {
+ staticInitializerScope.problemReporter().initializerMustCompleteNormally(field);
+ staticFieldInfo = FlowInfo.initial(maxFieldCount).setReachMode(FlowInfo.UNREACHABLE);
+ }
+ } else {
+ /*if (field.isField()){
+ initializerContext.handledExceptions = NoExceptions; // no exception is allowed jls8.3.2
+ } else {*/
+ initializerContext.handledExceptions = AnyException; // tolerate them all, and record them
+ /*}*/
+ nonStaticFieldInfo =
+ field.analyseCode(initializerScope, initializerContext, nonStaticFieldInfo);
+ // in case the initializer is not reachable, use a reinitialized flowInfo and enter a fake reachable
+ // branch, since the previous initializer already got the blame.
+ if (nonStaticFieldInfo == FlowInfo.DEAD_END) {
+ initializerScope.problemReporter().initializerMustCompleteNormally(field);
+ nonStaticFieldInfo = FlowInfo.initial(maxFieldCount).setReachMode(FlowInfo.UNREACHABLE);
+ }
+ }
+ }
+ }
+ if (memberTypes != null) {
+ for (int i = 0, count = memberTypes.length; i < count; i++) {
+ if (flowContext != null){ // local type
+ memberTypes[i].analyseCode(scope, flowContext, nonStaticFieldInfo.copy().setReachMode(flowInfo.reachMode())); // reset reach mode in case initializers did abrupt completely
+ } else {
+ memberTypes[i].analyseCode(scope);
+ }
+ }
+ }
+ if (methods != null) {
+ UnconditionalFlowInfo outerInfo = flowInfo.copy().unconditionalInits().discardFieldInitializations();
+ FlowInfo constructorInfo = nonStaticFieldInfo.unconditionalInits().discardNonFieldInitializations().addInitializationsFrom(outerInfo);
+ for (int i = 0, count = methods.length; i < count; i++) {
+ AbstractMethodDeclaration method = methods[i];
+ if (method.ignoreFurtherInvestigation)
+ continue;
+ if (method.isInitializationMethod()) {
+ if (method.isStatic()) { // <clinit>
+ method.analyseCode(
+ scope,
+ staticInitializerContext,
+ staticFieldInfo.unconditionalInits().discardNonFieldInitializations().addInitializationsFrom(outerInfo).setReachMode(flowInfo.reachMode())); // reset reach mode in case initializers did abrupt completely
+ } else { // constructor
+ method.analyseCode(scope, initializerContext, constructorInfo.copy().setReachMode(flowInfo.reachMode())); // reset reach mode in case initializers did abrupt completely
+ }
+ } else { // regular method
+ method.analyseCode(scope, null, flowInfo.copy());
+ }
+ }
+ }
+ }
+
+ public boolean isInterface() {
+
+ return (modifiers & AccInterface) != 0;
+ }
+
+ /*
+ * Access emulation for a local type
+ * force to emulation of access to direct enclosing instance.
+ * By using the initializer scope, we actually only request an argument emulation, the
+ * field is not added until actually used. However we will force allocations to be qualified
+ * with an enclosing instance.
+ * 15.9.2
+ */
+ public void manageEnclosingInstanceAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo) {
+
+ if (!flowInfo.isReachable()) return;
+ NestedTypeBinding nestedType = (NestedTypeBinding) binding;
+
+ MethodScope methodScope = currentScope.methodScope();
+ if (!methodScope.isStatic && !methodScope.isConstructorCall){
+
+ nestedType.addSyntheticArgumentAndField(binding.enclosingType());
+ }
+ // add superclass enclosing instance arg for anonymous types (if necessary)
+ if (binding.isAnonymousType()) {
+ ReferenceBinding superclassBinding = binding.superclass;
+ if (superclassBinding.enclosingType() != null && !superclassBinding.isStatic()) {
+ if (!superclassBinding.isLocalType()
+ || ((NestedTypeBinding)superclassBinding).getSyntheticField(superclassBinding.enclosingType(), true) != null){
+
+ nestedType.addSyntheticArgument(superclassBinding.enclosingType());
+ }
+ }
+ }
+ }
+
+ /*
+ * Access emulation for a local member type
+ * force to emulation of access to direct enclosing instance.
+ * By using the initializer scope, we actually only request an argument emulation, the
+ * field is not added until actually used. However we will force allocations to be qualified
+ * with an enclosing instance.
+ *
+ * Local member cannot be static.
+ */
+ public void manageEnclosingInstanceAccessIfNecessary(ClassScope currentScope, FlowInfo flowInfo) {
+
+ if (!flowInfo.isReachable()) return;
+ NestedTypeBinding nestedType = (NestedTypeBinding) binding;
+ nestedType.addSyntheticArgumentAndField(binding.enclosingType());
+ }
+
+ /**
+ * A <clinit> will be requested as soon as static fields or assertions are present. It will be eliminated during
+ * classfile creation if no bytecode was actually produced based on some optimizations/compiler settings.
+ */
+ public final boolean needClassInitMethod() {
+
+ // always need a <clinit> when assertions are present
+ if ((this.bits & AddAssertionMASK) != 0)
+ return true;
+ if (fields == null)
+ return false;
+ if (isInterface())
+ return true; // fields are implicitly statics
+ for (int i = fields.length; --i >= 0;) {
+ FieldDeclaration field = fields[i];
+ //need to test the modifier directly while there is no binding yet
+ if ((field.modifiers & AccStatic) != 0)
+ return true;
+ }
+ return false;
+ }
+
+ public void parseMethod(Parser parser, CompilationUnitDeclaration unit) {
+
+ //connect method bodies
+ if (unit.ignoreMethodBodies)
+ return;
+
+ //members
+ if (memberTypes != null) {
+ int length = memberTypes.length;
+ for (int i = 0; i < length; i++)
+ memberTypes[i].parseMethod(parser, unit);
+ }
+
+ //methods
+ if (methods != null) {
+ int length = methods.length;
+ for (int i = 0; i < length; i++)
+ methods[i].parseStatements(parser, unit);
+ }
+
+ //initializers
+ if (fields != null) {
+ int length = fields.length;
+ for (int i = 0; i < length; i++) {
+ if (fields[i] instanceof Initializer) {
+ ((Initializer) fields[i]).parseStatements(parser, this, unit);
+ }
+ }
+ }
+ }
+
+ public StringBuffer print(int indent, StringBuffer output) {
+
+ if ((this.bits & IsAnonymousTypeMASK) == 0) {
+ printIndent(indent, output);
+ printHeader(0, output);
+ }
+ return printBody(indent, output);
+ }
+
+ public StringBuffer printBody(int indent, StringBuffer output) {
+
+ output.append(" {"); //$NON-NLS-1$
+ if (memberTypes != null) {
+ for (int i = 0; i < memberTypes.length; i++) {
+ if (memberTypes[i] != null) {
+ output.append('\n');
+ memberTypes[i].print(indent + 1, output);
+ }
+ }
+ }
+ if (fields != null) {
+ for (int fieldI = 0; fieldI < fields.length; fieldI++) {
+ if (fields[fieldI] != null) {
+ output.append('\n');
+ fields[fieldI].print(indent + 1, output);
+ }
+ }
+ }
+ if (methods != null) {
+ for (int i = 0; i < methods.length; i++) {
+ if (methods[i] != null) {
+ output.append('\n');
+ methods[i].print(indent + 1, output);
+ }
+ }
+ }
+ output.append('\n');
+ return printIndent(indent, output).append('}');
+ }
+
+ public StringBuffer printHeader(int indent, StringBuffer output) {
+
+ printModifiers(this.modifiers, output);
+ output.append(isInterface() ? "interface " : "class "); //$NON-NLS-1$ //$NON-NLS-2$
+ output.append(name);
+ if (typeParameters != null) {
+ output.append("<");//$NON-NLS-1$
+ for (int i = 0; i < typeParameters.length; i++) {
+ if (i > 0) output.append( ", "); //$NON-NLS-1$
+ typeParameters[i].print(0, output);
+ }
+ output.append(">");//$NON-NLS-1$
+ }
+ if (superclass != null) {
+ output.append(" extends "); //$NON-NLS-1$
+ superclass.print(0, output);
+ }
+ if (superInterfaces != null && superInterfaces.length > 0) {
+ output.append(isInterface() ? " extends " : " implements ");//$NON-NLS-2$ //$NON-NLS-1$
+ for (int i = 0; i < superInterfaces.length; i++) {
+ if (i > 0) output.append( ", "); //$NON-NLS-1$
+ superInterfaces[i].print(0, output);
+ }
+ }
+ return output;
+ }
+
+ public StringBuffer printStatement(int tab, StringBuffer output) {
+ return print(tab, output);
+ }
+
+ public void resolve() {
+
+ SourceTypeBinding sourceType = this.binding;
+ if (sourceType == null) {
+ this.ignoreFurtherInvestigation = true;
+ return;
+ }
+ try {
+ if ((this.bits & UndocumentedEmptyBlockMASK) != 0) {
+ this.scope.problemReporter().undocumentedEmptyBlock(this.bodyStart-1, this.bodyEnd);
+ }
+ boolean needSerialVersion =
+ this.scope.environment().options.getSeverity(CompilerOptions.MissingSerialVersion) != ProblemSeverities.Ignore
+ && sourceType.isClass()
+ && !sourceType.isAbstract()
+ && sourceType.findSuperTypeErasingTo(T_JavaIoSerializable, false /*Serializable is not a class*/) != null;
+
+ if (this.typeParameters != null && scope.getJavaLangThrowable().isSuperclassOf(sourceType)) {
+ this.scope.problemReporter().genericTypeCannotExtendThrowable(this);
+ }
+ this.maxFieldCount = 0;
+ int lastVisibleFieldID = -1;
+ if (this.fields != null) {
+ for (int i = 0, count = this.fields.length; i < count; i++) {
+ FieldDeclaration field = this.fields[i];
+ if (field.isField()) {
+ FieldBinding fieldBinding = field.binding;
+ if (fieldBinding == null) {
+ // still discover secondary errors
+ if (field.initialization != null) field.initialization.resolve(field.isStatic() ? this.staticInitializerScope : this.initializerScope);
+ this.ignoreFurtherInvestigation = true;
+ continue;
+ }
+ if (needSerialVersion
+ && ((fieldBinding.modifiers & (AccStatic | AccFinal)) == (AccStatic | AccFinal))
+ && CharOperation.equals(TypeConstants.SERIALVERSIONUID, fieldBinding.name)
+ && BaseTypes.LongBinding == fieldBinding.type) {
+ needSerialVersion = false;
+ }
+ this.maxFieldCount++;
+ lastVisibleFieldID = field.binding.id;
+ } else { // initializer
+ ((Initializer) field).lastVisibleFieldID = lastVisibleFieldID + 1;
+ }
+ field.resolve(field.isStatic() ? this.staticInitializerScope : this.initializerScope);
+ }
+ }
+ if (needSerialVersion) {
+ this.scope.problemReporter().missingSerialVersion(this);
+ }
+ if (this.memberTypes != null) {
+ for (int i = 0, count = this.memberTypes.length; i < count; i++) {
+ this.memberTypes[i].resolve(this.scope);
+ }
+ }
+ int missingAbstractMethodslength = this.missingAbstractMethods == null ? 0 : this.missingAbstractMethods.length;
+ int methodsLength = this.methods == null ? 0 : this.methods.length;
+ if ((methodsLength + missingAbstractMethodslength) > 0xFFFF) {
+ this.scope.problemReporter().tooManyMethods(this);
+ }
+
+ if (this.methods != null) {
+ for (int i = 0, count = this.methods.length; i < count; i++) {
+ this.methods[i].resolve(this.scope);
+ }
+ }
+ // Resolve javadoc
+ if (this.javadoc != null) {
+ if (this.scope != null) {
+ this.javadoc.resolve(this.scope);
+ }
+ } else if (sourceType != null && !sourceType.isLocalType()) {
+ this.scope.problemReporter().javadocMissing(this.sourceStart, this.sourceEnd, sourceType.modifiers);
+ }
+
+ } catch (AbortType e) {
+ this.ignoreFurtherInvestigation = true;
+ return;
+ }
+ }
+
+ public void resolve(BlockScope blockScope) {
+ // local type declaration
+
+ // need to build its scope first and proceed with binding's creation
+ if ((this.bits & IsAnonymousTypeMASK) == 0) blockScope.addLocalType(this);
+
+ if (binding != null) {
+ // remember local types binding for innerclass emulation propagation
+ blockScope.referenceCompilationUnit().record((LocalTypeBinding)binding);
+
+ // binding is not set if the receiver could not be created
+ resolve();
+ updateMaxFieldCount();
+ }
+ }
+
+ public void resolve(ClassScope upperScope) {
+ // member scopes are already created
+ // request the construction of a binding if local member type
+
+ if (binding != null && binding instanceof LocalTypeBinding) {
+ // remember local types binding for innerclass emulation propagation
+ upperScope.referenceCompilationUnit().record((LocalTypeBinding)binding);
+ }
+ resolve();
+ updateMaxFieldCount();
+ }
+
+ public void resolve(CompilationUnitScope upperScope) {
+ // top level : scope are already created
+
+ resolve();
+ updateMaxFieldCount();
+ }
+
+ public void tagAsHavingErrors() {
+ ignoreFurtherInvestigation = true;
+ }
+
+
+ /**
+ * Iteration for a package member type
+ *
+ */
+ public void traverse(
+ ASTVisitor visitor,
+ CompilationUnitScope unitScope) {
+
+ if (ignoreFurtherInvestigation)
+ return;
+ try {
+ if (visitor.visit(this, unitScope)) {
+ if (this.annotations != null) {
+ int annotationsLength = this.annotations.length;
+ for (int i = 0; i < annotationsLength; i++)
+ this.annotations[i].traverse(visitor, scope);
+ }
+ if (this.superclass != null)
+ this.superclass.traverse(visitor, scope);
+ if (this.superInterfaces != null) {
+ int length = this.superInterfaces.length;
+ for (int i = 0; i < length; i++)
+ this.superInterfaces[i].traverse(visitor, scope);
+ }
+ if (this.typeParameters != null) {
+ int length = this.typeParameters.length;
+ for (int i = 0; i < length; i++) {
+ this.typeParameters[i].traverse(visitor, scope);
+ }
+ }
+ if (this.memberTypes != null) {
+ int length = this.memberTypes.length;
+ for (int i = 0; i < length; i++)
+ this.memberTypes[i].traverse(visitor, scope);
+ }
+ if (this.enums != null) {
+ int length = this.enums.length;
+ for (int i = 0; i < length; i++)
+ this.enums[i].traverse(visitor, scope);
+ }
+ if (this.fields != null) {
+ int length = this.fields.length;
+ for (int i = 0; i < length; i++) {
+ FieldDeclaration field;
+ if ((field = this.fields[i]).isStatic()) {
+ field.traverse(visitor, staticInitializerScope);
+ } else {
+ field.traverse(visitor, initializerScope);
+ }
+ }
+ }
+ if (this.methods != null) {
+ int length = this.methods.length;
+ for (int i = 0; i < length; i++)
+ this.methods[i].traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, unitScope);
+ } catch (AbortType e) {
+ // silent abort
+ }
+ }
+
+ /**
+ * Iteration for a local innertype
+ *
+ */
+ public void traverse(ASTVisitor visitor, BlockScope blockScope) {
+ if (ignoreFurtherInvestigation)
+ return;
+ try {
+ if (visitor.visit(this, blockScope)) {
+ if (this.annotations != null) {
+ int annotationsLength = this.annotations.length;
+ for (int i = 0; i < annotationsLength; i++)
+ this.annotations[i].traverse(visitor, scope);
+ }
+ if (this.superclass != null)
+ this.superclass.traverse(visitor, scope);
+ if (this.superInterfaces != null) {
+ int length = this.superInterfaces.length;
+ for (int i = 0; i < length; i++)
+ this.superInterfaces[i].traverse(visitor, scope);
+ }
+ if (this.typeParameters != null) {
+ int length = this.typeParameters.length;
+ for (int i = 0; i < length; i++) {
+ this.typeParameters[i].traverse(visitor, scope);
+ }
+ }
+ if (this.memberTypes != null) {
+ int length = this.memberTypes.length;
+ for (int i = 0; i < length; i++)
+ this.memberTypes[i].traverse(visitor, scope);
+ }
+ if (this.enums != null) {
+ int length = this.enums.length;
+ for (int i = 0; i < length; i++)
+ this.enums[i].traverse(visitor, scope);
+ }
+ if (this.fields != null) {
+ int length = this.fields.length;
+ for (int i = 0; i < length; i++) {
+ FieldDeclaration field;
+ if ((field = this.fields[i]).isStatic()) {
+ // local type cannot have static fields
+ } else {
+ field.traverse(visitor, initializerScope);
+ }
+ }
+ }
+ if (this.methods != null) {
+ int length = this.methods.length;
+ for (int i = 0; i < length; i++)
+ this.methods[i].traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, blockScope);
+ } catch (AbortType e) {
+ // silent abort
+ }
+ }
+
+ /**
+ * Iteration for a member innertype
+ *
+ */
+ public void traverse(ASTVisitor visitor, ClassScope classScope) {
+ if (ignoreFurtherInvestigation)
+ return;
+ try {
+ if (visitor.visit(this, classScope)) {
+ if (this.annotations != null) {
+ int annotationsLength = this.annotations.length;
+ for (int i = 0; i < annotationsLength; i++)
+ this.annotations[i].traverse(visitor, scope);
+ }
+ if (this.superclass != null)
+ this.superclass.traverse(visitor, scope);
+ if (this.superInterfaces != null) {
+ int length = this.superInterfaces.length;
+ for (int i = 0; i < length; i++)
+ this.superInterfaces[i].traverse(visitor, scope);
+ }
+ if (this.typeParameters != null) {
+ int length = this.typeParameters.length;
+ for (int i = 0; i < length; i++) {
+ this.typeParameters[i].traverse(visitor, scope);
+ }
+ }
+ if (this.memberTypes != null) {
+ int length = this.memberTypes.length;
+ for (int i = 0; i < length; i++)
+ this.memberTypes[i].traverse(visitor, scope);
+ }
+ if (this.enums != null) {
+ int length = this.enums.length;
+ for (int i = 0; i < length; i++)
+ this.enums[i].traverse(visitor, scope);
+ }
+ if (this.fields != null) {
+ int length = this.fields.length;
+ for (int i = 0; i < length; i++) {
+ FieldDeclaration field;
+ if ((field = this.fields[i]).isStatic()) {
+ field.traverse(visitor, staticInitializerScope);
+ } else {
+ field.traverse(visitor, initializerScope);
+ }
+ }
+ }
+ if (this.methods != null) {
+ int length = this.methods.length;
+ for (int i = 0; i < length; i++)
+ this.methods[i].traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, classScope);
+ } catch (AbortType e) {
+ // silent abort
+ }
+ }
+
+ /**
+ * MaxFieldCount's computation is necessary so as to reserve space for
+ * the flow info field portions. It corresponds to the maximum amount of
+ * fields this class or one of its innertypes have.
+ *
+ * During name resolution, types are traversed, and the max field count is recorded
+ * on the outermost type. It is then propagated down during the flow analysis.
+ *
+ * This method is doing either up/down propagation.
+ */
+ void updateMaxFieldCount() {
+
+ if (binding == null)
+ return; // error scenario
+ TypeDeclaration outerMostType = scope.outerMostClassScope().referenceType();
+ if (maxFieldCount > outerMostType.maxFieldCount) {
+ outerMostType.maxFieldCount = maxFieldCount; // up
+ } else {
+ maxFieldCount = outerMostType.maxFieldCount; // down
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/TypeParameter.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/TypeParameter.js
new file mode 100644
index 0000000..0f7354e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/TypeParameter.js
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeVariableBinding;
+
+public class TypeParameter extends AbstractVariableDeclaration {
+
+ public TypeVariableBinding binding;
+ public TypeReference[] bounds;
+
+ public void resolve(ClassScope scope) {
+ // TODO (philippe) add warning for detecting variable name collisions
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.AstNode#print(int, java.lang.StringBuffer)
+ */
+ public StringBuffer printStatement(int indent, StringBuffer output) {
+ output.append(this.name);
+ if (this.type != null) {
+ output.append(" extends "); //$NON-NLS-1$
+ this.type.print(0, output);
+ }
+ if (this.bounds != null){
+ for (int i = 0; i < this.bounds.length; i++) {
+ output.append(" & "); //$NON-NLS-1$
+ this.bounds[i].print(0, output);
+ }
+ }
+ return output;
+ }
+
+ public void generateCode(BlockScope currentScope, CodeStream codeStream) {
+ // nothing to do
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+ if (visitor.visit(this, scope)) {
+ if (type != null) {
+ type.traverse(visitor, scope);
+ }
+ if (bounds != null) {
+ int boundsLength = this.bounds.length;
+ for (int i = 0; i < boundsLength; i++) {
+ this.bounds[i].traverse(visitor, scope);
+ }
+ }
+ }
+ visitor.endVisit(this, scope);
+ }
+
+ public void traverse(ASTVisitor visitor, ClassScope scope) {
+ if (visitor.visit(this, scope)) {
+ if (type != null) {
+ type.traverse(visitor, scope);
+ }
+ if (bounds != null) {
+ int boundsLength = this.bounds.length;
+ for (int i = 0; i < boundsLength; i++) {
+ this.bounds[i].traverse(visitor, scope);
+ }
+ }
+ }
+ visitor.endVisit(this, scope);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/TypeReference.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/TypeReference.js
new file mode 100644
index 0000000..bea4e26
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/TypeReference.js
@@ -0,0 +1,164 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.flow.FlowContext;
+import org.eclipse.wst.jsdt.internal.compiler.flow.FlowInfo;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public abstract class TypeReference extends Expression {
+
+public TypeReference() {
+ super () ;
+ }
+
+public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
+ return flowInfo;
+}
+
+// allows us to trap completion & selection nodes
+public void aboutToResolve(Scope scope) {
+ // default implementation: do nothing
+}
+/*
+ * Answer a base type reference (can be an array of base type).
+ */
+public static final TypeReference baseTypeReference(int baseType, int dim) {
+
+ if (dim == 0) {
+ switch (baseType) {
+ case (T_void) :
+ return new SingleTypeReference(VoidBinding.simpleName, 0);
+ case (T_boolean) :
+ return new SingleTypeReference(BooleanBinding.simpleName, 0);
+ case (T_char) :
+ return new SingleTypeReference(CharBinding.simpleName, 0);
+ case (T_float) :
+ return new SingleTypeReference(FloatBinding.simpleName, 0);
+ case (T_double) :
+ return new SingleTypeReference(DoubleBinding.simpleName, 0);
+ case (T_byte) :
+ return new SingleTypeReference(ByteBinding.simpleName, 0);
+ case (T_short) :
+ return new SingleTypeReference(ShortBinding.simpleName, 0);
+ case (T_int) :
+ return new SingleTypeReference(IntBinding.simpleName, 0);
+ default : //T_long
+ return new SingleTypeReference(LongBinding.simpleName, 0);
+ }
+ }
+ switch (baseType) {
+ case (T_void) :
+ return new ArrayTypeReference(VoidBinding.simpleName, dim, 0);
+ case (T_boolean) :
+ return new ArrayTypeReference(BooleanBinding.simpleName, dim, 0);
+ case (T_char) :
+ return new ArrayTypeReference(CharBinding.simpleName, dim, 0);
+ case (T_float) :
+ return new ArrayTypeReference(FloatBinding.simpleName, dim, 0);
+ case (T_double) :
+ return new ArrayTypeReference(DoubleBinding.simpleName, dim, 0);
+ case (T_byte) :
+ return new ArrayTypeReference(ByteBinding.simpleName, dim, 0);
+ case (T_short) :
+ return new ArrayTypeReference(ShortBinding.simpleName, dim, 0);
+ case (T_int) :
+ return new ArrayTypeReference(IntBinding.simpleName, dim, 0);
+ default : //T_long
+ return new ArrayTypeReference(LongBinding.simpleName, dim, 0);
+ }
+}
+public void checkBounds(Scope scope) {
+ // only parameterized type references have bounds
+}
+public abstract TypeReference copyDims(int dim);
+public int dimensions() {
+ return 0;
+}
+/**
+ * @return char[][]
+ * TODO (jerome) should merge back into #getTypeName()
+ */
+public char [][] getParameterizedTypeName(){
+ return getTypeName();
+}
+protected abstract TypeBinding getTypeBinding(Scope scope);
+/**
+ * @return char[][]
+ */
+public abstract char [][] getTypeName() ;
+public boolean isTypeReference() {
+ return true;
+}
+public TypeBinding resolveSuperType(ClassScope scope) {
+ // assumes the implementation of resolveType(ClassScope) will call back to detect cycles
+ if (resolveType(scope) == null) return null;
+
+ if (this.resolvedType.isTypeVariable()) {
+ this.resolvedType = new ProblemReferenceBinding(getTypeName(), (ReferenceBinding) this.resolvedType, ProblemReasons.IllegalSuperTypeVariable);
+ reportInvalidType(scope);
+ return null;
+ }
+ return this.resolvedType;
+}
+public TypeBinding resolveType(BlockScope blockScope) {
+ // handle the error here
+ this.constant = NotAConstant;
+ if (this.resolvedType != null) // is a shared type reference which was already resolved
+ return this.resolvedType.isValidBinding() ? this.resolvedType : null; // already reported error
+
+ this.resolvedType = getTypeBinding(blockScope);
+ if (this.resolvedType == null)
+ return null; // detected cycle while resolving hierarchy
+ if (!this.resolvedType.isValidBinding()) {
+ reportInvalidType(blockScope);
+ return null;
+ }
+ if (isTypeUseDeprecated(this.resolvedType, blockScope))
+ reportDeprecatedType(blockScope);
+ return this.resolvedType = blockScope.convertToRawType(this.resolvedType);
+}
+public TypeBinding resolveType(ClassScope classScope) {
+ // handle the error here
+ this.constant = NotAConstant;
+ if (this.resolvedType != null) // is a shared type reference which was already resolved
+ return this.resolvedType.isValidBinding() ? this.resolvedType : null; // already reported error
+
+ this.resolvedType = getTypeBinding(classScope);
+ if (this.resolvedType == null)
+ return null; // detected cycle while resolving hierarchy
+ if (!this.resolvedType.isValidBinding()) {
+ reportInvalidType(classScope);
+ return null;
+ }
+ if (isTypeUseDeprecated(this.resolvedType, classScope))
+ reportDeprecatedType(classScope);
+ return this.resolvedType = classScope.convertToRawType(this.resolvedType);
+}
+
+public TypeBinding resolveTypeArgument(BlockScope blockScope, ReferenceBinding genericType, int rank) {
+ return resolveType(blockScope);
+}
+
+public TypeBinding resolveTypeArgument(ClassScope classScope, ReferenceBinding genericType, int rank) {
+ return resolveType(classScope);
+}
+
+protected void reportInvalidType(Scope scope) {
+ scope.problemReporter().invalidType(this, this.resolvedType);
+}
+protected void reportDeprecatedType(Scope scope) {
+ scope.problemReporter().deprecatedType(this.resolvedType, this);
+}
+public abstract void traverse(ASTVisitor visitor, ClassScope classScope);
+public abstract void traverse(ASTVisitor visitor, BlockScope classScope);
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/UnaryExpression.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/UnaryExpression.js
new file mode 100644
index 0000000..0509783
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/UnaryExpression.js
@@ -0,0 +1,301 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class UnaryExpression extends OperatorExpression {
+
+ public Expression expression;
+ public Constant optimizedBooleanConstant;
+
+ public UnaryExpression(Expression expression, int operator) {
+ this.expression = expression;
+ this.bits |= operator << OperatorSHIFT; // encode operator
+ }
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ if (((bits & OperatorMASK) >> OperatorSHIFT) == NOT) {
+ return this.expression
+ .analyseCode(currentScope, flowContext, flowInfo)
+ .asNegatedCondition();
+ } else {
+ return this.expression.analyseCode(currentScope, flowContext, flowInfo);
+ }
+ }
+
+ public Constant optimizedBooleanConstant() {
+
+ return this.optimizedBooleanConstant == null
+ ? this.constant
+ : this.optimizedBooleanConstant;
+ }
+
+ /**
+ * Code generation for an unary operation
+ *
+ * @param currentScope org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ * @param valueRequired boolean
+ */
+ public void generateCode(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ boolean valueRequired) {
+
+ int pc = codeStream.position;
+ Label falseLabel, endifLabel;
+ if (this.constant != Constant.NotAConstant) {
+ // inlined value
+ if (valueRequired) {
+ codeStream.generateConstant(this.constant, this.implicitConversion);
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ return;
+ }
+ switch ((bits & OperatorMASK) >> OperatorSHIFT) {
+ case NOT :
+ switch (this.expression.implicitConversion >> 4) /* runtime type */ {
+ case T_boolean :
+ // ! <boolean>
+ // Generate code for the condition
+ this.expression.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ null,
+ (falseLabel = new Label(codeStream)),
+ valueRequired);
+ if (valueRequired) {
+ codeStream.iconst_0();
+ if (falseLabel.hasForwardReferences()) {
+ codeStream.goto_(endifLabel = new Label(codeStream));
+ codeStream.decrStackSize(1);
+ falseLabel.place();
+ codeStream.iconst_1();
+ endifLabel.place();
+ }
+ } else { // 6596: if (!(a && b)){} - must still place falseLabel
+ falseLabel.place();
+ }
+ break;
+ }
+ break;
+ case TWIDDLE :
+ switch (this.expression.implicitConversion >> 4 /* runtime */
+ ) {
+ case T_int :
+ // ~int
+ this.expression.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired) {
+ codeStream.iconst_m1();
+ codeStream.ixor();
+ }
+ break;
+ case T_long :
+ this.expression.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired) {
+ codeStream.ldc2_w(-1L);
+ codeStream.lxor();
+ }
+ }
+ break;
+ case MINUS :
+ // - <num>
+ if (this.constant != NotAConstant) {
+ if (valueRequired) {
+ switch (this.expression.implicitConversion >> 4){ /* runtime */
+ case T_int :
+ codeStream.generateInlinedValue(this.constant.intValue() * -1);
+ break;
+ case T_float :
+ codeStream.generateInlinedValue(this.constant.floatValue() * -1.0f);
+ break;
+ case T_long :
+ codeStream.generateInlinedValue(this.constant.longValue() * -1L);
+ break;
+ case T_double :
+ codeStream.generateInlinedValue(this.constant.doubleValue() * -1.0);
+ }
+ }
+ } else {
+ this.expression.generateCode(currentScope, codeStream, valueRequired);
+ if (valueRequired) {
+ switch (expression.implicitConversion >> 4){ /* runtime type */
+ case T_int :
+ codeStream.ineg();
+ break;
+ case T_float :
+ codeStream.fneg();
+ break;
+ case T_long :
+ codeStream.lneg();
+ break;
+ case T_double :
+ codeStream.dneg();
+ }
+ }
+ }
+ break;
+ case PLUS :
+ this.expression.generateCode(currentScope, codeStream, valueRequired);
+ }
+ if (valueRequired) {
+ codeStream.generateImplicitConversion(this.implicitConversion);
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+
+ /**
+ * Boolean operator code generation
+ * Optimized operations are: &&, ||, <, <=, >, >=, &, |, ^
+ */
+ public void generateOptimizedBoolean(
+ BlockScope currentScope,
+ CodeStream codeStream,
+ Label trueLabel,
+ Label falseLabel,
+ boolean valueRequired) {
+
+ if ((this.constant != Constant.NotAConstant) && (this.constant.typeID() == T_boolean)) {
+ super.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ trueLabel,
+ falseLabel,
+ valueRequired);
+ return;
+ }
+ if (((this.bits & OperatorMASK) >> OperatorSHIFT) == NOT) {
+ this.expression.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ falseLabel,
+ trueLabel,
+ valueRequired);
+ } else {
+ super.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ trueLabel,
+ falseLabel,
+ valueRequired);
+ }
+ }
+
+ public StringBuffer printExpressionNoParenthesis(int indent, StringBuffer output) {
+
+ output.append(operatorToString()).append(' ');
+ return this.expression.printExpression(0, output);
+ }
+
+ public TypeBinding resolveType(BlockScope scope) {
+
+ boolean expressionIsCast;
+ if ((expressionIsCast = this.expression instanceof CastExpression) == true) this.expression.bits |= IgnoreNeedForCastCheckMASK; // will check later on
+ TypeBinding expressionType = this.expression.resolveType(scope);
+ if (expressionType == null) {
+ this.constant = NotAConstant;
+ return null;
+ }
+ int expressionTypeId = expressionType.id;
+ if (expressionTypeId > 15) {
+ this.constant = NotAConstant;
+ scope.problemReporter().invalidOperator(this, expressionType);
+ return null;
+ }
+
+ int tableId;
+ switch ((bits & OperatorMASK) >> OperatorSHIFT) {
+ case NOT :
+ tableId = AND_AND;
+ break;
+ case TWIDDLE :
+ tableId = LEFT_SHIFT;
+ break;
+ default :
+ tableId = MINUS;
+ } //+ and - cases
+
+ // the code is an int
+ // (cast) left Op (cast) rigth --> result
+ // 0000 0000 0000 0000 0000
+ // <<16 <<12 <<8 <<4 <<0
+ int operatorSignature = OperatorSignatures[tableId][(expressionTypeId << 4) + expressionTypeId];
+ this.expression.implicitConversion = operatorSignature >>> 12;
+ this.bits |= operatorSignature & 0xF;
+ switch (operatorSignature & 0xF) { // only switch on possible result type.....
+ case T_boolean :
+ this.resolvedType = BooleanBinding;
+ break;
+ case T_byte :
+ this.resolvedType = ByteBinding;
+ break;
+ case T_char :
+ this.resolvedType = CharBinding;
+ break;
+ case T_double :
+ this.resolvedType = DoubleBinding;
+ break;
+ case T_float :
+ this.resolvedType = FloatBinding;
+ break;
+ case T_int :
+ this.resolvedType = IntBinding;
+ break;
+ case T_long :
+ this.resolvedType = LongBinding;
+ break;
+ default : //error........
+ this.constant = Constant.NotAConstant;
+ if (expressionTypeId != T_undefined)
+ scope.problemReporter().invalidOperator(this, expressionType);
+ return null;
+ }
+ // compute the constant when valid
+ if (this.expression.constant != Constant.NotAConstant) {
+ this.constant =
+ Constant.computeConstantOperation(
+ this.expression.constant,
+ expressionTypeId,
+ (bits & OperatorMASK) >> OperatorSHIFT);
+ } else {
+ this.constant = Constant.NotAConstant;
+ if (((bits & OperatorMASK) >> OperatorSHIFT) == NOT) {
+ Constant cst = expression.optimizedBooleanConstant();
+ if (cst != Constant.NotAConstant)
+ this.optimizedBooleanConstant = Constant.fromValue(!cst.booleanValue());
+ }
+ }
+ if (expressionIsCast) {
+ // check need for operand cast
+ CastExpression.checkNeedForArgumentCast(scope, tableId, operatorSignature, this.expression, expressionTypeId);
+ }
+ return this.resolvedType;
+ }
+
+ public void traverse(
+ ASTVisitor visitor,
+ BlockScope blockScope) {
+
+ if (visitor.visit(this, blockScope)) {
+ this.expression.traverse(visitor, blockScope);
+ }
+ visitor.endVisit(this, blockScope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/WhileStatement.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/WhileStatement.js
new file mode 100644
index 0000000..58adf73
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/WhileStatement.js
@@ -0,0 +1,234 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class WhileStatement extends Statement {
+
+ public Expression condition;
+ public Statement action;
+ private Label breakLabel, continueLabel;
+ int preCondInitStateIndex = -1;
+ int condIfTrueInitStateIndex = -1;
+ int mergedInitStateIndex = -1;
+
+ public WhileStatement(Expression condition, Statement action, int s, int e) {
+
+ this.condition = condition;
+ this.action = action;
+ // remember useful empty statement
+ if (action instanceof EmptyStatement) action.bits |= IsUsefulEmptyStatementMASK;
+ sourceStart = s;
+ sourceEnd = e;
+ }
+
+ public FlowInfo analyseCode(
+ BlockScope currentScope,
+ FlowContext flowContext,
+ FlowInfo flowInfo) {
+
+ breakLabel = new Label();
+ continueLabel = new Label();
+
+ Constant cst = this.condition.constant;
+ boolean isConditionTrue = cst != NotAConstant && cst.booleanValue() == true;
+ boolean isConditionFalse = cst != NotAConstant && cst.booleanValue() == false;
+
+ cst = this.condition.optimizedBooleanConstant();
+ boolean isConditionOptimizedTrue = cst != NotAConstant && cst.booleanValue() == true;
+ boolean isConditionOptimizedFalse = cst != NotAConstant && cst.booleanValue() == false;
+
+ preCondInitStateIndex =
+ currentScope.methodScope().recordInitializationStates(flowInfo);
+ LoopingFlowContext condLoopContext;
+ FlowInfo postCondInfo =
+ this.condition.analyseCode(
+ currentScope,
+ (condLoopContext =
+ new LoopingFlowContext(flowContext, this, null, null, currentScope)),
+ flowInfo);
+
+ LoopingFlowContext loopingContext;
+ FlowInfo actionInfo;
+ if (action == null
+ || (action.isEmptyBlock() && currentScope.environment().options.complianceLevel <= ClassFileConstants.JDK1_3)) {
+ condLoopContext.complainOnFinalAssignmentsInLoop(currentScope, postCondInfo);
+ if (isConditionTrue) {
+ return FlowInfo.DEAD_END;
+ } else {
+ FlowInfo mergedInfo = postCondInfo.initsWhenFalse().unconditionalInits();
+ if (isConditionOptimizedTrue){
+ mergedInfo.setReachMode(FlowInfo.UNREACHABLE);
+ }
+ mergedInitStateIndex =
+ currentScope.methodScope().recordInitializationStates(mergedInfo);
+ return mergedInfo;
+ }
+ } else {
+ // in case the condition was inlined to false, record the fact that there is no way to reach any
+ // statement inside the looping action
+ loopingContext =
+ new LoopingFlowContext(
+ flowContext,
+ this,
+ breakLabel,
+ continueLabel,
+ currentScope);
+ if (isConditionFalse) {
+ actionInfo = FlowInfo.DEAD_END;
+ } else {
+ actionInfo = postCondInfo.initsWhenTrue().copy();
+ if (isConditionOptimizedFalse){
+ actionInfo.setReachMode(FlowInfo.UNREACHABLE);
+ }
+ }
+
+ // for computing local var attributes
+ condIfTrueInitStateIndex =
+ currentScope.methodScope().recordInitializationStates(
+ postCondInfo.initsWhenTrue());
+
+ if (!this.action.complainIfUnreachable(actionInfo, currentScope, false)) {
+ actionInfo = this.action.analyseCode(currentScope, loopingContext, actionInfo);
+ }
+
+ // code generation can be optimized when no need to continue in the loop
+ if (!actionInfo.isReachable() && !loopingContext.initsOnContinue.isReachable()) {
+ continueLabel = null;
+ } else {
+ condLoopContext.complainOnFinalAssignmentsInLoop(currentScope, postCondInfo);
+ actionInfo = actionInfo.mergedWith(loopingContext.initsOnContinue.unconditionalInits());
+ loopingContext.complainOnFinalAssignmentsInLoop(currentScope, actionInfo);
+ }
+ }
+
+ // end of loop
+ FlowInfo mergedInfo = FlowInfo.mergedOptimizedBranches(
+ loopingContext.initsOnBreak,
+ isConditionOptimizedTrue,
+ postCondInfo.initsWhenFalse(),
+ isConditionOptimizedFalse,
+ !isConditionTrue /*while(true); unreachable(); */);
+ mergedInitStateIndex = currentScope.methodScope().recordInitializationStates(mergedInfo);
+ return mergedInfo;
+ }
+
+ /**
+ * While code generation
+ *
+ * @param currentScope org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ */
+ public void generateCode(BlockScope currentScope, CodeStream codeStream) {
+
+ if ((bits & IsReachableMASK) == 0) {
+ return;
+ }
+ int pc = codeStream.position;
+ breakLabel.initialize(codeStream);
+
+ // generate condition
+ if (continueLabel == null) {
+ // no need to reverse condition
+ if (condition.constant == NotAConstant) {
+ condition.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ null,
+ breakLabel,
+ true);
+ }
+ } else {
+ continueLabel.initialize(codeStream);
+ if (!(((condition.constant != NotAConstant)
+ && (condition.constant.booleanValue() == true))
+ || (action == null)
+ || action.isEmptyBlock())) {
+ int jumpPC = codeStream.position;
+ codeStream.goto_(continueLabel);
+ codeStream.recordPositionsFrom(jumpPC, condition.sourceStart);
+ }
+ }
+ // generate the action
+ Label actionLabel;
+ (actionLabel = new Label(codeStream)).place();
+ if (action != null) {
+ // Required to fix 1PR0XVS: LFRE:WINNT - Compiler: variable table for method appears incorrect
+ if (condIfTrueInitStateIndex != -1) {
+ // insert all locals initialized inside the condition into the action generated prior to the condition
+ codeStream.addDefinitelyAssignedVariables(
+ currentScope,
+ condIfTrueInitStateIndex);
+ }
+ action.generateCode(currentScope, codeStream);
+ // May loose some local variable initializations : affecting the local variable attributes
+ if (preCondInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(currentScope, preCondInitStateIndex);
+ }
+
+ }
+ // output condition and branch back to the beginning of the repeated action
+ if (continueLabel != null) {
+ continueLabel.place();
+ condition.generateOptimizedBoolean(
+ currentScope,
+ codeStream,
+ actionLabel,
+ null,
+ true);
+ }
+ breakLabel.place();
+
+ // May loose some local variable initializations : affecting the local variable attributes
+ if (mergedInitStateIndex != -1) {
+ codeStream.removeNotDefinitelyAssignedVariables(currentScope, mergedInitStateIndex);
+ codeStream.addDefinitelyAssignedVariables(currentScope, mergedInitStateIndex);
+ }
+ codeStream.recordPositionsFrom(pc, this.sourceStart);
+ }
+
+ public void resolve(BlockScope scope) {
+
+ TypeBinding type = condition.resolveTypeExpecting(scope, BooleanBinding);
+ condition.computeConversion(scope, type, type);
+ if (action != null)
+ action.resolve(scope);
+ }
+
+ public StringBuffer printStatement(int tab, StringBuffer output) {
+
+ printIndent(tab, output).append("while ("); //$NON-NLS-1$
+ condition.printExpression(0, output).append(')');
+ if (action == null)
+ output.append(';');
+ else
+ action.printStatement(tab + 1, output);
+ return output;
+ }
+
+ public void traverse(
+ ASTVisitor visitor,
+ BlockScope blockScope) {
+
+ if (visitor.visit(this, blockScope)) {
+ condition.traverse(visitor, blockScope);
+ if (action != null)
+ action.traverse(visitor, blockScope);
+ }
+ visitor.endVisit(this, blockScope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Wildcard.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Wildcard.js
new file mode 100644
index 0000000..28432b3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Wildcard.js
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.ast;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+/**
+ * Node to represent Wildcard
+ */
+public class Wildcard extends SingleTypeReference {
+
+ public static final int UNBOUND = 0;
+ public static final int EXTENDS = 1;
+ public static final int SUPER = 2;
+
+ public TypeReference bound;
+ public int kind;
+
+ public Wildcard(int kind) {
+ super(WILDCARD_NAME, 0);
+ this.kind = kind;
+ }
+
+ public char [][] getParameterizedTypeName() {
+ switch (this.kind) {
+ case Wildcard.UNBOUND :
+ return new char[][] { WILDCARD_NAME };
+ case Wildcard.EXTENDS :
+ return new char[][] { CharOperation.concat(WILDCARD_NAME, WILDCARD_EXTENDS, CharOperation.concatWith(this.bound.getParameterizedTypeName(), '.')) };
+ default: // SUPER
+ return new char[][] { CharOperation.concat(WILDCARD_NAME, WILDCARD_SUPER, CharOperation.concatWith(this.bound.getParameterizedTypeName(), '.')) };
+ }
+ }
+
+ public char [][] getTypeName() {
+ switch (this.kind) {
+ case Wildcard.UNBOUND :
+ return new char[][] { WILDCARD_NAME };
+ case Wildcard.EXTENDS :
+ return new char[][] { CharOperation.concat(WILDCARD_NAME, WILDCARD_EXTENDS, CharOperation.concatWith(this.bound.getTypeName(), '.')) };
+ default: // SUPER
+ return new char[][] { CharOperation.concat(WILDCARD_NAME, WILDCARD_SUPER, CharOperation.concatWith(this.bound.getTypeName(), '.')) };
+ }
+ }
+
+ private TypeBinding internalResolveType(Scope scope, ReferenceBinding genericType, int rank) {
+ TypeBinding boundType = null;
+ if (this.bound != null) {
+ boundType = scope.kind == Scope.CLASS_SCOPE
+ ? this.bound.resolveType((ClassScope)scope)
+ : this.bound.resolveType((BlockScope)scope);
+
+ if (boundType == null) {
+ return null;
+ }
+ }
+ WildcardBinding wildcard = scope.environment().createWildcard(genericType, rank, boundType, this.kind);
+ return this.resolvedType = wildcard;
+ }
+
+ public StringBuffer printExpression(int indent, StringBuffer output){
+ switch (this.kind) {
+ case Wildcard.UNBOUND :
+ output.append(WILDCARD_NAME);
+ case Wildcard.EXTENDS :
+ output.append(WILDCARD_NAME).append(WILDCARD_EXTENDS);
+ this.bound.printExpression(0, output);
+ break;
+ default: // SUPER
+ output.append(WILDCARD_NAME).append(WILDCARD_SUPER);
+ this.bound.printExpression(0, output);
+ break;
+ }
+ return output;
+ }
+
+ public TypeBinding resolveTypeArgument(BlockScope blockScope, ReferenceBinding genericType, int rank) {
+ return internalResolveType(blockScope, genericType, rank);
+ }
+
+ public TypeBinding resolveTypeArgument(ClassScope classScope, ReferenceBinding genericType, int rank) {
+ return internalResolveType(classScope, genericType, rank);
+ }
+
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
+ if (visitor.visit(this, scope)) {
+ if (this.bound != null) {
+ this.bound.traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, scope);
+ }
+
+ public void traverse(ASTVisitor visitor, ClassScope scope) {
+ if (visitor.visit(this, scope)) {
+ if (this.bound != null) {
+ this.bound.traverse(visitor, scope);
+ }
+ }
+ visitor.endVisit(this, scope);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/ClassFileConstants.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/ClassFileConstants.js
new file mode 100644
index 0000000..ed1ed29
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/ClassFileConstants.js
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.classfmt;
+
+import org.eclipse.wst.jsdt.internal.compiler.env.*;
+
+public interface ClassFileConstants extends IConstants {
+
+ int Utf8Tag = 1;
+ int IntegerTag = 3;
+ int FloatTag = 4;
+ int LongTag = 5;
+ int DoubleTag = 6;
+ int ClassTag = 7;
+ int StringTag = 8;
+ int FieldRefTag = 9;
+ int MethodRefTag = 10;
+ int InterfaceMethodRefTag = 11;
+ int NameAndTypeTag = 12;
+
+ int ConstantMethodRefFixedSize = 5;
+ int ConstantClassFixedSize = 3;
+ int ConstantDoubleFixedSize = 9;
+ int ConstantFieldRefFixedSize = 5;
+ int ConstantFloatFixedSize = 5;
+ int ConstantIntegerFixedSize = 5;
+ int ConstantInterfaceMethodRefFixedSize = 5;
+ int ConstantLongFixedSize = 9;
+ int ConstantStringFixedSize = 3;
+ int ConstantUtf8FixedSize = 3;
+ int ConstantNameAndTypeFixedSize = 5;
+
+ int MAJOR_VERSION_1_1 = 45;
+ int MAJOR_VERSION_1_2 = 46;
+ int MAJOR_VERSION_1_3 = 47;
+ int MAJOR_VERSION_1_4 = 48;
+ int MAJOR_VERSION_1_5 = 49;
+
+ int MINOR_VERSION_0 = 0;
+ int MINOR_VERSION_1 = 1;
+ int MINOR_VERSION_2 = 2;
+ int MINOR_VERSION_3 = 3;
+
+ // JDK 1.1 -> 1.5, comparable value allowing to check both major/minor version at once 1.4.1 > 1.4.0
+ // 16 unsigned bits for major, then 16 bits for minor
+ long JDK1_1 = ((long)ClassFileConstants.MAJOR_VERSION_1_1 << 16) + ClassFileConstants.MINOR_VERSION_3; // 1.1. is 45.3
+ long JDK1_2 = ((long)ClassFileConstants.MAJOR_VERSION_1_2 << 16) + ClassFileConstants.MINOR_VERSION_0;
+ long JDK1_3 = ((long)ClassFileConstants.MAJOR_VERSION_1_3 << 16) + ClassFileConstants.MINOR_VERSION_0;
+ long JDK1_4 = ((long)ClassFileConstants.MAJOR_VERSION_1_4 << 16) + ClassFileConstants.MINOR_VERSION_0;
+ long JDK1_5 = ((long)ClassFileConstants.MAJOR_VERSION_1_5 << 16) + ClassFileConstants.MINOR_VERSION_0;
+
+ // jdk level used to denote future releases: optional behavior is not enabled for now, but may become so. In order to enable these,
+ // search for references to this constant, and change it to one of the official JDT constants above.
+ long JDK_DEFERRED = Long.MAX_VALUE;
+
+ int INT_ARRAY = 10;
+ int BYTE_ARRAY = 8;
+ int BOOLEAN_ARRAY = 4;
+ int SHORT_ARRAY = 9;
+ int CHAR_ARRAY = 5;
+ int LONG_ARRAY = 11;
+ int FLOAT_ARRAY = 6;
+ int DOUBLE_ARRAY = 7;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/ClassFileReader.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/ClassFileReader.js
new file mode 100644
index 0000000..9ed62a2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/ClassFileReader.js
@@ -0,0 +1,827 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.classfmt;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Arrays;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.AttributeNamesConstants;
+import org.eclipse.wst.jsdt.internal.compiler.env.*;
+import org.eclipse.wst.jsdt.internal.compiler.impl.Constant;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeIds;
+import org.eclipse.wst.jsdt.internal.compiler.util.Util;
+
+public class ClassFileReader extends ClassFileStruct implements AttributeNamesConstants, IBinaryType {
+public static ClassFileReader read(File file) throws ClassFormatException, IOException {
+ return read(file, false);
+}
+public static ClassFileReader read(File file, boolean fullyInitialize) throws ClassFormatException, IOException {
+ byte classFileBytes[] = Util.getFileByteContent(file);
+ ClassFileReader classFileReader = new ClassFileReader(classFileBytes, file.getAbsolutePath().toCharArray());
+ if (fullyInitialize) {
+ classFileReader.initialize();
+ }
+ return classFileReader;
+}
+public static ClassFileReader read(
+ java.util.zip.ZipFile zip,
+ String filename)
+ throws ClassFormatException, java.io.IOException {
+ return read(zip, filename, false);
+}
+public static ClassFileReader read(
+ java.util.zip.ZipFile zip,
+ String filename,
+ boolean fullyInitialize)
+ throws ClassFormatException, java.io.IOException {
+ java.util.zip.ZipEntry ze = zip.getEntry(filename);
+ if (ze == null)
+ return null;
+ byte classFileBytes[] = Util.getZipEntryByteContent(ze, zip);
+ ClassFileReader classFileReader = new ClassFileReader(classFileBytes, filename.toCharArray());
+ if (fullyInitialize) {
+ classFileReader.initialize();
+ }
+ return classFileReader;
+}
+public static ClassFileReader read(String fileName) throws ClassFormatException, java.io.IOException {
+ return read(fileName, false);
+}
+public static ClassFileReader read(String fileName, boolean fullyInitialize) throws ClassFormatException, java.io.IOException {
+ return read(new File(fileName), fullyInitialize);
+}
+ private int accessFlags;
+ private char[] classFileName;
+ private char[] className;
+ private int classNameIndex;
+ private int constantPoolCount;
+ private int[] constantPoolOffsets;
+ private FieldInfo[] fields;
+ private int fieldsCount;
+ // initialized in case the .class file is a nested type
+ private InnerClassInfo innerInfo;
+ private int innerInfoIndex;
+ private InnerClassInfo[] innerInfos;
+ private char[][] interfaceNames;
+ private int interfacesCount;
+ private MethodInfo[] methods;
+ private int methodsCount;
+ private char[] signature;
+ private char[] sourceFileName;
+ private char[] superclassName;
+ private long version;
+
+/**
+ * @param classFileBytes Actual bytes of a .class file
+ * @param fileName Actual name of the file that contains the bytes, can be null
+ *
+ * @exception ClassFormatException
+ */
+public ClassFileReader(byte classFileBytes[], char[] fileName) throws ClassFormatException {
+ this(classFileBytes, fileName, false);
+}
+
+/**
+ * @param classFileBytes byte[]
+ * Actual bytes of a .class file
+ *
+ * @param fileName char[]
+ * Actual name of the file that contains the bytes, can be null
+ *
+ * @param fullyInitialize boolean
+ * Flag to fully initialize the new object
+ * @exception ClassFormatException
+ */
+public ClassFileReader(byte[] classFileBytes, char[] fileName, boolean fullyInitialize) throws ClassFormatException {
+ // This method looks ugly but is actually quite simple, the constantPool is constructed
+ // in 3 passes. All non-primitive constant pool members that usually refer to other members
+ // by index are tweaked to have their value in inst vars, this minor cost at read-time makes
+ // all subsequent uses of the constant pool element faster.
+ super(classFileBytes, 0);
+ this.classFileName = fileName;
+ int readOffset = 10;
+ try {
+ this.version = ((long)this.u2At(6) << 16) + this.u2At(4); // major<<16 + minor
+ constantPoolCount = this.u2At(8);
+ // Pass #1 - Fill in all primitive constants
+ this.constantPoolOffsets = new int[constantPoolCount];
+ for (int i = 1; i < constantPoolCount; i++) {
+ int tag = this.u1At(readOffset);
+ switch (tag) {
+ case Utf8Tag :
+ this.constantPoolOffsets[i] = readOffset;
+ readOffset += u2At(readOffset + 1);
+ readOffset += ConstantUtf8FixedSize;
+ break;
+ case IntegerTag :
+ this.constantPoolOffsets[i] = readOffset;
+ readOffset += ConstantIntegerFixedSize;
+ break;
+ case FloatTag :
+ this.constantPoolOffsets[i] = readOffset;
+ readOffset += ConstantFloatFixedSize;
+ break;
+ case LongTag :
+ this.constantPoolOffsets[i] = readOffset;
+ readOffset += ConstantLongFixedSize;
+ i++;
+ break;
+ case DoubleTag :
+ this.constantPoolOffsets[i] = readOffset;
+ readOffset += ConstantDoubleFixedSize;
+ i++;
+ break;
+ case ClassTag :
+ this.constantPoolOffsets[i] = readOffset;
+ readOffset += ConstantClassFixedSize;
+ break;
+ case StringTag :
+ this.constantPoolOffsets[i] = readOffset;
+ readOffset += ConstantStringFixedSize;
+ break;
+ case FieldRefTag :
+ this.constantPoolOffsets[i] = readOffset;
+ readOffset += ConstantFieldRefFixedSize;
+ break;
+ case MethodRefTag :
+ this.constantPoolOffsets[i] = readOffset;
+ readOffset += ConstantMethodRefFixedSize;
+ break;
+ case InterfaceMethodRefTag :
+ this.constantPoolOffsets[i] = readOffset;
+ readOffset += ConstantInterfaceMethodRefFixedSize;
+ break;
+ case NameAndTypeTag :
+ this.constantPoolOffsets[i] = readOffset;
+ readOffset += ConstantNameAndTypeFixedSize;
+ }
+ }
+ // Read and validate access flags
+ this.accessFlags = u2At(readOffset);
+ readOffset += 2;
+
+ // Read the classname, use exception handlers to catch bad format
+ this.classNameIndex = u2At(readOffset);
+ this.className = getConstantClassNameAt(this.classNameIndex);
+ readOffset += 2;
+
+ // Read the superclass name, can be null for java.lang.Object
+ int superclassNameIndex = u2At(readOffset);
+ readOffset += 2;
+ // if superclassNameIndex is equals to 0 there is no need to set a value for the
+ // field this.superclassName. null is fine.
+ if (superclassNameIndex != 0) {
+ this.superclassName = getConstantClassNameAt(superclassNameIndex);
+ }
+
+ // Read the interfaces, use exception handlers to catch bad format
+ this.interfacesCount = u2At(readOffset);
+ readOffset += 2;
+ if (this.interfacesCount != 0) {
+ this.interfaceNames = new char[this.interfacesCount][];
+ for (int i = 0; i < this.interfacesCount; i++) {
+ this.interfaceNames[i] = getConstantClassNameAt(u2At(readOffset));
+ readOffset += 2;
+ }
+ }
+ // Read the this.fields, use exception handlers to catch bad format
+ this.fieldsCount = u2At(readOffset);
+ readOffset += 2;
+ if (this.fieldsCount != 0) {
+ FieldInfo field;
+ this.fields = new FieldInfo[this.fieldsCount];
+ for (int i = 0; i < this.fieldsCount; i++) {
+ field = new FieldInfo(reference, this.constantPoolOffsets, readOffset);
+ this.fields[i] = field;
+ readOffset += field.sizeInBytes();
+ }
+ }
+ // Read the this.methods
+ this.methodsCount = u2At(readOffset);
+ readOffset += 2;
+ if (this.methodsCount != 0) {
+ this.methods = new MethodInfo[this.methodsCount];
+ MethodInfo method;
+ for (int i = 0; i < this.methodsCount; i++) {
+ method = new MethodInfo(reference, this.constantPoolOffsets, readOffset);
+ this.methods[i] = method;
+ readOffset += method.sizeInBytes();
+ }
+ }
+
+ // Read the attributes
+ int attributesCount = u2At(readOffset);
+ readOffset += 2;
+
+ for (int i = 0; i < attributesCount; i++) {
+ int utf8Offset = this.constantPoolOffsets[u2At(readOffset)];
+ char[] attributeName = utf8At(utf8Offset + 3, u2At(utf8Offset + 1));
+ if (CharOperation.equals(attributeName, DeprecatedName)) {
+ this.accessFlags |= AccDeprecated;
+ } else if (CharOperation.equals(attributeName, InnerClassName)) {
+ int innerOffset = readOffset + 6;
+ int number_of_classes = u2At(innerOffset);
+ if (number_of_classes != 0) {
+ innerOffset+= 2;
+ this.innerInfos = new InnerClassInfo[number_of_classes];
+ for (int j = 0; j < number_of_classes; j++) {
+ this.innerInfos[j] =
+ new InnerClassInfo(reference, this.constantPoolOffsets, innerOffset);
+ if (this.classNameIndex == this.innerInfos[j].innerClassNameIndex) {
+ this.innerInfo = this.innerInfos[j];
+ this.innerInfoIndex = j;
+ }
+ innerOffset += 8;
+ }
+ }
+ } else if (CharOperation.equals(attributeName, SourceName)) {
+ utf8Offset = this.constantPoolOffsets[u2At(readOffset + 6)];
+ this.sourceFileName = utf8At(utf8Offset + 3, u2At(utf8Offset + 1));
+ } else if (CharOperation.equals(attributeName, SyntheticName)) {
+ this.accessFlags |= AccSynthetic;
+ } else if (CharOperation.equals(attributeName, SignatureName)) {
+ utf8Offset = this.constantPoolOffsets[u2At(readOffset + 6)];
+ this.signature = utf8At(utf8Offset + 3, u2At(utf8Offset + 1));
+ }
+ readOffset += (6 + u4At(readOffset + 2));
+ }
+ if (fullyInitialize) {
+ this.initialize();
+ }
+ } catch(ClassFormatException e) {
+ throw e;
+ } catch (Exception e) {
+ throw new ClassFormatException(
+ ClassFormatException.ErrTruncatedInput,
+ readOffset);
+ }
+}
+
+/**
+ * Answer the receiver's access flags. The value of the access_flags
+ * item is a mask of modifiers used with class and interface declarations.
+ * @return int
+ */
+public int accessFlags() {
+ return this.accessFlags;
+}
+/**
+ * Answer the char array that corresponds to the class name of the constant class.
+ * constantPoolIndex is the index in the constant pool that is a constant class entry.
+ *
+ * @param constantPoolIndex int
+ * @return char[]
+ */
+private char[] getConstantClassNameAt(int constantPoolIndex) {
+ int utf8Offset = this.constantPoolOffsets[u2At(this.constantPoolOffsets[constantPoolIndex] + 1)];
+ return utf8At(utf8Offset + 3, u2At(utf8Offset + 1));
+}
+/**
+ * Answer the int array that corresponds to all the offsets of each entry in the constant pool
+ *
+ * @return int[]
+ */
+public int[] getConstantPoolOffsets() {
+ return this.constantPoolOffsets;
+}
+/*
+ * Answer the resolved compoundName of the enclosing type
+ * or null if the receiver is a top level type.
+ */
+public char[] getEnclosingTypeName() {
+ if (this.innerInfo != null && !this.isAnonymous()) {
+ return this.innerInfo.getEnclosingTypeName();
+ }
+ return null;
+}
+/**
+ * Answer the receiver's this.fields or null if the array is empty.
+ * @return org.eclipse.wst.jsdt.internal.compiler.api.IBinaryField[]
+ */
+public IBinaryField[] getFields() {
+ return this.fields;
+}
+/**
+ * @see org.eclipse.wst.jsdt.internal.compiler.env.IDependent#getFileName()
+ */
+public char[] getFileName() {
+ return this.classFileName;
+}
+public char[] getGenericSignature() {
+ return this.signature;
+}
+/**
+ * Answer the source name if the receiver is a inner type. Return null if it is an anonymous class or if the receiver is a top-level class.
+ * e.g.
+ * public class A {
+ * public class B {
+ * }
+ * public void foo() {
+ * class C {}
+ * }
+ * public Runnable bar() {
+ * return new Runnable() {
+ * public void run() {}
+ * };
+ * }
+ * }
+ * It returns {'B'} for the member A$B
+ * It returns null for A
+ * It returns {'C'} for the local class A$1$C
+ * It returns null for the anonymous A$1
+ * @return char[]
+ */
+public char[] getInnerSourceName() {
+ if (this.innerInfo != null)
+ return this.innerInfo.getSourceName();
+ return null;
+}
+/**
+ * Answer the resolved names of the receiver's interfaces in the
+ * class file format as specified in section 4.2 of the Java 2 VM spec
+ * or null if the array is empty.
+ *
+ * For example, java.lang.String is java/lang/String.
+ * @return char[][]
+ */
+public char[][] getInterfaceNames() {
+ return this.interfaceNames;
+}
+/**
+ * Answer the receiver's nested types or null if the array is empty.
+ *
+ * This nested type info is extracted from the inner class attributes.
+ * Ask the name environment to find a member type using its compound name
+ * @return org.eclipse.wst.jsdt.internal.compiler.api.IBinaryNestedType[]
+ */
+public IBinaryNestedType[] getMemberTypes() {
+ // we might have some member types of the current type
+ if (this.innerInfos == null) return null;
+
+ int length = this.innerInfos.length;
+ int startingIndex = this.innerInfo != null ? this.innerInfoIndex + 1 : 0;
+ if (length != startingIndex) {
+ IBinaryNestedType[] memberTypes =
+ new IBinaryNestedType[length - this.innerInfoIndex];
+ int memberTypeIndex = 0;
+ for (int i = startingIndex; i < length; i++) {
+ InnerClassInfo currentInnerInfo = this.innerInfos[i];
+ int outerClassNameIdx = currentInnerInfo.outerClassNameIndex;
+ int innerNameIndex = currentInnerInfo.innerNameIndex;
+ /*
+ * Checking that outerClassNameIDx is different from 0 should be enough to determine if an inner class
+ * attribute entry is a member class, but due to the bug:
+ * http://dev.eclipse.org/bugs/show_bug.cgi?id=14592
+ * we needed to add an extra check. So we check that innerNameIndex is different from 0 as well.
+ *
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=49879
+ * From JavaMail 1.2, the class javax.mail.Folder contains an anonymous class in the
+ * terminateQueue() method for which the inner attribute is boggus.
+ * outerClassNameIdx is not 0, innerNameIndex is not 0, but the sourceName length is 0.
+ * So I added this extra check to filter out this anonymous class from the
+ * member types.
+ */
+ if (outerClassNameIdx != 0
+ && innerNameIndex != 0
+ && outerClassNameIdx == this.classNameIndex
+ && currentInnerInfo.getSourceName().length != 0) {
+ memberTypes[memberTypeIndex++] = currentInnerInfo;
+ }
+ }
+ if (memberTypeIndex == 0) return null;
+ if (memberTypeIndex != memberTypes.length) {
+ // we need to resize the memberTypes array. Some local or anonymous classes
+ // are present in the current class.
+ System.arraycopy(
+ memberTypes,
+ 0,
+ (memberTypes = new IBinaryNestedType[memberTypeIndex]),
+ 0,
+ memberTypeIndex);
+ }
+ return memberTypes;
+ }
+ return null;
+}
+/**
+ * Answer the receiver's this.methods or null if the array is empty.
+ * @return org.eclipse.wst.jsdt.internal.compiler.api.env.IBinaryMethod[]
+ */
+public IBinaryMethod[] getMethods() {
+ return this.methods;
+}
+/**
+ * Answer an int whose bits are set according the access constants
+ * defined by the VM spec.
+ * Set the AccDeprecated and AccSynthetic bits if necessary
+ * @return int
+ */
+public int getModifiers() {
+ if (this.innerInfo != null) {
+ if ((this.accessFlags & AccDeprecated) != 0) {
+ return this.innerInfo.getModifiers() | AccDeprecated;
+ } else {
+ return this.innerInfo.getModifiers();
+ }
+ }
+ return this.accessFlags;
+}
+/**
+ * Answer the resolved name of the type in the
+ * class file format as specified in section 4.2 of the Java 2 VM spec.
+ *
+ * For example, java.lang.String is java/lang/String.
+ * @return char[]
+ */
+public char[] getName() {
+ return this.className;
+}
+/**
+ * Answer the resolved name of the receiver's superclass in the
+ * class file format as specified in section 4.2 of the Java 2 VM spec
+ * or null if it does not have one.
+ *
+ * For example, java.lang.String is java/lang/String.
+ * @return char[]
+ */
+public char[] getSuperclassName() {
+ return this.superclassName;
+}
+/**
+ * Answer the major/minor version defined in this class file according to the VM spec.
+ * as a long: (major<<16)+minor
+ * @return the major/minor version found
+ */
+public long getVersion() {
+ return this.version;
+}
+private boolean hasNonSyntheticFieldChanges(FieldInfo[] currentFieldInfos, FieldInfo[] otherFieldInfos) {
+ int length1 = currentFieldInfos == null ? 0 : currentFieldInfos.length;
+ int length2 = otherFieldInfos == null ? 0 : otherFieldInfos.length;
+ int index1 = 0;
+ int index2 = 0;
+
+ end : while (index1 < length1 && index2 < length2) {
+ while (currentFieldInfos[index1].isSynthetic()) {
+ if (++index1 >= length1) break end;
+ }
+ while (otherFieldInfos[index2].isSynthetic()) {
+ if (++index2 >= length2) break end;
+ }
+ if (hasStructuralFieldChanges(currentFieldInfos[index1++], otherFieldInfos[index2++]))
+ return true;
+ }
+
+ while (index1 < length1) {
+ if (!currentFieldInfos[index1++].isSynthetic()) return true;
+ }
+ while (index2 < length2) {
+ if (!otherFieldInfos[index2++].isSynthetic()) return true;
+ }
+ return false;
+}
+private boolean hasNonSyntheticMethodChanges(MethodInfo[] currentMethodInfos, MethodInfo[] otherMethodInfos) {
+ int length1 = currentMethodInfos == null ? 0 : currentMethodInfos.length;
+ int length2 = otherMethodInfos == null ? 0 : otherMethodInfos.length;
+ int index1 = 0;
+ int index2 = 0;
+
+ MethodInfo m;
+ end : while (index1 < length1 && index2 < length2) {
+ while ((m = currentMethodInfos[index1]).isSynthetic() || m.isClinit()) {
+ if (++index1 >= length1) break end;
+ }
+ while ((m = otherMethodInfos[index2]).isSynthetic() || m.isClinit()) {
+ if (++index2 >= length2) break end;
+ }
+ if (hasStructuralMethodChanges(currentMethodInfos[index1++], otherMethodInfos[index2++]))
+ return true;
+ }
+
+ while (index1 < length1) {
+ if (!((m = currentMethodInfos[index1++]).isSynthetic() || m.isClinit())) return true;
+ }
+ while (index2 < length2) {
+ if (!((m = otherMethodInfos[index2++]).isSynthetic() || m.isClinit())) return true;
+ }
+ return false;
+}
+/**
+ * Check if the receiver has structural changes compare to the byte array in argument.
+ * Structural changes are:
+ * - modifiers changes for the class, the this.fields or the this.methods
+ * - signature changes for this.fields or this.methods.
+ * - changes in the number of this.fields or this.methods
+ * - changes for field constants
+ * - changes for thrown exceptions
+ * - change for the super class or any super interfaces.
+ * - changes for member types name or modifiers
+ * If any of these changes occurs, the method returns true. false otherwise.
+ * The synthetic fields are included and the members are not required to be sorted.
+ * @param newBytes the bytes of the .class file we want to compare the receiver to
+ * @return boolean Returns true is there is a structural change between the two .class files, false otherwise
+ */
+public boolean hasStructuralChanges(byte[] newBytes) {
+ return hasStructuralChanges(newBytes, true, true);
+}
+/**
+ * Check if the receiver has structural changes compare to the byte array in argument.
+ * Structural changes are:
+ * - modifiers changes for the class, the this.fields or the this.methods
+ * - signature changes for this.fields or this.methods.
+ * - changes in the number of this.fields or this.methods
+ * - changes for field constants
+ * - changes for thrown exceptions
+ * - change for the super class or any super interfaces.
+ * - changes for member types name or modifiers
+ * If any of these changes occurs, the method returns true. false otherwise.
+ * @param newBytes the bytes of the .class file we want to compare the receiver to
+ * @param orderRequired a boolean indicating whether the members should be sorted or not
+ * @param excludesSynthetic a boolean indicating whether the synthetic members should be used in the comparison
+ * @return boolean Returns true is there is a structural change between the two .class files, false otherwise
+ */
+public boolean hasStructuralChanges(byte[] newBytes, boolean orderRequired, boolean excludesSynthetic) {
+ try {
+ ClassFileReader newClassFile =
+ new ClassFileReader(newBytes, this.classFileName);
+ // type level comparison
+ // modifiers
+ if (this.getModifiers() != newClassFile.getModifiers())
+ return true;
+ // superclass
+ if (!CharOperation.equals(this.getSuperclassName(), newClassFile.getSuperclassName()))
+ return true;
+ // interfaces
+ char[][] newInterfacesNames = newClassFile.getInterfaceNames();
+ if (this.interfaceNames != newInterfacesNames) { // TypeConstants.NoSuperInterfaces
+ int newInterfacesLength = newInterfacesNames == null ? 0 : newInterfacesNames.length;
+ if (newInterfacesLength != this.interfacesCount)
+ return true;
+ for (int i = 0, max = this.interfacesCount; i < max; i++)
+ if (!CharOperation.equals(this.interfaceNames[i], newInterfacesNames[i]))
+ return true;
+ }
+
+ // member types
+ IBinaryNestedType[] currentMemberTypes = this.getMemberTypes();
+ IBinaryNestedType[] otherMemberTypes = newClassFile.getMemberTypes();
+ if (currentMemberTypes != otherMemberTypes) { // TypeConstants.NoMemberTypes
+ int currentMemberTypeLength = currentMemberTypes == null ? 0 : currentMemberTypes.length;
+ int otherMemberTypeLength = otherMemberTypes == null ? 0 : otherMemberTypes.length;
+ if (currentMemberTypeLength != otherMemberTypeLength)
+ return true;
+ for (int i = 0; i < currentMemberTypeLength; i++)
+ if (!CharOperation.equals(currentMemberTypes[i].getName(), otherMemberTypes[i].getName())
+ || currentMemberTypes[i].getModifiers() != otherMemberTypes[i].getModifiers())
+ return true;
+ }
+
+ // fields
+ FieldInfo[] otherFieldInfos = (FieldInfo[]) newClassFile.getFields();
+ int otherFieldInfosLength = otherFieldInfos == null ? 0 : otherFieldInfos.length;
+ boolean compareFields = true;
+ if (this.fieldsCount == otherFieldInfosLength) {
+ int i = 0;
+ for (; i < this.fieldsCount; i++)
+ if (hasStructuralFieldChanges(this.fields[i], otherFieldInfos[i])) break;
+ if ((compareFields = i != this.fieldsCount) && !orderRequired && !excludesSynthetic)
+ return true;
+ }
+ if (compareFields) {
+ if (this.fieldsCount != otherFieldInfosLength && !excludesSynthetic)
+ return true;
+ if (orderRequired) {
+ if (this.fieldsCount != 0)
+ Arrays.sort(this.fields);
+ if (otherFieldInfosLength != 0)
+ Arrays.sort(otherFieldInfos);
+ }
+ if (excludesSynthetic) {
+ if (hasNonSyntheticFieldChanges(this.fields, otherFieldInfos))
+ return true;
+ } else {
+ for (int i = 0; i < this.fieldsCount; i++)
+ if (hasStructuralFieldChanges(this.fields[i], otherFieldInfos[i]))
+ return true;
+ }
+ }
+
+ // methods
+ MethodInfo[] otherMethodInfos = (MethodInfo[]) newClassFile.getMethods();
+ int otherMethodInfosLength = otherMethodInfos == null ? 0 : otherMethodInfos.length;
+ boolean compareMethods = true;
+ if (this.methodsCount == otherMethodInfosLength) {
+ int i = 0;
+ for (; i < this.methodsCount; i++)
+ if (hasStructuralMethodChanges(this.methods[i], otherMethodInfos[i])) break;
+ if ((compareMethods = i != this.methodsCount) && !orderRequired && !excludesSynthetic)
+ return true;
+ }
+ if (compareMethods) {
+ if (this.methodsCount != otherMethodInfosLength && !excludesSynthetic)
+ return true;
+ if (orderRequired) {
+ if (this.methodsCount != 0)
+ Arrays.sort(this.methods);
+ if (otherMethodInfosLength != 0)
+ Arrays.sort(otherMethodInfos);
+ }
+ if (excludesSynthetic) {
+ if (hasNonSyntheticMethodChanges(this.methods, otherMethodInfos))
+ return true;
+ } else {
+ for (int i = 0; i < this.methodsCount; i++)
+ if (hasStructuralMethodChanges(this.methods[i], otherMethodInfos[i]))
+ return true;
+ }
+ }
+
+ return false;
+ } catch (ClassFormatException e) {
+ return true;
+ }
+}
+private boolean hasStructuralFieldChanges(FieldInfo currentFieldInfo, FieldInfo otherFieldInfo) {
+ if (currentFieldInfo.getModifiers() != otherFieldInfo.getModifiers())
+ return true;
+ if (!CharOperation.equals(currentFieldInfo.getName(), otherFieldInfo.getName()))
+ return true;
+ if (!CharOperation.equals(currentFieldInfo.getTypeName(), otherFieldInfo.getTypeName()))
+ return true;
+ if (currentFieldInfo.hasConstant() != otherFieldInfo.hasConstant())
+ return true;
+ if (currentFieldInfo.hasConstant()) {
+ Constant currentConstant = currentFieldInfo.getConstant();
+ Constant otherConstant = otherFieldInfo.getConstant();
+ if (currentConstant.typeID() != otherConstant.typeID())
+ return true;
+ if (!currentConstant.getClass().equals(otherConstant.getClass()))
+ return true;
+ switch (currentConstant.typeID()) {
+ case TypeIds.T_int :
+ return currentConstant.intValue() != otherConstant.intValue();
+ case TypeIds.T_byte :
+ return currentConstant.byteValue() != otherConstant.byteValue();
+ case TypeIds.T_short :
+ return currentConstant.shortValue() != otherConstant.shortValue();
+ case TypeIds.T_char :
+ return currentConstant.charValue() != otherConstant.charValue();
+ case TypeIds.T_long :
+ return currentConstant.longValue() != otherConstant.longValue();
+ case TypeIds.T_float :
+ return currentConstant.floatValue() != otherConstant.floatValue();
+ case TypeIds.T_double :
+ return currentConstant.doubleValue() != otherConstant.doubleValue();
+ case TypeIds.T_boolean :
+ return currentConstant.booleanValue() != otherConstant.booleanValue();
+ case TypeIds.T_String :
+ return !currentConstant.stringValue().equals(otherConstant.stringValue());
+ }
+ }
+ return false;
+}
+private boolean hasStructuralMethodChanges(MethodInfo currentMethodInfo, MethodInfo otherMethodInfo) {
+ if (currentMethodInfo.getModifiers() != otherMethodInfo.getModifiers())
+ return true;
+ if (!CharOperation.equals(currentMethodInfo.getSelector(), otherMethodInfo.getSelector()))
+ return true;
+ if (!CharOperation.equals(currentMethodInfo.getMethodDescriptor(), otherMethodInfo.getMethodDescriptor()))
+ return true;
+ if (!CharOperation.equals(currentMethodInfo.getGenericSignature(), otherMethodInfo.getGenericSignature()))
+ return true;
+
+ char[][] currentThrownExceptions = currentMethodInfo.getExceptionTypeNames();
+ char[][] otherThrownExceptions = otherMethodInfo.getExceptionTypeNames();
+ if (currentThrownExceptions != otherThrownExceptions) { // TypeConstants.NoExceptions
+ int currentThrownExceptionsLength = currentThrownExceptions == null ? 0 : currentThrownExceptions.length;
+ int otherThrownExceptionsLength = otherThrownExceptions == null ? 0 : otherThrownExceptions.length;
+ if (currentThrownExceptionsLength != otherThrownExceptionsLength)
+ return true;
+ for (int k = 0; k < currentThrownExceptionsLength; k++)
+ if (!CharOperation.equals(currentThrownExceptions[k], otherThrownExceptions[k]))
+ return true;
+ }
+ return false;
+}
+/**
+ * This method is used to fully initialize the contents of the receiver. All methodinfos, fields infos
+ * will be therefore fully initialized and we can get rid of the bytes.
+ */
+private void initialize() throws ClassFormatException {
+ try {
+ for (int i = 0, max = fieldsCount; i < max; i++) {
+ fields[i].initialize();
+ }
+ for (int i = 0, max = methodsCount; i < max; i++) {
+ methods[i].initialize();
+ }
+ if (innerInfos != null) {
+ for (int i = 0, max = innerInfos.length; i < max; i++) {
+ innerInfos[i].initialize();
+ }
+ }
+ this.reset();
+ } catch(RuntimeException e) {
+ ClassFormatException exception = new ClassFormatException(e, this.classFileName);
+ throw exception;
+ }
+}
+/**
+ * Answer true if the receiver is an anonymous type, false otherwise
+ *
+ * @return <CODE>boolean</CODE>
+ */
+public boolean isAnonymous() {
+ if (this.innerInfo == null) return false;
+ char[] sourceName = this.innerInfo.getSourceName();
+ return (sourceName == null || sourceName.length == 0);
+}
+/**
+ * Answer whether the receiver contains the resolved binary form
+ * or the unresolved source form of the type.
+ * @return boolean
+ */
+public boolean isBinaryType() {
+ return true;
+}
+/**
+ * Answer true if the receiver is a class. False otherwise.
+ * @return boolean
+ */
+public boolean isClass() {
+ return (getModifiers() & AccInterface) == 0;
+}
+/**
+ * Answer true if the receiver is an interface. False otherwise.
+ * @return boolean
+ */
+public boolean isInterface() {
+ return (getModifiers() & AccInterface) != 0;
+}
+/**
+ * Answer true if the receiver is a local type, false otherwise
+ *
+ * @return <CODE>boolean</CODE>
+ */
+public boolean isLocal() {
+ if (this.innerInfo == null) return false;
+ if (this.innerInfo.getEnclosingTypeName() != null) return false;
+ char[] sourceName = this.innerInfo.getSourceName();
+ return (sourceName != null && sourceName.length > 0);
+}
+/**
+ * Answer true if the receiver is a member type, false otherwise
+ *
+ * @return <CODE>boolean</CODE>
+ */
+public boolean isMember() {
+ if (this.innerInfo == null) return false;
+ if (this.innerInfo.getEnclosingTypeName() == null) return false;
+ char[] sourceName = this.innerInfo.getSourceName();
+ return (sourceName != null && sourceName.length > 0); // protection against ill-formed attributes (67600)
+}
+/**
+ * Answer true if the receiver is a nested type, false otherwise
+ *
+ * @return <CODE>boolean</CODE>
+ */
+public boolean isNestedType() {
+ return this.innerInfo != null;
+}
+protected void reset() {
+ this.constantPoolOffsets = null;
+ super.reset();
+}
+
+/**
+ * Answer the source file name attribute. Return null if there is no source file attribute for the receiver.
+ *
+ * @return char[]
+ */
+public char[] sourceFileName() {
+ return this.sourceFileName;
+}
+public String toString() {
+ java.io.ByteArrayOutputStream out = new java.io.ByteArrayOutputStream();
+ java.io.PrintWriter print = new java.io.PrintWriter(out);
+
+ print.println(this.getClass().getName() + "{"); //$NON-NLS-1$
+ print.println(" this.className: " + new String(getName())); //$NON-NLS-1$
+ print.println(" this.superclassName: " + (getSuperclassName() == null ? "null" : new String(getSuperclassName()))); //$NON-NLS-2$ //$NON-NLS-1$
+ print.println(" access_flags: " + ClassFileStruct.printTypeModifiers(this.accessFlags()) + "(" + this.accessFlags() + ")"); //$NON-NLS-1$ //$NON-NLS-3$ //$NON-NLS-2$
+
+ print.flush();
+ return out.toString();
+}
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/ClassFileStruct.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/ClassFileStruct.js
new file mode 100644
index 0000000..8fc3cfd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/ClassFileStruct.js
@@ -0,0 +1,188 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.classfmt;
+
+abstract public class ClassFileStruct implements ClassFileConstants {
+ byte[] reference;
+ int structOffset;
+public ClassFileStruct(byte classFileBytes[], int off) {
+ reference = classFileBytes;
+ structOffset = off;
+}
+public ClassFileStruct (byte classFileBytes[], int off, boolean verifyStructure) {
+ reference = classFileBytes;
+ structOffset = off;
+}
+public double doubleAt(int relativeOffset) {
+ return (Double.longBitsToDouble(this.i8At(relativeOffset)));
+}
+public float floatAt(int relativeOffset) {
+ return (Float.intBitsToFloat(this.i4At(relativeOffset)));
+}
+public int i1At(int relativeOffset) {
+ return reference[relativeOffset + structOffset];
+}
+public int i2At(int relativeOffset) {
+ int position = relativeOffset + structOffset;
+ return (reference[position++] << 8) + (reference[position] & 0xFF);
+}
+public int i4At(int relativeOffset) {
+ int position = relativeOffset + structOffset;
+ return ((reference[position++] & 0xFF) << 24) + ((reference[position++] & 0xFF) << 16) + ((reference[position++] & 0xFF) << 8) + (reference[position] & 0xFF);
+}
+public long i8At(int relativeOffset) {
+ int position = relativeOffset + structOffset;
+ return (((long) (reference[position++] & 0xFF)) << 56)
+ + (((long) (reference[position++] & 0xFF)) << 48)
+ + (((long) (reference[position++] & 0xFF)) << 40)
+ + (((long) (reference[position++] & 0xFF)) << 32)
+ + (((long) (reference[position++] & 0xFF)) << 24)
+ + (((long) (reference[position++] & 0xFF)) << 16)
+ + (((long) (reference[position++] & 0xFF)) << 8)
+ + (reference[position++] & 0xFF);
+}
+public static String printTypeModifiers(int modifiers) {
+
+ java.io.ByteArrayOutputStream out = new java.io.ByteArrayOutputStream();
+ java.io.PrintWriter print = new java.io.PrintWriter(out);
+
+ if ((modifiers & AccPublic) != 0) print.print("public "); //$NON-NLS-1$
+ if ((modifiers & AccPrivate) != 0) print.print("private "); //$NON-NLS-1$
+ if ((modifiers & AccFinal) != 0) print.print("final "); //$NON-NLS-1$
+ if ((modifiers & AccSuper) != 0) print.print("super "); //$NON-NLS-1$
+ if ((modifiers & AccInterface) != 0) print.print("interface "); //$NON-NLS-1$
+ if ((modifiers & AccAbstract) != 0) print.print("abstract "); //$NON-NLS-1$
+ print.flush();
+ return out.toString();
+}
+public int u1At(int relativeOffset) {
+ return (reference[relativeOffset + structOffset] & 0xFF);
+}
+public int u2At(int relativeOffset) {
+ int position = relativeOffset + structOffset;
+ return ((reference[position++] & 0xFF) << 8) + (reference[position] & 0xFF);
+}
+public long u4At(int relativeOffset) {
+ int position = relativeOffset + structOffset;
+ return (((reference[position++] & 0xFFL) << 24) + ((reference[position++] & 0xFF) << 16) + ((reference[position++] & 0xFF) << 8) + (reference[position] & 0xFF));
+}
+public char[] utf8At(int relativeOffset, int bytesAvailable) {
+ int length = bytesAvailable;
+ char outputBuf[] = new char[bytesAvailable];
+ int outputPos = 0;
+ int readOffset = this.structOffset + relativeOffset;
+
+ while (length != 0) {
+ int x = this.reference[readOffset++] & 0xFF;
+ length--;
+ if ((0x80 & x) != 0) {
+ if ((x & 0x20) != 0) {
+ length-=2;
+ x = ((x & 0xF) << 12) | ((this.reference[readOffset++] & 0x3F) << 6) | (this.reference[readOffset++] & 0x3F);
+ } else {
+ length--;
+ x = ((x & 0x1F) << 6) | (this.reference[readOffset++] & 0x3F);
+ }
+ }
+ outputBuf[outputPos++] = (char) x;
+ }
+
+ if (outputPos != bytesAvailable) {
+ System.arraycopy(outputBuf, 0, (outputBuf = new char[outputPos]), 0, outputPos);
+ }
+ return outputBuf;
+}
+
+protected void reset() {
+ this.reference = null;
+}
+
+public char[] utf8At(int relativeOffset, int bytesAvailable, boolean testValidity) throws ClassFormatException {
+ int x, y, z;
+ int length = bytesAvailable;
+ char outputBuf[] = new char[bytesAvailable];
+ int outputPos = 0;
+ int readOffset = structOffset + relativeOffset;
+
+ while (length != 0) {
+ x = reference[readOffset++] & 0xFF;
+ length--;
+ if ((0x80 & x) != 0) {
+ if (testValidity) {
+ if ((0x40 & x) == 0) {
+ throw new ClassFormatException(ClassFormatException.ErrMalformedUtf8);
+ }
+ if (length < 1) {
+ throw new ClassFormatException(ClassFormatException.ErrMalformedUtf8);
+ }
+ }
+ y = this.reference[readOffset++] & 0xFF;
+ length--;
+ if (testValidity) {
+ if ((y & 0xC0) != 0x80) {
+ throw new ClassFormatException(ClassFormatException.ErrMalformedUtf8);
+ }
+ }
+ if ((x & 0x20) != 0) {
+ if (testValidity && (length < 1)) {
+ throw new ClassFormatException(ClassFormatException.ErrMalformedUtf8);
+ }
+ z = this.reference[readOffset++] & 0xFF;
+ length--;
+ if (testValidity && ((z & 0xC0) != 0x80)) {
+ throw new ClassFormatException(ClassFormatException.ErrMalformedUtf8);
+ }
+ x = ((x & 0x1F) << 12) + ((y & 0x3F) << 6) + (z & 0x3F);
+ if (testValidity && (x < 0x0800)) {
+ throw new ClassFormatException(ClassFormatException.ErrMalformedUtf8);
+ }
+ } else {
+ x = ((x & 0x1F) << 6) + (y & 0x3F);
+ if (testValidity && !((x == 0) || (x >= 0x80))) {
+ throw new ClassFormatException(ClassFormatException.ErrMalformedUtf8);
+ }
+ }
+ } else {
+ if (testValidity && x == 0) {
+ throw new ClassFormatException(ClassFormatException.ErrMalformedUtf8);
+ }
+ }
+ outputBuf[outputPos++] = (char) x;
+ }
+
+ if (outputPos != bytesAvailable) {
+ System.arraycopy(outputBuf, 0, (outputBuf = new char[outputPos]), 0, outputPos);
+ }
+ return outputBuf;
+}
+public static void verifyMethodNameAndSignature(char[] name, char[] signature) throws ClassFormatException {
+
+ // ensure name is not empty
+ if (name.length == 0) {
+ throw new ClassFormatException(ClassFormatException.ErrInvalidMethodName);
+ }
+
+ // if name begins with the < character it must be clinit or init
+ if (name[0] == '<') {
+ if (new String(name).equals("<clinit>") || new String(name).equals("<init>")) { //$NON-NLS-2$ //$NON-NLS-1$
+ int signatureLength = signature.length;
+ if (!((signatureLength > 2)
+ && (signature[0] == '(')
+ && (signature[signatureLength - 2] == ')')
+ && (signature[signatureLength - 1] == 'V'))) {
+ throw new ClassFormatException(ClassFormatException.ErrInvalidMethodSignature);
+ }
+ } else {
+ throw new ClassFormatException(ClassFormatException.ErrInvalidMethodName);
+ }
+ }
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/ClassFormatException.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/ClassFormatException.js
new file mode 100644
index 0000000..609f725
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/ClassFormatException.js
@@ -0,0 +1,131 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Common Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors: IBM Corporation - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.classfmt;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+public class ClassFormatException extends Exception {
+
+ public static final int ErrBadMagic = 1;
+ public static final int ErrBadMinorVersion = 2;
+ public static final int ErrBadMajorVersion = 3;
+ public static final int ErrBadConstantClass = 4;
+ public static final int ErrBadConstantString = 5;
+ public static final int ErrBadConstantNameAndType = 6;
+ public static final int ErrBadConstantFieldRef = 7;
+ public static final int ErrBadConstantMethodRef = 8;
+ public static final int ErrBadConstantInterfaceMethodRef = 9;
+ public static final int ErrBadConstantPoolIndex = 10;
+ public static final int ErrBadSuperclassName = 11;
+ public static final int ErrInterfaceCannotBeFinal = 12;
+ public static final int ErrInterfaceMustBeAbstract = 13;
+ public static final int ErrBadModifiers = 14;
+ public static final int ErrClassCannotBeAbstractFinal = 15;
+ public static final int ErrBadClassname = 16;
+ public static final int ErrBadFieldInfo = 17;
+ public static final int ErrBadMethodInfo = 17;
+ public static final int ErrEmptyConstantPool = 18;
+ public static final int ErrMalformedUtf8 = 19;
+ public static final int ErrUnknownConstantTag = 20;
+ public static final int ErrTruncatedInput = 21;
+ public static final int ErrMethodMustBeAbstract = 22;
+ public static final int ErrMalformedAttribute = 23;
+ public static final int ErrBadInterface = 24;
+ public static final int ErrInterfaceMustSubclassObject = 25;
+ public static final int ErrIncorrectInterfaceMethods = 26;
+ public static final int ErrInvalidMethodName = 27;
+ public static final int ErrInvalidMethodSignature = 28;
+
+ private static final long serialVersionUID = 6667458511042774540L; // backward compatible
+
+ private int errorCode;
+ private int bufferPosition;
+ private RuntimeException nestedException;
+ private char[] fileName;
+
+ public ClassFormatException(RuntimeException e, char[] fileName) {
+ this.nestedException = e;
+ }
+ public ClassFormatException(int code) {
+ errorCode = code;
+ }
+ public ClassFormatException(int code, int bufPos) {
+ errorCode = code;
+ bufferPosition = bufPos;
+ }
+ /**
+ * @return int
+ */
+ public int getErrorCode() {
+ return errorCode;
+ }
+ /**
+ * @return int
+ */
+ public int getBufferPosition() {
+ return bufferPosition;
+ }
+ /**
+ * Returns the underlying <code>Throwable</code> that caused the failure.
+ *
+ * @return the wrappered <code>Throwable</code>, or <code>null</code>
+ * if the direct case of the failure was at the Java model layer
+ */
+ public Throwable getException() {
+ return this.nestedException;
+ }
+ public void printStackTrace() {
+ printStackTrace(System.err);
+ }
+ /**
+ * Prints this exception's stack trace to the given print stream.
+ *
+ * @param output
+ * the print stream
+ * @since 3.0
+ */
+ public void printStackTrace(PrintStream output) {
+ synchronized (output) {
+ super.printStackTrace(output);
+ Throwable throwable = getException();
+ if (throwable != null) {
+ if (this.fileName != null) {
+ output.print("Caused in "); //$NON-NLS-1$
+ output.print(this.fileName);
+ output.print(" by: "); //$NON-NLS-1$
+ } else {
+ output.print("Caused by: "); //$NON-NLS-1$
+ }
+ throwable.printStackTrace(output);
+ }
+ }
+ }
+ /**
+ * Prints this exception's stack trace to the given print writer.
+ *
+ * @param output
+ * the print writer
+ * @since 3.0
+ */
+ public void printStackTrace(PrintWriter output) {
+ synchronized (output) {
+ super.printStackTrace(output);
+ Throwable throwable = getException();
+ if (throwable != null) {
+ if (this.fileName != null) {
+ output.print("Caused in "); //$NON-NLS-1$
+ output.print(this.fileName);
+ output.print(" by: "); //$NON-NLS-1$
+ } else {
+ output.print("Caused by: "); //$NON-NLS-1$
+ }
+ throwable.printStackTrace(output);
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/FieldInfo.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/FieldInfo.js
new file mode 100644
index 0000000..7ac465c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/FieldInfo.js
@@ -0,0 +1,318 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.classfmt;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.AttributeNamesConstants;
+import org.eclipse.wst.jsdt.internal.compiler.env.IBinaryField;
+import org.eclipse.wst.jsdt.internal.compiler.impl.BooleanConstant;
+import org.eclipse.wst.jsdt.internal.compiler.impl.ByteConstant;
+import org.eclipse.wst.jsdt.internal.compiler.impl.CharConstant;
+import org.eclipse.wst.jsdt.internal.compiler.impl.Constant;
+import org.eclipse.wst.jsdt.internal.compiler.impl.DoubleConstant;
+import org.eclipse.wst.jsdt.internal.compiler.impl.FloatConstant;
+import org.eclipse.wst.jsdt.internal.compiler.impl.IntConstant;
+import org.eclipse.wst.jsdt.internal.compiler.impl.LongConstant;
+import org.eclipse.wst.jsdt.internal.compiler.impl.ShortConstant;
+import org.eclipse.wst.jsdt.internal.compiler.impl.StringConstant;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeIds;
+import org.eclipse.wst.jsdt.internal.compiler.util.Util;
+
+public class FieldInfo extends ClassFileStruct implements AttributeNamesConstants, IBinaryField, Comparable, TypeIds {
+ private int accessFlags;
+ private int attributeBytes;
+ private Constant constant;
+ private int[] constantPoolOffsets;
+ private char[] descriptor;
+ private char[] name;
+ private Object wrappedConstantValue;
+ private char[] signature;
+ private int signatureUtf8Offset;
+/**
+ * @param classFileBytes byte[]
+ * @param offsets int[]
+ * @param offset int
+ */
+public FieldInfo (byte classFileBytes[], int offsets[], int offset) {
+ super(classFileBytes, offset);
+ constantPoolOffsets = offsets;
+ accessFlags = -1;
+ int attributesCount = u2At(6);
+ int readOffset = 8;
+ this.signatureUtf8Offset = -1;
+ for (int i = 0; i < attributesCount; i++) {
+ // check the name of each attribute
+ int utf8Offset = constantPoolOffsets[u2At(readOffset)] - structOffset;
+ char[] attributeName = utf8At(utf8Offset + 3, u2At(utf8Offset + 1));
+ if (CharOperation.equals(AttributeNamesConstants.SignatureName, attributeName)) {
+ this.signatureUtf8Offset = constantPoolOffsets[u2At(readOffset + 6)] - structOffset;
+ }
+ readOffset += (6 + u4At(readOffset + 2));
+ }
+ attributeBytes = readOffset;
+}
+
+public int compareTo(Object o) {
+ if (!(o instanceof FieldInfo)) {
+ throw new ClassCastException();
+ }
+ return new String(this.getName()).compareTo(new String(((FieldInfo) o).getName()));
+}
+/**
+ * Return the constant of the field.
+ * Return org.eclipse.wst.jsdt.internal.compiler.impl.Constant.NotAConstant if there is none.
+ * @return org.eclipse.wst.jsdt.internal.compiler.impl.Constant
+ */
+public Constant getConstant() {
+ if (constant == null) {
+ // read constant
+ readConstantAttribute();
+ }
+ return constant;
+}
+public char[] getGenericSignature() {
+ if (this.signatureUtf8Offset != -1) {
+ if (this.signature == null) {
+ // decode the signature
+ this.signature = utf8At(this.signatureUtf8Offset + 3, u2At(this.signatureUtf8Offset + 1));
+ }
+ return this.signature;
+ }
+ return null;
+}
+/**
+ * Answer an int whose bits are set according the access constants
+ * defined by the VM spec.
+ * Set the AccDeprecated and AccSynthetic bits if necessary
+ * @return int
+ */
+public int getModifiers() {
+ if (this.accessFlags == -1) {
+ // compute the accessflag. Don't forget the deprecated attribute
+ this.accessFlags = u2At(0);
+ readDeprecatedAndSyntheticAttributes();
+ }
+ return this.accessFlags;
+}
+/**
+ * Answer the name of the field.
+ * @return char[]
+ */
+public char[] getName() {
+ if (name == null) {
+ // read the name
+ int utf8Offset = constantPoolOffsets[u2At(2)] - structOffset;
+ name = utf8At(utf8Offset + 3, u2At(utf8Offset + 1));
+ }
+ return name;
+}
+/**
+ * Answer the resolved name of the receiver's type in the
+ * class file format as specified in section 4.3.2 of the Java 2 VM spec.
+ *
+ * For example:
+ * - java.lang.String is Ljava/lang/String;
+ * - an int is I
+ * - a 2 dimensional array of strings is [[Ljava/lang/String;
+ * - an array of floats is [F
+ * @return char[]
+ */
+public char[] getTypeName() {
+ if (descriptor == null) {
+ // read the signature
+ int utf8Offset = constantPoolOffsets[u2At(4)] - structOffset;
+ descriptor = utf8At(utf8Offset + 3, u2At(utf8Offset + 1));
+ }
+ return descriptor;
+}
+/**
+ * Return a wrapper that contains the constant of the field.
+ * @return java.lang.Object
+ */
+public Object getWrappedConstantValue() {
+
+ if (this.wrappedConstantValue == null) {
+ if (hasConstant()) {
+ Constant fieldConstant = getConstant();
+ switch (fieldConstant.typeID()) {
+ case T_int :
+ this.wrappedConstantValue = new Integer(fieldConstant.intValue());
+ break;
+ case T_byte :
+ this.wrappedConstantValue = new Byte(fieldConstant.byteValue());
+ break;
+ case T_short :
+ this.wrappedConstantValue = new Short(fieldConstant.shortValue());
+ break;
+ case T_char :
+ this.wrappedConstantValue = new Character(fieldConstant.charValue());
+ break;
+ case T_float :
+ this.wrappedConstantValue = new Float(fieldConstant.floatValue());
+ break;
+ case T_double :
+ this.wrappedConstantValue = new Double(fieldConstant.doubleValue());
+ break;
+ case T_boolean :
+ this.wrappedConstantValue = Util.toBoolean(fieldConstant.booleanValue());
+ break;
+ case T_long :
+ this.wrappedConstantValue = new Long(fieldConstant.longValue());
+ break;
+ case T_String :
+ this.wrappedConstantValue = fieldConstant.stringValue();
+ }
+ }
+ }
+ return this.wrappedConstantValue;
+}
+/**
+ * Return true if the field has a constant value attribute, false otherwise.
+ * @return boolean
+ */
+public boolean hasConstant() {
+ return getConstant() != Constant.NotAConstant;
+}
+/**
+ * This method is used to fully initialize the contents of the receiver. All methodinfos, fields infos
+ * will be therefore fully initialized and we can get rid of the bytes.
+ */
+void initialize() {
+ getModifiers();
+ getName();
+ getConstant();
+ getTypeName();
+ getGenericSignature();
+ reset();
+}
+/**
+ * Return true if the field is a synthetic field, false otherwise.
+ * @return boolean
+ */
+public boolean isSynthetic() {
+ return (getModifiers() & AccSynthetic) != 0;
+}
+
+private void readConstantAttribute() {
+ int attributesCount = u2At(6);
+ int readOffset = 8;
+ boolean isConstant = false;
+ for (int i = 0; i < attributesCount; i++) {
+ int utf8Offset = constantPoolOffsets[u2At(readOffset)] - structOffset;
+ char[] attributeName = utf8At(utf8Offset + 3, u2At(utf8Offset + 1));
+ if (CharOperation
+ .equals(attributeName, ConstantValueName)) {
+ isConstant = true;
+ // read the right constant
+ int relativeOffset = constantPoolOffsets[u2At(readOffset + 6)] - structOffset;
+ switch (u1At(relativeOffset)) {
+ case IntegerTag :
+ char[] sign = getTypeName();
+ if (sign.length == 1) {
+ switch (sign[0]) {
+ case 'Z' : // boolean constant
+ constant = new BooleanConstant(i4At(relativeOffset + 1) == 1);
+ break;
+ case 'I' : // integer constant
+ constant = new IntConstant(i4At(relativeOffset + 1));
+ break;
+ case 'C' : // char constant
+ constant = new CharConstant((char) i4At(relativeOffset + 1));
+ break;
+ case 'B' : // byte constant
+ constant = new ByteConstant((byte) i4At(relativeOffset + 1));
+ break;
+ case 'S' : // short constant
+ constant = new ShortConstant((short) i4At(relativeOffset + 1));
+ break;
+ default:
+ constant = Constant.NotAConstant;
+ }
+ } else {
+ constant = Constant.NotAConstant;
+ }
+ break;
+ case FloatTag :
+ constant = new FloatConstant(floatAt(relativeOffset + 1));
+ break;
+ case DoubleTag :
+ constant = new DoubleConstant(doubleAt(relativeOffset + 1));
+ break;
+ case LongTag :
+ constant = new LongConstant(i8At(relativeOffset + 1));
+ break;
+ case StringTag :
+ utf8Offset = constantPoolOffsets[u2At(relativeOffset + 1)] - structOffset;
+ constant =
+ new StringConstant(
+ String.valueOf(utf8At(utf8Offset + 3, u2At(utf8Offset + 1))));
+ break;
+ }
+ }
+ readOffset += (6 + u4At(readOffset + 2));
+ }
+ if (!isConstant) {
+ constant = Constant.NotAConstant;
+ }
+}
+private void readDeprecatedAndSyntheticAttributes() {
+ int attributesCount = u2At(6);
+ int readOffset = 8;
+ for (int i = 0; i < attributesCount; i++) {
+ int utf8Offset = constantPoolOffsets[u2At(readOffset)] - structOffset;
+ char[] attributeName = utf8At(utf8Offset + 3, u2At(utf8Offset + 1));
+ if (CharOperation.equals(attributeName, DeprecatedName)) {
+ this.accessFlags |= AccDeprecated;
+ } else if (CharOperation.equals(attributeName, SyntheticName)) {
+ this.accessFlags |= AccSynthetic;
+ }
+ readOffset += (6 + u4At(readOffset + 2));
+ }
+}
+protected void reset() {
+ this.constantPoolOffsets = null;
+ super.reset();
+}
+/**
+ * Answer the size of the receiver in bytes.
+ *
+ * @return int
+ */
+public int sizeInBytes() {
+ return attributeBytes;
+}
+public void throwFormatException() throws ClassFormatException {
+ throw new ClassFormatException(ClassFormatException.ErrBadFieldInfo);
+}
+public String toString() {
+ StringBuffer buffer = new StringBuffer(this.getClass().getName());
+ int modifiers = getModifiers();
+ return buffer
+ .append("{") //$NON-NLS-1$
+ .append(
+ ((modifiers & AccDeprecated) != 0 ? "deprecated " : "") //$NON-NLS-1$ //$NON-NLS-2$
+ + ((modifiers & 0x0001) == 1 ? "public " : "") //$NON-NLS-1$ //$NON-NLS-2$
+ + ((modifiers & 0x0002) == 0x0002 ? "private " : "") //$NON-NLS-1$ //$NON-NLS-2$
+ + ((modifiers & 0x0004) == 0x0004 ? "protected " : "") //$NON-NLS-1$ //$NON-NLS-2$
+ + ((modifiers & 0x0008) == 0x000008 ? "static " : "") //$NON-NLS-1$ //$NON-NLS-2$
+ + ((modifiers & 0x0010) == 0x0010 ? "final " : "") //$NON-NLS-1$ //$NON-NLS-2$
+ + ((modifiers & 0x0040) == 0x0040 ? "volatile " : "") //$NON-NLS-1$ //$NON-NLS-2$
+ + ((modifiers & 0x0080) == 0x0080 ? "transient " : "")) //$NON-NLS-1$ //$NON-NLS-2$
+ .append(getTypeName())
+ .append(" ") //$NON-NLS-1$
+ .append(getName())
+ .append(" ") //$NON-NLS-1$
+ .append(getConstant())
+ .append("}") //$NON-NLS-1$
+ .toString();
+}
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/InnerClassInfo.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/InnerClassInfo.js
new file mode 100644
index 0000000..a5ad1ae
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/InnerClassInfo.js
@@ -0,0 +1,142 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.classfmt;
+
+import org.eclipse.wst.jsdt.internal.compiler.env.IBinaryNestedType;
+
+/**
+ * Describes one entry in the classes table of the InnerClasses attribute.
+ * See the inner class specification (The class file attribute "InnerClasses").
+ */
+
+public class InnerClassInfo extends ClassFileStruct implements IBinaryNestedType {
+ int innerClassNameIndex = -1;
+ int outerClassNameIndex = -1;
+ int innerNameIndex = -1;
+ private char[] innerClassName;
+ private char[] outerClassName;
+ private char[] innerName;
+ private int accessFlags = -1;
+ private int[] constantPoolOffsets;
+ private boolean readInnerClassName = false;
+ private boolean readOuterClassName = false;
+ private boolean readInnerName = false;
+public InnerClassInfo(byte classFileBytes[], int offsets[], int offset) {
+ super(classFileBytes, offset);
+ constantPoolOffsets = offsets;
+ innerClassNameIndex = u2At(0);
+ outerClassNameIndex = u2At(2);
+ this.innerNameIndex = u2At(4);
+}
+/**
+ * Answer the resolved name of the enclosing type in the
+ * class file format as specified in section 4.2 of the Java 2 VM spec.
+ *
+ * For example, java.lang.String is java/lang/String.
+ * @return char[]
+ */
+public char[] getEnclosingTypeName() {
+ if (!readOuterClassName) {
+ // read outer class name
+ readOuterClassName = true;
+ if (outerClassNameIndex != 0) {
+ int utf8Offset =
+ constantPoolOffsets[u2At(
+ constantPoolOffsets[outerClassNameIndex] - structOffset + 1)]
+ - structOffset;
+ outerClassName = utf8At(utf8Offset + 3, u2At(utf8Offset + 1));
+ }
+
+ }
+ return outerClassName;
+}
+/**
+ * Answer an int whose bits are set according the access constants
+ * defined by the VM spec.
+ * @return int
+ */
+public int getModifiers() {
+ if (accessFlags == -1) {
+ // read access flag
+ accessFlags = u2At(6);
+ }
+ return accessFlags;
+}
+/**
+ * Answer the resolved name of the member type in the
+ * class file format as specified in section 4.2 of the Java 2 VM spec.
+ *
+ * For example, p1.p2.A.M is p1/p2/A$M.
+ * @return char[]
+ */
+public char[] getName() {
+ if (!readInnerClassName) {
+ // read the inner class name
+ readInnerClassName = true;
+ if (innerClassNameIndex != 0) {
+ int classOffset = constantPoolOffsets[innerClassNameIndex] - structOffset;
+ int utf8Offset = constantPoolOffsets[u2At(classOffset + 1)] - structOffset;
+ innerClassName = utf8At(utf8Offset + 3, u2At(utf8Offset + 1));
+ }
+ }
+ return innerClassName;
+}
+/**
+ * Answer the source name of the member type.
+ *
+ * For example, p1.p2.A.M is M.
+ * @return char[]
+ */
+public char[] getSourceName() {
+ if (!this.readInnerName) {
+ this.readInnerName = true;
+ if (innerNameIndex != 0) {
+ int utf8Offset = constantPoolOffsets[innerNameIndex] - structOffset;
+ innerName = utf8At(utf8Offset + 3, u2At(utf8Offset + 1));
+ }
+ }
+ return innerName;
+}
+/**
+ * Answer the string representation of the receiver
+ * @return java.lang.String
+ */
+public String toString() {
+ StringBuffer buffer = new StringBuffer();
+ if (getName() != null) {
+ buffer.append(getName());
+ }
+ buffer.append("\n"); //$NON-NLS-1$
+ if (getEnclosingTypeName() != null) {
+ buffer.append(getEnclosingTypeName());
+ }
+ buffer.append("\n"); //$NON-NLS-1$
+ if (getSourceName() != null) {
+ buffer.append(getSourceName());
+ }
+ return buffer.toString();
+}
+/**
+ * This method is used to fully initialize the contents of the receiver. All methodinfos, fields infos
+ * will be therefore fully initialized and we can get rid of the bytes.
+ */
+void initialize() {
+ getModifiers();
+ getName();
+ getSourceName();
+ getEnclosingTypeName();
+ reset();
+}
+protected void reset() {
+ this.constantPoolOffsets = null;
+ super.reset();
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/MethodInfo.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/MethodInfo.js
new file mode 100644
index 0000000..90c3240
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/MethodInfo.js
@@ -0,0 +1,251 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.classfmt;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.AttributeNamesConstants;
+import org.eclipse.wst.jsdt.internal.compiler.env.IBinaryMethod;
+
+public class MethodInfo extends ClassFileStruct implements IBinaryMethod, AttributeNamesConstants, Comparable {
+ static private final char[][] noException = CharOperation.NO_CHAR_CHAR;
+ private int accessFlags;
+ private int attributeBytes;
+ private int[] constantPoolOffsets;
+ private char[] descriptor;
+ private char[][] exceptionNames;
+ private char[] name;
+ private char[] signature;
+ private int signatureUtf8Offset;
+
+/**
+ * @param classFileBytes byte[]
+ * @param offsets int[]
+ * @param offset int
+ */
+public MethodInfo (byte classFileBytes[], int offsets[], int offset) {
+ super(classFileBytes, offset);
+ constantPoolOffsets = offsets;
+ accessFlags = -1;
+ int attributesCount = u2At(6);
+ int readOffset = 8;
+ this.signatureUtf8Offset = -1;
+ for (int i = 0; i < attributesCount; i++) {
+ // check the name of each attribute
+ int utf8Offset = constantPoolOffsets[u2At(readOffset)] - structOffset;
+ char[] attributeName = utf8At(utf8Offset + 3, u2At(utf8Offset + 1));
+ if (CharOperation.equals(AttributeNamesConstants.SignatureName, attributeName)) {
+ this.signatureUtf8Offset = constantPoolOffsets[u2At(readOffset + 6)] - structOffset;
+ }
+ readOffset += (6 + u4At(readOffset + 2));
+ }
+ attributeBytes = readOffset;
+}
+public int compareTo(Object o) {
+ if (!(o instanceof MethodInfo)) {
+ throw new ClassCastException();
+ }
+
+ MethodInfo otherMethod = (MethodInfo) o;
+ int result = new String(this.getSelector()).compareTo(new String(otherMethod.getSelector()));
+ if (result != 0) return result;
+ return new String(this.getMethodDescriptor()).compareTo(new String(otherMethod.getMethodDescriptor()));
+}
+/**
+ * @see org.eclipse.wst.jsdt.internal.compiler.env.IGenericMethod#getArgumentNames()
+ */
+public char[][] getArgumentNames() {
+ return null;
+}
+/**
+ * Answer the resolved names of the exception types in the
+ * class file format as specified in section 4.2 of the Java 2 VM spec
+ * or null if the array is empty.
+ *
+ * For example, java.lang.String is java/lang/String.
+ * @return char[][]
+ */
+public char[][] getExceptionTypeNames() {
+ if (exceptionNames == null) {
+ readExceptionAttributes();
+ }
+ return exceptionNames;
+}
+public char[] getGenericSignature() {
+ if (this.signatureUtf8Offset != -1) {
+ if (this.signature == null) {
+ // decode the signature
+ this.signature = utf8At(this.signatureUtf8Offset + 3, u2At(this.signatureUtf8Offset + 1));
+ }
+ return this.signature;
+ }
+ return null;
+}
+/**
+ * Answer the receiver's method descriptor which describes the parameter &
+ * return types as specified in section 4.3.3 of the Java 2 VM spec.
+ *
+ * For example:
+ * - int foo(String) is (Ljava/lang/String;)I
+ * - void foo(Object[]) is (I)[Ljava/lang/Object;
+ * @return char[]
+ */
+public char[] getMethodDescriptor() {
+ if (descriptor == null) {
+ // read the name
+ int utf8Offset = constantPoolOffsets[u2At(4)] - structOffset;
+ descriptor = utf8At(utf8Offset + 3, u2At(utf8Offset + 1));
+ }
+ return descriptor;
+}
+/**
+ * Answer an int whose bits are set according the access constants
+ * defined by the VM spec.
+ * Set the AccDeprecated and AccSynthetic bits if necessary
+ * @return int
+ */
+public int getModifiers() {
+ if (this.accessFlags == -1) {
+ // compute the accessflag. Don't forget the deprecated attribute
+ this.accessFlags = u2At(0);
+ readDeprecatedAndSyntheticAttributes();
+ }
+ return this.accessFlags;
+}
+/**
+ * Answer the name of the method.
+ *
+ * For a constructor, answer <init> & <clinit> for a clinit method.
+ * @return char[]
+ */
+public char[] getSelector() {
+ if (name == null) {
+ // read the name
+ int utf8Offset = constantPoolOffsets[u2At(2)] - structOffset;
+ name = utf8At(utf8Offset + 3, u2At(utf8Offset + 1));
+ }
+ return name;
+}
+/**
+ * This method is used to fully initialize the contents of the receiver. All methodinfos, fields infos
+ * will be therefore fully initialized and we can get rid of the bytes.
+ */
+void initialize() {
+ getModifiers();
+ getSelector();
+ getMethodDescriptor();
+ getExceptionTypeNames();
+ getGenericSignature();
+ reset();
+}
+/**
+ * Answer true if the method is a class initializer, false otherwise.
+ * @return boolean
+ */
+public boolean isClinit() {
+ char[] selector = getSelector();
+ return selector[0] == '<' && selector.length == 8; // Can only match <clinit>
+}
+/**
+ * Answer true if the method is a constructor, false otherwise.
+ * @return boolean
+ */
+public boolean isConstructor() {
+ char[] selector = getSelector();
+ return selector[0] == '<' && selector.length == 6; // Can only match <init>
+}
+/**
+ * Return true if the field is a synthetic method, false otherwise.
+ * @return boolean
+ */
+public boolean isSynthetic() {
+ return (getModifiers() & AccSynthetic) != 0;
+}
+private void readDeprecatedAndSyntheticAttributes() {
+ int attributesCount = u2At(6);
+ int readOffset = 8;
+ for (int i = 0; i < attributesCount; i++) {
+ int utf8Offset = constantPoolOffsets[u2At(readOffset)] - structOffset;
+ char[] attributeName = utf8At(utf8Offset + 3, u2At(utf8Offset + 1));
+ if (CharOperation.equals(attributeName, DeprecatedName)) {
+ this.accessFlags |= AccDeprecated;
+ } else if (CharOperation.equals(attributeName, SyntheticName)) {
+ this.accessFlags |= AccSynthetic;
+ }
+ readOffset += (6 + u4At(readOffset + 2));
+ }
+}
+private void readExceptionAttributes() {
+ int attributesCount = u2At(6);
+ int readOffset = 8;
+ for (int i = 0; i < attributesCount; i++) {
+ int utf8Offset = constantPoolOffsets[u2At(readOffset)] - structOffset;
+ char[] attributeName = utf8At(utf8Offset + 3, u2At(utf8Offset + 1));
+ if (CharOperation.equals(attributeName, ExceptionsName)) {
+ // read the number of exception entries
+ int entriesNumber = u2At(readOffset + 6);
+ // place the readOffset at the beginning of the exceptions table
+ readOffset += 8;
+ if (entriesNumber == 0) {
+ exceptionNames = noException;
+ } else {
+ exceptionNames = new char[entriesNumber][];
+ for (int j = 0; j < entriesNumber; j++) {
+ utf8Offset =
+ constantPoolOffsets[u2At(
+ constantPoolOffsets[u2At(readOffset)] - structOffset + 1)]
+ - structOffset;
+ exceptionNames[j] = utf8At(utf8Offset + 3, u2At(utf8Offset + 1));
+ readOffset += 2;
+ }
+ }
+ } else {
+ readOffset += (6 + u4At(readOffset + 2));
+ }
+ }
+ if (exceptionNames == null) {
+ exceptionNames = noException;
+ }
+}
+protected void reset() {
+ this.constantPoolOffsets = null;
+ super.reset();
+}
+/**
+ * Answer the size of the receiver in bytes.
+ *
+ * @return int
+ */
+public int sizeInBytes() {
+ return attributeBytes;
+}
+public String toString() {
+ int modifiers = getModifiers();
+ char[] desc = getGenericSignature();
+ if (desc == null)
+ desc = getMethodDescriptor();
+ StringBuffer buffer = new StringBuffer(this.getClass().getName());
+ return buffer
+ .append("{") //$NON-NLS-1$
+ .append(
+ ((modifiers & AccDeprecated) != 0 ? "deprecated " : "") //$NON-NLS-1$ //$NON-NLS-2$
+ + ((modifiers & 0x0001) == 1 ? "public " : "") //$NON-NLS-1$ //$NON-NLS-2$
+ + ((modifiers & 0x0002) == 0x0002 ? "private " : "") //$NON-NLS-1$ //$NON-NLS-2$
+ + ((modifiers & 0x0004) == 0x0004 ? "protected " : "") //$NON-NLS-1$ //$NON-NLS-2$
+ + ((modifiers & 0x0008) == 0x000008 ? "static " : "") //$NON-NLS-1$ //$NON-NLS-2$
+ + ((modifiers & 0x0010) == 0x0010 ? "final " : "") //$NON-NLS-1$ //$NON-NLS-2$
+ + ((modifiers & 0x0040) == 0x0040 ? "volatile " : "") //$NON-NLS-1$ //$NON-NLS-2$
+ + ((modifiers & 0x0080) == 0x0080 ? "transient " : "")) //$NON-NLS-1$ //$NON-NLS-2$
+ .append(getSelector())
+ .append(desc)
+ .append("}") //$NON-NLS-1$
+ .toString();
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/AttributeNamesConstants.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/AttributeNamesConstants.js
new file mode 100644
index 0000000..3bbbd8c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/AttributeNamesConstants.js
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.codegen;
+
+public interface AttributeNamesConstants {
+ final char[] SyntheticName = new char[] {'S', 'y', 'n', 't', 'h', 'e', 't', 'i', 'c'};
+ final char[] ConstantValueName = new char[] {'C', 'o', 'n', 's', 't', 'a', 'n', 't', 'V', 'a', 'l', 'u', 'e'};
+ final char[] LineNumberTableName = new char[] {'L', 'i', 'n', 'e', 'N', 'u', 'm', 'b', 'e', 'r', 'T', 'a', 'b', 'l', 'e'};
+ final char[] LocalVariableTableName = new char[] {'L', 'o', 'c', 'a', 'l', 'V', 'a', 'r', 'i', 'a', 'b', 'l', 'e', 'T', 'a', 'b', 'l', 'e'};
+ final char[] InnerClassName = new char[] {'I', 'n', 'n', 'e', 'r', 'C', 'l', 'a', 's', 's', 'e', 's'};
+ final char[] CodeName = new char[] {'C', 'o', 'd', 'e'};
+ final char[] ExceptionsName = new char[] {'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n', 's'};
+ final char[] SourceName = new char[] {'S', 'o', 'u', 'r', 'c', 'e', 'F', 'i', 'l', 'e'};
+ final char[] DeprecatedName = new char[] {'D', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd'};
+ final char[] SignatureName = new char[] {'S', 'i', 'g', 'n', 'a', 't', 'u', 'r', 'e'};
+ final char[] LocalVariableTypeTableName = new char[] {'L', 'o', 'c', 'a', 'l', 'V', 'a', 'r', 'i', 'a', 'b', 'l', 'e', 'T', 'y', 'p', 'e', 'T', 'a', 'b', 'l', 'e'};
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/CaseLabel.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/CaseLabel.js
new file mode 100644
index 0000000..fb49850
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/CaseLabel.js
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.codegen;
+
+public class CaseLabel extends Label {
+ public int instructionPosition = POS_NOT_SET;
+ public int backwardsBranch = POS_NOT_SET;
+/**
+ * CaseLabel constructor comment.
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ */
+public CaseLabel(CodeStream codeStream) {
+ super(codeStream);
+}
+/*
+* Put down a refernece to the array at the location in the codestream.
+*/
+void branch() {
+ if (position == POS_NOT_SET) {
+ addForwardReference(codeStream.position);
+ // Leave 4 bytes free to generate the jump offset afterwards
+ codeStream.position += 4;
+ codeStream.classFileOffset += 4;
+ } else { //Position is set. Write it!
+ codeStream.writeSignedWord(position - codeStream.position + 1);
+ }
+}
+/*
+* Put down a refernece to the array at the location in the codestream.
+*/
+void branchWide() {
+ if (position == POS_NOT_SET) {
+ addForwardReference(codeStream.position);
+ // Leave 4 bytes free to generate the jump offset afterwards
+ codeStream.position += 4;
+ } else { //Position is set. Write it!
+ codeStream.writeSignedWord(position - codeStream.position + 1);
+ }
+}
+public boolean isStandardLabel(){
+ return false;
+}
+/*
+* Put down a reference to the array at the location in the codestream.
+*/
+public void place() {
+ position = codeStream.position;
+ if (instructionPosition == POS_NOT_SET)
+ backwardsBranch = position;
+ else {
+ int offset = position - instructionPosition;
+ for (int i = 0; i < forwardReferenceCount; i++) {
+ codeStream.writeSignedWord(forwardReferences[i], offset);
+ }
+ // add the label int the codeStream labels collection
+ codeStream.addLabel(this);
+ }
+}
+/*
+* Put down a refernece to the array at the location in the codestream.
+*/
+void placeInstruction() {
+ if (instructionPosition == POS_NOT_SET) {
+ instructionPosition = codeStream.position;
+ if (backwardsBranch != POS_NOT_SET) {
+ int offset = backwardsBranch - instructionPosition;
+ for (int i = 0; i < forwardReferenceCount; i++)
+ codeStream.writeSignedWord(forwardReferences[i], offset);
+ backwardsBranch = POS_NOT_SET;
+ }
+ }
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/CharArrayCache.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/CharArrayCache.js
new file mode 100644
index 0000000..e564277
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/CharArrayCache.js
@@ -0,0 +1,184 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.codegen;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+
+public class CharArrayCache {
+ // to avoid using Enumerations, walk the individual tables skipping nulls
+ public char[] keyTable[];
+ public int valueTable[];
+ int elementSize; // number of elements in the table
+ int threshold;
+/**
+ * Constructs a new, empty hashtable. A default capacity is used.
+ * Note that the hashtable will automatically grow when it gets full.
+ */
+public CharArrayCache() {
+ this(13);
+}
+/**
+ * Constructs a new, empty hashtable with the specified initial
+ * capacity.
+ * @param initialCapacity int
+ * the initial number of buckets
+ */
+public CharArrayCache(int initialCapacity) {
+ this.elementSize = 0;
+ this.threshold = (int) (initialCapacity * 0.66f);
+ this.keyTable = new char[initialCapacity][];
+ this.valueTable = new int[initialCapacity];
+}
+/**
+ * Clears the hash table so that it has no more elements in it.
+ */
+public void clear() {
+ for (int i = keyTable.length; --i >= 0;) {
+ keyTable[i] = null;
+ valueTable[i] = 0;
+ }
+ elementSize = 0;
+}
+/** Returns true if the collection contains an element for the key.
+ *
+ * @param key char[] the key that we are looking for
+ * @return boolean
+ */
+public boolean containsKey(char[] key) {
+ int index = hashCodeChar(key);
+ while (keyTable[index] != null) {
+ if (CharOperation.equals(keyTable[index], key))
+ return true;
+ index = (index + 1) % keyTable.length;
+ }
+ return false;
+}
+/** Gets the object associated with the specified key in the
+ * hashtable.
+ * @param key <CODE>char[]</CODE> the specified key
+ * @return int the element for the key or -1 if the key is not
+ * defined in the hash table.
+ */
+public int get(char[] key) {
+ int index = hashCodeChar(key);
+ while (keyTable[index] != null) {
+ if (CharOperation.equals(keyTable[index], key))
+ return valueTable[index];
+ index = (index + 1) % keyTable.length;
+ }
+ return -1;
+}
+private int hashCodeChar(char[] val) {
+ int length = val.length;
+ int hash = 0;
+ int n = 2; // number of characters skipped
+ for (int i = 0; i < length; i += n) {
+ hash += val[i];
+ }
+ return (hash & 0x7FFFFFFF) % keyTable.length;
+}
+/**
+ * Puts the specified element into the hashtable, using the specified
+ * key. The element may be retrieved by doing a get() with the same key.
+ * The key and the element cannot be null.
+ *
+ * @param key <CODE>Object</CODE> the specified key in the hashtable
+ * @param value <CODE>int</CODE> the specified element
+ * @return int the old value of the key, or -1 if it did not have one.
+ */
+public int put(char[] key, int value) {
+ int index = hashCodeChar(key);
+ while (keyTable[index] != null) {
+ if (CharOperation.equals(keyTable[index], key))
+ return valueTable[index] = value;
+ index = (index + 1) % keyTable.length;
+ }
+ keyTable[index] = key;
+ valueTable[index] = value;
+
+ // assumes the threshold is never equal to the size of the table
+ if (++elementSize > threshold)
+ rehash();
+ return value;
+}
+/**
+ * Rehashes the content of the table into a bigger table.
+ * This method is called automatically when the hashtable's
+ * size exceeds the threshold.
+ */
+private void rehash() {
+ CharArrayCache newHashtable = new CharArrayCache(keyTable.length * 2);
+ for (int i = keyTable.length; --i >= 0;)
+ if (keyTable[i] != null)
+ newHashtable.put(keyTable[i], valueTable[i]);
+
+ this.keyTable = newHashtable.keyTable;
+ this.valueTable = newHashtable.valueTable;
+ this.threshold = newHashtable.threshold;
+}
+/** Remove the object associated with the specified key in the
+ * hashtable.
+ * @param key <CODE>char[]</CODE> the specified key
+ */
+public void remove(char[] key) {
+ int index = hashCodeChar(key);
+ while (keyTable[index] != null) {
+ if (CharOperation.equals(keyTable[index], key)) {
+ valueTable[index] = 0;
+ keyTable[index] = null;
+ return;
+ }
+ index = (index + 1) % keyTable.length;
+ }
+}
+/**
+ * Returns the key corresponding to the value. Returns null if the
+ * receiver doesn't contain the value.
+ * @param value int the value that we are looking for
+ * @return Object
+ */
+public char[] returnKeyFor(int value) {
+ for (int i = keyTable.length; i-- > 0;) {
+ if (valueTable[i] == value) {
+ return keyTable[i];
+ }
+ }
+ return null;
+}
+/**
+ * Returns the number of elements contained in the hashtable.
+ *
+ * @return <CODE>int</CODE> The size of the table
+ */
+public int size() {
+ return elementSize;
+}
+/**
+ * Converts to a rather lengthy String.
+ *
+ * return String the ascii representation of the receiver
+ */
+public String toString() {
+ int max = size();
+ StringBuffer buf = new StringBuffer();
+ buf.append("{"); //$NON-NLS-1$
+ for (int i = 0; i < max; ++i) {
+ if (keyTable[i] != null) {
+ buf.append(keyTable[i]).append("->").append(valueTable[i]); //$NON-NLS-1$
+ }
+ if (i < max) {
+ buf.append(", "); //$NON-NLS-1$
+ }
+ }
+ buf.append("}"); //$NON-NLS-1$
+ return buf.toString();
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/CodeStream.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/CodeStream.js
new file mode 100644
index 0000000..72463a0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/CodeStream.js
@@ -0,0 +1,5479 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.codegen;
+
+import org.eclipse.wst.jsdt.internal.compiler.*;
+
+import org.eclipse.wst.jsdt.internal.compiler.impl.*;
+import org.eclipse.wst.jsdt.internal.compiler.ast.*;
+import org.eclipse.wst.jsdt.internal.compiler.classfmt.*;
+import org.eclipse.wst.jsdt.internal.compiler.flow.*;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+public class CodeStream implements OperatorIds, ClassFileConstants, Opcodes, BaseTypes, TypeConstants, TypeIds {
+
+ public static final boolean DEBUG = false;
+
+ // It will be responsible for the following items.
+ // -> Tracking Max Stack.
+
+ public int stackMax; // Use Ints to keep from using extra bc when adding
+ public int stackDepth; // Use Ints to keep from using extra bc when adding
+ public int maxLocals;
+ public static final int LABELS_INCREMENT = 5;
+ public byte[] bCodeStream;
+ public int pcToSourceMapSize;
+ public int[] pcToSourceMap = new int[24];
+ public int lastEntryPC; // last entry recorded
+ public int[] lineSeparatorPositions;
+ public int position; // So when first set can be incremented
+ public int classFileOffset;
+ public int startingClassFileOffset; // I need to keep the starting point inside the byte array
+ public ConstantPool constantPool; // The constant pool used to generate bytecodes that need to store information into the constant pool
+ public ClassFile classFile; // The current classfile it is associated to.
+ // local variable attributes output
+ public static final int LOCALS_INCREMENT = 10;
+ public LocalVariableBinding[] locals = new LocalVariableBinding[LOCALS_INCREMENT];
+ static LocalVariableBinding[] noLocals = new LocalVariableBinding[LOCALS_INCREMENT];
+ public LocalVariableBinding[] visibleLocals = new LocalVariableBinding[LOCALS_INCREMENT];
+ static LocalVariableBinding[] noVisibleLocals = new LocalVariableBinding[LOCALS_INCREMENT];
+ int visibleLocalsCount;
+ public AbstractMethodDeclaration methodDeclaration;
+ public ExceptionLabel[] exceptionHandlers = new ExceptionLabel[LABELS_INCREMENT];
+ static ExceptionLabel[] noExceptionHandlers = new ExceptionLabel[LABELS_INCREMENT];
+ public int exceptionHandlersIndex;
+ public int exceptionHandlersCounter;
+
+ public static FieldBinding[] ImplicitThis = new FieldBinding[] {};
+ public boolean generateLineNumberAttributes;
+ public boolean generateLocalVariableTableAttributes;
+ public boolean preserveUnusedLocals;
+ // store all the labels placed at the current position to be able to optimize
+ // a jump to the next bytecode.
+ public Label[] labels = new Label[LABELS_INCREMENT];
+ static Label[] noLabels = new Label[LABELS_INCREMENT];
+ public int countLabels;
+ public int allLocalsCounter;
+ public int maxFieldCount;
+ // to handle goto_w
+ public boolean wideMode = false;
+ public static final CompilationResult RESTART_IN_WIDE_MODE = new CompilationResult((char[])null, 0, 0, 0);
+
+ // target level to manage different code generation between different target levels
+ private long targetLevel;
+
+public CodeStream(ClassFile classFile, long targetLevel) {
+ this.targetLevel = targetLevel;
+ this.generateLineNumberAttributes = (classFile.produceDebugAttributes & CompilerOptions.Lines) != 0;
+ this.generateLocalVariableTableAttributes = (classFile.produceDebugAttributes & CompilerOptions.Vars) != 0;
+ if (this.generateLineNumberAttributes) {
+ this.lineSeparatorPositions = classFile.referenceBinding.scope.referenceCompilationUnit().compilationResult.lineSeparatorPositions;
+ }
+}
+final public void aaload() {
+ if (DEBUG) System.out.println(position + "\t\taaload"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_aaload;
+}
+final public void aastore() {
+ if (DEBUG) System.out.println(position + "\t\taastore"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 3;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_aastore;
+}
+final public void aconst_null() {
+ if (DEBUG) System.out.println(position + "\t\taconst_null"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (stackDepth > stackMax) {
+ stackMax = stackDepth;
+ }
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_aconst_null;
+}
+public final void addDefinitelyAssignedVariables(Scope scope, int initStateIndex) {
+ // Required to fix 1PR0XVS: LFRE:WINNT - Compiler: variable table for method appears incorrect
+ if (!generateLocalVariableTableAttributes)
+ return;
+/* if (initStateIndex == lastInitStateIndexWhenAddingInits)
+ return;
+ lastInitStateIndexWhenAddingInits = initStateIndex;
+ if (lastInitStateIndexWhenRemovingInits != initStateIndex){
+ lastInitStateIndexWhenRemovingInits = -2; // reinitialize remove index
+ // remove(1)-add(1)-remove(1) -> ignore second remove
+ // remove(1)-add(2)-remove(1) -> perform second remove
+ }
+
+*/ for (int i = 0; i < visibleLocalsCount; i++) {
+ LocalVariableBinding localBinding = visibleLocals[i];
+ if (localBinding != null) {
+ // Check if the local is definitely assigned
+ if ((initStateIndex != -1) && isDefinitelyAssigned(scope, initStateIndex, localBinding)) {
+ if ((localBinding.initializationCount == 0) || (localBinding.initializationPCs[((localBinding.initializationCount - 1) << 1) + 1] != -1)) {
+ /* There are two cases:
+ * 1) there is no initialization interval opened ==> add an opened interval
+ * 2) there is already some initialization intervals but the last one is closed ==> add an opened interval
+ * An opened interval means that the value at localBinding.initializationPCs[localBinding.initializationCount - 1][1]
+ * is equals to -1.
+ * initializationPCs is a collection of pairs of int:
+ * first value is the startPC and second value is the endPC. -1 one for the last value means that the interval
+ * is not closed yet.
+ */
+ localBinding.recordInitializationStartPC(position);
+ }
+ }
+ }
+ }
+}
+public void addLabel(Label aLabel) {
+ if (countLabels == labels.length)
+ System.arraycopy(labels, 0, labels = new Label[countLabels + LABELS_INCREMENT], 0, countLabels);
+ labels[countLabels++] = aLabel;
+}
+public void addVisibleLocalVariable(LocalVariableBinding localBinding) {
+ if (!generateLocalVariableTableAttributes)
+ return;
+
+ if (visibleLocalsCount >= visibleLocals.length)
+ System.arraycopy(visibleLocals, 0, visibleLocals = new LocalVariableBinding[visibleLocalsCount * 2], 0, visibleLocalsCount);
+ visibleLocals[visibleLocalsCount++] = localBinding;
+}
+final public void aload(int iArg) {
+ if (DEBUG) System.out.println(position + "\t\taload:"+iArg); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (maxLocals <= iArg) {
+ maxLocals = iArg + 1;
+ }
+ if (iArg > 255) { // Widen
+ if (classFileOffset + 3 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 2;
+ bCodeStream[classFileOffset++] = OPC_wide;
+ bCodeStream[classFileOffset++] = OPC_aload;
+ writeUnsignedShort(iArg);
+ } else {
+ // Don't need to use the wide bytecode
+ if (classFileOffset + 1 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 2;
+ bCodeStream[classFileOffset++] = OPC_aload;
+ bCodeStream[classFileOffset++] = (byte) iArg;
+ }
+}
+final public void aload_0() {
+ if (DEBUG) System.out.println(position + "\t\taload_0"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (stackDepth > stackMax) {
+ stackMax = stackDepth;
+ }
+ if (maxLocals == 0) {
+ maxLocals = 1;
+ }
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_aload_0;
+}
+final public void aload_1() {
+ if (DEBUG) System.out.println(position + "\t\taload_1"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (maxLocals <= 1) {
+ maxLocals = 2;
+ }
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_aload_1;
+}
+final public void aload_2() {
+ if (DEBUG) System.out.println(position + "\t\taload_2"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (maxLocals <= 2) {
+ maxLocals = 3;
+ }
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_aload_2;
+}
+final public void aload_3() {
+ if (DEBUG) System.out.println(position + "\t\taload_3"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (maxLocals <= 3) {
+ maxLocals = 4;
+ }
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_aload_3;
+}
+public final void anewarray(TypeBinding typeBinding) {
+ if (DEBUG) System.out.println(position + "\t\tanewarray: " + typeBinding); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_anewarray;
+ writeUnsignedShort(constantPool.literalIndex(typeBinding));
+}
+final public void areturn() {
+ if (DEBUG) System.out.println(position + "\t\tareturn"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ // the stackDepth should be equal to 0
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_areturn;
+}
+public void arrayAt(int typeBindingID) {
+ switch (typeBindingID) {
+ case T_int :
+ this.iaload();
+ break;
+ case T_byte :
+ case T_boolean :
+ this.baload();
+ break;
+ case T_short :
+ this.saload();
+ break;
+ case T_char :
+ this.caload();
+ break;
+ case T_long :
+ this.laload();
+ break;
+ case T_float :
+ this.faload();
+ break;
+ case T_double :
+ this.daload();
+ break;
+ default :
+ this.aaload();
+ }
+}
+public void arrayAtPut(int elementTypeID, boolean valueRequired) {
+ switch (elementTypeID) {
+ case T_int :
+ if (valueRequired)
+ dup_x2();
+ iastore();
+ break;
+ case T_byte :
+ case T_boolean :
+ if (valueRequired)
+ dup_x2();
+ bastore();
+ break;
+ case T_short :
+ if (valueRequired)
+ dup_x2();
+ sastore();
+ break;
+ case T_char :
+ if (valueRequired)
+ dup_x2();
+ castore();
+ break;
+ case T_long :
+ if (valueRequired)
+ dup2_x2();
+ lastore();
+ break;
+ case T_float :
+ if (valueRequired)
+ dup_x2();
+ fastore();
+ break;
+ case T_double :
+ if (valueRequired)
+ dup2_x2();
+ dastore();
+ break;
+ default :
+ if (valueRequired)
+ dup_x2();
+ aastore();
+ }
+}
+final public void arraylength() {
+ if (DEBUG) System.out.println(position + "\t\tarraylength"); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_arraylength;
+}
+final public void astore(int iArg) {
+ if (DEBUG) System.out.println(position + "\t\tastore:"+iArg); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (maxLocals <= iArg) {
+ maxLocals = iArg + 1;
+ }
+ if (iArg > 255) { // Widen
+ if (classFileOffset + 3 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position+=2;
+ bCodeStream[classFileOffset++] = OPC_wide;
+ bCodeStream[classFileOffset++] = OPC_astore;
+ writeUnsignedShort(iArg);
+ } else {
+ if (classFileOffset + 1 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position+=2;
+ bCodeStream[classFileOffset++] = OPC_astore;
+ bCodeStream[classFileOffset++] = (byte) iArg;
+ }
+}
+final public void astore_0() {
+ if (DEBUG) System.out.println(position + "\t\tastore_0"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (maxLocals == 0) {
+ maxLocals = 1;
+ }
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_astore_0;
+}
+final public void astore_1() {
+ if (DEBUG) System.out.println(position + "\t\tastore_1"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (maxLocals <= 1) {
+ maxLocals = 2;
+ }
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_astore_1;
+}
+final public void astore_2() {
+ if (DEBUG) System.out.println(position + "\t\tastore_2"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (maxLocals <= 2) {
+ maxLocals = 3;
+ }
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_astore_2;
+}
+final public void astore_3() {
+ if (DEBUG) System.out.println(position + "\t\tastore_3"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (maxLocals <= 3) {
+ maxLocals = 4;
+ }
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_astore_3;
+}
+final public void athrow() {
+ if (DEBUG) System.out.println(position + "\t\tathrow"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_athrow;
+}
+final public void baload() {
+ if (DEBUG) System.out.println(position + "\t\tbaload"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_baload;
+}
+final public void bastore() {
+ if (DEBUG) System.out.println(position + "\t\tbastore"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 3;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_bastore;
+}
+final public void bipush(byte b) {
+ if (DEBUG) System.out.println(position + "\t\tbipush "+b); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset + 1 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 2;
+ bCodeStream[classFileOffset++] = OPC_bipush;
+ bCodeStream[classFileOffset++] = b;
+}
+final public void caload() {
+ if (DEBUG) System.out.println(position + "\t\tcaload"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_caload;
+}
+final public void castore() {
+ if (DEBUG) System.out.println(position + "\t\tcastore"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 3;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_castore;
+}
+public final void checkcast(TypeBinding typeBinding) {
+ if (DEBUG) System.out.println(position + "\t\tcheckcast:"+typeBinding); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_checkcast;
+ writeUnsignedShort(constantPool.literalIndex(typeBinding));
+}
+final public void d2f() {
+ if (DEBUG) System.out.println(position + "\t\td2f"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_d2f;
+}
+final public void d2i() {
+ if (DEBUG) System.out.println(position + "\t\td2i"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_d2i;
+}
+final public void d2l() {
+ if (DEBUG) System.out.println(position + "\t\td2l"); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_d2l;
+}
+final public void dadd() {
+ if (DEBUG) System.out.println(position + "\t\tdadd"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 2;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_dadd;
+}
+final public void daload() {
+ if (DEBUG) System.out.println(position + "\t\tdaload"); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_daload;
+}
+final public void dastore() {
+ if (DEBUG) System.out.println(position + "\t\tdastore"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 4;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_dastore;
+}
+final public void dcmpg() {
+ if (DEBUG) System.out.println(position + "\t\tdcmpg"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 3;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_dcmpg;
+}
+final public void dcmpl() {
+ if (DEBUG) System.out.println(position + "\t\tdcmpl"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 3;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_dcmpl;
+}
+final public void dconst_0() {
+ if (DEBUG) System.out.println(position + "\t\tdconst_0"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth += 2;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_dconst_0;
+}
+final public void dconst_1() {
+ if (DEBUG) System.out.println(position + "\t\tdconst_1"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth += 2;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_dconst_1;
+}
+final public void ddiv() {
+ if (DEBUG) System.out.println(position + "\t\tddiv"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 2;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_ddiv;
+}
+public void decrStackSize(int offset) {
+ stackDepth -= offset;
+}
+final public void dload(int iArg) {
+ if (DEBUG) System.out.println(position + "\t\tdload:"+iArg); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth += 2;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (maxLocals < iArg + 2) {
+ maxLocals = iArg + 2; // + 2 because it is a double
+ }
+ if (iArg > 255) { // Widen
+ if (classFileOffset + 3 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 2;
+ bCodeStream[classFileOffset++] = OPC_wide;
+ bCodeStream[classFileOffset++] = OPC_dload;
+ writeUnsignedShort(iArg);
+ } else {
+ // Don't need to use the wide bytecode
+ if (classFileOffset + 1 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 2;
+ bCodeStream[classFileOffset++] = OPC_dload;
+ bCodeStream[classFileOffset++] = (byte) iArg;
+ }
+}
+final public void dload_0() {
+ if (DEBUG) System.out.println(position + "\t\tdload_0"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth += 2;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (maxLocals < 2) {
+ maxLocals = 2;
+ }
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_dload_0;
+}
+final public void dload_1() {
+ if (DEBUG) System.out.println(position + "\t\tdload_1"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth += 2;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (maxLocals < 3) {
+ maxLocals = 3;
+ }
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_dload_1;
+}
+final public void dload_2() {
+ if (DEBUG) System.out.println(position + "\t\tdload_2"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth += 2;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (maxLocals < 4) {
+ maxLocals = 4;
+ }
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_dload_2;
+}
+final public void dload_3() {
+ if (DEBUG) System.out.println(position + "\t\tdload_3"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth += 2;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (maxLocals < 5) {
+ maxLocals = 5;
+ }
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_dload_3;
+}
+final public void dmul() {
+ if (DEBUG) System.out.println(position + "\t\tdmul"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 2;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_dmul;
+}
+final public void dneg() {
+ if (DEBUG) System.out.println(position + "\t\tdneg"); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_dneg;
+}
+final public void drem() {
+ if (DEBUG) System.out.println(position + "\t\tdrem"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 2;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_drem;
+}
+final public void dreturn() {
+ if (DEBUG) System.out.println(position + "\t\tdreturn"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 2;
+ // the stackDepth should be equal to 0
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_dreturn;
+}
+final public void dstore(int iArg) {
+ if (DEBUG) System.out.println(position + "\t\tdstore:"+iArg); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 2;
+ if (maxLocals <= iArg + 1) {
+ maxLocals = iArg + 2;
+ }
+ if (iArg > 255) { // Widen
+ if (classFileOffset + 3 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 2;
+ bCodeStream[classFileOffset++] = OPC_wide;
+ bCodeStream[classFileOffset++] = OPC_dstore;
+ writeUnsignedShort(iArg);
+ } else {
+ if (classFileOffset + 1 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 2;
+ bCodeStream[classFileOffset++] = OPC_dstore;
+ bCodeStream[classFileOffset++] = (byte) iArg;
+ }
+}
+final public void dstore_0() {
+ if (DEBUG) System.out.println(position + "\t\tdstore_0"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 2;
+ if (maxLocals < 2) {
+ maxLocals = 2;
+ }
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_dstore_0;
+}
+final public void dstore_1() {
+ if (DEBUG) System.out.println(position + "\t\tdstore_1"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 2;
+ if (maxLocals < 3) {
+ maxLocals = 3;
+ }
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_dstore_1;
+}
+final public void dstore_2() {
+ if (DEBUG) System.out.println(position + "\t\tdstore_2"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 2;
+ if (maxLocals < 4) {
+ maxLocals = 4;
+ }
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_dstore_2;
+}
+final public void dstore_3() {
+ if (DEBUG) System.out.println(position + "\t\tdstore_3"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 2;
+ if (maxLocals < 5) {
+ maxLocals = 5;
+ }
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_dstore_3;
+}
+final public void dsub() {
+ if (DEBUG) System.out.println(position + "\t\tdsub"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 2;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_dsub;
+}
+final public void dup() {
+ if (DEBUG) System.out.println(position + "\t\tdup"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (stackDepth > stackMax) {
+ stackMax = stackDepth;
+ }
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_dup;
+}
+final public void dup_x1() {
+ if (DEBUG) System.out.println(position + "\t\tdup_x1"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_dup_x1;
+}
+final public void dup_x2() {
+ if (DEBUG) System.out.println(position + "\t\tdup_x2"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_dup_x2;
+}
+final public void dup2() {
+ if (DEBUG) System.out.println(position + "\t\tdup2"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth += 2;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_dup2;
+}
+final public void dup2_x1() {
+ if (DEBUG) System.out.println(position + "\t\tdup2_x1"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth += 2;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_dup2_x1;
+}
+final public void dup2_x2() {
+ if (DEBUG) System.out.println(position + "\t\tdup2_x2"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth += 2;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_dup2_x2;
+}
+public void exitUserScope(BlockScope blockScope) {
+ // mark all the scope's locals as loosing their definite assignment
+
+ if (!generateLocalVariableTableAttributes)
+ return;
+ for (int i = 0; i < visibleLocalsCount; i++) {
+ LocalVariableBinding visibleLocal = visibleLocals[i];
+ if ((visibleLocal != null) && (visibleLocal.declaringScope == blockScope)) {
+ // there maybe some some preserved locals never initialized
+ if (visibleLocal.initializationCount > 0){
+ visibleLocals[i].recordInitializationEndPC(position);
+ }
+ visibleLocals[i] = null; // this variable is no longer visible afterwards
+ }
+ }
+}
+final public void f2d() {
+ if (DEBUG) System.out.println(position + "\t\tf2d"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_f2d;
+}
+final public void f2i() {
+ if (DEBUG) System.out.println(position + "\t\tf2i"); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_f2i;
+}
+final public void f2l() {
+ if (DEBUG) System.out.println(position + "\t\tf2l"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_f2l;
+}
+final public void fadd() {
+ if (DEBUG) System.out.println(position + "\t\tfadd"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_fadd;
+}
+final public void faload() {
+ if (DEBUG) System.out.println(position + "\t\tfaload"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_faload;
+}
+final public void fastore() {
+ if (DEBUG) System.out.println(position + "\t\tfaload"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 3;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_fastore;
+}
+final public void fcmpg() {
+ if (DEBUG) System.out.println(position + "\t\tfcmpg"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_fcmpg;
+}
+final public void fcmpl() {
+ if (DEBUG) System.out.println(position + "\t\tfcmpl"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_fcmpl;
+}
+final public void fconst_0() {
+ if (DEBUG) System.out.println(position + "\t\tfconst_0"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_fconst_0;
+}
+final public void fconst_1() {
+ if (DEBUG) System.out.println(position + "\t\tfconst_1"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_fconst_1;
+}
+final public void fconst_2() {
+ if (DEBUG) System.out.println(position + "\t\tfconst_2"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_fconst_2;
+}
+final public void fdiv() {
+ if (DEBUG) System.out.println(position + "\t\tfdiv"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_fdiv;
+}
+final public void fload(int iArg) {
+ if (DEBUG) System.out.println(position + "\t\tfload:"+iArg); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (maxLocals <= iArg) {
+ maxLocals = iArg + 1;
+ }
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (iArg > 255) { // Widen
+ if (classFileOffset + 3 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 2;
+ bCodeStream[classFileOffset++] = OPC_wide;
+ bCodeStream[classFileOffset++] = OPC_fload;
+ writeUnsignedShort(iArg);
+ } else {
+ if (classFileOffset + 1 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 2;
+ bCodeStream[classFileOffset++] = OPC_fload;
+ bCodeStream[classFileOffset++] = (byte) iArg;
+ }
+}
+final public void fload_0() {
+ if (DEBUG) System.out.println(position + "\t\tfload_0"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (maxLocals == 0) {
+ maxLocals = 1;
+ }
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_fload_0;
+}
+final public void fload_1() {
+ if (DEBUG) System.out.println(position + "\t\tfload_1"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (maxLocals <= 1) {
+ maxLocals = 2;
+ }
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_fload_1;
+}
+final public void fload_2() {
+ if (DEBUG) System.out.println(position + "\t\tfload_2"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (maxLocals <= 2) {
+ maxLocals = 3;
+ }
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_fload_2;
+}
+final public void fload_3() {
+ if (DEBUG) System.out.println(position + "\t\tfload_3"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (maxLocals <= 3) {
+ maxLocals = 4;
+ }
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_fload_3;
+}
+final public void fmul() {
+ if (DEBUG) System.out.println(position + "\t\tfmul"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_fmul;
+}
+final public void fneg() {
+ if (DEBUG) System.out.println(position + "\t\tfneg"); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_fneg;
+}
+final public void frem() {
+ if (DEBUG) System.out.println(position + "\t\tfrem"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_frem;
+}
+final public void freturn() {
+ if (DEBUG) System.out.println(position + "\t\tfreturn"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ // the stackDepth should be equal to 0
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_freturn;
+}
+final public void fstore(int iArg) {
+ if (DEBUG) System.out.println(position + "\t\tfstore:"+iArg); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (maxLocals <= iArg) {
+ maxLocals = iArg + 1;
+ }
+ if (iArg > 255) { // Widen
+ if (classFileOffset + 3 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 2;
+ bCodeStream[classFileOffset++] = OPC_wide;
+ bCodeStream[classFileOffset++] = OPC_fstore;
+ writeUnsignedShort(iArg);
+ } else {
+ if (classFileOffset + 1 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 2;
+ bCodeStream[classFileOffset++] = OPC_fstore;
+ bCodeStream[classFileOffset++] = (byte) iArg;
+ }
+}
+final public void fstore_0() {
+ if (DEBUG) System.out.println(position + "\t\tfstore_0"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (maxLocals == 0) {
+ maxLocals = 1;
+ }
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_fstore_0;
+}
+final public void fstore_1() {
+ if (DEBUG) System.out.println(position + "\t\tfstore_1"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (maxLocals <= 1) {
+ maxLocals = 2;
+ }
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_fstore_1;
+}
+final public void fstore_2() {
+ if (DEBUG) System.out.println(position + "\t\tfstore_2"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (maxLocals <= 2) {
+ maxLocals = 3;
+ }
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_fstore_2;
+}
+final public void fstore_3() {
+ if (DEBUG) System.out.println(position + "\t\tfstore_3"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (maxLocals <= 3) {
+ maxLocals = 4;
+ }
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_fstore_3;
+}
+final public void fsub() {
+ if (DEBUG) System.out.println(position + "\t\tfsub"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_fsub;
+}
+/**
+ * Macro for building a class descriptor object
+ */
+public void generateClassLiteralAccessForType(TypeBinding accessedType, FieldBinding syntheticFieldBinding) {
+ Label endLabel;
+ ExceptionLabel anyExceptionHandler;
+ int saveStackSize;
+ if (accessedType.isBaseType() && accessedType != NullBinding) {
+ this.getTYPE(accessedType.id);
+ return;
+ }
+
+ if (this.targetLevel >= ClassFileConstants.JDK1_5) {
+ // generation using the new ldc_w bytecode
+ this.ldc(accessedType);
+ } else {
+ endLabel = new Label(this);
+ if (syntheticFieldBinding != null) { // non interface case
+ this.getstatic(syntheticFieldBinding);
+ this.dup();
+ this.ifnonnull(endLabel);
+ this.pop();
+ }
+
+ /* Macro for building a class descriptor object... using or not a field cache to store it into...
+ this sequence is responsible for building the actual class descriptor.
+
+ If the fieldCache is set, then it is supposed to be the body of a synthetic access method
+ factoring the actual descriptor creation out of the invocation site (saving space).
+ If the fieldCache is nil, then we are dumping the bytecode on the invocation site, since
+ we have no way to get a hand on the field cache to do better. */
+
+
+ // Wrap the code in an exception handler to convert a ClassNotFoundException into a NoClassDefError
+
+ anyExceptionHandler = new ExceptionLabel(this, BaseTypes.NullBinding /* represents ClassNotFoundException*/);
+ this.ldc(accessedType == BaseTypes.NullBinding ? "java.lang.Object" : String.valueOf(accessedType.constantPoolName()).replace('/', '.')); //$NON-NLS-1$
+ this.invokeClassForName();
+
+ /* See https://bugs.eclipse.org/bugs/show_bug.cgi?id=37565
+ if (accessedType == BaseTypes.NullBinding) {
+ this.ldc("java.lang.Object"); //$NON-NLS-1$
+ } else if (accessedType.isArrayType()) {
+ this.ldc(String.valueOf(accessedType.constantPoolName()).replace('/', '.'));
+ } else {
+ // we make it an array type (to avoid class initialization)
+ this.ldc("[L" + String.valueOf(accessedType.constantPoolName()).replace('/', '.') + ";"); //$NON-NLS-1$//$NON-NLS-2$
+ }
+ this.invokeClassForName();
+ if (!accessedType.isArrayType()) { // extract the component type, which doesn't initialize the class
+ this.invokeJavaLangClassGetComponentType();
+ }
+ */
+ /* We need to protect the runtime code from binary inconsistencies
+ in case the accessedType is missing, the ClassNotFoundException has to be converted
+ into a NoClassDefError(old ex message), we thus need to build an exception handler for this one. */
+ anyExceptionHandler.placeEnd();
+
+ if (syntheticFieldBinding != null) { // non interface case
+ this.dup();
+ this.putstatic(syntheticFieldBinding);
+ }
+ this.goto_(endLabel);
+
+
+ // Generate the body of the exception handler
+ saveStackSize = stackDepth;
+ stackDepth = 1;
+ /* ClassNotFoundException on stack -- the class literal could be doing more things
+ on the stack, which means that the stack may not be empty at this point in the
+ above code gen. So we save its state and restart it from 1. */
+
+ anyExceptionHandler.place();
+
+ // Transform the current exception, and repush and throw a
+ // NoClassDefFoundError(ClassNotFound.getMessage())
+
+ this.newNoClassDefFoundError();
+ this.dup_x1();
+ this.swap();
+
+ // Retrieve the message from the old exception
+ this.invokeThrowableGetMessage();
+
+ // Send the constructor taking a message string as an argument
+ this.invokeNoClassDefFoundErrorStringConstructor();
+ this.athrow();
+ stackDepth = saveStackSize;
+ endLabel.place();
+ }
+}
+/**
+ * This method generates the code attribute bytecode
+ */
+final public void generateCodeAttributeForProblemMethod(String problemMessage) {
+ newJavaLangError();
+ dup();
+ ldc(problemMessage);
+ invokeJavaLangErrorConstructor();
+ athrow();
+}
+public void generateConstant(Constant constant, int implicitConversionCode) {
+ int targetTypeID = implicitConversionCode >> 4;
+ switch (targetTypeID) {
+ case T_boolean :
+ generateInlinedValue(constant.booleanValue());
+ break;
+ case T_char :
+ generateInlinedValue(constant.charValue());
+ break;
+ case T_byte :
+ generateInlinedValue(constant.byteValue());
+ break;
+ case T_short :
+ generateInlinedValue(constant.shortValue());
+ break;
+ case T_int :
+ generateInlinedValue(constant.intValue());
+ break;
+ case T_long :
+ generateInlinedValue(constant.longValue());
+ break;
+ case T_float :
+ generateInlinedValue(constant.floatValue());
+ break;
+ case T_double :
+ generateInlinedValue(constant.doubleValue());
+ break;
+ default : //String or Object
+ ldc(constant.stringValue());
+ }
+}
+/**
+ * Generates the sequence of instructions which will perform the conversion of the expression
+ * on the stack into a different type (e.g. long l = someInt; --> i2l must be inserted).
+ * @param implicitConversionCode int
+ */
+public void generateImplicitConversion(int implicitConversionCode) {
+ switch (implicitConversionCode) {
+ case Float2Char :
+ this.f2i();
+ this.i2c();
+ break;
+ case Double2Char :
+ this.d2i();
+ this.i2c();
+ break;
+ case Int2Char :
+ case Short2Char :
+ case Byte2Char :
+ this.i2c();
+ break;
+ case Long2Char :
+ this.l2i();
+ this.i2c();
+ break;
+ case Char2Float :
+ case Short2Float :
+ case Int2Float :
+ case Byte2Float :
+ this.i2f();
+ break;
+ case Double2Float :
+ this.d2f();
+ break;
+ case Long2Float :
+ this.l2f();
+ break;
+ case Float2Byte :
+ this.f2i();
+ this.i2b();
+ break;
+ case Double2Byte :
+ this.d2i();
+ this.i2b();
+ break;
+ case Int2Byte :
+ case Short2Byte :
+ case Char2Byte :
+ this.i2b();
+ break;
+ case Long2Byte :
+ this.l2i();
+ this.i2b();
+ break;
+ case Byte2Double :
+ case Char2Double :
+ case Short2Double :
+ case Int2Double :
+ this.i2d();
+ break;
+ case Float2Double :
+ this.f2d();
+ break;
+ case Long2Double :
+ this.l2d();
+ break;
+ case Byte2Short :
+ case Char2Short :
+ case Int2Short :
+ this.i2s();
+ break;
+ case Double2Short :
+ this.d2i();
+ this.i2s();
+ break;
+ case Long2Short :
+ this.l2i();
+ this.i2s();
+ break;
+ case Float2Short :
+ this.f2i();
+ this.i2s();
+ break;
+ case Double2Int :
+ this.d2i();
+ break;
+ case Float2Int :
+ this.f2i();
+ break;
+ case Long2Int :
+ this.l2i();
+ break;
+ case Int2Long :
+ case Char2Long :
+ case Byte2Long :
+ case Short2Long :
+ this.i2l();
+ break;
+ case Double2Long :
+ this.d2l();
+ break;
+ case Float2Long :
+ this.f2l();
+ }
+}
+public void generateInlinedValue(byte inlinedValue) {
+ switch (inlinedValue) {
+ case -1 :
+ this.iconst_m1();
+ break;
+ case 0 :
+ this.iconst_0();
+ break;
+ case 1 :
+ this.iconst_1();
+ break;
+ case 2 :
+ this.iconst_2();
+ break;
+ case 3 :
+ this.iconst_3();
+ break;
+ case 4 :
+ this.iconst_4();
+ break;
+ case 5 :
+ this.iconst_5();
+ break;
+ default :
+ if ((-128 <= inlinedValue) && (inlinedValue <= 127)) {
+ this.bipush(inlinedValue);
+ return;
+ }
+ }
+}
+public void generateInlinedValue(char inlinedValue) {
+ switch (inlinedValue) {
+ case 0 :
+ this.iconst_0();
+ break;
+ case 1 :
+ this.iconst_1();
+ break;
+ case 2 :
+ this.iconst_2();
+ break;
+ case 3 :
+ this.iconst_3();
+ break;
+ case 4 :
+ this.iconst_4();
+ break;
+ case 5 :
+ this.iconst_5();
+ break;
+ default :
+ if ((6 <= inlinedValue) && (inlinedValue <= 127)) {
+ this.bipush((byte) inlinedValue);
+ return;
+ }
+ if ((128 <= inlinedValue) && (inlinedValue <= 32767)) {
+ this.sipush(inlinedValue);
+ return;
+ }
+ this.ldc(inlinedValue);
+ }
+}
+public void generateInlinedValue(double inlinedValue) {
+ if (inlinedValue == 0.0) {
+ if (Double.doubleToLongBits(inlinedValue) != 0L)
+ this.ldc2_w(inlinedValue);
+ else
+ this.dconst_0();
+ return;
+ }
+ if (inlinedValue == 1.0) {
+ this.dconst_1();
+ return;
+ }
+ this.ldc2_w(inlinedValue);
+}
+public void generateInlinedValue(float inlinedValue) {
+ if (inlinedValue == 0.0f) {
+ if (Float.floatToIntBits(inlinedValue) != 0)
+ this.ldc(inlinedValue);
+ else
+ this.fconst_0();
+ return;
+ }
+ if (inlinedValue == 1.0f) {
+ this.fconst_1();
+ return;
+ }
+ if (inlinedValue == 2.0f) {
+ this.fconst_2();
+ return;
+ }
+ this.ldc(inlinedValue);
+}
+public void generateInlinedValue(int inlinedValue) {
+ switch (inlinedValue) {
+ case -1 :
+ this.iconst_m1();
+ break;
+ case 0 :
+ this.iconst_0();
+ break;
+ case 1 :
+ this.iconst_1();
+ break;
+ case 2 :
+ this.iconst_2();
+ break;
+ case 3 :
+ this.iconst_3();
+ break;
+ case 4 :
+ this.iconst_4();
+ break;
+ case 5 :
+ this.iconst_5();
+ break;
+ default :
+ if ((-128 <= inlinedValue) && (inlinedValue <= 127)) {
+ this.bipush((byte) inlinedValue);
+ return;
+ }
+ if ((-32768 <= inlinedValue) && (inlinedValue <= 32767)) {
+ this.sipush(inlinedValue);
+ return;
+ }
+ this.ldc(inlinedValue);
+ }
+}
+public void generateInlinedValue(long inlinedValue) {
+ if (inlinedValue == 0) {
+ this.lconst_0();
+ return;
+ }
+ if (inlinedValue == 1) {
+ this.lconst_1();
+ return;
+ }
+ this.ldc2_w(inlinedValue);
+}
+public void generateInlinedValue(short inlinedValue) {
+ switch (inlinedValue) {
+ case -1 :
+ this.iconst_m1();
+ break;
+ case 0 :
+ this.iconst_0();
+ break;
+ case 1 :
+ this.iconst_1();
+ break;
+ case 2 :
+ this.iconst_2();
+ break;
+ case 3 :
+ this.iconst_3();
+ break;
+ case 4 :
+ this.iconst_4();
+ break;
+ case 5 :
+ this.iconst_5();
+ break;
+ default :
+ if ((-128 <= inlinedValue) && (inlinedValue <= 127)) {
+ this.bipush((byte) inlinedValue);
+ return;
+ }
+ this.sipush(inlinedValue);
+ }
+}
+public void generateInlinedValue(boolean inlinedValue) {
+ if (inlinedValue)
+ this.iconst_1();
+ else
+ this.iconst_0();
+}
+public void generateOuterAccess(Object[] mappingSequence, ASTNode invocationSite, Binding target, Scope scope) {
+ if (mappingSequence == null) {
+ if (target instanceof LocalVariableBinding) {
+ scope.problemReporter().needImplementation(); //TODO (philippe) should improve local emulation failure reporting
+ } else {
+ scope.problemReporter().noSuchEnclosingInstance((ReferenceBinding)target, invocationSite, false);
+ }
+ return;
+ }
+ if (mappingSequence == BlockScope.NoEnclosingInstanceInConstructorCall) {
+ scope.problemReporter().noSuchEnclosingInstance((ReferenceBinding)target, invocationSite, true);
+ return;
+ } else if (mappingSequence == BlockScope.NoEnclosingInstanceInStaticContext) {
+ scope.problemReporter().noSuchEnclosingInstance((ReferenceBinding)target, invocationSite, false);
+ return;
+ }
+
+ if (mappingSequence == BlockScope.EmulationPathToImplicitThis) {
+ this.aload_0();
+ return;
+ } else if (mappingSequence[0] instanceof FieldBinding) {
+ FieldBinding fieldBinding = (FieldBinding) mappingSequence[0];
+ this.aload_0();
+ this.getfield(fieldBinding);
+ } else {
+ load((LocalVariableBinding) mappingSequence[0]);
+ }
+ for (int i = 1, length = mappingSequence.length; i < length; i++) {
+ if (mappingSequence[i] instanceof FieldBinding) {
+ FieldBinding fieldBinding = (FieldBinding) mappingSequence[i];
+ this.getfield(fieldBinding);
+ } else {
+ this.invokestatic((MethodBinding) mappingSequence[i]);
+ }
+ }
+}
+
+/**
+ * The equivalent code performs a string conversion:
+ *
+ * @param blockScope the given blockScope
+ * @param oper1 the first expression
+ * @param oper2 the second expression
+ */
+public void generateStringConcatenationAppend(BlockScope blockScope, Expression oper1, Expression oper2) {
+ int pc;
+ if (oper1 == null) {
+ /* Operand is already on the stack, and maybe nil:
+ note type1 is always to java.lang.String here.*/
+ this.newStringContatenation();
+ this.dup_x1();
+ this.swap();
+ // If argument is reference type, need to transform it
+ // into a string (handles null case)
+ this.invokeStringValueOf(T_Object);
+ this.invokeStringConcatenationStringConstructor();
+ } else {
+ pc = position;
+ oper1.generateOptimizedStringConcatenationCreation(blockScope, this, oper1.implicitConversion & 0xF);
+ this.recordPositionsFrom(pc, oper1.sourceStart);
+ }
+ pc = position;
+ oper2.generateOptimizedStringConcatenation(blockScope, this, oper2.implicitConversion & 0xF);
+ this.recordPositionsFrom(pc, oper2.sourceStart);
+ this.invokeStringConcatenationToString();
+}
+/**
+ * Code responsible to generate the suitable code to supply values for the synthetic enclosing
+ * instance arguments of a constructor invocation of a nested type.
+ */
+public void generateSyntheticEnclosingInstanceValues(
+ BlockScope currentScope,
+ ReferenceBinding targetType,
+ Expression enclosingInstance,
+ ASTNode invocationSite) {
+
+ // supplying enclosing instance for the anonymous type's superclass
+ ReferenceBinding checkedTargetType = targetType.isAnonymousType() ? targetType.superclass() : targetType;
+ boolean hasExtraEnclosingInstance = enclosingInstance != null;
+ if (hasExtraEnclosingInstance
+ && (!checkedTargetType.isNestedType() || checkedTargetType.isStatic())) {
+ currentScope.problemReporter().unnecessaryEnclosingInstanceSpecification(enclosingInstance, checkedTargetType);
+ return;
+ }
+
+ // perform some emulation work in case there is some and we are inside a local type only
+ ReferenceBinding[] syntheticArgumentTypes;
+ if ((syntheticArgumentTypes = targetType.syntheticEnclosingInstanceTypes()) != null) {
+
+ ReferenceBinding targetEnclosingType = checkedTargetType.enclosingType();
+ boolean complyTo14 = currentScope.environment().options.complianceLevel >= ClassFileConstants.JDK1_4;
+ // deny access to enclosing instance argument for allocation and super constructor call (if 1.4)
+ boolean ignoreEnclosingArgInConstructorCall = invocationSite instanceof AllocationExpression
+ || (complyTo14 && ((invocationSite instanceof ExplicitConstructorCall && ((ExplicitConstructorCall)invocationSite).isSuperAccess())));
+
+ for (int i = 0, max = syntheticArgumentTypes.length; i < max; i++) {
+ ReferenceBinding syntheticArgType = syntheticArgumentTypes[i];
+ if (hasExtraEnclosingInstance && syntheticArgType == targetEnclosingType) {
+ hasExtraEnclosingInstance = false;
+ enclosingInstance.generateCode(currentScope, this, true);
+ if (complyTo14){
+ dup();
+ invokeObjectGetClass(); // will perform null check
+ pop();
+ }
+ } else {
+ Object[] emulationPath = currentScope.getEmulationPath(
+ syntheticArgType,
+ false /*not only exact match (that is, allow compatible)*/,
+ ignoreEnclosingArgInConstructorCall);
+ this.generateOuterAccess(emulationPath, invocationSite, syntheticArgType, currentScope);
+ }
+ }
+ if (hasExtraEnclosingInstance){
+ currentScope.problemReporter().unnecessaryEnclosingInstanceSpecification(enclosingInstance, checkedTargetType);
+ }
+ }
+}
+
+/**
+ * Code responsible to generate the suitable code to supply values for the synthetic outer local
+ * variable arguments of a constructor invocation of a nested type.
+ * (bug 26122) - synthetic values for outer locals must be passed after user arguments, e.g. new X(i = 1){}
+ */
+public void generateSyntheticOuterArgumentValues(BlockScope currentScope, ReferenceBinding targetType, ASTNode invocationSite) {
+
+ // generate the synthetic outer arguments then
+ SyntheticArgumentBinding syntheticArguments[];
+ if ((syntheticArguments = targetType.syntheticOuterLocalVariables()) != null) {
+ for (int i = 0, max = syntheticArguments.length; i < max; i++) {
+ LocalVariableBinding targetVariable = syntheticArguments[i].actualOuterLocalVariable;
+ VariableBinding[] emulationPath = currentScope.getEmulationPath(targetVariable);
+ this.generateOuterAccess(emulationPath, invocationSite, targetVariable, currentScope);
+ }
+ }
+}
+
+/**
+ * @param accessBinding the access method binding to generate
+ */
+public void generateSyntheticBodyForConstructorAccess(SyntheticAccessMethodBinding accessBinding) {
+
+ initializeMaxLocals(accessBinding);
+
+ MethodBinding constructorBinding = accessBinding.targetMethod;
+ TypeBinding[] parameters = constructorBinding.parameters;
+ int length = parameters.length;
+ int resolvedPosition = 1;
+ this.aload_0();
+ if (constructorBinding.declaringClass.isNestedType()) {
+ NestedTypeBinding nestedType = (NestedTypeBinding) constructorBinding.declaringClass;
+ SyntheticArgumentBinding[] syntheticArguments = nestedType.syntheticEnclosingInstances();
+ for (int i = 0; i < (syntheticArguments == null ? 0 : syntheticArguments.length); i++) {
+ TypeBinding type;
+ load((type = syntheticArguments[i].type), resolvedPosition);
+ if ((type == DoubleBinding) || (type == LongBinding))
+ resolvedPosition += 2;
+ else
+ resolvedPosition++;
+ }
+ }
+ for (int i = 0; i < length; i++) {
+ load(parameters[i], resolvedPosition);
+ if ((parameters[i] == DoubleBinding) || (parameters[i] == LongBinding))
+ resolvedPosition += 2;
+ else
+ resolvedPosition++;
+ }
+
+ if (constructorBinding.declaringClass.isNestedType()) {
+ NestedTypeBinding nestedType = (NestedTypeBinding) constructorBinding.declaringClass;
+ SyntheticArgumentBinding[] syntheticArguments = nestedType.syntheticOuterLocalVariables();
+ for (int i = 0; i < (syntheticArguments == null ? 0 : syntheticArguments.length); i++) {
+ TypeBinding type;
+ load((type = syntheticArguments[i].type), resolvedPosition);
+ if ((type == DoubleBinding) || (type == LongBinding))
+ resolvedPosition += 2;
+ else
+ resolvedPosition++;
+ }
+ }
+ this.invokespecial(constructorBinding);
+ this.return_();
+}
+public void generateSyntheticBodyForFieldReadAccess(SyntheticAccessMethodBinding accessBinding) {
+ initializeMaxLocals(accessBinding);
+ FieldBinding fieldBinding = accessBinding.targetReadField;
+ TypeBinding type;
+ if (fieldBinding.isStatic())
+ this.getstatic(fieldBinding);
+ else {
+ this.aload_0();
+ this.getfield(fieldBinding);
+ }
+ if ((type = fieldBinding.type).isBaseType()) {
+ if (type == IntBinding)
+ this.ireturn();
+ else
+ if (type == FloatBinding)
+ this.freturn();
+ else
+ if (type == LongBinding)
+ this.lreturn();
+ else
+ if (type == DoubleBinding)
+ this.dreturn();
+ else
+ this.ireturn();
+ } else
+ this.areturn();
+}
+public void generateSyntheticBodyForFieldWriteAccess(SyntheticAccessMethodBinding accessBinding) {
+ initializeMaxLocals(accessBinding);
+ FieldBinding fieldBinding = accessBinding.targetWriteField;
+ if (fieldBinding.isStatic()) {
+ load(fieldBinding.type, 0);
+ this.putstatic(fieldBinding);
+ } else {
+ this.aload_0();
+ load(fieldBinding.type, 1);
+ this.putfield(fieldBinding);
+ }
+ this.return_();
+}
+public void generateSyntheticBodyForMethodAccess(SyntheticAccessMethodBinding accessBinding) {
+
+ initializeMaxLocals(accessBinding);
+ MethodBinding methodBinding = accessBinding.targetMethod;
+ TypeBinding[] parameters = methodBinding.parameters;
+ int length = parameters.length;
+ TypeBinding[] arguments = accessBinding.accessType == SyntheticAccessMethodBinding.BridgeMethodAccess
+ ? accessBinding.parameters
+ : null;
+ int resolvedPosition;
+ if (methodBinding.isStatic())
+ resolvedPosition = 0;
+ else {
+ this.aload_0();
+ resolvedPosition = 1;
+ }
+ for (int i = 0; i < length; i++) {
+ TypeBinding parameter = parameters[i];
+ if (arguments != null) { // for bridge methods
+ TypeBinding argument = arguments[i];
+ load(argument, resolvedPosition);
+ if (argument != parameter)
+ checkcast(parameter);
+ } else {
+ load(parameter, resolvedPosition);
+ }
+ if ((parameter == DoubleBinding) || (parameter == LongBinding))
+ resolvedPosition += 2;
+ else
+ resolvedPosition++;
+ }
+ TypeBinding type;
+ if (methodBinding.isStatic())
+ this.invokestatic(methodBinding);
+ else {
+ if (methodBinding.isConstructor()
+ || methodBinding.isPrivate()
+ // qualified super "X.super.foo()" targets methods from superclass
+ || accessBinding.accessType == SyntheticAccessMethodBinding.SuperMethodAccess){
+ this.invokespecial(methodBinding);
+ } else {
+ if (methodBinding.declaringClass.isInterface()){
+ this.invokeinterface(methodBinding);
+ } else {
+ this.invokevirtual(methodBinding);
+ }
+ }
+ }
+ if ((type = methodBinding.returnType).isBaseType())
+ if (type == VoidBinding)
+ this.return_();
+ else
+ if (type == IntBinding)
+ this.ireturn();
+ else
+ if (type == FloatBinding)
+ this.freturn();
+ else
+ if (type == LongBinding)
+ this.lreturn();
+ else
+ if (type == DoubleBinding)
+ this.dreturn();
+ else
+ this.ireturn();
+ else
+ this.areturn();
+}
+final public byte[] getContents() {
+ byte[] contents;
+ System.arraycopy(bCodeStream, 0, contents = new byte[position], 0, position);
+ return contents;
+}
+final public void getfield(FieldBinding fieldBinding) {
+ if (DEBUG) System.out.println(position + "\t\tgetfield:"+fieldBinding); //$NON-NLS-1$
+ countLabels = 0;
+ if ((fieldBinding.type.id == T_double) || (fieldBinding.type.id == T_long)) {
+ if (++stackDepth > stackMax)
+ stackMax = stackDepth;
+ }
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_getfield;
+ writeUnsignedShort(constantPool.literalIndex(fieldBinding));
+}
+final public void getstatic(FieldBinding fieldBinding) {
+ if (DEBUG) System.out.println(position + "\t\tgetstatic:"+fieldBinding); //$NON-NLS-1$
+ countLabels = 0;
+ if ((fieldBinding.type.id == T_double) || (fieldBinding.type.id == T_long))
+ stackDepth += 2;
+ else
+ stackDepth += 1;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_getstatic;
+ writeUnsignedShort(constantPool.literalIndex(fieldBinding));
+}
+public void getTYPE(int baseTypeID) {
+ countLabels = 0;
+ if (++stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_getstatic;
+ switch (baseTypeID) {
+ case T_byte :
+ // getstatic: java.lang.Byte.TYPE
+ if (DEBUG) System.out.println(position + "\t\tgetstatic: java.lang.Byte.TYPE"); //$NON-NLS-1$
+ writeUnsignedShort(constantPool.literalIndexForJavaLangByteTYPE());
+ break;
+ case T_short :
+ // getstatic: java.lang.Short.TYPE
+ if (DEBUG) System.out.println(position + "\t\tgetstatic: java.lang.Short.TYPE"); //$NON-NLS-1$
+ writeUnsignedShort(constantPool.literalIndexForJavaLangShortTYPE());
+ break;
+ case T_char :
+ // getstatic: java.lang.Character.TYPE
+ if (DEBUG) System.out.println(position + "\t\tgetstatic: java.lang.Character.TYPE"); //$NON-NLS-1$
+ writeUnsignedShort(constantPool.literalIndexForJavaLangCharacterTYPE());
+ break;
+ case T_int :
+ // getstatic: java.lang.Integer.TYPE
+ if (DEBUG) System.out.println(position + "\t\tgetstatic: java.lang.Integer.TYPE"); //$NON-NLS-1$
+ writeUnsignedShort(constantPool.literalIndexForJavaLangIntegerTYPE());
+ break;
+ case T_long :
+ // getstatic: java.lang.Long.TYPE
+ if (DEBUG) System.out.println(position + "\t\tgetstatic: java.lang.Long.TYPE"); //$NON-NLS-1$
+ writeUnsignedShort(constantPool.literalIndexForJavaLangLongTYPE());
+ break;
+ case T_float :
+ // getstatic: java.lang.Float.TYPE
+ if (DEBUG) System.out.println(position + "\t\tgetstatic: java.lang.Float.TYPE"); //$NON-NLS-1$
+ writeUnsignedShort(constantPool.literalIndexForJavaLangFloatTYPE());
+ break;
+ case T_double :
+ // getstatic: java.lang.Double.TYPE
+ if (DEBUG) System.out.println(position + "\t\tgetstatic: java.lang.Double.TYPE"); //$NON-NLS-1$
+ writeUnsignedShort(constantPool.literalIndexForJavaLangDoubleTYPE());
+ break;
+ case T_boolean :
+ // getstatic: java.lang.Boolean.TYPE
+ if (DEBUG) System.out.println(position + "\t\tgetstatic: java.lang.Boolean.TYPE"); //$NON-NLS-1$
+ writeUnsignedShort(constantPool.literalIndexForJavaLangBooleanTYPE());
+ break;
+ case T_void :
+ // getstatic: java.lang.Void.TYPE
+ if (DEBUG) System.out.println(position + "\t\tgetstatic: java.lang.Void.TYPE"); //$NON-NLS-1$
+ writeUnsignedShort(constantPool.literalIndexForJavaLangVoidTYPE());
+ break;
+ }
+}
+/**
+ * We didn't call it goto, because there is a conflit with the goto keyword
+ */
+final public void goto_(Label label) {
+ if (this.wideMode) {
+ this.goto_w(label);
+ return;
+ }
+ if (DEBUG) System.out.println(position + "\t\tgoto:"+label); //$NON-NLS-1$
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ label.inlineForwardReferencesFromLabelsTargeting(position);
+ /*
+ Possible optimization for code such as:
+ public Object foo() {
+ boolean b = true;
+ if (b) {
+ if (b)
+ return null;
+ } else {
+ if (b) {
+ return null;
+ }
+ }
+ return null;
+ }
+ The goto around the else block for the first if will
+ be unreachable, because the thenClause of the second if
+ returns.
+ See inlineForwardReferencesFromLabelsTargeting defined
+ on the Label class for the remaining part of this
+ optimization.
+ if (!lbl.isBranchTarget(position)) {
+ switch(bCodeStream[classFileOffset-1]) {
+ case OPC_return :
+ case OPC_areturn:
+ return;
+ }
+ }*/
+ position++;
+ bCodeStream[classFileOffset++] = OPC_goto;
+ label.branch();
+}
+
+final public void goto_w(Label lbl) {
+ if (DEBUG) System.out.println(position + "\t\tgotow:"+lbl); //$NON-NLS-1$
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_goto_w;
+ lbl.branchWide();
+}
+final public void i2b() {
+ if (DEBUG) System.out.println(position + "\t\ti2b"); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_i2b;
+}
+final public void i2c() {
+ if (DEBUG) System.out.println(position + "\t\ti2c"); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_i2c;
+}
+final public void i2d() {
+ if (DEBUG) System.out.println(position + "\t\ti2d"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_i2d;
+}
+final public void i2f() {
+ if (DEBUG) System.out.println(position + "\t\ti2f"); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_i2f;
+}
+final public void i2l() {
+ if (DEBUG) System.out.println(position + "\t\ti2l"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_i2l;
+}
+final public void i2s() {
+ if (DEBUG) System.out.println(position + "\t\ti2s"); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_i2s;
+}
+final public void iadd() {
+ if (DEBUG) System.out.println(position + "\t\tiadd"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_iadd;
+}
+final public void iaload() {
+ if (DEBUG) System.out.println(position + "\t\tiaload"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_iaload;
+}
+final public void iand() {
+ if (DEBUG) System.out.println(position + "\t\tiand"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_iand;
+}
+final public void iastore() {
+ if (DEBUG) System.out.println(position + "\t\tiastore"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 3;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_iastore;
+}
+final public void iconst_0() {
+ if (DEBUG) System.out.println(position + "\t\ticonst_0"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_iconst_0;
+}
+final public void iconst_1() {
+ if (DEBUG) System.out.println(position + "\t\ticonst_1"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_iconst_1;
+}
+final public void iconst_2() {
+ if (DEBUG) System.out.println(position + "\t\ticonst_2"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_iconst_2;
+}
+final public void iconst_3() {
+ if (DEBUG) System.out.println(position + "\t\ticonst_3"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_iconst_3;
+}
+final public void iconst_4() {
+ if (DEBUG) System.out.println(position + "\t\ticonst_4"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_iconst_4;
+}
+final public void iconst_5() {
+ if (DEBUG) System.out.println(position + "\t\ticonst_5"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_iconst_5;
+}
+final public void iconst_m1() {
+ if (DEBUG) System.out.println(position + "\t\ticonst_m1"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_iconst_m1;
+}
+final public void idiv() {
+ if (DEBUG) System.out.println(position + "\t\tidiv"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_idiv;
+}
+final public void if_acmpeq(Label lbl) {
+ if (DEBUG) System.out.println(position + "\t\tif_acmpeq:"+lbl); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth-=2;
+ if (this.wideMode) {
+ generateWideRevertedConditionalBranch(OPC_if_acmpne, lbl);
+ } else {
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_if_acmpeq;
+ lbl.branch();
+ }
+}
+final public void if_acmpne(Label lbl) {
+ if (DEBUG) System.out.println(position + "\t\tif_acmpne:"+lbl); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth-=2;
+ if (this.wideMode) {
+ generateWideRevertedConditionalBranch(OPC_if_acmpeq, lbl);
+ } else {
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_if_acmpne;
+ lbl.branch();
+ }
+}
+final public void if_icmpeq(Label lbl) {
+ if (DEBUG) System.out.println(position + "\t\tif_cmpeq:"+lbl); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 2;
+ if (this.wideMode) {
+ generateWideRevertedConditionalBranch(OPC_if_icmpne, lbl);
+ } else {
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_if_icmpeq;
+ lbl.branch();
+ }
+}
+final public void if_icmpge(Label lbl) {
+ if (DEBUG) System.out.println(position + "\t\tif_iacmpge:"+lbl); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 2;
+ if (this.wideMode) {
+ generateWideRevertedConditionalBranch(OPC_if_icmplt, lbl);
+ } else {
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_if_icmpge;
+ lbl.branch();
+ }
+}
+final public void if_icmpgt(Label lbl) {
+ if (DEBUG) System.out.println(position + "\t\tif_iacmpgt:"+lbl); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 2;
+ if (this.wideMode) {
+ generateWideRevertedConditionalBranch(OPC_if_icmple, lbl);
+ } else {
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_if_icmpgt;
+ lbl.branch();
+ }
+}
+final public void if_icmple(Label lbl) {
+ if (DEBUG) System.out.println(position + "\t\tif_iacmple:"+lbl); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 2;
+ if (this.wideMode) {
+ generateWideRevertedConditionalBranch(OPC_if_icmpgt, lbl);
+ } else {
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_if_icmple;
+ lbl.branch();
+ }
+}
+final public void if_icmplt(Label lbl) {
+ if (DEBUG) System.out.println(position + "\t\tif_iacmplt:"+lbl); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 2;
+ if (this.wideMode) {
+ generateWideRevertedConditionalBranch(OPC_if_icmpge, lbl);
+ } else {
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_if_icmplt;
+ lbl.branch();
+ }
+}
+final public void if_icmpne(Label lbl) {
+ if (DEBUG) System.out.println(position + "\t\tif_iacmpne:"+lbl); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 2;
+ if (this.wideMode) {
+ generateWideRevertedConditionalBranch(OPC_if_icmpeq, lbl);
+ } else {
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_if_icmpne;
+ lbl.branch();
+ }
+}
+final public void ifeq(Label lbl) {
+ if (DEBUG) System.out.println(position + "\t\tifeq:"+lbl); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (this.wideMode) {
+ generateWideRevertedConditionalBranch(OPC_ifne, lbl);
+ } else {
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_ifeq;
+ lbl.branch();
+ }
+}
+final public void ifge(Label lbl) {
+ if (DEBUG) System.out.println(position + "\t\tifge:"+lbl); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (this.wideMode) {
+ generateWideRevertedConditionalBranch(OPC_iflt, lbl);
+ } else {
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_ifge;
+ lbl.branch();
+ }
+}
+final public void ifgt(Label lbl) {
+ if (DEBUG) System.out.println(position + "\t\tifgt:"+lbl); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (this.wideMode) {
+ generateWideRevertedConditionalBranch(OPC_ifle, lbl);
+ } else {
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_ifgt;
+ lbl.branch();
+ }
+}
+final public void ifle(Label lbl) {
+ if (DEBUG) System.out.println(position + "\t\tifle:"+lbl); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (this.wideMode) {
+ generateWideRevertedConditionalBranch(OPC_ifgt, lbl);
+ } else {
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_ifle;
+ lbl.branch();
+ }
+}
+final public void iflt(Label lbl) {
+ if (DEBUG) System.out.println(position + "\t\tiflt:"+lbl); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (this.wideMode) {
+ generateWideRevertedConditionalBranch(OPC_ifge, lbl);
+ } else {
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_iflt;
+ lbl.branch();
+ }
+}
+final public void ifne(Label lbl) {
+ if (DEBUG) System.out.println(position + "\t\tifne:"+lbl); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (this.wideMode) {
+ generateWideRevertedConditionalBranch(OPC_ifeq, lbl);
+ } else {
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_ifne;
+ lbl.branch();
+ }
+}
+final public void ifnonnull(Label lbl) {
+ if (DEBUG) System.out.println(position + "\t\tifnonnull:"+lbl); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (this.wideMode) {
+ generateWideRevertedConditionalBranch(OPC_ifnull, lbl);
+ } else {
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_ifnonnull;
+ lbl.branch();
+ }
+}
+final public void ifnull(Label lbl) {
+ if (DEBUG) System.out.println(position + "\t\tifnull:"+lbl); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (this.wideMode) {
+ generateWideRevertedConditionalBranch(OPC_ifnonnull, lbl);
+ } else {
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_ifnull;
+ lbl.branch();
+ }
+}
+final public void iinc(int index, int value) {
+ if (DEBUG) System.out.println(position + "\t\tiinc:"+index+","+value); //$NON-NLS-1$ //$NON-NLS-2$
+ countLabels = 0;
+ if ((index > 255) || (value < -128 || value > 127)) { // have to widen
+ if (classFileOffset + 3 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 2;
+ bCodeStream[classFileOffset++] = OPC_wide;
+ bCodeStream[classFileOffset++] = OPC_iinc;
+ writeUnsignedShort(index);
+ writeSignedShort(value);
+ } else {
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 3;
+ bCodeStream[classFileOffset++] = OPC_iinc;
+ bCodeStream[classFileOffset++] = (byte) index;
+ bCodeStream[classFileOffset++] = (byte) value;
+ }
+}
+final public void iload(int iArg) {
+ if (DEBUG) System.out.println(position + "\t\tiload:"+iArg); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (maxLocals <= iArg) {
+ maxLocals = iArg + 1;
+ }
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (iArg > 255) { // Widen
+ if (classFileOffset + 3 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 2;
+ bCodeStream[classFileOffset++] = OPC_wide;
+ bCodeStream[classFileOffset++] = OPC_iload;
+ writeUnsignedShort(iArg);
+ } else {
+ if (classFileOffset + 1 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 2;
+ bCodeStream[classFileOffset++] = OPC_iload;
+ bCodeStream[classFileOffset++] = (byte) iArg;
+ }
+}
+final public void iload_0() {
+ if (DEBUG) System.out.println(position + "\t\tiload_0"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (maxLocals <= 0) {
+ maxLocals = 1;
+ }
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_iload_0;
+}
+final public void iload_1() {
+ if (DEBUG) System.out.println(position + "\t\tiload_1"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (maxLocals <= 1) {
+ maxLocals = 2;
+ }
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_iload_1;
+}
+final public void iload_2() {
+ if (DEBUG) System.out.println(position + "\t\tiload_2"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (maxLocals <= 2) {
+ maxLocals = 3;
+ }
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_iload_2;
+}
+final public void iload_3() {
+ if (DEBUG) System.out.println(position + "\t\tiload_3"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (maxLocals <= 3) {
+ maxLocals = 4;
+ }
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_iload_3;
+}
+final public void imul() {
+ if (DEBUG) System.out.println(position + "\t\timul"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_imul;
+}
+public void incrementTemp(LocalVariableBinding localBinding, int value) {
+ if (value == (short) value) {
+ this.iinc(localBinding.resolvedPosition, value);
+ return;
+ }
+ load(localBinding);
+ this.ldc(value);
+ this.iadd();
+ store(localBinding, false);
+}
+public void incrStackSize(int offset) {
+ if ((stackDepth += offset) > stackMax)
+ stackMax = stackDepth;
+}
+public int indexOfSameLineEntrySincePC(int pc, int line) {
+ for (int index = pc, max = pcToSourceMapSize; index < max; index+=2) {
+ if (pcToSourceMap[index+1] == line)
+ return index;
+ }
+ return -1;
+}
+final public void ineg() {
+ if (DEBUG) System.out.println(position + "\t\tineg"); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_ineg;
+}
+public void init(ClassFile targetClassFile) {
+ this.classFile = targetClassFile;
+ this.constantPool = targetClassFile.constantPool;
+ this.bCodeStream = targetClassFile.contents;
+ this.classFileOffset = targetClassFile.contentsOffset;
+ this.startingClassFileOffset = this.classFileOffset;
+ pcToSourceMapSize = 0;
+ lastEntryPC = 0;
+ int length = visibleLocals.length;
+ if (noVisibleLocals.length < length) {
+ noVisibleLocals = new LocalVariableBinding[length];
+ }
+ System.arraycopy(noVisibleLocals, 0, visibleLocals, 0, length);
+ visibleLocalsCount = 0;
+
+ length = locals.length;
+ if (noLocals.length < length) {
+ noLocals = new LocalVariableBinding[length];
+ }
+ System.arraycopy(noLocals, 0, locals, 0, length);
+ allLocalsCounter = 0;
+
+ length = exceptionHandlers.length;
+ if (noExceptionHandlers.length < length) {
+ noExceptionHandlers = new ExceptionLabel[length];
+ }
+ System.arraycopy(noExceptionHandlers, 0, exceptionHandlers, 0, length);
+ exceptionHandlersIndex = 0;
+ exceptionHandlersCounter = 0;
+
+ length = labels.length;
+ if (noLabels.length < length) {
+ noLabels = new Label[length];
+ }
+ System.arraycopy(noLabels, 0, labels, 0, length);
+ countLabels = 0;
+
+ stackMax = 0;
+ stackDepth = 0;
+ maxLocals = 0;
+ position = 0;
+}
+/**
+ * @param methodBinding the given method binding to initialize the max locals
+ */
+public void initializeMaxLocals(MethodBinding methodBinding) {
+
+ maxLocals = (methodBinding == null || methodBinding.isStatic()) ? 0 : 1;
+ // take into account the synthetic parameters
+ if (methodBinding != null) {
+ if (methodBinding.isConstructor() && methodBinding.declaringClass.isNestedType()) {
+ ReferenceBinding enclosingInstanceTypes[];
+ if ((enclosingInstanceTypes = methodBinding.declaringClass.syntheticEnclosingInstanceTypes()) != null) {
+ for (int i = 0, max = enclosingInstanceTypes.length; i < max; i++) {
+ maxLocals++; // an enclosingInstanceType can only be a reference binding. It cannot be
+ // LongBinding or DoubleBinding
+ }
+ }
+ SyntheticArgumentBinding syntheticArguments[];
+ if ((syntheticArguments = methodBinding.declaringClass.syntheticOuterLocalVariables()) != null) {
+ for (int i = 0, max = syntheticArguments.length; i < max; i++) {
+ TypeBinding argType;
+ if (((argType = syntheticArguments[i].type) == LongBinding) || (argType == DoubleBinding)) {
+ maxLocals += 2;
+ } else {
+ maxLocals++;
+ }
+ }
+ }
+ }
+ TypeBinding[] arguments;
+ if ((arguments = methodBinding.parameters) != null) {
+ for (int i = 0, max = arguments.length; i < max; i++) {
+ TypeBinding argType;
+ if (((argType = arguments[i]) == LongBinding) || (argType == DoubleBinding)) {
+ maxLocals += 2;
+ } else {
+ maxLocals++;
+ }
+ }
+ }
+ }
+}
+/**
+ * This methods searches for an existing entry inside the pcToSourceMap table with a pc equals to @pc.
+ * If there is an existing entry it returns -1 (no insertion required).
+ * Otherwise it returns the index where the entry for the pc has to be inserted.
+ * This is based on the fact that the pcToSourceMap table is sorted according to the pc.
+ *
+ * @param pcToSourceMap the given pcToSourceMap array
+ * @param length the given length
+ * @param pc the given pc
+ * @return int
+ */
+public static int insertionIndex(int[] pcToSourceMap, int length, int pc) {
+ int g = 0;
+ int d = length - 2;
+ int m = 0;
+ while (g <= d) {
+ m = (g + d) / 2;
+ // we search only on even indexes
+ if ((m % 2) != 0)
+ m--;
+ int currentPC = pcToSourceMap[m];
+ if (pc < currentPC) {
+ d = m - 2;
+ } else
+ if (pc > currentPC) {
+ g = m + 2;
+ } else {
+ return -1;
+ }
+ }
+ if (pc < pcToSourceMap[m])
+ return m;
+ return m + 2;
+}
+/**
+ * We didn't call it instanceof because there is a conflit with the
+ * instanceof keyword
+ */
+final public void instance_of(TypeBinding typeBinding) {
+ if (DEBUG) System.out.println(position + "\t\tinstance_of:"+typeBinding); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_instanceof;
+ writeUnsignedShort(constantPool.literalIndex(typeBinding));
+}
+public void invokeClassForName() {
+ // invokestatic: java.lang.Class.forName(Ljava.lang.String;)Ljava.lang.Class;
+ if (DEBUG) System.out.println(position + "\t\tinvokestatic: java.lang.Class.forName(Ljava.lang.String;)Ljava.lang.Class;"); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_invokestatic;
+ writeUnsignedShort(constantPool.literalIndexForJavaLangClassForName());
+}
+public void invokeJavaLangClassDesiredAssertionStatus() {
+ // invokevirtual: java.lang.Class.desiredAssertionStatus()Z;
+ if (DEBUG) System.out.println(position + "\t\tinvokevirtual: java.lang.Class.desiredAssertionStatus()Z;"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_invokevirtual;
+ writeUnsignedShort(constantPool.literalIndexForJavaLangClassDesiredAssertionStatus());
+}
+
+public void invokeJavaLangClassGetComponentType() {
+ // invokevirtual: java.lang.Class.getComponentType()java.lang.Class;
+ if (DEBUG) System.out.println(position + "\t\tinvokevirtual: java.lang.Class.getComponentType()java.lang.Class;"); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_invokevirtual;
+ writeUnsignedShort(constantPool.literalIndexForJavaLangClassGetComponentType());
+}
+
+final public void invokeinterface(MethodBinding methodBinding) {
+ // initialized to 1 to take into account this immediately
+ if (DEBUG) System.out.println(position + "\t\tinvokeinterface: " + methodBinding); //$NON-NLS-1$
+ countLabels = 0;
+ int argCount = 1;
+ int id;
+ if (classFileOffset + 4 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 3;
+ bCodeStream[classFileOffset++] = OPC_invokeinterface;
+ writeUnsignedShort(constantPool.literalIndex(methodBinding));
+ for (int i = methodBinding.parameters.length - 1; i >= 0; i--)
+ if (((id = methodBinding.parameters[i].id) == T_double) || (id == T_long))
+ argCount += 2;
+ else
+ argCount += 1;
+ bCodeStream[classFileOffset++] = (byte) argCount;
+ // Generate a 0 into the byte array. Like the array is already fill with 0, we just need to increment
+ // the number of bytes.
+ bCodeStream[classFileOffset++] = 0;
+ if (((id = methodBinding.returnType.id) == T_double) || (id == T_long)) {
+ stackDepth += (2 - argCount);
+ } else {
+ if (id == T_void) {
+ stackDepth -= argCount;
+ } else {
+ stackDepth += (1 - argCount);
+ }
+ }
+ if (stackDepth > stackMax) {
+ stackMax = stackDepth;
+ }
+}
+public void invokeJavaLangErrorConstructor() {
+ // invokespecial: java.lang.Error<init>(Ljava.lang.String;)V
+ if (DEBUG) System.out.println(position + "\t\tinvokespecial: java.lang.Error<init>(Ljava.lang.String;)V"); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_invokespecial;
+ stackDepth -= 2;
+ writeUnsignedShort(constantPool.literalIndexForJavaLangErrorConstructor());
+}
+public void invokeNoClassDefFoundErrorStringConstructor() {
+ // invokespecial: java.lang.NoClassDefFoundError.<init>(Ljava.lang.String;)V
+ if (DEBUG) System.out.println(position + "\t\tinvokespecial: java.lang.NoClassDefFoundError.<init>(Ljava.lang.String;)V"); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_invokespecial;
+ stackDepth -= 2;
+ writeUnsignedShort(constantPool.literalIndexForJavaLangNoClassDefFoundErrorStringConstructor());
+}
+public void invokeObjectGetClass() {
+ // invokevirtual: java.lang.Object.getClass()Ljava.lang.Class;
+ if (DEBUG) System.out.println(position + "\t\tinvokevirtual: java.lang.Object.getClass()Ljava.lang.Class;"); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_invokevirtual;
+ writeUnsignedShort(constantPool.literalIndexForJavaLangObjectGetClass());
+}
+
+final public void invokespecial(MethodBinding methodBinding) {
+ if (DEBUG) System.out.println(position + "\t\tinvokespecial:"+methodBinding); //$NON-NLS-1$
+ // initialized to 1 to take into account this immediately
+ countLabels = 0;
+ int argCount = 1;
+ int id;
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_invokespecial;
+ writeUnsignedShort(constantPool.literalIndex(methodBinding));
+ if (methodBinding.isConstructor() && methodBinding.declaringClass.isNestedType()) {
+ // enclosing instances
+ TypeBinding[] syntheticArgumentTypes = methodBinding.declaringClass.syntheticEnclosingInstanceTypes();
+ if (syntheticArgumentTypes != null) {
+ for (int i = 0, max = syntheticArgumentTypes.length; i < max; i++) {
+ if (((id = syntheticArgumentTypes[i].id) == T_double) || (id == T_long)) {
+ argCount += 2;
+ } else {
+ argCount++;
+ }
+ }
+ }
+ // outer local variables
+ SyntheticArgumentBinding[] syntheticArguments = methodBinding.declaringClass.syntheticOuterLocalVariables();
+ if (syntheticArguments != null) {
+ for (int i = 0, max = syntheticArguments.length; i < max; i++) {
+ if (((id = syntheticArguments[i].type.id) == T_double) || (id == T_long)) {
+ argCount += 2;
+ } else {
+ argCount++;
+ }
+ }
+ }
+ }
+ for (int i = methodBinding.parameters.length - 1; i >= 0; i--)
+ if (((id = methodBinding.parameters[i].id) == T_double) || (id == T_long))
+ argCount += 2;
+ else
+ argCount++;
+ if (((id = methodBinding.returnType.id) == T_double) || (id == T_long))
+ stackDepth += (2 - argCount);
+ else
+ if (id == T_void)
+ stackDepth -= argCount;
+ else
+ stackDepth += (1 - argCount);
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+}
+final public void invokestatic(MethodBinding methodBinding) {
+ if (DEBUG) System.out.println(position + "\t\tinvokestatic:"+methodBinding); //$NON-NLS-1$
+ // initialized to 0 to take into account that there is no this for
+ // a static method
+ countLabels = 0;
+ int argCount = 0;
+ int id;
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_invokestatic;
+ writeUnsignedShort(constantPool.literalIndex(methodBinding));
+ for (int i = methodBinding.parameters.length - 1; i >= 0; i--)
+ if (((id = methodBinding.parameters[i].id) == T_double) || (id == T_long))
+ argCount += 2;
+ else
+ argCount += 1;
+ if (((id = methodBinding.returnType.id) == T_double) || (id == T_long))
+ stackDepth += (2 - argCount);
+ else
+ if (id == T_void)
+ stackDepth -= argCount;
+ else
+ stackDepth += (1 - argCount);
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+}
+/**
+ * The equivalent code performs a string conversion of the TOS
+ * @param typeID <CODE>int</CODE>
+ */
+public void invokeStringConcatenationAppendForType(int typeID) {
+ if (DEBUG) {
+ if (this.targetLevel >= JDK1_5) {
+ System.out.println(position + "\t\tinvokevirtual: java.lang.StringBuilder.append(...)"); //$NON-NLS-1$
+ } else {
+ System.out.println(position + "\t\tinvokevirtual: java.lang.StringBuffer.append(...)"); //$NON-NLS-1$
+ }
+ }
+ countLabels = 0;
+ int usedTypeID;
+ if (typeID == T_null) {
+ usedTypeID = T_String;
+ } else {
+ usedTypeID = typeID;
+ }
+ // invokevirtual
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_invokevirtual;
+ if (this.targetLevel >= JDK1_5) {
+ writeUnsignedShort(constantPool.literalIndexForJavaLangStringBuilderAppend(typeID));
+ } else {
+ writeUnsignedShort(constantPool.literalIndexForJavaLangStringBufferAppend(typeID));
+ }
+ if ((usedTypeID == T_long) || (usedTypeID == T_double)) {
+ stackDepth -= 2;
+ } else {
+ stackDepth--;
+ }
+}
+
+public void invokeJavaLangAssertionErrorConstructor(int typeBindingID) {
+ // invokespecial: java.lang.AssertionError.<init>(typeBindingID)V
+ if (DEBUG) System.out.println(position + "\t\tinvokespecial: java.lang.AssertionError.<init>(typeBindingID)V"); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_invokespecial;
+ writeUnsignedShort(constantPool.literalIndexForJavaLangAssertionErrorConstructor(typeBindingID));
+ stackDepth -= 2;
+}
+
+public void invokeJavaLangAssertionErrorDefaultConstructor() {
+ // invokespecial: java.lang.AssertionError.<init>()V
+ if (DEBUG) System.out.println(position + "\t\tinvokespecial: java.lang.AssertionError.<init>()V"); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_invokespecial;
+ writeUnsignedShort(constantPool.literalIndexForJavaLangAssertionErrorDefaultConstructor());
+ stackDepth --;
+}
+public void invokeJavaUtilIteratorHasNext() {
+ // invokeinterface java.util.Iterator.hasNext()Z
+ if (DEBUG) System.out.println(position + "\t\tinvokeinterface: java.util.Iterator.hasNext()Z"); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset + 4 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 3;
+ bCodeStream[classFileOffset++] = OPC_invokeinterface;
+ writeUnsignedShort(constantPool.literalIndexForJavaUtilIteratorHasNext());
+ bCodeStream[classFileOffset++] = 1;
+ // Generate a 0 into the byte array. Like the array is already fill with 0, we just need to increment
+ // the number of bytes.
+ bCodeStream[classFileOffset++] = 0;
+}
+public void invokeJavaUtilIteratorNext() {
+ // invokeinterface java.util.Iterator.next()java.lang.Object
+ if (DEBUG) System.out.println(position + "\t\tinvokeinterface: java.util.Iterator.next()java.lang.Object"); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset + 4 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 3;
+ bCodeStream[classFileOffset++] = OPC_invokeinterface;
+ writeUnsignedShort(constantPool.literalIndexForJavaUtilIteratorNext());
+ bCodeStream[classFileOffset++] = 1;
+ // Generate a 0 into the byte array. Like the array is already fill with 0, we just need to increment
+ // the number of bytes.
+ bCodeStream[classFileOffset++] = 0;
+}
+public void invokeStringConcatenationDefaultConstructor() {
+ // invokespecial: java.lang.StringBuffer.<init>()V
+ if (DEBUG) {
+ if (this.targetLevel >= JDK1_5) {
+ System.out.println(position + "\t\tinvokespecial: java.lang.StringBuilder.<init>()V"); //$NON-NLS-1$
+ } else {
+ System.out.println(position + "\t\tinvokespecial: java.lang.StringBuffer.<init>()V"); //$NON-NLS-1$
+ }
+ }
+ countLabels = 0;
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_invokespecial;
+ if (this.targetLevel >= JDK1_5) {
+ writeUnsignedShort(constantPool.literalIndexForJavaLangStringBuilderDefaultConstructor());
+ } else {
+ writeUnsignedShort(constantPool.literalIndexForJavaLangStringBufferDefaultConstructor());
+ }
+ stackDepth--;
+}
+public void invokeStringConcatenationStringConstructor() {
+ if (DEBUG) {
+ if (this.targetLevel >= JDK1_5) {
+ System.out.println(position + "\t\tjava.lang.StringBuilder.<init>(Ljava.lang.String;)V"); //$NON-NLS-1$
+ } else {
+ System.out.println(position + "\t\tjava.lang.StringBuffer.<init>(Ljava.lang.String;)V"); //$NON-NLS-1$
+ }
+ }
+ countLabels = 0;
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_invokespecial;
+ if (this.targetLevel >= JDK1_5) {
+ writeUnsignedShort(constantPool.literalIndexForJavaLangStringBuilderConstructor());
+ } else {
+ writeUnsignedShort(constantPool.literalIndexForJavaLangStringBufferConstructor());
+ }
+ stackDepth -= 2;
+}
+
+public void invokeStringConcatenationToString() {
+ if (DEBUG) {
+ if (this.targetLevel >= JDK1_5) {
+ System.out.println(position + "\t\tinvokevirtual: StringBuilder.toString()Ljava.lang.String;"); //$NON-NLS-1$
+ } else {
+ System.out.println(position + "\t\tinvokevirtual: StringBuffer.toString()Ljava.lang.String;"); //$NON-NLS-1$
+ }
+ }
+ countLabels = 0;
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_invokevirtual;
+ if (this.targetLevel >= JDK1_5) {
+ writeUnsignedShort(constantPool.literalIndexForJavaLangStringBuilderToString());
+ } else {
+ writeUnsignedShort(constantPool.literalIndexForJavaLangStringBufferToString());
+ }
+}
+public void invokeStringIntern() {
+ // invokevirtual: java.lang.String.intern()
+ if (DEBUG) System.out.println(position + "\t\tinvokevirtual: java.lang.String.intern()"); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_invokevirtual;
+ writeUnsignedShort(constantPool.literalIndexForJavaLangStringIntern());
+}
+public void invokeStringValueOf(int typeID) {
+ // invokestatic: java.lang.String.valueOf(argumentType)
+ if (DEBUG) System.out.println(position + "\t\tinvokestatic: java.lang.String.valueOf(...)"); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_invokestatic;
+ writeUnsignedShort(constantPool.literalIndexForJavaLangStringValueOf(typeID));
+}
+public void invokeThrowableGetMessage() {
+ // invokevirtual: java.lang.Throwable.getMessage()Ljava.lang.String;
+ if (DEBUG) System.out.println(position + "\t\tinvokevirtual: java.lang.Throwable.getMessage()Ljava.lang.String;"); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_invokevirtual;
+ writeUnsignedShort(constantPool.literalIndexForJavaLangThrowableGetMessage());
+}
+final public void invokevirtual(MethodBinding methodBinding) {
+ if (DEBUG) System.out.println(position + "\t\tinvokevirtual:"+methodBinding); //$NON-NLS-1$
+ // initialized to 1 to take into account this immediately
+ countLabels = 0;
+ int argCount = 1;
+ int id;
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_invokevirtual;
+ writeUnsignedShort(constantPool.literalIndex(methodBinding));
+ for (int i = methodBinding.parameters.length - 1; i >= 0; i--)
+ if (((id = methodBinding.parameters[i].id) == T_double) || (id == T_long))
+ argCount += 2;
+ else
+ argCount++;
+ if (((id = methodBinding.returnType.id) == T_double) || (id == T_long))
+ stackDepth += (2 - argCount);
+ else
+ if (id == T_void)
+ stackDepth -= argCount;
+ else
+ stackDepth += (1 - argCount);
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+}
+final public void ior() {
+ if (DEBUG) System.out.println(position + "\t\tior"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_ior;
+}
+final public void irem() {
+ if (DEBUG) System.out.println(position + "\t\tirem"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_irem;
+}
+final public void ireturn() {
+ if (DEBUG) System.out.println(position + "\t\tireturn"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ // the stackDepth should be equal to 0
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_ireturn;
+}
+public boolean isDefinitelyAssigned(Scope scope, int initStateIndex, LocalVariableBinding local) {
+ // Dependant of UnconditionalFlowInfo.isDefinitelyAssigned(..)
+ if (initStateIndex == -1)
+ return false;
+ if (local.isArgument) {
+ return true;
+ }
+ int localPosition = local.id + maxFieldCount;
+ MethodScope methodScope = scope.methodScope();
+ // id is zero-based
+ if (localPosition < UnconditionalFlowInfo.BitCacheSize) {
+ return (methodScope.definiteInits[initStateIndex] & (1L << localPosition)) != 0; // use bits
+ }
+ // use extra vector
+ long[] extraInits = methodScope.extraDefiniteInits[initStateIndex];
+ if (extraInits == null)
+ return false; // if vector not yet allocated, then not initialized
+ int vectorIndex;
+ if ((vectorIndex = (localPosition / UnconditionalFlowInfo.BitCacheSize) - 1) >= extraInits.length)
+ return false; // if not enough room in vector, then not initialized
+ return ((extraInits[vectorIndex]) & (1L << (localPosition % UnconditionalFlowInfo.BitCacheSize))) != 0;
+}
+final public void ishl() {
+ if (DEBUG) System.out.println(position + "\t\tishl"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_ishl;
+}
+final public void ishr() {
+ if (DEBUG) System.out.println(position + "\t\tishr"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_ishr;
+}
+final public void istore(int iArg) {
+ if (DEBUG) System.out.println(position + "\t\tistore:"+iArg); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (maxLocals <= iArg) {
+ maxLocals = iArg + 1;
+ }
+ if (iArg > 255) { // Widen
+ if (classFileOffset + 3 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 2;
+ bCodeStream[classFileOffset++] = OPC_wide;
+ bCodeStream[classFileOffset++] = OPC_istore;
+ writeUnsignedShort(iArg);
+ } else {
+ if (classFileOffset + 1 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 2;
+ bCodeStream[classFileOffset++] = OPC_istore;
+ bCodeStream[classFileOffset++] = (byte) iArg;
+ }
+}
+final public void istore_0() {
+ if (DEBUG) System.out.println(position + "\t\tistore_0"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (maxLocals == 0) {
+ maxLocals = 1;
+ }
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_istore_0;
+}
+final public void istore_1() {
+ if (DEBUG) System.out.println(position + "\t\tistore_1"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (maxLocals <= 1) {
+ maxLocals = 2;
+ }
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_istore_1;
+}
+final public void istore_2() {
+ if (DEBUG) System.out.println(position + "\t\tistore_2"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (maxLocals <= 2) {
+ maxLocals = 3;
+ }
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_istore_2;
+}
+final public void istore_3() {
+ if (DEBUG) System.out.println(position + "\t\tistore_3"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (maxLocals <= 3) {
+ maxLocals = 4;
+ }
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_istore_3;
+}
+final public void isub() {
+ if (DEBUG) System.out.println(position + "\t\tisub"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_isub;
+}
+final public void iushr() {
+ if (DEBUG) System.out.println(position + "\t\tiushr"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_iushr;
+}
+final public void ixor() {
+ if (DEBUG) System.out.println(position + "\t\tixor"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_ixor;
+}
+final public void jsr(Label lbl) {
+ if (this.wideMode) {
+ this.jsr_w(lbl);
+ return;
+ }
+ if (DEBUG) System.out.println(position + "\t\tjsr"+lbl); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_jsr;
+ lbl.branch();
+}
+final public void jsr_w(Label lbl) {
+ if (DEBUG) System.out.println(position + "\t\tjsr_w"+lbl); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_jsr_w;
+ lbl.branchWide();
+}
+final public void l2d() {
+ if (DEBUG) System.out.println(position + "\t\tl2d"); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_l2d;
+}
+final public void l2f() {
+ if (DEBUG) System.out.println(position + "\t\tl2f"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_l2f;
+}
+final public void l2i() {
+ if (DEBUG) System.out.println(position + "\t\tl2i"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_l2i;
+}
+final public void ladd() {
+ if (DEBUG) System.out.println(position + "\t\tladd"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 2;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_ladd;
+}
+final public void laload() {
+ if (DEBUG) System.out.println(position + "\t\tlaload"); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_laload;
+}
+final public void land() {
+ if (DEBUG) System.out.println(position + "\t\tland"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 2;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_land;
+}
+final public void lastore() {
+ if (DEBUG) System.out.println(position + "\t\tlastore"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 4;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_lastore;
+}
+final public void lcmp() {
+ if (DEBUG) System.out.println(position + "\t\tlcmp"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 3;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_lcmp;
+}
+final public void lconst_0() {
+ if (DEBUG) System.out.println(position + "\t\tlconst_0"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth += 2;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_lconst_0;
+}
+final public void lconst_1() {
+ if (DEBUG) System.out.println(position + "\t\tlconst_1"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth += 2;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_lconst_1;
+}
+final public void ldc(float constant) {
+ countLabels = 0;
+ int index = constantPool.literalIndex(constant);
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (index > 255) {
+ if (DEBUG) System.out.println(position + "\t\tldc_w:"+constant); //$NON-NLS-1$
+ // Generate a ldc_w
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_ldc_w;
+ writeUnsignedShort(index);
+ } else {
+ if (DEBUG) System.out.println(position + "\t\tldc:"+constant); //$NON-NLS-1$
+ // Generate a ldc
+ if (classFileOffset + 1 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 2;
+ bCodeStream[classFileOffset++] = OPC_ldc;
+ bCodeStream[classFileOffset++] = (byte) index;
+ }
+}
+final public void ldc(int constant) {
+ countLabels = 0;
+ int index = constantPool.literalIndex(constant);
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (index > 255) {
+ if (DEBUG) System.out.println(position + "\t\tldc_w:"+constant); //$NON-NLS-1$
+ // Generate a ldc_w
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_ldc_w;
+ writeUnsignedShort(index);
+ } else {
+ if (DEBUG) System.out.println(position + "\t\tldc:"+constant); //$NON-NLS-1$
+ // Generate a ldc
+ if (classFileOffset + 1 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 2;
+ bCodeStream[classFileOffset++] = OPC_ldc;
+ bCodeStream[classFileOffset++] = (byte) index;
+ }
+}
+final public void ldc(String constant) {
+ countLabels = 0;
+ int currentConstantPoolIndex = constantPool.currentIndex;
+ int currentConstantPoolOffset = constantPool.currentOffset;
+ int currentCodeStreamPosition = position;
+ int index = constantPool.literalIndexForLdc(constant.toCharArray());
+ if (index > 0) {
+ // the string already exists inside the constant pool
+ // we reuse the same index
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (index > 255) {
+ if (DEBUG) System.out.println(position + "\t\tldc_w:"+constant); //$NON-NLS-1$
+ // Generate a ldc_w
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_ldc_w;
+ writeUnsignedShort(index);
+ } else {
+ if (DEBUG) System.out.println(position + "\t\tldc:"+constant); //$NON-NLS-1$
+ // Generate a ldc
+ if (classFileOffset + 1 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 2;
+ bCodeStream[classFileOffset++] = OPC_ldc;
+ bCodeStream[classFileOffset++] = (byte) index;
+ }
+ } else {
+ // the string is too big to be utf8-encoded in one pass.
+ // we have to split it into different pieces.
+ // first we clean all side-effects due to the code above
+ // this case is very rare, so we can afford to lose time to handle it
+ char[] constantChars = constant.toCharArray();
+ position = currentCodeStreamPosition;
+ constantPool.currentIndex = currentConstantPoolIndex;
+ constantPool.currentOffset = currentConstantPoolOffset;
+ constantPool.stringCache.remove(constantChars);
+ constantPool.UTF8Cache.remove(constantChars);
+ int i = 0;
+ int length = 0;
+ int constantLength = constant.length();
+ byte[] utf8encoding = new byte[Math.min(constantLength + 100, 65535)];
+ int utf8encodingLength = 0;
+ while ((length < 65532) && (i < constantLength)) {
+ char current = constantChars[i];
+ // we resize the byte array immediately if necessary
+ if (length + 3 > (utf8encodingLength = utf8encoding.length)) {
+ System.arraycopy(utf8encoding, 0, utf8encoding = new byte[Math.min(utf8encodingLength + 100, 65535)], 0, length);
+ }
+ if ((current >= 0x0001) && (current <= 0x007F)) {
+ // we only need one byte: ASCII table
+ utf8encoding[length++] = (byte) current;
+ } else {
+ if (current > 0x07FF) {
+ // we need 3 bytes
+ utf8encoding[length++] = (byte) (0xE0 | ((current >> 12) & 0x0F)); // 0xE0 = 1110 0000
+ utf8encoding[length++] = (byte) (0x80 | ((current >> 6) & 0x3F)); // 0x80 = 1000 0000
+ utf8encoding[length++] = (byte) (0x80 | (current & 0x3F)); // 0x80 = 1000 0000
+ } else {
+ // we can be 0 or between 0x0080 and 0x07FF
+ // In that case we only need 2 bytes
+ utf8encoding[length++] = (byte) (0xC0 | ((current >> 6) & 0x1F)); // 0xC0 = 1100 0000
+ utf8encoding[length++] = (byte) (0x80 | (current & 0x3F)); // 0x80 = 1000 0000
+ }
+ }
+ i++;
+ }
+ // check if all the string is encoded (PR 1PR2DWJ)
+ // the string is too big to be encoded in one pass
+ newStringContatenation();
+ dup();
+ // write the first part
+ char[] subChars = new char[i];
+ System.arraycopy(constantChars, 0, subChars, 0, i);
+ System.arraycopy(utf8encoding, 0, utf8encoding = new byte[length], 0, length);
+ index = constantPool.literalIndex(subChars, utf8encoding);
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (index > 255) {
+ // Generate a ldc_w
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_ldc_w;
+ writeUnsignedShort(index);
+ } else {
+ // Generate a ldc
+ if (classFileOffset + 1 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 2;
+ bCodeStream[classFileOffset++] = OPC_ldc;
+ bCodeStream[classFileOffset++] = (byte) index;
+ }
+ // write the remaining part
+ invokeStringConcatenationStringConstructor();
+ while (i < constantLength) {
+ length = 0;
+ utf8encoding = new byte[Math.min(constantLength - i + 100, 65535)];
+ int startIndex = i;
+ while ((length < 65532) && (i < constantLength)) {
+ char current = constantChars[i];
+ // we resize the byte array immediately if necessary
+ if (constantLength + 2 > (utf8encodingLength = utf8encoding.length)) {
+ System.arraycopy(utf8encoding, 0, utf8encoding = new byte[Math.min(utf8encodingLength + 100, 65535)], 0, length);
+ }
+ if ((current >= 0x0001) && (current <= 0x007F)) {
+ // we only need one byte: ASCII table
+ utf8encoding[length++] = (byte) current;
+ } else {
+ if (current > 0x07FF) {
+ // we need 3 bytes
+ utf8encoding[length++] = (byte) (0xE0 | ((current >> 12) & 0x0F)); // 0xE0 = 1110 0000
+ utf8encoding[length++] = (byte) (0x80 | ((current >> 6) & 0x3F)); // 0x80 = 1000 0000
+ utf8encoding[length++] = (byte) (0x80 | (current & 0x3F)); // 0x80 = 1000 0000
+ } else {
+ // we can be 0 or between 0x0080 and 0x07FF
+ // In that case we only need 2 bytes
+ utf8encoding[length++] = (byte) (0xC0 | ((current >> 6) & 0x1F)); // 0xC0 = 1100 0000
+ utf8encoding[length++] = (byte) (0x80 | (current & 0x3F)); // 0x80 = 1000 0000
+ }
+ }
+ i++;
+ }
+ // the next part is done
+ subChars = new char[i - startIndex];
+ System.arraycopy(constantChars, startIndex, subChars, 0, i - startIndex);
+ System.arraycopy(utf8encoding, 0, utf8encoding = new byte[length], 0, length);
+ index = constantPool.literalIndex(subChars, utf8encoding);
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (index > 255) {
+ // Generate a ldc_w
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_ldc_w;
+ writeUnsignedShort(index);
+ } else {
+ // Generate a ldc
+ if (classFileOffset + 1 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 2;
+ bCodeStream[classFileOffset++] = OPC_ldc;
+ bCodeStream[classFileOffset++] = (byte) index;
+ }
+ // now on the stack it should be a StringBuffer and a string.
+ invokeStringConcatenationAppendForType(T_String);
+ }
+ invokeStringConcatenationToString();
+ invokeStringIntern();
+ }
+}
+final public void ldc(TypeBinding typeBinding) {
+ countLabels = 0;
+ int index = constantPool.literalIndex(typeBinding);
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (index > 255) {
+ if (DEBUG) System.out.println(position + "\t\tldc_w:"+ typeBinding); //$NON-NLS-1$
+ // Generate a ldc_w
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_ldc_w;
+ writeUnsignedShort(index);
+ } else {
+ if (DEBUG) System.out.println(position + "\t\tldw:"+ typeBinding); //$NON-NLS-1$
+ // Generate a ldc
+ if (classFileOffset + 1 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 2;
+ bCodeStream[classFileOffset++] = OPC_ldc;
+ bCodeStream[classFileOffset++] = (byte) index;
+ }
+}
+final public void ldc2_w(double constant) {
+ if (DEBUG) System.out.println(position + "\t\tldc2_w:"+constant); //$NON-NLS-1$
+ countLabels = 0;
+ int index = constantPool.literalIndex(constant);
+ stackDepth += 2;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ // Generate a ldc2_w
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_ldc2_w;
+ writeUnsignedShort(index);
+}
+final public void ldc2_w(long constant) {
+ if (DEBUG) System.out.println(position + "\t\tldc2_w:"+constant); //$NON-NLS-1$
+ countLabels = 0;
+ int index = constantPool.literalIndex(constant);
+ stackDepth += 2;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ // Generate a ldc2_w
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_ldc2_w;
+ writeUnsignedShort(index);
+}
+final public void ldiv() {
+ if (DEBUG) System.out.println(position + "\t\tldiv"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 2;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_ldiv;
+}
+final public void lload(int iArg) {
+ if (DEBUG) System.out.println(position + "\t\tlload:"+iArg); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth += 2;
+ if (maxLocals <= iArg + 1) {
+ maxLocals = iArg + 2;
+ }
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (iArg > 255) { // Widen
+ if (classFileOffset + 3 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 2;
+ bCodeStream[classFileOffset++] = OPC_wide;
+ bCodeStream[classFileOffset++] = OPC_lload;
+ writeUnsignedShort(iArg);
+ } else {
+ if (classFileOffset + 1 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 2;
+ bCodeStream[classFileOffset++] = OPC_lload;
+ bCodeStream[classFileOffset++] = (byte) iArg;
+ }
+}
+final public void lload_0() {
+ if (DEBUG) System.out.println(position + "\t\tlload_0"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth += 2;
+ if (maxLocals < 2) {
+ maxLocals = 2;
+ }
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_lload_0;
+}
+final public void lload_1() {
+ if (DEBUG) System.out.println(position + "\t\tlload_1"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth += 2;
+ if (maxLocals < 3) {
+ maxLocals = 3;
+ }
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_lload_1;
+}
+final public void lload_2() {
+ if (DEBUG) System.out.println(position + "\t\tlload_2"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth += 2;
+ if (maxLocals < 4) {
+ maxLocals = 4;
+ }
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_lload_2;
+}
+final public void lload_3() {
+ if (DEBUG) System.out.println(position + "\t\tlload_3"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth += 2;
+ if (maxLocals < 5) {
+ maxLocals = 5;
+ }
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_lload_3;
+}
+final public void lmul() {
+ if (DEBUG) System.out.println(position + "\t\tlmul"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 2;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_lmul;
+}
+final public void lneg() {
+ if (DEBUG) System.out.println(position + "\t\tlneg"); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_lneg;
+}
+public final void load(LocalVariableBinding localBinding) {
+ countLabels = 0;
+ TypeBinding typeBinding = localBinding.type;
+ int resolvedPosition = localBinding.resolvedPosition;
+ // Using dedicated int bytecode
+ if (typeBinding == IntBinding) {
+ switch (resolvedPosition) {
+ case 0 :
+ this.iload_0();
+ break;
+ case 1 :
+ this.iload_1();
+ break;
+ case 2 :
+ this.iload_2();
+ break;
+ case 3 :
+ this.iload_3();
+ break;
+ //case -1 :
+ // internal failure: trying to load variable not supposed to be generated
+ // break;
+ default :
+ this.iload(resolvedPosition);
+ }
+ return;
+ }
+ // Using dedicated float bytecode
+ if (typeBinding == FloatBinding) {
+ switch (resolvedPosition) {
+ case 0 :
+ this.fload_0();
+ break;
+ case 1 :
+ this.fload_1();
+ break;
+ case 2 :
+ this.fload_2();
+ break;
+ case 3 :
+ this.fload_3();
+ break;
+ default :
+ this.fload(resolvedPosition);
+ }
+ return;
+ }
+ // Using dedicated long bytecode
+ if (typeBinding == LongBinding) {
+ switch (resolvedPosition) {
+ case 0 :
+ this.lload_0();
+ break;
+ case 1 :
+ this.lload_1();
+ break;
+ case 2 :
+ this.lload_2();
+ break;
+ case 3 :
+ this.lload_3();
+ break;
+ default :
+ this.lload(resolvedPosition);
+ }
+ return;
+ }
+ // Using dedicated double bytecode
+ if (typeBinding == DoubleBinding) {
+ switch (resolvedPosition) {
+ case 0 :
+ this.dload_0();
+ break;
+ case 1 :
+ this.dload_1();
+ break;
+ case 2 :
+ this.dload_2();
+ break;
+ case 3 :
+ this.dload_3();
+ break;
+ default :
+ this.dload(resolvedPosition);
+ }
+ return;
+ }
+ // boolean, byte, char and short are handled as int
+ if ((typeBinding == ByteBinding) || (typeBinding == CharBinding) || (typeBinding == BooleanBinding) || (typeBinding == ShortBinding)) {
+ switch (resolvedPosition) {
+ case 0 :
+ this.iload_0();
+ break;
+ case 1 :
+ this.iload_1();
+ break;
+ case 2 :
+ this.iload_2();
+ break;
+ case 3 :
+ this.iload_3();
+ break;
+ default :
+ this.iload(resolvedPosition);
+ }
+ return;
+ }
+
+ // Reference object
+ switch (resolvedPosition) {
+ case 0 :
+ this.aload_0();
+ break;
+ case 1 :
+ this.aload_1();
+ break;
+ case 2 :
+ this.aload_2();
+ break;
+ case 3 :
+ this.aload_3();
+ break;
+ default :
+ this.aload(resolvedPosition);
+ }
+}
+public final void load(TypeBinding typeBinding, int resolvedPosition) {
+ countLabels = 0;
+ // Using dedicated int bytecode
+ if (typeBinding == IntBinding) {
+ switch (resolvedPosition) {
+ case 0 :
+ this.iload_0();
+ break;
+ case 1 :
+ this.iload_1();
+ break;
+ case 2 :
+ this.iload_2();
+ break;
+ case 3 :
+ this.iload_3();
+ break;
+ default :
+ this.iload(resolvedPosition);
+ }
+ return;
+ }
+ // Using dedicated float bytecode
+ if (typeBinding == FloatBinding) {
+ switch (resolvedPosition) {
+ case 0 :
+ this.fload_0();
+ break;
+ case 1 :
+ this.fload_1();
+ break;
+ case 2 :
+ this.fload_2();
+ break;
+ case 3 :
+ this.fload_3();
+ break;
+ default :
+ this.fload(resolvedPosition);
+ }
+ return;
+ }
+ // Using dedicated long bytecode
+ if (typeBinding == LongBinding) {
+ switch (resolvedPosition) {
+ case 0 :
+ this.lload_0();
+ break;
+ case 1 :
+ this.lload_1();
+ break;
+ case 2 :
+ this.lload_2();
+ break;
+ case 3 :
+ this.lload_3();
+ break;
+ default :
+ this.lload(resolvedPosition);
+ }
+ return;
+ }
+ // Using dedicated double bytecode
+ if (typeBinding == DoubleBinding) {
+ switch (resolvedPosition) {
+ case 0 :
+ this.dload_0();
+ break;
+ case 1 :
+ this.dload_1();
+ break;
+ case 2 :
+ this.dload_2();
+ break;
+ case 3 :
+ this.dload_3();
+ break;
+ default :
+ this.dload(resolvedPosition);
+ }
+ return;
+ }
+ // boolean, byte, char and short are handled as int
+ if ((typeBinding == ByteBinding) || (typeBinding == CharBinding) || (typeBinding == BooleanBinding) || (typeBinding == ShortBinding)) {
+ switch (resolvedPosition) {
+ case 0 :
+ this.iload_0();
+ break;
+ case 1 :
+ this.iload_1();
+ break;
+ case 2 :
+ this.iload_2();
+ break;
+ case 3 :
+ this.iload_3();
+ break;
+ default :
+ this.iload(resolvedPosition);
+ }
+ return;
+ }
+
+ // Reference object
+ switch (resolvedPosition) {
+ case 0 :
+ this.aload_0();
+ break;
+ case 1 :
+ this.aload_1();
+ break;
+ case 2 :
+ this.aload_2();
+ break;
+ case 3 :
+ this.aload_3();
+ break;
+ default :
+ this.aload(resolvedPosition);
+ }
+}
+public final void loadInt(int resolvedPosition) {
+ // Using dedicated int bytecode
+ switch (resolvedPosition) {
+ case 0 :
+ this.iload_0();
+ break;
+ case 1 :
+ this.iload_1();
+ break;
+ case 2 :
+ this.iload_2();
+ break;
+ case 3 :
+ this.iload_3();
+ break;
+ default :
+ this.iload(resolvedPosition);
+ }
+}
+public final void loadObject(int resolvedPosition) {
+ switch (resolvedPosition) {
+ case 0 :
+ this.aload_0();
+ break;
+ case 1 :
+ this.aload_1();
+ break;
+ case 2 :
+ this.aload_2();
+ break;
+ case 3 :
+ this.aload_3();
+ break;
+ default :
+ this.aload(resolvedPosition);
+ }
+}
+final public void lookupswitch(CaseLabel defaultLabel, int[] keys, int[] sortedIndexes, CaseLabel[] casesLabel) {
+ if (DEBUG) System.out.println(position + "\t\tlookupswitch"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ int length = keys.length;
+ int pos = position;
+ defaultLabel.placeInstruction();
+ for (int i = 0; i < length; i++) {
+ casesLabel[i].placeInstruction();
+ }
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_lookupswitch;
+ for (int i = (3 - (pos % 4)); i > 0; i--) {
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = 0;
+ }
+ defaultLabel.branch();
+ writeSignedWord(length);
+ for (int i = 0; i < length; i++) {
+ writeSignedWord(keys[sortedIndexes[i]]);
+ casesLabel[sortedIndexes[i]].branch();
+ }
+}
+final public void lor() {
+ if (DEBUG) System.out.println(position + "\t\tlor"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 2;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_lor;
+}
+final public void lrem() {
+ if (DEBUG) System.out.println(position + "\t\tlrem"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 2;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_lrem;
+}
+final public void lreturn() {
+ if (DEBUG) System.out.println(position + "\t\tlreturn"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 2;
+ // the stackDepth should be equal to 0
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_lreturn;
+}
+final public void lshl() {
+ if (DEBUG) System.out.println(position + "\t\tlshl"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_lshl;
+}
+final public void lshr() {
+ if (DEBUG) System.out.println(position + "\t\tlshr"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_lshr;
+}
+final public void lstore(int iArg) {
+ if (DEBUG) System.out.println(position + "\t\tlstore:"+iArg); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 2;
+ if (maxLocals <= iArg + 1) {
+ maxLocals = iArg + 2;
+ }
+ if (iArg > 255) { // Widen
+ if (classFileOffset + 3 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 2;
+ bCodeStream[classFileOffset++] = OPC_wide;
+ bCodeStream[classFileOffset++] = OPC_lstore;
+ writeUnsignedShort(iArg);
+ } else {
+ if (classFileOffset + 1 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 2;
+ bCodeStream[classFileOffset++] = OPC_lstore;
+ bCodeStream[classFileOffset++] = (byte) iArg;
+ }
+}
+final public void lstore_0() {
+ if (DEBUG) System.out.println(position + "\t\tlstore_0"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 2;
+ if (maxLocals < 2) {
+ maxLocals = 2;
+ }
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_lstore_0;
+}
+final public void lstore_1() {
+ if (DEBUG) System.out.println(position + "\t\tlstore_1"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 2;
+ if (maxLocals < 3) {
+ maxLocals = 3;
+ }
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_lstore_1;
+}
+final public void lstore_2() {
+ if (DEBUG) System.out.println(position + "\t\tlstore_2"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 2;
+ if (maxLocals < 4) {
+ maxLocals = 4;
+ }
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_lstore_2;
+}
+final public void lstore_3() {
+ if (DEBUG) System.out.println(position + "\t\tlstore_3"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 2;
+ if (maxLocals < 5) {
+ maxLocals = 5;
+ }
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_lstore_3;
+}
+final public void lsub() {
+ if (DEBUG) System.out.println(position + "\t\tlsub"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 2;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_lsub;
+}
+final public void lushr() {
+ if (DEBUG) System.out.println(position + "\t\tlushr"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_lushr;
+}
+final public void lxor() {
+ if (DEBUG) System.out.println(position + "\t\tlxor"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 2;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_lxor;
+}
+final public void monitorenter() {
+ if (DEBUG) System.out.println(position + "\t\tmonitorenter"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_monitorenter;
+}
+final public void monitorexit() {
+ if (DEBUG) System.out.println(position + "\t\tmonitorexit"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_monitorexit;
+}
+final public void multianewarray(TypeBinding typeBinding, int dimensions) {
+ if (DEBUG) System.out.println(position + "\t\tmultinewarray:"+typeBinding+","+dimensions); //$NON-NLS-1$ //$NON-NLS-2$
+ countLabels = 0;
+ stackDepth += (1 - dimensions);
+ if (classFileOffset + 3 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 2;
+ bCodeStream[classFileOffset++] = OPC_multianewarray;
+ writeUnsignedShort(constantPool.literalIndex(typeBinding));
+ bCodeStream[classFileOffset++] = (byte) dimensions;
+}
+/**
+ * We didn't call it new, because there is a conflit with the new keyword
+ */
+final public void new_(TypeBinding typeBinding) {
+ if (DEBUG) System.out.println(position + "\t\tnew:"+typeBinding); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_new;
+ writeUnsignedShort(constantPool.literalIndex(typeBinding));
+}
+final public void newarray(int array_Type) {
+ if (DEBUG) System.out.println(position + "\t\tnewarray:"+array_Type); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset + 1 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 2;
+ bCodeStream[classFileOffset++] = OPC_newarray;
+ bCodeStream[classFileOffset++] = (byte) array_Type;
+}
+public void newArray(Scope scope, ArrayBinding arrayBinding) {
+ TypeBinding component = arrayBinding.elementsType();
+ switch (component.id) {
+ case T_int :
+ this.newarray(INT_ARRAY);
+ break;
+ case T_byte :
+ this.newarray(BYTE_ARRAY);
+ break;
+ case T_boolean :
+ this.newarray(BOOLEAN_ARRAY);
+ break;
+ case T_short :
+ this.newarray(SHORT_ARRAY);
+ break;
+ case T_char :
+ this.newarray(CHAR_ARRAY);
+ break;
+ case T_long :
+ this.newarray(LONG_ARRAY);
+ break;
+ case T_float :
+ this.newarray(FLOAT_ARRAY);
+ break;
+ case T_double :
+ this.newarray(DOUBLE_ARRAY);
+ break;
+ default :
+ this.anewarray(component);
+ }
+}
+public void newJavaLangError() {
+ // new: java.lang.Error
+ if (DEBUG) System.out.println(position + "\t\tnew: java.lang.Error"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_new;
+ writeUnsignedShort(constantPool.literalIndexForJavaLangError());
+}
+
+public void newJavaLangAssertionError() {
+ // new: java.lang.AssertionError
+ if (DEBUG) System.out.println(position + "\t\tnew: java.lang.AssertionError"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_new;
+ writeUnsignedShort(constantPool.literalIndexForJavaLangAssertionError());
+}
+
+public void newNoClassDefFoundError() {
+ // new: java.lang.NoClassDefFoundError
+ if (DEBUG) System.out.println(position + "\t\tnew: java.lang.NoClassDefFoundError"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_new;
+ writeUnsignedShort(constantPool.literalIndexForJavaLangNoClassDefFoundError());
+}
+public void newStringContatenation() {
+ // new: java.lang.StringBuffer
+ // new: java.lang.StringBuilder
+ if (DEBUG) {
+ if (this.targetLevel >= JDK1_5) {
+ System.out.println(position + "\t\tnew: java.lang.StringBuilder"); //$NON-NLS-1$
+ } else {
+ System.out.println(position + "\t\tnew: java.lang.StringBuffer"); //$NON-NLS-1$
+ }
+ }
+ countLabels = 0;
+ stackDepth++;
+ if (stackDepth > stackMax) {
+ stackMax = stackDepth;
+ }
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_new;
+ if (this.targetLevel >= JDK1_5) {
+ writeUnsignedShort(constantPool.literalIndexForJavaLangStringBuilder());
+ } else {
+ writeUnsignedShort(constantPool.literalIndexForJavaLangStringBuffer());
+ }
+}
+public void newWrapperFor(int typeID) {
+ countLabels = 0;
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_new;
+ switch (typeID) {
+ case T_int : // new: java.lang.Integer
+ if (DEBUG) System.out.println(position + "\t\tnew: java.lang.Integer"); //$NON-NLS-1$
+ writeUnsignedShort(constantPool.literalIndexForJavaLangInteger());
+ break;
+ case T_boolean : // new: java.lang.Boolean
+ if (DEBUG) System.out.println(position + "\t\tnew: java.lang.Boolean"); //$NON-NLS-1$
+ writeUnsignedShort(constantPool.literalIndexForJavaLangBoolean());
+ break;
+ case T_byte : // new: java.lang.Byte
+ if (DEBUG) System.out.println(position + "\t\tnew: java.lang.Byte"); //$NON-NLS-1$
+ writeUnsignedShort(constantPool.literalIndexForJavaLangByte());
+ break;
+ case T_char : // new: java.lang.Character
+ if (DEBUG) System.out.println(position + "\t\tnew: java.lang.Character"); //$NON-NLS-1$
+ writeUnsignedShort(constantPool.literalIndexForJavaLangCharacter());
+ break;
+ case T_float : // new: java.lang.Float
+ if (DEBUG) System.out.println(position + "\t\tnew: java.lang.Float"); //$NON-NLS-1$
+ writeUnsignedShort(constantPool.literalIndexForJavaLangFloat());
+ break;
+ case T_double : // new: java.lang.Double
+ if (DEBUG) System.out.println(position + "\t\tnew: java.lang.Double"); //$NON-NLS-1$
+ writeUnsignedShort(constantPool.literalIndexForJavaLangDouble());
+ break;
+ case T_short : // new: java.lang.Short
+ if (DEBUG) System.out.println(position + "\t\tnew: java.lang.Short"); //$NON-NLS-1$
+ writeUnsignedShort(constantPool.literalIndexForJavaLangShort());
+ break;
+ case T_long : // new: java.lang.Long
+ if (DEBUG) System.out.println(position + "\t\tnew: java.lang.Long"); //$NON-NLS-1$
+ writeUnsignedShort(constantPool.literalIndexForJavaLangLong());
+ break;
+ case T_void : // new: java.lang.Void
+ if (DEBUG) System.out.println(position + "\t\tnew: java.lang.Void"); //$NON-NLS-1$
+ writeUnsignedShort(constantPool.literalIndexForJavaLangVoid());
+ }
+}
+final public void nop() {
+ if (DEBUG) System.out.println(position + "\t\tnop"); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_nop;
+}
+final public void pop() {
+ if (DEBUG) System.out.println(position + "\t\tpop"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_pop;
+}
+final public void pop2() {
+ if (DEBUG) System.out.println(position + "\t\tpop2"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 2;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_pop2;
+}
+final public void putfield(FieldBinding fieldBinding) {
+ if (DEBUG) System.out.println(position + "\t\tputfield:"+fieldBinding); //$NON-NLS-1$
+ countLabels = 0;
+ int id;
+ if (((id = fieldBinding.type.id) == T_double) || (id == T_long))
+ stackDepth -= 3;
+ else
+ stackDepth -= 2;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_putfield;
+ writeUnsignedShort(constantPool.literalIndex(fieldBinding));
+}
+final public void putstatic(FieldBinding fieldBinding) {
+ if (DEBUG) System.out.println(position + "\t\tputstatic:"+fieldBinding); //$NON-NLS-1$
+ countLabels = 0;
+ int id;
+ if (((id = fieldBinding.type.id) == T_double) || (id == T_long))
+ stackDepth -= 2;
+ else
+ stackDepth -= 1;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset + 2 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_putstatic;
+ writeUnsignedShort(constantPool.literalIndex(fieldBinding));
+}
+public void record(LocalVariableBinding local) {
+ if (!generateLocalVariableTableAttributes)
+ return;
+ if (allLocalsCounter == locals.length) {
+ // resize the collection
+ System.arraycopy(locals, 0, locals = new LocalVariableBinding[allLocalsCounter + LOCALS_INCREMENT], 0, allLocalsCounter);
+ }
+ locals[allLocalsCounter++] = local;
+ local.initializationPCs = new int[4];
+ local.initializationCount = 0;
+}
+public void recordPositionsFrom(int startPC, int sourcePos) {
+
+ /* Record positions in the table, only if nothing has
+ * already been recorded. Since we output them on the way
+ * up (children first for more specific info)
+ * The pcToSourceMap table is always sorted.
+ */
+
+ if (!generateLineNumberAttributes)
+ return;
+ if (sourcePos == 0)
+ return;
+
+ // no code generated for this node. e.g. field without any initialization
+ if (position == startPC)
+ return;
+
+ // Widening an existing entry that already has the same source positions
+ if (pcToSourceMapSize + 4 > pcToSourceMap.length) {
+ // resize the array pcToSourceMap
+ System.arraycopy(pcToSourceMap, 0, pcToSourceMap = new int[pcToSourceMapSize << 1], 0, pcToSourceMapSize);
+ }
+ int newLine = ClassFile.searchLineNumber(lineSeparatorPositions, sourcePos);
+ // lastEntryPC represents the endPC of the lastEntry.
+ if (pcToSourceMapSize > 0) {
+ // in this case there is already an entry in the table
+ if (pcToSourceMap[pcToSourceMapSize - 1] != newLine) {
+ if (startPC < lastEntryPC) {
+ // we forgot to add an entry.
+ // search if an existing entry exists for startPC
+ int insertionIndex = insertionIndex(pcToSourceMap, pcToSourceMapSize, startPC);
+ if (insertionIndex != -1) {
+ // there is no existing entry starting with startPC.
+ int existingEntryIndex = indexOfSameLineEntrySincePC(startPC, newLine); // index for PC
+ /* the existingEntryIndex corresponds to en entry with the same line and a PC >= startPC.
+ in this case it is relevant to widen this entry instead of creating a new one.
+ line1: this(a,
+ b,
+ c);
+ with this code we generate each argument. We generate a aload0 to invoke the constructor. There is no entry for this
+ aload0 bytecode. The first entry is the one for the argument a.
+ But we want the constructor call to start at the aload0 pc and not just at the pc of the first argument.
+ So we widen the existing entry (if there is one) or we create a new entry with the startPC.
+ */
+ if (existingEntryIndex != -1) {
+ // widen existing entry
+ pcToSourceMap[existingEntryIndex] = startPC;
+ } else if (insertionIndex < 1 || pcToSourceMap[insertionIndex - 1] != newLine) {
+ // we have to add an entry that won't be sorted. So we sort the pcToSourceMap.
+ System.arraycopy(pcToSourceMap, insertionIndex, pcToSourceMap, insertionIndex + 2, pcToSourceMapSize - insertionIndex);
+ pcToSourceMap[insertionIndex++] = startPC;
+ pcToSourceMap[insertionIndex] = newLine;
+ pcToSourceMapSize += 2;
+ }
+ } else if (position != lastEntryPC) { // no bytecode since last entry pc
+ pcToSourceMap[pcToSourceMapSize++] = lastEntryPC;
+ pcToSourceMap[pcToSourceMapSize++] = newLine;
+ }
+ } else {
+ // we can safely add the new entry. The endPC of the previous entry is not in conflit with the startPC of the new entry.
+ pcToSourceMap[pcToSourceMapSize++] = startPC;
+ pcToSourceMap[pcToSourceMapSize++] = newLine;
+ }
+ } else {
+ /* the last recorded entry is on the same line. But it could be relevant to widen this entry.
+ we want to extend this entry forward in case we generated some bytecode before the last entry that are not related to any statement
+ */
+ if (startPC < pcToSourceMap[pcToSourceMapSize - 2]) {
+ int insertionIndex = insertionIndex(pcToSourceMap, pcToSourceMapSize, startPC);
+ if (insertionIndex != -1) {
+ // widen the existing entry
+ // we have to figure out if we need to move the last entry at another location to keep a sorted table
+ /* First we need to check if at the insertion position there is not an existing entry
+ * that includes the one we want to insert. This is the case if pcToSourceMap[insertionIndex - 1] == newLine.
+ * In this case we don't want to change the table. If not, we want to insert a new entry. Prior to insertion
+ * we want to check if it is worth doing an arraycopy. If not we simply update the recorded pc.
+ */
+ if (!((insertionIndex > 1) && (pcToSourceMap[insertionIndex - 1] == newLine))) {
+ if ((pcToSourceMapSize > 4) && (pcToSourceMap[pcToSourceMapSize - 4] > startPC)) {
+ System.arraycopy(pcToSourceMap, insertionIndex, pcToSourceMap, insertionIndex + 2, pcToSourceMapSize - 2 - insertionIndex);
+ pcToSourceMap[insertionIndex++] = startPC;
+ pcToSourceMap[insertionIndex] = newLine;
+ } else {
+ pcToSourceMap[pcToSourceMapSize - 2] = startPC;
+ }
+ }
+ }
+ }
+ }
+ lastEntryPC = position;
+ } else {
+ // record the first entry
+ pcToSourceMap[pcToSourceMapSize++] = startPC;
+ pcToSourceMap[pcToSourceMapSize++] = newLine;
+ lastEntryPC = position;
+ }
+}
+/**
+ * @param anExceptionLabel org.eclipse.wst.jsdt.internal.compiler.codegen.ExceptionLabel
+ */
+public void registerExceptionHandler(ExceptionLabel anExceptionLabel) {
+ int length;
+ if (exceptionHandlersIndex >= (length = exceptionHandlers.length)) {
+ // resize the exception handlers table
+ System.arraycopy(exceptionHandlers, 0, exceptionHandlers = new ExceptionLabel[length + LABELS_INCREMENT], 0, length);
+ }
+ // no need to resize. So just add the new exception label
+ exceptionHandlers[exceptionHandlersIndex++] = anExceptionLabel;
+ exceptionHandlersCounter++;
+}
+public void removeExceptionHandler(ExceptionLabel exceptionLabel) {
+ for (int i = 0; i < exceptionHandlersIndex; i++) {
+ if (exceptionHandlers[i] == exceptionLabel) {
+ exceptionHandlers[i] = null;
+ exceptionHandlersCounter--;
+ return;
+ }
+ }
+}
+public final void removeNotDefinitelyAssignedVariables(Scope scope, int initStateIndex) {
+ // given some flow info, make sure we did not loose some variables initialization
+ // if this happens, then we must update their pc entries to reflect it in debug attributes
+ if (!generateLocalVariableTableAttributes)
+ return;
+/* if (initStateIndex == lastInitStateIndexWhenRemovingInits)
+ return;
+
+ lastInitStateIndexWhenRemovingInits = initStateIndex;
+ if (lastInitStateIndexWhenAddingInits != initStateIndex){
+ lastInitStateIndexWhenAddingInits = -2;// reinitialize add index
+ // add(1)-remove(1)-add(1) -> ignore second add
+ // add(1)-remove(2)-add(1) -> perform second add
+ }*/
+ for (int i = 0; i < visibleLocalsCount; i++) {
+ LocalVariableBinding localBinding = visibleLocals[i];
+ if (localBinding != null) {
+ if (initStateIndex == -1 || !isDefinitelyAssigned(scope, initStateIndex, localBinding)) {
+ if (localBinding.initializationCount > 0) {
+ localBinding.recordInitializationEndPC(position);
+ }
+ }
+ }
+ }
+}
+/**
+ * @param referenceMethod org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration
+ * @param targetClassFile org.eclipse.wst.jsdt.internal.compiler.codegen.ClassFile
+ */
+public void reset(AbstractMethodDeclaration referenceMethod, ClassFile targetClassFile) {
+ init(targetClassFile);
+ this.methodDeclaration = referenceMethod;
+ preserveUnusedLocals = referenceMethod.scope.problemReporter().options.preserveAllLocalVariables;
+ initializeMaxLocals(referenceMethod.binding);
+}
+/**
+ * @param targetClassFile The given classfile to reset the code stream
+ */
+public void resetForProblemClinit(ClassFile targetClassFile) {
+ init(targetClassFile);
+ maxLocals = 0;
+}
+private final void resizeByteArray() {
+ int length = bCodeStream.length;
+ int requiredSize = length + length;
+ if (classFileOffset > requiredSize) {
+ // must be sure to grow by enough
+ requiredSize = classFileOffset + length;
+ }
+ System.arraycopy(bCodeStream, 0, bCodeStream = new byte[requiredSize], 0, length);
+}
+final public void ret(int index) {
+ if (DEBUG) System.out.println(position + "\t\tret:"+index); //$NON-NLS-1$
+ countLabels = 0;
+ if (index > 255) { // Widen
+ if (classFileOffset + 3 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 2;
+ bCodeStream[classFileOffset++] = OPC_wide;
+ bCodeStream[classFileOffset++] = OPC_ret;
+ writeUnsignedShort(index);
+ } else { // Don't Widen
+ if (classFileOffset + 1 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 2;
+ bCodeStream[classFileOffset++] = OPC_ret;
+ bCodeStream[classFileOffset++] = (byte) index;
+ }
+}
+final public void return_() {
+ if (DEBUG) System.out.println(position + "\t\treturn"); //$NON-NLS-1$
+ countLabels = 0;
+ // the stackDepth should be equal to 0
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_return;
+}
+final public void saload() {
+ if (DEBUG) System.out.println(position + "\t\tsaload"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_saload;
+}
+final public void sastore() {
+ if (DEBUG) System.out.println(position + "\t\tsastore"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth -= 3;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_sastore;
+}
+/**
+ * @param operatorConstant int
+ * @param type_ID int
+ */
+public void sendOperator(int operatorConstant, int type_ID) {
+ switch (type_ID) {
+ case T_int :
+ case T_boolean :
+ case T_char :
+ case T_byte :
+ case T_short :
+ switch (operatorConstant) {
+ case PLUS :
+ this.iadd();
+ break;
+ case MINUS :
+ this.isub();
+ break;
+ case MULTIPLY :
+ this.imul();
+ break;
+ case DIVIDE :
+ this.idiv();
+ break;
+ case REMAINDER :
+ this.irem();
+ break;
+ case LEFT_SHIFT :
+ this.ishl();
+ break;
+ case RIGHT_SHIFT :
+ this.ishr();
+ break;
+ case UNSIGNED_RIGHT_SHIFT :
+ this.iushr();
+ break;
+ case AND :
+ this.iand();
+ break;
+ case OR :
+ this.ior();
+ break;
+ case XOR :
+ this.ixor();
+ break;
+ }
+ break;
+ case T_long :
+ switch (operatorConstant) {
+ case PLUS :
+ this.ladd();
+ break;
+ case MINUS :
+ this.lsub();
+ break;
+ case MULTIPLY :
+ this.lmul();
+ break;
+ case DIVIDE :
+ this.ldiv();
+ break;
+ case REMAINDER :
+ this.lrem();
+ break;
+ case LEFT_SHIFT :
+ this.lshl();
+ break;
+ case RIGHT_SHIFT :
+ this.lshr();
+ break;
+ case UNSIGNED_RIGHT_SHIFT :
+ this.lushr();
+ break;
+ case AND :
+ this.land();
+ break;
+ case OR :
+ this.lor();
+ break;
+ case XOR :
+ this.lxor();
+ break;
+ }
+ break;
+ case T_float :
+ switch (operatorConstant) {
+ case PLUS :
+ this.fadd();
+ break;
+ case MINUS :
+ this.fsub();
+ break;
+ case MULTIPLY :
+ this.fmul();
+ break;
+ case DIVIDE :
+ this.fdiv();
+ break;
+ case REMAINDER :
+ this.frem();
+ }
+ break;
+ case T_double :
+ switch (operatorConstant) {
+ case PLUS :
+ this.dadd();
+ break;
+ case MINUS :
+ this.dsub();
+ break;
+ case MULTIPLY :
+ this.dmul();
+ break;
+ case DIVIDE :
+ this.ddiv();
+ break;
+ case REMAINDER :
+ this.drem();
+ }
+ }
+}
+final public void sipush(int s) {
+ if (DEBUG) System.out.println(position + "\t\tsipush:"+s); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth++;
+ if (stackDepth > stackMax)
+ stackMax = stackDepth;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_sipush;
+ writeSignedShort(s);
+}
+public static final void sort(int[] tab, int lo0, int hi0, int[] result) {
+ int lo = lo0;
+ int hi = hi0;
+ int mid;
+ if (hi0 > lo0) {
+ /* Arbitrarily establishing partition element as the midpoint of
+ * the array.
+ */
+ mid = tab[ (lo0 + hi0) / 2];
+ // loop through the array until indices cross
+ while (lo <= hi) {
+ /* find the first element that is greater than or equal to
+ * the partition element starting from the left Index.
+ */
+ while ((lo < hi0) && (tab[lo] < mid))
+ ++lo;
+ /* find an element that is smaller than or equal to
+ * the partition element starting from the right Index.
+ */
+ while ((hi > lo0) && (tab[hi] > mid))
+ --hi;
+ // if the indexes have not crossed, swap
+ if (lo <= hi) {
+ swap(tab, lo, hi, result);
+ ++lo;
+ --hi;
+ }
+ }
+ /* If the right index has not reached the left side of array
+ * must now sort the left partition.
+ */
+ if (lo0 < hi)
+ sort(tab, lo0, hi, result);
+ /* If the left index has not reached the right side of array
+ * must now sort the right partition.
+ */
+ if (lo < hi0)
+ sort(tab, lo, hi0, result);
+ }
+}
+
+public final void store(LocalVariableBinding localBinding, boolean valueRequired) {
+ int localPosition = localBinding.resolvedPosition;
+ // Using dedicated int bytecode
+ switch(localBinding.type.id) {
+ case TypeIds.T_int :
+ case TypeIds.T_char :
+ case TypeIds.T_byte :
+ case TypeIds.T_short :
+ case TypeIds.T_boolean :
+ if (valueRequired)
+ this.dup();
+ switch (localPosition) {
+ case 0 :
+ this.istore_0();
+ break;
+ case 1 :
+ this.istore_1();
+ break;
+ case 2 :
+ this.istore_2();
+ break;
+ case 3 :
+ this.istore_3();
+ break;
+ //case -1 :
+ // internal failure: trying to store into variable not supposed to be generated
+ // break;
+ default :
+ this.istore(localPosition);
+ }
+ break;
+ case TypeIds.T_float :
+ if (valueRequired)
+ this.dup();
+ switch (localPosition) {
+ case 0 :
+ this.fstore_0();
+ break;
+ case 1 :
+ this.fstore_1();
+ break;
+ case 2 :
+ this.fstore_2();
+ break;
+ case 3 :
+ this.fstore_3();
+ break;
+ default :
+ this.fstore(localPosition);
+ }
+ break;
+ case TypeIds.T_double :
+ if (valueRequired)
+ this.dup2();
+ switch (localPosition) {
+ case 0 :
+ this.dstore_0();
+ break;
+ case 1 :
+ this.dstore_1();
+ break;
+ case 2 :
+ this.dstore_2();
+ break;
+ case 3 :
+ this.dstore_3();
+ break;
+ default :
+ this.dstore(localPosition);
+ }
+ break;
+ case TypeIds.T_long :
+ if (valueRequired)
+ this.dup2();
+ switch (localPosition) {
+ case 0 :
+ this.lstore_0();
+ break;
+ case 1 :
+ this.lstore_1();
+ break;
+ case 2 :
+ this.lstore_2();
+ break;
+ case 3 :
+ this.lstore_3();
+ break;
+ default :
+ this.lstore(localPosition);
+ }
+ break;
+ default:
+ // Reference object
+ if (valueRequired)
+ this.dup();
+ switch (localPosition) {
+ case 0 :
+ this.astore_0();
+ break;
+ case 1 :
+ this.astore_1();
+ break;
+ case 2 :
+ this.astore_2();
+ break;
+ case 3 :
+ this.astore_3();
+ break;
+ default :
+ this.astore(localPosition);
+ }
+ }
+}
+public final void store(TypeBinding type, int localPosition) {
+ // Using dedicated int bytecode
+ if ((type == IntBinding) || (type == CharBinding) || (type == ByteBinding) || (type == ShortBinding) || (type == BooleanBinding)) {
+ switch (localPosition) {
+ case 0 :
+ this.istore_0();
+ break;
+ case 1 :
+ this.istore_1();
+ break;
+ case 2 :
+ this.istore_2();
+ break;
+ case 3 :
+ this.istore_3();
+ break;
+ default :
+ this.istore(localPosition);
+ }
+ return;
+ }
+ // Using dedicated float bytecode
+ if (type == FloatBinding) {
+ switch (localPosition) {
+ case 0 :
+ this.fstore_0();
+ break;
+ case 1 :
+ this.fstore_1();
+ break;
+ case 2 :
+ this.fstore_2();
+ break;
+ case 3 :
+ this.fstore_3();
+ break;
+ default :
+ this.fstore(localPosition);
+ }
+ return;
+ }
+ // Using dedicated long bytecode
+ if (type == LongBinding) {
+ switch (localPosition) {
+ case 0 :
+ this.lstore_0();
+ break;
+ case 1 :
+ this.lstore_1();
+ break;
+ case 2 :
+ this.lstore_2();
+ break;
+ case 3 :
+ this.lstore_3();
+ break;
+ default :
+ this.lstore(localPosition);
+ }
+ return;
+ }
+ // Using dedicated double bytecode
+ if (type == DoubleBinding) {
+ switch (localPosition) {
+ case 0 :
+ this.dstore_0();
+ break;
+ case 1 :
+ this.dstore_1();
+ break;
+ case 2 :
+ this.dstore_2();
+ break;
+ case 3 :
+ this.dstore_3();
+ break;
+ default :
+ this.dstore(localPosition);
+ }
+ return;
+ }
+ // Reference object
+ switch (localPosition) {
+ case 0 :
+ this.astore_0();
+ break;
+ case 1 :
+ this.astore_1();
+ break;
+ case 2 :
+ this.astore_2();
+ break;
+ case 3 :
+ this.astore_3();
+ break;
+ default :
+ this.astore(localPosition);
+ }
+}
+public final void storeInt(int localPosition) {
+ switch (localPosition) {
+ case 0 :
+ this.istore_0();
+ break;
+ case 1 :
+ this.istore_1();
+ break;
+ case 2 :
+ this.istore_2();
+ break;
+ case 3 :
+ this.istore_3();
+ break;
+ default :
+ this.istore(localPosition);
+ }
+}
+public final void storeObject(int localPosition) {
+ switch (localPosition) {
+ case 0 :
+ this.astore_0();
+ break;
+ case 1 :
+ this.astore_1();
+ break;
+ case 2 :
+ this.astore_2();
+ break;
+ case 3 :
+ this.astore_3();
+ break;
+ default :
+ this.astore(localPosition);
+ }
+}
+final public void swap() {
+ if (DEBUG) System.out.println(position + "\t\tswap"); //$NON-NLS-1$
+ countLabels = 0;
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_swap;
+}
+private static final void swap(int a[], int i, int j, int result[]) {
+ int T;
+ T = a[i];
+ a[i] = a[j];
+ a[j] = T;
+ T = result[j];
+ result[j] = result[i];
+ result[i] = T;
+}
+final public void tableswitch(CaseLabel defaultLabel, int low, int high, int[] keys, int[] sortedIndexes, CaseLabel[] casesLabel) {
+ if (DEBUG) System.out.println(position + "\t\ttableswitch"); //$NON-NLS-1$
+ countLabels = 0;
+ stackDepth--;
+ int length = casesLabel.length;
+ int pos = position;
+ defaultLabel.placeInstruction();
+ for (int i = 0; i < length; i++)
+ casesLabel[i].placeInstruction();
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = OPC_tableswitch;
+ for (int i = (3 - (pos % 4)); i > 0; i--) {
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = 0;
+ }
+ defaultLabel.branch();
+ writeSignedWord(low);
+ writeSignedWord(high);
+ int i = low, j = low;
+ // the index j is used to know if the index i is one of the missing entries in case of an
+ // optimized tableswitch
+ while (true) {
+ int index;
+ int key = keys[index = sortedIndexes[j - low]];
+ if (key == i) {
+ casesLabel[index].branch();
+ j++;
+ if (i == high) break; // if high is maxint, then avoids wrapping to minint.
+ } else {
+ defaultLabel.branch();
+ }
+ i++;
+ }
+}
+public String toString() {
+ StringBuffer buffer = new StringBuffer("( position:"); //$NON-NLS-1$
+ buffer.append(position);
+ buffer.append(",\nstackDepth:"); //$NON-NLS-1$
+ buffer.append(stackDepth);
+ buffer.append(",\nmaxStack:"); //$NON-NLS-1$
+ buffer.append(stackMax);
+ buffer.append(",\nmaxLocals:"); //$NON-NLS-1$
+ buffer.append(maxLocals);
+ buffer.append(")"); //$NON-NLS-1$
+ return buffer.toString();
+}
+public void updateLastRecordedEndPC(int pos) {
+
+ /* Tune positions in the table, this is due to some
+ * extra bytecodes being
+ * added to some user code (jumps). */
+ /** OLD CODE
+ if (!generateLineNumberAttributes)
+ return;
+ pcToSourceMap[pcToSourceMapSize - 1][1] = position;
+ // need to update the initialization endPC in case of generation of local variable attributes.
+ updateLocalVariablesAttribute(pos);
+ */
+
+ if (!generateLineNumberAttributes)
+ return;
+ this.lastEntryPC = pos;
+ // need to update the initialization endPC in case of generation of local variable attributes.
+ updateLocalVariablesAttribute(pos);
+}
+public void updateLocalVariablesAttribute(int pos) {
+ // need to update the initialization endPC in case of generation of local variable attributes.
+ if (generateLocalVariableTableAttributes) {
+ for (int i = 0, max = locals.length; i < max; i++) {
+ LocalVariableBinding local = locals[i];
+ if ((local != null) && (local.initializationCount > 0)) {
+ if (local.initializationPCs[((local.initializationCount - 1) << 1) + 1] == pos) {
+ local.initializationPCs[((local.initializationCount - 1) << 1) + 1] = position;
+ }
+ }
+ }
+ }
+}
+/**
+ * Write a signed 16 bits value into the byte array
+ * @param value the signed short
+ */
+public final void writeSignedShort(int value) {
+ // we keep the resize in here because it is used outside the code stream
+ if (classFileOffset + 1 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 2;
+ bCodeStream[classFileOffset++] = (byte) (value >> 8);
+ bCodeStream[classFileOffset++] = (byte) value;
+}
+public final void writeSignedShort(int pos, int value) {
+ int currentOffset = startingClassFileOffset + pos;
+ if (currentOffset + 1 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ bCodeStream[currentOffset] = (byte) (value >> 8);
+ bCodeStream[currentOffset + 1] = (byte) value;
+}
+public final void writeSignedWord(int value) {
+ // we keep the resize in here because it is used outside the code stream
+ if (classFileOffset + 3 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position += 4;
+ bCodeStream[classFileOffset++] = (byte) ((value & 0xFF000000) >> 24);
+ bCodeStream[classFileOffset++] = (byte) ((value & 0xFF0000) >> 16);
+ bCodeStream[classFileOffset++] = (byte) ((value & 0xFF00) >> 8);
+ bCodeStream[classFileOffset++] = (byte) (value & 0xFF);
+}
+public final void writeSignedWord(int pos, int value) {
+ int currentOffset = startingClassFileOffset + pos;
+ if (currentOffset + 4 >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ bCodeStream[currentOffset++] = (byte) ((value & 0xFF000000) >> 24);
+ bCodeStream[currentOffset++] = (byte) ((value & 0xFF0000) >> 16);
+ bCodeStream[currentOffset++] = (byte) ((value & 0xFF00) >> 8);
+ bCodeStream[currentOffset++] = (byte) (value & 0xFF);
+}
+/**
+ * Write a unsigned 16 bits value into the byte array
+ * @param value the unsigned short
+ */
+protected final void writeUnsignedShort(int value) {
+ position += 2;
+ bCodeStream[classFileOffset++] = (byte) (value >>> 8);
+ bCodeStream[classFileOffset++] = (byte) value;
+}
+/*
+ * Wide conditional branch compare, improved by swapping comparison opcode
+ * ifeq WideTarget
+ * becomes
+ * ifne Intermediate
+ * gotow WideTarget
+ * Intermediate:
+ */
+public void generateWideRevertedConditionalBranch(byte revertedOpcode, Label wideTarget) {
+ Label intermediate = new Label(this);
+ if (classFileOffset >= bCodeStream.length) {
+ resizeByteArray();
+ }
+ position++;
+ bCodeStream[classFileOffset++] = revertedOpcode;
+ intermediate.branch();
+ this.goto_w(wideTarget);
+ intermediate.place();
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/ConstantPool.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/ConstantPool.js
new file mode 100644
index 0000000..829d4c8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/ConstantPool.js
@@ -0,0 +1,3609 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.codegen;
+
+import org.eclipse.wst.jsdt.core.compiler.*;
+import org.eclipse.wst.jsdt.internal.compiler.ClassFile;
+
+import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+
+/**
+ * This type is used to store all the constant pool entries.
+ */
+public class ConstantPool implements ClassFileConstants, TypeIds {
+ public static final int DOUBLE_INITIAL_SIZE = 5;
+ public static final int FLOAT_INITIAL_SIZE = 3;
+ public static final int INT_INITIAL_SIZE = 248;
+ public static final int LONG_INITIAL_SIZE = 5;
+ public static final int UTF8_INITIAL_SIZE = 778;
+ public static final int STRING_INITIAL_SIZE = 761;
+ public static final int FIELD_INITIAL_SIZE = 156;
+ public static final int METHOD_INITIAL_SIZE = 236;
+ public static final int INTERFACE_INITIAL_SIZE = 50;
+ public static final int CLASS_INITIAL_SIZE = 86;
+ public static final int NAMEANDTYPE_INITIAL_SIZE = 272;
+ public static final int CONSTANTPOOL_INITIAL_SIZE = 2000;
+ public static final int CONSTANTPOOL_GROW_SIZE = 6000;
+ protected DoubleCache doubleCache;
+ protected FloatCache floatCache;
+ protected IntegerCache intCache;
+ protected LongCache longCache;
+ public CharArrayCache UTF8Cache;
+ protected CharArrayCache stringCache;
+ protected ObjectCache fieldCache;
+ protected ObjectCache methodCache;
+ protected ObjectCache interfaceMethodCache;
+ protected ObjectCache classCache;
+ protected FieldNameAndTypeCache nameAndTypeCacheForFields;
+ protected MethodNameAndTypeCache nameAndTypeCacheForMethods;
+ int[] wellKnownTypes = new int[23];
+ int[] wellKnownMethods = new int[49];
+ int[] wellKnownFields = new int[9];
+ int[] wellKnownFieldNameAndTypes = new int[2];
+ int[] wellKnownMethodNameAndTypes = new int[43];
+ public byte[] poolContent;
+ public int currentIndex = 1;
+ public int currentOffset;
+ // predefined constant index for well known types
+ final static int JAVA_LANG_BOOLEAN_TYPE = 0;
+ final static int JAVA_LANG_BYTE_TYPE = 1;
+ final static int JAVA_LANG_CHARACTER_TYPE = 2;
+ final static int JAVA_LANG_DOUBLE_TYPE = 3;
+ final static int JAVA_LANG_FLOAT_TYPE = 4;
+ final static int JAVA_LANG_INTEGER_TYPE = 5;
+ final static int JAVA_LANG_LONG_TYPE = 6;
+ final static int JAVA_LANG_SHORT_TYPE = 7;
+ final static int JAVA_LANG_VOID_TYPE = 8;
+ final static int JAVA_LANG_CLASS_TYPE = 9;
+ final static int JAVA_LANG_CLASSNOTFOUNDEXCEPTION_TYPE = 10;
+ final static int JAVA_LANG_NOCLASSDEFFOUNDERROR_TYPE = 11;
+ final static int JAVA_LANG_OBJECT_TYPE = 12;
+ final static int JAVA_LANG_STRING_TYPE = 13;
+ final static int JAVA_LANG_STRINGBUFFER_TYPE = 14;
+ final static int JAVA_LANG_SYSTEM_TYPE = 15;
+ final static int JAVA_LANG_THROWABLE_TYPE = 16;
+ final static int JAVA_LANG_ERROR_TYPE = 17;
+ final static int JAVA_LANG_EXCEPTION_TYPE = 18;
+ final static int JAVA_LANG_REFLECT_CONSTRUCTOR_TYPE = 19;
+ final static int JAVA_LANG_ASSERTIONERROR_TYPE = 20;
+ final static int JAVA_UTIL_ITERATOR_TYPE = 21;
+ final static int JAVA_LANG_STRINGBUILDER_TYPE = 22;
+
+ // predefined constant index for well known fields
+ final static int JAVA_LANG_BYTE_TYPE_FIELD = 0;
+ final static int JAVA_LANG_SHORT_TYPE_FIELD = 1;
+ final static int JAVA_LANG_CHARACTER_TYPE_FIELD = 2;
+ final static int JAVA_LANG_INTEGER_TYPE_FIELD = 3;
+ final static int JAVA_LANG_LONG_TYPE_FIELD = 4;
+ final static int JAVA_LANG_FLOAT_TYPE_FIELD = 5;
+ final static int JAVA_LANG_DOUBLE_TYPE_FIELD = 6;
+ final static int JAVA_LANG_BOOLEAN_TYPE_FIELD = 7;
+ final static int JAVA_LANG_VOID_TYPE_FIELD = 8;
+
+ // predefined constant index for well known methods
+ final static int CLASS_FORNAME_METHOD = 0;
+ final static int NOCLASSDEFFOUNDERROR_CONSTR_METHOD = 1;
+ final static int STRINGBUFFER_APPEND_INT_METHOD = 2;
+ final static int STRINGBUFFER_APPEND_FLOAT_METHOD = 3;
+ final static int STRINGBUFFER_APPEND_LONG_METHOD = 4;
+ final static int STRINGBUFFER_APPEND_OBJECT_METHOD = 5;
+ final static int STRINGBUFFER_APPEND_CHAR_METHOD = 6;
+ final static int STRINGBUFFER_APPEND_STRING_METHOD = 7;
+ final static int STRINGBUFFER_APPEND_BOOLEAN_METHOD = 8;
+ final static int STRINGBUFFER_APPEND_DOUBLE_METHOD = 9;
+ final static int STRINGBUFFER_STRING_CONSTR_METHOD = 10;
+ final static int STRINGBUFFER_DEFAULT_CONSTR_METHOD = 11;
+ final static int STRINGBUFFER_TOSTRING_METHOD = 12;
+ final static int SYSTEM_EXIT_METHOD = 13;
+ final static int THROWABLE_GETMESSAGE_METHOD = 14;
+ final static int JAVALANGERROR_CONSTR_METHOD = 15;
+ final static int NEWINSTANCE_CONSTRUCTOR_METHOD = 16;
+ final static int STRING_INTERN_METHOD = 17;
+ final static int STRING_VALUEOF_INT_METHOD = 18;
+ final static int STRING_VALUEOF_FLOAT_METHOD = 19;
+ final static int STRING_VALUEOF_LONG_METHOD = 20;
+ final static int STRING_VALUEOF_OBJECT_METHOD = 21;
+ final static int STRING_VALUEOF_CHAR_METHOD = 22;
+ final static int STRING_VALUEOF_BOOLEAN_METHOD = 23;
+ final static int STRING_VALUEOF_DOUBLE_METHOD = 24;
+ final static int ASSERTIONERROR_CONSTR_OBJECT_METHOD = 25;
+ final static int ASSERTIONERROR_CONSTR_INT_METHOD = 26;
+ final static int ASSERTIONERROR_CONSTR_LONG_METHOD = 27;
+ final static int ASSERTIONERROR_CONSTR_FLOAT_METHOD = 28;
+ final static int ASSERTIONERROR_CONSTR_DOUBLE_METHOD = 29;
+ final static int ASSERTIONERROR_CONSTR_BOOLEAN_METHOD = 30;
+ final static int ASSERTIONERROR_CONSTR_CHAR_METHOD = 31;
+ final static int ASSERTIONERROR_DEFAULT_CONSTR_METHOD = 32;
+ final static int CLASS_DESIREDASSERTIONSTATUS_METHOD = 33;
+ final static int OBJECT_GETCLASS_METHOD = 34;
+ final static int CLASS_GETCOMPONENTTYPE_METHOD = 35;
+ final static int ITERATOR_HASNEXT_METHOD = 36;
+ final static int ITERATOR_NEXT_METHOD = 37;
+ final static int STRINGBUILDER_STRING_CONSTR_METHOD = 38;
+ final static int STRINGBUILDER_DEFAULT_CONSTR_METHOD = 39;
+ final static int STRINGBUILDER_TOSTRING_METHOD = 40;
+ final static int STRINGBUILDER_APPEND_INT_METHOD = 41;
+ final static int STRINGBUILDER_APPEND_FLOAT_METHOD = 42;
+ final static int STRINGBUILDER_APPEND_LONG_METHOD = 43;
+ final static int STRINGBUILDER_APPEND_OBJECT_METHOD = 44;
+ final static int STRINGBUILDER_APPEND_CHAR_METHOD = 45;
+ final static int STRINGBUILDER_APPEND_STRING_METHOD = 46;
+ final static int STRINGBUILDER_APPEND_BOOLEAN_METHOD = 47;
+ final static int STRINGBUILDER_APPEND_DOUBLE_METHOD = 48;
+
+ // predefined constant index for well known name and type for fields
+ final static int TYPE_JAVALANGCLASS_NAME_AND_TYPE = 0;
+ final static int OUT_SYSTEM_NAME_AND_TYPE = 1;
+ // predefined constant index for well known name and type for methods
+ final static int FORNAME_CLASS_METHOD_NAME_AND_TYPE = 0;
+ final static int CONSTR_STRING_METHOD_NAME_AND_TYPE = 1;
+ final static int DEFAULT_CONSTR_METHOD_NAME_AND_TYPE = 2;
+ final static int APPEND_INT_STRINGBUFFER_METHOD_NAME_AND_TYPE = 3;
+ final static int APPEND_FLOAT_STRINGBUFFER_METHOD_NAME_AND_TYPE = 4;
+ final static int APPEND_LONG_STRINGBUFFER_METHOD_NAME_AND_TYPE = 5;
+ final static int APPEND_OBJECT_STRINGBUFFER_METHOD_NAME_AND_TYPE = 6;
+ final static int APPEND_CHAR_STRINGBUFFER_METHOD_NAME_AND_TYPE = 7;
+ final static int APPEND_STRING_STRINGBUFFER_METHOD_NAME_AND_TYPE = 8;
+ final static int APPEND_BOOLEAN_STRINGBUFFER_METHOD_NAME_AND_TYPE = 9;
+ final static int APPEND_DOUBLE_STRINGBUFFER_METHOD_NAME_AND_TYPE = 10;
+ final static int TOSTRING_METHOD_NAME_AND_TYPE = 11;
+ final static int EXIT_METHOD_NAME_AND_TYPE = 12;
+ final static int GETMESSAGE_METHOD_NAME_AND_TYPE = 13;
+ final static int NEWINSTANCE_METHOD_NAME_AND_TYPE = 14;
+ final static int INTERN_METHOD_NAME_AND_TYPE = 15;
+ final static int VALUEOF_INT_METHOD_NAME_AND_TYPE = 16;
+ final static int VALUEOF_FLOAT_METHOD_NAME_AND_TYPE = 17;
+ final static int VALUEOF_LONG_METHOD_NAME_AND_TYPE = 18;
+ final static int VALUEOF_OBJECT_METHOD_NAME_AND_TYPE = 19;
+ final static int VALUEOF_CHAR_METHOD_NAME_AND_TYPE = 20;
+ final static int VALUEOF_BOOLEAN_METHOD_NAME_AND_TYPE = 21;
+ final static int VALUEOF_DOUBLE_METHOD_NAME_AND_TYPE = 22;
+ final static int CONSTR_INT_METHOD_NAME_AND_TYPE = 23;
+ final static int CONSTR_LONG_METHOD_NAME_AND_TYPE = 24;
+ final static int CONSTR_FLOAT_METHOD_NAME_AND_TYPE = 25;
+ final static int CONSTR_DOUBLE_METHOD_NAME_AND_TYPE = 26;
+ final static int CONSTR_OBJECT_METHOD_NAME_AND_TYPE = 27;
+ final static int CONSTR_CHAR_METHOD_NAME_AND_TYPE = 28;
+ final static int CONSTR_BOOLEAN_METHOD_NAME_AND_TYPE = 29;
+ final static int DESIREDASSERTIONSTATUS_METHOD_NAME_AND_TYPE = 30;
+ final static int GETCLASS_OBJECT_METHOD_NAME_AND_TYPE = 31;
+ final static int GETCOMPONENTTYPE_CLASS_METHOD_NAME_AND_TYPE = 32;
+ final static int HASNEXT_METHOD_NAME_AND_TYPE = 33;
+ final static int NEXT_METHOD_NAME_AND_TYPE = 34;
+ final static int APPEND_INT_STRINGBUILDER_METHOD_NAME_AND_TYPE = 35;
+ final static int APPEND_FLOAT_STRINGBUILDER_METHOD_NAME_AND_TYPE = 36;
+ final static int APPEND_LONG_STRINGBUILDER_METHOD_NAME_AND_TYPE = 37;
+ final static int APPEND_OBJECT_STRINGBUILDER_METHOD_NAME_AND_TYPE = 38;
+ final static int APPEND_CHAR_STRINGBUILDER_METHOD_NAME_AND_TYPE = 39;
+ final static int APPEND_STRING_STRINGBUILDER_METHOD_NAME_AND_TYPE = 40;
+ final static int APPEND_BOOLEAN_STRINGBUILDER_METHOD_NAME_AND_TYPE = 41;
+ final static int APPEND_DOUBLE_STRINGBUILDER_METHOD_NAME_AND_TYPE = 42;
+
+
+ public ClassFile classFile;
+
+/**
+ * ConstantPool constructor comment.
+ */
+public ConstantPool(ClassFile classFile) {
+ this.UTF8Cache = new CharArrayCache(UTF8_INITIAL_SIZE);
+ this.stringCache = new CharArrayCache(STRING_INITIAL_SIZE);
+ this.fieldCache = new ObjectCache(FIELD_INITIAL_SIZE);
+ this.methodCache = new ObjectCache(METHOD_INITIAL_SIZE);
+ this.interfaceMethodCache = new ObjectCache(INTERFACE_INITIAL_SIZE);
+ this.classCache = new ObjectCache(CLASS_INITIAL_SIZE);
+ this.nameAndTypeCacheForMethods = new MethodNameAndTypeCache(NAMEANDTYPE_INITIAL_SIZE);
+ this.nameAndTypeCacheForFields = new FieldNameAndTypeCache(NAMEANDTYPE_INITIAL_SIZE);
+ this.poolContent = classFile.header;
+ this.currentOffset = classFile.headerOffset;
+ // currentOffset is initialized to 0 by default
+ this.currentIndex = 1;
+ this.classFile = classFile;
+}
+/**
+ * Return the content of the receiver
+ */
+public byte[] dumpBytes() {
+ System.arraycopy(poolContent, 0, (poolContent = new byte[currentOffset]), 0, currentOffset);
+ return poolContent;
+}
+/**
+ * Return the index of the @fieldBinding.
+ *
+ * Returns -1 if the @fieldBinding is not a predefined fieldBinding,
+ * the right index otherwise.
+ *
+ * @param fieldBinding org.eclipse.wst.jsdt.internal.compiler.lookup.FieldBinding
+ * @return <CODE>int</CODE>
+ */
+public int indexOfWellKnownFieldNameAndType(FieldBinding fieldBinding) {
+ if ((fieldBinding.type.id == T_JavaLangClass) && (CharOperation.equals(fieldBinding.name, QualifiedNamesConstants.TYPE)))
+ return TYPE_JAVALANGCLASS_NAME_AND_TYPE;
+ if ((fieldBinding.type.id == T_JavaIoPrintStream) && (CharOperation.equals(fieldBinding.name, QualifiedNamesConstants.Out)))
+ return OUT_SYSTEM_NAME_AND_TYPE;
+ return -1;
+}
+/**
+ * Return the index of the @fieldBinding.
+ *
+ * Returns -1 if the @fieldBinding is not a predefined fieldBinding,
+ * the right index otherwise.
+ *
+ * @param fieldBinding org.eclipse.wst.jsdt.internal.compiler.lookup.FieldBinding
+ * @return <CODE>int</CODE>
+ */
+public int indexOfWellKnownFields(FieldBinding fieldBinding) {
+ switch (fieldBinding.declaringClass.id) {
+ case T_JavaLangByte :
+ if (CharOperation.equals(fieldBinding.name, QualifiedNamesConstants.TYPE))
+ return JAVA_LANG_BYTE_TYPE_FIELD;
+ break;
+ case T_JavaLangShort :
+ if (CharOperation.equals(fieldBinding.name, QualifiedNamesConstants.TYPE))
+ return JAVA_LANG_SHORT_TYPE_FIELD;
+ break;
+ case T_JavaLangCharacter :
+ if (CharOperation.equals(fieldBinding.name, QualifiedNamesConstants.TYPE))
+ return JAVA_LANG_CHARACTER_TYPE_FIELD;
+ break;
+ case T_JavaLangInteger :
+ if (CharOperation.equals(fieldBinding.name, QualifiedNamesConstants.TYPE))
+ return JAVA_LANG_INTEGER_TYPE_FIELD;
+ break;
+ case T_JavaLangLong :
+ if (CharOperation.equals(fieldBinding.name, QualifiedNamesConstants.TYPE))
+ return JAVA_LANG_LONG_TYPE_FIELD;
+ break;
+ case T_JavaLangFloat :
+ if (CharOperation.equals(fieldBinding.name, QualifiedNamesConstants.TYPE))
+ return JAVA_LANG_FLOAT_TYPE_FIELD;
+ break;
+ case T_JavaLangDouble :
+ if (CharOperation.equals(fieldBinding.name, QualifiedNamesConstants.TYPE))
+ return JAVA_LANG_DOUBLE_TYPE_FIELD;
+ break;
+ case T_JavaLangBoolean :
+ if (CharOperation.equals(fieldBinding.name, QualifiedNamesConstants.TYPE))
+ return JAVA_LANG_BOOLEAN_TYPE_FIELD;
+ break;
+ case T_JavaLangVoid :
+ if (CharOperation.equals(fieldBinding.name, QualifiedNamesConstants.TYPE))
+ return JAVA_LANG_VOID_TYPE_FIELD;
+ break;
+ }
+ return -1;
+}
+/**
+ * Return the index of the @methodBinding.
+ *
+ * Returns -1 if the @methodBinding is not a predefined methodBinding,
+ * the right index otherwise.
+ *
+ * @param methodBinding org.eclipse.wst.jsdt.internal.compiler.lookup.MethodBinding
+ * @return <CODE>int</CODE>
+ */
+public int indexOfWellKnownMethodNameAndType(MethodBinding methodBinding) {
+ char firstChar = methodBinding.selector[0];
+ switch (firstChar) {
+ case 'f' :
+ if ((methodBinding.parameters.length == 1) && (methodBinding.parameters[0].id == T_JavaLangString) && (methodBinding.returnType.id == T_JavaLangClass) && (CharOperation.equals(methodBinding.selector, QualifiedNamesConstants.ForName))) {
+ // This method binding is forName(java.lang.String)
+ return FORNAME_CLASS_METHOD_NAME_AND_TYPE;
+ }
+ break;
+ case '<' :
+ if (CharOperation.equals(methodBinding.selector, QualifiedNamesConstants.Init)) {
+ switch(methodBinding.parameters.length) {
+ case 1:
+ switch(methodBinding.parameters[0].id) {
+ case T_String :
+ if (CharOperation.equals(methodBinding.signature(), QualifiedNamesConstants.StringConstructorSignature)) {
+ return CONSTR_STRING_METHOD_NAME_AND_TYPE;
+ } else {
+ return -1;
+ }
+ case T_Object :
+ if (CharOperation.equals(methodBinding.signature(), QualifiedNamesConstants.AssertionErrorObjectConstrSignature)) {
+ return CONSTR_OBJECT_METHOD_NAME_AND_TYPE;
+ } else {
+ return -1;
+ }
+ case T_int :
+ if (CharOperation.equals(methodBinding.signature(), QualifiedNamesConstants.AssertionErrorIntConstrSignature)) {
+ return CONSTR_INT_METHOD_NAME_AND_TYPE;
+ } else {
+ return -1;
+ }
+ case T_char :
+ if (CharOperation.equals(methodBinding.signature(), QualifiedNamesConstants.AssertionErrorCharConstrSignature)) {
+ return CONSTR_CHAR_METHOD_NAME_AND_TYPE;
+ } else {
+ return -1;
+ }
+ case T_boolean :
+ if (CharOperation.equals(methodBinding.signature(), QualifiedNamesConstants.AssertionErrorBooleanConstrSignature)) {
+ return CONSTR_BOOLEAN_METHOD_NAME_AND_TYPE;
+ } else {
+ return -1;
+ }
+ case T_float :
+ if (CharOperation.equals(methodBinding.signature(), QualifiedNamesConstants.AssertionErrorFloatConstrSignature)) {
+ return CONSTR_FLOAT_METHOD_NAME_AND_TYPE;
+ } else {
+ return -1;
+ }
+ case T_double :
+ if (CharOperation.equals(methodBinding.signature(), QualifiedNamesConstants.AssertionErrorDoubleConstrSignature)) {
+ return CONSTR_DOUBLE_METHOD_NAME_AND_TYPE;
+ } else {
+ return -1;
+ }
+ case T_long :
+ if (CharOperation.equals(methodBinding.signature(), QualifiedNamesConstants.AssertionErrorLongConstrSignature)) {
+ return CONSTR_LONG_METHOD_NAME_AND_TYPE;
+ } else {
+ return -1;
+ }
+ }
+ case 0:
+ if (methodBinding.signature().length == 3) {
+ return DEFAULT_CONSTR_METHOD_NAME_AND_TYPE;
+ }
+ }
+ }
+ break;
+ case 'a' :
+ if ((methodBinding.parameters.length == 1) && CharOperation.equals(methodBinding.selector, QualifiedNamesConstants.Append)) {
+ if (methodBinding.returnType.id == T_JavaLangStringBuffer) {
+ switch (methodBinding.parameters[0].id) {
+ case T_int :
+ case T_byte :
+ case T_short :
+ // This method binding is append(int)
+ return APPEND_INT_STRINGBUFFER_METHOD_NAME_AND_TYPE;
+ case T_float :
+ // This method binding is append(float)
+ return APPEND_FLOAT_STRINGBUFFER_METHOD_NAME_AND_TYPE;
+ case T_long :
+ // This method binding is append(long)
+ return APPEND_LONG_STRINGBUFFER_METHOD_NAME_AND_TYPE;
+ case T_JavaLangObject :
+ // This method binding is append(java.lang.Object)
+ return APPEND_OBJECT_STRINGBUFFER_METHOD_NAME_AND_TYPE;
+ case T_char :
+ // This method binding is append(char)
+ return APPEND_CHAR_STRINGBUFFER_METHOD_NAME_AND_TYPE;
+ case T_JavaLangString :
+ // This method binding is append(java.lang.String)
+ return APPEND_STRING_STRINGBUFFER_METHOD_NAME_AND_TYPE;
+ case T_boolean :
+ // This method binding is append(boolean)
+ return APPEND_BOOLEAN_STRINGBUFFER_METHOD_NAME_AND_TYPE;
+ case T_double :
+ // This method binding is append(double)
+ return APPEND_DOUBLE_STRINGBUFFER_METHOD_NAME_AND_TYPE;
+ }
+ } else if (methodBinding.returnType.id == T_JavaLangStringBuilder) {
+ switch (methodBinding.parameters[0].id) {
+ case T_int :
+ case T_byte :
+ case T_short :
+ // This method binding is append(int)
+ return APPEND_INT_STRINGBUILDER_METHOD_NAME_AND_TYPE;
+ case T_float :
+ // This method binding is append(float)
+ return APPEND_FLOAT_STRINGBUILDER_METHOD_NAME_AND_TYPE;
+ case T_long :
+ // This method binding is append(long)
+ return APPEND_LONG_STRINGBUILDER_METHOD_NAME_AND_TYPE;
+ case T_JavaLangObject :
+ // This method binding is append(java.lang.Object)
+ return APPEND_OBJECT_STRINGBUILDER_METHOD_NAME_AND_TYPE;
+ case T_char :
+ // This method binding is append(char)
+ return APPEND_CHAR_STRINGBUILDER_METHOD_NAME_AND_TYPE;
+ case T_JavaLangString :
+ // This method binding is append(java.lang.String)
+ return APPEND_STRING_STRINGBUILDER_METHOD_NAME_AND_TYPE;
+ case T_boolean :
+ // This method binding is append(boolean)
+ return APPEND_BOOLEAN_STRINGBUILDER_METHOD_NAME_AND_TYPE;
+ case T_double :
+ // This method binding is append(double)
+ return APPEND_DOUBLE_STRINGBUILDER_METHOD_NAME_AND_TYPE;
+ }
+ }
+ }
+ break;
+ case 't' :
+ if ((methodBinding.parameters.length == 0) && (methodBinding.returnType.id == T_JavaLangString) && (CharOperation.equals(methodBinding.selector, QualifiedNamesConstants.ToString))) {
+ // This method binding is toString()
+ return TOSTRING_METHOD_NAME_AND_TYPE;
+ }
+ break;
+ case 'v' :
+ if ((methodBinding.parameters.length == 1) && (methodBinding.returnType.id == T_JavaLangString) && (CharOperation.equals(methodBinding.selector, QualifiedNamesConstants.ValueOf))) {
+ switch(methodBinding.parameters[0].id) {
+ case T_Object:
+ return VALUEOF_OBJECT_METHOD_NAME_AND_TYPE;
+ case T_int:
+ case T_short:
+ case T_byte:
+ return VALUEOF_INT_METHOD_NAME_AND_TYPE;
+ case T_long:
+ return VALUEOF_LONG_METHOD_NAME_AND_TYPE;
+ case T_float:
+ return VALUEOF_FLOAT_METHOD_NAME_AND_TYPE;
+ case T_double:
+ return VALUEOF_DOUBLE_METHOD_NAME_AND_TYPE;
+ case T_boolean:
+ return VALUEOF_BOOLEAN_METHOD_NAME_AND_TYPE;
+ case T_char:
+ return VALUEOF_CHAR_METHOD_NAME_AND_TYPE;
+ }
+ }
+ break;
+ case 'e' :
+ if ((methodBinding.parameters.length == 1) && (methodBinding.parameters[0].id == T_int) && (methodBinding.returnType.id == T_void) && (CharOperation.equals(methodBinding.selector, QualifiedNamesConstants.Exit))) {
+ // This method binding is exit(int)
+ return EXIT_METHOD_NAME_AND_TYPE;
+ }
+ break;
+ case 'g' :
+ if ((methodBinding.selector.length == 10)
+ && (methodBinding.parameters.length == 0)
+ && (methodBinding.returnType.id == T_JavaLangString)
+ && (CharOperation.equals(methodBinding.selector, QualifiedNamesConstants.GetMessage))) {
+ // This method binding is getMessage()
+ return GETMESSAGE_METHOD_NAME_AND_TYPE;
+ }
+ if (methodBinding.parameters.length == 0
+ && methodBinding.returnType.id == T_JavaLangClass
+ && CharOperation.equals(methodBinding.selector, QualifiedNamesConstants.GetClass)) {
+ return GETCLASS_OBJECT_METHOD_NAME_AND_TYPE;
+ }
+ if (methodBinding.parameters.length == 0
+ && methodBinding.returnType.id == T_JavaLangClass
+ && CharOperation.equals(methodBinding.selector, QualifiedNamesConstants.GetComponentType)) {
+ return GETCOMPONENTTYPE_CLASS_METHOD_NAME_AND_TYPE;
+ }
+ break;
+ case 'i' :
+ if ((methodBinding.parameters.length == 0) && (methodBinding.returnType.id == T_JavaLangString) && (CharOperation.equals(methodBinding.selector, QualifiedNamesConstants.Intern))) {
+ // This method binding is intern()java.lang.String
+ return INTERN_METHOD_NAME_AND_TYPE;
+ }
+ break;
+ case 'h' :
+ if ((methodBinding.parameters.length == 0) && (methodBinding.returnType.id == T_boolean) && (CharOperation.equals(methodBinding.selector, QualifiedNamesConstants.HasNext))) {
+ // This method binding is hasNext()Z
+ return HASNEXT_METHOD_NAME_AND_TYPE;
+ }
+ case 'n' :
+ if ((methodBinding.parameters.length == 0) && (methodBinding.returnType.id == T_JavaLangObject) && (CharOperation.equals(methodBinding.selector, QualifiedNamesConstants.Next))) {
+ // This method binding is next()java.lang.Object
+ return NEXT_METHOD_NAME_AND_TYPE;
+ }
+ }
+ return -1;
+}
+/**
+ * Return the index of the @methodBinding.
+ *
+ * Returns -1 if the @methodBinding is not a predefined methodBinding,
+ * the right index otherwise.
+ *
+ * @param methodBinding org.eclipse.wst.jsdt.internal.compiler.lookup.MethodBinding
+ * @return <CODE>int</CODE>
+ */
+public int indexOfWellKnownMethods(MethodBinding methodBinding) {
+ char firstChar = methodBinding.selector[0];
+ switch (methodBinding.declaringClass.id) {
+ case T_JavaLangClass :
+ if ((firstChar == 'f') && (methodBinding.isStatic()) && (methodBinding.parameters.length == 1) && (methodBinding.parameters[0].id == T_JavaLangString) && (methodBinding.returnType.id == T_JavaLangClass) && (CharOperation.equals(methodBinding.selector, QualifiedNamesConstants.ForName))) {
+ // This method binding is forName(java.lang.String)
+ return CLASS_FORNAME_METHOD;
+ } else if ((firstChar == 'd') && (methodBinding.parameters.length == 0) && (methodBinding.returnType.id == T_boolean) && CharOperation.equals(methodBinding.selector, QualifiedNamesConstants.DesiredAssertionStatus)) {
+ return CLASS_DESIREDASSERTIONSTATUS_METHOD;
+ } else if ((firstChar == 'g') && (methodBinding.parameters.length == 0) && (methodBinding.returnType.id == T_JavaLangClass) && CharOperation.equals(methodBinding.selector, QualifiedNamesConstants.GetComponentType)) {
+ return CLASS_GETCOMPONENTTYPE_METHOD;
+ }
+ break;
+ case T_JavaLangNoClassDefError :
+ if ((firstChar == '<') && (methodBinding.parameters.length == 1) && (methodBinding.parameters[0].id == T_JavaLangString) && (CharOperation.equals(methodBinding.selector, QualifiedNamesConstants.Init))) {
+ // This method binding is NoClassDefFoundError(java.lang.String)
+ return NOCLASSDEFFOUNDERROR_CONSTR_METHOD;
+ }
+ break;
+ case T_JavaLangReflectConstructor :
+ if ((firstChar == 'n') && (methodBinding.parameters.length == 1) && (methodBinding.returnType.id == T_JavaLangObject) && CharOperation.equals(methodBinding.selector, QualifiedNamesConstants.NewInstance) && CharOperation.equals(methodBinding.parameters[0].constantPoolName(), QualifiedNamesConstants.ArrayJavaLangObjectConstantPoolName)) {
+ return NEWINSTANCE_CONSTRUCTOR_METHOD;
+ }
+ break;
+ case T_JavaLangStringBuffer :
+ if ((firstChar == 'a') && (methodBinding.parameters.length == 1) && (methodBinding.returnType.id == T_JavaLangStringBuffer) && (CharOperation.equals(methodBinding.selector, QualifiedNamesConstants.Append))) {
+ switch (methodBinding.parameters[0].id) {
+ case T_int :
+ case T_byte :
+ case T_short :
+ // This method binding is append(int)
+ return STRINGBUFFER_APPEND_INT_METHOD;
+ case T_float :
+ // This method binding is append(float)
+ return STRINGBUFFER_APPEND_FLOAT_METHOD;
+ case T_long :
+ // This method binding is append(long)
+ return STRINGBUFFER_APPEND_LONG_METHOD;
+ case T_JavaLangObject :
+ // This method binding is append(java.lang.Object)
+ return STRINGBUFFER_APPEND_OBJECT_METHOD;
+ case T_char :
+ // This method binding is append(char)
+ return STRINGBUFFER_APPEND_CHAR_METHOD;
+ case T_JavaLangString :
+ // This method binding is append(java.lang.String)
+ return STRINGBUFFER_APPEND_STRING_METHOD;
+ case T_boolean :
+ // This method binding is append(boolean)
+ return STRINGBUFFER_APPEND_BOOLEAN_METHOD;
+ case T_double :
+ // This method binding is append(double)
+ return STRINGBUFFER_APPEND_DOUBLE_METHOD;
+ }
+ } else
+ if ((firstChar == 't') && (methodBinding.parameters.length == 0) && (methodBinding.returnType.id == T_JavaLangString) && (CharOperation.equals(methodBinding.selector, QualifiedNamesConstants.ToString))) {
+ // This method binding is toString()
+ return STRINGBUFFER_TOSTRING_METHOD;
+ } else
+ if ((firstChar == '<') && (CharOperation.equals(methodBinding.selector, QualifiedNamesConstants.Init))) {
+ if ((methodBinding.parameters.length == 1) && (methodBinding.parameters[0].id == T_JavaLangString)) {
+ // This method binding is <init>(String)
+ return STRINGBUFFER_STRING_CONSTR_METHOD;
+ } else {
+ if (methodBinding.parameters.length == 0) {
+ // This method binding is <init>()
+ return STRINGBUFFER_DEFAULT_CONSTR_METHOD;
+ }
+ }
+ }
+ break;
+ case T_JavaLangStringBuilder :
+ if ((firstChar == 'a') && (methodBinding.parameters.length == 1) && (methodBinding.returnType.id == T_JavaLangStringBuilder) && (CharOperation.equals(methodBinding.selector, QualifiedNamesConstants.Append))) {
+ switch (methodBinding.parameters[0].id) {
+ case T_int :
+ case T_byte :
+ case T_short :
+ // This method binding is append(int)
+ return STRINGBUILDER_APPEND_INT_METHOD;
+ case T_float :
+ // This method binding is append(float)
+ return STRINGBUILDER_APPEND_FLOAT_METHOD;
+ case T_long :
+ // This method binding is append(long)
+ return STRINGBUILDER_APPEND_LONG_METHOD;
+ case T_JavaLangObject :
+ // This method binding is append(java.lang.Object)
+ return STRINGBUILDER_APPEND_OBJECT_METHOD;
+ case T_char :
+ // This method binding is append(char)
+ return STRINGBUILDER_APPEND_CHAR_METHOD;
+ case T_JavaLangString :
+ // This method binding is append(java.lang.String)
+ return STRINGBUILDER_APPEND_STRING_METHOD;
+ case T_boolean :
+ // This method binding is append(boolean)
+ return STRINGBUILDER_APPEND_BOOLEAN_METHOD;
+ case T_double :
+ // This method binding is append(double)
+ return STRINGBUILDER_APPEND_DOUBLE_METHOD;
+ }
+ } else
+ if ((firstChar == 't') && (methodBinding.parameters.length == 0) && (methodBinding.returnType.id == T_JavaLangString) && (CharOperation.equals(methodBinding.selector, QualifiedNamesConstants.ToString))) {
+ // This method binding is toString()
+ return STRINGBUILDER_TOSTRING_METHOD;
+ } else
+ if ((firstChar == '<') && (CharOperation.equals(methodBinding.selector, QualifiedNamesConstants.Init))) {
+ if ((methodBinding.parameters.length == 1) && (methodBinding.parameters[0].id == T_JavaLangString)) {
+ // This method binding is <init>(String)
+ return STRINGBUILDER_STRING_CONSTR_METHOD;
+ } else {
+ if (methodBinding.parameters.length == 0) {
+ // This method binding is <init>()
+ return STRINGBUILDER_DEFAULT_CONSTR_METHOD;
+ }
+ }
+ }
+ break;
+ case T_JavaLangString :
+ if ((firstChar == 'v') && (methodBinding.parameters.length == 1) && (methodBinding.returnType.id == T_JavaLangString) && (CharOperation.equals(methodBinding.selector, QualifiedNamesConstants.ValueOf))) {
+ // This method binding is valueOf(java.lang.Object)
+ switch (methodBinding.parameters[0].id) {
+ case T_Object :
+ return STRING_VALUEOF_OBJECT_METHOD;
+ case T_int :
+ case T_short :
+ case T_byte :
+ return STRING_VALUEOF_INT_METHOD;
+ case T_long :
+ return STRING_VALUEOF_LONG_METHOD;
+ case T_float :
+ return STRING_VALUEOF_FLOAT_METHOD;
+ case T_double :
+ return STRING_VALUEOF_DOUBLE_METHOD;
+ case T_boolean :
+ return STRING_VALUEOF_BOOLEAN_METHOD;
+ case T_char :
+ return STRING_VALUEOF_CHAR_METHOD;
+ }
+ } else
+ if ((firstChar == 'i') && (methodBinding.parameters.length == 0) && (methodBinding.returnType.id == T_JavaLangString) && (CharOperation.equals(methodBinding.selector, QualifiedNamesConstants.Intern))) {
+ // This method binding is valueOf(java.lang.Object)
+ return STRING_INTERN_METHOD;
+ }
+ break;
+ case T_JavaLangSystem :
+ if ((firstChar == 'e') && (methodBinding.parameters.length == 1) && (methodBinding.parameters[0].id == T_int) && (methodBinding.returnType.id == T_void) && (CharOperation.equals(methodBinding.selector, QualifiedNamesConstants.Exit))) {
+ // This method binding is exit(int)
+ return SYSTEM_EXIT_METHOD;
+ }
+ break;
+ case T_JavaLangThrowable :
+ if ((firstChar == 'g') && (methodBinding.selector.length == 10) && (methodBinding.parameters.length == 0) && (methodBinding.returnType.id == T_JavaLangString) && (CharOperation.equals(methodBinding.selector, QualifiedNamesConstants.GetMessage))) {
+ // This method binding is getMessage()
+ return THROWABLE_GETMESSAGE_METHOD;
+ }
+ break;
+ case T_JavaLangError :
+ if ((firstChar == '<') && (methodBinding.parameters.length == 1) && (CharOperation.equals(methodBinding.selector, QualifiedNamesConstants.Init)) && (methodBinding.parameters[0].id == T_String)) {
+ return JAVALANGERROR_CONSTR_METHOD;
+ }
+ break;
+ case T_JavaLangAssertionError :
+ if ((firstChar == '<') && CharOperation.equals(methodBinding.selector, QualifiedNamesConstants.Init)) {
+ switch (methodBinding.parameters.length) {
+ case 0:
+ return ASSERTIONERROR_DEFAULT_CONSTR_METHOD;
+ case 1:
+ switch(methodBinding.parameters[0].id) {
+ case T_boolean :
+ return ASSERTIONERROR_CONSTR_BOOLEAN_METHOD;
+ case T_char :
+ return ASSERTIONERROR_CONSTR_CHAR_METHOD;
+ case T_double :
+ return ASSERTIONERROR_CONSTR_DOUBLE_METHOD;
+ case T_int :
+ case T_byte :
+ case T_short :
+ return ASSERTIONERROR_CONSTR_INT_METHOD;
+ case T_float :
+ return ASSERTIONERROR_CONSTR_FLOAT_METHOD;
+ case T_long :
+ return ASSERTIONERROR_CONSTR_LONG_METHOD;
+ default:
+ return ASSERTIONERROR_CONSTR_OBJECT_METHOD;
+ }
+ }
+ }
+ break;
+ case T_JavaLangObject :
+ if (methodBinding.parameters.length == 0
+ && CharOperation.equals(methodBinding.selector, QualifiedNamesConstants.GetClass)) {
+ return OBJECT_GETCLASS_METHOD;
+ }
+ break;
+ case T_JavaUtilIterator :
+ if (methodBinding.parameters.length == 0) {
+ if (CharOperation.equals(methodBinding.selector, QualifiedNamesConstants.HasNext)) {
+ return ITERATOR_HASNEXT_METHOD;
+ }
+ if (CharOperation.equals(methodBinding.selector, QualifiedNamesConstants.Next)) {
+ return ITERATOR_NEXT_METHOD;
+ }
+ }
+ }
+ return -1;
+}
+/**
+ * Return the index of the @typeBinding
+ *
+ * Returns -1 if the @typeBinding is not a predefined binding, the right index
+ * otherwise.
+ *
+ * @param typeBinding org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding
+ * @return <CODE>int</CODE>
+ */
+public int indexOfWellKnownTypes(TypeBinding typeBinding) {
+ switch(typeBinding.id) {
+ case T_JavaLangBoolean : return JAVA_LANG_BOOLEAN_TYPE;
+ case T_JavaLangByte : return JAVA_LANG_BYTE_TYPE;
+ case T_JavaLangCharacter : return JAVA_LANG_CHARACTER_TYPE;
+ case T_JavaLangDouble : return JAVA_LANG_DOUBLE_TYPE;
+ case T_JavaLangFloat : return JAVA_LANG_FLOAT_TYPE;
+ case T_JavaLangInteger : return JAVA_LANG_INTEGER_TYPE;
+ case T_JavaLangLong : return JAVA_LANG_LONG_TYPE;
+ case T_JavaLangShort : return JAVA_LANG_SHORT_TYPE;
+ case T_JavaLangVoid : return JAVA_LANG_VOID_TYPE;
+ case T_JavaLangClass : return JAVA_LANG_CLASS_TYPE;
+ case T_JavaLangClassNotFoundException : return JAVA_LANG_CLASSNOTFOUNDEXCEPTION_TYPE;
+ case T_JavaLangNoClassDefError : return JAVA_LANG_NOCLASSDEFFOUNDERROR_TYPE;
+ case T_JavaLangObject : return JAVA_LANG_OBJECT_TYPE;
+ case T_JavaLangString : return JAVA_LANG_STRING_TYPE;
+ case T_JavaLangStringBuffer : return JAVA_LANG_STRINGBUFFER_TYPE;
+ case T_JavaLangStringBuilder: return JAVA_LANG_STRINGBUILDER_TYPE;
+ case T_JavaLangSystem : return JAVA_LANG_SYSTEM_TYPE;
+ case T_JavaLangThrowable : return JAVA_LANG_THROWABLE_TYPE;
+ case T_JavaLangError : return JAVA_LANG_ERROR_TYPE;
+ case T_JavaLangException : return JAVA_LANG_EXCEPTION_TYPE;
+ case T_JavaLangReflectConstructor : return JAVA_LANG_REFLECT_CONSTRUCTOR_TYPE;
+ case T_JavaLangAssertionError : return JAVA_LANG_ASSERTIONERROR_TYPE;
+ case T_JavaUtilIterator : return JAVA_UTIL_ITERATOR_TYPE;
+ }
+ return -1;
+}
+public int literalIndex(byte[] utf8encoding, char[] stringCharArray) {
+ int index;
+ if ((index = UTF8Cache.get(stringCharArray)) < 0) {
+ // The entry doesn't exit yet
+ index = UTF8Cache.put(stringCharArray, currentIndex);
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ currentIndex++;
+ // Write the tag first
+ writeU1(Utf8Tag);
+ // Then the size of the stringName array
+ //writeU2(utf8Constant.length);
+ int savedCurrentOffset = currentOffset;
+ int utf8encodingLength = utf8encoding.length;
+ if (currentOffset + 2 + utf8encodingLength >= poolContent.length) {
+ // we need to resize the poolContent array because we won't have
+ // enough space to write the length
+ resizePoolContents(2 + utf8encodingLength);
+ }
+ currentOffset += 2;
+ // add in once the whole byte array
+ System.arraycopy(utf8encoding, 0, poolContent, currentOffset, utf8encodingLength);
+ currentOffset += utf8encodingLength;
+ // Now we know the length that we have to write in the constant pool
+ // we use savedCurrentOffset to do that
+ poolContent[savedCurrentOffset] = (byte) (utf8encodingLength >> 8);
+ poolContent[savedCurrentOffset + 1] = (byte) utf8encodingLength;
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the type descriptor.
+ *
+ * @param utf8Constant char[]
+ * @return <CODE>int</CODE>
+ */
+public int literalIndex(char[] utf8Constant) {
+ int index;
+ if ((index = UTF8Cache.get(utf8Constant)) < 0) {
+ // The entry doesn't exit yet
+ // Write the tag first
+ writeU1(Utf8Tag);
+ // Then the size of the stringName array
+ int savedCurrentOffset = currentOffset;
+ if (currentOffset + 2 >= poolContent.length) {
+ // we need to resize the poolContent array because we won't have
+ // enough space to write the length
+ resizePoolContents(2);
+ }
+ currentOffset += 2;
+ int length = 0;
+ for (int i = 0; i < utf8Constant.length; i++) {
+ char current = utf8Constant[i];
+ if ((current >= 0x0001) && (current <= 0x007F)) {
+ // we only need one byte: ASCII table
+ writeU1(current);
+ length++;
+ } else
+ if (current > 0x07FF) {
+ // we need 3 bytes
+ length += 3;
+ writeU1(0xE0 | ((current >> 12) & 0x0F)); // 0xE0 = 1110 0000
+ writeU1(0x80 | ((current >> 6) & 0x3F)); // 0x80 = 1000 0000
+ writeU1(0x80 | (current & 0x3F)); // 0x80 = 1000 0000
+ } else {
+ // we can be 0 or between 0x0080 and 0x07FF
+ // In that case we only need 2 bytes
+ length += 2;
+ writeU1(0xC0 | ((current >> 6) & 0x1F)); // 0xC0 = 1100 0000
+ writeU1(0x80 | (current & 0x3F)); // 0x80 = 1000 0000
+ }
+ }
+ if (length >= 65535) {
+ currentOffset = savedCurrentOffset - 1;
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceForConstant(this.classFile.referenceBinding.scope.referenceType());
+ }
+ index = UTF8Cache.put(utf8Constant, currentIndex);
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ currentIndex++;
+ // Now we know the length that we have to write in the constant pool
+ // we use savedCurrentOffset to do that
+ poolContent[savedCurrentOffset] = (byte) (length >> 8);
+ poolContent[savedCurrentOffset + 1] = (byte) length;
+ }
+ return index;
+}
+public int literalIndex(char[] stringCharArray, byte[] utf8encoding) {
+ int index;
+ int stringIndex;
+ if ((index = stringCache.get(stringCharArray)) < 0) {
+ // The entry doesn't exit yet
+ stringIndex = literalIndex(utf8encoding, stringCharArray);
+ index = stringCache.put(stringCharArray, currentIndex++);
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the tag first
+ writeU1(StringTag);
+ // Then the string index
+ writeU2(stringIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the double
+ * value. If the double is not already present into the pool, it is added. The
+ * double cache is updated and it returns the right index.
+ *
+ * @param key <CODE>double</CODE>
+ * @return <CODE>int</CODE>
+ */
+public int literalIndex(double key) {
+ //Retrieve the index from the cache
+ // The double constant takes two indexes into the constant pool, but we only store
+ // the first index into the long table
+ int index;
+ // lazy initialization for base type caches
+ // If it is null, initialize it, otherwise use it
+ if (doubleCache == null) {
+ doubleCache = new DoubleCache(DOUBLE_INITIAL_SIZE);
+ }
+ if ((index = doubleCache.get(key)) < 0) {
+ index = doubleCache.put(key, currentIndex++);
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ currentIndex++; // a double needs an extra place into the constant pool
+ // Write the double into the constant pool
+ // First add the tag
+ writeU1(DoubleTag);
+ // Then add the 8 bytes representing the double
+ long temp = java.lang.Double.doubleToLongBits(key);
+ int length = poolContent.length;
+ if (currentOffset + 8 >= length) {
+ resizePoolContents(8);
+ }
+ for (int i = 0; i < 8; i++) {
+ poolContent[currentOffset++] = (byte) (temp >>> (56 - (i << 3)));
+ }
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the float
+ * value. If the float is not already present into the pool, it is added. The
+ * int cache is updated and it returns the right index.
+ *
+ * @param key <CODE>float</CODE>
+ * @return <CODE>int</CODE>
+ */
+public int literalIndex(float key) {
+ //Retrieve the index from the cache
+ int index;
+ // lazy initialization for base type caches
+ // If it is null, initialize it, otherwise use it
+ if (floatCache == null) {
+ floatCache = new FloatCache(FLOAT_INITIAL_SIZE);
+ }
+ if ((index = floatCache.get(key)) < 0) {
+ index = floatCache.put(key, currentIndex++);
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the float constant entry into the constant pool
+ // First add the tag
+ writeU1(FloatTag);
+ // Then add the 4 bytes representing the float
+ int temp = java.lang.Float.floatToIntBits(key);
+ if (currentOffset + 4 >= poolContent.length) {
+ resizePoolContents(4);
+ }
+ for (int i = 0; i < 4; i++) {
+ poolContent[currentOffset++] = (byte) (temp >>> (24 - i * 8));
+ }
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the int
+ * value. If the int is not already present into the pool, it is added. The
+ * int cache is updated and it returns the right index.
+ *
+ * @param key <CODE>int</CODE>
+ * @return <CODE>int</CODE>
+ */
+public int literalIndex(int key) {
+ //Retrieve the index from the cache
+ int index;
+ // lazy initialization for base type caches
+ // If it is null, initialize it, otherwise use it
+ if (intCache == null) {
+ intCache = new IntegerCache(INT_INITIAL_SIZE);
+ }
+ if ((index = intCache.get(key)) < 0) {
+ index = intCache.put(key, currentIndex++);
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the integer constant entry into the constant pool
+ // First add the tag
+ writeU1(IntegerTag);
+ // Then add the 4 bytes representing the int
+ if (currentOffset + 4 >= poolContent.length) {
+ resizePoolContents(4);
+ }
+ for (int i = 0; i < 4; i++) {
+ poolContent[currentOffset++] = (byte) (key >>> (24 - i * 8));
+ }
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the long
+ * value. If the long is not already present into the pool, it is added. The
+ * long cache is updated and it returns the right index.
+ *
+ * @param key <CODE>long</CODE>
+ * @return <CODE>int</CODE>
+ */
+public int literalIndex(long key) {
+ // Retrieve the index from the cache
+ // The long constant takes two indexes into the constant pool, but we only store
+ // the first index into the long table
+ int index;
+ // lazy initialization for base type caches
+ // If it is null, initialize it, otherwise use it
+ if (longCache == null) {
+ longCache = new LongCache(LONG_INITIAL_SIZE);
+ }
+ if ((index = longCache.get(key)) < 0) {
+ index = longCache.put(key, currentIndex++);
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ currentIndex++; // long value need an extra place into thwe constant pool
+ // Write the long into the constant pool
+ // First add the tag
+ writeU1(LongTag);
+ // Then add the 8 bytes representing the long
+ if (currentOffset + 8 >= poolContent.length) {
+ resizePoolContents(8);
+ }
+ for (int i = 0; i < 8; i++) {
+ poolContent[currentOffset++] = (byte) (key >>> (56 - (i << 3)));
+ }
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the type descriptor.
+ *
+ * @param stringConstant java.lang.String
+ * @return <CODE>int</CODE>
+ */
+public int literalIndex(String stringConstant) {
+ int index;
+ char[] stringCharArray = stringConstant.toCharArray();
+ if ((index = stringCache.get(stringCharArray)) < 0) {
+ // The entry doesn't exit yet
+ int stringIndex = literalIndex(stringCharArray);
+ index = stringCache.put(stringCharArray, currentIndex++);
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the tag first
+ writeU1(StringTag);
+ // Then the string index
+ writeU2(stringIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool
+ * corresponding to the field binding aFieldBinding.
+ *
+ * @param aFieldBinding FieldBinding
+ * @return <CODE>int</CODE>
+ */
+public int literalIndex(FieldBinding aFieldBinding) {
+ int index;
+ int nameAndTypeIndex;
+ int classIndex;
+ int indexWellKnownField;
+ if ((indexWellKnownField = indexOfWellKnownFields(aFieldBinding)) == -1) {
+ if ((index = fieldCache.get(aFieldBinding)) < 0) {
+ // The entry doesn't exit yet
+ classIndex = literalIndex(aFieldBinding.declaringClass);
+ nameAndTypeIndex = literalIndexForFields(literalIndex(aFieldBinding.name), literalIndex(aFieldBinding.type.signature()), aFieldBinding);
+ index = fieldCache.put(aFieldBinding, currentIndex++);
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(FieldRefTag);
+ writeU2(classIndex);
+ writeU2(nameAndTypeIndex);
+ }
+ } else {
+ if ((index = wellKnownFields[indexWellKnownField]) == 0) {
+ // that field need to be inserted
+ classIndex = literalIndex(aFieldBinding.declaringClass);
+ nameAndTypeIndex = literalIndexForFields(literalIndex(aFieldBinding.name), literalIndex(aFieldBinding.type.signature()), aFieldBinding);
+ index = wellKnownFields[indexWellKnownField] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(FieldRefTag);
+ writeU2(classIndex);
+ writeU2(nameAndTypeIndex);
+ }
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the
+ * method descriptor. It can be either an interface method reference constant
+ * or a method reference constant.
+ * Note: uses the method binding #constantPoolDeclaringClass which could be an array type
+ * for the array clone method (see UpdatedMethodDeclaration).
+ * @param aMethodBinding MethodBinding
+ * @return <CODE>int</CODE>
+ */
+public int literalIndex(MethodBinding aMethodBinding) {
+ int index;
+ int nameAndTypeIndex;
+ int classIndex;
+ int indexWellKnownMethod;
+ if ((indexWellKnownMethod = indexOfWellKnownMethods(aMethodBinding)) == -1) {
+ if (aMethodBinding.constantPoolDeclaringClass().isInterface()) {
+ // Lookinf into the interface method ref table
+ if ((index = interfaceMethodCache.get(aMethodBinding)) < 0) {
+ classIndex = literalIndex(aMethodBinding.constantPoolDeclaringClass());
+ nameAndTypeIndex = literalIndexForMethods(literalIndex(aMethodBinding.constantPoolName()), literalIndex(aMethodBinding.signature()), aMethodBinding);
+ index = interfaceMethodCache.put(aMethodBinding, currentIndex++);
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the interface method ref constant into the constant pool
+ // First add the tag
+ writeU1(InterfaceMethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ } else {
+ // Lookinf into the method ref table
+ if ((index = methodCache.get(aMethodBinding)) < 0) {
+ classIndex = literalIndex(aMethodBinding.constantPoolDeclaringClass());
+ nameAndTypeIndex = literalIndexForMethods(literalIndex(aMethodBinding.constantPoolName()), literalIndex(aMethodBinding.signature()), aMethodBinding);
+ index = methodCache.put(aMethodBinding, currentIndex++);
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ }
+ } else {
+ // This is a well known method
+ if ((index = wellKnownMethods[indexWellKnownMethod]) == 0) {
+ // this methods was not inserted yet
+ if (aMethodBinding.constantPoolDeclaringClass().isInterface()) {
+ // Lookinf into the interface method ref table
+ classIndex = literalIndex(aMethodBinding.constantPoolDeclaringClass());
+ nameAndTypeIndex = literalIndexForMethods(literalIndex(aMethodBinding.constantPoolName()), literalIndex(aMethodBinding.signature()), aMethodBinding);
+ index = wellKnownMethods[indexWellKnownMethod] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the interface method ref constant into the constant pool
+ // First add the tag
+ writeU1(InterfaceMethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ } else {
+ // Lookinf into the method ref table
+ classIndex = literalIndex(aMethodBinding.constantPoolDeclaringClass());
+ nameAndTypeIndex = literalIndexForMethods(literalIndex(aMethodBinding.constantPoolName()), literalIndex(aMethodBinding.signature()), aMethodBinding);
+ index = wellKnownMethods[indexWellKnownMethod] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ }
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the type descriptor.
+ *
+ * @param aTypeBinding TypeBinding
+ * @return <CODE>int</CODE>
+ */
+public int literalIndex(TypeBinding aTypeBinding) {
+ int index;
+ int nameIndex;
+ int indexWellKnownType;
+ if ((indexWellKnownType = indexOfWellKnownTypes(aTypeBinding)) == -1) {
+ if ((index = classCache.get(aTypeBinding)) < 0) {
+ // The entry doesn't exit yet
+ nameIndex = literalIndex(aTypeBinding.constantPoolName());
+ index = classCache.put(aTypeBinding, currentIndex++);
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(ClassTag);
+ // Then add the 8 bytes representing the long
+ writeU2(nameIndex);
+ }
+ } else {
+ if ((index = wellKnownTypes[indexWellKnownType]) == 0) {
+ // Need to insert that binding
+ nameIndex = literalIndex(aTypeBinding.constantPoolName());
+ index = wellKnownTypes[indexWellKnownType] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(ClassTag);
+ // Then add the 8 bytes representing the long
+ writeU2(nameIndex);
+ }
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding
+ * nameAndType constant with nameIndex, typeIndex.
+ *
+ * @param nameIndex int
+ * @param typeIndex int
+ * @param key org.eclipse.wst.jsdt.internal.compiler.lookup.FieldBinding
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForFields(int nameIndex, int typeIndex, FieldBinding key) {
+ int index;
+ int indexOfWellKnownFieldNameAndType;
+ if ((indexOfWellKnownFieldNameAndType = indexOfWellKnownFieldNameAndType(key)) == -1) {
+ // check if the entry already exists
+ if ((index = nameAndTypeCacheForFields.get(key)) == -1) {
+ // The entry doesn't exit yet
+ index = nameAndTypeCacheForFields.put(key, currentIndex++);
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ } else {
+ if ((index = wellKnownFieldNameAndTypes[indexOfWellKnownFieldNameAndType]) == 0) {
+ index = wellKnownFieldNameAndTypes[indexOfWellKnownFieldNameAndType] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the type descriptor.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangBoolean() {
+ int index;
+ if ((index = wellKnownTypes[JAVA_LANG_BOOLEAN_TYPE]) == 0) {
+ int nameIndex;
+ // The entry doesn't exit yet
+ nameIndex = literalIndex(QualifiedNamesConstants.JavaLangBooleanConstantPoolName);
+ index = wellKnownTypes[JAVA_LANG_BOOLEAN_TYPE] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(ClassTag);
+ // Then add the 8 bytes representing the long
+ writeU2(nameIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool
+ * corresponding to the field binding aFieldBinding.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangBooleanTYPE() {
+ int index;
+ if ((index = wellKnownFields[JAVA_LANG_BOOLEAN_TYPE_FIELD]) == 0) {
+ int nameAndTypeIndex;
+ int classIndex;
+ // The entry doesn't exit yet
+ classIndex = literalIndexForJavaLangBoolean();
+ if ((nameAndTypeIndex = wellKnownFieldNameAndTypes[TYPE_JAVALANGCLASS_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.TYPE);
+ int typeIndex = literalIndex(QualifiedNamesConstants.JavaLangClassSignature);
+ nameAndTypeIndex = wellKnownFieldNameAndTypes[TYPE_JAVALANGCLASS_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownFields[JAVA_LANG_BOOLEAN_TYPE_FIELD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(FieldRefTag);
+ writeU2(classIndex);
+ writeU2(nameAndTypeIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the type descriptor.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangByte() {
+ int index;
+ if ((index = wellKnownTypes[JAVA_LANG_BYTE_TYPE]) == 0) {
+ int nameIndex;
+ // The entry doesn't exit yet
+ nameIndex = literalIndex(QualifiedNamesConstants.JavaLangByteConstantPoolName);
+ index = wellKnownTypes[JAVA_LANG_BYTE_TYPE] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(ClassTag);
+ // Then add the 8 bytes representing the long
+ writeU2(nameIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool
+ * corresponding to the field binding aFieldBinding.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangByteTYPE() {
+ int index;
+ if ((index = wellKnownFields[JAVA_LANG_BYTE_TYPE_FIELD]) == 0) {
+ int nameAndTypeIndex;
+ int classIndex;
+ // The entry doesn't exit yet
+ classIndex = literalIndexForJavaLangByte();
+ if ((nameAndTypeIndex = wellKnownFieldNameAndTypes[TYPE_JAVALANGCLASS_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.TYPE);
+ int typeIndex = literalIndex(QualifiedNamesConstants.JavaLangClassSignature);
+ nameAndTypeIndex = wellKnownFieldNameAndTypes[TYPE_JAVALANGCLASS_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownFields[JAVA_LANG_BYTE_TYPE_FIELD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(FieldRefTag);
+ writeU2(classIndex);
+ writeU2(nameAndTypeIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the type descriptor.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangCharacter() {
+ int index;
+ if ((index = wellKnownTypes[JAVA_LANG_CHARACTER_TYPE]) == 0) {
+ int nameIndex;
+ // The entry doesn't exit yet
+ nameIndex = literalIndex(QualifiedNamesConstants.JavaLangCharacterConstantPoolName);
+ index = wellKnownTypes[JAVA_LANG_CHARACTER_TYPE] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(ClassTag);
+ // Then add the 8 bytes representing the long
+ writeU2(nameIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool
+ * corresponding to the field binding aFieldBinding.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangCharacterTYPE() {
+ int index;
+ if ((index = wellKnownFields[JAVA_LANG_CHARACTER_TYPE_FIELD]) == 0) {
+ int nameAndTypeIndex;
+ int classIndex;
+ // The entry doesn't exit yet
+ classIndex = literalIndexForJavaLangCharacter();
+ if ((nameAndTypeIndex = wellKnownFieldNameAndTypes[TYPE_JAVALANGCLASS_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.TYPE);
+ int typeIndex = literalIndex(QualifiedNamesConstants.JavaLangClassSignature);
+ nameAndTypeIndex = wellKnownFieldNameAndTypes[TYPE_JAVALANGCLASS_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownFields[JAVA_LANG_CHARACTER_TYPE_FIELD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(FieldRefTag);
+ writeU2(classIndex);
+ writeU2(nameAndTypeIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the type descriptor.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangClass() {
+ int index;
+ if ((index = wellKnownTypes[JAVA_LANG_CLASS_TYPE]) == 0) {
+ int nameIndex;
+ // The entry doesn't exit yet
+ nameIndex = literalIndex(QualifiedNamesConstants.JavaLangClassConstantPoolName);
+ index = wellKnownTypes[JAVA_LANG_CLASS_TYPE] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(ClassTag);
+ // Then add the 8 bytes representing the long
+ writeU2(nameIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the
+ * method descriptor. It can be either an interface method reference constant
+ * or a method reference constant.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangClassForName() {
+ int index;
+ int nameAndTypeIndex;
+ int classIndex;
+ // Looking into the method ref table
+ if ((index = wellKnownMethods[CLASS_FORNAME_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangClass();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[FORNAME_CLASS_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.ForName);
+ int typeIndex = literalIndex(QualifiedNamesConstants.ForNameSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[FORNAME_CLASS_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[CLASS_FORNAME_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the
+ * method descriptor. It can be either an interface method reference constant
+ * or a method reference constant.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangClassDesiredAssertionStatus() {
+ int index;
+ int nameAndTypeIndex;
+ int classIndex;
+ // Looking into the method ref table
+ if ((index = wellKnownMethods[CLASS_DESIREDASSERTIONSTATUS_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangClass();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[DESIREDASSERTIONSTATUS_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.DesiredAssertionStatus);
+ int typeIndex = literalIndex(QualifiedNamesConstants.DesiredAssertionStatusSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[DESIREDASSERTIONSTATUS_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[CLASS_DESIREDASSERTIONSTATUS_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the
+ * method descriptor. It can be either an interface method reference constant
+ * or a method reference constant.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangClassGetComponentType() {
+ int index;
+ int nameAndTypeIndex;
+ int classIndex;
+ // Looking into the method ref table
+ if ((index = wellKnownMethods[CLASS_GETCOMPONENTTYPE_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangClass();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[GETCOMPONENTTYPE_CLASS_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.GetComponentType);
+ int typeIndex = literalIndex(QualifiedNamesConstants.GetComponentTypeSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[GETCOMPONENTTYPE_CLASS_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[CLASS_GETCOMPONENTTYPE_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the type descriptor.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangClassNotFoundException() {
+ int index;
+ if ((index = wellKnownTypes[JAVA_LANG_CLASSNOTFOUNDEXCEPTION_TYPE]) == 0) {
+ int nameIndex;
+ // The entry doesn't exit yet
+ nameIndex = literalIndex(QualifiedNamesConstants.JavaLangClassNotFoundExceptionConstantPoolName);
+ index = wellKnownTypes[JAVA_LANG_CLASSNOTFOUNDEXCEPTION_TYPE] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(ClassTag);
+ // Then add the 8 bytes representing the long
+ writeU2(nameIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the type descriptor.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangDouble() {
+ int index;
+ if ((index = wellKnownTypes[JAVA_LANG_DOUBLE_TYPE]) == 0) {
+ int nameIndex;
+ // The entry doesn't exit yet
+ nameIndex = literalIndex(QualifiedNamesConstants.JavaLangDoubleConstantPoolName);
+ index = wellKnownTypes[JAVA_LANG_DOUBLE_TYPE] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(ClassTag);
+ // Then add the 8 bytes representing the long
+ writeU2(nameIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool
+ * corresponding to the field binding aFieldBinding.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangDoubleTYPE() {
+ int index;
+ if ((index = wellKnownFields[JAVA_LANG_DOUBLE_TYPE_FIELD]) == 0) {
+ int nameAndTypeIndex;
+ int classIndex;
+ // The entry doesn't exit yet
+ classIndex = literalIndexForJavaLangDouble();
+ if ((nameAndTypeIndex = wellKnownFieldNameAndTypes[TYPE_JAVALANGCLASS_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.TYPE);
+ int typeIndex = literalIndex(QualifiedNamesConstants.JavaLangClassSignature);
+ nameAndTypeIndex = wellKnownFieldNameAndTypes[TYPE_JAVALANGCLASS_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownFields[JAVA_LANG_DOUBLE_TYPE_FIELD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(FieldRefTag);
+ writeU2(classIndex);
+ writeU2(nameAndTypeIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the type descriptor.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangError() {
+ int index;
+ if ((index = wellKnownTypes[JAVA_LANG_ERROR_TYPE]) == 0) {
+ int nameIndex;
+ // The entry doesn't exit yet
+ nameIndex = literalIndex(QualifiedNamesConstants.JavaLangErrorConstantPoolName);
+ index = wellKnownTypes[JAVA_LANG_ERROR_TYPE] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(ClassTag);
+ // Then add the 8 bytes representing the long
+ writeU2(nameIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the
+ * method descriptor. It can be either an interface method reference constant
+ * or a method reference constant.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangErrorConstructor() {
+ int index;
+ int nameAndTypeIndex;
+ int classIndex;
+ // Looking into the method ref table
+ if ((index = wellKnownMethods[JAVALANGERROR_CONSTR_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangError();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[CONSTR_STRING_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Init);
+ int typeIndex = literalIndex(QualifiedNamesConstants.StringConstructorSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[CONSTR_STRING_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[JAVALANGERROR_CONSTR_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ return index;
+}
+public int literalIndexForJavaLangException() {
+ int index;
+ if ((index = wellKnownTypes[JAVA_LANG_EXCEPTION_TYPE]) == 0) {
+ // The entry doesn't exit yet
+ int nameIndex = literalIndex(QualifiedNamesConstants.JavaLangExceptionConstantPoolName);
+ index = wellKnownTypes[JAVA_LANG_EXCEPTION_TYPE] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(ClassTag);
+ // Then add the 8 bytes representing the long
+ writeU2(nameIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the type descriptor.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangFloat() {
+ int index;
+ if ((index = wellKnownTypes[JAVA_LANG_FLOAT_TYPE]) == 0) {
+ int nameIndex;
+ // The entry doesn't exit yet
+ nameIndex = literalIndex(QualifiedNamesConstants.JavaLangFloatConstantPoolName);
+ index = wellKnownTypes[JAVA_LANG_FLOAT_TYPE] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(ClassTag);
+ // Then add the 8 bytes representing the long
+ writeU2(nameIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool
+ * corresponding to the field binding aFieldBinding.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangFloatTYPE() {
+ int index;
+ if ((index = wellKnownFields[JAVA_LANG_FLOAT_TYPE_FIELD]) == 0) {
+ int nameAndTypeIndex;
+ int classIndex;
+ // The entry doesn't exit yet
+ classIndex = literalIndexForJavaLangFloat();
+ if ((nameAndTypeIndex = wellKnownFieldNameAndTypes[TYPE_JAVALANGCLASS_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.TYPE);
+ int typeIndex = literalIndex(QualifiedNamesConstants.JavaLangClassSignature);
+ nameAndTypeIndex = wellKnownFieldNameAndTypes[TYPE_JAVALANGCLASS_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownFields[JAVA_LANG_FLOAT_TYPE_FIELD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(FieldRefTag);
+ writeU2(classIndex);
+ writeU2(nameAndTypeIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the type descriptor.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangInteger() {
+ int index;
+ if ((index = wellKnownTypes[JAVA_LANG_INTEGER_TYPE]) == 0) {
+ int nameIndex;
+ // The entry doesn't exit yet
+ nameIndex = literalIndex(QualifiedNamesConstants.JavaLangIntegerConstantPoolName);
+ index = wellKnownTypes[JAVA_LANG_INTEGER_TYPE] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(ClassTag);
+ // Then add the 8 bytes representing the long
+ writeU2(nameIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool
+ * corresponding to the field binding aFieldBinding.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangIntegerTYPE() {
+ int index;
+ if ((index = wellKnownFields[JAVA_LANG_INTEGER_TYPE_FIELD]) == 0) {
+ int nameAndTypeIndex;
+ int classIndex;
+ // The entry doesn't exit yet
+ classIndex = literalIndexForJavaLangInteger();
+ if ((nameAndTypeIndex = wellKnownFieldNameAndTypes[TYPE_JAVALANGCLASS_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.TYPE);
+ int typeIndex = literalIndex(QualifiedNamesConstants.JavaLangClassSignature);
+ nameAndTypeIndex = wellKnownFieldNameAndTypes[TYPE_JAVALANGCLASS_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownFields[JAVA_LANG_INTEGER_TYPE_FIELD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(FieldRefTag);
+ writeU2(classIndex);
+ writeU2(nameAndTypeIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the type descriptor.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangLong() {
+ int index;
+ if ((index = wellKnownTypes[JAVA_LANG_LONG_TYPE]) == 0) {
+ int nameIndex;
+ // The entry doesn't exit yet
+ nameIndex = literalIndex(QualifiedNamesConstants.JavaLangLongConstantPoolName);
+ index = wellKnownTypes[JAVA_LANG_LONG_TYPE] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(ClassTag);
+ // Then add the 8 bytes representing the long
+ writeU2(nameIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool
+ * corresponding to the field binding aFieldBinding.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangLongTYPE() {
+ int index;
+ if ((index = wellKnownFields[JAVA_LANG_LONG_TYPE_FIELD]) == 0) {
+ int nameAndTypeIndex;
+ int classIndex;
+ // The entry doesn't exit yet
+ classIndex = literalIndexForJavaLangLong();
+ if ((nameAndTypeIndex = wellKnownFieldNameAndTypes[TYPE_JAVALANGCLASS_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.TYPE);
+ int typeIndex = literalIndex(QualifiedNamesConstants.JavaLangClassSignature);
+ nameAndTypeIndex = wellKnownFieldNameAndTypes[TYPE_JAVALANGCLASS_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownFields[JAVA_LANG_LONG_TYPE_FIELD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(FieldRefTag);
+ writeU2(classIndex);
+ writeU2(nameAndTypeIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the type descriptor.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangNoClassDefFoundError() {
+ int index;
+ if ((index = wellKnownTypes[JAVA_LANG_NOCLASSDEFFOUNDERROR_TYPE]) == 0) {
+ int nameIndex;
+ // The entry doesn't exit yet
+ nameIndex = literalIndex(QualifiedNamesConstants.JavaLangNoClassDefFoundErrorConstantPoolName);
+ index = wellKnownTypes[JAVA_LANG_NOCLASSDEFFOUNDERROR_TYPE] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(ClassTag);
+ // Then add the 8 bytes representing the long
+ writeU2(nameIndex);
+ }
+ return index;
+}
+
+/**
+ * This method returns the index into the constantPool corresponding to the type descriptor.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangAssertionError() {
+ int index;
+ if ((index = wellKnownTypes[JAVA_LANG_ASSERTIONERROR_TYPE]) == 0) {
+ int nameIndex;
+ // The entry doesn't exit yet
+ nameIndex = literalIndex(QualifiedNamesConstants.JavaLangAssertionErrorConstantPoolName);
+ index = wellKnownTypes[JAVA_LANG_ASSERTIONERROR_TYPE] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(ClassTag);
+ // Then add the 8 bytes representing the long
+ writeU2(nameIndex);
+ }
+ return index;
+}
+
+/**
+ * This method returns the index into the constantPool corresponding to the type descriptor.
+ *
+ * @param typeBindingID int
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangAssertionErrorConstructor(int typeBindingID) {
+ int index = 0;
+ int nameAndTypeIndex = 0;
+ int classIndex = 0;
+ switch (typeBindingID) {
+ case T_int :
+ case T_byte :
+ case T_short :
+ if ((index = wellKnownMethods[ASSERTIONERROR_CONSTR_INT_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangAssertionError();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[CONSTR_INT_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Init);
+ int typeIndex = literalIndex(QualifiedNamesConstants.AssertionErrorIntConstrSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[CONSTR_INT_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[ASSERTIONERROR_CONSTR_INT_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ break;
+ case T_long :
+ if ((index = wellKnownMethods[ASSERTIONERROR_CONSTR_LONG_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangAssertionError();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[CONSTR_LONG_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Init);
+ int typeIndex = literalIndex(QualifiedNamesConstants.AssertionErrorLongConstrSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[CONSTR_LONG_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[ASSERTIONERROR_CONSTR_LONG_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ break;
+ case T_float :
+ if ((index = wellKnownMethods[ASSERTIONERROR_CONSTR_FLOAT_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangAssertionError();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[CONSTR_FLOAT_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Init);
+ int typeIndex = literalIndex(QualifiedNamesConstants.AssertionErrorFloatConstrSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[CONSTR_FLOAT_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[ASSERTIONERROR_CONSTR_FLOAT_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ break;
+ case T_double :
+ if ((index = wellKnownMethods[ASSERTIONERROR_CONSTR_DOUBLE_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangAssertionError();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[CONSTR_DOUBLE_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Init);
+ int typeIndex = literalIndex(QualifiedNamesConstants.AssertionErrorDoubleConstrSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[CONSTR_DOUBLE_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[ASSERTIONERROR_CONSTR_DOUBLE_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ break;
+ case T_char :
+ if ((index = wellKnownMethods[ASSERTIONERROR_CONSTR_CHAR_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangAssertionError();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[CONSTR_CHAR_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Init);
+ int typeIndex = literalIndex(QualifiedNamesConstants.AssertionErrorCharConstrSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[CONSTR_CHAR_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[ASSERTIONERROR_CONSTR_CHAR_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ break;
+ case T_boolean :
+ if ((index = wellKnownMethods[ASSERTIONERROR_CONSTR_BOOLEAN_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangAssertionError();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[CONSTR_BOOLEAN_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Init);
+ int typeIndex = literalIndex(QualifiedNamesConstants.AssertionErrorBooleanConstrSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[CONSTR_BOOLEAN_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[ASSERTIONERROR_CONSTR_BOOLEAN_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ break;
+ //case T_Object :
+ //case T_String :
+ //case T_null :
+ default :
+ if ((index = wellKnownMethods[ASSERTIONERROR_CONSTR_OBJECT_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangAssertionError();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[CONSTR_OBJECT_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Init);
+ int typeIndex = literalIndex(QualifiedNamesConstants.AssertionErrorObjectConstrSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[CONSTR_OBJECT_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[ASSERTIONERROR_CONSTR_OBJECT_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ }
+ return index;
+}
+
+/**
+ * This method returns the index into the constantPool corresponding to the
+ * method descriptor. It can be either an interface method reference constant
+ * or a method reference constant.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangAssertionErrorDefaultConstructor() {
+ int index;
+ int nameAndTypeIndex;
+ int classIndex;
+ // Looking into the method ref table
+ if ((index = wellKnownMethods[ASSERTIONERROR_DEFAULT_CONSTR_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangAssertionError();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[DEFAULT_CONSTR_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Init);
+ int typeIndex = literalIndex(QualifiedNamesConstants.DefaultConstructorSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[DEFAULT_CONSTR_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[ASSERTIONERROR_DEFAULT_CONSTR_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ return index;
+}
+
+
+/**
+ * This method returns the index into the constantPool corresponding to the
+ * method descriptor. It can be either an interface method reference constant
+ * or a method reference constant.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangNoClassDefFoundErrorStringConstructor() {
+ int index;
+ int nameAndTypeIndex;
+ int classIndex;
+ // Looking into the method ref table
+ if ((index = wellKnownMethods[NOCLASSDEFFOUNDERROR_CONSTR_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangNoClassDefFoundError();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[CONSTR_STRING_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Init);
+ int typeIndex = literalIndex(QualifiedNamesConstants.StringConstructorSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[CONSTR_STRING_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[NOCLASSDEFFOUNDERROR_CONSTR_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the type descriptor.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangObject() {
+ int index;
+ if ((index = wellKnownTypes[JAVA_LANG_OBJECT_TYPE]) == 0) {
+ int nameIndex;
+ // The entry doesn't exit yet
+ nameIndex = literalIndex(QualifiedNamesConstants.JavaLangObjectConstantPoolName);
+ index = wellKnownTypes[JAVA_LANG_OBJECT_TYPE] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(ClassTag);
+ // Then add the 8 bytes representing the long
+ writeU2(nameIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the type descriptor.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangReflectConstructor() {
+ int index;
+ if ((index = wellKnownTypes[JAVA_LANG_REFLECT_CONSTRUCTOR_TYPE]) == 0) {
+ int nameIndex;
+ // The entry doesn't exit yet
+ nameIndex = literalIndex(QualifiedNamesConstants.JavaLangReflectConstructor);
+ index = wellKnownTypes[JAVA_LANG_REFLECT_CONSTRUCTOR_TYPE] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(ClassTag);
+ // Then add the 8 bytes representing the long
+ writeU2(nameIndex);
+ }
+ return index;
+}
+public int literalIndexForJavaLangReflectConstructorNewInstance() {
+ int index;
+ int nameAndTypeIndex;
+ int classIndex;
+ // Looking into the method ref table
+ if ((index = wellKnownMethods[NEWINSTANCE_CONSTRUCTOR_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangReflectConstructor();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[NEWINSTANCE_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.NewInstance);
+ int typeIndex = literalIndex(QualifiedNamesConstants.NewInstanceSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[NEWINSTANCE_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[NEWINSTANCE_CONSTRUCTOR_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the type descriptor.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangShort() {
+ int index;
+ if ((index = wellKnownTypes[JAVA_LANG_SHORT_TYPE]) == 0) {
+ int nameIndex;
+ // The entry doesn't exit yet
+ nameIndex = literalIndex(QualifiedNamesConstants.JavaLangShortConstantPoolName);
+ index = wellKnownTypes[JAVA_LANG_SHORT_TYPE] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(ClassTag);
+ // Then add the 8 bytes representing the long
+ writeU2(nameIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool
+ * corresponding to the field binding aFieldBinding.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangShortTYPE() {
+ int index;
+ if ((index = wellKnownFields[JAVA_LANG_SHORT_TYPE_FIELD]) == 0) {
+ int nameAndTypeIndex;
+ int classIndex;
+ // The entry doesn't exit yet
+ classIndex = literalIndexForJavaLangShort();
+ if ((nameAndTypeIndex = wellKnownFieldNameAndTypes[TYPE_JAVALANGCLASS_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.TYPE);
+ int typeIndex = literalIndex(QualifiedNamesConstants.JavaLangClassSignature);
+ nameAndTypeIndex = wellKnownFieldNameAndTypes[TYPE_JAVALANGCLASS_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownFields[JAVA_LANG_SHORT_TYPE_FIELD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(FieldRefTag);
+ writeU2(classIndex);
+ writeU2(nameAndTypeIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the type descriptor.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangString() {
+ int index;
+ if ((index = wellKnownTypes[JAVA_LANG_STRING_TYPE]) == 0) {
+ int nameIndex;
+ // The entry doesn't exit yet
+ nameIndex = literalIndex(QualifiedNamesConstants.JavaLangStringConstantPoolName);
+ index = wellKnownTypes[JAVA_LANG_STRING_TYPE] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(ClassTag);
+ // Then add the 8 bytes representing the long
+ writeU2(nameIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the type descriptor.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaUtilIterator() {
+ int index;
+ if ((index = wellKnownTypes[JAVA_UTIL_ITERATOR_TYPE]) == 0) {
+ int nameIndex;
+ // The entry doesn't exit yet
+ nameIndex = literalIndex(QualifiedNamesConstants.JavaUtilIteratorConstantPoolName);
+ index = wellKnownTypes[JAVA_UTIL_ITERATOR_TYPE] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(ClassTag);
+ // Then add the 8 bytes representing the long
+ writeU2(nameIndex);
+ }
+ return index;
+}
+/*
+ * This method returns the index into the constantPool corresponding to the type descriptor.
+ */
+public int literalIndexForJavaLangStringBuffer() {
+ int index;
+ if ((index = wellKnownTypes[JAVA_LANG_STRINGBUFFER_TYPE]) == 0) {
+ int nameIndex;
+ // The entry doesn't exit yet
+ nameIndex = literalIndex(QualifiedNamesConstants.JavaLangStringBufferConstantPoolName);
+ index = wellKnownTypes[JAVA_LANG_STRINGBUFFER_TYPE] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(ClassTag);
+ // Then add the 8 bytes representing the long
+ writeU2(nameIndex);
+ }
+ return index;
+}
+/*
+ * This method returns the index into the constantPool corresponding to the type descriptor.
+ */
+public int literalIndexForJavaLangStringBuilder() {
+ int index;
+ if ((index = wellKnownTypes[JAVA_LANG_STRINGBUILDER_TYPE]) == 0) {
+ int nameIndex;
+ // The entry doesn't exit yet
+ nameIndex = literalIndex(QualifiedNamesConstants.JavaLangStringBuilderConstantPoolName);
+ index = wellKnownTypes[JAVA_LANG_STRINGBUILDER_TYPE] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(ClassTag);
+ // Then add the 8 bytes representing the long
+ writeU2(nameIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the
+ * method descriptor. It can be either an interface method reference constant
+ * or a method reference constant.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangStringBufferAppend(int typeID) {
+ int index = 0;
+ int nameAndTypeIndex = 0;
+ int classIndex = 0;
+ switch (typeID) {
+ case T_int :
+ case T_byte :
+ case T_short :
+ if ((index = wellKnownMethods[STRINGBUFFER_APPEND_INT_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangStringBuffer();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[APPEND_INT_STRINGBUFFER_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Append);
+ int typeIndex = literalIndex(QualifiedNamesConstants.StringBufferAppendIntSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[APPEND_INT_STRINGBUFFER_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[STRINGBUFFER_APPEND_INT_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ break;
+ case T_long :
+ if ((index = wellKnownMethods[STRINGBUFFER_APPEND_LONG_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangStringBuffer();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[APPEND_LONG_STRINGBUFFER_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Append);
+ int typeIndex = literalIndex(QualifiedNamesConstants.StringBufferAppendLongSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[APPEND_LONG_STRINGBUFFER_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[STRINGBUFFER_APPEND_LONG_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ break;
+ case T_float :
+ if ((index = wellKnownMethods[STRINGBUFFER_APPEND_FLOAT_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangStringBuffer();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[APPEND_FLOAT_STRINGBUFFER_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Append);
+ int typeIndex = literalIndex(QualifiedNamesConstants.StringBufferAppendFloatSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[APPEND_FLOAT_STRINGBUFFER_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[STRINGBUFFER_APPEND_FLOAT_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ break;
+ case T_double :
+ if ((index = wellKnownMethods[STRINGBUFFER_APPEND_DOUBLE_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangStringBuffer();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[APPEND_DOUBLE_STRINGBUFFER_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Append);
+ int typeIndex = literalIndex(QualifiedNamesConstants.StringBufferAppendDoubleSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[APPEND_DOUBLE_STRINGBUFFER_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[STRINGBUFFER_APPEND_DOUBLE_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ break;
+ case T_char :
+ if ((index = wellKnownMethods[STRINGBUFFER_APPEND_CHAR_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangStringBuffer();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[APPEND_CHAR_STRINGBUFFER_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Append);
+ int typeIndex = literalIndex(QualifiedNamesConstants.StringBufferAppendCharSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[APPEND_CHAR_STRINGBUFFER_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[STRINGBUFFER_APPEND_CHAR_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ break;
+ case T_boolean :
+ if ((index = wellKnownMethods[STRINGBUFFER_APPEND_BOOLEAN_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangStringBuffer();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[APPEND_BOOLEAN_STRINGBUFFER_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Append);
+ int typeIndex = literalIndex(QualifiedNamesConstants.StringBufferAppendBooleanSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[APPEND_BOOLEAN_STRINGBUFFER_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[STRINGBUFFER_APPEND_BOOLEAN_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ break;
+ case T_Object :
+ if ((index = wellKnownMethods[STRINGBUFFER_APPEND_OBJECT_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangStringBuffer();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[APPEND_OBJECT_STRINGBUFFER_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Append);
+ int typeIndex = literalIndex(QualifiedNamesConstants.StringBufferAppendObjectSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[APPEND_OBJECT_STRINGBUFFER_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[STRINGBUFFER_APPEND_OBJECT_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ break;
+ case T_String :
+ case T_null :
+ if ((index = wellKnownMethods[STRINGBUFFER_APPEND_STRING_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangStringBuffer();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[APPEND_STRING_STRINGBUFFER_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Append);
+ int typeIndex = literalIndex(QualifiedNamesConstants.StringBufferAppendStringSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[APPEND_STRING_STRINGBUFFER_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[STRINGBUFFER_APPEND_STRING_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ break;
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the
+ * method descriptor. It can be either an interface method reference constant
+ * or a method reference constant.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangStringBuilderAppend(int typeID) {
+ int index = 0;
+ int nameAndTypeIndex = 0;
+ int classIndex = 0;
+ switch (typeID) {
+ case T_int :
+ case T_byte :
+ case T_short :
+ if ((index = wellKnownMethods[STRINGBUILDER_APPEND_INT_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangStringBuilder();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[APPEND_INT_STRINGBUILDER_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Append);
+ int typeIndex = literalIndex(QualifiedNamesConstants.StringBuilderAppendIntSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[APPEND_INT_STRINGBUILDER_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[STRINGBUILDER_APPEND_INT_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ break;
+ case T_long :
+ if ((index = wellKnownMethods[STRINGBUILDER_APPEND_LONG_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangStringBuilder();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[APPEND_LONG_STRINGBUILDER_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Append);
+ int typeIndex = literalIndex(QualifiedNamesConstants.StringBuilderAppendLongSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[APPEND_LONG_STRINGBUILDER_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[STRINGBUILDER_APPEND_LONG_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ break;
+ case T_float :
+ if ((index = wellKnownMethods[STRINGBUILDER_APPEND_FLOAT_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangStringBuilder();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[APPEND_FLOAT_STRINGBUILDER_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Append);
+ int typeIndex = literalIndex(QualifiedNamesConstants.StringBuilderAppendFloatSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[APPEND_FLOAT_STRINGBUILDER_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[STRINGBUILDER_APPEND_FLOAT_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ break;
+ case T_double :
+ if ((index = wellKnownMethods[STRINGBUILDER_APPEND_DOUBLE_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangStringBuilder();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[APPEND_DOUBLE_STRINGBUILDER_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Append);
+ int typeIndex = literalIndex(QualifiedNamesConstants.StringBuilderAppendDoubleSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[APPEND_DOUBLE_STRINGBUILDER_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[STRINGBUILDER_APPEND_DOUBLE_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ break;
+ case T_char :
+ if ((index = wellKnownMethods[STRINGBUILDER_APPEND_CHAR_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangStringBuilder();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[APPEND_CHAR_STRINGBUILDER_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Append);
+ int typeIndex = literalIndex(QualifiedNamesConstants.StringBuilderAppendCharSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[APPEND_CHAR_STRINGBUILDER_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[STRINGBUILDER_APPEND_CHAR_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ break;
+ case T_boolean :
+ if ((index = wellKnownMethods[STRINGBUILDER_APPEND_BOOLEAN_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangStringBuilder();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[APPEND_BOOLEAN_STRINGBUILDER_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Append);
+ int typeIndex = literalIndex(QualifiedNamesConstants.StringBuilderAppendBooleanSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[APPEND_BOOLEAN_STRINGBUILDER_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[STRINGBUILDER_APPEND_BOOLEAN_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ break;
+ case T_Object :
+ if ((index = wellKnownMethods[STRINGBUILDER_APPEND_OBJECT_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangStringBuilder();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[APPEND_OBJECT_STRINGBUILDER_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Append);
+ int typeIndex = literalIndex(QualifiedNamesConstants.StringBuilderAppendObjectSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[APPEND_OBJECT_STRINGBUILDER_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[STRINGBUILDER_APPEND_OBJECT_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ break;
+ case T_String :
+ case T_null :
+ if ((index = wellKnownMethods[STRINGBUILDER_APPEND_STRING_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangStringBuilder();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[APPEND_STRING_STRINGBUILDER_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Append);
+ int typeIndex = literalIndex(QualifiedNamesConstants.StringBuilderAppendStringSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[APPEND_STRING_STRINGBUILDER_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[STRINGBUILDER_APPEND_STRING_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ break;
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the
+ * method descriptor. It can be either an interface method reference constant
+ * or a method reference constant.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangStringBufferConstructor() {
+ int index;
+ int nameAndTypeIndex;
+ int classIndex;
+ // Looking into the method ref table
+ if ((index = wellKnownMethods[STRINGBUFFER_STRING_CONSTR_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangStringBuffer();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[CONSTR_STRING_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Init);
+ int typeIndex = literalIndex(QualifiedNamesConstants.StringConstructorSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[CONSTR_STRING_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[STRINGBUFFER_STRING_CONSTR_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the
+ * method descriptor. It can be either an interface method reference constant
+ * or a method reference constant.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangStringBuilderConstructor() {
+ int index;
+ int nameAndTypeIndex;
+ int classIndex;
+ // Looking into the method ref table
+ if ((index = wellKnownMethods[STRINGBUILDER_STRING_CONSTR_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangStringBuilder();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[CONSTR_STRING_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Init);
+ int typeIndex = literalIndex(QualifiedNamesConstants.StringConstructorSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[CONSTR_STRING_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[STRINGBUILDER_STRING_CONSTR_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the
+ * method descriptor. It can be either an interface method reference constant
+ * or a method reference constant.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangStringBufferDefaultConstructor() {
+ int index;
+ int nameAndTypeIndex;
+ int classIndex;
+ // Looking into the method ref table
+ if ((index = wellKnownMethods[STRINGBUFFER_DEFAULT_CONSTR_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangStringBuffer();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[DEFAULT_CONSTR_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Init);
+ int typeIndex = literalIndex(QualifiedNamesConstants.DefaultConstructorSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[DEFAULT_CONSTR_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[STRINGBUFFER_DEFAULT_CONSTR_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the
+ * method descriptor. It can be either an interface method reference constant
+ * or a method reference constant.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangStringBuilderDefaultConstructor() {
+ int index;
+ int nameAndTypeIndex;
+ int classIndex;
+ // Looking into the method ref table
+ if ((index = wellKnownMethods[STRINGBUILDER_DEFAULT_CONSTR_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangStringBuilder();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[DEFAULT_CONSTR_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Init);
+ int typeIndex = literalIndex(QualifiedNamesConstants.DefaultConstructorSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[DEFAULT_CONSTR_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[STRINGBUILDER_DEFAULT_CONSTR_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the
+ * method descriptor. It can be either an interface method reference constant
+ * or a method reference constant.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangStringBufferToString() {
+ int index;
+ int nameAndTypeIndex;
+ int classIndex;
+ // Looking into the method ref table
+ if ((index = wellKnownMethods[STRINGBUFFER_TOSTRING_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangStringBuffer();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[TOSTRING_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.ToString);
+ int typeIndex = literalIndex(QualifiedNamesConstants.ToStringSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[TOSTRING_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[STRINGBUFFER_TOSTRING_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the
+ * method descriptor. It can be either an interface method reference constant
+ * or a method reference constant.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangStringBuilderToString() {
+ int index;
+ int nameAndTypeIndex;
+ int classIndex;
+ // Looking into the method ref table
+ if ((index = wellKnownMethods[STRINGBUILDER_TOSTRING_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangStringBuilder();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[TOSTRING_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.ToString);
+ int typeIndex = literalIndex(QualifiedNamesConstants.ToStringSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[TOSTRING_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[STRINGBUILDER_TOSTRING_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the
+ * method descriptor. It can be either an interface method reference constant
+ * or a method reference constant.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangStringIntern() {
+ int index;
+ int nameAndTypeIndex;
+ int classIndex;
+ // Looking into the method ref table
+ if ((index = wellKnownMethods[STRING_INTERN_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangString();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[INTERN_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Intern);
+ int typeIndex = literalIndex(QualifiedNamesConstants.InternSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[INTERN_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[STRING_INTERN_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the
+ * method descriptor. It is an interface method reference constant
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaUtilIteratorHasNext() {
+ int index;
+ int nameAndTypeIndex;
+ int classIndex;
+ // Looking into the method ref table
+ if ((index = wellKnownMethods[ITERATOR_HASNEXT_METHOD]) == 0) {
+ classIndex = literalIndexForJavaUtilIterator();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[HASNEXT_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.HasNext);
+ int typeIndex = literalIndex(QualifiedNamesConstants.HasNextSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[HASNEXT_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[ITERATOR_HASNEXT_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(InterfaceMethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the
+ * method descriptor. It is an interface method reference constant
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaUtilIteratorNext() {
+ int index;
+ int nameAndTypeIndex;
+ int classIndex;
+ // Looking into the method ref table
+ if ((index = wellKnownMethods[ITERATOR_NEXT_METHOD]) == 0) {
+ classIndex = literalIndexForJavaUtilIterator();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[NEXT_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Next);
+ int typeIndex = literalIndex(QualifiedNamesConstants.NextSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[NEXT_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[ITERATOR_NEXT_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(InterfaceMethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the
+ * method descriptor. It can be either an interface method reference constant
+ * or a method reference constant.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangStringValueOf(int typeID) {
+ int index = 0;
+ int nameAndTypeIndex = 0;
+ switch (typeID) {
+ case T_int :
+ case T_byte :
+ case T_short :
+ if ((index = wellKnownMethods[STRING_VALUEOF_INT_METHOD]) == 0) {
+ int classIndex = literalIndexForJavaLangString();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[VALUEOF_INT_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.ValueOf);
+ int typeIndex = literalIndex(QualifiedNamesConstants.ValueOfIntSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[VALUEOF_INT_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[STRING_VALUEOF_INT_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ break;
+ case T_long :
+ if ((index = wellKnownMethods[STRING_VALUEOF_LONG_METHOD]) == 0) {
+ int classIndex = literalIndexForJavaLangString();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[VALUEOF_LONG_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.ValueOf);
+ int typeIndex = literalIndex(QualifiedNamesConstants.ValueOfLongSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[VALUEOF_LONG_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[STRING_VALUEOF_LONG_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ break;
+ case T_float :
+ if ((index = wellKnownMethods[STRING_VALUEOF_FLOAT_METHOD]) == 0) {
+ int classIndex = literalIndexForJavaLangString();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[VALUEOF_FLOAT_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.ValueOf);
+ int typeIndex = literalIndex(QualifiedNamesConstants.ValueOfFloatSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[VALUEOF_FLOAT_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[STRING_VALUEOF_FLOAT_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ break;
+ case T_double :
+ if ((index = wellKnownMethods[STRING_VALUEOF_DOUBLE_METHOD]) == 0) {
+ int classIndex = literalIndexForJavaLangString();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[VALUEOF_DOUBLE_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.ValueOf);
+ int typeIndex = literalIndex(QualifiedNamesConstants.ValueOfDoubleSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[VALUEOF_DOUBLE_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[STRING_VALUEOF_DOUBLE_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ break;
+ case T_char :
+ if ((index = wellKnownMethods[STRING_VALUEOF_CHAR_METHOD]) == 0) {
+ int classIndex = literalIndexForJavaLangString();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[VALUEOF_CHAR_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.ValueOf);
+ int typeIndex = literalIndex(QualifiedNamesConstants.ValueOfCharSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[VALUEOF_CHAR_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[STRING_VALUEOF_CHAR_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ break;
+ case T_boolean :
+ if ((index = wellKnownMethods[STRING_VALUEOF_BOOLEAN_METHOD]) == 0) {
+ int classIndex = literalIndexForJavaLangString();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[VALUEOF_BOOLEAN_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.ValueOf);
+ int typeIndex = literalIndex(QualifiedNamesConstants.ValueOfBooleanSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[VALUEOF_BOOLEAN_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[STRING_VALUEOF_BOOLEAN_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ break;
+ case T_Object :
+ if ((index = wellKnownMethods[STRING_VALUEOF_OBJECT_METHOD]) == 0) {
+ int classIndex = literalIndexForJavaLangString();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[VALUEOF_OBJECT_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.ValueOf);
+ int typeIndex = literalIndex(QualifiedNamesConstants.ValueOfObjectSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[VALUEOF_OBJECT_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[STRING_VALUEOF_OBJECT_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ break;
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the type descriptor.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangSystem() {
+ int index;
+ if ((index = wellKnownTypes[JAVA_LANG_SYSTEM_TYPE]) == 0) {
+ int nameIndex;
+ // The entry doesn't exit yet
+ nameIndex = literalIndex(QualifiedNamesConstants.JavaLangSystemConstantPoolName);
+ index = wellKnownTypes[JAVA_LANG_SYSTEM_TYPE] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(ClassTag);
+ // Then add the 8 bytes representing the long
+ writeU2(nameIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the
+ * method descriptor. It can be either an interface method reference constant
+ * or a method reference constant.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangSystemExitInt() {
+ int index;
+ int nameAndTypeIndex;
+ int classIndex;
+ // Looking into the method ref table
+ if ((index = wellKnownMethods[SYSTEM_EXIT_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangSystem();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[EXIT_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.Exit);
+ int typeIndex = literalIndex(QualifiedNamesConstants.ExitIntSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[EXIT_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[SYSTEM_EXIT_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the type descriptor.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangThrowable() {
+ int index;
+ if ((index = wellKnownTypes[JAVA_LANG_THROWABLE_TYPE]) == 0) {
+ int nameIndex;
+ // The entry doesn't exit yet
+ nameIndex = literalIndex(QualifiedNamesConstants.JavaLangThrowableConstantPoolName);
+ index = wellKnownTypes[JAVA_LANG_THROWABLE_TYPE] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(ClassTag);
+ // Then add the 8 bytes representing the long
+ writeU2(nameIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the
+ * method descriptor. It can be either an interface method reference constant
+ * or a method reference constant.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangThrowableGetMessage() {
+ int index;
+ int nameAndTypeIndex;
+ int classIndex;
+ // Looking into the method ref table
+ if ((index = wellKnownMethods[THROWABLE_GETMESSAGE_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangThrowable();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[GETMESSAGE_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.GetMessage);
+ int typeIndex = literalIndex(QualifiedNamesConstants.GetMessageSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[GETMESSAGE_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[THROWABLE_GETMESSAGE_METHOD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the type descriptor.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangVoid() {
+ int index;
+ if ((index = wellKnownTypes[JAVA_LANG_VOID_TYPE]) == 0) {
+ int nameIndex;
+ // The entry doesn't exit yet
+ nameIndex = literalIndex(QualifiedNamesConstants.JavaLangVoidConstantPoolName);
+ index = wellKnownTypes[JAVA_LANG_VOID_TYPE] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(ClassTag);
+ // Then add the 8 bytes representing the long
+ writeU2(nameIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool
+ * corresponding to the field binding aFieldBinding.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangVoidTYPE() {
+ int index;
+ if ((index = wellKnownFields[JAVA_LANG_VOID_TYPE_FIELD]) == 0) {
+ int nameAndTypeIndex;
+ int classIndex;
+ // The entry doesn't exit yet
+ classIndex = literalIndexForJavaLangVoid();
+ if ((nameAndTypeIndex = wellKnownFieldNameAndTypes[TYPE_JAVALANGCLASS_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.TYPE);
+ int typeIndex = literalIndex(QualifiedNamesConstants.JavaLangClassSignature);
+ nameAndTypeIndex = wellKnownFieldNameAndTypes[TYPE_JAVALANGCLASS_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownFields[JAVA_LANG_VOID_TYPE_FIELD] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(FieldRefTag);
+ writeU2(classIndex);
+ writeU2(nameAndTypeIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the type descriptor.
+ *
+ * @param stringCharArray char[]
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForLdc(char[] stringCharArray) {
+ int index;
+ if ((index = stringCache.get(stringCharArray)) < 0) {
+ int stringIndex;
+ // The entry doesn't exit yet
+ if ((stringIndex = UTF8Cache.get(stringCharArray)) < 0) {
+ // The entry doesn't exit yet
+ // Write the tag first
+ writeU1(Utf8Tag);
+ // Then the size of the stringName array
+ int savedCurrentOffset = currentOffset;
+ if (currentOffset + 2 >= poolContent.length) {
+ // we need to resize the poolContent array because we won't have
+ // enough space to write the length
+ resizePoolContents(2);
+ }
+ currentOffset += 2;
+ int length = 0;
+ for (int i = 0; i < stringCharArray.length; i++) {
+ char current = stringCharArray[i];
+ if ((current >= 0x0001) && (current <= 0x007F)) {
+ // we only need one byte: ASCII table
+ writeU1(current);
+ length++;
+ } else
+ if (current > 0x07FF) {
+ // we need 3 bytes
+ length += 3;
+ writeU1(0xE0 | ((current >> 12) & 0x0F)); // 0xE0 = 1110 0000
+ writeU1(0x80 | ((current >> 6) & 0x3F)); // 0x80 = 1000 0000
+ writeU1(0x80 | (current & 0x3F)); // 0x80 = 1000 0000
+ } else {
+ // we can be 0 or between 0x0080 and 0x07FF
+ // In that case we only need 2 bytes
+ length += 2;
+ writeU1(0xC0 | ((current >> 6) & 0x1F)); // 0xC0 = 1100 0000
+ writeU1(0x80 | (current & 0x3F)); // 0x80 = 1000 0000
+ }
+ }
+ if (length >= 65535) {
+ currentOffset = savedCurrentOffset - 1;
+ return -1;
+ }
+ stringIndex = UTF8Cache.put(stringCharArray, currentIndex++);
+ // Now we know the length that we have to write in the constant pool
+ // we use savedCurrentOffset to do that
+ if (length > 65535) {
+ return 0;
+ }
+ poolContent[savedCurrentOffset] = (byte) (length >> 8);
+ poolContent[savedCurrentOffset + 1] = (byte) length;
+ }
+ index = stringCache.put(stringCharArray, currentIndex++);
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ // Write the tag first
+ writeU1(StringTag);
+ // Then the string index
+ writeU2(stringIndex);
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding
+ * nameAndType constant with nameIndex, typeIndex.
+ *
+ * @param nameIndex int
+ * @param typeIndex int
+ * @param key org.eclipse.wst.jsdt.internal.compiler.lookup.MethodBinding
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForMethods(int nameIndex, int typeIndex, MethodBinding key) {
+ int index;
+ int indexOfWellKnownMethodNameAndType;
+ if ((indexOfWellKnownMethodNameAndType = indexOfWellKnownMethodNameAndType(key)) == -1) {
+ // check if the entry exists
+ if ((index = nameAndTypeCacheForMethods.get(key)) == -1) {
+ // The entry doesn't exit yet
+ index = nameAndTypeCacheForMethods.put(key, currentIndex++);
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ } else {
+ if ((index = wellKnownMethodNameAndTypes[indexOfWellKnownMethodNameAndType]) == 0) {
+ index = wellKnownMethodNameAndTypes[indexOfWellKnownMethodNameAndType] = currentIndex++;
+ if (index > 0xFFFF){
+ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
+ }
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ }
+ return index;
+}
+/**
+ * This method returns the index into the constantPool corresponding to the
+ * method descriptor. It can be either an interface method reference constant
+ * or a method reference constant.
+ *
+ * @return <CODE>int</CODE>
+ */
+public int literalIndexForJavaLangObjectGetClass() {
+ int index;
+ int nameAndTypeIndex;
+ int classIndex;
+ // Looking into the method ref table
+ if ((index = wellKnownMethods[OBJECT_GETCLASS_METHOD]) == 0) {
+ classIndex = literalIndexForJavaLangObject();
+ if ((nameAndTypeIndex = wellKnownMethodNameAndTypes[GETCLASS_OBJECT_METHOD_NAME_AND_TYPE]) == 0) {
+ int nameIndex = literalIndex(QualifiedNamesConstants.GetClass);
+ int typeIndex = literalIndex(QualifiedNamesConstants.GetClassSignature);
+ nameAndTypeIndex = wellKnownMethodNameAndTypes[GETCLASS_OBJECT_METHOD_NAME_AND_TYPE] = currentIndex++;
+ writeU1(NameAndTypeTag);
+ writeU2(nameIndex);
+ writeU2(typeIndex);
+ }
+ index = wellKnownMethods[OBJECT_GETCLASS_METHOD] = currentIndex++;
+ // Write the method ref constant into the constant pool
+ // First add the tag
+ writeU1(MethodRefTag);
+ // Then write the class index
+ writeU2(classIndex);
+ // The write the nameAndType index
+ writeU2(nameAndTypeIndex);
+ }
+ return index;
+}
+/**
+ * This method is used to clean the receiver in case of a clinit header is generated, but the
+ * clinit has no code.
+ * This implementation assumes that the clinit is the first method to be generated.
+ * @see org.eclipse.wst.jsdt.internal.compiler.ast.TypeDeclaration#addClinit()
+ */
+public void resetForClinit(int constantPoolIndex, int constantPoolOffset) {
+ currentIndex = constantPoolIndex;
+ currentOffset = constantPoolOffset;
+ if (UTF8Cache.get(AttributeNamesConstants.CodeName) >= constantPoolIndex) {
+ UTF8Cache.remove(AttributeNamesConstants.CodeName);
+ }
+ if (UTF8Cache.get(QualifiedNamesConstants.ClinitSignature) >= constantPoolIndex) {
+ UTF8Cache.remove(QualifiedNamesConstants.ClinitSignature);
+ }
+ if (UTF8Cache.get(QualifiedNamesConstants.Clinit) >= constantPoolIndex) {
+ UTF8Cache.remove(QualifiedNamesConstants.Clinit);
+ }
+}
+
+/**
+ * Resize the pool contents
+ */
+private final void resizePoolContents(int minimalSize) {
+ int length = poolContent.length;
+ int toAdd = length;
+ if (toAdd < minimalSize)
+ toAdd = minimalSize;
+ System.arraycopy(poolContent, 0, poolContent = new byte[length + toAdd], 0, length);
+}
+/**
+ * Write a unsigned byte into the byte array
+ *
+ * @param value <CODE>int</CODE> The value to write into the byte array
+ */
+protected final void writeU1(int value) {
+ if (currentOffset + 1 >= poolContent.length) {
+ resizePoolContents(1);
+ }
+ poolContent[currentOffset++] = (byte) value;
+}
+/**
+ * Write a unsigned byte into the byte array
+ *
+ * @param value <CODE>int</CODE> The value to write into the byte array
+ */
+protected final void writeU2(int value) {
+ if (currentOffset + 2 >= poolContent.length) {
+ resizePoolContents(2);
+ }
+ //first byte
+ poolContent[currentOffset++] = (byte) (value >> 8);
+ poolContent[currentOffset++] = (byte) value;
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/DoubleCache.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/DoubleCache.js
new file mode 100644
index 0000000..60d3079
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/DoubleCache.js
@@ -0,0 +1,138 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.codegen;
+
+public class DoubleCache {
+ private double keyTable[];
+ private int valueTable[];
+ private int elementSize;
+/**
+ * Constructs a new, empty hashtable. A default capacity and
+ * load factor is used. Note that the hashtable will automatically
+ * grow when it gets full.
+ */
+public DoubleCache() {
+ this(13);
+}
+/**
+ * Constructs a new, empty hashtable with the specified initial
+ * capacity.
+ * @param initialCapacity int
+ * the initial number of buckets
+ */
+public DoubleCache(int initialCapacity) {
+ elementSize = 0;
+ keyTable = new double[initialCapacity];
+ valueTable = new int[initialCapacity];
+}
+/**
+ * Clears the hash table so that it has no more elements in it.
+ */
+public void clear() {
+ for (int i = keyTable.length; --i >= 0;) {
+ keyTable[i] = 0.0;
+ valueTable[i] = 0;
+ }
+ elementSize = 0;
+}
+/** Returns true if the collection contains an element for the key.
+ *
+ * @param key <CODE>double</CODE> the key that we are looking for
+ * @return boolean
+ */
+public boolean containsKey(double key) {
+ if (key == 0.0) {
+ for (int i = 0, max = elementSize; i < max; i++) {
+ if (keyTable[i] == 0.0) {
+ long value1 = Double.doubleToLongBits(key);
+ long value2 = Double.doubleToLongBits(keyTable[i]);
+ if (value1 == -9223372036854775808L && value2 == -9223372036854775808L)
+ return true;
+ if (value1 == 0 && value2 == 0)
+ return true;
+ }
+ }
+ } else {
+ for (int i = 0, max = elementSize; i < max; i++) {
+ if (keyTable[i] == key) {
+ return true;
+ }
+ }
+ }
+ return false;
+}
+/** Gets the object associated with the specified key in the
+ * hashtable.
+ * @param key <CODE>double</CODE> the specified key
+ * @return int the element for the key or -1 if the key is not
+ * defined in the hash table.
+ */
+public int get(double key) {
+ if (key == 0.0) {
+ for (int i = 0, max = elementSize; i < max; i++) {
+ if (keyTable[i] == 0.0) {
+ long value1 = Double.doubleToLongBits(key);
+ long value2 = Double.doubleToLongBits(keyTable[i]);
+ if (value1 == -9223372036854775808L && value2 == -9223372036854775808L)
+ return valueTable[i];
+ if (value1 == 0 && value2 == 0)
+ return valueTable[i];
+ }
+ }
+ } else {
+ for (int i = 0, max = elementSize; i < max; i++) {
+ if (keyTable[i] == key) {
+ return valueTable[i];
+ }
+ }
+ }
+ return -1;
+}
+/**
+ * Puts the specified element into the hashtable, using the specified
+ * key. The element may be retrieved by doing a get() with the same key.
+ *
+ * @param key <CODE>double</CODE> the specified key in the hashtable
+ * @param value <CODE>int</CODE> the specified element
+ * @return int value
+ */
+public int put(double key, int value) {
+ if (elementSize == keyTable.length) {
+ // resize
+ System.arraycopy(keyTable, 0, (keyTable = new double[elementSize * 2]), 0, elementSize);
+ System.arraycopy(valueTable, 0, (valueTable = new int[elementSize * 2]), 0, elementSize);
+ }
+ keyTable[elementSize] = key;
+ valueTable[elementSize] = value;
+ elementSize++;
+ return value;
+}
+/**
+ * Converts to a rather lengthy String.
+ *
+ * @return String the ascii representation of the receiver
+ */
+public String toString() {
+ int max = elementSize;
+ StringBuffer buf = new StringBuffer();
+ buf.append("{"); //$NON-NLS-1$
+ for (int i = 0; i < max; ++i) {
+ if ((keyTable[i] != 0) || ((keyTable[i] == 0) &&(valueTable[i] != 0))) {
+ buf.append(keyTable[i]).append("->").append(valueTable[i]); //$NON-NLS-1$
+ }
+ if (i < max) {
+ buf.append(", "); //$NON-NLS-1$
+ }
+ }
+ buf.append("}"); //$NON-NLS-1$
+ return buf.toString();
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/ExceptionLabel.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/ExceptionLabel.js
new file mode 100644
index 0000000..76decf8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/ExceptionLabel.js
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.codegen;
+
+import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding;
+
+public class ExceptionLabel extends Label {
+
+ public int start = POS_NOT_SET;
+ public int end = POS_NOT_SET;
+ public TypeBinding exceptionType;
+
+ public ExceptionLabel(CodeStream codeStream, TypeBinding exceptionType) {
+
+ super(codeStream);
+ this.exceptionType = exceptionType;
+ this.placeStart();
+ }
+
+ public boolean isStandardLabel(){
+
+ return false;
+ }
+
+ public void place() {
+
+ // register the handler inside the codeStream then normal place
+ codeStream.registerExceptionHandler(this);
+ super.place();
+ }
+
+ public void placeEnd() {
+
+ this.end = codeStream.position;
+ }
+
+ public void placeStart() {
+
+ this.start = codeStream.position;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/FieldNameAndTypeCache.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/FieldNameAndTypeCache.js
new file mode 100644
index 0000000..b3addf3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/FieldNameAndTypeCache.js
@@ -0,0 +1,161 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.codegen;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.FieldBinding;
+
+public class FieldNameAndTypeCache {
+ public FieldBinding keyTable[];
+ public int valueTable[];
+ int elementSize;
+ int threshold;
+/**
+ * Constructs a new, empty hashtable. A default capacity is used.
+ * Note that the hashtable will automatically grow when it gets full.
+ */
+public FieldNameAndTypeCache() {
+ this(13);
+}
+/**
+ * Constructs a new, empty hashtable with the specified initial
+ * capacity.
+ * @param initialCapacity int
+ * the initial number of buckets
+ */
+public FieldNameAndTypeCache(int initialCapacity) {
+ this.elementSize = 0;
+ this.threshold = (int) (initialCapacity * 0.66f);
+ this.keyTable = new FieldBinding[initialCapacity];
+ this.valueTable = new int[initialCapacity];
+}
+/**
+ * Clears the hash table so that it has no more elements in it.
+ */
+public void clear() {
+ for (int i = keyTable.length; --i >= 0;) {
+ keyTable[i] = null;
+ valueTable[i] = 0;
+ }
+ elementSize = 0;
+}
+/** Returns true if the collection contains an element for the key.
+ *
+ * @param key char[] the key that we are looking for
+ * @return boolean
+ */
+public boolean containsKey(FieldBinding key) {
+ int index = hashCode(key);
+ while (keyTable[index] != null) {
+ if (equalsForNameAndType(keyTable[index], key))
+ return true;
+ index = (index + 1) % keyTable.length;
+ }
+ return false;
+}
+/**
+ * Return true if the two field binding are consider like equals.
+ */
+public boolean equalsForNameAndType(FieldBinding field1, FieldBinding field2) {
+ return ((field1.type == field2.type) && CharOperation.equals(field1.name, field2.name));
+}
+/** Gets the object associated with the specified key in the
+ * hashtable.
+ * @param key <CODE>char[]</CODE> the specified key
+ * @return int the element for the key or -1 if the key is not
+ * defined in the hash table.
+ */
+public int get(FieldBinding key) {
+ int index = hashCode(key);
+ while (keyTable[index] != null) {
+ if (equalsForNameAndType(keyTable[index], key))
+ return valueTable[index];
+ index = (index + 1) % keyTable.length;
+ }
+ return -1;
+}
+/**
+ * Return the hashcode for the key parameter
+ *
+ * @param key org.eclipse.wst.jsdt.internal.compiler.lookup.MethodBinding
+ * @return int
+ */
+public int hashCode(FieldBinding key) {
+ return ((CharOperation.hashCode(key.name) + key.type.hashCode()) & 0x7FFFFFFF) % keyTable.length;
+}
+/**
+ * Puts the specified element into the hashtable, using the specified
+ * key. The element may be retrieved by doing a get() with the same key.
+ * The key and the element cannot be null.
+ *
+ * @param key <CODE>Object</CODE> the specified key in the hashtable
+ * @param value <CODE>int</CODE> the specified element
+ * @return int the old value of the key, or -1 if it did not have one.
+ */
+public int put(FieldBinding key, int value) {
+ int index = hashCode(key);
+ while (keyTable[index] != null) {
+ if (equalsForNameAndType(keyTable[index], key))
+ return valueTable[index] = value;
+ index = (index + 1) % keyTable.length;
+ }
+ keyTable[index] = key;
+ valueTable[index] = value;
+
+ // assumes the threshold is never equal to the size of the table
+ if (++elementSize > threshold)
+ rehash();
+ return value;
+}
+/**
+ * Rehashes the content of the table into a bigger table.
+ * This method is called automatically when the hashtable's
+ * size exceeds the threshold.
+ */
+private void rehash() {
+ FieldNameAndTypeCache newHashtable = new FieldNameAndTypeCache(keyTable.length * 2);
+ for (int i = keyTable.length; --i >= 0;)
+ if (keyTable[i] != null)
+ newHashtable.put(keyTable[i], valueTable[i]);
+
+ this.keyTable = newHashtable.keyTable;
+ this.valueTable = newHashtable.valueTable;
+ this.threshold = newHashtable.threshold;
+}
+/**
+ * Returns the number of elements contained in the hashtable.
+ *
+ * @return <CODE>int</CODE> The size of the table
+ */
+public int size() {
+ return elementSize;
+}
+/**
+ * Converts to a rather lengthy String.
+ *
+ * @return String the ascii representation of the receiver
+ */
+public String toString() {
+ int max = size();
+ StringBuffer buf = new StringBuffer();
+ buf.append("{"); //$NON-NLS-1$
+ for (int i = 0; i < max; ++i) {
+ if (keyTable[i] != null) {
+ buf.append(keyTable[i]).append("->").append(valueTable[i]); //$NON-NLS-1$
+ }
+ if (i < max) {
+ buf.append(", "); //$NON-NLS-1$
+ }
+ }
+ buf.append("}"); //$NON-NLS-1$
+ return buf.toString();
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/FloatCache.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/FloatCache.js
new file mode 100644
index 0000000..6a11877
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/FloatCache.js
@@ -0,0 +1,138 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.codegen;
+
+public class FloatCache {
+ private float keyTable[];
+ private int valueTable[];
+ private int elementSize;
+/**
+ * Constructs a new, empty hashtable. A default capacity and
+ * load factor is used. Note that the hashtable will automatically
+ * grow when it gets full.
+ */
+public FloatCache() {
+ this(13);
+}
+/**
+ * Constructs a new, empty hashtable with the specified initial
+ * capacity.
+ * @param initialCapacity int
+ * the initial number of buckets
+ */
+public FloatCache(int initialCapacity) {
+ elementSize = 0;
+ keyTable = new float[initialCapacity];
+ valueTable = new int[initialCapacity];
+}
+/**
+ * Clears the hash table so that it has no more elements in it.
+ */
+public void clear() {
+ for (int i = keyTable.length; --i >= 0;) {
+ keyTable[i] = 0.0f;
+ valueTable[i] = 0;
+ }
+ elementSize = 0;
+}
+/** Returns true if the collection contains an element for the key.
+ *
+ * @param key <CODE>float</CODE> the key that we are looking for
+ * @return boolean
+ */
+public boolean containsKey(float key) {
+ if (key == 0.0f) {
+ for (int i = 0, max = elementSize; i < max; i++) {
+ if (keyTable[i] == 0.0f) {
+ int value1 = Float.floatToIntBits(key);
+ int value2 = Float.floatToIntBits(keyTable[i]);
+ if (value1 == -2147483648 && value2 == -2147483648)
+ return true;
+ if (value1 == 0 && value2 == 0)
+ return true;
+ }
+ }
+ } else {
+ for (int i = 0, max = elementSize; i < max; i++) {
+ if (keyTable[i] == key) {
+ return true;
+ }
+ }
+ }
+ return false;
+}
+/** Gets the object associated with the specified key in the
+ * hashtable.
+ * @param key <CODE>float</CODE> the specified key
+ * @return int the element for the key or -1 if the key is not
+ * defined in the hash table.
+ */
+public int get(float key) {
+ if (key == 0.0f) {
+ for (int i = 0, max = elementSize; i < max; i++) {
+ if (keyTable[i] == 0.0f) {
+ int value1 = Float.floatToIntBits(key);
+ int value2 = Float.floatToIntBits(keyTable[i]);
+ if (value1 == -2147483648 && value2 == -2147483648)
+ return valueTable[i];
+ if (value1 == 0 && value2 == 0)
+ return valueTable[i];
+ }
+ }
+ } else {
+ for (int i = 0, max = elementSize; i < max; i++) {
+ if (keyTable[i] == key) {
+ return valueTable[i];
+ }
+ }
+ }
+ return -1;
+}
+/**
+ * Puts the specified element into the hashtable, using the specified
+ * key. The element may be retrieved by doing a get() with the same key.
+ *
+ * @param key <CODE>float</CODE> the specified key in the hashtable
+ * @param value <CODE>int</CODE> the specified element
+ * @return int value
+ */
+public int put(float key, int value) {
+ if (elementSize == keyTable.length) {
+ // resize
+ System.arraycopy(keyTable, 0, (keyTable = new float[elementSize * 2]), 0, elementSize);
+ System.arraycopy(valueTable, 0, (valueTable = new int[elementSize * 2]), 0, elementSize);
+ }
+ keyTable[elementSize] = key;
+ valueTable[elementSize] = value;
+ elementSize++;
+ return value;
+}
+/**
+ * Converts to a rather lengthy String.
+ *
+ * @return String the ascii representation of the receiver
+ */
+public String toString() {
+ int max = elementSize;
+ StringBuffer buf = new StringBuffer();
+ buf.append("{"); //$NON-NLS-1$
+ for (int i = 0; i < max; ++i) {
+ if ((keyTable[i] != 0) || ((keyTable[i] == 0) && (valueTable[i] != 0))) {
+ buf.append(keyTable[i]).append("->").append(valueTable[i]); //$NON-NLS-1$
+ }
+ if (i < max) {
+ buf.append(", "); //$NON-NLS-1$
+ }
+ }
+ buf.append("}"); //$NON-NLS-1$
+ return buf.toString();
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/IntegerCache.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/IntegerCache.js
new file mode 100644
index 0000000..8e540e0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/IntegerCache.js
@@ -0,0 +1,155 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.codegen;
+
+public class IntegerCache {
+ public int keyTable[];
+ public int valueTable[];
+ int elementSize;
+ int threshold;
+/**
+ * Constructs a new, empty hashtable. A default capacity and
+ * load factor is used. Note that the hashtable will automatically
+ * grow when it gets full.
+ */
+public IntegerCache() {
+ this(13);
+}
+/**
+ * Constructs a new, empty hashtable with the specified initial
+ * capacity.
+ * @param initialCapacity int
+ * the initial number of buckets
+ */
+public IntegerCache(int initialCapacity) {
+ elementSize = 0;
+ threshold = (int) (initialCapacity * 0.66);
+ keyTable = new int[initialCapacity];
+ valueTable = new int[initialCapacity];
+}
+/**
+ * Clears the hash table so that it has no more elements in it.
+ */
+public void clear() {
+ for (int i = keyTable.length; --i >= 0;) {
+ keyTable[i] = 0;
+ valueTable[i] = 0;
+ }
+ elementSize = 0;
+}
+/** Returns true if the collection contains an element for the key.
+ *
+ * @param key <CODE>double</CODE> the key that we are looking for
+ * @return boolean
+ */
+public boolean containsKey(int key) {
+ int index = hash(key);
+ while ((keyTable[index] != 0) || ((keyTable[index] == 0) &&(valueTable[index] != 0))) {
+ if (keyTable[index] == key)
+ return true;
+ index = (index + 1) % keyTable.length;
+ }
+ return false;
+}
+/** Gets the object associated with the specified key in the
+ * hashtable.
+ * @param key <CODE>double</CODE> the specified key
+ * @return int the element for the key or -1 if the key is not
+ * defined in the hash table.
+ */
+public int get(int key) {
+ int index = hash(key);
+ while ((keyTable[index] != 0) || ((keyTable[index] == 0) &&(valueTable[index] != 0))) {
+ if (keyTable[index] == key)
+ return valueTable[index];
+ index = (index + 1) % keyTable.length;
+ }
+ return -1;
+}
+/**
+ * Return a hashcode for the value of the key parameter.
+ * @param key int
+ * @return int the hash code corresponding to the key value
+ */
+public int hash(int key) {
+ return (key & 0x7FFFFFFF) % keyTable.length;
+}
+/**
+ * Puts the specified element into the hashtable, using the specified
+ * key. The element may be retrieved by doing a get() with the same key.
+ *
+ * @param key <CODE>int</CODE> the specified key in the hashtable
+ * @param value <CODE>int</CODE> the specified element
+ * @return int value
+ */
+public int put(int key, int value) {
+ int index = hash(key);
+ while ((keyTable[index] != 0) || ((keyTable[index] == 0) && (valueTable[index] != 0))) {
+ if (keyTable[index] == key)
+ return valueTable[index] = value;
+ index = (index + 1) % keyTable.length;
+ }
+ keyTable[index] = key;
+ valueTable[index] = value;
+
+ // assumes the threshold is never equal to the size of the table
+ if (++elementSize > threshold) {
+ rehash();
+ }
+ return value;
+}
+/**
+ * Rehashes the content of the table into a bigger table.
+ * This method is called automatically when the hashtable's
+ * size exceeds the threshold.
+ */
+private void rehash() {
+ IntegerCache newHashtable = new IntegerCache(keyTable.length * 2);
+ for (int i = keyTable.length; --i >= 0;) {
+ int key = keyTable[i];
+ int value = valueTable[i];
+ if ((key != 0) || ((key == 0) && (value != 0))) {
+ newHashtable.put(key, value);
+ }
+ }
+ this.keyTable = newHashtable.keyTable;
+ this.valueTable = newHashtable.valueTable;
+ this.threshold = newHashtable.threshold;
+}
+/**
+ * Returns the number of elements contained in the hashtable.
+ *
+ * @return <CODE>int</CODE> The size of the table
+ */
+public int size() {
+ return elementSize;
+}
+/**
+ * Converts to a rather lengthy String.
+ *
+ * @return String the ascii representation of the receiver
+ */
+public String toString() {
+ int max = size();
+ StringBuffer buf = new StringBuffer();
+ buf.append("{"); //$NON-NLS-1$
+ for (int i = 0; i < max; ++i) {
+ if ((keyTable[i] != 0) || ((keyTable[i] == 0) && (valueTable[i] != 0))) {
+ buf.append(keyTable[i]).append("->").append(valueTable[i]); //$NON-NLS-1$
+ }
+ if (i < max) {
+ buf.append(", "); //$NON-NLS-1$
+ }
+ }
+ buf.append("}"); //$NON-NLS-1$
+ return buf.toString();
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/Label.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/Label.js
new file mode 100644
index 0000000..fac3fa4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/Label.js
@@ -0,0 +1,262 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.codegen;
+
+import org.eclipse.wst.jsdt.internal.compiler.lookup.LocalVariableBinding;
+import org.eclipse.wst.jsdt.internal.compiler.problem.AbortMethod;
+
+/**
+ * This type is a port of smalltalks JavaLabel
+ */
+public class Label {
+ public CodeStream codeStream;
+ final static int POS_NOT_SET = -1;
+ public int position = POS_NOT_SET; // position=POS_NOT_SET Then it's pos is not set.
+ public int[] forwardReferences = new int[10]; // Add an overflow check here.
+ public int forwardReferenceCount = 0;
+ private boolean isWide = false;
+
+public Label() {
+ // for creating labels ahead of code generation
+}
+/**
+ * @param codeStream org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream
+ */
+public Label(CodeStream codeStream) {
+ this.codeStream = codeStream;
+}
+/**
+ * Add a forward refrence for the array.
+ */
+void addForwardReference(int iPos) {
+ int length;
+ if (forwardReferenceCount >= (length = forwardReferences.length))
+ System.arraycopy(forwardReferences, 0, (forwardReferences = new int[2*length]), 0, length);
+ forwardReferences[forwardReferenceCount++] = iPos;
+}
+/**
+ * Add a forward refrence for the array.
+ */
+public void appendForwardReferencesFrom(Label otherLabel) {
+ int otherCount = otherLabel.forwardReferenceCount;
+ if (otherCount == 0) return;
+ int length = forwardReferences.length;
+ int neededSpace = otherCount + forwardReferenceCount;
+ if (neededSpace >= length){
+ System.arraycopy(forwardReferences, 0, (forwardReferences = new int[neededSpace]), 0, forwardReferenceCount);
+ }
+ // append other forward references at the end, so they will get updated as well
+ System.arraycopy(otherLabel.forwardReferences, 0, forwardReferences, forwardReferenceCount, otherCount);
+ forwardReferenceCount = neededSpace;
+}
+/*
+* Put down a reference to the array at the location in the codestream.
+*/
+void branch() {
+ if (position == POS_NOT_SET) {
+ addForwardReference(codeStream.position);
+ // Leave two bytes free to generate the jump afterwards
+ codeStream.position += 2;
+ codeStream.classFileOffset += 2;
+ } else {
+ /*
+ * Position is set. Write it if it is not a wide branch.
+ */
+ int offset = position - codeStream.position + 1;
+ if (Math.abs(offset) > 0x7FFF && !this.codeStream.wideMode) {
+ throw new AbortMethod(CodeStream.RESTART_IN_WIDE_MODE, null);
+ }
+ codeStream.writeSignedShort(offset);
+ }
+}
+/*
+* No support for wide branches yet
+*/
+void branchWide() {
+ if (position == POS_NOT_SET) {
+ addForwardReference(codeStream.position);
+ // Leave 4 bytes free to generate the jump offset afterwards
+ isWide = true;
+ codeStream.position += 4;
+ codeStream.classFileOffset += 4;
+ } else { //Position is set. Write it!
+ codeStream.writeSignedWord(position - codeStream.position + 1);
+ }
+}
+/**
+ * @return boolean
+ */
+public boolean hasForwardReferences() {
+ return forwardReferenceCount != 0;
+}
+/*
+ * Some placed labels might be branching to a goto bytecode which we can optimize better.
+ */
+public void inlineForwardReferencesFromLabelsTargeting(int gotoLocation) {
+
+/*
+ Code required to optimized unreachable gotos.
+ public boolean isBranchTarget(int location) {
+ Label[] labels = codeStream.labels;
+ for (int i = codeStream.countLabels - 1; i >= 0; i--){
+ Label label = labels[i];
+ if ((label.position == location) && label.isStandardLabel()){
+ return true;
+ }
+ }
+ return false;
+ }
+ */
+
+ Label[] labels = codeStream.labels;
+ for (int i = codeStream.countLabels - 1; i >= 0; i--){
+ Label label = labels[i];
+ if ((label.position == gotoLocation) && label.isStandardLabel()){
+ this.appendForwardReferencesFrom(label);
+ /*
+ Code required to optimized unreachable gotos.
+ label.position = POS_NOT_SET;
+ */
+ } else {
+ break; // same target labels should be contiguous
+ }
+ }
+}
+public void initialize(CodeStream stream) {
+ this.codeStream = stream;
+ this.position = POS_NOT_SET;
+ this.forwardReferenceCount = 0;
+}
+public boolean isStandardLabel(){
+ return true;
+}
+/*
+* Place the label. If we have forward references resolve them.
+*/
+public void place() { // Currently lacking wide support.
+ if (CodeStream.DEBUG) System.out.println("\t\t\t\t<place at: "+codeStream.position+" - "+ this); //$NON-NLS-1$ //$NON-NLS-2$
+
+ if (position == POS_NOT_SET) {
+ position = codeStream.position;
+ codeStream.addLabel(this);
+ int oldPosition = position;
+ boolean isOptimizedBranch = false;
+ // TURNED OFF since fail on 1F4IRD9
+ if (forwardReferenceCount != 0) {
+ isOptimizedBranch = (forwardReferences[forwardReferenceCount - 1] + 2 == position) && (codeStream.bCodeStream[codeStream.classFileOffset - 3] == Opcodes.OPC_goto);
+ if (isOptimizedBranch) {
+ codeStream.position = (position -= 3);
+ codeStream.classFileOffset -= 3;
+ forwardReferenceCount--;
+ // also update the PCs in the related debug attributes
+ /** OLD CODE
+ int index = codeStream.pcToSourceMapSize - 1;
+ while ((index >= 0) && (codeStream.pcToSourceMap[index][1] == oldPosition)) {
+ codeStream.pcToSourceMap[index--][1] = position;
+ }
+ */
+ // Beginning of new code
+ int index = codeStream.pcToSourceMapSize - 2;
+ if (codeStream.lastEntryPC == oldPosition) {
+ codeStream.lastEntryPC = position;
+ }
+ if ((index >= 0) && (codeStream.pcToSourceMap[index] == position)) {
+ codeStream.pcToSourceMapSize-=2;
+ }
+ // end of new code
+ if (codeStream.generateLocalVariableTableAttributes) {
+ LocalVariableBinding locals[] = codeStream.locals;
+ for (int i = 0, max = locals.length; i < max; i++) {
+ LocalVariableBinding local = locals[i];
+ if ((local != null) && (local.initializationCount > 0)) {
+ if (local.initializationPCs[((local.initializationCount - 1) << 1) + 1] == oldPosition) {
+ // we want to prevent interval of size 0 to have a negative size.
+ // see PR 1GIRQLA: ITPJCORE:ALL - ClassFormatError for local variable attribute
+ local.initializationPCs[((local.initializationCount - 1) << 1) + 1] = position;
+ }
+ if (local.initializationPCs[(local.initializationCount - 1) << 1] == oldPosition) {
+ local.initializationPCs[(local.initializationCount - 1) << 1] = position;
+ }
+ }
+ }
+ }
+ }
+ }
+ for (int i = 0; i < forwardReferenceCount; i++) {
+ int offset = position - forwardReferences[i] + 1;
+ if (Math.abs(offset) > 0x7FFF && !this.codeStream.wideMode) {
+ throw new AbortMethod(CodeStream.RESTART_IN_WIDE_MODE, null);
+ }
+ if (this.codeStream.wideMode) {
+ if (this.isWide) {
+ codeStream.writeSignedWord(forwardReferences[i], offset);
+ } else {
+ codeStream.writeSignedShort(forwardReferences[i], offset);
+ }
+ } else {
+ codeStream.writeSignedShort(forwardReferences[i], offset);
+ }
+ }
+ // For all labels placed at that position we check if we need to rewrite the jump
+ // offset. It is the case each time a label had a forward reference to the current position.
+ // Like we change the current position, we have to change the jump offset. See 1F4IRD9 for more details.
+ if (isOptimizedBranch) {
+ for (int i = 0; i < codeStream.countLabels; i++) {
+ Label label = codeStream.labels[i];
+ if (oldPosition == label.position) {
+ label.position = position;
+ if (label instanceof CaseLabel) {
+ int offset = position - ((CaseLabel) label).instructionPosition;
+ for (int j = 0; j < label.forwardReferenceCount; j++) {
+ int forwardPosition = label.forwardReferences[j];
+ codeStream.writeSignedWord(forwardPosition, offset);
+ }
+ } else {
+ for (int j = 0; j < label.forwardReferenceCount; j++) {
+ int forwardPosition = label.forwardReferences[j];
+ int offset = position - forwardPosition + 1;
+ if (Math.abs(offset) > 0x7FFF && !this.codeStream.wideMode) {
+ throw new AbortMethod(CodeStream.RESTART_IN_WIDE_MODE, null);
+ }
+ if (this.codeStream.wideMode) {
+ if (this.isWide) {
+ codeStream.writeSignedWord(forwardPosition, offset);
+ } else {
+ codeStream.writeSignedShort(forwardPosition, offset);
+ }
+ } else {
+ codeStream.writeSignedShort(forwardPosition, offset);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+/**
+ * Print out the receiver
+ */
+public String toString() {
+ String basic = getClass().getName();
+ basic = basic.substring(basic.lastIndexOf('.')+1);
+ StringBuffer buffer = new StringBuffer(basic);
+ buffer.append('@').append(Integer.toHexString(hashCode()));
+ buffer.append("(position=").append(position); //$NON-NLS-1$
+ buffer.append(", forwards = ["); //$NON-NLS-1$
+ for (int i = 0; i < forwardReferenceCount - 1; i++)
+ buffer.append(forwardReferences[i] + ", "); //$NON-NLS-1$
+ if (forwardReferenceCount >= 1)
+ buffer.append(forwardReferences[forwardReferenceCount-1]);
+ buffer.append("] )"); //$NON-NLS-1$
+ return buffer.toString();
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/LongCache.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/LongCache.js
new file mode 100644
index 0000000..5101a69
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/LongCache.js
@@ -0,0 +1,155 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.codegen;
+
+public class LongCache {
+ public long keyTable[];
+ public int valueTable[];
+ int elementSize;
+ int threshold;
+/**
+ * Constructs a new, empty hashtable. A default capacity and
+ * load factor is used. Note that the hashtable will automatically
+ * grow when it gets full.
+ */
+public LongCache() {
+ this(13);
+}
+/**
+ * Constructs a new, empty hashtable with the specified initial
+ * capacity.
+ * @param initialCapacity int
+ * the initial number of buckets
+ */
+public LongCache(int initialCapacity) {
+ elementSize = 0;
+ threshold = (int) (initialCapacity * 0.66);
+ keyTable = new long[initialCapacity];
+ valueTable = new int[initialCapacity];
+}
+/**
+ * Clears the hash table so that it has no more elements in it.
+ */
+public void clear() {
+ for (int i = keyTable.length; --i >= 0;) {
+ keyTable[i] = 0;
+ valueTable[i] = 0;
+ }
+ elementSize = 0;
+}
+/** Returns true if the collection contains an element for the key.
+ *
+ * @param key <CODE>long</CODE> the key that we are looking for
+ * @return boolean
+ */
+public boolean containsKey(long key) {
+ int index = hash(key);
+ while ((keyTable[index] != 0) || ((keyTable[index] == 0) &&(valueTable[index] != 0))) {
+ if (keyTable[index] == key)
+ return true;
+ index = (index + 1) % keyTable.length;
+ }
+ return false;
+}
+/** Gets the object associated with the specified key in the
+ * hashtable.
+ * @param key <CODE>long</CODE> the specified key
+ * @return int the element for the key or -1 if the key is not
+ * defined in the hash table.
+ */
+public int get(long key) {
+ int index = hash(key);
+ while ((keyTable[index] != 0) || ((keyTable[index] == 0) &&(valueTable[index] != 0))) {
+ if (keyTable[index] == key)
+ return valueTable[index];
+ index = (index + 1) % keyTable.length;
+ }
+ return -1;
+}
+/**
+ * Return a hashcode for the value of the key parameter.
+ * @param key long
+ * @return int the hash code corresponding to the key value
+ */
+public int hash(long key) {
+ return ((int) key & 0x7FFFFFFF) % keyTable.length;
+}
+/**
+ * Puts the specified element into the hashtable, using the specified
+ * key. The element may be retrieved by doing a get() with the same key.
+ *
+ * @param key <CODE>long</CODE> the specified key in the hashtable
+ * @param value <CODE>int</CODE> the specified element
+ * @return int value
+ */
+public int put(long key, int value) {
+ int index = hash(key);
+ while ((keyTable[index] != 0) || ((keyTable[index] == 0) && (valueTable[index] != 0))) {
+ if (keyTable[index] == key)
+ return valueTable[index] = value;
+ index = (index + 1) % keyTable.length;
+ }
+ keyTable[index] = key;
+ valueTable[index] = value;
+
+ // assumes the threshold is never equal to the size of the table
+ if (++elementSize > threshold) {
+ rehash();
+ }
+ return value;
+}
+/**
+ * Rehashes the content of the table into a bigger table.
+ * This method is called automatically when the hashtable's
+ * size exceeds the threshold.
+ */
+private void rehash() {
+ LongCache newHashtable = new LongCache(keyTable.length * 2);
+ for (int i = keyTable.length; --i >= 0;) {
+ long key = keyTable[i];
+ int value = valueTable[i];
+ if ((key != 0) || ((key == 0) && (value != 0))) {
+ newHashtable.put(key, value);
+ }
+ }
+ this.keyTable = newHashtable.keyTable;
+ this.valueTable = newHashtable.valueTable;
+ this.threshold = newHashtable.threshold;
+}
+/**
+ * Returns the number of elements contained in the hashtable.
+ *
+ * @return <CODE>int</CODE> The size of the table
+ */
+public int size() {
+ return elementSize;
+}
+/**
+ * Converts to a rather lengthy String.
+ *
+ * @return String the ascii representation of the receiver
+ */
+public String toString() {
+ int max = size();
+ StringBuffer buf = new StringBuffer();
+ buf.append("{"); //$NON-NLS-1$
+ for (int i = 0; i < max; ++i) {
+ if ((keyTable[i] != 0) || ((keyTable[i] == 0) && (valueTable[i] != 0))) {
+ buf.append(keyTable[i]).append("->").append(valueTable[i]); //$NON-NLS-1$
+ }
+ if (i < max) {
+ buf.append(", "); //$NON-NLS-1$
+ }
+ }
+ buf.append("}"); //$NON-NLS-1$
+ return buf.toString();
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/MethodNameAndTypeCache.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/MethodNameAndTypeCache.js
new file mode 100644
index 0000000..f9b30a4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/MethodNameAndTypeCache.js
@@ -0,0 +1,162 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.codegen;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.MethodBinding;
+
+public class MethodNameAndTypeCache {
+ public MethodBinding keyTable[];
+ public int valueTable[];
+ int elementSize;
+ int threshold;
+/**
+ * Constructs a new, empty hashtable. A default capacity is used.
+ * Note that the hashtable will automatically grow when it gets full.
+ */
+public MethodNameAndTypeCache() {
+ this(13);
+}
+/**
+ * Constructs a new, empty hashtable with the specified initial
+ * capacity.
+ * @param initialCapacity int
+ * the initial number of buckets
+ */
+public MethodNameAndTypeCache(int initialCapacity) {
+ this.elementSize = 0;
+ this.threshold = (int) (initialCapacity * 0.66f);
+ this.keyTable = new MethodBinding[initialCapacity];
+ this.valueTable = new int[initialCapacity];
+}
+/**
+ * Clears the hash table so that it has no more elements in it.
+ */
+public void clear() {
+ for (int i = keyTable.length; --i >= 0;) {
+ keyTable[i] = null;
+ valueTable[i] = 0;
+ }
+ elementSize = 0;
+}
+/** Returns true if the collection contains an element for the key.
+ *
+ * @param key char[] the key that we are looking for
+ * @return boolean
+ */
+public boolean containsKey(MethodBinding key) {
+ int index = hashCode(key);
+ while (keyTable[index] != null) {
+ if (equalsForNameAndType(keyTable[index], key))
+ return true;
+ index = (index + 1) % keyTable.length;
+ }
+ return false;
+}
+/**
+ * Returns true if the two methodBinding are consider to be equal for the name and type
+ * purpose
+ */
+public boolean equalsForNameAndType(MethodBinding method1, MethodBinding method2) {
+ return CharOperation.equals(method1.selector, method2.selector) && CharOperation.equals(method1.signature(), method2.signature());
+}
+/** Gets the object associated with the specified key in the
+ * hashtable.
+ * @param key <CODE>char[]</CODE> the specified key
+ * @return int the element for the key or -1 if the key is not
+ * defined in the hash table.
+ */
+public int get(MethodBinding key) {
+ int index = hashCode(key);
+ while (keyTable[index] != null) {
+ if (equalsForNameAndType(keyTable[index], key))
+ return valueTable[index];
+ index = (index + 1) % keyTable.length;
+ }
+ return -1;
+}
+/**
+ * Return the hashcode for the key parameter
+ *
+ * @param key org.eclipse.wst.jsdt.internal.compiler.lookup.MethodBinding
+ * @return int
+ */
+public int hashCode(MethodBinding key) {
+ return CharOperation.hashCode(key.selector) % keyTable.length;
+}
+/**
+ * Puts the specified element into the hashtable, using the specified
+ * key. The element may be retrieved by doing a get() with the same key.
+ * The key and the element cannot be null.
+ *
+ * @param key <CODE>Object</CODE> the specified key in the hashtable
+ * @param value <CODE>int</CODE> the specified element
+ * @return int the old value of the key, or -1 if it did not have one.
+ */
+public int put(MethodBinding key, int value) {
+ int index = hashCode(key);
+ while (keyTable[index] != null) {
+ if (equalsForNameAndType(keyTable[index], key))
+ return valueTable[index] = value;
+ index = (index + 1) % keyTable.length;
+ }
+ keyTable[index] = key;
+ valueTable[index] = value;
+
+ // assumes the threshold is never equal to the size of the table
+ if (++elementSize > threshold)
+ rehash();
+ return value;
+}
+/**
+ * Rehashes the content of the table into a bigger table.
+ * This method is called automatically when the hashtable's
+ * size exceeds the threshold.
+ */
+private void rehash() {
+ MethodNameAndTypeCache newHashtable = new MethodNameAndTypeCache(keyTable.length * 2);
+ for (int i = keyTable.length; --i >= 0;)
+ if (keyTable[i] != null)
+ newHashtable.put(keyTable[i], valueTable[i]);
+
+ this.keyTable = newHashtable.keyTable;
+ this.valueTable = newHashtable.valueTable;
+ this.threshold = newHashtable.threshold;
+}
+/**
+ * Returns the number of elements contained in the hashtable.
+ *
+ * @return <CODE>int</CODE> The size of the table
+ */
+public int size() {
+ return elementSize;
+}
+/**
+ * Converts to a rather lengthy String.
+ *
+ * @return String the ascii representation of the receiver
+ */
+public String toString() {
+ int max = size();
+ StringBuffer buf = new StringBuffer();
+ buf.append("{"); //$NON-NLS-1$
+ for (int i = 0; i < max; ++i) {
+ if (keyTable[i] != null) {
+ buf.append(keyTable[i]).append("->").append(valueTable[i]); //$NON-NLS-1$
+ }
+ if (i < max) {
+ buf.append(", "); //$NON-NLS-1$
+ }
+ }
+ buf.append("}"); //$NON-NLS-1$
+ return buf.toString();
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/ObjectCache.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/ObjectCache.js
new file mode 100644
index 0000000..fc5d031
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/ObjectCache.js
@@ -0,0 +1,152 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.codegen;
+
+public class ObjectCache {
+ public Object keyTable[];
+ public int valueTable[];
+ int elementSize;
+ int threshold;
+/**
+ * Constructs a new, empty hashtable. A default capacity is used.
+ * Note that the hashtable will automatically grow when it gets full.
+ */
+public ObjectCache() {
+ this(13);
+}
+/**
+ * Constructs a new, empty hashtable with the specified initial
+ * capacity.
+ * @param initialCapacity int
+ * the initial number of buckets
+ */
+public ObjectCache(int initialCapacity) {
+ this.elementSize = 0;
+ this.threshold = (int) (initialCapacity * 0.66f);
+ this.keyTable = new Object[initialCapacity];
+ this.valueTable = new int[initialCapacity];
+}
+/**
+ * Clears the hash table so that it has no more elements in it.
+ */
+public void clear() {
+ for (int i = keyTable.length; --i >= 0;) {
+ keyTable[i] = null;
+ valueTable[i] = 0;
+ }
+ elementSize = 0;
+}
+/** Returns true if the collection contains an element for the key.
+ *
+ * @param key char[] the key that we are looking for
+ * @return boolean
+ */
+public boolean containsKey(Object key) {
+ int index = hashCode(key);
+ while (keyTable[index] != null) {
+ if (keyTable[index] == key)
+ return true;
+ index = (index + 1) % keyTable.length;
+ }
+ return false;
+}
+/** Gets the object associated with the specified key in the
+ * hashtable.
+ * @param key <CODE>char[]</CODE> the specified key
+ * @return int the element for the key or -1 if the key is not
+ * defined in the hash table.
+ */
+public int get(Object key) {
+ int index = hashCode(key);
+ while (keyTable[index] != null) {
+ if (keyTable[index] == key)
+ return valueTable[index];
+ index = (index + 1) % keyTable.length;
+ }
+ return -1;
+}
+/**
+ * Return the hashcode for the key parameter
+ *
+ * @param key org.eclipse.wst.jsdt.internal.compiler.lookup.MethodBinding
+ * @return int
+ */
+public int hashCode(Object key) {
+ return (key.hashCode() & 0x7FFFFFFF) % keyTable.length;
+}
+/**
+ * Puts the specified element into the hashtable, using the specified
+ * key. The element may be retrieved by doing a get() with the same key.
+ * The key and the element cannot be null.
+ *
+ * @param key <CODE>Object</CODE> the specified key in the hashtable
+ * @param value <CODE>int</CODE> the specified element
+ * @return int the old value of the key, or -1 if it did not have one.
+ */
+public int put(Object key, int value) {
+ int index = hashCode(key);
+ while (keyTable[index] != null) {
+ if (keyTable[index] == key)
+ return valueTable[index] = value;
+ index = (index + 1) % keyTable.length;
+ }
+ keyTable[index] = key;
+ valueTable[index] = value;
+
+ // assumes the threshold is never equal to the size of the table
+ if (++elementSize > threshold)
+ rehash();
+ return value;
+}
+/**
+ * Rehashes the content of the table into a bigger table.
+ * This method is called automatically when the hashtable's
+ * size exceeds the threshold.
+ */
+private void rehash() {
+ ObjectCache newHashtable = new ObjectCache(keyTable.length * 2);
+ for (int i = keyTable.length; --i >= 0;)
+ if (keyTable[i] != null)
+ newHashtable.put(keyTable[i], valueTable[i]);
+
+ this.keyTable = newHashtable.keyTable;
+ this.valueTable = newHashtable.valueTable;
+ this.threshold = newHashtable.threshold;
+}
+/**
+ * Returns the number of elements contained in the hashtable.
+ *
+ * @return <CODE>int</CODE> The size of the table
+ */
+public int size() {
+ return elementSize;
+}
+/**
+ * Converts to a rather lengthy String.
+ *
+ * @return String the ascii representation of the receiver
+ */
+public String toString() {
+ int max = size();
+ StringBuffer buf = new StringBuffer();
+ buf.append("{"); //$NON-NLS-1$
+ for (int i = 0; i < max; ++i) {
+ if (keyTable[i] != null) {
+ buf.append(keyTable[i]).append("->").append(valueTable[i]); //$NON-NLS-1$
+ }
+ if (i < max) {
+ buf.append(", "); //$NON-NLS-1$
+ }
+ }
+ buf.append("}"); //$NON-NLS-1$
+ return buf.toString();
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/Opcodes.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/Opcodes.js
new file mode 100644
index 0000000..b60a1ea
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/Opcodes.js
@@ -0,0 +1,216 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.codegen;
+
+public interface Opcodes {
+
+ public static final byte OPC_nop = 0;
+ public static final byte OPC_aconst_null = 1;
+ public static final byte OPC_iconst_m1 = 2;
+ public static final byte OPC_iconst_0 = 3;
+ public static final byte OPC_iconst_1 = 4;
+ public static final byte OPC_iconst_2 = 5;
+ public static final byte OPC_iconst_3 = 6;
+ public static final byte OPC_iconst_4 = 7;
+ public static final byte OPC_iconst_5 = 8;
+ public static final byte OPC_lconst_0 = 9;
+ public static final byte OPC_lconst_1 = 10;
+ public static final byte OPC_fconst_0 = 11;
+ public static final byte OPC_fconst_1 = 12;
+ public static final byte OPC_fconst_2 = 13;
+ public static final byte OPC_dconst_0 = 14;
+ public static final byte OPC_dconst_1 = 15;
+ public static final byte OPC_bipush = 16;
+ public static final byte OPC_sipush = 17;
+ public static final byte OPC_ldc = 18;
+ public static final byte OPC_ldc_w = 19;
+ public static final byte OPC_ldc2_w = 20;
+ public static final byte OPC_iload = 21;
+ public static final byte OPC_lload = 22;
+ public static final byte OPC_fload = 23;
+ public static final byte OPC_dload = 24;
+ public static final byte OPC_aload = 25;
+ public static final byte OPC_iload_0 = 26;
+ public static final byte OPC_iload_1 = 27;
+ public static final byte OPC_iload_2 = 28;
+ public static final byte OPC_iload_3 = 29;
+ public static final byte OPC_lload_0 = 30;
+ public static final byte OPC_lload_1 = 31;
+ public static final byte OPC_lload_2 = 32;
+ public static final byte OPC_lload_3 = 33;
+ public static final byte OPC_fload_0 = 34;
+ public static final byte OPC_fload_1 = 35;
+ public static final byte OPC_fload_2 = 36;
+ public static final byte OPC_fload_3 = 37;
+ public static final byte OPC_dload_0 = 38;
+ public static final byte OPC_dload_1 = 39;
+ public static final byte OPC_dload_2 = 40;
+ public static final byte OPC_dload_3 = 41;
+ public static final byte OPC_aload_0 = 42;
+ public static final byte OPC_aload_1 = 43;
+ public static final byte OPC_aload_2 = 44;
+ public static final byte OPC_aload_3 = 45;
+ public static final byte OPC_iaload = 46;
+ public static final byte OPC_laload = 47;
+ public static final byte OPC_faload = 48;
+ public static final byte OPC_daload = 49;
+ public static final byte OPC_aaload = 50;
+ public static final byte OPC_baload = 51;
+ public static final byte OPC_caload = 52;
+ public static final byte OPC_saload = 53;
+ public static final byte OPC_istore = 54;
+ public static final byte OPC_lstore = 55;
+ public static final byte OPC_fstore = 56;
+ public static final byte OPC_dstore = 57;
+ public static final byte OPC_astore = 58;
+ public static final byte OPC_istore_0 = 59;
+ public static final byte OPC_istore_1 = 60;
+ public static final byte OPC_istore_2 = 61;
+ public static final byte OPC_istore_3 = 62;
+ public static final byte OPC_lstore_0 = 63;
+ public static final byte OPC_lstore_1 = 64;
+ public static final byte OPC_lstore_2 = 65;
+ public static final byte OPC_lstore_3 = 66;
+ public static final byte OPC_fstore_0 = 67;
+ public static final byte OPC_fstore_1 = 68;
+ public static final byte OPC_fstore_2 = 69;
+ public static final byte OPC_fstore_3 = 70;
+ public static final byte OPC_dstore_0 = 71;
+ public static final byte OPC_dstore_1 = 72;
+ public static final byte OPC_dstore_2 = 73;
+ public static final byte OPC_dstore_3 = 74;
+ public static final byte OPC_astore_0 = 75;
+ public static final byte OPC_astore_1 = 76;
+ public static final byte OPC_astore_2 = 77;
+ public static final byte OPC_astore_3 = 78;
+ public static final byte OPC_iastore = 79;
+ public static final byte OPC_lastore = 80;
+ public static final byte OPC_fastore = 81;
+ public static final byte OPC_dastore = 82;
+ public static final byte OPC_aastore = 83;
+ public static final byte OPC_bastore = 84;
+ public static final byte OPC_castore = 85;
+ public static final byte OPC_sastore = 86;
+ public static final byte OPC_pop = 87;
+ public static final byte OPC_pop2 = 88;
+ public static final byte OPC_dup = 89;
+ public static final byte OPC_dup_x1 = 90;
+ public static final byte OPC_dup_x2 = 91;
+ public static final byte OPC_dup2 = 92;
+ public static final byte OPC_dup2_x1 = 93;
+ public static final byte OPC_dup2_x2 = 94;
+ public static final byte OPC_swap = 95;
+ public static final byte OPC_iadd = 96;
+ public static final byte OPC_ladd = 97;
+ public static final byte OPC_fadd = 98;
+ public static final byte OPC_dadd = 99;
+ public static final byte OPC_isub = 100;
+ public static final byte OPC_lsub = 101;
+ public static final byte OPC_fsub = 102;
+ public static final byte OPC_dsub = 103;
+ public static final byte OPC_imul = 104;
+ public static final byte OPC_lmul = 105;
+ public static final byte OPC_fmul = 106;
+ public static final byte OPC_dmul = 107;
+ public static final byte OPC_idiv = 108;
+ public static final byte OPC_ldiv = 109;
+ public static final byte OPC_fdiv = 110;
+ public static final byte OPC_ddiv = 111;
+ public static final byte OPC_irem = 112;
+ public static final byte OPC_lrem = 113;
+ public static final byte OPC_frem = 114;
+ public static final byte OPC_drem = 115;
+ public static final byte OPC_ineg = 116;
+ public static final byte OPC_lneg = 117;
+ public static final byte OPC_fneg = 118;
+ public static final byte OPC_dneg = 119;
+ public static final byte OPC_ishl = 120;
+ public static final byte OPC_lshl = 121;
+ public static final byte OPC_ishr = 122;
+ public static final byte OPC_lshr = 123;
+ public static final byte OPC_iushr = 124;
+ public static final byte OPC_lushr = 125;
+ public static final byte OPC_iand = 126;
+ public static final byte OPC_land = 127;
+ public static final byte OPC_ior = (byte) 128;
+ public static final byte OPC_lor = (byte) 129;
+ public static final byte OPC_ixor = (byte) 130;
+ public static final byte OPC_lxor = (byte) 131;
+ public static final byte OPC_iinc = (byte) 132;
+ public static final byte OPC_i2l = (byte) 133;
+ public static final byte OPC_i2f = (byte) 134;
+ public static final byte OPC_i2d = (byte) 135;
+ public static final byte OPC_l2i = (byte) 136;
+ public static final byte OPC_l2f = (byte) 137;
+ public static final byte OPC_l2d = (byte) 138;
+ public static final byte OPC_f2i = (byte) 139;
+ public static final byte OPC_f2l = (byte) 140;
+ public static final byte OPC_f2d = (byte) 141;
+ public static final byte OPC_d2i = (byte) 142;
+ public static final byte OPC_d2l = (byte) 143;
+ public static final byte OPC_d2f = (byte) 144;
+ public static final byte OPC_i2b = (byte) 145;
+ public static final byte OPC_i2c = (byte) 146;
+ public static final byte OPC_i2s = (byte) 147;
+ public static final byte OPC_lcmp = (byte) 148;
+ public static final byte OPC_fcmpl = (byte) 149;
+ public static final byte OPC_fcmpg = (byte) 150;
+ public static final byte OPC_dcmpl = (byte) 151;
+ public static final byte OPC_dcmpg = (byte) 152;
+ public static final byte OPC_ifeq = (byte) 153;
+ public static final byte OPC_ifne = (byte) 154;
+ public static final byte OPC_iflt = (byte) 155;
+ public static final byte OPC_ifge = (byte) 156;
+ public static final byte OPC_ifgt = (byte) 157;
+ public static final byte OPC_ifle = (byte) 158;
+ public static final byte OPC_if_icmpeq = (byte) 159;
+ public static final byte OPC_if_icmpne = (byte) 160;
+ public static final byte OPC_if_icmplt = (byte) 161;
+ public static final byte OPC_if_icmpge = (byte) 162;
+ public static final byte OPC_if_icmpgt = (byte) 163;
+ public static final byte OPC_if_icmple = (byte) 164;
+ public static final byte OPC_if_acmpeq = (byte) 165;
+ public static final byte OPC_if_acmpne = (byte) 166;
+ public static final byte OPC_goto = (byte) 167;
+ public static final byte OPC_jsr = (byte) 168;
+ public static final byte OPC_ret = (byte) 169;
+ public static final byte OPC_tableswitch = (byte) 170;
+ public static final byte OPC_lookupswitch = (byte) 171;
+ public static final byte OPC_ireturn = (byte) 172;
+ public static final byte OPC_lreturn = (byte) 173;
+ public static final byte OPC_freturn = (byte) 174;
+ public static final byte OPC_dreturn = (byte) 175;
+ public static final byte OPC_areturn = (byte) 176;
+ public static final byte OPC_return = (byte) 177;
+ public static final byte OPC_getstatic = (byte) 178;
+ public static final byte OPC_putstatic = (byte) 179;
+ public static final byte OPC_getfield = (byte) 180;
+ public static final byte OPC_putfield = (byte) 181;
+ public static final byte OPC_invokevirtual = (byte) 182;
+ public static final byte OPC_invokespecial = (byte) 183;
+ public static final byte OPC_invokestatic = (byte) 184;
+ public static final byte OPC_invokeinterface = (byte) 185;
+ public static final byte OPC_new = (byte) 187;
+ public static final byte OPC_newarray = (byte) 188;
+ public static final byte OPC_anewarray = (byte) 189;
+ public static final byte OPC_arraylength = (byte) 190;
+ public static final byte OPC_athrow = (byte) 191;
+ public static final byte OPC_checkcast = (byte) 192;
+ public static final byte OPC_instanceof = (byte) 193;
+ public static final byte OPC_monitorenter = (byte) 194;
+ public static final byte OPC_monitorexit = (byte) 195;
+ public static final byte OPC_wide = (byte) 196;
+ public static final byte OPC_multianewarray = (byte) 197;
+ public static final byte OPC_ifnull = (byte) 198;
+ public static final byte OPC_ifnonnull = (byte) 199;
+ public static final byte OPC_goto_w = (byte) 200;
+ public static final byte OPC_jsr_w = (byte) 201;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/QualifiedNamesConstants.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/QualifiedNamesConstants.js
new file mode 100644
index 0000000..1c41c80
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/QualifiedNamesConstants.js
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.codegen;
+
+public interface QualifiedNamesConstants {
+ char[] JavaLangObjectConstantPoolName = "java/lang/Object".toCharArray(); //$NON-NLS-1$
+ char[] JavaLangStringConstantPoolName = "java/lang/String".toCharArray(); //$NON-NLS-1$
+ char[] JavaLangStringBufferConstantPoolName = "java/lang/StringBuffer".toCharArray(); //$NON-NLS-1$
+ char[] JavaLangClassConstantPoolName = "java/lang/Class".toCharArray(); //$NON-NLS-1$
+ char[] JavaLangThrowableConstantPoolName = "java/lang/Throwable".toCharArray(); //$NON-NLS-1$
+ char[] JavaLangClassNotFoundExceptionConstantPoolName = "java/lang/ClassNotFoundException".toCharArray(); //$NON-NLS-1$
+ char[] JavaLangNoClassDefFoundErrorConstantPoolName = "java/lang/NoClassDefFoundError".toCharArray(); //$NON-NLS-1$
+ char[] JavaLangIntegerConstantPoolName = "java/lang/Integer".toCharArray(); //$NON-NLS-1$
+ char[] JavaLangFloatConstantPoolName = "java/lang/Float".toCharArray(); //$NON-NLS-1$
+ char[] JavaLangDoubleConstantPoolName = "java/lang/Double".toCharArray(); //$NON-NLS-1$
+ char[] JavaLangLongConstantPoolName = "java/lang/Long".toCharArray(); //$NON-NLS-1$
+ char[] JavaLangShortConstantPoolName = "java/lang/Short".toCharArray(); //$NON-NLS-1$
+ char[] JavaLangByteConstantPoolName = "java/lang/Byte".toCharArray(); //$NON-NLS-1$
+ char[] JavaLangCharacterConstantPoolName = "java/lang/Character".toCharArray(); //$NON-NLS-1$
+ char[] JavaLangVoidConstantPoolName = "java/lang/Void".toCharArray(); //$NON-NLS-1$
+ char[] JavaLangBooleanConstantPoolName = "java/lang/Boolean".toCharArray(); //$NON-NLS-1$
+ char[] JavaLangSystemConstantPoolName = "java/lang/System".toCharArray(); //$NON-NLS-1$
+ char[] JavaLangErrorConstantPoolName = "java/lang/Error".toCharArray(); //$NON-NLS-1$
+ char[] JavaLangExceptionConstantPoolName = "java/lang/Exception".toCharArray(); //$NON-NLS-1$
+ char[] JavaLangReflectConstructor = "java/lang/reflect/Constructor".toCharArray(); //$NON-NLS-1$
+ char[] JavaUtilIteratorConstantPoolName = "java/util/Iterator".toCharArray(); //$NON-NLS-1$
+ char[] JavaLangStringBuilderConstantPoolName = "java/lang/StringBuilder".toCharArray(); //$NON-NLS-1$
+ char[] Append = new char[] {'a', 'p', 'p', 'e', 'n', 'd'};
+ char[] ToString = new char[] {'t', 'o', 'S', 't', 'r', 'i', 'n', 'g'};
+ char[] Init = new char[] {'<', 'i', 'n', 'i', 't', '>'};
+ char[] Clinit = new char[] {'<', 'c', 'l', 'i', 'n', 'i', 't', '>'};
+ char[] ValueOf = new char[] {'v', 'a', 'l', 'u', 'e', 'O', 'f'};
+ char[] ForName = new char[] {'f', 'o', 'r', 'N', 'a', 'm', 'e'};
+ char[] GetMessage = new char[] {'g', 'e', 't', 'M', 'e', 's', 's', 'a', 'g', 'e'};
+ char[] NewInstance = "newInstance".toCharArray(); //$NON-NLS-1$
+ char[] GetConstructor = "getConstructor".toCharArray(); //$NON-NLS-1$
+ char[] Exit = new char[] {'e', 'x', 'i', 't'};
+ char[] Intern = "intern".toCharArray(); //$NON-NLS-1$
+ char[] Out = new char[] {'o', 'u', 't'};
+ char[] TYPE = new char[] {'T', 'Y', 'P', 'E'};
+ char[] This = new char[] {'t', 'h', 'i', 's'};
+ char[] JavaLangClassSignature = new char[] {'L', 'j', 'a', 'v', 'a', '/', 'l', 'a', 'n', 'g', '/', 'C', 'l', 'a', 's', 's', ';'};
+ char[] ForNameSignature = "(Ljava/lang/String;)Ljava/lang/Class;".toCharArray(); //$NON-NLS-1$
+ char[] GetMessageSignature = "()Ljava/lang/String;".toCharArray(); //$NON-NLS-1$
+ char[] GetConstructorSignature = "([Ljava/lang/Class;)Ljava/lang/reflect/Constructor;".toCharArray(); //$NON-NLS-1$
+ char[] StringConstructorSignature = "(Ljava/lang/String;)V".toCharArray(); //$NON-NLS-1$
+ char[] NewInstanceSignature = "([Ljava/lang/Object;)Ljava/lang/Object;".toCharArray(); //$NON-NLS-1$
+ char[] DefaultConstructorSignature = {'(', ')', 'V'};
+ char[] ClinitSignature = DefaultConstructorSignature;
+ char[] ToStringSignature = GetMessageSignature;
+ char[] InternSignature = GetMessageSignature;
+ char[] StringBufferAppendIntSignature = "(I)Ljava/lang/StringBuffer;".toCharArray(); //$NON-NLS-1$
+ char[] StringBufferAppendLongSignature = "(J)Ljava/lang/StringBuffer;".toCharArray(); //$NON-NLS-1$
+ char[] StringBufferAppendFloatSignature = "(F)Ljava/lang/StringBuffer;".toCharArray(); //$NON-NLS-1$
+ char[] StringBufferAppendDoubleSignature = "(D)Ljava/lang/StringBuffer;".toCharArray(); //$NON-NLS-1$
+ char[] StringBufferAppendCharSignature = "(C)Ljava/lang/StringBuffer;".toCharArray(); //$NON-NLS-1$
+ char[] StringBufferAppendBooleanSignature = "(Z)Ljava/lang/StringBuffer;".toCharArray(); //$NON-NLS-1$
+ char[] StringBufferAppendObjectSignature = "(Ljava/lang/Object;)Ljava/lang/StringBuffer;".toCharArray(); //$NON-NLS-1$
+ char[] StringBufferAppendStringSignature = "(Ljava/lang/String;)Ljava/lang/StringBuffer;".toCharArray(); //$NON-NLS-1$
+ char[] StringBuilderAppendIntSignature = "(I)Ljava/lang/StringBuilder;".toCharArray(); //$NON-NLS-1$
+ char[] StringBuilderAppendLongSignature = "(J)Ljava/lang/StringBuilder;".toCharArray(); //$NON-NLS-1$
+ char[] StringBuilderAppendFloatSignature = "(F)Ljava/lang/StringBuilder;".toCharArray(); //$NON-NLS-1$
+ char[] StringBuilderAppendDoubleSignature = "(D)Ljava/lang/StringBuilder;".toCharArray(); //$NON-NLS-1$
+ char[] StringBuilderAppendCharSignature = "(C)Ljava/lang/StringBuilder;".toCharArray(); //$NON-NLS-1$
+ char[] StringBuilderAppendBooleanSignature = "(Z)Ljava/lang/StringBuilder;".toCharArray(); //$NON-NLS-1$
+ char[] StringBuilderAppendObjectSignature = "(Ljava/lang/Object;)Ljava/lang/StringBuilder;".toCharArray(); //$NON-NLS-1$
+ char[] StringBuilderAppendStringSignature = "(Ljava/lang/String;)Ljava/lang/StringBuilder;".toCharArray(); //$NON-NLS-1$
+ char[] ValueOfObjectSignature = "(Ljava/lang/Object;)Ljava/lang/String;".toCharArray(); //$NON-NLS-1$
+ char[] ValueOfIntSignature = "(I)Ljava/lang/String;".toCharArray(); //$NON-NLS-1$
+ char[] ValueOfLongSignature = "(J)Ljava/lang/String;".toCharArray(); //$NON-NLS-1$
+ char[] ValueOfCharSignature = "(C)Ljava/lang/String;".toCharArray(); //$NON-NLS-1$
+ char[] ValueOfBooleanSignature = "(Z)Ljava/lang/String;".toCharArray(); //$NON-NLS-1$
+ char[] ValueOfDoubleSignature = "(D)Ljava/lang/String;".toCharArray(); //$NON-NLS-1$
+ char[] ValueOfFloatSignature = "(F)Ljava/lang/String;".toCharArray(); //$NON-NLS-1$
+ char[] JavaIoPrintStreamSignature = "Ljava/io/PrintStream;".toCharArray(); //$NON-NLS-1$
+ char[] ExitIntSignature = new char[] {'(', 'I', ')', 'V'};
+ char[] ArrayJavaLangObjectConstantPoolName = "[Ljava/lang/Object;".toCharArray(); //$NON-NLS-1$
+ char[] ArrayJavaLangClassConstantPoolName = "[Ljava/lang/Class;".toCharArray(); //$NON-NLS-1$
+ char[] JavaLangAssertionErrorConstantPoolName = "java/lang/AssertionError".toCharArray(); //$NON-NLS-1$
+ char[] AssertionErrorIntConstrSignature = "(I)V".toCharArray(); //$NON-NLS-1$
+ char[] AssertionErrorLongConstrSignature = "(J)V".toCharArray(); //$NON-NLS-1$
+ char[] AssertionErrorFloatConstrSignature = "(F)V".toCharArray(); //$NON-NLS-1$
+ char[] AssertionErrorDoubleConstrSignature = "(D)V".toCharArray(); //$NON-NLS-1$
+ char[] AssertionErrorCharConstrSignature = "(C)V".toCharArray(); //$NON-NLS-1$
+ char[] AssertionErrorBooleanConstrSignature = "(Z)V".toCharArray(); //$NON-NLS-1$
+ char[] AssertionErrorObjectConstrSignature = "(Ljava/lang/Object;)V".toCharArray(); //$NON-NLS-1$
+ char[] DesiredAssertionStatus = "desiredAssertionStatus".toCharArray(); //$NON-NLS-1$
+ char[] DesiredAssertionStatusSignature = "()Z".toCharArray(); //$NON-NLS-1$
+ char[] ShortConstrSignature = "(S)V".toCharArray(); //$NON-NLS-1$
+ char[] ByteConstrSignature = "(B)V".toCharArray(); //$NON-NLS-1$
+ char[] GetClass = "getClass".toCharArray(); //$NON-NLS-1$
+ char[] GetClassSignature = "()Ljava/lang/Class;".toCharArray(); //$NON-NLS-1$
+ char[] GetComponentType = "getComponentType".toCharArray(); //$NON-NLS-1$
+ char[] GetComponentTypeSignature = GetClassSignature;
+ char[] HasNext = "hasNext".toCharArray();//$NON-NLS-1$
+ char[] HasNextSignature = "()Z".toCharArray();//$NON-NLS-1$
+ char[] Next = "next".toCharArray();//$NON-NLS-1$
+ char[] NextSignature = "()Ljava/lang/Object;".toCharArray();//$NON-NLS-1$
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IBinaryField.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IBinaryField.js
new file mode 100644
index 0000000..82ae705
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IBinaryField.js
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.env;
+
+import org.eclipse.wst.jsdt.internal.compiler.impl.Constant;
+
+public interface IBinaryField extends IGenericField {
+/**
+ *
+ * @return org.eclipse.wst.jsdt.internal.compiler.Constant
+ */
+Constant getConstant();
+/**
+ * Answer the resolved name of the receiver's type in the
+ * class file format as specified in section 4.3.2 of the Java 2 VM spec.
+ *
+ * For example:
+ * - java.lang.String is Ljava/lang/String;
+ * - an int is I
+ * - a 2 dimensional array of strings is [[Ljava/lang/String;
+ * - an array of floats is [F
+ */
+
+char[] getTypeName();
+
+/**
+ * Answer the receiver's signature which describes the parameter &
+ * return types as specified in section 4.4.4 of the Java 2 VM spec.
+ */
+char[] getGenericSignature();
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IBinaryMethod.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IBinaryMethod.js
new file mode 100644
index 0000000..40103e3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IBinaryMethod.js
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.env;
+
+// clinit methods (synthetics too?) can be returned from IBinaryType>>getMethods()
+// BUT do not have to be... the compiler will ignore them when building the binding.
+// The synthetic argument of a member type's constructor (ie. the first arg of a non-static
+// member type) is also ignored by the compiler, BUT in this case it must be included
+// in the constructor's signature.
+
+public interface IBinaryMethod extends IGenericMethod {
+
+/**
+ * Answer the resolved names of the exception types in the
+ * class file format as specified in section 4.2 of the Java 2 VM spec
+ * or null if the array is empty.
+ *
+ * For example, java.lang.String is java/lang/String.
+ */
+char[][] getExceptionTypeNames();
+
+/**
+ * Answer the receiver's method descriptor which describes the parameter &
+ * return types as specified in section 4.4.3 of the Java 2 VM spec.
+ *
+ * For example:
+ * - int foo(String) is (Ljava/lang/String;)I
+ * - Object[] foo(int) is (I)[Ljava/lang/Object;
+ */
+char[] getMethodDescriptor();
+
+/**
+ * Answer the receiver's signature which describes the parameter &
+ * return types as specified in section 4.4.4 of the Java 2 VM spec.
+ */
+char[] getGenericSignature();
+
+/**
+ * Answer whether the receiver represents a class initializer method.
+ */
+boolean isClinit();
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IBinaryNestedType.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IBinaryNestedType.js
new file mode 100644
index 0000000..a1d4aa8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IBinaryNestedType.js
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.env;
+
+public interface IBinaryNestedType {
+/**
+ * Answer the resolved name of the enclosing type in the
+ * class file format as specified in section 4.2 of the Java 2 VM spec.
+ *
+ * For example, java.lang.String is java/lang/String.
+ */
+
+char[] getEnclosingTypeName();
+/**
+ * Answer an int whose bits are set according the access constants
+ * defined by the VM spec.
+ */
+
+// We have added AccDeprecated & AccSynthetic.
+
+int getModifiers();
+/**
+ * Answer the resolved name of the member type in the
+ * class file format as specified in section 4.2 of the Java 2 VM spec.
+ *
+ * For example, p1.p2.A.M is p1/p2/A$M.
+ */
+
+char[] getName();
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IBinaryType.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IBinaryType.js
new file mode 100644
index 0000000..def9d07
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IBinaryType.js
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.env;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+
+public interface IBinaryType extends IGenericType {
+
+ char[][] NoInterface = CharOperation.NO_CHAR_CHAR;
+ IBinaryNestedType[] NoNestedType = new IBinaryNestedType[0];
+ IBinaryField[] NoField = new IBinaryField[0];
+ IBinaryMethod[] NoMethod = new IBinaryMethod[0];
+/**
+ * Answer the resolved name of the enclosing type in the
+ * class file format as specified in section 4.2 of the Java 2 VM spec
+ * or null if the receiver is a top level type.
+ *
+ * For example, java.lang.String is java/lang/String.
+ */
+
+char[] getEnclosingTypeName();
+/**
+ * Answer the receiver's fields or null if the array is empty.
+ */
+
+IBinaryField[] getFields();
+/**
+ * Answer the resolved names of the receiver's interfaces in the
+ * class file format as specified in section 4.2 of the Java 2 VM spec
+ * or null if the array is empty.
+ *
+ * For example, java.lang.String is java/lang/String.
+ */
+
+char[][] getInterfaceNames();
+/**
+ * Answer the receiver's nested types or null if the array is empty.
+ *
+ * This nested type info is extracted from the inner class attributes.
+ * Ask the name environment to find a member type using its compound name.
+ */
+
+// NOTE: The compiler examines the nested type info & ignores the local types
+// so the local types do not have to be included.
+
+IBinaryNestedType[] getMemberTypes();
+/**
+ * Answer the receiver's methods or null if the array is empty.
+ */
+
+IBinaryMethod[] getMethods();
+/**
+ * Answer the resolved name of the type in the
+ * class file format as specified in section 4.2 of the Java 2 VM spec.
+ *
+ * For example, java.lang.String is java/lang/String.
+ */
+
+char[] getName();
+
+/**
+ * Answer the receiver's signature which describes the parameter &
+ * return types as specified in section 4.4.4 of the Java 2 VM spec.
+ * Returns null if none.
+ *
+ * @return the receiver's signature, null if none
+ */
+char[] getGenericSignature();
+
+/**
+ * Answer the resolved name of the receiver's superclass in the
+ * class file format as specified in section 4.2 of the Java 2 VM spec
+ * or null if it does not have one.
+ *
+ * For example, java.lang.String is java/lang/String.
+ */
+
+char[] getSuperclassName();
+
+/**
+ * Answer true if the receiver is an anonymous class.
+ * false otherwise
+ */
+boolean isAnonymous();
+
+/**
+ * Answer true if the receiver is a local class.
+ * false otherwise
+ */
+boolean isLocal();
+
+/**
+ * Answer true if the receiver is a member class.
+ * false otherwise
+ */
+boolean isMember();
+
+/**
+ * Answer the source file attribute, or null if none.
+ *
+ * For example, "String.java"
+ */
+
+char[] sourceFileName();
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/ICompilationUnit.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/ICompilationUnit.js
new file mode 100644
index 0000000..79266e8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/ICompilationUnit.js
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.env;
+
+/**
+ * This interface denotes a compilation unit, providing its name and content.
+ */
+public interface ICompilationUnit extends IDependent {
+/**
+ * Answer the contents of the compilation unit.
+ *
+ * In normal use, the contents are requested twice.
+ * Once during the initial lite parsing step, then again for the
+ * more detailed parsing step.
+ */
+char[] getContents();
+/**
+ * Answer the name of the top level public type.
+ * For example, {Hashtable}.
+ */
+char[] getMainTypeName();
+/**
+ * Answer the name of the package according to the directory structure
+ * or null if package consistency checks should be ignored.
+ * For example, {java, lang}.
+ */
+char[][] getPackageName();
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IConstants.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IConstants.js
new file mode 100644
index 0000000..1eab815
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IConstants.js
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.env;
+/**
+ * This interface defines constants for use by the builder / compiler
+ * interface.
+ */
+public interface IConstants {
+ int AccDefault = 0;
+ /*
+ * Modifiers
+ */
+ int AccPublic = 0x0001;
+ int AccPrivate = 0x0002;
+ int AccProtected = 0x0004;
+ int AccStatic = 0x0008;
+ int AccFinal = 0x0010;
+ int AccSynchronized = 0x0020;
+ int AccVolatile = 0x0040;
+ int AccBridge = 0x0040;
+ int AccTransient = 0x0080;
+ int AccVarargs = 0x0080;
+ int AccNative = 0x0100;
+ int AccInterface = 0x0200;
+ int AccAbstract = 0x0400;
+ int AccStrictfp = 0x0800;
+ int AccSynthetic = 0x1000;
+ int AccAnnotation = 0x2000;
+ int AccEnum = 0x4000;
+
+ /**
+ * Other VM flags.
+ */
+ int AccSuper = 0x0020;
+ /**
+ * Extra flags for types and members attributes.
+ */
+ int AccDeprecated = 0x100000;
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IDependent.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IDependent.js
new file mode 100644
index 0000000..0b314cc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IDependent.js
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.env;
+
+/**
+ * This represents the target file of a type dependency.
+ *
+ * All implementors of this interface are containers for types or types
+ * themselves which must be able to identify their source file name
+ * when file dependencies are collected.
+ */
+public interface IDependent {
+ char JAR_FILE_ENTRY_SEPARATOR = '|';
+/**
+ * Answer the file name which defines the type.
+ *
+ * The path part (optional) must be separated from the actual
+ * file proper name by a separator suitable for the type (java.io.File.separator for example),
+ * e.g.
+ * "c:\\source\\com\\p\\X.java" or
+ * "/com/p/Y.java".
+ *
+ * The path to the zip or jar file (optional) must be separated
+ * from the actual path part by JAR_FILE_ENTRY_SEPARATOR,
+ * e.g.
+ * "c:\\lib\\some.jar|/com/p/X.class" or
+ * "/lib/some.zip|/com/q/Y.class".
+ *
+ * The proper file name includes the suffix extension (e.g.&nbsp;".java")
+ * e.g.&nbsp;"c:/org/eclipse/jdt/internal/compileri/env/IDependent.java"
+ *
+ * Return null if no file defines the type.
+ */
+
+char[] getFileName();
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IGenericField.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IGenericField.js
new file mode 100644
index 0000000..a0f2584
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IGenericField.js
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.env;
+
+public interface IGenericField {
+/**
+ * Answer an int whose bits are set according the access constants
+ * defined by the VM spec.
+ */
+
+// We have added AccDeprecated & AccSynthetic.
+
+int getModifiers();
+/**
+ * Answer the name of the field.
+ */
+
+char[] getName();
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IGenericMethod.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IGenericMethod.js
new file mode 100644
index 0000000..7fbb5e2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IGenericMethod.js
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.env;
+
+public interface IGenericMethod {
+/**
+ * Answer an int whose bits are set according the access constants
+ * defined by the VM spec.
+ */
+// We have added AccDeprecated
+int getModifiers();
+
+/**
+ * Answer the name of the method.
+ *
+ * For a constructor, answer <init> & <clinit> for a clinit method.
+ */
+char[] getSelector();
+
+boolean isConstructor();
+
+/**
+ * Answer the names of the argument
+ * or null if the argument names are not available.
+ */
+
+char[][] getArgumentNames();
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IGenericType.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IGenericType.js
new file mode 100644
index 0000000..d99502b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IGenericType.js
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.env;
+
+public interface IGenericType extends IDependent {
+/**
+ * Answer an int whose bits are set according the access constants
+ * defined by the VM spec.
+ */
+
+// We have added AccDeprecated & AccSynthetic.
+
+// NOTE: If the receiver represents a member type, the modifiers are extracted from its inner class attributes.
+
+int getModifiers();
+/**
+ * Answer whether the receiver contains the resolved binary form
+ * or the unresolved source form of the type.
+ */
+
+boolean isBinaryType();
+boolean isClass();
+boolean isInterface();
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/INameEnvironment.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/INameEnvironment.js
new file mode 100644
index 0000000..e232837
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/INameEnvironment.js
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.env;
+
+/**
+ * The name environment provides a callback API that the compiler
+ * can use to look up types, compilation units, and packages in the
+ * current environment. The name environment is passed to the compiler
+ * on creation.
+ */
+public interface INameEnvironment {
+/**
+ * Find a type with the given compound name.
+ * Answer the binary form of the type if it is known to be consistent.
+ * Otherwise, answer the compilation unit which defines the type
+ * or null if the type does not exist.
+ * Types in the default package are specified as {{typeName}}.
+ *
+ * It is unknown whether the package containing the type actually exists.
+ *
+ * NOTE: This method can be used to find a member type using its
+ * internal name A$B, but the source file for A is answered if the binary
+ * file is inconsistent.
+ */
+
+NameEnvironmentAnswer findType(char[][] compoundTypeName);
+/**
+ * Find a type named <typeName> in the package <packageName>.
+ * Answer the binary form of the type if it is known to be consistent.
+ * Otherwise, answer the compilation unit which defines the type
+ * or null if the type does not exist.
+ * The default package is indicated by char[0][].
+ *
+ * It is known that the package containing the type exists.
+ *
+ * NOTE: This method can be used to find a member type using its
+ * internal name A$B, but the source file for A is answered if the binary
+ * file is inconsistent.
+ */
+
+NameEnvironmentAnswer findType(char[] typeName, char[][] packageName);
+/**
+ * Answer whether packageName is the name of a known subpackage inside
+ * the package parentPackageName. A top level package is found relative to null.
+ * The default package is always assumed to exist.
+ *
+ * For example:
+ * isPackage({{java}, {awt}}, {event});
+ * isPackage(null, {java});
+ */
+
+boolean isPackage(char[][] parentPackageName, char[] packageName);
+
+/**
+ * This method cleans the environment uo. It is responsible for releasing the memory
+ * and freeing resources. Passed that point, the name environment is no longer usable.
+ *
+ * A name environment can have a long life cycle, therefore it is the responsibility of
+ * the code which created it to decide when it is a good time to clean it up.
+ */
+void cleanup();
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/ISourceField.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/ISourceField.js
new file mode 100644
index 0000000..3f63ba6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/ISourceField.js
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.env;
+
+public interface ISourceField extends IGenericField {
+/**
+ * Answer the source end position of the field's declaration.
+ */
+int getDeclarationSourceEnd();
+
+/**
+ * Answer the source start position of the field's declaration.
+ */
+int getDeclarationSourceStart();
+
+/**
+ * Answer the initialization source for this constant field.
+ * Answer null if the field is not a constant or if it has no initialization.
+ */
+char[] getInitializationSource();
+
+/**
+ * Answer the source end position of the field's name.
+ */
+int getNameSourceEnd();
+
+/**
+ * Answer the source start position of the field's name.
+ */
+int getNameSourceStart();
+
+/**
+ * Answer the type name of the field.
+ *
+ * The name is a simple name or a qualified, dot separated name.
+ * For example, Hashtable or java.util.Hashtable.
+ */
+char[] getTypeName();
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/ISourceImport.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/ISourceImport.js
new file mode 100644
index 0000000..4d4b1c3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/ISourceImport.js
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.env;
+
+public interface ISourceImport {
+
+/**
+ * Answer the source end position of the import declaration.
+ */
+
+int getDeclarationSourceEnd();
+/**
+ * Answer the source start position of the import declaration.
+ */
+
+int getDeclarationSourceStart();
+
+/**
+ * Answer an int whose bits are set according the access constants
+ * defined by the VM spec.
+ * Since Java 1.5, static imports can be defined.
+ */
+int getModifiers();
+
+/**
+ * Answer the name of the import.
+ * A name is a simple name or a qualified, dot separated name.
+ * For example, Hashtable or java.util.Hashtable.
+ */
+char[] getName();
+
+/**
+ * Answer whether the import is on demand or not
+ * On demand import names have no trailing star
+ */
+boolean onDemand();
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/ISourceMethod.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/ISourceMethod.js
new file mode 100644
index 0000000..141264e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/ISourceMethod.js
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.env;
+
+public interface ISourceMethod extends IGenericMethod {
+
+/**
+ * Answer the unresolved names of the argument types
+ * or null if the array is empty.
+ *
+ * A name is a simple name or a qualified, dot separated name.
+ * For example, Hashtable or java.util.Hashtable.
+ */
+
+char[][] getArgumentTypeNames();
+/**
+ * Answer the source end position of the method's declaration.
+ */
+
+int getDeclarationSourceEnd();
+/**
+ * Answer the source start position of the method's declaration.
+ */
+
+int getDeclarationSourceStart();
+/**
+ * Answer the unresolved names of the exception types
+ * or null if the array is empty.
+ *
+ * A name is a simple name or a qualified, dot separated name.
+ * For example, Hashtable or java.util.Hashtable.
+ */
+
+char[][] getExceptionTypeNames();
+/**
+ * Answer the source end position of the method's selector.
+ */
+
+int getNameSourceEnd();
+/**
+ * Answer the source start position of the method's selector.
+ */
+
+int getNameSourceStart();
+/**
+ * Answer the unresolved name of the return type
+ * or null if receiver is a constructor or clinit.
+ *
+ * The name is a simple name or a qualified, dot separated name.
+ * For example, Hashtable or java.util.Hashtable.
+ */
+
+char[] getReturnTypeName();
+/**
+ * Answer the names of the receiver's type parameters
+ * or null if the array is empty.
+ */
+char[][] getTypeParameterNames();
+/**
+ * Answer the array of bound names of the receiver's type parameters
+ * or null if the array is empty.
+ */
+char[][][] getTypeParameterBounds();
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/ISourceType.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/ISourceType.js
new file mode 100644
index 0000000..75dbc63
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/ISourceType.js
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.env;
+
+public interface ISourceType extends IGenericType {
+
+/**
+ * Answer the source end position of the type's declaration.
+ */
+int getDeclarationSourceEnd();
+
+/**
+ * Answer the source start position of the type's declaration.
+ */
+int getDeclarationSourceStart();
+
+/**
+ * Answer the enclosing type
+ * or null if the receiver is a top level type.
+ */
+ISourceType getEnclosingType();
+
+/**
+ * Answer the receiver's fields.
+ *
+ * NOTE: Multiple fields with the same name can exist in the result.
+ */
+ISourceField[] getFields();
+
+/**
+ * Answer the receiver's imports.
+ *
+ * An import is a qualified, dot separated name.
+ * For example, java.util.Hashtable or java.lang.*.
+ * A static import used 'static.' as its first fragment, for
+ * example: static.java.util.Hashtable.*
+ */
+ISourceImport[] getImports();
+
+/**
+ * Answer the unresolved names of the receiver's interfaces
+ * or null if the array is empty.
+ *
+ * A name is a simple name or a qualified, dot separated name.
+ * For example, Hashtable or java.util.Hashtable.
+ */
+char[][] getInterfaceNames();
+
+/**
+ * Answer the receiver's member types.
+ */
+ISourceType[] getMemberTypes();
+
+/**
+ * Answer the receiver's methods.
+ *
+ * NOTE: Multiple methods with the same name & parameter types can exist in the result.
+ */
+ISourceMethod[] getMethods();
+
+/**
+ * Answer the simple source name of the receiver.
+ */
+char[] getName();
+
+/**
+ * Answer the source end position of the type's name.
+ */
+int getNameSourceEnd();
+
+/**
+ * Answer the source start position of the type's name.
+ */
+int getNameSourceStart();
+
+/**
+ * Answer the qualified name of the receiver's package separated by periods
+ * or null if its the default package.
+ *
+ * For example, {java.util.Hashtable}.
+ */
+char[] getPackageName();
+
+/**
+ * Answer the unresolved name of the receiver's superclass
+ * or null if it does not have one.
+ *
+ * The name is a simple name or a qualified, dot separated name.
+ * For example, Hashtable or java.util.Hashtable.
+ */
+char[] getSuperclassName();
+/**
+ * Answer the array of bound names of the receiver's type parameters.
+ */
+char[][][] getTypeParameterBounds();
+/**
+ * Answer the names of the receiver's type parameters.
+ */
+char[][] getTypeParameterNames();
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/NameEnvironmentAnswer.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/NameEnvironmentAnswer.js
new file mode 100644
index 0000000..32207b8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/NameEnvironmentAnswer.js
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.env;
+
+public class NameEnvironmentAnswer {
+
+ // only one of the three can be set
+ IBinaryType binaryType;
+ ICompilationUnit compilationUnit;
+ ISourceType[] sourceTypes;
+
+ public NameEnvironmentAnswer(IBinaryType binaryType) {
+ this.binaryType = binaryType;
+ }
+
+ public NameEnvironmentAnswer(ICompilationUnit compilationUnit) {
+ this.compilationUnit = compilationUnit;
+ }
+
+ public NameEnvironmentAnswer(ISourceType[] sourceTypes) {
+ this.sourceTypes = sourceTypes;
+ }
+
+ /**
+ * Answer the resolved binary form for the type or null if the
+ * receiver represents a compilation unit or source type.
+ */
+ public IBinaryType getBinaryType() {
+ return this.binaryType;
+ }
+
+ /**
+ * Answer the compilation unit or null if the
+ * receiver represents a binary or source type.
+ */
+ public ICompilationUnit getCompilationUnit() {
+ return this.compilationUnit;
+ }
+
+ /**
+ * Answer the unresolved source forms for the type or null if the
+ * receiver represents a compilation unit or binary type.
+ *
+ * Multiple source forms can be answered in case the originating compilation unit did contain
+ * several type at once. Then the first type is guaranteed to be the requested type.
+ */
+ public ISourceType[] getSourceTypes() {
+ return this.sourceTypes;
+ }
+
+ /**
+ * Answer whether the receiver contains the resolved binary form of the type.
+ */
+ public boolean isBinaryType() {
+ return this.binaryType != null;
+ }
+
+ /**
+ * Answer whether the receiver contains the compilation unit which defines the type.
+ */
+ public boolean isCompilationUnit() {
+ return this.compilationUnit != null;
+ }
+
+ /**
+ * Answer whether the receiver contains the unresolved source form of the type.
+ */
+ public boolean isSourceType() {
+ return this.sourceTypes != null;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/ConditionalFlowInfo.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/ConditionalFlowInfo.js
new file mode 100644
index 0000000..723e0fb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/ConditionalFlowInfo.js
@@ -0,0 +1,178 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.flow;
+
+import org.eclipse.wst.jsdt.internal.compiler.lookup.FieldBinding;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.LocalVariableBinding;
+
+/**
+ * Record conditional initialization status during definite assignment analysis
+ *
+ */
+public class ConditionalFlowInfo extends FlowInfo {
+
+ public FlowInfo initsWhenTrue;
+ public FlowInfo initsWhenFalse;
+
+ ConditionalFlowInfo(FlowInfo initsWhenTrue, FlowInfo initsWhenFalse){
+
+ this.initsWhenTrue = initsWhenTrue;
+ this.initsWhenFalse = initsWhenFalse;
+ }
+
+ public FlowInfo addInitializationsFrom(FlowInfo otherInits) {
+
+ this.initsWhenTrue.addInitializationsFrom(otherInits);
+ this.initsWhenFalse.addInitializationsFrom(otherInits);
+ return this;
+ }
+
+ public FlowInfo addPotentialInitializationsFrom(FlowInfo otherInits) {
+
+ this.initsWhenTrue.addPotentialInitializationsFrom(otherInits);
+ this.initsWhenFalse.addPotentialInitializationsFrom(otherInits);
+ return this;
+ }
+
+ public FlowInfo asNegatedCondition() {
+
+ FlowInfo extra = initsWhenTrue;
+ initsWhenTrue = initsWhenFalse;
+ initsWhenFalse = extra;
+ return this;
+ }
+
+ public FlowInfo copy() {
+
+ return new ConditionalFlowInfo(initsWhenTrue.copy(), initsWhenFalse.copy());
+ }
+
+ public FlowInfo initsWhenFalse() {
+
+ return initsWhenFalse;
+ }
+
+ public FlowInfo initsWhenTrue() {
+
+ return initsWhenTrue;
+ }
+
+ /**
+ * Check status of definite assignment for a field.
+ */
+ public boolean isDefinitelyAssigned(FieldBinding field) {
+
+ return initsWhenTrue.isDefinitelyAssigned(field)
+ && initsWhenFalse.isDefinitelyAssigned(field);
+ }
+
+ /**
+ * Check status of definite assignment for a local variable.
+ */
+ public boolean isDefinitelyAssigned(LocalVariableBinding local) {
+
+ return initsWhenTrue.isDefinitelyAssigned(local)
+ && initsWhenFalse.isDefinitelyAssigned(local);
+ }
+
+ public int reachMode(){
+ return unconditionalInits().reachMode();
+ }
+
+ public boolean isReachable(){
+
+ return unconditionalInits().isReachable();
+ //should maybe directly be: false
+ }
+
+ /**
+ * Check status of potential assignment for a field.
+ */
+ public boolean isPotentiallyAssigned(FieldBinding field) {
+
+ return initsWhenTrue.isPotentiallyAssigned(field)
+ || initsWhenFalse.isPotentiallyAssigned(field);
+ }
+
+ /**
+ * Check status of potential assignment for a local variable.
+ */
+ public boolean isPotentiallyAssigned(LocalVariableBinding local) {
+
+ return initsWhenTrue.isPotentiallyAssigned(local)
+ || initsWhenFalse.isPotentiallyAssigned(local);
+ }
+
+ /**
+ * Record a field got definitely assigned.
+ */
+ public void markAsDefinitelyAssigned(FieldBinding field) {
+
+ initsWhenTrue.markAsDefinitelyAssigned(field);
+ initsWhenFalse.markAsDefinitelyAssigned(field);
+ }
+
+ /**
+ * Record a field got definitely assigned.
+ */
+ public void markAsDefinitelyAssigned(LocalVariableBinding local) {
+
+ initsWhenTrue.markAsDefinitelyAssigned(local);
+ initsWhenFalse.markAsDefinitelyAssigned(local);
+ }
+
+ /**
+ * Clear the initialization info for a field
+ */
+ public void markAsDefinitelyNotAssigned(FieldBinding field) {
+
+ initsWhenTrue.markAsDefinitelyNotAssigned(field);
+ initsWhenFalse.markAsDefinitelyNotAssigned(field);
+ }
+
+ /**
+ * Clear the initialization info for a local variable
+ */
+ public void markAsDefinitelyNotAssigned(LocalVariableBinding local) {
+
+ initsWhenTrue.markAsDefinitelyNotAssigned(local);
+ initsWhenFalse.markAsDefinitelyNotAssigned(local);
+ }
+
+ public FlowInfo setReachMode(int reachMode) {
+
+ initsWhenTrue.setReachMode(reachMode);
+ initsWhenFalse.setReachMode(reachMode);
+ return this;
+ }
+
+ /**
+ * Converts conditional receiver into inconditional one, updated in the following way: <ul>
+ * <li> intersection of definitely assigned variables,
+ * <li> union of potentially assigned variables.
+ * </ul>
+ */
+ public UnconditionalFlowInfo mergedWith(UnconditionalFlowInfo otherInits) {
+
+ return unconditionalInits().mergedWith(otherInits);
+ }
+
+ public String toString() {
+
+ return "FlowInfo<true: " + initsWhenTrue.toString() + ", false: " + initsWhenFalse.toString() + ">"; //$NON-NLS-1$ //$NON-NLS-3$ //$NON-NLS-2$
+ }
+
+ public UnconditionalFlowInfo unconditionalInits() {
+
+ return initsWhenTrue.unconditionalInits().copy()
+ .mergedWith(initsWhenFalse.unconditionalInits());
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/ExceptionHandlingFlowContext.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/ExceptionHandlingFlowContext.js
new file mode 100644
index 0000000..c981cb8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/ExceptionHandlingFlowContext.js
@@ -0,0 +1,219 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.flow;
+
+import java.util.ArrayList;
+
+import org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode;
+import org.eclipse.wst.jsdt.internal.compiler.ast.TryStatement;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.ObjectCache;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.CompilerModifiers;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.MethodScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.Scope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding;
+
+/**
+ * Reflects the context of code analysis, keeping track of enclosing
+ * try statements, exception handlers, etc...
+ */
+public class ExceptionHandlingFlowContext extends FlowContext {
+
+ public ReferenceBinding[] handledExceptions;
+
+ public final static int BitCacheSize = 32; // 32 bits per int
+ int[] isReached;
+ int[] isNeeded;
+ UnconditionalFlowInfo[] initsOnExceptions;
+ ObjectCache indexes = new ObjectCache();
+ boolean isMethodContext;
+
+ public UnconditionalFlowInfo initsOnReturn;
+
+ // for dealing with anonymous constructor thrown exceptions
+ public ArrayList extendedExceptions;
+
+ public ExceptionHandlingFlowContext(
+ FlowContext parent,
+ ASTNode associatedNode,
+ ReferenceBinding[] handledExceptions,
+ BlockScope scope,
+ UnconditionalFlowInfo flowInfo) {
+
+ super(parent, associatedNode);
+ isMethodContext = scope == scope.methodScope();
+ this.handledExceptions = handledExceptions;
+ int count = handledExceptions.length, cacheSize = (count / BitCacheSize) + 1;
+ this.isReached = new int[cacheSize]; // none is reached by default
+ this.isNeeded = new int[cacheSize]; // none is needed by default
+ this.initsOnExceptions = new UnconditionalFlowInfo[count];
+ for (int i = 0; i < count; i++) {
+ this.indexes.put(handledExceptions[i], i); // key type -> value index
+ boolean isUnchecked =
+ (scope.compareUncheckedException(handledExceptions[i]) != NotRelated);
+ int cacheIndex = i / BitCacheSize, bitMask = 1 << (i % BitCacheSize);
+ if (isUnchecked) {
+ isReached[cacheIndex] |= bitMask;
+ this.initsOnExceptions[i] = flowInfo.copy().unconditionalInits();
+ } else {
+ this.initsOnExceptions[i] = FlowInfo.DEAD_END;
+ }
+ }
+ System.arraycopy(this.isReached, 0, this.isNeeded, 0, cacheSize);
+ this.initsOnReturn = FlowInfo.DEAD_END;
+ }
+
+ public void complainIfUnusedExceptionHandlers(AbstractMethodDeclaration method) {
+ MethodScope scope = method.scope;
+ // can optionally skip overriding methods
+ if ((method.binding.modifiers & (CompilerModifiers.AccOverriding | CompilerModifiers.AccImplementing)) != 0
+ && !scope.environment().options.reportUnusedDeclaredThrownExceptionWhenOverriding) {
+ return;
+ }
+
+ // report errors for unreachable exception handlers
+ for (int i = 0, count = handledExceptions.length; i < count; i++) {
+ int index = indexes.get(handledExceptions[i]);
+ int cacheIndex = index / BitCacheSize;
+ int bitMask = 1 << (index % BitCacheSize);
+ if ((isReached[cacheIndex] & bitMask) == 0) {
+ scope.problemReporter().unusedDeclaredThrownException(
+ handledExceptions[index],
+ method,
+ method.thrownExceptions[index]);
+ }
+ }
+ }
+
+ public void complainIfUnusedExceptionHandlers(
+ BlockScope scope,
+ TryStatement tryStatement) {
+ // report errors for unreachable exception handlers
+ for (int i = 0, count = handledExceptions.length; i < count; i++) {
+ int index = indexes.get(handledExceptions[i]);
+ int cacheIndex = index / BitCacheSize;
+ int bitMask = 1 << (index % BitCacheSize);
+ if ((isReached[cacheIndex] & bitMask) == 0) {
+ scope.problemReporter().unreachableCatchBlock(
+ handledExceptions[index],
+ tryStatement.catchArguments[index].type);
+ } else {
+ if ((isNeeded[cacheIndex] & bitMask) == 0) {
+ scope.problemReporter().hiddenCatchBlock(
+ handledExceptions[index],
+ tryStatement.catchArguments[index].type);
+ }
+ }
+ }
+ }
+
+ public String individualToString() {
+
+ StringBuffer buffer = new StringBuffer("Exception flow context"); //$NON-NLS-1$
+ int length = handledExceptions.length;
+ for (int i = 0; i < length; i++) {
+ int cacheIndex = i / BitCacheSize;
+ int bitMask = 1 << (i % BitCacheSize);
+ buffer.append('[').append(handledExceptions[i].readableName());
+ if ((isReached[cacheIndex] & bitMask) != 0) {
+ if ((isNeeded[cacheIndex] & bitMask) == 0) {
+ buffer.append("-masked"); //$NON-NLS-1$
+ } else {
+ buffer.append("-reached"); //$NON-NLS-1$
+ }
+ } else {
+ buffer.append("-not reached"); //$NON-NLS-1$
+ }
+ buffer.append('-').append(initsOnExceptions[i].toString()).append(']');
+ }
+ buffer.append("[initsOnReturn -").append(initsOnReturn.toString()).append(']'); //$NON-NLS-1$
+ return buffer.toString();
+ }
+
+ public UnconditionalFlowInfo initsOnException(ReferenceBinding exceptionType) {
+
+ int index;
+ if ((index = indexes.get(exceptionType)) < 0) {
+ return FlowInfo.DEAD_END;
+ }
+ return initsOnExceptions[index];
+ }
+
+ public UnconditionalFlowInfo initsOnReturn(){
+ return this.initsOnReturn;
+ }
+
+ public void recordHandlingException(
+ ReferenceBinding exceptionType,
+ UnconditionalFlowInfo flowInfo,
+ TypeBinding raisedException,
+ ASTNode invocationSite,
+ boolean wasAlreadyDefinitelyCaught) {
+
+ int index = indexes.get(exceptionType);
+ // if already flagged as being reached (unchecked exception handler)
+ int cacheIndex = index / BitCacheSize;
+ int bitMask = 1 << (index % BitCacheSize);
+ if (!wasAlreadyDefinitelyCaught) {
+ this.isNeeded[cacheIndex] |= bitMask;
+ }
+ this.isReached[cacheIndex] |= bitMask;
+
+ initsOnExceptions[index] =
+ initsOnExceptions[index] == FlowInfo.DEAD_END
+ ? flowInfo.copy().unconditionalInits()
+ : initsOnExceptions[index].mergedWith(flowInfo.copy().unconditionalInits());
+ }
+
+ public void recordReturnFrom(FlowInfo flowInfo) {
+
+ if (!flowInfo.isReachable()) return;
+ if (initsOnReturn == FlowInfo.DEAD_END) {
+ initsOnReturn = flowInfo.copy().unconditionalInits();
+ } else {
+ initsOnReturn = initsOnReturn.mergedWith(flowInfo.copy().unconditionalInits());
+ }
+ }
+
+ /*
+ * Compute a merged list of unhandled exception types (keeping only the most generic ones).
+ * This is necessary to add synthetic thrown exceptions for anonymous type constructors (JLS 8.6).
+ */
+ public void mergeUnhandledException(TypeBinding newException){
+
+ if (this.extendedExceptions == null){
+ this.extendedExceptions = new ArrayList(5);
+ for (int i = 0; i < this.handledExceptions.length; i++){
+ this.extendedExceptions.add(this.handledExceptions[i]);
+ }
+ }
+
+ boolean isRedundant = false;
+
+ for(int i = this.extendedExceptions.size()-1; i >= 0; i--){
+ switch(Scope.compareTypes(newException, (TypeBinding)this.extendedExceptions.get(i))){
+ case MoreGeneric :
+ this.extendedExceptions.remove(i);
+ break;
+ case EqualOrMoreSpecific :
+ isRedundant = true;
+ break;
+ case NotRelated :
+ break;
+ }
+ }
+ if (!isRedundant){
+ this.extendedExceptions.add(newException);
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/FinallyFlowContext.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/FinallyFlowContext.js
new file mode 100644
index 0000000..75af069
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/FinallyFlowContext.js
@@ -0,0 +1,122 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.flow;
+
+import org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Reference;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.FieldBinding;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.LocalVariableBinding;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.VariableBinding;
+
+/**
+ * Reflects the context of code analysis, keeping track of enclosing
+ * try statements, exception handlers, etc...
+ */
+public class FinallyFlowContext extends FlowContext {
+
+ Reference finalAssignments[];
+ VariableBinding finalVariables[];
+ int assignCount;
+
+ public FinallyFlowContext(FlowContext parent, ASTNode associatedNode) {
+ super(parent, associatedNode);
+ }
+
+ /**
+ * Given some contextual initialization info (derived from a try block or a catch block), this
+ * code will check that the subroutine context does not also initialize a final variable potentially set
+ * redundantly.
+ */
+ public void complainOnRedundantFinalAssignments(
+ FlowInfo flowInfo,
+ BlockScope scope) {
+ for (int i = 0; i < assignCount; i++) {
+ VariableBinding variable = finalVariables[i];
+ if (variable == null) continue;
+
+ boolean complained = false; // remember if have complained on this final assignment
+ if (variable instanceof FieldBinding) {
+ // final field
+ if (flowInfo.isPotentiallyAssigned((FieldBinding)variable)) {
+ complained = true;
+ scope.problemReporter().duplicateInitializationOfBlankFinalField((FieldBinding)variable, finalAssignments[i]);
+ }
+ } else {
+ // final local variable
+ if (flowInfo.isPotentiallyAssigned((LocalVariableBinding) variable)) {
+ complained = true;
+ scope.problemReporter().duplicateInitializationOfFinalLocal(
+ (LocalVariableBinding) variable,
+ finalAssignments[i]);
+ }
+ }
+ // any reference reported at this level is removed from the parent context
+ // where it could also be reported again
+ if (complained) {
+ FlowContext currentContext = parent;
+ while (currentContext != null) {
+ //if (currentContext.isSubRoutine()) {
+ currentContext.removeFinalAssignmentIfAny(finalAssignments[i]);
+ //}
+ currentContext = currentContext.parent;
+ }
+ }
+ }
+ }
+
+ public String individualToString() {
+
+ StringBuffer buffer = new StringBuffer("Finally flow context"); //$NON-NLS-1$
+ buffer.append("[finalAssignments count -").append(assignCount).append(']'); //$NON-NLS-1$
+ return buffer.toString();
+ }
+
+ public boolean isSubRoutine() {
+ return true;
+ }
+
+ boolean recordFinalAssignment(
+ VariableBinding binding,
+ Reference finalAssignment) {
+ if (assignCount == 0) {
+ finalAssignments = new Reference[5];
+ finalVariables = new VariableBinding[5];
+ } else {
+ if (assignCount == finalAssignments.length)
+ System.arraycopy(
+ finalAssignments,
+ 0,
+ (finalAssignments = new Reference[assignCount * 2]),
+ 0,
+ assignCount);
+ System.arraycopy(
+ finalVariables,
+ 0,
+ (finalVariables = new VariableBinding[assignCount * 2]),
+ 0,
+ assignCount);
+ }
+ finalAssignments[assignCount] = finalAssignment;
+ finalVariables[assignCount++] = binding;
+ return true;
+ }
+
+ void removeFinalAssignmentIfAny(Reference reference) {
+ for (int i = 0; i < assignCount; i++) {
+ if (finalAssignments[i] == reference) {
+ finalAssignments[i] = null;
+ finalVariables[i] = null;
+ return;
+ }
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/FlowContext.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/FlowContext.js
new file mode 100644
index 0000000..eb2beff
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/FlowContext.js
@@ -0,0 +1,493 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.flow;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Reference;
+import org.eclipse.wst.jsdt.internal.compiler.ast.SubRoutineStatement;
+import org.eclipse.wst.jsdt.internal.compiler.ast.TryStatement;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.Label;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.Scope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeConstants;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.VariableBinding;
+
+/**
+ * Reflects the context of code analysis, keeping track of enclosing
+ * try statements, exception handlers, etc...
+ */
+public class FlowContext implements TypeConstants {
+
+ public ASTNode associatedNode;
+ public FlowContext parent;
+
+ public final static FlowContext NotContinuableContext = new FlowContext(null, null);
+
+ public FlowContext(FlowContext parent, ASTNode associatedNode) {
+
+ this.parent = parent;
+ this.associatedNode = associatedNode;
+ }
+
+ public Label breakLabel() {
+
+ return null;
+ }
+
+ public void checkExceptionHandlers(
+ TypeBinding[] raisedExceptions,
+ ASTNode location,
+ FlowInfo flowInfo,
+ BlockScope scope) {
+
+ // check that all the argument exception types are handled
+ // JDK Compatible implementation - when an exception type is thrown,
+ // all related catch blocks are marked as reachable... instead of those only
+ // until the point where it is safely handled (Smarter - see comment at the end)
+ int remainingCount; // counting the number of remaining unhandled exceptions
+ int raisedCount; // total number of exceptions raised
+ if ((raisedExceptions == null)
+ || ((raisedCount = raisedExceptions.length) == 0))
+ return;
+ remainingCount = raisedCount;
+
+ // duplicate the array of raised exceptions since it will be updated
+ // (null replaces any handled exception)
+ System.arraycopy(
+ raisedExceptions,
+ 0,
+ (raisedExceptions = new TypeBinding[raisedCount]),
+ 0,
+ raisedCount);
+ FlowContext traversedContext = this;
+
+ while (traversedContext != null) {
+ SubRoutineStatement sub;
+ if (((sub = traversedContext.subRoutine()) != null) && sub.isSubRoutineEscaping()) {
+ // traversing a non-returning subroutine means that all unhandled
+ // exceptions will actually never get sent...
+ return;
+ }
+ // filter exceptions that are locally caught from the innermost enclosing
+ // try statement to the outermost ones.
+ if (traversedContext instanceof ExceptionHandlingFlowContext) {
+ ExceptionHandlingFlowContext exceptionContext =
+ (ExceptionHandlingFlowContext) traversedContext;
+ ReferenceBinding[] caughtExceptions;
+ if ((caughtExceptions = exceptionContext.handledExceptions) != NoExceptions) {
+ int caughtCount = caughtExceptions.length;
+ boolean[] locallyCaught = new boolean[raisedCount]; // at most
+
+ for (int caughtIndex = 0; caughtIndex < caughtCount; caughtIndex++) {
+ ReferenceBinding caughtException = caughtExceptions[caughtIndex];
+ for (int raisedIndex = 0; raisedIndex < raisedCount; raisedIndex++) {
+ TypeBinding raisedException;
+ if ((raisedException = raisedExceptions[raisedIndex]) != null) {
+ int state = caughtException == null
+ ? EqualOrMoreSpecific /* any exception */
+ : Scope.compareTypes(raisedException, caughtException);
+ switch (state) {
+ case EqualOrMoreSpecific :
+ exceptionContext.recordHandlingException(
+ caughtException,
+ flowInfo.unconditionalInits(),
+ raisedException,
+ location,
+ locallyCaught[raisedIndex]);
+ // was already definitely caught ?
+ if (!locallyCaught[raisedIndex]) {
+ locallyCaught[raisedIndex] = true;
+ // remember that this exception has been definitely caught
+ remainingCount--;
+ }
+ break;
+ case MoreGeneric :
+ exceptionContext.recordHandlingException(
+ caughtException,
+ flowInfo.unconditionalInits(),
+ raisedException,
+ location,
+ false);
+ // was not caught already per construction
+ }
+ }
+ }
+ }
+ // remove locally caught exceptions from the remaining ones
+ for (int i = 0; i < raisedCount; i++) {
+ if (locallyCaught[i]) {
+ raisedExceptions[i] = null; // removed from the remaining ones.
+ }
+ }
+ }
+ // method treatment for unchecked exceptions
+ if (exceptionContext.isMethodContext) {
+ for (int i = 0; i < raisedCount; i++) {
+ TypeBinding raisedException;
+ if ((raisedException = raisedExceptions[i]) != null) {
+ if (raisedException.isCompatibleWith(scope.getJavaLangRuntimeException())
+ || raisedException.isCompatibleWith(scope.getJavaLangError())) {
+ remainingCount--;
+ raisedExceptions[i] = null;
+ }
+ }
+ }
+ // anonymous constructors are allowed to throw any exceptions (their thrown exceptions
+ // clause will be fixed up later as per JLS 8.6).
+ if (exceptionContext.associatedNode instanceof AbstractMethodDeclaration){
+ AbstractMethodDeclaration method = (AbstractMethodDeclaration)exceptionContext.associatedNode;
+ if (method.isConstructor() && method.binding.declaringClass.isAnonymousType()){
+
+ for (int i = 0; i < raisedCount; i++) {
+ TypeBinding raisedException;
+ if ((raisedException = raisedExceptions[i]) != null) {
+ exceptionContext.mergeUnhandledException(raisedException);
+ }
+ }
+ return; // no need to complain, will fix up constructor exceptions
+ }
+ }
+ break; // not handled anywhere, thus jump to error handling
+ }
+ }
+ if (remainingCount == 0)
+ return;
+
+ traversedContext.recordReturnFrom(flowInfo.unconditionalInits());
+ if (traversedContext.associatedNode instanceof TryStatement){
+ flowInfo = flowInfo.copy().addInitializationsFrom(((TryStatement) traversedContext.associatedNode).subRoutineInits);
+ }
+ traversedContext = traversedContext.parent;
+ }
+ // if reaches this point, then there are some remaining unhandled exception types.
+ nextReport: for (int i = 0; i < raisedCount; i++) {
+ TypeBinding exception;
+ if ((exception = raisedExceptions[i]) != null) {
+ // only one complaint if same exception declared to be thrown more than once
+ for (int j = 0; j < i; j++) {
+ if (raisedExceptions[j] == exception) continue nextReport; // already reported
+ }
+ scope.problemReporter().unhandledException(exception, location);
+ }
+ }
+ }
+
+ public void checkExceptionHandlers(
+ TypeBinding raisedException,
+ ASTNode location,
+ FlowInfo flowInfo,
+ BlockScope scope) {
+
+ // LIGHT-VERSION OF THE EQUIVALENT WITH AN ARRAY OF EXCEPTIONS
+ // check that all the argument exception types are handled
+ // JDK Compatible implementation - when an exception type is thrown,
+ // all related catch blocks are marked as reachable... instead of those only
+ // until the point where it is safely handled (Smarter - see comment at the end)
+ FlowContext traversedContext = this;
+ while (traversedContext != null) {
+ SubRoutineStatement sub;
+ if (((sub = traversedContext.subRoutine()) != null) && sub.isSubRoutineEscaping()) {
+ // traversing a non-returning subroutine means that all unhandled
+ // exceptions will actually never get sent...
+ return;
+ }
+
+ // filter exceptions that are locally caught from the innermost enclosing
+ // try statement to the outermost ones.
+ if (traversedContext instanceof ExceptionHandlingFlowContext) {
+ ExceptionHandlingFlowContext exceptionContext =
+ (ExceptionHandlingFlowContext) traversedContext;
+ ReferenceBinding[] caughtExceptions;
+ if ((caughtExceptions = exceptionContext.handledExceptions) != NoExceptions) {
+ boolean definitelyCaught = false;
+ for (int caughtIndex = 0, caughtCount = caughtExceptions.length;
+ caughtIndex < caughtCount;
+ caughtIndex++) {
+ ReferenceBinding caughtException = caughtExceptions[caughtIndex];
+ int state = caughtException == null
+ ? EqualOrMoreSpecific /* any exception */
+ : Scope.compareTypes(raisedException, caughtException);
+ switch (state) {
+ case EqualOrMoreSpecific :
+ exceptionContext.recordHandlingException(
+ caughtException,
+ flowInfo.unconditionalInits(),
+ raisedException,
+ location,
+ definitelyCaught);
+ // was it already definitely caught ?
+ definitelyCaught = true;
+ break;
+ case MoreGeneric :
+ exceptionContext.recordHandlingException(
+ caughtException,
+ flowInfo.unconditionalInits(),
+ raisedException,
+ location,
+ false);
+ // was not caught already per construction
+ }
+ }
+ if (definitelyCaught)
+ return;
+ }
+ // method treatment for unchecked exceptions
+ if (exceptionContext.isMethodContext) {
+ if (raisedException.isCompatibleWith(scope.getJavaLangRuntimeException())
+ || raisedException.isCompatibleWith(scope.getJavaLangError()))
+ return;
+
+ // anonymous constructors are allowed to throw any exceptions (their thrown exceptions
+ // clause will be fixed up later as per JLS 8.6).
+ if (exceptionContext.associatedNode instanceof AbstractMethodDeclaration){
+ AbstractMethodDeclaration method = (AbstractMethodDeclaration)exceptionContext.associatedNode;
+ if (method.isConstructor() && method.binding.declaringClass.isAnonymousType()){
+
+ exceptionContext.mergeUnhandledException(raisedException);
+ return; // no need to complain, will fix up constructor exceptions
+ }
+ }
+ break; // not handled anywhere, thus jump to error handling
+ }
+ }
+
+ traversedContext.recordReturnFrom(flowInfo.unconditionalInits());
+ if (traversedContext.associatedNode instanceof TryStatement){
+ flowInfo = flowInfo.copy().addInitializationsFrom(((TryStatement) traversedContext.associatedNode).subRoutineInits);
+ }
+ traversedContext = traversedContext.parent;
+ }
+ // if reaches this point, then there are some remaining unhandled exception types.
+ scope.problemReporter().unhandledException(raisedException, location);
+ }
+
+ public Label continueLabel() {
+
+ return null;
+ }
+
+ /*
+ * lookup through break labels
+ */
+ public FlowContext getTargetContextForBreakLabel(char[] labelName) {
+
+ FlowContext current = this, lastNonReturningSubRoutine = null;
+ while (current != null) {
+ if (current.isNonReturningContext()) {
+ lastNonReturningSubRoutine = current;
+ }
+ char[] currentLabelName;
+ if (((currentLabelName = current.labelName()) != null)
+ && CharOperation.equals(currentLabelName, labelName)) {
+ if (lastNonReturningSubRoutine == null)
+ return current;
+ return lastNonReturningSubRoutine;
+ }
+ current = current.parent;
+ }
+ // not found
+ return null;
+ }
+
+ /*
+ * lookup through continue labels
+ */
+ public FlowContext getTargetContextForContinueLabel(char[] labelName) {
+
+ FlowContext current = this;
+ FlowContext lastContinuable = null;
+ FlowContext lastNonReturningSubRoutine = null;
+
+ while (current != null) {
+ if (current.isNonReturningContext()) {
+ lastNonReturningSubRoutine = current;
+ } else {
+ if (current.isContinuable()) {
+ lastContinuable = current;
+ }
+ }
+
+ char[] currentLabelName;
+ if ((currentLabelName = current.labelName()) != null && CharOperation.equals(currentLabelName, labelName)) {
+
+ // matching label found
+ if ((lastContinuable != null)
+ && (current.associatedNode.concreteStatement() == lastContinuable.associatedNode)) {
+
+ if (lastNonReturningSubRoutine == null) return lastContinuable;
+ return lastNonReturningSubRoutine;
+ }
+ // label is found, but not a continuable location
+ return NotContinuableContext;
+ }
+ current = current.parent;
+ }
+ // not found
+ return null;
+ }
+
+ /*
+ * lookup a default break through breakable locations
+ */
+ public FlowContext getTargetContextForDefaultBreak() {
+
+ FlowContext current = this, lastNonReturningSubRoutine = null;
+ while (current != null) {
+ if (current.isNonReturningContext()) {
+ lastNonReturningSubRoutine = current;
+ }
+ if (current.isBreakable() && current.labelName() == null) {
+ if (lastNonReturningSubRoutine == null) return current;
+ return lastNonReturningSubRoutine;
+ }
+ current = current.parent;
+ }
+ // not found
+ return null;
+ }
+
+ /*
+ * lookup a default continue amongst continuable locations
+ */
+ public FlowContext getTargetContextForDefaultContinue() {
+
+ FlowContext current = this, lastNonReturningSubRoutine = null;
+ while (current != null) {
+ if (current.isNonReturningContext()) {
+ lastNonReturningSubRoutine = current;
+ }
+ if (current.isContinuable()) {
+ if (lastNonReturningSubRoutine == null)
+ return current;
+ return lastNonReturningSubRoutine;
+ }
+ current = current.parent;
+ }
+ // not found
+ return null;
+ }
+
+ public String individualToString() {
+
+ return "Flow context"; //$NON-NLS-1$
+ }
+
+ public FlowInfo initsOnBreak() {
+
+ return FlowInfo.DEAD_END;
+ }
+
+ public UnconditionalFlowInfo initsOnReturn() {
+
+ return FlowInfo.DEAD_END;
+ }
+
+ public boolean isBreakable() {
+
+ return false;
+ }
+
+ public boolean isContinuable() {
+
+ return false;
+ }
+
+ public boolean isNonReturningContext() {
+
+ return false;
+ }
+
+ public boolean isSubRoutine() {
+
+ return false;
+ }
+
+ public char[] labelName() {
+
+ return null;
+ }
+
+ public void recordBreakFrom(FlowInfo flowInfo) {
+ // default implementation: do nothing
+ }
+
+ public void recordContinueFrom(FlowInfo flowInfo) {
+ // default implementation: do nothing
+ }
+
+ boolean recordFinalAssignment(
+ VariableBinding variable,
+ Reference finalReference) {
+
+ return true; // keep going
+ }
+
+ public void recordReturnFrom(FlowInfo flowInfo) {
+ // default implementation: do nothing
+ }
+
+ public void recordSettingFinal(
+ VariableBinding variable,
+ Reference finalReference,
+ FlowInfo flowInfo) {
+
+ if (!flowInfo.isReachable()) return;
+
+ // for initialization inside looping statement that effectively loops
+ FlowContext context = this;
+ while (context != null) {
+ if (!context.recordFinalAssignment(variable, finalReference)) {
+ break; // no need to keep going
+ }
+ context = context.parent;
+ }
+ }
+
+ void removeFinalAssignmentIfAny(Reference reference) {
+ // default implementation: do nothing
+ }
+
+ public SubRoutineStatement subRoutine() {
+
+ return null;
+ }
+
+ public String toString() {
+
+ StringBuffer buffer = new StringBuffer();
+ FlowContext current = this;
+ int parentsCount = 0;
+ while ((current = current.parent) != null) {
+ parentsCount++;
+ }
+ FlowContext[] parents = new FlowContext[parentsCount + 1];
+ current = this;
+ int index = parentsCount;
+ while (index >= 0) {
+ parents[index--] = current;
+ current = current.parent;
+ }
+ for (int i = 0; i < parentsCount; i++) {
+ for (int j = 0; j < i; j++)
+ buffer.append('\t');
+ buffer.append(parents[i].individualToString()).append('\n');
+ }
+ buffer.append('*');
+ for (int j = 0; j < parentsCount + 1; j++)
+ buffer.append('\t');
+ buffer.append(individualToString()).append('\n');
+ return buffer.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/FlowInfo.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/FlowInfo.js
new file mode 100644
index 0000000..8de5e93
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/FlowInfo.js
@@ -0,0 +1,144 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.flow;
+
+import org.eclipse.wst.jsdt.internal.compiler.lookup.FieldBinding;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.LocalVariableBinding;
+
+public abstract class FlowInfo {
+
+ public final static int REACHABLE = 0;
+ public final static int UNREACHABLE = 1;
+
+ public static final UnconditionalFlowInfo DEAD_END; // Represents a dead branch status of initialization
+ static {
+ DEAD_END = new UnconditionalFlowInfo();
+ DEAD_END.reachMode = UNREACHABLE;
+ }
+ abstract public FlowInfo addInitializationsFrom(FlowInfo otherInits);
+
+ abstract public FlowInfo addPotentialInitializationsFrom(FlowInfo otherInits);
+
+ public FlowInfo asNegatedCondition() {
+
+ return this;
+ }
+
+ public static FlowInfo conditional(FlowInfo initsWhenTrue, FlowInfo initsWhenFalse){
+
+ // if (initsWhenTrue.equals(initsWhenFalse)) return initsWhenTrue; -- could optimize if #equals is defined
+ return new ConditionalFlowInfo(initsWhenTrue, initsWhenFalse);
+ }
+
+ abstract public FlowInfo copy();
+
+ public static UnconditionalFlowInfo initial(int maxFieldCount) {
+ UnconditionalFlowInfo info = new UnconditionalFlowInfo();
+ info.maxFieldCount = maxFieldCount;
+ return info;
+ }
+
+ abstract public FlowInfo initsWhenFalse();
+
+ abstract public FlowInfo initsWhenTrue();
+
+ /**
+ * Check status of definite assignment for a field.
+ */
+ abstract public boolean isDefinitelyAssigned(FieldBinding field);
+
+ /**
+ * Check status of definite assignment for a local.
+ */
+ public abstract boolean isDefinitelyAssigned(LocalVariableBinding local);
+
+ //abstract public int reachMode();
+
+ /**
+ * Check status of potential assignment for a field.
+ */
+ abstract public boolean isPotentiallyAssigned(FieldBinding field);
+
+ /**
+ * Check status of potential assignment for a local variable.
+ */
+
+ abstract public boolean isPotentiallyAssigned(LocalVariableBinding field);
+
+ abstract public boolean isReachable();
+
+ /**
+ * Record a field got definitely assigned.
+ */
+ abstract public void markAsDefinitelyAssigned(FieldBinding field);
+
+ /**
+ * Record a local got definitely assigned.
+ */
+ abstract public void markAsDefinitelyAssigned(LocalVariableBinding local);
+
+ /**
+ * Clear the initialization info for a field
+ */
+ abstract public void markAsDefinitelyNotAssigned(FieldBinding field);
+
+ /**
+ * Clear the initialization info for a local variable
+ */
+ abstract public void markAsDefinitelyNotAssigned(LocalVariableBinding local);
+
+ /**
+ * Merge branches using optimized boolean conditions
+ */
+ public static FlowInfo mergedOptimizedBranches(FlowInfo initsWhenTrue, boolean isOptimizedTrue, FlowInfo initsWhenFalse, boolean isOptimizedFalse, boolean allowFakeDeadBranch) {
+ FlowInfo mergedInfo;
+ if (isOptimizedTrue){
+ if (initsWhenTrue == FlowInfo.DEAD_END && allowFakeDeadBranch) {
+ mergedInfo = initsWhenFalse.setReachMode(FlowInfo.UNREACHABLE);
+ } else {
+ mergedInfo = initsWhenTrue.addPotentialInitializationsFrom(initsWhenFalse);
+ }
+
+ } else if (isOptimizedFalse) {
+ if (initsWhenFalse == FlowInfo.DEAD_END && allowFakeDeadBranch) {
+ mergedInfo = initsWhenTrue.setReachMode(FlowInfo.UNREACHABLE);
+ } else {
+ mergedInfo = initsWhenFalse.addPotentialInitializationsFrom(initsWhenTrue);
+ }
+
+ } else {
+ mergedInfo = initsWhenTrue.unconditionalInits().mergedWith(initsWhenFalse.unconditionalInits());
+ }
+ return mergedInfo;
+ }
+
+ abstract public int reachMode();
+
+ abstract public FlowInfo setReachMode(int reachMode);
+
+ /**
+ * Returns the receiver updated in the following way: <ul>
+ * <li> intersection of definitely assigned variables,
+ * <li> union of potentially assigned variables.
+ * </ul>
+ */
+ abstract public UnconditionalFlowInfo mergedWith(UnconditionalFlowInfo otherInits);
+
+ public String toString(){
+
+ if (this == DEAD_END){
+ return "FlowInfo.DEAD_END"; //$NON-NLS-1$
+ }
+ return super.toString();
+ }
+
+ abstract public UnconditionalFlowInfo unconditionalInits();
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/InitializationFlowContext.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/InitializationFlowContext.js
new file mode 100644
index 0000000..82f01b5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/InitializationFlowContext.js
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.flow;
+
+import org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding;
+
+/**
+ * Reflects the context of code analysis, keeping track of enclosing
+ * try statements, exception handlers, etc...
+ */
+public class InitializationFlowContext extends ExceptionHandlingFlowContext {
+
+ public int exceptionCount;
+ public TypeBinding[] thrownExceptions = new TypeBinding[5];
+ public ASTNode[] exceptionThrowers = new ASTNode[5];
+ public FlowInfo[] exceptionThrowerFlowInfos = new FlowInfo[5];
+
+ public InitializationFlowContext(
+ FlowContext parent,
+ ASTNode associatedNode,
+ BlockScope scope) {
+ super(
+ parent,
+ associatedNode,
+ NoExceptions, // no exception allowed by default
+ scope,
+ FlowInfo.DEAD_END);
+ }
+
+ public void checkInitializerExceptions(
+ BlockScope currentScope,
+ FlowContext initializerContext,
+ FlowInfo flowInfo) {
+ for (int i = 0; i < exceptionCount; i++) {
+ initializerContext.checkExceptionHandlers(
+ thrownExceptions[i],
+ exceptionThrowers[i],
+ exceptionThrowerFlowInfos[i],
+ currentScope);
+ }
+ }
+
+ public String individualToString() {
+
+ StringBuffer buffer = new StringBuffer("Initialization flow context"); //$NON-NLS-1$
+ for (int i = 0; i < exceptionCount; i++) {
+ buffer.append('[').append(thrownExceptions[i].readableName());
+ buffer.append('-').append(exceptionThrowerFlowInfos[i].toString()).append(']');
+ }
+ return buffer.toString();
+ }
+
+ public void recordHandlingException(
+ ReferenceBinding exceptionType,
+ UnconditionalFlowInfo flowInfo,
+ TypeBinding raisedException,
+ ASTNode invocationSite,
+ boolean wasMasked) {
+
+ // even if unreachable code, need to perform unhandled exception diagnosis
+ int size = thrownExceptions.length;
+ if (exceptionCount == size) {
+ System.arraycopy(
+ thrownExceptions,
+ 0,
+ (thrownExceptions = new TypeBinding[size * 2]),
+ 0,
+ size);
+ System.arraycopy(
+ exceptionThrowers,
+ 0,
+ (exceptionThrowers = new ASTNode[size * 2]),
+ 0,
+ size);
+ System.arraycopy(
+ exceptionThrowerFlowInfos,
+ 0,
+ (exceptionThrowerFlowInfos = new FlowInfo[size * 2]),
+ 0,
+ size);
+ }
+ thrownExceptions[exceptionCount] = raisedException;
+ exceptionThrowers[exceptionCount] = invocationSite;
+ exceptionThrowerFlowInfos[exceptionCount++] = flowInfo.copy();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/InsideSubRoutineFlowContext.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/InsideSubRoutineFlowContext.js
new file mode 100644
index 0000000..7cc7f68
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/InsideSubRoutineFlowContext.js
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.flow;
+
+import org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode;
+import org.eclipse.wst.jsdt.internal.compiler.ast.SubRoutineStatement;
+
+/**
+ * Reflects the context of code analysis, keeping track of enclosing
+ * try statements, exception handlers, etc...
+ */
+public class InsideSubRoutineFlowContext extends FlowContext {
+
+ public UnconditionalFlowInfo initsOnReturn;
+
+ public InsideSubRoutineFlowContext(
+ FlowContext parent,
+ ASTNode associatedNode) {
+ super(parent, associatedNode);
+ this.initsOnReturn = FlowInfo.DEAD_END;
+ }
+
+ public String individualToString() {
+
+ StringBuffer buffer = new StringBuffer("Inside SubRoutine flow context"); //$NON-NLS-1$
+ buffer.append("[initsOnReturn -").append(initsOnReturn.toString()).append(']'); //$NON-NLS-1$
+ return buffer.toString();
+ }
+
+ public UnconditionalFlowInfo initsOnReturn(){
+ return this.initsOnReturn;
+ }
+
+ public boolean isNonReturningContext() {
+ return subRoutine().isSubRoutineEscaping();
+ }
+
+ public SubRoutineStatement subRoutine() {
+ return (SubRoutineStatement)associatedNode;
+ }
+
+ public void recordReturnFrom(FlowInfo flowInfo) {
+
+ if (!flowInfo.isReachable()) return;
+ if (initsOnReturn == FlowInfo.DEAD_END) {
+ initsOnReturn = flowInfo.copy().unconditionalInits();
+ } else {
+ initsOnReturn = initsOnReturn.mergedWith(flowInfo.copy().unconditionalInits());
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/LabelFlowContext.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/LabelFlowContext.js
new file mode 100644
index 0000000..82e7b37
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/LabelFlowContext.js
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.flow;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.Label;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+
+/**
+ * Reflects the context of code analysis, keeping track of enclosing
+ * try statements, exception handlers, etc...
+ */
+public class LabelFlowContext extends SwitchFlowContext {
+
+ public char[] labelName;
+
+ public LabelFlowContext(
+ FlowContext parent,
+ ASTNode associatedNode,
+ char[] labelName,
+ Label breakLabel,
+ BlockScope scope) {
+
+ super(parent, associatedNode, breakLabel);
+ this.labelName = labelName;
+ checkLabelValidity(scope);
+ }
+
+ void checkLabelValidity(BlockScope scope) {
+
+ // check if label was already defined above
+ FlowContext current = parent;
+ while (current != null) {
+ char[] currentLabelName;
+ if (((currentLabelName = current.labelName()) != null)
+ && CharOperation.equals(currentLabelName, labelName)) {
+ scope.problemReporter().alreadyDefinedLabel(labelName, associatedNode);
+ }
+ current = current.parent;
+ }
+ }
+
+ public String individualToString() {
+
+ return "Label flow context [label:" + String.valueOf(labelName) + "]"; //$NON-NLS-2$ //$NON-NLS-1$
+ }
+
+ public char[] labelName() {
+
+ return labelName;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/LoopingFlowContext.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/LoopingFlowContext.js
new file mode 100644
index 0000000..4da9fdd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/LoopingFlowContext.js
@@ -0,0 +1,153 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.flow;
+
+import org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Reference;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.Label;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.FieldBinding;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.LocalVariableBinding;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.Scope;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.VariableBinding;
+
+/**
+ * Reflects the context of code analysis, keeping track of enclosing
+ * try statements, exception handlers, etc...
+ */
+public class LoopingFlowContext extends SwitchFlowContext {
+
+ public Label continueLabel;
+ public UnconditionalFlowInfo initsOnContinue = FlowInfo.DEAD_END;
+ Reference finalAssignments[];
+ VariableBinding finalVariables[];
+ int assignCount = 0;
+ Scope associatedScope;
+
+ public LoopingFlowContext(
+ FlowContext parent,
+ ASTNode associatedNode,
+ Label breakLabel,
+ Label continueLabel,
+ Scope associatedScope) {
+ super(parent, associatedNode, breakLabel);
+ this.continueLabel = continueLabel;
+ this.associatedScope = associatedScope;
+ }
+
+ public void complainOnFinalAssignmentsInLoop(
+ BlockScope scope,
+ FlowInfo flowInfo) {
+ for (int i = 0; i < assignCount; i++) {
+ VariableBinding variable = finalVariables[i];
+ if (variable == null) continue;
+ boolean complained = false; // remember if have complained on this final assignment
+ if (variable instanceof FieldBinding) {
+ if (flowInfo.isPotentiallyAssigned((FieldBinding) variable)) {
+ complained = true;
+ scope.problemReporter().duplicateInitializationOfBlankFinalField(
+ (FieldBinding) variable,
+ finalAssignments[i]);
+ }
+ } else {
+ if (flowInfo.isPotentiallyAssigned((LocalVariableBinding) variable)) {
+ complained = true;
+ scope.problemReporter().duplicateInitializationOfFinalLocal(
+ (LocalVariableBinding) variable,
+ finalAssignments[i]);
+ }
+ }
+ // any reference reported at this level is removed from the parent context where it
+ // could also be reported again
+ if (complained) {
+ FlowContext context = parent;
+ while (context != null) {
+ context.removeFinalAssignmentIfAny(finalAssignments[i]);
+ context = context.parent;
+ }
+ }
+ }
+ }
+
+ public Label continueLabel() {
+ return continueLabel;
+ }
+
+ public String individualToString() {
+ StringBuffer buffer = new StringBuffer("Looping flow context"); //$NON-NLS-1$
+ buffer.append("[initsOnBreak -").append(initsOnBreak.toString()).append(']'); //$NON-NLS-1$
+ buffer.append("[initsOnContinue -").append(initsOnContinue.toString()).append(']'); //$NON-NLS-1$
+ return buffer.toString();
+ }
+
+ public boolean isContinuable() {
+ return true;
+ }
+
+ public boolean isContinuedTo() {
+ return initsOnContinue != FlowInfo.DEAD_END;
+ }
+
+ public void recordContinueFrom(FlowInfo flowInfo) {
+
+ if (!flowInfo.isReachable()) return;
+ if (initsOnContinue == FlowInfo.DEAD_END) {
+ initsOnContinue = flowInfo.copy().unconditionalInits();
+ } else {
+ initsOnContinue = initsOnContinue.mergedWith(flowInfo.copy().unconditionalInits());
+ }
+ }
+
+ boolean recordFinalAssignment(
+ VariableBinding binding,
+ Reference finalAssignment) {
+
+ // do not consider variables which are defined inside this loop
+ if (binding instanceof LocalVariableBinding) {
+ Scope scope = ((LocalVariableBinding) binding).declaringScope;
+ while ((scope = scope.parent) != null) {
+ if (scope == associatedScope)
+ return false;
+ }
+ }
+ if (assignCount == 0) {
+ finalAssignments = new Reference[5];
+ finalVariables = new VariableBinding[5];
+ } else {
+ if (assignCount == finalAssignments.length)
+ System.arraycopy(
+ finalAssignments,
+ 0,
+ (finalAssignments = new Reference[assignCount * 2]),
+ 0,
+ assignCount);
+ System.arraycopy(
+ finalVariables,
+ 0,
+ (finalVariables = new VariableBinding[assignCount * 2]),
+ 0,
+ assignCount);
+ }
+ finalAssignments[assignCount] = finalAssignment;
+ finalVariables[assignCount++] = binding;
+ return true;
+ }
+
+ void removeFinalAssignmentIfAny(Reference reference) {
+ for (int i = 0; i < assignCount; i++) {
+ if (finalAssignments[i] == reference) {
+ finalAssignments[i] = null;
+ finalVariables[i] = null;
+ return;
+ }
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/SwitchFlowContext.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/SwitchFlowContext.js
new file mode 100644
index 0000000..d491732
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/SwitchFlowContext.js
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.flow;
+
+import org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.Label;
+
+/**
+ * Reflects the context of code analysis, keeping track of enclosing
+ * try statements, exception handlers, etc...
+ */
+public class SwitchFlowContext extends FlowContext {
+ public Label breakLabel;
+ public UnconditionalFlowInfo initsOnBreak = FlowInfo.DEAD_END;
+
+ public SwitchFlowContext(
+ FlowContext parent,
+ ASTNode associatedNode,
+ Label breakLabel) {
+ super(parent, associatedNode);
+ this.breakLabel = breakLabel;
+ }
+
+ public Label breakLabel() {
+ return breakLabel;
+ }
+
+ public String individualToString() {
+ StringBuffer buffer = new StringBuffer("Switch flow context"); //$NON-NLS-1$
+ buffer.append("[initsOnBreak -").append(initsOnBreak.toString()).append(']'); //$NON-NLS-1$
+ return buffer.toString();
+ }
+
+ public boolean isBreakable() {
+ return true;
+ }
+
+ public void recordBreakFrom(FlowInfo flowInfo) {
+
+ if (initsOnBreak == FlowInfo.DEAD_END) {
+ initsOnBreak = flowInfo.copy().unconditionalInits();
+ } else {
+ initsOnBreak = initsOnBreak.mergedWith(flowInfo.copy().unconditionalInits());
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/UnconditionalFlowInfo.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/UnconditionalFlowInfo.js
new file mode 100644
index 0000000..e2731d7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/UnconditionalFlowInfo.js
@@ -0,0 +1,558 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.flow;
+
+import org.eclipse.wst.jsdt.internal.compiler.lookup.FieldBinding;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.LocalVariableBinding;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding;
+
+/**
+ * Record initialization status during definite assignment analysis
+ *
+ * No caching of pre-allocated instances.
+ */
+public class UnconditionalFlowInfo extends FlowInfo {
+
+
+ public long definiteInits;
+ public long potentialInits;
+ public long extraDefiniteInits[];
+ public long extraPotentialInits[];
+
+ public int reachMode; // by default
+
+ public int maxFieldCount;
+
+ // Constants
+ public static final int BitCacheSize = 64; // 64 bits in a long.
+
+ UnconditionalFlowInfo() {
+ this.reachMode = REACHABLE;
+ }
+
+ // unions of both sets of initialization - used for try/finally
+ public FlowInfo addInitializationsFrom(FlowInfo inits) {
+
+ if (this == DEAD_END)
+ return this;
+
+ UnconditionalFlowInfo otherInits = inits.unconditionalInits();
+ if (otherInits == DEAD_END)
+ return this;
+
+ // union of definitely assigned variables,
+ definiteInits |= otherInits.definiteInits;
+ // union of potentially set ones
+ potentialInits |= otherInits.potentialInits;
+
+ // treating extra storage
+ if (extraDefiniteInits != null) {
+ if (otherInits.extraDefiniteInits != null) {
+ // both sides have extra storage
+ int i = 0, length, otherLength;
+ if ((length = extraDefiniteInits.length) < (otherLength = otherInits.extraDefiniteInits.length)) {
+ // current storage is shorter -> grow current (could maybe reuse otherInits extra storage?)
+ System.arraycopy(extraDefiniteInits, 0, (extraDefiniteInits = new long[otherLength]), 0, length);
+ System.arraycopy(extraPotentialInits, 0, (extraPotentialInits = new long[otherLength]), 0, length);
+ while (i < length) {
+ extraDefiniteInits[i] |= otherInits.extraDefiniteInits[i];
+ extraPotentialInits[i] |= otherInits.extraPotentialInits[i++];
+ }
+ while (i < otherLength) {
+ extraPotentialInits[i] = otherInits.extraPotentialInits[i++];
+ }
+ } else {
+ // current storage is longer
+ while (i < otherLength) {
+ extraDefiniteInits[i] |= otherInits.extraDefiniteInits[i];
+ extraPotentialInits[i] |= otherInits.extraPotentialInits[i++];
+ }
+ while (i < length)
+ extraDefiniteInits[i++] = 0;
+ }
+ } else {
+ // no extra storage on otherInits
+ }
+ } else
+ if (otherInits.extraDefiniteInits != null) {
+ // no storage here, but other has extra storage.
+ int otherLength;
+ System.arraycopy(otherInits.extraDefiniteInits, 0, (extraDefiniteInits = new long[otherLength = otherInits.extraDefiniteInits.length]), 0, otherLength);
+ System.arraycopy(otherInits.extraPotentialInits, 0, (extraPotentialInits = new long[otherLength]), 0, otherLength);
+ }
+ return this;
+ }
+
+ // unions of both sets of initialization - used for try/finally
+ public FlowInfo addPotentialInitializationsFrom(FlowInfo inits) {
+
+ if (this == DEAD_END){
+ return this;
+ }
+
+ UnconditionalFlowInfo otherInits = inits.unconditionalInits();
+ if (otherInits == DEAD_END){
+ return this;
+ }
+ // union of potentially set ones
+ potentialInits |= otherInits.potentialInits;
+
+ // treating extra storage
+ if (extraDefiniteInits != null) {
+ if (otherInits.extraDefiniteInits != null) {
+ // both sides have extra storage
+ int i = 0, length, otherLength;
+ if ((length = extraDefiniteInits.length) < (otherLength = otherInits.extraDefiniteInits.length)) {
+ // current storage is shorter -> grow current (could maybe reuse otherInits extra storage?)
+ System.arraycopy(extraDefiniteInits, 0, (extraDefiniteInits = new long[otherLength]), 0, length);
+ System.arraycopy(extraPotentialInits, 0, (extraPotentialInits = new long[otherLength]), 0, length);
+ while (i < length) {
+ extraPotentialInits[i] |= otherInits.extraPotentialInits[i++];
+ }
+ while (i < otherLength) {
+ extraPotentialInits[i] = otherInits.extraPotentialInits[i++];
+ }
+ } else {
+ // current storage is longer
+ while (i < otherLength) {
+ extraPotentialInits[i] |= otherInits.extraPotentialInits[i++];
+ }
+ }
+ }
+ } else
+ if (otherInits.extraDefiniteInits != null) {
+ // no storage here, but other has extra storage.
+ int otherLength;
+ extraDefiniteInits = new long[otherLength = otherInits.extraDefiniteInits.length];
+ System.arraycopy(otherInits.extraPotentialInits, 0, (extraPotentialInits = new long[otherLength]), 0, otherLength);
+ }
+ return this;
+ }
+
+ /**
+ * Answers a copy of the current instance
+ */
+ public FlowInfo copy() {
+
+ // do not clone the DeadEnd
+ if (this == DEAD_END)
+ return this;
+
+ // look for an unused preallocated object
+ UnconditionalFlowInfo copy = new UnconditionalFlowInfo();
+
+ // copy slots
+ copy.definiteInits = this.definiteInits;
+ copy.potentialInits = this.potentialInits;
+ copy.reachMode = this.reachMode;
+ copy.maxFieldCount = this.maxFieldCount;
+
+ if (this.extraDefiniteInits != null) {
+ int length;
+ System.arraycopy(this.extraDefiniteInits, 0, (copy.extraDefiniteInits = new long[ (length = extraDefiniteInits.length)]), 0, length);
+ System.arraycopy(this.extraPotentialInits, 0, (copy.extraPotentialInits = new long[length]), 0, length);
+ }
+ return copy;
+ }
+
+ public UnconditionalFlowInfo discardFieldInitializations(){
+
+ int limit = this.maxFieldCount;
+
+ if (limit < BitCacheSize) {
+ long mask = (1L << limit)-1;
+ this.definiteInits &= ~mask;
+ this.potentialInits &= ~mask;
+ return this;
+ }
+
+ this.definiteInits = 0;
+ this.potentialInits = 0;
+
+ // use extra vector
+ if (extraDefiniteInits == null) {
+ return this; // if vector not yet allocated, then not initialized
+ }
+ int vectorIndex, length = this.extraDefiniteInits.length;
+ if ((vectorIndex = (limit / BitCacheSize) - 1) >= length) {
+ return this; // not enough room yet
+ }
+ for (int i = 0; i < vectorIndex; i++) {
+ this.extraDefiniteInits[i] = 0L;
+ this.extraPotentialInits[i] = 0L;
+ }
+ long mask = (1L << (limit % BitCacheSize))-1;
+ this.extraDefiniteInits[vectorIndex] &= ~mask;
+ this.extraPotentialInits[vectorIndex] &= ~mask;
+ return this;
+ }
+
+ public UnconditionalFlowInfo discardNonFieldInitializations(){
+
+ int limit = this.maxFieldCount;
+
+ if (limit < BitCacheSize) {
+ long mask = (1L << limit)-1;
+ this.definiteInits &= mask;
+ this.potentialInits &= mask;
+ return this;
+ }
+ // use extra vector
+ if (extraDefiniteInits == null) {
+ return this; // if vector not yet allocated, then not initialized
+ }
+ int vectorIndex, length = this.extraDefiniteInits.length;
+ if ((vectorIndex = (limit / BitCacheSize) - 1) >= length) {
+ return this; // not enough room yet
+ }
+ long mask = (1L << (limit % BitCacheSize))-1;
+ this.extraDefiniteInits[vectorIndex] &= mask;
+ this.extraPotentialInits[vectorIndex] &= mask;
+ for (int i = vectorIndex+1; i < length; i++) {
+ this.extraDefiniteInits[i] = 0L;
+ this.extraPotentialInits[i] = 0L;
+ }
+ return this;
+ }
+
+ public FlowInfo initsWhenFalse() {
+
+ return this;
+ }
+
+ public FlowInfo initsWhenTrue() {
+
+ return this;
+ }
+
+ /**
+ * Check status of definite assignment at a given position.
+ * It deals with the dual representation of the InitializationInfo2:
+ * bits for the first 64 entries, then an array of booleans.
+ */
+ final private boolean isDefinitelyAssigned(int position) {
+
+ // Dependant of CodeStream.isDefinitelyAssigned(..)
+ // id is zero-based
+ if (position < BitCacheSize) {
+ return (definiteInits & (1L << position)) != 0; // use bits
+ }
+ // use extra vector
+ if (extraDefiniteInits == null)
+ return false; // if vector not yet allocated, then not initialized
+ int vectorIndex;
+ if ((vectorIndex = (position / BitCacheSize) - 1) >= extraDefiniteInits.length)
+ return false; // if not enough room in vector, then not initialized
+ return ((extraDefiniteInits[vectorIndex]) & (1L << (position % BitCacheSize))) != 0;
+ }
+
+ /**
+ * Check status of definite assignment for a field.
+ */
+ final public boolean isDefinitelyAssigned(FieldBinding field) {
+
+ // Dependant of CodeStream.isDefinitelyAssigned(..)
+ // We do not want to complain in unreachable code
+ if ((this.reachMode & UNREACHABLE) != 0)
+ return true;
+ return isDefinitelyAssigned(field.id);
+ }
+
+ /**
+ * Check status of definite assignment for a local.
+ */
+ final public boolean isDefinitelyAssigned(LocalVariableBinding local) {
+
+ // Dependant of CodeStream.isDefinitelyAssigned(..)
+ // We do not want to complain in unreachable code
+ if ((this.reachMode & UNREACHABLE) != 0)
+ return true;
+ if (local.isArgument) {
+ return true;
+ }
+ // final constants are inlined, and thus considered as always initialized
+ if (local.isConstantValue()) {
+ return true;
+ }
+ return isDefinitelyAssigned(local.id + maxFieldCount);
+ }
+
+ public boolean isReachable() {
+
+ return this.reachMode == REACHABLE;
+ }
+
+ /**
+ * Check status of potential assignment at a given position.
+ * It deals with the dual representation of the InitializationInfo3:
+ * bits for the first 64 entries, then an array of booleans.
+ */
+ final private boolean isPotentiallyAssigned(int position) {
+
+ // id is zero-based
+ if (position < BitCacheSize) {
+ // use bits
+ return (potentialInits & (1L << position)) != 0;
+ }
+ // use extra vector
+ if (extraPotentialInits == null)
+ return false; // if vector not yet allocated, then not initialized
+ int vectorIndex;
+ if ((vectorIndex = (position / BitCacheSize) - 1) >= extraPotentialInits.length)
+ return false; // if not enough room in vector, then not initialized
+ return ((extraPotentialInits[vectorIndex]) & (1L << (position % BitCacheSize))) != 0;
+ }
+
+ /**
+ * Check status of definite assignment for a field.
+ */
+ final public boolean isPotentiallyAssigned(FieldBinding field) {
+
+ return isPotentiallyAssigned(field.id);
+ }
+
+ /**
+ * Check status of potential assignment for a local.
+ */
+ final public boolean isPotentiallyAssigned(LocalVariableBinding local) {
+
+ if (local.isArgument) {
+ return true;
+ }
+ // final constants are inlined, and thus considered as always initialized
+ if (local.isConstantValue()) {
+ return true;
+ }
+ return isPotentiallyAssigned(local.id + maxFieldCount);
+ }
+
+ /**
+ * Record a definite assignment at a given position.
+ * It deals with the dual representation of the InitializationInfo2:
+ * bits for the first 64 entries, then an array of booleans.
+ */
+ final private void markAsDefinitelyAssigned(int position) {
+
+ if (this != DEAD_END) {
+
+ // position is zero-based
+ if (position < BitCacheSize) {
+ // use bits
+ long mask;
+ definiteInits |= (mask = 1L << position);
+ potentialInits |= mask;
+ } else {
+ // use extra vector
+ int vectorIndex = (position / BitCacheSize) - 1;
+ if (extraDefiniteInits == null) {
+ int length;
+ extraDefiniteInits = new long[length = vectorIndex + 1];
+ extraPotentialInits = new long[length];
+ } else {
+ int oldLength; // might need to grow the arrays
+ if (vectorIndex >= (oldLength = extraDefiniteInits.length)) {
+ System.arraycopy(extraDefiniteInits, 0, (extraDefiniteInits = new long[vectorIndex + 1]), 0, oldLength);
+ System.arraycopy(extraPotentialInits, 0, (extraPotentialInits = new long[vectorIndex + 1]), 0, oldLength);
+ }
+ }
+ long mask;
+ extraDefiniteInits[vectorIndex] |= (mask = 1L << (position % BitCacheSize));
+ extraPotentialInits[vectorIndex] |= mask;
+ }
+ }
+ }
+
+ /**
+ * Record a field got definitely assigned.
+ */
+ public void markAsDefinitelyAssigned(FieldBinding field) {
+ if (this != DEAD_END)
+ markAsDefinitelyAssigned(field.id);
+ }
+
+ /**
+ * Record a local got definitely assigned.
+ */
+ public void markAsDefinitelyAssigned(LocalVariableBinding local) {
+ if (this != DEAD_END)
+ markAsDefinitelyAssigned(local.id + maxFieldCount);
+ }
+
+ /**
+ * Clear initialization information at a given position.
+ * It deals with the dual representation of the InitializationInfo2:
+ * bits for the first 64 entries, then an array of booleans.
+ */
+ final private void markAsDefinitelyNotAssigned(int position) {
+ if (this != DEAD_END) {
+
+ // position is zero-based
+ if (position < BitCacheSize) {
+ // use bits
+ long mask;
+ definiteInits &= ~(mask = 1L << position);
+ potentialInits &= ~mask;
+ } else {
+ // use extra vector
+ int vectorIndex = (position / BitCacheSize) - 1;
+ if (extraDefiniteInits == null) {
+ return; // nothing to do, it was not yet set
+ }
+ // might need to grow the arrays
+ if (vectorIndex >= extraDefiniteInits.length) {
+ return; // nothing to do, it was not yet set
+ }
+ long mask;
+ extraDefiniteInits[vectorIndex] &= ~(mask = 1L << (position % BitCacheSize));
+ extraPotentialInits[vectorIndex] &= ~mask;
+ }
+ }
+ }
+
+ /**
+ * Clear the initialization info for a field
+ */
+ public void markAsDefinitelyNotAssigned(FieldBinding field) {
+
+ if (this != DEAD_END)
+ markAsDefinitelyNotAssigned(field.id);
+ }
+
+ /**
+ * Clear the initialization info for a local variable
+ */
+
+ public void markAsDefinitelyNotAssigned(LocalVariableBinding local) {
+
+ if (this != DEAD_END)
+ markAsDefinitelyNotAssigned(local.id + maxFieldCount);
+ }
+
+ /**
+ * Returns the receiver updated in the following way: <ul>
+ * <li> intersection of definitely assigned variables,
+ * <li> union of potentially assigned variables.
+ * </ul>
+ */
+ public UnconditionalFlowInfo mergedWith(UnconditionalFlowInfo otherInits) {
+
+ if (this == DEAD_END) return otherInits;
+ if (otherInits == DEAD_END) return this;
+
+ if ((this.reachMode & UNREACHABLE) != (otherInits.reachMode & UNREACHABLE)){
+ if ((this.reachMode & UNREACHABLE) != 0){
+ return otherInits;
+ }
+ return this;
+ }
+
+ // if one branch is not fake reachable, then the merged one is reachable
+ this.reachMode &= otherInits.reachMode;
+
+ // intersection of definitely assigned variables,
+ this.definiteInits &= otherInits.definiteInits;
+ // union of potentially set ones
+ this.potentialInits |= otherInits.potentialInits;
+
+ // treating extra storage
+ if (this.extraDefiniteInits != null) {
+ if (otherInits.extraDefiniteInits != null) {
+ // both sides have extra storage
+ int i = 0, length, otherLength;
+ if ((length = this.extraDefiniteInits.length) < (otherLength = otherInits.extraDefiniteInits.length)) {
+ // current storage is shorter -> grow current (could maybe reuse otherInits extra storage?)
+ System.arraycopy(this.extraDefiniteInits, 0, (this.extraDefiniteInits = new long[otherLength]), 0, length);
+ System.arraycopy(this.extraPotentialInits, 0, (this.extraPotentialInits = new long[otherLength]), 0, length);
+ while (i < length) {
+ this.extraDefiniteInits[i] &= otherInits.extraDefiniteInits[i];
+ this.extraPotentialInits[i] |= otherInits.extraPotentialInits[i++];
+ }
+ while (i < otherLength) {
+ this.extraPotentialInits[i] = otherInits.extraPotentialInits[i++];
+ }
+ } else {
+ // current storage is longer
+ while (i < otherLength) {
+ this.extraDefiniteInits[i] &= otherInits.extraDefiniteInits[i];
+ this.extraPotentialInits[i] |= otherInits.extraPotentialInits[i++];
+ }
+ while (i < length)
+ this.extraDefiniteInits[i++] = 0;
+ }
+ } else {
+ // no extra storage on otherInits
+ int i = 0, length = this.extraDefiniteInits.length;
+ while (i < length)
+ this.extraDefiniteInits[i++] = 0;
+ }
+ } else
+ if (otherInits.extraDefiniteInits != null) {
+ // no storage here, but other has extra storage.
+ int otherLength;
+ this.extraDefiniteInits = new long[otherLength = otherInits.extraDefiniteInits.length];
+ System.arraycopy(otherInits.extraPotentialInits, 0, (this.extraPotentialInits = new long[otherLength]), 0, otherLength);
+ }
+ return this;
+ }
+
+ /*
+ * Answer the total number of fields in enclosing types of a given type
+ */
+ static int numberOfEnclosingFields(ReferenceBinding type){
+
+ int count = 0;
+ type = type.enclosingType();
+ while(type != null) {
+ count += type.fieldCount();
+ type = type.enclosingType();
+ }
+ return count;
+ }
+
+ public int reachMode(){
+ return this.reachMode;
+ }
+
+ public FlowInfo setReachMode(int reachMode) {
+
+ if (this == DEAD_END) return this; // cannot modify DEAD_END
+
+ // reset optional inits when becoming unreachable
+ if ((this.reachMode & UNREACHABLE) == 0 && (reachMode & UNREACHABLE) != 0) {
+ this.potentialInits = 0;
+ if (this.extraPotentialInits != null){
+ for (int i = 0, length = this.extraPotentialInits.length; i < length; i++){
+ this.extraPotentialInits[i] = 0;
+ }
+ }
+ }
+ this.reachMode = reachMode;
+
+ return this;
+ }
+
+ public String toString(){
+
+ if (this == DEAD_END){
+ return "FlowInfo.DEAD_END"; //$NON-NLS-1$
+ }
+ return "FlowInfo<def: "+ this.definiteInits //$NON-NLS-1$
+ +", pot: " + this.potentialInits //$NON-NLS-1$
+ + ", reachable:" + ((this.reachMode & UNREACHABLE) == 0) //$NON-NLS-1$
+ +">"; //$NON-NLS-1$
+ }
+
+ public UnconditionalFlowInfo unconditionalInits() {
+
+ // also see conditional inits, where it requests them to merge
+ return this;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/BooleanConstant.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/BooleanConstant.js
new file mode 100644
index 0000000..a83fe93
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/BooleanConstant.js
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.impl;
+
+import org.eclipse.wst.jsdt.internal.compiler.util.Util;
+
+public class BooleanConstant extends Constant {
+
+ boolean value;
+
+ public BooleanConstant(boolean value) {
+ this.value = value;
+ }
+
+ public boolean booleanValue() {
+ return value;
+ }
+
+ public String stringValue() {
+ //spec 15.17.11
+ String s = Util.toBoolean(value).toString();
+ if (s == null) return "null"; //$NON-NLS-1$
+ return s;
+ }
+
+ public String toString(){
+ return "(boolean)" + value ; //$NON-NLS-1$
+ }
+
+ public int typeID() {
+ return T_boolean;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/ByteConstant.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/ByteConstant.js
new file mode 100644
index 0000000..43e8f06
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/ByteConstant.js
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.impl;
+
+public class ByteConstant extends Constant {
+ byte value;
+public ByteConstant(byte value) {
+ this.value = value;
+}
+public byte byteValue() {
+ return this.value;
+}
+public char charValue() {
+ return (char) value;
+}
+public double doubleValue() {
+ return value; // implicit cast to return type
+}
+public float floatValue() {
+ return value; // implicit cast to return type
+}
+public int intValue() {
+ return value; // implicit cast to return type
+}
+public long longValue() {
+ return value; // implicit cast to return type
+}
+public short shortValue() {
+ return value; // implicit cast to return type
+}
+public String stringValue() {
+ //spec 15.17.11
+
+ String s = new Integer(value).toString() ;
+ if (s == null) return "null"; //$NON-NLS-1$
+ return s;
+}
+public String toString(){
+
+ return "(byte)" + value ; } //$NON-NLS-1$
+public int typeID() {
+ return T_byte;
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/CharConstant.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/CharConstant.js
new file mode 100644
index 0000000..3677ae2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/CharConstant.js
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.impl;
+
+public class CharConstant extends Constant {
+
+ char value;
+
+ public CharConstant(char value) {
+ this.value = value;
+ }
+ public byte byteValue() {
+ return (byte) value;
+ }
+ public char charValue() {
+ return this.value;
+ }
+ public double doubleValue() {
+ return value; // implicit cast to return type
+ }
+ public float floatValue() {
+ return value; // implicit cast to return type
+ }
+ public int intValue() {
+ return value; // implicit cast to return type
+ }
+ public long longValue() {
+ return value; // implicit cast to return type
+ }
+ public short shortValue() {
+ return (short) value;
+ }
+ public String stringValue() {
+ //spec 15.17.11
+
+ String s = new Character(value).toString() ;
+ if (s == null) return "null"; //$NON-NLS-1$
+ return s;
+ }
+ public String toString(){
+
+ return "(char)" + value; //$NON-NLS-1$
+ }
+ public int typeID() {
+ return T_char;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/CompilerOptions.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/CompilerOptions.js
new file mode 100644
index 0000000..901a1d2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/CompilerOptions.js
@@ -0,0 +1,725 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.impl;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStreamReader;
+import java.io.UnsupportedEncodingException;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.Compiler;
+import org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode;
+import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.ProblemReasons;
+import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemSeverities;
+
+public class CompilerOptions implements ProblemReasons, ProblemSeverities, ClassFileConstants {
+
+ /**
+ * Option IDs
+ */
+ public static final String OPTION_LocalVariableAttribute = "org.eclipse.wst.jsdt.core.compiler.debug.localVariable"; //$NON-NLS-1$
+ public static final String OPTION_LineNumberAttribute = "org.eclipse.wst.jsdt.core.compiler.debug.lineNumber"; //$NON-NLS-1$
+ public static final String OPTION_SourceFileAttribute = "org.eclipse.wst.jsdt.core.compiler.debug.sourceFile"; //$NON-NLS-1$
+ public static final String OPTION_PreserveUnusedLocal = "org.eclipse.wst.jsdt.core.compiler.codegen.unusedLocal"; //$NON-NLS-1$
+ public static final String OPTION_DocCommentSupport= "org.eclipse.wst.jsdt.core.compiler.doc.comment.support"; //$NON-NLS-1$
+ public static final String OPTION_ReportMethodWithConstructorName = "org.eclipse.wst.jsdt.core.compiler.problem.methodWithConstructorName"; //$NON-NLS-1$
+ public static final String OPTION_ReportOverridingPackageDefaultMethod = "org.eclipse.wst.jsdt.core.compiler.problem.overridingPackageDefaultMethod"; //$NON-NLS-1$
+ public static final String OPTION_ReportDeprecation = "org.eclipse.wst.jsdt.core.compiler.problem.deprecation"; //$NON-NLS-1$
+ public static final String OPTION_ReportDeprecationInDeprecatedCode = "org.eclipse.wst.jsdt.core.compiler.problem.deprecationInDeprecatedCode"; //$NON-NLS-1$
+ public static final String OPTION_ReportDeprecationWhenOverridingDeprecatedMethod = "org.eclipse.wst.jsdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod"; //$NON-NLS-1$
+ public static final String OPTION_ReportHiddenCatchBlock = "org.eclipse.wst.jsdt.core.compiler.problem.hiddenCatchBlock"; //$NON-NLS-1$
+ public static final String OPTION_ReportUnusedLocal = "org.eclipse.wst.jsdt.core.compiler.problem.unusedLocal"; //$NON-NLS-1$
+ public static final String OPTION_ReportUnusedParameter = "org.eclipse.wst.jsdt.core.compiler.problem.unusedParameter"; //$NON-NLS-1$
+ public static final String OPTION_ReportUnusedParameterWhenImplementingAbstract = "org.eclipse.wst.jsdt.core.compiler.problem.unusedParameterWhenImplementingAbstract"; //$NON-NLS-1$
+ public static final String OPTION_ReportUnusedParameterWhenOverridingConcrete = "org.eclipse.wst.jsdt.core.compiler.problem.unusedParameterWhenOverridingConcrete"; //$NON-NLS-1$
+ public static final String OPTION_ReportUnusedImport = "org.eclipse.wst.jsdt.core.compiler.problem.unusedImport"; //$NON-NLS-1$
+ public static final String OPTION_ReportSyntheticAccessEmulation = "org.eclipse.wst.jsdt.core.compiler.problem.syntheticAccessEmulation"; //$NON-NLS-1$
+ public static final String OPTION_ReportNoEffectAssignment = "org.eclipse.wst.jsdt.core.compiler.problem.noEffectAssignment"; //$NON-NLS-1$
+ public static final String OPTION_ReportLocalVariableHiding = "org.eclipse.wst.jsdt.core.compiler.problem.localVariableHiding"; //$NON-NLS-1$
+ public static final String OPTION_ReportSpecialParameterHidingField = "org.eclipse.wst.jsdt.core.compiler.problem.specialParameterHidingField"; //$NON-NLS-1$
+ public static final String OPTION_ReportFieldHiding = "org.eclipse.wst.jsdt.core.compiler.problem.fieldHiding"; //$NON-NLS-1$
+ public static final String OPTION_ReportPossibleAccidentalBooleanAssignment = "org.eclipse.wst.jsdt.core.compiler.problem.possibleAccidentalBooleanAssignment"; //$NON-NLS-1$
+ public static final String OPTION_ReportNonExternalizedStringLiteral = "org.eclipse.wst.jsdt.core.compiler.problem.nonExternalizedStringLiteral"; //$NON-NLS-1$
+ public static final String OPTION_ReportIncompatibleNonInheritedInterfaceMethod = "org.eclipse.wst.jsdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod"; //$NON-NLS-1$
+ public static final String OPTION_ReportUnusedPrivateMember = "org.eclipse.wst.jsdt.core.compiler.problem.unusedPrivateMember"; //$NON-NLS-1$
+ public static final String OPTION_ReportNoImplicitStringConversion = "org.eclipse.wst.jsdt.core.compiler.problem.noImplicitStringConversion"; //$NON-NLS-1$
+ public static final String OPTION_ReportAssertIdentifier = "org.eclipse.wst.jsdt.core.compiler.problem.assertIdentifier"; //$NON-NLS-1$
+ public static final String OPTION_ReportEnumIdentifier = "org.eclipse.wst.jsdt.core.compiler.problem.enumIdentifier"; //$NON-NLS-1$
+ public static final String OPTION_ReportNonStaticAccessToStatic = "org.eclipse.wst.jsdt.core.compiler.problem.staticAccessReceiver"; //$NON-NLS-1$
+ public static final String OPTION_ReportIndirectStaticAccess = "org.eclipse.wst.jsdt.core.compiler.problem.indirectStaticAccess"; //$NON-NLS-1$
+ public static final String OPTION_ReportEmptyStatement = "org.eclipse.wst.jsdt.core.compiler.problem.emptyStatement"; //$NON-NLS-1$
+ public static final String OPTION_ReportUnnecessaryTypeCheck = "org.eclipse.wst.jsdt.core.compiler.problem.unnecessaryTypeCheck"; //$NON-NLS-1$
+ public static final String OPTION_ReportUnnecessaryElse = "org.eclipse.wst.jsdt.core.compiler.problem.unnecessaryElse"; //$NON-NLS-1$
+ public static final String OPTION_ReportUndocumentedEmptyBlock = "org.eclipse.wst.jsdt.core.compiler.problem.undocumentedEmptyBlock"; //$NON-NLS-1$
+ public static final String OPTION_ReportInvalidJavadoc = "org.eclipse.wst.jsdt.core.compiler.problem.invalidJavadoc"; //$NON-NLS-1$
+ public static final String OPTION_ReportInvalidJavadocTags = "org.eclipse.wst.jsdt.core.compiler.problem.invalidJavadocTags"; //$NON-NLS-1$
+ public static final String OPTION_ReportInvalidJavadocTagsVisibility = "org.eclipse.wst.jsdt.core.compiler.problem.invalidJavadocTagsVisibility"; //$NON-NLS-1$
+ public static final String OPTION_ReportMissingJavadocTags = "org.eclipse.wst.jsdt.core.compiler.problem.missingJavadocTags"; //$NON-NLS-1$
+ public static final String OPTION_ReportMissingJavadocTagsVisibility = "org.eclipse.wst.jsdt.core.compiler.problem.missingJavadocTagsVisibility"; //$NON-NLS-1$
+ public static final String OPTION_ReportMissingJavadocTagsOverriding = "org.eclipse.wst.jsdt.core.compiler.problem.missingJavadocTagsOverriding"; //$NON-NLS-1$
+ public static final String OPTION_ReportMissingJavadocComments = "org.eclipse.wst.jsdt.core.compiler.problem.missingJavadocComments"; //$NON-NLS-1$
+ public static final String OPTION_ReportMissingJavadocCommentsVisibility = "org.eclipse.wst.jsdt.core.compiler.problem.missingJavadocCommentsVisibility"; //$NON-NLS-1$
+ public static final String OPTION_ReportMissingJavadocCommentsOverriding = "org.eclipse.wst.jsdt.core.compiler.problem.missingJavadocCommentsOverriding"; //$NON-NLS-1$
+ public static final String OPTION_ReportFinallyBlockNotCompletingNormally = "org.eclipse.wst.jsdt.core.compiler.problem.finallyBlockNotCompletingNormally"; //$NON-NLS-1$
+ public static final String OPTION_ReportUnusedDeclaredThrownException = "org.eclipse.wst.jsdt.core.compiler.problem.unusedDeclaredThrownException"; //$NON-NLS-1$
+ public static final String OPTION_ReportUnusedDeclaredThrownExceptionWhenOverriding = "org.eclipse.wst.jsdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding"; //$NON-NLS-1$
+ public static final String OPTION_ReportUnqualifiedFieldAccess = "org.eclipse.wst.jsdt.core.compiler.problem.unqualifiedFieldAccess"; //$NON-NLS-1$
+ public static final String OPTION_ReportUnsafeTypeOperation = "org.eclipse.wst.jsdt.core.compiler.problem.unsafeTypeOperation"; //$NON-NLS-1$
+ public static final String OPTION_ReportFinalParameterBound = "org.eclipse.wst.jsdt.core.compiler.problem.finalParameterBound"; //$NON-NLS-1$
+ public static final String OPTION_ReportMissingSerialVersion = "org.eclipse.wst.jsdt.core.compiler.problem.missingSerialVersion"; //$NON-NLS-1$
+ public static final String OPTION_ReportForbiddenReference = "org.eclipse.wst.jsdt.core.compiler.problem.forbiddenReference"; //$NON-NLS-1$
+ public static final String OPTION_Source = "org.eclipse.wst.jsdt.core.compiler.source"; //$NON-NLS-1$
+ public static final String OPTION_TargetPlatform = "org.eclipse.wst.jsdt.core.compiler.codegen.targetPlatform"; //$NON-NLS-1$
+ public static final String OPTION_Compliance = "org.eclipse.wst.jsdt.core.compiler.compliance"; //$NON-NLS-1$
+ public static final String OPTION_Encoding = "org.eclipse.wst.jsdt.core.encoding"; //$NON-NLS-1$
+ public static final String OPTION_MaxProblemPerUnit = "org.eclipse.wst.jsdt.core.compiler.maxProblemPerUnit"; //$NON-NLS-1$
+ public static final String OPTION_TaskTags = "org.eclipse.wst.jsdt.core.compiler.taskTags"; //$NON-NLS-1$
+ public static final String OPTION_TaskPriorities = "org.eclipse.wst.jsdt.core.compiler.taskPriorities"; //$NON-NLS-1$
+ public static final String OPTION_TaskCaseSensitive = "org.eclipse.wst.jsdt.core.compiler.taskCaseSensitive"; //$NON-NLS-1$
+ public static final String OPTION_InlineJsr = "org.eclipse.wst.jsdt.core.compiler.codegen.inlineJsrBytecode"; //$NON-NLS-1$
+
+ // Backward compatibility
+ public static final String OPTION_ReportInvalidAnnotation = "org.eclipse.wst.jsdt.core.compiler.problem.invalidAnnotation"; //$NON-NLS-1$
+ public static final String OPTION_ReportMissingAnnotation = "org.eclipse.wst.jsdt.core.compiler.problem.missingAnnotation"; //$NON-NLS-1$
+ public static final String OPTION_ReportMissingJavadoc = "org.eclipse.wst.jsdt.core.compiler.problem.missingJavadoc"; //$NON-NLS-1$
+
+ /* should surface ??? */
+ public static final String OPTION_PrivateConstructorAccess = "org.eclipse.wst.jsdt.core.compiler.codegen.constructorAccessEmulation"; //$NON-NLS-1$
+
+ /**
+ * Possible values for configurable options
+ */
+ public static final String GENERATE = "generate";//$NON-NLS-1$
+ public static final String DO_NOT_GENERATE = "do not generate"; //$NON-NLS-1$
+ public static final String PRESERVE = "preserve"; //$NON-NLS-1$
+ public static final String OPTIMIZE_OUT = "optimize out"; //$NON-NLS-1$
+ public static final String VERSION_1_1 = "1.1"; //$NON-NLS-1$
+ public static final String VERSION_1_2 = "1.2"; //$NON-NLS-1$
+ public static final String VERSION_1_3 = "1.3"; //$NON-NLS-1$
+ public static final String VERSION_1_4 = "1.4"; //$NON-NLS-1$
+ public static final String VERSION_1_5 = "1.5"; //$NON-NLS-1$
+ public static final String ERROR = "error"; //$NON-NLS-1$
+ public static final String WARNING = "warning"; //$NON-NLS-1$
+ public static final String IGNORE = "ignore"; //$NON-NLS-1$
+ public static final String ENABLED = "enabled"; //$NON-NLS-1$
+ public static final String DISABLED = "disabled"; //$NON-NLS-1$
+ public static final String PUBLIC = "public"; //$NON-NLS-1$
+ public static final String PROTECTED = "protected"; //$NON-NLS-1$
+ public static final String DEFAULT = "default"; //$NON-NLS-1$
+ public static final String PRIVATE = "private"; //$NON-NLS-1$
+
+ /**
+ * Bit mask for configurable problems (error/warning threshold)
+ */
+ public static final long MethodWithConstructorName = ASTNode.Bit1;
+ public static final long OverriddenPackageDefaultMethod = ASTNode.Bit2;
+ public static final long UsingDeprecatedAPI = ASTNode.Bit3;
+ public static final long MaskedCatchBlock = ASTNode.Bit4;
+ public static final long UnusedLocalVariable = ASTNode.Bit5;
+ public static final long UnusedArgument = ASTNode.Bit6;
+ public static final long NoImplicitStringConversion = ASTNode.Bit7;
+ public static final long AccessEmulation = ASTNode.Bit8;
+ public static final long NonExternalizedString = ASTNode.Bit9;
+ public static final long AssertUsedAsAnIdentifier = ASTNode.Bit10;
+ public static final long UnusedImport = ASTNode.Bit11;
+ public static final long NonStaticAccessToStatic = ASTNode.Bit12;
+ public static final long Task = ASTNode.Bit13;
+ public static final long NoEffectAssignment = ASTNode.Bit14;
+ public static final long IncompatibleNonInheritedInterfaceMethod = ASTNode.Bit15;
+ public static final long UnusedPrivateMember = ASTNode.Bit16;
+ public static final long LocalVariableHiding = ASTNode.Bit17;
+ public static final long FieldHiding = ASTNode.Bit18;
+ public static final long AccidentalBooleanAssign = ASTNode.Bit19;
+ public static final long EmptyStatement = ASTNode.Bit20;
+ public static final long MissingJavadocComments = ASTNode.Bit21;
+ public static final long MissingJavadocTags = ASTNode.Bit22;
+ public static final long UnqualifiedFieldAccess = ASTNode.Bit23;
+ public static final long UnusedDeclaredThrownException = ASTNode.Bit24;
+ public static final long FinallyBlockNotCompleting = ASTNode.Bit25;
+ public static final long InvalidJavadoc = ASTNode.Bit26;
+ public static final long UnnecessaryTypeCheck = ASTNode.Bit27;
+ public static final long UndocumentedEmptyBlock = ASTNode.Bit28;
+ public static final long IndirectStaticAccess = ASTNode.Bit29;
+ public static final long UnnecessaryElse = ASTNode.Bit30;
+ public static final long UnsafeTypeOperation = ASTNode.Bit31;
+ public static final long FinalParameterBound = ASTNode.Bit32L;
+ public static final long MissingSerialVersion = ASTNode.Bit33L;
+ public static final long EnumUsedAsAnIdentifier = ASTNode.Bit34L;
+ public static final long ForbiddenReference = ASTNode.Bit35L;
+
+ // Default severity level for handlers
+ public long errorThreshold = 0;
+
+ public long warningThreshold =
+ MethodWithConstructorName
+ | UsingDeprecatedAPI
+ | MaskedCatchBlock
+ | OverriddenPackageDefaultMethod
+ | UnusedImport
+ | NonStaticAccessToStatic
+ | NoEffectAssignment
+ | IncompatibleNonInheritedInterfaceMethod
+ | NoImplicitStringConversion
+ | FinallyBlockNotCompleting
+ | AssertUsedAsAnIdentifier
+ | EnumUsedAsAnIdentifier
+ | UnsafeTypeOperation
+ | MissingSerialVersion;
+
+ // Debug attributes
+ public static final int Source = 1; // SourceFileAttribute
+ public static final int Lines = 2; // LineNumberAttribute
+ public static final int Vars = 4; // LocalVariableTableAttribute
+
+ // By default only lines and source attributes are generated.
+ public int produceDebugAttributes = Lines | Source;
+
+ public long complianceLevel = JDK1_4; // by default be compliant with 1.4
+ public long sourceLevel = JDK1_3; //1.3 source behavior by default
+ public long targetJDK = JDK1_2; // default generates for JVM1.2
+
+ // toggle private access emulation for 1.2 (constr. accessor has extra arg on constructor) or 1.3 (make private constructor default access when access needed)
+ public boolean isPrivateConstructorAccessChangingVisibility = false; // by default, follows 1.2
+
+ // source encoding format
+ public String defaultEncoding = null; // will use the platform default encoding
+
+ // print what unit is being processed
+ public boolean verbose = Compiler.DEBUG;
+
+ // indicates if reference info is desired
+ public boolean produceReferenceInfo = false;
+
+ // indicates if unused/optimizable local variables need to be preserved (debugging purpose)
+ public boolean preserveAllLocalVariables = false;
+
+ // indicates whether literal expressions are inlined at parse-time or not
+ public boolean parseLiteralExpressionsAsConstants = true;
+
+ // max problems per compilation unit
+ public int maxProblemsPerUnit = 100; // no more than 100 problems per default
+
+ // tags used to recognize tasks in comments
+ public char[][] taskTags = null;
+ public char[][] taskPriorites = null;
+ public boolean isTaskCaseSensitive = true;
+
+ // deprecation report
+ public boolean reportDeprecationInsideDeprecatedCode = false;
+ public boolean reportDeprecationWhenOverridingDeprecatedMethod = false;
+
+ // unused parameters report
+ public boolean reportUnusedParameterWhenImplementingAbstract = false;
+ public boolean reportUnusedParameterWhenOverridingConcrete = false;
+
+ // unused declaration of thrown exception
+ public boolean reportUnusedDeclaredThrownExceptionWhenOverriding = false;
+
+ // constructor/setter parameter hiding
+ public boolean reportSpecialParameterHidingField = false;
+
+ // check javadoc comments
+ public int reportInvalidJavadocTagsVisibility = AccPrivate;
+ public boolean reportInvalidJavadocTags = true;
+
+ // check missing javadoc tags
+ public int reportMissingJavadocTagsVisibility = AccPrivate;
+ public boolean reportMissingJavadocTagsOverriding = true;
+
+ // check missing javadoc comments
+ public int reportMissingJavadocCommentsVisibility = AccPublic;
+ public boolean reportMissingJavadocCommentsOverriding = true;
+
+ // JSR bytecode inlining
+ public boolean inlineJsrBytecode = false;
+
+ // javadoc comment support
+ public boolean docCommentSupport = false;
+
+
+ /**
+ * Initializing the compiler options with defaults
+ */
+ public CompilerOptions(){
+ // use default options
+ }
+
+ /**
+ * Initializing the compiler options with external settings
+ * @param settings
+ */
+ public CompilerOptions(Map settings){
+
+ if (settings == null) return;
+ set(settings);
+ }
+
+ public Map getMap() {
+ Map optionsMap = new HashMap(30);
+ optionsMap.put(OPTION_LocalVariableAttribute, (this.produceDebugAttributes & Vars) != 0 ? GENERATE : DO_NOT_GENERATE);
+ optionsMap.put(OPTION_LineNumberAttribute, (this.produceDebugAttributes & Lines) != 0 ? GENERATE : DO_NOT_GENERATE);
+ optionsMap.put(OPTION_SourceFileAttribute, (this.produceDebugAttributes & Source) != 0 ? GENERATE : DO_NOT_GENERATE);
+ optionsMap.put(OPTION_PreserveUnusedLocal, this.preserveAllLocalVariables ? PRESERVE : OPTIMIZE_OUT);
+ optionsMap.put(OPTION_DocCommentSupport, this.docCommentSupport ? ENABLED : DISABLED);
+ optionsMap.put(OPTION_ReportMethodWithConstructorName, getSeverityString(MethodWithConstructorName));
+ optionsMap.put(OPTION_ReportOverridingPackageDefaultMethod, getSeverityString(OverriddenPackageDefaultMethod));
+ optionsMap.put(OPTION_ReportDeprecation, getSeverityString(UsingDeprecatedAPI));
+ optionsMap.put(OPTION_ReportDeprecationInDeprecatedCode, this.reportDeprecationInsideDeprecatedCode ? ENABLED : DISABLED);
+ optionsMap.put(OPTION_ReportDeprecationWhenOverridingDeprecatedMethod, this.reportDeprecationWhenOverridingDeprecatedMethod ? ENABLED : DISABLED);
+ optionsMap.put(OPTION_ReportHiddenCatchBlock, getSeverityString(MaskedCatchBlock));
+ optionsMap.put(OPTION_ReportUnusedLocal, getSeverityString(UnusedLocalVariable));
+ optionsMap.put(OPTION_ReportUnusedParameter, getSeverityString(UnusedArgument));
+ optionsMap.put(OPTION_ReportUnusedImport, getSeverityString(UnusedImport));
+ optionsMap.put(OPTION_ReportSyntheticAccessEmulation, getSeverityString(AccessEmulation));
+ optionsMap.put(OPTION_ReportNoEffectAssignment, getSeverityString(NoEffectAssignment));
+ optionsMap.put(OPTION_ReportNonExternalizedStringLiteral, getSeverityString(NonExternalizedString));
+ optionsMap.put(OPTION_ReportNoImplicitStringConversion, getSeverityString(NoImplicitStringConversion));
+ optionsMap.put(OPTION_ReportNonStaticAccessToStatic, getSeverityString(NonStaticAccessToStatic));
+ optionsMap.put(OPTION_ReportIndirectStaticAccess, getSeverityString(IndirectStaticAccess));
+ optionsMap.put(OPTION_ReportIncompatibleNonInheritedInterfaceMethod, getSeverityString(IncompatibleNonInheritedInterfaceMethod));
+ optionsMap.put(OPTION_ReportUnusedPrivateMember, getSeverityString(UnusedPrivateMember));
+ optionsMap.put(OPTION_ReportLocalVariableHiding, getSeverityString(LocalVariableHiding));
+ optionsMap.put(OPTION_ReportFieldHiding, getSeverityString(FieldHiding));
+ optionsMap.put(OPTION_ReportPossibleAccidentalBooleanAssignment, getSeverityString(AccidentalBooleanAssign));
+ optionsMap.put(OPTION_ReportEmptyStatement, getSeverityString(EmptyStatement));
+ optionsMap.put(OPTION_ReportAssertIdentifier, getSeverityString(AssertUsedAsAnIdentifier));
+ optionsMap.put(OPTION_ReportEnumIdentifier, getSeverityString(EnumUsedAsAnIdentifier));
+ optionsMap.put(OPTION_ReportUndocumentedEmptyBlock, getSeverityString(UndocumentedEmptyBlock));
+ optionsMap.put(OPTION_ReportUnnecessaryTypeCheck, getSeverityString(UnnecessaryTypeCheck));
+ optionsMap.put(OPTION_ReportUnnecessaryElse, getSeverityString(UnnecessaryElse));
+ optionsMap.put(OPTION_ReportInvalidJavadoc, getSeverityString(InvalidJavadoc));
+ optionsMap.put(OPTION_ReportInvalidJavadocTagsVisibility, getVisibilityString(this.reportInvalidJavadocTagsVisibility));
+ optionsMap.put(OPTION_ReportInvalidJavadocTags, this.reportInvalidJavadocTags? ENABLED : DISABLED);
+ optionsMap.put(OPTION_ReportMissingJavadocTags, getSeverityString(MissingJavadocTags));
+ optionsMap.put(OPTION_ReportMissingJavadocTagsVisibility, getVisibilityString(this.reportMissingJavadocTagsVisibility));
+ optionsMap.put(OPTION_ReportMissingJavadocTagsOverriding, this.reportMissingJavadocTagsOverriding ? ENABLED : DISABLED);
+ optionsMap.put(OPTION_ReportMissingJavadocComments, getSeverityString(MissingJavadocComments));
+ optionsMap.put(OPTION_ReportMissingJavadocCommentsVisibility, getVisibilityString(this.reportMissingJavadocCommentsVisibility));
+ optionsMap.put(OPTION_ReportMissingJavadocCommentsOverriding, this.reportMissingJavadocCommentsOverriding ? ENABLED : DISABLED);
+ optionsMap.put(OPTION_ReportFinallyBlockNotCompletingNormally, getSeverityString(FinallyBlockNotCompleting));
+ optionsMap.put(OPTION_ReportUnusedDeclaredThrownException, getSeverityString(UnusedDeclaredThrownException));
+ optionsMap.put(OPTION_ReportUnusedDeclaredThrownExceptionWhenOverriding, this.reportUnusedDeclaredThrownExceptionWhenOverriding ? ENABLED : DISABLED);
+ optionsMap.put(OPTION_ReportUnqualifiedFieldAccess, getSeverityString(UnqualifiedFieldAccess));
+ optionsMap.put(OPTION_ReportUnsafeTypeOperation, getSeverityString(UnsafeTypeOperation));
+ optionsMap.put(OPTION_ReportFinalParameterBound, getSeverityString(FinalParameterBound));
+ optionsMap.put(OPTION_ReportMissingSerialVersion, getSeverityString(MissingSerialVersion));
+ optionsMap.put(OPTION_ReportForbiddenReference, getSeverityString(ForbiddenReference));
+ optionsMap.put(OPTION_Compliance, versionFromJdkLevel(this.complianceLevel));
+ optionsMap.put(OPTION_Source, versionFromJdkLevel(this.sourceLevel));
+ optionsMap.put(OPTION_TargetPlatform, versionFromJdkLevel(this.targetJDK));
+ if (this.defaultEncoding != null) {
+ optionsMap.put(OPTION_Encoding, this.defaultEncoding);
+ }
+ optionsMap.put(OPTION_TaskTags, this.taskTags == null ? "" : new String(CharOperation.concatWith(this.taskTags,','))); //$NON-NLS-1$
+ optionsMap.put(OPTION_TaskPriorities, this.taskPriorites == null ? "" : new String(CharOperation.concatWith(this.taskPriorites,','))); //$NON-NLS-1$
+ optionsMap.put(OPTION_TaskCaseSensitive, this.isTaskCaseSensitive ? ENABLED : DISABLED);
+ optionsMap.put(OPTION_ReportUnusedParameterWhenImplementingAbstract, this.reportUnusedParameterWhenImplementingAbstract ? ENABLED : DISABLED);
+ optionsMap.put(OPTION_ReportUnusedParameterWhenOverridingConcrete, this.reportUnusedParameterWhenOverridingConcrete ? ENABLED : DISABLED);
+ optionsMap.put(OPTION_ReportSpecialParameterHidingField, this.reportSpecialParameterHidingField ? ENABLED : DISABLED);
+ optionsMap.put(OPTION_MaxProblemPerUnit, String.valueOf(this.maxProblemsPerUnit));
+ optionsMap.put(OPTION_InlineJsr, this.inlineJsrBytecode ? ENABLED : DISABLED);
+ return optionsMap;
+ }
+
+ public int getSeverity(long irritant) {
+ if((this.warningThreshold & irritant) != 0)
+ return Warning;
+ if((this.errorThreshold & irritant) != 0)
+ return Error;
+ return Ignore;
+ }
+
+ public String getSeverityString(long irritant) {
+ if((this.warningThreshold & irritant) != 0)
+ return WARNING;
+ if((this.errorThreshold & irritant) != 0)
+ return ERROR;
+ return IGNORE;
+ }
+
+ public String getVisibilityString(int level) {
+ switch (level) {
+ case AccPublic:
+ return PUBLIC;
+ case AccProtected:
+ return PROTECTED;
+ case AccPrivate:
+ return PRIVATE;
+ default:
+ return DEFAULT;
+ }
+ }
+
+ public void set(Map optionsMap) {
+
+ Object optionValue;
+ if ((optionValue = optionsMap.get(OPTION_LocalVariableAttribute)) != null) {
+ if (GENERATE.equals(optionValue)) {
+ this.produceDebugAttributes |= Vars;
+ } else if (DO_NOT_GENERATE.equals(optionValue)) {
+ this.produceDebugAttributes &= ~Vars;
+ }
+ }
+ if ((optionValue = optionsMap.get(OPTION_LineNumberAttribute)) != null) {
+ if (GENERATE.equals(optionValue)) {
+ this.produceDebugAttributes |= Lines;
+ } else if (DO_NOT_GENERATE.equals(optionValue)) {
+ this.produceDebugAttributes &= ~Lines;
+ }
+ }
+ if ((optionValue = optionsMap.get(OPTION_SourceFileAttribute)) != null) {
+ if (GENERATE.equals(optionValue)) {
+ this.produceDebugAttributes |= Source;
+ } else if (DO_NOT_GENERATE.equals(optionValue)) {
+ this.produceDebugAttributes &= ~Source;
+ }
+ }
+ if ((optionValue = optionsMap.get(OPTION_PreserveUnusedLocal)) != null) {
+ if (PRESERVE.equals(optionValue)) {
+ this.preserveAllLocalVariables = true;
+ } else if (OPTIMIZE_OUT.equals(optionValue)) {
+ this.preserveAllLocalVariables = false;
+ }
+ }
+ if ((optionValue = optionsMap.get(OPTION_ReportDeprecationInDeprecatedCode)) != null) {
+ if (ENABLED.equals(optionValue)) {
+ this.reportDeprecationInsideDeprecatedCode = true;
+ } else if (DISABLED.equals(optionValue)) {
+ this.reportDeprecationInsideDeprecatedCode = false;
+ }
+ }
+ if ((optionValue = optionsMap.get(OPTION_ReportDeprecationWhenOverridingDeprecatedMethod)) != null) {
+ if (ENABLED.equals(optionValue)) {
+ this.reportDeprecationWhenOverridingDeprecatedMethod = true;
+ } else if (DISABLED.equals(optionValue)) {
+ this.reportDeprecationWhenOverridingDeprecatedMethod = false;
+ }
+ }
+ if ((optionValue = optionsMap.get(OPTION_ReportUnusedDeclaredThrownExceptionWhenOverriding)) != null) {
+ if (ENABLED.equals(optionValue)) {
+ this.reportUnusedDeclaredThrownExceptionWhenOverriding = true;
+ } else if (DISABLED.equals(optionValue)) {
+ this.reportUnusedDeclaredThrownExceptionWhenOverriding = false;
+ }
+ }
+ if ((optionValue = optionsMap.get(OPTION_Compliance)) != null) {
+ long level = versionToJdkLevel(optionValue);
+ if (level != 0) this.complianceLevel = level;
+ }
+ if ((optionValue = optionsMap.get(OPTION_Source)) != null) {
+ long level = versionToJdkLevel(optionValue);
+ if (level != 0) this.sourceLevel = level;
+ }
+ if ((optionValue = optionsMap.get(OPTION_TargetPlatform)) != null) {
+ long level = versionToJdkLevel(optionValue);
+ if (level != 0) this.targetJDK = level;
+ if (this.targetJDK >= JDK1_5) this.inlineJsrBytecode = true; // forced in 1.5 mode
+ }
+ if ((optionValue = optionsMap.get(OPTION_Encoding)) != null) {
+ if (optionValue instanceof String) {
+ this.defaultEncoding = null;
+ String stringValue = (String) optionValue;
+ if (stringValue.length() > 0){
+ try {
+ new InputStreamReader(new ByteArrayInputStream(new byte[0]), stringValue);
+ this.defaultEncoding = stringValue;
+ } catch(UnsupportedEncodingException e){
+ // ignore unsupported encoding
+ }
+ }
+ }
+ }
+ if ((optionValue = optionsMap.get(OPTION_PrivateConstructorAccess)) != null) {
+ long level = versionToJdkLevel(optionValue);
+ if (level >= JDK1_3) this.isPrivateConstructorAccessChangingVisibility = true;
+ }
+ if ((optionValue = optionsMap.get(OPTION_ReportUnusedParameterWhenImplementingAbstract)) != null) {
+ if (ENABLED.equals(optionValue)) {
+ this.reportUnusedParameterWhenImplementingAbstract = true;
+ } else if (DISABLED.equals(optionValue)) {
+ this.reportUnusedParameterWhenImplementingAbstract = false;
+ }
+ }
+ if ((optionValue = optionsMap.get(OPTION_ReportUnusedParameterWhenOverridingConcrete)) != null) {
+ if (ENABLED.equals(optionValue)) {
+ this.reportUnusedParameterWhenOverridingConcrete = true;
+ } else if (DISABLED.equals(optionValue)) {
+ this.reportUnusedParameterWhenOverridingConcrete = false;
+ }
+ }
+ if ((optionValue = optionsMap.get(OPTION_ReportSpecialParameterHidingField)) != null) {
+ if (ENABLED.equals(optionValue)) {
+ this.reportSpecialParameterHidingField = true;
+ } else if (DISABLED.equals(optionValue)) {
+ this.reportSpecialParameterHidingField = false;
+ }
+ }
+ if ((optionValue = optionsMap.get(OPTION_MaxProblemPerUnit)) != null) {
+ if (optionValue instanceof String) {
+ String stringValue = (String) optionValue;
+ try {
+ int val = Integer.parseInt(stringValue);
+ if (val >= 0) this.maxProblemsPerUnit = val;
+ } catch(NumberFormatException e){
+ // ignore ill-formatted limit
+ }
+ }
+ }
+ if ((optionValue = optionsMap.get(OPTION_TaskTags)) != null) {
+ if (optionValue instanceof String) {
+ String stringValue = (String) optionValue;
+ if (stringValue.length() == 0) {
+ this.taskTags = null;
+ } else {
+ this.taskTags = CharOperation.splitAndTrimOn(',', stringValue.toCharArray());
+ }
+ }
+ }
+ if ((optionValue = optionsMap.get(OPTION_TaskPriorities)) != null) {
+ if (optionValue instanceof String) {
+ String stringValue = (String) optionValue;
+ if (stringValue.length() == 0) {
+ this.taskPriorites = null;
+ } else {
+ this.taskPriorites = CharOperation.splitAndTrimOn(',', stringValue.toCharArray());
+ }
+ }
+ }
+ if ((optionValue = optionsMap.get(OPTION_TaskCaseSensitive)) != null) {
+ if (ENABLED.equals(optionValue)) {
+ this.isTaskCaseSensitive = true;
+ } else if (DISABLED.equals(optionValue)) {
+ this.isTaskCaseSensitive = false;
+ }
+ }
+ if ((optionValue = optionsMap.get(OPTION_InlineJsr)) != null) {
+ if (this.targetJDK < JDK1_5) { // only optional if target < 1.5 (inlining on from 1.5 on)
+ if (ENABLED.equals(optionValue)) {
+ this.inlineJsrBytecode = true;
+ } else if (DISABLED.equals(optionValue)) {
+ this.inlineJsrBytecode = false;
+ }
+ }
+ }
+ if ((optionValue = optionsMap.get(OPTION_ReportMethodWithConstructorName)) != null) updateSeverity(MethodWithConstructorName, optionValue);
+ if ((optionValue = optionsMap.get(OPTION_ReportOverridingPackageDefaultMethod)) != null) updateSeverity(OverriddenPackageDefaultMethod, optionValue);
+ if ((optionValue = optionsMap.get(OPTION_ReportDeprecation)) != null) updateSeverity(UsingDeprecatedAPI, optionValue);
+ if ((optionValue = optionsMap.get(OPTION_ReportHiddenCatchBlock)) != null) updateSeverity(MaskedCatchBlock, optionValue);
+ if ((optionValue = optionsMap.get(OPTION_ReportUnusedLocal)) != null) updateSeverity(UnusedLocalVariable, optionValue);
+ if ((optionValue = optionsMap.get(OPTION_ReportUnusedParameter)) != null) updateSeverity(UnusedArgument, optionValue);
+ if ((optionValue = optionsMap.get(OPTION_ReportUnusedImport)) != null) updateSeverity(UnusedImport, optionValue);
+ if ((optionValue = optionsMap.get(OPTION_ReportUnusedPrivateMember)) != null) updateSeverity(UnusedPrivateMember, optionValue);
+ if ((optionValue = optionsMap.get(OPTION_ReportUnusedDeclaredThrownException)) != null) updateSeverity(UnusedDeclaredThrownException, optionValue);
+ if ((optionValue = optionsMap.get(OPTION_ReportNoImplicitStringConversion)) != null) updateSeverity(NoImplicitStringConversion, optionValue);
+ if ((optionValue = optionsMap.get(OPTION_ReportSyntheticAccessEmulation)) != null) updateSeverity(AccessEmulation, optionValue);
+ if ((optionValue = optionsMap.get(OPTION_ReportLocalVariableHiding)) != null) updateSeverity(LocalVariableHiding, optionValue);
+ if ((optionValue = optionsMap.get(OPTION_ReportFieldHiding)) != null) updateSeverity(FieldHiding, optionValue);
+ if ((optionValue = optionsMap.get(OPTION_ReportPossibleAccidentalBooleanAssignment)) != null) updateSeverity(AccidentalBooleanAssign, optionValue);
+ if ((optionValue = optionsMap.get(OPTION_ReportEmptyStatement)) != null) updateSeverity(EmptyStatement, optionValue);
+ if ((optionValue = optionsMap.get(OPTION_ReportNonExternalizedStringLiteral)) != null) updateSeverity(NonExternalizedString, optionValue);
+ if ((optionValue = optionsMap.get(OPTION_ReportAssertIdentifier)) != null) updateSeverity(AssertUsedAsAnIdentifier, optionValue);
+ if ((optionValue = optionsMap.get(OPTION_ReportEnumIdentifier)) != null) updateSeverity(EnumUsedAsAnIdentifier, optionValue);
+ if ((optionValue = optionsMap.get(OPTION_ReportNonStaticAccessToStatic)) != null) updateSeverity(NonStaticAccessToStatic, optionValue);
+ if ((optionValue = optionsMap.get(OPTION_ReportIndirectStaticAccess)) != null) updateSeverity(IndirectStaticAccess, optionValue);
+ if ((optionValue = optionsMap.get(OPTION_ReportIncompatibleNonInheritedInterfaceMethod)) != null) updateSeverity(IncompatibleNonInheritedInterfaceMethod, optionValue);
+ if ((optionValue = optionsMap.get(OPTION_ReportUndocumentedEmptyBlock)) != null) updateSeverity(UndocumentedEmptyBlock, optionValue);
+ if ((optionValue = optionsMap.get(OPTION_ReportUnnecessaryTypeCheck)) != null) updateSeverity(UnnecessaryTypeCheck, optionValue);
+ if ((optionValue = optionsMap.get(OPTION_ReportUnnecessaryElse)) != null) updateSeverity(UnnecessaryElse, optionValue);
+ if ((optionValue = optionsMap.get(OPTION_ReportFinallyBlockNotCompletingNormally)) != null) updateSeverity(FinallyBlockNotCompleting, optionValue);
+ if ((optionValue = optionsMap.get(OPTION_ReportUnqualifiedFieldAccess)) != null) updateSeverity(UnqualifiedFieldAccess, optionValue);
+ if ((optionValue = optionsMap.get(OPTION_ReportNoEffectAssignment)) != null) updateSeverity(NoEffectAssignment, optionValue);
+ if ((optionValue = optionsMap.get(OPTION_ReportUnsafeTypeOperation)) != null) updateSeverity(UnsafeTypeOperation, optionValue);
+ if ((optionValue = optionsMap.get(OPTION_ReportFinalParameterBound)) != null) updateSeverity(FinalParameterBound, optionValue);
+ if ((optionValue = optionsMap.get(OPTION_ReportMissingSerialVersion)) != null) updateSeverity(MissingSerialVersion, optionValue);
+ if ((optionValue = optionsMap.get(OPTION_ReportForbiddenReference)) != null) updateSeverity(ForbiddenReference, optionValue);
+
+ // Javadoc options
+ if ((optionValue = optionsMap.get(OPTION_DocCommentSupport)) != null) {
+ if (ENABLED.equals(optionValue)) {
+ this.docCommentSupport = true;
+ } else if (DISABLED.equals(optionValue)) {
+ this.docCommentSupport = false;
+ }
+ }
+ if ((optionValue = optionsMap.get(OPTION_ReportInvalidJavadoc)) != null) {
+ updateSeverity(InvalidJavadoc, optionValue);
+ }
+ if ((optionValue = optionsMap.get(OPTION_ReportInvalidJavadocTagsVisibility)) != null) {
+ if (PUBLIC.equals(optionValue)) {
+ this.reportInvalidJavadocTagsVisibility = AccPublic;
+ } else if (PROTECTED.equals(optionValue)) {
+ this.reportInvalidJavadocTagsVisibility = AccProtected;
+ } else if (DEFAULT.equals(optionValue)) {
+ this.reportInvalidJavadocTagsVisibility = AccDefault;
+ } else if (PRIVATE.equals(optionValue)) {
+ this.reportInvalidJavadocTagsVisibility = AccPrivate;
+ }
+ }
+ if ((optionValue = optionsMap.get(OPTION_ReportInvalidJavadocTags)) != null) {
+ if (ENABLED.equals(optionValue)) {
+ this.reportInvalidJavadocTags= true;
+ } else if (DISABLED.equals(optionValue)) {
+ this.reportInvalidJavadocTags = false;
+ }
+ }
+ if ((optionValue = optionsMap.get(OPTION_ReportMissingJavadocTags)) != null) {
+ updateSeverity(MissingJavadocTags, optionValue);
+ }
+ if ((optionValue = optionsMap.get(OPTION_ReportMissingJavadocTagsVisibility)) != null) {
+ if (PUBLIC.equals(optionValue)) {
+ this.reportMissingJavadocTagsVisibility = AccPublic;
+ } else if (PROTECTED.equals(optionValue)) {
+ this.reportMissingJavadocTagsVisibility = AccProtected;
+ } else if (DEFAULT.equals(optionValue)) {
+ this.reportMissingJavadocTagsVisibility = AccDefault;
+ } else if (PRIVATE.equals(optionValue)) {
+ this.reportMissingJavadocTagsVisibility = AccPrivate;
+ }
+ }
+ if ((optionValue = optionsMap.get(OPTION_ReportMissingJavadocTagsOverriding)) != null) {
+ if (ENABLED.equals(optionValue)) {
+ this.reportMissingJavadocTagsOverriding = true;
+ } else if (DISABLED.equals(optionValue)) {
+ this.reportMissingJavadocTagsOverriding = false;
+ }
+ }
+ if ((optionValue = optionsMap.get(OPTION_ReportMissingJavadocComments)) != null) {
+ updateSeverity(MissingJavadocComments, optionValue);
+ }
+ if ((optionValue = optionsMap.get(OPTION_ReportMissingJavadocCommentsVisibility)) != null) {
+ if (PUBLIC.equals(optionValue)) {
+ this.reportMissingJavadocCommentsVisibility = AccPublic;
+ } else if (PROTECTED.equals(optionValue)) {
+ this.reportMissingJavadocCommentsVisibility = AccProtected;
+ } else if (DEFAULT.equals(optionValue)) {
+ this.reportMissingJavadocCommentsVisibility = AccDefault;
+ } else if (PRIVATE.equals(optionValue)) {
+ this.reportMissingJavadocCommentsVisibility = AccPrivate;
+ }
+ }
+ if ((optionValue = optionsMap.get(OPTION_ReportMissingJavadocCommentsOverriding)) != null) {
+ if (ENABLED.equals(optionValue)) {
+ this.reportMissingJavadocCommentsOverriding = true;
+ } else if (DISABLED.equals(optionValue)) {
+ this.reportMissingJavadocCommentsOverriding = false;
+ }
+ }
+ }
+
+ public String toString() {
+
+ StringBuffer buf = new StringBuffer("CompilerOptions:"); //$NON-NLS-1$
+ buf.append("\n\t- local variables debug attributes: ").append((this.produceDebugAttributes & Vars) != 0 ? "ON" : " OFF"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ buf.append("\n\t- line number debug attributes: ").append((this.produceDebugAttributes & Lines) != 0 ? "ON" : " OFF"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ buf.append("\n\t- source debug attributes: ").append((this.produceDebugAttributes & Source) != 0 ? "ON" : " OFF"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ buf.append("\n\t- preserve all local variables: ").append(this.preserveAllLocalVariables ? "ON" : " OFF"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ buf.append("\n\t- method with constructor name: ").append(getSeverityString(MethodWithConstructorName)); //$NON-NLS-1$
+ buf.append("\n\t- overridden package default method: ").append(getSeverityString(OverriddenPackageDefaultMethod)); //$NON-NLS-1$
+ buf.append("\n\t- deprecation: ").append(getSeverityString(UsingDeprecatedAPI)); //$NON-NLS-1$
+ buf.append("\n\t- masked catch block: ").append(getSeverityString(MaskedCatchBlock)); //$NON-NLS-1$
+ buf.append("\n\t- unused local variable: ").append(getSeverityString(UnusedLocalVariable)); //$NON-NLS-1$
+ buf.append("\n\t- unused parameter: ").append(getSeverityString(UnusedArgument)); //$NON-NLS-1$
+ buf.append("\n\t- unused import: ").append(getSeverityString(UnusedImport)); //$NON-NLS-1$
+ buf.append("\n\t- synthetic access emulation: ").append(getSeverityString(AccessEmulation)); //$NON-NLS-1$
+ buf.append("\n\t- assignment with no effect: ").append(getSeverityString(NoEffectAssignment)); //$NON-NLS-1$
+ buf.append("\n\t- non externalized string: ").append(getSeverityString(NonExternalizedString)); //$NON-NLS-1$
+ buf.append("\n\t- static access receiver: ").append(getSeverityString(NonStaticAccessToStatic)); //$NON-NLS-1$
+ buf.append("\n\t- indirect static access: ").append(getSeverityString(IndirectStaticAccess)); //$NON-NLS-1$
+ buf.append("\n\t- incompatible non inherited interface method: ").append(getSeverityString(IncompatibleNonInheritedInterfaceMethod)); //$NON-NLS-1$
+ buf.append("\n\t- unused private member: ").append(getSeverityString(UnusedPrivateMember)); //$NON-NLS-1$
+ buf.append("\n\t- local variable hiding another variable: ").append(getSeverityString(LocalVariableHiding)); //$NON-NLS-1$
+ buf.append("\n\t- field hiding another variable: ").append(getSeverityString(FieldHiding)); //$NON-NLS-1$
+ buf.append("\n\t- possible accidental boolean assignment: ").append(getSeverityString(AccidentalBooleanAssign)); //$NON-NLS-1$
+ buf.append("\n\t- superfluous semicolon: ").append(getSeverityString(EmptyStatement)); //$NON-NLS-1$
+ buf.append("\n\t- uncommented empty block: ").append(getSeverityString(UndocumentedEmptyBlock)); //$NON-NLS-1$
+ buf.append("\n\t- unnecessary type check: ").append(getSeverityString(UnnecessaryTypeCheck)); //$NON-NLS-1$
+ buf.append("\n\t- javadoc comment support: ").append(this.docCommentSupport ? "ON" : " OFF"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ buf.append("\n\t\t+ invalid javadoc: ").append(getSeverityString(InvalidJavadoc)); //$NON-NLS-1$
+ buf.append("\n\t\t+ report invalid javadoc tags: ").append(this.reportInvalidJavadocTags ? ENABLED : DISABLED); //$NON-NLS-1$
+ buf.append("\n\t\t+ visibility level to report invalid javadoc tags: ").append(getVisibilityString(this.reportInvalidJavadocTagsVisibility)); //$NON-NLS-1$
+ buf.append("\n\t\t+ missing javadoc tags: ").append(getSeverityString(MissingJavadocTags)); //$NON-NLS-1$
+ buf.append("\n\t\t+ visibility level to report missing javadoc tags: ").append(getVisibilityString(this.reportMissingJavadocTagsVisibility)); //$NON-NLS-1$
+ buf.append("\n\t\t+ report missing javadoc tags in overriding methods: ").append(this.reportMissingJavadocTagsOverriding ? ENABLED : DISABLED); //$NON-NLS-1$
+ buf.append("\n\t\t+ missing javadoc comments: ").append(getSeverityString(MissingJavadocComments)); //$NON-NLS-1$
+ buf.append("\n\t\t+ visibility level to report missing javadoc comments: ").append(getVisibilityString(this.reportMissingJavadocCommentsVisibility)); //$NON-NLS-1$
+ buf.append("\n\t\t+ report missing javadoc comments in overriding methods: ").append(this.reportMissingJavadocCommentsOverriding ? ENABLED : DISABLED); //$NON-NLS-1$
+ buf.append("\n\t- finally block not completing normally: ").append(getSeverityString(FinallyBlockNotCompleting)); //$NON-NLS-1$
+ buf.append("\n\t- unused declared thrown exception: ").append(getSeverityString(UnusedDeclaredThrownException)); //$NON-NLS-1$
+ buf.append("\n\t- unused declared thrown exception when overriding: ").append(this.reportUnusedDeclaredThrownExceptionWhenOverriding ? ENABLED : DISABLED); //$NON-NLS-1$
+ buf.append("\n\t- unnecessary else: ").append(getSeverityString(UnnecessaryElse)); //$NON-NLS-1$
+ buf.append("\n\t- JDK compliance level: "+ versionFromJdkLevel(this.complianceLevel)); //$NON-NLS-1$
+ buf.append("\n\t- JDK source level: "+ versionFromJdkLevel(this.sourceLevel)); //$NON-NLS-1$
+ buf.append("\n\t- JDK target level: "+ versionFromJdkLevel(this.targetJDK)); //$NON-NLS-1$
+ buf.append("\n\t- private constructor access: ").append(this.isPrivateConstructorAccessChangingVisibility ? "extra argument" : "make default access"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ buf.append("\n\t- verbose : ").append(this.verbose ? "ON" : "OFF"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ buf.append("\n\t- produce reference info : ").append(this.produceReferenceInfo ? "ON" : "OFF"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ buf.append("\n\t- parse literal expressions as constants : ").append(this.parseLiteralExpressionsAsConstants ? "ON" : "OFF"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ buf.append("\n\t- encoding : ").append(this.defaultEncoding == null ? "<default>" : this.defaultEncoding); //$NON-NLS-1$ //$NON-NLS-2$
+ buf.append("\n\t- task tags: ").append(this.taskTags == null ? "" : new String(CharOperation.concatWith(this.taskTags,','))); //$NON-NLS-1$ //$NON-NLS-2$
+ buf.append("\n\t- task priorities : ").append(this.taskPriorites == null ? "" : new String(CharOperation.concatWith(this.taskPriorites,','))); //$NON-NLS-1$ //$NON-NLS-2$
+ buf.append("\n\t- report deprecation inside deprecated code : ").append(this.reportDeprecationInsideDeprecatedCode ? ENABLED : DISABLED); //$NON-NLS-1$
+ buf.append("\n\t- report deprecation when overriding deprecated method : ").append(this.reportDeprecationWhenOverridingDeprecatedMethod ? ENABLED : DISABLED); //$NON-NLS-1$
+ buf.append("\n\t- report unused parameter when implementing abstract method : ").append(this.reportUnusedParameterWhenImplementingAbstract ? ENABLED : DISABLED); //$NON-NLS-1$
+ buf.append("\n\t- report unused parameter when overriding concrete method : ").append(this.reportUnusedParameterWhenOverridingConcrete ? ENABLED : DISABLED); //$NON-NLS-1$
+ buf.append("\n\t- report constructor/setter parameter hiding existing field : ").append(this.reportSpecialParameterHidingField ? ENABLED : DISABLED); //$NON-NLS-1$
+ buf.append("\n\t- inline JSR bytecode : ").append(this.inlineJsrBytecode ? ENABLED : DISABLED); //$NON-NLS-1$
+ buf.append("\n\t- unsafe type operation: ").append(getSeverityString(UnsafeTypeOperation)); //$NON-NLS-1$
+ buf.append("\n\t- final bound for type parameter: ").append(getSeverityString(FinalParameterBound)); //$NON-NLS-1$
+ buf.append("\n\t- missing serialVersionUID: ").append(getSeverityString(MissingSerialVersion)); //$NON-NLS-1$
+ buf.append("\n\t- forbidden reference to non-API type: ").append(getSeverityString(ForbiddenReference)); //$NON-NLS-1$
+ return buf.toString();
+ }
+
+ void updateSeverity(long irritant, Object severityString) {
+ if (ERROR.equals(severityString)) {
+ this.errorThreshold |= irritant;
+ this.warningThreshold &= ~irritant;
+ } else if (WARNING.equals(severityString)) {
+ this.errorThreshold &= ~irritant;
+ this.warningThreshold |= irritant;
+ } else if (IGNORE.equals(severityString)) {
+ this.errorThreshold &= ~irritant;
+ this.warningThreshold &= ~irritant;
+ }
+ }
+ public static long versionToJdkLevel(Object versionID) {
+ if (VERSION_1_1.equals(versionID)) {
+ return JDK1_1;
+ } else if (VERSION_1_2.equals(versionID)) {
+ return JDK1_2;
+ } else if (VERSION_1_3.equals(versionID)) {
+ return JDK1_3;
+ } else if (VERSION_1_4.equals(versionID)) {
+ return JDK1_4;
+ } else if (VERSION_1_5.equals(versionID)) {
+ return JDK1_5;
+ }
+ return 0; // unknown
+ }
+
+ public static String versionFromJdkLevel(long jdkLevel) {
+ if (jdkLevel == JDK1_1) {
+ return VERSION_1_1;
+ } else if (jdkLevel == JDK1_2) {
+ return VERSION_1_2;
+ } else if (jdkLevel == JDK1_3) {
+ return VERSION_1_3;
+ } else if (jdkLevel == JDK1_4) {
+ return VERSION_1_4;
+ } else if (jdkLevel == JDK1_5) {
+ return VERSION_1_5;
+ }
+ return ""; // unknown version //$NON-NLS-1$
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/Constant.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/Constant.js
new file mode 100644
index 0000000..a625b0a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/Constant.js
@@ -0,0 +1,1611 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.impl;
+
+import org.eclipse.wst.jsdt.internal.compiler.ast.OperatorIds;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeIds;
+import org.eclipse.wst.jsdt.internal.compiler.problem.ShouldNotImplement;
+import org.eclipse.wst.jsdt.internal.compiler.util.Util;
+
+public abstract class Constant implements TypeIds, OperatorIds {
+
+ public static final Constant NotAConstant = new DoubleConstant(Double.NaN);
+
+ public static final IntConstant Zero = new IntConstant(0);
+ public static final IntConstant Two = new IntConstant(2);
+ public static final IntConstant One = new IntConstant(1);
+
+ public boolean booleanValue() {
+
+ throw new ShouldNotImplement(Util.bind("constant.cannotCastedInto",typeName(),"boolean")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ public byte byteValue() {
+
+ throw new ShouldNotImplement(Util.bind("constant.cannotCastedInto",typeName(),"byte")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ public final Constant castTo(int conversionToTargetType){
+ //the cast is an int of the form
+ // (castId<<4)+typeId (in order to follow the
+ //user written style (cast)expression ....
+
+ if (this == NotAConstant) return NotAConstant;
+ switch(conversionToTargetType){
+ case T_undefined : return this;
+ // TARGET TYPE <- FROM TYPE
+ // case (T_undefined<<4)+T_undefined : return NotAConstant;
+ // case (T_undefined<<4)+T_byte : return NotAConstant;
+ // case (T_undefined<<4)+T_long : return NotAConstant;
+ // case (T_undefined<<4)+T_short : return NotAConstant;
+ // case (T_undefined<<4)+T_void : return NotAConstant;
+ // case (T_undefined<<4)+T_String : return NotAConstant;
+ // case (T_undefined<<4)+T_Object : return NotAConstant;
+ // case (T_undefined<<4)+T_double : return NotAConstant;
+ // case (T_undefined<<4)+T_float : return NotAConstant;
+ // case (T_undefined<<4)+T_boolean : return NotAConstant;
+ // case (T_undefined<<4)+T_char : return NotAConstant;
+ // case (T_undefined<<4)+T_int : return NotAConstant;
+
+ // case (T_byte<<4)+T_undefined : return NotAConstant;
+ case (T_byte<<4)+T_byte : return this;
+ case (T_byte<<4)+T_long : return Constant.fromValue((byte)this.longValue());
+ case (T_byte<<4)+T_short : return Constant.fromValue((byte)this.shortValue());
+ // case (T_byte<<4)+T_void : return NotAConstant;
+ // case (T_byte<<4)+T_String : return NotAConstant;
+ // case (T_byte<<4)+T_Object : return NotAConstant;
+ case (T_byte<<4)+T_double : return Constant.fromValue((byte)this.doubleValue());
+ case (T_byte<<4)+T_float : return Constant.fromValue((byte)this.floatValue());
+ // case (T_byte<<4)+T_boolean : return NotAConstant;
+ case (T_byte<<4)+T_char : return Constant.fromValue((byte)this.charValue());
+ case (T_byte<<4)+T_int : return Constant.fromValue((byte)this.intValue());
+
+ // case (T_long<<4)+T_undefined : return NotAConstant;
+ case (T_long<<4)+T_byte : return Constant.fromValue((long)this.byteValue());
+ case (T_long<<4)+T_long : return this;
+ case (T_long<<4)+T_short : return Constant.fromValue((long)this.shortValue());
+ // case (T_long<<4)+T_void : return NotAConstant;
+ // case (T_long<<4)+T_String : return NotAConstant;
+ // case (T_long<<4)+T_Object : return NotAConstant;
+ case (T_long<<4)+T_double : return Constant.fromValue((long)this.doubleValue());
+ case (T_long<<4)+T_float : return Constant.fromValue((long)this.floatValue());
+ // case (T_long<<4)+T_boolean : return NotAConstant;
+ case (T_long<<4)+T_char : return Constant.fromValue((long)this.charValue());
+ case (T_long<<4)+T_int : return Constant.fromValue((long)this.intValue());
+
+ // case (T_short<<4)+T_undefined : return NotAConstant;
+ case (T_short<<4)+T_byte : return Constant.fromValue((short)this.byteValue());
+ case (T_short<<4)+T_long : return Constant.fromValue((short)this.longValue());
+ case (T_short<<4)+T_short : return this;
+ // case (T_short<<4)+T_void : return NotAConstant;
+ // case (T_short<<4)+T_String : return NotAConstant;
+ // case (T_short<<4)+T_Object : return NotAConstant;
+ case (T_short<<4)+T_double : return Constant.fromValue((short)this.doubleValue());
+ case (T_short<<4)+T_float : return Constant.fromValue((short)this.floatValue());
+ // case (T_short<<4)+T_boolean : return NotAConstant;
+ case (T_short<<4)+T_char : return Constant.fromValue((short)this.charValue());
+ case (T_short<<4)+T_int : return Constant.fromValue((short)this.intValue());
+
+ // case (T_void<<4)+T_undefined : return NotAConstant;
+ // case (T_void<<4)+T_byte : return NotAConstant;
+ // case (T_void<<4)+T_long : return NotAConstant;
+ // case (T_void<<4)+T_short : return NotAConstant;
+ // case (T_void<<4)+T_void : return NotAConstant;
+ // case (T_void<<4)+T_String : return NotAConstant;
+ // case (T_void<<4)+T_Object : return NotAConstant;
+ // case (T_void<<4)+T_double : return NotAConstant;
+ // case (T_void<<4)+T_float : return NotAConstant;
+ // case (T_void<<4)+T_boolean : return NotAConstant;
+ // case (T_void<<4)+T_char : return NotAConstant;
+ // case (T_void<<4)+T_int : return NotAConstant;
+
+ // case (T_String<<4)+T_undefined : return NotAConstant;
+ // case (T_String<<4)+T_byte : return NotAConstant;
+ // case (T_String<<4)+T_long : return NotAConstant;
+ // case (T_String<<4)+T_short : return NotAConstant;
+ // case (T_String<<4)+T_void : return NotAConstant;
+ case (T_String<<4)+T_String : return this;
+ // case (T_String<<4)+T_Object : return NotAConstant;
+ // case (T_String<<4)+T_double : return NotAConstant;
+ // case (T_String<<4)+T_float : return NotAConstant;
+ // case (T_String<<4)+T_boolean : return NotAConstant;
+ // case (T_String<<4)+T_char : return NotAConstant;
+ // case (T_String<<4)+T_int : return NotAConstant;
+
+ // case (T_Object<<4)+T_undefined : return NotAConstant;
+ // case (T_Object<<4)+T_byte : return NotAConstant;
+ // case (T_Object<<4)+T_long : return NotAConstant;
+ // case (T_Object<<4)+T_short : return NotAConstant;
+ // case (T_Object<<4)+T_void : return NotAConstant;
+ // case (T_Object<<4)+T_String : return NotAConstant;
+ // case (T_Object<<4)+T_Object : return NotAConstant;
+ // case (T_Object<<4)+T_double : return NotAConstant;
+ // case (T_Object<<4)+T_float : return NotAConstant;
+ // case (T_Object<<4)+T_boolean : return NotAConstant;
+ // case (T_Object<<4)+T_char : return NotAConstant;
+ // case (T_Object<<4)+T_int : return NotAConstant;
+
+ // case (T_double<<4)+T_undefined : return NotAConstant;
+ case (T_double<<4)+T_byte : return Constant.fromValue((double)this.byteValue());
+ case (T_double<<4)+T_long : return Constant.fromValue((double)this.longValue());
+ case (T_double<<4)+T_short : return Constant.fromValue((double)this.shortValue());
+ // case (T_double<<4)+T_void : return NotAConstant;
+ // case (T_double<<4)+T_String : return NotAConstant;
+ // case (T_double<<4)+T_Object : return NotAConstant;
+ case (T_double<<4)+T_double : return this;
+ case (T_double<<4)+T_float : return Constant.fromValue((double)this.floatValue());
+ // case (T_double<<4)+T_boolean : return NotAConstant;
+ case (T_double<<4)+T_char : return Constant.fromValue((double)this.charValue());
+ case (T_double<<4)+T_int : return Constant.fromValue((double)this.intValue());
+
+ // case (T_float<<4)+T_undefined : return NotAConstant;
+ case (T_float<<4)+T_byte : return Constant.fromValue((float)this.byteValue());
+ case (T_float<<4)+T_long : return Constant.fromValue((float)this.longValue());
+ case (T_float<<4)+T_short : return Constant.fromValue((float)this.shortValue());
+ // case (T_float<<4)+T_void : return NotAConstant;
+ // case (T_float<<4)+T_String : return NotAConstant;
+ // case (T_float<<4)+T_Object : return NotAConstant;
+ case (T_float<<4)+T_double : return Constant.fromValue((float)this.doubleValue());
+ case (T_float<<4)+T_float : return this;
+ // case (T_float<<4)+T_boolean : return NotAConstant;
+ case (T_float<<4)+T_char : return Constant.fromValue((float)this.charValue());
+ case (T_float<<4)+T_int : return Constant.fromValue((float)this.intValue());
+
+ // case (T_boolean<<4)+T_undefined : return NotAConstant;
+ // case (T_boolean<<4)+T_byte : return NotAConstant;
+ // case (T_boolean<<4)+T_long : return NotAConstant;
+ // case (T_boolean<<4)+T_short : return NotAConstant;
+ // case (T_boolean<<4)+T_void : return NotAConstant;
+ // case (T_boolean<<4)+T_String : return NotAConstant;
+ // case (T_boolean<<4)+T_Object : return NotAConstant;
+ // case (T_boolean<<4)+T_double : return NotAConstant;
+ // case (T_boolean<<4)+T_float : return NotAConstant;
+ case (T_boolean<<4)+T_boolean : return this;
+ // case (T_boolean<<4)+T_char : return NotAConstant;
+ // case (T_boolean<<4)+T_int : return NotAConstant;
+
+ // case (T_char<<4)+T_undefined : return NotAConstant;
+ case (T_char<<4)+T_byte : return Constant.fromValue((char)this.byteValue());
+ case (T_char<<4)+T_long : return Constant.fromValue((char)this.longValue());
+ case (T_char<<4)+T_short : return Constant.fromValue((char)this.shortValue());
+ // case (T_char<<4)+T_void : return NotAConstant;
+ // case (T_char<<4)+T_String : return NotAConstant;
+ // case (T_char<<4)+T_Object : return NotAConstant;
+ case (T_char<<4)+T_double : return Constant.fromValue((char)this.doubleValue());
+ case (T_char<<4)+T_float : return Constant.fromValue((char)this.floatValue());
+ // case (T_char<<4)+T_boolean : return NotAConstant;
+ case (T_char<<4)+T_char : return this;
+ case (T_char<<4)+T_int : return Constant.fromValue((char)this.intValue());
+
+ // case (T_int<<4)+T_undefined : return NotAConstant;
+ case (T_int<<4)+T_byte : return Constant.fromValue((int)this.byteValue());
+ case (T_int<<4)+T_long : return Constant.fromValue((int)this.longValue());
+ case (T_int<<4)+T_short : return Constant.fromValue((int)this.shortValue());
+ // case (T_int<<4)+T_void : return NotAConstant;
+ // case (T_int<<4)+T_String : return NotAConstant;
+ // case (T_int<<4)+T_Object : return NotAConstant;
+ case (T_int<<4)+T_double : return Constant.fromValue((int)this.doubleValue());
+ case (T_int<<4)+T_float : return Constant.fromValue((int)this.floatValue());
+ // case (T_int<<4)+T_boolean : return NotAConstant;
+ case (T_int<<4)+T_char : return Constant.fromValue((int)this.charValue());
+ case (T_int<<4)+T_int : return this;
+
+ }
+
+ return NotAConstant;
+ }
+
+ public char charValue() {
+
+ throw new ShouldNotImplement(Util.bind("constant.cannotCastedInto",typeName(),"char")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ public static final Constant computeConstantOperation(Constant cst, int id, int operator) {
+
+ switch (operator) {
+ case NOT :
+ return Constant.fromValue(!cst.booleanValue());
+ case PLUS : return cst;
+ case MINUS : //the two special -9223372036854775808L and -2147483648 are inlined at parseTime
+ switch (id){
+ case T_float : float f;
+ if ( (f= cst.floatValue()) == 0.0f)
+ { //positive and negative 0....
+ if (Float.floatToIntBits(f) == 0)
+ return Constant.fromValue(-0.0f);
+ else
+ return Constant.fromValue(0.0f);}
+ break; //default case
+ case T_double : double d;
+ if ( (d= cst.doubleValue()) == 0.0d)
+ { //positive and negative 0....
+ if (Double.doubleToLongBits(d) == 0)
+ return Constant.fromValue(-0.0d);
+ else
+ return Constant.fromValue(0.0d);}
+ break; //default case
+ }
+ return computeConstantOperationMINUS(Zero,T_int,operator,cst,id);
+ case TWIDDLE:
+ switch (id){
+ case T_char : return Constant.fromValue(~ cst.charValue());
+ case T_byte: return Constant.fromValue(~ cst.byteValue());
+ case T_short: return Constant.fromValue(~ cst.shortValue());
+ case T_int: return Constant.fromValue(~ cst.intValue());
+ case T_long: return Constant.fromValue(~ cst.longValue());
+ default : return NotAConstant;
+ }
+ default : return NotAConstant;
+ }
+ }
+
+ public static final Constant computeConstantOperation(Constant left, int leftId, int operator, Constant right, int rightId) {
+
+ switch (operator) {
+ case AND : return computeConstantOperationAND (left,leftId,operator,right,rightId);
+ case AND_AND : return computeConstantOperationAND_AND (left,leftId,operator,right,rightId);
+ case DIVIDE : return computeConstantOperationDIVIDE (left,leftId,operator,right,rightId);
+ case GREATER : return computeConstantOperationGREATER (left,leftId,operator,right,rightId);
+ case GREATER_EQUAL : return computeConstantOperationGREATER_EQUAL(left,leftId,operator,right,rightId);
+ case LEFT_SHIFT : return computeConstantOperationLEFT_SHIFT (left,leftId,operator,right,rightId);
+ case LESS : return computeConstantOperationLESS (left,leftId,operator,right,rightId);
+ case LESS_EQUAL : return computeConstantOperationLESS_EQUAL (left,leftId,operator,right,rightId);
+ case MINUS : return computeConstantOperationMINUS (left,leftId,operator,right,rightId);
+ case MULTIPLY : return computeConstantOperationMULTIPLY (left,leftId,operator,right,rightId);
+ case OR : return computeConstantOperationOR (left,leftId,operator,right,rightId);
+ case OR_OR : return computeConstantOperationOR_OR (left,leftId,operator,right,rightId);
+ case PLUS : return computeConstantOperationPLUS (left,leftId,operator,right,rightId);
+ case REMAINDER : return computeConstantOperationREMAINDER (left,leftId,operator,right,rightId);
+ case RIGHT_SHIFT: return computeConstantOperationRIGHT_SHIFT(left,leftId,operator,right,rightId);
+ case UNSIGNED_RIGHT_SHIFT: return computeConstantOperationUNSIGNED_RIGHT_SHIFT(left,leftId,operator,right,rightId);
+ case XOR : return computeConstantOperationXOR (left,leftId,operator,right,rightId);
+
+ default : return NotAConstant;
+ }
+ }
+
+ public static final Constant computeConstantOperationAND(Constant left, int leftId, int operator, Constant right, int rightId) {
+
+ switch (leftId){
+ case T_boolean : return Constant.fromValue(left.booleanValue() & right.booleanValue());
+ case T_char :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.charValue() & right.charValue());
+ case T_byte: return Constant.fromValue(left.charValue() & right.byteValue());
+ case T_short: return Constant.fromValue(left.charValue() & right.shortValue());
+ case T_int: return Constant.fromValue(left.charValue() & right.intValue());
+ case T_long: return Constant.fromValue(left.charValue() & right.longValue());
+ }
+ break;
+ case T_byte :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.byteValue() & right.charValue());
+ case T_byte: return Constant.fromValue(left.byteValue() & right.byteValue());
+ case T_short: return Constant.fromValue(left.byteValue() & right.shortValue());
+ case T_int: return Constant.fromValue(left.byteValue() & right.intValue());
+ case T_long: return Constant.fromValue(left.byteValue() & right.longValue());
+ }
+ break;
+ case T_short :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.shortValue() & right.charValue());
+ case T_byte: return Constant.fromValue(left.shortValue() & right.byteValue());
+ case T_short: return Constant.fromValue(left.shortValue() & right.shortValue());
+ case T_int: return Constant.fromValue(left.shortValue() & right.intValue());
+ case T_long: return Constant.fromValue(left.shortValue() & right.longValue());
+ }
+ break;
+ case T_int :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.intValue() & right.charValue());
+ case T_byte: return Constant.fromValue(left.intValue() & right.byteValue());
+ case T_short: return Constant.fromValue(left.intValue() & right.shortValue());
+ case T_int: return Constant.fromValue(left.intValue() & right.intValue());
+ case T_long: return Constant.fromValue(left.intValue() & right.longValue());
+ }
+ break;
+ case T_long :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.longValue() & right.charValue());
+ case T_byte: return Constant.fromValue(left.longValue() & right.byteValue());
+ case T_short: return Constant.fromValue(left.longValue() & right.shortValue());
+ case T_int: return Constant.fromValue(left.longValue() & right.intValue());
+ case T_long: return Constant.fromValue(left.longValue() & right.longValue());
+ }
+ }
+
+ return NotAConstant;
+ }
+
+ public static final Constant computeConstantOperationAND_AND(Constant left, int leftId, int operator, Constant right, int rightId) {
+
+ return Constant.fromValue(left.booleanValue() && right.booleanValue());
+ }
+
+ public static final Constant computeConstantOperationDIVIDE(Constant left, int leftId, int operator, Constant right, int rightId) {
+ // division by zero must be handled outside this method (error reporting)
+
+ switch (leftId){
+ case T_char :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.charValue() / right.charValue());
+ case T_float: return Constant.fromValue(left.charValue() / right.floatValue());
+ case T_double: return Constant.fromValue(left.charValue() / right.doubleValue());
+ case T_byte: return Constant.fromValue(left.charValue() / right.byteValue());
+ case T_short: return Constant.fromValue(left.charValue() / right.shortValue());
+ case T_int: return Constant.fromValue(left.charValue() / right.intValue());
+ case T_long: return Constant.fromValue(left.charValue() / right.longValue());
+ }
+ break;
+ case T_float :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.floatValue() / right.charValue());
+ case T_float: return Constant.fromValue(left.floatValue() / right.floatValue());
+ case T_double: return Constant.fromValue(left.floatValue() / right.doubleValue());
+ case T_byte: return Constant.fromValue(left.floatValue() / right.byteValue());
+ case T_short: return Constant.fromValue(left.floatValue() / right.shortValue());
+ case T_int: return Constant.fromValue(left.floatValue() / right.intValue());
+ case T_long: return Constant.fromValue(left.floatValue() / right.longValue());
+ }
+ break;
+ case T_double :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.doubleValue() / right.charValue());
+ case T_float: return Constant.fromValue(left.doubleValue() / right.floatValue());
+ case T_double: return Constant.fromValue(left.doubleValue() / right.doubleValue());
+ case T_byte: return Constant.fromValue(left.doubleValue() / right.byteValue());
+ case T_short: return Constant.fromValue(left.doubleValue() / right.shortValue());
+ case T_int: return Constant.fromValue(left.doubleValue() / right.intValue());
+ case T_long: return Constant.fromValue(left.doubleValue() / right.longValue());
+ }
+ break;
+ case T_byte :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.byteValue() / right.charValue());
+ case T_float: return Constant.fromValue(left.byteValue() / right.floatValue());
+ case T_double: return Constant.fromValue(left.byteValue() / right.doubleValue());
+ case T_byte: return Constant.fromValue(left.byteValue() / right.byteValue());
+ case T_short: return Constant.fromValue(left.byteValue() / right.shortValue());
+ case T_int: return Constant.fromValue(left.byteValue() / right.intValue());
+ case T_long: return Constant.fromValue(left.byteValue() / right.longValue());
+ }
+ break;
+ case T_short :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.shortValue() / right.charValue());
+ case T_float: return Constant.fromValue(left.shortValue() / right.floatValue());
+ case T_double: return Constant.fromValue(left.shortValue() / right.doubleValue());
+ case T_byte: return Constant.fromValue(left.shortValue() / right.byteValue());
+ case T_short: return Constant.fromValue(left.shortValue() / right.shortValue());
+ case T_int: return Constant.fromValue(left.shortValue() / right.intValue());
+ case T_long: return Constant.fromValue(left.shortValue() / right.longValue());
+ }
+ break;
+ case T_int :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.intValue() / right.charValue());
+ case T_float: return Constant.fromValue(left.intValue() / right.floatValue());
+ case T_double: return Constant.fromValue(left.intValue() / right.doubleValue());
+ case T_byte: return Constant.fromValue(left.intValue() / right.byteValue());
+ case T_short: return Constant.fromValue(left.intValue() / right.shortValue());
+ case T_int: return Constant.fromValue(left.intValue() / right.intValue());
+ case T_long: return Constant.fromValue(left.intValue() / right.longValue());
+ }
+ break;
+ case T_long :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.longValue() / right.charValue());
+ case T_float: return Constant.fromValue(left.longValue() / right.floatValue());
+ case T_double: return Constant.fromValue(left.longValue() / right.doubleValue());
+ case T_byte: return Constant.fromValue(left.longValue() / right.byteValue());
+ case T_short: return Constant.fromValue(left.longValue() / right.shortValue());
+ case T_int: return Constant.fromValue(left.longValue() / right.intValue());
+ case T_long: return Constant.fromValue(left.longValue() / right.longValue());
+ }
+
+ }
+
+ return NotAConstant;
+ }
+
+ public static final Constant computeConstantOperationEQUAL_EQUAL(Constant left, int leftId, int operator, Constant right, int rightId) {
+
+ switch (leftId){
+ case T_boolean :
+ if (rightId == T_boolean) {
+ return Constant.fromValue(left.booleanValue() == right.booleanValue());
+ }
+ break;
+ case T_char :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.charValue() == right.charValue());
+ case T_float: return Constant.fromValue(left.charValue() == right.floatValue());
+ case T_double: return Constant.fromValue(left.charValue() == right.doubleValue());
+ case T_byte: return Constant.fromValue(left.charValue() == right.byteValue());
+ case T_short: return Constant.fromValue(left.charValue() == right.shortValue());
+ case T_int: return Constant.fromValue(left.charValue() == right.intValue());
+ case T_long: return Constant.fromValue(left.charValue() == right.longValue());}
+ break;
+ case T_float :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.floatValue() == right.charValue());
+ case T_float: return Constant.fromValue(left.floatValue() == right.floatValue());
+ case T_double: return Constant.fromValue(left.floatValue() == right.doubleValue());
+ case T_byte: return Constant.fromValue(left.floatValue() == right.byteValue());
+ case T_short: return Constant.fromValue(left.floatValue() == right.shortValue());
+ case T_int: return Constant.fromValue(left.floatValue() == right.intValue());
+ case T_long: return Constant.fromValue(left.floatValue() == right.longValue());
+ }
+ break;
+ case T_double :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.doubleValue() == right.charValue());
+ case T_float: return Constant.fromValue(left.doubleValue() == right.floatValue());
+ case T_double: return Constant.fromValue(left.doubleValue() == right.doubleValue());
+ case T_byte: return Constant.fromValue(left.doubleValue() == right.byteValue());
+ case T_short: return Constant.fromValue(left.doubleValue() == right.shortValue());
+ case T_int: return Constant.fromValue(left.doubleValue() == right.intValue());
+ case T_long: return Constant.fromValue(left.doubleValue() == right.longValue());
+ }
+ break;
+ case T_byte :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.byteValue() == right.charValue());
+ case T_float: return Constant.fromValue(left.byteValue() == right.floatValue());
+ case T_double: return Constant.fromValue(left.byteValue() == right.doubleValue());
+ case T_byte: return Constant.fromValue(left.byteValue() == right.byteValue());
+ case T_short: return Constant.fromValue(left.byteValue() == right.shortValue());
+ case T_int: return Constant.fromValue(left.byteValue() == right.intValue());
+ case T_long: return Constant.fromValue(left.byteValue() == right.longValue());
+ }
+ break;
+ case T_short :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.shortValue() == right.charValue());
+ case T_float: return Constant.fromValue(left.shortValue() == right.floatValue());
+ case T_double: return Constant.fromValue(left.shortValue() == right.doubleValue());
+ case T_byte: return Constant.fromValue(left.shortValue() == right.byteValue());
+ case T_short: return Constant.fromValue(left.shortValue() == right.shortValue());
+ case T_int: return Constant.fromValue(left.shortValue() == right.intValue());
+ case T_long: return Constant.fromValue(left.shortValue() == right.longValue());
+ }
+ break;
+ case T_int :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.intValue() == right.charValue());
+ case T_float: return Constant.fromValue(left.intValue() == right.floatValue());
+ case T_double: return Constant.fromValue(left.intValue() == right.doubleValue());
+ case T_byte: return Constant.fromValue(left.intValue() == right.byteValue());
+ case T_short: return Constant.fromValue(left.intValue() == right.shortValue());
+ case T_int: return Constant.fromValue(left.intValue() == right.intValue());
+ case T_long: return Constant.fromValue(left.intValue() == right.longValue());
+ }
+ break;
+ case T_long :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.longValue() == right.charValue());
+ case T_float: return Constant.fromValue(left.longValue() == right.floatValue());
+ case T_double: return Constant.fromValue(left.longValue() == right.doubleValue());
+ case T_byte: return Constant.fromValue(left.longValue() == right.byteValue());
+ case T_short: return Constant.fromValue(left.longValue() == right.shortValue());
+ case T_int: return Constant.fromValue(left.longValue() == right.intValue());
+ case T_long: return Constant.fromValue(left.longValue() == right.longValue());
+ }
+ break;
+ case T_String :
+ if (rightId == T_String) {
+ //String are interned in th compiler==>thus if two string constant
+ //get to be compared, it is an equal on the vale which is done
+ return Constant.fromValue(((StringConstant)left).compileTimeEqual((StringConstant)right));
+ }
+ break;
+ case T_null :
+ if (rightId == T_String) {
+ return Constant.fromValue(false);
+ } else {
+ if (rightId == T_null) {
+ return Constant.fromValue(true);
+ }
+ }
+ }
+
+ return Constant.fromValue(false);
+ }
+
+ public static final Constant computeConstantOperationGREATER(Constant left, int leftId, int operator, Constant right, int rightId) {
+
+ switch (leftId){
+ case T_char :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.charValue() > right.charValue());
+ case T_float: return Constant.fromValue(left.charValue() > right.floatValue());
+ case T_double: return Constant.fromValue(left.charValue() > right.doubleValue());
+ case T_byte: return Constant.fromValue(left.charValue() > right.byteValue());
+ case T_short: return Constant.fromValue(left.charValue() > right.shortValue());
+ case T_int: return Constant.fromValue(left.charValue() > right.intValue());
+ case T_long: return Constant.fromValue(left.charValue() > right.longValue());
+ }
+ break;
+ case T_float :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.floatValue() > right.charValue());
+ case T_float: return Constant.fromValue(left.floatValue() > right.floatValue());
+ case T_double: return Constant.fromValue(left.floatValue() > right.doubleValue());
+ case T_byte: return Constant.fromValue(left.floatValue() > right.byteValue());
+ case T_short: return Constant.fromValue(left.floatValue() > right.shortValue());
+ case T_int: return Constant.fromValue(left.floatValue() > right.intValue());
+ case T_long: return Constant.fromValue(left.floatValue() > right.longValue());
+ }
+ break;
+ case T_double :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.doubleValue() > right.charValue());
+ case T_float: return Constant.fromValue(left.doubleValue() > right.floatValue());
+ case T_double: return Constant.fromValue(left.doubleValue() > right.doubleValue());
+ case T_byte: return Constant.fromValue(left.doubleValue() > right.byteValue());
+ case T_short: return Constant.fromValue(left.doubleValue() > right.shortValue());
+ case T_int: return Constant.fromValue(left.doubleValue() > right.intValue());
+ case T_long: return Constant.fromValue(left.doubleValue() > right.longValue());
+ }
+ break;
+ case T_byte :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.byteValue() > right.charValue());
+ case T_float: return Constant.fromValue(left.byteValue() > right.floatValue());
+ case T_double: return Constant.fromValue(left.byteValue() > right.doubleValue());
+ case T_byte: return Constant.fromValue(left.byteValue() > right.byteValue());
+ case T_short: return Constant.fromValue(left.byteValue() > right.shortValue());
+ case T_int: return Constant.fromValue(left.byteValue() > right.intValue());
+ case T_long: return Constant.fromValue(left.byteValue() > right.longValue());
+ }
+ break;
+ case T_short :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.shortValue() > right.charValue());
+ case T_float: return Constant.fromValue(left.shortValue() > right.floatValue());
+ case T_double: return Constant.fromValue(left.shortValue() > right.doubleValue());
+ case T_byte: return Constant.fromValue(left.shortValue() > right.byteValue());
+ case T_short: return Constant.fromValue(left.shortValue() > right.shortValue());
+ case T_int: return Constant.fromValue(left.shortValue() > right.intValue());
+ case T_long: return Constant.fromValue(left.shortValue() > right.longValue());
+ }
+ break;
+ case T_int :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.intValue() > right.charValue());
+ case T_float: return Constant.fromValue(left.intValue() > right.floatValue());
+ case T_double: return Constant.fromValue(left.intValue() > right.doubleValue());
+ case T_byte: return Constant.fromValue(left.intValue() > right.byteValue());
+ case T_short: return Constant.fromValue(left.intValue() > right.shortValue());
+ case T_int: return Constant.fromValue(left.intValue() > right.intValue());
+ case T_long: return Constant.fromValue(left.intValue() > right.longValue());
+ }
+ break;
+ case T_long :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.longValue() > right.charValue());
+ case T_float: return Constant.fromValue(left.longValue() > right.floatValue());
+ case T_double: return Constant.fromValue(left.longValue() > right.doubleValue());
+ case T_byte: return Constant.fromValue(left.longValue() > right.byteValue());
+ case T_short: return Constant.fromValue(left.longValue() > right.shortValue());
+ case T_int: return Constant.fromValue(left.longValue() > right.intValue());
+ case T_long: return Constant.fromValue(left.longValue() > right.longValue());
+ }
+
+ }
+
+ return NotAConstant;
+ }
+
+ public static final Constant computeConstantOperationGREATER_EQUAL(Constant left, int leftId, int operator, Constant right, int rightId) {
+
+ switch (leftId){
+ case T_char :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.charValue() >= right.charValue());
+ case T_float: return Constant.fromValue(left.charValue() >= right.floatValue());
+ case T_double: return Constant.fromValue(left.charValue() >= right.doubleValue());
+ case T_byte: return Constant.fromValue(left.charValue() >= right.byteValue());
+ case T_short: return Constant.fromValue(left.charValue() >= right.shortValue());
+ case T_int: return Constant.fromValue(left.charValue() >= right.intValue());
+ case T_long: return Constant.fromValue(left.charValue() >= right.longValue());
+ }
+ break;
+ case T_float :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.floatValue() >= right.charValue());
+ case T_float: return Constant.fromValue(left.floatValue() >= right.floatValue());
+ case T_double: return Constant.fromValue(left.floatValue() >= right.doubleValue());
+ case T_byte: return Constant.fromValue(left.floatValue() >= right.byteValue());
+ case T_short: return Constant.fromValue(left.floatValue() >= right.shortValue());
+ case T_int: return Constant.fromValue(left.floatValue() >= right.intValue());
+ case T_long: return Constant.fromValue(left.floatValue() >= right.longValue());
+ }
+ break;
+ case T_double :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.doubleValue() >= right.charValue());
+ case T_float: return Constant.fromValue(left.doubleValue() >= right.floatValue());
+ case T_double: return Constant.fromValue(left.doubleValue() >= right.doubleValue());
+ case T_byte: return Constant.fromValue(left.doubleValue() >= right.byteValue());
+ case T_short: return Constant.fromValue(left.doubleValue() >= right.shortValue());
+ case T_int: return Constant.fromValue(left.doubleValue() >= right.intValue());
+ case T_long: return Constant.fromValue(left.doubleValue() >= right.longValue());
+ }
+ break;
+ case T_byte :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.byteValue() >= right.charValue());
+ case T_float: return Constant.fromValue(left.byteValue() >= right.floatValue());
+ case T_double: return Constant.fromValue(left.byteValue() >= right.doubleValue());
+ case T_byte: return Constant.fromValue(left.byteValue() >= right.byteValue());
+ case T_short: return Constant.fromValue(left.byteValue() >= right.shortValue());
+ case T_int: return Constant.fromValue(left.byteValue() >= right.intValue());
+ case T_long: return Constant.fromValue(left.byteValue() >= right.longValue());
+ }
+ break;
+ case T_short :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.shortValue() >= right.charValue());
+ case T_float: return Constant.fromValue(left.shortValue() >= right.floatValue());
+ case T_double: return Constant.fromValue(left.shortValue() >= right.doubleValue());
+ case T_byte: return Constant.fromValue(left.shortValue() >= right.byteValue());
+ case T_short: return Constant.fromValue(left.shortValue() >= right.shortValue());
+ case T_int: return Constant.fromValue(left.shortValue() >= right.intValue());
+ case T_long: return Constant.fromValue(left.shortValue() >= right.longValue());
+ }
+ break;
+ case T_int :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.intValue() >= right.charValue());
+ case T_float: return Constant.fromValue(left.intValue() >= right.floatValue());
+ case T_double: return Constant.fromValue(left.intValue() >= right.doubleValue());
+ case T_byte: return Constant.fromValue(left.intValue() >= right.byteValue());
+ case T_short: return Constant.fromValue(left.intValue() >= right.shortValue());
+ case T_int: return Constant.fromValue(left.intValue() >= right.intValue());
+ case T_long: return Constant.fromValue(left.intValue() >= right.longValue());
+ }
+ break;
+ case T_long :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.longValue() >= right.charValue());
+ case T_float: return Constant.fromValue(left.longValue() >= right.floatValue());
+ case T_double: return Constant.fromValue(left.longValue() >= right.doubleValue());
+ case T_byte: return Constant.fromValue(left.longValue() >= right.byteValue());
+ case T_short: return Constant.fromValue(left.longValue() >= right.shortValue());
+ case T_int: return Constant.fromValue(left.longValue() >= right.intValue());
+ case T_long: return Constant.fromValue(left.longValue() >= right.longValue());
+ }
+
+ }
+
+ return NotAConstant;
+ }
+
+ public static final Constant computeConstantOperationLEFT_SHIFT(Constant left, int leftId, int operator, Constant right, int rightId) {
+
+ switch (leftId){
+ case T_char :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.charValue() << right.charValue());
+ case T_byte: return Constant.fromValue(left.charValue() << right.byteValue());
+ case T_short: return Constant.fromValue(left.charValue() << right.shortValue());
+ case T_int: return Constant.fromValue(left.charValue() << right.intValue());
+ case T_long: return Constant.fromValue(left.charValue() << right.longValue());
+ }
+ break;
+ case T_byte :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.byteValue() << right.charValue());
+ case T_byte: return Constant.fromValue(left.byteValue() << right.byteValue());
+ case T_short: return Constant.fromValue(left.byteValue() << right.shortValue());
+ case T_int: return Constant.fromValue(left.byteValue() << right.intValue());
+ case T_long: return Constant.fromValue(left.byteValue() << right.longValue());
+ }
+ break;
+ case T_short :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.shortValue() << right.charValue());
+ case T_byte: return Constant.fromValue(left.shortValue() << right.byteValue());
+ case T_short: return Constant.fromValue(left.shortValue() << right.shortValue());
+ case T_int: return Constant.fromValue(left.shortValue() << right.intValue());
+ case T_long: return Constant.fromValue(left.shortValue() << right.longValue());
+ }
+ break;
+ case T_int :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.intValue() << right.charValue());
+ case T_byte: return Constant.fromValue(left.intValue() << right.byteValue());
+ case T_short: return Constant.fromValue(left.intValue() << right.shortValue());
+ case T_int: return Constant.fromValue(left.intValue() << right.intValue());
+ case T_long: return Constant.fromValue(left.intValue() << right.longValue());
+ }
+ break;
+ case T_long :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.longValue() << right.charValue());
+ case T_byte: return Constant.fromValue(left.longValue() << right.byteValue());
+ case T_short: return Constant.fromValue(left.longValue() << right.shortValue());
+ case T_int: return Constant.fromValue(left.longValue() << right.intValue());
+ case T_long: return Constant.fromValue(left.longValue() << right.longValue());
+ }
+
+ }
+
+ return NotAConstant;
+ }
+
+ public static final Constant computeConstantOperationLESS(Constant left, int leftId, int operator, Constant right, int rightId) {
+
+ switch (leftId){
+ case T_char :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.charValue() < right.charValue());
+ case T_float: return Constant.fromValue(left.charValue() < right.floatValue());
+ case T_double: return Constant.fromValue(left.charValue() < right.doubleValue());
+ case T_byte: return Constant.fromValue(left.charValue() < right.byteValue());
+ case T_short: return Constant.fromValue(left.charValue() < right.shortValue());
+ case T_int: return Constant.fromValue(left.charValue() < right.intValue());
+ case T_long: return Constant.fromValue(left.charValue() < right.longValue());
+ }
+ break;
+ case T_float :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.floatValue() < right.charValue());
+ case T_float: return Constant.fromValue(left.floatValue() < right.floatValue());
+ case T_double: return Constant.fromValue(left.floatValue() < right.doubleValue());
+ case T_byte: return Constant.fromValue(left.floatValue() < right.byteValue());
+ case T_short: return Constant.fromValue(left.floatValue() < right.shortValue());
+ case T_int: return Constant.fromValue(left.floatValue() < right.intValue());
+ case T_long: return Constant.fromValue(left.floatValue() < right.longValue());
+ }
+ break;
+ case T_double :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.doubleValue() < right.charValue());
+ case T_float: return Constant.fromValue(left.doubleValue() < right.floatValue());
+ case T_double: return Constant.fromValue(left.doubleValue() < right.doubleValue());
+ case T_byte: return Constant.fromValue(left.doubleValue() < right.byteValue());
+ case T_short: return Constant.fromValue(left.doubleValue() < right.shortValue());
+ case T_int: return Constant.fromValue(left.doubleValue() < right.intValue());
+ case T_long: return Constant.fromValue(left.doubleValue() < right.longValue());
+ }
+ break;
+ case T_byte :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.byteValue() < right.charValue());
+ case T_float: return Constant.fromValue(left.byteValue() < right.floatValue());
+ case T_double: return Constant.fromValue(left.byteValue() < right.doubleValue());
+ case T_byte: return Constant.fromValue(left.byteValue() < right.byteValue());
+ case T_short: return Constant.fromValue(left.byteValue() < right.shortValue());
+ case T_int: return Constant.fromValue(left.byteValue() < right.intValue());
+ case T_long: return Constant.fromValue(left.byteValue() < right.longValue());
+ }
+ break;
+ case T_short :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.shortValue() < right.charValue());
+ case T_float: return Constant.fromValue(left.shortValue() < right.floatValue());
+ case T_double: return Constant.fromValue(left.shortValue() < right.doubleValue());
+ case T_byte: return Constant.fromValue(left.shortValue() < right.byteValue());
+ case T_short: return Constant.fromValue(left.shortValue() < right.shortValue());
+ case T_int: return Constant.fromValue(left.shortValue() < right.intValue());
+ case T_long: return Constant.fromValue(left.shortValue() < right.longValue());
+ }
+ break;
+ case T_int :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.intValue() < right.charValue());
+ case T_float: return Constant.fromValue(left.intValue() < right.floatValue());
+ case T_double: return Constant.fromValue(left.intValue() < right.doubleValue());
+ case T_byte: return Constant.fromValue(left.intValue() < right.byteValue());
+ case T_short: return Constant.fromValue(left.intValue() < right.shortValue());
+ case T_int: return Constant.fromValue(left.intValue() < right.intValue());
+ case T_long: return Constant.fromValue(left.intValue() < right.longValue());
+ }
+ break;
+ case T_long :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.longValue() < right.charValue());
+ case T_float: return Constant.fromValue(left.longValue() < right.floatValue());
+ case T_double: return Constant.fromValue(left.longValue() < right.doubleValue());
+ case T_byte: return Constant.fromValue(left.longValue() < right.byteValue());
+ case T_short: return Constant.fromValue(left.longValue() < right.shortValue());
+ case T_int: return Constant.fromValue(left.longValue() < right.intValue());
+ case T_long: return Constant.fromValue(left.longValue() < right.longValue());
+ }
+
+ }
+
+ return NotAConstant;
+ }
+
+ public static final Constant computeConstantOperationLESS_EQUAL(Constant left, int leftId, int operator, Constant right, int rightId) {
+
+ switch (leftId){
+ case T_char :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.charValue() <= right.charValue());
+ case T_float: return Constant.fromValue(left.charValue() <= right.floatValue());
+ case T_double: return Constant.fromValue(left.charValue() <= right.doubleValue());
+ case T_byte: return Constant.fromValue(left.charValue() <= right.byteValue());
+ case T_short: return Constant.fromValue(left.charValue() <= right.shortValue());
+ case T_int: return Constant.fromValue(left.charValue() <= right.intValue());
+ case T_long: return Constant.fromValue(left.charValue() <= right.longValue());
+ }
+ break;
+ case T_float :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.floatValue() <= right.charValue());
+ case T_float: return Constant.fromValue(left.floatValue() <= right.floatValue());
+ case T_double: return Constant.fromValue(left.floatValue() <= right.doubleValue());
+ case T_byte: return Constant.fromValue(left.floatValue() <= right.byteValue());
+ case T_short: return Constant.fromValue(left.floatValue() <= right.shortValue());
+ case T_int: return Constant.fromValue(left.floatValue() <= right.intValue());
+ case T_long: return Constant.fromValue(left.floatValue() <= right.longValue());
+ }
+ break;
+ case T_double :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.doubleValue() <= right.charValue());
+ case T_float: return Constant.fromValue(left.doubleValue() <= right.floatValue());
+ case T_double: return Constant.fromValue(left.doubleValue() <= right.doubleValue());
+ case T_byte: return Constant.fromValue(left.doubleValue() <= right.byteValue());
+ case T_short: return Constant.fromValue(left.doubleValue() <= right.shortValue());
+ case T_int: return Constant.fromValue(left.doubleValue() <= right.intValue());
+ case T_long: return Constant.fromValue(left.doubleValue() <= right.longValue());
+ }
+ break;
+ case T_byte :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.byteValue() <= right.charValue());
+ case T_float: return Constant.fromValue(left.byteValue() <= right.floatValue());
+ case T_double: return Constant.fromValue(left.byteValue() <= right.doubleValue());
+ case T_byte: return Constant.fromValue(left.byteValue() <= right.byteValue());
+ case T_short: return Constant.fromValue(left.byteValue() <= right.shortValue());
+ case T_int: return Constant.fromValue(left.byteValue() <= right.intValue());
+ case T_long: return Constant.fromValue(left.byteValue() <= right.longValue());
+ }
+ break;
+ case T_short :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.shortValue() <= right.charValue());
+ case T_float: return Constant.fromValue(left.shortValue() <= right.floatValue());
+ case T_double: return Constant.fromValue(left.shortValue() <= right.doubleValue());
+ case T_byte: return Constant.fromValue(left.shortValue() <= right.byteValue());
+ case T_short: return Constant.fromValue(left.shortValue() <= right.shortValue());
+ case T_int: return Constant.fromValue(left.shortValue() <= right.intValue());
+ case T_long: return Constant.fromValue(left.shortValue() <= right.longValue());
+ }
+ break;
+ case T_int :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.intValue() <= right.charValue());
+ case T_float: return Constant.fromValue(left.intValue() <= right.floatValue());
+ case T_double: return Constant.fromValue(left.intValue() <= right.doubleValue());
+ case T_byte: return Constant.fromValue(left.intValue() <= right.byteValue());
+ case T_short: return Constant.fromValue(left.intValue() <= right.shortValue());
+ case T_int: return Constant.fromValue(left.intValue() <= right.intValue());
+ case T_long: return Constant.fromValue(left.intValue() <= right.longValue());
+ }
+ break;
+ case T_long :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.longValue() <= right.charValue());
+ case T_float: return Constant.fromValue(left.longValue() <= right.floatValue());
+ case T_double: return Constant.fromValue(left.longValue() <= right.doubleValue());
+ case T_byte: return Constant.fromValue(left.longValue() <= right.byteValue());
+ case T_short: return Constant.fromValue(left.longValue() <= right.shortValue());
+ case T_int: return Constant.fromValue(left.longValue() <= right.intValue());
+ case T_long: return Constant.fromValue(left.longValue() <= right.longValue());
+ }
+ }
+
+ return NotAConstant;
+ }
+
+ public static final Constant computeConstantOperationMINUS(Constant left, int leftId, int operator, Constant right, int rightId) {
+
+ switch (leftId){
+ case T_char :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.charValue() - right.charValue());
+ case T_float: return Constant.fromValue(left.charValue() - right.floatValue());
+ case T_double: return Constant.fromValue(left.charValue() - right.doubleValue());
+ case T_byte: return Constant.fromValue(left.charValue() - right.byteValue());
+ case T_short: return Constant.fromValue(left.charValue() - right.shortValue());
+ case T_int: return Constant.fromValue(left.charValue() - right.intValue());
+ case T_long: return Constant.fromValue(left.charValue() - right.longValue());
+ }
+ break;
+ case T_float :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.floatValue() - right.charValue());
+ case T_float: return Constant.fromValue(left.floatValue() - right.floatValue());
+ case T_double: return Constant.fromValue(left.floatValue() - right.doubleValue());
+ case T_byte: return Constant.fromValue(left.floatValue() - right.byteValue());
+ case T_short: return Constant.fromValue(left.floatValue() - right.shortValue());
+ case T_int: return Constant.fromValue(left.floatValue() - right.intValue());
+ case T_long: return Constant.fromValue(left.floatValue() - right.longValue());
+ }
+ break;
+ case T_double :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.doubleValue() - right.charValue());
+ case T_float: return Constant.fromValue(left.doubleValue() - right.floatValue());
+ case T_double: return Constant.fromValue(left.doubleValue() - right.doubleValue());
+ case T_byte: return Constant.fromValue(left.doubleValue() - right.byteValue());
+ case T_short: return Constant.fromValue(left.doubleValue() - right.shortValue());
+ case T_int: return Constant.fromValue(left.doubleValue() - right.intValue());
+ case T_long: return Constant.fromValue(left.doubleValue() - right.longValue());
+ }
+ break;
+ case T_byte :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.byteValue() - right.charValue());
+ case T_float: return Constant.fromValue(left.byteValue() - right.floatValue());
+ case T_double: return Constant.fromValue(left.byteValue() - right.doubleValue());
+ case T_byte: return Constant.fromValue(left.byteValue() - right.byteValue());
+ case T_short: return Constant.fromValue(left.byteValue() - right.shortValue());
+ case T_int: return Constant.fromValue(left.byteValue() - right.intValue());
+ case T_long: return Constant.fromValue(left.byteValue() - right.longValue());
+ }
+ break;
+ case T_short :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.shortValue() - right.charValue());
+ case T_float: return Constant.fromValue(left.shortValue() - right.floatValue());
+ case T_double: return Constant.fromValue(left.shortValue() - right.doubleValue());
+ case T_byte: return Constant.fromValue(left.shortValue() - right.byteValue());
+ case T_short: return Constant.fromValue(left.shortValue() - right.shortValue());
+ case T_int: return Constant.fromValue(left.shortValue() - right.intValue());
+ case T_long: return Constant.fromValue(left.shortValue() - right.longValue());
+ }
+ break;
+ case T_int :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.intValue() - right.charValue());
+ case T_float: return Constant.fromValue(left.intValue() - right.floatValue());
+ case T_double: return Constant.fromValue(left.intValue() - right.doubleValue());
+ case T_byte: return Constant.fromValue(left.intValue() - right.byteValue());
+ case T_short: return Constant.fromValue(left.intValue() - right.shortValue());
+ case T_int: return Constant.fromValue(left.intValue() - right.intValue());
+ case T_long: return Constant.fromValue(left.intValue() - right.longValue());
+ }
+ break;
+ case T_long :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.longValue() - right.charValue());
+ case T_float: return Constant.fromValue(left.longValue() - right.floatValue());
+ case T_double: return Constant.fromValue(left.longValue() - right.doubleValue());
+ case T_byte: return Constant.fromValue(left.longValue() - right.byteValue());
+ case T_short: return Constant.fromValue(left.longValue() - right.shortValue());
+ case T_int: return Constant.fromValue(left.longValue() - right.intValue());
+ case T_long: return Constant.fromValue(left.longValue() - right.longValue());
+ }
+
+ }
+
+ return NotAConstant;
+ }
+
+ public static final Constant computeConstantOperationMULTIPLY(Constant left, int leftId, int operator, Constant right, int rightId) {
+
+ switch (leftId){
+ case T_char :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.charValue() * right.charValue());
+ case T_float: return Constant.fromValue(left.charValue() * right.floatValue());
+ case T_double: return Constant.fromValue(left.charValue() * right.doubleValue());
+ case T_byte: return Constant.fromValue(left.charValue() * right.byteValue());
+ case T_short: return Constant.fromValue(left.charValue() * right.shortValue());
+ case T_int: return Constant.fromValue(left.charValue() * right.intValue());
+ case T_long: return Constant.fromValue(left.charValue() * right.longValue());
+ }
+ break;
+ case T_float :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.floatValue() * right.charValue());
+ case T_float: return Constant.fromValue(left.floatValue() * right.floatValue());
+ case T_double: return Constant.fromValue(left.floatValue() * right.doubleValue());
+ case T_byte: return Constant.fromValue(left.floatValue() * right.byteValue());
+ case T_short: return Constant.fromValue(left.floatValue() * right.shortValue());
+ case T_int: return Constant.fromValue(left.floatValue() * right.intValue());
+ case T_long: return Constant.fromValue(left.floatValue() * right.longValue());
+ }
+ break;
+ case T_double :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.doubleValue() * right.charValue());
+ case T_float: return Constant.fromValue(left.doubleValue() * right.floatValue());
+ case T_double: return Constant.fromValue(left.doubleValue() * right.doubleValue());
+ case T_byte: return Constant.fromValue(left.doubleValue() * right.byteValue());
+ case T_short: return Constant.fromValue(left.doubleValue() * right.shortValue());
+ case T_int: return Constant.fromValue(left.doubleValue() * right.intValue());
+ case T_long: return Constant.fromValue(left.doubleValue() * right.longValue());
+ }
+ break;
+ case T_byte :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.byteValue() * right.charValue());
+ case T_float: return Constant.fromValue(left.byteValue() * right.floatValue());
+ case T_double: return Constant.fromValue(left.byteValue() * right.doubleValue());
+ case T_byte: return Constant.fromValue(left.byteValue() * right.byteValue());
+ case T_short: return Constant.fromValue(left.byteValue() * right.shortValue());
+ case T_int: return Constant.fromValue(left.byteValue() * right.intValue());
+ case T_long: return Constant.fromValue(left.byteValue() * right.longValue());
+ }
+ break;
+ case T_short :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.shortValue() * right.charValue());
+ case T_float: return Constant.fromValue(left.shortValue() * right.floatValue());
+ case T_double: return Constant.fromValue(left.shortValue() * right.doubleValue());
+ case T_byte: return Constant.fromValue(left.shortValue() * right.byteValue());
+ case T_short: return Constant.fromValue(left.shortValue() * right.shortValue());
+ case T_int: return Constant.fromValue(left.shortValue() * right.intValue());
+ case T_long: return Constant.fromValue(left.shortValue() * right.longValue());
+ }
+ break;
+ case T_int :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.intValue() * right.charValue());
+ case T_float: return Constant.fromValue(left.intValue() * right.floatValue());
+ case T_double: return Constant.fromValue(left.intValue() * right.doubleValue());
+ case T_byte: return Constant.fromValue(left.intValue() * right.byteValue());
+ case T_short: return Constant.fromValue(left.intValue() * right.shortValue());
+ case T_int: return Constant.fromValue(left.intValue() * right.intValue());
+ case T_long: return Constant.fromValue(left.intValue() * right.longValue());
+ }
+ break;
+ case T_long :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.longValue() * right.charValue());
+ case T_float: return Constant.fromValue(left.longValue() * right.floatValue());
+ case T_double: return Constant.fromValue(left.longValue() * right.doubleValue());
+ case T_byte: return Constant.fromValue(left.longValue() * right.byteValue());
+ case T_short: return Constant.fromValue(left.longValue() * right.shortValue());
+ case T_int: return Constant.fromValue(left.longValue() * right.intValue());
+ case T_long: return Constant.fromValue(left.longValue() * right.longValue());
+ }
+ }
+
+ return NotAConstant;
+ }
+
+ public static final Constant computeConstantOperationOR(Constant left, int leftId, int operator, Constant right, int rightId) {
+
+ switch (leftId){
+ case T_boolean : return Constant.fromValue(left.booleanValue() | right.booleanValue());
+ case T_char :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.charValue() | right.charValue());
+ case T_byte: return Constant.fromValue(left.charValue() | right.byteValue());
+ case T_short: return Constant.fromValue(left.charValue() | right.shortValue());
+ case T_int: return Constant.fromValue(left.charValue() | right.intValue());
+ case T_long: return Constant.fromValue(left.charValue() | right.longValue());
+ }
+ break;
+ case T_byte :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.byteValue() | right.charValue());
+ case T_byte: return Constant.fromValue(left.byteValue() | right.byteValue());
+ case T_short: return Constant.fromValue(left.byteValue() | right.shortValue());
+ case T_int: return Constant.fromValue(left.byteValue() | right.intValue());
+ case T_long: return Constant.fromValue(left.byteValue() | right.longValue());
+ }
+ break;
+ case T_short :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.shortValue() | right.charValue());
+ case T_byte: return Constant.fromValue(left.shortValue() | right.byteValue());
+ case T_short: return Constant.fromValue(left.shortValue() | right.shortValue());
+ case T_int: return Constant.fromValue(left.shortValue() | right.intValue());
+ case T_long: return Constant.fromValue(left.shortValue() | right.longValue());
+ }
+ break;
+ case T_int :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.intValue() | right.charValue());
+ case T_byte: return Constant.fromValue(left.intValue() | right.byteValue());
+ case T_short: return Constant.fromValue(left.intValue() | right.shortValue());
+ case T_int: return Constant.fromValue(left.intValue() | right.intValue());
+ case T_long: return Constant.fromValue(left.intValue() | right.longValue());
+ }
+ break;
+ case T_long :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.longValue() | right.charValue());
+ case T_byte: return Constant.fromValue(left.longValue() | right.byteValue());
+ case T_short: return Constant.fromValue(left.longValue() | right.shortValue());
+ case T_int: return Constant.fromValue(left.longValue() | right.intValue());
+ case T_long: return Constant.fromValue(left.longValue() | right.longValue());
+ }
+
+ }
+
+ return NotAConstant;
+ }
+
+ public static final Constant computeConstantOperationOR_OR(Constant left, int leftId, int operator, Constant right, int rightId) {
+
+ return Constant.fromValue(left.booleanValue() || right.booleanValue());
+ }
+
+ public static final Constant computeConstantOperationPLUS(Constant left, int leftId, int operator, Constant right, int rightId) {
+
+ switch (leftId){
+ case T_Object :
+ if (rightId == T_String) {
+ return Constant.fromValue(left.stringValue() + right.stringValue());
+ }
+ case T_boolean :
+ if (rightId == T_String) {
+ return Constant.fromValue(left.stringValue() + right.stringValue());
+ }
+ break;
+ case T_char :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.charValue() + right.charValue());
+ case T_float: return Constant.fromValue(left.charValue() + right.floatValue());
+ case T_double: return Constant.fromValue(left.charValue() + right.doubleValue());
+ case T_byte: return Constant.fromValue(left.charValue() + right.byteValue());
+ case T_short: return Constant.fromValue(left.charValue() + right.shortValue());
+ case T_int: return Constant.fromValue(left.charValue() + right.intValue());
+ case T_long: return Constant.fromValue(left.charValue() + right.longValue());
+ case T_String: return Constant.fromValue(left.stringValue() + right.stringValue());
+ }
+ break;
+ case T_float :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.floatValue() + right.charValue());
+ case T_float: return Constant.fromValue(left.floatValue() + right.floatValue());
+ case T_double: return Constant.fromValue(left.floatValue() + right.doubleValue());
+ case T_byte: return Constant.fromValue(left.floatValue() + right.byteValue());
+ case T_short: return Constant.fromValue(left.floatValue() + right.shortValue());
+ case T_int: return Constant.fromValue(left.floatValue() + right.intValue());
+ case T_long: return Constant.fromValue(left.floatValue() + right.longValue());
+ case T_String: return Constant.fromValue(left.stringValue() + right.stringValue());
+ }
+ break;
+ case T_double :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.doubleValue() + right.charValue());
+ case T_float: return Constant.fromValue(left.doubleValue() + right.floatValue());
+ case T_double: return Constant.fromValue(left.doubleValue() + right.doubleValue());
+ case T_byte: return Constant.fromValue(left.doubleValue() + right.byteValue());
+ case T_short: return Constant.fromValue(left.doubleValue() + right.shortValue());
+ case T_int: return Constant.fromValue(left.doubleValue() + right.intValue());
+ case T_long: return Constant.fromValue(left.doubleValue() + right.longValue());
+ case T_String: return Constant.fromValue(left.stringValue() + right.stringValue());
+ }
+ break;
+ case T_byte :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.byteValue() + right.charValue());
+ case T_float: return Constant.fromValue(left.byteValue() + right.floatValue());
+ case T_double: return Constant.fromValue(left.byteValue() + right.doubleValue());
+ case T_byte: return Constant.fromValue(left.byteValue() + right.byteValue());
+ case T_short: return Constant.fromValue(left.byteValue() + right.shortValue());
+ case T_int: return Constant.fromValue(left.byteValue() + right.intValue());
+ case T_long: return Constant.fromValue(left.byteValue() + right.longValue());
+ case T_String: return Constant.fromValue(left.stringValue() + right.stringValue());
+ }
+
+ break;
+ case T_short :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.shortValue() + right.charValue());
+ case T_float: return Constant.fromValue(left.shortValue() + right.floatValue());
+ case T_double: return Constant.fromValue(left.shortValue() + right.doubleValue());
+ case T_byte: return Constant.fromValue(left.shortValue() + right.byteValue());
+ case T_short: return Constant.fromValue(left.shortValue() + right.shortValue());
+ case T_int: return Constant.fromValue(left.shortValue() + right.intValue());
+ case T_long: return Constant.fromValue(left.shortValue() + right.longValue());
+ case T_String: return Constant.fromValue(left.stringValue() + right.stringValue());
+ }
+ break;
+ case T_int :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.intValue() + right.charValue());
+ case T_float: return Constant.fromValue(left.intValue() + right.floatValue());
+ case T_double: return Constant.fromValue(left.intValue() + right.doubleValue());
+ case T_byte: return Constant.fromValue(left.intValue() + right.byteValue());
+ case T_short: return Constant.fromValue(left.intValue() + right.shortValue());
+ case T_int: return Constant.fromValue(left.intValue() + right.intValue());
+ case T_long: return Constant.fromValue(left.intValue() + right.longValue());
+ case T_String: return Constant.fromValue(left.stringValue() + right.stringValue());
+ }
+ break;
+ case T_long :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.longValue() + right.charValue());
+ case T_float: return Constant.fromValue(left.longValue() + right.floatValue());
+ case T_double: return Constant.fromValue(left.longValue() + right.doubleValue());
+ case T_byte: return Constant.fromValue(left.longValue() + right.byteValue());
+ case T_short: return Constant.fromValue(left.longValue() + right.shortValue());
+ case T_int: return Constant.fromValue(left.longValue() + right.intValue());
+ case T_long: return Constant.fromValue(left.longValue() + right.longValue());
+ case T_String: return Constant.fromValue(left.stringValue() + right.stringValue());
+ }
+ break;
+ case T_String :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.stringValue() + right.stringValue());
+ case T_float: return Constant.fromValue(left.stringValue() + right.stringValue());
+ case T_double: return Constant.fromValue(left.stringValue() + right.stringValue());
+ case T_byte: return Constant.fromValue(left.stringValue() + right.stringValue());
+ case T_short: return Constant.fromValue(left.stringValue() + right.stringValue());
+ case T_int: return Constant.fromValue(left.stringValue() + right.stringValue());
+ case T_long: return Constant.fromValue(left.stringValue() + right.stringValue());
+ case T_String: return Constant.fromValue(left.stringValue() + right.stringValue());
+ case T_boolean: return Constant.fromValue(left.stringValue() + right.stringValue());
+ }
+ break;
+ case T_null :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.stringValue() + right.stringValue());
+ case T_float: return Constant.fromValue(left.stringValue() + right.stringValue());
+ case T_double: return Constant.fromValue(left.stringValue() + right.stringValue());
+ case T_byte: return Constant.fromValue(left.stringValue() + right.stringValue());
+ case T_short: return Constant.fromValue(left.stringValue() + right.stringValue());
+ case T_int: return Constant.fromValue(left.stringValue() + right.stringValue());
+ case T_long: return Constant.fromValue(left.stringValue() + right.stringValue());
+ case T_String: return Constant.fromValue(left.stringValue() + right.stringValue());
+ }
+
+ }
+
+ return NotAConstant;
+ }
+
+ public static final Constant computeConstantOperationREMAINDER(Constant left, int leftId, int operator, Constant right, int rightId) {
+
+ switch (leftId){
+ case T_char :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.charValue() % right.charValue());
+ case T_float: return Constant.fromValue(left.charValue() % right.floatValue());
+ case T_double: return Constant.fromValue(left.charValue() % right.doubleValue());
+ case T_byte: return Constant.fromValue(left.charValue() % right.byteValue());
+ case T_short: return Constant.fromValue(left.charValue() % right.shortValue());
+ case T_int: return Constant.fromValue(left.charValue() % right.intValue());
+ case T_long: return Constant.fromValue(left.charValue() % right.longValue());
+ }
+ break;
+ case T_float :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.floatValue() % right.charValue());
+ case T_float: return Constant.fromValue(left.floatValue() % right.floatValue());
+ case T_double: return Constant.fromValue(left.floatValue() % right.doubleValue());
+ case T_byte: return Constant.fromValue(left.floatValue() % right.byteValue());
+ case T_short: return Constant.fromValue(left.floatValue() % right.shortValue());
+ case T_int: return Constant.fromValue(left.floatValue() % right.intValue());
+ case T_long: return Constant.fromValue(left.floatValue() % right.longValue());
+ }
+ break;
+ case T_double :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.doubleValue() % right.charValue());
+ case T_float: return Constant.fromValue(left.doubleValue() % right.floatValue());
+ case T_double: return Constant.fromValue(left.doubleValue() % right.doubleValue());
+ case T_byte: return Constant.fromValue(left.doubleValue() % right.byteValue());
+ case T_short: return Constant.fromValue(left.doubleValue() % right.shortValue());
+ case T_int: return Constant.fromValue(left.doubleValue() % right.intValue());
+ case T_long: return Constant.fromValue(left.doubleValue() % right.longValue());
+ }
+ break;
+ case T_byte :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.byteValue() % right.charValue());
+ case T_float: return Constant.fromValue(left.byteValue() % right.floatValue());
+ case T_double: return Constant.fromValue(left.byteValue() % right.doubleValue());
+ case T_byte: return Constant.fromValue(left.byteValue() % right.byteValue());
+ case T_short: return Constant.fromValue(left.byteValue() % right.shortValue());
+ case T_int: return Constant.fromValue(left.byteValue() % right.intValue());
+ case T_long: return Constant.fromValue(left.byteValue() % right.longValue());
+ }
+ break;
+ case T_short :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.shortValue() % right.charValue());
+ case T_float: return Constant.fromValue(left.shortValue() % right.floatValue());
+ case T_double: return Constant.fromValue(left.shortValue() % right.doubleValue());
+ case T_byte: return Constant.fromValue(left.shortValue() % right.byteValue());
+ case T_short: return Constant.fromValue(left.shortValue() % right.shortValue());
+ case T_int: return Constant.fromValue(left.shortValue() % right.intValue());
+ case T_long: return Constant.fromValue(left.shortValue() % right.longValue());
+ }
+ break;
+ case T_int :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.intValue() % right.charValue());
+ case T_float: return Constant.fromValue(left.intValue() % right.floatValue());
+ case T_double: return Constant.fromValue(left.intValue() % right.doubleValue());
+ case T_byte: return Constant.fromValue(left.intValue() % right.byteValue());
+ case T_short: return Constant.fromValue(left.intValue() % right.shortValue());
+ case T_int: return Constant.fromValue(left.intValue() % right.intValue());
+ case T_long: return Constant.fromValue(left.intValue() % right.longValue());
+ }
+ break;
+ case T_long :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.longValue() % right.charValue());
+ case T_float: return Constant.fromValue(left.longValue() % right.floatValue());
+ case T_double: return Constant.fromValue(left.longValue() % right.doubleValue());
+ case T_byte: return Constant.fromValue(left.longValue() % right.byteValue());
+ case T_short: return Constant.fromValue(left.longValue() % right.shortValue());
+ case T_int: return Constant.fromValue(left.longValue() % right.intValue());
+ case T_long: return Constant.fromValue(left.longValue() % right.longValue());
+ }
+
+ }
+
+ return NotAConstant;
+ }
+
+ public static final Constant computeConstantOperationRIGHT_SHIFT(Constant left, int leftId, int operator, Constant right, int rightId) {
+
+ switch (leftId){
+ case T_char :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.charValue() >> right.charValue());
+ case T_byte: return Constant.fromValue(left.charValue() >> right.byteValue());
+ case T_short: return Constant.fromValue(left.charValue() >> right.shortValue());
+ case T_int: return Constant.fromValue(left.charValue() >> right.intValue());
+ case T_long: return Constant.fromValue(left.charValue() >> right.longValue());
+ }
+ break;
+ case T_byte :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.byteValue() >> right.charValue());
+ case T_byte: return Constant.fromValue(left.byteValue() >> right.byteValue());
+ case T_short: return Constant.fromValue(left.byteValue() >> right.shortValue());
+ case T_int: return Constant.fromValue(left.byteValue() >> right.intValue());
+ case T_long: return Constant.fromValue(left.byteValue() >> right.longValue());
+ }
+ break;
+ case T_short :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.shortValue() >> right.charValue());
+ case T_byte: return Constant.fromValue(left.shortValue() >> right.byteValue());
+ case T_short: return Constant.fromValue(left.shortValue() >> right.shortValue());
+ case T_int: return Constant.fromValue(left.shortValue() >> right.intValue());
+ case T_long: return Constant.fromValue(left.shortValue() >> right.longValue());
+ }
+ break;
+ case T_int :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.intValue() >> right.charValue());
+ case T_byte: return Constant.fromValue(left.intValue() >> right.byteValue());
+ case T_short: return Constant.fromValue(left.intValue() >> right.shortValue());
+ case T_int: return Constant.fromValue(left.intValue() >> right.intValue());
+ case T_long: return Constant.fromValue(left.intValue() >> right.longValue());
+ }
+ break;
+ case T_long :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.longValue() >> right.charValue());
+ case T_byte: return Constant.fromValue(left.longValue() >> right.byteValue());
+ case T_short: return Constant.fromValue(left.longValue() >> right.shortValue());
+ case T_int: return Constant.fromValue(left.longValue() >> right.intValue());
+ case T_long: return Constant.fromValue(left.longValue() >> right.longValue());
+ }
+
+ }
+
+ return NotAConstant;
+ }
+
+ public static final Constant computeConstantOperationUNSIGNED_RIGHT_SHIFT(Constant left, int leftId, int operator, Constant right, int rightId) {
+
+ switch (leftId){
+ case T_char :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.charValue() >>> right.charValue());
+ case T_byte: return Constant.fromValue(left.charValue() >>> right.byteValue());
+ case T_short: return Constant.fromValue(left.charValue() >>> right.shortValue());
+ case T_int: return Constant.fromValue(left.charValue() >>> right.intValue());
+ case T_long: return Constant.fromValue(left.charValue() >>> right.longValue());
+ }
+ break;
+ case T_byte :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.byteValue() >>> right.charValue());
+ case T_byte: return Constant.fromValue(left.byteValue() >>> right.byteValue());
+ case T_short: return Constant.fromValue(left.byteValue() >>> right.shortValue());
+ case T_int: return Constant.fromValue(left.byteValue() >>> right.intValue());
+ case T_long: return Constant.fromValue(left.byteValue() >>> right.longValue());
+ }
+ break;
+ case T_short :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.shortValue() >>> right.charValue());
+ case T_byte: return Constant.fromValue(left.shortValue() >>> right.byteValue());
+ case T_short: return Constant.fromValue(left.shortValue() >>> right.shortValue());
+ case T_int: return Constant.fromValue(left.shortValue() >>> right.intValue());
+ case T_long: return Constant.fromValue(left.shortValue() >>> right.longValue());
+ }
+ break;
+ case T_int :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.intValue() >>> right.charValue());
+ case T_byte: return Constant.fromValue(left.intValue() >>> right.byteValue());
+ case T_short: return Constant.fromValue(left.intValue() >>> right.shortValue());
+ case T_int: return Constant.fromValue(left.intValue() >>> right.intValue());
+ case T_long: return Constant.fromValue(left.intValue() >>> right.longValue());
+ }
+ break;
+ case T_long :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.longValue() >>> right.charValue());
+ case T_byte: return Constant.fromValue(left.longValue() >>> right.byteValue());
+ case T_short: return Constant.fromValue(left.longValue() >>> right.shortValue());
+ case T_int: return Constant.fromValue(left.longValue() >>> right.intValue());
+ case T_long: return Constant.fromValue(left.longValue() >>> right.longValue());
+ }
+
+ }
+
+ return NotAConstant;
+ }
+
+ public static final Constant computeConstantOperationXOR(Constant left, int leftId, int operator, Constant right, int rightId) {
+
+ switch (leftId){
+ case T_boolean : return Constant.fromValue(left.booleanValue() ^ right.booleanValue());
+ case T_char :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.charValue() ^ right.charValue());
+ case T_byte: return Constant.fromValue(left.charValue() ^ right.byteValue());
+ case T_short: return Constant.fromValue(left.charValue() ^ right.shortValue());
+ case T_int: return Constant.fromValue(left.charValue() ^ right.intValue());
+ case T_long: return Constant.fromValue(left.charValue() ^ right.longValue());
+ }
+ break;
+ case T_byte :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.byteValue() ^ right.charValue());
+ case T_byte: return Constant.fromValue(left.byteValue() ^ right.byteValue());
+ case T_short: return Constant.fromValue(left.byteValue() ^ right.shortValue());
+ case T_int: return Constant.fromValue(left.byteValue() ^ right.intValue());
+ case T_long: return Constant.fromValue(left.byteValue() ^ right.longValue());
+ }
+ break;
+ case T_short :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.shortValue() ^ right.charValue());
+ case T_byte: return Constant.fromValue(left.shortValue() ^ right.byteValue());
+ case T_short: return Constant.fromValue(left.shortValue() ^ right.shortValue());
+ case T_int: return Constant.fromValue(left.shortValue() ^ right.intValue());
+ case T_long: return Constant.fromValue(left.shortValue() ^ right.longValue());
+ }
+ break;
+ case T_int :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.intValue() ^ right.charValue());
+ case T_byte: return Constant.fromValue(left.intValue() ^ right.byteValue());
+ case T_short: return Constant.fromValue(left.intValue() ^ right.shortValue());
+ case T_int: return Constant.fromValue(left.intValue() ^ right.intValue());
+ case T_long: return Constant.fromValue(left.intValue() ^ right.longValue());
+ }
+ break;
+ case T_long :
+ switch (rightId){
+ case T_char : return Constant.fromValue(left.longValue() ^ right.charValue());
+ case T_byte: return Constant.fromValue(left.longValue() ^ right.byteValue());
+ case T_short: return Constant.fromValue(left.longValue() ^ right.shortValue());
+ case T_int: return Constant.fromValue(left.longValue() ^ right.intValue());
+ case T_long: return Constant.fromValue(left.longValue() ^ right.longValue());
+ }
+ }
+
+ return NotAConstant;
+ }
+
+ public double doubleValue() {
+
+ throw new ShouldNotImplement(Util.bind("constant.cannotCastedInto",typeName(),"double")); //$NON-NLS-2$ //$NON-NLS-1$
+ }
+
+ public float floatValue() {
+
+ throw new ShouldNotImplement(Util.bind("constant.cannotCastedInto",typeName(),"float")); //$NON-NLS-2$ //$NON-NLS-1$
+ }
+
+ public static Constant fromValue(byte value) {
+
+ return new ByteConstant(value);
+ }
+
+ public static Constant fromValue(char value) {
+
+ return new CharConstant(value);
+ }
+
+ public static Constant fromValue(double value) {
+
+ return new DoubleConstant(value);
+ }
+
+ public static Constant fromValue(float value) {
+
+ return new FloatConstant(value);
+ }
+
+ public static Constant fromValue(int value) {
+
+ return new IntConstant(value);
+ }
+
+ public static Constant fromValue(long value) {
+
+ return new LongConstant(value);
+ }
+
+ public static Constant fromValue(String value) {
+
+ return new StringConstant(value);
+ }
+
+ public static Constant fromValue(short value) {
+
+ return new ShortConstant(value);
+ }
+
+ public static Constant fromValue(boolean value) {
+
+ return new BooleanConstant(value);
+ }
+
+ public int intValue() {
+
+ throw new ShouldNotImplement(Util.bind("constant.cannotCastedInto",typeName(),"int")); //$NON-NLS-2$ //$NON-NLS-1$
+ }
+
+ public long longValue() {
+
+ throw new ShouldNotImplement(Util.bind("constant.cannotCastedInto",typeName(),"long")); //$NON-NLS-2$ //$NON-NLS-1$
+ }
+
+ public short shortValue() {
+
+ throw new ShouldNotImplement(Util.bind("constant.cannotConvertedTo",typeName(),"short")); //$NON-NLS-2$ //$NON-NLS-1$
+ }
+
+ public String stringValue() {
+
+ throw new ShouldNotImplement(Util.bind("constant.cannotConvertedTo",typeName(),"String")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ public String toString(){
+
+ if (this == NotAConstant) return "(Constant) NotAConstant"; //$NON-NLS-1$
+ return super.toString(); }
+
+ public abstract int typeID();
+
+ public String typeName() {
+ switch (typeID()) {
+ case T_int : return "int"; //$NON-NLS-1$
+ case T_byte : return "byte"; //$NON-NLS-1$
+ case T_short : return "short"; //$NON-NLS-1$
+ case T_char : return "char"; //$NON-NLS-1$
+ case T_float : return "float"; //$NON-NLS-1$
+ case T_double : return "double"; //$NON-NLS-1$
+ case T_boolean : return "boolean"; //$NON-NLS-1$
+ case T_long : return "long";//$NON-NLS-1$
+ case T_String : return "java.lang.String"; //$NON-NLS-1$
+ case T_null : return "null"; //$NON-NLS-1$
+ default: return "unknown"; //$NON-NLS-1$
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/DoubleConstant.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/DoubleConstant.js
new file mode 100644
index 0000000..17fbbfc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/DoubleConstant.js
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.impl;
+
+public class DoubleConstant extends Constant {
+
+ double value;
+
+ public DoubleConstant(double value) {
+ this.value = value;
+ }
+
+ public byte byteValue() {
+ return (byte) value;
+ }
+
+ public char charValue() {
+ return (char) value;
+ }
+
+ public double doubleValue() {
+ return this.value;
+ }
+
+ public float floatValue() {
+ return (float) value;
+ }
+
+ public int intValue() {
+ return (int) value;
+ }
+
+ public long longValue() {
+ return (long) value;
+ }
+
+ public short shortValue() {
+ return (short) value;
+ }
+
+ public String stringValue() {
+ String s = Double.toString(value);
+ if (s == null) return "null"; //$NON-NLS-1$
+ return s;
+ }
+
+ public String toString() {
+ if (this == NotAConstant)
+ return "(Constant) NotAConstant"; //$NON-NLS-1$
+ return "(double)" + value; //$NON-NLS-1$
+ }
+
+ public int typeID() {
+ return T_double;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/FloatConstant.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/FloatConstant.js
new file mode 100644
index 0000000..c01dd13
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/FloatConstant.js
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.impl;
+
+public class FloatConstant extends Constant {
+
+ float value;
+
+ public FloatConstant(float value) {
+ this.value = value;
+ }
+
+ public byte byteValue() {
+ return (byte) value;
+ }
+
+ public char charValue() {
+ return (char) value;
+ }
+
+ public double doubleValue() {
+ return value; // implicit cast to return type
+ }
+
+ public float floatValue() {
+ return this.value;
+ }
+
+ public int intValue() {
+ return (int) value;
+ }
+
+ public long longValue() {
+ return (long) value;
+ }
+
+ public short shortValue() {
+ return (short) value;
+ }
+
+ public String stringValue() {
+ String s = Float.toString(value);
+ if (s == null) return "null"; //$NON-NLS-1$
+ return s;
+ }
+
+ public String toString() {
+ return "(float)" + value; //$NON-NLS-1$
+ }
+
+ public int typeID() {
+ return T_float;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/ITypeRequestor.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/ITypeRequestor.js
new file mode 100644
index 0000000..4da3ae5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/ITypeRequestor.js
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.impl;
+
+import org.eclipse.wst.jsdt.internal.compiler.env.IBinaryType;
+import org.eclipse.wst.jsdt.internal.compiler.env.ICompilationUnit;
+import org.eclipse.wst.jsdt.internal.compiler.env.ISourceType;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.PackageBinding;
+
+public interface ITypeRequestor {
+
+ /**
+ * Accept the resolved binary form for the requested type.
+ */
+ void accept(IBinaryType binaryType, PackageBinding packageBinding);
+
+ /**
+ * Accept the requested type's compilation unit.
+ */
+ void accept(ICompilationUnit unit);
+
+ /**
+ * Accept the unresolved source forms for the requested type.
+ * Note that the multiple source forms can be answered, in case the target compilation unit
+ * contains multiple types. The first one is then guaranteed to be the one corresponding to the
+ * requested type.
+ */
+ void accept(ISourceType[] sourceType, PackageBinding packageBinding);
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/IntConstant.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/IntConstant.js
new file mode 100644
index 0000000..e865e94
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/IntConstant.js
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.impl;
+
+public class IntConstant extends Constant {
+
+ int value;
+
+ public IntConstant(int value) {
+ this.value = value;
+ }
+
+ public byte byteValue() {
+ return (byte) value;
+ }
+
+ public char charValue() {
+ return (char) value;
+ }
+
+ public double doubleValue() {
+ return value; // implicit cast to return type
+ }
+
+ public float floatValue() {
+ return value; // implicit cast to return type
+ }
+
+ public int intValue() {
+ return value;
+ }
+
+ public long longValue() {
+ return value; // implicit cast to return type
+ }
+
+ public short shortValue() {
+ return (short) value;
+ }
+
+ public String stringValue() {
+ //spec 15.17.11
+ String s = new Integer(value).toString();
+ if (s == null) return "null"; //$NON-NLS-1$
+ return s;
+ }
+
+ public String toString() {
+ return "(int)" + value; //$NON-NLS-1$
+ }
+
+ public int typeID() {
+ return T_int;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/LongConstant.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/LongConstant.js
new file mode 100644
index 0000000..a01a5c7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/LongConstant.js
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.impl;
+
+public class LongConstant extends Constant {
+ long value;
+public LongConstant(long value) {
+ this.value = value;
+}
+public byte byteValue() {
+ return (byte) value;
+}
+public char charValue() {
+ return (char) value;
+}
+public double doubleValue() {
+ return value; // implicit cast to return type
+}
+public float floatValue() {
+ return value; // implicit cast to return type
+}
+public int intValue() {
+ return (int) value;
+}
+public long longValue() {
+ return value;
+}
+public short shortValue() {
+ return (short) value;
+}
+public String stringValue() {
+ //spec 15.17.11
+
+ String s = new Long(value).toString() ;
+ if (s == null) return "null"; //$NON-NLS-1$
+ return s;
+}
+public String toString(){
+
+ return "(long)" + value ; } //$NON-NLS-1$
+public int typeID() {
+ return T_long;
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/ReferenceContext.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/ReferenceContext.js
new file mode 100644
index 0000000..1df477b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/ReferenceContext.js
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.impl;
+/*
+ * Implementors are valid compilation contexts from which we can
+ * escape in case of error:
+ * For example: method, type or compilation unit.
+ */
+
+import org.eclipse.wst.jsdt.core.compiler.IProblem;
+import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
+
+public interface ReferenceContext {
+ void abort(int abortLevel, IProblem problem);
+ CompilationResult compilationResult();
+ void tagAsHavingErrors();
+ boolean hasErrors();
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/ShortConstant.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/ShortConstant.js
new file mode 100644
index 0000000..da56229
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/ShortConstant.js
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.impl;
+
+public class ShortConstant extends Constant {
+ short value;
+public ShortConstant(short value) {
+ this.value = value;
+}
+public byte byteValue() {
+ return (byte) value;
+}
+public char charValue() {
+ return (char) value;
+}
+public double doubleValue() {
+ return value; // implicit cast to return type
+}
+public float floatValue() {
+ return value; // implicit cast to return type
+}
+public int intValue() {
+ return value; // implicit cast to return type
+}
+public long longValue() {
+ return value; // implicit cast to return type
+}
+public short shortValue() {
+ return value;
+}
+public String stringValue() {
+ //spec 15.17.11
+
+ String s = new Integer(value).toString() ;
+ if (s == null) return "null"; //$NON-NLS-1$
+ return s;
+}
+public String toString(){
+
+ return "(short)" + value ; } //$NON-NLS-1$
+public int typeID() {
+ return T_short;
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/StringConstant.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/StringConstant.js
new file mode 100644
index 0000000..7c917d4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/StringConstant.js
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.impl;
+
+public class StringConstant extends Constant {
+ public String value;
+
+public StringConstant(String value) {
+ this.value = value ;
+}
+public boolean compileTimeEqual(StringConstant right){
+ //String are intermed in the compiler==>thus if two string constant
+ //get to be compared, it is an equal on the vale which is done
+ if (this.value == null) {
+ return right.value == null;
+ }
+ return this.value.equals(right.value);
+}
+public String stringValue() {
+ //spec 15.17.11
+
+ //the next line do not go into the toString() send....!
+ return value ;
+
+ /*
+ String s = value.toString() ;
+ if (s == null)
+ return "null";
+ else
+ return s;
+ */
+
+}
+public String toString(){
+
+ return "(String)\"" + value +"\""; } //$NON-NLS-2$ //$NON-NLS-1$
+public int typeID() {
+ return T_String;
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ArrayBinding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ArrayBinding.js
new file mode 100644
index 0000000..664e878
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ArrayBinding.js
@@ -0,0 +1,219 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import java.util.Map;
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.impl.Constant;
+
+public final class ArrayBinding extends TypeBinding {
+ // creation and initialization of the length field
+ // the declaringClass of this field is intentionally set to null so it can be distinguished.
+ public static final FieldBinding ArrayLength = new FieldBinding(LENGTH, IntBinding, AccPublic | AccFinal, null, Constant.NotAConstant);
+
+ public TypeBinding leafComponentType;
+ public int dimensions;
+ LookupEnvironment environment;
+ char[] constantPoolName;
+ char[] genericTypeSignature;
+
+public ArrayBinding(TypeBinding type, int dimensions, LookupEnvironment environment) {
+ this.tagBits |= IsArrayType;
+ this.leafComponentType = type;
+ this.dimensions = dimensions;
+ this.environment = environment;
+ if (type instanceof UnresolvedReferenceBinding)
+ ((UnresolvedReferenceBinding) type).addWrapper(this);
+ else
+ this.tagBits |= type.tagBits & (HasTypeVariable | HasWildcard);
+}
+
+/**
+ * Collect the substitutes into a map for certain type variables inside the receiver type
+ * e.g. Collection<T>.findSubstitute(T, Collection<List<X>>): T --> List<X>
+ */
+public void collectSubstitutes(TypeBinding otherType, Map substitutes) {
+ if (otherType.isArrayType()) {
+ int otherDim = otherType.dimensions();
+ if (otherDim == this.dimensions) {
+ this.leafComponentType.collectSubstitutes(otherType.leafComponentType(), substitutes);
+ } else if (otherDim > this.dimensions) {
+ ArrayBinding otherReducedType = this.environment.createArrayType(otherType.leafComponentType(), otherDim - this.dimensions);
+ this.leafComponentType.collectSubstitutes(otherReducedType, substitutes);
+ }
+ }
+}
+
+/**
+ * Answer the receiver's constant pool name.
+ * NOTE: This method should only be used during/after code gen.
+ * e.g. '[Ljava/lang/Object;'
+ */
+public char[] constantPoolName() {
+ if (constantPoolName != null)
+ return constantPoolName;
+
+ char[] brackets = new char[dimensions];
+ for (int i = dimensions - 1; i >= 0; i--) brackets[i] = '[';
+ return constantPoolName = CharOperation.concat(brackets, leafComponentType.signature());
+}
+public String debugName() {
+ StringBuffer brackets = new StringBuffer(dimensions * 2);
+ for (int i = dimensions; --i >= 0;)
+ brackets.append("[]"); //$NON-NLS-1$
+ return leafComponentType.debugName() + brackets.toString();
+}
+public int dimensions() {
+ return this.dimensions;
+}
+
+/* Answer an array whose dimension size is one less than the receiver.
+*
+* When the receiver's dimension size is one then answer the leaf component type.
+*/
+
+public TypeBinding elementsType() {
+ if (this.dimensions == 1) return this.leafComponentType;
+ return this.environment.createArrayType(this.leafComponentType, this.dimensions - 1);
+}
+/**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding#erasure()
+ */
+public TypeBinding erasure() {
+ TypeBinding erasedType = this.leafComponentType.erasure();
+ if (this.leafComponentType != erasedType)
+ return this.environment.createArrayType(erasedType, this.dimensions);
+ return this;
+}
+public LookupEnvironment environment() {
+ return this.environment;
+}
+
+public char[] genericTypeSignature() {
+
+ if (this.genericTypeSignature == null) {
+ char[] brackets = new char[dimensions];
+ for (int i = dimensions - 1; i >= 0; i--) brackets[i] = '[';
+ this.genericTypeSignature = CharOperation.concat(brackets, leafComponentType.genericTypeSignature());
+ }
+ return this.genericTypeSignature;
+}
+
+public PackageBinding getPackage() {
+ return leafComponentType.getPackage();
+}
+public int hashCode() {
+ return this.leafComponentType == null ? super.hashCode() : this.leafComponentType.hashCode();
+}
+/* Answer true if the receiver type can be assigned to the argument type (right)
+*/
+public boolean isCompatibleWith(TypeBinding right) {
+ if (this == right)
+ return true;
+
+ if (right.isArrayType()) {
+ ArrayBinding rightArray = (ArrayBinding) right;
+ if (rightArray.leafComponentType.isBaseType())
+ return false; // relying on the fact that all equal arrays are identical
+ if (dimensions == rightArray.dimensions)
+ return leafComponentType.isCompatibleWith(rightArray.leafComponentType);
+ if (dimensions < rightArray.dimensions)
+ return false; // cannot assign 'String[]' into 'Object[][]' but can assign 'byte[][]' into 'Object[]'
+ } else {
+ if (right.isBaseType())
+ return false;
+ if (right.isWildcard()) {
+ return ((WildcardBinding) right).boundCheck(this);
+ }
+ }
+ //Check dimensions - Java does not support explicitly sized dimensions for types.
+ //However, if it did, the type checking support would go here.
+ switch (right.leafComponentType().id) {
+ case T_JavaLangObject :
+ case T_JavaLangCloneable :
+ case T_JavaIoSerializable :
+ return true;
+ }
+ return false;
+}
+
+/**
+ * Returns true if a type is identical to another one,
+ * or for generic types, true if compared to its raw type.
+ */
+public boolean isEquivalentTo(TypeBinding otherType) {
+ if (this == otherType) return true;
+ if (otherType == null) return false;
+ if (otherType.isWildcard()) // wildcard
+ return ((WildcardBinding) otherType).boundCheck(this);
+ return false;
+
+}
+public TypeBinding leafComponentType(){
+ return leafComponentType;
+}
+
+/* API
+* Answer the problem id associated with the receiver.
+* NoError if the receiver is a valid binding.
+*/
+
+public int problemId() {
+ return leafComponentType.problemId();
+}
+/**
+* Answer the source name for the type.
+* In the case of member types, as the qualified name from its top level type.
+* For example, for a member type N defined inside M & A: "A.M.N".
+*/
+
+public char[] qualifiedSourceName() {
+ char[] brackets = new char[dimensions * 2];
+ for (int i = dimensions * 2 - 1; i >= 0; i -= 2) {
+ brackets[i] = ']';
+ brackets[i - 1] = '[';
+ }
+ return CharOperation.concat(leafComponentType.qualifiedSourceName(), brackets);
+}
+public char[] readableName() /* java.lang.Object[] */ {
+ char[] brackets = new char[dimensions * 2];
+ for (int i = dimensions * 2 - 1; i >= 0; i -= 2) {
+ brackets[i] = ']';
+ brackets[i - 1] = '[';
+ }
+ return CharOperation.concat(leafComponentType.readableName(), brackets);
+}
+public char[] shortReadableName(){
+ char[] brackets = new char[dimensions * 2];
+ for (int i = dimensions * 2 - 1; i >= 0; i -= 2) {
+ brackets[i] = ']';
+ brackets[i - 1] = '[';
+ }
+ return CharOperation.concat(leafComponentType.shortReadableName(), brackets);
+}
+public char[] sourceName() {
+ char[] brackets = new char[dimensions * 2];
+ for (int i = dimensions * 2 - 1; i >= 0; i -= 2) {
+ brackets[i] = ']';
+ brackets[i - 1] = '[';
+ }
+ return CharOperation.concat(leafComponentType.sourceName(), brackets);
+}
+public void swapUnresolved(UnresolvedReferenceBinding unresolvedType, ReferenceBinding resolvedType, LookupEnvironment env) {
+ if (this.leafComponentType == unresolvedType) {
+ this.leafComponentType = resolvedType.isGenericType() ? env.createRawType(resolvedType, null) : resolvedType;
+ this.tagBits |= this.leafComponentType.tagBits & (HasTypeVariable | HasWildcard);
+ }
+}
+public String toString() {
+ return leafComponentType != null ? debugName() : "NULL TYPE ARRAY"; //$NON-NLS-1$
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/BaseTypeBinding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/BaseTypeBinding.js
new file mode 100644
index 0000000..ed30230
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/BaseTypeBinding.js
@@ -0,0 +1,186 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+public final class BaseTypeBinding extends TypeBinding {
+
+ public char[] simpleName;
+ private char[] constantPoolName;
+
+ BaseTypeBinding(int id, char[] name, char[] constantPoolName) {
+
+ this.tagBits |= IsBaseType;
+ this.id = id;
+ this.simpleName = name;
+ this.constantPoolName = constantPoolName;
+ }
+
+ /* Answer the receiver's constant pool name.
+ */
+ public char[] constantPoolName() {
+
+ return constantPoolName;
+ }
+
+ public PackageBinding getPackage() {
+
+ return null;
+ }
+
+ /* Answer true if the receiver type can be assigned to the argument type (right)
+ */
+ public final boolean isCompatibleWith(TypeBinding right) {
+
+ if (this == right)
+ return true;
+ if (!right.isBaseType())
+ return this == NullBinding;
+
+ switch (right.id) {
+ case T_boolean :
+ case T_byte :
+ case T_char :
+ return false;
+ case T_double :
+ switch (id) {
+ case T_byte :
+ case T_char :
+ case T_short :
+ case T_int :
+ case T_long :
+ case T_float :
+ return true;
+ default :
+ return false;
+ }
+ case T_float :
+ switch (id) {
+ case T_byte :
+ case T_char :
+ case T_short :
+ case T_int :
+ case T_long :
+ return true;
+ default :
+ return false;
+ }
+ case T_long :
+ switch (id) {
+ case T_byte :
+ case T_char :
+ case T_short :
+ case T_int :
+ return true;
+ default :
+ return false;
+ }
+ case T_int :
+ switch (id) {
+ case T_byte :
+ case T_char :
+ case T_short :
+ return true;
+ default :
+ return false;
+ }
+ case T_short :
+ return (id == T_byte);
+ }
+ return false;
+ }
+
+ public static final boolean isNarrowing(int left, int right) {
+
+ //can "left" store a "right" using some narrowing conversion
+ //(is left smaller than right)
+ switch (left) {
+ case T_boolean :
+ return right == T_boolean;
+ case T_char :
+ case T_byte :
+ if (right == T_byte)
+ return true;
+ case T_short :
+ if (right == T_short)
+ return true;
+ if (right == T_char)
+ return true;
+ case T_int :
+ if (right == T_int)
+ return true;
+ case T_long :
+ if (right == T_long)
+ return true;
+ case T_float :
+ if (right == T_float)
+ return true;
+ case T_double :
+ if (right == T_double)
+ return true;
+ default :
+ return false;
+ }
+ }
+
+ public static final boolean isWidening(int left, int right) {
+
+ //can "left" store a "right" using some widening conversion
+ //(is left "bigger" than right)
+ switch (left) {
+ case T_boolean :
+ return right == T_boolean;
+ case T_char :
+ return right == T_char;
+ case T_double :
+ if (right == T_double)
+ return true;
+ case T_float :
+ if (right == T_float)
+ return true;
+ case T_long :
+ if (right == T_long)
+ return true;
+ case T_int :
+ if (right == T_int)
+ return true;
+ if (right == T_char)
+ return true;
+ case T_short :
+ if (right == T_short)
+ return true;
+ case T_byte :
+ if (right == T_byte)
+ return true;
+ default :
+ return false;
+ }
+ }
+
+ public char[] qualifiedSourceName() {
+ return simpleName;
+ }
+
+ public char[] readableName() {
+ return simpleName;
+ }
+
+ public char[] shortReadableName() {
+ return simpleName;
+ }
+
+ public char[] sourceName() {
+ return simpleName;
+ }
+
+ public String toString() {
+ return new String(constantPoolName) + " (id=" + id + ")"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/BaseTypes.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/BaseTypes.js
new file mode 100644
index 0000000..b0f39cc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/BaseTypes.js
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+public interface BaseTypes {
+ final BaseTypeBinding IntBinding = new BaseTypeBinding(TypeIds.T_int, "int".toCharArray(), new char[] {'I'}); //$NON-NLS-1$
+ final BaseTypeBinding ByteBinding = new BaseTypeBinding(TypeIds.T_byte, "byte".toCharArray(), new char[] {'B'}); //$NON-NLS-1$
+ final BaseTypeBinding ShortBinding = new BaseTypeBinding(TypeIds.T_short, "short".toCharArray(), new char[] {'S'}); //$NON-NLS-1$
+ final BaseTypeBinding CharBinding = new BaseTypeBinding(TypeIds.T_char, "char".toCharArray(), new char[] {'C'}); //$NON-NLS-1$
+ final BaseTypeBinding LongBinding = new BaseTypeBinding(TypeIds.T_long, "long".toCharArray(), new char[] {'J'}); //$NON-NLS-1$
+ final BaseTypeBinding FloatBinding = new BaseTypeBinding(TypeIds.T_float, "float".toCharArray(), new char[] {'F'}); //$NON-NLS-1$
+ final BaseTypeBinding DoubleBinding = new BaseTypeBinding(TypeIds.T_double, "double".toCharArray(), new char[] {'D'}); //$NON-NLS-1$
+ final BaseTypeBinding BooleanBinding = new BaseTypeBinding(TypeIds.T_boolean, "boolean".toCharArray(), new char[] {'Z'}); //$NON-NLS-1$
+ final BaseTypeBinding NullBinding = new BaseTypeBinding(TypeIds.T_null, "null".toCharArray(), new char[] {'N'}); //N stands for null even if it is never internally used //$NON-NLS-1$
+ final BaseTypeBinding VoidBinding = new BaseTypeBinding(TypeIds.T_void, "void".toCharArray(), new char[] {'V'}); //$NON-NLS-1$
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/BinaryTypeBinding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/BinaryTypeBinding.js
new file mode 100644
index 0000000..d7eb557
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/BinaryTypeBinding.js
@@ -0,0 +1,819 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.ast.ConstructorDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.wst.jsdt.internal.compiler.env.IBinaryField;
+import org.eclipse.wst.jsdt.internal.compiler.env.IBinaryMethod;
+import org.eclipse.wst.jsdt.internal.compiler.env.IBinaryNestedType;
+import org.eclipse.wst.jsdt.internal.compiler.env.IBinaryType;
+import org.eclipse.wst.jsdt.internal.compiler.problem.AbortCompilation;
+
+/*
+Not all fields defined by this type are initialized when it is created.
+Some are initialized only when needed.
+
+Accessors have been provided for some public fields so all TypeBindings have the same API...
+but access public fields directly whenever possible.
+Non-public fields have accessors which should be used everywhere you expect the field to be initialized.
+
+null is NOT a valid value for a non-public field... it just means the field is not initialized.
+*/
+
+public final class BinaryTypeBinding extends ReferenceBinding {
+
+// all of these fields are ONLY guaranteed to be initialized if accessed using their public accessor method
+private ReferenceBinding superclass;
+private ReferenceBinding enclosingType;
+private ReferenceBinding[] superInterfaces;
+private FieldBinding[] fields;
+private MethodBinding[] methods;
+private ReferenceBinding[] memberTypes;
+protected TypeVariableBinding[] typeVariables;
+
+// For the link with the principle structure
+private LookupEnvironment environment;
+
+public static ReferenceBinding resolveType(ReferenceBinding type, LookupEnvironment environment, boolean convertGenericToRawType) {
+ if (type instanceof UnresolvedReferenceBinding)
+ return ((UnresolvedReferenceBinding) type).resolve(environment, convertGenericToRawType);
+ if (type.isParameterizedType())
+ return ((ParameterizedTypeBinding) type).resolve();
+ if (type.isWildcard())
+ return ((WildcardBinding) type).resolve();
+
+ if (convertGenericToRawType && type.isGenericType()) // raw reference to generic ?
+ return environment.createRawType(type, null);
+ return type;
+}
+public static TypeBinding resolveType(TypeBinding type, LookupEnvironment environment, ParameterizedTypeBinding parameterizedType, int rank) {
+ if (type instanceof UnresolvedReferenceBinding)
+ return ((UnresolvedReferenceBinding) type).resolve(environment, parameterizedType == null);
+ if (type.isParameterizedType())
+ return ((ParameterizedTypeBinding) type).resolve();
+ if (type.isWildcard())
+ return ((WildcardBinding) type).resolve();
+ if (type.isArrayType())
+ resolveType(((ArrayBinding) type).leafComponentType, environment, parameterizedType, rank);
+
+ if (parameterizedType == null && type.isGenericType()) // raw reference to generic ?
+ return environment.createRawType((ReferenceBinding) type, null);
+ return type;
+}
+// resolve hierarchy types in 2 steps by first resolving any UnresolvedTypes
+static ReferenceBinding resolveUnresolvedType(ReferenceBinding type, LookupEnvironment environment, boolean convertGenericToRawType) {
+ if (type instanceof UnresolvedReferenceBinding)
+ return ((UnresolvedReferenceBinding) type).resolve(environment, convertGenericToRawType);
+
+ if (type.isParameterizedType())
+ resolveUnresolvedType(((ParameterizedTypeBinding) type).type, environment, false); // still part of parameterized type ref
+ else if (type.isWildcard())
+ resolveType(((WildcardBinding) type).genericType, environment, null, 0);
+ return type;
+}
+
+
+public BinaryTypeBinding(PackageBinding packageBinding, IBinaryType binaryType, LookupEnvironment environment) {
+ this.compoundName = CharOperation.splitOn('/', binaryType.getName());
+ computeId();
+
+ this.tagBits |= IsBinaryBinding;
+ this.environment = environment;
+ this.fPackage = packageBinding;
+ this.fileName = binaryType.getFileName();
+ this.typeVariables = NoTypeVariables;
+
+ // source name must be one name without "$".
+ char[] possibleSourceName = this.compoundName[this.compoundName.length - 1];
+ int start = CharOperation.lastIndexOf('$', possibleSourceName) + 1;
+ if (start == 0) {
+ this.sourceName = possibleSourceName;
+ } else {
+ this.sourceName = new char[possibleSourceName.length - start];
+ System.arraycopy(possibleSourceName, start, this.sourceName, 0, this.sourceName.length);
+ }
+
+ this.modifiers = binaryType.getModifiers();
+ if (binaryType.isInterface())
+ this.modifiers |= AccInterface;
+
+ if (binaryType.isAnonymous()) {
+ this.tagBits |= AnonymousTypeMask;
+ } else if (binaryType.isLocal()) {
+ this.tagBits |= LocalTypeMask;
+ } else if (binaryType.isMember()) {
+ this.tagBits |= MemberTypeMask;
+ }
+}
+
+public FieldBinding[] availableFields() {
+ FieldBinding[] availableFields = new FieldBinding[fields.length];
+ int count = 0;
+
+ for (int i = 0; i < fields.length;i++) {
+ try {
+ availableFields[count] = resolveTypeFor(fields[i]);
+ count++;
+ } catch (AbortCompilation a){
+ // silent abort
+ }
+ }
+
+ System.arraycopy(availableFields, 0, availableFields = new FieldBinding[count], 0, count);
+ return availableFields;
+}
+
+public MethodBinding[] availableMethods() {
+ if ((modifiers & AccUnresolved) == 0)
+ return methods;
+
+ MethodBinding[] availableMethods = new MethodBinding[methods.length];
+ int count = 0;
+
+ for (int i = 0; i < methods.length;i++) {
+ try {
+ availableMethods[count] = resolveTypesFor(methods[i]);
+ count++;
+ } catch (AbortCompilation a){
+ // silent abort
+ }
+ }
+ System.arraycopy(availableMethods, 0, availableMethods = new MethodBinding[count], 0, count);
+ return availableMethods;
+}
+
+void cachePartsFrom(IBinaryType binaryType, boolean needFieldsAndMethods) {
+
+ // default initialization for super-interfaces early, in case some aborting compilation error occurs,
+ // and still want to use binaries passed that point (e.g. type hierarchy resolver, see bug 63748).
+ this.superInterfaces = NoSuperInterfaces;
+
+ // need enclosing type to access type variables
+ char[] enclosingTypeName = binaryType.getEnclosingTypeName();
+ if (enclosingTypeName != null) {
+ // attempt to find the enclosing type if it exists in the cache (otherwise - resolve it when requested)
+ this.enclosingType = environment.getTypeFromConstantPoolName(enclosingTypeName, 0, -1, true); // pretend parameterized to avoid raw
+ this.tagBits |= MemberTypeMask; // must be a member type not a top-level or local type
+ this.tagBits |= HasUnresolvedEnclosingType;
+ if (this.enclosingType().isStrictfp())
+ this.modifiers |= AccStrictfp;
+ if (this.enclosingType().isDeprecated())
+ this.modifiers |= AccDeprecatedImplicitly;
+ }
+
+ boolean checkGenericSignatures = environment.options.sourceLevel >= ClassFileConstants.JDK1_5;
+ char[] typeSignature = checkGenericSignatures ? binaryType.getGenericSignature() : null;
+ if (typeSignature == null) {
+ char[] superclassName = binaryType.getSuperclassName();
+ if (superclassName != null) {
+ // attempt to find the superclass if it exists in the cache (otherwise - resolve it when requested)
+ this.superclass = environment.getTypeFromConstantPoolName(superclassName, 0, -1, false);
+ this.tagBits |= HasUnresolvedSuperclass;
+ }
+
+ this.superInterfaces = NoSuperInterfaces;
+ char[][] interfaceNames = binaryType.getInterfaceNames();
+ if (interfaceNames != null) {
+ int size = interfaceNames.length;
+ if (size > 0) {
+ this.superInterfaces = new ReferenceBinding[size];
+ for (int i = 0; i < size; i++)
+ // attempt to find each superinterface if it exists in the cache (otherwise - resolve it when requested)
+ this.superInterfaces[i] = environment.getTypeFromConstantPoolName(interfaceNames[i], 0, -1, false);
+ this.tagBits |= HasUnresolvedSuperinterfaces;
+ }
+ }
+ } else {
+ // ClassSignature = ParameterPart(optional) super_TypeSignature interface_signature
+ SignatureWrapper wrapper = new SignatureWrapper(typeSignature);
+ if (wrapper.signature[wrapper.start] == '<') {
+ // ParameterPart = '<' ParameterSignature(s) '>'
+ wrapper.start++; // skip '<'
+ int rank = 0;
+ do {
+ TypeVariableBinding variable = createTypeVariable(wrapper, rank);
+ variable.fPackage = this.fPackage;
+ System.arraycopy(this.typeVariables, 0, this.typeVariables = new TypeVariableBinding[rank + 1], 0, rank);
+ this.typeVariables[rank++] = variable;
+ initializeTypeVariable(variable, this.typeVariables, wrapper);
+ } while (wrapper.signature[wrapper.start] != '>');
+ wrapper.start++; // skip '>'
+ this.tagBits |= HasUnresolvedTypeVariables;
+ this.modifiers |= AccGenericSignature;
+ }
+
+ // attempt to find the superclass if it exists in the cache (otherwise - resolve it when requested)
+ this.superclass = (ReferenceBinding) environment.getTypeFromTypeSignature(wrapper, NoTypeVariables, this);
+ this.tagBits |= HasUnresolvedSuperclass;
+
+ this.superInterfaces = NoSuperInterfaces;
+ if (!wrapper.atEnd()) {
+ // attempt to find each superinterface if it exists in the cache (otherwise - resolve it when requested)
+ java.util.ArrayList types = new java.util.ArrayList(2);
+ do {
+ types.add(environment.getTypeFromTypeSignature(wrapper, NoTypeVariables, this));
+ } while (!wrapper.atEnd());
+ this.superInterfaces = new ReferenceBinding[types.size()];
+ types.toArray(this.superInterfaces);
+ this.tagBits |= HasUnresolvedSuperinterfaces;
+ }
+ }
+
+ this.memberTypes = NoMemberTypes;
+ IBinaryNestedType[] memberTypeStructures = binaryType.getMemberTypes();
+ if (memberTypeStructures != null) {
+ int size = memberTypeStructures.length;
+ if (size > 0) {
+ this.memberTypes = new ReferenceBinding[size];
+ for (int i = 0; i < size; i++)
+ // attempt to find each member type if it exists in the cache (otherwise - resolve it when requested)
+ this.memberTypes[i] = environment.getTypeFromConstantPoolName(memberTypeStructures[i].getName(), 0, -1, false);
+ this.tagBits |= HasUnresolvedMemberTypes;
+ }
+ }
+
+ if (needFieldsAndMethods) {
+ createFields(binaryType.getFields(), checkGenericSignatures);
+ createMethods(binaryType.getMethods(), checkGenericSignatures);
+ } else { // protect against incorrect use of the needFieldsAndMethods flag, see 48459
+ this.fields = NoFields;
+ this.methods = NoMethods;
+ }
+}
+private void createFields(IBinaryField[] iFields, boolean checkGenericSignatures) {
+ this.fields = NoFields;
+ if (iFields != null) {
+ int size = iFields.length;
+ if (size > 0) {
+ this.fields = new FieldBinding[size];
+ for (int i = 0; i < size; i++) {
+ IBinaryField field = iFields[i];
+ char[] fieldSignature = checkGenericSignatures ? field.getGenericSignature() : null;
+ TypeBinding type = fieldSignature == null
+ ? environment.getTypeFromSignature(field.getTypeName(), 0, -1, false, this)
+ : environment.getTypeFromTypeSignature(new SignatureWrapper(fieldSignature), NoTypeVariables, this);
+ this.fields[i] =
+ new FieldBinding(
+ field.getName(),
+ type,
+ field.getModifiers() | AccUnresolved,
+ this,
+ field.getConstant());
+ }
+ }
+ }
+}
+private MethodBinding createMethod(IBinaryMethod method, boolean checkGenericSignatures) {
+ int methodModifiers = method.getModifiers() | AccUnresolved;
+ ReferenceBinding[] exceptions = NoExceptions;
+ TypeBinding[] parameters = NoParameters;
+ TypeVariableBinding[] typeVars = NoTypeVariables;
+ TypeBinding returnType = null;
+
+ char[] methodSignature = checkGenericSignatures ? method.getGenericSignature() : null;
+ if (methodSignature == null) { // no generics
+ char[] methodDescriptor = method.getMethodDescriptor(); // of the form (I[Ljava/jang/String;)V
+ int numOfParams = 0;
+ char nextChar;
+ int index = 0; // first character is always '(' so skip it
+ while ((nextChar = methodDescriptor[++index]) != ')') {
+ if (nextChar != '[') {
+ numOfParams++;
+ if (nextChar == 'L')
+ while ((nextChar = methodDescriptor[++index]) != ';'){/*empty*/}
+ }
+ }
+
+ // Ignore synthetic argument for member types.
+ int startIndex = (method.isConstructor() && isMemberType() && !isStatic()) ? 1 : 0;
+ int size = numOfParams - startIndex;
+ if (size > 0) {
+ parameters = new TypeBinding[size];
+ index = 1;
+ int end = 0; // first character is always '(' so skip it
+ for (int i = 0; i < numOfParams; i++) {
+ while ((nextChar = methodDescriptor[++end]) == '['){/*empty*/}
+ if (nextChar == 'L')
+ while ((nextChar = methodDescriptor[++end]) != ';'){/*empty*/}
+
+ if (i >= startIndex) // skip the synthetic arg if necessary
+ parameters[i - startIndex] = environment.getTypeFromSignature(methodDescriptor, index, end, false, this);
+ index = end + 1;
+ }
+ }
+
+ char[][] exceptionTypes = method.getExceptionTypeNames();
+ if (exceptionTypes != null) {
+ size = exceptionTypes.length;
+ if (size > 0) {
+ exceptions = new ReferenceBinding[size];
+ for (int i = 0; i < size; i++)
+ exceptions[i] = environment.getTypeFromConstantPoolName(exceptionTypes[i], 0, -1, false);
+ }
+ }
+
+ if (!method.isConstructor())
+ returnType = environment.getTypeFromSignature(methodDescriptor, index + 1, -1, false, this); // index is currently pointing at the ')'
+ } else {
+ // MethodTypeSignature = ParameterPart(optional) '(' TypeSignatures ')' return_typeSignature ['^' TypeSignature (optional)]
+ SignatureWrapper wrapper = new SignatureWrapper(methodSignature);
+ if (wrapper.signature[wrapper.start] == '<') {
+ // <A::Ljava/lang/annotation/Annotation;>(Ljava/lang/Class<TA;>;)TA;
+ // ParameterPart = '<' ParameterSignature(s) '>'
+ wrapper.start++; // skip '<'
+ int rank = 0;
+ do {
+ TypeVariableBinding variable = createTypeVariable(wrapper, rank);
+ System.arraycopy(typeVars, 0, typeVars = new TypeVariableBinding[rank + 1], 0, rank);
+ typeVars[rank++] = variable;
+ initializeTypeVariable(variable,typeVars, wrapper);
+ } while (wrapper.signature[wrapper.start] != '>');
+ wrapper.start++; // skip '>'
+ }
+
+ if (wrapper.signature[wrapper.start] == '(') {
+ wrapper.start++; // skip '('
+ if (wrapper.signature[wrapper.start] == ')') {
+ wrapper.start++; // skip ')'
+ } else {
+ java.util.ArrayList types = new java.util.ArrayList(2);
+ int startIndex = (method.isConstructor() && isMemberType() && !isStatic()) ? 1 : 0;
+ if (startIndex == 1)
+ environment.getTypeFromTypeSignature(wrapper, typeVars, this); // skip synthetic argument
+ while (wrapper.signature[wrapper.start] != ')') {
+ types.add(environment.getTypeFromTypeSignature(wrapper, typeVars, this));
+ }
+ wrapper.start++; // skip ')'
+ parameters = new TypeBinding[types.size()];
+ types.toArray(parameters);
+ }
+ }
+
+ if (!method.isConstructor())
+ returnType = environment.getTypeFromTypeSignature(wrapper, typeVars, this);
+
+ if (!wrapper.atEnd() && wrapper.signature[wrapper.start] == '^') {
+ // attempt to find each superinterface if it exists in the cache (otherwise - resolve it when requested)
+ java.util.ArrayList types = new java.util.ArrayList(2);
+ do {
+ wrapper.start++; // skip '^'
+ types.add(environment.getTypeFromTypeSignature(wrapper, typeVars, this));
+ } while (!wrapper.atEnd() && wrapper.signature[wrapper.start] == '^');
+ exceptions = new ReferenceBinding[types.size()];
+ types.toArray(exceptions);
+ } else { // get the exceptions the old way
+ char[][] exceptionTypes = method.getExceptionTypeNames();
+ if (exceptionTypes != null) {
+ int size = exceptionTypes.length;
+ if (size > 0) {
+ exceptions = new ReferenceBinding[size];
+ for (int i = 0; i < size; i++)
+ exceptions[i] = environment.getTypeFromConstantPoolName(exceptionTypes[i], 0, -1, false);
+ }
+ }
+ }
+ }
+
+ MethodBinding result = method.isConstructor()
+ ? new MethodBinding(methodModifiers, parameters, exceptions, this)
+ : new MethodBinding(methodModifiers, method.getSelector(), returnType, parameters, exceptions, this);
+ result.typeVariables = typeVars;
+ return result;
+}
+/**
+ * Create method bindings for binary type, filtering out <clinit> and synthetics
+ */
+private void createMethods(IBinaryMethod[] iMethods, boolean checkGenericSignatures) {
+ int total = 0, initialTotal = 0, iClinit = -1;
+ int[] toSkip = null;
+ if (iMethods != null) {
+ total = initialTotal = iMethods.length;
+ for (int i = total; --i >= 0;) {
+ IBinaryMethod method = iMethods[i];
+ if ((method.getModifiers() & AccSynthetic) != 0) {
+ // discard synthetics methods
+ if (toSkip == null) toSkip = new int[iMethods.length];
+ toSkip[i] = -1;
+ total--;
+ } else if (iClinit == -1) {
+ char[] methodName = method.getSelector();
+ if (methodName.length == 8 && methodName[0] == '<') {
+ // discard <clinit>
+ iClinit = i;
+ total--;
+ }
+ }
+ }
+ }
+ if (total == 0) {
+ this.methods = NoMethods;
+ return;
+ }
+
+ this.methods = new MethodBinding[total];
+ if (total == initialTotal) {
+ for (int i = 0; i < initialTotal; i++)
+ this.methods[i] = createMethod(iMethods[i], checkGenericSignatures);
+ } else {
+ for (int i = 0, index = 0; i < initialTotal; i++)
+ if (iClinit != i && (toSkip == null || toSkip[i] != -1))
+ this.methods[index++] = createMethod(iMethods[i], checkGenericSignatures);
+ }
+ modifiers |= AccUnresolved; // until methods() is sent
+}
+private TypeVariableBinding createTypeVariable(SignatureWrapper wrapper, int rank) {
+ // ParameterSignature = Identifier ':' TypeSignature
+ // or Identifier ':' TypeSignature(optional) InterfaceBound(s)
+ // InterfaceBound = ':' TypeSignature
+ int colon = CharOperation.indexOf(':', wrapper.signature, wrapper.start);
+ char[] variableName = CharOperation.subarray(wrapper.signature, wrapper.start, colon);
+ TypeVariableBinding variable = new TypeVariableBinding(variableName, this, rank);
+ return variable;
+}
+
+/* Answer the receiver's enclosing type... null if the receiver is a top level type.
+*
+* NOTE: enclosingType of a binary type is resolved when needed
+*/
+
+public ReferenceBinding enclosingType() {
+ if ((this.tagBits & HasUnresolvedEnclosingType) == 0)
+ return this.enclosingType;
+
+ this.enclosingType = resolveUnresolvedType(this.enclosingType, this.environment, false); // no raw conversion for now
+ this.tagBits ^= HasUnresolvedEnclosingType;
+
+ // finish resolving the type
+ this.enclosingType = resolveType(this.enclosingType, this.environment, false);
+ return this.enclosingType;
+}
+// NOTE: the type of each field of a binary type is resolved when needed
+
+public FieldBinding[] fields() {
+ for (int i = fields.length; --i >= 0;)
+ resolveTypeFor(fields[i]);
+ return fields;
+}
+// NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
+
+public MethodBinding getExactConstructor(TypeBinding[] argumentTypes) {
+ int argCount = argumentTypes.length;
+ nextMethod : for (int m = methods.length; --m >= 0;) {
+ MethodBinding method = methods[m];
+ if (method.selector == ConstructorDeclaration.ConstantPoolName && method.parameters.length == argCount) {
+ resolveTypesFor(method);
+ TypeBinding[] toMatch = method.parameters;
+ for (int p = 0; p < argCount; p++)
+ if (toMatch[p] != argumentTypes[p])
+ continue nextMethod;
+ return method;
+ }
+ }
+ return null;
+}
+// NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
+// searches up the hierarchy as long as no potential (but not exact) match was found.
+
+public MethodBinding getExactMethod(char[] selector, TypeBinding[] argumentTypes, CompilationUnitScope refScope) {
+ if (refScope != null)
+ refScope.recordTypeReference(this);
+
+ int argCount = argumentTypes.length;
+ int selectorLength = selector.length;
+ boolean foundNothing = true;
+ nextMethod : for (int m = methods.length; --m >= 0;) {
+ MethodBinding method = methods[m];
+ if (method.selector.length == selectorLength && CharOperation.equals(method.selector, selector)) {
+ foundNothing = false; // inner type lookups must know that a method with this name exists
+ if (method.parameters.length == argCount) {
+ resolveTypesFor(method);
+ TypeBinding[] toMatch = method.parameters;
+ for (int p = 0; p < argCount; p++)
+ if (toMatch[p] != argumentTypes[p])
+ continue nextMethod;
+ return method;
+ }
+ }
+ }
+
+ if (foundNothing) {
+ if (isInterface()) {
+ if (superInterfaces.length == 1)
+ return superInterfaces[0].getExactMethod(selector, argumentTypes, refScope);
+ } else if (superclass != null) {
+ return superclass.getExactMethod(selector, argumentTypes, refScope);
+ }
+ }
+ return null;
+}
+// NOTE: the type of a field of a binary type is resolved when needed
+
+public FieldBinding getField(char[] fieldName, boolean needResolve) {
+ int fieldLength = fieldName.length;
+ for (int f = fields.length; --f >= 0;) {
+ char[] name = fields[f].name;
+ if (name.length == fieldLength && CharOperation.equals(name, fieldName))
+ return needResolve ? resolveTypeFor(fields[f]) : fields[f];
+ }
+ return null;
+}
+/**
+ * Rewrite of default getMemberType to avoid resolving eagerly all member types when one is requested
+ */
+public ReferenceBinding getMemberType(char[] typeName) {
+ for (int i = this.memberTypes.length; --i >= 0;) {
+ ReferenceBinding memberType = this.memberTypes[i];
+ if (memberType instanceof UnresolvedReferenceBinding) {
+ char[] name = memberType.sourceName; // source name is qualified with enclosing type name
+ int prefixLength = this.compoundName[this.compoundName.length - 1].length + 1; // enclosing$
+ if (name.length == (prefixLength + typeName.length)) // enclosing $ typeName
+ if (CharOperation.fragmentEquals(typeName, name, prefixLength, true)) // only check trailing portion
+ return this.memberTypes[i] = resolveType(memberType, this.environment, false); // no raw conversion for now
+ } else if (CharOperation.equals(typeName, memberType.sourceName)) {
+ return memberType;
+ }
+ }
+ return null;
+}
+// NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
+
+public MethodBinding[] getMethods(char[] selector) {
+ int count = 0;
+ int lastIndex = -1;
+ int selectorLength = selector.length;
+ for (int m = 0, length = methods.length; m < length; m++) {
+ MethodBinding method = methods[m];
+ if (method.selector.length == selectorLength && CharOperation.equals(method.selector, selector)) {
+ resolveTypesFor(method);
+ count++;
+ lastIndex = m;
+ }
+ }
+ if (count == 1)
+ return new MethodBinding[] {methods[lastIndex]};
+ if (count > 0) {
+ MethodBinding[] result = new MethodBinding[count];
+ count = 0;
+ for (int m = 0; m <= lastIndex; m++) {
+ MethodBinding method = methods[m];
+ if (method.selector.length == selectorLength && CharOperation.equals(method.selector, selector))
+ result[count++] = method;
+ }
+ return result;
+ }
+ return NoMethods;
+}
+public boolean hasMemberTypes() {
+ return this.memberTypes.length > 0;
+}
+// NOTE: member types of binary types are resolved when needed
+
+public TypeVariableBinding getTypeVariable(char[] variableName) {
+ TypeVariableBinding variable = super.getTypeVariable(variableName);
+ resolveTypesFor(variable);
+ return variable;
+}
+private void initializeTypeVariable(TypeVariableBinding variable, TypeVariableBinding[] existingVariables, SignatureWrapper wrapper) {
+ // ParameterSignature = Identifier ':' TypeSignature
+ // or Identifier ':' TypeSignature(optional) InterfaceBound(s)
+ // InterfaceBound = ':' TypeSignature
+ int colon = CharOperation.indexOf(':', wrapper.signature, wrapper.start);
+ wrapper.start = colon + 1; // skip name + ':'
+ ReferenceBinding type, firstBound = null;
+ if (wrapper.signature[wrapper.start] == ':') {
+ type = environment.getType(JAVA_LANG_OBJECT);
+ } else {
+ type = (ReferenceBinding) environment.getTypeFromTypeSignature(wrapper, existingVariables, this);
+ firstBound = type;
+ }
+
+ // variable is visible to its bounds
+ variable.modifiers |= AccUnresolved;
+ variable.superclass = type;
+
+ ReferenceBinding[] bounds = null;
+ if (wrapper.signature[wrapper.start] == ':') {
+ java.util.ArrayList types = new java.util.ArrayList(2);
+ do {
+ wrapper.start++; // skip ':'
+ types.add(environment.getTypeFromTypeSignature(wrapper, existingVariables, this));
+ } while (wrapper.signature[wrapper.start] == ':');
+ bounds = new ReferenceBinding[types.size()];
+ types.toArray(bounds);
+ }
+
+ variable.superInterfaces = bounds == null ? NoSuperInterfaces : bounds;
+ if (firstBound == null) {
+ firstBound = variable.superInterfaces.length == 0 ? null : variable.superInterfaces[0];
+ variable.modifiers |= AccInterface;
+ }
+ variable.firstBound = firstBound;
+}
+/**
+ * Returns true if a type is identical to another one,
+ * or for generic types, true if compared to its raw type.
+ */
+public boolean isEquivalentTo(TypeBinding otherType) {
+ if (this == otherType) return true;
+ if (otherType == null) return false;
+ if (otherType.isWildcard()) // wildcard
+ return ((WildcardBinding) otherType).boundCheck(this);
+ if (this.typeVariables == NoTypeVariables) return false;
+ if (otherType.isRawType())
+ return otherType.erasure() == this;
+ return false;
+}
+public boolean isGenericType() {
+ return this.typeVariables != NoTypeVariables;
+}
+// NOTE: member types of binary types are resolved when needed
+
+public ReferenceBinding[] memberTypes() {
+ if ((this.tagBits & HasUnresolvedMemberTypes) == 0)
+ return this.memberTypes;
+
+ for (int i = this.memberTypes.length; --i >= 0;)
+ this.memberTypes[i] = resolveUnresolvedType(this.memberTypes[i], this.environment, false); // no raw conversion for now
+ this.tagBits ^= HasUnresolvedMemberTypes;
+
+ for (int i = this.memberTypes.length; --i >= 0;)
+ this.memberTypes[i] = resolveType(this.memberTypes[i], this.environment, false); // no raw conversion for now
+ return this.memberTypes;
+}
+// NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
+
+public MethodBinding[] methods() {
+ if ((modifiers & AccUnresolved) == 0)
+ return methods;
+
+ for (int i = methods.length; --i >= 0;)
+ resolveTypesFor(methods[i]);
+ modifiers ^= AccUnresolved;
+ return methods;
+}
+private FieldBinding resolveTypeFor(FieldBinding field) {
+ if ((field.modifiers & AccUnresolved) == 0)
+ return field;
+
+ field.type = resolveType(field.type, this.environment, null, 0);
+ field.modifiers ^= AccUnresolved;
+ return field;
+}
+MethodBinding resolveTypesFor(MethodBinding method) {
+ if ((method.modifiers & AccUnresolved) == 0)
+ return method;
+
+ if (!method.isConstructor())
+ method.returnType = resolveType(method.returnType, this.environment, null, 0);
+ for (int i = method.parameters.length; --i >= 0;)
+ method.parameters[i] = resolveType(method.parameters[i], this.environment, null, 0);
+ for (int i = method.thrownExceptions.length; --i >= 0;)
+ method.thrownExceptions[i] = resolveType(method.thrownExceptions[i], this.environment, true);
+ for (int i = method.typeVariables.length; --i >= 0;)
+ resolveTypesFor(method.typeVariables[i]);
+ method.modifiers ^= AccUnresolved;
+ return method;
+}
+private TypeVariableBinding resolveTypesFor(TypeVariableBinding variable) {
+ if ((variable.modifiers & AccUnresolved) == 0)
+ return variable;
+
+ if (variable.superclass != null)
+ variable.superclass = resolveUnresolvedType(variable.superclass, this.environment, true);
+ if (variable.firstBound != null)
+ variable.firstBound = resolveUnresolvedType(variable.firstBound, this.environment, true);
+ ReferenceBinding[] interfaces = variable.superInterfaces;
+ for (int i = interfaces.length; --i >= 0;)
+ interfaces[i] = resolveUnresolvedType(interfaces[i], this.environment, true);
+ variable.modifiers ^= AccUnresolved;
+
+ // finish resolving the types
+ if (variable.superclass != null)
+ variable.superclass = resolveType(variable.superclass, this.environment, true);
+ if (variable.firstBound != null)
+ variable.firstBound = resolveType(variable.firstBound, this.environment, true);
+ for (int i = interfaces.length; --i >= 0;)
+ interfaces[i] = resolveType(interfaces[i], this.environment, true);
+ return variable;
+}
+/* Answer the receiver's superclass... null if the receiver is Object or an interface.
+*
+* NOTE: superclass of a binary type is resolved when needed
+*/
+
+public ReferenceBinding superclass() {
+ if ((this.tagBits & HasUnresolvedSuperclass) == 0)
+ return this.superclass;
+
+ this.superclass = resolveUnresolvedType(this.superclass, this.environment, true);
+ this.tagBits ^= HasUnresolvedSuperclass;
+
+ // finish resolving the type
+ this.superclass = resolveType(this.superclass, this.environment, true);
+ return this.superclass;
+}
+// NOTE: superInterfaces of binary types are resolved when needed
+
+public ReferenceBinding[] superInterfaces() {
+ if ((this.tagBits & HasUnresolvedSuperinterfaces) == 0)
+ return this.superInterfaces;
+
+ for (int i = this.superInterfaces.length; --i >= 0;)
+ this.superInterfaces[i] = resolveUnresolvedType(this.superInterfaces[i], this.environment, true);
+ this.tagBits ^= HasUnresolvedSuperinterfaces;
+
+ for (int i = this.superInterfaces.length; --i >= 0;)
+ this.superInterfaces[i] = resolveType(this.superInterfaces[i], this.environment, true);
+ return this.superInterfaces;
+}
+public TypeVariableBinding[] typeVariables() {
+ if ((this.tagBits & HasUnresolvedTypeVariables) == 0)
+ return this.typeVariables;
+
+ for (int i = this.typeVariables.length; --i >= 0;)
+ resolveTypesFor(this.typeVariables[i]);
+ this.tagBits ^= HasUnresolvedTypeVariables;
+ return this.typeVariables;
+}
+public String toString() {
+ String s = ""; //$NON-NLS-1$
+
+ if (isDeprecated()) s += "deprecated "; //$NON-NLS-1$
+ if (isPublic()) s += "public "; //$NON-NLS-1$
+ if (isProtected()) s += "protected "; //$NON-NLS-1$
+ if (isPrivate()) s += "private "; //$NON-NLS-1$
+ if (isAbstract() && isClass()) s += "abstract "; //$NON-NLS-1$
+ if (isStatic() && isNestedType()) s += "static "; //$NON-NLS-1$
+ if (isFinal()) s += "final "; //$NON-NLS-1$
+
+ s += isInterface() ? "interface " : "class "; //$NON-NLS-1$ //$NON-NLS-2$
+ s += (compoundName != null) ? CharOperation.toString(compoundName) : "UNNAMED TYPE"; //$NON-NLS-1$
+
+ s += "\n\textends "; //$NON-NLS-1$
+ s += (superclass != null) ? superclass.debugName() : "NULL TYPE"; //$NON-NLS-1$
+
+ if (superInterfaces != null) {
+ if (superInterfaces != NoSuperInterfaces) {
+ s += "\n\timplements : "; //$NON-NLS-1$
+ for (int i = 0, length = superInterfaces.length; i < length; i++) {
+ if (i > 0)
+ s += ", "; //$NON-NLS-1$
+ s += (superInterfaces[i] != null) ? superInterfaces[i].debugName() : "NULL TYPE"; //$NON-NLS-1$
+ }
+ }
+ } else {
+ s += "NULL SUPERINTERFACES"; //$NON-NLS-1$
+ }
+
+ if (enclosingType != null) {
+ s += "\n\tenclosing type : "; //$NON-NLS-1$
+ s += enclosingType.debugName();
+ }
+
+ if (fields != null) {
+ if (fields != NoFields) {
+ s += "\n/* fields */"; //$NON-NLS-1$
+ for (int i = 0, length = fields.length; i < length; i++)
+ s += (fields[i] != null) ? "\n" + fields[i].toString() : "\nNULL FIELD"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ } else {
+ s += "NULL FIELDS"; //$NON-NLS-1$
+ }
+
+ if (methods != null) {
+ if (methods != NoMethods) {
+ s += "\n/* methods */"; //$NON-NLS-1$
+ for (int i = 0, length = methods.length; i < length; i++)
+ s += (methods[i] != null) ? "\n" + methods[i].toString() : "\nNULL METHOD"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ } else {
+ s += "NULL METHODS"; //$NON-NLS-1$
+ }
+
+ if (memberTypes != null) {
+ if (memberTypes != NoMemberTypes) {
+ s += "\n/* members */"; //$NON-NLS-1$
+ for (int i = 0, length = memberTypes.length; i < length; i++)
+ s += (memberTypes[i] != null) ? "\n" + memberTypes[i].toString() : "\nNULL TYPE"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ } else {
+ s += "NULL MEMBER TYPES"; //$NON-NLS-1$
+ }
+
+ s += "\n\n\n"; //$NON-NLS-1$
+ return s;
+}
+MethodBinding[] unResolvedMethods() { // for the MethodVerifier so it doesn't resolve types
+ return methods;
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/Binding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/Binding.js
new file mode 100644
index 0000000..7bcf511
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/Binding.js
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+public abstract class Binding implements BindingIds, CompilerModifiers, ProblemReasons {
+ /* API
+ * Answer the receiver's binding type from Binding.BindingID.
+ *
+ * Note: Do NOT expect this to be used very often... only in switch statements with
+ * more than 2 possible choices.
+ */
+ public abstract int bindingType();
+ /* API
+ * Answer true if the receiver is not a problem binding
+ */
+
+ public final boolean isValidBinding() {
+ return problemId() == NoError;
+ }
+ /* API
+ * Answer the problem id associated with the receiver.
+ * NoError if the receiver is a valid binding.
+ */
+ // TODO (philippe) should rename into problemReason()
+ public int problemId() {
+ return NoError;
+ }
+ /* Answer a printable representation of the receiver.
+ */
+ public abstract char[] readableName();
+
+ /* Shorter printable representation of the receiver (no qualified type)
+ */
+ public char[] shortReadableName(){
+ return readableName();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/BindingIds.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/BindingIds.js
new file mode 100644
index 0000000..086a274
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/BindingIds.js
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+public interface BindingIds {
+ final int FIELD = 1;
+ final int LOCAL = 2;
+ final int VARIABLE = FIELD | LOCAL;
+ final int TYPE = 4;
+ final int METHOD = 8;
+ final int PACKAGE = 16;
+ final int IMPORT = 32;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/BlockScope.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/BlockScope.js
new file mode 100644
index 0000000..16fee08
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/BlockScope.js
@@ -0,0 +1,825 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.ast.*;
+import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream;
+import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemReporter;
+
+public class BlockScope extends Scope {
+
+ // Local variable management
+ public LocalVariableBinding[] locals;
+ public int localIndex; // position for next variable
+ public int startIndex; // start position in this scope - for ordering scopes vs. variables
+ public int offset; // for variable allocation throughout scopes
+ public int maxOffset; // for variable allocation throughout scopes
+
+ // finally scopes must be shifted behind respective try&catch scope(s) so as to avoid
+ // collisions of secret variables (return address, save value).
+ public BlockScope[] shiftScopes;
+
+ public final static VariableBinding[] EmulationPathToImplicitThis = {};
+ public final static VariableBinding[] NoEnclosingInstanceInConstructorCall = {};
+ public final static VariableBinding[] NoEnclosingInstanceInStaticContext = {};
+
+ public Scope[] subscopes = new Scope[1]; // need access from code assist
+ public int subscopeCount = 0; // need access from code assist
+
+ // record the current case statement being processed (for entire switch case block).
+ public CaseStatement switchCase; // from 1.4 on, local types should not be accessed across switch case blocks (52221)
+
+ protected BlockScope(int kind, Scope parent) {
+
+ super(kind, parent);
+ }
+
+ public BlockScope(BlockScope parent) {
+
+ this(parent, true);
+ }
+
+ public BlockScope(BlockScope parent, boolean addToParentScope) {
+
+ this(BLOCK_SCOPE, parent);
+ locals = new LocalVariableBinding[5];
+ if (addToParentScope) parent.addSubscope(this);
+ this.startIndex = parent.localIndex;
+ }
+
+ public BlockScope(BlockScope parent, int variableCount) {
+
+ this(BLOCK_SCOPE, parent);
+ locals = new LocalVariableBinding[variableCount];
+ parent.addSubscope(this);
+ this.startIndex = parent.localIndex;
+ }
+
+ /* Create the class scope & binding for the anonymous type.
+ */
+ public final void addAnonymousType(
+ TypeDeclaration anonymousType,
+ ReferenceBinding superBinding) {
+
+ ClassScope anonymousClassScope = new ClassScope(this, anonymousType);
+ anonymousClassScope.buildAnonymousTypeBinding(
+ enclosingSourceType(),
+ superBinding);
+ }
+
+ /* Create the class scope & binding for the local type.
+ */
+ public final void addLocalType(TypeDeclaration localType) {
+
+ // check that the localType does not conflict with an enclosing type
+ ReferenceBinding type = enclosingSourceType();
+ do {
+ if (CharOperation.equals(type.sourceName, localType.name)) {
+ problemReporter().hidingEnclosingType(localType);
+ return;
+ }
+ type = type.enclosingType();
+ } while (type != null);
+
+ // check that the localType does not conflict with another sibling local type
+ Scope scope = this;
+ do {
+ if (((BlockScope) scope).findLocalType(localType.name) != null) {
+ problemReporter().duplicateNestedType(localType);
+ return;
+ }
+ } while ((scope = scope.parent) instanceof BlockScope);
+
+ ClassScope localTypeScope = new ClassScope(this, localType);
+ addSubscope(localTypeScope);
+ localTypeScope.buildLocalTypeBinding(enclosingSourceType());
+ }
+
+ /* Insert a local variable into a given scope, updating its position
+ * and checking there are not too many locals or arguments allocated.
+ */
+ public final void addLocalVariable(LocalVariableBinding binding) {
+
+ checkAndSetModifiersForVariable(binding);
+
+ // insert local in scope
+ if (localIndex == locals.length)
+ System.arraycopy(
+ locals,
+ 0,
+ (locals = new LocalVariableBinding[localIndex * 2]),
+ 0,
+ localIndex);
+ locals[localIndex++] = binding;
+
+ // update local variable binding
+ binding.declaringScope = this;
+ binding.id = this.outerMostMethodScope().analysisIndex++;
+ // share the outermost method scope analysisIndex
+ }
+
+ public void addSubscope(Scope childScope) {
+ if (subscopeCount == subscopes.length)
+ System.arraycopy(
+ subscopes,
+ 0,
+ (subscopes = new Scope[subscopeCount * 2]),
+ 0,
+ subscopeCount);
+ subscopes[subscopeCount++] = childScope;
+ }
+
+ /* Answer true if the receiver is suitable for assigning final blank fields.
+ *
+ * in other words, it is inside an initializer, a constructor or a clinit
+ */
+ public final boolean allowBlankFinalFieldAssignment(FieldBinding binding) {
+
+ if (enclosingSourceType() != binding.declaringClass)
+ return false;
+
+ MethodScope methodScope = methodScope();
+ if (methodScope.isStatic != binding.isStatic())
+ return false;
+ return methodScope.isInsideInitializer() // inside initializer
+ || ((AbstractMethodDeclaration) methodScope.referenceContext)
+ .isInitializationMethod(); // inside constructor or clinit
+ }
+ String basicToString(int tab) {
+ String newLine = "\n"; //$NON-NLS-1$
+ for (int i = tab; --i >= 0;)
+ newLine += "\t"; //$NON-NLS-1$
+
+ String s = newLine + "--- Block Scope ---"; //$NON-NLS-1$
+ newLine += "\t"; //$NON-NLS-1$
+ s += newLine + "locals:"; //$NON-NLS-1$
+ for (int i = 0; i < localIndex; i++)
+ s += newLine + "\t" + locals[i].toString(); //$NON-NLS-1$
+ s += newLine + "startIndex = " + startIndex; //$NON-NLS-1$
+ return s;
+ }
+
+ private void checkAndSetModifiersForVariable(LocalVariableBinding varBinding) {
+
+ int modifiers = varBinding.modifiers;
+ if ((modifiers & AccAlternateModifierProblem) != 0 && varBinding.declaration != null){
+ problemReporter().duplicateModifierForVariable(varBinding.declaration, this instanceof MethodScope);
+ }
+ int realModifiers = modifiers & AccJustFlag;
+
+ int unexpectedModifiers = ~AccFinal;
+ if ((realModifiers & unexpectedModifiers) != 0 && varBinding.declaration != null){
+ problemReporter().illegalModifierForVariable(varBinding.declaration, this instanceof MethodScope);
+ }
+ varBinding.modifiers = modifiers;
+ }
+
+ /* Compute variable positions in scopes given an initial position offset
+ * ignoring unused local variables.
+ *
+ * No argument is expected here (ilocal is the first non-argument local of the outermost scope)
+ * Arguments are managed by the MethodScope method
+ */
+ void computeLocalVariablePositions(int ilocal, int initOffset, CodeStream codeStream) {
+
+ this.offset = initOffset;
+ this.maxOffset = initOffset;
+
+ // local variable init
+ int maxLocals = this.localIndex;
+ boolean hasMoreVariables = ilocal < maxLocals;
+
+ // scope init
+ int iscope = 0, maxScopes = this.subscopeCount;
+ boolean hasMoreScopes = maxScopes > 0;
+
+ // iterate scopes and variables in parallel
+ while (hasMoreVariables || hasMoreScopes) {
+ if (hasMoreScopes
+ && (!hasMoreVariables || (subscopes[iscope].startIndex() <= ilocal))) {
+ // consider subscope first
+ if (subscopes[iscope] instanceof BlockScope) {
+ BlockScope subscope = (BlockScope) subscopes[iscope];
+ int subOffset = subscope.shiftScopes == null ? this.offset : subscope.maxShiftedOffset();
+ subscope.computeLocalVariablePositions(0, subOffset, codeStream);
+ if (subscope.maxOffset > this.maxOffset)
+ this.maxOffset = subscope.maxOffset;
+ }
+ hasMoreScopes = ++iscope < maxScopes;
+ } else {
+
+ // consider variable first
+ LocalVariableBinding local = locals[ilocal]; // if no local at all, will be locals[ilocal]==null
+
+ // check if variable is actually used, and may force it to be preserved
+ boolean generateCurrentLocalVar = (local.useFlag == LocalVariableBinding.USED && !local.isConstantValue());
+
+ // do not report fake used variable
+ if (local.useFlag == LocalVariableBinding.UNUSED
+ && (local.declaration != null) // unused (and non secret) local
+ && ((local.declaration.bits & ASTNode.IsLocalDeclarationReachableMASK) != 0)) { // declaration is reachable
+
+ if (!(local.declaration instanceof Argument)) // do not report unused catch arguments
+ this.problemReporter().unusedLocalVariable(local.declaration);
+ }
+
+ // could be optimized out, but does need to preserve unread variables ?
+ if (!generateCurrentLocalVar) {
+ if (local.declaration != null && environment().options.preserveAllLocalVariables) {
+ generateCurrentLocalVar = true; // force it to be preserved in the generated code
+ local.useFlag = LocalVariableBinding.USED;
+ }
+ }
+
+ // allocate variable
+ if (generateCurrentLocalVar) {
+
+ if (local.declaration != null) {
+ codeStream.record(local); // record user-defined local variables for attribute generation
+ }
+ // assign variable position
+ local.resolvedPosition = this.offset;
+
+ if ((local.type == LongBinding) || (local.type == DoubleBinding)) {
+ this.offset += 2;
+ } else {
+ this.offset++;
+ }
+ if (this.offset > 0xFFFF) { // no more than 65535 words of locals
+ this.problemReporter().noMoreAvailableSpaceForLocal(
+ local,
+ local.declaration == null ? (ASTNode)this.methodScope().referenceContext : local.declaration);
+ }
+ } else {
+ local.resolvedPosition = -1; // not generated
+ }
+ hasMoreVariables = ++ilocal < maxLocals;
+ }
+ }
+ if (this.offset > this.maxOffset)
+ this.maxOffset = this.offset;
+ }
+
+ /*
+ * Record the suitable binding denoting a synthetic field or constructor argument,
+ * mapping to the actual outer local variable in the scope context.
+ * Note that this may not need any effect, in case the outer local variable does not
+ * need to be emulated and can directly be used as is (using its back pointer to its
+ * declaring scope).
+ */
+ public void emulateOuterAccess(LocalVariableBinding outerLocalVariable) {
+
+ MethodScope currentMethodScope;
+ if ((currentMethodScope = this.methodScope())
+ != outerLocalVariable.declaringScope.methodScope()) {
+ NestedTypeBinding currentType = (NestedTypeBinding) this.enclosingSourceType();
+
+ //do nothing for member types, pre emulation was performed already
+ if (!currentType.isLocalType()) {
+ return;
+ }
+ // must also add a synthetic field if we're not inside a constructor
+ if (!currentMethodScope.isInsideInitializerOrConstructor()) {
+ currentType.addSyntheticArgumentAndField(outerLocalVariable);
+ } else {
+ currentType.addSyntheticArgument(outerLocalVariable);
+ }
+ }
+ }
+
+ /* Note that it must never produce a direct access to the targetEnclosingType,
+ * but instead a field sequence (this$2.this$1.this$0) so as to handle such a test case:
+ *
+ * class XX {
+ * void foo() {
+ * class A {
+ * class B {
+ * class C {
+ * boolean foo() {
+ * return (Object) A.this == (Object) B.this;
+ * }
+ * }
+ * }
+ * }
+ * new A().new B().new C();
+ * }
+ * }
+ * where we only want to deal with ONE enclosing instance for C (could not figure out an A for C)
+ */
+ public final ReferenceBinding findLocalType(char[] name) {
+
+ long compliance = environment().options.complianceLevel;
+ for (int i = 0, length = subscopeCount; i < length; i++) {
+ if (subscopes[i] instanceof ClassScope) {
+ LocalTypeBinding sourceType = (LocalTypeBinding)((ClassScope) subscopes[i]).referenceContext.binding;
+ // from 1.4 on, local types should not be accessed across switch case blocks (52221)
+ if (compliance >= ClassFileConstants.JDK1_4 && sourceType.switchCase != this.switchCase) continue;
+ if (CharOperation.equals(sourceType.sourceName(), name))
+ return sourceType;
+ }
+ }
+ return null;
+ }
+
+ public LocalVariableBinding findVariable(char[] variable) {
+
+ int varLength = variable.length;
+ for (int i = 0, length = locals.length; i < length; i++) {
+ LocalVariableBinding local = locals[i];
+ if (local == null)
+ return null;
+ if (local.name.length == varLength && CharOperation.equals(local.name, variable))
+ return local;
+ }
+ return null;
+ }
+ /* API
+ * flag is a mask of the following values VARIABLE (= FIELD or LOCAL), TYPE.
+ * Only bindings corresponding to the mask will be answered.
+ *
+ * if the VARIABLE mask is set then
+ * If the first name provided is a field (or local) then the field (or local) is answered
+ * Otherwise, package names and type names are consumed until a field is found.
+ * In this case, the field is answered.
+ *
+ * if the TYPE mask is set,
+ * package names and type names are consumed until the end of the input.
+ * Only if all of the input is consumed is the type answered
+ *
+ * All other conditions are errors, and a problem binding is returned.
+ *
+ * NOTE: If a problem binding is returned, senders should extract the compound name
+ * from the binding & not assume the problem applies to the entire compoundName.
+ *
+ * The VARIABLE mask has precedence over the TYPE mask.
+ *
+ * InvocationSite implements
+ * isSuperAccess(); this is used to determine if the discovered field is visible.
+ * setFieldIndex(int); this is used to record the number of names that were consumed.
+ *
+ * For example, getBinding({"foo","y","q", VARIABLE, site) will answer
+ * the binding for the field or local named "foo" (or an error binding if none exists).
+ * In addition, setFieldIndex(1) will be sent to the invocation site.
+ * If a type named "foo" exists, it will not be detected (and an error binding will be answered)
+ *
+ * IMPORTANT NOTE: This method is written under the assumption that compoundName is longer than length 1.
+ */
+ public Binding getBinding(char[][] compoundName, int mask, InvocationSite invocationSite, boolean needResolve) {
+
+ Binding binding = getBinding(compoundName[0], mask | TYPE | PACKAGE, invocationSite, needResolve);
+ invocationSite.setFieldIndex(1);
+ if (binding instanceof VariableBinding) return binding;
+ compilationUnitScope().recordSimpleReference(compoundName[0]);
+ if (!binding.isValidBinding()) return binding;
+
+ int length = compoundName.length;
+ int currentIndex = 1;
+ foundType : if (binding instanceof PackageBinding) {
+ PackageBinding packageBinding = (PackageBinding) binding;
+ while (currentIndex < length) {
+ compilationUnitScope().recordReference(packageBinding.compoundName, compoundName[currentIndex]);
+ binding = packageBinding.getTypeOrPackage(compoundName[currentIndex++]);
+ invocationSite.setFieldIndex(currentIndex);
+ if (binding == null) {
+ if (currentIndex == length) {
+ // must be a type if its the last name, otherwise we have no idea if its a package or type
+ return new ProblemReferenceBinding(
+ CharOperation.subarray(compoundName, 0, currentIndex),
+ NotFound);
+ }
+ return new ProblemBinding(
+ CharOperation.subarray(compoundName, 0, currentIndex),
+ NotFound);
+ }
+ if (binding instanceof ReferenceBinding) {
+ if (!binding.isValidBinding())
+ return new ProblemReferenceBinding(
+ CharOperation.subarray(compoundName, 0, currentIndex),
+ binding.problemId());
+ if (!((ReferenceBinding) binding).canBeSeenBy(this))
+ return new ProblemReferenceBinding(
+ CharOperation.subarray(compoundName, 0, currentIndex),
+ (ReferenceBinding) binding,
+ NotVisible);
+ break foundType;
+ }
+ packageBinding = (PackageBinding) binding;
+ }
+
+ // It is illegal to request a PACKAGE from this method.
+ return new ProblemReferenceBinding(
+ CharOperation.subarray(compoundName, 0, currentIndex),
+ NotFound);
+ }
+
+ // know binding is now a ReferenceBinding
+ while (currentIndex < length) {
+ ReferenceBinding typeBinding = (ReferenceBinding) binding;
+ char[] nextName = compoundName[currentIndex++];
+ invocationSite.setFieldIndex(currentIndex);
+ invocationSite.setActualReceiverType(typeBinding);
+ if ((mask & FIELD) != 0 && (binding = findField(typeBinding, nextName, invocationSite, true /*resolve*/)) != null) {
+ if (!binding.isValidBinding())
+ return new ProblemFieldBinding(
+ ((FieldBinding) binding).declaringClass,
+ CharOperation.subarray(compoundName, 0, currentIndex),
+ binding.problemId());
+ break; // binding is now a field
+ }
+ if ((binding = findMemberType(nextName, typeBinding)) == null) {
+ if ((mask & FIELD) != 0) {
+ return new ProblemBinding(
+ CharOperation.subarray(compoundName, 0, currentIndex),
+ typeBinding,
+ NotFound);
+ }
+ return new ProblemReferenceBinding(
+ CharOperation.subarray(compoundName, 0, currentIndex),
+ typeBinding,
+ NotFound);
+ }
+ if (!binding.isValidBinding())
+ return new ProblemReferenceBinding(
+ CharOperation.subarray(compoundName, 0, currentIndex),
+ binding.problemId());
+ }
+ if ((mask & FIELD) != 0 && (binding instanceof FieldBinding)) {
+ // was looking for a field and found a field
+ FieldBinding field = (FieldBinding) binding;
+ if (!field.isStatic())
+ return new ProblemFieldBinding(
+ field.declaringClass,
+ CharOperation.subarray(compoundName, 0, currentIndex),
+ NonStaticReferenceInStaticContext);
+ return binding;
+ }
+ if ((mask & TYPE) != 0 && (binding instanceof ReferenceBinding)) {
+ // was looking for a type and found a type
+ return binding;
+ }
+
+ // handle the case when a field or type was asked for but we resolved the compoundName to a type or field
+ return new ProblemBinding(
+ CharOperation.subarray(compoundName, 0, currentIndex),
+ NotFound);
+ }
+
+ // Added for code assist... NOT Public API
+ public final Binding getBinding(
+ char[][] compoundName,
+ InvocationSite invocationSite) {
+ int currentIndex = 0;
+ int length = compoundName.length;
+ Binding binding =
+ getBinding(
+ compoundName[currentIndex++],
+ VARIABLE | TYPE | PACKAGE,
+ invocationSite,
+ true /*resolve*/);
+ if (!binding.isValidBinding())
+ return binding;
+
+ foundType : if (binding instanceof PackageBinding) {
+ while (currentIndex < length) {
+ PackageBinding packageBinding = (PackageBinding) binding;
+ binding = packageBinding.getTypeOrPackage(compoundName[currentIndex++]);
+ if (binding == null) {
+ if (currentIndex == length) {
+ // must be a type if its the last name, otherwise we have no idea if its a package or type
+ return new ProblemReferenceBinding(
+ CharOperation.subarray(compoundName, 0, currentIndex),
+ NotFound);
+ }
+ return new ProblemBinding(
+ CharOperation.subarray(compoundName, 0, currentIndex),
+ NotFound);
+ }
+ if (binding instanceof ReferenceBinding) {
+ if (!binding.isValidBinding())
+ return new ProblemReferenceBinding(
+ CharOperation.subarray(compoundName, 0, currentIndex),
+ binding.problemId());
+ if (!((ReferenceBinding) binding).canBeSeenBy(this))
+ return new ProblemReferenceBinding(
+ CharOperation.subarray(compoundName, 0, currentIndex),
+ (ReferenceBinding) binding,
+ NotVisible);
+ break foundType;
+ }
+ }
+ return binding;
+ }
+
+ foundField : if (binding instanceof ReferenceBinding) {
+ while (currentIndex < length) {
+ ReferenceBinding typeBinding = (ReferenceBinding) binding;
+ char[] nextName = compoundName[currentIndex++];
+ if ((binding = findField(typeBinding, nextName, invocationSite, true /*resolve*/)) != null) {
+ if (!binding.isValidBinding())
+ return new ProblemFieldBinding(
+ ((FieldBinding) binding).declaringClass,
+ CharOperation.subarray(compoundName, 0, currentIndex),
+ binding.problemId());
+ if (!((FieldBinding) binding).isStatic())
+ return new ProblemFieldBinding(
+ ((FieldBinding) binding).declaringClass,
+ CharOperation.subarray(compoundName, 0, currentIndex),
+ NonStaticReferenceInStaticContext);
+ break foundField; // binding is now a field
+ }
+ if ((binding = findMemberType(nextName, typeBinding)) == null)
+ return new ProblemBinding(
+ CharOperation.subarray(compoundName, 0, currentIndex),
+ typeBinding,
+ NotFound);
+ if (!binding.isValidBinding())
+ return new ProblemReferenceBinding(
+ CharOperation.subarray(compoundName, 0, currentIndex),
+ binding.problemId());
+ }
+ return binding;
+ }
+
+ VariableBinding variableBinding = (VariableBinding) binding;
+ while (currentIndex < length) {
+ TypeBinding typeBinding = variableBinding.type;
+ if (typeBinding == null)
+ return new ProblemFieldBinding(
+ null,
+ CharOperation.subarray(compoundName, 0, currentIndex + 1),
+ NotFound);
+ variableBinding =
+ findField(typeBinding, compoundName[currentIndex++], invocationSite, true /*resolve*/);
+ if (variableBinding == null)
+ return new ProblemFieldBinding(
+ null,
+ CharOperation.subarray(compoundName, 0, currentIndex),
+ NotFound);
+ if (!variableBinding.isValidBinding())
+ return variableBinding;
+ }
+ return variableBinding;
+ }
+
+ /*
+ * This retrieves the argument that maps to an enclosing instance of the suitable type,
+ * if not found then answers nil -- do not create one
+ *
+ * #implicitThis : the implicit this will be ok
+ * #((arg) this$n) : available as a constructor arg
+ * #((arg) this$n ... this$p) : available as as a constructor arg + a sequence of fields
+ * #((fieldDescr) this$n ... this$p) : available as a sequence of fields
+ * nil : not found
+ *
+ * Note that this algorithm should answer the shortest possible sequence when
+ * shortcuts are available:
+ * this$0 . this$0 . this$0
+ * instead of
+ * this$2 . this$1 . this$0 . this$1 . this$0
+ * thus the code generation will be more compact and runtime faster
+ */
+ public VariableBinding[] getEmulationPath(LocalVariableBinding outerLocalVariable) {
+
+ MethodScope currentMethodScope = this.methodScope();
+ SourceTypeBinding sourceType = currentMethodScope.enclosingSourceType();
+
+ // identity check
+ if (currentMethodScope == outerLocalVariable.declaringScope.methodScope()) {
+ return new VariableBinding[] { outerLocalVariable };
+ // implicit this is good enough
+ }
+ // use synthetic constructor arguments if possible
+ if (currentMethodScope.isInsideInitializerOrConstructor()
+ && (sourceType.isNestedType())) {
+ SyntheticArgumentBinding syntheticArg;
+ if ((syntheticArg = ((NestedTypeBinding) sourceType).getSyntheticArgument(outerLocalVariable)) != null) {
+ return new VariableBinding[] { syntheticArg };
+ }
+ }
+ // use a synthetic field then
+ if (!currentMethodScope.isStatic) {
+ FieldBinding syntheticField;
+ if ((syntheticField = sourceType.getSyntheticField(outerLocalVariable)) != null) {
+ return new VariableBinding[] { syntheticField };
+ }
+ }
+ return null;
+ }
+
+ /*
+ * This retrieves the argument that maps to an enclosing instance of the suitable type,
+ * if not found then answers nil -- do not create one
+ *
+ * #implicitThis : the implicit this will be ok
+ * #((arg) this$n) : available as a constructor arg
+ * #((arg) this$n access$m... access$p) : available as as a constructor arg + a sequence of synthetic accessors to synthetic fields
+ * #((fieldDescr) this$n access#m... access$p) : available as a first synthetic field + a sequence of synthetic accessors to synthetic fields
+ * null : not found
+ * jls 15.9.2 + http://www.ergnosis.com/java-spec-report/java-language/jls-8.8.5.1-d.html
+ */
+ public Object[] getEmulationPath(
+ ReferenceBinding targetEnclosingType,
+ boolean onlyExactMatch,
+ boolean ignoreEnclosingArgInConstructorCall) {
+
+ MethodScope currentMethodScope = this.methodScope();
+ SourceTypeBinding sourceType = currentMethodScope.enclosingSourceType();
+
+ // use 'this' if possible
+ if (!currentMethodScope.isConstructorCall && !currentMethodScope.isStatic) {
+ if (sourceType == targetEnclosingType || (!onlyExactMatch && sourceType.findSuperTypeErasingTo(targetEnclosingType) != null)) {
+ return EmulationPathToImplicitThis; // implicit this is good enough
+ }
+ }
+ if (!sourceType.isNestedType() || sourceType.isStatic()) { // no emulation from within non-inner types
+ if (currentMethodScope.isConstructorCall) {
+ return NoEnclosingInstanceInConstructorCall;
+ } else if (currentMethodScope.isStatic){
+ return NoEnclosingInstanceInStaticContext;
+ }
+ return null;
+ }
+ boolean insideConstructor = currentMethodScope.isInsideInitializerOrConstructor();
+ // use synthetic constructor arguments if possible
+ if (insideConstructor) {
+ SyntheticArgumentBinding syntheticArg;
+ if ((syntheticArg = ((NestedTypeBinding) sourceType).getSyntheticArgument(targetEnclosingType, onlyExactMatch)) != null) {
+ // reject allocation and super constructor call
+ if (ignoreEnclosingArgInConstructorCall
+ && currentMethodScope.isConstructorCall
+ && (sourceType == targetEnclosingType || (!onlyExactMatch && sourceType.findSuperTypeErasingTo(targetEnclosingType) != null))) {
+ return NoEnclosingInstanceInConstructorCall;
+ }
+ return new Object[] { syntheticArg };
+ }
+ }
+
+ // use a direct synthetic field then
+ if (currentMethodScope.isStatic) {
+ return NoEnclosingInstanceInStaticContext;
+ }
+ FieldBinding syntheticField = sourceType.getSyntheticField(targetEnclosingType, onlyExactMatch);
+ if (syntheticField != null) {
+ if (currentMethodScope.isConstructorCall){
+ return NoEnclosingInstanceInConstructorCall;
+ }
+ return new Object[] { syntheticField };
+ }
+ // could be reached through a sequence of enclosing instance link (nested members)
+ Object[] path = new Object[2]; // probably at least 2 of them
+ ReferenceBinding currentType = sourceType.enclosingType();
+ if (insideConstructor) {
+ path[0] = ((NestedTypeBinding) sourceType).getSyntheticArgument(currentType, onlyExactMatch);
+ } else {
+ if (currentMethodScope.isConstructorCall){
+ return NoEnclosingInstanceInConstructorCall;
+ }
+ path[0] = sourceType.getSyntheticField(currentType, onlyExactMatch);
+ }
+ if (path[0] != null) { // keep accumulating
+
+ int count = 1;
+ ReferenceBinding currentEnclosingType;
+ while ((currentEnclosingType = currentType.enclosingType()) != null) {
+
+ //done?
+ if (currentType == targetEnclosingType
+ || (!onlyExactMatch && currentType.findSuperTypeErasingTo(targetEnclosingType) != null)) break;
+
+ if (currentMethodScope != null) {
+ currentMethodScope = currentMethodScope.enclosingMethodScope();
+ if (currentMethodScope != null && currentMethodScope.isConstructorCall){
+ return NoEnclosingInstanceInConstructorCall;
+ }
+ if (currentMethodScope != null && currentMethodScope.isStatic){
+ return NoEnclosingInstanceInStaticContext;
+ }
+ }
+
+ syntheticField = ((NestedTypeBinding) currentType).getSyntheticField(currentEnclosingType, onlyExactMatch);
+ if (syntheticField == null) break;
+
+ // append inside the path
+ if (count == path.length) {
+ System.arraycopy(path, 0, (path = new Object[count + 1]), 0, count);
+ }
+ // private access emulation is necessary since synthetic field is private
+ path[count++] = ((SourceTypeBinding) syntheticField.declaringClass).addSyntheticMethod(syntheticField, true);
+ currentType = currentEnclosingType;
+ }
+ if (currentType == targetEnclosingType
+ || (!onlyExactMatch && currentType.findSuperTypeErasingTo(targetEnclosingType) != null)) {
+ return path;
+ }
+ }
+ return null;
+ }
+
+ /* Answer true if the variable name already exists within the receiver's scope.
+ */
+ public final boolean isDuplicateLocalVariable(char[] name) {
+ BlockScope current = this;
+ while (true) {
+ for (int i = 0; i < localIndex; i++) {
+ if (CharOperation.equals(name, current.locals[i].name))
+ return true;
+ }
+ if (current.kind != BLOCK_SCOPE) return false;
+ current = (BlockScope)current.parent;
+ }
+ }
+
+ public int maxShiftedOffset() {
+ int max = -1;
+ if (this.shiftScopes != null){
+ for (int i = 0, length = this.shiftScopes.length; i < length; i++){
+ int subMaxOffset = this.shiftScopes[i].maxOffset;
+ if (subMaxOffset > max) max = subMaxOffset;
+ }
+ }
+ return max;
+ }
+
+ /* Answer the problem reporter to use for raising new problems.
+ *
+ * Note that as a side-effect, this updates the current reference context
+ * (unit, type or method) in case the problem handler decides it is necessary
+ * to abort.
+ */
+ public ProblemReporter problemReporter() {
+
+ return outerMostMethodScope().problemReporter();
+ }
+
+ /*
+ * Code responsible to request some more emulation work inside the invocation type, so as to supply
+ * correct synthetic arguments to any allocation of the target type.
+ */
+ public void propagateInnerEmulation(ReferenceBinding targetType, boolean isEnclosingInstanceSupplied) {
+
+ // no need to propagate enclosing instances, they got eagerly allocated already.
+
+ SyntheticArgumentBinding[] syntheticArguments;
+ if ((syntheticArguments = targetType.syntheticOuterLocalVariables()) != null) {
+ for (int i = 0, max = syntheticArguments.length; i < max; i++) {
+ SyntheticArgumentBinding syntheticArg = syntheticArguments[i];
+ // need to filter out the one that could match a supplied enclosing instance
+ if (!(isEnclosingInstanceSupplied
+ && (syntheticArg.type == targetType.enclosingType()))) {
+ this.emulateOuterAccess(syntheticArg.actualOuterLocalVariable);
+ }
+ }
+ }
+ }
+
+ /* Answer the reference type of this scope.
+ *
+ * It is the nearest enclosing type of this scope.
+ */
+ public TypeDeclaration referenceType() {
+
+ return methodScope().referenceType();
+ }
+
+ /*
+ * Answer the index of this scope relatively to its parent.
+ * For method scope, answers -1 (not a classScope relative position)
+ */
+ public int scopeIndex() {
+ if (this instanceof MethodScope) return -1;
+ BlockScope parentScope = (BlockScope)parent;
+ Scope[] parentSubscopes = parentScope.subscopes;
+ for (int i = 0, max = parentScope.subscopeCount; i < max; i++) {
+ if (parentSubscopes[i] == this) return i;
+ }
+ return -1;
+ }
+
+ // start position in this scope - for ordering scopes vs. variables
+ int startIndex() {
+ return startIndex;
+ }
+
+ public String toString() {
+ return toString(0);
+ }
+
+ public String toString(int tab) {
+
+ String s = basicToString(tab);
+ for (int i = 0; i < subscopeCount; i++)
+ if (subscopes[i] instanceof BlockScope)
+ s += ((BlockScope) subscopes[i]).toString(tab + 1) + "\n"; //$NON-NLS-1$
+ return s;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ClassScope.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ClassScope.js
new file mode 100644
index 0000000..458ba4e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ClassScope.js
@@ -0,0 +1,995 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Clinit;
+import org.eclipse.wst.jsdt.internal.compiler.ast.FieldDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.TypeDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.TypeParameter;
+import org.eclipse.wst.jsdt.internal.compiler.ast.TypeReference;
+import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.wst.jsdt.internal.compiler.problem.AbortCompilation;
+import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemReporter;
+import org.eclipse.wst.jsdt.internal.compiler.util.HashtableOfObject;
+
+public class ClassScope extends Scope {
+ public TypeDeclaration referenceContext;
+ private TypeReference superTypeReference;
+
+ private final static char[] IncompleteHierarchy = new char[] {'h', 'a', 's', ' ', 'i', 'n', 'c', 'o', 'n', 's', 'i', 's', 't', 'e', 'n', 't', ' ', 'h', 'i', 'e', 'r', 'a', 'r', 'c', 'h', 'y'};
+
+ public ClassScope(Scope parent, TypeDeclaration context) {
+ super(CLASS_SCOPE, parent);
+ this.referenceContext = context;
+ }
+
+ void buildAnonymousTypeBinding(SourceTypeBinding enclosingType, ReferenceBinding supertype) {
+
+ LocalTypeBinding anonymousType = buildLocalType(enclosingType, enclosingType.fPackage);
+
+ SourceTypeBinding sourceType = referenceContext.binding;
+ if (supertype.isInterface()) {
+ sourceType.superclass = getJavaLangObject();
+ sourceType.superInterfaces = new ReferenceBinding[] { supertype };
+ } else {
+ sourceType.superclass = supertype;
+ sourceType.superInterfaces = TypeConstants.NoSuperInterfaces;
+ }
+ connectMemberTypes();
+ buildFieldsAndMethods();
+ anonymousType.faultInTypesForFieldsAndMethods();
+ sourceType.verifyMethods(environment().methodVerifier());
+ }
+
+ private void buildFields() {
+ boolean hierarchyIsInconsistent = referenceContext.binding.isHierarchyInconsistent();
+ if (referenceContext.fields == null) {
+ if (hierarchyIsInconsistent) { // 72468
+ referenceContext.binding.fields = new FieldBinding[1];
+ referenceContext.binding.fields[0] =
+ new FieldBinding(IncompleteHierarchy, VoidBinding, AccPrivate, referenceContext.binding, null);
+ } else {
+ referenceContext.binding.fields = NoFields;
+ }
+ return;
+ }
+ // count the number of fields vs. initializers
+ FieldDeclaration[] fields = referenceContext.fields;
+ int size = fields.length;
+ int count = 0;
+ for (int i = 0; i < size; i++)
+ if (fields[i].isField())
+ count++;
+
+ if (hierarchyIsInconsistent)
+ count++;
+ // iterate the field declarations to create the bindings, lose all duplicates
+ FieldBinding[] fieldBindings = new FieldBinding[count];
+ HashtableOfObject knownFieldNames = new HashtableOfObject(count);
+ boolean duplicate = false;
+ count = 0;
+ for (int i = 0; i < size; i++) {
+ FieldDeclaration field = fields[i];
+ if (!field.isField()) {
+ if (referenceContext.binding.isInterface())
+ problemReporter().interfaceCannotHaveInitializers(referenceContext.binding, field);
+ } else {
+ FieldBinding fieldBinding = new FieldBinding(field, null, field.modifiers | AccUnresolved, referenceContext.binding);
+ // field's type will be resolved when needed for top level types
+ checkAndSetModifiersForField(fieldBinding, field);
+
+ if (knownFieldNames.containsKey(field.name)) {
+ duplicate = true;
+ FieldBinding previousBinding = (FieldBinding) knownFieldNames.get(field.name);
+ if (previousBinding != null) {
+ for (int f = 0; f < i; f++) {
+ FieldDeclaration previousField = fields[f];
+ if (previousField.binding == previousBinding) {
+ problemReporter().duplicateFieldInType(referenceContext.binding, previousField);
+ previousField.binding = null;
+ break;
+ }
+ }
+ }
+ knownFieldNames.put(field.name, null); // ensure that the duplicate field is found & removed
+ problemReporter().duplicateFieldInType(referenceContext.binding, field);
+ field.binding = null;
+ } else {
+ knownFieldNames.put(field.name, fieldBinding);
+ // remember that we have seen a field with this name
+ if (fieldBinding != null)
+ fieldBindings[count++] = fieldBinding;
+ }
+ }
+ }
+ // remove duplicate fields
+ if (duplicate) {
+ FieldBinding[] newFieldBindings = new FieldBinding[knownFieldNames.size() - 1];
+ // we know we'll be removing at least 1 duplicate name
+ size = count;
+ count = 0;
+ for (int i = 0; i < size; i++) {
+ FieldBinding fieldBinding = fieldBindings[i];
+ if (knownFieldNames.get(fieldBinding.name) != null)
+ newFieldBindings[count++] = fieldBinding;
+ }
+ fieldBindings = newFieldBindings;
+ }
+ if (hierarchyIsInconsistent)
+ fieldBindings[count++] = new FieldBinding(IncompleteHierarchy, VoidBinding, AccPrivate, referenceContext.binding, null);
+
+ if (count != fieldBindings.length)
+ System.arraycopy(fieldBindings, 0, fieldBindings = new FieldBinding[count], 0, count);
+ for (int i = 0; i < count; i++)
+ fieldBindings[i].id = i;
+ referenceContext.binding.fields = fieldBindings;
+ }
+
+ void buildFieldsAndMethods() {
+ buildFields();
+ buildMethods();
+
+ SourceTypeBinding sourceType = referenceContext.binding;
+ if (sourceType.isMemberType() && !sourceType.isLocalType())
+ ((MemberTypeBinding) sourceType).checkSyntheticArgsAndFields();
+
+ ReferenceBinding[] memberTypes = sourceType.memberTypes;
+ for (int i = 0, length = memberTypes.length; i < length; i++)
+ ((SourceTypeBinding) memberTypes[i]).scope.buildFieldsAndMethods();
+ }
+
+ private LocalTypeBinding buildLocalType(
+ SourceTypeBinding enclosingType,
+ PackageBinding packageBinding) {
+
+ referenceContext.scope = this;
+ referenceContext.staticInitializerScope = new MethodScope(this, referenceContext, true);
+ referenceContext.initializerScope = new MethodScope(this, referenceContext, false);
+
+ // build the binding or the local type
+ LocalTypeBinding localType = new LocalTypeBinding(this, enclosingType, this.switchCase());
+ referenceContext.binding = localType;
+ checkAndSetModifiers();
+ buildTypeVariables();
+
+ // Look at member types
+ ReferenceBinding[] memberTypeBindings = NoMemberTypes;
+ if (referenceContext.memberTypes != null) {
+ int size = referenceContext.memberTypes.length;
+ memberTypeBindings = new ReferenceBinding[size];
+ int count = 0;
+ nextMember : for (int i = 0; i < size; i++) {
+ TypeDeclaration memberContext = referenceContext.memberTypes[i];
+ if (memberContext.isInterface()) {
+ problemReporter().nestedClassCannotDeclareInterface(memberContext);
+ continue nextMember;
+ }
+ ReferenceBinding type = localType;
+ // check that the member does not conflict with an enclosing type
+ do {
+ if (CharOperation.equals(type.sourceName, memberContext.name)) {
+ problemReporter().hidingEnclosingType(memberContext);
+ continue nextMember;
+ }
+ type = type.enclosingType();
+ } while (type != null);
+ // check the member type does not conflict with another sibling member type
+ for (int j = 0; j < i; j++) {
+ if (CharOperation.equals(referenceContext.memberTypes[j].name, memberContext.name)) {
+ problemReporter().duplicateNestedType(memberContext);
+ continue nextMember;
+ }
+ }
+ ClassScope memberScope = new ClassScope(this, referenceContext.memberTypes[i]);
+ LocalTypeBinding memberBinding = memberScope.buildLocalType(localType, packageBinding);
+ memberBinding.setAsMemberType();
+ memberTypeBindings[count++] = memberBinding;
+ }
+ if (count != size)
+ System.arraycopy(memberTypeBindings, 0, memberTypeBindings = new ReferenceBinding[count], 0, count);
+ }
+ localType.memberTypes = memberTypeBindings;
+ return localType;
+ }
+
+ void buildLocalTypeBinding(SourceTypeBinding enclosingType) {
+
+ LocalTypeBinding localType = buildLocalType(enclosingType, enclosingType.fPackage);
+ connectTypeHierarchy();
+ buildFieldsAndMethods();
+ localType.faultInTypesForFieldsAndMethods();
+
+ referenceContext.binding.verifyMethods(environment().methodVerifier());
+ }
+
+ private void buildMemberTypes() {
+ SourceTypeBinding sourceType = referenceContext.binding;
+ ReferenceBinding[] memberTypeBindings = NoMemberTypes;
+ if (referenceContext.memberTypes != null) {
+ int length = referenceContext.memberTypes.length;
+ memberTypeBindings = new ReferenceBinding[length];
+ int count = 0;
+ nextMember : for (int i = 0; i < length; i++) {
+ TypeDeclaration memberContext = referenceContext.memberTypes[i];
+ if (memberContext.isInterface()
+ && sourceType.isNestedType()
+ && sourceType.isClass()
+ && !sourceType.isStatic()) {
+ problemReporter().nestedClassCannotDeclareInterface(memberContext);
+ continue nextMember;
+ }
+ ReferenceBinding type = sourceType;
+ // check that the member does not conflict with an enclosing type
+ do {
+ if (CharOperation.equals(type.sourceName, memberContext.name)) {
+ problemReporter().hidingEnclosingType(memberContext);
+ continue nextMember;
+ }
+ type = type.enclosingType();
+ } while (type != null);
+ // check that the member type does not conflict with another sibling member type
+ for (int j = 0; j < i; j++) {
+ if (CharOperation.equals(referenceContext.memberTypes[j].name, memberContext.name)) {
+ problemReporter().duplicateNestedType(memberContext);
+ continue nextMember;
+ }
+ }
+
+ ClassScope memberScope = new ClassScope(this, memberContext);
+ memberTypeBindings[count++] = memberScope.buildType(sourceType, sourceType.fPackage);
+ }
+ if (count != length)
+ System.arraycopy(memberTypeBindings, 0, memberTypeBindings = new ReferenceBinding[count], 0, count);
+ }
+ sourceType.memberTypes = memberTypeBindings;
+ }
+
+ private void buildMethods() {
+ if (referenceContext.methods == null) {
+ referenceContext.binding.methods = NoMethods;
+ return;
+ }
+
+ // iterate the method declarations to create the bindings
+ AbstractMethodDeclaration[] methods = referenceContext.methods;
+ int size = methods.length;
+ int clinitIndex = -1;
+ for (int i = 0; i < size; i++) {
+ if (methods[i] instanceof Clinit) {
+ clinitIndex = i;
+ break;
+ }
+ }
+ MethodBinding[] methodBindings = new MethodBinding[clinitIndex == -1 ? size : size - 1];
+
+ int count = 0;
+ for (int i = 0; i < size; i++) {
+ if (i != clinitIndex) {
+ MethodScope scope = new MethodScope(this, methods[i], false);
+ MethodBinding methodBinding = scope.createMethod(methods[i]);
+ if (methodBinding != null) // is null if binding could not be created
+ methodBindings[count++] = methodBinding;
+ }
+ }
+ if (count != methodBindings.length)
+ System.arraycopy(methodBindings, 0, methodBindings = new MethodBinding[count], 0, count);
+
+ referenceContext.binding.methods = methodBindings;
+ referenceContext.binding.modifiers |= AccUnresolved; // until methods() is sent
+ }
+
+ SourceTypeBinding buildType(SourceTypeBinding enclosingType, PackageBinding packageBinding) {
+ // provide the typeDeclaration with needed scopes
+ referenceContext.scope = this;
+ referenceContext.staticInitializerScope = new MethodScope(this, referenceContext, true);
+ referenceContext.initializerScope = new MethodScope(this, referenceContext, false);
+
+ if (enclosingType == null) {
+ char[][] className = CharOperation.arrayConcat(packageBinding.compoundName, referenceContext.name);
+ referenceContext.binding = new SourceTypeBinding(className, packageBinding, this);
+ } else {
+ char[][] className = CharOperation.deepCopy(enclosingType.compoundName);
+ className[className.length - 1] =
+ CharOperation.concat(className[className.length - 1], referenceContext.name, '$');
+ referenceContext.binding = new MemberTypeBinding(className, this, enclosingType);
+ }
+
+ SourceTypeBinding sourceType = referenceContext.binding;
+ sourceType.fPackage.addType(sourceType);
+ checkAndSetModifiers();
+ buildTypeVariables();
+ buildMemberTypes();
+ return sourceType;
+ }
+
+ private void buildTypeVariables() {
+
+ SourceTypeBinding sourceType = referenceContext.binding;
+ TypeParameter[] typeParameters = referenceContext.typeParameters;
+
+ // do not construct type variables if source < 1.5
+ if (typeParameters == null || environment().options.sourceLevel < ClassFileConstants.JDK1_5) {
+ sourceType.typeVariables = NoTypeVariables;
+ return;
+ }
+ sourceType.typeVariables = NoTypeVariables; // safety
+
+ if (sourceType.id == T_Object) { // handle the case of redefining java.lang.Object up front
+ problemReporter().objectCannotBeGeneric(referenceContext);
+ return;
+ }
+ sourceType.typeVariables = createTypeVariables(typeParameters, sourceType);
+ sourceType.modifiers |= AccGenericSignature;
+ }
+
+ private void checkAndSetModifiers() {
+ SourceTypeBinding sourceType = referenceContext.binding;
+ int modifiers = sourceType.modifiers;
+ if ((modifiers & AccAlternateModifierProblem) != 0)
+ problemReporter().duplicateModifierForType(sourceType);
+
+ ReferenceBinding enclosingType = sourceType.enclosingType();
+ boolean isMemberType = sourceType.isMemberType();
+
+ if (isMemberType) {
+ // checks for member types before local types to catch local members
+ if (enclosingType.isStrictfp())
+ modifiers |= AccStrictfp;
+ if (enclosingType.isViewedAsDeprecated() && !sourceType.isDeprecated())
+ modifiers |= AccDeprecatedImplicitly;
+ if (enclosingType.isInterface())
+ modifiers |= AccPublic;
+ } else if (sourceType.isLocalType()) {
+ if (sourceType.isAnonymousType())
+ modifiers |= AccFinal;
+ Scope scope = this;
+ do {
+ switch (scope.kind) {
+ case METHOD_SCOPE :
+ MethodScope methodScope = (MethodScope) scope;
+ if (methodScope.isInsideInitializer()) {
+ SourceTypeBinding type = ((TypeDeclaration) methodScope.referenceContext).binding;
+
+ // inside field declaration ? check field modifier to see if deprecated
+ if (methodScope.initializedField != null) {
+ // currently inside this field initialization
+ if (methodScope.initializedField.isViewedAsDeprecated() && !sourceType.isDeprecated()){
+ modifiers |= AccDeprecatedImplicitly;
+ }
+ } else {
+ if (type.isStrictfp())
+ modifiers |= AccStrictfp;
+ if (type.isViewedAsDeprecated() && !sourceType.isDeprecated())
+ modifiers |= AccDeprecatedImplicitly;
+ }
+ } else {
+ MethodBinding method = ((AbstractMethodDeclaration) methodScope.referenceContext).binding;
+ if (method != null){
+ if (method.isStrictfp())
+ modifiers |= AccStrictfp;
+ if (method.isViewedAsDeprecated() && !sourceType.isDeprecated())
+ modifiers |= AccDeprecatedImplicitly;
+ }
+ }
+ break;
+ case CLASS_SCOPE :
+ // local member
+ if (enclosingType.isStrictfp())
+ modifiers |= AccStrictfp;
+ if (enclosingType.isViewedAsDeprecated() && !sourceType.isDeprecated())
+ modifiers |= AccDeprecatedImplicitly;
+ break;
+ }
+ scope = scope.parent;
+ } while (scope != null);
+ }
+ // after this point, tests on the 16 bits reserved.
+ int realModifiers = modifiers & AccJustFlag;
+
+ if ((realModifiers & AccInterface) != 0) {
+ // detect abnormal cases for interfaces
+ if (isMemberType) {
+ int unexpectedModifiers =
+ ~(AccPublic | AccPrivate | AccProtected | AccStatic | AccAbstract | AccInterface | AccStrictfp);
+ if ((realModifiers & unexpectedModifiers) != 0)
+ problemReporter().illegalModifierForMemberInterface(sourceType);
+ /*
+ } else if (sourceType.isLocalType()) { //interfaces cannot be defined inside a method
+ int unexpectedModifiers = ~(AccAbstract | AccInterface | AccStrictfp);
+ if ((realModifiers & unexpectedModifiers) != 0)
+ problemReporter().illegalModifierForLocalInterface(sourceType);
+ */
+ } else {
+ int unexpectedModifiers = ~(AccPublic | AccAbstract | AccInterface | AccStrictfp);
+ if ((realModifiers & unexpectedModifiers) != 0)
+ problemReporter().illegalModifierForInterface(sourceType);
+ }
+ modifiers |= AccAbstract;
+ } else {
+ // detect abnormal cases for types
+ if (isMemberType) { // includes member types defined inside local types
+ int unexpectedModifiers =
+ ~(AccPublic | AccPrivate | AccProtected | AccStatic | AccAbstract | AccFinal | AccStrictfp);
+ if ((realModifiers & unexpectedModifiers) != 0)
+ problemReporter().illegalModifierForMemberClass(sourceType);
+ } else if (sourceType.isLocalType()) {
+ int unexpectedModifiers = ~(AccAbstract | AccFinal | AccStrictfp);
+ if ((realModifiers & unexpectedModifiers) != 0)
+ problemReporter().illegalModifierForLocalClass(sourceType);
+ } else {
+ int unexpectedModifiers = ~(AccPublic | AccAbstract | AccFinal | AccStrictfp);
+ if ((realModifiers & unexpectedModifiers) != 0)
+ problemReporter().illegalModifierForClass(sourceType);
+ }
+
+ // check that Final and Abstract are not set together
+ if ((realModifiers & (AccFinal | AccAbstract)) == (AccFinal | AccAbstract))
+ problemReporter().illegalModifierCombinationFinalAbstractForClass(sourceType);
+ }
+
+ if (isMemberType) {
+ // test visibility modifiers inconsistency, isolate the accessors bits
+ if (enclosingType.isInterface()) {
+ if ((realModifiers & (AccProtected | AccPrivate)) != 0) {
+ problemReporter().illegalVisibilityModifierForInterfaceMemberType(sourceType);
+
+ // need to keep the less restrictive
+ if ((realModifiers & AccProtected) != 0)
+ modifiers ^= AccProtected;
+ if ((realModifiers & AccPrivate) != 0)
+ modifiers ^= AccPrivate;
+ }
+ } else {
+ int accessorBits = realModifiers & (AccPublic | AccProtected | AccPrivate);
+ if ((accessorBits & (accessorBits - 1)) > 1) {
+ problemReporter().illegalVisibilityModifierCombinationForMemberType(sourceType);
+
+ // need to keep the less restrictive
+ if ((accessorBits & AccPublic) != 0) {
+ if ((accessorBits & AccProtected) != 0)
+ modifiers ^= AccProtected;
+ if ((accessorBits & AccPrivate) != 0)
+ modifiers ^= AccPrivate;
+ }
+ if ((accessorBits & AccProtected) != 0)
+ if ((accessorBits & AccPrivate) != 0)
+ modifiers ^= AccPrivate;
+ }
+ }
+
+ // static modifier test
+ if ((realModifiers & AccStatic) == 0) {
+ if (enclosingType.isInterface())
+ modifiers |= AccStatic;
+ } else {
+ if (!enclosingType.isStatic())
+ // error the enclosing type of a static field must be static or a top-level type
+ problemReporter().illegalStaticModifierForMemberType(sourceType);
+ }
+ }
+
+ sourceType.modifiers = modifiers;
+ }
+
+ /* This method checks the modifiers of a field.
+ *
+ * 9.3 & 8.3
+ * Need to integrate the check for the final modifiers for nested types
+ *
+ * Note : A scope is accessible by : fieldBinding.declaringClass.scope
+ */
+ private void checkAndSetModifiersForField(FieldBinding fieldBinding, FieldDeclaration fieldDecl) {
+ int modifiers = fieldBinding.modifiers;
+ if ((modifiers & AccAlternateModifierProblem) != 0)
+ problemReporter().duplicateModifierForField(fieldBinding.declaringClass, fieldDecl);
+
+ if (fieldBinding.declaringClass.isInterface()) {
+ int expectedValue = AccPublic | AccStatic | AccFinal;
+ // set the modifiers
+ modifiers |= expectedValue;
+
+ // and then check that they are the only ones
+ if ((modifiers & AccJustFlag) != expectedValue)
+ problemReporter().illegalModifierForInterfaceField(fieldBinding.declaringClass, fieldDecl);
+ fieldBinding.modifiers = modifiers;
+ return;
+ }
+
+ // after this point, tests on the 16 bits reserved.
+ int realModifiers = modifiers & AccJustFlag;
+ int unexpectedModifiers =
+ ~(AccPublic | AccPrivate | AccProtected | AccFinal | AccStatic | AccTransient | AccVolatile);
+ if ((realModifiers & unexpectedModifiers) != 0)
+ problemReporter().illegalModifierForField(fieldBinding.declaringClass, fieldDecl);
+
+ int accessorBits = realModifiers & (AccPublic | AccProtected | AccPrivate);
+ if ((accessorBits & (accessorBits - 1)) > 1) {
+ problemReporter().illegalVisibilityModifierCombinationForField(
+ fieldBinding.declaringClass,
+ fieldDecl);
+
+ // need to keep the less restrictive
+ if ((accessorBits & AccPublic) != 0) {
+ if ((accessorBits & AccProtected) != 0)
+ modifiers ^= AccProtected;
+ if ((accessorBits & AccPrivate) != 0)
+ modifiers ^= AccPrivate;
+ }
+ if ((accessorBits & AccProtected) != 0)
+ if ((accessorBits & AccPrivate) != 0)
+ modifiers ^= AccPrivate;
+ }
+
+ if ((realModifiers & (AccFinal | AccVolatile)) == (AccFinal | AccVolatile))
+ problemReporter().illegalModifierCombinationFinalVolatileForField(
+ fieldBinding.declaringClass,
+ fieldDecl);
+
+ if (fieldDecl.initialization == null && (modifiers & AccFinal) != 0) {
+ modifiers |= AccBlankFinal;
+ }
+ fieldBinding.modifiers = modifiers;
+ }
+
+ private void checkForInheritedMemberTypes(SourceTypeBinding sourceType) {
+ // search up the hierarchy of the sourceType to see if any superType defines a member type
+ // when no member types are defined, tag the sourceType & each superType with the HasNoMemberTypes bit
+ // assumes super types have already been checked & tagged
+ ReferenceBinding currentType = sourceType;
+ ReferenceBinding[][] interfacesToVisit = null;
+ int lastPosition = -1;
+ do {
+ if (currentType.hasMemberTypes()) // avoid resolving member types eagerly
+ return;
+
+ ReferenceBinding[] itsInterfaces = currentType.superInterfaces();
+ if (itsInterfaces != NoSuperInterfaces) {
+ if (interfacesToVisit == null)
+ interfacesToVisit = new ReferenceBinding[5][];
+ if (++lastPosition == interfacesToVisit.length)
+ System.arraycopy(interfacesToVisit, 0, interfacesToVisit = new ReferenceBinding[lastPosition * 2][], 0, lastPosition);
+ interfacesToVisit[lastPosition] = itsInterfaces;
+ }
+ } while ((currentType = currentType.superclass()) != null && (currentType.tagBits & HasNoMemberTypes) == 0);
+
+ if (interfacesToVisit != null) {
+ // contains the interfaces between the sourceType and any superclass, which was tagged as having no member types
+ boolean needToTag = false;
+ for (int i = 0; i <= lastPosition; i++) {
+ ReferenceBinding[] interfaces = interfacesToVisit[i];
+ for (int j = 0, length = interfaces.length; j < length; j++) {
+ ReferenceBinding anInterface = interfaces[j];
+ if ((anInterface.tagBits & HasNoMemberTypes) == 0) { // skip interface if it already knows it has no member types
+ if (anInterface.hasMemberTypes()) // avoid resolving member types eagerly
+ return;
+
+ needToTag = true;
+ ReferenceBinding[] itsInterfaces = anInterface.superInterfaces();
+ if (itsInterfaces != NoSuperInterfaces) {
+ if (++lastPosition == interfacesToVisit.length)
+ System.arraycopy(interfacesToVisit, 0, interfacesToVisit = new ReferenceBinding[lastPosition * 2][], 0, lastPosition);
+ interfacesToVisit[lastPosition] = itsInterfaces;
+ }
+ }
+ }
+ }
+
+ if (needToTag) {
+ for (int i = 0; i <= lastPosition; i++) {
+ ReferenceBinding[] interfaces = interfacesToVisit[i];
+ for (int j = 0, length = interfaces.length; j < length; j++)
+ interfaces[j].tagBits |= HasNoMemberTypes;
+ }
+ }
+ }
+
+ // tag the sourceType and all of its superclasses, unless they have already been tagged
+ currentType = sourceType;
+ do {
+ currentType.tagBits |= HasNoMemberTypes;
+ } while ((currentType = currentType.superclass()) != null && (currentType.tagBits & HasNoMemberTypes) == 0);
+ }
+ // Perform deferred bound checks for parameterized type references (only done after hierarchy is connected)
+ private void checkParameterizedTypeBounds() {
+ TypeReference superclass = referenceContext.superclass;
+ if (superclass != null) {
+ superclass.checkBounds(this);
+ }
+ TypeReference[] superinterfaces = referenceContext.superInterfaces;
+ if (superinterfaces != null) {
+ for (int i = 0, length = superinterfaces.length; i < length; i++) {
+ superinterfaces[i].checkBounds(this);
+ }
+ }
+ TypeParameter[] typeParameters = referenceContext.typeParameters;
+ if (typeParameters != null) {
+ for (int i = 0, paramLength = typeParameters.length; i < paramLength; i++) {
+ TypeParameter typeParameter = typeParameters[i];
+ TypeReference typeRef = typeParameter.type;
+ if (typeRef != null) {
+ typeRef.checkBounds(this);
+
+ TypeReference[] boundRefs = typeParameter.bounds;
+ if (boundRefs != null)
+ for (int j = 0, k = boundRefs.length; j < k; j++)
+ boundRefs[j].checkBounds(this);
+ }
+ }
+ }
+ }
+
+ private void connectMemberTypes() {
+ SourceTypeBinding sourceType = referenceContext.binding;
+ if (sourceType.memberTypes != NoMemberTypes)
+ for (int i = 0, size = sourceType.memberTypes.length; i < size; i++)
+ ((SourceTypeBinding) sourceType.memberTypes[i]).scope.connectTypeHierarchy();
+ }
+ /*
+ Our current belief based on available JCK tests is:
+ inherited member types are visible as a potential superclass.
+ inherited interfaces are not visible when defining a superinterface.
+
+ Error recovery story:
+ ensure the superclass is set to java.lang.Object if a problem is detected
+ resolving the superclass.
+
+ Answer false if an error was reported against the sourceType.
+ */
+ private boolean connectSuperclass() {
+ SourceTypeBinding sourceType = referenceContext.binding;
+ if (sourceType.id == T_Object) { // handle the case of redefining java.lang.Object up front
+ sourceType.superclass = null;
+ sourceType.superInterfaces = NoSuperInterfaces;
+ if (referenceContext.superclass != null || referenceContext.superInterfaces != null)
+ problemReporter().objectCannotHaveSuperTypes(sourceType);
+ return true; // do not propagate Object's hierarchy problems down to every subtype
+ }
+ if (referenceContext.superclass == null) {
+ sourceType.superclass = getJavaLangObject();
+ return !detectCycle(sourceType, sourceType.superclass, null);
+ }
+ TypeReference superclassRef = referenceContext.superclass;
+ ReferenceBinding superclass = findSupertype(superclassRef);
+ if (superclass != null) { // is null if a cycle was detected cycle or a problem
+ if (superclass.isInterface()) {
+ problemReporter().superclassMustBeAClass(sourceType, superclassRef, superclass);
+ } else if (superclass.isFinal()) {
+ problemReporter().classExtendFinalClass(sourceType, superclassRef, superclass);
+ } else if ((superclass.tagBits & TagBits.HasWildcard) != 0) {
+ problemReporter().superTypeCannotUseWildcard(sourceType, superclassRef, superclass);
+ } else {
+ // only want to reach here when no errors are reported
+ sourceType.superclass = superclass;
+ return true;
+ }
+ }
+ sourceType.tagBits |= HierarchyHasProblems;
+ sourceType.superclass = getJavaLangObject();
+ if ((sourceType.superclass.tagBits & BeginHierarchyCheck) == 0)
+ detectCycle(sourceType, sourceType.superclass, null);
+ return false; // reported some error against the source type
+ }
+
+ /*
+ Our current belief based on available JCK 1.3 tests is:
+ inherited member types are visible as a potential superclass.
+ inherited interfaces are visible when defining a superinterface.
+
+ Error recovery story:
+ ensure the superinterfaces contain only valid visible interfaces.
+
+ Answer false if an error was reported against the sourceType.
+ */
+ private boolean connectSuperInterfaces() {
+ SourceTypeBinding sourceType = referenceContext.binding;
+ sourceType.superInterfaces = NoSuperInterfaces;
+ if (referenceContext.superInterfaces == null)
+ return true;
+ if (sourceType.id == T_Object) // already handled the case of redefining java.lang.Object
+ return true;
+
+ boolean noProblems = true;
+ int length = referenceContext.superInterfaces.length;
+ ReferenceBinding[] interfaceBindings = new ReferenceBinding[length];
+ int count = 0;
+ nextInterface : for (int i = 0; i < length; i++) {
+ TypeReference superInterfaceRef = referenceContext.superInterfaces[i];
+ ReferenceBinding superInterface = findSupertype(superInterfaceRef);
+ if (superInterface == null) { // detected cycle
+ sourceType.tagBits |= HierarchyHasProblems;
+ noProblems = false;
+ continue nextInterface;
+ }
+ superInterfaceRef.resolvedType = superInterface; // hold onto the problem type
+ // Check for a duplicate interface once the name is resolved, otherwise we may be confused (ie : a.b.I and c.d.I)
+ for (int k = 0; k < count; k++) {
+ if (interfaceBindings[k] == superInterface) {
+ // should this be treated as a warning?
+ problemReporter().duplicateSuperinterface(sourceType, referenceContext, superInterface);
+ continue nextInterface;
+ }
+ }
+ if (superInterface.isClass()) {
+ problemReporter().superinterfaceMustBeAnInterface(sourceType, superInterfaceRef, superInterface);
+ sourceType.tagBits |= HierarchyHasProblems;
+ noProblems = false;
+ continue nextInterface;
+ }
+ if ((superInterface.tagBits & TagBits.HasWildcard) != 0) {
+ problemReporter().superTypeCannotUseWildcard(sourceType, superInterfaceRef, superInterface);
+ sourceType.tagBits |= HierarchyHasProblems;
+ noProblems = false;
+ continue nextInterface;
+ }
+ ReferenceBinding invalid = findAmbiguousInterface(superInterface, sourceType);
+ if (invalid != null) {
+ ReferenceBinding generic = null;
+ if (superInterface.isParameterizedType())
+ generic = ((ParameterizedTypeBinding) superInterface).type;
+ else if (invalid.isParameterizedType())
+ generic = ((ParameterizedTypeBinding) invalid).type;
+ problemReporter().superinterfacesCollide(generic, referenceContext, superInterface, invalid);
+ sourceType.tagBits |= HierarchyHasProblems;
+ noProblems = false;
+ continue nextInterface;
+ }
+
+ // only want to reach here when no errors are reported
+ interfaceBindings[count++] = superInterface;
+ }
+ // hold onto all correctly resolved superinterfaces
+ if (count > 0) {
+ if (count != length)
+ System.arraycopy(interfaceBindings, 0, interfaceBindings = new ReferenceBinding[count], 0, count);
+ sourceType.superInterfaces = interfaceBindings;
+ }
+ return noProblems;
+ }
+
+ void connectTypeHierarchy() {
+ SourceTypeBinding sourceType = referenceContext.binding;
+ if ((sourceType.tagBits & BeginHierarchyCheck) == 0) {
+ sourceType.tagBits |= BeginHierarchyCheck;
+ boolean noProblems = connectTypeVariables(referenceContext.typeParameters);
+ noProblems &= connectSuperclass();
+ noProblems &= connectSuperInterfaces();
+ sourceType.tagBits |= EndHierarchyCheck;
+ if (noProblems && sourceType.isHierarchyInconsistent())
+ problemReporter().hierarchyHasProblems(sourceType);
+ }
+ // Perform deferred bound checks for parameterized type references (only done after hierarchy is connected)
+ checkParameterizedTypeBounds();
+ connectMemberTypes();
+ try {
+ checkForInheritedMemberTypes(sourceType);
+ } catch (AbortCompilation e) {
+ e.updateContext(referenceContext, referenceCompilationUnit().compilationResult);
+ throw e;
+ }
+ }
+
+ private void connectTypeHierarchyWithoutMembers() {
+ // must ensure the imports are resolved
+ if (parent instanceof CompilationUnitScope) {
+ if (((CompilationUnitScope) parent).imports == null)
+ ((CompilationUnitScope) parent).checkAndSetImports();
+ } else if (parent instanceof ClassScope) {
+ // ensure that the enclosing type has already been checked
+ ((ClassScope) parent).connectTypeHierarchyWithoutMembers();
+ }
+
+ // double check that the hierarchy search has not already begun...
+ SourceTypeBinding sourceType = referenceContext.binding;
+ if ((sourceType.tagBits & BeginHierarchyCheck) != 0)
+ return;
+
+ sourceType.tagBits |= BeginHierarchyCheck;
+ boolean noProblems = connectTypeVariables(referenceContext.typeParameters);
+ noProblems &= connectSuperclass();
+ noProblems &= connectSuperInterfaces();
+ sourceType.tagBits |= EndHierarchyCheck;
+ if (noProblems && sourceType.isHierarchyInconsistent())
+ problemReporter().hierarchyHasProblems(sourceType);
+ }
+
+ public boolean detectCycle(TypeBinding superType, TypeReference reference, TypeBinding[] argTypes) {
+ if (!(superType instanceof ReferenceBinding)) return false;
+
+ if (argTypes != null) {
+ for (int i = 0, l = argTypes.length; i < l; i++) {
+ TypeBinding argType = argTypes[i].leafComponentType();
+ if ((argType.tagBits & BeginHierarchyCheck) == 0 && argType instanceof SourceTypeBinding)
+ // ensure if this is a source argument type that it has already been checked
+ ((SourceTypeBinding) argType).scope.connectTypeHierarchyWithoutMembers();
+ }
+ }
+
+ if (reference == this.superTypeReference) { // see findSuperType()
+ if (superType.isTypeVariable())
+ return false; // error case caught in resolveSuperType()
+ // abstract class X<K,V> implements java.util.Map<K,V>
+ // static abstract class M<K,V> implements Entry<K,V>
+ if (superType.isParameterizedType())
+ superType = ((ParameterizedTypeBinding) superType).type;
+ compilationUnitScope().recordSuperTypeReference(superType); // to record supertypes
+ return detectCycle(referenceContext.binding, (ReferenceBinding) superType, reference);
+ }
+
+ if ((superType.tagBits & BeginHierarchyCheck) == 0 && superType instanceof SourceTypeBinding)
+ // ensure if this is a source superclass that it has already been checked
+ ((SourceTypeBinding) superType).scope.connectTypeHierarchyWithoutMembers();
+ return false;
+ }
+
+ // Answer whether a cycle was found between the sourceType & the superType
+ private boolean detectCycle(SourceTypeBinding sourceType, ReferenceBinding superType, TypeReference reference) {
+ if (superType.isRawType())
+ superType = ((RawTypeBinding) superType).type;
+ // by this point the superType must be a binary or source type
+
+ if (sourceType == superType) {
+ problemReporter().hierarchyCircularity(sourceType, superType, reference);
+ sourceType.tagBits |= HierarchyHasProblems;
+ return true;
+ }
+
+ if (superType.isMemberType()) {
+ ReferenceBinding current = superType.enclosingType();
+ do {
+ if (current.isHierarchyBeingConnected()) {
+ problemReporter().hierarchyCircularity(sourceType, current, reference);
+ sourceType.tagBits |= HierarchyHasProblems;
+ current.tagBits |= HierarchyHasProblems;
+ return true;
+ }
+ } while ((current = current.enclosingType()) != null);
+ }
+
+ if (superType.isBinaryBinding()) {
+ // force its superclass & superinterfaces to be found... 2 possibilities exist - the source type is included in the hierarchy of:
+ // - a binary type... this case MUST be caught & reported here
+ // - another source type... this case is reported against the other source type
+ boolean hasCycle = false;
+ if (superType.superclass() != null) {
+ if (sourceType == superType.superclass()) {
+ problemReporter().hierarchyCircularity(sourceType, superType, reference);
+ sourceType.tagBits |= HierarchyHasProblems;
+ superType.tagBits |= HierarchyHasProblems;
+ return true;
+ }
+ ReferenceBinding parentType = superType.superclass();
+ if (parentType.isParameterizedType())
+ parentType = ((ParameterizedTypeBinding) parentType).type;
+ hasCycle |= detectCycle(sourceType, parentType, reference);
+ if ((parentType.tagBits & HierarchyHasProblems) != 0) {
+ sourceType.tagBits |= HierarchyHasProblems;
+ parentType.tagBits |= HierarchyHasProblems; // propagate down the hierarchy
+ }
+ }
+
+ ReferenceBinding[] itsInterfaces = superType.superInterfaces();
+ if (itsInterfaces != NoSuperInterfaces) {
+ for (int i = 0, length = itsInterfaces.length; i < length; i++) {
+ ReferenceBinding anInterface = itsInterfaces[i];
+ if (sourceType == anInterface) {
+ problemReporter().hierarchyCircularity(sourceType, superType, reference);
+ sourceType.tagBits |= HierarchyHasProblems;
+ superType.tagBits |= HierarchyHasProblems;
+ return true;
+ }
+ if (anInterface.isParameterizedType())
+ anInterface = ((ParameterizedTypeBinding) anInterface).type;
+ hasCycle |= detectCycle(sourceType, anInterface, reference);
+ if ((anInterface.tagBits & HierarchyHasProblems) != 0) {
+ sourceType.tagBits |= HierarchyHasProblems;
+ superType.tagBits |= HierarchyHasProblems;
+ }
+ }
+ }
+ return hasCycle;
+ }
+
+ if (superType.isHierarchyBeingConnected()) {
+ if (((SourceTypeBinding) superType).scope.superTypeReference != null) { // if null then its connecting its type variables
+ problemReporter().hierarchyCircularity(sourceType, superType, reference);
+ sourceType.tagBits |= HierarchyHasProblems;
+ superType.tagBits |= HierarchyHasProblems;
+ return true;
+ }
+ }
+ if ((superType.tagBits & BeginHierarchyCheck) == 0)
+ // ensure if this is a source superclass that it has already been checked
+ ((SourceTypeBinding) superType).scope.connectTypeHierarchyWithoutMembers();
+ if ((superType.tagBits & HierarchyHasProblems) != 0)
+ sourceType.tagBits |= HierarchyHasProblems;
+ return false;
+ }
+
+ private ReferenceBinding findAmbiguousInterface(ReferenceBinding newInterface, ReferenceBinding currentType) {
+ TypeBinding newErasure = newInterface.erasure();
+ if (newInterface == newErasure) return null;
+
+ ReferenceBinding[][] interfacesToVisit = new ReferenceBinding[5][];
+ int lastPosition = -1;
+ do {
+ ReferenceBinding[] itsInterfaces = currentType.superInterfaces();
+ if (itsInterfaces != NoSuperInterfaces) {
+ if (++lastPosition == interfacesToVisit.length)
+ System.arraycopy(interfacesToVisit, 0, interfacesToVisit = new ReferenceBinding[lastPosition * 2][], 0, lastPosition);
+ interfacesToVisit[lastPosition] = itsInterfaces;
+ }
+ } while ((currentType = currentType.superclass()) != null);
+
+ for (int i = 0; i <= lastPosition; i++) {
+ ReferenceBinding[] interfaces = interfacesToVisit[i];
+ for (int j = 0, length = interfaces.length; j < length; j++) {
+ currentType = interfaces[j];
+ if (currentType.erasure() == newErasure)
+ if (currentType != newInterface)
+ return currentType;
+
+ ReferenceBinding[] itsInterfaces = currentType.superInterfaces();
+ if (itsInterfaces != NoSuperInterfaces) {
+ if (++lastPosition == interfacesToVisit.length)
+ System.arraycopy(interfacesToVisit, 0, interfacesToVisit = new ReferenceBinding[lastPosition * 2][], 0, lastPosition);
+ interfacesToVisit[lastPosition] = itsInterfaces;
+ }
+ }
+ }
+ return null;
+ }
+
+ private ReferenceBinding findSupertype(TypeReference typeReference) {
+ try {
+ typeReference.aboutToResolve(this); // allows us to trap completion & selection nodes
+ compilationUnitScope().recordQualifiedReference(typeReference.getTypeName());
+ this.superTypeReference = typeReference;
+ ReferenceBinding superType = (ReferenceBinding) typeReference.resolveSuperType(this);
+ this.superTypeReference = null;
+ return superType;
+ } catch (AbortCompilation e) {
+ e.updateContext(typeReference, referenceCompilationUnit().compilationResult);
+ throw e;
+ }
+ }
+
+ /* Answer the problem reporter to use for raising new problems.
+ *
+ * Note that as a side-effect, this updates the current reference context
+ * (unit, type or method) in case the problem handler decides it is necessary
+ * to abort.
+ */
+ public ProblemReporter problemReporter() {
+ MethodScope outerMethodScope;
+ if ((outerMethodScope = outerMostMethodScope()) == null) {
+ ProblemReporter problemReporter = referenceCompilationUnit().problemReporter;
+ problemReporter.referenceContext = referenceContext;
+ return problemReporter;
+ }
+ return outerMethodScope.problemReporter();
+ }
+
+ /* Answer the reference type of this scope.
+ * It is the nearest enclosing type of this scope.
+ */
+ public TypeDeclaration referenceType() {
+ return referenceContext;
+ }
+
+ public String toString() {
+ if (referenceContext != null)
+ return "--- Class Scope ---\n\n" //$NON-NLS-1$
+ + referenceContext.binding.toString();
+ return "--- Class Scope ---\n\n Binding not initialized" ; //$NON-NLS-1$
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/CompilationUnitScope.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/CompilationUnitScope.js
new file mode 100644
index 0000000..e418131
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/CompilationUnitScope.js
@@ -0,0 +1,633 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.ast.*;
+import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemReporter;
+import org.eclipse.wst.jsdt.internal.compiler.util.*;
+
+public class CompilationUnitScope extends Scope {
+
+ public LookupEnvironment environment;
+ public CompilationUnitDeclaration referenceContext;
+ public char[][] currentPackageName;
+ public PackageBinding fPackage;
+ public ImportBinding[] imports;
+ public HashtableOfObject resolvedSingeTypeImports;
+
+ public SourceTypeBinding[] topLevelTypes;
+
+ private CompoundNameVector qualifiedReferences;
+ private SimpleNameVector simpleNameReferences;
+ private ObjectVector referencedTypes;
+ private ObjectVector referencedSuperTypes;
+
+ HashtableOfType constantPoolNameUsage;
+
+public CompilationUnitScope(CompilationUnitDeclaration unit, LookupEnvironment environment) {
+ super(COMPILATION_UNIT_SCOPE, null);
+ this.environment = environment;
+ this.referenceContext = unit;
+ unit.scope = this;
+ this.currentPackageName = unit.currentPackage == null ? CharOperation.NO_CHAR_CHAR : unit.currentPackage.tokens;
+
+ if (environment.options.produceReferenceInfo) {
+ this.qualifiedReferences = new CompoundNameVector();
+ this.simpleNameReferences = new SimpleNameVector();
+ this.referencedTypes = new ObjectVector();
+ this.referencedSuperTypes = new ObjectVector();
+ } else {
+ this.qualifiedReferences = null; // used to test if dependencies should be recorded
+ this.simpleNameReferences = null;
+ this.referencedTypes = null;
+ this.referencedSuperTypes = null;
+ }
+}
+void buildFieldsAndMethods() {
+ for (int i = 0, length = topLevelTypes.length; i < length; i++)
+ topLevelTypes[i].scope.buildFieldsAndMethods();
+}
+void buildTypeBindings() {
+ topLevelTypes = new SourceTypeBinding[0]; // want it initialized if the package cannot be resolved
+ if (referenceContext.compilationResult.compilationUnit != null) {
+ char[][] expectedPackageName = referenceContext.compilationResult.compilationUnit.getPackageName();
+ if (expectedPackageName != null
+ && !CharOperation.equals(currentPackageName, expectedPackageName)) {
+
+ // only report if the unit isn't structurally empty
+ if (referenceContext.currentPackage != null
+ || referenceContext.types != null
+ || referenceContext.imports != null) {
+ problemReporter().packageIsNotExpectedPackage(referenceContext);
+ }
+ currentPackageName = expectedPackageName.length == 0 ? CharOperation.NO_CHAR_CHAR : expectedPackageName;
+ }
+ }
+ if (currentPackageName == CharOperation.NO_CHAR_CHAR) {
+ if ((fPackage = environment.defaultPackage) == null) {
+ problemReporter().mustSpecifyPackage(referenceContext);
+ return;
+ }
+ } else {
+ if ((fPackage = environment.createPackage(currentPackageName)) == null) {
+ problemReporter().packageCollidesWithType(referenceContext);
+ return;
+ }
+ recordQualifiedReference(currentPackageName); // always dependent on your own package
+ }
+
+ // Skip typeDeclarations which know of previously reported errors
+ TypeDeclaration[] types = referenceContext.types;
+ int typeLength = (types == null) ? 0 : types.length;
+ topLevelTypes = new SourceTypeBinding[typeLength];
+ int count = 0;
+ nextType: for (int i = 0; i < typeLength; i++) {
+ TypeDeclaration typeDecl = types[i];
+ ReferenceBinding typeBinding = fPackage.getType0(typeDecl.name);
+ recordSimpleReference(typeDecl.name); // needed to detect collision cases
+ if (typeBinding != null && !(typeBinding instanceof UnresolvedReferenceBinding)) {
+ // if a type exists, it must be a valid type - cannot be a NotFound problem type
+ // unless its an unresolved type which is now being defined
+ problemReporter().duplicateTypes(referenceContext, typeDecl);
+ continue nextType;
+ }
+ if (fPackage != environment.defaultPackage && fPackage.getPackage(typeDecl.name) != null) {
+ // if a package exists, it must be a valid package - cannot be a NotFound problem package
+ problemReporter().typeCollidesWithPackage(referenceContext, typeDecl);
+ continue nextType;
+ }
+
+ if ((typeDecl.modifiers & AccPublic) != 0) {
+ char[] mainTypeName;
+ if ((mainTypeName = referenceContext.getMainTypeName()) != null // mainTypeName == null means that implementor of ICompilationUnit decided to return null
+ && !CharOperation.equals(mainTypeName, typeDecl.name)) {
+ problemReporter().publicClassMustMatchFileName(referenceContext, typeDecl);
+ continue nextType;
+ }
+ }
+
+ ClassScope child = new ClassScope(this, typeDecl);
+ SourceTypeBinding type = child.buildType(null, fPackage);
+ if(type != null) {
+ topLevelTypes[count++] = type;
+ }
+ }
+
+ // shrink topLevelTypes... only happens if an error was reported
+ if (count != topLevelTypes.length)
+ System.arraycopy(topLevelTypes, 0, topLevelTypes = new SourceTypeBinding[count], 0, count);
+}
+void checkAndSetImports() {
+ if (referenceContext.imports == null) {
+ imports = getDefaultImports();
+ return;
+ }
+
+ // allocate the import array, add java.lang.* by default
+ int numberOfStatements = referenceContext.imports.length;
+ int numberOfImports = numberOfStatements + 1;
+ for (int i = 0; i < numberOfStatements; i++) {
+ ImportReference importReference = referenceContext.imports[i];
+ if (importReference.onDemand && CharOperation.equals(JAVA_LANG, importReference.tokens)) {
+ numberOfImports--;
+ break;
+ }
+ }
+ ImportBinding[] resolvedImports = new ImportBinding[numberOfImports];
+ resolvedImports[0] = getDefaultImports()[0];
+ int index = 1;
+
+ nextImport : for (int i = 0; i < numberOfStatements; i++) {
+ ImportReference importReference = referenceContext.imports[i];
+ char[][] compoundName = importReference.tokens;
+
+ // skip duplicates or imports of the current package
+ for (int j = 0; j < index; j++)
+ if (resolvedImports[j].onDemand == importReference.onDemand)
+ if (CharOperation.equals(compoundName, resolvedImports[j].compoundName))
+ continue nextImport;
+ if (importReference.onDemand == true)
+ if (CharOperation.equals(compoundName, currentPackageName))
+ continue nextImport;
+
+ if (importReference.onDemand) {
+ Binding importBinding = findOnDemandImport(compoundName);
+ if (!importBinding.isValidBinding())
+ continue nextImport; // we report all problems in faultInImports()
+ resolvedImports[index++] = new ImportBinding(compoundName, true, importBinding, importReference);
+ } else {
+ resolvedImports[index++] = new ImportBinding(compoundName, false, null, importReference);
+ }
+ }
+
+ // shrink resolvedImports... only happens if an error was reported
+ if (resolvedImports.length > index)
+ System.arraycopy(resolvedImports, 0, resolvedImports = new ImportBinding[index], 0, index);
+ imports = resolvedImports;
+}
+/*
+ * INTERNAL USE-ONLY
+ * Innerclasses get their name computed as they are generated, since some may not
+ * be actually outputed if sitting inside unreachable code.
+ */
+public char[] computeConstantPoolName(LocalTypeBinding localType) {
+ if (localType.constantPoolName() != null) {
+ return localType.constantPoolName();
+ }
+ // delegates to the outermost enclosing classfile, since it is the only one with a global vision of its innertypes.
+
+ if (constantPoolNameUsage == null)
+ constantPoolNameUsage = new HashtableOfType();
+
+ ReferenceBinding outerMostEnclosingType = localType.scope.outerMostClassScope().enclosingSourceType();
+
+ // ensure there is not already such a local type name defined by the user
+ int index = 0;
+ char[] candidateName;
+ while(true) {
+ if (localType.isMemberType()){
+ if (index == 0){
+ candidateName = CharOperation.concat(
+ localType.enclosingType().constantPoolName(),
+ localType.sourceName,
+ '$');
+ } else {
+ // in case of collision, then member name gets extra $1 inserted
+ // e.g. class X { { class L{} new X(){ class L{} } } }
+ candidateName = CharOperation.concat(
+ localType.enclosingType().constantPoolName(),
+ '$',
+ String.valueOf(index).toCharArray(),
+ '$',
+ localType.sourceName);
+ }
+ } else if (localType.isAnonymousType()){
+ candidateName = CharOperation.concat(
+ outerMostEnclosingType.constantPoolName(),
+ String.valueOf(index+1).toCharArray(),
+ '$');
+ } else {
+ candidateName = CharOperation.concat(
+ outerMostEnclosingType.constantPoolName(),
+ '$',
+ String.valueOf(index+1).toCharArray(),
+ '$',
+ localType.sourceName);
+ }
+ if (constantPoolNameUsage.get(candidateName) != null) {
+ index ++;
+ } else {
+ constantPoolNameUsage.put(candidateName, localType);
+ break;
+ }
+ }
+ return candidateName;
+}
+
+void connectTypeHierarchy() {
+ for (int i = 0, length = topLevelTypes.length; i < length; i++)
+ topLevelTypes[i].scope.connectTypeHierarchy();
+}
+void faultInImports() {
+ if (referenceContext.imports == null)
+ return;
+
+ // collect the top level type names if a single type import exists
+ int numberOfStatements = referenceContext.imports.length;
+ HashtableOfType typesBySimpleNames = null;
+ for (int i = 0; i < numberOfStatements; i++) {
+ if (!referenceContext.imports[i].onDemand) {
+ typesBySimpleNames = new HashtableOfType(topLevelTypes.length + numberOfStatements);
+ for (int j = 0, length = topLevelTypes.length; j < length; j++)
+ typesBySimpleNames.put(topLevelTypes[j].sourceName, topLevelTypes[j]);
+ break;
+ }
+ }
+
+ // allocate the import array, add java.lang.* by default
+ int numberOfImports = numberOfStatements + 1;
+ for (int i = 0; i < numberOfStatements; i++) {
+ ImportReference importReference = referenceContext.imports[i];
+ if (importReference.onDemand && CharOperation.equals(JAVA_LANG, importReference.tokens)) {
+ numberOfImports--;
+ break;
+ }
+ }
+ ImportBinding[] resolvedImports = new ImportBinding[numberOfImports];
+ resolvedImports[0] = getDefaultImports()[0];
+ int index = 1;
+
+ nextImport : for (int i = 0; i < numberOfStatements; i++) {
+ ImportReference importReference = referenceContext.imports[i];
+ char[][] compoundName = importReference.tokens;
+
+ // skip duplicates or imports of the current package
+ for (int j = 0; j < index; j++)
+ if (resolvedImports[j].onDemand == importReference.onDemand)
+ if (CharOperation.equals(compoundName, resolvedImports[j].compoundName)) {
+ problemReporter().unusedImport(importReference); // since skipped, must be reported now
+ continue nextImport;
+ }
+ if (importReference.onDemand == true)
+ if (CharOperation.equals(compoundName, currentPackageName)) {
+ problemReporter().unusedImport(importReference); // since skipped, must be reported now
+ continue nextImport;
+ }
+ if (importReference.onDemand) {
+ Binding importBinding = findOnDemandImport(compoundName);
+ if (!importBinding.isValidBinding()) {
+ problemReporter().importProblem(importReference, importBinding);
+ continue nextImport;
+ }
+ resolvedImports[index++] = new ImportBinding(compoundName, true, importBinding, importReference);
+ } else {
+ Binding typeBinding = findSingleTypeImport(compoundName);
+ if (!typeBinding.isValidBinding()) {
+ problemReporter().importProblem(importReference, typeBinding);
+ continue nextImport;
+ }
+ if (typeBinding instanceof PackageBinding) {
+ problemReporter().cannotImportPackage(importReference);
+ continue nextImport;
+ }
+ if (typeBinding instanceof ReferenceBinding) {
+ ReferenceBinding referenceBinding = (ReferenceBinding) typeBinding;
+ if (importReference.isTypeUseDeprecated(referenceBinding, this)) {
+ problemReporter().deprecatedType((TypeBinding) typeBinding, importReference);
+ }
+ }
+ ReferenceBinding existingType = typesBySimpleNames.get(compoundName[compoundName.length - 1]);
+ if (existingType != null) {
+ // duplicate test above should have caught this case, but make sure
+ if (existingType == typeBinding) {
+ continue nextImport;
+ }
+ // either the type collides with a top level type or another imported type
+ for (int j = 0, length = topLevelTypes.length; j < length; j++) {
+ if (CharOperation.equals(topLevelTypes[j].sourceName, existingType.sourceName)) {
+ problemReporter().conflictingImport(importReference);
+ continue nextImport;
+ }
+ }
+ problemReporter().duplicateImport(importReference);
+ continue nextImport;
+ }
+ resolvedImports[index++] = new ImportBinding(compoundName, false, typeBinding, importReference);
+ typesBySimpleNames.put(compoundName[compoundName.length - 1], (ReferenceBinding) typeBinding);
+ }
+ }
+
+ // shrink resolvedImports... only happens if an error was reported
+ if (resolvedImports.length > index)
+ System.arraycopy(resolvedImports, 0, resolvedImports = new ImportBinding[index], 0, index);
+ imports = resolvedImports;
+
+ int length = imports.length;
+ resolvedSingeTypeImports = new HashtableOfObject(length);
+ for (int i = 0; i < length; i++) {
+ ImportBinding binding = imports[i];
+ if (!binding.onDemand)
+ resolvedSingeTypeImports.put(binding.compoundName[binding.compoundName.length - 1], binding);
+ }
+}
+public void faultInTypes() {
+ faultInImports();
+
+ for (int i = 0, length = topLevelTypes.length; i < length; i++)
+ topLevelTypes[i].faultInTypesForFieldsAndMethods();
+}
+private Binding findOnDemandImport(char[][] compoundName) {
+ recordQualifiedReference(compoundName);
+
+ Binding binding = environment.getTopLevelPackage(compoundName[0]);
+ int i = 1;
+ int length = compoundName.length;
+ foundNothingOrType: if (binding != null) {
+ PackageBinding packageBinding = (PackageBinding) binding;
+ while (i < length) {
+ binding = packageBinding.getTypeOrPackage(compoundName[i++]);
+ if (binding == null || !binding.isValidBinding()) {
+ binding = null;
+ break foundNothingOrType;
+ }
+ if (!(binding instanceof PackageBinding))
+ break foundNothingOrType;
+
+ packageBinding = (PackageBinding) binding;
+ }
+ return packageBinding;
+ }
+
+ ReferenceBinding type;
+ if (binding == null) {
+ if (environment.defaultPackage == null
+ || environment.options.complianceLevel >= ClassFileConstants.JDK1_4){
+ return new ProblemReferenceBinding(
+ CharOperation.subarray(compoundName, 0, i),
+ NotFound);
+ }
+ type = findType(compoundName[0], environment.defaultPackage, environment.defaultPackage);
+ if (type == null || !type.isValidBinding())
+ return new ProblemReferenceBinding(
+ CharOperation.subarray(compoundName, 0, i),
+ NotFound);
+ i = 1; // reset to look for member types inside the default package type
+ } else {
+ type = (ReferenceBinding) binding;
+ }
+
+ for (; i < length; i++) {
+ if (!type.canBeSeenBy(fPackage)) {
+ return new ProblemReferenceBinding(CharOperation.subarray(compoundName, 0, i), type, NotVisible);
+ }
+ // does not look for inherited member types on purpose
+ if ((type = type.getMemberType(compoundName[i])) == null) {
+ return new ProblemReferenceBinding(
+ CharOperation.subarray(compoundName, 0, i + 1),
+ NotFound);
+ }
+ }
+ if (!type.canBeSeenBy(fPackage))
+ return new ProblemReferenceBinding(compoundName, type, NotVisible);
+ return type;
+}
+private Binding findSingleTypeImport(char[][] compoundName) {
+ if (compoundName.length == 1) {
+ // findType records the reference
+ // the name cannot be a package
+ if (environment.defaultPackage == null
+ || environment.options.complianceLevel >= ClassFileConstants.JDK1_4)
+ return new ProblemReferenceBinding(compoundName, NotFound);
+ ReferenceBinding typeBinding = findType(compoundName[0], environment.defaultPackage, fPackage);
+ if (typeBinding == null)
+ return new ProblemReferenceBinding(compoundName, NotFound);
+ return typeBinding;
+ }
+ return findOnDemandImport(compoundName);
+}
+ImportBinding[] getDefaultImports() {
+ // initialize the default imports if necessary... share the default java.lang.* import
+ if (environment.defaultImports != null) return environment.defaultImports;
+
+ Binding importBinding = environment.getTopLevelPackage(JAVA);
+ if (importBinding != null)
+ importBinding = ((PackageBinding) importBinding).getTypeOrPackage(JAVA_LANG[1]);
+
+ // abort if java.lang cannot be found...
+ if (importBinding == null || !importBinding.isValidBinding())
+ problemReporter().isClassPathCorrect(JAVA_LANG_OBJECT, referenceCompilationUnit());
+
+ return environment.defaultImports = new ImportBinding[] {new ImportBinding(JAVA_LANG, true, importBinding, null)};
+}
+// NOT Public API
+public final Binding getImport(char[][] compoundName, boolean onDemand) {
+ if (onDemand)
+ return findOnDemandImport(compoundName);
+ return findSingleTypeImport(compoundName);
+}
+/* Answer the problem reporter to use for raising new problems.
+*
+* Note that as a side-effect, this updates the current reference context
+* (unit, type or method) in case the problem handler decides it is necessary
+* to abort.
+*/
+
+public ProblemReporter problemReporter() {
+ ProblemReporter problemReporter = referenceContext.problemReporter;
+ problemReporter.referenceContext = referenceContext;
+ return problemReporter;
+}
+
+/*
+What do we hold onto:
+
+1. when we resolve 'a.b.c', say we keep only 'a.b.c'
+ & when we fail to resolve 'c' in 'a.b', lets keep 'a.b.c'
+THEN when we come across a new/changed/removed item named 'a.b.c',
+ we would find all references to 'a.b.c'
+-> This approach fails because every type is resolved in every onDemand import to
+ detect collision cases... so the references could be 10 times bigger than necessary.
+
+2. when we resolve 'a.b.c', lets keep 'a.b' & 'c'
+ & when we fail to resolve 'c' in 'a.b', lets keep 'a.b' & 'c'
+THEN when we come across a new/changed/removed item named 'a.b.c',
+ we would find all references to 'a.b' & 'c'
+-> This approach does not have a space problem but fails to handle collision cases.
+ What happens if a type is added named 'a.b'? We would search for 'a' & 'b' but
+ would not find a match.
+
+3. when we resolve 'a.b.c', lets keep 'a', 'a.b' & 'a', 'b', 'c'
+ & when we fail to resolve 'c' in 'a.b', lets keep 'a', 'a.b' & 'a', 'b', 'c'
+THEN when we come across a new/changed/removed item named 'a.b.c',
+ we would find all references to 'a.b' & 'c'
+OR 'a.b' -> 'a' & 'b'
+OR 'a' -> '' & 'a'
+-> As long as each single char[] is interned, we should not have a space problem
+ and can handle collision cases.
+
+4. when we resolve 'a.b.c', lets keep 'a.b' & 'a', 'b', 'c'
+ & when we fail to resolve 'c' in 'a.b', lets keep 'a.b' & 'a', 'b', 'c'
+THEN when we come across a new/changed/removed item named 'a.b.c',
+ we would find all references to 'a.b' & 'c'
+OR 'a.b' -> 'a' & 'b' in the simple name collection
+OR 'a' -> 'a' in the simple name collection
+-> As long as each single char[] is interned, we should not have a space problem
+ and can handle collision cases.
+*/
+void recordQualifiedReference(char[][] qualifiedName) {
+ if (qualifiedReferences == null) return; // not recording dependencies
+
+ int length = qualifiedName.length;
+ if (length > 1) {
+ while (!qualifiedReferences.contains(qualifiedName)) {
+ qualifiedReferences.add(qualifiedName);
+ if (length == 2) {
+ recordSimpleReference(qualifiedName[0]);
+ recordSimpleReference(qualifiedName[1]);
+ return;
+ }
+ length--;
+ recordSimpleReference(qualifiedName[length]);
+ System.arraycopy(qualifiedName, 0, qualifiedName = new char[length][], 0, length);
+ }
+ } else if (length == 1) {
+ recordSimpleReference(qualifiedName[0]);
+ }
+}
+void recordReference(char[][] qualifiedEnclosingName, char[] simpleName) {
+ recordQualifiedReference(qualifiedEnclosingName);
+ recordSimpleReference(simpleName);
+}
+void recordReference(ReferenceBinding type, char[] simpleName) {
+ ReferenceBinding actualType = typeToRecord(type);
+ if (actualType != null)
+ recordReference(actualType.compoundName, simpleName);
+}
+void recordSimpleReference(char[] simpleName) {
+ if (simpleNameReferences == null) return; // not recording dependencies
+
+ if (!simpleNameReferences.contains(simpleName))
+ simpleNameReferences.add(simpleName);
+}
+void recordSuperTypeReference(TypeBinding type) {
+ if (referencedSuperTypes == null) return; // not recording dependencies
+
+ ReferenceBinding actualType = typeToRecord(type);
+ if (actualType != null && !referencedSuperTypes.containsIdentical(actualType))
+ referencedSuperTypes.add(actualType);
+}
+void recordTypeReference(TypeBinding type) {
+ if (referencedTypes == null) return; // not recording dependencies
+
+ ReferenceBinding actualType = typeToRecord(type);
+ if (actualType != null && !referencedTypes.containsIdentical(actualType))
+ referencedTypes.add(actualType);
+}
+void recordTypeReferences(TypeBinding[] types) {
+ if (qualifiedReferences == null) return; // not recording dependencies
+ if (types == null || types.length == 0) return;
+
+ for (int i = 0, max = types.length; i < max; i++) {
+ // No need to record supertypes of method arguments & thrown exceptions, just the compoundName
+ // If a field/method is retrieved from such a type then a separate call does the job
+ ReferenceBinding actualType = typeToRecord(types[i]);
+ if (actualType != null)
+ recordQualifiedReference(actualType.isMemberType()
+ ? CharOperation.splitOn('.', actualType.readableName())
+ : actualType.compoundName);
+ }
+}
+Binding resolveSingleTypeImport(ImportBinding importBinding) {
+ if (importBinding.resolvedImport == null) {
+ importBinding.resolvedImport = findSingleTypeImport(importBinding.compoundName);
+ if (!importBinding.resolvedImport.isValidBinding() || importBinding.resolvedImport instanceof PackageBinding) {
+ if (this.imports != null){
+ ImportBinding[] newImports = new ImportBinding[imports.length - 1];
+ for (int i = 0, n = 0, max = this.imports.length; i < max; i++)
+ if (this.imports[i] != importBinding){
+ newImports[n++] = this.imports[i];
+ }
+ this.imports = newImports;
+ }
+ return null;
+ }
+ }
+ return importBinding.resolvedImport;
+}
+public void storeDependencyInfo() {
+ // add the type hierarchy of each referenced supertype
+ // cannot do early since the hierarchy may not be fully resolved
+ for (int i = 0; i < referencedSuperTypes.size; i++) { // grows as more types are added
+ ReferenceBinding type = (ReferenceBinding) referencedSuperTypes.elementAt(i);
+ if (!referencedTypes.containsIdentical(type))
+ referencedTypes.add(type);
+
+ if (!type.isLocalType()) {
+ ReferenceBinding enclosing = type.enclosingType();
+ if (enclosing != null)
+ recordSuperTypeReference(enclosing);
+ }
+ ReferenceBinding superclass = type.superclass();
+ if (superclass != null)
+ recordSuperTypeReference(superclass);
+ ReferenceBinding[] interfaces = type.superInterfaces();
+ if (interfaces != null)
+ for (int j = 0, length = interfaces.length; j < length; j++)
+ recordSuperTypeReference(interfaces[j]);
+ }
+
+ for (int i = 0, l = referencedTypes.size; i < l; i++) {
+ ReferenceBinding type = (ReferenceBinding) referencedTypes.elementAt(i);
+ if (!type.isLocalType())
+ recordQualifiedReference(type.isMemberType()
+ ? CharOperation.splitOn('.', type.readableName())
+ : type.compoundName);
+ }
+
+ int size = qualifiedReferences.size;
+ char[][][] qualifiedRefs = new char[size][][];
+ for (int i = 0; i < size; i++)
+ qualifiedRefs[i] = qualifiedReferences.elementAt(i);
+ referenceContext.compilationResult.qualifiedReferences = qualifiedRefs;
+
+ size = simpleNameReferences.size;
+ char[][] simpleRefs = new char[size][];
+ for (int i = 0; i < size; i++)
+ simpleRefs[i] = simpleNameReferences.elementAt(i);
+ referenceContext.compilationResult.simpleNameReferences = simpleRefs;
+}
+public String toString() {
+ return "--- CompilationUnit Scope : " + new String(referenceContext.getFileName()); //$NON-NLS-1$
+}
+private ReferenceBinding typeToRecord(TypeBinding type) {
+ if (type.isArrayType())
+ type = ((ArrayBinding) type).leafComponentType;
+
+ if (type.isParameterizedType())
+ type = type.erasure();
+ else if (type.isRawType())
+ type = type.erasure();
+ else if (type.isWildcard())
+ return null;
+
+ if (type.isBaseType()) return null;
+ if (type.isTypeVariable()) return null;
+ if (((ReferenceBinding) type).isLocalType()) return null;
+
+ return (ReferenceBinding) type;
+}
+public void verifyMethods(MethodVerifier verifier) {
+ for (int i = 0, length = topLevelTypes.length; i < length; i++)
+ topLevelTypes[i].verifyMethods(verifier);
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/CompilerModifiers.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/CompilerModifiers.js
new file mode 100644
index 0000000..2cc7484
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/CompilerModifiers.js
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode;
+import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
+
+public interface CompilerModifiers extends ClassFileConstants { // modifier constant
+ // those constants are depending upon ClassFileConstants (relying that classfiles only use the 16 lower bits)
+ final int AccDefault = 0;
+ final int AccJustFlag = // 16 lower bits
+ ASTNode.Bit1|ASTNode.Bit2|ASTNode.Bit3|ASTNode.Bit4|ASTNode.Bit5|ASTNode.Bit6|ASTNode.Bit7|ASTNode.Bit8|
+ ASTNode.Bit9|ASTNode.Bit10|ASTNode.Bit11|ASTNode.Bit12|ASTNode.Bit13|ASTNode.Bit14|ASTNode.Bit15|ASTNode.Bit16;
+
+ final int AccRestrictedAccess = ASTNode.Bit19;
+ final int AccFromClassFile = ASTNode.Bit20;
+ final int AccIsConstantValue = ASTNode.Bit20;
+ final int AccDefaultAbstract = ASTNode.Bit20;
+ // bit21 - IConstants.AccDeprecated
+ final int AccDeprecatedImplicitly = ASTNode.Bit22; // record whether deprecated itself or contained by a deprecated type
+ final int AccAlternateModifierProblem = ASTNode.Bit23;
+ final int AccModifierProblem = ASTNode.Bit24;
+ final int AccSemicolonBody = ASTNode.Bit25;
+ final int AccUnresolved = ASTNode.Bit26;
+ final int AccClearPrivateModifier = ASTNode.Bit27; // might be requested during private access emulation
+ final int AccBlankFinal = ASTNode.Bit27; // for blank final variables
+ final int AccIsDefaultConstructor = ASTNode.Bit27; // for default constructor
+ final int AccPrivateUsed = ASTNode.Bit28; // used to diagnose unused private members
+ final int AccVisibilityMASK = AccPublic | AccProtected | AccPrivate;
+
+ final int AccOverriding = ASTNode.Bit29; // record fact a method overrides another one
+ final int AccImplementing = ASTNode.Bit30; // record fact a method implements another one (it is concrete and overrides an abstract one)
+ final int AccGenericSignature = ASTNode.Bit31; // record fact a type/method/field involves generics in its signature (and need special signature attr)
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/FieldBinding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/FieldBinding.js
new file mode 100644
index 0000000..8858163
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/FieldBinding.js
@@ -0,0 +1,228 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import org.eclipse.wst.jsdt.internal.compiler.ast.FieldDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.impl.Constant;
+
+public class FieldBinding extends VariableBinding {
+ public ReferenceBinding declaringClass;
+protected FieldBinding() {
+ super(null, null, 0, null);
+ // for creating problem field
+}
+public FieldBinding(char[] name, TypeBinding type, int modifiers, ReferenceBinding declaringClass, Constant constant) {
+ super(name, type, modifiers, constant);
+ this.declaringClass = declaringClass;
+
+ // propagate the deprecated modifier
+ if (this.declaringClass != null)
+ if (this.declaringClass.isViewedAsDeprecated() && !isDeprecated())
+ this.modifiers |= AccDeprecatedImplicitly;
+}
+public FieldBinding(FieldDeclaration field, TypeBinding type, int modifiers, ReferenceBinding declaringClass) {
+ this(field.name, type, modifiers, declaringClass, null);
+ field.binding = this; // record binding in declaration
+}
+// special API used to change field declaring class for runtime visibility check
+public FieldBinding(FieldBinding initialFieldBinding, ReferenceBinding declaringClass) {
+ super(initialFieldBinding.name, initialFieldBinding.type, initialFieldBinding.modifiers, initialFieldBinding.constant());
+ this.declaringClass = declaringClass;
+ this.id = initialFieldBinding.id;
+}
+/* API
+* Answer the receiver's binding type from Binding.BindingID.
+*/
+
+public final int bindingType() {
+ return FIELD;
+}
+/* Answer true if the receiver is visible to the type provided by the scope.
+* InvocationSite implements isSuperAccess() to provide additional information
+* if the receiver is protected.
+*
+* NOTE: Cannot invoke this method with a compilation unit scope.
+*/
+
+public final boolean canBeSeenBy(TypeBinding receiverType, InvocationSite invocationSite, Scope scope) {
+ if (isPublic()) return true;
+
+ SourceTypeBinding invocationType = scope.enclosingSourceType();
+ if (invocationType == declaringClass && invocationType == receiverType) return true;
+
+ if (isProtected()) {
+ // answer true if the invocationType is the declaringClass or they are in the same package
+ // OR the invocationType is a subclass of the declaringClass
+ // AND the receiverType is the invocationType or its subclass
+ // OR the method is a static method accessed directly through a type
+ // OR previous assertions are true for one of the enclosing type
+ if (invocationType == declaringClass) return true;
+ if (invocationType.fPackage == declaringClass.fPackage) return true;
+
+ ReferenceBinding currentType = invocationType;
+ int depth = 0;
+ do {
+ if (declaringClass.isSuperclassOf(currentType)) {
+ if (invocationSite.isSuperAccess()){
+ return true;
+ }
+ // receiverType can be an array binding in one case... see if you can change it
+ if (receiverType instanceof ArrayBinding){
+ return false;
+ }
+ if (isStatic()){
+ if (depth > 0) invocationSite.setDepth(depth);
+ return true; // see 1FMEPDL - return invocationSite.isTypeAccess();
+ }
+ if (currentType == receiverType || currentType.isSuperclassOf((ReferenceBinding) receiverType)){
+ if (depth > 0) invocationSite.setDepth(depth);
+ return true;
+ }
+ }
+ depth++;
+ currentType = currentType.enclosingType();
+ } while (currentType != null);
+ return false;
+ }
+
+ if (isPrivate()) {
+ // answer true if the receiverType is the declaringClass
+ // AND the invocationType and the declaringClass have a common enclosingType
+ receiverCheck: {
+ if (receiverType != declaringClass) {
+ // special tolerance for type variable direct bounds
+ if (receiverType.isTypeVariable() && ((TypeVariableBinding) receiverType).isErasureBoundTo(declaringClass.erasure())) {
+ break receiverCheck;
+ }
+ return false;
+ }
+ }
+
+ if (invocationType != declaringClass) {
+ ReferenceBinding outerInvocationType = invocationType;
+ ReferenceBinding temp = outerInvocationType.enclosingType();
+ while (temp != null) {
+ outerInvocationType = temp;
+ temp = temp.enclosingType();
+ }
+
+ ReferenceBinding outerDeclaringClass = (ReferenceBinding)declaringClass.erasure();
+ temp = outerDeclaringClass.enclosingType();
+ while (temp != null) {
+ outerDeclaringClass = temp;
+ temp = temp.enclosingType();
+ }
+ if (outerInvocationType != outerDeclaringClass) return false;
+ }
+ return true;
+ }
+
+ // isDefault()
+ if (invocationType.fPackage != declaringClass.fPackage) return false;
+
+ // receiverType can be an array binding in one case... see if you can change it
+ if (receiverType instanceof ArrayBinding)
+ return false;
+ ReferenceBinding currentType = (ReferenceBinding) receiverType;
+ PackageBinding declaringPackage = declaringClass.fPackage;
+ do {
+ if (declaringClass == currentType) return true;
+ if (declaringPackage != currentType.fPackage) return false;
+ } while ((currentType = currentType.superclass()) != null);
+ return false;
+}
+
+/**
+ * X<T> t --> LX<TT;>;
+ */
+public char[] genericSignature() {
+ if ((this.modifiers & AccGenericSignature) == 0) return null;
+ return this.type.genericTypeSignature();
+}
+
+public final int getAccessFlags() {
+ return modifiers & AccJustFlag;
+}
+
+/* Answer true if the receiver has default visibility
+*/
+
+public final boolean isDefault() {
+ return !isPublic() && !isProtected() && !isPrivate();
+}
+/* Answer true if the receiver is a deprecated field
+*/
+
+public final boolean isDeprecated() {
+ return (modifiers & AccDeprecated) != 0;
+}
+/* Answer true if the receiver has private visibility
+*/
+
+public final boolean isPrivate() {
+ return (modifiers & AccPrivate) != 0;
+}
+/* Answer true if the receiver has private visibility and is used locally
+*/
+
+public final boolean isPrivateUsed() {
+ return (modifiers & AccPrivateUsed) != 0;
+}
+/* Answer true if the receiver has protected visibility
+*/
+
+public final boolean isProtected() {
+ return (modifiers & AccProtected) != 0;
+}
+/* Answer true if the receiver has public visibility
+*/
+
+public final boolean isPublic() {
+ return (modifiers & AccPublic) != 0;
+}
+/* Answer true if the receiver is a static field
+*/
+
+public final boolean isStatic() {
+ return (modifiers & AccStatic) != 0;
+}
+/* Answer true if the receiver is not defined in the source of the declaringClass
+*/
+
+public final boolean isSynthetic() {
+ return (modifiers & AccSynthetic) != 0;
+}
+/* Answer true if the receiver is a transient field
+*/
+
+public final boolean isTransient() {
+ return (modifiers & AccTransient) != 0;
+}
+/* Answer true if the receiver's declaring type is deprecated (or any of its enclosing types)
+*/
+
+public final boolean isViewedAsDeprecated() {
+ return (modifiers & AccDeprecated) != 0 ||
+ (modifiers & AccDeprecatedImplicitly) != 0;
+}
+/* Answer true if the receiver is a volatile field
+*/
+
+public final boolean isVolatile() {
+ return (modifiers & AccVolatile) != 0;
+}
+/**
+ * Returns the original field (as opposed to parameterized instances)
+ */
+public FieldBinding original() {
+ return this;
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ImportBinding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ImportBinding.js
new file mode 100644
index 0000000..dd72a39
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ImportBinding.js
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.ast.ImportReference;
+
+public class ImportBinding extends Binding {
+ public char[][] compoundName;
+ public boolean onDemand;
+ public ImportReference reference;
+
+ Binding resolvedImport; // must ensure the import is resolved
+
+public ImportBinding(char[][] compoundName, boolean isOnDemand, Binding binding, ImportReference reference) {
+ this.compoundName = compoundName;
+ this.onDemand = isOnDemand;
+ this.resolvedImport = binding;
+ this.reference = reference;
+}
+/* API
+* Answer the receiver's binding type from Binding.BindingID.
+*/
+
+public final int bindingType() {
+ return IMPORT;
+}
+public char[] readableName() {
+ if (onDemand)
+ return CharOperation.concat(CharOperation.concatWith(compoundName, '.'), ".*".toCharArray()); //$NON-NLS-1$
+ else
+ return CharOperation.concatWith(compoundName, '.');
+}
+public String toString() {
+ return "import : " + new String(readableName()); //$NON-NLS-1$
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/InnerEmulationDependency.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/InnerEmulationDependency.js
new file mode 100644
index 0000000..107d7e1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/InnerEmulationDependency.js
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+public class InnerEmulationDependency{
+
+ public BlockScope scope;
+ public boolean wasEnclosingInstanceSupplied;
+
+ public InnerEmulationDependency(BlockScope scope, boolean wasEnclosingInstanceSupplied) {
+ this.scope = scope;
+ this.wasEnclosingInstanceSupplied = wasEnclosingInstanceSupplied;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/InvocationSite.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/InvocationSite.js
new file mode 100644
index 0000000..16036d4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/InvocationSite.js
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+public interface InvocationSite {
+
+ TypeBinding[] genericTypeArguments();
+ boolean isSuperAccess();
+ boolean isTypeAccess();
+ void setDepth(int depth);
+ void setFieldIndex(int depth);
+
+ // in case the receiver type does not match the actual receiver type
+ // e.g. pkg.Type.C (receiver type of C is type of source context,
+ // but actual receiver type is pkg.Type)
+ // e.g2. in presence of implicit access to enclosing type
+ void setActualReceiverType(ReferenceBinding receiverType);
+ int sourceStart();
+ int sourceEnd();
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/LocalTypeBinding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/LocalTypeBinding.js
new file mode 100644
index 0000000..8be2f1a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/LocalTypeBinding.js
@@ -0,0 +1,177 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.ast.CaseStatement;
+import org.eclipse.wst.jsdt.internal.compiler.ast.TypeDeclaration;
+
+public final class LocalTypeBinding extends NestedTypeBinding {
+ final static char[] LocalTypePrefix = { '$', 'L', 'o', 'c', 'a', 'l', '$' };
+
+ private InnerEmulationDependency[] dependents;
+ public ArrayBinding[] localArrayBindings; // used to cache array bindings of various dimensions for this local type
+ public CaseStatement switchCase; // from 1.4 on, local types should not be accessed across switch case blocks (52221)
+
+public LocalTypeBinding(ClassScope scope, SourceTypeBinding enclosingType, CaseStatement switchCase) {
+ super(
+ new char[][] {CharOperation.concat(LocalTypePrefix, scope.referenceContext.name)},
+ scope,
+ enclosingType);
+
+ if (this.sourceName == TypeDeclaration.ANONYMOUS_EMPTY_NAME)
+ this.tagBits |= AnonymousTypeMask;
+ else
+ this.tagBits |= LocalTypeMask;
+ this.switchCase = switchCase;
+}
+/* Record a dependency onto a source target type which may be altered
+* by the end of the innerclass emulation. Later on, we will revisit
+* all its dependents so as to update them (see updateInnerEmulationDependents()).
+*/
+
+public void addInnerEmulationDependent(BlockScope dependentScope, boolean wasEnclosingInstanceSupplied) {
+ int index;
+ if (dependents == null) {
+ index = 0;
+ dependents = new InnerEmulationDependency[1];
+ } else {
+ index = dependents.length;
+ for (int i = 0; i < index; i++)
+ if (dependents[i].scope == dependentScope)
+ return; // already stored
+ System.arraycopy(dependents, 0, (dependents = new InnerEmulationDependency[index + 1]), 0, index);
+ }
+ dependents[index] = new InnerEmulationDependency(dependentScope, wasEnclosingInstanceSupplied);
+ // System.out.println("Adding dependency: "+ new String(scope.enclosingType().readableName()) + " --> " + new String(this.readableName()));
+}
+/* Answer the receiver's constant pool name.
+*
+* NOTE: This method should only be used during/after code gen.
+*/
+
+public char[] constantPoolName() /* java/lang/Object */ {
+ return constantPoolName;
+}
+
+ArrayBinding createArrayType(int dimensionCount) {
+ if (localArrayBindings == null) {
+ localArrayBindings = new ArrayBinding[] {new ArrayBinding(this, dimensionCount, scope.environment())};
+ return localArrayBindings[0];
+ }
+
+ // find the cached array binding for this dimensionCount (if any)
+ int length = localArrayBindings.length;
+ for (int i = 0; i < length; i++)
+ if (localArrayBindings[i].dimensions == dimensionCount)
+ return localArrayBindings[i];
+
+ // no matching array
+ System.arraycopy(localArrayBindings, 0, localArrayBindings = new ArrayBinding[length + 1], 0, length);
+ return localArrayBindings[length] = new ArrayBinding(this, dimensionCount, scope.environment());
+}
+
+public char[] readableName() /*java.lang.Object, p.X<T> */ {
+ char[] readableName;
+ if (isAnonymousType()) {
+ if (superInterfaces == NoSuperInterfaces)
+ readableName = CharOperation.concat(TypeConstants.ANONYM_PREFIX, superclass.readableName(), TypeConstants.ANONYM_SUFFIX);
+ else
+ readableName = CharOperation.concat(TypeConstants.ANONYM_PREFIX, superInterfaces[0].readableName(), TypeConstants.ANONYM_SUFFIX);
+ } else if (isMemberType()) {
+ readableName = CharOperation.concat(enclosingType().readableName(), this.sourceName, '.');
+ } else {
+ readableName = this.sourceName;
+ }
+ TypeVariableBinding[] typeVars;
+ if ((typeVars = this.typeVariables()) != NoTypeVariables) {
+ StringBuffer nameBuffer = new StringBuffer(10);
+ nameBuffer.append(readableName).append('<');
+ for (int i = 0, length = typeVars.length; i < length; i++) {
+ if (i > 0) nameBuffer.append(',');
+ nameBuffer.append(typeVars[i].readableName());
+ }
+ nameBuffer.append('>');
+ int nameLength = nameBuffer.length();
+ readableName = new char[nameLength];
+ nameBuffer.getChars(0, nameLength, readableName, 0);
+ }
+ return readableName;
+}
+
+public char[] shortReadableName() /*Object*/ {
+ char[] shortReadableName;
+ if (isAnonymousType()) {
+ if (superInterfaces == NoSuperInterfaces)
+ shortReadableName = CharOperation.concat(TypeConstants.ANONYM_PREFIX, superclass.shortReadableName(), TypeConstants.ANONYM_SUFFIX);
+ else
+ shortReadableName = CharOperation.concat(TypeConstants.ANONYM_PREFIX, superInterfaces[0].shortReadableName(), TypeConstants.ANONYM_SUFFIX);
+ } else if (isMemberType()) {
+ shortReadableName = CharOperation.concat(enclosingType().shortReadableName(), sourceName, '.');
+ } else {
+ shortReadableName = sourceName;
+ }
+ TypeVariableBinding[] typeVars;
+ if ((typeVars = this.typeVariables()) != NoTypeVariables) {
+ StringBuffer nameBuffer = new StringBuffer(10);
+ nameBuffer.append(shortReadableName).append('<');
+ for (int i = 0, length = typeVars.length; i < length; i++) {
+ if (i > 0) nameBuffer.append(',');
+ nameBuffer.append(typeVars[i].shortReadableName());
+ }
+ nameBuffer.append('>');
+ int nameLength = nameBuffer.length();
+ shortReadableName = new char[nameLength];
+ nameBuffer.getChars(0, nameLength, shortReadableName, 0);
+ }
+ return shortReadableName;
+}
+
+// Record that the type is a local member type
+public void setAsMemberType() {
+ tagBits |= MemberTypeMask;
+}
+
+public void setConstantPoolName(char[] computedConstantPoolName) /* java/lang/Object */ {
+ this.constantPoolName = computedConstantPoolName;
+}
+
+public char[] sourceName() {
+ if (isAnonymousType()) {
+ if (superInterfaces == NoSuperInterfaces)
+ return CharOperation.concat(TypeConstants.ANONYM_PREFIX, superclass.sourceName(), TypeConstants.ANONYM_SUFFIX);
+ else
+ return CharOperation.concat(TypeConstants.ANONYM_PREFIX, superInterfaces[0].sourceName(), TypeConstants.ANONYM_SUFFIX);
+
+ } else
+ return sourceName;
+}
+public String toString() {
+ if (isAnonymousType())
+ return "Anonymous type : " + super.toString(); //$NON-NLS-1$
+ if (isMemberType())
+ return "Local member type : " + new String(sourceName()) + " " + super.toString(); //$NON-NLS-2$ //$NON-NLS-1$
+ return "Local type : " + new String(sourceName()) + " " + super.toString(); //$NON-NLS-2$ //$NON-NLS-1$
+}
+/* Trigger the dependency mechanism forcing the innerclass emulation
+* to be propagated to all dependent source types.
+*/
+
+public void updateInnerEmulationDependents() {
+ if (dependents != null) {
+ for (int i = 0; i < dependents.length; i++) {
+ InnerEmulationDependency dependency = dependents[i];
+ // System.out.println("Updating " + new String(this.readableName()) + " --> " + new String(dependency.scope.enclosingType().readableName()));
+ dependency.scope.propagateInnerEmulation(this, dependency.wasEnclosingInstanceSupplied);
+ }
+ }
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/LocalVariableBinding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/LocalVariableBinding.js
new file mode 100644
index 0000000..a929118
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/LocalVariableBinding.js
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import org.eclipse.wst.jsdt.internal.compiler.ast.LocalDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.impl.Constant;
+
+public class LocalVariableBinding extends VariableBinding {
+
+ public boolean isArgument;
+ public int resolvedPosition; // for code generation (position in method context)
+
+ public static final int UNUSED = 0;
+ public static final int USED = 1;
+ public static final int FAKE_USED = 2;
+ public int useFlag; // for flow analysis (default is UNUSED)
+
+ public BlockScope declaringScope; // back-pointer to its declaring scope
+ public LocalDeclaration declaration; // for source-positions
+
+ public int[] initializationPCs;
+ public int initializationCount = 0;
+
+ // for synthetic local variables
+ // if declaration slot is not positionned, the variable will not be listed in attribute
+ // note that the name of a variable should be chosen so as not to conflict with user ones (usually starting with a space char is all needed)
+ public LocalVariableBinding(char[] name, TypeBinding type, int modifiers, boolean isArgument) {
+ super(name, type, modifiers, isArgument ? Constant.NotAConstant : null);
+ this.isArgument = isArgument;
+ }
+
+ // regular local variable or argument
+ public LocalVariableBinding(LocalDeclaration declaration, TypeBinding type, int modifiers, boolean isArgument) {
+
+ this(declaration.name, type, modifiers, isArgument);
+ this.declaration = declaration;
+ }
+
+ /* API
+ * Answer the receiver's binding type from Binding.BindingID.
+ */
+ public final int bindingType() {
+
+ return LOCAL;
+ }
+
+ // Answer whether the variable binding is a secret variable added for code gen purposes
+ public boolean isSecret() {
+
+ return declaration == null && !isArgument;
+ }
+
+ public void recordInitializationEndPC(int pc) {
+
+ if (initializationPCs[((initializationCount - 1) << 1) + 1] == -1)
+ initializationPCs[((initializationCount - 1) << 1) + 1] = pc;
+ }
+
+ public void recordInitializationStartPC(int pc) {
+
+ if (initializationPCs == null) return;
+ // optimize cases where reopening a contiguous interval
+ if ((initializationCount > 0) && (initializationPCs[ ((initializationCount - 1) << 1) + 1] == pc)) {
+ initializationPCs[ ((initializationCount - 1) << 1) + 1] = -1; // reuse previous interval (its range will be augmented)
+ } else {
+ int index = initializationCount << 1;
+ if (index == initializationPCs.length) {
+ System.arraycopy(initializationPCs, 0, (initializationPCs = new int[initializationCount << 2]), 0, index);
+ }
+ initializationPCs[index] = pc;
+ initializationPCs[index + 1] = -1;
+ initializationCount++;
+ }
+ }
+
+ public String toString() {
+
+ String s = super.toString();
+ switch (useFlag){
+ case USED:
+ s += "[pos: " + String.valueOf(resolvedPosition) + "]"; //$NON-NLS-2$ //$NON-NLS-1$
+ break;
+ case UNUSED:
+ s += "[pos: unused]"; //$NON-NLS-1$
+ break;
+ case FAKE_USED:
+ s += "[pos: fake_used]"; //$NON-NLS-1$
+ break;
+ }
+ s += "[id:" + String.valueOf(id) + "]"; //$NON-NLS-2$ //$NON-NLS-1$
+ if (initializationCount > 0) {
+ s += "[pc: "; //$NON-NLS-1$
+ for (int i = 0; i < initializationCount; i++) {
+ if (i > 0)
+ s += ", "; //$NON-NLS-1$
+ s += String.valueOf(initializationPCs[i << 1]) + "-" + ((initializationPCs[(i << 1) + 1] == -1) ? "?" : String.valueOf(initializationPCs[(i<< 1) + 1])); //$NON-NLS-2$ //$NON-NLS-1$
+ }
+ s += "]"; //$NON-NLS-1$
+ }
+ return s;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/LookupEnvironment.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/LookupEnvironment.js
new file mode 100644
index 0000000..c32558c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/LookupEnvironment.js
@@ -0,0 +1,815 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.ast.CompilationUnitDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Wildcard;
+import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.wst.jsdt.internal.compiler.env.*;
+import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.wst.jsdt.internal.compiler.impl.ITypeRequestor;
+import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemReporter;
+import org.eclipse.wst.jsdt.internal.compiler.util.HashtableOfPackage;
+import org.eclipse.wst.jsdt.internal.compiler.util.SimpleLookupTable;
+
+public class LookupEnvironment implements BaseTypes, ProblemReasons, TypeConstants {
+ public CompilerOptions options;
+ public ProblemReporter problemReporter;
+ public ITypeRequestor typeRequestor;
+
+ PackageBinding defaultPackage;
+ ImportBinding[] defaultImports;
+ HashtableOfPackage knownPackages;
+ static final ProblemPackageBinding TheNotFoundPackage = new ProblemPackageBinding(CharOperation.NO_CHAR, NotFound);
+ static final ProblemReferenceBinding TheNotFoundType = new ProblemReferenceBinding(CharOperation.NO_CHAR, NotFound);
+
+ public INameEnvironment nameEnvironment;
+ private MethodVerifier verifier;
+ private ArrayBinding[][] uniqueArrayBindings;
+ private SimpleLookupTable uniqueParameterizedTypeBindings;
+ private SimpleLookupTable uniqueRawTypeBindings;
+ private SimpleLookupTable uniqueWildcardBindings;
+
+ private CompilationUnitDeclaration[] units = new CompilationUnitDeclaration[4];
+ private int lastUnitIndex = -1;
+ private int lastCompletedUnitIndex = -1;
+ public CompilationUnitDeclaration unitBeingCompleted = null; // only set while completing units
+
+ // indicate in which step on the compilation we are.
+ // step 1 : build the reference binding
+ // step 2 : conect the hierarchy (connect bindings)
+ // step 3 : build fields and method bindings.
+ private int stepCompleted;
+ final static int BUILD_TYPE_HIERARCHY = 1;
+ final static int CHECK_AND_SET_IMPORTS = 2;
+ final static int CONNECT_TYPE_HIERARCHY = 3;
+ final static int BUILD_FIELDS_AND_METHODS = 4;
+
+ // shared byte[]'s used by ClassFile to avoid allocating MBs during a build
+ public boolean sharedArraysUsed = true; // set to false once actual arrays are allocated
+ public byte[] sharedClassFileHeader = null;
+ public byte[] sharedClassFileContents = null;
+
+public LookupEnvironment(ITypeRequestor typeRequestor, CompilerOptions options, ProblemReporter problemReporter, INameEnvironment nameEnvironment) {
+ this.typeRequestor = typeRequestor;
+ this.options = options;
+ this.problemReporter = problemReporter;
+ this.defaultPackage = new PackageBinding(this); // assume the default package always exists
+ this.defaultImports = null;
+ this.nameEnvironment = nameEnvironment;
+ this.knownPackages = new HashtableOfPackage();
+ this.uniqueArrayBindings = new ArrayBinding[5][];
+ this.uniqueArrayBindings[0] = new ArrayBinding[50]; // start off the most common 1 dimension array @ 50
+ this.uniqueParameterizedTypeBindings = new SimpleLookupTable(3);
+ this.uniqueRawTypeBindings = new SimpleLookupTable(3);
+ this.uniqueWildcardBindings = new SimpleLookupTable(3);
+}
+/* Ask the oracle for a type which corresponds to the compoundName.
+* Answer null if the name cannot be found.
+*/
+
+public ReferenceBinding askForType(char[][] compoundName) {
+ NameEnvironmentAnswer answer = nameEnvironment.findType(compoundName);
+ if (answer == null)
+ return null;
+
+ if (answer.isBinaryType())
+ // the type was found as a .class file
+ typeRequestor.accept(answer.getBinaryType(), computePackageFrom(compoundName));
+ else if (answer.isCompilationUnit())
+ // the type was found as a .java file, try to build it then search the cache
+ typeRequestor.accept(answer.getCompilationUnit());
+ else if (answer.isSourceType())
+ // the type was found as a source model
+ typeRequestor.accept(answer.getSourceTypes(), computePackageFrom(compoundName));
+
+ return getCachedType(compoundName);
+}
+/* Ask the oracle for a type named name in the packageBinding.
+* Answer null if the name cannot be found.
+*/
+
+ReferenceBinding askForType(PackageBinding packageBinding, char[] name) {
+ if (packageBinding == null) {
+ if (defaultPackage == null)
+ return null;
+ packageBinding = defaultPackage;
+ }
+ NameEnvironmentAnswer answer = nameEnvironment.findType(name, packageBinding.compoundName);
+ if (answer == null)
+ return null;
+
+ if (answer.isBinaryType())
+ // the type was found as a .class file
+ typeRequestor.accept(answer.getBinaryType(), packageBinding);
+ else if (answer.isCompilationUnit())
+ // the type was found as a .java file, try to build it then search the cache
+ typeRequestor.accept(answer.getCompilationUnit());
+ else if (answer.isSourceType())
+ // the type was found as a source model
+ typeRequestor.accept(answer.getSourceTypes(), packageBinding);
+
+ return packageBinding.getType0(name);
+}
+/* Create the initial type bindings for the compilation unit.
+*
+* See completeTypeBindings() for a description of the remaining steps
+*
+* NOTE: This method can be called multiple times as additional source files are needed
+*/
+
+public void buildTypeBindings(CompilationUnitDeclaration unit) {
+ CompilationUnitScope scope = new CompilationUnitScope(unit, this);
+ scope.buildTypeBindings();
+
+ int unitsLength = units.length;
+ if (++lastUnitIndex >= unitsLength)
+ System.arraycopy(units, 0, units = new CompilationUnitDeclaration[2 * unitsLength], 0, unitsLength);
+ units[lastUnitIndex] = unit;
+}
+/* Cache the binary type since we know it is needed during this compile.
+*
+* Answer the created BinaryTypeBinding or null if the type is already in the cache.
+*/
+
+public BinaryTypeBinding cacheBinaryType(IBinaryType binaryType) {
+ return cacheBinaryType(binaryType, true);
+}
+/* Cache the binary type since we know it is needed during this compile.
+*
+* Answer the created BinaryTypeBinding or null if the type is already in the cache.
+*/
+
+public BinaryTypeBinding cacheBinaryType(IBinaryType binaryType, boolean needFieldsAndMethods) {
+ char[][] compoundName = CharOperation.splitOn('/', binaryType.getName());
+ ReferenceBinding existingType = getCachedType(compoundName);
+
+ if (existingType == null || existingType instanceof UnresolvedReferenceBinding)
+ // only add the binary type if its not already in the cache
+ return createBinaryTypeFrom(binaryType, computePackageFrom(compoundName), needFieldsAndMethods);
+ return null; // the type already exists & can be retrieved from the cache
+}
+/*
+* 1. Connect the type hierarchy for the type bindings created for parsedUnits.
+* 2. Create the field bindings
+* 3. Create the method bindings
+*/
+
+/* We know each known compilationUnit is free of errors at this point...
+*
+* Each step will create additional bindings unless a problem is detected, in which
+* case either the faulty import/superinterface/field/method will be skipped or a
+* suitable replacement will be substituted (such as Object for a missing superclass)
+*/
+
+public void completeTypeBindings() {
+ stepCompleted = BUILD_TYPE_HIERARCHY;
+
+ for (int i = this.lastCompletedUnitIndex + 1; i <= this.lastUnitIndex; i++) {
+ (this.unitBeingCompleted = this.units[i]).scope.checkAndSetImports();
+ }
+ stepCompleted = CHECK_AND_SET_IMPORTS;
+
+ for (int i = this.lastCompletedUnitIndex + 1; i <= this.lastUnitIndex; i++) {
+ (this.unitBeingCompleted = this.units[i]).scope.connectTypeHierarchy();
+ }
+ stepCompleted = CONNECT_TYPE_HIERARCHY;
+
+ for (int i = this.lastCompletedUnitIndex + 1; i <= this.lastUnitIndex; i++) {
+ (this.unitBeingCompleted = this.units[i]).scope.buildFieldsAndMethods();
+ this.units[i] = null; // release unnecessary reference to the parsed unit
+ }
+ stepCompleted = BUILD_FIELDS_AND_METHODS;
+ this.lastCompletedUnitIndex = this.lastUnitIndex;
+ this.unitBeingCompleted = null;
+}
+/*
+* 1. Connect the type hierarchy for the type bindings created for parsedUnits.
+* 2. Create the field bindings
+* 3. Create the method bindings
+*/
+
+/*
+* Each step will create additional bindings unless a problem is detected, in which
+* case either the faulty import/superinterface/field/method will be skipped or a
+* suitable replacement will be substituted (such as Object for a missing superclass)
+*/
+
+public void completeTypeBindings(CompilationUnitDeclaration parsedUnit) {
+ if (stepCompleted == BUILD_FIELDS_AND_METHODS) {
+ // This can only happen because the original set of units are completely built and
+ // are now being processed, so we want to treat all the additional units as a group
+ // until they too are completely processed.
+ completeTypeBindings();
+ } else {
+ if (parsedUnit.scope == null) return; // parsing errors were too severe
+
+ if (stepCompleted >= CHECK_AND_SET_IMPORTS)
+ (this.unitBeingCompleted = parsedUnit).scope.checkAndSetImports();
+
+ if (stepCompleted >= CONNECT_TYPE_HIERARCHY)
+ (this.unitBeingCompleted = parsedUnit).scope.connectTypeHierarchy();
+
+ this.unitBeingCompleted = null;
+ }
+}
+/*
+* Used by other compiler tools which do not start by calling completeTypeBindings().
+*
+* 1. Connect the type hierarchy for the type bindings created for parsedUnits.
+* 2. Create the field bindings
+* 3. Create the method bindings
+*/
+
+public void completeTypeBindings(CompilationUnitDeclaration parsedUnit, boolean buildFieldsAndMethods) {
+ if (parsedUnit.scope == null) return; // parsing errors were too severe
+
+ (this.unitBeingCompleted = parsedUnit).scope.checkAndSetImports();
+ parsedUnit.scope.connectTypeHierarchy();
+ if (buildFieldsAndMethods)
+ parsedUnit.scope.buildFieldsAndMethods();
+ this.unitBeingCompleted = null;
+}
+private PackageBinding computePackageFrom(char[][] constantPoolName) {
+ if (constantPoolName.length == 1)
+ return defaultPackage;
+
+ PackageBinding packageBinding = getPackage0(constantPoolName[0]);
+ if (packageBinding == null || packageBinding == TheNotFoundPackage) {
+ packageBinding = new PackageBinding(constantPoolName[0], this);
+ knownPackages.put(constantPoolName[0], packageBinding);
+ }
+
+ for (int i = 1, length = constantPoolName.length - 1; i < length; i++) {
+ PackageBinding parent = packageBinding;
+ if ((packageBinding = parent.getPackage0(constantPoolName[i])) == null || packageBinding == TheNotFoundPackage) {
+ packageBinding = new PackageBinding(CharOperation.subarray(constantPoolName, 0, i + 1), parent, this);
+ parent.addPackage(packageBinding);
+ }
+ }
+ return packageBinding;
+}
+/* Used to guarantee array type identity.
+*/
+
+ArrayBinding createArrayType(TypeBinding type, int dimensionCount) {
+ if (type instanceof LocalTypeBinding) // cache local type arrays with the local type itself
+ return ((LocalTypeBinding) type).createArrayType(dimensionCount);
+
+ // find the array binding cache for this dimension
+ int dimIndex = dimensionCount - 1;
+ int length = uniqueArrayBindings.length;
+ ArrayBinding[] arrayBindings;
+ if (dimIndex < length) {
+ if ((arrayBindings = uniqueArrayBindings[dimIndex]) == null)
+ uniqueArrayBindings[dimIndex] = arrayBindings = new ArrayBinding[10];
+ } else {
+ System.arraycopy(
+ uniqueArrayBindings, 0,
+ uniqueArrayBindings = new ArrayBinding[dimensionCount][], 0,
+ length);
+ uniqueArrayBindings[dimIndex] = arrayBindings = new ArrayBinding[10];
+ }
+
+ // find the cached array binding for this leaf component type (if any)
+ int index = -1;
+ length = arrayBindings.length;
+ while (++index < length) {
+ ArrayBinding currentBinding = arrayBindings[index];
+ if (currentBinding == null) // no matching array, but space left
+ return arrayBindings[index] = new ArrayBinding(type, dimensionCount, this);
+ if (currentBinding.leafComponentType == type)
+ return currentBinding;
+ }
+
+ // no matching array, no space left
+ System.arraycopy(
+ arrayBindings, 0,
+ (arrayBindings = new ArrayBinding[length * 2]), 0,
+ length);
+ uniqueArrayBindings[dimIndex] = arrayBindings;
+ return arrayBindings[length] = new ArrayBinding(type, dimensionCount, this);
+}
+public BinaryTypeBinding createBinaryTypeFrom(IBinaryType binaryType, PackageBinding packageBinding) {
+ return createBinaryTypeFrom(binaryType, packageBinding, true);
+}
+public BinaryTypeBinding createBinaryTypeFrom(IBinaryType binaryType, PackageBinding packageBinding, boolean needFieldsAndMethods) {
+ BinaryTypeBinding binaryBinding = new BinaryTypeBinding(packageBinding, binaryType, this);
+
+ // resolve any array bindings which reference the unresolvedType
+ ReferenceBinding cachedType = packageBinding.getType0(binaryBinding.compoundName[binaryBinding.compoundName.length - 1]);
+ if (cachedType != null) {
+ if (cachedType.isBinaryBinding()) // sanity check before the cast... at this point the cache should ONLY contain unresolved types
+ return (BinaryTypeBinding) cachedType;
+
+ ((UnresolvedReferenceBinding) cachedType).setResolvedType(binaryBinding, this);
+ }
+
+ packageBinding.addType(binaryBinding);
+ binaryBinding.cachePartsFrom(binaryType, needFieldsAndMethods);
+ return binaryBinding;
+}
+/* Used to create packages from the package statement.
+*/
+
+PackageBinding createPackage(char[][] compoundName) {
+ PackageBinding packageBinding = getPackage0(compoundName[0]);
+ if (packageBinding == null || packageBinding == TheNotFoundPackage) {
+ packageBinding = new PackageBinding(compoundName[0], this);
+ knownPackages.put(compoundName[0], packageBinding);
+ }
+
+ for (int i = 1, length = compoundName.length; i < length; i++) {
+ // check to see if it collides with a known type...
+ // this case can only happen if the package does not exist as a directory in the file system
+ // otherwise when the source type was defined, the correct error would have been reported
+ // unless its an unresolved type which is referenced from an inconsistent class file
+ ReferenceBinding type = packageBinding.getType0(compoundName[i]);
+ if (type != null && type != TheNotFoundType && !(type instanceof UnresolvedReferenceBinding))
+ return null;
+
+ PackageBinding parent = packageBinding;
+ if ((packageBinding = parent.getPackage0(compoundName[i])) == null || packageBinding == TheNotFoundPackage) {
+ // if the package is unknown, check to see if a type exists which would collide with the new package
+ // catches the case of a package statement of: package java.lang.Object;
+ // since the package can be added after a set of source files have already been compiled, we need
+ // whenever a package statement is encountered
+ if (nameEnvironment.findType(compoundName[i], parent.compoundName) != null)
+ return null;
+
+ packageBinding = new PackageBinding(CharOperation.subarray(compoundName, 0, i + 1), parent, this);
+ parent.addPackage(packageBinding);
+ }
+ }
+ return packageBinding;
+}
+
+public ParameterizedTypeBinding createParameterizedType(ReferenceBinding genericType, TypeBinding[] typeArguments, ReferenceBinding enclosingType) {
+
+ // cached info is array of already created parameterized types for this type
+ ParameterizedTypeBinding[] cachedInfo = (ParameterizedTypeBinding[])this.uniqueParameterizedTypeBindings.get(genericType);
+ int argLength = typeArguments == null ? 0: typeArguments.length;
+ boolean needToGrow = false;
+ if (cachedInfo != null){
+ nextCachedType :
+ // iterate existing parameterized for reusing one with same type arguments if any
+ for (int i = 0, max = cachedInfo.length; i < max; i++){
+ ParameterizedTypeBinding cachedType = cachedInfo[i];
+ if (cachedType.type != genericType) continue nextCachedType; // remain of unresolved type
+ if (cachedType.enclosingType() != enclosingType) continue nextCachedType;
+ TypeBinding[] cachedArguments = cachedType.arguments;
+ int cachedArgLength = cachedArguments == null ? 0 : cachedArguments.length;
+ if (argLength != cachedArgLength) continue nextCachedType; // would be an error situation (from unresolved binaries)
+ for (int j = 0; j < cachedArgLength; j++){
+ if (typeArguments[j] != cachedArguments[j]) continue nextCachedType;
+ }
+ // all arguments match, reuse current
+ return cachedType;
+ }
+ needToGrow = true;
+ } else {
+ cachedInfo = new ParameterizedTypeBinding[1];
+ this.uniqueParameterizedTypeBindings.put(genericType, cachedInfo);
+ }
+ // grow cache ?
+ if (needToGrow){
+ int length = cachedInfo.length;
+ System.arraycopy(cachedInfo, 0, cachedInfo = new ParameterizedTypeBinding[length+1], 0, length);
+ this.uniqueParameterizedTypeBindings.put(genericType, cachedInfo);
+ }
+ // add new binding
+ ParameterizedTypeBinding parameterizedType = new ParameterizedTypeBinding(genericType,typeArguments, enclosingType, this);
+ cachedInfo[cachedInfo.length-1] = parameterizedType;
+ return parameterizedType;
+}
+
+public RawTypeBinding createRawType(ReferenceBinding genericType, ReferenceBinding enclosingType) {
+
+ // cached info is array of already created raw types for this type
+ RawTypeBinding[] cachedInfo = (RawTypeBinding[])this.uniqueRawTypeBindings.get(genericType);
+ boolean needToGrow = false;
+ if (cachedInfo != null){
+ nextCachedType :
+ // iterate existing parameterized for reusing one with same type arguments if any
+ for (int i = 0, max = cachedInfo.length; i < max; i++){
+ RawTypeBinding cachedType = cachedInfo[i];
+ if (cachedType.type != genericType) continue nextCachedType; // remain of unresolved type
+ if (cachedType.enclosingType() != enclosingType) continue nextCachedType;
+ // all enclosing type match, reuse current
+ return cachedType;
+ }
+ needToGrow = true;
+ } else {
+ cachedInfo = new RawTypeBinding[1];
+ this.uniqueRawTypeBindings.put(genericType, cachedInfo);
+ }
+ // grow cache ?
+ if (needToGrow){
+ int length = cachedInfo.length;
+ System.arraycopy(cachedInfo, 0, cachedInfo = new RawTypeBinding[length+1], 0, length);
+ this.uniqueRawTypeBindings.put(genericType, cachedInfo);
+ }
+ // add new binding
+ RawTypeBinding rawType = new RawTypeBinding(genericType, enclosingType, this);
+ cachedInfo[cachedInfo.length-1] = rawType;
+ return rawType;
+
+}
+
+public WildcardBinding createWildcard(ReferenceBinding genericType, int rank, TypeBinding bound, int kind) {
+
+ // cached info is array of already created wildcard types for this type
+ WildcardBinding[] cachedInfo = (WildcardBinding[])this.uniqueWildcardBindings.get(genericType);
+ boolean needToGrow = false;
+ if (cachedInfo != null){
+ nextCachedType :
+ // iterate existing wildcards for reusing one with same information if any
+ for (int i = 0, max = cachedInfo.length; i < max; i++){
+ WildcardBinding cachedType = cachedInfo[i];
+ if (cachedType.genericType != genericType) continue nextCachedType; // remain of unresolved type
+ if (cachedType.rank != rank) continue nextCachedType;
+ if (cachedType.kind != kind) continue nextCachedType;
+ if (cachedType.bound != bound) continue nextCachedType;
+ // all match, reuse current
+ return cachedType;
+ }
+ needToGrow = true;
+ } else {
+ cachedInfo = new WildcardBinding[1];
+ this.uniqueWildcardBindings.put(genericType, cachedInfo);
+ }
+ // grow cache ?
+ if (needToGrow){
+ int length = cachedInfo.length;
+ System.arraycopy(cachedInfo, 0, cachedInfo = new WildcardBinding[length+1], 0, length);
+ this.uniqueWildcardBindings.put(genericType, cachedInfo);
+ }
+ // add new binding
+ WildcardBinding wildcard = new WildcardBinding(genericType, rank, bound, kind, this);
+ cachedInfo[cachedInfo.length-1] = wildcard;
+ return wildcard;
+}
+
+/* Answer the type for the compoundName if it exists in the cache.
+* Answer theNotFoundType if it could not be resolved the first time
+* it was looked up, otherwise answer null.
+*
+* NOTE: Do not use for nested types... the answer is NOT the same for a.b.C or a.b.C.D.E
+* assuming C is a type in both cases. In the a.b.C.D.E case, null is the answer.
+*/
+
+public ReferenceBinding getCachedType(char[][] compoundName) {
+ if (compoundName.length == 1) {
+ if (defaultPackage == null)
+ return null;
+ return defaultPackage.getType0(compoundName[0]);
+ }
+
+ PackageBinding packageBinding = getPackage0(compoundName[0]);
+ if (packageBinding == null || packageBinding == TheNotFoundPackage)
+ return null;
+
+ for (int i = 1, packageLength = compoundName.length - 1; i < packageLength; i++)
+ if ((packageBinding = packageBinding.getPackage0(compoundName[i])) == null || packageBinding == TheNotFoundPackage)
+ return null;
+ return packageBinding.getType0(compoundName[compoundName.length - 1]);
+}
+/* Answer the top level package named name if it exists in the cache.
+* Answer theNotFoundPackage if it could not be resolved the first time
+* it was looked up, otherwise answer null.
+*
+* NOTE: Senders must convert theNotFoundPackage into a real problem
+* package if its to returned.
+*/
+
+PackageBinding getPackage0(char[] name) {
+ return knownPackages.get(name);
+}
+/* Answer the top level package named name.
+* Ask the oracle for the package if its not in the cache.
+* Answer null if the package cannot be found.
+*/
+
+PackageBinding getTopLevelPackage(char[] name) {
+ PackageBinding packageBinding = getPackage0(name);
+ if (packageBinding != null) {
+ if (packageBinding == TheNotFoundPackage)
+ return null;
+ return packageBinding;
+ }
+
+ if (nameEnvironment.isPackage(null, name)) {
+ knownPackages.put(name, packageBinding = new PackageBinding(name, this));
+ return packageBinding;
+ }
+
+ knownPackages.put(name, TheNotFoundPackage); // saves asking the oracle next time
+ return null;
+}
+/* Answer the type corresponding to the compoundName.
+* Ask the oracle for the type if its not in the cache.
+* Answer null if the type cannot be found... likely a fatal error.
+*/
+
+public ReferenceBinding getType(char[][] compoundName) {
+ ReferenceBinding referenceBinding;
+
+ if (compoundName.length == 1) {
+ if (defaultPackage == null)
+ return null;
+
+ if ((referenceBinding = defaultPackage.getType0(compoundName[0])) == null) {
+ PackageBinding packageBinding = getPackage0(compoundName[0]);
+ if (packageBinding != null && packageBinding != TheNotFoundPackage)
+ return null; // collides with a known package... should not call this method in such a case
+ referenceBinding = askForType(defaultPackage, compoundName[0]);
+ }
+ } else {
+ PackageBinding packageBinding = getPackage0(compoundName[0]);
+ if (packageBinding == TheNotFoundPackage)
+ return null;
+
+ if (packageBinding != null) {
+ for (int i = 1, packageLength = compoundName.length - 1; i < packageLength; i++) {
+ if ((packageBinding = packageBinding.getPackage0(compoundName[i])) == null)
+ break;
+ if (packageBinding == TheNotFoundPackage)
+ return null;
+ }
+ }
+
+ if (packageBinding == null)
+ referenceBinding = askForType(compoundName);
+ else if ((referenceBinding = packageBinding.getType0(compoundName[compoundName.length - 1])) == null)
+ referenceBinding = askForType(packageBinding, compoundName[compoundName.length - 1]);
+ }
+
+ if (referenceBinding == null || referenceBinding == TheNotFoundType)
+ return null;
+ referenceBinding = BinaryTypeBinding.resolveType(referenceBinding, this, false); // no raw conversion for now
+
+ // compoundName refers to a nested type incorrectly (for example, package1.A$B)
+ if (referenceBinding.isNestedType())
+ return new ProblemReferenceBinding(compoundName, InternalNameProvided);
+ return referenceBinding;
+}
+private TypeBinding[] getTypeArgumentsFromSignature(SignatureWrapper wrapper, TypeVariableBinding[] staticVariables, ReferenceBinding enclosingType, ReferenceBinding genericType) {
+ java.util.ArrayList args = new java.util.ArrayList(2);
+ int rank = 0;
+ do {
+ args.add(getTypeFromVariantTypeSignature(wrapper, staticVariables, enclosingType, genericType, rank++));
+ } while (wrapper.signature[wrapper.start] != '>');
+ wrapper.start++; // skip '>'
+ TypeBinding[] typeArguments = new TypeBinding[args.size()];
+ args.toArray(typeArguments);
+ return typeArguments;
+}
+/* Answer the type corresponding to the name from the binary file.
+* Does not ask the oracle for the type if its not found in the cache... instead an
+* unresolved type is returned which must be resolved before used.
+*
+* NOTE: Does NOT answer base types nor array types!
+*
+* NOTE: Aborts compilation if the class file cannot be found.
+*/
+
+ReferenceBinding getTypeFromConstantPoolName(char[] signature, int start, int end, boolean isParameterized) {
+ if (end == -1)
+ end = signature.length;
+
+ char[][] compoundName = CharOperation.splitOn('/', signature, start, end);
+ ReferenceBinding binding = getCachedType(compoundName);
+ if (binding == null) {
+ PackageBinding packageBinding = computePackageFrom(compoundName);
+ binding = new UnresolvedReferenceBinding(compoundName, packageBinding);
+ packageBinding.addType(binding);
+ } else if (binding == TheNotFoundType) {
+ problemReporter.isClassPathCorrect(compoundName, null);
+ return null; // will not get here since the above error aborts the compilation
+ } else if (!isParameterized && binding.isGenericType()) {
+ // check raw type, only for resolved types
+ binding = createRawType(binding, null);
+ }
+ return binding;
+}
+/* Answer the type corresponding to the signature from the binary file.
+* Does not ask the oracle for the type if its not found in the cache... instead an
+* unresolved type is returned which must be resolved before used.
+*
+* NOTE: Does answer base types & array types.
+*
+* NOTE: Aborts compilation if the class file cannot be found.
+*/
+
+TypeBinding getTypeFromSignature(char[] signature, int start, int end, boolean isParameterized, TypeBinding enclosingType) {
+ int dimension = 0;
+ while (signature[start] == '[') {
+ start++;
+ dimension++;
+ }
+ if (end == -1)
+ end = signature.length - 1;
+
+ // Just switch on signature[start] - the L case is the else
+ TypeBinding binding = null;
+ if (start == end) {
+ switch (signature[start]) {
+ case 'I' :
+ binding = IntBinding;
+ break;
+ case 'Z' :
+ binding = BooleanBinding;
+ break;
+ case 'V' :
+ binding = VoidBinding;
+ break;
+ case 'C' :
+ binding = CharBinding;
+ break;
+ case 'D' :
+ binding = DoubleBinding;
+ break;
+ case 'B' :
+ binding = ByteBinding;
+ break;
+ case 'F' :
+ binding = FloatBinding;
+ break;
+ case 'J' :
+ binding = LongBinding;
+ break;
+ case 'S' :
+ binding = ShortBinding;
+ break;
+ default :
+ problemReporter.corruptedSignature(enclosingType, signature, start);
+ // will never reach here, since error will cause abort
+ }
+ } else {
+ binding = getTypeFromConstantPoolName(signature, start + 1, end, isParameterized);
+ }
+
+ if (dimension == 0)
+ return binding;
+ return createArrayType(binding, dimension);
+}
+TypeBinding getTypeFromTypeSignature(SignatureWrapper wrapper, TypeVariableBinding[] staticVariables, ReferenceBinding enclosingType) {
+ // TypeVariableSignature = 'T' Identifier ';'
+ // ArrayTypeSignature = '[' TypeSignature
+ // ClassTypeSignature = 'L' Identifier TypeArgs(optional) ';'
+ // or ClassTypeSignature '.' 'L' Identifier TypeArgs(optional) ';'
+ // TypeArgs = '<' VariantTypeSignature VariantTypeSignatures '>'
+ int dimension = 0;
+ while (wrapper.signature[wrapper.start] == '[') {
+ wrapper.start++;
+ dimension++;
+ }
+
+ if (wrapper.signature[wrapper.start] == 'T') {
+ int varStart = wrapper.start + 1;
+ int varEnd = wrapper.computeEnd();
+ for (int i = staticVariables.length; --i >= 0;)
+ if (CharOperation.equals(staticVariables[i].sourceName, wrapper.signature, varStart, varEnd))
+ return dimension == 0 ? (TypeBinding) staticVariables[i] : createArrayType(staticVariables[i], dimension);
+ ReferenceBinding initialType = enclosingType;
+ do {
+ if (enclosingType instanceof BinaryTypeBinding) { // per construction can only be binary type binding
+ TypeVariableBinding[] enclosingVariables = ((BinaryTypeBinding)enclosingType).typeVariables; // do not trigger resolution of variables
+ for (int i = enclosingVariables.length; --i >= 0;)
+ if (CharOperation.equals(enclosingVariables[i].sourceName, wrapper.signature, varStart, varEnd))
+ return dimension == 0 ? (TypeBinding) enclosingVariables[i] : createArrayType(enclosingVariables[i], dimension);
+ }
+ } while ((enclosingType = enclosingType.enclosingType()) != null);
+ problemReporter.undefinedTypeVariableSignature(CharOperation.subarray(wrapper.signature, varStart, varEnd), initialType);
+ return null; // cannot reach this, since previous problem will abort compilation
+ }
+
+ TypeBinding type = getTypeFromSignature(wrapper.signature, wrapper.start, wrapper.computeEnd(), true, enclosingType);
+ if (wrapper.end != wrapper.bracket)
+ return dimension == 0 ? type : createArrayType(type, dimension);
+
+ // type must be a ReferenceBinding at this point, cannot be a BaseTypeBinding or ArrayTypeBinding
+ ReferenceBinding actualType = (ReferenceBinding) type;
+ TypeBinding[] typeArguments = getTypeArgumentsFromSignature(wrapper, staticVariables, enclosingType, actualType);
+ ParameterizedTypeBinding parameterizedType = createParameterizedType(actualType, typeArguments, null);
+
+ while (wrapper.signature[wrapper.start] == '.') {
+ wrapper.start++; // skip '.'
+ char[] memberName = wrapper.nextWord();
+ BinaryTypeBinding.resolveType(parameterizedType, this, false);
+ ReferenceBinding memberType = parameterizedType.type.getMemberType(memberName);
+ if (wrapper.signature[wrapper.start] == '<') {
+ wrapper.start++; // skip '<'
+ typeArguments = getTypeArgumentsFromSignature(wrapper, staticVariables, enclosingType, memberType);
+ } else {
+ typeArguments = null;
+ }
+ parameterizedType = createParameterizedType(memberType, typeArguments, parameterizedType);
+ }
+ wrapper.start++; // skip ';'
+ return dimension == 0 ? (TypeBinding) parameterizedType : createArrayType(parameterizedType, dimension);
+}
+TypeBinding getTypeFromVariantTypeSignature(
+ SignatureWrapper wrapper,
+ TypeVariableBinding[] staticVariables,
+ ReferenceBinding enclosingType,
+ ReferenceBinding genericType,
+ int rank) {
+ // VariantTypeSignature = '-' TypeSignature
+ // or '+' TypeSignature
+ // or TypeSignature
+ // or '*'
+ switch (wrapper.signature[wrapper.start]) {
+ case '-' :
+ // ? super aType
+ wrapper.start++;
+ TypeBinding bound = getTypeFromTypeSignature(wrapper, staticVariables, enclosingType);
+ return createWildcard(genericType, rank, bound, Wildcard.SUPER);
+ case '+' :
+ // ? extends aType
+ wrapper.start++;
+ bound = getTypeFromTypeSignature(wrapper, staticVariables, enclosingType);
+ return createWildcard(genericType, rank, bound, Wildcard.EXTENDS);
+ case '*' :
+ // ?
+ wrapper.start++;
+ return createWildcard(genericType, rank, null, Wildcard.UNBOUND);
+ default :
+ return getTypeFromTypeSignature(wrapper, staticVariables, enclosingType);
+ }
+}
+/* Ask the oracle if a package exists named name in the package named compoundName.
+*/
+
+boolean isPackage(char[][] compoundName, char[] name) {
+ if (compoundName == null || compoundName.length == 0)
+ return nameEnvironment.isPackage(null, name);
+ return nameEnvironment.isPackage(compoundName, name);
+}
+// The method verifier is lazily initialized to guarantee the receiver, the compiler & the oracle are ready.
+
+public MethodVerifier methodVerifier() {
+ if (verifier == null)
+ verifier = this.options.sourceLevel < ClassFileConstants.JDK1_5
+ ? new MethodVerifier(this)
+ : new MethodVerifier15(this);
+ return verifier;
+}
+public void reset() {
+ this.defaultPackage = new PackageBinding(this); // assume the default package always exists
+ this.defaultImports = null;
+ this.knownPackages = new HashtableOfPackage();
+
+ this.verifier = null;
+ for (int i = this.uniqueArrayBindings.length; --i >= 0;) {
+ ArrayBinding[] arrayBindings = this.uniqueArrayBindings[i];
+ if (arrayBindings != null)
+ for (int j = arrayBindings.length; --j >= 0;)
+ arrayBindings[j] = null;
+ }
+ this.uniqueParameterizedTypeBindings = new SimpleLookupTable(3);
+ this.uniqueRawTypeBindings = new SimpleLookupTable(3);
+ this.uniqueWildcardBindings = new SimpleLookupTable(3);
+
+ for (int i = this.units.length; --i >= 0;)
+ this.units[i] = null;
+ this.lastUnitIndex = -1;
+ this.lastCompletedUnitIndex = -1;
+ this.unitBeingCompleted = null; // in case AbortException occurred
+
+ // name environment has a longer life cycle, and must be reset in
+ // the code which created it.
+}
+void updateCaches(UnresolvedReferenceBinding unresolvedType, ReferenceBinding resolvedType) {
+ // walk all the unique collections & replace the unresolvedType with the resolvedType
+ // must prevent 2 entries so == still works (1 containing the unresolvedType and the other containing the resolvedType)
+ if (uniqueParameterizedTypeBindings.get(unresolvedType) != null) { // update the key
+ Object[] keys = uniqueParameterizedTypeBindings.keyTable;
+ for (int i = 0, l = keys.length; i < l; i++) {
+ if (keys[i] == unresolvedType) {
+ keys[i] = resolvedType; // hashCode is based on compoundName so this works - cannot be raw since type of parameterized type
+ break;
+ }
+ }
+ }
+
+ if (uniqueWildcardBindings.get(unresolvedType) != null) { // update the key
+ Object[] keys = uniqueWildcardBindings.keyTable;
+ for (int i = 0, l = keys.length; i < l; i++) {
+ if (keys[i] == unresolvedType) {
+ keys[i] = resolvedType.isGenericType() ? createRawType(resolvedType, null) : resolvedType; // hashCode is based on compoundName so this works
+ break;
+ }
+ }
+ }
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/MemberTypeBinding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/MemberTypeBinding.js
new file mode 100644
index 0000000..d2efd89
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/MemberTypeBinding.js
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+
+public final class MemberTypeBinding extends NestedTypeBinding {
+public MemberTypeBinding(char[][] compoundName, ClassScope scope, SourceTypeBinding enclosingType) {
+ super(compoundName, scope, enclosingType);
+ this.tagBits |= MemberTypeMask;
+}
+void checkSyntheticArgsAndFields() {
+ if (this.isStatic()) return;
+ if (this.isInterface()) return;
+ this.addSyntheticArgumentAndField(this.enclosingType);
+}
+/* Answer the receiver's constant pool name.
+*
+* NOTE: This method should only be used during/after code gen.
+*/
+
+public char[] constantPoolName() /* java/lang/Object */ {
+ if (constantPoolName != null)
+ return constantPoolName;
+
+ return constantPoolName = CharOperation.concat(enclosingType().constantPoolName(), sourceName, '$');
+}
+public String toString() {
+ return "Member type : " + new String(sourceName()) + " " + super.toString(); //$NON-NLS-2$ //$NON-NLS-1$
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/MethodBinding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/MethodBinding.js
new file mode 100644
index 0000000..38b3bc4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/MethodBinding.js
@@ -0,0 +1,635 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.ConstructorDeclaration;
+
+public class MethodBinding extends Binding implements BaseTypes, TypeConstants {
+ public int modifiers;
+ public char[] selector;
+ public TypeBinding returnType;
+ public TypeBinding[] parameters;
+ public ReferenceBinding[] thrownExceptions;
+ public ReferenceBinding declaringClass;
+ public TypeVariableBinding[] typeVariables = NoTypeVariables;
+
+ char[] signature;
+
+protected MethodBinding() {
+ // for creating problem or synthetic method
+}
+public MethodBinding(int modifiers, char[] selector, TypeBinding returnType, TypeBinding[] parameters, ReferenceBinding[] thrownExceptions, ReferenceBinding declaringClass) {
+ this.modifiers = modifiers;
+ this.selector = selector;
+ this.returnType = returnType;
+ this.parameters = (parameters == null || parameters.length == 0) ? NoParameters : parameters;
+ this.thrownExceptions = (thrownExceptions == null || thrownExceptions.length == 0) ? NoExceptions : thrownExceptions;
+ this.declaringClass = declaringClass;
+
+ // propagate the strictfp & deprecated modifiers
+ if (this.declaringClass != null) {
+ if (this.declaringClass.isStrictfp())
+ if (!(isNative() || isAbstract()))
+ this.modifiers |= AccStrictfp;
+ if (this.declaringClass.isViewedAsDeprecated() && !isDeprecated())
+ this.modifiers |= AccDeprecatedImplicitly;
+ }
+}
+public MethodBinding(int modifiers, TypeBinding[] parameters, ReferenceBinding[] thrownExceptions, ReferenceBinding declaringClass) {
+ this(modifiers, ConstructorDeclaration.ConstantPoolName, VoidBinding, parameters, thrownExceptions, declaringClass);
+}
+// special API used to change method declaring class for runtime visibility check
+public MethodBinding(MethodBinding initialMethodBinding, ReferenceBinding declaringClass) {
+ this.modifiers = initialMethodBinding.modifiers;
+ this.selector = initialMethodBinding.selector;
+ this.returnType = initialMethodBinding.returnType;
+ this.parameters = initialMethodBinding.parameters;
+ this.thrownExceptions = initialMethodBinding.thrownExceptions;
+ this.declaringClass = declaringClass;
+}
+/* Answer true if the argument types & the receiver's parameters are equal
+*/
+public final boolean areParametersEqual(MethodBinding method) {
+ TypeBinding[] args = method.parameters;
+ if (parameters == args)
+ return true;
+
+ int length = parameters.length;
+ if (length != args.length)
+ return false;
+
+ for (int i = 0; i < length; i++)
+ if (parameters[i] != args[i])
+ return false;
+ return true;
+}
+/* Answer true if the argument types & the receiver's parameters have the same erasure
+*/
+public final boolean areParameterErasuresEqual(MethodBinding method) {
+ TypeBinding[] args = method.parameters;
+ if (parameters == args)
+ return true;
+
+ int length = parameters.length;
+ if (length != args.length)
+ return false;
+
+ for (int i = 0; i < length; i++) {
+ if (parameters[i].erasure() != args[i].erasure()) return false;
+ }
+ return true;
+}
+/* API
+* Answer the receiver's binding type from Binding.BindingID.
+*/
+
+public final int bindingType() {
+ return METHOD;
+}
+/* Answer true if the receiver is visible to the type provided by the scope.
+* InvocationSite implements isSuperAccess() to provide additional information
+* if the receiver is protected.
+*
+* NOTE: This method should ONLY be sent if the receiver is a constructor.
+*
+* NOTE: Cannot invoke this method with a compilation unit scope.
+*/
+
+public final boolean canBeSeenBy(InvocationSite invocationSite, Scope scope) {
+ if (isPublic()) return true;
+
+ SourceTypeBinding invocationType = scope.enclosingSourceType();
+ if (invocationType == declaringClass) return true;
+
+ if (isProtected()) {
+ // answer true if the receiver is in the same package as the invocationType
+ if (invocationType.fPackage == declaringClass.fPackage) return true;
+ return invocationSite.isSuperAccess();
+ }
+
+ if (isPrivate()) {
+ // answer true if the invocationType and the declaringClass have a common enclosingType
+ // already know they are not the identical type
+ ReferenceBinding outerInvocationType = invocationType;
+ ReferenceBinding temp = outerInvocationType.enclosingType();
+ while (temp != null) {
+ outerInvocationType = temp;
+ temp = temp.enclosingType();
+ }
+
+ ReferenceBinding outerDeclaringClass = (ReferenceBinding)declaringClass.erasure();
+ temp = outerDeclaringClass.enclosingType();
+ while (temp != null) {
+ outerDeclaringClass = temp;
+ temp = temp.enclosingType();
+ }
+ return outerInvocationType == outerDeclaringClass;
+ }
+
+ // isDefault()
+ return invocationType.fPackage == declaringClass.fPackage;
+}
+/* Answer true if the receiver is visible to the type provided by the scope.
+* InvocationSite implements isSuperAccess() to provide additional information
+* if the receiver is protected.
+*
+* NOTE: Cannot invoke this method with a compilation unit scope.
+*/
+public final boolean canBeSeenBy(TypeBinding receiverType, InvocationSite invocationSite, Scope scope) {
+ if (isPublic()) return true;
+
+ SourceTypeBinding invocationType = scope.enclosingSourceType();
+ if (invocationType == declaringClass && invocationType == receiverType) return true;
+
+ if (isProtected()) {
+ // answer true if the invocationType is the declaringClass or they are in the same package
+ // OR the invocationType is a subclass of the declaringClass
+ // AND the receiverType is the invocationType or its subclass
+ // OR the method is a static method accessed directly through a type
+ // OR previous assertions are true for one of the enclosing type
+ if (invocationType == declaringClass) return true;
+ if (invocationType.fPackage == declaringClass.fPackage) return true;
+
+ ReferenceBinding currentType = invocationType;
+ int depth = 0;
+ do {
+ if (declaringClass.isSuperclassOf(currentType)) {
+ if (invocationSite.isSuperAccess()){
+ return true;
+ }
+ // receiverType can be an array binding in one case... see if you can change it
+ if (receiverType instanceof ArrayBinding){
+ return false;
+ }
+ if (isStatic()){
+ if (depth > 0) invocationSite.setDepth(depth);
+ return true; // see 1FMEPDL - return invocationSite.isTypeAccess();
+ }
+ if (currentType == receiverType || currentType.isSuperclassOf((ReferenceBinding) receiverType)){
+ if (depth > 0) invocationSite.setDepth(depth);
+ return true;
+ }
+ }
+ depth++;
+ currentType = currentType.enclosingType();
+ } while (currentType != null);
+ return false;
+ }
+
+ if (isPrivate()) {
+ // answer true if the receiverType is the declaringClass
+ // AND the invocationType and the declaringClass have a common enclosingType
+ receiverCheck: {
+ if (receiverType != declaringClass) {
+ // special tolerance for type variable direct bounds
+ if (receiverType.isTypeVariable() && ((TypeVariableBinding) receiverType).isErasureBoundTo(declaringClass.erasure())) {
+ break receiverCheck;
+ }
+ return false;
+ }
+ }
+
+ if (invocationType != declaringClass) {
+ ReferenceBinding outerInvocationType = invocationType;
+ ReferenceBinding temp = outerInvocationType.enclosingType();
+ while (temp != null) {
+ outerInvocationType = temp;
+ temp = temp.enclosingType();
+ }
+
+ ReferenceBinding outerDeclaringClass = (ReferenceBinding)declaringClass.erasure();
+ temp = outerDeclaringClass.enclosingType();
+ while (temp != null) {
+ outerDeclaringClass = temp;
+ temp = temp.enclosingType();
+ }
+ if (outerInvocationType != outerDeclaringClass) return false;
+ }
+ return true;
+ }
+
+ // isDefault()
+ if (invocationType.fPackage != declaringClass.fPackage) return false;
+
+ // receiverType can be an array binding in one case... see if you can change it
+ if (receiverType instanceof ArrayBinding)
+ return false;
+ ReferenceBinding type = (ReferenceBinding) receiverType;
+ PackageBinding declaringPackage = declaringClass.fPackage;
+ do {
+ if (declaringClass == type) return true;
+ if (declaringPackage != type.fPackage) return false;
+ } while ((type = type.superclass()) != null);
+ return false;
+}
+
+/*
+ * Answer the declaring class to use in the constant pool
+ * may not be a reference binding (see subtypes)
+ */
+public TypeBinding constantPoolDeclaringClass() {
+ return this.declaringClass;
+}
+/* Answer the receiver's constant pool name.
+*
+* <init> for constructors
+* <clinit> for clinit methods
+* or the source name of the method
+*/
+public final char[] constantPoolName() {
+ return selector;
+}
+/**
+ *<typeParam1 ... typeParamM>(param1 ... paramN)returnType thrownException1 ... thrownExceptionP
+ * T foo(T t) throws X<T> ---> (TT;)TT;LX<TT;>;
+ * void bar(X<T> t) --> (LX<TT;>;)V
+ * <T> void bar(X<T> t) --> <T:Ljava.lang.Object;>(LX<TT;>;)V
+ */
+public char[] genericSignature() {
+ if ((this.modifiers & AccGenericSignature) == 0) return null;
+ StringBuffer sig = new StringBuffer(10);
+ if (this.typeVariables != NoTypeVariables) {
+ sig.append('<');
+ for (int i = 0, length = this.typeVariables.length; i < length; i++) {
+ sig.append(this.typeVariables[i].genericSignature());
+ }
+ sig.append('>');
+ }
+ sig.append('(');
+ for (int i = 0, length = this.parameters.length; i < length; i++) {
+ sig.append(this.parameters[i].genericTypeSignature());
+ }
+ sig.append(')').append(this.returnType.genericTypeSignature());
+ // only append thrown exception if any is generic/parameterized
+ for (int i = 0, length = this.thrownExceptions.length; i < length; i++) {
+ if((this.thrownExceptions[i].modifiers & AccGenericSignature) != 0) {
+ for (int j = 0; j < length; j++) {
+ sig.append(this.thrownExceptions[j].genericTypeSignature());
+ }
+ break;
+ }
+ }
+ int sigLength = sig.length();
+ char[] genericSignature = new char[sigLength];
+ sig.getChars(0, sigLength, genericSignature, 0);
+ return genericSignature;
+}
+public final int getAccessFlags() {
+ return modifiers & AccJustFlag;
+}
+public TypeVariableBinding getTypeVariable(char[] variableName) {
+ for (int i = this.typeVariables.length; --i >= 0;)
+ if (CharOperation.equals(this.typeVariables[i].sourceName, variableName))
+ return this.typeVariables[i];
+ return null;
+}
+/**
+ * Returns true if method got substituted parameter types
+ * (see ParameterizedMethodBinding)
+ */
+public boolean hasSubstitutedParameters() {
+ return false;
+}
+
+/* Answer true if the return type got substituted.
+ */
+public boolean hasSubstitutedReturnType() {
+ return false;
+}
+
+/* Answer true if the receiver is an abstract method
+*/
+public final boolean isAbstract() {
+ return (modifiers & AccAbstract) != 0;
+}
+
+/* Answer true if the receiver is a bridge method
+*/
+public final boolean isBridge() {
+ return (modifiers & AccBridge) != 0;
+}
+
+/* Answer true if the receiver is a constructor
+*/
+public final boolean isConstructor() {
+ return selector == ConstructorDeclaration.ConstantPoolName;
+}
+protected boolean isConstructorRelated() {
+ return isConstructor();
+}
+
+/* Answer true if the receiver has default visibility
+*/
+public final boolean isDefault() {
+ return !isPublic() && !isProtected() && !isPrivate();
+}
+
+/* Answer true if the receiver is a system generated default abstract method
+*/
+public final boolean isDefaultAbstract() {
+ return (modifiers & AccDefaultAbstract) != 0;
+}
+
+/* Answer true if the receiver is a deprecated method
+*/
+public final boolean isDeprecated() {
+ return (modifiers & AccDeprecated) != 0;
+}
+
+/* Answer true if the receiver is final and cannot be overridden
+*/
+public final boolean isFinal() {
+ return (modifiers & AccFinal) != 0;
+}
+
+/* Answer true if the receiver is implementing another method
+ * in other words, it is overriding and concrete, and overriden method is abstract
+ * Only set for source methods
+*/
+public final boolean isImplementing() {
+ return (modifiers & AccImplementing) != 0;
+}
+
+/* Answer true if the receiver is a native method
+*/
+public final boolean isNative() {
+ return (modifiers & AccNative) != 0;
+}
+
+/* Answer true if the receiver is overriding another method
+ * Only set for source methods
+*/
+public final boolean isOverriding() {
+ return (modifiers & AccOverriding) != 0;
+}
+/*
+ * Answer true if the receiver is a "public static void main(String[])" method
+ */
+public final boolean isMain() {
+ if (this.selector.length == 4 && CharOperation.equals(this.selector, MAIN)
+ && ((this.modifiers & (AccPublic | AccStatic)) != 0)
+ && VoidBinding == this.returnType
+ && this.parameters.length == 1) {
+ TypeBinding paramType = this.parameters[0];
+ if (paramType.dimensions() == 1 && paramType.leafComponentType().id == TypeIds.T_JavaLangString) {
+ return true;
+ }
+ }
+ return false;
+}
+/* Answer true if the receiver has private visibility
+*/
+public final boolean isPrivate() {
+ return (modifiers & AccPrivate) != 0;
+}
+
+/* Answer true if the receiver has private visibility and is used locally
+*/
+public final boolean isPrivateUsed() {
+ return (modifiers & AccPrivateUsed) != 0;
+}
+
+/* Answer true if the receiver has protected visibility
+*/
+public final boolean isProtected() {
+ return (modifiers & AccProtected) != 0;
+}
+
+/* Answer true if the receiver has public visibility
+*/
+public final boolean isPublic() {
+ return (modifiers & AccPublic) != 0;
+}
+
+/* Answer true if the receiver got requested to clear the private modifier
+ * during private access emulation.
+ */
+public final boolean isRequiredToClearPrivateModifier() {
+ return (modifiers & AccClearPrivateModifier) != 0;
+}
+
+/* Answer true if the receiver is a static method
+*/
+public final boolean isStatic() {
+ return (modifiers & AccStatic) != 0;
+}
+
+/* Answer true if all float operations must adher to IEEE 754 float/double rules
+*/
+public final boolean isStrictfp() {
+ return (modifiers & AccStrictfp) != 0;
+}
+
+/* Answer true if the receiver is a synchronized method
+*/
+public final boolean isSynchronized() {
+ return (modifiers & AccSynchronized) != 0;
+}
+
+/* Answer true if the receiver has public visibility
+*/
+public final boolean isSynthetic() {
+ return (modifiers & AccSynthetic) != 0;
+}
+
+/* Answer true if the receiver is a vararg method
+*/
+public final boolean isVararg() {
+ return (modifiers & AccVarargs) != 0;
+}
+
+/* Answer true if the receiver's declaring type is deprecated (or any of its enclosing types)
+*/
+public final boolean isViewedAsDeprecated() {
+ return (modifiers & AccDeprecated) != 0 ||
+ (modifiers & AccDeprecatedImplicitly) != 0;
+}
+
+/**
+ * Returns the original method (as opposed to parameterized instances)
+ */
+public MethodBinding original() {
+ return this;
+}
+
+public char[] readableName() /* foo(int, Thread) */ {
+ StringBuffer buffer = new StringBuffer(parameters.length + 1 * 20);
+ if (isConstructor())
+ buffer.append(declaringClass.sourceName());
+ else
+ buffer.append(selector);
+ buffer.append('(');
+ if (parameters != NoParameters) {
+ for (int i = 0, length = parameters.length; i < length; i++) {
+ if (i > 0)
+ buffer.append(", "); //$NON-NLS-1$
+ buffer.append(parameters[i].sourceName());
+ }
+ }
+ buffer.append(')');
+ return buffer.toString().toCharArray();
+}
+
+/**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.Binding#shortReadableName()
+ */
+public char[] shortReadableName() {
+ StringBuffer buffer = new StringBuffer(parameters.length + 1 * 20);
+ if (isConstructor())
+ buffer.append(declaringClass.shortReadableName());
+ else
+ buffer.append(selector);
+ buffer.append('(');
+ if (parameters != NoParameters) {
+ for (int i = 0, length = parameters.length; i < length; i++) {
+ if (i > 0)
+ buffer.append(", "); //$NON-NLS-1$
+ buffer.append(parameters[i].shortReadableName());
+ }
+ }
+ buffer.append(')');
+ int nameLength = buffer.length();
+ char[] shortReadableName = new char[nameLength];
+ buffer.getChars(0, nameLength, shortReadableName, 0);
+ return shortReadableName;
+}
+
+protected final void setSelector(char[] selector) {
+ this.selector = selector;
+ this.signature = null;
+}
+
+/* Answer the receiver's signature.
+*
+* NOTE: This method should only be used during/after code gen.
+* The signature is cached so if the signature of the return type or any parameter
+* type changes, the cached state is invalid.
+*/
+public final char[] signature() /* (ILjava/lang/Thread;)Ljava/lang/Object; */ {
+ if (signature != null)
+ return signature;
+
+ StringBuffer buffer = new StringBuffer(parameters.length + 1 * 20);
+ buffer.append('(');
+
+ TypeBinding[] targetParameters = this.parameters;
+ boolean considerSynthetics = isConstructorRelated() && declaringClass.isNestedType();
+ if (considerSynthetics) {
+
+ // take into account the synthetic argument type signatures as well
+ ReferenceBinding[] syntheticArgumentTypes = declaringClass.syntheticEnclosingInstanceTypes();
+ int count = syntheticArgumentTypes == null ? 0 : syntheticArgumentTypes.length;
+ for (int i = 0; i < count; i++) {
+ buffer.append(syntheticArgumentTypes[i].signature());
+ }
+
+ if (this instanceof SyntheticAccessMethodBinding) {
+ targetParameters = ((SyntheticAccessMethodBinding)this).targetMethod.parameters;
+ }
+ }
+
+ if (targetParameters != NoParameters) {
+ for (int i = 0; i < targetParameters.length; i++) {
+ buffer.append(targetParameters[i].signature());
+ }
+ }
+ if (considerSynthetics) {
+ SyntheticArgumentBinding[] syntheticOuterArguments = declaringClass.syntheticOuterLocalVariables();
+ int count = syntheticOuterArguments == null ? 0 : syntheticOuterArguments.length;
+ for (int i = 0; i < count; i++) {
+ buffer.append(syntheticOuterArguments[i].type.signature());
+ }
+ // move the extra padding arguments of the synthetic constructor invocation to the end
+ for (int i = targetParameters.length, extraLength = parameters.length; i < extraLength; i++) {
+ buffer.append(parameters[i].signature());
+ }
+ }
+ buffer.append(')');
+ buffer.append(returnType.signature());
+ int nameLength = buffer.length();
+ signature = new char[nameLength];
+ buffer.getChars(0, nameLength, signature, 0);
+
+ return signature;
+}
+public final int sourceEnd() {
+ AbstractMethodDeclaration method = sourceMethod();
+ if (method == null)
+ return 0;
+ return method.sourceEnd;
+}
+AbstractMethodDeclaration sourceMethod() {
+ SourceTypeBinding sourceType;
+ try {
+ sourceType = (SourceTypeBinding) declaringClass;
+ } catch (ClassCastException e) {
+ return null;
+ }
+
+ AbstractMethodDeclaration[] methods = sourceType.scope.referenceContext.methods;
+ for (int i = methods.length; --i >= 0;)
+ if (this == methods[i].binding)
+ return methods[i];
+ return null;
+}
+public final int sourceStart() {
+ AbstractMethodDeclaration method = sourceMethod();
+ if (method == null)
+ return 0;
+ return method.sourceStart;
+}
+
+/* During private access emulation, the binding can be requested to loose its
+ * private visibility when the class file is dumped.
+ */
+
+public final void tagForClearingPrivateModifier() {
+ modifiers |= AccClearPrivateModifier;
+}
+public String toString() {
+ String s = (returnType != null) ? returnType.debugName() : "NULL TYPE"; //$NON-NLS-1$
+ s += " "; //$NON-NLS-1$
+ s += (selector != null) ? new String(selector) : "UNNAMED METHOD"; //$NON-NLS-1$
+
+ s += "("; //$NON-NLS-1$
+ if (parameters != null) {
+ if (parameters != NoParameters) {
+ for (int i = 0, length = parameters.length; i < length; i++) {
+ if (i > 0)
+ s += ", "; //$NON-NLS-1$
+ s += (parameters[i] != null) ? parameters[i].debugName() : "NULL TYPE"; //$NON-NLS-1$
+ }
+ }
+ } else {
+ s += "NULL PARAMETERS"; //$NON-NLS-1$
+ }
+ s += ") "; //$NON-NLS-1$
+
+ if (thrownExceptions != null) {
+ if (thrownExceptions != NoExceptions) {
+ s += "throws "; //$NON-NLS-1$
+ for (int i = 0, length = thrownExceptions.length; i < length; i++) {
+ if (i > 0)
+ s += ", "; //$NON-NLS-1$
+ s += (thrownExceptions[i] != null) ? thrownExceptions[i].debugName() : "NULL TYPE"; //$NON-NLS-1$
+ }
+ }
+ } else {
+ s += "NULL THROWN EXCEPTIONS"; //$NON-NLS-1$
+ }
+ return s;
+}
+public TypeVariableBinding[] typeVariables() {
+ return this.typeVariables;
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/MethodScope.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/MethodScope.js
new file mode 100644
index 0000000..29d61f6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/MethodScope.js
@@ -0,0 +1,502 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import org.eclipse.wst.jsdt.internal.compiler.ast.*;
+import org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.ConstructorDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.QualifiedNameReference;
+import org.eclipse.wst.jsdt.internal.compiler.ast.SingleNameReference;
+import org.eclipse.wst.jsdt.internal.compiler.ast.TypeDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.wst.jsdt.internal.compiler.codegen.CodeStream;
+import org.eclipse.wst.jsdt.internal.compiler.flow.FlowInfo;
+import org.eclipse.wst.jsdt.internal.compiler.flow.UnconditionalFlowInfo;
+import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.wst.jsdt.internal.compiler.impl.ReferenceContext;
+import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemReporter;
+
+/**
+ * Particular block scope used for methods, constructors or clinits, representing
+ * its outermost blockscope. Note also that such a scope will be provided to enclose
+ * field initializers subscopes as well.
+ */
+public class MethodScope extends BlockScope {
+
+ public ReferenceContext referenceContext;
+ public boolean isStatic; // method modifier or initializer one
+
+ //fields used during name resolution
+ public boolean isConstructorCall = false;
+ public FieldBinding initializedField; // the field being initialized
+ public int lastVisibleFieldID = -1; // the ID of the last field which got declared
+ // note that #initializedField can be null AND lastVisibleFieldID >= 0, when processing instance field initializers.
+
+ // flow analysis
+ public int analysisIndex; // for setting flow-analysis id
+ public boolean isPropagatingInnerClassEmulation;
+
+ // for local variables table attributes
+ public int lastIndex = 0;
+ public long[] definiteInits = new long[4];
+ public long[][] extraDefiniteInits = new long[4][];
+
+ // inner-emulation
+ public SyntheticArgumentBinding[] extraSyntheticArguments;
+
+ public MethodScope(ClassScope parent, ReferenceContext context, boolean isStatic) {
+
+ super(METHOD_SCOPE, parent);
+ locals = new LocalVariableBinding[5];
+ this.referenceContext = context;
+ this.isStatic = isStatic;
+ this.startIndex = 0;
+ }
+
+ /* Spec : 8.4.3 & 9.4
+ */
+ private void checkAndSetModifiersForConstructor(MethodBinding methodBinding) {
+
+ int modifiers = methodBinding.modifiers;
+ if ((modifiers & AccAlternateModifierProblem) != 0)
+ problemReporter().duplicateModifierForMethod(
+ methodBinding.declaringClass,
+ (AbstractMethodDeclaration) referenceContext);
+
+ if (((ConstructorDeclaration) referenceContext).isDefaultConstructor) {
+ if (methodBinding.declaringClass.isPublic())
+ modifiers |= AccPublic;
+ else if (methodBinding.declaringClass.isProtected())
+ modifiers |= AccProtected;
+ }
+
+ // after this point, tests on the 16 bits reserved.
+ int realModifiers = modifiers & AccJustFlag;
+
+ // check for abnormal modifiers
+ int unexpectedModifiers =
+ ~(AccPublic | AccPrivate | AccProtected | AccStrictfp);
+ if ((realModifiers & unexpectedModifiers) != 0)
+ problemReporter().illegalModifierForMethod(
+ methodBinding.declaringClass,
+ (AbstractMethodDeclaration) referenceContext);
+ else if (
+ (((AbstractMethodDeclaration) referenceContext).modifiers & AccStrictfp) != 0)
+ // must check the parse node explicitly
+ problemReporter().illegalModifierForMethod(
+ methodBinding.declaringClass,
+ (AbstractMethodDeclaration) referenceContext);
+
+ // check for incompatible modifiers in the visibility bits, isolate the visibility bits
+ int accessorBits = realModifiers & (AccPublic | AccProtected | AccPrivate);
+ if ((accessorBits & (accessorBits - 1)) != 0) {
+ problemReporter().illegalVisibilityModifierCombinationForMethod(
+ methodBinding.declaringClass,
+ (AbstractMethodDeclaration) referenceContext);
+
+ // need to keep the less restrictive
+ if ((accessorBits & AccPublic) != 0) {
+ if ((accessorBits & AccProtected) != 0)
+ modifiers ^= AccProtected;
+ if ((accessorBits & AccPrivate) != 0)
+ modifiers ^= AccPrivate;
+ }
+ if ((accessorBits & AccProtected) != 0)
+ if ((accessorBits & AccPrivate) != 0)
+ modifiers ^= AccPrivate;
+ }
+
+ // if the receiver's declaring class is a private nested type, then make sure the receiver is not private (causes problems for inner type emulation)
+ if (methodBinding.declaringClass.isPrivate())
+ if ((modifiers & AccPrivate) != 0)
+ modifiers ^= AccPrivate;
+
+ methodBinding.modifiers = modifiers;
+ }
+
+ /* Spec : 8.4.3 & 9.4
+ */
+ private void checkAndSetModifiersForMethod(MethodBinding methodBinding) {
+
+ int modifiers = methodBinding.modifiers;
+ if ((modifiers & AccAlternateModifierProblem) != 0)
+ problemReporter().duplicateModifierForMethod(
+ methodBinding.declaringClass,
+ (AbstractMethodDeclaration) referenceContext);
+
+ // after this point, tests on the 16 bits reserved.
+ int realModifiers = modifiers & AccJustFlag;
+
+ // set the requested modifiers for a method in an interface
+ if (methodBinding.declaringClass.isInterface()) {
+ if ((realModifiers & ~(AccPublic | AccAbstract)) != 0)
+ problemReporter().illegalModifierForInterfaceMethod(
+ methodBinding.declaringClass,
+ (AbstractMethodDeclaration) referenceContext);
+ return;
+ }
+
+ // check for abnormal modifiers
+ int unexpectedModifiers =
+ ~(
+ AccPublic
+ | AccPrivate
+ | AccProtected
+ | AccAbstract
+ | AccStatic
+ | AccFinal
+ | AccSynchronized
+ | AccNative
+ | AccStrictfp);
+ if ((realModifiers & unexpectedModifiers) != 0)
+ problemReporter().illegalModifierForMethod(
+ methodBinding.declaringClass,
+ (AbstractMethodDeclaration) referenceContext);
+
+ // check for incompatible modifiers in the visibility bits, isolate the visibility bits
+ int accessorBits = realModifiers & (AccPublic | AccProtected | AccPrivate);
+ if ((accessorBits & (accessorBits - 1)) != 0) {
+ problemReporter().illegalVisibilityModifierCombinationForMethod(
+ methodBinding.declaringClass,
+ (AbstractMethodDeclaration) referenceContext);
+
+ // need to keep the less restrictive
+ if ((accessorBits & AccPublic) != 0) {
+ if ((accessorBits & AccProtected) != 0)
+ modifiers ^= AccProtected;
+ if ((accessorBits & AccPrivate) != 0)
+ modifiers ^= AccPrivate;
+ }
+ if ((accessorBits & AccProtected) != 0)
+ if ((accessorBits & AccPrivate) != 0)
+ modifiers ^= AccPrivate;
+ }
+
+ // check for modifiers incompatible with abstract modifier
+ if ((modifiers & AccAbstract) != 0) {
+ int incompatibleWithAbstract =
+ AccPrivate | AccStatic | AccFinal | AccSynchronized | AccNative | AccStrictfp;
+ if ((modifiers & incompatibleWithAbstract) != 0)
+ problemReporter().illegalAbstractModifierCombinationForMethod(
+ methodBinding.declaringClass,
+ (AbstractMethodDeclaration) referenceContext);
+ if (!methodBinding.declaringClass.isAbstract())
+ problemReporter().abstractMethodInAbstractClass(
+ (SourceTypeBinding) methodBinding.declaringClass,
+ (AbstractMethodDeclaration) referenceContext);
+ }
+
+ /* DISABLED for backward compatibility with javac (if enabled should also mark private methods as final)
+ // methods from a final class are final : 8.4.3.3
+ if (methodBinding.declaringClass.isFinal())
+ modifiers |= AccFinal;
+ */
+ // native methods cannot also be tagged as strictfp
+ if ((modifiers & AccNative) != 0 && (modifiers & AccStrictfp) != 0)
+ problemReporter().nativeMethodsCannotBeStrictfp(
+ methodBinding.declaringClass,
+ (AbstractMethodDeclaration) referenceContext);
+
+ // static members are only authorized in a static member or top level type
+ if (((realModifiers & AccStatic) != 0)
+ && methodBinding.declaringClass.isNestedType()
+ && !methodBinding.declaringClass.isStatic())
+ problemReporter().unexpectedStaticModifierForMethod(
+ methodBinding.declaringClass,
+ (AbstractMethodDeclaration) referenceContext);
+
+ methodBinding.modifiers = modifiers;
+ }
+
+ /* Compute variable positions in scopes given an initial position offset
+ * ignoring unused local variables.
+ *
+ * Deal with arguments here, locals and subscopes are processed in BlockScope method
+ */
+ public void computeLocalVariablePositions(int initOffset, CodeStream codeStream) {
+
+ boolean isReportingUnusedArgument = false;
+
+ if (referenceContext instanceof AbstractMethodDeclaration) {
+ AbstractMethodDeclaration methodDecl = (AbstractMethodDeclaration)referenceContext;
+ MethodBinding method = methodDecl.binding;
+ CompilerOptions options = compilationUnitScope().environment.options;
+ if (!(method.isAbstract()
+ || (method.isImplementing() && !options.reportUnusedParameterWhenImplementingAbstract)
+ || (method.isOverriding() && !method.isImplementing() && !options.reportUnusedParameterWhenOverridingConcrete)
+ || method.isMain())) {
+ isReportingUnusedArgument = true;
+ }
+ }
+ this.offset = initOffset;
+ this.maxOffset = initOffset;
+
+ // manage arguments
+ int ilocal = 0, maxLocals = this.localIndex;
+ while (ilocal < maxLocals) {
+ LocalVariableBinding local = locals[ilocal];
+ if (local == null || !local.isArgument) break; // done with arguments
+
+ // do not report fake used variable
+ if (isReportingUnusedArgument
+ && local.useFlag == LocalVariableBinding.UNUSED
+ && ((local.declaration.bits & ASTNode.IsLocalDeclarationReachableMASK) != 0)) { // declaration is reachable
+ this.problemReporter().unusedArgument(local.declaration);
+ }
+
+ // record user-defined argument for attribute generation
+ codeStream.record(local);
+
+ // assign variable position
+ local.resolvedPosition = this.offset;
+
+ if ((local.type == LongBinding) || (local.type == DoubleBinding)) {
+ this.offset += 2;
+ } else {
+ this.offset++;
+ }
+ // check for too many arguments/local variables
+ if (this.offset > 0xFF) { // no more than 255 words of arguments
+ this.problemReporter().noMoreAvailableSpaceForArgument(local, local.declaration);
+ }
+ ilocal++;
+ }
+
+ // sneak in extra argument before other local variables
+ if (extraSyntheticArguments != null) {
+ for (int iarg = 0, maxArguments = extraSyntheticArguments.length; iarg < maxArguments; iarg++){
+ SyntheticArgumentBinding argument = extraSyntheticArguments[iarg];
+ argument.resolvedPosition = this.offset;
+ if ((argument.type == LongBinding) || (argument.type == DoubleBinding)){
+ this.offset += 2;
+ } else {
+ this.offset++;
+ }
+ if (this.offset > 0xFF) { // no more than 255 words of arguments
+ this.problemReporter().noMoreAvailableSpaceForArgument(argument, (ASTNode)this.referenceContext);
+ }
+ }
+ }
+ this.computeLocalVariablePositions(ilocal, this.offset, codeStream);
+ }
+
+ /* Error management:
+ * keep null for all the errors that prevent the method to be created
+ * otherwise return a correct method binding (but without the element
+ * that caused the problem) : ie : Incorrect thrown exception
+ */
+ MethodBinding createMethod(AbstractMethodDeclaration method) {
+
+ // is necessary to ensure error reporting
+ this.referenceContext = method;
+ method.scope = this;
+ SourceTypeBinding declaringClass = referenceType().binding;
+ int modifiers = method.modifiers | AccUnresolved;
+ if (method.isConstructor()) {
+ if (method.isDefaultConstructor()) {
+ modifiers |= AccIsDefaultConstructor;
+ }
+ method.binding = new MethodBinding(modifiers, null, null, declaringClass);
+ checkAndSetModifiersForConstructor(method.binding);
+ } else {
+ if (declaringClass.isInterface())
+ modifiers |= AccPublic | AccAbstract;
+ method.binding =
+ new MethodBinding(modifiers, method.selector, null, null, null, declaringClass);
+ checkAndSetModifiersForMethod(method.binding);
+ }
+ this.isStatic = method.binding.isStatic();
+
+ TypeParameter[] typeParameters = method.typeParameters();
+ // do not construct type variables if source < 1.5
+ if (typeParameters == null || environment().options.sourceLevel < ClassFileConstants.JDK1_5) {
+ method.binding.typeVariables = NoTypeVariables;
+ } else {
+ method.binding.typeVariables = createTypeVariables(typeParameters, method.binding);
+ method.binding.modifiers |= AccGenericSignature;
+ }
+ return method.binding;
+ }
+
+ /* Overridden to detect the error case inside an explicit constructor call:
+
+ class X {
+ int i;
+ X myX;
+ X(X x) {
+ this(i, myX.i, x.i); // same for super calls... only the first 2 field accesses are errors
+ }
+ }
+ */
+ public FieldBinding findField(
+ TypeBinding receiverType,
+ char[] fieldName,
+ InvocationSite invocationSite,
+ boolean needResolve) {
+
+ FieldBinding field = super.findField(receiverType, fieldName, invocationSite, needResolve);
+ if (field == null)
+ return null;
+ if (!field.isValidBinding())
+ return field; // answer the error field
+ if (field.isStatic())
+ return field; // static fields are always accessible
+
+ if (!isConstructorCall || receiverType != enclosingSourceType())
+ return field;
+
+ if (invocationSite instanceof SingleNameReference)
+ return new ProblemFieldBinding(
+ field, // closest match
+ field.declaringClass,
+ fieldName,
+ NonStaticReferenceInConstructorInvocation);
+ if (invocationSite instanceof QualifiedNameReference) {
+ // look to see if the field is the first binding
+ QualifiedNameReference name = (QualifiedNameReference) invocationSite;
+ if (name.binding == null)
+ // only true when the field is the fieldbinding at the beginning of name's tokens
+ return new ProblemFieldBinding(
+ field, // closest match
+ field.declaringClass,
+ fieldName,
+ NonStaticReferenceInConstructorInvocation);
+ }
+ return field;
+ }
+
+ public boolean isInsideConstructor() {
+
+ return (referenceContext instanceof ConstructorDeclaration);
+ }
+
+ public boolean isInsideInitializer() {
+
+ return (referenceContext instanceof TypeDeclaration);
+ }
+
+ public boolean isInsideInitializerOrConstructor() {
+
+ return (referenceContext instanceof TypeDeclaration)
+ || (referenceContext instanceof ConstructorDeclaration);
+ }
+
+ /* Answer the problem reporter to use for raising new problems.
+ *
+ * Note that as a side-effect, this updates the current reference context
+ * (unit, type or method) in case the problem handler decides it is necessary
+ * to abort.
+ */
+ public ProblemReporter problemReporter() {
+
+ MethodScope outerMethodScope;
+ if ((outerMethodScope = outerMostMethodScope()) == this) {
+ ProblemReporter problemReporter = referenceCompilationUnit().problemReporter;
+ problemReporter.referenceContext = referenceContext;
+ return problemReporter;
+ }
+ return outerMethodScope.problemReporter();
+ }
+
+ public final int recordInitializationStates(FlowInfo flowInfo) {
+
+ if (!flowInfo.isReachable()) return -1;
+
+ UnconditionalFlowInfo unconditionalFlowInfo = flowInfo.unconditionalInits();
+ long[] extraInits = unconditionalFlowInfo.extraDefiniteInits;
+ long inits = unconditionalFlowInfo.definiteInits;
+ checkNextEntry : for (int i = lastIndex; --i >= 0;) {
+ if (definiteInits[i] == inits) {
+ long[] otherInits = extraDefiniteInits[i];
+ if ((extraInits != null) && (otherInits != null)) {
+ if (extraInits.length == otherInits.length) {
+ int j, max;
+ for (j = 0, max = extraInits.length; j < max; j++) {
+ if (extraInits[j] != otherInits[j]) {
+ continue checkNextEntry;
+ }
+ }
+ return i;
+ }
+ } else {
+ if ((extraInits == null) && (otherInits == null)) {
+ return i;
+ }
+ }
+ }
+ }
+
+ // add a new entry
+ if (definiteInits.length == lastIndex) {
+ // need a resize
+ System.arraycopy(
+ definiteInits,
+ 0,
+ (definiteInits = new long[lastIndex + 20]),
+ 0,
+ lastIndex);
+ System.arraycopy(
+ extraDefiniteInits,
+ 0,
+ (extraDefiniteInits = new long[lastIndex + 20][]),
+ 0,
+ lastIndex);
+ }
+ definiteInits[lastIndex] = inits;
+ if (extraInits != null) {
+ extraDefiniteInits[lastIndex] = new long[extraInits.length];
+ System.arraycopy(
+ extraInits,
+ 0,
+ extraDefiniteInits[lastIndex],
+ 0,
+ extraInits.length);
+ }
+ return lastIndex++;
+ }
+
+ /* Answer the reference method of this scope, or null if initialization scoope.
+ */
+ public AbstractMethodDeclaration referenceMethod() {
+
+ if (referenceContext instanceof AbstractMethodDeclaration) return (AbstractMethodDeclaration) referenceContext;
+ return null;
+ }
+
+ /* Answer the reference type of this scope.
+ *
+ * It is the nearest enclosing type of this scope.
+ */
+ public TypeDeclaration referenceType() {
+
+ return ((ClassScope) parent).referenceContext;
+ }
+
+ String basicToString(int tab) {
+
+ String newLine = "\n"; //$NON-NLS-1$
+ for (int i = tab; --i >= 0;)
+ newLine += "\t"; //$NON-NLS-1$
+
+ String s = newLine + "--- Method Scope ---"; //$NON-NLS-1$
+ newLine += "\t"; //$NON-NLS-1$
+ s += newLine + "locals:"; //$NON-NLS-1$
+ for (int i = 0; i < localIndex; i++)
+ s += newLine + "\t" + locals[i].toString(); //$NON-NLS-1$
+ s += newLine + "startIndex = " + startIndex; //$NON-NLS-1$
+ s += newLine + "isConstructorCall = " + isConstructorCall; //$NON-NLS-1$
+ s += newLine + "initializedField = " + initializedField; //$NON-NLS-1$
+ s += newLine + "lastVisibleFieldID = " + lastVisibleFieldID; //$NON-NLS-1$
+ s += newLine + "referenceContext = " + referenceContext; //$NON-NLS-1$
+ return s;
+ }
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/MethodVerifier.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/MethodVerifier.js
new file mode 100644
index 0000000..304249d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/MethodVerifier.js
@@ -0,0 +1,544 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.ast.MethodDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.TypeDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemReporter;
+import org.eclipse.wst.jsdt.internal.compiler.util.HashtableOfObject;
+
+class MethodVerifier implements TagBits, TypeConstants {
+ SourceTypeBinding type;
+ HashtableOfObject inheritedMethods;
+ HashtableOfObject currentMethods;
+ ReferenceBinding runtimeException;
+ ReferenceBinding errorException;
+ LookupEnvironment environment;
+/*
+Binding creation is responsible for reporting all problems with types:
+ - all modifier problems (duplicates & multiple visibility modifiers + incompatible combinations - abstract/final)
+ - plus invalid modifiers given the context (the verifier did not do this before)
+ - qualified name collisions between a type and a package (types in default packages are excluded)
+ - all type hierarchy problems:
+ - cycles in the superclass or superinterface hierarchy
+ - an ambiguous, invisible or missing superclass or superinterface
+ - extending a final class
+ - extending an interface instead of a class
+ - implementing a class instead of an interface
+ - implementing the same interface more than once (ie. duplicate interfaces)
+ - with nested types:
+ - shadowing an enclosing type's source name
+ - defining a static class or interface inside a non-static nested class
+ - defining an interface as a local type (local types can only be classes)
+*/
+MethodVerifier(LookupEnvironment environment) {
+ this.type = null; // Initialized with the public method verify(SourceTypeBinding)
+ this.inheritedMethods = null;
+ this.currentMethods = null;
+ this.runtimeException = null;
+ this.errorException = null;
+ this.environment = environment;
+}
+boolean areParametersEqual(MethodBinding one, MethodBinding two) {
+ TypeBinding[] oneArgs = one.parameters;
+ TypeBinding[] twoArgs = two.parameters;
+ if (oneArgs == twoArgs) return true;
+
+ int length = oneArgs.length;
+ if (length != twoArgs.length) return false;
+
+ for (int i = 0; i < length; i++)
+ if (!areTypesEqual(oneArgs[i], twoArgs[i])) return false;
+ return true;
+}
+boolean areReturnTypesEqual(MethodBinding one, MethodBinding two) {
+ return areTypesEqual(one.returnType, two.returnType);
+}
+boolean areTypesEqual(TypeBinding one, TypeBinding two) {
+ if (one == two) return true;
+ if (one instanceof ReferenceBinding && two instanceof ReferenceBinding)
+ // can compare unresolved to resolved reference bindings
+ return CharOperation.equals(((ReferenceBinding) one).compoundName, ((ReferenceBinding) two).compoundName);
+ return false; // all other type bindings are identical
+}
+void checkAbstractMethod(MethodBinding abstractMethod) {
+ if (mustImplementAbstractMethod(abstractMethod)) {
+ TypeDeclaration typeDeclaration = this.type.scope.referenceContext;
+ if (typeDeclaration != null) {
+ MethodDeclaration missingAbstractMethod = typeDeclaration.addMissingAbstractMethodFor(abstractMethod);
+ missingAbstractMethod.scope.problemReporter().abstractMethodMustBeImplemented(this.type, abstractMethod);
+ } else {
+ this.problemReporter().abstractMethodMustBeImplemented(this.type, abstractMethod);
+ }
+ }
+}
+void checkAgainstInheritedMethods(MethodBinding currentMethod, MethodBinding[] methods, int length) {
+ nextMethod : for (int i = length; --i >= 0;) {
+ MethodBinding inheritedMethod = methods[i];
+ if (currentMethod.isStatic() != inheritedMethod.isStatic()) { // Cannot override a static method or hide an instance method
+ this.problemReporter(currentMethod).staticAndInstanceConflict(currentMethod, inheritedMethod);
+ continue nextMethod;
+ }
+
+ if (!currentMethod.isAbstract() && inheritedMethod.isAbstract()) {
+ if ((currentMethod.modifiers & CompilerModifiers.AccOverriding) == 0)
+ currentMethod.modifiers |= CompilerModifiers.AccImplementing;
+ } else {
+ currentMethod.modifiers |= CompilerModifiers.AccOverriding;
+ }
+
+ if (!areReturnTypesEqual(currentMethod, inheritedMethod)) {
+ this.problemReporter(currentMethod).incompatibleReturnType(currentMethod, inheritedMethod);
+ } else {
+ if (currentMethod.thrownExceptions != NoExceptions)
+ this.checkExceptions(currentMethod, inheritedMethod);
+ if (inheritedMethod.isFinal())
+ this.problemReporter(currentMethod).finalMethodCannotBeOverridden(currentMethod, inheritedMethod);
+ if (!this.isAsVisible(currentMethod, inheritedMethod))
+ this.problemReporter(currentMethod).visibilityConflict(currentMethod, inheritedMethod);
+ if (environment.options.reportDeprecationWhenOverridingDeprecatedMethod && inheritedMethod.isViewedAsDeprecated()) {
+ if (!currentMethod.isViewedAsDeprecated() || environment.options.reportDeprecationInsideDeprecatedCode) {
+ // check against the other inherited methods to see if they hide this inheritedMethod
+ ReferenceBinding declaringClass = inheritedMethod.declaringClass;
+ if (declaringClass.isInterface())
+ for (int j = length; --j >= 0;)
+ if (i != j && methods[j].declaringClass.implementsInterface(declaringClass, false))
+ continue nextMethod;
+
+ this.problemReporter(currentMethod).overridesDeprecatedMethod(currentMethod, inheritedMethod);
+ }
+ }
+ }
+ }
+}
+/*
+"8.4.4"
+Verify that newExceptions are all included in inheritedExceptions.
+Assumes all exceptions are valid and throwable.
+Unchecked exceptions (compatible with runtime & error) are ignored (see the spec on pg. 203).
+*/
+void checkExceptions(MethodBinding newMethod, MethodBinding inheritedMethod) {
+ ReferenceBinding[] newExceptions = resolvedExceptionTypesFor(newMethod);
+ ReferenceBinding[] inheritedExceptions = resolvedExceptionTypesFor(inheritedMethod);
+ for (int i = newExceptions.length; --i >= 0;) {
+ ReferenceBinding newException = newExceptions[i];
+ int j = inheritedExceptions.length;
+ while (--j > -1 && !this.isSameClassOrSubclassOf(newException, inheritedExceptions[j])){/*empty*/}
+ if (j == -1)
+ if (!(newException.isCompatibleWith(this.runtimeException()) || newException.isCompatibleWith(this.errorException())))
+ this.problemReporter(newMethod).incompatibleExceptionInThrowsClause(this.type, newMethod, inheritedMethod, newException);
+ }
+}
+void checkInheritedMethods(MethodBinding[] methods, int length) {
+ MethodBinding first = methods[0];
+ int index = length;
+ while (--index > 0 && areReturnTypesEqual(first, methods[index])){/*empty*/}
+ if (index > 0) { // All inherited methods do NOT have the same vmSignature
+ this.problemReporter().inheritedMethodsHaveIncompatibleReturnTypes(this.type, methods, length);
+ return;
+ }
+
+ MethodBinding concreteMethod = null;
+ if (!type.isInterface()) { // ignore concrete methods for interfaces
+ for (int i = length; --i >= 0;) { // Remember that only one of the methods can be non-abstract
+ if (!methods[i].isAbstract()) {
+ concreteMethod = methods[i];
+ break;
+ }
+ }
+ }
+ if (concreteMethod == null) {
+ if (this.type.isClass() && !this.type.isAbstract()) {
+ for (int i = length; --i >= 0;) {
+ if (mustImplementAbstractMethod(methods[i])) {
+ TypeDeclaration typeDeclaration = this.type.scope.referenceContext;
+ if (typeDeclaration != null) {
+ MethodDeclaration missingAbstractMethod = typeDeclaration.addMissingAbstractMethodFor(methods[0]);
+ missingAbstractMethod.scope.problemReporter().abstractMethodMustBeImplemented(this.type, methods[0]);
+ } else {
+ this.problemReporter().abstractMethodMustBeImplemented(this.type, methods[0]);
+ }
+ return;
+ }
+ }
+ }
+ return;
+ }
+
+ MethodBinding[] abstractMethods = new MethodBinding[length - 1];
+ index = 0;
+ for (int i = length; --i >= 0;)
+ if (methods[i] != concreteMethod)
+ abstractMethods[index++] = methods[i];
+
+ // Remember that interfaces can only define public instance methods
+ if (concreteMethod.isStatic())
+ // Cannot inherit a static method which is specified as an instance method by an interface
+ this.problemReporter().staticInheritedMethodConflicts(type, concreteMethod, abstractMethods);
+ if (!concreteMethod.isPublic())
+ // Cannot reduce visibility of a public method specified by an interface
+ this.problemReporter().inheritedMethodReducesVisibility(type, concreteMethod, abstractMethods);
+ if (concreteMethod.thrownExceptions != NoExceptions)
+ for (int i = abstractMethods.length; --i >= 0;)
+ this.checkExceptions(concreteMethod, abstractMethods[i]);
+}
+/*
+For each inherited method identifier (message pattern - vm signature minus the return type)
+ if current method exists
+ if current's vm signature does not match an inherited signature then complain
+ else compare current's exceptions & visibility against each inherited method
+ else
+ if inherited methods = 1
+ if inherited is abstract && type is NOT an interface or abstract, complain
+ else
+ if vm signatures do not match complain
+ else
+ find the concrete implementation amongst the abstract methods (can only be 1)
+ if one exists then
+ it must be a public instance method
+ compare concrete's exceptions against each abstract method
+ else
+ complain about missing implementation only if type is NOT an interface or abstract
+*/
+void checkMethods() {
+ boolean mustImplementAbstractMethods = this.type.isClass() && !this.type.isAbstract();
+ boolean skipInheritedMethods = mustImplementAbstractMethods && this.type.superInterfaces() == NoSuperInterfaces
+ && this.type.superclass() != null && !this.type.superclass().isAbstract(); // have a single concrete superclass so only check overridden methods
+ char[][] methodSelectors = this.inheritedMethods.keyTable;
+ nextSelector : for (int s = methodSelectors.length; --s >= 0;) {
+ if (methodSelectors[s] == null) continue nextSelector;
+
+ MethodBinding[] current = (MethodBinding[]) this.currentMethods.get(methodSelectors[s]);
+ if (current == null && skipInheritedMethods)
+ continue nextSelector;
+
+ MethodBinding[] inherited = (MethodBinding[]) this.inheritedMethods.valueTable[s];
+ if (inherited.length == 1 && current == null) { // handle the common case
+ if (mustImplementAbstractMethods && inherited[0].isAbstract())
+ checkAbstractMethod(inherited[0]);
+ continue nextSelector;
+ }
+
+ int index = -1;
+ MethodBinding[] matchingInherited = new MethodBinding[inherited.length];
+ if (current != null) {
+ for (int i = 0, length1 = current.length; i < length1; i++) {
+ while (index >= 0) matchingInherited[index--] = null; // clear the previous contents of the matching methods
+ MethodBinding currentMethod = current[i];
+ for (int j = 0, length2 = inherited.length; j < length2; j++) {
+ MethodBinding inheritedMethod = inherited[j];
+ if (inheritedMethod != null && areParametersEqual(currentMethod, inheritedMethod)) {
+ matchingInherited[++index] = inheritedMethod;
+ inherited[j] = null; // do not want to find it again
+ }
+ }
+ if (index >= 0)
+ this.checkAgainstInheritedMethods(currentMethod, matchingInherited, index + 1); // pass in the length of matching
+ }
+ }
+
+ for (int i = 0, length = inherited.length; i < length; i++) {
+ while (index >= 0) matchingInherited[index--] = null; // clear the previous contents of the matching methods
+ MethodBinding inheritedMethod = inherited[i];
+ if (inheritedMethod != null) {
+ matchingInherited[++index] = inheritedMethod;
+ for (int j = i + 1; j < length; j++) {
+ if (inherited[j] != null && areParametersEqual(inheritedMethod, inherited[j])) {
+ matchingInherited[++index] = inherited[j];
+ inherited[j] = null; // do not want to find it again
+ }
+ }
+ }
+ if (index > 0)
+ this.checkInheritedMethods(matchingInherited, index + 1); // pass in the length of matching
+ else if (mustImplementAbstractMethods && index == 0 && matchingInherited[0].isAbstract())
+ checkAbstractMethod(matchingInherited[0]);
+ }
+ }
+}
+void checkPackagePrivateAbstractMethod(MethodBinding abstractMethod) {
+ // check that the inherited abstract method (package private visibility) is implemented within the same package
+ PackageBinding necessaryPackage = abstractMethod.declaringClass.fPackage;
+ if (necessaryPackage == this.type.fPackage) return; // not a problem
+
+ ReferenceBinding superType = this.type.superclass();
+ char[] selector = abstractMethod.selector;
+ do {
+ if (!superType.isValidBinding()) return;
+ if (!superType.isAbstract()) return; // closer non abstract super type will be flagged instead
+
+ if (necessaryPackage == superType.fPackage) {
+ MethodBinding[] methods = superType.getMethods(selector);
+ nextMethod : for (int m = methods.length; --m >= 0;) {
+ MethodBinding method = methods[m];
+ if (method.isPrivate() || method.isConstructor() || method.isDefaultAbstract())
+ continue nextMethod;
+ if (doesMethodOverride(method, abstractMethod))
+ return; // found concrete implementation of abstract method in same package
+ }
+ }
+ } while ((superType = superType.superclass()) != abstractMethod.declaringClass);
+
+ // non visible abstract methods cannot be overridden so the type must be defined abstract
+ this.problemReporter().abstractMethodCannotBeOverridden(this.type, abstractMethod);
+}
+/*
+Binding creation is responsible for reporting:
+ - all modifier problems (duplicates & multiple visibility modifiers + incompatible combinations)
+ - plus invalid modifiers given the context... examples:
+ - interface methods can only be public
+ - abstract methods can only be defined by abstract classes
+ - collisions... 2 methods with identical vmSelectors
+ - multiple methods with the same message pattern but different return types
+ - ambiguous, invisible or missing return/argument/exception types
+ - check the type of any array is not void
+ - check that each exception type is Throwable or a subclass of it
+*/
+void computeInheritedMethods() {
+ // only want to remember inheritedMethods that can have an impact on the current type
+ // if an inheritedMethod has been 'replaced' by a supertype's method then skip it
+
+ this.inheritedMethods = new HashtableOfObject(51); // maps method selectors to an array of methods... must search to match paramaters & return type
+ ReferenceBinding[][] interfacesToVisit = new ReferenceBinding[3][];
+ int lastPosition = -1;
+ ReferenceBinding[] itsInterfaces = type.superInterfaces();
+ if (itsInterfaces != NoSuperInterfaces)
+ interfacesToVisit[++lastPosition] = itsInterfaces;
+
+ ReferenceBinding superType = this.type.isClass()
+ ? this.type.superclass()
+ : this.type.scope.getJavaLangObject(); // check interface methods against Object
+ HashtableOfObject nonVisibleDefaultMethods = new HashtableOfObject(3); // maps method selectors to an array of methods
+ boolean allSuperclassesAreAbstract = true;
+
+ while (superType != null) {
+ if (superType.isValidBinding()) {
+ if (allSuperclassesAreAbstract) {
+ if (superType.isAbstract()) {
+ // only need to include superinterfaces if immediate superclasses are abstract
+ if ((itsInterfaces = superType.superInterfaces()) != NoSuperInterfaces) {
+ if (++lastPosition == interfacesToVisit.length)
+ System.arraycopy(interfacesToVisit, 0, interfacesToVisit = new ReferenceBinding[lastPosition * 2][], 0, lastPosition);
+ interfacesToVisit[lastPosition] = itsInterfaces;
+ }
+ } else {
+ allSuperclassesAreAbstract = false;
+ }
+ }
+
+ MethodBinding[] methods = superType.unResolvedMethods();
+ nextMethod : for (int m = methods.length; --m >= 0;) {
+ MethodBinding inheritedMethod = methods[m];
+ if (inheritedMethod.isPrivate() || inheritedMethod.isConstructor() || inheritedMethod.isDefaultAbstract())
+ continue nextMethod;
+ MethodBinding[] existingMethods = (MethodBinding[]) this.inheritedMethods.get(inheritedMethod.selector);
+ if (existingMethods != null) {
+ for (int i = 0, length = existingMethods.length; i < length; i++) {
+ if (doesMethodOverride(existingMethods[i], inheritedMethod)) {
+ if (inheritedMethod.isDefault() && inheritedMethod.isAbstract())
+ checkPackagePrivateAbstractMethod(inheritedMethod);
+ continue nextMethod;
+ }
+ }
+ }
+ MethodBinding[] nonVisible = (MethodBinding[]) nonVisibleDefaultMethods.get(inheritedMethod.selector);
+ if (nonVisible != null)
+ for (int i = 0, l = nonVisible.length; i < l; i++)
+ if (doesMethodOverride(nonVisible[i], inheritedMethod))
+ continue nextMethod;
+
+ if (!inheritedMethod.isDefault() || inheritedMethod.declaringClass.fPackage == type.fPackage) {
+ if (existingMethods == null) {
+ existingMethods = new MethodBinding[] {inheritedMethod};
+ } else {
+ int length = existingMethods.length;
+ System.arraycopy(existingMethods, 0, existingMethods = new MethodBinding[length + 1], 0, length);
+ existingMethods[length] = inheritedMethod;
+ }
+ this.inheritedMethods.put(inheritedMethod.selector, existingMethods);
+ } else {
+ if (nonVisible == null) {
+ nonVisible = new MethodBinding[] {inheritedMethod};
+ } else {
+ int length = nonVisible.length;
+ System.arraycopy(nonVisible, 0, nonVisible = new MethodBinding[length + 1], 0, length);
+ nonVisible[length] = inheritedMethod;
+ }
+ nonVisibleDefaultMethods.put(inheritedMethod.selector, nonVisible);
+
+ if (inheritedMethod.isAbstract() && !this.type.isAbstract()) // non visible abstract methods cannot be overridden so the type must be defined abstract
+ this.problemReporter().abstractMethodCannotBeOverridden(this.type, inheritedMethod);
+
+ MethodBinding[] current = (MethodBinding[]) this.currentMethods.get(inheritedMethod.selector);
+ if (current != null) { // non visible methods cannot be overridden so a warning is issued
+ foundMatch : for (int i = 0, length = current.length; i < length; i++) {
+ if (doesMethodOverride(current[i], inheritedMethod)) {
+ this.problemReporter().overridesPackageDefaultMethod(current[i], inheritedMethod);
+ break foundMatch;
+ }
+ }
+ }
+ }
+ }
+ superType = superType.superclass();
+ }
+ }
+
+ for (int i = 0; i <= lastPosition; i++) {
+ ReferenceBinding[] interfaces = interfacesToVisit[i];
+ for (int j = 0, l = interfaces.length; j < l; j++) {
+ superType = interfaces[j];
+ if ((superType.tagBits & InterfaceVisited) == 0) {
+ superType.tagBits |= InterfaceVisited;
+ if (superType.isValidBinding()) {
+ if ((itsInterfaces = superType.superInterfaces()) != NoSuperInterfaces) {
+ if (++lastPosition == interfacesToVisit.length)
+ System.arraycopy(interfacesToVisit, 0, interfacesToVisit = new ReferenceBinding[lastPosition * 2][], 0, lastPosition);
+ interfacesToVisit[lastPosition] = itsInterfaces;
+ }
+
+ MethodBinding[] methods = superType.unResolvedMethods();
+ nextMethod : for (int m = methods.length; --m >= 0;) { // Interface methods are all abstract public
+ MethodBinding inheritedMethod = methods[m];
+ MethodBinding[] existingMethods = (MethodBinding[]) this.inheritedMethods.get(inheritedMethod.selector);
+ if (existingMethods == null) {
+ existingMethods = new MethodBinding[] {inheritedMethod};
+ } else {
+ int length = existingMethods.length;
+ for (int e = 0; e < length; e++) {
+ MethodBinding existing = existingMethods[e];
+ // look to see if any of the existingMethods implement this inheritedMethod
+ if (areParametersEqual(existing, inheritedMethod) && existing.declaringClass.implementsInterface(superType, true))
+// so if the implemented method is abstract & has a different return type then did it get a bridge method?
+ continue nextMethod; // skip interface method with the same signature if visible to its declaringClass
+ }
+ System.arraycopy(existingMethods, 0, existingMethods = new MethodBinding[length + 1], 0, length);
+ existingMethods[length] = inheritedMethod;
+ }
+ this.inheritedMethods.put(inheritedMethod.selector, existingMethods);
+ }
+ }
+ }
+ }
+ }
+
+ // bit reinitialization
+ for (int i = 0; i <= lastPosition; i++) {
+ ReferenceBinding[] interfaces = interfacesToVisit[i];
+ for (int j = 0, length = interfaces.length; j < length; j++)
+ interfaces[j].tagBits &= ~InterfaceVisited;
+ }
+}
+void computeMethods() {
+ MethodBinding[] methods = type.methods();
+ int size = methods.length;
+ this.currentMethods = new HashtableOfObject(size == 0 ? 1 : size); // maps method selectors to an array of methods... must search to match paramaters & return type
+ for (int m = size; --m >= 0;) {
+ MethodBinding method = methods[m];
+ if (!(method.isConstructor() || method.isDefaultAbstract())) { // keep all methods which are NOT constructors or default abstract
+ MethodBinding[] existingMethods = (MethodBinding[]) this.currentMethods.get(method.selector);
+ if (existingMethods == null)
+ existingMethods = new MethodBinding[1];
+ else
+ System.arraycopy(existingMethods, 0,
+ (existingMethods = new MethodBinding[existingMethods.length + 1]), 0, existingMethods.length - 1);
+ existingMethods[existingMethods.length - 1] = method;
+ this.currentMethods.put(method.selector, existingMethods);
+ }
+ }
+}
+boolean doesMethodOverride(MethodBinding method, MethodBinding inheritedMethod) {
+ return areReturnTypesEqual(method, inheritedMethod) && areParametersEqual(method, inheritedMethod);
+}
+ReferenceBinding errorException() {
+ if (errorException == null)
+ this.errorException = this.type.scope.getJavaLangError();
+ return errorException;
+}
+boolean isAsVisible(MethodBinding newMethod, MethodBinding inheritedMethod) {
+ if (inheritedMethod.modifiers == newMethod.modifiers) return true;
+
+ if (newMethod.isPublic()) return true; // Covers everything
+ if (inheritedMethod.isPublic()) return false;
+
+ if (newMethod.isProtected()) return true;
+ if (inheritedMethod.isProtected()) return false;
+
+ return !newMethod.isPrivate(); // The inheritedMethod cannot be private since it would not be visible
+}
+boolean isSameClassOrSubclassOf(ReferenceBinding testClass, ReferenceBinding superclass) {
+ do {
+ if (testClass == superclass) return true;
+ } while ((testClass = testClass.superclass()) != null);
+ return false;
+}
+boolean mustImplementAbstractMethod(MethodBinding abstractMethod) {
+ // if the type's superclass is an abstract class, then all abstract methods must be implemented
+ // otherwise, skip it if the type's superclass must implement any of the inherited methods
+ ReferenceBinding superclass = this.type.superclass();
+ ReferenceBinding declaringClass = abstractMethod.declaringClass;
+ if (declaringClass.isClass()) {
+ while (superclass.isAbstract() && superclass != declaringClass)
+ superclass = superclass.superclass(); // find the first concrete superclass or the abstract declaringClass
+ } else {
+ if (this.type.implementsInterface(declaringClass, false)) {
+ if (this.type.isAbstract()) return false; // leave it for the subclasses
+ if (!superclass.implementsInterface(declaringClass, true)) // only if a superclass does not also implement the interface
+ return true;
+ }
+ while (superclass.isAbstract() && !superclass.implementsInterface(declaringClass, false))
+ superclass = superclass.superclass(); // find the first concrete superclass or the superclass which implements the interface
+ }
+ return superclass.isAbstract(); // if it is a concrete class then we have already reported problem against it
+}
+ProblemReporter problemReporter() {
+ return this.type.scope.problemReporter();
+}
+ProblemReporter problemReporter(MethodBinding currentMethod) {
+ ProblemReporter reporter = problemReporter();
+ if (currentMethod.declaringClass == type) // only report against the currentMethod if its implemented by the type
+ reporter.referenceContext = currentMethod.sourceMethod();
+ return reporter;
+}
+ReferenceBinding[] resolvedExceptionTypesFor(MethodBinding method) {
+ ReferenceBinding[] exceptions = method.thrownExceptions;
+ if ((method.modifiers & CompilerModifiers.AccUnresolved) == 0)
+ return exceptions;
+
+ if (!(method.declaringClass instanceof BinaryTypeBinding))
+ return TypeConstants.NoExceptions; // safety check
+
+ for (int i = exceptions.length; --i >= 0;)
+ exceptions[i] = BinaryTypeBinding.resolveType(exceptions[i], this.environment, true);
+ return exceptions;
+}
+ReferenceBinding runtimeException() {
+ if (runtimeException == null)
+ this.runtimeException = this.type.scope.getJavaLangRuntimeException();
+ return runtimeException;
+}
+void verify(SourceTypeBinding someType) {
+ this.type = someType;
+ this.computeMethods();
+ this.computeInheritedMethods();
+ this.checkMethods();
+}
+public String toString() {
+ StringBuffer buffer = new StringBuffer(10);
+ buffer.append("MethodVerifier for type: "); //$NON-NLS-1$
+ buffer.append(type.readableName());
+ buffer.append('\n');
+ buffer.append("\t-inherited methods: "); //$NON-NLS-1$
+ buffer.append(this.inheritedMethods);
+ return buffer.toString();
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/MethodVerifier15.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/MethodVerifier15.js
new file mode 100644
index 0000000..35a200b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/MethodVerifier15.js
@@ -0,0 +1,161 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.ast.MethodDeclaration;
+
+class MethodVerifier15 extends MethodVerifier {
+
+MethodVerifier15(LookupEnvironment environment) {
+ super(environment);
+}
+boolean areTypesEqual(TypeBinding one, TypeBinding two) {
+ return one == two || super.areTypesEqual(one.erasure(), two.erasure());
+}
+void checkAgainstInheritedMethods(MethodBinding currentMethod, MethodBinding[] methods, int length) {
+ // methods includes the inherited methods that the currentMethod must comply with
+ // likely only 1 but could be more if mutiple declared supertypes define the method (1 superclass & 1 to many declared interfaces)
+ nextMethod : for (int i = length; --i >= 0;) {
+ MethodBinding inheritedMethod = methods[i];
+ if (currentMethod.isStatic() != inheritedMethod.isStatic()) { // Cannot override a static method or hide an instance method
+ this.problemReporter(currentMethod).staticAndInstanceConflict(currentMethod, inheritedMethod);
+ continue nextMethod;
+ }
+
+ // curentMethod is always resolved as its defined by the source type BUT the inheritedMethod may not be
+ // so now with generics, the inheritedMethod should be resolved since we don't want to waste time dealing
+ // with Unresolved types over & over
+ if (inheritedMethod.declaringClass instanceof BinaryTypeBinding)
+ ((BinaryTypeBinding) inheritedMethod.declaringClass).resolveTypesFor(inheritedMethod);
+
+ // must check each parameter pair to see if you have raw to parameterized conversions
+ TypeBinding[] currentArgs = currentMethod.parameters;
+ TypeBinding[] inheritedArgs = inheritedMethod.parameters;
+ if (currentArgs != inheritedArgs) {
+ for (int j = 0, k = currentArgs.length; j < k; j++) {
+ TypeBinding currentArg = currentArgs[j].leafComponentType();
+ TypeBinding inheritedArg = inheritedArgs[j].leafComponentType();
+ if (currentArg != inheritedArg) {
+ if (currentArg.isParameterizedType() && hasBoundedParameters((ParameterizedTypeBinding) currentArg)) {
+ if (inheritedArg.isRawType()) {
+// if (inheritedArg.isRawType() || !inheritedArg.isEquivalentTo(currentArg)) {
+ this.problemReporter(currentMethod).methodNameClash(currentMethod, inheritedMethod);
+ continue nextMethod;
+ }
+ }
+ }
+ }
+ }
+
+ if (!currentMethod.isAbstract() && inheritedMethod.isAbstract()) {
+ if ((currentMethod.modifiers & CompilerModifiers.AccOverriding) == 0)
+ currentMethod.modifiers |= CompilerModifiers.AccImplementing;
+ } else {
+ currentMethod.modifiers |= CompilerModifiers.AccOverriding;
+ }
+
+ boolean addBridgeMethod = inheritedMethod.hasSubstitutedReturnType();
+ if (currentMethod.returnType != inheritedMethod.returnType) {
+ // can be [] of Class#RAW vs. Class<T>
+ if (!isReturnTypeSubstituable(currentMethod, inheritedMethod)) {
+ this.problemReporter(currentMethod).incompatibleReturnType(currentMethod, inheritedMethod);
+ continue nextMethod;
+ }
+
+ TypeBinding inheritedReturnType = inheritedMethod.returnType.leafComponentType();
+ TypeBinding returnType = currentMethod.returnType.leafComponentType();
+ if (inheritedReturnType.isRawType()) {
+ if (returnType.isParameterizedType() && hasBoundedParameters((ParameterizedTypeBinding) returnType)) {
+ this.problemReporter(currentMethod).methodNameClash(currentMethod, inheritedMethod);
+ continue nextMethod;
+ }
+ } else if (inheritedReturnType.isParameterizedType()) {
+ if (!returnType.isParameterizedType())
+ this.problemReporter(currentMethod).unsafeReturnTypeOverride(currentMethod, inheritedMethod, ((MethodDeclaration)currentMethod.sourceMethod()).returnType);
+ } else if (inheritedReturnType.isTypeVariable()) {
+ this.problemReporter(currentMethod).unsafeReturnTypeOverride(currentMethod, inheritedMethod, ((MethodDeclaration)currentMethod.sourceMethod()).returnType);
+ }
+ addBridgeMethod = true;
+ }
+
+ if (addBridgeMethod || inheritedMethod.hasSubstitutedParameters()) {
+ MethodBinding original = inheritedMethod.original();
+ if (!areReturnTypesEqual(original, currentMethod) || !areParametersEqual(original, currentMethod))
+ this.type.addSyntheticBridgeMethod(original, currentMethod);
+ }
+
+ if (currentMethod.thrownExceptions != NoExceptions)
+ this.checkExceptions(currentMethod, inheritedMethod);
+ if (inheritedMethod.isFinal())
+ this.problemReporter(currentMethod).finalMethodCannotBeOverridden(currentMethod, inheritedMethod);
+ if (!this.isAsVisible(currentMethod, inheritedMethod))
+ this.problemReporter(currentMethod).visibilityConflict(currentMethod, inheritedMethod);
+ if (environment.options.reportDeprecationWhenOverridingDeprecatedMethod && inheritedMethod.isViewedAsDeprecated()) {
+ if (!currentMethod.isViewedAsDeprecated() || environment.options.reportDeprecationInsideDeprecatedCode) {
+ // check against the other inherited methods to see if they hide this inheritedMethod
+ ReferenceBinding declaringClass = inheritedMethod.declaringClass;
+ if (declaringClass.isInterface())
+ for (int j = length; --j >= 0;)
+ if (i != j && methods[j].declaringClass.implementsInterface(declaringClass, false))
+ continue nextMethod;
+
+ this.problemReporter(currentMethod).overridesDeprecatedMethod(currentMethod, inheritedMethod);
+ }
+ }
+ }
+}
+boolean doesMethodOverride(MethodBinding method, MethodBinding inheritedMethod) {
+ return areParametersEqual(method, inheritedMethod) && isReturnTypeSubstituable(method, inheritedMethod);
+}
+boolean hasBoundedParameters(ParameterizedTypeBinding parameterizedType) {
+ TypeBinding[] arguments = parameterizedType.arguments;
+ if (arguments == null) return false;
+
+ nextArg : for (int i = 0, l = arguments.length; i < l; i++) {
+ if (arguments[i].isWildcard())
+ if (((WildcardBinding) arguments[i]).kind == org.eclipse.wst.jsdt.internal.compiler.ast.Wildcard.UNBOUND)
+ continue nextArg;
+ if (arguments[i].isTypeVariable())
+ if (((TypeVariableBinding) arguments[i]).firstBound == null)
+ continue nextArg;
+ return true;
+ }
+ return false;
+}
+boolean isReturnTypeSubstituable(MethodBinding one, MethodBinding two) {
+ if (one.returnType == two.returnType) return true;
+
+ return isTypeSubstituable(one.returnType.erasure(), two.returnType.erasure());
+}
+boolean isTypeSubstituable(TypeBinding one, TypeBinding two) {
+ if (one == two) return true;
+ if (one.isArrayType() || two.isArrayType()) {
+ if (one.isArrayType() != two.isArrayType()) return false;
+ ArrayBinding arrayOne = (ArrayBinding) one;
+ ArrayBinding arrayTwo = (ArrayBinding) two;
+ if (arrayOne.dimensions != arrayTwo.dimensions) return false;
+ one = arrayOne.leafComponentType;
+ two = arrayTwo.leafComponentType;
+ }
+ if (one.isBaseType() || two.isBaseType()) return false;
+
+ ReferenceBinding subType = (ReferenceBinding) one;
+ ReferenceBinding superType = (ReferenceBinding) two;
+ if (CharOperation.equals(subType.compoundName, superType.compoundName)) return true;
+
+ superType = BinaryTypeBinding.resolveType(superType, this.environment, true);
+ subType = BinaryTypeBinding.resolveType(subType, this.environment, true);
+ if (superType.isInterface())
+ return subType.implementsInterface(superType, true);
+ return subType.isClass() && isSameClassOrSubclassOf(subType, superType);
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/NestedTypeBinding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/NestedTypeBinding.js
new file mode 100644
index 0000000..d39fcef
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/NestedTypeBinding.js
@@ -0,0 +1,217 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+public class NestedTypeBinding extends SourceTypeBinding {
+
+ public SourceTypeBinding enclosingType;
+
+ public SyntheticArgumentBinding[] enclosingInstances;
+ public SyntheticArgumentBinding[] outerLocalVariables;
+ public int enclosingInstancesSlotSize; // amount of slots used by synthetic enclosing instances
+ public int outerLocalVariablesSlotSize; // amount of slots used by synthetic outer local variables
+
+ public NestedTypeBinding(char[][] typeName, ClassScope scope, SourceTypeBinding enclosingType) {
+ super(typeName, enclosingType.fPackage, scope);
+ this.tagBits |= IsNestedType;
+ this.enclosingType = enclosingType;
+ }
+
+ /* Add a new synthetic argument for <actualOuterLocalVariable>.
+ * Answer the new argument or the existing argument if one already existed.
+ */
+ public SyntheticArgumentBinding addSyntheticArgument(LocalVariableBinding actualOuterLocalVariable) {
+ SyntheticArgumentBinding synthLocal = null;
+
+ if (outerLocalVariables == null) {
+ synthLocal = new SyntheticArgumentBinding(actualOuterLocalVariable);
+ outerLocalVariables = new SyntheticArgumentBinding[] {synthLocal};
+ } else {
+ int size = outerLocalVariables.length;
+ int newArgIndex = size;
+ for (int i = size; --i >= 0;) { // must search backwards
+ if (outerLocalVariables[i].actualOuterLocalVariable == actualOuterLocalVariable)
+ return outerLocalVariables[i]; // already exists
+ if (outerLocalVariables[i].id > actualOuterLocalVariable.id)
+ newArgIndex = i;
+ }
+ SyntheticArgumentBinding[] synthLocals = new SyntheticArgumentBinding[size + 1];
+ System.arraycopy(outerLocalVariables, 0, synthLocals, 0, newArgIndex);
+ synthLocals[newArgIndex] = synthLocal = new SyntheticArgumentBinding(actualOuterLocalVariable);
+ System.arraycopy(outerLocalVariables, newArgIndex, synthLocals, newArgIndex + 1, size - newArgIndex);
+ outerLocalVariables = synthLocals;
+ }
+ //System.out.println("Adding synth arg for local var: " + new String(actualOuterLocalVariable.name) + " to: " + new String(this.readableName()));
+ if (scope.referenceCompilationUnit().isPropagatingInnerClassEmulation)
+ this.updateInnerEmulationDependents();
+ return synthLocal;
+ }
+
+ /* Add a new synthetic argument for <enclosingType>.
+ * Answer the new argument or the existing argument if one already existed.
+ */
+ public SyntheticArgumentBinding addSyntheticArgument(ReferenceBinding targetEnclosingType) {
+ SyntheticArgumentBinding synthLocal = null;
+ if (enclosingInstances == null) {
+ synthLocal = new SyntheticArgumentBinding(targetEnclosingType);
+ enclosingInstances = new SyntheticArgumentBinding[] {synthLocal};
+ } else {
+ int size = enclosingInstances.length;
+ int newArgIndex = size;
+ for (int i = size; --i >= 0;) {
+ if (enclosingInstances[i].type == targetEnclosingType)
+ return enclosingInstances[i]; // already exists
+ if (this.enclosingType() == targetEnclosingType)
+ newArgIndex = 0;
+ }
+ SyntheticArgumentBinding[] newInstances = new SyntheticArgumentBinding[size + 1];
+ System.arraycopy(enclosingInstances, 0, newInstances, newArgIndex == 0 ? 1 : 0, size);
+ newInstances[newArgIndex] = synthLocal = new SyntheticArgumentBinding(targetEnclosingType);
+ enclosingInstances = newInstances;
+ }
+ //System.out.println("Adding synth arg for enclosing type: " + new String(enclosingType.readableName()) + " to: " + new String(this.readableName()));
+ if (scope.referenceCompilationUnit().isPropagatingInnerClassEmulation)
+ this.updateInnerEmulationDependents();
+ return synthLocal;
+ }
+
+ /* Add a new synthetic argument and field for <actualOuterLocalVariable>.
+ * Answer the new argument or the existing argument if one already existed.
+ */
+ public SyntheticArgumentBinding addSyntheticArgumentAndField(LocalVariableBinding actualOuterLocalVariable) {
+ SyntheticArgumentBinding synthLocal = addSyntheticArgument(actualOuterLocalVariable);
+ if (synthLocal == null) return null;
+
+ if (synthLocal.matchingField == null)
+ synthLocal.matchingField = addSyntheticField(actualOuterLocalVariable);
+ return synthLocal;
+ }
+
+ /* Add a new synthetic argument and field for <enclosingType>.
+ * Answer the new argument or the existing argument if one already existed.
+ */
+ public SyntheticArgumentBinding addSyntheticArgumentAndField(ReferenceBinding targetEnclosingType) {
+ SyntheticArgumentBinding synthLocal = addSyntheticArgument(targetEnclosingType);
+ if (synthLocal == null) return null;
+
+ if (synthLocal.matchingField == null)
+ synthLocal.matchingField = addSyntheticField(targetEnclosingType);
+ return synthLocal;
+ }
+
+ /**
+ * Compute the resolved positions for all the synthetic arguments
+ */
+ final public void computeSyntheticArgumentSlotSizes() {
+
+ int slotSize = 0;
+ // insert enclosing instances first, followed by the outerLocals
+ int enclosingInstancesCount = this.enclosingInstances == null ? 0 : this.enclosingInstances.length;
+ for (int i = 0; i < enclosingInstancesCount; i++){
+ SyntheticArgumentBinding argument = this.enclosingInstances[i];
+ // position the enclosing instance synthetic arg
+ argument.resolvedPosition = slotSize + 1; // shift by 1 to leave room for aload0==this
+ if (slotSize + 1 > 0xFF) { // no more than 255 words of arguments
+ this.scope.problemReporter().noMoreAvailableSpaceForArgument(argument, this.scope.referenceType());
+ }
+ if ((argument.type == LongBinding) || (argument.type == DoubleBinding)){
+ slotSize += 2;
+ } else {
+ slotSize ++;
+ }
+ }
+ this.enclosingInstancesSlotSize = slotSize;
+
+ slotSize = 0; // reset, outer local are not positionned yet, since will be appended to user arguments
+ int outerLocalsCount = this.outerLocalVariables == null ? 0 : this.outerLocalVariables.length;
+ for (int i = 0; i < outerLocalsCount; i++){
+ SyntheticArgumentBinding argument = this.outerLocalVariables[i];
+ // do NOT position the outerlocal synthetic arg yet, since will be appended to user arguments
+ if ((argument.type == LongBinding) || (argument.type == DoubleBinding)){
+ slotSize += 2;
+ } else {
+ slotSize ++;
+ }
+ }
+ this.outerLocalVariablesSlotSize = slotSize;
+ }
+
+ /* Answer the receiver's enclosing type... null if the receiver is a top level type.
+ */
+ public ReferenceBinding enclosingType() {
+
+ return enclosingType;
+ }
+
+ /* Answer the synthetic argument for <actualOuterLocalVariable> or null if one does not exist.
+ */
+ public SyntheticArgumentBinding getSyntheticArgument(LocalVariableBinding actualOuterLocalVariable) {
+
+ if (outerLocalVariables == null) return null; // is null if no outer local variables are known
+
+ for (int i = outerLocalVariables.length; --i >= 0;)
+ if (outerLocalVariables[i].actualOuterLocalVariable == actualOuterLocalVariable)
+ return outerLocalVariables[i];
+ return null;
+ }
+
+ public SyntheticArgumentBinding[] syntheticEnclosingInstances() {
+ return enclosingInstances; // is null if no enclosing instances are required
+ }
+
+ public ReferenceBinding[] syntheticEnclosingInstanceTypes() {
+ if (enclosingInstances == null)
+ return null;
+
+ int length = enclosingInstances.length;
+ ReferenceBinding types[] = new ReferenceBinding[length];
+ for (int i = 0; i < length; i++)
+ types[i] = (ReferenceBinding) enclosingInstances[i].type;
+ return types;
+ }
+
+ public SyntheticArgumentBinding[] syntheticOuterLocalVariables() {
+
+ return outerLocalVariables; // is null if no outer locals are required
+ }
+
+ /*
+ * Trigger the dependency mechanism forcing the innerclass emulation
+ * to be propagated to all dependent source types.
+ */
+ public void updateInnerEmulationDependents() {
+ // nothing to do in general, only local types are doing anything
+ }
+
+ /* Answer the synthetic argument for <targetEnclosingType> or null if one does not exist.
+ */
+ public SyntheticArgumentBinding getSyntheticArgument(ReferenceBinding targetEnclosingType, boolean onlyExactMatch) {
+
+ if (enclosingInstances == null) return null; // is null if no enclosing instances are known
+
+ // exact match
+ for (int i = enclosingInstances.length; --i >= 0;)
+ if (enclosingInstances[i].type == targetEnclosingType)
+ if (enclosingInstances[i].actualOuterLocalVariable == null)
+ return enclosingInstances[i];
+
+ // type compatibility : to handle cases such as
+ // class T { class M{}}
+ // class S extends T { class N extends M {}} --> need to use S as a default enclosing instance for the super constructor call in N().
+ if (!onlyExactMatch){
+ for (int i = enclosingInstances.length; --i >= 0;)
+ if (enclosingInstances[i].actualOuterLocalVariable == null)
+ if (((ReferenceBinding)enclosingInstances[i].type).findSuperTypeErasingTo(targetEnclosingType) != null)
+ return enclosingInstances[i];
+ }
+ return null;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/PackageBinding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/PackageBinding.js
new file mode 100644
index 0000000..45b4497
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/PackageBinding.js
@@ -0,0 +1,197 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.util.HashtableOfPackage;
+import org.eclipse.wst.jsdt.internal.compiler.util.HashtableOfType;
+
+public class PackageBinding extends Binding implements TypeConstants {
+ public char[][] compoundName;
+ PackageBinding parent;
+ public LookupEnvironment environment;
+ HashtableOfType knownTypes;
+ HashtableOfPackage knownPackages;
+protected PackageBinding() {
+ // for creating problem package
+}
+public PackageBinding(char[][] compoundName, PackageBinding parent, LookupEnvironment environment) {
+ this.compoundName = compoundName;
+ this.parent = parent;
+ this.environment = environment;
+ this.knownTypes = null; // initialized if used... class counts can be very large 300-600
+ this.knownPackages = new HashtableOfPackage(3); // sub-package counts are typically 0-3
+}
+public PackageBinding(char[] topLevelPackageName, LookupEnvironment environment) {
+ this(new char[][] {topLevelPackageName}, null, environment);
+}
+/* Create the default package.
+*/
+
+public PackageBinding(LookupEnvironment environment) {
+ this(CharOperation.NO_CHAR_CHAR, null, environment);
+}
+private void addNotFoundPackage(char[] simpleName) {
+ knownPackages.put(simpleName, LookupEnvironment.TheNotFoundPackage);
+}
+private void addNotFoundType(char[] simpleName) {
+ if (knownTypes == null)
+ knownTypes = new HashtableOfType(25);
+ knownTypes.put(simpleName, LookupEnvironment.TheNotFoundType);
+}
+void addPackage(PackageBinding element) {
+ knownPackages.put(element.compoundName[element.compoundName.length - 1], element);
+}
+void addType(ReferenceBinding element) {
+ if (knownTypes == null)
+ knownTypes = new HashtableOfType(25);
+ knownTypes.put(element.compoundName[element.compoundName.length - 1], element);
+}
+/* API
+* Answer the receiver's binding type from Binding.BindingID.
+*/
+
+public final int bindingType() {
+ return PACKAGE;
+}
+private PackageBinding findPackage(char[] name) {
+ if (!environment.isPackage(this.compoundName, name))
+ return null;
+
+ char[][] subPkgCompoundName = CharOperation.arrayConcat(this.compoundName, name);
+ PackageBinding subPackageBinding = new PackageBinding(subPkgCompoundName, this, environment);
+ addPackage(subPackageBinding);
+ return subPackageBinding;
+}
+/* Answer the subpackage named name; ask the oracle for the package if its not in the cache.
+* Answer null if it could not be resolved.
+*
+* NOTE: This should only be used when we know there is NOT a type with the same name.
+*/
+
+PackageBinding getPackage(char[] name) {
+ PackageBinding binding = getPackage0(name);
+ if (binding != null) {
+ if (binding == LookupEnvironment.TheNotFoundPackage)
+ return null;
+ else
+ return binding;
+ }
+ if ((binding = findPackage(name)) != null)
+ return binding;
+
+ // not found so remember a problem package binding in the cache for future lookups
+ addNotFoundPackage(name);
+ return null;
+}
+/* Answer the subpackage named name if it exists in the cache.
+* Answer theNotFoundPackage if it could not be resolved the first time
+* it was looked up, otherwise answer null.
+*
+* NOTE: Senders must convert theNotFoundPackage into a real problem
+* package if its to returned.
+*/
+
+PackageBinding getPackage0(char[] name) {
+ return knownPackages.get(name);
+}
+/* Answer the type named name; ask the oracle for the type if its not in the cache.
+* Answer a NotVisible problem type if the type is not visible from the invocationPackage.
+* Answer null if it could not be resolved.
+*
+* NOTE: This should only be used by source types/scopes which know there is NOT a
+* package with the same name.
+*/
+
+ReferenceBinding getType(char[] name) {
+ ReferenceBinding typeBinding = getType0(name);
+ if (typeBinding == null) {
+ if ((typeBinding = environment.askForType(this, name)) == null) {
+ // not found so remember a problem type binding in the cache for future lookups
+ addNotFoundType(name);
+ return null;
+ }
+ }
+
+ if (typeBinding == LookupEnvironment.TheNotFoundType)
+ return null;
+
+ typeBinding = BinaryTypeBinding.resolveType(typeBinding, environment, false); // no raw conversion for now
+ if (typeBinding.isNestedType())
+ return new ProblemReferenceBinding(name, InternalNameProvided);
+ return typeBinding;
+}
+/* Answer the type named name if it exists in the cache.
+* Answer theNotFoundType if it could not be resolved the first time
+* it was looked up, otherwise answer null.
+*
+* NOTE: Senders must convert theNotFoundType into a real problem
+* reference type if its to returned.
+*/
+
+ReferenceBinding getType0(char[] name) {
+ if (knownTypes == null)
+ return null;
+ return knownTypes.get(name);
+}
+/* Answer the package or type named name; ask the oracle if it is not in the cache.
+* Answer null if it could not be resolved.
+*
+* When collisions exist between a type name & a package name, answer the type.
+* Treat the package as if it does not exist... a problem was already reported when the type was defined.
+*
+* NOTE: no visibility checks are performed.
+* THIS SHOULD ONLY BE USED BY SOURCE TYPES/SCOPES.
+*/
+
+public Binding getTypeOrPackage(char[] name) {
+ ReferenceBinding typeBinding = getType0(name);
+ if (typeBinding != null && typeBinding != LookupEnvironment.TheNotFoundType) {
+ typeBinding = BinaryTypeBinding.resolveType(typeBinding, environment, false); // no raw conversion for now
+ if (typeBinding.isNestedType())
+ return new ProblemReferenceBinding(name, InternalNameProvided);
+ return typeBinding;
+ }
+
+ PackageBinding packageBinding = getPackage0(name);
+ if (packageBinding != null && packageBinding != LookupEnvironment.TheNotFoundPackage)
+ return packageBinding;
+
+ if (typeBinding == null) { // have not looked for it before
+ if ((typeBinding = environment.askForType(this, name)) != null) {
+ if (typeBinding.isNestedType())
+ return new ProblemReferenceBinding(name, InternalNameProvided);
+ return typeBinding;
+ }
+
+ // Since name could not be found, add a problem binding
+ // to the collections so it will be reported as an error next time.
+ addNotFoundType(name);
+ }
+
+ if (packageBinding == null) { // have not looked for it before
+ if ((packageBinding = findPackage(name)) != null)
+ return packageBinding;
+ addNotFoundPackage(name);
+ }
+
+ return null;
+}
+public char[] readableName() /*java.lang*/ {
+ return CharOperation.concatWith(compoundName, '.');
+}
+public String toString() {
+ if (compoundName == CharOperation.NO_CHAR_CHAR)
+ return "The Default Package"; //$NON-NLS-1$
+ else
+ return "package " + ((compoundName != null) ? CharOperation.toString(compoundName) : "UNNAMED"); //$NON-NLS-1$ //$NON-NLS-2$
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ParameterizedFieldBinding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ParameterizedFieldBinding.js
new file mode 100644
index 0000000..bb44131
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ParameterizedFieldBinding.js
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import org.eclipse.wst.jsdt.internal.compiler.impl.Constant;
+
+/**
+ * Binding denoting a field after type substitution got performed.
+ * On parameterized type bindings, all fields got substituted, regardless whether
+ * their signature did involve generics or not, so as to get the proper declaringClass for
+ * these fields.
+ */
+public class ParameterizedFieldBinding extends FieldBinding {
+
+ public FieldBinding originalField;
+
+ public ParameterizedFieldBinding(ParameterizedTypeBinding parameterizedDeclaringClass, FieldBinding originalField) {
+ super (
+ originalField.name,
+ originalField.isStatic() ? originalField.type : parameterizedDeclaringClass.substitute(originalField.type),
+ originalField.modifiers,
+ parameterizedDeclaringClass,
+ null);
+ this.originalField = originalField;
+ }
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.VariableBinding#constant()
+ */
+ public Constant constant() {
+ return this.originalField.constant();
+ }
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.VariableBinding#isConstantValue()
+ */
+ public boolean isConstantValue() {
+ return this.originalField.isConstantValue();
+ }
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.FieldBinding#original()
+ */
+ public FieldBinding original() {
+ return this.originalField.original();
+ }
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.VariableBinding#constant()
+ */
+ public void setConstant(Constant constant) {
+ this.originalField.setConstant(constant);
+ }
+}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.js
new file mode 100644
index 0000000..22bf914
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.js
@@ -0,0 +1,232 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.eclipse.wst.jsdt.internal.compiler.ast.MessageSend;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Wildcard;
+
+/**
+ * Binding denoting a generic method after type parameter substitutions got performed.
+ * On parameterized type bindings, all methods got substituted, regardless whether
+ * their signature did involve generics or not, so as to get the proper declaringClass for
+ * these methods.
+ */
+public class ParameterizedGenericMethodBinding extends ParameterizedMethodBinding implements Substitution {
+
+ public TypeBinding[] typeArguments;
+ private LookupEnvironment environment;
+ public boolean inferredReturnType;
+
+ /**
+ * Create method of parameterized type, substituting original parameters with type arguments.
+ */
+ public ParameterizedGenericMethodBinding(MethodBinding originalMethod, TypeBinding[] typeArguments, LookupEnvironment environment) {
+
+ this.environment = environment;
+ this.modifiers = originalMethod.modifiers;
+ this.selector = originalMethod.selector;
+ this.declaringClass = originalMethod.declaringClass;
+ this.typeVariables = NoTypeVariables;
+ this.typeArguments = typeArguments;
+ this.originalMethod = originalMethod;
+ this.parameters = Scope.substitute(this, originalMethod.parameters);
+ this.thrownExceptions = Scope.substitute(this, originalMethod.thrownExceptions);
+ this.returnType = this.substitute(originalMethod.returnType);
+ }
+ /**
+ * Create raw generic method for raw type (double substitution from type vars with raw type arguments, and erasure of method variables)
+ */
+ public ParameterizedGenericMethodBinding(MethodBinding originalMethod, RawTypeBinding rawType, LookupEnvironment environment) {
+
+ TypeVariableBinding[] originalVariables = originalMethod.typeVariables;
+ int length = originalVariables.length;
+ TypeBinding[] rawArguments = new TypeBinding[length];
+ for (int i = 0; i < length; i++) {
+ rawArguments[i] = originalVariables[i].erasure();
+ }
+ this.environment = environment;
+ this.modifiers = originalMethod.modifiers;
+ this.selector = originalMethod.selector;
+ this.declaringClass = rawType;
+ this.typeVariables = NoTypeVariables;
+ this.typeArguments = rawArguments;
+ this.originalMethod = originalMethod;
+ boolean isStatic = originalMethod.isStatic();
+ this.parameters = Scope.substitute(this,
+ isStatic ? originalMethod.parameters : Scope.substitute(rawType, originalMethod.parameters));
+ this.thrownExceptions = Scope.substitute(this,
+ isStatic ? originalMethod.thrownExceptions : Scope.substitute(rawType, originalMethod.thrownExceptions));
+ this.returnType = this.substitute(isStatic ? originalMethod.returnType : rawType.substitute(originalMethod.returnType));
+ }
+
+ /**
+ * Perform inference of generic method type parameters and/or expected type
+ */
+ public static MethodBinding computeCompatibleMethod(MethodBinding originalMethod, TypeBinding[] arguments, Scope scope, InvocationSite invocationSite) {
+
+ ParameterizedGenericMethodBinding methodSubstitute;
+ TypeVariableBinding[] typeVariables = originalMethod.typeVariables;
+ TypeBinding[] substitutes = invocationSite.genericTypeArguments();
+
+ if (substitutes != null) {
+ if (substitutes.length != typeVariables.length) {
+ // incompatible due to wrong arity
+ return new ProblemMethodBinding(originalMethod, originalMethod.selector, substitutes, TypeParameterArityMismatch);
+ }
+ methodSubstitute = new ParameterizedGenericMethodBinding(originalMethod, substitutes, scope.environment());
+ } else {
+ // perform type inference based on argument types and expected type
+
+ // collect substitutes by pattern matching parameters and arguments
+ int argLength = arguments.length;
+ TypeBinding[] parameters = originalMethod.parameters;
+ int varLength = typeVariables.length;
+ HashMap collectedSubstitutes = new HashMap(varLength);
+ for (int i = 0; i < varLength; i++)
+ collectedSubstitutes.put(typeVariables[i], new TypeBinding[1]);
+ for (int i = 0; i < argLength; i++)
+ parameters[i].collectSubstitutes(arguments[i], collectedSubstitutes);
+ substitutes = new TypeBinding[varLength];
+ boolean needReturnTypeInference = false;
+ for (int i = 0; i < varLength; i++) {
+ TypeBinding[] variableSubstitutes = (TypeBinding[]) collectedSubstitutes.get(typeVariables[i]);
+ TypeBinding mostSpecificSubstitute = scope.lowerUpperBound(variableSubstitutes);
+ //TypeBinding mostSpecificSubstitute = scope.mostSpecificCommonType(variableSubstitutes);
+ if (mostSpecificSubstitute == null)
+ return null; // incompatible
+ if (mostSpecificSubstitute == VoidBinding) {
+ needReturnTypeInference = true;
+ mostSpecificSubstitute = typeVariables[i];
+ }
+ substitutes[i] = mostSpecificSubstitute;
+ }
+ // apply inferred variable substitutions
+ methodSubstitute = new ParameterizedGenericMethodBinding(originalMethod, substitutes, scope.environment());
+
+ if (needReturnTypeInference && invocationSite instanceof MessageSend) {
+ MessageSend message = (MessageSend) invocationSite;
+ TypeBinding expectedType = message.expectedType;
+ if (expectedType != null)
+ methodSubstitute.inferFromExpectedType(message.expectedType, scope);
+ }
+ }
+ // check bounds
+ for (int i = 0, length = typeVariables.length; i < length; i++) {
+ TypeVariableBinding typeVariable = typeVariables[i];
+ if (!typeVariable.boundCheck(methodSubstitute, substitutes[i]))
+ // incompatible due to bound check
+ return new ProblemMethodBinding(methodSubstitute, originalMethod.selector, new TypeBinding[]{substitutes[i], typeVariables[i] }, ParameterBoundMismatch);
+ }
+
+ return methodSubstitute;
+ }
+
+ public void inferFromExpectedType(TypeBinding expectedType, Scope scope) {
+ if (this.returnType == expectedType)
+ return;
+ if ((this.returnType.tagBits & TagBits.HasTypeVariable) == 0)
+ return;
+ Map substitutes = new HashMap(1);
+ int length = this.typeArguments.length;
+ TypeVariableBinding[] originalVariables = this.original().typeVariables;
+ boolean hasUnboundParameters = false;
+ for (int i = 0; i < length; i++) {
+ if (this.typeArguments[i] == originalVariables[i]) {
+ hasUnboundParameters = true;
+ substitutes.put(originalVariables[i], new TypeBinding[1]);
+ } else {
+ substitutes.put(originalVariables[i], new TypeBinding[] { this.typeArguments[i] });
+ }
+ }
+ if (!hasUnboundParameters)
+ return;
+ returnType.collectSubstitutes(expectedType, substitutes);
+ for (int i = 0; i < length; i++) {
+ TypeBinding[] variableSubstitutes = (TypeBinding[]) substitutes.get(originalVariables[i]);
+ TypeBinding mostSpecificSubstitute = scope.lowerUpperBound(variableSubstitutes);
+ //TypeBinding mostSpecificSubstitute = scope.mostSpecificCommonType(variableSubstitutes);
+ if (mostSpecificSubstitute == null) {
+ return; // TODO (philippe) should report no way to infer type
+ }
+ if (mostSpecificSubstitute != VoidBinding)
+ this.typeArguments[i] = mostSpecificSubstitute;
+ }
+ TypeBinding oldReturnType = this.returnType;
+ this.returnType = this.substitute(this.returnType);
+ this.inferredReturnType = this.returnType != oldReturnType;
+ this.parameters = Scope.substitute(this, this.parameters);
+ this.thrownExceptions = Scope.substitute(this, this.thrownExceptions);
+ }
+
+ /**
+ * Returns a type, where original type was substituted using the receiver
+ * parameterized method.
+ */
+ public TypeBinding substitute(TypeBinding originalType) {
+
+ if ((originalType.tagBits & TagBits.HasTypeVariable) != 0) {
+ if (originalType.isTypeVariable()) {
+ TypeVariableBinding originalVariable = (TypeVariableBinding) originalType;
+ TypeVariableBinding[] variables = this.originalMethod.typeVariables;
+ int length = variables.length;
+ // check this variable can be substituted given parameterized type
+ if (originalVariable.rank < length && variables[originalVariable.rank] == originalVariable) {
+ return this.typeArguments[originalVariable.rank];
+ }
+ } else if (originalType.isParameterizedType()) {
+ ParameterizedTypeBinding originalParameterizedType = (ParameterizedTypeBinding) originalType;
+ TypeBinding[] originalArguments = originalParameterizedType.arguments;
+ TypeBinding[] substitutedArguments = Scope.substitute(this, originalArguments);
+ if (substitutedArguments != originalArguments) {
+ identicalVariables: { // if substituted with original variables, then answer the generic type itself
+ TypeVariableBinding[] originalVariables = originalParameterizedType.type.typeVariables();
+ for (int i = 0, length = originalVariables.length; i < length; i++) {
+ if (substitutedArguments[i] != originalVariables[i]) break identicalVariables;
+ }
+ return originalParameterizedType.type;
+ }
+ return this.environment.createParameterizedType(
+ originalParameterizedType.type, substitutedArguments, originalParameterizedType.enclosingType());
+ }
+ } else if (originalType.isArrayType()) {
+ TypeBinding originalLeafComponentType = originalType.leafComponentType();
+ TypeBinding substitute = substitute(originalLeafComponentType); // substitute could itself be array type
+ if (substitute != originalLeafComponentType) {
+ return this.environment.createArrayType(substitute.leafComponentType(), substitute.dimensions() + originalType.dimensions());
+ }
+ } else if (originalType.isWildcard()) {
+ WildcardBinding wildcard = (WildcardBinding) originalType;
+ if (wildcard.kind != Wildcard.UNBOUND) {
+ TypeBinding originalBound = wildcard.bound;
+ TypeBinding substitutedBound = substitute(originalBound);
+ if (substitutedBound != originalBound) {
+ return this.environment.createWildcard(wildcard.genericType, wildcard.rank, substitutedBound, wildcard.kind);
+ }
+ }
+ }
+ } else if (originalType.isGenericType()) {
+ // treat as if parameterized with its type variables
+ ReferenceBinding originalGenericType = (ReferenceBinding) originalType;
+ TypeVariableBinding[] originalVariables = originalGenericType.typeVariables();
+ int length = originalVariables.length;
+ TypeBinding[] originalArguments;
+ System.arraycopy(originalVariables, 0, originalArguments = new TypeBinding[length], 0, length);
+ TypeBinding[] substitutedArguments = Scope.substitute(this, originalArguments);
+ if (substitutedArguments != originalArguments) {
+ return this.environment.createParameterizedType(
+ originalGenericType, substitutedArguments, null);
+ }
+ }
+ return originalType;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ParameterizedMethodBinding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ParameterizedMethodBinding.js
new file mode 100644
index 0000000..ab3d28c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ParameterizedMethodBinding.js
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import org.eclipse.wst.jsdt.internal.compiler.ast.Wildcard;
+
+/**
+ * Binding denoting a method after type parameter substitutions got performed.
+ * On parameterized type bindings, all methods got substituted, regardless whether
+ * their signature did involve generics or not, so as to get the proper declaringClass for
+ * these methods.
+ */
+public class ParameterizedMethodBinding extends MethodBinding {
+
+ protected MethodBinding originalMethod;
+
+ /**
+ * Create method of parameterized type, substituting original parameters/exception/return type with type arguments.
+ */
+ public ParameterizedMethodBinding(ParameterizedTypeBinding parameterizedDeclaringClass, MethodBinding originalMethod, boolean isStatic) {
+
+ super(
+ originalMethod.modifiers,
+ originalMethod.selector,
+ isStatic // no substitution if original was static
+ ? originalMethod.returnType
+ : parameterizedDeclaringClass.substitute(originalMethod.returnType),
+ isStatic // no substitution if original was static
+ ? originalMethod.parameters
+ : Scope.substitute(parameterizedDeclaringClass, originalMethod.parameters),
+ isStatic // no substitution if original was static
+ ? originalMethod.thrownExceptions
+ : Scope.substitute(parameterizedDeclaringClass, originalMethod.thrownExceptions),
+ parameterizedDeclaringClass);
+ this.originalMethod = originalMethod;
+ this.typeVariables = originalMethod.typeVariables;
+ }
+
+ public ParameterizedMethodBinding() {
+ // no init
+ }
+
+ /**
+ * The type of x.getClass() is substituted from 'Class<? extends Object>' into: 'Class<? extends |X|> where |X| is X's erasure.
+ */
+ public static ParameterizedMethodBinding instantiateGetClass(TypeBinding receiverType, MethodBinding originalMethod, Scope scope) {
+ ParameterizedMethodBinding method = new ParameterizedMethodBinding();
+ method.modifiers = originalMethod.modifiers;
+ method.selector = originalMethod.selector;
+ method.declaringClass = originalMethod.declaringClass;
+ method.typeVariables = NoTypeVariables;
+ method.originalMethod = originalMethod;
+ method.parameters = originalMethod.parameters;
+ method.thrownExceptions = originalMethod.thrownExceptions;
+ ReferenceBinding genericClassType = scope.getJavaLangClass();
+ method.returnType = scope.createParameterizedType(
+ genericClassType,
+ new TypeBinding[] { scope.environment().createWildcard(genericClassType, 0, receiverType.erasure(), Wildcard.EXTENDS) },
+ null);
+ return method;
+ }
+
+ /**
+ * Returns true if some parameters got substituted.
+ */
+ public boolean hasSubstitutedParameters() {
+ return this.parameters != originalMethod.parameters;
+ }
+
+ /**
+ * Returns true if the return type got substituted.
+ */
+ public boolean hasSubstitutedReturnType() {
+ return this.returnType != originalMethod.returnType;
+ }
+
+ /**
+ * Returns the original method (as opposed to parameterized instances)
+ */
+ public MethodBinding original() {
+ return this.originalMethod.original();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ParameterizedTypeBinding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ParameterizedTypeBinding.js
new file mode 100644
index 0000000..8766a7d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ParameterizedTypeBinding.js
@@ -0,0 +1,787 @@
+/*******************************************************************************
+ * Copyright (c) 2000-2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import java.util.Map;
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.ast.ConstructorDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Wildcard;
+
+/**
+ * A parameterized type encapsulates a type with type arguments,
+ */
+public class ParameterizedTypeBinding extends ReferenceBinding implements Substitution {
+
+ public ReferenceBinding type;
+ public TypeBinding[] arguments;
+ public LookupEnvironment environment;
+ public char[] genericTypeSignature;
+ public ReferenceBinding superclass;
+ public ReferenceBinding[] superInterfaces;
+ public FieldBinding[] fields;
+ public ReferenceBinding[] memberTypes;
+ public MethodBinding[] methods;
+ private ReferenceBinding enclosingType;
+
+ public ParameterizedTypeBinding(ReferenceBinding type, TypeBinding[] arguments, ReferenceBinding enclosingType, LookupEnvironment environment){
+ this.environment = environment;
+ if (type.isParameterizedType() && type.isMemberType()) { // fixup instance of parameterized member type, e.g. Map<K,V>.Entry + <A,B>
+ enclosingType = type.enclosingType(); // use enclosing from previously parameterized
+ type = (ReferenceBinding)type.erasure(); // connect to erasure of member type
+ }
+ initialize(type, arguments);
+ this.enclosingType = enclosingType; // never unresolved, never lazy per construction
+
+ if (type instanceof UnresolvedReferenceBinding)
+ ((UnresolvedReferenceBinding) type).addWrapper(this);
+ if (arguments != null) {
+ for (int i = 0, l = arguments.length; i < l; i++)
+ if (arguments[i] instanceof UnresolvedReferenceBinding)
+ ((UnresolvedReferenceBinding) arguments[i]).addWrapper(this);
+ }
+ }
+
+ /**
+ * Collect the substitutes into a map for certain type variables inside the receiver type
+ * e.g. Collection<T>.findSubstitute(T, Collection<List<X>>): T --> List<X>
+ */
+ public void collectSubstitutes(TypeBinding otherType, Map substitutes) {
+ if (this.arguments == null) return;
+ if (otherType instanceof ReferenceBinding) {
+ // allow List<T> to match with LinkedList<String>
+ ReferenceBinding otherEquivalent = ((ReferenceBinding)otherType).findSuperTypeErasingTo((ReferenceBinding)this.type.erasure());
+ if (otherEquivalent != null && otherEquivalent.isParameterizedType()) {
+ ParameterizedTypeBinding otherParameterizedType = (ParameterizedTypeBinding) otherEquivalent;
+ for (int i = 0, length = this.arguments.length; i < length; i++) {
+ this.arguments[i].collectSubstitutes(otherParameterizedType.arguments[i], substitutes);
+ }
+ }
+ }
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding#computeId()
+ */
+ public void computeId() {
+ this.id = NoId;
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding#constantPoolName()
+ */
+ public char[] constantPoolName() {
+ return this.type.constantPoolName(); // erasure
+ }
+
+ public ParameterizedMethodBinding createParameterizedMethod(MethodBinding originalMethod) {
+ return new ParameterizedMethodBinding(this, originalMethod, originalMethod.isStatic());
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding#debugName()
+ */
+ public String debugName() {
+ StringBuffer nameBuffer = new StringBuffer(10);
+ nameBuffer.append(this.type.sourceName());
+ if (this.arguments != null) {
+ nameBuffer.append('<');
+ for (int i = 0, length = this.arguments.length; i < length; i++) {
+ if (i > 0) nameBuffer.append(',');
+ nameBuffer.append(this.arguments[i].debugName());
+ }
+ nameBuffer.append('>');
+ }
+ return nameBuffer.toString();
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding#enclosingType()
+ */
+ public ReferenceBinding enclosingType() {
+ if (this.isMemberType() && this.enclosingType == null) {
+ ReferenceBinding originalEnclosing = this.type.enclosingType();
+ this.enclosingType = originalEnclosing.isGenericType()
+ ? this.environment.createRawType(originalEnclosing, null) // TODO (need to propagate in depth on enclosing type)
+ : originalEnclosing;
+ }
+ return this.enclosingType;
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding#erasure()
+ */
+ public TypeBinding erasure() {
+ return this.type.erasure(); // erasure
+ }
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding#fieldCount()
+ */
+ public int fieldCount() {
+ return this.type.fieldCount(); // same as erasure (lazy)
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding#fields()
+ */
+ public FieldBinding[] fields() {
+ if (this.fields == null) {
+ try {
+ FieldBinding[] originalFields = this.type.fields();
+ int length = originalFields.length;
+ FieldBinding[] parameterizedFields = new FieldBinding[length];
+ for (int i = 0; i < length; i++)
+ // substitute all fields, so as to get updated declaring class at least
+ parameterizedFields[i] = new ParameterizedFieldBinding(this, originalFields[i]);
+ this.fields = parameterizedFields;
+ } finally {
+ // if the original fields cannot be retrieved (ex. AbortCompilation), then assume we do not have any fields
+ if (this.fields == null)
+ this.fields = NoFields;
+ }
+ }
+ return this.fields;
+ }
+
+ /**
+ * Ltype<param1 ... paremN>;
+ * LY<TT;>;
+ */
+ public char[] genericTypeSignature() {
+ if (this.genericTypeSignature == null) {
+ StringBuffer sig = new StringBuffer(10);
+ if (this.isMemberType() && this.enclosingType().isParameterizedType()) {
+ char[] typeSig = this.enclosingType().genericTypeSignature();
+ for (int i = 0; i < typeSig.length-1; i++) sig.append(typeSig[i]); // copy all but trailing semicolon
+ sig.append('.').append(this.sourceName());
+ } else {
+ char[] typeSig = this.type.signature();
+ for (int i = 0; i < typeSig.length-1; i++) sig.append(typeSig[i]); // copy all but trailing semicolon
+ }
+ if (this.arguments != null) {
+ sig.append('<');
+ for (int i = 0, length = this.arguments.length; i < length; i++) {
+ sig.append(this.arguments[i].genericTypeSignature());
+ }
+ sig.append('>'); //$NON-NLS-1$
+ }
+ sig.append(';');
+ int sigLength = sig.length();
+ this.genericTypeSignature = new char[sigLength];
+ sig.getChars(0, sigLength, this.genericTypeSignature, 0);
+ }
+ return this.genericTypeSignature;
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding#getExactConstructor(TypeBinding[])
+ */
+ public MethodBinding getExactConstructor(TypeBinding[] argumentTypes) {
+ int argCount = argumentTypes.length;
+
+ if ((modifiers & AccUnresolved) == 0) { // have resolved all arg types & return type of the methods
+ nextMethod : for (int m = methods.length; --m >= 0;) {
+ MethodBinding method = methods[m];
+ if (method.selector == ConstructorDeclaration.ConstantPoolName && method.parameters.length == argCount) {
+ TypeBinding[] toMatch = method.parameters;
+ for (int p = 0; p < argCount; p++)
+ if (toMatch[p] != argumentTypes[p])
+ continue nextMethod;
+ return method;
+ }
+ }
+ } else {
+ MethodBinding[] constructors = getMethods(ConstructorDeclaration.ConstantPoolName); // takes care of duplicates & default abstract methods
+ nextConstructor : for (int c = constructors.length; --c >= 0;) {
+ MethodBinding constructor = constructors[c];
+ TypeBinding[] toMatch = constructor.parameters;
+ if (toMatch.length == argCount) {
+ for (int p = 0; p < argCount; p++)
+ if (toMatch[p] != argumentTypes[p])
+ continue nextConstructor;
+ return constructor;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding#getExactMethod(char[], TypeBinding[])
+ */
+ public MethodBinding getExactMethod(char[] selector, TypeBinding[] argumentTypes, CompilationUnitScope refScope) {
+ if (refScope != null)
+ refScope.recordTypeReference(this);
+
+ int argCount = argumentTypes.length;
+ int selectorLength = selector.length;
+ boolean foundNothing = true;
+ MethodBinding match = null;
+
+ if ((modifiers & AccUnresolved) == 0) { // have resolved all arg types & return type of the methods
+ nextMethod : for (int m = methods.length; --m >= 0;) {
+ MethodBinding method = methods[m];
+ if (method.selector.length == selectorLength && CharOperation.equals(method.selector, selector)) {
+ foundNothing = false; // inner type lookups must know that a method with this name exists
+ if (method.parameters.length == argCount) {
+ TypeBinding[] toMatch = method.parameters;
+ for (int p = 0; p < argCount; p++)
+ if (toMatch[p] != argumentTypes[p])
+ continue nextMethod;
+ if (match != null) return null; // collision case
+ match = method;
+ }
+ }
+ }
+ } else {
+ MethodBinding[] matchingMethods = getMethods(selector); // takes care of duplicates & default abstract methods
+ foundNothing = matchingMethods == NoMethods;
+ nextMethod : for (int m = matchingMethods.length; --m >= 0;) {
+ MethodBinding method = matchingMethods[m];
+ TypeBinding[] toMatch = method.parameters;
+ if (toMatch.length == argCount) {
+ for (int p = 0; p < argCount; p++)
+ if (toMatch[p] != argumentTypes[p])
+ continue nextMethod;
+ if (match != null) return null; // collision case
+ match = method;
+ }
+ }
+ }
+ if (match != null) return match;
+
+ if (foundNothing) {
+ if (isInterface()) {
+ if (superInterfaces().length == 1)
+ return superInterfaces[0].getExactMethod(selector, argumentTypes, refScope);
+ } else if (superclass() != null) {
+ return superclass.getExactMethod(selector, argumentTypes, refScope);
+ }
+ }
+ return null;
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding#getField(char[], boolean)
+ */
+ public FieldBinding getField(char[] fieldName, boolean needResolve) {
+ fields(); // ensure fields have been initialized... must create all at once unlike methods
+ int fieldLength = fieldName.length;
+ for (int i = fields.length; --i >= 0;) {
+ FieldBinding field = fields[i];
+ if (field.name.length == fieldLength && CharOperation.equals(field.name, fieldName))
+ return field;
+ }
+ return null;
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding#getMemberType(char[])
+ */
+ public ReferenceBinding getMemberType(char[] typeName) {
+ memberTypes(); // ensure memberTypes have been initialized... must create all at once unlike methods
+ int typeLength = typeName.length;
+ for (int i = this.memberTypes.length; --i >= 0;) {
+ ReferenceBinding memberType = this.memberTypes[i];
+ if (memberType.sourceName.length == typeLength && CharOperation.equals(memberType.sourceName, typeName))
+ return memberType;
+ }
+ return null;
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding#getMethods(char[])
+ */
+ public MethodBinding[] getMethods(char[] selector) {
+ java.util.ArrayList matchingMethods = null;
+ if (this.methods != null) {
+ int selectorLength = selector.length;
+ for (int i = 0, length = this.methods.length; i < length; i++) {
+ MethodBinding method = methods[i];
+ if (method.selector.length == selectorLength && CharOperation.equals(method.selector, selector)) {
+ if (matchingMethods == null)
+ matchingMethods = new java.util.ArrayList(2);
+ matchingMethods.add(method);
+ }
+ }
+ if (matchingMethods != null) {
+ MethodBinding[] result = new MethodBinding[matchingMethods.size()];
+ matchingMethods.toArray(result);
+ return result;
+ }
+ }
+ if ((modifiers & AccUnresolved) == 0) return NoMethods; // have created all the methods and there are no matches
+
+ MethodBinding[] parameterizedMethods = null;
+ try {
+ MethodBinding[] originalMethods = this.type.getMethods(selector);
+ int length = originalMethods.length;
+ if (length == 0) return NoMethods;
+
+ parameterizedMethods = new MethodBinding[length];
+ for (int i = 0; i < length; i++)
+ // substitute methods, so as to get updated declaring class at least
+ parameterizedMethods[i] = createParameterizedMethod(originalMethods[i]);
+ if (this.methods == null) {
+ this.methods = parameterizedMethods;
+ } else {
+ MethodBinding[] temp = new MethodBinding[length + this.methods.length];
+ System.arraycopy(parameterizedMethods, 0, temp, 0, length);
+ System.arraycopy(this.methods, 0, temp, length, this.methods.length);
+ this.methods = temp;
+ }
+ return parameterizedMethods;
+ } finally {
+ // if the original methods cannot be retrieved (ex. AbortCompilation), then assume we do not have any methods
+ if (parameterizedMethods == null)
+ this.methods = parameterizedMethods = NoMethods;
+ }
+ }
+ public boolean hasMemberTypes() {
+ return this.type.hasMemberTypes();
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding#implementsMethod(MethodBinding)
+ */
+ public boolean implementsMethod(MethodBinding method) {
+ return this.type.implementsMethod(method); // erasure
+ }
+
+ void initialize(ReferenceBinding someType, TypeBinding[] someArguments) {
+ this.type = someType;
+ this.sourceName = someType.sourceName;
+ this.compoundName = someType.compoundName;
+ this.fPackage = someType.fPackage;
+ this.fileName = someType.fileName;
+ // should not be set yet
+ // this.superclass = null;
+ // this.superInterfaces = null;
+ // this.fields = null;
+ // this.methods = null;
+ this.modifiers = someType.modifiers | AccGenericSignature | AccUnresolved; // until methods() is sent
+ if (someArguments != null) {
+ this.arguments = someArguments;
+ for (int i = 0, length = someArguments.length; i < length; i++) {
+ TypeBinding someArgument = someArguments[i];
+ if (!someArgument.isWildcard() || ((WildcardBinding) someArgument).kind != Wildcard.UNBOUND) {
+ this.tagBits |= IsBoundParameterizedType;
+ }
+ this.tagBits |= someArgument.tagBits & (HasTypeVariable | HasWildcard);
+ }
+ }
+ this.tagBits |= someType.tagBits & (IsLocalType| IsMemberType | IsNestedType);
+ }
+
+ protected void initializeArguments() {
+ // do nothing for true parameterized types (only for raw types)
+ }
+
+ public boolean isEquivalentTo(TypeBinding otherType) {
+ if (this == otherType)
+ return true;
+ if (otherType == null)
+ return false;
+ if (otherType.isRawType())
+ return erasure() == otherType.erasure();
+ if (otherType.isParameterizedType()) {
+ if ((otherType.tagBits & HasWildcard) == 0 && (!this.isMemberType() || !otherType.isMemberType()))
+ return false; // should have been identical
+ ParameterizedTypeBinding otherParamType = (ParameterizedTypeBinding) otherType;
+ if (this.type != otherParamType.type)
+ return false;
+ ReferenceBinding enclosing = enclosingType();
+ if (enclosing != null && !enclosing.isEquivalentTo(otherParamType.enclosingType()))
+ return false;
+ int length = this.arguments == null ? 0 : this.arguments.length;
+ TypeBinding[] otherArguments = otherParamType.arguments;
+ int otherLength = otherArguments == null ? 0 : otherArguments.length;
+ if (otherLength != length)
+ return false;
+ // argument must be identical, only equivalence is allowed if wildcard other type
+ for (int i = 0; i < length; i++) {
+ TypeBinding argument = this.arguments[i];
+ TypeBinding otherArgument = otherArguments[i];
+ if (!(argument == otherArgument
+ || (otherArgument.isWildcard()) && argument.isEquivalentTo(otherArgument))) {
+ return false;
+ }
+ }
+ return true;
+ }
+ if (otherType.isWildcard())
+ return ((WildcardBinding) otherType).boundCheck(this);
+ return false;
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding#isParameterizedType()
+ */
+ public boolean isParameterizedType() {
+ return true;
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding#memberTypes()
+ */
+ public ReferenceBinding[] memberTypes() {
+ if (this.memberTypes == null) {
+ try {
+ ReferenceBinding[] originalMemberTypes = this.type.memberTypes();
+ int length = originalMemberTypes.length;
+ ReferenceBinding[] parameterizedMemberTypes = new ReferenceBinding[length];
+ for (int i = 0; i < length; i++)
+ // substitute all member types, so as to get updated enclosing types
+ parameterizedMemberTypes[i] = this.environment.createParameterizedType(originalMemberTypes[i], null, this);
+ this.memberTypes = parameterizedMemberTypes;
+ } finally {
+ // if the original fields cannot be retrieved (ex. AbortCompilation), then assume we do not have any fields
+ if (this.memberTypes == null)
+ this.memberTypes = NoMemberTypes;
+ }
+ }
+ return this.memberTypes;
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding#methods()
+ */
+ public MethodBinding[] methods() {
+ if ((modifiers & AccUnresolved) == 0)
+ return this.methods;
+
+ try {
+ MethodBinding[] originalMethods = this.type.methods();
+ int length = originalMethods.length;
+ MethodBinding[] parameterizedMethods = new MethodBinding[length];
+ for (int i = 0; i < length; i++)
+ // substitute all methods, so as to get updated declaring class at least
+ parameterizedMethods[i] = createParameterizedMethod(originalMethods[i]);
+ this.methods = parameterizedMethods;
+ } finally {
+ // if the original methods cannot be retrieved (ex. AbortCompilation), then assume we do not have any methods
+ if (this.methods == null)
+ this.methods = NoMethods;
+
+ modifiers ^= AccUnresolved;
+ }
+ return this.methods;
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding#qualifiedSourceName()
+ */
+ public char[] qualifiedSourceName() {
+ return this.type.qualifiedSourceName();
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.Binding#readableName()
+ */
+ public char[] readableName() {
+ StringBuffer nameBuffer = new StringBuffer(10);
+ if (this.isMemberType()) {
+ nameBuffer.append(CharOperation.concat(this.enclosingType().readableName(), sourceName, '.'));
+ } else {
+ nameBuffer.append(CharOperation.concatWith(this.type.compoundName, '.'));
+ }
+ if (this.arguments != null) {
+ nameBuffer.append('<');
+ for (int i = 0, length = this.arguments.length; i < length; i++) {
+ if (i > 0) nameBuffer.append(',');
+ nameBuffer.append(this.arguments[i].readableName());
+ }
+ nameBuffer.append('>');
+ }
+ int nameLength = nameBuffer.length();
+ char[] readableName = new char[nameLength];
+ nameBuffer.getChars(0, nameLength, readableName, 0);
+ return readableName;
+ }
+
+ ReferenceBinding resolve() {
+ // TODO need flag to know that this has already been done... should it be on ReferenceBinding?
+ ReferenceBinding resolvedType = BinaryTypeBinding.resolveType(this.type, this.environment, false); // still part of parameterized type ref
+ if (this.arguments != null) {
+ int argLength = this.arguments.length;
+ for (int i = 0; i < argLength; i++)
+ BinaryTypeBinding.resolveType(this.arguments[i], this.environment, this, i);
+ // arity check
+ TypeVariableBinding[] refTypeVariables = resolvedType.typeVariables();
+ if (refTypeVariables == NoTypeVariables) { // check generic
+ this.environment.problemReporter.nonGenericTypeCannotBeParameterized(null, resolvedType, this.arguments);
+ return this; // cannot reach here as AbortCompilation is thrown
+ } else if (argLength != refTypeVariables.length) { // check arity
+ this.environment.problemReporter.incorrectArityForParameterizedType(null, resolvedType, this.arguments);
+ return this; // cannot reach here as AbortCompilation is thrown
+ }
+ // check argument type compatibility
+ for (int i = 0; i < argLength; i++) {
+ TypeBinding resolvedArgument = this.arguments[i];
+ if (!refTypeVariables[i].boundCheck(this, resolvedArgument)) {
+ this.environment.problemReporter.typeMismatchError(resolvedArgument, refTypeVariables[i], resolvedType, null);
+ }
+ }
+ }
+ return this;
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.Binding#shortReadableName()
+ */
+ public char[] shortReadableName() {
+ StringBuffer nameBuffer = new StringBuffer(10);
+ if (this.isMemberType()) {
+ nameBuffer.append(CharOperation.concat(this.enclosingType().shortReadableName(), sourceName, '.'));
+ } else {
+ nameBuffer.append(this.type.sourceName);
+ }
+ if (this.arguments != null) {
+ nameBuffer.append('<');
+ for (int i = 0, length = this.arguments.length; i < length; i++) {
+ if (i > 0) nameBuffer.append(',');
+ nameBuffer.append(this.arguments[i].shortReadableName());
+ }
+ nameBuffer.append('>');
+ }
+ int nameLength = nameBuffer.length();
+ char[] shortReadableName = new char[nameLength];
+ nameBuffer.getChars(0, nameLength, shortReadableName, 0);
+ return shortReadableName;
+ }
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding#signature()
+ */
+ public char[] signature() {
+ if (this.signature == null) {
+ this.signature = this.type.signature(); // erasure
+ }
+ return this.signature;
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding#sourceName()
+ */
+ public char[] sourceName() {
+ return this.type.sourceName();
+ }
+
+ /**
+ * Returns a type, where original type was substituted using the receiver
+ * parameterized type.
+ */
+ public TypeBinding substitute(TypeBinding originalType) {
+ if ((originalType.tagBits & TagBits.HasTypeVariable) != 0) {
+ if (originalType.isTypeVariable()) {
+ TypeVariableBinding originalVariable = (TypeVariableBinding) originalType;
+ ParameterizedTypeBinding currentType = this;
+ while (true) {
+ if (currentType.arguments != null) {
+ TypeVariableBinding[] typeVariables = currentType.type.typeVariables();
+ int length = typeVariables.length;
+ // check this variable can be substituted given parameterized type
+ if (originalVariable.rank < length && typeVariables[originalVariable.rank] == originalVariable) {
+ return currentType.arguments[originalVariable.rank];
+ }
+ }
+ // recurse on enclosing type, as it may hold more substitutions to perform
+ ReferenceBinding enclosing = currentType.enclosingType();
+ if (!(enclosing instanceof ParameterizedTypeBinding))
+ break;
+ currentType = (ParameterizedTypeBinding) enclosing;
+ }
+ } else if (originalType.isParameterizedType()) {
+ ParameterizedTypeBinding originalParameterizedType = (ParameterizedTypeBinding) originalType;
+ TypeBinding[] originalArguments = originalParameterizedType.arguments;
+ TypeBinding[] substitutedArguments = Scope.substitute(this, originalArguments);
+ if (substitutedArguments != originalArguments) {
+ identicalVariables: { // if substituted with original variables, then answer the generic type itself
+ TypeVariableBinding[] originalVariables = originalParameterizedType.type.typeVariables();
+ for (int i = 0, length = originalVariables.length; i < length; i++) {
+ if (substitutedArguments[i] != originalVariables[i]) break identicalVariables;
+ }
+ return originalParameterizedType.type;
+ }
+ return this.environment.createParameterizedType(
+ originalParameterizedType.type, substitutedArguments, originalParameterizedType.enclosingType);
+ }
+ } else if (originalType.isArrayType()) {
+ TypeBinding originalLeafComponentType = originalType.leafComponentType();
+ TypeBinding substitute = substitute(originalLeafComponentType); // substitute could itself be array type
+ if (substitute != originalLeafComponentType) {
+ return this.environment.createArrayType(substitute.leafComponentType(), substitute.dimensions() + originalType.dimensions());
+ }
+ } else if (originalType.isWildcard()) {
+ WildcardBinding wildcard = (WildcardBinding) originalType;
+ if (wildcard.kind != Wildcard.UNBOUND) {
+ TypeBinding originalBound = wildcard.bound;
+ TypeBinding substitutedBound = substitute(originalBound);
+ if (substitutedBound != originalBound) {
+ return this.environment.createWildcard(wildcard.genericType, wildcard.rank, substitutedBound, wildcard.kind);
+ }
+ }
+ }
+ } else if (originalType.isGenericType()) {
+ // treat as if parameterized with its type variables
+ ReferenceBinding originalGenericType = (ReferenceBinding) originalType;
+ TypeVariableBinding[] originalVariables = originalGenericType.typeVariables();
+ int length = originalVariables.length;
+ TypeBinding[] originalArguments;
+ System.arraycopy(originalVariables, 0, originalArguments = new TypeBinding[length], 0, length);
+ TypeBinding[] substitutedArguments = Scope.substitute(this, originalArguments);
+ if (substitutedArguments != originalArguments) {
+ return this.environment.createParameterizedType(
+ originalGenericType, substitutedArguments, null);
+ }
+ }
+ return originalType;
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding#superclass()
+ */
+ public ReferenceBinding superclass() {
+ if (this.superclass == null) {
+ // note: Object cannot be generic
+ ReferenceBinding genericSuperclass = this.type.superclass();
+ if (genericSuperclass == null) return null; // e.g. interfaces
+ this.superclass = (ReferenceBinding) substitute(genericSuperclass);
+ }
+ return this.superclass;
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding#superInterfaces()
+ */
+ public ReferenceBinding[] superInterfaces() {
+ if (this.superInterfaces == null) {
+ this.superInterfaces = Scope.substitute(this, this.type.superInterfaces());
+ }
+ return this.superInterfaces;
+ }
+
+ public void swapUnresolved(UnresolvedReferenceBinding unresolvedType, ReferenceBinding resolvedType, LookupEnvironment env) {
+ boolean update = false;
+ if (this.type == unresolvedType) {
+ this.type = resolvedType; // cannot be raw since being parameterized below
+ update = true;
+ }
+ if (this.arguments != null) {
+ for (int i = 0, l = this.arguments.length; i < l; i++) {
+ if (this.arguments[i] == unresolvedType) {
+ this.arguments[i] = resolvedType.isGenericType() ? env.createRawType(resolvedType, null) : resolvedType;
+ update = true;
+ }
+ }
+ }
+ if (update)
+ initialize(this.type, this.arguments);
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding#syntheticEnclosingInstanceTypes()
+ */
+ public ReferenceBinding[] syntheticEnclosingInstanceTypes() {
+ return this.type.syntheticEnclosingInstanceTypes();
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding#syntheticOuterLocalVariables()
+ */
+ public SyntheticArgumentBinding[] syntheticOuterLocalVariables() {
+ return this.type.syntheticOuterLocalVariables();
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding#qualifiedPackageName()
+ */
+ public char[] qualifiedPackageName() {
+ return this.type.qualifiedPackageName();
+ }
+
+ /**
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ StringBuffer buffer = new StringBuffer(30);
+ if (isDeprecated()) buffer.append("deprecated "); //$NON-NLS-1$
+ if (isPublic()) buffer.append("public "); //$NON-NLS-1$
+ if (isProtected()) buffer.append("protected "); //$NON-NLS-1$
+ if (isPrivate()) buffer.append("private "); //$NON-NLS-1$
+ if (isAbstract() && isClass()) buffer.append("abstract "); //$NON-NLS-1$
+ if (isStatic() && isNestedType()) buffer.append("static "); //$NON-NLS-1$
+ if (isFinal()) buffer.append("final "); //$NON-NLS-1$
+
+ buffer.append(isInterface() ? "interface " : "class "); //$NON-NLS-1$ //$NON-NLS-2$
+ buffer.append(this.debugName());
+
+ buffer.append("\n\textends "); //$NON-NLS-1$
+ buffer.append((superclass != null) ? superclass.debugName() : "NULL TYPE"); //$NON-NLS-1$
+
+ if (superInterfaces != null) {
+ if (superInterfaces != NoSuperInterfaces) {
+ buffer.append("\n\timplements : "); //$NON-NLS-1$
+ for (int i = 0, length = superInterfaces.length; i < length; i++) {
+ if (i > 0)
+ buffer.append(", "); //$NON-NLS-1$
+ buffer.append((superInterfaces[i] != null) ? superInterfaces[i].debugName() : "NULL TYPE"); //$NON-NLS-1$
+ }
+ }
+ } else {
+ buffer.append("NULL SUPERINTERFACES"); //$NON-NLS-1$
+ }
+
+ if (enclosingType() != null) {
+ buffer.append("\n\tenclosing type : "); //$NON-NLS-1$
+ buffer.append(enclosingType().debugName());
+ }
+
+ if (fields != null) {
+ if (fields != NoFields) {
+ buffer.append("\n/* fields */"); //$NON-NLS-1$
+ for (int i = 0, length = fields.length; i < length; i++)
+ buffer.append('\n').append((fields[i] != null) ? fields[i].toString() : "NULL FIELD"); //$NON-NLS-1$
+ }
+ } else {
+ buffer.append("NULL FIELDS"); //$NON-NLS-1$
+ }
+
+ if (methods != null) {
+ if (methods != NoMethods) {
+ buffer.append("\n/* methods */"); //$NON-NLS-1$
+ for (int i = 0, length = methods.length; i < length; i++)
+ buffer.append('\n').append((methods[i] != null) ? methods[i].toString() : "NULL METHOD"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ } else {
+ buffer.append("NULL METHODS"); //$NON-NLS-1$
+ }
+
+// if (memberTypes != null) {
+// if (memberTypes != NoMemberTypes) {
+// buffer.append("\n/* members */"); //$NON-NLS-1$
+// for (int i = 0, length = memberTypes.length; i < length; i++)
+// buffer.append('\n').append((memberTypes[i] != null) ? memberTypes[i].toString() : "NULL TYPE"); //$NON-NLS-1$ //$NON-NLS-2$
+// }
+// } else {
+// buffer.append("NULL MEMBER TYPES"); //$NON-NLS-1$
+// }
+
+ buffer.append("\n\n"); //$NON-NLS-1$
+ return buffer.toString();
+
+ }
+ public TypeVariableBinding[] typeVariables() {
+ if (this.arguments == null) {
+ // retain original type variables if not substituted (member type of parameterized type)
+ return this.type.typeVariables();
+ }
+ return NoTypeVariables;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ProblemBinding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ProblemBinding.js
new file mode 100644
index 0000000..550bc7e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ProblemBinding.js
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+
+public class ProblemBinding extends Binding {
+ public char[] name;
+ public ReferenceBinding searchType;
+ private int problemId;
+// NOTE: must only answer the subset of the name related to the problem
+
+public ProblemBinding(char[][] compoundName, int problemId) {
+ this(CharOperation.concatWith(compoundName, '.'), problemId);
+}
+// NOTE: must only answer the subset of the name related to the problem
+
+public ProblemBinding(char[][] compoundName, ReferenceBinding searchType, int problemId) {
+ this(CharOperation.concatWith(compoundName, '.'), searchType, problemId);
+}
+ProblemBinding(char[] name, int problemId) {
+ this.name = name;
+ this.problemId = problemId;
+}
+ProblemBinding(char[] name, ReferenceBinding searchType, int problemId) {
+ this(name, problemId);
+ this.searchType = searchType;
+}
+/* API
+* Answer the receiver's binding type from Binding.BindingID.
+*/
+
+public final int bindingType() {
+ return VARIABLE | TYPE;
+}
+/* API
+* Answer the problem id associated with the receiver.
+* NoError if the receiver is a valid binding.
+*/
+
+public final int problemId() {
+ return problemId;
+}
+public char[] readableName() {
+ return name;
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ProblemFieldBinding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ProblemFieldBinding.js
new file mode 100644
index 0000000..88def92
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ProblemFieldBinding.js
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+
+public class ProblemFieldBinding extends FieldBinding {
+ private int problemId;
+ public FieldBinding closestMatch;
+
+// NOTE: must only answer the subset of the name related to the problem
+
+public ProblemFieldBinding(ReferenceBinding declaringClass, char[][] compoundName, int problemId) {
+ this(null, declaringClass, CharOperation.concatWith(compoundName, '.'), problemId);
+}
+public ProblemFieldBinding(ReferenceBinding declaringClass, char[] name, int problemId) {
+ this(null, declaringClass, name, problemId);
+}
+public ProblemFieldBinding(FieldBinding closestMatch, ReferenceBinding declaringClass, char[] name, int problemId) {
+ this.closestMatch = closestMatch;
+ this.declaringClass = declaringClass;
+ this.name = name;
+ this.problemId = problemId;
+}
+/* API
+* Answer the problem id associated with the receiver.
+* NoError if the receiver is a valid binding.
+*/
+
+public final int problemId() {
+ return problemId;
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ProblemMethodBinding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ProblemMethodBinding.js
new file mode 100644
index 0000000..7db33ba
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ProblemMethodBinding.js
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+public class ProblemMethodBinding extends MethodBinding {
+
+ private int problemReason;
+ public MethodBinding closestMatch; // TODO (philippe) should rename into #alternateMatch
+
+public ProblemMethodBinding(char[] selector, TypeBinding[] args, int problemReason) {
+ this.selector = selector;
+ this.parameters = (args == null || args.length == 0) ? NoParameters : args;
+ this.problemReason = problemReason;
+}
+public ProblemMethodBinding(char[] selector, TypeBinding[] args, ReferenceBinding declaringClass, int problemReason) {
+ this.selector = selector;
+ this.parameters = (args == null || args.length == 0) ? NoParameters : args;
+ this.declaringClass = declaringClass;
+ this.problemReason = problemReason;
+}
+public ProblemMethodBinding(MethodBinding closestMatch, char[] selector, TypeBinding[] args, int problemReason) {
+ this(selector, args, problemReason);
+ this.closestMatch = closestMatch;
+ if (closestMatch != null) this.declaringClass = closestMatch.declaringClass;
+}
+/* API
+* Answer the problem id associated with the receiver.
+* NoError if the receiver is a valid binding.
+*/
+
+public final int problemId() {
+ return this.problemReason;
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ProblemPackageBinding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ProblemPackageBinding.js
new file mode 100644
index 0000000..42a57ab
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ProblemPackageBinding.js
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+public class ProblemPackageBinding extends PackageBinding {
+ private int problemId;
+// NOTE: must only answer the subset of the name related to the problem
+
+ProblemPackageBinding(char[][] compoundName, int problemId) {
+ this.compoundName = compoundName;
+ this.problemId = problemId;
+}
+ProblemPackageBinding(char[] name, int problemId) {
+ this(new char[][] {name}, problemId);
+}
+/* API
+* Answer the problem id associated with the receiver.
+* NoError if the receiver is a valid binding.
+*/
+
+public final int problemId() {
+ return problemId;
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ProblemReasons.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ProblemReasons.js
new file mode 100644
index 0000000..8c8ad2e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ProblemReasons.js
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+public interface ProblemReasons {
+ final int NoError = 0;
+ final int NotFound = 1;
+ final int NotVisible = 2;
+ final int Ambiguous = 3;
+ final int InternalNameProvided = 4; // used if an internal name is used in source
+ final int InheritedNameHidesEnclosingName = 5;
+ final int NonStaticReferenceInConstructorInvocation = 6;
+ final int NonStaticReferenceInStaticContext = 7;
+ final int ReceiverTypeNotVisible = 8;
+ final int IllegalSuperTypeVariable = 9;
+ final int ParameterBoundMismatch = 10; // for generic method
+ final int TypeParameterArityMismatch = 11; // for generic method
+ final int ParameterizedMethodTypeMismatch = 12; // for generic method
+ final int TypeArgumentsForRawGenericMethod = 13; // for generic method
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ProblemReferenceBinding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ProblemReferenceBinding.js
new file mode 100644
index 0000000..2170a69
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ProblemReferenceBinding.js
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+public class ProblemReferenceBinding extends ReferenceBinding {
+ public ReferenceBinding original;
+ private int problemReason;
+ public ReferenceBinding alternateMatch;
+
+// NOTE: must only answer the subset of the name related to the problem
+
+public ProblemReferenceBinding(char[][] compoundName, int problemReason) {
+ this(compoundName, null, problemReason);
+}
+public ProblemReferenceBinding(char[] name, int problemReason) {
+ this(new char[][] {name}, null, problemReason);
+}
+
+public ProblemReferenceBinding(char[][] compoundName, ReferenceBinding original, int problemReason) {
+ this.compoundName = compoundName;
+ this.original = original;
+ this.problemReason = problemReason;
+}
+public ProblemReferenceBinding(char[] name, ReferenceBinding original, int problemReason) {
+ this(new char[][] {name}, original, problemReason);
+}
+/* API
+* Answer the problem id associated with the receiver.
+* NoError if the receiver is a valid binding.
+*/
+public int problemId() {
+ return this.problemReason;
+}
+
+/**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding#shortReadableName()
+ */
+public char[] shortReadableName() {
+ return readableName();
+}
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/RawTypeBinding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/RawTypeBinding.js
new file mode 100644
index 0000000..be6b20c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/RawTypeBinding.js
@@ -0,0 +1,170 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+
+/**
+ * Denote a raw type, i.e. a generic type referenced without any type arguments.
+ * e.g. X<T extends Exception> can be used a raw type 'X', in which case it
+ * will behave as X<Exception>
+ */
+public class RawTypeBinding extends ParameterizedTypeBinding {
+
+ /**
+ * Raw type arguments are erasure of respective parameter bounds. But we may not have resolved
+ * these bounds yet if creating raw types while supertype hierarchies are being connected.
+ * Therefore, use 'null' instead, and access these in a lazy way later on (when substituting).
+ */
+ public RawTypeBinding(ReferenceBinding type, ReferenceBinding enclosingType, LookupEnvironment environment){
+ super(type, null, enclosingType, environment);
+ if (enclosingType == null || (enclosingType.modifiers & AccGenericSignature) == 0)
+ this.modifiers ^= AccGenericSignature; // only need signature if enclosing needs one
+ }
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.ParameterizedTypeBinding#createParameterizedMethod(org.eclipse.wst.jsdt.internal.compiler.lookup.MethodBinding)
+ */
+ public ParameterizedMethodBinding createParameterizedMethod(MethodBinding originalMethod) {
+ if (originalMethod.typeVariables == NoTypeVariables) {
+ return super.createParameterizedMethod(originalMethod);
+ }
+ return new ParameterizedGenericMethodBinding(originalMethod, this, this.environment);
+ }
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding#debugName()
+ */
+ public String debugName() {
+ StringBuffer nameBuffer = new StringBuffer(10);
+ nameBuffer.append(this.type.sourceName()).append("#RAW"); //$NON-NLS-1$
+ return nameBuffer.toString();
+ }
+
+ /**
+ * Ltype<param1 ... paramN>;
+ * LY<TT;>;
+ */
+ public char[] genericTypeSignature() {
+
+ if (this.genericTypeSignature == null) {
+ StringBuffer sig = new StringBuffer(10);
+ if (this.isMemberType() && this.enclosingType().isParameterizedType()) {
+ char[] typeSig = this.enclosingType().genericTypeSignature();
+ for (int i = 0; i < typeSig.length-1; i++) sig.append(typeSig[i]); // copy all but trailing semicolon
+ sig.append('.').append(this.sourceName()).append(';');
+ int sigLength = sig.length();
+ this.genericTypeSignature = new char[sigLength];
+ sig.getChars(0, sigLength, this.genericTypeSignature, 0);
+ } else {
+ this.genericTypeSignature = this.type.signature(); // erasure
+ }
+ }
+ return this.genericTypeSignature;
+ }
+
+ public boolean isEquivalentTo(TypeBinding otherType) {
+ if (this == otherType) return true;
+ if (otherType == null) return false;
+ if (otherType.isWildcard()) // wildcard
+ return ((WildcardBinding) otherType).boundCheck(this);
+ return otherType.erasure() == this.erasure();
+ }
+ /**
+ * Raw type is not treated as a standard parameterized type
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding#isParameterizedType()
+ */
+ public boolean isParameterizedType() {
+ return false;
+ }
+ public boolean isRawType() {
+ return true;
+ }
+
+ protected void initializeArguments() {
+ TypeVariableBinding[] typeVariables = this.type.typeVariables();
+ int length = typeVariables.length;
+ TypeBinding[] typeArguments = new TypeBinding[length];
+ for (int i = 0; i < length; i++) {
+ typeArguments[i] = typeVariables[i].erasure();
+ }
+ this.arguments = typeArguments;
+ }
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.Binding#readableName()
+ */
+ public char[] readableName() /*java.lang.Object, p.X<T> */ {
+ char[] readableName;
+ if (isMemberType()) {
+ readableName = CharOperation.concat(enclosingType().readableName(), sourceName, '.');
+ } else {
+ readableName = CharOperation.concatWith(this.type.compoundName, '.');
+ }
+ return readableName;
+ }
+
+ /**
+ * Returns a type, where original type was substituted using the receiver
+ * raw type.
+ * On raw types, all parameterized type denoting same original type are converted
+ * to raw types. e.g.
+ * class X <T> {
+ * X<T> foo;
+ * X<String> bar;
+ * } when used in raw fashion, then type of both foo and bar is raw type X.
+ */
+ public TypeBinding substitute(TypeBinding originalType) {
+
+ if (originalType.isTypeVariable()) {
+ TypeVariableBinding originalVariable = (TypeVariableBinding) originalType;
+ ParameterizedTypeBinding currentType = this;
+ while (true) {
+ TypeVariableBinding[] typeVariables = currentType.type.typeVariables();
+ int length = typeVariables.length;
+ // check this variable can be substituted given parameterized type
+ if (originalVariable.rank < length && typeVariables[originalVariable.rank] == originalVariable) {
+ // lazy init, since cannot do so during binding creation if during supertype connection
+ if (currentType.arguments == null) currentType.initializeArguments();
+ if (currentType.arguments != null)
+ return currentType.arguments[originalVariable.rank];
+ }
+ // recurse on enclosing type, as it may hold more substitutions to perform
+ ReferenceBinding enclosing = currentType.enclosingType();
+ if (!(enclosing instanceof ParameterizedTypeBinding))
+ break;
+ currentType = (ParameterizedTypeBinding) enclosing;
+ }
+ } else if (originalType.isParameterizedType()) {
+ ParameterizedTypeBinding originalParameterizedType = (ParameterizedTypeBinding) originalType;
+ return this.environment.createRawType(originalParameterizedType.type, originalParameterizedType.enclosingType());
+ } else if (originalType.isGenericType()) {
+ return this.environment.createRawType((ReferenceBinding)originalType, null);
+ } else if (originalType.isArrayType()) {
+ TypeBinding originalLeafComponentType = originalType.leafComponentType();
+ TypeBinding substitute = substitute(originalLeafComponentType); // substitute could itself be array type
+ if (substitute != originalLeafComponentType) {
+ return this.environment.createArrayType(substitute.leafComponentType(), substitute.dimensions() + originalType.dimensions());
+ }
+ }
+ return originalType;
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.Binding#shortReadableName()
+ */
+ public char[] shortReadableName() /*Object*/ {
+ char[] shortReadableName;
+ if (isMemberType()) {
+ shortReadableName = CharOperation.concat(enclosingType().shortReadableName(), sourceName, '.');
+ } else {
+ shortReadableName = this.type.sourceName;
+ }
+ return shortReadableName;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ReferenceBinding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ReferenceBinding.js
new file mode 100644
index 0000000..a96c077
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ReferenceBinding.js
@@ -0,0 +1,742 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.env.IDependent;
+
+/*
+Not all fields defined by this type (& its subclasses) are initialized when it is created.
+Some are initialized only when needed.
+
+Accessors have been provided for some public fields so all TypeBindings have the same API...
+but access public fields directly whenever possible.
+Non-public fields have accessors which should be used everywhere you expect the field to be initialized.
+
+null is NOT a valid value for a non-public field... it just means the field is not initialized.
+*/
+
+abstract public class ReferenceBinding extends TypeBinding implements IDependent {
+ public char[][] compoundName;
+ public char[] sourceName;
+ public int modifiers;
+ public PackageBinding fPackage;
+
+ char[] fileName;
+ char[] constantPoolName;
+ char[] signature;
+
+public FieldBinding[] availableFields() {
+ return fields();
+}
+
+public MethodBinding[] availableMethods() {
+ return methods();
+}
+/* Answer true if the receiver can be instantiated
+*/
+
+public boolean canBeInstantiated() {
+ return !(isAbstract() || isInterface());
+}
+/* Answer true if the receiver is visible to the invocationPackage.
+*/
+
+public final boolean canBeSeenBy(PackageBinding invocationPackage) {
+ if (isPublic()) return true;
+ if (isPrivate()) return false;
+
+ // isProtected() or isDefault()
+ return invocationPackage == fPackage;
+}
+/* Answer true if the receiver is visible to the receiverType and the invocationType.
+*/
+
+public final boolean canBeSeenBy(ReferenceBinding receiverType, SourceTypeBinding invocationType) {
+ if (isPublic()) return true;
+
+ if (invocationType == this && invocationType == receiverType) return true;
+
+ if (isProtected()) {
+
+ // answer true if the invocationType is the declaringClass or they are in the same package
+ // OR the invocationType is a subclass of the declaringClass
+ // AND the invocationType is the invocationType or its subclass
+ // OR the type is a static method accessed directly through a type
+ // OR previous assertions are true for one of the enclosing type
+ if (invocationType == this) return true;
+ if (invocationType.fPackage == fPackage) return true;
+
+ ReferenceBinding currentType = invocationType;
+ ReferenceBinding declaringClass = enclosingType(); // protected types always have an enclosing one
+ if (declaringClass == null) return false; // could be null if incorrect top-level protected type
+ //int depth = 0;
+ do {
+ if (declaringClass == invocationType) return true;
+ if (declaringClass.isSuperclassOf(currentType)) return true;
+ //depth++;
+ currentType = currentType.enclosingType();
+ } while (currentType != null);
+ return false;
+ }
+
+ if (isPrivate()) {
+ // answer true if the receiverType is the receiver or its enclosingType
+ // AND the invocationType and the receiver have a common enclosingType
+ receiverCheck: {
+ if (!(receiverType == this || receiverType == enclosingType())) {
+ // special tolerance for type variable direct bounds
+ if (receiverType.isTypeVariable()) {
+ TypeVariableBinding typeVariable = (TypeVariableBinding) receiverType;
+ if (typeVariable.isErasureBoundTo(this.erasure()) || typeVariable.isErasureBoundTo(enclosingType().erasure())) {
+ break receiverCheck;
+ }
+ }
+ return false;
+ }
+ }
+
+
+ if (invocationType != this) {
+ ReferenceBinding outerInvocationType = invocationType;
+ ReferenceBinding temp = outerInvocationType.enclosingType();
+ while (temp != null) {
+ outerInvocationType = temp;
+ temp = temp.enclosingType();
+ }
+
+ ReferenceBinding outerDeclaringClass = (ReferenceBinding)this.erasure();
+ temp = outerDeclaringClass.enclosingType();
+ while (temp != null) {
+ outerDeclaringClass = temp;
+ temp = temp.enclosingType();
+ }
+ if (outerInvocationType != outerDeclaringClass) return false;
+ }
+ return true;
+ }
+
+ // isDefault()
+ if (invocationType.fPackage != fPackage) return false;
+
+ ReferenceBinding type = receiverType;
+ ReferenceBinding declaringClass = enclosingType() == null ? this : enclosingType();
+ do {
+ if (declaringClass == type) return true;
+ if (fPackage != type.fPackage) return false;
+ } while ((type = type.superclass()) != null);
+ return false;
+}
+/*
+ * Answer true if the receiver is visible to the type provided by the scope.
+ */
+
+public final boolean canBeSeenBy(Scope scope) {
+
+ if (isPublic()) return true;
+
+ if (scope.kind == Scope.COMPILATION_UNIT_SCOPE){
+ return this.canBeSeenBy(((CompilationUnitScope)scope).fPackage);
+ }
+
+ SourceTypeBinding invocationType = scope.enclosingSourceType();
+ if (invocationType == this) return true;
+
+ if (isProtected()) {
+ // answer true if the invocationType is the declaringClass or they are in the same package
+ // OR the invocationType is a subclass of the declaringClass
+ // AND the invocationType is the invocationType or its subclass
+ // OR the type is a static method accessed directly through a type
+ // OR previous assertions are true for one of the enclosing type
+ if (invocationType.fPackage == fPackage) return true;
+
+ ReferenceBinding currentType = invocationType;
+ ReferenceBinding declaringClass = enclosingType(); // protected types always have an enclosing one
+ if (declaringClass == null) return false; // could be null if incorrect top-level protected type
+ // int depth = 0;
+ do {
+ if (declaringClass == invocationType) return true;
+ if (declaringClass.isSuperclassOf(currentType)) return true;
+ // depth++;
+ currentType = currentType.enclosingType();
+ } while (currentType != null);
+ return false;
+ }
+ if (isPrivate()) {
+ // answer true if the receiver and the invocationType have a common enclosingType
+ // already know they are not the identical type
+ ReferenceBinding outerInvocationType = invocationType;
+ ReferenceBinding temp = outerInvocationType.enclosingType();
+ while (temp != null) {
+ outerInvocationType = temp;
+ temp = temp.enclosingType();
+ }
+
+ ReferenceBinding outerDeclaringClass = (ReferenceBinding)this.erasure();
+ temp = outerDeclaringClass.enclosingType();
+ while (temp != null) {
+ outerDeclaringClass = temp;
+ temp = temp.enclosingType();
+ }
+ return outerInvocationType == outerDeclaringClass;
+ }
+
+ // isDefault()
+ return invocationType.fPackage == fPackage;
+}
+public void computeId() {
+ if (compoundName.length != 3) {
+ if (compoundName.length == 4 && CharOperation.equals(JAVA_LANG_REFLECT_CONSTRUCTOR, compoundName))
+ id = T_JavaLangReflectConstructor;
+ return;
+ }
+
+ if (!CharOperation.equals(JAVA, compoundName[0]))
+ return;
+
+ // remaining types MUST be in java.*.*
+ if (!CharOperation.equals(LANG, compoundName[1])) {
+ if (CharOperation.equals(JAVA_IO_PRINTSTREAM, compoundName))
+ id = T_JavaIoPrintStream;
+ else if (CharOperation.equals(JAVA_UTIL_ITERATOR, compoundName))
+ id = T_JavaUtilIterator;
+ else if (CharOperation.equals(JAVA_IO_SERIALIZABLE, compoundName))
+ id = T_JavaIoSerializable;
+ return;
+ }
+
+ // remaining types MUST be in java.lang.*
+ char[] typeName = compoundName[2];
+ if (typeName.length == 0) return; // just to be safe
+ switch (typeName[0]) {
+ case 'A' :
+ if (CharOperation.equals(typeName, JAVA_LANG_ASSERTIONERROR[2]))
+ id = T_JavaLangAssertionError;
+ return;
+ case 'B' :
+ if (CharOperation.equals(typeName, JAVA_LANG_BOOLEAN[2]))
+ id = T_JavaLangBoolean;
+ else if (CharOperation.equals(typeName, JAVA_LANG_BYTE[2]))
+ id = T_JavaLangByte;
+ return;
+ case 'C' :
+ if (CharOperation.equals(typeName, JAVA_LANG_CHARACTER[2]))
+ id = T_JavaLangCharacter;
+ else if (CharOperation.equals(typeName, JAVA_LANG_CLASS[2]))
+ id = T_JavaLangClass;
+ else if (CharOperation.equals(typeName, JAVA_LANG_CLASSNOTFOUNDEXCEPTION[2]))
+ id = T_JavaLangClassNotFoundException;
+ else if (CharOperation.equals(typeName, JAVA_LANG_CLONEABLE[2]))
+ id = T_JavaLangCloneable;
+ return;
+ case 'D' :
+ if (CharOperation.equals(typeName, JAVA_LANG_DOUBLE[2]))
+ id = T_JavaLangDouble;
+ return;
+ case 'E' :
+ if (CharOperation.equals(typeName, JAVA_LANG_ERROR[2]))
+ id = T_JavaLangError;
+ else if (CharOperation.equals(typeName, JAVA_LANG_EXCEPTION[2]))
+ id = T_JavaLangException;
+ return;
+ case 'F' :
+ if (CharOperation.equals(typeName, JAVA_LANG_FLOAT[2]))
+ id = T_JavaLangFloat;
+ return;
+ case 'I' :
+ if (CharOperation.equals(typeName, JAVA_LANG_INTEGER[2]))
+ id = T_JavaLangInteger;
+ else if (CharOperation.equals(typeName, JAVA_LANG_ITERABLE[2]))
+ id = T_JavaLangIterable;
+ return;
+ case 'L' :
+ if (CharOperation.equals(typeName, JAVA_LANG_LONG[2]))
+ id = T_JavaLangLong;
+ return;
+ case 'N' :
+ if (CharOperation.equals(typeName, JAVA_LANG_NOCLASSDEFERROR[2]))
+ id = T_JavaLangNoClassDefError;
+ return;
+ case 'O' :
+ if (CharOperation.equals(typeName, JAVA_LANG_OBJECT[2]))
+ id = T_JavaLangObject;
+ return;
+ case 'S' :
+ if (CharOperation.equals(typeName, JAVA_LANG_STRING[2]))
+ id = T_JavaLangString;
+ else if (CharOperation.equals(typeName, JAVA_LANG_STRINGBUFFER[2]))
+ id = T_JavaLangStringBuffer;
+ else if (CharOperation.equals(typeName, JAVA_LANG_STRINGBUILDER[2]))
+ id = T_JavaLangStringBuilder;
+ else if (CharOperation.equals(typeName, JAVA_LANG_SYSTEM[2]))
+ id = T_JavaLangSystem;
+ else if (CharOperation.equals(typeName, JAVA_LANG_SHORT[2]))
+ id = T_JavaLangShort;
+ return;
+ case 'T' :
+ if (CharOperation.equals(typeName, JAVA_LANG_THROWABLE[2]))
+ id = T_JavaLangThrowable;
+ return;
+ case 'V' :
+ if (CharOperation.equals(typeName, JAVA_LANG_VOID[2]))
+ id = T_JavaLangVoid;
+ return;
+ }
+}
+/* Answer the receiver's constant pool name.
+*
+* NOTE: This method should only be used during/after code gen.
+*/
+
+public char[] constantPoolName() /* java/lang/Object */ {
+ if (constantPoolName != null) return constantPoolName;
+ return constantPoolName = CharOperation.concatWith(compoundName, '/');
+}
+public String debugName() {
+ return (compoundName != null) ? new String(readableName()) : "UNNAMED TYPE"; //$NON-NLS-1$
+}
+public final int depth() {
+ int depth = 0;
+ ReferenceBinding current = this;
+ while ((current = current.enclosingType()) != null)
+ depth++;
+ return depth;
+}
+/* Answer the receiver's enclosing type... null if the receiver is a top level type.
+*/
+
+public ReferenceBinding enclosingType() {
+ return null;
+}
+public final ReferenceBinding enclosingTypeAt(int relativeDepth) {
+ ReferenceBinding current = this;
+ while (relativeDepth-- > 0 && current != null)
+ current = current.enclosingType();
+ return current;
+}
+
+public int fieldCount() {
+ return fields().length;
+}
+public FieldBinding[] fields() {
+ return NoFields;
+}
+/**
+ * Find supertype which erases to a given well-known type, or null if not found
+ * (using id avoids triggering the load of well-known type: 73740)
+ * NOTE: only works for erasures of well-known types, as random other types may share
+ * same id though being distincts.
+ *
+ */
+public ReferenceBinding findSuperTypeErasingTo(int erasureId, boolean erasureIsClass) {
+
+ if (erasure().id == erasureId) return this;
+ ReferenceBinding currentType = this;
+ // iterate superclass to avoid recording interfaces if searched supertype is class
+ if (erasureIsClass) {
+ while ((currentType = currentType.superclass()) != null) {
+ if (currentType.erasure().id == erasureId) return currentType;
+ }
+ return null;
+ }
+ ReferenceBinding[][] interfacesToVisit = new ReferenceBinding[5][];
+ int lastPosition = -1;
+ do {
+ ReferenceBinding[] itsInterfaces = currentType.superInterfaces();
+ if (itsInterfaces != NoSuperInterfaces) {
+ if (++lastPosition == interfacesToVisit.length)
+ System.arraycopy(interfacesToVisit, 0, interfacesToVisit = new ReferenceBinding[lastPosition * 2][], 0, lastPosition);
+ interfacesToVisit[lastPosition] = itsInterfaces;
+ }
+ } while ((currentType = currentType.superclass()) != null);
+
+ for (int i = 0; i <= lastPosition; i++) {
+ ReferenceBinding[] interfaces = interfacesToVisit[i];
+ for (int j = 0, length = interfaces.length; j < length; j++) {
+ if ((currentType = interfaces[j]).erasure().id == erasureId)
+ return currentType;
+
+ ReferenceBinding[] itsInterfaces = currentType.superInterfaces();
+ if (itsInterfaces != NoSuperInterfaces) {
+ if (++lastPosition == interfacesToVisit.length)
+ System.arraycopy(interfacesToVisit, 0, interfacesToVisit = new ReferenceBinding[lastPosition * 2][], 0, lastPosition);
+ interfacesToVisit[lastPosition] = itsInterfaces;
+ }
+ }
+ }
+ return null;
+}
+/**
+ * Find supertype which erases to a given type, or null if not found
+ */
+public ReferenceBinding findSuperTypeErasingTo(ReferenceBinding erasure) {
+
+ if (erasure() == erasure) return this;
+ ReferenceBinding currentType = this;
+ if (erasure.isClass()) {
+ while ((currentType = currentType.superclass()) != null) {
+ if (currentType.erasure() == erasure) return currentType;
+ }
+ return null;
+ }
+ ReferenceBinding[][] interfacesToVisit = new ReferenceBinding[5][];
+ int lastPosition = -1;
+ do {
+ ReferenceBinding[] itsInterfaces = currentType.superInterfaces();
+ if (itsInterfaces != NoSuperInterfaces) {
+ if (++lastPosition == interfacesToVisit.length)
+ System.arraycopy(interfacesToVisit, 0, interfacesToVisit = new ReferenceBinding[lastPosition * 2][], 0, lastPosition);
+ interfacesToVisit[lastPosition] = itsInterfaces;
+ }
+ } while ((currentType = currentType.superclass()) != null);
+
+ for (int i = 0; i <= lastPosition; i++) {
+ ReferenceBinding[] interfaces = interfacesToVisit[i];
+ for (int j = 0, length = interfaces.length; j < length; j++) {
+ if ((currentType = interfaces[j]).erasure() == erasure)
+ return currentType;
+
+ ReferenceBinding[] itsInterfaces = currentType.superInterfaces();
+ if (itsInterfaces != NoSuperInterfaces) {
+ if (++lastPosition == interfacesToVisit.length)
+ System.arraycopy(interfacesToVisit, 0, interfacesToVisit = new ReferenceBinding[lastPosition * 2][], 0, lastPosition);
+ interfacesToVisit[lastPosition] = itsInterfaces;
+ }
+ }
+ }
+ return null;
+}
+
+public final int getAccessFlags() {
+ return modifiers & AccJustFlag;
+}
+public MethodBinding getExactConstructor(TypeBinding[] argumentTypes) {
+ return null;
+}
+public MethodBinding getExactMethod(char[] selector, TypeBinding[] argumentTypes) {
+ return getExactMethod(selector, argumentTypes, null);
+}
+public MethodBinding getExactMethod(char[] selector, TypeBinding[] argumentTypes, CompilationUnitScope refScope) {
+ return null;
+}
+public FieldBinding getField(char[] fieldName, boolean needResolve) {
+ return null;
+}
+/**
+ * @see org.eclipse.wst.jsdt.internal.compiler.env.IDependent#getFileName()
+ */
+public char[] getFileName() {
+ return fileName;
+}
+public ReferenceBinding getMemberType(char[] typeName) {
+ ReferenceBinding[] memberTypes = memberTypes();
+ for (int i = memberTypes.length; --i >= 0;)
+ if (CharOperation.equals(memberTypes[i].sourceName, typeName))
+ return memberTypes[i];
+ return null;
+}
+public MethodBinding[] getMethods(char[] selector) {
+ return NoMethods;
+}
+public PackageBinding getPackage() {
+ return fPackage;
+}
+public boolean hasMemberTypes() {
+ return false;
+}
+public TypeVariableBinding getTypeVariable(char[] variableName) {
+ TypeVariableBinding[] typeVariables = typeVariables();
+ for (int i = typeVariables.length; --i >= 0;)
+ if (CharOperation.equals(typeVariables[i].sourceName, variableName))
+ return typeVariables[i];
+ return null;
+}
+public int hashCode() {
+ // ensure ReferenceBindings hash to the same posiiton as UnresolvedReferenceBindings so they can be replaced without rehashing
+ // ALL ReferenceBindings are unique when created so equals() is the same as ==
+ return (this.compoundName == null || this.compoundName.length == 0)
+ ? super.hashCode()
+ : CharOperation.hashCode(this.compoundName[this.compoundName.length - 1]);
+}
+
+public final boolean hasRestrictedAccess() {
+ return (modifiers & AccRestrictedAccess) != 0;
+}
+
+/* Answer true if the receiver implements anInterface or is identical to anInterface.
+* If searchHierarchy is true, then also search the receiver's superclasses.
+*
+* NOTE: Assume that anInterface is an interface.
+*/
+public boolean implementsInterface(ReferenceBinding anInterface, boolean searchHierarchy) {
+ if (this == anInterface)
+ return true;
+
+ ReferenceBinding[][] interfacesToVisit = new ReferenceBinding[5][];
+ int lastPosition = -1;
+ ReferenceBinding currentType = this;
+ do {
+ ReferenceBinding[] itsInterfaces = currentType.superInterfaces();
+ if (itsInterfaces != NoSuperInterfaces) {
+ if (++lastPosition == interfacesToVisit.length)
+ System.arraycopy(interfacesToVisit, 0, interfacesToVisit = new ReferenceBinding[lastPosition * 2][], 0, lastPosition);
+ interfacesToVisit[lastPosition] = itsInterfaces;
+ }
+ } while (searchHierarchy && (currentType = currentType.superclass()) != null);
+
+ for (int i = 0; i <= lastPosition; i++) {
+ ReferenceBinding[] interfaces = interfacesToVisit[i];
+ for (int j = 0, length = interfaces.length; j < length; j++) {
+ if ((currentType = interfaces[j]).isEquivalentTo(anInterface))
+ return true;
+
+ ReferenceBinding[] itsInterfaces = currentType.superInterfaces();
+ if (itsInterfaces != NoSuperInterfaces) {
+ if (++lastPosition == interfacesToVisit.length)
+ System.arraycopy(interfacesToVisit, 0, interfacesToVisit = new ReferenceBinding[lastPosition * 2][], 0, lastPosition);
+ interfacesToVisit[lastPosition] = itsInterfaces;
+ }
+ }
+ }
+ return false;
+}
+// Internal method... assume its only sent to classes NOT interfaces
+
+boolean implementsMethod(MethodBinding method) {
+ ReferenceBinding type = this;
+ while (type != null) {
+ MethodBinding[] methods = type.getMethods(method.selector);
+ for (int i = methods.length; --i >= 0;)
+ if (methods[i].areParametersEqual(method))
+ return true;
+ type = type.superclass();
+ }
+ return false;
+}
+/* Answer true if the receiver is an abstract type
+*/
+
+public final boolean isAbstract() {
+ return (modifiers & AccAbstract) != 0;
+}
+public final boolean isAnonymousType() {
+ return (tagBits & IsAnonymousType) != 0;
+}
+public final boolean isBinaryBinding() {
+ return (tagBits & IsBinaryBinding) != 0;
+}
+public boolean isClass() {
+ return (modifiers & AccInterface) == 0;
+}
+/*
+ * Returns true if the type hierarchy is being connected
+ */
+public boolean isHierarchyBeingConnected() {
+ return (this.tagBits & EndHierarchyCheck) == 0 && (this.tagBits & BeginHierarchyCheck) != 0;
+}
+/* Answer true if the receiver type can be assigned to the argument type (right)
+*/
+public boolean isCompatibleWith(TypeBinding otherType) {
+
+ if (otherType == this)
+ return true;
+ if (otherType.id == T_Object)
+ return true;
+ if (!(otherType instanceof ReferenceBinding))
+ return false;
+ ReferenceBinding otherReferenceType = (ReferenceBinding) otherType;
+ if (this.isEquivalentTo(otherReferenceType)) return true;
+ if (otherReferenceType.isWildcard()) {
+ return ((WildcardBinding) otherReferenceType).boundCheck(this);
+ }
+ if (otherReferenceType.isInterface())
+ return implementsInterface(otherReferenceType, true);
+ if (isInterface()) // Explicit conversion from an interface to a class is not allowed
+ return false;
+ return otherReferenceType.isSuperclassOf(this);
+}
+/* Answer true if the receiver has default visibility
+*/
+
+public final boolean isDefault() {
+ return (modifiers & (AccPublic | AccProtected | AccPrivate)) == 0;
+}
+/* Answer true if the receiver is a deprecated type
+*/
+
+public final boolean isDeprecated() {
+ return (modifiers & AccDeprecated) != 0;
+}
+/* Answer true if the receiver is final and cannot be subclassed
+*/
+public final boolean isFinal() {
+ return (modifiers & AccFinal) != 0;
+}
+public boolean isInterface() {
+ return (modifiers & AccInterface) != 0;
+}
+
+/* Answer true if the receiver has private visibility
+*/
+public final boolean isPrivate() {
+ return (modifiers & AccPrivate) != 0;
+}
+/* Answer true if the receiver has private visibility and is used locally
+*/
+
+public final boolean isPrivateUsed() {
+ return (modifiers & AccPrivateUsed) != 0;
+}
+/* Answer true if the receiver has protected visibility
+*/
+
+public final boolean isProtected() {
+ return (modifiers & AccProtected) != 0;
+}
+/* Answer true if the receiver has public visibility
+*/
+
+public final boolean isPublic() {
+ return (modifiers & AccPublic) != 0;
+}
+/* Answer true if the receiver is a static member type (or toplevel)
+ */
+
+public final boolean isStatic() {
+ return (modifiers & (AccStatic | AccInterface)) != 0 ||
+ (tagBits & IsNestedType) == 0;
+}
+/* Answer true if all float operations must adher to IEEE 754 float/double rules
+*/
+
+public final boolean isStrictfp() {
+ return (modifiers & AccStrictfp) != 0;
+}
+/* Answer true if the receiver is in the superclass hierarchy of aType
+*
+* NOTE: Object.isSuperclassOf(Object) -> false
+*/
+
+public boolean isSuperclassOf(ReferenceBinding otherType) {
+ while ((otherType = otherType.superclass()) != null) {
+ if (this.isEquivalentTo(otherType)) return true;
+ }
+ return false;
+}
+
+/* Answer true if the receiver is deprecated (or any of its enclosing types)
+*/
+
+public final boolean isViewedAsDeprecated() {
+ return (modifiers & AccDeprecated) != 0 ||
+ (modifiers & AccDeprecatedImplicitly) != 0;
+}
+public ReferenceBinding[] memberTypes() {
+ return NoMemberTypes;
+}
+public MethodBinding[] methods() {
+ return NoMethods;
+}
+/**
+* Answer the source name for the type.
+* In the case of member types, as the qualified name from its top level type.
+* For example, for a member type N defined inside M & A: "A.M.N".
+*/
+
+public char[] qualifiedSourceName() {
+ if (isMemberType())
+ return CharOperation.concat(enclosingType().qualifiedSourceName(), sourceName(), '.');
+ return sourceName();
+}
+
+public char[] readableName() /*java.lang.Object, p.X<T> */ {
+ char[] readableName;
+ if (isMemberType()) {
+ readableName = CharOperation.concat(enclosingType().readableName(), sourceName, '.');
+ } else {
+ readableName = CharOperation.concatWith(compoundName, '.');
+ }
+ TypeVariableBinding[] typeVars;
+ if ((typeVars = this.typeVariables()) != NoTypeVariables) {
+ StringBuffer nameBuffer = new StringBuffer(10);
+ nameBuffer.append(readableName).append('<');
+ for (int i = 0, length = typeVars.length; i < length; i++) {
+ if (i > 0) nameBuffer.append(',');
+ nameBuffer.append(typeVars[i].readableName());
+ }
+ nameBuffer.append('>');
+ int nameLength = nameBuffer.length();
+ readableName = new char[nameLength];
+ nameBuffer.getChars(0, nameLength, readableName, 0);
+ }
+ return readableName;
+}
+
+public char[] shortReadableName() /*Object*/ {
+ char[] shortReadableName;
+ if (isMemberType()) {
+ shortReadableName = CharOperation.concat(enclosingType().shortReadableName(), sourceName, '.');
+ } else {
+ shortReadableName = this.sourceName;
+ }
+ TypeVariableBinding[] typeVars;
+ if ((typeVars = this.typeVariables()) != NoTypeVariables) {
+ StringBuffer nameBuffer = new StringBuffer(10);
+ nameBuffer.append(shortReadableName).append('<');
+ for (int i = 0, length = typeVars.length; i < length; i++) {
+ if (i > 0) nameBuffer.append(',');
+ nameBuffer.append(typeVars[i].shortReadableName());
+ }
+ nameBuffer.append('>');
+ int nameLength = nameBuffer.length();
+ shortReadableName = new char[nameLength];
+ nameBuffer.getChars(0, nameLength, shortReadableName, 0);
+ }
+ return shortReadableName;
+}
+
+/* Answer the receiver's signature.
+*
+* NOTE: This method should only be used during/after code gen.
+*/
+
+public char[] signature() /* Ljava/lang/Object; */ {
+ if (signature != null)
+ return signature;
+
+ return signature = CharOperation.concat('L', constantPoolName(), ';');
+}
+public char[] sourceName() {
+ return sourceName;
+}
+
+public ReferenceBinding superclass() {
+ return null;
+}
+public ReferenceBinding[] superInterfaces() {
+ return NoSuperInterfaces;
+}
+public ReferenceBinding[] syntheticEnclosingInstanceTypes() {
+ if (isStatic()) return null;
+
+ ReferenceBinding enclosingType = enclosingType();
+ if (enclosingType == null)
+ return null;
+ return new ReferenceBinding[] {enclosingType};
+}
+public SyntheticArgumentBinding[] syntheticOuterLocalVariables() {
+ return null; // is null if no enclosing instances are required
+}
+
+MethodBinding[] unResolvedMethods() { // for the MethodVerifier so it doesn't resolve types
+ return methods();
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/Scope.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/Scope.js
new file mode 100644
index 0000000..5edd9c3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/Scope.js
@@ -0,0 +1,2887 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.ast.*;
+import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.wst.jsdt.internal.compiler.impl.ReferenceContext;
+import org.eclipse.wst.jsdt.internal.compiler.problem.AbortCompilation;
+import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemReporter;
+import org.eclipse.wst.jsdt.internal.compiler.util.HashtableOfObject;
+import org.eclipse.wst.jsdt.internal.compiler.util.ObjectVector;
+
+public abstract class Scope
+ implements BaseTypes, BindingIds, CompilerModifiers, ProblemReasons, TagBits, TypeConstants, TypeIds {
+
+ public final static int BLOCK_SCOPE = 1;
+ public final static int CLASS_SCOPE = 3;
+ public final static int COMPILATION_UNIT_SCOPE = 4;
+ public final static int METHOD_SCOPE = 2;
+
+ /* Answer an int describing the relationship between the given types.
+ *
+ * NotRelated
+ * EqualOrMoreSpecific : left is compatible with right
+ * MoreGeneric : right is compatible with left
+ */
+ public static int compareTypes(TypeBinding left, TypeBinding right) {
+ if (left.isCompatibleWith(right))
+ return EqualOrMoreSpecific;
+ if (right.isCompatibleWith(left))
+ return MoreGeneric;
+ return NotRelated;
+ }
+
+ /**
+ * Returns an array of types, where original types got substituted given a substitution.
+ * Only allocate an array if anything is different.
+ */
+ public static ReferenceBinding[] substitute(Substitution substitution, ReferenceBinding[] originalTypes) {
+ ReferenceBinding[] substitutedTypes = originalTypes;
+ for (int i = 0, length = originalTypes.length; i < length; i++) {
+ ReferenceBinding originalType = originalTypes[i];
+ ReferenceBinding substitutedParameter = (ReferenceBinding)substitution.substitute(originalType);
+ if (substitutedParameter != originalType) {
+ if (substitutedTypes == originalTypes) {
+ System.arraycopy(originalTypes, 0, substitutedTypes = new ReferenceBinding[length], 0, i);
+ }
+ substitutedTypes[i] = substitutedParameter;
+ } else if (substitutedTypes != originalTypes) {
+ substitutedTypes[i] = originalType;
+ }
+ }
+ return substitutedTypes;
+ }
+
+ /**
+ * Returns an array of types, where original types got substituted given a substitution.
+ * Only allocate an array if anything is different.
+ */
+ public static TypeBinding[] substitute(Substitution substitution, TypeBinding[] originalTypes) {
+ TypeBinding[] substitutedTypes = originalTypes;
+ for (int i = 0, length = originalTypes.length; i < length; i++) {
+ TypeBinding originalType = originalTypes[i];
+ TypeBinding substitutedParameter = substitution.substitute(originalType);
+ if (substitutedParameter != originalType) {
+ if (substitutedTypes == originalTypes) {
+ System.arraycopy(originalTypes, 0, substitutedTypes = new TypeBinding[length], 0, i);
+ }
+ substitutedTypes[i] = substitutedParameter;
+ } else if (substitutedTypes != originalTypes) {
+ substitutedTypes[i] = originalType;
+ }
+ }
+ return substitutedTypes;
+ }
+
+ public int kind;
+ public Scope parent;
+
+ protected Scope(int kind, Scope parent) {
+ this.kind = kind;
+ this.parent = parent;
+ }
+
+ /*
+ * Boxing primitive
+ */
+ public int boxing(int id) {
+ switch (id) {
+ case T_int :
+ return T_JavaLangInteger;
+ case T_byte :
+ return T_JavaLangByte;
+ case T_short :
+ return T_JavaLangShort;
+ case T_char :
+ return T_JavaLangCharacter;
+ case T_long :
+ return T_JavaLangLong;
+ case T_float :
+ return T_JavaLangFloat;
+ case T_double :
+ return T_JavaLangDouble;
+ case T_boolean :
+ return T_JavaLangBoolean;
+ case T_void :
+ return T_JavaLangVoid;
+ }
+ return id;
+ }
+ /*
+ * Boxing primitive
+ */
+ public TypeBinding boxing(TypeBinding type) {
+ TypeBinding boxedType;
+ switch (type.id) {
+ case T_int :
+ boxedType = environment().getType(JAVA_LANG_INTEGER);
+ if (boxedType != null) return boxedType;
+ return new ProblemReferenceBinding( JAVA_LANG_INTEGER, NotFound);
+ case T_byte :
+ boxedType = environment().getType(JAVA_LANG_BYTE);
+ if (boxedType != null) return boxedType;
+ return new ProblemReferenceBinding( JAVA_LANG_BYTE, NotFound);
+ case T_short :
+ boxedType = environment().getType(JAVA_LANG_SHORT);
+ if (boxedType != null) return boxedType;
+ return new ProblemReferenceBinding( JAVA_LANG_SHORT, NotFound);
+ case T_char :
+ boxedType = environment().getType(JAVA_LANG_CHARACTER);
+ if (boxedType != null) return boxedType;
+ return new ProblemReferenceBinding( JAVA_LANG_CHARACTER, NotFound);
+ case T_long :
+ boxedType = environment().getType(JAVA_LANG_LONG);
+ if (boxedType != null) return boxedType;
+ return new ProblemReferenceBinding( JAVA_LANG_LONG, NotFound);
+ case T_float :
+ boxedType = environment().getType(JAVA_LANG_FLOAT);
+ if (boxedType != null) return boxedType;
+ return new ProblemReferenceBinding( JAVA_LANG_FLOAT, NotFound);
+ case T_double :
+ boxedType = environment().getType(JAVA_LANG_DOUBLE);
+ if (boxedType != null) return boxedType;
+ return new ProblemReferenceBinding( JAVA_LANG_DOUBLE, NotFound);
+ case T_boolean :
+ boxedType = environment().getType(JAVA_LANG_BOOLEAN);
+ if (boxedType != null) return boxedType;
+ return new ProblemReferenceBinding( JAVA_LANG_BOOLEAN, NotFound);
+ case T_void :
+ boxedType = environment().getType(JAVA_LANG_VOID);
+ if (boxedType != null) return boxedType;
+ return new ProblemReferenceBinding( JAVA_LANG_VOID, NotFound);
+ }
+ return type;
+ }
+
+ public final ClassScope classScope() {
+ Scope scope = this;
+ do {
+ if (scope instanceof ClassScope)
+ return (ClassScope) scope;
+ scope = scope.parent;
+ } while (scope != null);
+ return null;
+ }
+
+ /* Answer an int describing the relationship between the given type and unchecked exceptions.
+ *
+ * NotRelated
+ * EqualOrMoreSpecific : type is known for sure to be an unchecked exception type
+ * MoreGeneric : type is a supertype of an actual unchecked exception type
+ */
+ public int compareUncheckedException(ReferenceBinding type) {
+ int comparison = compareTypes(type, getJavaLangRuntimeException());
+ if (comparison != 0) return comparison;
+ return compareTypes(type, getJavaLangError());
+ }
+
+ public final CompilationUnitScope compilationUnitScope() {
+ Scope lastScope = null;
+ Scope scope = this;
+ do {
+ lastScope = scope;
+ scope = scope.parent;
+ } while (scope != null);
+ return (CompilationUnitScope) lastScope;
+ }
+
+ /**
+ * Internal use only
+ * Given a method, returns null if arguments cannot be converted to parameters.
+ * Will answer a subsituted method in case the method was generic and type inference got triggered;
+ * in case the method was originally compatible, then simply answer it back.
+ */
+ protected final MethodBinding computeCompatibleMethod(MethodBinding method, TypeBinding[] arguments, InvocationSite invocationSite) {
+
+ TypeBinding[] genericTypeArguments = invocationSite.genericTypeArguments();
+ TypeBinding[] parameters = method.parameters;
+ if (parameters == arguments
+ && (method.returnType.tagBits & HasTypeVariable) == 0
+ && genericTypeArguments == null)
+ return method;
+
+ int argLength = arguments.length;
+ if (argLength != parameters.length)
+ return null; // incompatible
+
+ TypeVariableBinding[] typeVariables = method.typeVariables;
+ if (typeVariables != NoTypeVariables) { // generic method
+ method = ParameterizedGenericMethodBinding.computeCompatibleMethod(method, arguments, this, invocationSite);
+ if (method == null) return null; // incompatible
+ if (!method.isValidBinding()) return method; // bound check issue is taking precedence
+ parameters = method.parameters; // reacquire them after type inference has performed
+ } else if (genericTypeArguments != null) {
+ if (method instanceof ParameterizedGenericMethodBinding) {
+ if (method.declaringClass.isRawType())
+ return new ProblemMethodBinding(method, method.selector, genericTypeArguments, TypeArgumentsForRawGenericMethod); // attempt to invoke generic method of raw type with type hints <String>foo()
+ } else {
+ return new ProblemMethodBinding(method, method.selector, genericTypeArguments, TypeParameterArityMismatch);
+ }
+ }
+
+ argumentCompatibility: {
+ for (int i = 0; i < argLength; i++)
+ if (parameters[i] != arguments[i] && !arguments[i].isCompatibleWith(parameters[i]))
+ break argumentCompatibility;
+ return method; // compatible
+ }
+ if (genericTypeArguments != null) {
+ return new ProblemMethodBinding(method, method.selector, arguments, ParameterizedMethodTypeMismatch);
+ }
+ return null; // incompatible
+ }
+
+ protected boolean connectTypeVariables(TypeParameter[] typeParameters) {
+ boolean noProblems = true;
+ if (typeParameters == null || environment().options.sourceLevel < ClassFileConstants.JDK1_5) return true;
+
+ nextVariable : for (int i = 0, paramLength = typeParameters.length; i < paramLength; i++) {
+ TypeParameter typeParameter = typeParameters[i];
+ TypeVariableBinding typeVariable = typeParameter.binding;
+ if (typeVariable == null) return false;
+
+ typeVariable.superclass = getJavaLangObject();
+ typeVariable.superInterfaces = NoSuperInterfaces;
+ // set firstBound to the binding of the first explicit bound in parameter declaration
+ typeVariable.firstBound = null; // first bound used to compute erasure
+
+ TypeReference typeRef = typeParameter.type;
+ if (typeRef == null)
+ continue nextVariable;
+ ReferenceBinding superType = this.kind == METHOD_SCOPE
+ ? (ReferenceBinding) typeRef.resolveType((BlockScope)this)
+ : (ReferenceBinding) typeRef.resolveType((ClassScope)this);
+ if (superType == null) {
+ typeVariable.tagBits |= HierarchyHasProblems;
+ noProblems = false;
+ continue nextVariable;
+ }
+ if (superType.isTypeVariable()) {
+ TypeVariableBinding varSuperType = (TypeVariableBinding) superType;
+ if (varSuperType.rank >= typeVariable.rank && varSuperType.declaringElement == typeVariable.declaringElement) {
+ problemReporter().forwardTypeVariableReference(typeParameter, varSuperType);
+ typeVariable.tagBits |= HierarchyHasProblems;
+ noProblems = false;
+ continue nextVariable;
+ }
+ }
+ if (superType.isFinal())
+ problemReporter().finalVariableBound(typeVariable, typeRef);
+ typeRef.resolvedType = superType; // hold onto the problem type
+ if (superType.isClass()) {
+ typeVariable.superclass = superType;
+ } else {
+ typeVariable.superInterfaces = new ReferenceBinding[] {superType};
+ typeVariable.modifiers |= AccInterface;
+ }
+ typeVariable.firstBound = superType; // first bound used to compute erasure
+
+ TypeReference[] boundRefs = typeParameter.bounds;
+ if (boundRefs != null) {
+ for (int j = 0, k = boundRefs.length; j < k; j++) {
+ typeRef = boundRefs[j];
+ superType = this.kind == METHOD_SCOPE
+ ? (ReferenceBinding) typeRef.resolveType((BlockScope)this)
+ : (ReferenceBinding) typeRef.resolveType((ClassScope)this);
+ if (superType == null) {
+ typeVariable.tagBits |= HierarchyHasProblems;
+ noProblems = false;
+ continue nextVariable;
+ }
+ typeRef.resolvedType = superType; // hold onto the problem type
+ if (superType.isClass()) {
+ problemReporter().boundsMustBeAnInterface(typeRef, superType);
+ typeVariable.tagBits |= HierarchyHasProblems;
+ noProblems = false;
+ continue nextVariable;
+ }
+ int size = typeVariable.superInterfaces.length;
+ System.arraycopy(typeVariable.superInterfaces, 0, typeVariable.superInterfaces = new ReferenceBinding[size + 1], 0, size);
+ typeVariable.superInterfaces[size] = superType;
+ }
+ }
+ }
+ return noProblems;
+ }
+
+ public TypeBinding convertToRawType(TypeBinding type) {
+ if (type.isArrayType()) {
+ TypeBinding leafComponentType = type.leafComponentType();
+ if (leafComponentType.isGenericType())
+ return createArrayType(environment().createRawType((ReferenceBinding) leafComponentType, null), type.dimensions());
+ } else if (type.isGenericType()) {
+ return environment().createRawType((ReferenceBinding) type, null);
+ }
+ return type;
+ }
+
+ public ArrayBinding createArrayType(TypeBinding type, int dimension) {
+ if (type.isValidBinding())
+ return environment().createArrayType(type, dimension);
+ // do not cache obvious invalid types
+ return new ArrayBinding(type, dimension, environment());
+ }
+
+ public ParameterizedTypeBinding createParameterizedType(ReferenceBinding genericType, TypeBinding[] arguments, ReferenceBinding enclosingType) {
+ valid: {
+ if (!genericType.isValidBinding()) break valid;
+ for (int i = 0, max = arguments == null ? 0 : arguments.length; i < max; i++){
+ if (!arguments[i].isValidBinding()) break valid;
+ }
+ return environment().createParameterizedType(genericType, arguments, enclosingType);
+ }
+ return new ParameterizedTypeBinding(genericType, arguments, enclosingType, environment());
+ }
+
+ public TypeVariableBinding[] createTypeVariables(TypeParameter[] typeParameters, Binding declaringElement) {
+
+ PackageBinding unitPackage = compilationUnitScope().fPackage;
+
+ // do not construct type variables if source < 1.5
+ if (typeParameters == null || environment().options.sourceLevel < ClassFileConstants.JDK1_5) {
+ return NoTypeVariables;
+ }
+ TypeVariableBinding[] typeVariableBindings = NoTypeVariables;
+
+ int length = typeParameters.length;
+ typeVariableBindings = new TypeVariableBinding[length];
+ HashtableOfObject knownTypeParameterNames = new HashtableOfObject(length);
+ int count = 0;
+ nextParameter : for (int i = 0; i < length; i++) {
+ TypeParameter typeParameter = typeParameters[i];
+ TypeVariableBinding parameterBinding = new TypeVariableBinding(typeParameter.name, declaringElement, i);
+ parameterBinding.fPackage = unitPackage;
+ typeParameter.binding = parameterBinding;
+
+ if (knownTypeParameterNames.containsKey(typeParameter.name)) {
+ TypeVariableBinding previousBinding = (TypeVariableBinding) knownTypeParameterNames.get(typeParameter.name);
+ if (previousBinding != null) {
+ for (int j = 0; j < i; j++) {
+ TypeParameter previousParameter = typeParameters[j];
+ if (previousParameter.binding == previousBinding) {
+ problemReporter().duplicateTypeParameterInType(previousParameter);
+ previousParameter.binding = null;
+ break;
+ }
+ }
+ }
+ knownTypeParameterNames.put(typeParameter.name, null); // ensure that the duplicate parameter is found & removed
+ problemReporter().duplicateTypeParameterInType(typeParameter);
+ typeParameter.binding = null;
+ } else {
+ knownTypeParameterNames.put(typeParameter.name, parameterBinding);
+ // remember that we have seen a field with this name
+ if (parameterBinding != null)
+ typeVariableBindings[count++] = parameterBinding;
+ }
+// TODO should offer warnings to inform about hiding declaring, enclosing or member types
+// ReferenceBinding type = sourceType;
+// // check that the member does not conflict with an enclosing type
+// do {
+// if (CharOperation.equals(type.sourceName, memberContext.name)) {
+// problemReporter().hidingEnclosingType(memberContext);
+// continue nextParameter;
+// }
+// type = type.enclosingType();
+// } while (type != null);
+// // check that the member type does not conflict with another sibling member type
+// for (int j = 0; j < i; j++) {
+// if (CharOperation.equals(referenceContext.memberTypes[j].name, memberContext.name)) {
+// problemReporter().duplicateNestedType(memberContext);
+// continue nextParameter;
+// }
+// }
+ }
+ if (count != length) {
+ System.arraycopy(typeVariableBindings, 0, typeVariableBindings = new TypeVariableBinding[count], 0, count);
+ }
+ return typeVariableBindings;
+ }
+
+ public boolean detectCycle(ReferenceBinding superType) {
+ return false;
+ }
+
+ public final ClassScope enclosingClassScope() {
+ Scope scope = this;
+ while ((scope = scope.parent) != null) {
+ if (scope instanceof ClassScope) return (ClassScope)scope;
+ }
+ return null; // may answer null if no type around
+ }
+
+ public final MethodScope enclosingMethodScope() {
+ Scope scope = this;
+ while ((scope = scope.parent) != null) {
+ if (scope instanceof MethodScope) return (MethodScope)scope;
+ }
+ return null; // may answer null if no method around
+ }
+
+ /* Answer the receiver's enclosing source type.
+ */
+ public final SourceTypeBinding enclosingSourceType() {
+ Scope scope = this;
+ do {
+ if (scope instanceof ClassScope)
+ return ((ClassScope) scope).referenceContext.binding;
+ scope = scope.parent;
+ } while (scope != null);
+ return null;
+ }
+ public final LookupEnvironment environment() {
+ Scope scope, unitScope = this;
+ while ((scope = unitScope.parent) != null)
+ unitScope = scope;
+ return ((CompilationUnitScope) unitScope).environment;
+ }
+
+ // abstract method lookup lookup (since maybe missing default abstract methods)
+ public MethodBinding findDefaultAbstractMethod(
+ ReferenceBinding receiverType,
+ char[] selector,
+ TypeBinding[] argumentTypes,
+ InvocationSite invocationSite,
+ ReferenceBinding classHierarchyStart,
+ MethodBinding matchingMethod,
+ ObjectVector found) {
+
+ int startFoundSize = found.size;
+ ReferenceBinding currentType = classHierarchyStart;
+ while (currentType != null) {
+ matchingMethod = findMethodInSuperInterfaces(currentType, selector, found, matchingMethod);
+ currentType = currentType.superclass();
+ }
+ int foundSize = found.size;
+ if (foundSize == startFoundSize) {
+ if (matchingMethod != null) compilationUnitScope().recordTypeReferences(matchingMethod.thrownExceptions);
+ return matchingMethod; // maybe null
+ }
+ MethodBinding[] candidates = new MethodBinding[foundSize - startFoundSize];
+ int candidatesCount = 0;
+ MethodBinding problemMethod = null;
+ // argument type compatibility check
+ for (int i = startFoundSize; i < foundSize; i++) {
+ MethodBinding methodBinding = (MethodBinding) found.elementAt(i);
+ MethodBinding compatibleMethod = computeCompatibleMethod(methodBinding, argumentTypes, invocationSite);
+ if (compatibleMethod != null) {
+ if (compatibleMethod.isValidBinding())
+ candidates[candidatesCount++] = compatibleMethod;
+ else if (problemMethod == null)
+ problemMethod = compatibleMethod;
+ }
+ }
+
+ if (candidatesCount == 1) {
+ compilationUnitScope().recordTypeReferences(candidates[0].thrownExceptions);
+ return candidates[0];
+ }
+ if (candidatesCount == 0) { // try to find a close match when the parameter order is wrong or missing some parameters
+ if (problemMethod != null) return problemMethod;
+ int argLength = argumentTypes.length;
+ nextMethod : for (int i = 0; i < foundSize; i++) {
+ MethodBinding methodBinding = (MethodBinding) found.elementAt(i);
+ TypeBinding[] params = methodBinding.parameters;
+ int paramLength = params.length;
+ nextArg: for (int a = 0; a < argLength; a++) {
+ TypeBinding arg = argumentTypes[a];
+ for (int p = 0; p < paramLength; p++)
+ if (params[p] == arg)
+ continue nextArg;
+ continue nextMethod;
+ }
+ return methodBinding;
+ }
+ return (MethodBinding) found.elementAt(0); // no good match so just use the first one found
+ }
+ // no need to check for visibility - interface methods are public
+ return mostSpecificInterfaceMethodBinding(candidates, candidatesCount, invocationSite);
+ }
+
+ // Internal use only
+ public ReferenceBinding findDirectMemberType(char[] typeName, ReferenceBinding enclosingType) {
+ if ((enclosingType.tagBits & HasNoMemberTypes) != 0)
+ return null; // know it has no member types (nor inherited member types)
+
+ SourceTypeBinding enclosingSourceType = enclosingSourceType();
+ compilationUnitScope().recordReference(enclosingType, typeName);
+ ReferenceBinding memberType = enclosingType.getMemberType(typeName);
+ if (memberType != null) {
+ compilationUnitScope().recordTypeReference(memberType);
+ if (enclosingSourceType == null
+ ? memberType.canBeSeenBy(getCurrentPackage())
+ : memberType.canBeSeenBy(enclosingType, enclosingSourceType))
+ return memberType;
+ return new ProblemReferenceBinding(typeName, memberType, NotVisible);
+ }
+ return null;
+ }
+
+ // Internal use only
+ public MethodBinding findExactMethod(
+ ReferenceBinding receiverType,
+ char[] selector,
+ TypeBinding[] argumentTypes,
+ InvocationSite invocationSite) {
+
+ compilationUnitScope().recordTypeReferences(argumentTypes);
+ MethodBinding exactMethod = receiverType.getExactMethod(selector, argumentTypes, compilationUnitScope());
+ if (exactMethod != null) {
+ compilationUnitScope().recordTypeReferences(exactMethod.thrownExceptions);
+ // special treatment for Object.getClass() in 1.5 mode (substitute parameterized return type)
+ if (receiverType.isInterface() || exactMethod.canBeSeenBy(receiverType, invocationSite, this)) {
+ if (receiverType.id != T_Object
+ && argumentTypes == NoParameters
+ && CharOperation.equals(selector, GETCLASS)
+ && exactMethod.returnType.isParameterizedType()/*1.5*/) {
+ return ParameterizedMethodBinding.instantiateGetClass(receiverType, exactMethod, this);
+ }
+ // targeting a generic method could find an exact match with variable return type
+ if (exactMethod.typeVariables != NoTypeVariables || invocationSite.genericTypeArguments() != null)
+ exactMethod = computeCompatibleMethod(exactMethod, argumentTypes, invocationSite);
+ return exactMethod;
+ }
+ }
+ return null;
+ }
+
+ // Internal use only
+ /* Answer the field binding that corresponds to fieldName.
+ Start the lookup at the receiverType.
+ InvocationSite implements
+ isSuperAccess(); this is used to determine if the discovered field is visible.
+ Only fields defined by the receiverType or its supertypes are answered;
+ a field of an enclosing type will not be found using this API.
+
+ If no visible field is discovered, null is answered.
+ */
+ public FieldBinding findField(TypeBinding receiverType, char[] fieldName, InvocationSite invocationSite, boolean needResolve) {
+ if (receiverType.isBaseType()) return null;
+ if (receiverType.isArrayType()) {
+ TypeBinding leafType = receiverType.leafComponentType();
+ if (leafType instanceof ReferenceBinding) {
+ if (!((ReferenceBinding) leafType).canBeSeenBy(this))
+ return new ProblemFieldBinding((ReferenceBinding)leafType, fieldName, ReceiverTypeNotVisible);
+ }
+ if (CharOperation.equals(fieldName, LENGTH))
+ return ArrayBinding.ArrayLength;
+ return null;
+ }
+
+ compilationUnitScope().recordTypeReference(receiverType);
+
+ ReferenceBinding currentType = (ReferenceBinding) receiverType;
+ if (!currentType.canBeSeenBy(this))
+ return new ProblemFieldBinding(currentType, fieldName, ReceiverTypeNotVisible);
+
+ FieldBinding field = currentType.getField(fieldName, true /*resolve*/);
+ if (field != null) {
+ if (field.canBeSeenBy(currentType, invocationSite, this))
+ return field;
+ return new ProblemFieldBinding(field /* closest match*/, field.declaringClass, fieldName, NotVisible);
+ }
+ // collect all superinterfaces of receiverType until the field is found in a supertype
+ ReferenceBinding[][] interfacesToVisit = null;
+ int lastPosition = -1;
+ FieldBinding visibleField = null;
+ boolean keepLooking = true;
+ boolean notVisible = false;
+ // we could hold onto the not visible field for extra error reporting
+ while (keepLooking) {
+ ReferenceBinding[] itsInterfaces = currentType.superInterfaces();
+ if (itsInterfaces != NoSuperInterfaces) {
+ if (interfacesToVisit == null)
+ interfacesToVisit = new ReferenceBinding[5][];
+ if (++lastPosition == interfacesToVisit.length)
+ System.arraycopy(
+ interfacesToVisit,
+ 0,
+ interfacesToVisit = new ReferenceBinding[lastPosition * 2][],
+ 0,
+ lastPosition);
+ interfacesToVisit[lastPosition] = itsInterfaces;
+ }
+ if ((currentType = currentType.superclass()) == null)
+ break;
+
+ compilationUnitScope().recordTypeReference(currentType);
+ if ((field = currentType.getField(fieldName, needResolve)) != null) {
+ keepLooking = false;
+ if (field.canBeSeenBy(receiverType, invocationSite, this)) {
+ if (visibleField == null)
+ visibleField = field;
+ else
+ return new ProblemFieldBinding(visibleField /* closest match*/, visibleField.declaringClass, fieldName, Ambiguous);
+ } else {
+ notVisible = true;
+ }
+ }
+ }
+
+ // walk all visible interfaces to find ambiguous references
+ if (interfacesToVisit != null) {
+ ProblemFieldBinding ambiguous = null;
+ done : for (int i = 0; i <= lastPosition; i++) {
+ ReferenceBinding[] interfaces = interfacesToVisit[i];
+ for (int j = 0, length = interfaces.length; j < length; j++) {
+ ReferenceBinding anInterface = interfaces[j];
+ if ((anInterface.tagBits & InterfaceVisited) == 0) {
+ // if interface as not already been visited
+ anInterface.tagBits |= InterfaceVisited;
+ compilationUnitScope().recordTypeReference(anInterface);
+ if ((field = anInterface.getField(fieldName, true /*resolve*/)) != null) {
+ if (visibleField == null) {
+ visibleField = field;
+ } else {
+ ambiguous = new ProblemFieldBinding(visibleField /* closest match*/, visibleField.declaringClass, fieldName, Ambiguous);
+ break done;
+ }
+ } else {
+ ReferenceBinding[] itsInterfaces = anInterface.superInterfaces();
+ if (itsInterfaces != NoSuperInterfaces) {
+ if (++lastPosition == interfacesToVisit.length)
+ System.arraycopy(
+ interfacesToVisit,
+ 0,
+ interfacesToVisit = new ReferenceBinding[lastPosition * 2][],
+ 0,
+ lastPosition);
+ interfacesToVisit[lastPosition] = itsInterfaces;
+ }
+ }
+ }
+ }
+ }
+
+ // bit reinitialization
+ for (int i = 0; i <= lastPosition; i++) {
+ ReferenceBinding[] interfaces = interfacesToVisit[i];
+ for (int j = 0, length = interfaces.length; j < length; j++)
+ interfaces[j].tagBits &= ~InterfaceVisited;
+ }
+ if (ambiguous != null)
+ return ambiguous;
+ }
+
+ if (visibleField != null)
+ return visibleField;
+ if (notVisible)
+ return new ProblemFieldBinding(currentType, fieldName, NotVisible);
+ return null;
+ }
+
+ // Internal use only
+ public ReferenceBinding findMemberType(char[] typeName, ReferenceBinding enclosingType) {
+ if ((enclosingType.tagBits & HasNoMemberTypes) != 0)
+ return null; // know it has no member types (nor inherited member types)
+
+ SourceTypeBinding enclosingSourceType = enclosingSourceType();
+ PackageBinding currentPackage = getCurrentPackage();
+ compilationUnitScope().recordReference(enclosingType, typeName);
+ ReferenceBinding memberType = enclosingType.getMemberType(typeName);
+ if (memberType != null) {
+ compilationUnitScope().recordTypeReference(memberType);
+ if (enclosingSourceType == null
+ ? memberType.canBeSeenBy(currentPackage)
+ : memberType.canBeSeenBy(enclosingType, enclosingSourceType))
+ return memberType;
+ return new ProblemReferenceBinding(typeName, memberType, NotVisible);
+ }
+
+ // collect all superinterfaces of receiverType until the memberType is found in a supertype
+ ReferenceBinding currentType = enclosingType;
+ ReferenceBinding[][] interfacesToVisit = null;
+ int lastPosition = -1;
+ ReferenceBinding visibleMemberType = null;
+ boolean keepLooking = true;
+ ReferenceBinding notVisible = null;
+ // we could hold onto the not visible field for extra error reporting
+ while (keepLooking) {
+ ReferenceBinding[] itsInterfaces = currentType.superInterfaces();
+ if (itsInterfaces != NoSuperInterfaces) {
+ if (interfacesToVisit == null)
+ interfacesToVisit = new ReferenceBinding[5][];
+ if (++lastPosition == interfacesToVisit.length)
+ System.arraycopy(
+ interfacesToVisit,
+ 0,
+ interfacesToVisit = new ReferenceBinding[lastPosition * 2][],
+ 0,
+ lastPosition);
+ interfacesToVisit[lastPosition] = itsInterfaces;
+ }
+ if ((currentType = currentType.superclass()) == null)
+ break;
+
+ compilationUnitScope().recordReference(currentType, typeName);
+ if ((memberType = currentType.getMemberType(typeName)) != null) {
+ compilationUnitScope().recordTypeReference(memberType);
+ keepLooking = false;
+ if (enclosingSourceType == null
+ ? memberType.canBeSeenBy(currentPackage)
+ : memberType.canBeSeenBy(enclosingType, enclosingSourceType)) {
+ if (visibleMemberType == null)
+ visibleMemberType = memberType;
+ else
+ return new ProblemReferenceBinding(typeName, Ambiguous);
+ } else {
+ notVisible = memberType;
+ }
+ }
+ }
+ // walk all visible interfaces to find ambiguous references
+ if (interfacesToVisit != null) {
+ ProblemReferenceBinding ambiguous = null;
+ done : for (int i = 0; i <= lastPosition; i++) {
+ ReferenceBinding[] interfaces = interfacesToVisit[i];
+ for (int j = 0, length = interfaces.length; j < length; j++) {
+ ReferenceBinding anInterface = interfaces[j];
+ if ((anInterface.tagBits & InterfaceVisited) == 0) {
+ // if interface as not already been visited
+ anInterface.tagBits |= InterfaceVisited;
+ compilationUnitScope().recordReference(anInterface, typeName);
+ if ((memberType = anInterface.getMemberType(typeName)) != null) {
+ compilationUnitScope().recordTypeReference(memberType);
+ if (visibleMemberType == null) {
+ visibleMemberType = memberType;
+ } else {
+ ambiguous = new ProblemReferenceBinding(typeName, Ambiguous);
+ break done;
+ }
+ } else {
+ ReferenceBinding[] itsInterfaces = anInterface.superInterfaces();
+ if (itsInterfaces != NoSuperInterfaces) {
+ if (++lastPosition == interfacesToVisit.length)
+ System.arraycopy(
+ interfacesToVisit,
+ 0,
+ interfacesToVisit = new ReferenceBinding[lastPosition * 2][],
+ 0,
+ lastPosition);
+ interfacesToVisit[lastPosition] = itsInterfaces;
+ }
+ }
+ }
+ }
+ }
+
+ // bit reinitialization
+ for (int i = 0; i <= lastPosition; i++) {
+ ReferenceBinding[] interfaces = interfacesToVisit[i];
+ for (int j = 0, length = interfaces.length; j < length; j++)
+ interfaces[j].tagBits &= ~InterfaceVisited;
+ }
+ if (ambiguous != null)
+ return ambiguous;
+ }
+ if (visibleMemberType != null)
+ return visibleMemberType;
+ if (notVisible != null)
+ return new ProblemReferenceBinding(typeName, notVisible, NotVisible);
+ return null;
+ }
+
+ // Internal use only
+ public MethodBinding findMethod(
+ ReferenceBinding receiverType,
+ char[] selector,
+ TypeBinding[] argumentTypes,
+ InvocationSite invocationSite) {
+
+ ReferenceBinding currentType = receiverType;
+ MethodBinding matchingMethod = null;
+ ObjectVector found = new ObjectVector(); //TODO (kent) should rewrite to remove #matchingMethod since found is allocated anyway
+
+ compilationUnitScope().recordTypeReferences(argumentTypes);
+
+ if (currentType.isInterface()) {
+ compilationUnitScope().recordTypeReference(currentType);
+ MethodBinding[] currentMethods = currentType.getMethods(selector);
+ int currentLength = currentMethods.length;
+ if (currentLength == 1) {
+ matchingMethod = currentMethods[0];
+ } else if (currentLength > 1) {
+ found.addAll(currentMethods);
+ }
+ matchingMethod = findMethodInSuperInterfaces(currentType, selector, found, matchingMethod);
+ currentType = getJavaLangObject();
+ }
+
+ boolean isCompliant14 = compilationUnitScope().environment.options.complianceLevel >= ClassFileConstants.JDK1_4;
+ // superclass lookup
+ ReferenceBinding classHierarchyStart = currentType;
+ while (currentType != null) {
+ compilationUnitScope().recordTypeReference(currentType);
+ MethodBinding[] currentMethods = currentType.getMethods(selector);
+ int currentLength = currentMethods.length;
+
+ /*
+ * if 1.4 compliant, must filter out redundant protected methods from superclasses
+ */
+ if (isCompliant14){
+ nextMethod: for (int i = 0; i < currentLength; i++){
+ MethodBinding currentMethod = currentMethods[i];
+ // protected method need to be checked only - default access is already dealt with in #canBeSeen implementation
+ // when checking that p.C -> q.B -> p.A cannot see default access members from A through B.
+ if ((currentMethod.modifiers & AccProtected) == 0) continue nextMethod;
+ if (matchingMethod != null){
+ if (currentMethod.areParametersEqual(matchingMethod)){
+ currentLength--;
+ currentMethods[i] = null; // discard this match
+ continue nextMethod;
+ }
+ } else {
+ for (int j = 0, max = found.size; j < max; j++) {
+ if (((MethodBinding)found.elementAt(j)).areParametersEqual(currentMethod)){
+ currentLength--;
+ currentMethods[i] = null;
+ continue nextMethod;
+ }
+ }
+ }
+ }
+ }
+
+ if (currentLength == 1 && matchingMethod == null && found.size == 0) {
+ matchingMethod = currentMethods[0];
+ } else if (currentLength > 0) {
+ if (matchingMethod != null) {
+ found.add(matchingMethod);
+ matchingMethod = null;
+ }
+ // append currentMethods, filtering out null entries
+ int maxMethod = currentMethods.length;
+ if (maxMethod == currentLength) { // no method was eliminated for 1.4 compliance (see above)
+ found.addAll(currentMethods);
+ } else {
+ for (int i = 0, max = currentMethods.length; i < max; i++) {
+ MethodBinding currentMethod = currentMethods[i];
+ if (currentMethod != null) found.add(currentMethod);
+ }
+ }
+ }
+ currentType = currentType.superclass();
+ }
+
+ // if found several candidates, then eliminate those not matching argument types
+ int foundSize = found.size;
+ MethodBinding[] candidates = null;
+ int candidatesCount = 0;
+ boolean checkedMatchingMethod = false; // is matchingMethod meeting argument expectation ?
+ MethodBinding problemMethod = null;
+ if (foundSize > 0) {
+ // argument type compatibility check
+ for (int i = 0; i < foundSize; i++) {
+ MethodBinding methodBinding = (MethodBinding) found.elementAt(i);
+ MethodBinding compatibleMethod = computeCompatibleMethod(methodBinding, argumentTypes, invocationSite);
+ if (compatibleMethod != null) {
+ if (compatibleMethod.isValidBinding()) {
+ switch (candidatesCount) {
+ case 0:
+ matchingMethod = compatibleMethod; // if only one match, reuse matchingMethod
+ checkedMatchingMethod = true; // matchingMethod is known to exist and match params here
+ break;
+ case 1:
+ candidates = new MethodBinding[foundSize]; // only lazily created if more than one match
+ candidates[0] = matchingMethod; // copy back
+ matchingMethod = null;
+ // fall through
+ default:
+ candidates[candidatesCount] = compatibleMethod;
+ }
+ candidatesCount++;
+ } else if (problemMethod == null) {
+ problemMethod = compatibleMethod;
+ }
+ }
+ }
+ }
+ if (candidatesCount > 0)
+ problemMethod = null; // forget the problem method if candidates were found
+
+ // if only one matching method left (either from start or due to elimination of rivals), then match is in matchingMethod
+ if (matchingMethod != null) {
+ if (!checkedMatchingMethod) {
+ MethodBinding compatibleMethod = computeCompatibleMethod(matchingMethod, argumentTypes, invocationSite);
+ if (compatibleMethod != null) {
+ if (compatibleMethod.isValidBinding()) {
+ matchingMethod = compatibleMethod;
+ checkedMatchingMethod = true;
+ } else {
+ problemMethod = compatibleMethod;
+ }
+ }
+ }
+ if (checkedMatchingMethod) {
+ // (if no default abstract) must explicitly look for one instead, which could be a better match
+ if (!matchingMethod.canBeSeenBy(receiverType, invocationSite, this)) {
+ // ignore matching method (to be consistent with multiple matches, none visible (matching method is then null)
+ MethodBinding interfaceMethod =
+ findDefaultAbstractMethod(receiverType, selector, argumentTypes, invocationSite, classHierarchyStart, null, found);
+ if (interfaceMethod != null) return interfaceMethod;
+ compilationUnitScope().recordTypeReferences(matchingMethod.thrownExceptions);
+ return matchingMethod;
+ }
+ }
+ matchingMethod =
+ findDefaultAbstractMethod(receiverType, selector, argumentTypes, invocationSite, classHierarchyStart, matchingMethod, found);
+ if (matchingMethod != null) return matchingMethod;
+ return problemMethod;
+ }
+
+ // no match was found, try to find a close match when the parameter order is wrong or missing some parameters
+ if (candidatesCount == 0) {
+ MethodBinding interfaceMethod =
+ findDefaultAbstractMethod(receiverType, selector, argumentTypes, invocationSite, classHierarchyStart, matchingMethod, found);
+ if (interfaceMethod != null) return interfaceMethod;
+ if (problemMethod != null) return problemMethod;
+
+ int argLength = argumentTypes.length;
+ foundSize = found.size;
+ nextMethod : for (int i = 0; i < foundSize; i++) {
+ MethodBinding methodBinding = (MethodBinding) found.elementAt(i);
+ TypeBinding[] params = methodBinding.parameters;
+ int paramLength = params.length;
+ nextArg: for (int a = 0; a < argLength; a++) {
+ TypeBinding arg = argumentTypes[a];
+ for (int p = 0; p < paramLength; p++)
+ if (params[p] == arg)
+ continue nextArg;
+ continue nextMethod;
+ }
+ return methodBinding;
+ }
+ return (MethodBinding) found.elementAt(0); // no good match so just use the first one found
+ }
+
+ // check for duplicate parameterized methods
+ if (compilationUnitScope().environment.options.sourceLevel >= ClassFileConstants.JDK1_5) {
+ for (int i = 0; i < candidatesCount; i++) {
+ MethodBinding current = candidates[i];
+ if (current instanceof ParameterizedMethodBinding)
+ for (int j = i + 1; j < candidatesCount; j++)
+ if (current.declaringClass == candidates[j].declaringClass && current.areParametersEqual(candidates[j]))
+ return new ProblemMethodBinding(candidates[i].selector, candidates[i].parameters, Ambiguous);
+ }
+ }
+
+ // tiebreak using visibility check
+ int visiblesCount = 0;
+ for (int i = 0; i < candidatesCount; i++) {
+ MethodBinding methodBinding = candidates[i];
+ if (methodBinding.canBeSeenBy(receiverType, invocationSite, this)) {
+ if (visiblesCount != i) {
+ candidates[i] = null;
+ candidates[visiblesCount] = methodBinding;
+ }
+ visiblesCount++;
+ }
+ }
+ if (visiblesCount == 1) {
+ compilationUnitScope().recordTypeReferences(candidates[0].thrownExceptions);
+ return candidates[0];
+ }
+ if (visiblesCount == 0) {
+ MethodBinding interfaceMethod =
+ findDefaultAbstractMethod(receiverType, selector, argumentTypes, invocationSite, classHierarchyStart, matchingMethod, found);
+ if (interfaceMethod != null) return interfaceMethod;
+ return new ProblemMethodBinding(candidates[0], candidates[0].selector, candidates[0].parameters, NotVisible);
+ }
+ if (isCompliant14)
+ return mostSpecificMethodBinding(candidates, visiblesCount, invocationSite);
+ return candidates[0].declaringClass.isClass()
+ ? mostSpecificClassMethodBinding(candidates, visiblesCount, invocationSite)
+ : mostSpecificInterfaceMethodBinding(candidates, visiblesCount, invocationSite);
+ }
+
+ // Internal use only
+ public MethodBinding findMethodForArray(
+ ArrayBinding receiverType,
+ char[] selector,
+ TypeBinding[] argumentTypes,
+ InvocationSite invocationSite) {
+
+ TypeBinding leafType = receiverType.leafComponentType();
+ if (leafType instanceof ReferenceBinding) {
+ if (!((ReferenceBinding) leafType).canBeSeenBy(this))
+ return new ProblemMethodBinding(selector, TypeConstants.NoParameters, (ReferenceBinding)leafType, ReceiverTypeNotVisible);
+ }
+
+ ReferenceBinding object = getJavaLangObject();
+ MethodBinding methodBinding = object.getExactMethod(selector, argumentTypes);
+ if (methodBinding != null) {
+ // handle the method clone() specially... cannot be protected or throw exceptions
+ if (argumentTypes == NoParameters) {
+ switch (selector[0]) {
+ case 'c':
+ if (CharOperation.equals(selector, CLONE))
+ return new UpdatedMethodBinding(
+ environment().options.targetJDK >= ClassFileConstants.JDK1_4 ? (TypeBinding)receiverType : (TypeBinding)object, // remember its array type for codegen purpose on target>=1.4.0
+ (methodBinding.modifiers ^ AccProtected) | AccPublic,
+ CLONE,
+ methodBinding.returnType,
+ argumentTypes,
+ null,
+ object);
+ break;
+ case 'g':
+ if (CharOperation.equals(selector, GETCLASS) && methodBinding.returnType.isParameterizedType()/*1.5*/) {
+ return ParameterizedMethodBinding.instantiateGetClass(receiverType, methodBinding, this);
+ }
+ break;
+ }
+ }
+ if (methodBinding.canBeSeenBy(receiverType, invocationSite, this))
+ return methodBinding;
+ }
+ // answers closest approximation, may not check argumentTypes or visibility
+ methodBinding = findMethod(object, selector, argumentTypes, invocationSite);
+ if (methodBinding == null)
+ return new ProblemMethodBinding(selector, argumentTypes, NotFound);
+ if (methodBinding.isValidBinding()) {
+ MethodBinding compatibleMethod = computeCompatibleMethod(methodBinding, argumentTypes, invocationSite);
+ if (compatibleMethod == null)
+ return new ProblemMethodBinding(methodBinding, selector, argumentTypes, NotFound);
+ if (!compatibleMethod.isValidBinding())
+ return compatibleMethod;
+
+ methodBinding = compatibleMethod;
+ if (!methodBinding.canBeSeenBy(receiverType, invocationSite, this))
+ return new ProblemMethodBinding(methodBinding, selector, methodBinding.parameters, NotVisible);
+ }
+ return methodBinding;
+ }
+
+ public MethodBinding findMethodInSuperInterfaces(
+ ReferenceBinding currentType,
+ char[] selector,
+ ObjectVector found,
+ MethodBinding matchingMethod) {
+
+ ReferenceBinding[] itsInterfaces = currentType.superInterfaces();
+ if (itsInterfaces != NoSuperInterfaces) {
+ ReferenceBinding[][] interfacesToVisit = new ReferenceBinding[5][];
+ int lastPosition = -1;
+ if (++lastPosition == interfacesToVisit.length)
+ System.arraycopy(
+ interfacesToVisit, 0,
+ interfacesToVisit = new ReferenceBinding[lastPosition * 2][], 0,
+ lastPosition);
+ interfacesToVisit[lastPosition] = itsInterfaces;
+
+ for (int i = 0; i <= lastPosition; i++) {
+ ReferenceBinding[] interfaces = interfacesToVisit[i];
+ for (int j = 0, length = interfaces.length; j < length; j++) {
+ currentType = interfaces[j];
+ if ((currentType.tagBits & InterfaceVisited) == 0) {
+ // if interface as not already been visited
+ currentType.tagBits |= InterfaceVisited;
+
+ compilationUnitScope().recordTypeReference(currentType);
+ MethodBinding[] currentMethods = currentType.getMethods(selector);
+ int currentLength = currentMethods.length;
+ if (currentLength == 1 && matchingMethod == null && found.size == 0) {
+ matchingMethod = currentMethods[0];
+ } else if (currentLength > 0) {
+ if (matchingMethod != null) {
+ found.add(matchingMethod);
+ matchingMethod = null;
+ }
+ found.addAll(currentMethods);
+ }
+ itsInterfaces = currentType.superInterfaces();
+ if (itsInterfaces != NoSuperInterfaces) {
+ if (++lastPosition == interfacesToVisit.length)
+ System.arraycopy(
+ interfacesToVisit, 0,
+ interfacesToVisit = new ReferenceBinding[lastPosition * 2][], 0,
+ lastPosition);
+ interfacesToVisit[lastPosition] = itsInterfaces;
+ }
+ }
+ }
+ }
+
+ // bit reinitialization
+ for (int i = 0; i <= lastPosition; i++) {
+ ReferenceBinding[] interfaces = interfacesToVisit[i];
+ for (int j = 0, length = interfaces.length; j < length; j++)
+ interfaces[j].tagBits &= ~InterfaceVisited;
+ }
+ }
+ return matchingMethod;
+ }
+
+ // Internal use only
+ public ReferenceBinding findType(
+ char[] typeName,
+ PackageBinding declarationPackage,
+ PackageBinding invocationPackage) {
+
+ compilationUnitScope().recordReference(declarationPackage.compoundName, typeName);
+ ReferenceBinding typeBinding = declarationPackage.getType(typeName);
+ if (typeBinding == null)
+ return null;
+
+ if (typeBinding.isValidBinding()) {
+ if (declarationPackage != invocationPackage && !typeBinding.canBeSeenBy(invocationPackage))
+ return new ProblemReferenceBinding(typeName, typeBinding, NotVisible);
+ }
+ return typeBinding;
+ }
+
+ public LocalVariableBinding findVariable(char[] variable) {
+
+ return null;
+ }
+
+ public TypeBinding getBaseType(char[] name) {
+ // list should be optimized (with most often used first)
+ int length = name.length;
+ if (length > 2 && length < 8) {
+ switch (name[0]) {
+ case 'i' :
+ if (length == 3 && name[1] == 'n' && name[2] == 't')
+ return IntBinding;
+ break;
+ case 'v' :
+ if (length == 4 && name[1] == 'o' && name[2] == 'i' && name[3] == 'd')
+ return VoidBinding;
+ break;
+ case 'b' :
+ if (length == 7
+ && name[1] == 'o'
+ && name[2] == 'o'
+ && name[3] == 'l'
+ && name[4] == 'e'
+ && name[5] == 'a'
+ && name[6] == 'n')
+ return BooleanBinding;
+ if (length == 4 && name[1] == 'y' && name[2] == 't' && name[3] == 'e')
+ return ByteBinding;
+ break;
+ case 'c' :
+ if (length == 4 && name[1] == 'h' && name[2] == 'a' && name[3] == 'r')
+ return CharBinding;
+ break;
+ case 'd' :
+ if (length == 6
+ && name[1] == 'o'
+ && name[2] == 'u'
+ && name[3] == 'b'
+ && name[4] == 'l'
+ && name[5] == 'e')
+ return DoubleBinding;
+ break;
+ case 'f' :
+ if (length == 5
+ && name[1] == 'l'
+ && name[2] == 'o'
+ && name[3] == 'a'
+ && name[4] == 't')
+ return FloatBinding;
+ break;
+ case 'l' :
+ if (length == 4 && name[1] == 'o' && name[2] == 'n' && name[3] == 'g')
+ return LongBinding;
+ break;
+ case 's' :
+ if (length == 5
+ && name[1] == 'h'
+ && name[2] == 'o'
+ && name[3] == 'r'
+ && name[4] == 't')
+ return ShortBinding;
+ }
+ }
+ return null;
+ }
+
+ /* API
+ *
+ * Answer the binding that corresponds to the argument name.
+ * flag is a mask of the following values VARIABLE (= FIELD or LOCAL), TYPE, PACKAGE.
+ * Only bindings corresponding to the mask can be answered.
+ *
+ * For example, getBinding("foo", VARIABLE, site) will answer
+ * the binding for the field or local named "foo" (or an error binding if none exists).
+ * If a type named "foo" exists, it will not be detected (and an error binding will be answered)
+ *
+ * The VARIABLE mask has precedence over the TYPE mask.
+ *
+ * If the VARIABLE mask is not set, neither fields nor locals will be looked for.
+ *
+ * InvocationSite implements:
+ * isSuperAccess(); this is used to determine if the discovered field is visible.
+ *
+ * Limitations: cannot request FIELD independently of LOCAL, or vice versa
+ */
+ public Binding getBinding(char[] name, int mask, InvocationSite invocationSite, boolean needResolve) {
+
+ try {
+ Binding binding = null;
+ FieldBinding problemField = null;
+ if ((mask & VARIABLE) != 0) {
+ boolean insideStaticContext = false;
+ boolean insideConstructorCall = false;
+
+ FieldBinding foundField = null;
+ // can be a problem field which is answered if a valid field is not found
+ ProblemFieldBinding foundInsideProblem = null;
+ // inside Constructor call or inside static context
+ Scope scope = this;
+ int depth = 0;
+ int foundDepth = 0;
+ ReferenceBinding foundActualReceiverType = null;
+ done : while (true) { // done when a COMPILATION_UNIT_SCOPE is found
+ switch (scope.kind) {
+ case METHOD_SCOPE :
+ MethodScope methodScope = (MethodScope) scope;
+ insideStaticContext |= methodScope.isStatic;
+ insideConstructorCall |= methodScope.isConstructorCall;
+ // Fall through... could duplicate the code below to save a cast - questionable optimization
+ case BLOCK_SCOPE :
+ LocalVariableBinding variableBinding = scope.findVariable(name);
+ // looks in this scope only
+ if (variableBinding != null) {
+ if (foundField != null && foundField.isValidBinding())
+ return new ProblemFieldBinding(
+ foundField, // closest match
+ foundField.declaringClass,
+ name,
+ InheritedNameHidesEnclosingName);
+ if (depth > 0)
+ invocationSite.setDepth(depth);
+ return variableBinding;
+ }
+ break;
+ case CLASS_SCOPE :
+ ClassScope classScope = (ClassScope) scope;
+ SourceTypeBinding enclosingType = classScope.referenceContext.binding;
+ FieldBinding fieldBinding =
+ classScope.findField(enclosingType, name, invocationSite, needResolve);
+ // Use next line instead if willing to enable protected access accross inner types
+ // FieldBinding fieldBinding = findField(enclosingType, name, invocationSite);
+ if (fieldBinding != null) { // skip it if we did not find anything
+ if (fieldBinding.problemId() == Ambiguous) {
+ if (foundField == null || foundField.problemId() == NotVisible)
+ // supercedes any potential InheritedNameHidesEnclosingName problem
+ return fieldBinding;
+ // make the user qualify the field, likely wants the first inherited field (javac generates an ambiguous error instead)
+ return new ProblemFieldBinding(
+ foundField, // closest match
+ foundField.declaringClass,
+ name,
+ InheritedNameHidesEnclosingName);
+ }
+
+ ProblemFieldBinding insideProblem = null;
+ if (fieldBinding.isValidBinding()) {
+ if (!fieldBinding.isStatic()) {
+ if (insideConstructorCall) {
+ insideProblem =
+ new ProblemFieldBinding(
+ fieldBinding, // closest match
+ fieldBinding.declaringClass,
+ name,
+ NonStaticReferenceInConstructorInvocation);
+ } else if (insideStaticContext) {
+ insideProblem =
+ new ProblemFieldBinding(
+ fieldBinding, // closest match
+ fieldBinding.declaringClass,
+ name,
+ NonStaticReferenceInStaticContext);
+ }
+ }
+ if (enclosingType == fieldBinding.declaringClass
+ || environment().options.complianceLevel >= ClassFileConstants.JDK1_4){
+ // found a valid field in the 'immediate' scope (ie. not inherited)
+ // OR in 1.4 mode (inherited shadows enclosing)
+ if (foundField == null) {
+ if (depth > 0){
+ invocationSite.setDepth(depth);
+ invocationSite.setActualReceiverType(enclosingType);
+ }
+ // return the fieldBinding if it is not declared in a superclass of the scope's binding (that is, inherited)
+ return insideProblem == null ? fieldBinding : insideProblem;
+ }
+ if (foundField.isValidBinding())
+ // if a valid field was found, complain when another is found in an 'immediate' enclosing type (that is, not inherited)
+ if (foundField.declaringClass != fieldBinding.declaringClass)
+ // ie. have we found the same field - do not trust field identity yet
+ return new ProblemFieldBinding(
+ foundField, // closest match
+ foundField.declaringClass,
+ name,
+ InheritedNameHidesEnclosingName);
+ }
+ }
+
+ if (foundField == null
+ || (foundField.problemId() == NotVisible
+ && fieldBinding.problemId() != NotVisible)) {
+ // only remember the fieldBinding if its the first one found or the previous one was not visible & fieldBinding is...
+ foundDepth = depth;
+ foundActualReceiverType = enclosingType;
+ foundInsideProblem = insideProblem;
+ foundField = fieldBinding;
+ }
+ }
+ depth++;
+ insideStaticContext |= enclosingType.isStatic();
+ // 1EX5I8Z - accessing outer fields within a constructor call is permitted
+ // in order to do so, we change the flag as we exit from the type, not the method
+ // itself, because the class scope is used to retrieve the fields.
+ MethodScope enclosingMethodScope = scope.methodScope();
+ insideConstructorCall =
+ enclosingMethodScope == null ? false : enclosingMethodScope.isConstructorCall;
+ break;
+ case COMPILATION_UNIT_SCOPE :
+ break done;
+ }
+ scope = scope.parent;
+ }
+
+ if (foundInsideProblem != null)
+ return foundInsideProblem;
+ if (foundField != null) {
+ if (foundField.isValidBinding()){
+ if (foundDepth > 0){
+ invocationSite.setDepth(foundDepth);
+ invocationSite.setActualReceiverType(foundActualReceiverType);
+ }
+ return foundField;
+ }
+ problemField = foundField;
+ }
+ }
+
+ // We did not find a local or instance variable.
+ if ((mask & TYPE) != 0) {
+ if ((binding = getBaseType(name)) != null)
+ return binding;
+ binding = getTypeOrPackage(name, (mask & PACKAGE) == 0 ? TYPE : TYPE | PACKAGE);
+ if (binding.isValidBinding() || mask == TYPE)
+ return binding;
+ // answer the problem type binding if we are only looking for a type
+ } else if ((mask & PACKAGE) != 0) {
+ compilationUnitScope().recordSimpleReference(name);
+ if ((binding = environment().getTopLevelPackage(name)) != null)
+ return binding;
+ }
+ if (problemField != null) return problemField;
+ return new ProblemBinding(name, enclosingSourceType(), NotFound);
+ } catch (AbortCompilation e) {
+ e.updateContext(invocationSite, referenceCompilationUnit().compilationResult);
+ throw e;
+ }
+ }
+
+ public MethodBinding getConstructor(ReferenceBinding receiverType, TypeBinding[] argumentTypes, InvocationSite invocationSite) {
+ try {
+ compilationUnitScope().recordTypeReference(receiverType);
+ compilationUnitScope().recordTypeReferences(argumentTypes);
+ MethodBinding methodBinding = receiverType.getExactConstructor(argumentTypes);
+ if (methodBinding != null && methodBinding.canBeSeenBy(invocationSite, this)) {
+ // targeting a non generic constructor with type arguments ?
+ if (invocationSite.genericTypeArguments() != null)
+ methodBinding = computeCompatibleMethod(methodBinding, argumentTypes, invocationSite);
+ return methodBinding;
+ }
+ MethodBinding[] methods = receiverType.getMethods(ConstructorDeclaration.ConstantPoolName);
+ if (methods == NoMethods)
+ return new ProblemMethodBinding(
+ ConstructorDeclaration.ConstantPoolName,
+ argumentTypes,
+ NotFound);
+
+ MethodBinding[] compatible = new MethodBinding[methods.length];
+ int compatibleIndex = 0;
+ MethodBinding problemMethod = null;
+ for (int i = 0, length = methods.length; i < length; i++) {
+ MethodBinding compatibleMethod = computeCompatibleMethod(methods[i], argumentTypes, invocationSite);
+ if (compatibleMethod != null) {
+ if (compatibleMethod.isValidBinding())
+ compatible[compatibleIndex++] = compatibleMethod;
+ else if (problemMethod == null)
+ problemMethod = compatibleMethod;
+ }
+ }
+ if (compatibleIndex == 0) {
+ if (problemMethod == null)
+ return new ProblemMethodBinding(ConstructorDeclaration.ConstantPoolName, argumentTypes, NotFound);
+ return problemMethod;
+ }
+ // need a more descriptive error... cannot convert from X to Y
+
+ MethodBinding[] visible = new MethodBinding[compatibleIndex];
+ int visibleIndex = 0;
+ for (int i = 0; i < compatibleIndex; i++) {
+ MethodBinding method = compatible[i];
+ if (method.canBeSeenBy(invocationSite, this))
+ visible[visibleIndex++] = method;
+ }
+ if (visibleIndex == 1) return visible[0];
+ if (visibleIndex == 0)
+ return new ProblemMethodBinding(
+ compatible[0],
+ ConstructorDeclaration.ConstantPoolName,
+ compatible[0].parameters,
+ NotVisible);
+ return mostSpecificClassMethodBinding(visible, visibleIndex, invocationSite);
+ } catch (AbortCompilation e) {
+ e.updateContext(invocationSite, referenceCompilationUnit().compilationResult);
+ throw e;
+ }
+ }
+
+ public final PackageBinding getCurrentPackage() {
+ Scope scope, unitScope = this;
+ while ((scope = unitScope.parent) != null)
+ unitScope = scope;
+ return ((CompilationUnitScope) unitScope).fPackage;
+ }
+
+ /**
+ * Returns the modifiers of the innermost enclosing declaration.
+ * @return modifiers
+ */
+ public int getDeclarationModifiers(){
+ switch(this.kind){
+ case Scope.BLOCK_SCOPE :
+ case Scope.METHOD_SCOPE :
+ MethodScope methodScope = methodScope();
+ if (!methodScope.isInsideInitializer()){
+ // check method modifiers to see if deprecated
+ MethodBinding context = ((AbstractMethodDeclaration)methodScope.referenceContext).binding;
+ if (context != null) {
+ return context.modifiers;
+ }
+ } else {
+ SourceTypeBinding type = ((BlockScope)this).referenceType().binding;
+
+ // inside field declaration ? check field modifier to see if deprecated
+ if (methodScope.initializedField != null) {
+ return methodScope.initializedField.modifiers;
+ }
+ if (type != null) {
+ return type.modifiers;
+ }
+ }
+ break;
+ case Scope.CLASS_SCOPE :
+ ReferenceBinding context = ((ClassScope)this).referenceType().binding;
+ if (context != null) {
+ return context.modifiers;
+ }
+ break;
+ }
+ return -1;
+ }
+
+ public FieldBinding getField(TypeBinding receiverType, char[] fieldName, InvocationSite invocationSite) {
+ try {
+ FieldBinding field = findField(receiverType, fieldName, invocationSite, true /*resolve*/);
+ if (field != null) return field;
+
+ return new ProblemFieldBinding(
+ receiverType instanceof ReferenceBinding ? (ReferenceBinding) receiverType : null,
+ fieldName,
+ NotFound);
+ } catch (AbortCompilation e) {
+ e.updateContext(invocationSite, referenceCompilationUnit().compilationResult);
+ throw e;
+ }
+ }
+
+ /* API
+ *
+ * Answer the method binding that corresponds to selector, argumentTypes.
+ * Start the lookup at the enclosing type of the receiver.
+ * InvocationSite implements
+ * isSuperAccess(); this is used to determine if the discovered method is visible.
+ * setDepth(int); this is used to record the depth of the discovered method
+ * relative to the enclosing type of the receiver. (If the method is defined
+ * in the enclosing type of the receiver, the depth is 0; in the next enclosing
+ * type, the depth is 1; and so on
+ *
+ * If no visible method is discovered, an error binding is answered.
+ */
+ public MethodBinding getImplicitMethod(char[] selector, TypeBinding[] argumentTypes, InvocationSite invocationSite) {
+
+ boolean insideStaticContext = false;
+ boolean insideConstructorCall = false;
+ MethodBinding foundMethod = null;
+ MethodBinding foundFuzzyProblem = null;
+ // the weird method lookup case (matches method name in scope, then arg types, then visibility)
+ MethodBinding foundInsideProblem = null;
+ // inside Constructor call or inside static context
+ Scope scope = this;
+ int depth = 0;
+ done : while (true) { // done when a COMPILATION_UNIT_SCOPE is found
+ switch (scope.kind) {
+ case METHOD_SCOPE :
+ MethodScope methodScope = (MethodScope) scope;
+ insideStaticContext |= methodScope.isStatic;
+ insideConstructorCall |= methodScope.isConstructorCall;
+ break;
+ case CLASS_SCOPE :
+ ClassScope classScope = (ClassScope) scope;
+ SourceTypeBinding receiverType = classScope.referenceContext.binding;
+ boolean isExactMatch = true;
+ // retrieve an exact visible match (if possible)
+ MethodBinding methodBinding =
+ (foundMethod == null)
+ ? classScope.findExactMethod(receiverType, selector, argumentTypes, invocationSite)
+ : classScope.findExactMethod( receiverType, foundMethod.selector, foundMethod.parameters, invocationSite);
+ // ? findExactMethod(receiverType, selector, argumentTypes, invocationSite)
+ // : findExactMethod(receiverType, foundMethod.selector, foundMethod.parameters, invocationSite);
+ if (methodBinding == null) {
+ // answers closest approximation, may not check argumentTypes or visibility
+ isExactMatch = false;
+ methodBinding = classScope.findMethod(receiverType, selector, argumentTypes, invocationSite);
+ // methodBinding = findMethod(receiverType, selector, argumentTypes, invocationSite);
+ }
+ if (methodBinding != null) { // skip it if we did not find anything
+ if (methodBinding.problemId() == Ambiguous) {
+ if (foundMethod == null || foundMethod.problemId() == NotVisible) {
+ // supercedes any potential InheritedNameHidesEnclosingName problem
+ return methodBinding;
+ }
+ // make the user qualify the method, likely wants the first inherited method (javac generates an ambiguous error instead)
+ return new ProblemMethodBinding(
+ methodBinding, // closest match
+ selector,
+ argumentTypes,
+ InheritedNameHidesEnclosingName);
+ }
+ MethodBinding fuzzyProblem = null;
+ MethodBinding insideProblem = null;
+ if (methodBinding.isValidBinding()) {
+ if (!isExactMatch) {
+ MethodBinding compatibleMethod = computeCompatibleMethod(methodBinding, argumentTypes, invocationSite);
+ if (compatibleMethod == null) {
+ if (foundMethod == null || foundMethod.problemId() == NotVisible)
+ // inherited mismatch is reported directly, not looking at enclosing matches
+ return new ProblemMethodBinding(methodBinding, selector, argumentTypes, NotFound);
+ // make the user qualify the method, likely wants the first inherited method (javac generates an ambiguous error instead)
+ fuzzyProblem = new ProblemMethodBinding(methodBinding, selector, methodBinding.parameters, InheritedNameHidesEnclosingName);
+ } else if (!compatibleMethod.isValidBinding()) {
+ fuzzyProblem = compatibleMethod;
+ } else {
+ methodBinding = compatibleMethod;
+ if (!methodBinding.canBeSeenBy(receiverType, invocationSite, classScope)) {
+ // using <classScope> instead of <this> for visibility check does grant all access to innerclass
+ fuzzyProblem = new ProblemMethodBinding(methodBinding, selector, methodBinding.parameters, NotVisible);
+ }
+ }
+ }
+ if (fuzzyProblem == null && !methodBinding.isStatic()) {
+ if (insideConstructorCall) {
+ insideProblem =
+ new ProblemMethodBinding(
+ methodBinding, // closest match
+ methodBinding.selector,
+ methodBinding.parameters,
+ NonStaticReferenceInConstructorInvocation);
+ } else if (insideStaticContext) {
+ insideProblem =
+ new ProblemMethodBinding(
+ methodBinding, // closest match
+ methodBinding.selector,
+ methodBinding.parameters,
+ NonStaticReferenceInStaticContext);
+ }
+ }
+
+ if (receiverType == methodBinding.declaringClass
+ || (receiverType.getMethods(selector)) != NoMethods
+ || ((fuzzyProblem == null || fuzzyProblem.problemId() != NotVisible) && environment().options.complianceLevel >= ClassFileConstants.JDK1_4)){
+ // found a valid method in the 'immediate' scope (ie. not inherited)
+ // OR the receiverType implemented a method with the correct name
+ // OR in 1.4 mode (inherited visible shadows enclosing)
+ if (foundMethod == null) {
+ if (depth > 0){
+ invocationSite.setDepth(depth);
+ invocationSite.setActualReceiverType(receiverType);
+ }
+ // return the methodBinding if it is not declared in a superclass of the scope's binding (that is, inherited)
+ if (fuzzyProblem != null)
+ return fuzzyProblem;
+ if (insideProblem != null)
+ return insideProblem;
+ return methodBinding;
+ }
+ // if a method was found, complain when another is found in an 'immediate' enclosing type (that is, not inherited)
+ // NOTE: Unlike fields, a non visible method hides a visible method
+ if (foundMethod.declaringClass != methodBinding.declaringClass)
+ // ie. have we found the same method - do not trust field identity yet
+ return new ProblemMethodBinding(
+ methodBinding, // closest match
+ methodBinding.selector,
+ methodBinding.parameters,
+ InheritedNameHidesEnclosingName);
+ }
+ }
+
+ if (foundMethod == null
+ || (foundMethod.problemId() == NotVisible
+ && methodBinding.problemId() != NotVisible)) {
+ // only remember the methodBinding if its the first one found or the previous one was not visible & methodBinding is...
+ // remember that private methods are visible if defined directly by an enclosing class
+ if (depth > 0){
+ invocationSite.setDepth(depth);
+ invocationSite.setActualReceiverType(receiverType);
+ }
+ foundFuzzyProblem = fuzzyProblem;
+ foundInsideProblem = insideProblem;
+ if (fuzzyProblem == null)
+ foundMethod = methodBinding; // only keep it if no error was found
+ }
+ }
+ depth++;
+ insideStaticContext |= receiverType.isStatic();
+ // 1EX5I8Z - accessing outer fields within a constructor call is permitted
+ // in order to do so, we change the flag as we exit from the type, not the method
+ // itself, because the class scope is used to retrieve the fields.
+ MethodScope enclosingMethodScope = scope.methodScope();
+ insideConstructorCall =
+ enclosingMethodScope == null ? false : enclosingMethodScope.isConstructorCall;
+ break;
+ case COMPILATION_UNIT_SCOPE :
+ break done;
+ }
+ scope = scope.parent;
+ }
+
+ if (foundFuzzyProblem != null)
+ return foundFuzzyProblem;
+ if (foundInsideProblem != null)
+ return foundInsideProblem;
+ if (foundMethod != null)
+ return foundMethod;
+ return new ProblemMethodBinding(selector, argumentTypes, NotFound);
+ }
+
+ public final ReferenceBinding getJavaIoSerializable() {
+ compilationUnitScope().recordQualifiedReference(JAVA_IO_SERIALIZABLE);
+ ReferenceBinding type = environment().getType(JAVA_IO_SERIALIZABLE);
+ if (type != null) return type;
+
+ problemReporter().isClassPathCorrect(JAVA_IO_SERIALIZABLE, referenceCompilationUnit());
+ return null; // will not get here since the above error aborts the compilation
+ }
+
+ public final ReferenceBinding getJavaLangAssertionError() {
+ compilationUnitScope().recordQualifiedReference(JAVA_LANG_ASSERTIONERROR);
+ ReferenceBinding type = environment().getType(JAVA_LANG_ASSERTIONERROR);
+ if (type != null) return type;
+ problemReporter().isClassPathCorrect(JAVA_LANG_ASSERTIONERROR, referenceCompilationUnit());
+ return null; // will not get here since the above error aborts the compilation
+ }
+
+ public final ReferenceBinding getJavaLangClass() {
+ compilationUnitScope().recordQualifiedReference(JAVA_LANG_CLASS);
+ ReferenceBinding type = environment().getType(JAVA_LANG_CLASS);
+ if (type != null) return type;
+
+ problemReporter().isClassPathCorrect(JAVA_LANG_CLASS, referenceCompilationUnit());
+ return null; // will not get here since the above error aborts the compilation
+ }
+
+ public final ReferenceBinding getJavaLangCloneable() {
+ compilationUnitScope().recordQualifiedReference(JAVA_LANG_CLONEABLE);
+ ReferenceBinding type = environment().getType(JAVA_LANG_CLONEABLE);
+ if (type != null) return type;
+
+ problemReporter().isClassPathCorrect(JAVA_LANG_CLONEABLE, referenceCompilationUnit());
+ return null; // will not get here since the above error aborts the compilation
+ }
+
+ public final ReferenceBinding getJavaLangError() {
+ compilationUnitScope().recordQualifiedReference(JAVA_LANG_ERROR);
+ ReferenceBinding type = environment().getType(JAVA_LANG_ERROR);
+ if (type != null) return type;
+
+ problemReporter().isClassPathCorrect(JAVA_LANG_ERROR, referenceCompilationUnit());
+ return null; // will not get here since the above error aborts the compilation
+ }
+ public final ReferenceBinding getJavaLangIterable() {
+ compilationUnitScope().recordQualifiedReference(JAVA_LANG_ITERABLE);
+ ReferenceBinding type = environment().getType(JAVA_LANG_ITERABLE);
+ if (type != null) return type;
+
+ problemReporter().isClassPathCorrect(JAVA_LANG_ITERABLE, referenceCompilationUnit());
+ return null; // will not get here since the above error aborts the compilation
+ }
+ public final ReferenceBinding getJavaLangObject() {
+ compilationUnitScope().recordQualifiedReference(JAVA_LANG_OBJECT);
+ ReferenceBinding type = environment().getType(JAVA_LANG_OBJECT);
+ if (type != null) return type;
+
+ problemReporter().isClassPathCorrect(JAVA_LANG_OBJECT, referenceCompilationUnit());
+ return null; // will not get here since the above error aborts the compilation
+ }
+
+ public final ReferenceBinding getJavaLangRuntimeException() {
+ compilationUnitScope().recordQualifiedReference(JAVA_LANG_RUNTIMEEXCEPTION);
+ ReferenceBinding type = environment().getType(JAVA_LANG_RUNTIMEEXCEPTION);
+ if (type != null) return type;
+
+ problemReporter().isClassPathCorrect(JAVA_LANG_RUNTIMEEXCEPTION, referenceCompilationUnit());
+ return null; // will not get here since the above error aborts the compilation
+ }
+
+ public final ReferenceBinding getJavaLangString() {
+ compilationUnitScope().recordQualifiedReference(JAVA_LANG_STRING);
+ ReferenceBinding type = environment().getType(JAVA_LANG_STRING);
+ if (type != null) return type;
+
+ problemReporter().isClassPathCorrect(JAVA_LANG_STRING, referenceCompilationUnit());
+ return null; // will not get here since the above error aborts the compilation
+ }
+
+ public final ReferenceBinding getJavaLangThrowable() {
+ compilationUnitScope().recordQualifiedReference(JAVA_LANG_THROWABLE);
+ ReferenceBinding type = environment().getType(JAVA_LANG_THROWABLE);
+ if (type != null) return type;
+
+ problemReporter().isClassPathCorrect(JAVA_LANG_THROWABLE, referenceCompilationUnit());
+ return null; // will not get here since the above error aborts the compilation
+ }
+ public final ReferenceBinding getJavaUtilIterator() {
+ compilationUnitScope().recordQualifiedReference(JAVA_UTIL_ITERATOR);
+ ReferenceBinding type = environment().getType(JAVA_UTIL_ITERATOR);
+ if (type != null) return type;
+
+ problemReporter().isClassPathCorrect(JAVA_UTIL_ITERATOR, referenceCompilationUnit());
+ return null; // will not get here since the above error aborts the compilation
+ }
+
+ /* Answer the type binding corresponding to the typeName argument, relative to the enclosingType.
+ */
+ public final ReferenceBinding getMemberType(char[] typeName, ReferenceBinding enclosingType) {
+ ReferenceBinding memberType = findMemberType(typeName, enclosingType);
+ if (memberType != null) return memberType;
+ return new ProblemReferenceBinding(typeName, NotFound);
+ }
+
+ public MethodBinding getMethod(TypeBinding receiverType, char[] selector, TypeBinding[] argumentTypes, InvocationSite invocationSite) {
+ try {
+ if (receiverType.isArrayType())
+ return findMethodForArray((ArrayBinding) receiverType, selector, argumentTypes, invocationSite);
+ if (receiverType.isBaseType())
+ return new ProblemMethodBinding(selector, argumentTypes, NotFound);
+
+ ReferenceBinding currentType = (ReferenceBinding) receiverType;
+ if (!currentType.canBeSeenBy(this))
+ return new ProblemMethodBinding(selector, argumentTypes, ReceiverTypeNotVisible);
+
+ // retrieve an exact visible match (if possible)
+ MethodBinding methodBinding = findExactMethod(currentType, selector, argumentTypes, invocationSite);
+ if (methodBinding != null) return methodBinding;
+
+ // TODO (kent) performance - we are accumulating super methods which are *hidden* during the walk (see testcase from bug 69141)
+ // answers closest approximation, may not check argumentTypes or visibility
+ methodBinding = findMethod(currentType, selector, argumentTypes, invocationSite);
+ if (methodBinding == null)
+ return new ProblemMethodBinding(selector, argumentTypes, NotFound);
+ if (methodBinding.isValidBinding()) {
+ MethodBinding compatibleMethod = computeCompatibleMethod(methodBinding, argumentTypes, invocationSite);
+ if (compatibleMethod == null)
+ return new ProblemMethodBinding(methodBinding, selector, argumentTypes, NotFound);
+ if (!compatibleMethod.isValidBinding())
+ return compatibleMethod;
+
+ methodBinding = compatibleMethod;
+ if (!methodBinding.canBeSeenBy(currentType, invocationSite, this))
+ return new ProblemMethodBinding( methodBinding, selector, methodBinding.parameters, NotVisible);
+ }
+ return methodBinding;
+ } catch (AbortCompilation e) {
+ e.updateContext(invocationSite, referenceCompilationUnit().compilationResult);
+ throw e;
+ }
+ }
+
+ /* Answer the package from the compoundName or null if it begins with a type.
+ * Intended to be used while resolving a qualified type name.
+ *
+ * NOTE: If a problem binding is returned, senders should extract the compound name
+ * from the binding & not assume the problem applies to the entire compoundName.
+ */
+ public final Binding getPackage(char[][] compoundName) {
+ compilationUnitScope().recordQualifiedReference(compoundName);
+ Binding binding = getTypeOrPackage(compoundName[0], TYPE | PACKAGE);
+ if (binding == null)
+ return new ProblemReferenceBinding(compoundName[0], NotFound);
+ if (!binding.isValidBinding())
+ return (ReferenceBinding) binding;
+
+ if (!(binding instanceof PackageBinding)) return null; // compoundName does not start with a package
+
+ int currentIndex = 1;
+ PackageBinding packageBinding = (PackageBinding) binding;
+ while (currentIndex < compoundName.length) {
+ binding = packageBinding.getTypeOrPackage(compoundName[currentIndex++]);
+ if (binding == null)
+ return new ProblemReferenceBinding(
+ CharOperation.subarray(compoundName, 0, currentIndex),
+ NotFound);
+ if (!binding.isValidBinding())
+ return new ProblemReferenceBinding(
+ CharOperation.subarray(compoundName, 0, currentIndex),
+ binding.problemId());
+ if (!(binding instanceof PackageBinding))
+ return packageBinding;
+ packageBinding = (PackageBinding) binding;
+ }
+ return new ProblemReferenceBinding(compoundName, NotFound);
+ }
+
+ /* Answer the type binding that corresponds the given name, starting the lookup in the receiver.
+ * The name provided is a simple source name (e.g., "Object" , "Point", ...)
+ */
+ // The return type of this method could be ReferenceBinding if we did not answer base types.
+ // NOTE: We could support looking for Base Types last in the search, however any code using
+ // this feature would be extraordinarily slow. Therefore we don't do this
+ public final TypeBinding getType(char[] name) {
+ // Would like to remove this test and require senders to specially handle base types
+ TypeBinding binding = getBaseType(name);
+ if (binding != null) return binding;
+ return (ReferenceBinding) getTypeOrPackage(name, TYPE);
+ }
+
+ /* Answer the type binding that corresponds to the given name, starting the lookup in the receiver
+ * or the packageBinding if provided.
+ * The name provided is a simple source name (e.g., "Object" , "Point", ...)
+ */
+ public final TypeBinding getType(char[] name, PackageBinding packageBinding) {
+ if (packageBinding == null)
+ return getType(name);
+
+ Binding binding = packageBinding.getTypeOrPackage(name);
+ if (binding == null)
+ return new ProblemReferenceBinding(
+ CharOperation.arrayConcat(packageBinding.compoundName, name),
+ NotFound);
+ if (!binding.isValidBinding())
+ return new ProblemReferenceBinding(
+ CharOperation.arrayConcat(packageBinding.compoundName, name),
+ binding.problemId());
+
+ ReferenceBinding typeBinding = (ReferenceBinding) binding;
+ if (!typeBinding.canBeSeenBy(this))
+ return new ProblemReferenceBinding(
+ CharOperation.arrayConcat(packageBinding.compoundName, name),
+ typeBinding,
+ NotVisible);
+ return typeBinding;
+ }
+
+ /* Answer the type binding corresponding to the compoundName.
+ *
+ * NOTE: If a problem binding is returned, senders should extract the compound name
+ * from the binding & not assume the problem applies to the entire compoundName.
+ */
+ public final TypeBinding getType(char[][] compoundName, int typeNameLength) {
+ if (typeNameLength == 1) {
+ // Would like to remove this test and require senders to specially handle base types
+ TypeBinding binding = getBaseType(compoundName[0]);
+ if (binding != null) return binding;
+ }
+
+ compilationUnitScope().recordQualifiedReference(compoundName);
+ Binding binding =
+ getTypeOrPackage(compoundName[0], typeNameLength == 1 ? TYPE : TYPE | PACKAGE);
+ if (binding == null)
+ return new ProblemReferenceBinding(compoundName[0], NotFound);
+ if (!binding.isValidBinding())
+ return (ReferenceBinding) binding;
+
+ int currentIndex = 1;
+ boolean checkVisibility = false;
+ if (binding instanceof PackageBinding) {
+ PackageBinding packageBinding = (PackageBinding) binding;
+ while (currentIndex < typeNameLength) {
+ binding = packageBinding.getTypeOrPackage(compoundName[currentIndex++]); // does not check visibility
+ if (binding == null)
+ return new ProblemReferenceBinding(
+ CharOperation.subarray(compoundName, 0, currentIndex),
+ NotFound);
+ if (!binding.isValidBinding())
+ return new ProblemReferenceBinding(
+ CharOperation.subarray(compoundName, 0, currentIndex),
+ binding.problemId());
+ if (!(binding instanceof PackageBinding))
+ break;
+ packageBinding = (PackageBinding) binding;
+ }
+ if (binding instanceof PackageBinding)
+ return new ProblemReferenceBinding(
+ CharOperation.subarray(compoundName, 0, currentIndex),
+ NotFound);
+ checkVisibility = true;
+ }
+
+ // binding is now a ReferenceBinding
+ ReferenceBinding typeBinding = (ReferenceBinding) binding;
+ compilationUnitScope().recordTypeReference(typeBinding);
+ if (checkVisibility) // handles the fall through case
+ if (!typeBinding.canBeSeenBy(this))
+ return new ProblemReferenceBinding(
+ CharOperation.subarray(compoundName, 0, currentIndex),
+ typeBinding,
+ NotVisible);
+
+ while (currentIndex < typeNameLength) {
+ typeBinding = getMemberType(compoundName[currentIndex++], typeBinding);
+ if (!typeBinding.isValidBinding()) {
+ if (typeBinding instanceof ProblemReferenceBinding) {
+ ProblemReferenceBinding problemBinding = (ProblemReferenceBinding) typeBinding;
+ return new ProblemReferenceBinding(
+ CharOperation.subarray(compoundName, 0, currentIndex),
+ problemBinding.original,
+ typeBinding.problemId());
+ }
+ return new ProblemReferenceBinding(
+ CharOperation.subarray(compoundName, 0, currentIndex),
+ typeBinding.problemId());
+ }
+ }
+ return typeBinding;
+ }
+
+ /* Internal use only
+ */
+ final Binding getTypeOrPackage(char[] name, int mask) {
+ Scope scope = this;
+ ReferenceBinding foundType = null;
+ boolean insideStaticContext = false;
+ if ((mask & TYPE) == 0) {
+ Scope next = scope;
+ while ((next = scope.parent) != null)
+ scope = next;
+ } else {
+ done : while (true) { // done when a COMPILATION_UNIT_SCOPE is found
+ switch (scope.kind) {
+ case METHOD_SCOPE :
+ MethodScope methodScope = (MethodScope) scope;
+ AbstractMethodDeclaration methodDecl = methodScope.referenceMethod();
+ if (methodDecl != null && methodDecl.binding != null) {
+ TypeVariableBinding typeVariable = methodDecl.binding.getTypeVariable(name);
+ if (typeVariable != null) return typeVariable;
+ }
+ insideStaticContext |= methodScope.isStatic;
+ case BLOCK_SCOPE :
+ ReferenceBinding localType = ((BlockScope) scope).findLocalType(name); // looks in this scope only
+ if (localType != null) {
+ if (foundType != null && foundType != localType)
+ return new ProblemReferenceBinding(name, InheritedNameHidesEnclosingName);
+ return localType;
+ }
+ break;
+ case CLASS_SCOPE :
+ SourceTypeBinding sourceType = ((ClassScope) scope).referenceContext.binding;
+ if (sourceType.isHierarchyBeingConnected()) {
+ // type variables take precedence over the source type, ex. class X <X> extends X == class X <Y> extends Y
+ TypeVariableBinding typeVariable = sourceType.getTypeVariable(name);
+ if (typeVariable != null)
+ return typeVariable;
+ if (CharOperation.equals(name, sourceType.sourceName))
+ return sourceType;
+ break;
+ }
+ // type variables take precedence over member types
+ TypeVariableBinding typeVariable = sourceType.getTypeVariable(name);
+ if (typeVariable != null) {
+ if (insideStaticContext) // do not consider this type modifiers: access is legite within same type
+ return new ProblemReferenceBinding(name, NonStaticReferenceInStaticContext);
+ return typeVariable;
+ }
+ insideStaticContext |= (sourceType.modifiers & AccStatic) != 0; // not isStatic()
+ // 6.5.5.1 - member types have precedence over top-level type in same unit
+ ReferenceBinding memberType = findMemberType(name, sourceType);
+ if (memberType != null) { // skip it if we did not find anything
+ if (memberType.problemId() == Ambiguous) {
+ if (foundType == null || foundType.problemId() == NotVisible)
+ // supercedes any potential InheritedNameHidesEnclosingName problem
+ return memberType;
+ else
+ // make the user qualify the type, likely wants the first inherited type
+ return new ProblemReferenceBinding(name, InheritedNameHidesEnclosingName);
+ }
+ if (memberType.isValidBinding()) {
+ if (sourceType == memberType.enclosingType()
+ || environment().options.complianceLevel >= ClassFileConstants.JDK1_4) {
+ // found a valid type in the 'immediate' scope (ie. not inherited)
+ // OR in 1.4 mode (inherited shadows enclosing)
+ if (foundType == null)
+ return memberType;
+ if (foundType.isValidBinding())
+ // if a valid type was found, complain when another is found in an 'immediate' enclosing type (ie. not inherited)
+ if (foundType != memberType)
+ return new ProblemReferenceBinding(name, InheritedNameHidesEnclosingName);
+ }
+ }
+ if (foundType == null || (foundType.problemId() == NotVisible && memberType.problemId() != NotVisible))
+ // only remember the memberType if its the first one found or the previous one was not visible & memberType is...
+ foundType = memberType;
+ }
+ if (CharOperation.equals(sourceType.sourceName, name)) {
+ if (foundType != null && foundType != sourceType && foundType.problemId() != NotVisible)
+ return new ProblemReferenceBinding(name, InheritedNameHidesEnclosingName);
+ return sourceType;
+ }
+ break;
+ case COMPILATION_UNIT_SCOPE :
+ break done;
+ }
+ scope = scope.parent;
+ }
+ if (foundType != null && foundType.problemId() != NotVisible)
+ return foundType;
+ }
+
+ // at this point the scope is a compilation unit scope
+ CompilationUnitScope unitScope = (CompilationUnitScope) scope;
+ PackageBinding currentPackage = unitScope.fPackage;
+ // ask for the imports + name
+ if ((mask & TYPE) != 0) {
+ // check single type imports.
+
+ ImportBinding[] imports = unitScope.imports;
+ if (imports != null) {
+ HashtableOfObject typeImports = unitScope.resolvedSingeTypeImports;
+ if (typeImports != null) {
+ ImportBinding typeImport = (ImportBinding) typeImports.get(name);
+ if (typeImport != null) {
+ ImportReference importReference = typeImport.reference;
+ if (importReference != null) importReference.used = true;
+ return typeImport.resolvedImport; // already know its visible
+ }
+ } else {
+ // walk all the imports since resolvedSingeTypeImports is not yet initialized
+ for (int i = 0, length = imports.length; i < length; i++) {
+ ImportBinding typeImport = imports[i];
+ if (!typeImport.onDemand) {
+ if (CharOperation.equals(typeImport.compoundName[typeImport.compoundName.length - 1], name)) {
+ if (unitScope.resolveSingleTypeImport(typeImport) != null) {
+ ImportReference importReference = typeImport.reference;
+ if (importReference != null) importReference.used = true;
+ return typeImport.resolvedImport; // already know its visible
+ }
+ }
+ }
+ }
+ }
+ }
+ // check if the name is in the current package, skip it if its a sub-package
+ unitScope.recordReference(currentPackage.compoundName, name);
+ Binding binding = currentPackage.getTypeOrPackage(name);
+ if (binding instanceof ReferenceBinding) return binding; // type is always visible to its own package
+
+ // check on demand imports
+ if (imports != null) {
+ boolean foundInImport = false;
+ ReferenceBinding type = null;
+ for (int i = 0, length = imports.length; i < length; i++) {
+ ImportBinding someImport = imports[i];
+ if (someImport.onDemand) {
+ Binding resolvedImport = someImport.resolvedImport;
+ ReferenceBinding temp = resolvedImport instanceof PackageBinding
+ ? findType(name, (PackageBinding) resolvedImport, currentPackage)
+ : findDirectMemberType(name, (ReferenceBinding) resolvedImport);
+ if (temp != null) {
+ if (temp.isValidBinding()) {
+ ImportReference importReference = someImport.reference;
+ if (importReference != null) importReference.used = true;
+ if (foundInImport)
+ // Answer error binding -- import on demand conflict; name found in two import on demand packages.
+ return new ProblemReferenceBinding(name, Ambiguous);
+ type = temp;
+ foundInImport = true;
+ } else if (foundType == null) {
+ foundType = temp;
+ }
+ }
+ }
+ }
+ if (type != null) return type;
+ }
+ }
+
+ unitScope.recordSimpleReference(name);
+ if ((mask & PACKAGE) != 0) {
+ PackageBinding packageBinding = unitScope.environment.getTopLevelPackage(name);
+ if (packageBinding != null) return packageBinding;
+ }
+
+ // Answer error binding -- could not find name
+ if (foundType != null) return foundType; // problem type from above
+ return new ProblemReferenceBinding(name, NotFound);
+ }
+
+ // Added for code assist... NOT Public API
+ // DO NOT USE to resolve import references since this method assumes 'A.B' is relative to a single type import of 'p1.A'
+ // when it may actually mean the type B in the package A
+ // use CompilationUnitScope.getImport(char[][]) instead
+ public final Binding getTypeOrPackage(char[][] compoundName) {
+ int nameLength = compoundName.length;
+ if (nameLength == 1) {
+ TypeBinding binding = getBaseType(compoundName[0]);
+ if (binding != null) return binding;
+ }
+ Binding binding = getTypeOrPackage(compoundName[0], TYPE | PACKAGE);
+ if (!binding.isValidBinding()) return binding;
+
+ int currentIndex = 1;
+ boolean checkVisibility = false;
+ if (binding instanceof PackageBinding) {
+ PackageBinding packageBinding = (PackageBinding) binding;
+
+ while (currentIndex < nameLength) {
+ binding = packageBinding.getTypeOrPackage(compoundName[currentIndex++]);
+ if (binding == null)
+ return new ProblemReferenceBinding(
+ CharOperation.subarray(compoundName, 0, currentIndex),
+ NotFound);
+ if (!binding.isValidBinding())
+ return new ProblemReferenceBinding(
+ CharOperation.subarray(compoundName, 0, currentIndex),
+ binding.problemId());
+ if (!(binding instanceof PackageBinding))
+ break;
+ packageBinding = (PackageBinding) binding;
+ }
+ if (binding instanceof PackageBinding) return binding;
+ checkVisibility = true;
+ }
+ // binding is now a ReferenceBinding
+ ReferenceBinding typeBinding = (ReferenceBinding) binding;
+ if (checkVisibility) // handles the fall through case
+ if (!typeBinding.canBeSeenBy(this))
+ return new ProblemReferenceBinding(
+ CharOperation.subarray(compoundName, 0, currentIndex),
+ typeBinding,
+ NotVisible);
+
+ while (currentIndex < nameLength) {
+ typeBinding = getMemberType(compoundName[currentIndex++], typeBinding);
+ // checks visibility
+ if (!typeBinding.isValidBinding())
+ return new ProblemReferenceBinding(
+ CharOperation.subarray(compoundName, 0, currentIndex),
+ typeBinding.problemId());
+ }
+ return typeBinding;
+ }
+
+ // 5.1.10
+ public TypeBinding[] greaterLowerBound(TypeBinding[] types) {
+ if (types == null) return null;
+ int length = types.length;
+ TypeBinding[] result = types;
+ int removed = 0;
+ for (int i = 0; i < length; i++) {
+ TypeBinding iType = result[i];
+ for (int j = 0; j < length; j++) {
+ if (i == j) continue;
+ TypeBinding jType = result[j];
+ if (jType == null) continue;
+ if (iType.isCompatibleWith(jType)) { // if Vi <: Vj, Vj is removed
+ if (result == types) { // defensive copy
+ System.arraycopy(result, 0, result = new TypeBinding[length], 0, length);
+ }
+ result[j] = null;
+ removed ++;
+ }
+ }
+ }
+ if (removed == 0) return result;
+ TypeBinding[] trimmedResult = new TypeBinding[length - removed];
+ for (int i = 0, index = 0; i < length; i++) {
+ TypeBinding iType = result[i];
+ if (iType != null) {
+ trimmedResult[index++] = iType;
+ }
+ }
+ return trimmedResult;
+ }
+
+ /* Answer true if the scope is nested inside a given field declaration.
+ * Note: it works as long as the scope.fieldDeclarationIndex is reflecting the field being traversed
+ * e.g. during name resolution.
+ */
+ public final boolean isDefinedInField(FieldBinding field) {
+ Scope scope = this;
+ do {
+ if (scope instanceof MethodScope) {
+ MethodScope methodScope = (MethodScope) scope;
+ if (methodScope.initializedField == field) return true;
+ }
+ scope = scope.parent;
+ } while (scope != null);
+ return false;
+ }
+
+ /* Answer true if the scope is nested inside a given method declaration
+ */
+ public final boolean isDefinedInMethod(MethodBinding method) {
+ Scope scope = this;
+ do {
+ if (scope instanceof MethodScope) {
+ ReferenceContext refContext = ((MethodScope) scope).referenceContext;
+ if (refContext instanceof AbstractMethodDeclaration
+ && ((AbstractMethodDeclaration)refContext).binding == method) {
+ return true;
+ }
+ }
+ scope = scope.parent;
+ } while (scope != null);
+ return false;
+ }
+
+ /* Answer whether the type is defined in the same compilation unit as the receiver
+ */
+ public final boolean isDefinedInSameUnit(ReferenceBinding type) {
+ // find the outer most enclosing type
+ ReferenceBinding enclosingType = type;
+ while ((type = enclosingType.enclosingType()) != null)
+ enclosingType = type;
+
+ // find the compilation unit scope
+ Scope scope, unitScope = this;
+ while ((scope = unitScope.parent) != null)
+ unitScope = scope;
+
+ // test that the enclosingType is not part of the compilation unit
+ SourceTypeBinding[] topLevelTypes =
+ ((CompilationUnitScope) unitScope).topLevelTypes;
+ for (int i = topLevelTypes.length; --i >= 0;)
+ if (topLevelTypes[i] == enclosingType)
+ return true;
+ return false;
+ }
+
+ /* Answer true if the scope is nested inside a given type declaration
+ */
+ public final boolean isDefinedInType(ReferenceBinding type) {
+ Scope scope = this;
+ do {
+ if (scope instanceof ClassScope)
+ if (((ClassScope) scope).referenceContext.binding == type){
+ return true;
+ }
+ scope = scope.parent;
+ } while (scope != null);
+ return false;
+ }
+
+ public boolean isInsideDeprecatedCode(){
+ switch(this.kind){
+ case Scope.BLOCK_SCOPE :
+ case Scope.METHOD_SCOPE :
+ MethodScope methodScope = methodScope();
+ if (!methodScope.isInsideInitializer()){
+ // check method modifiers to see if deprecated
+ MethodBinding context = ((AbstractMethodDeclaration)methodScope.referenceContext).binding;
+ if (context != null && context.isViewedAsDeprecated()) {
+ return true;
+ }
+ } else {
+ SourceTypeBinding type = ((BlockScope)this).referenceType().binding;
+ // inside field declaration ? check field modifier to see if deprecated
+ if (methodScope.initializedField != null && methodScope.initializedField.isViewedAsDeprecated()) {
+ return true;
+ }
+ if (type != null && type.isViewedAsDeprecated()) {
+ return true;
+ }
+ }
+ break;
+ case Scope.CLASS_SCOPE :
+ ReferenceBinding context = ((ClassScope)this).referenceType().binding;
+ if (context != null && context.isViewedAsDeprecated()) {
+ return true;
+ }
+ break;
+ }
+ return false;
+ }
+ private TypeBinding leastContainingInvocation(TypeBinding mec, List invocations) {
+ int length = invocations.size();
+ if (length == 0) return mec;
+ if (length == 1) return (TypeBinding) invocations.get(0);
+ int argLength = mec.typeVariables().length;
+ if (argLength == 0) return mec; // should be caught by no invocation check
+
+ // infer proper parameterized type from invocations
+ TypeBinding[] bestArguments = new TypeBinding[argLength];
+ for (int i = 0; i < length; i++) {
+ TypeBinding invocation = (TypeBinding)invocations.get(i);
+ if (invocation.isGenericType()) {
+ for (int j = 0; j < argLength; j++) {
+ TypeBinding bestArgument = leastContainingTypeArgument(bestArguments[j], invocation.typeVariables()[j], (ReferenceBinding) mec, j);
+ if (bestArgument == null) return null;
+ bestArguments[j] = bestArgument;
+ }
+ } else if (invocation.isParameterizedType()) {
+ ParameterizedTypeBinding parameterizedType = (ParameterizedTypeBinding)invocation;
+ for (int j = 0; j < argLength; j++) {
+ TypeBinding bestArgument = leastContainingTypeArgument(bestArguments[j], parameterizedType.arguments[j], (ReferenceBinding) mec, j);
+ if (bestArgument == null) return null;
+ bestArguments[j] = bestArgument;
+ }
+ } else if (invocation.isRawType()) {
+ return invocation; // raw type is taking precedence
+ }
+ }
+ return createParameterizedType((ReferenceBinding) mec, bestArguments, null);
+ }
+
+ // JLS 15.12.2
+ private TypeBinding leastContainingTypeArgument(TypeBinding u, TypeBinding v, ReferenceBinding genericType, int rank) {
+ if (u == null) return v;
+ if (u == v) return u;
+ if (v.isWildcard()) {
+ WildcardBinding wildV = (WildcardBinding) v;
+ if (u.isWildcard()) {
+ WildcardBinding wildU = (WildcardBinding) u;
+ switch (wildU.kind) {
+ // ? extends U
+ case Wildcard.EXTENDS :
+ switch(wildV.kind) {
+ // ? extends U, ? extends V
+ case Wildcard.EXTENDS :
+ TypeBinding lub = lowerUpperBound(new TypeBinding[]{wildU.bound,wildV.bound});
+ if (lub == null) return null;
+ return environment().createWildcard(genericType, rank, lub, Wildcard.EXTENDS);
+ // ? extends U, ? SUPER V
+ case Wildcard.SUPER :
+ if (wildU.bound == wildV.bound) return wildU.bound;
+ return environment().createWildcard(genericType, rank, null, Wildcard.UNBOUND);
+ }
+ break;
+ // ? super U
+ case Wildcard.SUPER :
+ // ? super U, ? super V
+ if (wildU.kind == Wildcard.SUPER) {
+ TypeBinding[] glb = greaterLowerBound(new TypeBinding[]{wildU.bound,wildV.bound});
+ if (glb == null) return null;
+ return environment().createWildcard(genericType, rank, glb[0], Wildcard.SUPER); // TODO (philippe) need to capture entire bounds
+ }
+ }
+ } else {
+ switch (wildV.kind) {
+ // U, ? extends V
+ case Wildcard.EXTENDS :
+ TypeBinding lub = lowerUpperBound(new TypeBinding[]{u,wildV.bound});
+ if (lub == null) return null;
+ return environment().createWildcard(genericType, rank, lub, Wildcard.EXTENDS);
+ // U, ? super V
+ case Wildcard.SUPER :
+ TypeBinding[] glb = greaterLowerBound(new TypeBinding[]{u,wildV.bound});
+ if (glb == null) return null;
+ return environment().createWildcard(genericType, rank, glb[0], Wildcard.SUPER); // TODO (philippe) need to capture entire bounds
+ case Wildcard.UNBOUND :
+ }
+ }
+ } else if (u.isWildcard()) {
+ WildcardBinding wildU = (WildcardBinding) u;
+ switch (wildU.kind) {
+ // U, ? extends V
+ case Wildcard.EXTENDS :
+ TypeBinding lub = lowerUpperBound(new TypeBinding[]{wildU.bound, v});
+ if (lub == null) return null;
+ return environment().createWildcard(genericType, rank, lub, Wildcard.EXTENDS);
+ // U, ? super V
+ case Wildcard.SUPER :
+ TypeBinding[] glb = greaterLowerBound(new TypeBinding[]{wildU.bound, v});
+ if (glb == null) return null;
+ return environment().createWildcard(genericType, rank, glb[0], Wildcard.SUPER); // TODO (philippe) need to capture entire bounds
+ case Wildcard.UNBOUND :
+ }
+ }
+ TypeBinding lub = lowerUpperBound(new TypeBinding[]{u,v});
+ if (lub == null) return null;
+ return environment().createWildcard(genericType, rank, lub, Wildcard.EXTENDS);
+ }
+
+ // 15.12.2
+ public TypeBinding lowerUpperBound(TypeBinding[] types) {
+
+ ArrayList invocations = new ArrayList(1);
+ TypeBinding mec = minimalErasedCandidate(types, invocations);
+ return leastContainingInvocation(mec, invocations);
+ }
+
+ public final MethodScope methodScope() {
+ Scope scope = this;
+ do {
+ if (scope instanceof MethodScope)
+ return (MethodScope) scope;
+ scope = scope.parent;
+ } while (scope != null);
+ return null;
+ }
+
+ /**
+ * Returns the most specific type compatible with all given types.
+ * (i.e. most specific common super type)
+ * If no types is given, will return VoidBinding. If not compatible
+ * reference type is found, returns null.
+ */
+ private TypeBinding minimalErasedCandidate(TypeBinding[] types, List invocations) {
+ Map allInvocations = new HashMap(2);
+ int length = types.length;
+ int indexOfFirst = -1, actualLength = 0;
+ for (int i = 0; i < length; i++) {
+ TypeBinding type = types[i];
+ if (type == null) continue;
+ if (type.isBaseType()) return null;
+ if (indexOfFirst < 0) indexOfFirst = i;
+ actualLength ++;
+ }
+ switch (actualLength) {
+ case 0: return VoidBinding;
+ case 1: return types[indexOfFirst];
+ }
+
+ // record all supertypes of type
+ // intersect with all supertypes of otherType
+ TypeBinding firstType = types[indexOfFirst];
+ TypeBinding[] superTypes;
+ int superLength;
+ if (firstType.isBaseType()) {
+ return null;
+ } else if (firstType.isArrayType()) {
+ superLength = 4;
+ if (firstType.erasure() != firstType) {
+ ArrayList someInvocations = new ArrayList(1);
+ someInvocations.add(firstType);
+ allInvocations.put(firstType.erasure(), someInvocations);
+ }
+ superTypes = new TypeBinding[] {
+ firstType.erasure(),
+ getJavaIoSerializable(),
+ getJavaLangCloneable(),
+ getJavaLangObject(),
+ };
+ } else {
+ ArrayList typesToVisit = new ArrayList(5);
+ if (firstType.erasure() != firstType) {
+ ArrayList someInvocations = new ArrayList(1);
+ someInvocations.add(firstType);
+ allInvocations.put(firstType.erasure(), someInvocations);
+ }
+ typesToVisit.add(firstType.erasure());
+ ReferenceBinding currentType = (ReferenceBinding)firstType;
+ for (int i = 0, max = 1; i < max; i++) {
+ currentType = (ReferenceBinding) typesToVisit.get(i);
+ TypeBinding itsSuperclass = currentType.superclass();
+ if (itsSuperclass != null) {
+ TypeBinding itsSuperclassErasure = itsSuperclass.erasure();
+ if (!typesToVisit.contains(itsSuperclassErasure)) {
+ if (itsSuperclassErasure != itsSuperclass) {
+ ArrayList someInvocations = new ArrayList(1);
+ someInvocations.add(itsSuperclass);
+ allInvocations.put(itsSuperclassErasure, someInvocations);
+ }
+ typesToVisit.add(itsSuperclassErasure);
+ max++;
+ }
+ }
+ ReferenceBinding[] itsInterfaces = currentType.superInterfaces();
+ for (int j = 0, count = itsInterfaces.length; j < count; j++) {
+ TypeBinding itsInterface = itsInterfaces[j];
+ TypeBinding itsInterfaceErasure = itsInterface.erasure();
+ if (!typesToVisit.contains(itsInterfaceErasure)) {
+ if (itsInterfaceErasure != itsInterface) {
+ ArrayList someInvocations = new ArrayList(1);
+ someInvocations.add(itsInterface);
+ allInvocations.put(itsInterfaceErasure, someInvocations);
+ }
+ typesToVisit.add(itsInterfaceErasure);
+ max++;
+ }
+ }
+ }
+ superLength = typesToVisit.size();
+ superTypes = new TypeBinding[superLength];
+ typesToVisit.toArray(superTypes);
+ }
+ int remaining = superLength;
+ nextOtherType: for (int i = indexOfFirst+1; i < length; i++) {
+ TypeBinding otherType = types[i];
+ if (otherType == null)
+ continue nextOtherType;
+ else if (otherType.isArrayType()) {
+ nextSuperType: for (int j = 0; j < superLength; j++) {
+ TypeBinding superType = superTypes[j];
+ if (superType == null || superType == otherType) continue nextSuperType;
+ switch (superType.id) {
+ case T_JavaIoSerializable :
+ case T_JavaLangCloneable :
+ case T_JavaLangObject :
+ continue nextSuperType;
+ }
+ superTypes[j] = null;
+ if (--remaining == 0) return null;
+
+ }
+ continue nextOtherType;
+ }
+ ReferenceBinding otherRefType = (ReferenceBinding) otherType;
+ nextSuperType: for (int j = 0; j < superLength; j++) {
+ TypeBinding superType = superTypes[j];
+ if (superType == null) continue nextSuperType;
+ if (otherRefType.erasure().isCompatibleWith(superType)) {
+ TypeBinding match = otherRefType.findSuperTypeErasingTo((ReferenceBinding)superType);
+ if (match != null && match.erasure() != match) { // match can be null: interface.findSuperTypeErasingTo(Object)
+ ArrayList someInvocations = (ArrayList) allInvocations.get(superType);
+ if (someInvocations == null) someInvocations = new ArrayList(1);
+ someInvocations.add(match);
+ allInvocations.put(superType, someInvocations);
+ }
+ break nextSuperType;
+ } else {
+ superTypes[j] = null;
+ if (--remaining == 0) return null;
+ }
+ }
+ }
+ // per construction, first non-null supertype is most specific common supertype
+ for (int i = 0; i < superLength; i++) {
+ TypeBinding superType = superTypes[i];
+ if (superType != null) {
+ List matchingInvocations = (List)allInvocations.get(superType);
+ if (matchingInvocations != null) invocations.addAll(matchingInvocations);
+ return superType;
+ }
+ }
+ return null;
+ }
+
+ // Internal use only
+ /* All methods in visible are acceptable matches for the method in question...
+ * The methods defined by the receiver type appear before those defined by its
+ * superclass and so on. We want to find the one which matches best.
+ *
+ * Since the receiver type is a class, we know each method's declaring class is
+ * either the receiver type or one of its superclasses. It is an error if the best match
+ * is defined by a superclass, when a lesser match is defined by the receiver type
+ * or a closer superclass.
+ */
+ protected final MethodBinding mostSpecificClassMethodBinding(MethodBinding[] visible, int visibleSize, InvocationSite invocationSite) {
+ MethodBinding problemMethod = null;
+ MethodBinding previous = null;
+ nextVisible : for (int i = 0; i < visibleSize; i++) {
+ MethodBinding method = visible[i];
+ if (previous != null && method.declaringClass != previous.declaringClass)
+ break; // cannot answer a method farther up the hierarchy than the first method found
+
+ if (!method.isStatic()) previous = method; // no ambiguity for static methods
+ for (int j = 0; j < visibleSize; j++) {
+ if (i == j) continue;
+ MethodBinding compatibleMethod = computeCompatibleMethod(visible[j], method.parameters, invocationSite);
+ if (compatibleMethod == null || !compatibleMethod.isValidBinding()) {
+ if (problemMethod == null)
+ problemMethod = compatibleMethod;
+ continue nextVisible;
+ }
+ }
+ compilationUnitScope().recordTypeReferences(method.thrownExceptions);
+ return method;
+ }
+ if (problemMethod == null)
+ return new ProblemMethodBinding(visible[0].selector, visible[0].parameters, Ambiguous);
+ return problemMethod;
+ }
+
+ /**
+ * Returns the most specific type compatible with all given types.
+ * (i.e. most specific common super type)
+ * If no types is given, will return VoidBinding. If not compatible
+ * reference type is found, returns null.
+ * @deprecated - use lowerUpperBound(TypeBinding[]) instead
+ */
+ public TypeBinding mostSpecificCommonType(TypeBinding[] types) {
+ int length = types.length;
+ int indexOfFirst = -1, actualLength = 0;
+ for (int i = 0; i < length; i++) {
+ TypeBinding type = types[i];
+ if (type == null) continue;
+ if (type.isBaseType()) return null;
+ if (indexOfFirst < 0) indexOfFirst = i;
+ actualLength ++;
+ }
+ switch (actualLength) {
+ case 0: return VoidBinding;
+ case 1: return types[indexOfFirst];
+ }
+
+ // record all supertypes of type
+ // intersect with all supertypes of otherType
+ TypeBinding firstType = types[indexOfFirst];
+ TypeBinding[] superTypes;
+ int superLength;
+ if (firstType.isBaseType()) {
+ return null;
+ } else if (firstType.isArrayType()) {
+ superLength = 4;
+ superTypes = new TypeBinding[] {
+ firstType,
+ getJavaIoSerializable(),
+ getJavaLangCloneable(),
+ getJavaLangObject(),
+ };
+ } else {
+ ArrayList typesToVisit = new ArrayList(5);
+ typesToVisit.add(firstType);
+ ReferenceBinding currentType = (ReferenceBinding)firstType;
+ for (int i = 0, max = 1; i < max; i++) {
+ currentType = (ReferenceBinding) typesToVisit.get(i);
+ ReferenceBinding itsSuperclass = currentType.superclass();
+ if (itsSuperclass != null && !typesToVisit.contains(itsSuperclass)) {
+ typesToVisit.add(itsSuperclass);
+ max++;
+ }
+ ReferenceBinding[] itsInterfaces = currentType.superInterfaces();
+ for (int j = 0, count = itsInterfaces.length; j < count; j++)
+ if (!typesToVisit.contains(itsInterfaces[j])) {
+ typesToVisit.add(itsInterfaces[j]);
+ max++;
+ }
+ }
+ superLength = typesToVisit.size();
+ superTypes = new TypeBinding[superLength];
+ typesToVisit.toArray(superTypes);
+ }
+ int remaining = superLength;
+ nextOtherType: for (int i = indexOfFirst+1; i < length; i++) {
+ TypeBinding otherType = types[i];
+ if (otherType == null)
+ continue nextOtherType;
+ else if (otherType.isArrayType()) {
+ nextSuperType: for (int j = 0; j < superLength; j++) {
+ TypeBinding superType = superTypes[j];
+ if (superType == null || superType == otherType) continue nextSuperType;
+ switch (superType.id) {
+ case T_JavaIoSerializable :
+ case T_JavaLangCloneable :
+ case T_JavaLangObject :
+ continue nextSuperType;
+ }
+ superTypes[j] = null;
+ if (--remaining == 0) return null;
+
+ }
+ continue nextOtherType;
+ }
+ ReferenceBinding otherRefType = (ReferenceBinding) otherType;
+ nextSuperType: for (int j = 0; j < superLength; j++) {
+ TypeBinding superType = superTypes[j];
+ if (superType == null) continue nextSuperType;
+ if (otherRefType.isCompatibleWith(superType)) {
+ break nextSuperType;
+ } else {
+ superTypes[j] = null;
+ if (--remaining == 0) return null;
+ }
+ }
+ }
+ // per construction, first non-null supertype is most specific common supertype
+ for (int i = 0; i < superLength; i++) {
+ TypeBinding superType = superTypes[i];
+ if (superType != null) return superType;
+ }
+ return null;
+ }
+
+ // Internal use only
+ /* All methods in visible are acceptable matches for the method in question...
+ * Since the receiver type is an interface, we ignore the possibility that 2 inherited
+ * but unrelated superinterfaces may define the same method in acceptable but
+ * not identical ways... we just take the best match that we find since any class which
+ * implements the receiver interface MUST implement all signatures for the method...
+ * in which case the best match is correct.
+ *
+ * NOTE: This is different than javac... in the following example, the message send of
+ * bar(X) in class Y is supposed to be ambiguous. But any class which implements the
+ * interface I MUST implement both signatures for bar. If this class was the receiver of
+ * the message send instead of the interface I, then no problem would be reported.
+ *
+ interface I1 {
+ void bar(J j);
+ }
+ interface I2 {
+ // void bar(J j);
+ void bar(Object o);
+ }
+ interface I extends I1, I2 {}
+ interface J {}
+
+ class X implements J {}
+
+ class Y extends X {
+ public void foo(I i, X x) { i.bar(x); }
+ }
+ */
+ protected final MethodBinding mostSpecificInterfaceMethodBinding(MethodBinding[] visible, int visibleSize, InvocationSite invocationSite) {
+ MethodBinding problemMethod = null;
+ nextVisible : for (int i = 0; i < visibleSize; i++) {
+ MethodBinding method = visible[i];
+ for (int j = 0; j < visibleSize; j++) {
+ if (i == j) continue;
+ MethodBinding compatibleMethod = computeCompatibleMethod(visible[j], method.parameters, invocationSite);
+ if (compatibleMethod == null || !compatibleMethod.isValidBinding()) {
+ if (problemMethod == null)
+ problemMethod = compatibleMethod;
+ continue nextVisible;
+ }
+ }
+ compilationUnitScope().recordTypeReferences(method.thrownExceptions);
+ return method;
+ }
+ if (problemMethod == null)
+ return new ProblemMethodBinding(visible[0].selector, visible[0].parameters, Ambiguous);
+ return problemMethod;
+ }
+
+ // Internal use only
+ /* All methods in visible are acceptable matches for the method in question...
+ * Since 1.4, the inherited ambiguous case has been removed from mostSpecificClassMethodBinding
+ */
+ protected final MethodBinding mostSpecificMethodBinding(MethodBinding[] visible, int visibleSize, InvocationSite invocationSite) {
+ MethodBinding method = null;
+ nextVisible : for (int i = 0; i < visibleSize; i++) {
+ method = visible[i];
+ for (int j = 0; j < visibleSize; j++) {
+ if (i == j) continue;
+ MethodBinding compatibleMethod = computeCompatibleMethod(visible[j], method.parameters, invocationSite);
+ if (compatibleMethod == null)
+ continue nextVisible;
+ }
+ compilationUnitScope().recordTypeReferences(method.thrownExceptions);
+ return method;
+ }
+ return new ProblemMethodBinding(visible[0].selector, visible[0].parameters, Ambiguous);
+ }
+
+ public final ClassScope outerMostClassScope() {
+ ClassScope lastClassScope = null;
+ Scope scope = this;
+ do {
+ if (scope instanceof ClassScope)
+ lastClassScope = (ClassScope) scope;
+ scope = scope.parent;
+ } while (scope != null);
+ return lastClassScope; // may answer null if no class around
+ }
+
+ public final MethodScope outerMostMethodScope() {
+ MethodScope lastMethodScope = null;
+ Scope scope = this;
+ do {
+ if (scope instanceof MethodScope)
+ lastMethodScope = (MethodScope) scope;
+ scope = scope.parent;
+ } while (scope != null);
+ return lastMethodScope; // may answer null if no method around
+ }
+
+ public abstract ProblemReporter problemReporter();
+
+ public final CompilationUnitDeclaration referenceCompilationUnit() {
+ Scope scope, unitScope = this;
+ while ((scope = unitScope.parent) != null)
+ unitScope = scope;
+ return ((CompilationUnitScope) unitScope).referenceContext;
+ }
+ // start position in this scope - for ordering scopes vs. variables
+ int startIndex() {
+ return 0;
+ }
+
+ /**
+ * Returns the immediately enclosing switchCase statement (carried by closest blockScope),
+ */
+ public CaseStatement switchCase() {
+ Scope scope = this;
+ do {
+ if (scope instanceof BlockScope)
+ return ((BlockScope) scope).switchCase;
+ scope = scope.parent;
+ } while (scope != null);
+ return null;
+ }
+ /*
+ * Unboxing primitive
+ */
+ public int unboxing(int id) {
+ switch (id) {
+ case T_JavaLangInteger :
+ return T_int;
+ case T_JavaLangByte :
+ return T_byte;
+ case T_JavaLangShort :
+ return T_short;
+ case T_JavaLangCharacter :
+ return T_char;
+ case T_JavaLangLong :
+ return T_long;
+ case T_JavaLangFloat :
+ return T_float;
+ case T_JavaLangDouble :
+ return T_double;
+ case T_JavaLangBoolean :
+ return T_boolean;
+ case T_JavaLangVoid :
+ return T_void;
+ }
+ return id;
+ }
+ /*
+ * Unboxing primitive
+ */
+ public TypeBinding unboxing(TypeBinding type) {
+ switch (type.id) {
+ case T_JavaLangInteger :
+ return IntBinding;
+ case T_JavaLangByte :
+ return ByteBinding;
+ case T_JavaLangShort :
+ return ShortBinding;
+ case T_JavaLangCharacter :
+ return CharBinding;
+ case T_JavaLangLong :
+ return LongBinding;
+ case T_JavaLangFloat :
+ return FloatBinding;
+ case T_JavaLangDouble :
+ return DoubleBinding;
+ case T_JavaLangBoolean :
+ return BooleanBinding;
+ case T_JavaLangVoid :
+ return VoidBinding;
+ }
+ return type;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/SignatureWrapper.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/SignatureWrapper.js
new file mode 100644
index 0000000..3fe6039
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/SignatureWrapper.js
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+
+public class SignatureWrapper {
+ public char[] signature;
+ public int start;
+ public int end;
+ public int bracket;
+
+ public SignatureWrapper(char[] signature) {
+ this.signature = signature;
+ this.start = 0;
+ this.end = this.bracket = -1;
+ }
+ public boolean atEnd() {
+ return this.start < 0 || this.start >= this.signature.length;
+ }
+ public int computeEnd() {
+ int index = this.start;
+ while (this.signature[index] == '[')
+ index++;
+ switch (this.signature[index]) {
+ case 'L' :
+ case 'T' :
+ this.end = CharOperation.indexOf(';', this.signature, this.start);
+ if (this.bracket <= this.start) // already know it if its > start
+ this.bracket = CharOperation.indexOf('<', this.signature, this.start);
+
+ if (this.bracket > this.start && this.bracket < this.end)
+ this.end = this.bracket;
+ else if (this.end == -1)
+ this.end = this.signature.length + 1;
+ break;
+ default :
+ this.end = this.start;
+ }
+
+ this.start = this.end + 1; // skip ';'
+ return this.end;
+ }
+ public char[] nextWord() {
+ this.end = CharOperation.indexOf(';', this.signature, this.start);
+ if (this.bracket <= this.start) // already know it if its > start
+ this.bracket = CharOperation.indexOf('<', this.signature, this.start);
+ int dot = CharOperation.indexOf('.', this.signature, this.start);
+
+ if (this.bracket > this.start && this.bracket < this.end)
+ this.end = this.bracket;
+ if (dot > this.start && dot < this.end)
+ this.end = dot;
+
+ return CharOperation.subarray(this.signature, this.start, this.start = this.end); // skip word
+ }
+ public String toString() {
+ return new String(this.signature) + " @ " + this.start; //$NON-NLS-1$
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/SourceTypeBinding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/SourceTypeBinding.js
new file mode 100644
index 0000000..1fe2d0f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/SourceTypeBinding.js
@@ -0,0 +1,1162 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Iterator;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.AnnotationTypeMemberDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Argument;
+import org.eclipse.wst.jsdt.internal.compiler.ast.AssertStatement;
+import org.eclipse.wst.jsdt.internal.compiler.ast.ConstructorDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.FieldDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.MethodDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.TypeDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.TypeParameter;
+import org.eclipse.wst.jsdt.internal.compiler.ast.TypeReference;
+import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.wst.jsdt.internal.compiler.impl.Constant;
+
+public class SourceTypeBinding extends ReferenceBinding {
+ public ReferenceBinding superclass;
+ public ReferenceBinding[] superInterfaces;
+ public FieldBinding[] fields;
+ public MethodBinding[] methods;
+ public ReferenceBinding[] memberTypes;
+ public TypeVariableBinding[] typeVariables;
+
+ public ClassScope scope;
+
+ // Synthetics are separated into 5 categories: methods, super methods, fields, class literals, changed declaring type bindings and bridge methods
+ public final static int METHOD_EMUL = 0;
+ public final static int FIELD_EMUL = 1;
+ public final static int CLASS_LITERAL_EMUL = 2;
+ public final static int RECEIVER_TYPE_EMUL = 3;
+ HashMap[] synthetics;
+ char[] genericReferenceTypeSignature;
+
+
+public SourceTypeBinding(char[][] compoundName, PackageBinding fPackage, ClassScope scope) {
+ this.compoundName = compoundName;
+ this.fPackage = fPackage;
+ this.fileName = scope.referenceCompilationUnit().getFileName();
+ this.modifiers = scope.referenceContext.modifiers;
+ this.sourceName = scope.referenceContext.name;
+ this.scope = scope;
+
+ // expect the fields & methods to be initialized correctly later
+ this.fields = NoFields;
+ this.methods = NoMethods;
+
+ computeId();
+}
+private void addDefaultAbstractMethod(MethodBinding abstractMethod) {
+ MethodBinding defaultAbstract = new MethodBinding(
+ abstractMethod.modifiers | AccDefaultAbstract,
+ abstractMethod.selector,
+ abstractMethod.returnType,
+ abstractMethod.parameters,
+ abstractMethod.thrownExceptions,
+ this);
+
+ MethodBinding[] temp = new MethodBinding[methods.length + 1];
+ System.arraycopy(methods, 0, temp, 0, methods.length);
+ temp[methods.length] = defaultAbstract;
+ methods = temp;
+}
+public void addDefaultAbstractMethods() {
+ if ((tagBits & KnowsDefaultAbstractMethods) != 0) return;
+
+ tagBits |= KnowsDefaultAbstractMethods;
+
+ if (isClass() && isAbstract()) {
+ if (fPackage.environment.options.targetJDK >= ClassFileConstants.JDK1_2) return; // no longer added for post 1.2 targets
+
+ ReferenceBinding[][] interfacesToVisit = new ReferenceBinding[5][];
+ int lastPosition = 0;
+ interfacesToVisit[lastPosition] = superInterfaces();
+
+ for (int i = 0; i <= lastPosition; i++) {
+ ReferenceBinding[] interfaces = interfacesToVisit[i];
+ for (int j = 0, length = interfaces.length; j < length; j++) {
+ ReferenceBinding superType = interfaces[j];
+ if (superType.isValidBinding()) {
+ MethodBinding[] superMethods = superType.methods();
+ for (int m = superMethods.length; --m >= 0;) {
+ MethodBinding method = superMethods[m];
+ if (!implementsMethod(method))
+ addDefaultAbstractMethod(method);
+ }
+
+ ReferenceBinding[] itsInterfaces = superType.superInterfaces();
+ if (itsInterfaces != NoSuperInterfaces) {
+ if (++lastPosition == interfacesToVisit.length)
+ System.arraycopy(interfacesToVisit, 0, interfacesToVisit = new ReferenceBinding[lastPosition * 2][], 0, lastPosition);
+ interfacesToVisit[lastPosition] = itsInterfaces;
+ }
+ }
+ }
+ }
+ }
+}
+/* Add a new synthetic field for <actualOuterLocalVariable>.
+* Answer the new field or the existing field if one already existed.
+*/
+
+public FieldBinding addSyntheticField(LocalVariableBinding actualOuterLocalVariable) {
+ if (synthetics == null) {
+ synthetics = new HashMap[4];
+ }
+ if (synthetics[FIELD_EMUL] == null) {
+ synthetics[FIELD_EMUL] = new HashMap(5);
+ }
+
+ FieldBinding synthField = (FieldBinding) synthetics[FIELD_EMUL].get(actualOuterLocalVariable);
+ if (synthField == null) {
+ synthField = new SyntheticFieldBinding(
+ CharOperation.concat(SyntheticArgumentBinding.OuterLocalPrefix, actualOuterLocalVariable.name),
+ actualOuterLocalVariable.type,
+ AccPrivate | AccFinal | AccSynthetic,
+ this,
+ Constant.NotAConstant,
+ synthetics[FIELD_EMUL].size());
+ synthetics[FIELD_EMUL].put(actualOuterLocalVariable, synthField);
+ }
+
+ // ensure there is not already such a field defined by the user
+ boolean needRecheck;
+ int index = 1;
+ do {
+ needRecheck = false;
+ FieldBinding existingField;
+ if ((existingField = this.getField(synthField.name, true /*resolve*/)) != null) {
+ TypeDeclaration typeDecl = scope.referenceContext;
+ for (int i = 0, max = typeDecl.fields.length; i < max; i++) {
+ FieldDeclaration fieldDecl = typeDecl.fields[i];
+ if (fieldDecl.binding == existingField) {
+ synthField.name = CharOperation.concat(
+ SyntheticArgumentBinding.OuterLocalPrefix,
+ actualOuterLocalVariable.name,
+ ("$" + String.valueOf(index++)).toCharArray()); //$NON-NLS-1$
+ needRecheck = true;
+ break;
+ }
+ }
+ }
+ } while (needRecheck);
+ return synthField;
+}
+/* Add a new synthetic field for <enclosingType>.
+* Answer the new field or the existing field if one already existed.
+*/
+
+public FieldBinding addSyntheticField(ReferenceBinding enclosingType) {
+
+ if (synthetics == null) {
+ synthetics = new HashMap[4];
+ }
+ if (synthetics[FIELD_EMUL] == null) {
+ synthetics[FIELD_EMUL] = new HashMap(5);
+ }
+
+ FieldBinding synthField = (FieldBinding) synthetics[FIELD_EMUL].get(enclosingType);
+ if (synthField == null) {
+ synthField = new SyntheticFieldBinding(
+ CharOperation.concat(
+ SyntheticArgumentBinding.EnclosingInstancePrefix,
+ String.valueOf(enclosingType.depth()).toCharArray()),
+ enclosingType,
+ AccDefault | AccFinal | AccSynthetic,
+ this,
+ Constant.NotAConstant,
+ synthetics[FIELD_EMUL].size());
+ synthetics[FIELD_EMUL].put(enclosingType, synthField);
+ }
+ // ensure there is not already such a field defined by the user
+ FieldBinding existingField;
+ if ((existingField = this.getField(synthField.name, true /*resolve*/)) != null) {
+ TypeDeclaration typeDecl = scope.referenceContext;
+ for (int i = 0, max = typeDecl.fields.length; i < max; i++) {
+ FieldDeclaration fieldDecl = typeDecl.fields[i];
+ if (fieldDecl.binding == existingField) {
+ scope.problemReporter().duplicateFieldInType(this, fieldDecl);
+ break;
+ }
+ }
+ }
+ return synthField;
+}
+/* Add a new synthetic field for a class literal access.
+* Answer the new field or the existing field if one already existed.
+*/
+
+public FieldBinding addSyntheticField(TypeBinding targetType, BlockScope blockScope) {
+
+ if (synthetics == null) {
+ synthetics = new HashMap[4];
+ }
+ if (synthetics[CLASS_LITERAL_EMUL] == null) {
+ synthetics[CLASS_LITERAL_EMUL] = new HashMap(5);
+ }
+
+ // use a different table than FIELDS, given there might be a collision between emulation of X.this$0 and X.class.
+ FieldBinding synthField = (FieldBinding) synthetics[CLASS_LITERAL_EMUL].get(targetType);
+ if (synthField == null) {
+ synthField = new SyntheticFieldBinding(
+ ("class$" + synthetics[CLASS_LITERAL_EMUL].size()).toCharArray(), //$NON-NLS-1$
+ blockScope.getJavaLangClass(),
+ AccDefault | AccStatic | AccSynthetic,
+ this,
+ Constant.NotAConstant,
+ synthetics[CLASS_LITERAL_EMUL].size());
+ synthetics[CLASS_LITERAL_EMUL].put(targetType, synthField);
+ }
+ // ensure there is not already such a field defined by the user
+ FieldBinding existingField;
+ if ((existingField = this.getField(synthField.name, true /*resolve*/)) != null) {
+ TypeDeclaration typeDecl = blockScope.referenceType();
+ for (int i = 0, max = typeDecl.fields.length; i < max; i++) {
+ FieldDeclaration fieldDecl = typeDecl.fields[i];
+ if (fieldDecl.binding == existingField) {
+ blockScope.problemReporter().duplicateFieldInType(this, fieldDecl);
+ break;
+ }
+ }
+ }
+ return synthField;
+}
+
+/* Add a new synthetic field for the emulation of the assert statement.
+* Answer the new field or the existing field if one already existed.
+*/
+public FieldBinding addSyntheticField(AssertStatement assertStatement, BlockScope blockScope) {
+
+ if (synthetics == null) {
+ synthetics = new HashMap[4];
+ }
+ if (synthetics[FIELD_EMUL] == null) {
+ synthetics[FIELD_EMUL] = new HashMap(5);
+ }
+
+ FieldBinding synthField = (FieldBinding) synthetics[FIELD_EMUL].get("assertionEmulation"); //$NON-NLS-1$
+ if (synthField == null) {
+ synthField = new SyntheticFieldBinding(
+ "$assertionsDisabled".toCharArray(), //$NON-NLS-1$
+ BooleanBinding,
+ AccDefault | AccStatic | AccSynthetic | AccFinal,
+ this,
+ Constant.NotAConstant,
+ synthetics[FIELD_EMUL].size());
+ synthetics[FIELD_EMUL].put("assertionEmulation", synthField); //$NON-NLS-1$
+ }
+ // ensure there is not already such a field defined by the user
+ // ensure there is not already such a field defined by the user
+ boolean needRecheck;
+ int index = 0;
+ do {
+ needRecheck = false;
+ FieldBinding existingField;
+ if ((existingField = this.getField(synthField.name, true /*resolve*/)) != null) {
+ TypeDeclaration typeDecl = scope.referenceContext;
+ for (int i = 0, max = typeDecl.fields.length; i < max; i++) {
+ FieldDeclaration fieldDecl = typeDecl.fields[i];
+ if (fieldDecl.binding == existingField) {
+ synthField.name = CharOperation.concat(
+ "$assertionsDisabled".toCharArray(), //$NON-NLS-1$
+ ("_" + String.valueOf(index++)).toCharArray()); //$NON-NLS-1$
+ needRecheck = true;
+ break;
+ }
+ }
+ }
+ } while (needRecheck);
+ return synthField;
+}
+
+/* Add a new synthetic access method for read/write access to <targetField>.
+ Answer the new method or the existing method if one already existed.
+*/
+
+public SyntheticAccessMethodBinding addSyntheticMethod(FieldBinding targetField, boolean isReadAccess) {
+
+ if (synthetics == null) {
+ synthetics = new HashMap[4];
+ }
+ if (synthetics[METHOD_EMUL] == null) {
+ synthetics[METHOD_EMUL] = new HashMap(5);
+ }
+
+ SyntheticAccessMethodBinding accessMethod = null;
+ SyntheticAccessMethodBinding[] accessors = (SyntheticAccessMethodBinding[]) synthetics[METHOD_EMUL].get(targetField);
+ if (accessors == null) {
+ accessMethod = new SyntheticAccessMethodBinding(targetField, isReadAccess, this);
+ synthetics[METHOD_EMUL].put(targetField, accessors = new SyntheticAccessMethodBinding[2]);
+ accessors[isReadAccess ? 0 : 1] = accessMethod;
+ } else {
+ if ((accessMethod = accessors[isReadAccess ? 0 : 1]) == null) {
+ accessMethod = new SyntheticAccessMethodBinding(targetField, isReadAccess, this);
+ accessors[isReadAccess ? 0 : 1] = accessMethod;
+ }
+ }
+ return accessMethod;
+}
+/* Add a new synthetic access method for access to <targetMethod>.
+ * Must distinguish access method used for super access from others (need to use invokespecial bytecode)
+ Answer the new method or the existing method if one already existed.
+*/
+
+public SyntheticAccessMethodBinding addSyntheticMethod(MethodBinding targetMethod, boolean isSuperAccess) {
+
+ if (synthetics == null) {
+ synthetics = new HashMap[4];
+ }
+ if (synthetics[METHOD_EMUL] == null) {
+ synthetics[METHOD_EMUL] = new HashMap(5);
+ }
+
+ SyntheticAccessMethodBinding accessMethod = null;
+ SyntheticAccessMethodBinding[] accessors = (SyntheticAccessMethodBinding[]) synthetics[METHOD_EMUL].get(targetMethod);
+ if (accessors == null) {
+ accessMethod = new SyntheticAccessMethodBinding(targetMethod, isSuperAccess, this);
+ synthetics[METHOD_EMUL].put(targetMethod, accessors = new SyntheticAccessMethodBinding[2]);
+ accessors[isSuperAccess ? 0 : 1] = accessMethod;
+ } else {
+ if ((accessMethod = accessors[isSuperAccess ? 0 : 1]) == null) {
+ accessMethod = new SyntheticAccessMethodBinding(targetMethod, isSuperAccess, this);
+ accessors[isSuperAccess ? 0 : 1] = accessMethod;
+ }
+ }
+ return accessMethod;
+}
+/*
+ * Record the fact that bridge methods need to be generated to override certain inherited methods
+ */
+public SyntheticAccessMethodBinding addSyntheticBridgeMethod(MethodBinding inheritedMethodToBridge, MethodBinding localTargetMethod) {
+
+ if (synthetics == null) {
+ synthetics = new HashMap[4];
+ }
+ if (synthetics[METHOD_EMUL] == null) {
+ synthetics[METHOD_EMUL] = new HashMap(5);
+ } else {
+ // TODO (philippe) MethodBindings do not implement equals() so how do we prevent adding 2 'equal' inherited methods?
+ // check to see if there is another equivalent inheritedMethod already added
+ Iterator synthMethods = synthetics[METHOD_EMUL].keySet().iterator();
+ while (synthMethods.hasNext()) {
+ Object method = synthMethods.next();
+ if (method instanceof MethodBinding)
+ if (inheritedMethodToBridge.areParameterErasuresEqual((MethodBinding) method))
+ if (inheritedMethodToBridge.returnType.erasure() == ((MethodBinding) method).returnType.erasure())
+ return null;
+ }
+ }
+
+ SyntheticAccessMethodBinding accessMethod = null;
+ SyntheticAccessMethodBinding[] accessors = (SyntheticAccessMethodBinding[]) synthetics[METHOD_EMUL].get(inheritedMethodToBridge);
+ if (accessors == null) {
+ accessMethod = new SyntheticAccessMethodBinding(inheritedMethodToBridge, localTargetMethod);
+ synthetics[METHOD_EMUL].put(inheritedMethodToBridge, accessors = new SyntheticAccessMethodBinding[2]);
+ accessors[1] = accessMethod;
+ } else {
+ if ((accessMethod = accessors[1]) == null) {
+ accessMethod = new SyntheticAccessMethodBinding(inheritedMethodToBridge, localTargetMethod);
+ accessors[1] = accessMethod;
+ }
+ }
+ return accessMethod;
+}
+void faultInTypesForFieldsAndMethods() {
+ fields();
+ methods();
+
+ for (int i = 0, length = memberTypes.length; i < length; i++)
+ ((SourceTypeBinding) memberTypes[i]).faultInTypesForFieldsAndMethods();
+}
+
+// NOTE: the type of each field of a source type is resolved when needed
+public FieldBinding[] fields() {
+ int failed = 0;
+ try {
+ for (int i = 0, length = fields.length; i < length; i++) {
+ if (resolveTypeFor(fields[i]) == null) {
+ fields[i] = null;
+ failed++;
+ }
+ }
+ } finally {
+ if (failed > 0) {
+ // ensure fields are consistent reqardless of the error
+ int newSize = fields.length - failed;
+ if (newSize == 0)
+ return fields = NoFields;
+
+ FieldBinding[] newFields = new FieldBinding[newSize];
+ for (int i = 0, j = 0, length = fields.length; i < length; i++)
+ if (fields[i] != null)
+ newFields[j++] = fields[i];
+ fields = newFields;
+ }
+ }
+ return fields;
+}
+/**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding#genericTypeSignature()
+ */
+public char[] genericTypeSignature() {
+ if (this.genericReferenceTypeSignature == null) {
+ if (this.typeVariables == NoTypeVariables) {
+ this.genericReferenceTypeSignature = this.signature();
+ } else {
+ char[] typeSig = this.signature();
+ StringBuffer sig = new StringBuffer(10);
+ for (int i = 0; i < typeSig.length-1; i++) { // copy all but trailing semicolon
+ sig.append(typeSig[i]);
+ }
+ sig.append('<');
+ for (int i = 0, length = this.typeVariables.length; i < length; i++) {
+ sig.append(this.typeVariables[i].genericTypeSignature());
+ }
+ sig.append(">;"); //$NON-NLS-1$
+ int sigLength = sig.length();
+ this.genericReferenceTypeSignature = new char[sigLength];
+ sig.getChars(0, sigLength, this.genericReferenceTypeSignature, 0);
+ }
+ }
+ return this.genericReferenceTypeSignature;
+}
+/**
+ * <param1 ... paramN>superclass superinterface1 ... superinterfaceN
+ * <T:LY<TT;>;U:Ljava/lang/Object;V::Ljava/lang/Runnable;:Ljava/lang/Cloneable;:Ljava/util/Map;>Ljava/lang/Exception;Ljava/lang/Runnable;
+ */
+public char[] genericSignature() {
+ StringBuffer sig = null;
+ if (this.typeVariables != NoTypeVariables) {
+ sig = new StringBuffer(10);
+ sig.append('<');
+ for (int i = 0, length = this.typeVariables.length; i < length; i++) {
+ sig.append(this.typeVariables[i].genericSignature());
+ }
+ sig.append('>');
+ } else {
+ // could still need a signature if any of supertypes is parameterized
+ noSignature: if (this.superclass == null || !this.superclass.isParameterizedType()) {
+ for (int i = 0, length = this.superInterfaces.length; i < length; i++) {
+ if (this.superInterfaces[i].isParameterizedType()) break noSignature;
+ }
+ return null;
+ }
+ sig = new StringBuffer(10);
+ }
+ if (this.superclass != null) {
+ sig.append(this.superclass.genericTypeSignature());
+ } else {
+ // interface scenario only (as Object cannot be generic) - 65953
+ sig.append(scope.getJavaLangObject().genericTypeSignature());
+ }
+ for (int i = 0, length = this.superInterfaces.length; i < length; i++) {
+ sig.append(this.superInterfaces[i].genericTypeSignature());
+ }
+ return sig.toString().toCharArray();
+}
+public MethodBinding[] getDefaultAbstractMethods() {
+ int count = 0;
+ for (int i = methods.length; --i >= 0;)
+ if (methods[i].isDefaultAbstract())
+ count++;
+ if (count == 0) return NoMethods;
+
+ MethodBinding[] result = new MethodBinding[count];
+ count = 0;
+ for (int i = methods.length; --i >= 0;)
+ if (methods[i].isDefaultAbstract())
+ result[count++] = methods[i];
+ return result;
+}
+// NOTE: the return type, arg & exception types of each method of a source type are resolved when needed
+
+public MethodBinding getExactConstructor(TypeBinding[] argumentTypes) {
+ int argCount = argumentTypes.length;
+
+ if ((modifiers & AccUnresolved) == 0) { // have resolved all arg types & return type of the methods
+ nextMethod : for (int m = methods.length; --m >= 0;) {
+ MethodBinding method = methods[m];
+ if (method.selector == ConstructorDeclaration.ConstantPoolName && method.parameters.length == argCount) {
+ TypeBinding[] toMatch = method.parameters;
+ for (int p = 0; p < argCount; p++)
+ if (toMatch[p] != argumentTypes[p])
+ continue nextMethod;
+ return method;
+ }
+ }
+ } else {
+ MethodBinding[] constructors = getMethods(ConstructorDeclaration.ConstantPoolName); // takes care of duplicates & default abstract methods
+ nextConstructor : for (int c = constructors.length; --c >= 0;) {
+ MethodBinding constructor = constructors[c];
+ TypeBinding[] toMatch = constructor.parameters;
+ if (toMatch.length == argCount) {
+ for (int p = 0; p < argCount; p++)
+ if (toMatch[p] != argumentTypes[p])
+ continue nextConstructor;
+ return constructor;
+ }
+ }
+ }
+ return null;
+}
+// NOTE: the return type, arg & exception types of each method of a source type are resolved when needed
+// searches up the hierarchy as long as no potential (but not exact) match was found.
+
+public MethodBinding getExactMethod(char[] selector, TypeBinding[] argumentTypes, CompilationUnitScope refScope) {
+ if (refScope != null)
+ refScope.recordTypeReference(this);
+
+ int argCount = argumentTypes.length;
+ int selectorLength = selector.length;
+ boolean foundNothing = true;
+
+ if ((modifiers & AccUnresolved) == 0) { // have resolved all arg types & return type of the methods
+ nextMethod : for (int m = methods.length; --m >= 0;) {
+ MethodBinding method = methods[m];
+ if (method.selector.length == selectorLength && CharOperation.equals(method.selector, selector)) {
+ foundNothing = false; // inner type lookups must know that a method with this name exists
+ if (method.parameters.length == argCount) {
+ TypeBinding[] toMatch = method.parameters;
+ for (int p = 0; p < argCount; p++)
+ if (toMatch[p] != argumentTypes[p])
+ continue nextMethod;
+ return method;
+ }
+ }
+ }
+ } else {
+ MethodBinding[] matchingMethods = getMethods(selector); // takes care of duplicates & default abstract methods
+ foundNothing = matchingMethods == NoMethods;
+ nextMethod : for (int m = matchingMethods.length; --m >= 0;) {
+ MethodBinding method = matchingMethods[m];
+ TypeBinding[] toMatch = method.parameters;
+ if (toMatch.length == argCount) {
+ for (int p = 0; p < argCount; p++)
+ if (toMatch[p] != argumentTypes[p])
+ continue nextMethod;
+ return method;
+ }
+ }
+ }
+
+ if (foundNothing) {
+ if (isInterface()) {
+ if (superInterfaces.length == 1)
+ return superInterfaces[0].getExactMethod(selector, argumentTypes, refScope);
+ } else if (superclass != null) {
+ return superclass.getExactMethod(selector, argumentTypes, refScope);
+ }
+ }
+ return null;
+}
+
+// NOTE: the type of a field of a source type is resolved when needed
+public FieldBinding getField(char[] fieldName, boolean needResolve) {
+ // always resolve anyway on source types
+ int fieldLength = fieldName.length;
+ for (int i = 0, length = fields.length; i < length; i++) {
+ FieldBinding field = fields[i];
+ if (field.name.length == fieldLength && CharOperation.equals(field.name, fieldName)) {
+ FieldBinding result = null;
+ try {
+ result = resolveTypeFor(field);
+ return result;
+ } finally {
+ if (result == null) {
+ // ensure fields are consistent reqardless of the error
+ int newSize = fields.length - 1;
+ if (newSize == 0) {
+ fields = NoFields;
+ } else {
+ FieldBinding[] newFields = new FieldBinding[newSize];
+ System.arraycopy(fields, 0, newFields, 0, i);
+ System.arraycopy(fields, i + 1, newFields, i, newSize - i);
+ fields = newFields;
+ }
+ }
+ }
+ }
+ }
+ return null;
+}
+
+// NOTE: the return type, arg & exception types of each method of a source type are resolved when needed
+public MethodBinding[] getMethods(char[] selector) {
+ int selectorLength = selector.length;
+ boolean methodsAreResolved = (modifiers & AccUnresolved) == 0; // have resolved all arg types & return type of the methods
+ java.util.ArrayList matchingMethods = null;
+ for (int i = 0, length = methods.length; i < length; i++) {
+ MethodBinding method = methods[i];
+ if (method.selector.length == selectorLength && CharOperation.equals(method.selector, selector)) {
+ if (!methodsAreResolved && resolveTypesFor(method) == null || method.returnType == null) {
+ methods();
+ return getMethods(selector); // try again since the problem methods have been removed
+ }
+ if (matchingMethods == null)
+ matchingMethods = new java.util.ArrayList(2);
+ matchingMethods.add(method);
+ }
+ }
+ if (matchingMethods == null) return NoMethods;
+
+ MethodBinding[] result = new MethodBinding[matchingMethods.size()];
+ matchingMethods.toArray(result);
+ if (!methodsAreResolved) {
+ for (int i = 0, length = result.length - 1; i < length; i++) {
+ MethodBinding method = result[i];
+ for (int j = length; j > i; j--) {
+ if (method.areParameterErasuresEqual(result[j])) {
+ methods();
+ return getMethods(selector); // try again since the duplicate methods have been removed
+ }
+ }
+ }
+ }
+ return result;
+}
+/* Answer the synthetic field for <actualOuterLocalVariable>
+* or null if one does not exist.
+*/
+
+public FieldBinding getSyntheticField(LocalVariableBinding actualOuterLocalVariable) {
+
+ if (synthetics == null || synthetics[FIELD_EMUL] == null) return null;
+ return (FieldBinding) synthetics[FIELD_EMUL].get(actualOuterLocalVariable);
+}
+/*
+ * Answer the bridge method associated for an inherited methods or null if one does not exist
+ */
+public SyntheticAccessMethodBinding getSyntheticBridgeMethod(MethodBinding inheritedMethodToBridge) {
+
+ if (synthetics == null) return null;
+ if (synthetics[METHOD_EMUL] == null) return null;
+ SyntheticAccessMethodBinding[] accessors = (SyntheticAccessMethodBinding[]) synthetics[METHOD_EMUL].get(inheritedMethodToBridge);
+ if (accessors == null) return null;
+ return accessors[1];
+}
+/**
+ * Returns true if a type is identical to another one,
+ * or for generic types, true if compared to its raw type.
+ */
+public boolean isEquivalentTo(TypeBinding otherType) {
+ if (this == otherType) return true;
+ if (otherType == null) return false;
+ if (otherType.isWildcard()) // wildcard
+ return ((WildcardBinding) otherType).boundCheck(this);
+ if (this.typeVariables == NoTypeVariables) return false;
+ if (otherType.isParameterizedType()) {
+ if ((otherType.tagBits & HasWildcard) == 0 && (!this.isMemberType() || !otherType.isMemberType()))
+ return false; // should have been identical
+ ParameterizedTypeBinding otherParamType = (ParameterizedTypeBinding) otherType;
+ if (this != otherParamType.type)
+ return false;
+ ReferenceBinding enclosing = enclosingType();
+ if (enclosing != null && !enclosing.isEquivalentTo(otherParamType.enclosingType()))
+ return false;
+ int length = this.typeVariables == null ? 0 : this.typeVariables.length;
+ TypeBinding[] otherArguments = otherParamType.arguments;
+ int otherLength = otherArguments == null ? 0 : otherArguments.length;
+ if (otherLength != length)
+ return false;
+ // argument must be identical, only equivalence is allowed if wildcard other type
+ for (int i = 0; i < length; i++) {
+ TypeBinding argument = this.typeVariables[i];
+ TypeBinding otherArgument = otherArguments[i];
+ if (!(argument == otherArgument
+ || (otherArgument.isWildcard()) && argument.isEquivalentTo(otherArgument))) {
+ return false;
+ }
+ }
+ return true;
+ } else if (otherType.isRawType())
+ return otherType.erasure() == this;
+ return false;
+}
+
+public boolean isGenericType() {
+ return this.typeVariables != NoTypeVariables;
+}
+
+public ReferenceBinding[] memberTypes() {
+ return this.memberTypes;
+}
+public FieldBinding getUpdatedFieldBinding(FieldBinding targetField, ReferenceBinding newDeclaringClass) {
+
+ if (this.synthetics == null) {
+ this.synthetics = new HashMap[4];
+ }
+ if (this.synthetics[RECEIVER_TYPE_EMUL] == null) {
+ this.synthetics[RECEIVER_TYPE_EMUL] = new HashMap(5);
+ }
+
+ Hashtable fieldMap = (Hashtable) this.synthetics[RECEIVER_TYPE_EMUL].get(targetField);
+ if (fieldMap == null) {
+ fieldMap = new Hashtable(5);
+ this.synthetics[RECEIVER_TYPE_EMUL].put(targetField, fieldMap);
+ }
+ FieldBinding updatedField = (FieldBinding) fieldMap.get(newDeclaringClass);
+ if (updatedField == null){
+ updatedField = new FieldBinding(targetField, newDeclaringClass);
+ fieldMap.put(newDeclaringClass, updatedField);
+ }
+ return updatedField;
+}
+
+public MethodBinding getUpdatedMethodBinding(MethodBinding targetMethod, ReferenceBinding newDeclaringClass) {
+
+ if (this.synthetics == null) {
+ this.synthetics = new HashMap[4];
+ }
+ if (this.synthetics[RECEIVER_TYPE_EMUL] == null) {
+ this.synthetics[RECEIVER_TYPE_EMUL] = new HashMap(5);
+ }
+
+
+ Hashtable methodMap = (Hashtable) synthetics[RECEIVER_TYPE_EMUL].get(targetMethod);
+ if (methodMap == null) {
+ methodMap = new Hashtable(5);
+ this.synthetics[RECEIVER_TYPE_EMUL].put(targetMethod, methodMap);
+ }
+ MethodBinding updatedMethod = (MethodBinding) methodMap.get(newDeclaringClass);
+ if (updatedMethod == null){
+ updatedMethod = new MethodBinding(targetMethod, newDeclaringClass);
+ methodMap.put(newDeclaringClass, updatedMethod);
+ }
+ return updatedMethod;
+}
+public boolean hasMemberTypes() {
+ return this.memberTypes.length > 0;
+}
+// NOTE: the return type, arg & exception types of each method of a source type are resolved when needed
+public MethodBinding[] methods() {
+ if ((modifiers & AccUnresolved) == 0)
+ return methods;
+
+ int failed = 0;
+ try {
+ for (int i = 0, length = methods.length; i < length; i++) {
+ if (resolveTypesFor(methods[i]) == null) {
+ methods[i] = null; // unable to resolve parameters
+ failed++;
+ }
+ }
+
+ // find & report collision cases
+ for (int i = 0, length = methods.length; i < length; i++) {
+ MethodBinding method = methods[i];
+ if (method != null) {
+ AbstractMethodDeclaration methodDecl = null;
+ for (int j = length - 1; j > i; j--) {
+ MethodBinding method2 = methods[j];
+ if (method2 != null && CharOperation.equals(method.selector, method2.selector)) {
+ if (method.areParameterErasuresEqual(method2)) {
+ if (methodDecl == null) {
+ methodDecl = method.sourceMethod(); // cannot be retrieved after binding is lost
+ scope.problemReporter().duplicateMethodInType(this, methodDecl);
+ methodDecl.binding = null;
+ methods[i] = null;
+ failed++;
+ }
+ AbstractMethodDeclaration method2Decl = method2.sourceMethod();
+ scope.problemReporter().duplicateMethodInType(this, method2Decl);
+ method2Decl.binding = null;
+ methods[j] = null;
+ failed++;
+ }
+ }
+ }
+ if (method.returnType == null && methodDecl == null) { // forget method with invalid return type... was kept to detect possible collisions
+ method.sourceMethod().binding = null;
+ methods[i] = null;
+ failed++;
+ }
+ }
+ }
+ } finally {
+ if (failed > 0) {
+ int newSize = methods.length - failed;
+ if (newSize == 0) {
+ methods = NoMethods;
+ } else {
+ MethodBinding[] newMethods = new MethodBinding[newSize];
+ for (int i = 0, j = 0, length = methods.length; i < length; i++)
+ if (methods[i] != null)
+ newMethods[j++] = methods[i];
+ methods = newMethods;
+ }
+ }
+
+ // handle forward references to potential default abstract methods
+ addDefaultAbstractMethods();
+
+ modifiers ^= AccUnresolved;
+ }
+ return methods;
+}
+private FieldBinding resolveTypeFor(FieldBinding field) {
+ if ((field.modifiers & AccUnresolved) == 0)
+ return field;
+
+ FieldDeclaration[] fieldDecls = scope.referenceContext.fields;
+ for (int f = 0, length = fieldDecls.length; f < length; f++) {
+ if (fieldDecls[f].binding != field)
+ continue;
+
+ MethodScope initializationScope = field.isStatic()
+ ? scope.referenceContext.staticInitializerScope
+ : scope.referenceContext.initializerScope;
+ FieldBinding previousField = initializationScope.initializedField;
+ try {
+ initializationScope.initializedField = field;
+ TypeBinding fieldType = fieldDecls[f].type.resolveType(initializationScope);
+ field.type = fieldType;
+ field.modifiers ^= AccUnresolved;
+ if (fieldType == null) {
+ fieldDecls[f].binding = null;
+ return null;
+ }
+ if (fieldType == VoidBinding) {
+ scope.problemReporter().variableTypeCannotBeVoid(fieldDecls[f]);
+ fieldDecls[f].binding = null;
+ return null;
+ }
+ if (fieldType.isArrayType() && ((ArrayBinding) fieldType).leafComponentType == VoidBinding) {
+ scope.problemReporter().variableTypeCannotBeVoidArray(fieldDecls[f]);
+ fieldDecls[f].binding = null;
+ return null;
+ }
+ if (fieldType instanceof ReferenceBinding && (((ReferenceBinding)fieldType).modifiers & AccGenericSignature) != 0) {
+ field.modifiers |= AccGenericSignature;
+ }
+ } finally {
+ initializationScope.initializedField = previousField;
+ }
+ return field;
+ }
+ return null; // should never reach this point
+}
+private MethodBinding resolveTypesFor(MethodBinding method) {
+
+ if ((method.modifiers & AccUnresolved) == 0)
+ return method;
+
+ AbstractMethodDeclaration methodDecl = method.sourceMethod();
+ if (methodDecl == null) return null; // method could not be resolved in previous iteration
+
+ TypeParameter[] typeParameters = methodDecl.typeParameters();
+ if (typeParameters != null) methodDecl.scope.connectTypeVariables(typeParameters);
+ TypeReference[] exceptionTypes = methodDecl.thrownExceptions;
+ if (exceptionTypes != null) {
+ int size = exceptionTypes.length;
+ method.thrownExceptions = new ReferenceBinding[size];
+ ReferenceBinding throwable = scope.getJavaLangThrowable();
+ int count = 0;
+ ReferenceBinding resolvedExceptionType;
+ for (int i = 0; i < size; i++) {
+ resolvedExceptionType = (ReferenceBinding) exceptionTypes[i].resolveType(methodDecl.scope);
+ if (resolvedExceptionType == null) {
+ continue;
+ }
+ if (resolvedExceptionType.isGenericType() || resolvedExceptionType.isParameterizedType()) {
+ methodDecl.scope.problemReporter().invalidParameterizedExceptionType(resolvedExceptionType, exceptionTypes[i]);
+ continue;
+ }
+ if (throwable != resolvedExceptionType && !throwable.isSuperclassOf(resolvedExceptionType)) {
+ methodDecl.scope.problemReporter().cannotThrowType(this, methodDecl, exceptionTypes[i], resolvedExceptionType);
+ continue;
+ }
+ if ((resolvedExceptionType.modifiers & AccGenericSignature) != 0) {
+ method.modifiers |= AccGenericSignature;
+ }
+ method.thrownExceptions[count++] = resolvedExceptionType;
+ }
+ if (count < size)
+ System.arraycopy(method.thrownExceptions, 0, method.thrownExceptions = new ReferenceBinding[count], 0, count);
+ }
+
+ boolean foundArgProblem = false;
+ Argument[] arguments = methodDecl.arguments;
+ if (arguments != null) {
+ int size = arguments.length;
+ method.parameters = new TypeBinding[size];
+ for (int i = 0; i < size; i++) {
+ Argument arg = arguments[i];
+ TypeBinding parameterType = arg.type.resolveType(methodDecl.scope);
+ if (parameterType == null) {
+ foundArgProblem = true;
+ } else if (parameterType == VoidBinding) {
+ methodDecl.scope.problemReporter().argumentTypeCannotBeVoid(this, methodDecl, arg);
+ foundArgProblem = true;
+ } else if (parameterType.isArrayType() && ((ArrayBinding) parameterType).leafComponentType == VoidBinding) {
+ methodDecl.scope.problemReporter().argumentTypeCannotBeVoidArray(this, methodDecl, arg);
+ foundArgProblem = true;
+ } else {
+ if (parameterType instanceof ReferenceBinding && (((ReferenceBinding)parameterType).modifiers & AccGenericSignature) != 0) {
+ method.modifiers |= AccGenericSignature;
+ }
+ method.parameters[i] = parameterType;
+ }
+ }
+ }
+
+ boolean foundReturnTypeProblem = false;
+ if (!method.isConstructor()) {
+ TypeReference returnType = methodDecl instanceof MethodDeclaration
+ ? ((MethodDeclaration) methodDecl).returnType
+ : ((AnnotationTypeMemberDeclaration) methodDecl).returnType;
+ if (returnType == null) {
+ methodDecl.scope.problemReporter().missingReturnType(methodDecl);
+ method.returnType = null;
+ foundReturnTypeProblem = true;
+ } else {
+ TypeBinding methodType = returnType.resolveType(methodDecl.scope);
+ if (methodType == null) {
+ foundReturnTypeProblem = true;
+ } else if (methodType.isArrayType() && ((ArrayBinding) methodType).leafComponentType == VoidBinding) {
+ methodDecl.scope.problemReporter().returnTypeCannotBeVoidArray(this, (MethodDeclaration) methodDecl);
+ foundReturnTypeProblem = true;
+ } else {
+ method.returnType = methodType;
+ if (methodType instanceof ReferenceBinding && (((ReferenceBinding)methodType).modifiers & AccGenericSignature) != 0) {
+ method.modifiers |= AccGenericSignature;
+ }
+ }
+ }
+ }
+ if (foundArgProblem) {
+ methodDecl.binding = null;
+ return null;
+ }
+ if (foundReturnTypeProblem)
+ return method; // but its still unresolved with a null return type & is still connected to its method declaration
+
+ method.modifiers ^= AccUnresolved;
+ return method;
+}
+public final int sourceEnd() {
+ return scope.referenceContext.sourceEnd;
+}
+public final int sourceStart() {
+ return scope.referenceContext.sourceStart;
+}
+public ReferenceBinding superclass() {
+ return superclass;
+}
+public ReferenceBinding[] superInterfaces() {
+ return superInterfaces;
+}
+// TODO (philippe) could be a performance issue since some senders are building the list just to count them
+public SyntheticAccessMethodBinding[] syntheticAccessMethods() {
+
+ if (synthetics == null || synthetics[METHOD_EMUL] == null || synthetics[METHOD_EMUL].size() == 0) return null;
+
+ // difficult to compute size up front because of the embedded arrays so assume there is only 1
+ int index = 0;
+ SyntheticAccessMethodBinding[] bindings = new SyntheticAccessMethodBinding[1];
+ Iterator fieldsOrMethods = synthetics[METHOD_EMUL].keySet().iterator();
+ while (fieldsOrMethods.hasNext()) {
+
+ Object fieldOrMethod = fieldsOrMethods.next();
+
+ if (fieldOrMethod instanceof MethodBinding) {
+
+ SyntheticAccessMethodBinding[] methodAccessors = (SyntheticAccessMethodBinding[]) synthetics[METHOD_EMUL].get(fieldOrMethod);
+ int numberOfAccessors = 0;
+ if (methodAccessors[0] != null) numberOfAccessors++;
+ if (methodAccessors[1] != null) numberOfAccessors++;
+ if (index + numberOfAccessors > bindings.length)
+ System.arraycopy(bindings, 0, (bindings = new SyntheticAccessMethodBinding[index + numberOfAccessors]), 0, index);
+ if (methodAccessors[0] != null)
+ bindings[index++] = methodAccessors[0]; // super access
+ if (methodAccessors[1] != null)
+ bindings[index++] = methodAccessors[1]; // normal access or bridge
+
+ } else {
+
+ SyntheticAccessMethodBinding[] fieldAccessors = (SyntheticAccessMethodBinding[]) synthetics[METHOD_EMUL].get(fieldOrMethod);
+ int numberOfAccessors = 0;
+ if (fieldAccessors[0] != null) numberOfAccessors++;
+ if (fieldAccessors[1] != null) numberOfAccessors++;
+ if (index + numberOfAccessors > bindings.length)
+ System.arraycopy(bindings, 0, (bindings = new SyntheticAccessMethodBinding[index + numberOfAccessors]), 0, index);
+ if (fieldAccessors[0] != null)
+ bindings[index++] = fieldAccessors[0]; // read access
+ if (fieldAccessors[1] != null)
+ bindings[index++] = fieldAccessors[1]; // write access
+ }
+ }
+
+ // sort them in according to their own indexes
+ int length;
+ SyntheticAccessMethodBinding[] sortedBindings = new SyntheticAccessMethodBinding[length = bindings.length];
+ for (int i = 0; i < length; i++){
+ SyntheticAccessMethodBinding binding = bindings[i];
+ sortedBindings[binding.index] = binding;
+ }
+ return sortedBindings;
+}
+/**
+ * Answer the collection of synthetic fields to append into the classfile
+ */
+public FieldBinding[] syntheticFields() {
+
+ if (synthetics == null) return null;
+
+ int fieldSize = synthetics[FIELD_EMUL] == null ? 0 : synthetics[FIELD_EMUL].size();
+ int literalSize = synthetics[CLASS_LITERAL_EMUL] == null ? 0 :synthetics[CLASS_LITERAL_EMUL].size();
+ int totalSize = fieldSize + literalSize;
+ if (totalSize == 0) return null;
+ FieldBinding[] bindings = new FieldBinding[totalSize];
+
+ // add innerclass synthetics
+ if (synthetics[FIELD_EMUL] != null){
+ Iterator elements = synthetics[FIELD_EMUL].values().iterator();
+ for (int i = 0; i < fieldSize; i++) {
+ SyntheticFieldBinding synthBinding = (SyntheticFieldBinding) elements.next();
+ bindings[synthBinding.index] = synthBinding;
+ }
+ }
+ // add class literal synthetics
+ if (synthetics[CLASS_LITERAL_EMUL] != null){
+ Iterator elements = synthetics[CLASS_LITERAL_EMUL].values().iterator();
+ for (int i = 0; i < literalSize; i++) {
+ SyntheticFieldBinding synthBinding = (SyntheticFieldBinding) elements.next();
+ bindings[fieldSize+synthBinding.index] = synthBinding;
+ }
+ }
+ return bindings;
+}
+public String toString() {
+ StringBuffer buffer = new StringBuffer(30);
+ buffer.append("(id="); //$NON-NLS-1$
+ if (id == NoId)
+ buffer.append("NoId"); //$NON-NLS-1$
+ else
+ buffer.append(id);
+ buffer.append(")\n"); //$NON-NLS-1$
+ if (isDeprecated()) buffer.append("deprecated "); //$NON-NLS-1$
+ if (isPublic()) buffer.append("public "); //$NON-NLS-1$
+ if (isProtected()) buffer.append("protected "); //$NON-NLS-1$
+ if (isPrivate()) buffer.append("private "); //$NON-NLS-1$
+ if (isAbstract() && isClass()) buffer.append("abstract "); //$NON-NLS-1$
+ if (isStatic() && isNestedType()) buffer.append("static "); //$NON-NLS-1$
+ if (isFinal()) buffer.append("final "); //$NON-NLS-1$
+
+ buffer.append(isInterface() ? "interface " : "class "); //$NON-NLS-1$ //$NON-NLS-2$
+ buffer.append((compoundName != null) ? CharOperation.toString(compoundName) : "UNNAMED TYPE"); //$NON-NLS-1$
+
+ if (this.typeVariables != null && this.typeVariables != NoTypeVariables) {
+ buffer.append("\n\t<"); //$NON-NLS-1$
+ for (int i = 0, length = this.typeVariables.length; i < length; i++) {
+ if (i > 0)
+ buffer.append(", "); //$NON-NLS-1$
+ buffer.append((this.typeVariables[i] != null) ? this.typeVariables[i].toString() : "NULL TYPE VARIABLE"); //$NON-NLS-1$
+ }
+ buffer.append(">"); //$NON-NLS-1$
+ } else {
+ buffer.append("<NULL TYPE VARIABLES>"); //$NON-NLS-1$
+ }
+ buffer.append("\n\textends "); //$NON-NLS-1$
+ buffer.append((superclass != null) ? superclass.debugName() : "NULL TYPE"); //$NON-NLS-1$
+
+ if (superInterfaces != null) {
+ if (superInterfaces != NoSuperInterfaces) {
+ buffer.append("\n\timplements : "); //$NON-NLS-1$
+ for (int i = 0, length = superInterfaces.length; i < length; i++) {
+ if (i > 0)
+ buffer.append(", "); //$NON-NLS-1$
+ buffer.append((superInterfaces[i] != null) ? superInterfaces[i].debugName() : "NULL TYPE"); //$NON-NLS-1$
+ }
+ }
+ } else {
+ buffer.append("NULL SUPERINTERFACES"); //$NON-NLS-1$
+ }
+
+ if (enclosingType() != null) {
+ buffer.append("\n\tenclosing type : "); //$NON-NLS-1$
+ buffer.append(enclosingType().debugName());
+ }
+
+ if (fields != null) {
+ if (fields != NoFields) {
+ buffer.append("\n/* fields */"); //$NON-NLS-1$
+ for (int i = 0, length = fields.length; i < length; i++)
+ buffer.append('\n').append((fields[i] != null) ? fields[i].toString() : "NULL FIELD"); //$NON-NLS-1$
+ }
+ } else {
+ buffer.append("NULL FIELDS"); //$NON-NLS-1$
+ }
+
+ if (methods != null) {
+ if (methods != NoMethods) {
+ buffer.append("\n/* methods */"); //$NON-NLS-1$
+ for (int i = 0, length = methods.length; i < length; i++)
+ buffer.append('\n').append((methods[i] != null) ? methods[i].toString() : "NULL METHOD"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ } else {
+ buffer.append("NULL METHODS"); //$NON-NLS-1$
+ }
+
+ if (memberTypes != null) {
+ if (memberTypes != NoMemberTypes) {
+ buffer.append("\n/* members */"); //$NON-NLS-1$
+ for (int i = 0, length = memberTypes.length; i < length; i++)
+ buffer.append('\n').append((memberTypes[i] != null) ? memberTypes[i].toString() : "NULL TYPE"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ } else {
+ buffer.append("NULL MEMBER TYPES"); //$NON-NLS-1$
+ }
+
+ buffer.append("\n\n"); //$NON-NLS-1$
+ return buffer.toString();
+}
+public TypeVariableBinding[] typeVariables() {
+ return this.typeVariables;
+}
+void verifyMethods(MethodVerifier verifier) {
+ verifier.verify(this);
+
+ for (int i = memberTypes.length; --i >= 0;)
+ ((SourceTypeBinding) memberTypes[i]).verifyMethods(verifier);
+}
+
+/* Answer the synthetic field for <targetEnclosingType>
+* or null if one does not exist.
+*/
+
+public FieldBinding getSyntheticField(ReferenceBinding targetEnclosingType, boolean onlyExactMatch) {
+
+ if (synthetics == null || synthetics[FIELD_EMUL] == null) return null;
+ FieldBinding field = (FieldBinding) synthetics[FIELD_EMUL].get(targetEnclosingType);
+ if (field != null) return field;
+
+ // type compatibility : to handle cases such as
+ // class T { class M{}}
+ // class S extends T { class N extends M {}} --> need to use S as a default enclosing instance for the super constructor call in N().
+ if (!onlyExactMatch){
+ Iterator accessFields = synthetics[FIELD_EMUL].values().iterator();
+ while (accessFields.hasNext()) {
+ field = (FieldBinding) accessFields.next();
+ if (CharOperation.prefixEquals(SyntheticArgumentBinding.EnclosingInstancePrefix, field.name)
+ && ((ReferenceBinding) field.type).findSuperTypeErasingTo(targetEnclosingType) != null)
+ return field;
+ }
+ }
+ return null;
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/Substitution.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/Substitution.js
new file mode 100644
index 0000000..2a417b3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/Substitution.js
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+/*
+ * Encapsulates aspects related to type variable substitution
+ */
+public interface Substitution {
+
+ /**
+ * Returns the type substitute for a given type, or itself
+ * if no substitution got performed.
+ */
+ TypeBinding substitute(TypeBinding originalType);
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/SyntheticAccessMethodBinding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/SyntheticAccessMethodBinding.js
new file mode 100644
index 0000000..11b46cf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/SyntheticAccessMethodBinding.js
@@ -0,0 +1,307 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.FieldDeclaration;
+
+public class SyntheticAccessMethodBinding extends MethodBinding {
+
+ public FieldBinding targetReadField; // read access to a field
+ public FieldBinding targetWriteField; // write access to a field
+ public MethodBinding targetMethod; // method or constructor
+
+ public int accessType;
+
+ public final static int FieldReadAccess = 1; // field read
+ public final static int FieldWriteAccess = 2; // field write
+ public final static int MethodAccess = 3; // normal method
+ public final static int ConstructorAccess = 4; // constructor
+ public final static int SuperMethodAccess = 5; // super method
+ public final static int BridgeMethodAccess = 6; // bridge method
+
+ final static char[] AccessMethodPrefix = { 'a', 'c', 'c', 'e', 's', 's', '$' };
+
+ public int sourceStart = 0; // start position of the matching declaration
+ public int index; // used for sorting access methods in the class file
+
+ public SyntheticAccessMethodBinding(FieldBinding targetField, boolean isReadAccess, ReferenceBinding declaringClass) {
+
+ this.modifiers = AccDefault | AccStatic | AccSynthetic;
+ SourceTypeBinding declaringSourceType = (SourceTypeBinding) declaringClass;
+ SyntheticAccessMethodBinding[] knownAccessMethods = declaringSourceType.syntheticAccessMethods();
+ int methodId = knownAccessMethods == null ? 0 : knownAccessMethods.length;
+ this.index = methodId;
+ this.selector = CharOperation.concat(AccessMethodPrefix, String.valueOf(methodId).toCharArray());
+ if (isReadAccess) {
+ this.returnType = targetField.type;
+ if (targetField.isStatic()) {
+ this.parameters = NoParameters;
+ } else {
+ this.parameters = new TypeBinding[1];
+ this.parameters[0] = declaringSourceType;
+ }
+ this.targetReadField = targetField;
+ this.accessType = FieldReadAccess;
+ } else {
+ this.returnType = VoidBinding;
+ if (targetField.isStatic()) {
+ this.parameters = new TypeBinding[1];
+ this.parameters[0] = targetField.type;
+ } else {
+ this.parameters = new TypeBinding[2];
+ this.parameters[0] = declaringSourceType;
+ this.parameters[1] = targetField.type;
+ }
+ this.targetWriteField = targetField;
+ this.accessType = FieldWriteAccess;
+ }
+ this.thrownExceptions = NoExceptions;
+ this.declaringClass = declaringSourceType;
+
+ // check for method collision
+ boolean needRename;
+ do {
+ check : {
+ needRename = false;
+ // check for collision with known methods
+ MethodBinding[] methods = declaringSourceType.methods;
+ for (int i = 0, length = methods.length; i < length; i++) {
+ if (CharOperation.equals(this.selector, methods[i].selector) && this.areParametersEqual(methods[i])) {
+ needRename = true;
+ break check;
+ }
+ }
+ // check for collision with synthetic accessors
+ if (knownAccessMethods != null) {
+ for (int i = 0, length = knownAccessMethods.length; i < length; i++) {
+ if (knownAccessMethods[i] == null) continue;
+ if (CharOperation.equals(this.selector, knownAccessMethods[i].selector) && this.areParametersEqual(methods[i])) {
+ needRename = true;
+ break check;
+ }
+ }
+ }
+ }
+ if (needRename) { // retry with a selector postfixed by a growing methodId
+ this.setSelector(CharOperation.concat(AccessMethodPrefix, String.valueOf(++methodId).toCharArray()));
+ }
+ } while (needRename);
+
+ // retrieve sourceStart position for the target field for line number attributes
+ FieldDeclaration[] fieldDecls = declaringSourceType.scope.referenceContext.fields;
+ if (fieldDecls != null) {
+ for (int i = 0, max = fieldDecls.length; i < max; i++) {
+ if (fieldDecls[i].binding == targetField) {
+ this.sourceStart = fieldDecls[i].sourceStart;
+ return;
+ }
+ }
+ }
+
+ /* did not find the target field declaration - it is a synthetic one
+ public class A {
+ public class B {
+ public class C {
+ void foo() {
+ System.out.println("A.this = " + A.this);
+ }
+ }
+ }
+ public static void main(String args[]) {
+ new A().new B().new C().foo();
+ }
+ }
+ */
+ // We now at this point - per construction - it is for sure an enclosing instance, we are going to
+ // show the target field type declaration location.
+ this.sourceStart = declaringSourceType.scope.referenceContext.sourceStart; // use the target declaring class name position instead
+ }
+
+ public SyntheticAccessMethodBinding(MethodBinding targetMethod, boolean isSuperAccess, ReferenceBinding receiverType) {
+
+ if (targetMethod.isConstructor()) {
+ this.initializeConstructorAccessor(targetMethod);
+ } else {
+ this.initializeMethodAccessor(targetMethod, isSuperAccess, receiverType);
+ }
+ }
+
+ /*
+ * Construct a bridge method
+ */
+ public SyntheticAccessMethodBinding(MethodBinding overridenMethodToBridge, MethodBinding localTargetMethod) {
+ this.declaringClass = localTargetMethod.declaringClass;
+ this.selector = overridenMethodToBridge.selector;
+ this.modifiers = overridenMethodToBridge.modifiers | AccBridge | AccSynthetic;
+ this.modifiers &= ~(AccAbstract | AccNative);
+ this.returnType = overridenMethodToBridge.returnType;
+ this.parameters = overridenMethodToBridge.parameters;
+ this.thrownExceptions = overridenMethodToBridge.thrownExceptions;
+ this.targetMethod = localTargetMethod;
+ this.accessType = BridgeMethodAccess;
+ SyntheticAccessMethodBinding[] knownAccessMethods = ((SourceTypeBinding)this.declaringClass).syntheticAccessMethods();
+ int methodId = knownAccessMethods == null ? 0 : knownAccessMethods.length;
+ this.index = methodId;
+ }
+
+ /**
+ * An constructor accessor is a constructor with an extra argument (declaringClass), in case of
+ * collision with an existing constructor, then add again an extra argument (declaringClass again).
+ */
+ public void initializeConstructorAccessor(MethodBinding accessedConstructor) {
+
+ this.targetMethod = accessedConstructor;
+ this.modifiers = AccDefault | AccSynthetic;
+ SourceTypeBinding sourceType = (SourceTypeBinding) accessedConstructor.declaringClass;
+ SyntheticAccessMethodBinding[] knownAccessMethods =
+ sourceType.syntheticAccessMethods();
+ this.index = knownAccessMethods == null ? 0 : knownAccessMethods.length;
+
+ this.selector = accessedConstructor.selector;
+ this.returnType = accessedConstructor.returnType;
+ this.accessType = ConstructorAccess;
+ this.parameters = new TypeBinding[accessedConstructor.parameters.length + 1];
+ System.arraycopy(
+ accessedConstructor.parameters,
+ 0,
+ this.parameters,
+ 0,
+ accessedConstructor.parameters.length);
+ parameters[accessedConstructor.parameters.length] =
+ accessedConstructor.declaringClass;
+ this.thrownExceptions = accessedConstructor.thrownExceptions;
+ this.declaringClass = sourceType;
+
+ // check for method collision
+ boolean needRename;
+ do {
+ check : {
+ needRename = false;
+ // check for collision with known methods
+ MethodBinding[] methods = sourceType.methods;
+ for (int i = 0, length = methods.length; i < length; i++) {
+ if (CharOperation.equals(this.selector, methods[i].selector)
+ && this.areParametersEqual(methods[i])) {
+ needRename = true;
+ break check;
+ }
+ }
+ // check for collision with synthetic accessors
+ if (knownAccessMethods != null) {
+ for (int i = 0, length = knownAccessMethods.length; i < length; i++) {
+ if (knownAccessMethods[i] == null)
+ continue;
+ if (CharOperation.equals(this.selector, knownAccessMethods[i].selector)
+ && this.areParametersEqual(knownAccessMethods[i])) {
+ needRename = true;
+ break check;
+ }
+ }
+ }
+ }
+ if (needRename) { // retry with a new extra argument
+ int length = this.parameters.length;
+ System.arraycopy(
+ this.parameters,
+ 0,
+ this.parameters = new TypeBinding[length + 1],
+ 0,
+ length);
+ this.parameters[length] = this.declaringClass;
+ }
+ } while (needRename);
+
+ // retrieve sourceStart position for the target method for line number attributes
+ AbstractMethodDeclaration[] methodDecls =
+ sourceType.scope.referenceContext.methods;
+ if (methodDecls != null) {
+ for (int i = 0, length = methodDecls.length; i < length; i++) {
+ if (methodDecls[i].binding == accessedConstructor) {
+ this.sourceStart = methodDecls[i].sourceStart;
+ return;
+ }
+ }
+ }
+ }
+
+ /**
+ * An method accessor is a method with an access$N selector, where N is incremented in case of collisions.
+ */
+ public void initializeMethodAccessor(MethodBinding accessedMethod, boolean isSuperAccess, ReferenceBinding receiverType) {
+
+ this.targetMethod = accessedMethod;
+ this.modifiers = AccDefault | AccStatic | AccSynthetic;
+ SourceTypeBinding declaringSourceType = (SourceTypeBinding) receiverType;
+ SyntheticAccessMethodBinding[] knownAccessMethods = declaringSourceType.syntheticAccessMethods();
+ int methodId = knownAccessMethods == null ? 0 : knownAccessMethods.length;
+ this.index = methodId;
+
+ this.selector = CharOperation.concat(AccessMethodPrefix, String.valueOf(methodId).toCharArray());
+ this.returnType = accessedMethod.returnType;
+ this.accessType = isSuperAccess ? SuperMethodAccess : MethodAccess;
+
+ if (accessedMethod.isStatic()) {
+ this.parameters = accessedMethod.parameters;
+ } else {
+ this.parameters = new TypeBinding[accessedMethod.parameters.length + 1];
+ this.parameters[0] = declaringSourceType;
+ System.arraycopy(accessedMethod.parameters, 0, this.parameters, 1, accessedMethod.parameters.length);
+ }
+ this.thrownExceptions = accessedMethod.thrownExceptions;
+ this.declaringClass = declaringSourceType;
+
+ // check for method collision
+ boolean needRename;
+ do {
+ check : {
+ needRename = false;
+ // check for collision with known methods
+ MethodBinding[] methods = declaringSourceType.methods;
+ for (int i = 0, length = methods.length; i < length; i++) {
+ if (CharOperation.equals(this.selector, methods[i].selector) && this.areParametersEqual(methods[i])) {
+ needRename = true;
+ break check;
+ }
+ }
+ // check for collision with synthetic accessors
+ if (knownAccessMethods != null) {
+ for (int i = 0, length = knownAccessMethods.length; i < length; i++) {
+ if (knownAccessMethods[i] == null) continue;
+ if (CharOperation.equals(this.selector, knownAccessMethods[i].selector) && this.areParametersEqual(knownAccessMethods[i])) {
+ needRename = true;
+ break check;
+ }
+ }
+ }
+ }
+ if (needRename) { // retry with a selector & a growing methodId
+ this.setSelector(CharOperation.concat(AccessMethodPrefix, String.valueOf(++methodId).toCharArray()));
+ }
+ } while (needRename);
+
+ // retrieve sourceStart position for the target method for line number attributes
+ AbstractMethodDeclaration[] methodDecls = declaringSourceType.scope.referenceContext.methods;
+ if (methodDecls != null) {
+ for (int i = 0, length = methodDecls.length; i < length; i++) {
+ if (methodDecls[i].binding == accessedMethod) {
+ this.sourceStart = methodDecls[i].sourceStart;
+ return;
+ }
+ }
+ }
+ }
+
+ protected boolean isConstructorRelated() {
+ return accessType == ConstructorAccess;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/SyntheticArgumentBinding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/SyntheticArgumentBinding.js
new file mode 100644
index 0000000..42f74bb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/SyntheticArgumentBinding.js
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+/**
+ * Specific local variable location used to:
+ * - either provide emulation for outer local variables used from within innerclass constructs,
+ * - or provide emulation to enclosing instances.
+ * When it is mapping to an outer local variable, this actual outer local is accessible through
+ * the public field #actualOuterLocalVariable.
+ *
+ * Such a synthetic argument binding will be inserted in all constructors of local innertypes before
+ * the user arguments.
+ */
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+
+public class SyntheticArgumentBinding extends LocalVariableBinding {
+
+ {
+ this.isArgument = true;
+ this.useFlag = USED;
+ }
+
+ // if the argument is mapping to an outer local variable, this denotes the outer actual variable
+ public LocalVariableBinding actualOuterLocalVariable;
+ // if the argument has a matching synthetic field
+ public FieldBinding matchingField;
+
+ final static char[] OuterLocalPrefix = { 'v', 'a', 'l', '$' };
+ final static char[] EnclosingInstancePrefix = { 't', 'h', 'i', 's', '$' };
+
+ public SyntheticArgumentBinding(LocalVariableBinding actualOuterLocalVariable) {
+
+ super(
+ CharOperation.concat(OuterLocalPrefix, actualOuterLocalVariable.name),
+ actualOuterLocalVariable.type,
+ AccFinal,
+ true);
+ this.actualOuterLocalVariable = actualOuterLocalVariable;
+ }
+
+ public SyntheticArgumentBinding(ReferenceBinding enclosingType) {
+
+ super(
+ CharOperation.concat(
+ SyntheticArgumentBinding.EnclosingInstancePrefix,
+ String.valueOf(enclosingType.depth()).toCharArray()),
+ enclosingType,
+ AccFinal,
+ true);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/SyntheticFieldBinding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/SyntheticFieldBinding.js
new file mode 100644
index 0000000..b9d670b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/SyntheticFieldBinding.js
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import org.eclipse.wst.jsdt.internal.compiler.impl.Constant;
+
+public class SyntheticFieldBinding extends FieldBinding {
+ public int index;
+public SyntheticFieldBinding(char[] name, TypeBinding type, int modifiers, ReferenceBinding declaringClass, Constant constant, int index) {
+ super(name, type, modifiers, declaringClass, constant);
+ this.index = index;
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/TagBits.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/TagBits.js
new file mode 100644
index 0000000..4338d5e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/TagBits.js
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode;
+
+public interface TagBits {
+
+ // Tag bits in the tagBits int of every TypeBinding
+ final int IsArrayType = ASTNode.Bit1;
+ final int IsBaseType = ASTNode.Bit2;
+ final int IsNestedType = ASTNode.Bit3;
+ final int IsMemberType = ASTNode.Bit4;
+ final int MemberTypeMask = IsNestedType | IsMemberType;
+ final int IsLocalType = ASTNode.Bit5;
+ final int LocalTypeMask = IsNestedType | IsLocalType;
+ final int IsAnonymousType = ASTNode.Bit6;
+ final int AnonymousTypeMask = LocalTypeMask | IsAnonymousType;
+ final int IsBinaryBinding = ASTNode.Bit7;
+
+ // for the type hierarchy check used by ClassScope
+ final int BeginHierarchyCheck = ASTNode.Bit9;
+ final int EndHierarchyCheck = ASTNode.Bit10;
+
+ // test bit to see if default abstract methods were computed
+ final int KnowsDefaultAbstractMethods = ASTNode.Bit11;
+
+ // Reusable bit currently used by Scopes
+ final int InterfaceVisited = ASTNode.Bit12;
+
+ // test bits to see if parts of binary types are faulted
+ final int AreFieldsComplete = ASTNode.Bit13;
+ final int AreMethodsComplete = ASTNode.Bit14;
+
+ // test bit to avoid asking a type for a member type (includes inherited member types)
+ final int HasNoMemberTypes = ASTNode.Bit15;
+
+ // test bit to identify if the type's hierarchy is inconsistent
+ final int HierarchyHasProblems = ASTNode.Bit16;
+
+ // set for parameterized type NOT of the form X<?,?>
+ final int IsBoundParameterizedType = ASTNode.Bit24;
+
+ // used by BinaryTypeBinding
+ final int HasUnresolvedTypeVariables = ASTNode.Bit25;
+ final int HasUnresolvedSuperclass = ASTNode.Bit26;
+ final int HasUnresolvedSuperinterfaces = ASTNode.Bit27;
+ final int HasUnresolvedEnclosingType = ASTNode.Bit28;
+ final int HasUnresolvedMemberTypes = ASTNode.Bit29;
+
+ final int HasTypeVariable = ASTNode.Bit30; // set either for type variables (direct) or parameterized types indirectly referencing type variables
+ final int HasWildcard = ASTNode.Bit31; // set either for wildcards (direct) or parameterized types indirectly referencing wildcards
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/TypeBinding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/TypeBinding.js
new file mode 100644
index 0000000..0cfc2bf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/TypeBinding.js
@@ -0,0 +1,289 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import java.util.Map;
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Wildcard;
+
+/*
+ * Not all fields defined by this type (& its subclasses) are initialized when it is created.
+ * Some are initialized only when needed.
+ *
+ * Accessors have been provided for some public fields so all TypeBindings have the same API...
+ * but access public fields directly whenever possible.
+ * Non-public fields have accessors which should be used everywhere you expect the field to be initialized.
+ *
+ * null is NOT a valid value for a non-public field... it just means the field is not initialized.
+ */
+abstract public class TypeBinding extends Binding implements BaseTypes, TagBits, TypeConstants, TypeIds {
+ public int id = NoId;
+ public int tagBits = 0; // See values in the interface TagBits below
+/* API
+ * Answer the receiver's binding type from Binding.BindingID.
+ */
+
+public final int bindingType() {
+ return TYPE;
+}
+/* Answer true if the receiver can be instantiated
+ */
+public boolean canBeInstantiated() {
+ return !isBaseType();
+}
+/**
+ * Collect the substitutes into a map for certain type variables inside the receiver type
+ * e.g. Collection<T>.findSubstitute(T, Collection<List<X>>): T --> List<X>
+ */
+public void collectSubstitutes(TypeBinding otherType, Map substitutes) {
+ // no substitute by default
+}
+/**
+ * Answer the receiver's constant pool name.
+ * NOTE: This method should only be used during/after code gen.
+ * e.g. 'java/lang/Object'
+ */
+public abstract char[] constantPoolName();
+
+public String debugName() {
+ return new String(readableName());
+}
+/*
+ * Answer the receiver's dimensions - 0 for non-array types
+ */
+public int dimensions(){
+ return 0;
+}
+public TypeBinding erasure() {
+ return this;
+}
+/**
+ * Returns the type to use for generic cast, or null if none required
+ */
+public TypeBinding genericCast(TypeBinding otherType) {
+ if (this == otherType) return null;
+ if (otherType.isWildcard() && ((WildcardBinding)otherType).kind != Wildcard.EXTENDS) return null;
+ TypeBinding otherErasure = otherType.erasure();
+ if (otherErasure == this.erasure()) return null;
+ return otherErasure;
+}
+
+/**
+ * Answer the receiver classfile signature.
+ * Arrays & base types do not distinguish between signature() & constantPoolName().
+ * NOTE: This method should only be used during/after code gen.
+ */
+public char[] genericTypeSignature() {
+ return signature();
+}
+public abstract PackageBinding getPackage();
+/* Answer true if the receiver is an array
+*/
+public final boolean isArrayType() {
+ return (tagBits & IsArrayType) != 0;
+}
+/* Answer true if the receiver is a base type
+*/
+public final boolean isBaseType() {
+ return (tagBits & IsBaseType) != 0;
+}
+public boolean isClass() {
+ return false;
+}
+/* Answer true if the receiver type can be assigned to the argument type (right)
+*/
+public abstract boolean isCompatibleWith(TypeBinding right);
+
+/**
+ * Returns true if a type is identical to another one,
+ * or for generic types, true if compared to its raw type.
+ */
+public boolean isEquivalentTo(TypeBinding otherType) {
+ return this == otherType;
+}
+
+public boolean isGenericType() {
+ return false;
+}
+
+/* Answer true if the receiver's hierarchy has problems (always false for arrays & base types)
+*/
+public final boolean isHierarchyInconsistent() {
+ return (tagBits & HierarchyHasProblems) != 0;
+}
+public boolean isInterface() {
+ return false;
+}
+public final boolean isLocalType() {
+ return (tagBits & IsLocalType) != 0;
+}
+
+public final boolean isMemberType() {
+ return (tagBits & IsMemberType) != 0;
+}
+
+public final boolean isNestedType() {
+ return (tagBits & IsNestedType) != 0;
+}
+public final boolean isNumericType() {
+ switch (id) {
+ case T_int :
+ case T_float :
+ case T_double :
+ case T_short :
+ case T_byte :
+ case T_long :
+ case T_char :
+ return true;
+ default :
+ return false;
+ }
+}
+
+/**
+ * Returns true if the type is parameterized, e.g. List<String>
+ */
+public boolean isParameterizedType() {
+ return false;
+}
+
+/**
+ * Returns true if the two types are statically known to be different at compile-time,
+ * e.g. a type variable is not probably known to be distinct from another type
+ */
+public boolean isProvablyDistinctFrom(TypeBinding otherType) {
+ if (this == otherType) return false;
+ if (this.isTypeVariable()) return false;
+ if (this.isWildcard()) return false;
+ if (otherType.isTypeVariable()) return false;
+ if (otherType.isWildcard()) return false;
+ if (this.isParameterizedType()) {
+ ParameterizedTypeBinding parameterizedType = (ParameterizedTypeBinding) this;
+ if (parameterizedType.type.isProvablyDistinctFrom(otherType.erasure())) return true;
+ if (otherType.isGenericType()) return false;
+ if (otherType.isRawType()) return false;
+ if (otherType.isParameterizedType()) {
+ TypeBinding[] arguments = parameterizedType.arguments;
+ if (arguments == null) return false;
+ ParameterizedTypeBinding otherParameterizedType = (ParameterizedTypeBinding) otherType;
+ TypeBinding[] otherArguments = otherParameterizedType. arguments;
+ if (otherArguments == null) return false;
+ for (int i = 0, length = arguments.length; i < length; i++) {
+ if (arguments[i].isProvablyDistinctFrom(otherArguments[i])) return true;
+ }
+ return false;
+ }
+ } else if (this.isRawType()) {
+ return this.erasure().isProvablyDistinctFrom(otherType.erasure());
+ } else if (this.isGenericType()) {
+ return this != otherType.erasure();
+ }
+ return this != otherType;
+}
+
+/**
+ * Returns true if the type was declared as a type variable
+ */
+public boolean isTypeVariable() {
+ return false;
+}
+
+
+/**
+ * Returns true if parameterized type AND not of the form List<?>
+ */
+public boolean isBoundParameterizedType() {
+ return (this.tagBits & TagBits.IsBoundParameterizedType) != 0;
+}
+
+/**
+ * Returns true if the type is a wildcard
+ */
+public boolean isWildcard() {
+ return false;
+}
+
+public TypeBinding leafComponentType(){
+ return this;
+}
+
+/**
+ * Answer the qualified name of the receiver's package separated by periods
+ * or an empty string if its the default package.
+ *
+ * For example, {java.util.Hashtable}.
+ */
+
+public char[] qualifiedPackageName() {
+ PackageBinding packageBinding = getPackage();
+ return packageBinding == null || packageBinding.compoundName == CharOperation.NO_CHAR_CHAR
+ ? CharOperation.NO_CHAR
+ : packageBinding.readableName();
+}
+/**
+* Answer the source name for the type.
+* In the case of member types, as the qualified name from its top level type.
+* For example, for a member type N defined inside M & A: "A.M.N".
+*/
+
+public abstract char[] qualifiedSourceName();
+
+public boolean isRawType() {
+ return false;
+}
+
+/**
+ * Answer the receiver classfile signature.
+ * Arrays & base types do not distinguish between signature() & constantPoolName().
+ * NOTE: This method should only be used during/after code gen.
+ */
+public char[] signature() {
+ return constantPoolName();
+}
+
+public abstract char[] sourceName();
+
+public void swapUnresolved(UnresolvedReferenceBinding unresolvedType, ReferenceBinding resolvedType, LookupEnvironment environment) {
+ // subclasses must override if they wrap another type binding
+}
+public TypeVariableBinding[] typeVariables() {
+ return NoTypeVariables;
+}
+/**
+ * Match a well-known type id to its binding
+ */
+public static final TypeBinding wellKnownType(Scope scope, int id) {
+ switch (id) {
+ case T_boolean :
+ return BooleanBinding;
+ case T_byte :
+ return ByteBinding;
+ case T_char :
+ return CharBinding;
+ case T_short :
+ return ShortBinding;
+ case T_double :
+ return DoubleBinding;
+ case T_float :
+ return FloatBinding;
+ case T_int :
+ return IntBinding;
+ case T_long :
+ return LongBinding;
+ case T_Object :
+ return scope.getJavaLangObject();
+ case T_String :
+ return scope.getJavaLangString();
+ default :
+ return null;
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/TypeConstants.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/TypeConstants.js
new file mode 100644
index 0000000..eece6c6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/TypeConstants.js
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+public interface TypeConstants {
+ final char[] JAVA = "java".toCharArray(); //$NON-NLS-1$
+ final char[] LANG = "lang".toCharArray(); //$NON-NLS-1$
+ final char[] IO = "io".toCharArray(); //$NON-NLS-1$
+ final char[] REFLECT = "reflect".toCharArray(); //$NON-NLS-1$
+ final char[] CharArray_JAVA_LANG_OBJECT = "java.lang.Object".toCharArray(); //$NON-NLS-1$
+ final char[] LENGTH = "length".toCharArray(); //$NON-NLS-1$
+ final char[] CLONE = "clone".toCharArray(); //$NON-NLS-1$
+ final char[] GETCLASS = "getClass".toCharArray(); //$NON-NLS-1$
+ final char[] OBJECT = "Object".toCharArray(); //$NON-NLS-1$
+ final char[] MAIN = "main".toCharArray(); //$NON-NLS-1$
+ final char[] SERIALVERSIONUID = "serialVersionUID".toCharArray(); //$NON-NLS-1$
+ final char[] SERIALPERSISTENTFIELDS = "serialPersistentFields".toCharArray(); //$NON-NLS-1$
+ final char[] READRESOLVE = "readResolve".toCharArray(); //$NON-NLS-1$
+ final char[] WRITEREPLACE = "writeReplace".toCharArray(); //$NON-NLS-1$
+ final char[] READOBJECT = "readObject".toCharArray(); //$NON-NLS-1$
+ final char[] WRITEOBJECT = "writeObject".toCharArray(); //$NON-NLS-1$
+ final char[] CharArray_JAVA_IO_OBJECTINPUTSTREAM = "java.io.ObjectInputStream".toCharArray(); //$NON-NLS-1$
+ final char[] CharArray_JAVA_IO_OBJECTOUTPUTSTREAM = "java.io.ObjectOutputStream".toCharArray(); //$NON-NLS-1$
+ final char[] CharArray_JAVA_IO_OBJECTSTREAMFIELD = "java.io.ObjectStreamField".toCharArray(); //$NON-NLS-1$
+ final char[] ANONYM_PREFIX = "new ".toCharArray(); //$NON-NLS-1$
+ final char[] ANONYM_SUFFIX = "(){}".toCharArray(); //$NON-NLS-1$
+ final char[] WILDCARD_NAME = { '?' };
+ final char[] WILDCARD_SUPER = " super ".toCharArray(); //$NON-NLS-1$
+ final char[] WILDCARD_EXTENDS = " extends ".toCharArray(); //$NON-NLS-1$
+ final char[] WILDCARD_MINUS = { '-' };
+ final char[] WILDCARD_STAR = { '*' };
+ final char[] WILDCARD_PLUS = { '+' };
+
+ // Constant compound names
+ final char[][] JAVA_LANG = {JAVA, LANG};
+ final char[][] JAVA_IO = {JAVA, IO};
+ final char[][] JAVA_LANG_ASSERTIONERROR = {JAVA, LANG, "AssertionError".toCharArray()}; //$NON-NLS-1$
+ final char[][] JAVA_LANG_CLASS = {JAVA, LANG, "Class".toCharArray()}; //$NON-NLS-1$
+ final char[][] JAVA_LANG_CLASSNOTFOUNDEXCEPTION = {JAVA, LANG, "ClassNotFoundException".toCharArray()}; //$NON-NLS-1$
+ final char[][] JAVA_LANG_CLONEABLE = {JAVA, LANG, "Cloneable".toCharArray()}; //$NON-NLS-1$
+ final char[][] JAVA_LANG_EXCEPTION = {JAVA, LANG, "Exception".toCharArray()}; //$NON-NLS-1$
+ final char[][] JAVA_LANG_ERROR = {JAVA, LANG, "Error".toCharArray()}; //$NON-NLS-1$
+ final char[][] JAVA_LANG_ITERABLE = {JAVA, LANG, "Iterable".toCharArray()}; //$NON-NLS-1$
+ final char[][] JAVA_LANG_NOCLASSDEFERROR = {JAVA, LANG, "NoClassDefError".toCharArray()}; //$NON-NLS-1$
+ final char[][] JAVA_LANG_OBJECT = {JAVA, LANG, OBJECT};
+ final char[][] JAVA_LANG_STRING = {JAVA, LANG, "String".toCharArray()}; //$NON-NLS-1$
+ final char[][] JAVA_LANG_STRINGBUFFER = {JAVA, LANG, "StringBuffer".toCharArray()}; //$NON-NLS-1$
+ final char[][] JAVA_LANG_STRINGBUILDER = {JAVA, LANG, "StringBuilder".toCharArray()}; //$NON-NLS-1$
+ final char[][] JAVA_LANG_SYSTEM = {JAVA, LANG, "System".toCharArray()}; //$NON-NLS-1$
+ final char[][] JAVA_LANG_RUNTIMEEXCEPTION = {JAVA, LANG, "RuntimeException".toCharArray()}; //$NON-NLS-1$
+ final char[][] JAVA_LANG_THROWABLE = {JAVA, LANG, "Throwable".toCharArray()}; //$NON-NLS-1$
+ final char[][] JAVA_LANG_REFLECT_CONSTRUCTOR = {JAVA, LANG, REFLECT, "Constructor".toCharArray()}; //$NON-NLS-1$
+ final char[][] JAVA_IO_PRINTSTREAM = {JAVA, IO, "PrintStream".toCharArray()}; //$NON-NLS-1$
+ final char[][] JAVA_IO_SERIALIZABLE = {JAVA, IO, "Serializable".toCharArray()}; //$NON-NLS-1$
+ final char[][] JAVA_LANG_BYTE = {JAVA, LANG, "Byte".toCharArray()}; //$NON-NLS-1$
+ final char[][] JAVA_LANG_SHORT = {JAVA, LANG, "Short".toCharArray()}; //$NON-NLS-1$
+ final char[][] JAVA_LANG_CHARACTER = {JAVA, LANG, "Character".toCharArray()}; //$NON-NLS-1$
+ final char[][] JAVA_LANG_INTEGER = {JAVA, LANG, "Integer".toCharArray()}; //$NON-NLS-1$
+ final char[][] JAVA_LANG_LONG = {JAVA, LANG, "Long".toCharArray()}; //$NON-NLS-1$
+ final char[][] JAVA_LANG_FLOAT = {JAVA, LANG, "Float".toCharArray()}; //$NON-NLS-1$
+ final char[][] JAVA_LANG_DOUBLE = {JAVA, LANG, "Double".toCharArray()}; //$NON-NLS-1$
+ final char[][] JAVA_LANG_BOOLEAN = {JAVA, LANG, "Boolean".toCharArray()}; //$NON-NLS-1$
+ final char[][] JAVA_LANG_VOID = {JAVA, LANG, "Void".toCharArray()}; //$NON-NLS-1$
+ final char[][] JAVA_UTIL_ITERATOR = {JAVA, "util".toCharArray(), "Iterator".toCharArray()}; //$NON-NLS-1$//$NON-NLS-2$
+
+ // Constants used by the flow analysis
+ final int EqualOrMoreSpecific = -1;
+ final int NotRelated = 0;
+ final int MoreGeneric = 1;
+
+ // Method collections
+ final TypeBinding[] NoParameters = new TypeBinding[0];
+ final ReferenceBinding[] NoExceptions = new ReferenceBinding[0];
+ final ReferenceBinding[] AnyException = new ReferenceBinding[] { null }; // special handler for all exceptions
+ // Type collections
+ final FieldBinding[] NoFields = new FieldBinding[0];
+ final MethodBinding[] NoMethods = new MethodBinding[0];
+ final ReferenceBinding[] NoSuperInterfaces = new ReferenceBinding[0];
+ final ReferenceBinding[] NoMemberTypes = new ReferenceBinding[0];
+ final TypeVariableBinding[] NoTypeVariables = new TypeVariableBinding[0];
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/TypeIds.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/TypeIds.js
new file mode 100644
index 0000000..b5ba994
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/TypeIds.js
@@ -0,0 +1,138 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+public interface TypeIds {
+
+ //base type void null undefined Object String
+ //should have an id that is 0<= id <= 15
+ // The IDs below must be representable using 4 bits so as to fit in operator signatures.
+ final int T_undefined = 0; // should not be changed
+ final int T_Object = 1;
+ final int T_char = 2;
+ final int T_byte = 3;
+ final int T_short = 4;
+ final int T_boolean = 5;
+ final int T_void = 6;
+ final int T_long = 7;
+ final int T_double = 8;
+ final int T_float = 9;
+ final int T_int = 10;
+ final int T_String = 11;
+ final int T_null = 12;
+
+ //=========end of 4 bits constraint===========
+
+ final int T_JavaLangObject = T_Object; // for consistency
+ final int T_JavaLangString = T_String; // for consistency
+
+ // well-known exception types
+ final int T_JavaLangClass = 16;
+ final int T_JavaLangStringBuffer = 17;
+ final int T_JavaLangSystem = 18;
+ final int T_JavaLangError = 19;
+ final int T_JavaLangReflectConstructor = 20;
+ final int T_JavaLangThrowable = 21;
+ final int T_JavaLangNoClassDefError = 22;
+ final int T_JavaLangClassNotFoundException = 23;
+ final int T_JavaIoPrintStream = 24;
+ final int T_JavaLangException = 25;
+
+ // wrapper types
+ final int T_JavaLangByte = 26;
+ final int T_JavaLangShort = 27;
+ final int T_JavaLangCharacter = 28;
+ final int T_JavaLangInteger = 29;
+ final int T_JavaLangLong = 30;
+ final int T_JavaLangFloat = 31;
+ final int T_JavaLangDouble = 32;
+ final int T_JavaLangBoolean = 33;
+ final int T_JavaLangVoid = 34;
+
+ // 1.4 features
+ final int T_JavaLangAssertionError = 35;
+
+ // array interfaces
+ final int T_JavaLangCloneable = 36;
+ final int T_JavaIoSerializable = 37;
+
+ // 1.5 features
+ final int T_JavaLangIterable = 38;
+ final int T_JavaUtilIterator = 39;
+ final int T_JavaLangStringBuilder = 40;
+
+ final int NoId = Integer.MAX_VALUE;
+
+ // implicit conversions: <compileType> to <runtimeType> (note: booleans are integers at runtime)
+ final int Boolean2Int = T_boolean + (T_int << 4);
+ final int Boolean2String = T_boolean + (T_String << 4);
+ final int Boolean2Boolean = T_boolean + (T_boolean << 4);
+ final int Byte2Byte = T_byte + (T_byte << 4);
+ final int Byte2Short = T_byte + (T_short << 4);
+ final int Byte2Char = T_byte + (T_char << 4);
+ final int Byte2Int = T_byte + (T_int << 4);
+ final int Byte2Long = T_byte + (T_long << 4);
+ final int Byte2Float = T_byte + (T_float << 4);
+ final int Byte2Double = T_byte + (T_double << 4);
+ final int Byte2String = T_byte + (T_String << 4);
+ final int Short2Byte = T_short + (T_byte << 4);
+ final int Short2Short = T_short + (T_short << 4);
+ final int Short2Char = T_short + (T_char << 4);
+ final int Short2Int = T_short + (T_int << 4);
+ final int Short2Long = T_short + (T_long << 4);
+ final int Short2Float = T_short + (T_float << 4);
+ final int Short2Double = T_short + (T_double << 4);
+ final int Short2String = T_short + (T_String << 4);
+ final int Char2Byte = T_char + (T_byte << 4);
+ final int Char2Short = T_char + (T_short << 4);
+ final int Char2Char = T_char + (T_char << 4);
+ final int Char2Int = T_char + (T_int << 4);
+ final int Char2Long = T_char + (T_long << 4);
+ final int Char2Float = T_char + (T_float << 4);
+ final int Char2Double = T_char + (T_double << 4);
+ final int Char2String = T_char + (T_String << 4);
+ final int Int2Byte = T_int + (T_byte << 4);
+ final int Int2Short = T_int + (T_short << 4);
+ final int Int2Char = T_int + (T_char << 4);
+ final int Int2Int = T_int + (T_int << 4);
+ final int Int2Long = T_int + (T_long << 4);
+ final int Int2Float = T_int + (T_float << 4);
+ final int Int2Double = T_int + (T_double << 4);
+ final int Int2String = T_int + (T_String << 4);
+ final int Long2Byte = T_long + (T_byte << 4);
+ final int Long2Short = T_long + (T_short << 4);
+ final int Long2Char = T_long + (T_char << 4);
+ final int Long2Int = T_long + (T_int << 4);
+ final int Long2Long = T_long + (T_long << 4);
+ final int Long2Float = T_long + (T_float << 4);
+ final int Long2Double = T_long + (T_double << 4);
+ final int Long2String = T_long + (T_String << 4);
+ final int Float2Byte = T_float + (T_byte << 4);
+ final int Float2Short = T_float + (T_short << 4);
+ final int Float2Char = T_float + (T_char << 4);
+ final int Float2Int = T_float + (T_int << 4);
+ final int Float2Long = T_float + (T_long << 4);
+ final int Float2Float = T_float + (T_float << 4);
+ final int Float2Double = T_float + (T_double << 4);
+ final int Float2String = T_float + (T_String << 4);
+ final int Double2Byte = T_double + (T_byte << 4);
+ final int Double2Short = T_double + (T_short << 4);
+ final int Double2Char = T_double + (T_char << 4);
+ final int Double2Int = T_double + (T_int << 4);
+ final int Double2Long = T_double + (T_long << 4);
+ final int Double2Float = T_double + (T_float << 4);
+ final int Double2Double = T_double + (T_double << 4);
+ final int Double2String = T_double + (T_String << 4);
+ final int String2String = T_String + (T_String << 4);
+ final int Object2String = T_Object + (T_String << 4);
+ final int Null2String = T_null + (T_String << 4);
+ final int Object2Object = T_Object + (T_Object << 4);
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/TypeVariableBinding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/TypeVariableBinding.js
new file mode 100644
index 0000000..1ccbc45
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/TypeVariableBinding.js
@@ -0,0 +1,210 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 International Business Machines Corp. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v0.5
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v05.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import java.util.Map;
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Wildcard;
+
+/**
+ * Binding for a type parameter, held by source/binary type or method.
+ */
+public class TypeVariableBinding extends ReferenceBinding {
+
+ public Binding declaringElement; // binding of declaring type or method
+ public int rank; // declaration rank, can be used to match variable in parameterized type
+
+ /**
+ * Denote the first explicit (binding) bound amongst the supertypes (from declaration in source)
+ * If no superclass was specified, then it denotes the first superinterface, or null if none was specified.
+ */
+ public ReferenceBinding firstBound;
+
+ // actual resolved variable supertypes (if no superclass bound, then associated to Object)
+ public ReferenceBinding superclass;
+ public ReferenceBinding[] superInterfaces;
+ public char[] genericTypeSignature;
+
+ public TypeVariableBinding(char[] sourceName, Binding declaringElement, int rank) {
+ this.sourceName = sourceName;
+ this.declaringElement = declaringElement;
+ this.rank = rank;
+ this.modifiers = AccPublic | AccGenericSignature; // treat type var as public
+ this.tagBits |= HasTypeVariable;
+ }
+
+ /**
+ * Returns true if the argument type satisfies all bounds of the type parameter
+ */
+ public boolean boundCheck(Substitution substitution, TypeBinding argumentType) {
+ if (argumentType == NullBinding)
+ return true;
+ if (!(argumentType instanceof ReferenceBinding || argumentType.isArrayType()))
+ return false;
+ if (this.superclass.id != T_Object && !argumentType.isCompatibleWith(substitution.substitute(this.superclass))) {
+ return false;
+ }
+ for (int i = 0, length = this.superInterfaces.length; i < length; i++) {
+ if (!argumentType.isCompatibleWith(substitution.substitute(this.superInterfaces[i]))) {
+ return false;
+ }
+ }
+ if (argumentType.isWildcard()) {
+ WildcardBinding wildcard = (WildcardBinding) argumentType;
+ if (wildcard.kind == Wildcard.SUPER) {
+ if (!boundCheck(substitution, wildcard.bound)) return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Collect the substitutes into a map for certain type variables inside the receiver type
+ * e.g. Collection<T>.findSubstitute(T, Collection<List<X>>): T --> List<X>
+ */
+ public void collectSubstitutes(TypeBinding otherType, Map substitutes) {
+ // cannot infer anything from a null type
+ if (otherType == NullBinding) return;
+
+ TypeBinding[] variableSubstitutes = (TypeBinding[])substitutes.get(this);
+ if (variableSubstitutes != null) {
+ int length = variableSubstitutes.length;
+ for (int i = 0; i < length; i++) {
+ if (variableSubstitutes[i] == otherType) return; // already there
+ if (variableSubstitutes[i] == null) {
+ variableSubstitutes[i] = otherType;
+ return;
+ }
+ }
+ // no free spot found, need to grow
+ System.arraycopy(variableSubstitutes, 0, variableSubstitutes = new TypeBinding[2*length], 0, length);
+ variableSubstitutes[length] = otherType;
+ substitutes.put(this, variableSubstitutes);
+ }
+ }
+
+ public char[] constantPoolName() { /* java/lang/Object */
+ if (this.firstBound != null) {
+ return this.firstBound.constantPoolName();
+ }
+ return this.superclass.constantPoolName(); // java/lang/Object
+ }
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding#debugName()
+ */
+ public String debugName() {
+ return new String(this.sourceName);
+ }
+ public TypeBinding erasure() {
+ if (this.firstBound != null) {
+ return this.firstBound.erasure();
+ }
+ return this.superclass; // java/lang/Object
+ }
+
+ /**
+ * T::Ljava/util/Map;:Ljava/io/Serializable;
+ * T:LY<TT;>
+ */
+ public char[] genericSignature() {
+ StringBuffer sig = new StringBuffer(10);
+ sig.append(this.sourceName).append(':');
+ int interfaceLength = this.superInterfaces.length;
+ if (interfaceLength == 0 || this.firstBound == this.superclass) {
+ sig.append(this.superclass.genericTypeSignature());
+ }
+ for (int i = 0; i < interfaceLength; i++) {
+ sig.append(':').append(this.superInterfaces[i].genericTypeSignature());
+ }
+ int sigLength = sig.length();
+ char[] genericSignature = new char[sigLength];
+ sig.getChars(0, sigLength, genericSignature, 0);
+ return genericSignature;
+ }
+ /**
+ * T::Ljava/util/Map;:Ljava/io/Serializable;
+ * T:LY<TT;>
+ */
+ public char[] genericTypeSignature() {
+ if (this.genericTypeSignature != null) return this.genericTypeSignature;
+ return this.genericTypeSignature = CharOperation.concat('T', this.sourceName, ';');
+ }
+ /**
+ * Returns true if a type is identical to another one,
+ * or for generic types, true if compared to its raw type.
+ */
+ public boolean isEquivalentTo(TypeBinding otherType) {
+ if (this == otherType) return true;
+ if (otherType == null) return false;
+ if (otherType.isWildcard()) // wildcard
+ return ((WildcardBinding) otherType).boundCheck(this);
+ return false;
+ }
+ /**
+ * Returns true if the type variable is directly bound to a given type
+ */
+ public boolean isErasureBoundTo(TypeBinding type) {
+ if (this.superclass.erasure() == type)
+ return true;
+ for (int i = 0, length = this.superInterfaces.length; i < length; i++) {
+ if (this.superInterfaces[i].erasure() == type)
+ return true;
+ }
+ return false;
+ }
+ /**
+ * Returns true if the type was declared as a type variable
+ */
+ public boolean isTypeVariable() {
+ return true;
+ }
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding#readableName()
+ */
+ public char[] readableName() {
+ return this.sourceName;
+ }
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding#shortReadableName()
+ */
+ public char[] shortReadableName() {
+ return this.readableName();
+ }
+ public ReferenceBinding superclass() {
+ return superclass;
+ }
+ public ReferenceBinding[] superInterfaces() {
+ return superInterfaces;
+ }
+ /**
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ StringBuffer buffer = new StringBuffer(10);
+ buffer.append('<').append(this.sourceName);//.append('[').append(this.rank).append(']');
+ if (this.superclass != null && this.firstBound == this.superclass) {
+ buffer.append(" extends ").append(this.superclass.debugName()); //$NON-NLS-1$
+ }
+ if (this.superInterfaces != null && this.superInterfaces != NoSuperInterfaces) {
+ if (this.firstBound != this.superclass) {
+ buffer.append(" extends "); //$NON-NLS-1$
+ }
+ for (int i = 0, length = this.superInterfaces.length; i < length; i++) {
+ if (i > 0 || this.firstBound == this.superclass) {
+ buffer.append(" & "); //$NON-NLS-1$
+ }
+ buffer.append(this.superInterfaces[i].debugName());
+ }
+ }
+ buffer.append('>');
+ return buffer.toString();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/UnresolvedReferenceBinding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/UnresolvedReferenceBinding.js
new file mode 100644
index 0000000..88c8405
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/UnresolvedReferenceBinding.js
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+
+public class UnresolvedReferenceBinding extends ReferenceBinding {
+
+ReferenceBinding resolvedType;
+TypeBinding[] wrappers;
+
+UnresolvedReferenceBinding(char[][] compoundName, PackageBinding packageBinding) {
+ this.compoundName = compoundName;
+ this.sourceName = compoundName[compoundName.length - 1]; // reasonable guess
+ this.fPackage = packageBinding;
+ this.wrappers = null;
+}
+void addWrapper(TypeBinding wrapper) {
+ if (this.wrappers == null) {
+ this.wrappers = new TypeBinding[] {wrapper};
+ } else {
+ int length = this.wrappers.length;
+ System.arraycopy(this.wrappers, 0, this.wrappers = new TypeBinding[length + 1], 0, length);
+ this.wrappers[length] = wrapper;
+ }
+}
+public String debugName() {
+ return toString();
+}
+ReferenceBinding resolve(LookupEnvironment environment, boolean convertGenericToRawType) {
+ ReferenceBinding targetType = this.resolvedType;
+ if (targetType == null) {
+ targetType = this.fPackage.getType0(this.compoundName[this.compoundName.length - 1]);
+ if (targetType == this)
+ targetType = environment.askForType(this.compoundName);
+ if (targetType != null && targetType != this) { // could not resolve any better, error was already reported against it
+ setResolvedType(targetType, environment);
+ } else {
+ environment.problemReporter.isClassPathCorrect(this.compoundName, null);
+ return null; // will not get here since the above error aborts the compilation
+ }
+ }
+ if (convertGenericToRawType && targetType.isGenericType()) // raw reference to generic ?
+ return environment.createRawType(targetType, null);
+ return targetType;
+}
+void setResolvedType(ReferenceBinding targetType, LookupEnvironment environment) {
+ if (this.resolvedType == targetType) return; // already resolved
+
+ // targetType may be a source or binary type
+ this.resolvedType = targetType;
+ // must ensure to update any other type bindings that can contain the resolved type
+ // otherwise we could create 2 : 1 for this unresolved type & 1 for the resolved type
+ if (this.wrappers != null)
+ for (int i = 0, l = this.wrappers.length; i < l; i++)
+ this.wrappers[i].swapUnresolved(this, targetType, environment);
+ environment.updateCaches(this, targetType);
+}
+public String toString() {
+ return "Unresolved type " + ((compoundName != null) ? CharOperation.toString(compoundName) : "UNNAMED"); //$NON-NLS-1$ //$NON-NLS-2$
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/UpdatedMethodBinding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/UpdatedMethodBinding.js
new file mode 100644
index 0000000..c938517
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/UpdatedMethodBinding.js
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+public class UpdatedMethodBinding extends MethodBinding {
+
+ public TypeBinding updatedDeclaringClass;
+
+ public UpdatedMethodBinding(TypeBinding updatedDeclaringClass, int modifiers, char[] selector, TypeBinding returnType, TypeBinding[] args, ReferenceBinding[] exceptions, ReferenceBinding declaringClass) {
+ super(modifiers, selector, returnType, args, exceptions, declaringClass);
+ this.updatedDeclaringClass = updatedDeclaringClass;
+ }
+
+ public TypeBinding constantPoolDeclaringClass() {
+ return this.updatedDeclaringClass;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/VariableBinding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/VariableBinding.js
new file mode 100644
index 0000000..ffe9b43
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/VariableBinding.js
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import org.eclipse.wst.jsdt.internal.compiler.impl.Constant;
+
+public abstract class VariableBinding extends Binding {
+
+ public int modifiers;
+ public TypeBinding type;
+ public char[] name;
+ private Constant constant;
+ public int id; // for flow-analysis (position in flowInfo bit vector)
+
+ public VariableBinding(char[] name, TypeBinding type, int modifiers, Constant constant) {
+ this.name = name;
+ this.type = type;
+ this.modifiers = modifiers;
+ this.constant = constant;
+ }
+
+ public Constant constant() {
+ return this.constant;
+ }
+
+ public final boolean isBlankFinal(){
+ return (modifiers & AccBlankFinal) != 0;
+ }
+ /* Answer true if the receiver is final and cannot be changed
+ */
+
+ public boolean isConstantValue() {
+ return constant != Constant.NotAConstant;
+ }
+
+ public final boolean isFinal() {
+ return (modifiers & AccFinal) != 0;
+ }
+ public char[] readableName() {
+ return name;
+ }
+ public void setConstant(Constant constant) {
+ this.constant = constant;
+ }
+ public String toString() {
+ String s = (type != null) ? type.debugName() : "UNDEFINED TYPE"; //$NON-NLS-1$
+ s += " "; //$NON-NLS-1$
+ s += (name != null) ? new String(name) : "UNNAMED FIELD"; //$NON-NLS-1$
+ return s;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/WildcardBinding.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/WildcardBinding.js
new file mode 100644
index 0000000..434ea0d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/WildcardBinding.js
@@ -0,0 +1,325 @@
+/*******************************************************************************
+ * Copyright (c) 2000-2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.lookup;
+
+import java.util.Map;
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Wildcard;
+
+/*
+ * A wildcard acts as an argument for parameterized types, allowing to
+ * abstract parameterized types, e.g. List<String> is not compatible with List<Object>,
+ * but compatible with List<?>.
+ */
+public class WildcardBinding extends ReferenceBinding {
+
+ ReferenceBinding genericType;
+ int rank;
+ public TypeBinding bound; // when unbound denotes the corresponding type variable (so as to retrieve its bound lazily)
+ char[] genericSignature;
+ public int kind;
+ ReferenceBinding superclass;
+ ReferenceBinding[] superInterfaces;
+ TypeVariableBinding typeVariable; // corresponding variable
+ LookupEnvironment environment;
+
+ /**
+ * When unbound, the bound denotes the corresponding type variable (so as to retrieve its bound lazily)
+ */
+ public WildcardBinding(ReferenceBinding genericType, int rank, TypeBinding bound, int kind, LookupEnvironment environment) {
+ this.genericType = genericType;
+ this.rank = rank;
+ this.kind = kind;
+ this.modifiers = AccPublic | AccGenericSignature; // treat wildcard as public
+ this.tagBits |= HasWildcard;
+ this.environment = environment;
+ initialize(genericType, bound);
+
+ if (genericType instanceof UnresolvedReferenceBinding)
+ ((UnresolvedReferenceBinding) genericType).addWrapper(this);
+ if (bound instanceof UnresolvedReferenceBinding)
+ ((UnresolvedReferenceBinding) bound).addWrapper(this);
+ }
+
+ /**
+ * Returns true if the argument type satisfies all bounds of the type parameter
+ */
+ public boolean boundCheck(TypeBinding argumentType) {
+ switch (this.kind) {
+ case Wildcard.UNBOUND :
+ return true;
+ case Wildcard.EXTENDS :
+ return argumentType.isCompatibleWith(this.bound);
+ default: // SUPER
+ return this.bound.isCompatibleWith(argumentType);
+ }
+ }
+
+ /**
+ * Collect the substitutes into a map for certain type variables inside the receiver type
+ * e.g. Collection<T>.findSubstitute(T, Collection<List<X>>): T --> List<X>
+ */
+ public void collectSubstitutes(TypeBinding otherType, Map substitutes) {
+ switch(this.kind) {
+ case Wildcard.UNBOUND :
+ return;
+ case Wildcard.EXTENDS :
+ this.bound.collectSubstitutes(otherType, substitutes);
+ return;
+ default: // SUPER
+ this.bound.collectSubstitutes(otherType, substitutes);
+ return;
+ }
+ }
+
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding#debugName()
+ */
+ public String debugName() {
+ return toString();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding#erasure()
+ */
+ public TypeBinding erasure() {
+ if (this.kind == Wildcard.EXTENDS)
+ return this.bound.erasure();
+ return typeVariable().erasure();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding#signature()
+ */
+ public char[] genericTypeSignature() {
+ if (this.genericSignature == null) {
+ switch (this.kind) {
+ case Wildcard.UNBOUND :
+ this.genericSignature = WILDCARD_STAR;
+ break;
+ case Wildcard.EXTENDS :
+ this.genericSignature = CharOperation.concat(WILDCARD_PLUS, this.bound.genericTypeSignature());
+ break;
+ default: // SUPER
+ this.genericSignature = CharOperation.concat(WILDCARD_MINUS, this.bound.genericTypeSignature());
+ }
+ }
+ return this.genericSignature;
+ }
+
+ void initialize(ReferenceBinding someGenericType, TypeBinding someBound) {
+ this.genericType = someGenericType;
+ this.bound = someBound;
+ if (someGenericType != null) {
+ this.fPackage = someGenericType.getPackage();
+ }
+ if (someBound != null) {
+ if (someBound.isTypeVariable())
+ this.tagBits |= HasTypeVariable;
+ }
+ }
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding#isClass()
+ */
+ public boolean isClass() {
+ return erasure().isClass();
+ }
+ /**
+ * Returns true if a type is identical to another one,
+ * or for generic types, true if compared to its raw type.
+ */
+ public boolean isEquivalentTo(TypeBinding otherType) {
+ if (this == otherType) return true;
+ if (otherType == null) return false;
+ switch (this.kind) {
+ case Wildcard.UNBOUND :
+ default : // SUPER - cannot use lower bound
+ return this.typeVariable().isCompatibleWith(otherType);
+ case Wildcard.EXTENDS :
+ if (otherType.isWildcard()) {
+ WildcardBinding otherWildcard = (WildcardBinding) otherType;
+ switch (otherWildcard.kind) {
+ case Wildcard.UNBOUND :
+ return true;
+ default : // SUPER :
+ return false;
+ case Wildcard.EXTENDS :
+ return this.bound.isCompatibleWith(otherWildcard.bound);
+ }
+ } else {
+ return this.bound.isCompatibleWith(otherType);
+ }
+ }
+ }
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding#isInterface()
+ */
+ public boolean isInterface() {
+ return erasure().isInterface();
+ }
+ /**
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding#isSuperclassOf(org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding)
+ */
+ public boolean isSuperclassOf(ReferenceBinding otherType) {
+ if (this.kind == Wildcard.SUPER) {
+ if (this.bound instanceof ReferenceBinding) {
+ return ((ReferenceBinding) this.bound).isSuperclassOf(otherType);
+ } else { // array bound
+ return otherType.id == T_Object;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Returns true if the type is a wildcard
+ */
+ public boolean isWildcard() {
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.Binding#readableName()
+ */
+ public char[] readableName() {
+ switch (this.kind) {
+ case Wildcard.UNBOUND :
+ return WILDCARD_NAME;
+ case Wildcard.EXTENDS :
+ return CharOperation.concat(WILDCARD_NAME, WILDCARD_EXTENDS, this.bound.readableName());
+ default: // SUPER
+ return CharOperation.concat(WILDCARD_NAME, WILDCARD_SUPER, this.bound.readableName());
+ }
+ }
+
+ ReferenceBinding resolve() {
+ BinaryTypeBinding.resolveType(this.genericType, this.environment, null, 0);
+ switch(this.kind) {
+ case Wildcard.EXTENDS :
+ case Wildcard.SUPER :
+ BinaryTypeBinding.resolveType(this.bound, this.environment, null, 0);
+ break;
+ case Wildcard.UNBOUND :
+ }
+ return this;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.Binding#shortReadableName()
+ */
+ public char[] shortReadableName() {
+ switch (this.kind) {
+ case Wildcard.UNBOUND :
+ return WILDCARD_NAME;
+ case Wildcard.EXTENDS :
+ return CharOperation.concat(WILDCARD_NAME, WILDCARD_EXTENDS, this.bound.shortReadableName());
+ default: // SUPER
+ return CharOperation.concat(WILDCARD_NAME, WILDCARD_SUPER, this.bound.shortReadableName());
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding#signature()
+ */
+ public char[] signature() {
+ if (this.signature == null) {
+ this.signature = this.bound.signature();
+ }
+ return this.signature;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding#sourceName()
+ */
+ public char[] sourceName() {
+ switch (this.kind) {
+ case Wildcard.UNBOUND :
+ return WILDCARD_NAME;
+ case Wildcard.EXTENDS :
+ return CharOperation.concat(WILDCARD_NAME, WILDCARD_EXTENDS, this.bound.sourceName());
+ default: // SUPER
+ return CharOperation.concat(WILDCARD_NAME, WILDCARD_SUPER, this.bound.sourceName());
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.TypeVariableBinding#superclass()
+ */
+ public ReferenceBinding superclass() {
+ if (this.superclass == null) {
+ TypeBinding superType = null;
+ if (this.kind == Wildcard.EXTENDS) {
+ superType = this.bound;
+ } else if (this.typeVariable() != null) {
+ superType = this.typeVariable.firstBound;
+ }
+ this.superclass = superType != null && superType.isClass()
+ ? (ReferenceBinding) superType
+ : environment.getType(JAVA_LANG_OBJECT);
+ }
+ return this.superclass;
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding#superInterfaces()
+ */
+ public ReferenceBinding[] superInterfaces() {
+ if (this.superInterfaces == null) {
+ TypeBinding superType = null;
+ if (this.kind == Wildcard.EXTENDS) {
+ superType = this.bound;
+ } else if (this.typeVariable() != null) {
+ superType = this.typeVariable.firstBound; // TODO (philippe) shouldn't it retrieve variable superinterfaces ?
+ }
+ this.superInterfaces = superType != null && superType.isInterface()
+ ? new ReferenceBinding[] { (ReferenceBinding) superType }
+ : NoSuperInterfaces;
+ }
+ return this.superInterfaces;
+ }
+
+ public void swapUnresolved(UnresolvedReferenceBinding unresolvedType, ReferenceBinding resolvedType, LookupEnvironment env) {
+ boolean affected = false;
+ if (this.genericType == unresolvedType) {
+ this.genericType = resolvedType; // no raw conversion
+ affected = true;
+ } else if (this.bound == unresolvedType) {
+ this.bound = resolvedType.isGenericType() ? env.createRawType(resolvedType, null) : resolvedType;
+ affected = true;
+ }
+ if (affected)
+ initialize(this.genericType, this.bound);
+ }
+
+ /**
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ switch (this.kind) {
+ case Wildcard.UNBOUND :
+ return new String(WILDCARD_NAME);
+ case Wildcard.EXTENDS :
+ return new String(CharOperation.concat(WILDCARD_NAME, WILDCARD_EXTENDS, this.bound.debugName().toCharArray()));
+ default: // SUPER
+ return new String(CharOperation.concat(WILDCARD_NAME, WILDCARD_SUPER, this.bound.debugName().toCharArray()));
+ }
+ }
+ /**
+ * Returns associated type variable, or null in case of inconsistency
+ */
+ public TypeVariableBinding typeVariable() {
+ if (this.typeVariable == null) {
+ TypeVariableBinding[] typeVariables = this.genericType.typeVariables();
+ if (this.rank < typeVariables.length)
+ this.typeVariable = typeVariables[this.rank];
+ }
+ return this.typeVariable;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/AbstractCommentParser.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/AbstractCommentParser.js
new file mode 100644
index 0000000..e3efdcd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/AbstractCommentParser.js
@@ -0,0 +1,1234 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.parser;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.core.compiler.InvalidInputException;
+import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
+
+/**
+ * Parser specialized for decoding javadoc comments
+ */
+public abstract class AbstractCommentParser {
+
+ // recognized tags
+ public static final char[] TAG_DEPRECATED = "deprecated".toCharArray(); //$NON-NLS-1$
+ public static final char[] TAG_PARAM = "param".toCharArray(); //$NON-NLS-1$
+ public static final char[] TAG_RETURN = "return".toCharArray(); //$NON-NLS-1$
+ public static final char[] TAG_THROWS = "throws".toCharArray(); //$NON-NLS-1$
+ public static final char[] TAG_EXCEPTION = "exception".toCharArray(); //$NON-NLS-1$
+ public static final char[] TAG_SEE = "see".toCharArray(); //$NON-NLS-1$
+ public static final char[] TAG_LINK = "link".toCharArray(); //$NON-NLS-1$
+ public static final char[] TAG_LINKPLAIN = "linkplain".toCharArray(); //$NON-NLS-1$
+ public static final char[] TAG_INHERITDOC = "inheritDoc".toCharArray(); //$NON-NLS-1$
+ public static final char[] TAG_VALUE = "value".toCharArray(); //$NON-NLS-1$
+
+ // tags value
+ public static final int NO_TAG_VALUE = 0;
+ public static final int TAG_DEPRECATED_VALUE = 1;
+ public static final int TAG_PARAM_VALUE = 2;
+ public static final int TAG_RETURN_VALUE = 3;
+ public static final int TAG_THROWS_VALUE = 4;
+ public static final int TAG_EXCEPTION_VALUE = 5;
+ public static final int TAG_SEE_VALUE = 6;
+ public static final int TAG_LINK_VALUE = 7;
+ public static final int TAG_LINKPLAIN_VALUE = 8;
+ public static final int TAG_INHERITDOC_VALUE = 9;
+ public static final int TAG_VALUE_VALUE = 10;
+ public static final int TAG_OTHERS_VALUE = 11;
+ protected int tagValue = NO_TAG_VALUE;
+
+ // tags expected positions
+ public final static int ORDERED_TAGS_NUMBER = 3;
+ public final static int PARAM_TAG_EXPECTED_ORDER = 0;
+ public final static int THROWS_TAG_EXPECTED_ORDER = 1;
+ public final static int SEE_TAG_EXPECTED_ORDER = 2;
+
+ // Kind of comment parser
+ public final static int COMPIL_PARSER = 0x00000001;
+ public final static int DOM_PARSER = 0x00000002;
+
+ // Public fields
+ public Scanner scanner;
+ public boolean checkDocComment = false;
+
+ // Protected fields
+ protected boolean inherited, deprecated;
+ protected char[] source;
+ protected int index, endComment, lineEnd;
+ protected int tokenPreviousPosition, lastIdentifierEndPosition, starPosition;
+ protected int textStart, memberStart;
+ protected int tagSourceStart, tagSourceEnd;
+ protected int inlineTagStart;
+ protected Parser sourceParser;
+ protected Object returnStatement;
+ protected boolean lineStarted = false, inlineTagStarted = false;
+ protected int kind;
+ protected int[] lineEnds;
+
+ // Private fields
+ private int currentTokenType = -1;
+
+ // Line pointers
+ private int linePtr, lastLinePtr;
+
+ // Identifier stack
+ protected int identifierPtr;
+ protected char[][] identifierStack;
+ protected int identifierLengthPtr;
+ protected int[] identifierLengthStack;
+ protected long[] identifierPositionStack;
+ // Ast stack
+ protected static int AstStackIncrement = 10;
+ protected int astPtr;
+ protected Object[] astStack;
+ protected int astLengthPtr;
+ protected int[] astLengthStack;
+
+ protected AbstractCommentParser(Parser sourceParser) {
+ this.sourceParser = sourceParser;
+ this.scanner = new Scanner(false, false, false, ClassFileConstants.JDK1_3, null, null, true/*taskCaseSensitive*/);
+ this.identifierStack = new char[20][];
+ this.identifierPositionStack = new long[20];
+ this.identifierLengthStack = new int[10];
+ this.astStack = new Object[30];
+ this.astLengthStack = new int[20];
+ }
+
+ /* (non-Javadoc)
+ * Returns true if tag @deprecated is present in javadoc comment.
+ *
+ * If javadoc checking is enabled, will also construct an Javadoc node, which will be stored into Parser.javadoc
+ * slot for being consumed later on.
+ */
+ protected boolean commentParse(int javadocStart, int javadocEnd) {
+
+ boolean validComment = true;
+ try {
+ // Init scanner position
+ this.scanner.resetTo(javadocStart, javadocEnd);
+ this.endComment = javadocEnd;
+ this.index = javadocStart;
+ readChar(); // starting '/'
+ int previousPosition = this.index;
+ readChar(); // first '*'
+ char nextCharacter= readChar(); // second '*'
+
+ // Init local variables
+ this.astLengthPtr = -1;
+ this.astPtr = -1;
+ this.currentTokenType = -1;
+ this.inlineTagStarted = false;
+ this.inlineTagStart = -1;
+ this.lineStarted = false;
+ this.returnStatement = null;
+ this.inherited = false;
+ this.deprecated = false;
+ this.linePtr = getLineNumber(javadocStart);
+ this.lastLinePtr = getLineNumber(javadocEnd);
+ this.lineEnd = (this.linePtr == this.lastLinePtr) ? this.endComment : this.scanner.getLineEnd(this.linePtr);
+ this.textStart = -1;
+ char previousChar = 0;
+ int invalidTagLineEnd = -1;
+ int invalidInlineTagLineEnd = -1;
+
+ // Loop on each comment character
+ while (this.index < this.endComment) {
+ previousPosition = this.index;
+ previousChar = nextCharacter;
+
+ // Calculate line end (cannot use this.scanner.linePtr as scanner does not parse line ends again)
+ if (this.index > (this.lineEnd+1)) {
+ updateLineEnd();
+ }
+
+ // Read next char only if token was consumed
+ if (this.currentTokenType < 0) {
+ nextCharacter = readChar(); // consider unicodes
+ } else {
+ previousPosition = this.scanner.getCurrentTokenStartPosition();
+ switch (this.currentTokenType) {
+ case TerminalTokens.TokenNameRBRACE:
+ nextCharacter = '}';
+ break;
+ case TerminalTokens.TokenNameMULTIPLY:
+ nextCharacter = '*';
+ break;
+ default:
+ nextCharacter = this.scanner.currentCharacter;
+ }
+ consumeToken();
+ }
+
+ if (this.index >= this.endComment) {
+ break;
+ }
+
+ switch (nextCharacter) {
+ case '@' :
+ // Start tag parsing only if we are on line beginning or at inline tag beginning
+ if ((!this.lineStarted || previousChar == '{')) {
+ this.lineStarted = true;
+ if (this.inlineTagStarted) {
+ this.inlineTagStarted = false;
+ // bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=53279
+ // Cannot have @ inside inline comment
+ if (this.sourceParser != null) {
+ int end = previousPosition<invalidInlineTagLineEnd ? previousPosition : invalidInlineTagLineEnd;
+ this.sourceParser.problemReporter().javadocUnterminatedInlineTag(this.inlineTagStart, end);
+ }
+ validComment = false;
+ if (this.lineStarted && this.textStart != -1 && this.textStart < previousPosition) {
+ pushText(this.textStart, previousPosition);
+ }
+ if (this.kind == DOM_PARSER) refreshInlineTagPosition(previousPosition);
+ }
+ if (previousChar == '{') {
+ if (this.textStart != -1 && this.textStart < this.inlineTagStart) {
+ pushText(this.textStart, this.inlineTagStart);
+ }
+ this.inlineTagStarted = true;
+ invalidInlineTagLineEnd = this.lineEnd;
+ } else if (this.textStart != -1 && this.textStart < invalidTagLineEnd) {
+ pushText(this.textStart, invalidTagLineEnd);
+ }
+ this.scanner.resetTo(this.index, this.endComment);
+ this.currentTokenType = -1; // flush token cache at line begin
+ try {
+ if (!parseTag(previousPosition)) {
+ // bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=51600
+ // do not stop the inline tag when error is encountered to get text after
+ validComment = false;
+ // bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=51600
+ // for DOM AST node, store tag as text in case of invalid syntax
+ if (this.kind == DOM_PARSER) {
+ createTag();
+ this.textStart = this.tagSourceEnd+1;
+ invalidTagLineEnd = this.lineEnd;
+ }
+ }
+ } catch (InvalidInputException e) {
+ consumeToken();
+ }
+ }
+ break;
+ case '\r':
+ case '\n':
+ if (this.lineStarted && this.textStart < previousPosition) {
+ pushText(this.textStart, previousPosition);
+ }
+ this.lineStarted = false;
+ // Fix bug 51650
+ this.textStart = -1;
+ break;
+ case '}' :
+ if (this.inlineTagStarted) {
+ if (this.lineStarted && this.textStart != -1 && this.textStart < previousPosition) {
+ pushText(this.textStart, previousPosition);
+ }
+ if (this.kind == DOM_PARSER) refreshInlineTagPosition(previousPosition);
+ this.textStart = this.index;
+ this.inlineTagStarted = false;
+ } else {
+ if (!this.lineStarted) {
+ this.textStart = previousPosition;
+ }
+ }
+ this.lineStarted = true;
+ break;
+ case '{' :
+ if (this.inlineTagStarted) {
+ this.inlineTagStarted = false;
+ // bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=53279
+ // Cannot have opening brace in inline comment
+ if (this.sourceParser != null) {
+ int end = previousPosition<invalidInlineTagLineEnd ? previousPosition : invalidInlineTagLineEnd;
+ this.sourceParser.problemReporter().javadocUnterminatedInlineTag(this.inlineTagStart, end);
+ }
+ if (this.lineStarted && this.textStart != -1 && this.textStart < previousPosition) {
+ pushText(this.textStart, previousPosition);
+ }
+ if (this.kind == DOM_PARSER) refreshInlineTagPosition(previousPosition);
+ }
+ if (!this.lineStarted) {
+ this.textStart = previousPosition;
+ }
+ this.lineStarted = true;
+ this.inlineTagStart = previousPosition;
+ break;
+ case '*' :
+ case '\u000c' : /* FORM FEED */
+ case ' ' : /* SPACE */
+ case '\t' : /* HORIZONTAL TABULATION */
+ // do nothing for space or '*' characters
+ break;
+ default :
+ if (!this.lineStarted) {
+ this.textStart = previousPosition;
+ }
+ this.lineStarted = true;
+ break;
+ }
+ }
+ // bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=53279
+ // Cannot leave comment inside inline comment
+ if (this.inlineTagStarted) {
+ this.inlineTagStarted = false;
+ if (this.sourceParser != null) {
+ int end = previousPosition<invalidInlineTagLineEnd ? previousPosition : invalidInlineTagLineEnd;
+ if (this.index >= this.endComment) end = invalidInlineTagLineEnd;
+ this.sourceParser.problemReporter().javadocUnterminatedInlineTag(this.inlineTagStart, end);
+ }
+ if (this.lineStarted && this.textStart != -1 && this.textStart < previousPosition) {
+ pushText(this.textStart, previousPosition);
+ }
+ if (this.kind == DOM_PARSER) {
+ refreshInlineTagPosition(previousPosition);
+ }
+ } else if (this.lineStarted && this.textStart < previousPosition) {
+ pushText(this.textStart, previousPosition);
+ }
+ updateDocComment();
+ } catch (Exception ex) {
+ validComment = false;
+ }
+ return validComment;
+ }
+
+ private void consumeToken() {
+ this.currentTokenType = -1; // flush token cache
+ updateLineEnd();
+ }
+
+ protected abstract Object createArgumentReference(char[] name, int dim, Object typeRef, long[] dimPos, long argNamePos) throws InvalidInputException;
+ protected abstract Object createFieldReference(Object receiver) throws InvalidInputException;
+ protected abstract Object createMethodReference(Object receiver, List arguments) throws InvalidInputException;
+ protected Object createReturnStatement() { return null; }
+ protected abstract void createTag();
+ protected abstract Object createTypeReference(int primitiveToken);
+
+ private int getIndexPosition() {
+ if (this.index > this.lineEnd) {
+ return this.lineEnd;
+ } else {
+ return this.index-1;
+ }
+ }
+
+ /**
+ * Search the line number corresponding to a specific position.
+ * Warning: returned position is 1-based index!
+ * @see Scanner#getLineNumber(int) We cannot directly use this method
+ * when linePtr field is not initialized.
+ */
+ private int getLineNumber(int position) {
+
+ if (this.scanner.linePtr != -1) {
+ return this.scanner.getLineNumber(position);
+ }
+ if (this.lineEnds == null)
+ return 1;
+ int length = this.lineEnds.length;
+ if (length == 0)
+ return 1;
+ int g = 0, d = length - 1;
+ int m = 0;
+ while (g <= d) {
+ m = (g + d) /2;
+ if (position < this.lineEnds[m]) {
+ d = m-1;
+ } else if (position > this.lineEnds[m]) {
+ g = m+1;
+ } else {
+ return m + 1;
+ }
+ }
+ if (position < this.lineEnds[m]) {
+ return m+1;
+ }
+ return m+2;
+ }
+
+ private int getTokenEndPosition() {
+ if (this.scanner.getCurrentTokenEndPosition() > this.lineEnd) {
+ return this.lineEnd;
+ } else {
+ return this.scanner.getCurrentTokenEndPosition();
+ }
+ }
+
+ /*
+ * Parse argument in @see tag method reference
+ */
+ private Object parseArguments(Object receiver) throws InvalidInputException {
+
+ // Init
+ int modulo = 0; // should be 2 for (Type,Type,...) or 3 for (Type arg,Type arg,...)
+ int iToken = 0;
+ char[] argName = null;
+ List arguments = new ArrayList(10);
+ int start = this.scanner.getCurrentTokenStartPosition();
+
+ // Parse arguments declaration if method reference
+ nextArg : while (this.index < this.scanner.eofPosition) {
+
+ // Read argument type reference
+ Object typeRef;
+ try {
+ typeRef = parseQualifiedName(false);
+ } catch (InvalidInputException e) {
+ break nextArg;
+ }
+ boolean firstArg = modulo == 0;
+ if (firstArg) { // verify position
+ if (iToken != 0)
+ break nextArg;
+ } else if ((iToken % modulo) != 0) {
+ break nextArg;
+ }
+ if (typeRef == null) {
+ if (firstArg && this.currentTokenType == TerminalTokens.TokenNameRPAREN) {
+ // verify characters after arguments declaration (expecting white space or end comment)
+ if (!verifySpaceOrEndComment()) {
+ int end = this.starPosition == -1 ? this.lineEnd : this.starPosition;
+ if (this.source[end]=='\n') end--;
+ if (this.sourceParser != null) this.sourceParser.problemReporter().javadocMalformedSeeReference(start, end);
+ return null;
+ }
+ this.lineStarted = true;
+ return createMethodReference(receiver, null);
+ }
+ break nextArg;
+ }
+ iToken++;
+
+ // Read possible array declaration
+ int dim = 0;
+ long[] dimPositions = new long[20]; // assume that there won't be more than 20 dimensions...
+ if (readToken() == TerminalTokens.TokenNameLBRACKET) {
+ int dimStart = this.scanner.getCurrentTokenStartPosition();
+ while (readToken() == TerminalTokens.TokenNameLBRACKET) {
+ consumeToken();
+ if (readToken() != TerminalTokens.TokenNameRBRACKET) {
+ break nextArg;
+ }
+ consumeToken();
+ dimPositions[dim++] = (((long) dimStart) << 32) + this.scanner.getCurrentTokenEndPosition();
+ }
+ }
+
+ // Read argument name
+ long argNamePos = -1;
+ if (readToken() == TerminalTokens.TokenNameIdentifier) {
+ consumeToken();
+ if (firstArg) { // verify position
+ if (iToken != 1)
+ break nextArg;
+ } else if ((iToken % modulo) != 1) {
+ break nextArg;
+ }
+ if (argName == null) { // verify that all arguments name are declared
+ if (!firstArg) {
+ break nextArg;
+ }
+ }
+ argName = this.scanner.getCurrentIdentifierSource();
+ argNamePos = (((long)this.scanner.getCurrentTokenStartPosition())<<32)+this.scanner.getCurrentTokenEndPosition();
+ iToken++;
+ } else if (argName != null) { // verify that no argument name is declared
+ break nextArg;
+ }
+
+ // Verify token position
+ if (firstArg) {
+ modulo = iToken + 1;
+ } else {
+ if ((iToken % modulo) != (modulo - 1)) {
+ break nextArg;
+ }
+ }
+
+ // Read separator or end arguments declaration
+ int token = readToken();
+ char[] name = argName == null ? new char[0] : argName;
+ if (token == TerminalTokens.TokenNameCOMMA) {
+ // Create new argument
+ Object argument = createArgumentReference(name, dim, typeRef, dimPositions, argNamePos);
+ arguments.add(argument);
+ consumeToken();
+ iToken++;
+ } else if (token == TerminalTokens.TokenNameRPAREN) {
+ // verify characters after arguments declaration (expecting white space or end comment)
+ if (!verifySpaceOrEndComment()) {
+ int end = this.starPosition == -1 ? this.lineEnd : this.starPosition;
+ if (this.source[end]=='\n') end--;
+ if (this.sourceParser != null) this.sourceParser.problemReporter().javadocMalformedSeeReference(start, end);
+ return null;
+ }
+ // Create new argument
+ Object argument = createArgumentReference(name, dim, typeRef, dimPositions, argNamePos);
+ arguments.add(argument);
+ consumeToken();
+ return createMethodReference(receiver, arguments);
+ } else {
+ break nextArg;
+ }
+ }
+
+ // Something wrong happened => Invalid input
+ throw new InvalidInputException();
+ }
+
+ /*
+ * Parse an URL link reference in @see tag
+ */
+ private boolean parseHref() throws InvalidInputException {
+ int start = this.scanner.getCurrentTokenStartPosition();
+ if (Character.toLowerCase(readChar()) == 'a') {
+ this.scanner.currentPosition = this.index;
+ if (readToken() == TerminalTokens.TokenNameIdentifier) {
+ this.currentTokenType = -1; // do not update line end
+ try {
+ if (CharOperation.equals(this.scanner.getCurrentIdentifierSource(), new char[]{'h', 'r', 'e', 'f'}, false) &&
+ readToken() == TerminalTokens.TokenNameEQUAL) {
+ this.currentTokenType = -1; // do not update line end
+ if (readToken() == TerminalTokens.TokenNameStringLiteral) {
+ this.currentTokenType = -1; // do not update line end
+ // Skip all characters after string literal until closing '>' (see bug 68726)
+ while (this.index <= this.lineEnd && readToken() != TerminalTokens.TokenNameGREATER) {
+ this.currentTokenType = -1; // do not update line end
+ }
+ if (this.currentTokenType == TerminalTokens.TokenNameGREATER) {
+ consumeToken(); // update line end as new lines are allowed in URL description
+ while (readToken() != TerminalTokens.TokenNameLESS) {
+ if (this.scanner.currentPosition >= this.scanner.eofPosition || this.scanner.currentCharacter == '@') {
+ // Reset position: we want to rescan last token
+ this.index = this.tokenPreviousPosition;
+ this.scanner.currentPosition = this.tokenPreviousPosition;
+ this.currentTokenType = -1;
+ // Signal syntax error
+ if (this.tagValue != TAG_VALUE_VALUE && this.sourceParser != null)
+ this.sourceParser.problemReporter().javadocInvalidSeeUrlReference(start, this.lineEnd);
+ return false;
+ }
+ consumeToken();
+ }
+ this.currentTokenType = -1; // do not update line end
+ start = this.scanner.getCurrentTokenStartPosition();
+ if (readChar() == '/') {
+ if (Character.toLowerCase(readChar()) == 'a') {
+ if (readChar() == '>') {
+ // Valid href
+ return true;
+ }
+ }
+ }
+ }
+ }
+ }
+ } catch (InvalidInputException ex) {
+ // Do nothing as we want to keep positions for error message
+ }
+ }
+ }
+ // Reset position: we want to rescan last token
+ this.index = this.tokenPreviousPosition;
+ this.scanner.currentPosition = this.tokenPreviousPosition;
+ this.currentTokenType = -1;
+ // Signal syntax error
+ if (this.tagValue != TAG_VALUE_VALUE && this.sourceParser != null)
+ this.sourceParser.problemReporter().javadocInvalidSeeUrlReference(start, this.lineEnd);
+ return false;
+ }
+
+ /*
+ * Parse a method reference in @see tag
+ */
+ private Object parseMember(Object receiver) throws InvalidInputException {
+ // Init
+ this.identifierPtr = -1;
+ this.identifierLengthPtr = -1;
+ int start = this.scanner.getCurrentTokenStartPosition();
+ this.memberStart = start;
+
+ // Get member identifier
+ if (readToken() == TerminalTokens.TokenNameIdentifier) {
+ consumeToken();
+ pushIdentifier(true);
+ // Look for next token to know whether it's a field or method reference
+ int previousPosition = this.index;
+ if (readToken() == TerminalTokens.TokenNameLPAREN) {
+ consumeToken();
+ start = this.scanner.getCurrentTokenStartPosition();
+ try {
+ return parseArguments(receiver);
+ } catch (InvalidInputException e) {
+ int end = this.scanner.getCurrentTokenEndPosition() < this.lineEnd ?
+ this.scanner.getCurrentTokenEndPosition() :
+ this.scanner.getCurrentTokenStartPosition();
+ end = end < this.lineEnd ? end : this.lineEnd;
+ if (this.sourceParser != null) this.sourceParser.problemReporter().javadocInvalidSeeReferenceArgs(start, end);
+ }
+ return null;
+ }
+
+ // Reset position: we want to rescan last token
+ this.index = previousPosition;
+ this.scanner.currentPosition = previousPosition;
+ this.currentTokenType = -1;
+
+ // Verify character(s) after identifier (expecting space or end comment)
+ if (!verifySpaceOrEndComment()) {
+ int end = this.starPosition == -1 ? this.lineEnd : this.starPosition;
+ if (this.source[end]=='\n') end--;
+ if (this.sourceParser != null) this.sourceParser.problemReporter().javadocMalformedSeeReference(start, end);
+ return null;
+ }
+ return createFieldReference(receiver);
+ }
+ int end = getTokenEndPosition() - 1;
+ end = start > end ? start : end;
+ if (this.sourceParser != null) this.sourceParser.problemReporter().javadocInvalidReference(start, end);
+ // Reset position: we want to rescan last token
+ this.index = this.tokenPreviousPosition;
+ this.scanner.currentPosition = this.tokenPreviousPosition;
+ this.currentTokenType = -1;
+ return null;
+ }
+
+ /*
+ * Parse @param tag declaration
+ */
+ protected boolean parseParam() {
+
+ // Store current token state
+ int start = this.tagSourceStart;
+ int end = this.tagSourceEnd;
+
+ try {
+ // Push identifier next
+ int token = readToken();
+ switch (token) {
+ case TerminalTokens.TokenNameIdentifier :
+ consumeToken();
+ return pushParamName();
+ case TerminalTokens.TokenNameEOF :
+ break;
+ default :
+ start = this.scanner.getCurrentTokenStartPosition();
+ end = getTokenEndPosition();
+ if (end < start) start = this.tagSourceStart;
+ break;
+ }
+ } catch (InvalidInputException e) {
+ end = getTokenEndPosition();
+ }
+
+ // Reset position to avoid missing tokens when new line was encountered
+ this.index = this.tokenPreviousPosition;
+ this.scanner.currentPosition = this.tokenPreviousPosition;
+ this.currentTokenType = -1;
+
+ // Report problem
+ if (this.sourceParser != null) this.sourceParser.problemReporter().javadocMissingParamName(start, end);
+ return false;
+ }
+
+ /*
+ * Parse a qualified name and built a type reference if the syntax is valid.
+ */
+ protected Object parseQualifiedName(boolean reset) throws InvalidInputException {
+
+ // Reset identifier stack if requested
+ if (reset) {
+ this.identifierPtr = -1;
+ this.identifierLengthPtr = -1;
+ }
+
+ // Scan tokens
+ int primitiveToken = -1;
+ nextToken : for (int iToken = 0; ; iToken++) {
+ int token = readToken();
+ switch (token) {
+ case TerminalTokens.TokenNameIdentifier :
+ if (((iToken % 2) > 0)) { // identifiers must be odd tokens
+ break nextToken;
+ }
+ pushIdentifier(iToken == 0);
+ consumeToken();
+ break;
+
+ case TerminalTokens.TokenNameDOT :
+ if ((iToken % 2) == 0) { // dots must be even tokens
+ throw new InvalidInputException();
+ }
+ consumeToken();
+ break;
+
+ case TerminalTokens.TokenNamevoid :
+ case TerminalTokens.TokenNameboolean :
+ case TerminalTokens.TokenNamebyte :
+ case TerminalTokens.TokenNamechar :
+ case TerminalTokens.TokenNamedouble :
+ case TerminalTokens.TokenNamefloat :
+ case TerminalTokens.TokenNameint :
+ case TerminalTokens.TokenNamelong :
+ case TerminalTokens.TokenNameshort :
+ if (iToken > 0) {
+ throw new InvalidInputException();
+ }
+ pushIdentifier(true);
+ primitiveToken = token;
+ consumeToken();
+ break nextToken;
+
+ default :
+ if (iToken == 0) {
+ return null;
+ }
+ if ((iToken % 2) == 0) { // cannot leave on a dot
+ // Reset position: we want to rescan last token
+ if (this.kind == DOM_PARSER && this.currentTokenType != -1) {
+ this.index = this.tokenPreviousPosition;
+ this.scanner.currentPosition = this.tokenPreviousPosition;
+ this.currentTokenType = -1;
+ }
+ throw new InvalidInputException();
+ }
+ break nextToken;
+ }
+ }
+ // Reset position: we want to rescan last token
+ if (this.currentTokenType != -1) {
+ this.index = this.tokenPreviousPosition;
+ this.scanner.currentPosition = this.tokenPreviousPosition;
+ this.currentTokenType = -1;
+ }
+ this.lastIdentifierEndPosition = (int) this.identifierPositionStack[this.identifierPtr];
+ return createTypeReference(primitiveToken);
+ }
+
+ /*
+ * Parse a reference in @see tag
+ */
+ protected boolean parseReference() throws InvalidInputException {
+ int currentPosition = this.scanner.currentPosition;
+ try {
+ Object typeRef = null;
+ Object reference = null;
+ int previousPosition = -1;
+ int typeRefStartPosition = -1;
+
+ // Get reference tokens
+ nextToken : while (this.index < this.scanner.eofPosition) {
+ previousPosition = this.index;
+ int token = readToken();
+ switch (token) {
+ case TerminalTokens.TokenNameStringLiteral : // @see "string"
+ consumeToken();
+ int start = this.scanner.getCurrentTokenStartPosition();
+ if (this.tagValue == TAG_VALUE_VALUE) {
+ if (this.sourceParser != null) this.sourceParser.problemReporter().javadocInvalidValueReference(start, getTokenEndPosition());
+ } else {
+ // If typeRef != null we may raise a warning here to let user know there's an unused reference...
+ // Currently as javadoc 1.4.2 ignore it, we do the same (see bug 69302)
+ if (typeRef != null) {
+ start = this.tagSourceEnd+1;
+ previousPosition = start;
+ typeRef = null;
+ }
+ // verify end line (expecting empty or end comment)
+ if (verifyEndLine(previousPosition)) {
+ return true;
+ }
+ if (this.sourceParser != null) this.sourceParser.problemReporter().javadocUnexpectedText(this.scanner.currentPosition, this.lineEnd);
+ }
+ return false;
+ case TerminalTokens.TokenNameLESS : // @see "<a href="URL#Value">label</a>
+ consumeToken();
+ start = this.scanner.getCurrentTokenStartPosition();
+ if (parseHref()) {
+ consumeToken();
+ // If typeRef != null we may raise a warning here to let user know there's an unused reference...
+ // Currently as javadoc 1.4.2 ignore it, we do the same (see bug 69302)
+ if (typeRef != null) {
+ start = this.tagSourceEnd+1;
+ previousPosition = start;
+ typeRef = null;
+ }
+ // verify end line (expecting empty or end comment)
+ if (verifyEndLine(previousPosition)) {
+ return true;
+ }
+ if (this.tagValue != TAG_VALUE_VALUE && this.sourceParser != null) {
+// this.sourceParser.problemReporter().javadocInvalidReference(start, this.lineEnd);
+ if (this.sourceParser != null) this.sourceParser.problemReporter().javadocUnexpectedText(this.scanner.currentPosition, this.lineEnd);
+ }
+ }
+ if (this.tagValue == TAG_VALUE_VALUE && this.sourceParser != null) {
+ this.sourceParser.problemReporter().javadocInvalidValueReference(start, getIndexPosition());
+ }
+ return false;
+ case TerminalTokens.TokenNameERROR :
+ if (this.scanner.currentCharacter == '#') { // @see ...#member
+ consumeToken();
+ reference = parseMember(typeRef);
+ if (reference != null) {
+ return pushSeeRef(reference);
+ }
+ return false;
+ }
+ break nextToken;
+ case TerminalTokens.TokenNameIdentifier :
+ if (typeRef == null) {
+ typeRefStartPosition = this.scanner.getCurrentTokenStartPosition();
+ typeRef = parseQualifiedName(true);
+ break;
+ }
+ default :
+ break nextToken;
+ }
+ }
+
+ // Verify that we got a reference
+ if (reference == null) reference = typeRef;
+ if (reference == null) {
+ this.index = this.tokenPreviousPosition;
+ this.scanner.currentPosition = this.tokenPreviousPosition;
+ this.currentTokenType = -1;
+ if (this.tagValue == TAG_VALUE_VALUE) {
+ if (this.kind == DOM_PARSER) createTag();
+ return true;
+ }
+ if (this.sourceParser != null) this.sourceParser.problemReporter().javadocMissingReference(this.tagSourceStart, this.tagSourceEnd);
+ return false;
+ }
+
+ // Reset position at the end of type reference
+ this.index = this.lastIdentifierEndPosition+1;
+ this.scanner.currentPosition = this.index;
+ this.currentTokenType = -1;
+
+ // In case of @value, we have an invalid reference (only static field refs are valid for this tag)
+ if (this.tagValue == TAG_VALUE_VALUE) {
+ if (this.sourceParser != null) this.sourceParser.problemReporter().javadocInvalidReference(typeRefStartPosition, this.lineEnd);
+ return false;
+ }
+
+ // Verify that line end does not start with an open parenthese (which could be a constructor reference wrongly written...)
+ // See bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=47215
+ char ch = peekChar();
+ if (ch == '(') {
+ if (this.sourceParser != null) this.sourceParser.problemReporter().javadocMissingHashCharacter(typeRefStartPosition, this.lineEnd, String.valueOf(this.source, typeRefStartPosition, this.lineEnd-typeRefStartPosition+1));
+ return false;
+ }
+
+ // Verify that we get white space after reference
+ if (!verifySpaceOrEndComment()) {
+ this.index = this.tokenPreviousPosition;
+ this.scanner.currentPosition = this.tokenPreviousPosition;
+ this.currentTokenType = -1;
+ int end = this.starPosition == -1 ? this.lineEnd : this.starPosition;
+ if (this.source[end]=='\n') end--;
+ if (this.sourceParser != null) this.sourceParser.problemReporter().javadocMalformedSeeReference(typeRefStartPosition, end);
+ return false;
+ }
+
+ // Everything is OK, store reference
+ return pushSeeRef(reference);
+ }
+ catch (InvalidInputException ex) {
+ if (this.sourceParser != null) this.sourceParser.problemReporter().javadocInvalidReference(currentPosition, getTokenEndPosition());
+ }
+ // Reset position to avoid missing tokens when new line was encountered
+ this.index = this.tokenPreviousPosition;
+ this.scanner.currentPosition = this.tokenPreviousPosition;
+ this.currentTokenType = -1;
+ return false;
+ }
+
+ /*
+ * Parse @return tag declaration
+ */
+ protected abstract boolean parseReturn();
+
+ /*
+ * Parse @see tag declaration
+ *
+ protected boolean parseSee(int value) {
+ int start = this.scanner.currentPosition;
+ try {
+ return parseReference(value);
+ } catch (InvalidInputException ex) {
+ if (this.sourceParser != null) this.sourceParser.problemReporter().javadocInvalidSeeReference(start, getEndPosition());
+ }
+ // Reset position to avoid missing tokens when new line was encountered
+ this.index = this.tokenPreviousPosition;
+ this.scanner.currentPosition = this.tokenPreviousPosition;
+ this.currentTokenType = -1;
+ return false;
+ }
+ */
+
+ /*
+ * Parse tag declaration
+ */
+ protected abstract boolean parseTag(int previousPosition) throws InvalidInputException;
+
+ /*
+ * Parse @throws tag declaration
+ */
+ protected boolean parseThrows() {
+ int start = this.scanner.currentPosition;
+ try {
+ Object typeRef = parseQualifiedName(true);
+ if (typeRef == null) {
+ if (this.sourceParser != null) this.sourceParser.problemReporter().javadocMissingThrowsClassName(this.tagSourceStart, this.tagSourceEnd);
+ } else {
+ return pushThrowName(typeRef);
+ }
+ } catch (InvalidInputException ex) {
+ if (this.sourceParser != null) this.sourceParser.problemReporter().javadocInvalidThrowsClass(start, getTokenEndPosition());
+ }
+ return false;
+ }
+
+ /*
+ * Return current character without move index position.
+ */
+ protected char peekChar() {
+ int idx = this.index;
+ char c = this.source[idx++];
+ if (c == '\\' && this.source[idx] == 'u') {
+ int c1, c2, c3, c4;
+ idx++;
+ while (this.source[idx] == 'u')
+ idx++;
+ if (!(((c1 = Character.getNumericValue(this.source[idx++])) > 15 || c1 < 0)
+ || ((c2 = Character.getNumericValue(this.source[idx++])) > 15 || c2 < 0)
+ || ((c3 = Character.getNumericValue(this.source[idx++])) > 15 || c3 < 0) || ((c4 = Character.getNumericValue(this.source[idx++])) > 15 || c4 < 0))) {
+ c = (char) (((c1 * 16 + c2) * 16 + c3) * 16 + c4);
+ }
+ }
+ return c;
+ }
+
+ /*
+ * push the consumeToken on the identifier stack. Increase the total number of identifier in the stack.
+ */
+ protected void pushIdentifier(boolean newLength) {
+
+ int stackLength = this.identifierStack.length;
+ if (++this.identifierPtr >= stackLength) {
+ System.arraycopy(
+ this.identifierStack, 0,
+ this.identifierStack = new char[stackLength + 10][], 0,
+ stackLength);
+ System.arraycopy(
+ this.identifierPositionStack, 0,
+ this.identifierPositionStack = new long[stackLength + 10], 0,
+ stackLength);
+ }
+ this.identifierStack[this.identifierPtr] = this.scanner.getCurrentIdentifierSource();
+ this.identifierPositionStack[this.identifierPtr] = (((long) this.scanner.startPosition) << 32) + (this.scanner.currentPosition - 1);
+
+ if (newLength) {
+ stackLength = this.identifierLengthStack.length;
+ if (++this.identifierLengthPtr >= stackLength) {
+ System.arraycopy(
+ this.identifierLengthStack, 0,
+ this.identifierLengthStack = new int[stackLength + 10], 0,
+ stackLength);
+ }
+ this.identifierLengthStack[this.identifierLengthPtr] = 1;
+ } else {
+ this.identifierLengthStack[this.identifierLengthPtr]++;
+ }
+ }
+
+ /*
+ * Add a new obj on top of the ast stack.
+ * If new length is required, then add also a new length in length stack.
+ */
+ protected void pushOnAstStack(Object node, boolean newLength) {
+
+ if (node == null) {
+ this.astLengthStack[++this.astLengthPtr] = 0;
+ return;
+ }
+
+ int stackLength = this.astStack.length;
+ if (++this.astPtr >= stackLength) {
+ System.arraycopy(
+ this.astStack, 0,
+ this.astStack = new Object[stackLength + AstStackIncrement], 0,
+ stackLength);
+ this.astPtr = stackLength;
+ }
+ this.astStack[this.astPtr] = node;
+
+ if (newLength) {
+ stackLength = this.astLengthStack.length;
+ if (++this.astLengthPtr >= stackLength) {
+ System.arraycopy(
+ this.astLengthStack, 0,
+ this.astLengthStack = new int[stackLength + AstStackIncrement], 0,
+ stackLength);
+ }
+ this.astLengthStack[this.astLengthPtr] = 1;
+ } else {
+ this.astLengthStack[this.astLengthPtr]++;
+ }
+ }
+
+ /*
+ * Push a param name in ast node stack.
+ */
+ protected abstract boolean pushParamName();
+
+ /*
+ * Push a reference statement in ast node stack.
+ */
+ protected abstract boolean pushSeeRef(Object statement);
+
+ /*
+ * Push a text element in ast node stack
+ */
+ protected abstract void pushText(int start, int end);
+
+ /*
+ * Push a throws type ref in ast node stack.
+ */
+ protected abstract boolean pushThrowName(Object typeRef);
+
+ /*
+ * Read current character and move index position.
+ * Warning: scanner position is unchanged using this method!
+ */
+ protected char readChar() {
+
+ char c = this.source[this.index++];
+ if (c == '\\' && this.source[this.index] == 'u') {
+ int c1, c2, c3, c4;
+ int pos = this.index;
+ this.index++;
+ while (this.source[this.index] == 'u')
+ this.index++;
+ if (!(((c1 = Character.getNumericValue(this.source[this.index++])) > 15 || c1 < 0)
+ || ((c2 = Character.getNumericValue(this.source[this.index++])) > 15 || c2 < 0)
+ || ((c3 = Character.getNumericValue(this.source[this.index++])) > 15 || c3 < 0) || ((c4 = Character.getNumericValue(this.source[this.index++])) > 15 || c4 < 0))) {
+ c = (char) (((c1 * 16 + c2) * 16 + c3) * 16 + c4);
+ } else {
+ // TODO (frederic) currently reset to previous position, perhaps signal a syntax error would be more appropriate
+ this.index = pos;
+ }
+ }
+ return c;
+ }
+
+ /*
+ * Read token only if previous was consumed
+ */
+ private int readToken() throws InvalidInputException {
+ if (this.currentTokenType < 0) {
+ this.tokenPreviousPosition = this.scanner.currentPosition;
+ this.currentTokenType = this.scanner.getNextToken();
+ if (this.scanner.currentPosition > (this.lineEnd+1)) { // be sure to be on next line (lineEnd is still on the same line)
+ this.lineStarted = false;
+ while (this.currentTokenType == TerminalTokens.TokenNameMULTIPLY) {
+ this.currentTokenType = this.scanner.getNextToken();
+ }
+ }
+ this.index = this.scanner.currentPosition;
+ this.lineStarted = true; // after having read a token, line is obviously started...
+ }
+ return this.currentTokenType;
+ }
+
+ protected int readTokenAndConsume() throws InvalidInputException {
+ int token = readToken();
+ consumeToken();
+ return token;
+ }
+
+ /*
+ * Refresh start position and length of an inline tag.
+ */
+ protected void refreshInlineTagPosition(int previousPosition) {
+ // do nothing by default
+ }
+
+ public String toString() {
+ StringBuffer buffer = new StringBuffer();
+ int startPos = this.scanner.currentPosition<this.index ? this.scanner.currentPosition : this.index;
+ int endPos = this.scanner.currentPosition<this.index ? this.index : this.scanner.currentPosition;
+ if (startPos == this.source.length)
+ return "EOF\n\n" + new String(this.source); //$NON-NLS-1$
+ if (endPos > this.source.length)
+ return "behind the EOF\n\n" + new String(this.source); //$NON-NLS-1$
+
+ char front[] = new char[startPos];
+ System.arraycopy(this.source, 0, front, 0, startPos);
+
+ int middleLength = (endPos - 1) - startPos + 1;
+ char middle[];
+ if (middleLength > -1) {
+ middle = new char[middleLength];
+ System.arraycopy(
+ this.source,
+ startPos,
+ middle,
+ 0,
+ middleLength);
+ } else {
+ middle = CharOperation.NO_CHAR;
+ }
+
+ char end[] = new char[this.source.length - (endPos - 1)];
+ System.arraycopy(
+ this.source,
+ (endPos - 1) + 1,
+ end,
+ 0,
+ this.source.length - (endPos - 1) - 1);
+
+ buffer.append(front);
+ if (this.scanner.currentPosition<this.index) {
+ buffer.append("\n===============================\nScanner current position here -->"); //$NON-NLS-1$
+ } else {
+ buffer.append("\n===============================\nParser index here -->"); //$NON-NLS-1$
+ }
+ buffer.append(middle);
+ if (this.scanner.currentPosition<this.index) {
+ buffer.append("<-- Parser index here\n===============================\n"); //$NON-NLS-1$
+ } else {
+ buffer.append("<-- Scanner current position here\n===============================\n"); //$NON-NLS-1$
+ }
+ buffer.append(end);
+
+ return buffer.toString();
+ }
+
+ /*
+ * Update
+ */
+ protected abstract void updateDocComment();
+
+ /*
+ * Update line end
+ */
+ protected void updateLineEnd() {
+ while (this.index > (this.lineEnd+1)) { // be sure to be on next line (lineEnd is still on the same line)
+ if (this.linePtr < this.lastLinePtr) {
+ this.lineEnd = this.scanner.getLineEnd(++this.linePtr) - 1;
+ } else {
+ this.lineEnd = this.endComment;
+ return;
+ }
+ }
+ }
+
+ /*
+ * Verify that end of the line only contains space characters or end of comment.
+ * Note that end of comment may be preceeding by several contiguous '*' chars.
+ */
+ private boolean verifyEndLine(int textPosition) {
+ int startPosition = this.index;
+ int previousPosition = this.index;
+ this.starPosition = -1;
+ char ch = readChar();
+ nextChar: while (true) {
+ switch (ch) {
+ case '\r':
+ case '\n':
+ if (this.kind == DOM_PARSER) {
+ createTag();
+ pushText(textPosition, previousPosition);
+ }
+ this.index = previousPosition;
+ return true;
+ case '\u000c' : /* FORM FEED */
+ case ' ' : /* SPACE */
+ case '\t' : /* HORIZONTAL TABULATION */
+ if (this.starPosition >= 0) break nextChar;
+ break;
+ case '*':
+ this.starPosition = previousPosition;
+ break;
+ case '/':
+ if (this.starPosition >= textPosition) {
+ if (this.kind == DOM_PARSER) {
+ createTag();
+ pushText(textPosition, this.starPosition);
+ }
+ return true;
+ }
+ default :
+ // leave loop
+ break nextChar;
+
+ }
+ previousPosition = this.index;
+ ch = readChar();
+ }
+ this.index = startPosition;
+ return false;
+ }
+
+ /*
+ * Verify characters after a name matches one of following conditions:
+ * 1- first character is a white space
+ * 2- first character is a closing brace *and* we're currently parsing an inline tag
+ * 3- are the end of comment (several contiguous star ('*') characters may be
+ * found before the last slash ('/') character).
+ */
+ private boolean verifySpaceOrEndComment() {
+ int startPosition = this.index;
+ // Whitespace or inline tag closing brace
+ char ch = peekChar();
+ switch (ch) {
+ case '}':
+ return this.inlineTagStarted;
+ default:
+ if (Character.isWhitespace(ch)) {
+ return true;
+ }
+ }
+ // End of comment
+ int previousPosition = this.index;
+ this.starPosition = -1;
+ ch = readChar();
+ nextChar: while (this.index<this.source.length) {
+ switch (ch) {
+ case '*':
+ // valid whatever the number of star before last '/'
+ this.starPosition = previousPosition;
+ break;
+ case '/':
+ if (this.starPosition >= startPosition) { // valid only if a star was previous character
+ return true;
+ }
+ default :
+ // invalid whatever other character, even white spaces
+ this.index = startPosition;
+ return false;
+
+ }
+ previousPosition = this.index;
+ ch = readChar();
+ }
+ this.index = startPosition;
+ return false;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/JavadocParser.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/JavadocParser.js
new file mode 100644
index 0000000..97a6b8d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/JavadocParser.js
@@ -0,0 +1,632 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.parser;
+
+import java.util.List;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.core.compiler.InvalidInputException;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Expression;
+import org.eclipse.wst.jsdt.internal.compiler.ast.ImplicitDocTypeReference;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Javadoc;
+import org.eclipse.wst.jsdt.internal.compiler.ast.JavadocAllocationExpression;
+import org.eclipse.wst.jsdt.internal.compiler.ast.JavadocArgumentExpression;
+import org.eclipse.wst.jsdt.internal.compiler.ast.JavadocArrayQualifiedTypeReference;
+import org.eclipse.wst.jsdt.internal.compiler.ast.JavadocArraySingleTypeReference;
+import org.eclipse.wst.jsdt.internal.compiler.ast.JavadocFieldReference;
+import org.eclipse.wst.jsdt.internal.compiler.ast.JavadocMessageSend;
+import org.eclipse.wst.jsdt.internal.compiler.ast.JavadocQualifiedTypeReference;
+import org.eclipse.wst.jsdt.internal.compiler.ast.JavadocReturnStatement;
+import org.eclipse.wst.jsdt.internal.compiler.ast.JavadocSingleNameReference;
+import org.eclipse.wst.jsdt.internal.compiler.ast.JavadocSingleTypeReference;
+import org.eclipse.wst.jsdt.internal.compiler.ast.TypeReference;
+import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemSeverities;
+
+/**
+ * Parser specialized for decoding javadoc comments
+ */
+public class JavadocParser extends AbstractCommentParser {
+
+ // Public fields
+ public Javadoc docComment;
+
+ // bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=51600
+ // Store param references for tag with invalid syntax
+ private int invalidParamReferencesPtr = -1;
+ private JavadocSingleNameReference[] invalidParamReferencesStack;
+
+ // Store current tag stack pointer
+ private int currentAstPtr= -2;
+
+ public JavadocParser(Parser sourceParser) {
+ super(sourceParser);
+ this.checkDocComment = this.sourceParser.options.docCommentSupport;
+ this.kind = COMPIL_PARSER;
+ }
+
+ /* (non-Javadoc)
+ * Returns true if tag @deprecated is present in javadoc comment.
+ *
+ * If javadoc checking is enabled, will also construct an Javadoc node, which will be stored into Parser.javadoc
+ * slot for being consumed later on.
+ */
+ public boolean checkDeprecation(int javadocStart, int javadocEnd) {
+
+ try {
+ this.source = this.sourceParser.scanner.source;
+ this.index = javadocStart +3;
+ this.endComment = javadocEnd - 2;
+ if (this.checkDocComment) {
+ // Initialization
+ this.scanner.lineEnds = this.sourceParser.scanner.lineEnds;
+ this.scanner.linePtr = this.sourceParser.scanner.linePtr;
+ this.lineEnds = this.scanner.lineEnds;
+ this.docComment = new Javadoc(javadocStart, javadocEnd);
+ commentParse(javadocStart, javadocEnd);
+ } else {
+ // Init javadoc if necessary
+ if (this.sourceParser.options.getSeverity(CompilerOptions.MissingJavadocComments) != ProblemSeverities.Ignore) {
+ this.docComment = new Javadoc(javadocStart, javadocEnd);
+ } else {
+ this.docComment = null;
+ }
+
+ // Parse comment
+ int firstLineNumber = this.sourceParser.scanner.getLineNumber(javadocStart);
+ int lastLineNumber = this.sourceParser.scanner.getLineNumber(javadocEnd);
+
+ // scan line per line, since tags must be at beginning of lines only
+ nextLine : for (int line = firstLineNumber; line <= lastLineNumber; line++) {
+ int lineStart = line == firstLineNumber
+ ? javadocStart + 3 // skip leading /**
+ : this.sourceParser.scanner.getLineStart(line);
+ this.index = lineStart;
+ this.lineEnd = line == lastLineNumber
+ ? javadocEnd - 2 // remove trailing * /
+ : this.sourceParser.scanner.getLineEnd(line);
+ nextCharacter : while (this.index < this.lineEnd) {
+ char c = readChar(); // consider unicodes
+ switch (c) {
+ default :
+ if (Character.isWhitespace(c)) {
+ continue nextCharacter;
+ }
+ break;
+ case '*' :
+ continue nextCharacter;
+ case '@' :
+ if ((readChar() == 'd') && (readChar() == 'e') &&
+ (readChar() == 'p') && (readChar() == 'r') &&
+ (readChar() == 'e') && (readChar() == 'c') &&
+ (readChar() == 'a') && (readChar() == 't') &&
+ (readChar() == 'e') && (readChar() == 'd')) {
+ // ensure the tag is properly ended: either followed by a space, a tab, line end or asterisk.
+ c = readChar();
+ if (Character.isWhitespace(c) || c == '*') {
+ return true;
+ }
+ }
+ }
+ continue nextLine;
+ }
+ }
+ return false;
+ }
+ } finally {
+ this.source = null; // release source as soon as finished
+ }
+ return this.deprecated;
+ }
+
+ public String toString() {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("check javadoc: ").append(this.checkDocComment).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
+ buffer.append("javadoc: ").append(this.docComment).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
+ buffer.append(super.toString());
+ return buffer.toString();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.parser.AbstractCommentParser#createArgumentReference(char[], java.lang.Object, int)
+ */
+ protected Object createArgumentReference(char[] name, int dim, Object typeRef, long[] dimPositions, long argNamePos) throws InvalidInputException {
+ try {
+ TypeReference argTypeRef = (TypeReference) typeRef;
+ if (dim > 0) {
+ long pos = (((long) argTypeRef.sourceStart) << 32) + argTypeRef.sourceEnd;
+ if (typeRef instanceof JavadocSingleTypeReference) {
+ JavadocSingleTypeReference singleRef = (JavadocSingleTypeReference) typeRef;
+ argTypeRef = new JavadocArraySingleTypeReference(singleRef.token, dim, pos);
+ } else {
+ JavadocQualifiedTypeReference qualifRef = (JavadocQualifiedTypeReference) typeRef;
+ argTypeRef = new JavadocArrayQualifiedTypeReference(qualifRef, dim);
+ }
+ }
+ int argEnd = argTypeRef.sourceEnd;
+ if (dim > 0) argEnd = (int) dimPositions[dim-1];
+ if (argNamePos >= 0) argEnd = (int) argNamePos;
+ return new JavadocArgumentExpression(name, argTypeRef.sourceStart, argEnd, argTypeRef);
+ }
+ catch (ClassCastException ex) {
+ throw new InvalidInputException();
+ }
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.parser.AbstractCommentParser#createFieldReference()
+ */
+ protected Object createFieldReference(Object receiver) throws InvalidInputException {
+ try {
+ // Get receiver type
+ TypeReference typeRef = (TypeReference) receiver;
+ if (typeRef == null) {
+ char[] name = this.sourceParser.compilationUnit.compilationResult.compilationUnit.getMainTypeName();
+ typeRef = new ImplicitDocTypeReference(name, this.memberStart);
+ }
+ // Create field
+ JavadocFieldReference field = new JavadocFieldReference(this.identifierStack[0], this.identifierPositionStack[0]);
+ field.receiver = typeRef;
+ field.tagSourceStart = this.tagSourceStart;
+ field.tagSourceEnd = this.tagSourceEnd;
+ field.tagValue = this.tagValue;
+ return field;
+ }
+ catch (ClassCastException ex) {
+ throw new InvalidInputException();
+ }
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.parser.AbstractCommentParser#createMethodReference(java.lang.Object[])
+ */
+ protected Object createMethodReference(Object receiver, List arguments) throws InvalidInputException {
+ try {
+ // Get receiver type
+ TypeReference typeRef = (TypeReference) receiver;
+ // Decide whether we have a constructor or not
+ boolean isConstructor = false;
+ if (typeRef == null) {
+ char[] name = this.sourceParser.compilationUnit.compilationResult.compilationUnit.getMainTypeName();
+ isConstructor = CharOperation.equals(this.identifierStack[0], name);
+ typeRef = new ImplicitDocTypeReference(name, this.memberStart);
+ } else {
+ char[] name = null;
+ if (typeRef instanceof JavadocSingleTypeReference) {
+ name = ((JavadocSingleTypeReference)typeRef).token;
+ } else if (typeRef instanceof JavadocQualifiedTypeReference) {
+ char[][] tokens = ((JavadocQualifiedTypeReference)typeRef).tokens;
+ name = tokens[tokens.length-1];
+ } else {
+ throw new InvalidInputException();
+ }
+ isConstructor = CharOperation.equals(this.identifierStack[0], name);
+ }
+ // Create node
+ if (arguments == null) {
+ if (isConstructor) {
+ JavadocAllocationExpression alloc = new JavadocAllocationExpression(this.identifierPositionStack[0]);
+ alloc.type = typeRef;
+ alloc.tagValue = this.tagValue;
+ return alloc;
+ } else {
+ JavadocMessageSend msg = new JavadocMessageSend(this.identifierStack[0], this.identifierPositionStack[0]);
+ msg.receiver = typeRef;
+ msg.tagValue = this.tagValue;
+ return msg;
+ }
+ } else {
+ JavadocArgumentExpression[] expressions = new JavadocArgumentExpression[arguments.size()];
+ arguments.toArray(expressions);
+ if (isConstructor) {
+ JavadocAllocationExpression alloc = new JavadocAllocationExpression(this.identifierPositionStack[0]);
+ alloc.arguments = expressions;
+ alloc.type = typeRef;
+ alloc.tagValue = this.tagValue;
+ return alloc;
+ } else {
+ JavadocMessageSend msg = new JavadocMessageSend(this.identifierStack[0], this.identifierPositionStack[0], expressions);
+ msg.receiver = typeRef;
+ msg.tagValue = this.tagValue;
+ return msg;
+ }
+ }
+ }
+ catch (ClassCastException ex) {
+ throw new InvalidInputException();
+ }
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.parser.AbstractCommentParser#createReturnStatement()
+ */
+ protected Object createReturnStatement() {
+ return new JavadocReturnStatement(this.scanner.getCurrentTokenStartPosition(),
+ this.scanner.getCurrentTokenEndPosition(),
+ this.scanner.getRawTokenSourceEnd());
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.parser.AbstractCommentParser#createTypeReference()
+ */
+ protected Object createTypeReference(int primitiveToken) {
+ TypeReference typeRef = null;
+ int size = this.identifierLengthStack[this.identifierLengthPtr--];
+ if (size == 1) { // Single Type ref
+ typeRef = new JavadocSingleTypeReference(
+ this.identifierStack[this.identifierPtr],
+ this.identifierPositionStack[this.identifierPtr],
+ this.tagSourceStart,
+ this.tagSourceEnd);
+ } else if (size > 1) { // Qualified Type ref
+ char[][] tokens = new char[size][];
+ System.arraycopy(this.identifierStack, this.identifierPtr - size + 1, tokens, 0, size);
+ long[] positions = new long[size];
+ System.arraycopy(this.identifierPositionStack, this.identifierPtr - size + 1, positions, 0, size);
+ typeRef = new JavadocQualifiedTypeReference(tokens, positions, this.tagSourceStart, this.tagSourceEnd);
+ }
+ this.identifierPtr -= size;
+ return typeRef;
+ }
+
+ /*
+ * Parse @return tag declaration
+ */
+ protected boolean parseReturn() {
+ if (this.returnStatement == null) {
+ this.returnStatement = createReturnStatement();
+ this.currentAstPtr = this.astPtr;
+ return true;
+ }
+ if (this.sourceParser != null) this.sourceParser.problemReporter().javadocDuplicatedReturnTag(
+ this.scanner.getCurrentTokenStartPosition(),
+ this.scanner.getCurrentTokenEndPosition());
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.parser.AbstractCommentParser#parseTag(int)
+ */
+ protected boolean parseTag(int previousPosition) throws InvalidInputException {
+ boolean valid = false;
+
+ // In case of previous return tag, set it to not empty if parsing an inline tag
+ if (this.currentAstPtr != -2 && this.returnStatement != null) {
+ this.currentAstPtr = -2;
+ JavadocReturnStatement javadocReturn = (JavadocReturnStatement) this.returnStatement;
+ javadocReturn.empty = javadocReturn.empty && !this.inlineTagStarted;
+ }
+
+ // Read tag name
+ int token = readTokenAndConsume();
+ this.tagSourceStart = this.scanner.getCurrentTokenStartPosition();
+ this.tagSourceEnd = this.scanner.getCurrentTokenEndPosition();
+ char[] tag = this.scanner.getCurrentIdentifierSource(); // first token is either an identifier or a keyword
+
+ // Decide which parse to perform depending on tag name
+ this.tagValue = NO_TAG_VALUE;
+ switch (token) {
+ case TerminalTokens.TokenNameIdentifier :
+ switch (tag[0]) {
+ case 'd':
+ if (CharOperation.equals(tag, TAG_DEPRECATED)) {
+ this.deprecated = true;
+ valid = true;
+ this.tagValue = TAG_DEPRECATED_VALUE;
+ }
+ break;
+ case 'i':
+ if (CharOperation.equals(tag, TAG_INHERITDOC)) {
+ // inhibits inherited flag when tags have been already stored
+ // see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=51606
+ // Note that for DOM_PARSER, nodes stack may be not empty even no '@' tag
+ // was encountered in comment. But it cannot be the case for COMPILER_PARSER
+ // and so is enough as it is only this parser which signals the missing tag warnings...
+ this.inherited = this.astPtr==-1;
+ valid = true;
+ this.tagValue = TAG_INHERITDOC_VALUE;
+ }
+ break;
+ case 'p':
+ if (CharOperation.equals(tag, TAG_PARAM)) {
+ this.tagValue = TAG_PARAM_VALUE;
+ valid = parseParam();
+ }
+ break;
+ case 'e':
+ if (CharOperation.equals(tag, TAG_EXCEPTION)) {
+ this.tagValue = TAG_EXCEPTION_VALUE;
+ valid = parseThrows();
+ }
+ break;
+ case 's':
+ if (CharOperation.equals(tag, TAG_SEE)) {
+ if (this.inlineTagStarted) {
+ // bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=53290
+ // Cannot have @see inside inline comment
+ valid = false;
+ if (this.sourceParser != null)
+ this.sourceParser.problemReporter().javadocUnexpectedTag(this.tagSourceStart, this.tagSourceEnd);
+ } else {
+ this.tagValue = TAG_SEE_VALUE;
+ valid = parseReference();
+ }
+ }
+ break;
+ case 'l':
+ if (CharOperation.equals(tag, TAG_LINK)) {
+ this.tagValue = TAG_LINK_VALUE;
+ if (this.inlineTagStarted) {
+ valid= parseReference();
+ } else {
+ // bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=53290
+ // Cannot have @link outside inline comment
+ valid = false;
+ if (this.sourceParser != null)
+ this.sourceParser.problemReporter().javadocUnexpectedTag(this.tagSourceStart, this.tagSourceEnd);
+ }
+ } else if (CharOperation.equals(tag, TAG_LINKPLAIN)) {
+ this.tagValue = TAG_LINKPLAIN_VALUE;
+ if (this.inlineTagStarted) {
+ valid = parseReference();
+ } else {
+ valid = false;
+ if (this.sourceParser != null)
+ this.sourceParser.problemReporter().javadocUnexpectedTag(this.tagSourceStart, this.tagSourceEnd);
+ }
+ }
+ break;
+ case 'v':
+ if (CharOperation.equals(tag, TAG_VALUE) && this.sourceParser != null && this.sourceParser.options.sourceLevel >= ClassFileConstants.JDK1_5) {
+ this.tagValue = TAG_VALUE_VALUE;
+ if (this.inlineTagStarted) {
+ valid = parseReference();
+ } else {
+ valid = false;
+ if (this.sourceParser != null)
+ this.sourceParser.problemReporter().javadocUnexpectedTag(this.tagSourceStart, this.tagSourceEnd);
+ }
+ } else {
+ createTag();
+ }
+ break;
+ }
+ break;
+ case TerminalTokens.TokenNamereturn :
+ this.tagValue = TAG_RETURN_VALUE;
+ valid = parseReturn();
+ /* verify characters after return tag (we're expecting text description)
+ if(!verifyCharsAfterReturnTag(this.index)) {
+ if (this.sourceParser != null) {
+ int end = this.starPosition == -1 || this.lineEnd<this.starPosition ? this.lineEnd : this.starPosition;
+ this.sourceParser.problemReporter().javadocEmptyReturnTag(this.tagSourceStart, end);
+ }
+ }
+ */
+ break;
+ case TerminalTokens.TokenNamethrows :
+ this.tagValue = TAG_THROWS_VALUE;
+ valid = parseThrows();
+ break;
+ }
+ this.textStart = this.index;
+ return valid;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.parser.AbstractCommentParser#parseTagName()
+ */
+ protected void createTag() {
+ this.tagValue = TAG_OTHERS_VALUE;
+ }
+
+ /*
+ * Push a param name in ast node stack.
+ */
+ protected boolean pushParamName() {
+ // Create name reference
+ JavadocSingleNameReference nameRef = new JavadocSingleNameReference(this.scanner.getCurrentIdentifierSource(),
+ this.scanner.getCurrentTokenStartPosition(),
+ this.scanner.getCurrentTokenEndPosition());
+ nameRef.tagSourceStart = this.tagSourceStart;
+ nameRef.tagSourceEnd = this.tagSourceEnd;
+ // Push ref on stack
+ if (this.astLengthPtr == -1) { // First push
+ pushOnAstStack(nameRef, true);
+ } else {
+ // Verify that no @throws has been declared before
+ for (int i=THROWS_TAG_EXPECTED_ORDER; i<=this.astLengthPtr; i+=ORDERED_TAGS_NUMBER) {
+ if (this.astLengthStack[i] != 0) {
+ if (this.sourceParser != null) this.sourceParser.problemReporter().javadocUnexpectedTag(this.tagSourceStart, this.tagSourceEnd);
+ // bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=51600
+ // store invalid param references in specific array
+ if (this.invalidParamReferencesPtr == -1l) {
+ this.invalidParamReferencesStack = new JavadocSingleNameReference[10];
+ }
+ int stackLength = this.invalidParamReferencesStack.length;
+ if (++this.invalidParamReferencesPtr >= stackLength) {
+ System.arraycopy(
+ this.invalidParamReferencesStack, 0,
+ this.invalidParamReferencesStack = new JavadocSingleNameReference[stackLength + AstStackIncrement], 0,
+ stackLength);
+ }
+ this.invalidParamReferencesStack[this.invalidParamReferencesPtr] = nameRef;
+ return false;
+ }
+ }
+ switch (this.astLengthPtr % ORDERED_TAGS_NUMBER) {
+ case PARAM_TAG_EXPECTED_ORDER :
+ // previous push was a @param tag => push another param name
+ pushOnAstStack(nameRef, false);
+ break;
+ case SEE_TAG_EXPECTED_ORDER :
+ // previous push was a @see tag => push new param name
+ pushOnAstStack(nameRef, true);
+ break;
+ default:
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /*
+ * Push a reference statement in ast node stack.
+ */
+ protected boolean pushSeeRef(Object statement) {
+ if (this.astLengthPtr == -1) { // First push
+ pushOnAstStack(null, true);
+ pushOnAstStack(null, true);
+ pushOnAstStack(statement, true);
+ } else {
+ switch (this.astLengthPtr % ORDERED_TAGS_NUMBER) {
+ case PARAM_TAG_EXPECTED_ORDER :
+ // previous push was a @param tag => push empty @throws tag and new @see tag
+ pushOnAstStack(null, true);
+ pushOnAstStack(statement, true);
+ break;
+ case THROWS_TAG_EXPECTED_ORDER :
+ // previous push was a @throws tag => push new @see tag
+ pushOnAstStack(statement, true);
+ break;
+ case SEE_TAG_EXPECTED_ORDER :
+ // previous push was a @see tag => push another @see tag
+ pushOnAstStack(statement, false);
+ break;
+ default:
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.jsdt.internal.compiler.parser.AbstractCommentParser#pushText(int, int)
+ */
+ protected void pushText(int start, int end) {
+ // In case of previous return tag, verify that text make it not empty
+ if (this.currentAstPtr != -2 && this.returnStatement != null) {
+ int position = this.index;
+ this.index = start;
+ boolean empty = true;
+ boolean star = false;
+ char ch = readChar();
+ // Look for first character other than white or '*'
+ if (Character.isWhitespace(ch) || start>(this.tagSourceEnd+1)) {
+ while (this.index <= end && empty) {
+ if (!star) {
+ empty = Character.isWhitespace(ch) || ch == '*';
+ star = ch == '*';
+ } else if (ch != '*') {
+ empty = false;
+ break;
+ }
+ ch = readChar();
+ }
+ }
+ // Store result in previous return tag
+ ((JavadocReturnStatement)this.returnStatement).empty = empty;
+ // Reset position and current ast ptr if we are on a different tag than previous return one
+ this.index = position;
+ if (this.currentAstPtr != this.astPtr) {
+ this.currentAstPtr = -2;
+ }
+ }
+ }
+
+ /*
+ * Push a throws type ref in ast node stack.
+ */
+ protected boolean pushThrowName(Object typeRef) {
+ if (this.astLengthPtr == -1) { // First push
+ pushOnAstStack(null, true);
+ pushOnAstStack(typeRef, true);
+ } else {
+ switch (this.astLengthPtr % ORDERED_TAGS_NUMBER) {
+ case PARAM_TAG_EXPECTED_ORDER :
+ // previous push was a @param tag => push new @throws tag
+ pushOnAstStack(typeRef, true);
+ break;
+ case THROWS_TAG_EXPECTED_ORDER :
+ // previous push was a @throws tag => push another @throws tag
+ pushOnAstStack(typeRef, false);
+ break;
+ case SEE_TAG_EXPECTED_ORDER :
+ // previous push was a @see tag => push empty @param and new @throws tags
+ pushOnAstStack(null, true);
+ pushOnAstStack(typeRef, true);
+ break;
+ default:
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /*
+ * Fill associated comment fields with ast nodes information stored in stack.
+ */
+ protected void updateDocComment() {
+
+ // Set inherited flag
+ this.docComment.inherited = this.inherited;
+
+ // Set return node if present
+ if (this.returnStatement != null) {
+ this.docComment.returnStatement = (JavadocReturnStatement) this.returnStatement;
+ }
+
+ // Copy array of invalid syntax param tags
+ if (this.invalidParamReferencesPtr >= 0) {
+ this.docComment.invalidParameters = new JavadocSingleNameReference[this.invalidParamReferencesPtr+1];
+ System.arraycopy(this.invalidParamReferencesStack, 0, this.docComment.invalidParameters, 0, this.invalidParamReferencesPtr+1);
+ }
+
+ // If no nodes stored return
+ if (this.astLengthPtr == -1) {
+ return;
+ }
+
+ // Initialize arrays
+ int[] sizes = new int[ORDERED_TAGS_NUMBER];
+ for (int i=0; i<=this.astLengthPtr; i++) {
+ sizes[i%ORDERED_TAGS_NUMBER] += this.astLengthStack[i];
+ }
+ this.docComment.references = new Expression[sizes[SEE_TAG_EXPECTED_ORDER]];
+ this.docComment.thrownExceptions = new TypeReference[sizes[THROWS_TAG_EXPECTED_ORDER]];
+ this.docComment.parameters = new JavadocSingleNameReference[sizes[PARAM_TAG_EXPECTED_ORDER]];
+
+ // Store nodes in arrays
+ while (this.astLengthPtr >= 0) {
+ int ptr = this.astLengthPtr % ORDERED_TAGS_NUMBER;
+ // Starting with the stack top, so get references (eg. Expression) coming from @see declarations
+ if (ptr == SEE_TAG_EXPECTED_ORDER) {
+ int size = this.astLengthStack[this.astLengthPtr--];
+ for (int i=0; i<size; i++) {
+ this.docComment.references[--sizes[ptr]] = (Expression) this.astStack[this.astPtr--];
+ }
+ }
+
+ // Then continuing with class names (eg. TypeReference) coming from @throw/@exception declarations
+ else if (ptr == THROWS_TAG_EXPECTED_ORDER) {
+ int size = this.astLengthStack[this.astLengthPtr--];
+ for (int i=0; i<size; i++) {
+ this.docComment.thrownExceptions[--sizes[ptr]] = (TypeReference) this.astStack[this.astPtr--];
+ }
+ }
+
+ // Finally, finishing with parameters nales (ie. Argument) coming from @param declaration
+ else if (ptr == PARAM_TAG_EXPECTED_ORDER) {
+ int size = this.astLengthStack[this.astLengthPtr--];
+ for (int i=0; i<size; i++) {
+ this.docComment.parameters[--sizes[ptr]] = (JavadocSingleNameReference) this.astStack[this.astPtr--];
+ }
+ }
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/NLSLine.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/NLSLine.js
new file mode 100644
index 0000000..a83aff9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/NLSLine.js
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.parser;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.wst.jsdt.internal.compiler.ast.StringLiteral;
+
+public class NLSLine {
+
+ private List elements;
+
+ public NLSLine() {
+ this.elements = new ArrayList();
+ }
+
+ /**
+ * Adds a NLS element to this line.
+ */
+ public void add(StringLiteral element) {
+ this.elements.add(element);
+ }
+
+ /**
+ * returns an Iterator over NLSElements
+ */
+ public Iterator iterator() {
+ return this.elements.iterator();
+ }
+
+ public StringLiteral get(int index) {
+ return (StringLiteral) this.elements.get(index);
+ }
+
+ public void set(int index, StringLiteral literal) {
+ this.elements.set(index, literal);
+ }
+
+ public boolean exists(int index) {
+ return index >= 0 && index < this.elements.size();
+ }
+
+ public int size(){
+ return this.elements.size();
+ }
+
+ public String toString() {
+ StringBuffer result= new StringBuffer();
+ for (Iterator iter= iterator(); iter.hasNext(); ) {
+ result.append("\t"); //$NON-NLS-1$
+ result.append(iter.next().toString());
+ result.append("\n"); //$NON-NLS-1$
+ }
+ return result.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/Parser.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/Parser.js
new file mode 100644
index 0000000..d6d839c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/Parser.js
@@ -0,0 +1,9112 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * Tom Tromey - patch for readTable(String) as described in http://bugs.eclipse.org/bugs/show_bug.cgi?id=32196
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.parser;
+
+import java.io.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.core.compiler.InvalidInputException;
+import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
+import org.eclipse.wst.jsdt.internal.compiler.ast.*;
+import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.wst.jsdt.internal.compiler.env.ICompilationUnit;
+import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.wst.jsdt.internal.compiler.impl.ReferenceContext;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BindingIds;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.CompilerModifiers;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeIds;
+import org.eclipse.wst.jsdt.internal.compiler.parser.diagnose.DiagnoseParser;
+import org.eclipse.wst.jsdt.internal.compiler.problem.AbortCompilation;
+import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemReporter;
+import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemSeverities;
+import org.eclipse.wst.jsdt.internal.compiler.util.Util;
+
+public class Parser implements BindingIds, ParserBasicInformation, TerminalTokens, CompilerModifiers, OperatorIds, TypeIds {
+ protected static final int THIS_CALL = ExplicitConstructorCall.This;
+ protected static final int SUPER_CALL = ExplicitConstructorCall.Super;
+
+ public static char asb[] = null;
+ public static char asr[] = null;
+ //ast stack
+ protected final static int AstStackIncrement = 100;
+ public static char base_action[] = null;
+ public static final int BracketKinds = 3;
+
+ public static short check_table[] = null;
+ public static final int CurlyBracket = 2;
+ // TODO remove once testing is done
+ private static final boolean DEBUG = false;
+ private static final String EOF_TOKEN = "$eof" ; //$NON-NLS-1$
+ private static final String ERROR_TOKEN = "$error" ; //$NON-NLS-1$
+ //expression stack
+ protected final static int ExpressionStackIncrement = 100;
+
+ protected final static int GenericsStackIncrement = 10;
+
+ private final static String FILEPREFIX = "parser"; //$NON-NLS-1$
+ public static char in_symb[] = null;
+ private static final String INVALID_CHARACTER = "Invalid Character" ; //$NON-NLS-1$
+ public static char lhs[] = null;
+
+ public static String name[] = null;
+ public static char nasb[] = null;
+ public static char nasr[] = null;
+ public static char non_terminal_index[] = null;
+ private final static String READABLE_NAMES_FILE = "readableNames"; //$NON-NLS-1$
+ private final static String READABLE_NAMES_FILE_NAME =
+ "org.eclipse.wst.jsdt.internal.compiler.parser." + READABLE_NAMES_FILE; //$NON-NLS-1$
+ public static String readableName[] = null;
+
+ public static byte rhs[] = null;
+
+ public static long rules_compliance[] = null;
+
+ public static final int RoundBracket = 0;
+
+ public static byte scope_la[] = null;
+ public static char scope_lhs[] = null;
+
+ public static char scope_prefix[] = null;
+ public static char scope_rhs[] = null;
+ public static char scope_state[] = null;
+
+ public static char scope_state_set[] = null;
+ public static char scope_suffix[] = null;
+ public static final int SquareBracket = 1;
+
+ //internal data for the automat
+ protected final static int StackIncrement = 255;
+
+ public static char term_action[] = null;
+ public static byte term_check[] = null;
+
+ public static char terminal_index[] = null;
+
+ private static final String UNEXPECTED_EOF = "Unexpected End Of File" ; //$NON-NLS-1$
+ public static boolean VERBOSE_RECOVERY = false;
+
+
+
+ protected int astLengthPtr;
+ protected int[] astLengthStack;
+ protected int astPtr;
+ protected ASTNode[] astStack = new ASTNode[AstStackIncrement];
+ public CompilationUnitDeclaration compilationUnit; /*the result from parse()*/
+ protected RecoveredElement currentElement;
+ public int currentToken;
+ protected boolean diet = false; //tells the scanner to jump over some parts of the code/expressions like method bodies
+ protected int dietInt = 0; // if > 0 force the none-diet-parsing mode (even if diet if requested) [field parsing with anonymous inner classes...]
+ protected int endPosition; //accurate only when used ! (the start position is pushed into intStack while the end the current one)
+ protected int endStatementPosition;
+ protected int expressionLengthPtr;
+ protected int[] expressionLengthStack;
+ protected int expressionPtr;
+ protected Expression[] expressionStack = new Expression[ExpressionStackIncrement];
+ public int firstToken ; // handle for multiple parsing goals
+
+ // generics management
+ protected int genericsIdentifiersLengthPtr;
+ protected int[] genericsIdentifiersLengthStack = new int[GenericsStackIncrement];
+ protected int genericsLengthPtr;
+ protected int[] genericsLengthStack = new int[GenericsStackIncrement];
+ protected int genericsPtr;
+ protected ASTNode[] genericsStack = new ASTNode[GenericsStackIncrement];
+
+ protected boolean hasError;
+ protected boolean hasReportedError;
+
+ //identifiers stacks
+ protected int identifierLengthPtr;
+ protected int[] identifierLengthStack;
+ protected long[] identifierPositionStack;
+ protected int identifierPtr;
+ protected char[][] identifierStack;
+
+ protected boolean ignoreNextOpeningBrace;
+ //positions , dimensions , .... (int stacks)
+ protected int intPtr;
+ protected int[] intStack;
+ public int lastAct ; //handle for multiple parsing goals
+
+ //error recovery management
+ protected int lastCheckPoint;
+ protected int lastErrorEndPosition;
+ protected int lastErrorEndPositionBeforeRecovery = -1;
+ protected int lastIgnoredToken, nextIgnoredToken;
+ protected int listLength; // for recovering some incomplete list (interfaces, throws or parameters)
+ protected int listTypeParameterLength; // for recovering some incomplete list (type parameters)
+ protected int lParenPos,rParenPos; //accurate only when used !
+ protected int modifiers;
+ protected int modifiersSourceStart;
+ protected int[] nestedMethod; //the ptr is nestedType
+ protected int nestedType, dimensions;
+ ASTNode [] noAstNodes = new ASTNode[AstStackIncrement];
+ Expression [] noExpressions = new Expression[ExpressionStackIncrement];
+ //modifiers dimensions nestedType etc.......
+ protected boolean optimizeStringLiterals =true;
+ protected CompilerOptions options;
+ protected ProblemReporter problemReporter;
+ protected int rBraceStart, rBraceEnd, rBraceSuccessorStart; //accurate only when used !
+ protected int realBlockPtr;
+ protected int[] realBlockStack;
+ protected int recoveredStaticInitializerStart;
+ public ReferenceContext referenceContext;
+ public boolean reportOnlyOneSyntaxError = false;
+ public boolean reportSyntaxErrorIsRequired = true;
+ protected boolean restartRecovery;
+ //scanner token
+ public Scanner scanner;
+ protected int[] stack = new int[StackIncrement];
+ protected int stateStackTop;
+ protected int synchronizedBlockSourceStart;
+ protected int[] variablesCounter;
+
+ public Javadoc javadoc;
+ public JavadocParser javadocParser;
+ static {
+ try{
+ initTables();
+ } catch(java.io.IOException ex){
+ throw new ExceptionInInitializerError(ex.getMessage());
+ }
+ }
+public static int asi(int state) {
+
+ return asb[original_state(state)];
+}
+public final static short base_check(int i) {
+ return check_table[i - (NUM_RULES + 1)];
+}
+private final static void buildFile(String filename, List listToDump) throws java.io.IOException {
+ BufferedWriter writer = new BufferedWriter(new FileWriter(filename));
+ for (Iterator iterator = listToDump.iterator(); iterator.hasNext(); ) {
+ writer.write(String.valueOf(iterator.next()));
+ }
+ writer.flush();
+ writer.close();
+ System.out.println(filename + " creation complete"); //$NON-NLS-1$
+}
+private final static String[] buildFileForName(String filename, String contents) throws java.io.IOException {
+ String[] result = new String[contents.length()];
+ result[0] = null;
+ int resultCount = 1;
+
+ StringBuffer buffer = new StringBuffer();
+
+ int start = contents.indexOf("name[]"); //$NON-NLS-1$
+ start = contents.indexOf('\"', start);
+ int end = contents.indexOf("};", start); //$NON-NLS-1$
+
+ contents = contents.substring(start, end);
+
+ boolean addLineSeparator = false;
+ int tokenStart = -1;
+ StringBuffer currentToken = new StringBuffer();
+ for (int i = 0; i < contents.length(); i++) {
+ char c = contents.charAt(i);
+ if(c == '\"') {
+ if(tokenStart == -1) {
+ tokenStart = i + 1;
+ } else {
+ if(addLineSeparator) {
+ buffer.append('\n');
+ result[resultCount++] = currentToken.toString();
+ currentToken = new StringBuffer();
+ }
+ String token = contents.substring(tokenStart, i);
+ if(token.equals(ERROR_TOKEN)){
+ token = INVALID_CHARACTER;
+ } else if(token.equals(EOF_TOKEN)) {
+ token = UNEXPECTED_EOF;
+ }
+ buffer.append(token);
+ currentToken.append(token);
+ addLineSeparator = true;
+ tokenStart = -1;
+ }
+ }
+ if(tokenStart == -1 && c == '+'){
+ addLineSeparator = false;
+ }
+ }
+ if(currentToken.length() > 0) {
+ result[resultCount++] = currentToken.toString();
+ }
+
+ buildFileForTable(filename, buffer.toString().toCharArray());
+
+ System.arraycopy(result, 0, result = new String[resultCount], 0, resultCount);
+ return result;
+}
+private static void buildFileForReadableName(
+ String file,
+ char[] newLhs,
+ char[] newNonTerminalIndex,
+ String[] newName,
+ String[] tokens) throws java.io.IOException {
+
+ ArrayList entries = new ArrayList();
+
+ boolean[] alreadyAdded = new boolean[newName.length];
+
+ for (int i = 0; i < tokens.length; i = i + 3) {
+ if("1".equals(tokens[i])) { //$NON-NLS-1$
+ int index = newNonTerminalIndex[newLhs[Integer.parseInt(tokens[i + 1])]];
+ StringBuffer buffer = new StringBuffer();
+ if(!alreadyAdded[index]) {
+ alreadyAdded[index] = true;
+ buffer.append(newName[index]);
+ buffer.append('=');
+ buffer.append(tokens[i+2].trim());
+ buffer.append('\n');
+ entries.add(String.valueOf(buffer));
+ }
+ }
+ }
+ int i = 1;
+ while(!INVALID_CHARACTER.equals(newName[i])) i++;
+ i++;
+ for (; i < alreadyAdded.length; i++) {
+ if(!alreadyAdded[i]) {
+ System.out.println(newName[i] + " has no readable name"); //$NON-NLS-1$
+ }
+ }
+ Collections.sort(entries);
+ buildFile(file, entries);
+}
+private static void buildFileForCompliance(
+ String file,
+ int length,
+ String[] tokens) throws java.io.IOException {
+
+ byte[] result = new byte[length * 8];
+
+ for (int i = 0; i < tokens.length; i = i + 3) {
+ if("2".equals(tokens[i])) { //$NON-NLS-1$
+ int index = Integer.parseInt(tokens[i + 1]);
+ String token = tokens[i + 2].trim();
+ long compliance = 0;
+ if("1.4".equals(token)) { //$NON-NLS-1$
+ compliance = ClassFileConstants.JDK1_4;
+ } else if("1.5".equals(token)) { //$NON-NLS-1$
+ compliance = ClassFileConstants.JDK1_5;
+ } else if("recovery".equals(token)) { //$NON-NLS-1$
+ compliance = ClassFileConstants.JDK_DEFERRED;
+ }
+
+ int j = index * 8;
+ result[j] = (byte)(compliance >>> 56);
+ result[j + 1] = (byte)(compliance >>> 48);
+ result[j + 2] = (byte)(compliance >>> 40);
+ result[j + 3] = (byte)(compliance >>> 32);
+ result[j + 4] = (byte)(compliance >>> 24);
+ result[j + 5] = (byte)(compliance >>> 16);
+ result[j + 6] = (byte)(compliance >>> 8);
+ result[j + 7] = (byte)(compliance);
+ }
+ }
+
+ buildFileForTable(file, result); //$NON-NLS-1$
+ }
+private final static void buildFileForTable(String filename, byte[] bytes) throws java.io.IOException {
+ java.io.FileOutputStream stream = new java.io.FileOutputStream(filename);
+ stream.write(bytes);
+ stream.close();
+ System.out.println(filename + " creation complete"); //$NON-NLS-1$
+}
+private final static void buildFileForTable(String filename, char[] chars) throws java.io.IOException {
+
+ byte[] bytes = new byte[chars.length * 2];
+ for (int i = 0; i < chars.length; i++) {
+ bytes[2 * i] = (byte) (chars[i] >>> 8);
+ bytes[2 * i + 1] = (byte) (chars[i] & 0xFF);
+ }
+
+ java.io.FileOutputStream stream = new java.io.FileOutputStream(filename);
+ stream.write(bytes);
+ stream.close();
+ System.out.println(filename + " creation complete"); //$NON-NLS-1$
+}
+private final static byte[] buildFileOfByteFor(String filename, String tag, String[] tokens) throws java.io.IOException {
+
+ //transform the String tokens into chars before dumping then into file
+
+ int i = 0;
+ //read upto the tag
+ while (!tokens[i++].equals(tag)){/*empty*/}
+ //read upto the }
+
+ byte[] bytes = new byte[tokens.length]; //can't be bigger
+ int ic = 0;
+ String token;
+ while (!(token = tokens[i++]).equals("}")) { //$NON-NLS-1$
+ int c = Integer.parseInt(token);
+ bytes[ic++] = (byte) c;
+ }
+
+ //resize
+ System.arraycopy(bytes, 0, bytes = new byte[ic], 0, ic);
+
+ buildFileForTable(filename, bytes);
+ return bytes;
+}
+private final static char[] buildFileOfIntFor(String filename, String tag, String[] tokens) throws java.io.IOException {
+
+ //transform the String tokens into chars before dumping then into file
+
+ int i = 0;
+ //read upto the tag
+ while (!tokens[i++].equals(tag)){/*empty*/}
+ //read upto the }
+
+ char[] chars = new char[tokens.length]; //can't be bigger
+ int ic = 0;
+ String token;
+ while (!(token = tokens[i++]).equals("}")) { //$NON-NLS-1$
+ int c = Integer.parseInt(token);
+ chars[ic++] = (char) c;
+ }
+
+ //resize
+ System.arraycopy(chars, 0, chars = new char[ic], 0, ic);
+
+ buildFileForTable(filename, chars);
+ return chars;
+}
+private final static void buildFileOfShortFor(String filename, String tag, String[] tokens) throws java.io.IOException {
+
+ //transform the String tokens into chars before dumping then into file
+
+ int i = 0;
+ //read upto the tag
+ while (!tokens[i++].equals(tag)){/*empty*/}
+ //read upto the }
+
+ char[] chars = new char[tokens.length]; //can't be bigger
+ int ic = 0;
+ String token;
+ while (!(token = tokens[i++]).equals("}")) { //$NON-NLS-1$
+ int c = Integer.parseInt(token);
+ chars[ic++] = (char) (c + 32768);
+ }
+
+ //resize
+ System.arraycopy(chars, 0, chars = new char[ic], 0, ic);
+
+ buildFileForTable(filename, chars);
+}
+public final static void buildFilesFromLPG(String dataFilename, String dataFilename2) throws java.io.IOException {
+
+ //RUN THIS METHOD TO GENERATE PARSER*.RSC FILES
+
+ //build from the lpg javadcl.java files that represents the parser tables
+ //lhs check_table asb asr symbol_index
+
+ //[org.eclipse.wst.jsdt.internal.compiler.parser.Parser.buildFilesFromLPG("d:/leapfrog/grammar/javadcl.java")]
+ char[] contents = new char[] {};
+ try {
+ contents = Util.getFileCharContent(new File(dataFilename), null);
+ } catch (IOException ex) {
+ System.out.println(Util.bind("parser.incorrectPath")); //$NON-NLS-1$
+ return;
+ }
+ java.util.StringTokenizer st =
+ new java.util.StringTokenizer(new String(contents), " \t\n\r[]={,;"); //$NON-NLS-1$
+ String[] tokens = new String[st.countTokens()];
+ int j = 0;
+ while (st.hasMoreTokens()) {
+ tokens[j++] = st.nextToken();
+ }
+ final String prefix = FILEPREFIX;
+ int i = 0;
+
+ char[] newLhs = buildFileOfIntFor(prefix + (++i) + ".rsc", "lhs", tokens); //$NON-NLS-1$ //$NON-NLS-2$
+ buildFileOfShortFor(prefix + (++i) + ".rsc", "check_table", tokens); //$NON-NLS-2$ //$NON-NLS-1$
+ buildFileOfIntFor(prefix + (++i) + ".rsc", "asb", tokens); //$NON-NLS-2$ //$NON-NLS-1$
+ buildFileOfIntFor(prefix + (++i) + ".rsc", "asr", tokens); //$NON-NLS-2$ //$NON-NLS-1$
+ buildFileOfIntFor(prefix + (++i) + ".rsc", "nasb", tokens); //$NON-NLS-2$ //$NON-NLS-1$
+ buildFileOfIntFor(prefix + (++i) + ".rsc", "nasr", tokens); //$NON-NLS-2$ //$NON-NLS-1$
+ buildFileOfIntFor(prefix + (++i) + ".rsc", "terminal_index", tokens); //$NON-NLS-2$ //$NON-NLS-1$
+ char[] newNonTerminalIndex = buildFileOfIntFor(prefix + (++i) + ".rsc", "non_terminal_index", tokens); //$NON-NLS-1$ //$NON-NLS-2$
+ buildFileOfIntFor(prefix + (++i) + ".rsc", "term_action", tokens); //$NON-NLS-2$ //$NON-NLS-1$
+
+ buildFileOfIntFor(prefix + (++i) + ".rsc", "scope_prefix", tokens); //$NON-NLS-2$ //$NON-NLS-1$
+ buildFileOfIntFor(prefix + (++i) + ".rsc", "scope_suffix", tokens); //$NON-NLS-2$ //$NON-NLS-1$
+ buildFileOfIntFor(prefix + (++i) + ".rsc", "scope_lhs", tokens); //$NON-NLS-2$ //$NON-NLS-1$
+ buildFileOfIntFor(prefix + (++i) + ".rsc", "scope_state_set", tokens); //$NON-NLS-2$ //$NON-NLS-1$
+ buildFileOfIntFor(prefix + (++i) + ".rsc", "scope_rhs", tokens); //$NON-NLS-2$ //$NON-NLS-1$
+ buildFileOfIntFor(prefix + (++i) + ".rsc", "scope_state", tokens); //$NON-NLS-2$ //$NON-NLS-1$
+ buildFileOfIntFor(prefix + (++i) + ".rsc", "in_symb", tokens); //$NON-NLS-2$ //$NON-NLS-1$
+
+ byte[] newRhs = buildFileOfByteFor(prefix + (++i) + ".rsc", "rhs", tokens); //$NON-NLS-2$ //$NON-NLS-1$
+ buildFileOfByteFor(prefix + (++i) + ".rsc", "term_check", tokens); //$NON-NLS-2$ //$NON-NLS-1$
+ buildFileOfByteFor(prefix + (++i) + ".rsc", "scope_la", tokens); //$NON-NLS-2$ //$NON-NLS-1$
+
+ String[] newName = buildFileForName(prefix + (++i) + ".rsc", new String(contents)); //$NON-NLS-1$
+
+ contents = new char[] {};
+ try {
+ contents = Util.getFileCharContent(new File(dataFilename2), null);
+ } catch (IOException ex) {
+ System.out.println(Util.bind("parser.incorrectPath")); //$NON-NLS-1$
+ return;
+ }
+ st = new java.util.StringTokenizer(new String(contents), "\t\n\r=#"); //$NON-NLS-1$
+ tokens = new String[st.countTokens()];
+ j = 0;
+ while (st.hasMoreTokens()) {
+ tokens[j++] = st.nextToken();
+ }
+
+ buildFileForCompliance(prefix + (++i) + ".rsc", newRhs.length, tokens);//$NON-NLS-1$
+ buildFileForReadableName(READABLE_NAMES_FILE+".properties", newLhs, newNonTerminalIndex, newName, tokens);//$NON-NLS-1$
+
+ System.out.println(Util.bind("parser.moveFiles")); //$NON-NLS-1$
+}
+public static int in_symbol(int state) {
+ return in_symb[original_state(state)];
+}
+public final static void initTables() throws java.io.IOException {
+
+ final String prefix = FILEPREFIX;
+ int i = 0;
+ lhs = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
+ char[] chars = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
+ check_table = new short[chars.length];
+ for (int c = chars.length; c-- > 0;) {
+ check_table[c] = (short) (chars[c] - 32768);
+ }
+ asb = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
+ asr = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
+ nasb = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
+ nasr = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
+ terminal_index = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
+ non_terminal_index = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
+ term_action = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
+
+ scope_prefix = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
+ scope_suffix = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
+ scope_lhs = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
+ scope_state_set = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
+ scope_rhs = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
+ scope_state = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
+ in_symb = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
+
+ rhs = readByteTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
+ term_check = readByteTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
+ scope_la = readByteTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
+
+ name = readNameTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
+
+ rules_compliance = readLongTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
+
+ readableName = readReadableNameTable(READABLE_NAMES_FILE_NAME);
+
+ base_action = lhs;
+}
+public static int nasi(int state) {
+ return nasb[original_state(state)];
+}
+public static int ntAction(int state, int sym) {
+ return base_action[state + sym];
+}
+protected static int original_state(int state) {
+ return -base_check(state);
+}
+protected static byte[] readByteTable(String filename) throws java.io.IOException {
+
+ //files are located at Parser.class directory
+
+ InputStream stream = Parser.class.getResourceAsStream(filename);
+ if (stream == null) {
+ throw new java.io.IOException(Util.bind("parser.missingFile",filename)); //$NON-NLS-1$
+ }
+ byte[] bytes = null;
+ try {
+ stream = new BufferedInputStream(stream);
+ bytes = Util.getInputStreamAsByteArray(stream, -1);
+ } finally {
+ try {
+ stream.close();
+ } catch (IOException e) {
+ // ignore
+ }
+ }
+ return bytes;
+}
+
+protected static String[] readNameTable(String filename) throws java.io.IOException {
+ char[] contents = readTable(filename);
+ char[][] nameAsChar = CharOperation.splitOn('\n', contents);
+
+ String[] result = new String[nameAsChar.length + 1];
+ result[0] = null;
+ for (int i = 0; i < nameAsChar.length; i++) {
+ result[i + 1] = new String(nameAsChar[i]);
+ }
+
+ return result;
+}
+protected static String[] readReadableNameTable(String filename) {
+ String[] result = new String[name.length];
+
+ ResourceBundle bundle;
+ try {
+ bundle = ResourceBundle.getBundle(filename, Locale.getDefault());
+ } catch(MissingResourceException e) {
+ System.out.println("Missing resource : " + filename.replace('.', '/') + ".properties for locale " + Locale.getDefault()); //$NON-NLS-1$//$NON-NLS-2$
+ throw e;
+ }
+ for (int i = 0; i < NT_OFFSET + 1; i++) {
+ result[i] = name[i];
+ }
+ for (int i = NT_OFFSET; i < name.length; i++) {
+ try {
+ String n = bundle.getString(name[i]);
+ if(n != null && n.length() > 0) {
+ result[i] = n;
+ } else {
+ result[i] = name[i];
+ }
+ } catch(MissingResourceException e) {
+ result[i] = name[i];
+ }
+ }
+ return result;
+}
+protected static char[] readTable(String filename) throws java.io.IOException {
+
+ //files are located at Parser.class directory
+
+ InputStream stream = Parser.class.getResourceAsStream(filename);
+ if (stream == null) {
+ throw new java.io.IOException(Util.bind("parser.missingFile",filename)); //$NON-NLS-1$
+ }
+ byte[] bytes = null;
+ try {
+ stream = new BufferedInputStream(stream);
+ bytes = Util.getInputStreamAsByteArray(stream, -1);
+ } finally {
+ try {
+ stream.close();
+ } catch (IOException e) {
+ // ignore
+ }
+ }
+
+ //minimal integrity check (even size expected)
+ int length = bytes.length;
+ if (length % 2 != 0)
+ throw new java.io.IOException(Util.bind("parser.corruptedFile",filename)); //$NON-NLS-1$
+
+ // convert bytes into chars
+ char[] chars = new char[length / 2];
+ int i = 0;
+ int charIndex = 0;
+
+ while (true) {
+ chars[charIndex++] = (char) (((bytes[i++] & 0xFF) << 8) + (bytes[i++] & 0xFF));
+ if (i == length)
+ break;
+ }
+ return chars;
+}
+protected static long[] readLongTable(String filename) throws java.io.IOException {
+
+ //files are located at Parser.class directory
+
+ InputStream stream = Parser.class.getResourceAsStream(filename);
+ if (stream == null) {
+ throw new java.io.IOException(Util.bind("parser.missingFile",filename)); //$NON-NLS-1$
+ }
+ byte[] bytes = null;
+ try {
+ stream = new BufferedInputStream(stream);
+ bytes = Util.getInputStreamAsByteArray(stream, -1);
+ } finally {
+ try {
+ stream.close();
+ } catch (IOException e) {
+ // ignore
+ }
+ }
+
+ //minimal integrity check (even size expected)
+ int length = bytes.length;
+ if (length % 8 != 0)
+ throw new java.io.IOException(Util.bind("parser.corruptedFile",filename)); //$NON-NLS-1$
+
+ // convert bytes into longs
+ long[] longs = new long[length / 8];
+ int i = 0;
+ int longIndex = 0;
+
+ while (true) {
+ longs[longIndex++] =
+ (((long) (bytes[i++] & 0xFF)) << 56)
+ + (((long) (bytes[i++] & 0xFF)) << 48)
+ + (((long) (bytes[i++] & 0xFF)) << 40)
+ + (((long) (bytes[i++] & 0xFF)) << 32)
+ + (((long) (bytes[i++] & 0xFF)) << 24)
+ + (((long) (bytes[i++] & 0xFF)) << 16)
+ + (((long) (bytes[i++] & 0xFF)) << 8)
+ + (bytes[i++] & 0xFF);
+
+ if (i == length)
+ break;
+ }
+ return longs;
+}
+public static int tAction(int state, int sym) {
+ return term_action[term_check[base_action[state]+sym] == sym ? base_action[state] + sym : base_action[state]];
+}
+
+public Parser(ProblemReporter problemReporter, boolean optimizeStringLiterals) {
+
+ this.problemReporter = problemReporter;
+ this.options = problemReporter.options;
+ this.optimizeStringLiterals = optimizeStringLiterals;
+ this.initializeScanner();
+ this.astLengthStack = new int[50];
+ this.expressionLengthStack = new int[30];
+ this.intStack = new int[50];
+ this.identifierStack = new char[30][];
+ this.identifierLengthStack = new int[30];
+ this.nestedMethod = new int[30];
+ this.realBlockStack = new int[30];
+ this.identifierPositionStack = new long[30];
+ this.variablesCounter = new int[30];
+
+ // javadoc support
+ this.javadocParser = new JavadocParser(this);
+}
+/**
+ *
+ * INTERNAL USE-ONLY
+ */
+protected void adjustInterfaceModifiers() {
+ this.intStack[this.intPtr - 1] |= AccInterface;
+}
+public void arrayInitializer(int length) {
+ //length is the size of the array Initializer
+ //expressionPtr points on the last elt of the arrayInitializer,
+ // in other words, it has not been decremented yet.
+
+ ArrayInitializer ai = new ArrayInitializer();
+ if (length != 0) {
+ this.expressionPtr -= length;
+ System.arraycopy(this.expressionStack, this.expressionPtr + 1, ai.expressions = new Expression[length], 0, length);
+ }
+ pushOnExpressionStack(ai);
+ //positionning
+ ai.sourceEnd = this.endStatementPosition;
+ ai.sourceStart = this.intStack[this.intPtr--];
+}
+protected void blockReal() {
+ // See consumeLocalVariableDeclarationStatement in case of change: duplicated code
+ // increment the amount of declared variables for this block
+ this.realBlockStack[this.realBlockPtr]++;
+}
+/*
+ * Build initial recovery state.
+ * Recovery state is inferred from the current state of the parser (reduced node stack).
+ */
+public RecoveredElement buildInitialRecoveryState(){
+
+ /* initialize recovery by retrieving available reduced nodes
+ * also rebuild bracket balance
+ */
+ this.lastCheckPoint = 0;
+ this.lastErrorEndPositionBeforeRecovery = this.scanner.currentPosition;
+
+ RecoveredElement element = null;
+ if (this.referenceContext instanceof CompilationUnitDeclaration){
+ element = new RecoveredUnit(this.compilationUnit, 0, this);
+
+ /* ignore current stack state, since restarting from the beginnning
+ since could not trust simple brace count */
+ if (true){ // experimenting restart recovery from scratch
+ this.compilationUnit.currentPackage = null;
+ this.compilationUnit.imports = null;
+ this.compilationUnit.types = null;
+ this.currentToken = 0;
+ this.listLength = 0;
+ this.listTypeParameterLength = 0;
+ this.endPosition = 0;
+ this.endStatementPosition = 0;
+ return element;
+ }
+ if (this.compilationUnit.currentPackage != null){
+ this.lastCheckPoint = this.compilationUnit.currentPackage.declarationSourceEnd+1;
+ }
+ if (this.compilationUnit.imports != null){
+ this.lastCheckPoint = this.compilationUnit.imports[this.compilationUnit.imports.length -1].declarationSourceEnd+1;
+ }
+ } else {
+ if (this.referenceContext instanceof AbstractMethodDeclaration){
+ element = new RecoveredMethod((AbstractMethodDeclaration) this.referenceContext, null, 0, this);
+ this.lastCheckPoint = ((AbstractMethodDeclaration) this.referenceContext).bodyStart;
+ } else {
+ /* Initializer bodies are parsed in the context of the type declaration, we must thus search it inside */
+ if (this.referenceContext instanceof TypeDeclaration){
+ TypeDeclaration type = (TypeDeclaration) this.referenceContext;
+ for (int i = 0; i < type.fields.length; i++){
+ FieldDeclaration field = type.fields[i];
+ if (field != null
+ && !field.isField()
+ && field.declarationSourceStart <= this.scanner.initialPosition
+ && this.scanner.initialPosition <= field.declarationSourceEnd
+ && this.scanner.eofPosition <= field.declarationSourceEnd+1){
+ element = new RecoveredInitializer(field, null, 1, this);
+ this.lastCheckPoint = field.declarationSourceStart;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ if (element == null) return element;
+
+ for(int i = 0; i <= this.astPtr; i++){
+ ASTNode node = this.astStack[i];
+ if (node instanceof AbstractMethodDeclaration){
+ AbstractMethodDeclaration method = (AbstractMethodDeclaration) node;
+ if (method.declarationSourceEnd == 0){
+ element = element.add(method, 0);
+ this.lastCheckPoint = method.bodyStart;
+ } else {
+ element = element.add(method, 0);
+ this.lastCheckPoint = method.declarationSourceEnd + 1;
+ }
+ continue;
+ }
+ if (node instanceof Initializer){
+ Initializer initializer = (Initializer) node;
+ if (initializer.declarationSourceEnd == 0){
+ element = element.add(initializer, 1);
+ this.lastCheckPoint = initializer.sourceStart;
+ } else {
+ element = element.add(initializer, 0);
+ this.lastCheckPoint = initializer.declarationSourceEnd + 1;
+ }
+ continue;
+ }
+ if (node instanceof FieldDeclaration){
+ FieldDeclaration field = (FieldDeclaration) node;
+ if (field.declarationSourceEnd == 0){
+ element = element.add(field, 0);
+ if (field.initialization == null){
+ this.lastCheckPoint = field.sourceEnd + 1;
+ } else {
+ this.lastCheckPoint = field.initialization.sourceEnd + 1;
+ }
+ } else {
+ element = element.add(field, 0);
+ this.lastCheckPoint = field.declarationSourceEnd + 1;
+ }
+ continue;
+ }
+ if (node instanceof TypeDeclaration){
+ TypeDeclaration type = (TypeDeclaration) node;
+ if (type.declarationSourceEnd == 0){
+ element = element.add(type, 0);
+ this.lastCheckPoint = type.bodyStart;
+ } else {
+ element = element.add(type, 0);
+ this.lastCheckPoint = type.declarationSourceEnd + 1;
+ }
+ continue;
+ }
+ if (node instanceof ImportReference){
+ ImportReference importRef = (ImportReference) node;
+ element = element.add(importRef, 0);
+ this.lastCheckPoint = importRef.declarationSourceEnd + 1;
+ }
+ }
+ return element;
+}
+
+protected void checkAndSetModifiers(int flag){
+ /*modify the current modifiers buffer.
+ When the startPosition of the modifiers is 0
+ it means that the modifier being parsed is the first
+ of a list of several modifiers. The startPosition
+ is zeroed when a copy of modifiers-buffer is push
+ onto the this.astStack. */
+
+ if ((this.modifiers & flag) != 0){ // duplicate modifier
+ this.modifiers |= AccAlternateModifierProblem;
+ }
+ this.modifiers |= flag;
+
+ if (this.modifiersSourceStart < 0) this.modifiersSourceStart = this.scanner.startPosition;
+}
+public void checkComment() {
+
+ if (this.currentElement != null && this.scanner.commentPtr >= 0) {
+ flushCommentsDefinedPriorTo(this.endStatementPosition); // discard obsolete comments during recovery
+ }
+
+ int lastComment = this.scanner.commentPtr;
+
+ if (this.modifiersSourceStart >= 0) {
+ // eliminate comments located after modifierSourceStart if positionned
+ while (lastComment >= 0 && this.scanner.commentStarts[lastComment] > this.modifiersSourceStart) lastComment--;
+ }
+ if (lastComment >= 0) {
+ // consider all remaining leading comments to be part of current declaration
+ this.modifiersSourceStart = this.scanner.commentStarts[0];
+
+ // check deprecation in last comment if javadoc (can be followed by non-javadoc comments which are simply ignored)
+ while (lastComment >= 0 && this.scanner.commentStops[lastComment] < 0) lastComment--; // non javadoc comment have negative end positions
+ if (lastComment >= 0 && this.javadocParser != null) {
+ if (this.javadocParser.checkDeprecation(
+ this.scanner.commentStarts[lastComment],
+ this.scanner.commentStops[lastComment] - 1)) { //stop is one over,
+ checkAndSetModifiers(AccDeprecated);
+ }
+ this.javadoc = this.javadocParser.docComment; // null if check javadoc is not activated
+ }
+ }
+}
+protected void checkNonExternalizedStringLiteral() {
+ if (this.scanner.wasNonExternalizedStringLiteral) {
+ StringLiteral[] literals = this.scanner.nonNLSStrings;
+ // could not reproduce, but this is the only NPE
+ // added preventive null check see PR 9035
+ if (literals != null) {
+ for (int i = 0, max = literals.length; i < max; i++) {
+ problemReporter().nonExternalizedStringLiteral(literals[i]);
+ }
+ }
+ this.scanner.wasNonExternalizedStringLiteral = false;
+ }
+}
+protected void checkNonNLSAfterBodyEnd(int declarationEnd){
+ if(this.scanner.currentPosition - 1 <= declarationEnd) {
+ this.scanner.eofPosition = declarationEnd < Integer.MAX_VALUE ? declarationEnd + 1 : declarationEnd;
+ try {
+ while(this.scanner.getNextToken() != TokenNameEOF){/*empty*/}
+ checkNonExternalizedStringLiteral();
+ } catch (InvalidInputException e) {
+ // Nothing to do
+ }
+ }
+}
+protected void classInstanceCreation(boolean alwaysQualified) {
+ // ClassInstanceCreationExpression ::= 'new' ClassType '(' ArgumentListopt ')' ClassBodyopt
+
+ // ClassBodyopt produces a null item on the astStak if it produces NO class body
+ // An empty class body produces a 0 on the length stack.....
+
+ AllocationExpression alloc;
+ int length;
+ if (((length = this.astLengthStack[this.astLengthPtr--]) == 1)
+ && (this.astStack[this.astPtr] == null)) {
+ //NO ClassBody
+ this.astPtr--;
+ if (alwaysQualified) {
+ alloc = new QualifiedAllocationExpression();
+ } else {
+ alloc = new AllocationExpression();
+ }
+ alloc.sourceEnd = this.endPosition; //the position has been stored explicitly
+
+ if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+ this.expressionPtr -= length;
+ System.arraycopy(
+ this.expressionStack,
+ this.expressionPtr + 1,
+ alloc.arguments = new Expression[length],
+ 0,
+ length);
+ }
+ alloc.type = getTypeReference(0);
+
+ //the default constructor with the correct number of argument
+ //will be created and added by the TC (see createsInternalConstructorWithBinding)
+ alloc.sourceStart = this.intStack[this.intPtr--];
+ pushOnExpressionStack(alloc);
+ } else {
+ dispatchDeclarationInto(length);
+ TypeDeclaration anonymousTypeDeclaration = (TypeDeclaration)this.astStack[this.astPtr];
+ anonymousTypeDeclaration.declarationSourceEnd = this.endStatementPosition;
+ anonymousTypeDeclaration.bodyEnd = this.endStatementPosition;
+ if (anonymousTypeDeclaration.allocation != null) {
+ anonymousTypeDeclaration.allocation.sourceEnd = this.endStatementPosition;
+ }
+ if (length == 0 && !containsComment(anonymousTypeDeclaration.bodyStart, anonymousTypeDeclaration.bodyEnd)) {
+ anonymousTypeDeclaration.bits |= ASTNode.UndocumentedEmptyBlockMASK;
+ }
+ this.astPtr--;
+ this.astLengthPtr--;
+
+ // mark initializers with local type mark if needed
+ markInitializersWithLocalType(anonymousTypeDeclaration);
+ }
+}
+protected void concatExpressionLists() {
+ this.expressionLengthStack[--this.expressionLengthPtr]++;
+}
+protected void concatGenericsLists() {
+ this.genericsLengthStack[this.genericsLengthPtr - 1] += this.genericsLengthStack[this.genericsLengthPtr--];
+}
+protected void concatNodeLists() {
+ /*
+ * This is a case where you have two sublists into the this.astStack that you want
+ * to merge in one list. There is no action required on the this.astStack. The only
+ * thing you need to do is merge the two lengths specified on the astStackLength.
+ * The top two length are for example:
+ * ... p n
+ * and you want to result in a list like:
+ * ... n+p
+ * This means that the p could be equals to 0 in case there is no astNode pushed
+ * on the this.astStack.
+ * Look at the InterfaceMemberDeclarations for an example.
+ */
+
+ this.astLengthStack[this.astLengthPtr - 1] += this.astLengthStack[this.astLengthPtr--];
+}
+protected void consumeAdditionalBound() {
+ pushOnGenericsStack(getTypeReference(this.intStack[this.intPtr--]));
+}
+protected void consumeAdditionalBound1() {
+ // nothing to be done.
+ // The reference type1 is consumed by consumeReferenceType1 method.
+}
+protected void consumeAdditionalBoundList() {
+ concatGenericsLists();
+}
+protected void consumeAdditionalBoundList1() {
+ concatGenericsLists();
+}
+protected void consumeAllocationHeader() {
+ // ClassInstanceCreationExpression ::= 'new' ClassType '(' ArgumentListopt ')' ClassBodyopt
+
+ // ClassBodyopt produces a null item on the astStak if it produces NO class body
+ // An empty class body produces a 0 on the length stack.....
+
+ if (this.currentElement == null){
+ return; // should never occur, this consumeRule is only used in recovery mode
+ }
+ if (this.currentToken == TokenNameLBRACE){
+ // beginning of an anonymous type
+ TypeDeclaration anonymousType = new TypeDeclaration(this.compilationUnit.compilationResult);
+ anonymousType.name = TypeDeclaration.ANONYMOUS_EMPTY_NAME;
+ anonymousType.bits |= ASTNode.AnonymousAndLocalMask;
+ anonymousType.sourceStart = this.intStack[this.intPtr--];
+ anonymousType.sourceEnd = this.rParenPos; // closing parenthesis
+ QualifiedAllocationExpression alloc = new QualifiedAllocationExpression(anonymousType);
+ alloc.type = getTypeReference(0);
+ alloc.sourceStart = anonymousType.sourceStart;
+ alloc.sourceEnd = anonymousType.sourceEnd ;
+ anonymousType.allocation = alloc;
+ this.lastCheckPoint = anonymousType.bodyStart = this.scanner.currentPosition;
+ this.currentElement = this.currentElement.add(anonymousType, 0);
+ this.lastIgnoredToken = -1;
+ this.currentToken = 0; // opening brace already taken into account
+ return;
+ }
+ this.lastCheckPoint = this.scanner.startPosition; // force to restart at this exact position
+ this.restartRecovery = true; // request to restart from here on
+}
+protected void consumeAnnotationAsModifier() {
+ // nothing to do
+}
+protected void consumeAnnotationTypeDeclaration() {
+ int length;
+ if ((length = this.astLengthStack[this.astLengthPtr--]) != 0) {
+ //there are length declarations
+ //dispatch according to the type of the declarations
+ dispatchDeclarationInto(length);
+ }
+
+ TypeDeclaration typeDecl = (TypeDeclaration) this.astStack[this.astPtr];
+
+ // mark initializers with local type mark if needed
+ markInitializersWithLocalType(typeDecl);
+
+ //convert constructor that do not have the type's name into methods
+ typeDecl.checkConstructors(this);
+
+ //always add <clinit> (will be remove at code gen time if empty)
+ if (this.scanner.containsAssertKeyword) {
+ typeDecl.bits |= ASTNode.AddAssertionMASK;
+ }
+ typeDecl.addClinit();
+ typeDecl.bodyEnd = this.endStatementPosition;
+ if (length == 0 && !containsComment(typeDecl.bodyStart, typeDecl.bodyEnd)) {
+ typeDecl.bits |= ASTNode.UndocumentedEmptyBlockMASK;
+ }
+ typeDecl.declarationSourceEnd = flushCommentsDefinedPriorTo(this.endStatementPosition);
+}
+protected void consumeAnnotationTypeDeclarationHeader() {
+ // consumeAnnotationTypeDeclarationHeader ::= Modifiers '@' PushModifiers interface Identifier
+ // consumeAnnotationTypeDeclarationHeader ::= '@' PushModifiers interface Identifier
+ AnnotationTypeDeclaration annotationTypeDeclaration = new AnnotationTypeDeclaration(this.compilationUnit.compilationResult);
+ if (this.nestedMethod[this.nestedType] == 0) {
+ if (this.nestedType != 0) {
+ annotationTypeDeclaration.bits |= ASTNode.IsMemberTypeMASK;
+ }
+ } else {
+ // Record that the block has a declaration for local types
+ annotationTypeDeclaration.bits |= ASTNode.IsLocalTypeMASK;
+ markEnclosingMemberWithLocalType();
+ blockReal();
+ }
+
+ //highlight the name of the type
+ long pos = this.identifierPositionStack[this.identifierPtr];
+ annotationTypeDeclaration.sourceEnd = (int) pos;
+ annotationTypeDeclaration.sourceStart = (int) (pos >>> 32);
+ annotationTypeDeclaration.name = this.identifierStack[this.identifierPtr--];
+ this.identifierLengthPtr--;
+
+ //compute the declaration source too
+ // 'interface' push two int positions: the beginning of the class token and its end.
+ // we want to keep the beginning position but get rid of the end position
+ // it is only used for the ClassLiteralAccess positions.
+ this.intPtr--; // remove the start position of the interface token
+ this.intPtr--; // remove the end position of the interface token
+
+ annotationTypeDeclaration.modifiersSourceStart = this.intStack[this.intPtr--];
+ annotationTypeDeclaration.modifiers = this.intStack[this.intPtr--];
+ if (annotationTypeDeclaration.modifiersSourceStart >= 0) {
+ annotationTypeDeclaration.declarationSourceStart = annotationTypeDeclaration.modifiersSourceStart;
+ this.intPtr--; // remove the position of the '@' token as we have modifiers
+ } else {
+ int atPosition = this.intStack[this.intPtr--];
+ // remove the position of the '@' token as we don't have modifiers
+ annotationTypeDeclaration.declarationSourceStart = atPosition;
+ }
+ // consume annotations
+ int length;
+ if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+ System.arraycopy(
+ this.expressionStack,
+ (this.expressionPtr -= length) + 1,
+ annotationTypeDeclaration.annotations = new Annotation[length],
+ 0,
+ length);
+ }
+ annotationTypeDeclaration.bodyStart = annotationTypeDeclaration.sourceEnd + 1;
+
+ // javadoc
+ annotationTypeDeclaration.javadoc = this.javadoc;
+ this.javadoc = null;
+ pushOnAstStack(annotationTypeDeclaration);
+ if(options.sourceLevel < ClassFileConstants.JDK1_5 &&
+ this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
+ this.problemReporter().invalidUsageOfAnnotationDeclarations(annotationTypeDeclaration);
+ }
+}
+protected void consumeAnnotationTypeMemberDeclarationHeader() {
+ // AnnotationTypeMemberDeclarationHeader ::= Modifiersopt Type Identifier '(' ')'
+ AnnotationTypeMemberDeclaration annotationTypeMemberDeclaration = new AnnotationTypeMemberDeclaration(this.compilationUnit.compilationResult);
+
+ //name
+ annotationTypeMemberDeclaration.selector = this.identifierStack[this.identifierPtr];
+ long selectorSource = this.identifierPositionStack[this.identifierPtr--];
+ this.identifierLengthPtr--;
+ //type
+ annotationTypeMemberDeclaration.returnType = getTypeReference(this.intStack[this.intPtr--]);
+ //modifiers
+ annotationTypeMemberDeclaration.declarationSourceStart = this.intStack[this.intPtr--];
+ annotationTypeMemberDeclaration.modifiers = this.intStack[this.intPtr--];
+ // javadoc
+ annotationTypeMemberDeclaration.javadoc = this.javadoc;
+ this.javadoc = null;
+ // consume annotations
+ int length;
+ if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+ System.arraycopy(
+ this.expressionStack,
+ (this.expressionPtr -= length) + 1,
+ annotationTypeMemberDeclaration.annotations = new Annotation[length],
+ 0,
+ length);
+ }
+
+ //highlight starts at selector start
+ annotationTypeMemberDeclaration.sourceStart = (int) (selectorSource >>> 32);
+ annotationTypeMemberDeclaration.sourceEnd = (int) selectorSource;
+
+ annotationTypeMemberDeclaration.bodyStart = this.rParenPos + 1;
+ pushOnAstStack(annotationTypeMemberDeclaration);
+}
+protected void consumeAnnotationTypeMemberHeaderExtendedDims() {
+ // AnnotationTypeMemberHeaderExtendedDims ::= Dimsopt
+ AnnotationTypeMemberDeclaration annotationTypeMemberDeclaration = (AnnotationTypeMemberDeclaration) this.astStack[this.astPtr];
+ int extendedDims = this.intStack[this.intPtr--];
+ annotationTypeMemberDeclaration.extendedDimensions = extendedDims;
+ if (extendedDims != 0) {
+ TypeReference returnType = annotationTypeMemberDeclaration.returnType;
+ annotationTypeMemberDeclaration.sourceEnd = this.endPosition;
+ int dims = returnType.dimensions() + extendedDims;
+ int baseType;
+ if ((baseType = this.identifierLengthStack[this.identifierLengthPtr + 1]) < 0) {
+ //it was a baseType
+ int sourceStart = returnType.sourceStart;
+ int sourceEnd = returnType.sourceEnd;
+ returnType = TypeReference.baseTypeReference(-baseType, dims);
+ returnType.sourceStart = sourceStart;
+ returnType.sourceEnd = sourceEnd;
+ annotationTypeMemberDeclaration.returnType = returnType;
+ } else {
+ annotationTypeMemberDeclaration.returnType = this.copyDims(annotationTypeMemberDeclaration.returnType, dims);
+ }
+ if (this.currentToken == TokenNameSEMICOLON){
+ annotationTypeMemberDeclaration.bodyStart = this.endPosition + 1;
+ }
+ }
+}
+protected void consumeAnnotationTypeMemberDeclaration() {
+ // AnnotationTypeMemberDeclaration ::= AnnotationTypeMemberDeclarationHeader AnnotationTypeMemberHeaderExtendedDims DefaultValueopt ';'
+ AnnotationTypeMemberDeclaration annotationTypeMemberDeclaration = (AnnotationTypeMemberDeclaration) this.astStack[this.astPtr];
+
+ int length = this.expressionLengthStack[this.expressionLengthPtr--];
+ if (length == 1) {
+ intPtr--; // we get rid of the position of the default keyword
+ intPtr--; // we get rid of the position of the default keyword
+ annotationTypeMemberDeclaration.memberValue = this.expressionStack[this.expressionPtr--];
+ }
+
+ // store the this.endPosition (position just before the '}') in case there is
+ // a trailing comment behind the end of the method
+ int declarationEndPosition = flushCommentsDefinedPriorTo(this.endStatementPosition);
+ annotationTypeMemberDeclaration.bodyStart = this.endStatementPosition;
+ annotationTypeMemberDeclaration.bodyEnd = declarationEndPosition;
+ annotationTypeMemberDeclaration.declarationSourceEnd = declarationEndPosition;
+}
+protected void consumeAnnotationTypeMemberDeclarations() {
+ // AnnotationTypeMemberDeclarations ::= AnnotationTypeMemberDeclarations AnnotationTypeMemberDeclaration
+ concatNodeLists();
+}
+protected void consumeArgumentList() {
+ // ArgumentList ::= ArgumentList ',' Expression
+ concatExpressionLists();
+}
+protected void consumeArguments() {
+ // Arguments ::= '(' ArgumentListopt ')'
+ // nothing to do, the expression stack is already updated
+}
+protected void consumeArrayAccess(boolean unspecifiedReference) {
+ // ArrayAccess ::= Name '[' Expression ']' ==> true
+ // ArrayAccess ::= PrimaryNoNewArray '[' Expression ']' ==> false
+
+
+ //optimize push/pop
+ Expression exp;
+ if (unspecifiedReference) {
+ exp =
+ this.expressionStack[this.expressionPtr] =
+ new ArrayReference(
+ getUnspecifiedReferenceOptimized(),
+ this.expressionStack[this.expressionPtr]);
+ } else {
+ this.expressionPtr--;
+ this.expressionLengthPtr--;
+ exp =
+ this.expressionStack[this.expressionPtr] =
+ new ArrayReference(
+ this.expressionStack[this.expressionPtr],
+ this.expressionStack[this.expressionPtr + 1]);
+ }
+ exp.sourceEnd = this.endPosition;
+}
+protected void consumeArrayCreationExpressionWithInitializer() {
+ // ArrayCreationWithArrayInitializer ::= 'new' PrimitiveType DimWithOrWithOutExprs ArrayInitializer
+ // ArrayCreationWithArrayInitializer ::= 'new' ClassOrInterfaceType DimWithOrWithOutExprs ArrayInitializer
+
+ int length;
+ ArrayAllocationExpression aae = new ArrayAllocationExpression();
+ this.expressionLengthPtr -- ;
+ aae.initializer = (ArrayInitializer) this.expressionStack[this.expressionPtr--];
+
+ aae.type = getTypeReference(0);
+ length = (this.expressionLengthStack[this.expressionLengthPtr--]);
+ this.expressionPtr -= length ;
+ System.arraycopy(
+ this.expressionStack,
+ this.expressionPtr+1,
+ aae.dimensions = new Expression[length],
+ 0,
+ length);
+ aae.sourceStart = this.intStack[this.intPtr--];
+ if (aae.initializer == null) {
+ aae.sourceEnd = this.endPosition;
+ } else {
+ aae.sourceEnd = aae.initializer.sourceEnd ;
+ }
+ pushOnExpressionStack(aae);
+}
+protected void consumeArrayCreationExpressionWithoutInitializer() {
+ // ArrayCreationWithoutArrayInitializer ::= 'new' ClassOrInterfaceType DimWithOrWithOutExprs
+ // ArrayCreationWithoutArrayInitializer ::= 'new' PrimitiveType DimWithOrWithOutExprs
+
+ int length;
+ ArrayAllocationExpression aae = new ArrayAllocationExpression();
+ aae.type = getTypeReference(0);
+ length = (this.expressionLengthStack[this.expressionLengthPtr--]);
+ this.expressionPtr -= length ;
+ System.arraycopy(
+ this.expressionStack,
+ this.expressionPtr+1,
+ aae.dimensions = new Expression[length],
+ 0,
+ length);
+ aae.sourceStart = this.intStack[this.intPtr--];
+ if (aae.initializer == null) {
+ aae.sourceEnd = this.endPosition;
+ } else {
+ aae.sourceEnd = aae.initializer.sourceEnd ;
+ }
+ pushOnExpressionStack(aae);
+}
+protected void consumeArrayCreationHeader() {
+ // nothing to do
+}
+protected void consumeArrayInitializer() {
+ // ArrayInitializer ::= '{' VariableInitializers '}'
+ // ArrayInitializer ::= '{' VariableInitializers , '}'
+
+ arrayInitializer(this.expressionLengthStack[this.expressionLengthPtr--]);
+}
+protected void consumeArrayTypeWithTypeArgumentsName() {
+ this.intStack[this.intPtr] += this.identifierLengthStack[this.identifierLengthPtr];
+}
+protected void consumeAssertStatement() {
+ // AssertStatement ::= 'assert' Expression ':' Expression ';'
+ this.expressionLengthPtr-=2;
+ pushOnAstStack(new AssertStatement(this.expressionStack[this.expressionPtr--], this.expressionStack[this.expressionPtr--], this.intStack[this.intPtr--]));
+}
+protected void consumeAssignment() {
+ // Assignment ::= LeftHandSide AssignmentOperator AssignmentExpression
+ //optimize the push/pop
+
+ int op = this.intStack[this.intPtr--] ; //<--the encoded operator
+
+ this.expressionPtr -- ; this.expressionLengthPtr -- ;
+ this.expressionStack[this.expressionPtr] =
+ (op != EQUAL ) ?
+ new CompoundAssignment(
+ this.expressionStack[this.expressionPtr] ,
+ this.expressionStack[this.expressionPtr+1],
+ op,
+ this.scanner.startPosition - 1) :
+ new Assignment(
+ this.expressionStack[this.expressionPtr] ,
+ this.expressionStack[this.expressionPtr+1],
+ this.scanner.startPosition - 1);
+}
+protected void consumeAssignmentOperator(int pos) {
+ // AssignmentOperator ::= '='
+ // AssignmentOperator ::= '*='
+ // AssignmentOperator ::= '/='
+ // AssignmentOperator ::= '%='
+ // AssignmentOperator ::= '+='
+ // AssignmentOperator ::= '-='
+ // AssignmentOperator ::= '<<='
+ // AssignmentOperator ::= '>>='
+ // AssignmentOperator ::= '>>>='
+ // AssignmentOperator ::= '&='
+ // AssignmentOperator ::= '^='
+ // AssignmentOperator ::= '|='
+
+ pushOnIntStack(pos);
+}
+protected void consumeBinaryExpression(int op) {
+ // MultiplicativeExpression ::= MultiplicativeExpression '*' UnaryExpression
+ // MultiplicativeExpression ::= MultiplicativeExpression '/' UnaryExpression
+ // MultiplicativeExpression ::= MultiplicativeExpression '%' UnaryExpression
+ // AdditiveExpression ::= AdditiveExpression '+' MultiplicativeExpression
+ // AdditiveExpression ::= AdditiveExpression '-' MultiplicativeExpression
+ // ShiftExpression ::= ShiftExpression '<<' AdditiveExpression
+ // ShiftExpression ::= ShiftExpression '>>' AdditiveExpression
+ // ShiftExpression ::= ShiftExpression '>>>' AdditiveExpression
+ // RelationalExpression ::= RelationalExpression '<' ShiftExpression
+ // RelationalExpression ::= RelationalExpression '>' ShiftExpression
+ // RelationalExpression ::= RelationalExpression '<=' ShiftExpression
+ // RelationalExpression ::= RelationalExpression '>=' ShiftExpression
+ // AndExpression ::= AndExpression '&' EqualityExpression
+ // ExclusiveOrExpression ::= ExclusiveOrExpression '^' AndExpression
+ // InclusiveOrExpression ::= InclusiveOrExpression '|' ExclusiveOrExpression
+ // ConditionalAndExpression ::= ConditionalAndExpression '&&' InclusiveOrExpression
+ // ConditionalOrExpression ::= ConditionalOrExpression '||' ConditionalAndExpression
+
+ //optimize the push/pop
+
+ this.expressionPtr--;
+ this.expressionLengthPtr--;
+ Expression expr1 = this.expressionStack[this.expressionPtr];
+ Expression expr2 = this.expressionStack[this.expressionPtr + 1];
+ switch(op) {
+ case OR_OR :
+ this.expressionStack[this.expressionPtr] =
+ new OR_OR_Expression(
+ expr1,
+ expr2,
+ op);
+ break;
+ case AND_AND :
+ this.expressionStack[this.expressionPtr] =
+ new AND_AND_Expression(
+ expr1,
+ expr2,
+ op);
+ break;
+ case PLUS :
+ // look for "string1" + "string2"
+ if (this.optimizeStringLiterals) {
+ if (expr1 instanceof StringLiteral) {
+ if (expr2 instanceof CharLiteral) { // string+char
+ this.expressionStack[this.expressionPtr] =
+ ((StringLiteral) expr1).extendWith((CharLiteral) expr2);
+ } else if (expr2 instanceof StringLiteral) { //string+string
+ this.expressionStack[this.expressionPtr] =
+ ((StringLiteral) expr1).extendWith((StringLiteral) expr2);
+ } else {
+ this.expressionStack[this.expressionPtr] = new BinaryExpression(expr1, expr2, PLUS);
+ }
+ } else {
+ this.expressionStack[this.expressionPtr] = new BinaryExpression(expr1, expr2, PLUS);
+ }
+ } else if (expr1 instanceof StringLiteral) {
+ if (expr2 instanceof StringLiteral) {
+ // string + string
+ this.expressionStack[this.expressionPtr] =
+ ((StringLiteral) expr1).extendsWith((StringLiteral) expr2);
+ } else {
+ this.expressionStack[this.expressionPtr] =
+ new BinaryExpression(
+ expr1,
+ expr2,
+ op);
+ }
+ } else {
+ this.expressionStack[this.expressionPtr] =
+ new BinaryExpression(
+ expr1,
+ expr2,
+ op);
+ }
+ break;
+ case LESS :
+ // TODO (olivier) bug 67790 remove once DOMParser is activated
+ this.intPtr--;
+ this.expressionStack[this.expressionPtr] =
+ new BinaryExpression(
+ expr1,
+ expr2,
+ op);
+ break;
+ default :
+ this.expressionStack[this.expressionPtr] =
+ new BinaryExpression(
+ expr1,
+ expr2,
+ op);
+ }
+}
+/**
+ * @param op binary operator
+ */
+protected void consumeBinaryExpressionWithName(int op) {
+ pushOnExpressionStack(getUnspecifiedReferenceOptimized());
+ this.expressionPtr--;
+ this.expressionLengthPtr--;
+ /*
+ if (op == OR_OR) {
+ this.expressionStack[this.expressionPtr] =
+ new OR_OR_Expression(
+ this.expressionStack[this.expressionPtr + 1],
+ this.expressionStack[this.expressionPtr],
+ op);
+ } else {
+ if (op == AND_AND) {
+ this.expressionStack[this.expressionPtr] =
+ new AND_AND_Expression(
+ this.expressionStack[this.expressionPtr + 1],
+ this.expressionStack[this.expressionPtr],
+ op);
+ } else {
+ // look for "string1" + "string2"
+ if ((op == PLUS) && this.optimizeStringLiterals) {
+ Expression expr1, expr2;
+ expr1 = this.expressionStack[this.expressionPtr + 1];
+ expr2 = this.expressionStack[this.expressionPtr];
+ if (expr1 instanceof StringLiteral) {
+ if (expr2 instanceof CharLiteral) { // string+char
+ this.expressionStack[this.expressionPtr] =
+ ((StringLiteral) expr1).extendWith((CharLiteral) expr2);
+ } else if (expr2 instanceof StringLiteral) { //string+string
+ this.expressionStack[this.expressionPtr] =
+ ((StringLiteral) expr1).extendWith((StringLiteral) expr2);
+ } else {
+ this.expressionStack[this.expressionPtr] = new BinaryExpression(expr1, expr2, PLUS);
+ }
+ } else {
+ this.expressionStack[this.expressionPtr] = new BinaryExpression(expr1, expr2, PLUS);
+ }
+ } else {
+ this.expressionStack[this.expressionPtr] =
+ new BinaryExpression(
+ this.expressionStack[this.expressionPtr + 1],
+ this.expressionStack[this.expressionPtr],
+ op);
+ }
+ }
+ }
+ */
+ Expression expr1 = this.expressionStack[this.expressionPtr + 1];
+ Expression expr2 = this.expressionStack[this.expressionPtr];
+ switch(op) {
+ case OR_OR :
+ this.expressionStack[this.expressionPtr] =
+ new OR_OR_Expression(
+ expr1,
+ expr2,
+ op);
+ break;
+ case AND_AND :
+ this.expressionStack[this.expressionPtr] =
+ new AND_AND_Expression(
+ expr1,
+ expr2,
+ op);
+ break;
+ case PLUS :
+ // look for "string1" + "string2"
+ if (this.optimizeStringLiterals) {
+ if (expr1 instanceof StringLiteral) {
+ if (expr2 instanceof CharLiteral) { // string+char
+ this.expressionStack[this.expressionPtr] =
+ ((StringLiteral) expr1).extendWith((CharLiteral) expr2);
+ } else if (expr2 instanceof StringLiteral) { //string+string
+ this.expressionStack[this.expressionPtr] =
+ ((StringLiteral) expr1).extendWith((StringLiteral) expr2);
+ } else {
+ this.expressionStack[this.expressionPtr] = new BinaryExpression(expr1, expr2, PLUS);
+ }
+ } else {
+ this.expressionStack[this.expressionPtr] = new BinaryExpression(expr1, expr2, PLUS);
+ }
+ } else if (expr1 instanceof StringLiteral) {
+ if (expr2 instanceof StringLiteral) {
+ // string + string
+ this.expressionStack[this.expressionPtr] =
+ ((StringLiteral) expr1).extendsWith((StringLiteral) expr2);
+ } else {
+ this.expressionStack[this.expressionPtr] =
+ new BinaryExpression(
+ expr1,
+ expr2,
+ op);
+ }
+ } else {
+ this.expressionStack[this.expressionPtr] =
+ new BinaryExpression(
+ expr1,
+ expr2,
+ op);
+ }
+ break;
+ case LESS :
+ // TODO (olivier) bug 67790 remove once DOMParser is activated
+ this.intPtr--;
+ this.expressionStack[this.expressionPtr] =
+ new BinaryExpression(
+ expr1,
+ expr2,
+ op);
+ break;
+ default :
+ this.expressionStack[this.expressionPtr] =
+ new BinaryExpression(
+ expr1,
+ expr2,
+ op);
+ }
+}
+protected void consumeBlock() {
+ // Block ::= OpenBlock '{' BlockStatementsopt '}'
+ // simpler action for empty blocks
+
+ int statementsLength = this.astLengthStack[this.astLengthPtr--];
+ Block block;
+ if (statementsLength == 0) { // empty block
+ block = new Block(0);
+ block.sourceStart = this.intStack[this.intPtr--];
+ block.sourceEnd = this.endStatementPosition;
+ // check whether this block at least contains some comment in it
+ if (!containsComment(block.sourceStart, block.sourceEnd)) {
+ block.bits |= ASTNode.UndocumentedEmptyBlockMASK;
+ }
+ this.realBlockPtr--; // still need to pop the block variable counter
+ } else {
+ block = new Block(this.realBlockStack[this.realBlockPtr--]);
+ this.astPtr -= statementsLength;
+ System.arraycopy(
+ this.astStack,
+ this.astPtr + 1,
+ block.statements = new Statement[statementsLength],
+ 0,
+ statementsLength);
+ block.sourceStart = this.intStack[this.intPtr--];
+ block.sourceEnd = this.endStatementPosition;
+ }
+ pushOnAstStack(block);
+}
+protected void consumeBlockStatements() {
+ // BlockStatements ::= BlockStatements BlockStatement
+ concatNodeLists();
+}
+protected void consumeCaseLabel() {
+ // SwitchLabel ::= 'case' ConstantExpression ':'
+ this.expressionLengthPtr--;
+ Expression expression = this.expressionStack[this.expressionPtr--];
+ pushOnAstStack(new CaseStatement(expression, expression.sourceEnd, this.intStack[this.intPtr--]));
+}
+protected void consumeCastExpressionLL1() {
+ //CastExpression ::= '(' Expression ')' InsideCastExpressionLL1 UnaryExpressionNotPlusMinus
+ // Expression is used in order to make the grammar LL1
+
+ //optimize push/pop
+
+ Expression cast,exp;
+ this.expressionPtr--;
+ this.expressionStack[this.expressionPtr] =
+ cast = new CastExpression(
+ exp=this.expressionStack[this.expressionPtr+1] ,
+ getTypeReference(this.expressionStack[this.expressionPtr]));
+ this.expressionLengthPtr -- ;
+ updateSourcePosition(cast);
+ cast.sourceEnd=exp.sourceEnd;
+}
+protected void consumeCastExpressionWithGenericsArray() {
+ // CastExpression ::= PushLPAREN Name TypeArguments Dims PushRPAREN InsideCastExpression UnaryExpressionNotPlusMinus
+
+ Expression exp, cast, castType;
+ int end = this.intStack[this.intPtr--];
+
+ int dim = this.intStack[this.intPtr--];
+ pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
+
+ this.expressionStack[this.expressionPtr] = cast = new CastExpression(exp = this.expressionStack[this.expressionPtr], castType = getTypeReference(dim));
+ // TODO (olivier) bug 67790 remove once DOMParser is activated
+ intPtr--;
+ castType.sourceEnd = end - 1;
+ castType.sourceStart = (cast.sourceStart = this.intStack[this.intPtr--]) + 1;
+ cast.sourceEnd = exp.sourceEnd;
+}
+protected void consumeCastExpressionWithNameArray() {
+ // CastExpression ::= PushLPAREN Name Dims PushRPAREN InsideCastExpression UnaryExpressionNotPlusMinus
+
+ Expression exp, cast, castType;
+ int end = this.intStack[this.intPtr--];
+
+ // handle type arguments
+ pushOnGenericsLengthStack(0);
+ pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
+
+ this.expressionStack[this.expressionPtr] = cast = new CastExpression(exp = this.expressionStack[this.expressionPtr], castType = getTypeReference(this.intStack[this.intPtr--]));
+ castType.sourceEnd = end - 1;
+ castType.sourceStart = (cast.sourceStart = this.intStack[this.intPtr--]) + 1;
+ cast.sourceEnd = exp.sourceEnd;
+}
+protected void consumeCastExpressionWithPrimitiveType() {
+ // CastExpression ::= PushLPAREN PrimitiveType Dimsopt PushRPAREN InsideCastExpression UnaryExpression
+
+ //this.intStack : posOfLeftParen dim posOfRightParen
+
+ //optimize the push/pop
+
+ Expression exp, cast, castType;
+ int end = this.intStack[this.intPtr--];
+ this.expressionStack[this.expressionPtr] = cast = new CastExpression(exp = this.expressionStack[this.expressionPtr], castType = getTypeReference(this.intStack[this.intPtr--]));
+ castType.sourceEnd = end - 1;
+ castType.sourceStart = (cast.sourceStart = this.intStack[this.intPtr--]) + 1;
+ cast.sourceEnd = exp.sourceEnd;
+}
+protected ParameterizedQualifiedTypeReference computeQualifiedGenericsFromRightSide(TypeReference rightSide, int dim) {
+ int nameSize = this.identifierLengthStack[this.identifierLengthPtr];
+ int tokensSize = nameSize;
+ if (rightSide instanceof ParameterizedSingleTypeReference) {
+ tokensSize ++;
+ } else if (rightSide instanceof SingleTypeReference) {
+ tokensSize ++;
+ } else if (rightSide instanceof ParameterizedQualifiedTypeReference) {
+ tokensSize += ((QualifiedTypeReference) rightSide).tokens.length;
+ } else if (rightSide instanceof QualifiedTypeReference) {
+ tokensSize += ((QualifiedTypeReference) rightSide).tokens.length;
+ }
+ TypeReference[][] typeArguments = new TypeReference[tokensSize][];
+ char[][] tokens = new char[tokensSize][];
+ long[] positions = new long[tokensSize];
+ if (rightSide instanceof ParameterizedSingleTypeReference) {
+ ParameterizedSingleTypeReference singleParameterizedTypeReference = (ParameterizedSingleTypeReference) rightSide;
+ tokens[nameSize] = singleParameterizedTypeReference.token;
+ positions[nameSize] = (((long) singleParameterizedTypeReference.sourceStart) << 32) + singleParameterizedTypeReference.sourceEnd;
+ typeArguments[nameSize] = singleParameterizedTypeReference.typeArguments;
+ } else if (rightSide instanceof SingleTypeReference) {
+ SingleTypeReference singleTypeReference = (SingleTypeReference) rightSide;
+ tokens[nameSize] = singleTypeReference.token;
+ positions[nameSize] = (((long) singleTypeReference.sourceStart) << 32) + singleTypeReference.sourceEnd;
+ } else if (rightSide instanceof ParameterizedQualifiedTypeReference) {
+ ParameterizedQualifiedTypeReference parameterizedTypeReference = (ParameterizedQualifiedTypeReference) rightSide;
+ TypeReference[][] rightSideTypeArguments = parameterizedTypeReference.typeArguments;
+ System.arraycopy(rightSideTypeArguments, 0, typeArguments, nameSize, rightSideTypeArguments.length);
+ char[][] rightSideTokens = parameterizedTypeReference.tokens;
+ System.arraycopy(rightSideTokens, 0, tokens, nameSize, rightSideTokens.length);
+ long[] rightSidePositions = parameterizedTypeReference.sourcePositions;
+ System.arraycopy(rightSidePositions, 0, positions, nameSize, rightSidePositions.length);
+ } else if (rightSide instanceof QualifiedTypeReference) {
+ QualifiedTypeReference qualifiedTypeReference = (QualifiedTypeReference) rightSide;
+ char[][] rightSideTokens = qualifiedTypeReference.tokens;
+ System.arraycopy(rightSideTokens, 0, tokens, nameSize, rightSideTokens.length);
+ long[] rightSidePositions = qualifiedTypeReference.sourcePositions;
+ System.arraycopy(rightSidePositions, 0, positions, nameSize, rightSidePositions.length);
+ }
+
+ int currentTypeArgumentsLength = this.genericsLengthStack[this.genericsLengthPtr--];
+ TypeReference[] currentTypeArguments = new TypeReference[currentTypeArgumentsLength];
+ this.genericsPtr -= currentTypeArgumentsLength;
+ System.arraycopy(this.genericsStack, this.genericsPtr + 1, currentTypeArguments, 0, currentTypeArgumentsLength);
+
+ if (nameSize == 1) {
+ tokens[0] = this.identifierStack[this.identifierPtr];
+ positions[0] = this.identifierPositionStack[this.identifierPtr--];
+ typeArguments[0] = currentTypeArguments;
+ } else {
+ this.identifierPtr -= nameSize;
+ System.arraycopy(this.identifierStack, this.identifierPtr + 1, tokens, 0, nameSize);
+ System.arraycopy(this.identifierPositionStack, this.identifierPtr + 1, positions, 0, nameSize);
+ typeArguments[nameSize - 1] = currentTypeArguments;
+ }
+ this.identifierLengthPtr--;
+ return new ParameterizedQualifiedTypeReference(tokens, typeArguments, dim, positions);
+}
+protected void consumeCastExpressionWithQualifiedGenericsArray() {
+ // CastExpression ::= PushLPAREN Name OnlyTypeArguments '.' ClassOrInterfaceType Dims PushRPAREN InsideCastExpression UnaryExpressionNotPlusMinus
+ Expression exp, cast, castType;
+ int end = this.intStack[this.intPtr--];
+
+ int dim = this.intStack[this.intPtr--];
+ TypeReference rightSide = getTypeReference(0);
+
+ ParameterizedQualifiedTypeReference qualifiedParameterizedTypeReference = computeQualifiedGenericsFromRightSide(rightSide, dim);
+ // TODO (olivier) bug 67790 remove once DOMParser is activated
+ intPtr--;
+ this.expressionStack[this.expressionPtr] = cast = new CastExpression(exp = this.expressionStack[this.expressionPtr], castType = qualifiedParameterizedTypeReference);
+ castType.sourceEnd = end - 1;
+ castType.sourceStart = (cast.sourceStart = this.intStack[this.intPtr--]) + 1;
+ cast.sourceEnd = exp.sourceEnd;
+}
+protected void consumeCatches() {
+ // Catches ::= Catches CatchClause
+ optimizedConcatNodeLists();
+}
+protected void consumeCatchHeader() {
+ // CatchDeclaration ::= 'catch' '(' FormalParameter ')' '{'
+
+ if (this.currentElement == null){
+ return; // should never occur, this consumeRule is only used in recovery mode
+ }
+ // current element should be a block due to the presence of the opening brace
+ if (!(this.currentElement instanceof RecoveredBlock)){
+ if(!(this.currentElement instanceof RecoveredMethod)) {
+ return;
+ }
+ RecoveredMethod rMethod = (RecoveredMethod) this.currentElement;
+ if(!(rMethod.methodBody == null && rMethod.bracketBalance > 0)) {
+ return;
+ }
+ }
+
+ Argument arg = (Argument)this.astStack[this.astPtr--];
+ // convert argument to local variable
+ LocalDeclaration localDeclaration = new LocalDeclaration(arg.name, arg.sourceStart, arg.sourceEnd);
+ localDeclaration.type = arg.type;
+ localDeclaration.declarationSourceStart = arg.declarationSourceStart;
+ localDeclaration.declarationSourceEnd = arg.declarationSourceEnd;
+
+ this.currentElement = this.currentElement.add(localDeclaration, 0);
+ this.lastCheckPoint = this.scanner.startPosition; // force to restart at this exact position
+ this.restartRecovery = true; // request to restart from here on
+ this.lastIgnoredToken = -1;
+}
+protected void consumeClassBodyDeclaration() {
+ // ClassBodyDeclaration ::= Diet Block
+ //push an Initializer
+ //optimize the push/pop
+ this.nestedMethod[this.nestedType]--;
+ Block block = (Block) this.astStack[this.astPtr];
+ if (this.diet) block.bits &= ~ASTNode.UndocumentedEmptyBlockMASK; // clear bit since was diet
+ Initializer initializer = new Initializer(block, 0);
+ this.intPtr--; // pop sourcestart left on the stack by consumeNestedMethod.
+ initializer.bodyStart = this.intStack[this.intPtr--];
+ this.realBlockPtr--; // pop the block variable counter left on the stack by consumeNestedMethod
+ int javadocCommentStart = this.intStack[this.intPtr--];
+ if (javadocCommentStart != -1) {
+ initializer.declarationSourceStart = javadocCommentStart;
+ initializer.javadoc = this.javadoc;
+ this.javadoc = null;
+ }
+ this.astStack[this.astPtr] = initializer;
+ initializer.bodyEnd = this.endPosition;
+ initializer.sourceEnd = this.endStatementPosition;
+ initializer.declarationSourceEnd = flushCommentsDefinedPriorTo(this.endStatementPosition);
+}
+protected void consumeClassBodyDeclarations() {
+ // ClassBodyDeclarations ::= ClassBodyDeclarations ClassBodyDeclaration
+ concatNodeLists();
+}
+protected void consumeClassBodyDeclarationsopt() {
+ // ClassBodyDeclarationsopt ::= NestedType ClassBodyDeclarations
+ this.nestedType-- ;
+}
+protected void consumeClassBodyopt() {
+ // ClassBodyopt ::= $empty
+ pushOnAstStack(null);
+ this.endPosition = this.scanner.startPosition - 1;
+}
+protected void consumeClassDeclaration() {
+ // ClassDeclaration ::= ClassHeader ClassBody
+
+ int length;
+ if ((length = this.astLengthStack[this.astLengthPtr--]) != 0) {
+ //there are length declarations
+ //dispatch according to the type of the declarations
+ dispatchDeclarationInto(length);
+ }
+
+ TypeDeclaration typeDecl = (TypeDeclaration) this.astStack[this.astPtr];
+
+ // mark initializers with local type mark if needed
+ markInitializersWithLocalType(typeDecl);
+
+ //convert constructor that do not have the type's name into methods
+ boolean hasConstructor = typeDecl.checkConstructors(this);
+
+ //add the default constructor when needed (interface don't have it)
+ if (!hasConstructor && !typeDecl.isInterface()) {
+ boolean insideFieldInitializer = false;
+ if (this.diet) {
+ for (int i = this.nestedType; i > 0; i--){
+ if (this.variablesCounter[i] > 0) {
+ insideFieldInitializer = true;
+ break;
+ }
+ }
+ }
+ typeDecl.createsInternalConstructor(!this.diet || insideFieldInitializer, true);
+ }
+
+ //always add <clinit> (will be remove at code gen time if empty)
+ if (this.scanner.containsAssertKeyword) {
+ typeDecl.bits |= ASTNode.AddAssertionMASK;
+ }
+ typeDecl.addClinit();
+ typeDecl.bodyEnd = this.endStatementPosition;
+ if (length == 0 && !containsComment(typeDecl.bodyStart, typeDecl.bodyEnd)) {
+ typeDecl.bits |= ASTNode.UndocumentedEmptyBlockMASK;
+ }
+
+ typeDecl.declarationSourceEnd = flushCommentsDefinedPriorTo(this.endStatementPosition);
+}
+protected void consumeClassHeader() {
+ // ClassHeader ::= ClassHeaderName ClassHeaderExtendsopt ClassHeaderImplementsopt
+
+ TypeDeclaration typeDecl = (TypeDeclaration) this.astStack[this.astPtr];
+ if (this.currentToken == TokenNameLBRACE) {
+ typeDecl.bodyStart = this.scanner.currentPosition;
+ }
+ if (this.currentElement != null) {
+ this.restartRecovery = true; // used to avoid branching back into the regular automaton
+ }
+ // flush the comments related to the class header
+ this.scanner.commentPtr = -1;
+}
+protected void consumeClassHeaderExtends() {
+ // ClassHeaderExtends ::= 'extends' ClassType
+ //superclass
+ TypeReference superClass = getTypeReference(0);
+ // There is a class declaration on the top of stack
+ TypeDeclaration typeDecl = (TypeDeclaration) this.astStack[this.astPtr];
+ typeDecl.superclass = superClass;
+ superClass.bits |= ASTNode.IsSuperType;
+ typeDecl.bodyStart = typeDecl.superclass.sourceEnd + 1;
+ // recovery
+ if (this.currentElement != null){
+ this.lastCheckPoint = typeDecl.bodyStart;
+ }
+}
+protected void consumeClassHeaderImplements() {
+ // ClassHeaderImplements ::= 'implements' InterfaceTypeList
+ int length = this.astLengthStack[this.astLengthPtr--];
+ //super interfaces
+ this.astPtr -= length;
+ // There is a class declaration on the top of stack
+ TypeDeclaration typeDecl = (TypeDeclaration) this.astStack[this.astPtr];
+ System.arraycopy(
+ this.astStack,
+ this.astPtr + 1,
+ typeDecl.superInterfaces = new TypeReference[length],
+ 0,
+ length);
+ for (int i = 0, max = typeDecl.superInterfaces.length; i < max; i++) {
+ typeDecl.superInterfaces[i].bits |= ASTNode.IsSuperType;
+ }
+ typeDecl.bodyStart = typeDecl.superInterfaces[length-1].sourceEnd + 1;
+ this.listLength = 0; // reset after having read super-interfaces
+ // recovery
+ if (this.currentElement != null) { // is recovering
+ this.lastCheckPoint = typeDecl.bodyStart;
+ }
+}
+protected void consumeClassHeaderName1() {
+ // ClassHeaderName1 ::= Modifiersopt 'class' 'Identifier'
+ TypeDeclaration typeDecl = new TypeDeclaration(this.compilationUnit.compilationResult);
+ if (this.nestedMethod[this.nestedType] == 0) {
+ if (this.nestedType != 0) {
+ typeDecl.bits |= ASTNode.IsMemberTypeMASK;
+ }
+ } else {
+ // Record that the block has a declaration for local types
+ typeDecl.bits |= ASTNode.IsLocalTypeMASK;
+ markEnclosingMemberWithLocalType();
+ blockReal();
+ }
+
+ //highlight the name of the type
+ long pos = this.identifierPositionStack[this.identifierPtr];
+ typeDecl.sourceEnd = (int) pos;
+ typeDecl.sourceStart = (int) (pos >>> 32);
+ typeDecl.name = this.identifierStack[this.identifierPtr--];
+ this.identifierLengthPtr--;
+
+ //compute the declaration source too
+ // 'class' and 'interface' push two int positions: the beginning of the class token and its end.
+ // we want to keep the beginning position but get rid of the end position
+ // it is only used for the ClassLiteralAccess positions.
+ typeDecl.declarationSourceStart = this.intStack[this.intPtr--];
+ this.intPtr--; // remove the end position of the class token
+
+ typeDecl.modifiersSourceStart = this.intStack[this.intPtr--];
+ typeDecl.modifiers = this.intStack[this.intPtr--];
+ if (typeDecl.modifiersSourceStart >= 0) {
+ typeDecl.declarationSourceStart = typeDecl.modifiersSourceStart;
+ }
+ // consume annotations
+ int length;
+ if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+ System.arraycopy(
+ this.expressionStack,
+ (this.expressionPtr -= length) + 1,
+ typeDecl.annotations = new Annotation[length],
+ 0,
+ length);
+ }
+ typeDecl.bodyStart = typeDecl.sourceEnd + 1;
+ pushOnAstStack(typeDecl);
+
+ this.listLength = 0; // will be updated when reading super-interfaces
+ // recovery
+ if (this.currentElement != null){
+ this.lastCheckPoint = typeDecl.bodyStart;
+ this.currentElement = this.currentElement.add(typeDecl, 0);
+ this.lastIgnoredToken = -1;
+ }
+ // javadoc
+ typeDecl.javadoc = this.javadoc;
+ this.javadoc = null;
+}
+protected void consumeTypeHeaderNameWithTypeParameters() {
+ // ClassHeaderName ::= ClassHeaderName1 TypeParameters
+ // InterfaceHeaderName ::= InterfaceHeaderName1 TypeParameters
+ TypeDeclaration typeDecl = (TypeDeclaration)this.astStack[this.astPtr];
+
+ // consume type parameters
+ int length = this.genericsLengthStack[this.genericsLengthPtr--];
+ this.genericsPtr -= length;
+ System.arraycopy(this.genericsStack, this.genericsPtr + 1, typeDecl.typeParameters = new TypeParameter[length], 0, length);
+
+ typeDecl.bodyStart = typeDecl.typeParameters[length-1].declarationSourceEnd + 1;
+
+ this.listTypeParameterLength = 0;
+
+ if (this.currentElement != null) { // is recovering
+ this.lastCheckPoint = typeDecl.bodyStart;
+ }
+}
+protected void consumeClassInstanceCreationExpression() {
+ // ClassInstanceCreationExpression ::= 'new' ClassType '(' ArgumentListopt ')' ClassBodyopt
+ classInstanceCreation(false);
+}
+protected void consumeClassInstanceCreationExpressionName() {
+ // ClassInstanceCreationExpressionName ::= Name '.'
+ pushOnExpressionStack(getUnspecifiedReferenceOptimized());
+}
+protected void consumeClassInstanceCreationExpressionQualified() {
+ // ClassInstanceCreationExpression ::= Primary '.' 'new' SimpleName '(' ArgumentListopt ')' ClassBodyopt
+ // ClassInstanceCreationExpression ::= ClassInstanceCreationExpressionName 'new' SimpleName '(' ArgumentListopt ')' ClassBodyopt
+ classInstanceCreation(true);
+
+ this.expressionLengthPtr--;
+ QualifiedAllocationExpression qae =
+ (QualifiedAllocationExpression) this.expressionStack[this.expressionPtr--];
+ qae.enclosingInstance = this.expressionStack[this.expressionPtr];
+ this.expressionStack[this.expressionPtr] = qae;
+ qae.sourceStart = qae.enclosingInstance.sourceStart;
+}
+protected void consumeClassInstanceCreationExpressionQualifiedWithTypeArguments() {
+ // ClassInstanceCreationExpression ::= Primary '.' 'new' TypeArguments SimpleName '(' ArgumentListopt ')' ClassBodyopt
+ // ClassInstanceCreationExpression ::= ClassInstanceCreationExpressionName 'new' TypeArguments SimpleName '(' ArgumentListopt ')' ClassBodyopt
+
+ QualifiedAllocationExpression alloc;
+ int length;
+ if (((length = this.astLengthStack[this.astLengthPtr--]) == 1) && (this.astStack[this.astPtr] == null)) {
+ //NO ClassBody
+ this.astPtr--;
+ alloc = new QualifiedAllocationExpression();
+ alloc.sourceEnd = this.endPosition; //the position has been stored explicitly
+
+ if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+ this.expressionPtr -= length;
+ System.arraycopy(
+ this.expressionStack,
+ this.expressionPtr + 1,
+ alloc.arguments = new Expression[length],
+ 0,
+ length);
+ }
+ alloc.type = getTypeReference(0);
+
+ length = this.genericsLengthStack[this.genericsLengthPtr--];
+ this.genericsPtr -= length;
+ System.arraycopy(this.genericsStack, this.genericsPtr + 1, alloc.typeArguments = new TypeReference[length], 0, length);
+ // TODO (olivier) bug 67790 remove once DOMParser is activated
+ intPtr--;
+
+ //the default constructor with the correct number of argument
+ //will be created and added by the TC (see createsInternalConstructorWithBinding)
+ alloc.sourceStart = this.intStack[this.intPtr--];
+ pushOnExpressionStack(alloc);
+ } else {
+ dispatchDeclarationInto(length);
+ TypeDeclaration anonymousTypeDeclaration = (TypeDeclaration)this.astStack[this.astPtr];
+ anonymousTypeDeclaration.declarationSourceEnd = this.endStatementPosition;
+ anonymousTypeDeclaration.bodyEnd = this.endStatementPosition;
+ if (length == 0 && !containsComment(anonymousTypeDeclaration.bodyStart, anonymousTypeDeclaration.bodyEnd)) {
+ anonymousTypeDeclaration.bits |= ASTNode.UndocumentedEmptyBlockMASK;
+ }
+ this.astPtr--;
+ this.astLengthPtr--;
+
+ QualifiedAllocationExpression anonymousTypeDeclarationAllocationExpression = anonymousTypeDeclaration.allocation;
+ if (anonymousTypeDeclarationAllocationExpression != null) {
+ anonymousTypeDeclarationAllocationExpression.sourceEnd = this.endStatementPosition;
+ // handle type arguments
+ length = this.genericsLengthStack[this.genericsLengthPtr--];
+ this.genericsPtr -= length;
+ System.arraycopy(this.genericsStack, this.genericsPtr + 1, anonymousTypeDeclarationAllocationExpression.typeArguments = new TypeReference[length], 0, length);
+ }
+
+ // mark initializers with local type mark if needed
+ markInitializersWithLocalType(anonymousTypeDeclaration);
+ }
+
+ this.expressionLengthPtr--;
+ QualifiedAllocationExpression qae =
+ (QualifiedAllocationExpression) this.expressionStack[this.expressionPtr--];
+ qae.enclosingInstance = this.expressionStack[this.expressionPtr];
+ this.expressionStack[this.expressionPtr] = qae;
+ qae.sourceStart = qae.enclosingInstance.sourceStart;
+}
+protected void consumeClassInstanceCreationExpressionWithTypeArguments() {
+ // ClassInstanceCreationExpression ::= 'new' TypeArguments ClassType '(' ArgumentListopt ')' ClassBodyopt
+ AllocationExpression alloc;
+ int length;
+ if (((length = this.astLengthStack[this.astLengthPtr--]) == 1)
+ && (this.astStack[this.astPtr] == null)) {
+ //NO ClassBody
+ this.astPtr--;
+ alloc = new AllocationExpression();
+ alloc.sourceEnd = this.endPosition; //the position has been stored explicitly
+
+ if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+ this.expressionPtr -= length;
+ System.arraycopy(
+ this.expressionStack,
+ this.expressionPtr + 1,
+ alloc.arguments = new Expression[length],
+ 0,
+ length);
+ }
+ alloc.type = getTypeReference(0);
+
+ length = this.genericsLengthStack[this.genericsLengthPtr--];
+ this.genericsPtr -= length;
+ System.arraycopy(this.genericsStack, this.genericsPtr + 1, alloc.typeArguments = new TypeReference[length], 0, length);
+ // TODO (olivier) bug 67790 remove once DOMParser is activated
+ intPtr--;
+
+ //the default constructor with the correct number of argument
+ //will be created and added by the TC (see createsInternalConstructorWithBinding)
+ alloc.sourceStart = this.intStack[this.intPtr--];
+ pushOnExpressionStack(alloc);
+ } else {
+ dispatchDeclarationInto(length);
+ TypeDeclaration anonymousTypeDeclaration = (TypeDeclaration)this.astStack[this.astPtr];
+ anonymousTypeDeclaration.declarationSourceEnd = this.endStatementPosition;
+ anonymousTypeDeclaration.bodyEnd = this.endStatementPosition;
+ if (length == 0 && !containsComment(anonymousTypeDeclaration.bodyStart, anonymousTypeDeclaration.bodyEnd)) {
+ anonymousTypeDeclaration.bits |= ASTNode.UndocumentedEmptyBlockMASK;
+ }
+ this.astPtr--;
+ this.astLengthPtr--;
+
+ QualifiedAllocationExpression anonymousTypeDeclarationAllocationExpression = anonymousTypeDeclaration.allocation;
+ if (anonymousTypeDeclarationAllocationExpression != null) {
+ anonymousTypeDeclarationAllocationExpression.sourceEnd = this.endStatementPosition;
+ // handle type arguments
+ length = this.genericsLengthStack[this.genericsLengthPtr--];
+ this.genericsPtr -= length;
+ System.arraycopy(this.genericsStack, this.genericsPtr + 1, anonymousTypeDeclarationAllocationExpression.typeArguments = new TypeReference[length], 0, length);
+ }
+
+ // mark initializers with local type mark if needed
+ markInitializersWithLocalType(anonymousTypeDeclaration);
+ }
+}
+protected void consumeClassOrInterface() {
+ this.genericsIdentifiersLengthStack[this.genericsIdentifiersLengthPtr] += this.identifierLengthStack[this.identifierLengthPtr];
+ pushOnGenericsLengthStack(0); // handle type arguments
+}
+protected void consumeClassOrInterfaceName() {
+ pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
+ pushOnGenericsLengthStack(0); // handle type arguments
+}
+protected void consumeClassTypeElt() {
+ // ClassTypeElt ::= ClassType
+ pushOnAstStack(getTypeReference(0));
+ /* if incomplete thrown exception list, this.listLength counter will not have been reset,
+ indicating that some items are available on the stack */
+ this.listLength++;
+}
+protected void consumeClassTypeList() {
+ // ClassTypeList ::= ClassTypeList ',' ClassTypeElt
+ optimizedConcatNodeLists();
+}
+protected void consumeCompilationUnit() {
+ // CompilationUnit ::= EnterCompilationUnit InternalCompilationUnit
+ // do nothing by default
+}
+protected void consumeConditionalExpression(int op) {
+ // ConditionalExpression ::= ConditionalOrExpression '?' Expression ':' ConditionalExpression
+ //optimize the push/pop
+ this.intPtr -= 2;//consume position of the question mark
+ this.expressionPtr -= 2;
+ this.expressionLengthPtr -= 2;
+ this.expressionStack[this.expressionPtr] =
+ new ConditionalExpression(
+ this.expressionStack[this.expressionPtr],
+ this.expressionStack[this.expressionPtr + 1],
+ this.expressionStack[this.expressionPtr + 2]);
+}
+/**
+ * @param op
+ */
+protected void consumeConditionalExpressionWithName(int op) {
+ // ConditionalExpression ::= Name '?' Expression ':' ConditionalExpression
+ this.intPtr -= 2;//consume position of the question mark
+ pushOnExpressionStack(getUnspecifiedReferenceOptimized());
+ this.expressionPtr -= 2;
+ this.expressionLengthPtr -= 2;
+ this.expressionStack[this.expressionPtr] =
+ new ConditionalExpression(
+ this.expressionStack[this.expressionPtr + 2],
+ this.expressionStack[this.expressionPtr],
+ this.expressionStack[this.expressionPtr + 1]);
+}
+protected void consumeConstructorBlockStatements() {
+ // ConstructorBody ::= NestedMethod '{' ExplicitConstructorInvocation BlockStatements '}'
+ concatNodeLists(); // explictly add the first statement into the list of statements
+}
+protected void consumeConstructorBody() {
+ // ConstructorBody ::= NestedMethod '{' BlockStatementsopt '}'
+ // ConstructorBody ::= NestedMethod '{' ExplicitConstructorInvocation '}'
+ this.nestedMethod[this.nestedType] --;
+}
+protected void consumeConstructorDeclaration() {
+ // ConstructorDeclaration ::= ConstructorHeader ConstructorBody
+
+ /*
+ this.astStack : MethodDeclaration statements
+ this.identifierStack : name
+ ==>
+ this.astStack : MethodDeclaration
+ this.identifierStack :
+ */
+
+ //must provide a default constructor call when needed
+
+ int length;
+
+ // pop the position of the { (body of the method) pushed in block decl
+ this.intPtr--;
+ this.intPtr--;
+
+ //statements
+ this.realBlockPtr--;
+ ExplicitConstructorCall constructorCall = null;
+ Statement[] statements = null;
+ if ((length = this.astLengthStack[this.astLengthPtr--]) != 0) {
+ this.astPtr -= length;
+ if (this.astStack[this.astPtr + 1] instanceof ExplicitConstructorCall) {
+ //avoid a isSomeThing that would only be used here BUT what is faster between two alternatives ?
+ System.arraycopy(
+ this.astStack,
+ this.astPtr + 2,
+ statements = new Statement[length - 1],
+ 0,
+ length - 1);
+ constructorCall = (ExplicitConstructorCall) this.astStack[this.astPtr + 1];
+ } else { //need to add explicitly the super();
+ System.arraycopy(
+ this.astStack,
+ this.astPtr + 1,
+ statements = new Statement[length],
+ 0,
+ length);
+ constructorCall = SuperReference.implicitSuperConstructorCall();
+ }
+ } else {
+ boolean insideFieldInitializer = false;
+ if (this.diet) {
+ for (int i = this.nestedType; i > 0; i--){
+ if (this.variablesCounter[i] > 0) {
+ insideFieldInitializer = true;
+ break;
+ }
+ }
+ }
+
+ if (!this.diet || insideFieldInitializer){
+ // add it only in non-diet mode, if diet_bodies, then constructor call will be added elsewhere.
+ constructorCall = SuperReference.implicitSuperConstructorCall();
+ }
+ }
+
+ // now we know that the top of stack is a constructorDeclaration
+ ConstructorDeclaration cd = (ConstructorDeclaration) this.astStack[this.astPtr];
+ cd.constructorCall = constructorCall;
+ cd.statements = statements;
+
+ //highlight of the implicit call on the method name
+ if (constructorCall != null && cd.constructorCall.sourceEnd == 0) {
+ cd.constructorCall.sourceEnd = cd.sourceEnd;
+ cd.constructorCall.sourceStart = cd.sourceStart;
+ }
+
+ if (!this.diet && (statements == null && constructorCall.isImplicitSuper())) {
+ if (!containsComment(cd.bodyStart, this.endPosition)) {
+ cd.bits |= ASTNode.UndocumentedEmptyBlockMASK;
+ }
+ }
+
+ //watch for } that could be given as a unicode ! ( u007D is '}' )
+ // store the this.endPosition (position just before the '}') in case there is
+ // a trailing comment behind the end of the method
+ cd.bodyEnd = this.endPosition;
+ cd.declarationSourceEnd = flushCommentsDefinedPriorTo(this.endStatementPosition);
+}
+protected void consumeConstructorHeader() {
+ // ConstructorHeader ::= ConstructorHeaderName MethodHeaderParameters MethodHeaderThrowsClauseopt
+
+ AbstractMethodDeclaration method = (AbstractMethodDeclaration)this.astStack[this.astPtr];
+
+ if (this.currentToken == TokenNameLBRACE){
+ method.bodyStart = this.scanner.currentPosition;
+ }
+ // recovery
+ if (this.currentElement != null){
+ if (this.currentToken == TokenNameSEMICOLON){ // for invalid constructors
+ method.modifiers |= AccSemicolonBody;
+ method.declarationSourceEnd = this.scanner.currentPosition-1;
+ method.bodyEnd = this.scanner.currentPosition-1;
+ if (this.currentElement.parseTree() == method && this.currentElement.parent != null) {
+ this.currentElement = this.currentElement.parent;
+ }
+ }
+ this.restartRecovery = true; // used to avoid branching back into the regular automaton
+ }
+}
+protected void consumeConstructorHeaderName() {
+
+ /* recovering - might be an empty message send */
+ if (this.currentElement != null){
+ if (this.lastIgnoredToken == TokenNamenew){ // was an allocation expression
+ this.lastCheckPoint = this.scanner.startPosition; // force to restart at this exact position
+ this.restartRecovery = true;
+ return;
+ }
+ }
+
+ // ConstructorHeaderName ::= Modifiersopt 'Identifier' '('
+ ConstructorDeclaration cd = new ConstructorDeclaration(this.compilationUnit.compilationResult);
+
+ //name -- this is not really revelant but we do .....
+ cd.selector = this.identifierStack[this.identifierPtr];
+ long selectorSource = this.identifierPositionStack[this.identifierPtr--];
+ this.identifierLengthPtr--;
+
+ //modifiers
+ cd.declarationSourceStart = this.intStack[this.intPtr--];
+ cd.modifiers = this.intStack[this.intPtr--];
+ // consume annotations
+ int length;
+ if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+ System.arraycopy(
+ this.expressionStack,
+ (this.expressionPtr -= length) + 1,
+ cd.annotations = new Annotation[length],
+ 0,
+ length);
+ }
+ // javadoc
+ cd.javadoc = this.javadoc;
+ this.javadoc = null;
+
+ //highlight starts at the selector starts
+ cd.sourceStart = (int) (selectorSource >>> 32);
+ pushOnAstStack(cd);
+ cd.sourceEnd = this.lParenPos;
+ cd.bodyStart = this.lParenPos+1;
+ this.listLength = 0; // initialize this.listLength before reading parameters/throws
+
+ // recovery
+ if (this.currentElement != null){
+ this.lastCheckPoint = cd.bodyStart;
+ if ((this.currentElement instanceof RecoveredType && this.lastIgnoredToken != TokenNameDOT)
+ || cd.modifiers != 0){
+ this.currentElement = this.currentElement.add(cd, 0);
+ this.lastIgnoredToken = -1;
+ }
+ }
+}
+protected void consumeConstructorHeaderNameWithTypeParameters() {
+
+ /* recovering - might be an empty message send */
+ if (this.currentElement != null){
+ if (this.lastIgnoredToken == TokenNamenew){ // was an allocation expression
+ this.lastCheckPoint = this.scanner.startPosition; // force to restart at this exact position
+ this.restartRecovery = true;
+ return;
+ }
+ }
+
+ // ConstructorHeaderName ::= Modifiersopt TypeParameters 'Identifier' '('
+ ConstructorDeclaration cd = new ConstructorDeclaration(this.compilationUnit.compilationResult);
+
+ //name -- this is not really revelant but we do .....
+ cd.selector = this.identifierStack[this.identifierPtr];
+ long selectorSource = this.identifierPositionStack[this.identifierPtr--];
+ this.identifierLengthPtr--;
+
+ // consume type parameters
+ int length = this.genericsLengthStack[this.genericsLengthPtr--];
+ this.genericsPtr -= length;
+ System.arraycopy(this.genericsStack, this.genericsPtr + 1, cd.typeParameters = new TypeParameter[length], 0, length);
+
+ //modifiers
+ cd.declarationSourceStart = this.intStack[this.intPtr--];
+ cd.modifiers = this.intStack[this.intPtr--];
+ // consume annotations
+ if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+ System.arraycopy(
+ this.expressionStack,
+ (this.expressionPtr -= length) + 1,
+ cd.annotations = new Annotation[length],
+ 0,
+ length);
+ }
+ // javadoc
+ cd.javadoc = this.javadoc;
+ this.javadoc = null;
+
+ //highlight starts at the selector starts
+ cd.sourceStart = (int) (selectorSource >>> 32);
+ pushOnAstStack(cd);
+ cd.sourceEnd = this.lParenPos;
+ cd.bodyStart = this.lParenPos+1;
+ this.listLength = 0; // initialize this.listLength before reading parameters/throws
+
+ // recovery
+ if (this.currentElement != null){
+ this.lastCheckPoint = cd.bodyStart;
+ if ((this.currentElement instanceof RecoveredType && this.lastIgnoredToken != TokenNameDOT)
+ || cd.modifiers != 0){
+ this.currentElement = this.currentElement.add(cd, 0);
+ this.lastIgnoredToken = -1;
+ }
+ }
+}
+protected void consumeDefaultLabel() {
+ // SwitchLabel ::= 'default' ':'
+ pushOnAstStack(new CaseStatement(null, this.intStack[this.intPtr--], this.intStack[this.intPtr--]));
+}
+protected void consumeDefaultModifiers() {
+ checkComment(); // might update modifiers with AccDeprecated
+ pushOnIntStack(this.modifiers); // modifiers
+ pushOnIntStack(
+ this.modifiersSourceStart >= 0 ? this.modifiersSourceStart : this.scanner.startPosition);
+ resetModifiers();
+ pushOnExpressionStackLengthStack(0); // no annotation
+}
+protected void consumeDiet() {
+ // Diet ::= $empty
+ checkComment();
+ pushOnIntStack(this.modifiersSourceStart); // push the start position of a javadoc comment if there is one
+ resetModifiers();
+ jumpOverMethodBody();
+}
+protected void consumeDims() {
+ // Dims ::= DimsLoop
+ pushOnIntStack(this.dimensions);
+ this.dimensions = 0;
+}
+protected void consumeDimWithOrWithOutExpr() {
+ // DimWithOrWithOutExpr ::= '[' ']'
+ pushOnExpressionStack(null);
+
+ if(this.currentElement != null && this.currentToken == TokenNameLBRACE) {
+ this.ignoreNextOpeningBrace = true;
+ this.currentElement.bracketBalance++;
+ }
+}
+protected void consumeDimWithOrWithOutExprs() {
+ // DimWithOrWithOutExprs ::= DimWithOrWithOutExprs DimWithOrWithOutExpr
+ concatExpressionLists();
+}
+protected void consumeEmptyAnnotationTypeMemberDeclarationsopt() {
+ // AnnotationTypeMemberDeclarationsopt ::= $empty
+ pushOnAstLengthStack(0);
+}
+protected void consumeEmptyArgumentListopt() {
+ // ArgumentListopt ::= $empty
+ pushOnExpressionStackLengthStack(0);
+}
+protected void consumeEmptyArguments() {
+ // Argumentsopt ::= $empty
+ pushOnExpressionStackLengthStack(0);
+}
+protected void consumeEmptyArrayInitializer() {
+ // ArrayInitializer ::= '{' ,opt '}'
+ arrayInitializer(0);
+}
+protected void consumeEmptyArrayInitializeropt() {
+ // ArrayInitializeropt ::= $empty
+ pushOnExpressionStackLengthStack(0);
+}
+protected void consumeEmptyBlockStatementsopt() {
+ // BlockStatementsopt ::= $empty
+ pushOnAstLengthStack(0);
+}
+protected void consumeEmptyCatchesopt() {
+ // Catchesopt ::= $empty
+ pushOnAstLengthStack(0);
+}
+protected void consumeEmptyClassBodyDeclarationsopt() {
+ // ClassBodyDeclarationsopt ::= $empty
+ pushOnAstLengthStack(0);
+}
+protected void consumeEmptyClassMemberDeclaration() {
+ // ClassMemberDeclaration ::= ';'
+ pushOnAstLengthStack(0);
+ problemReporter().superfluousSemicolon(this.endPosition+1, this.endStatementPosition);
+ flushCommentsDefinedPriorTo(this.endStatementPosition);
+}
+protected void consumeEmptyDefaultValue() {
+ // DefaultValueopt ::= $empty
+ pushOnExpressionStackLengthStack(0);
+}
+protected void consumeEmptyDimsopt() {
+ // Dimsopt ::= $empty
+ pushOnIntStack(0);
+}
+protected void consumeEmptyEnumDeclarations() {
+ // EnumBodyDeclarationsopt ::= $empty
+ pushOnAstLengthStack(0);
+}
+protected void consumeEmptyExpression() {
+ // Expressionopt ::= $empty
+ pushOnExpressionStackLengthStack(0);
+}
+protected void consumeEmptyForInitopt() {
+ // ForInitopt ::= $empty
+ pushOnAstLengthStack(0);
+}
+protected void consumeEmptyForUpdateopt() {
+ // ForUpdateopt ::= $empty
+ pushOnExpressionStackLengthStack(0);
+}
+protected void consumeEmptyInterfaceMemberDeclaration() {
+ // InterfaceMemberDeclaration ::= ';'
+ pushOnAstLengthStack(0);
+}
+protected void consumeEmptyInterfaceMemberDeclarationsopt() {
+ // InterfaceMemberDeclarationsopt ::= $empty
+ pushOnAstLengthStack(0);
+}
+protected void consumeEmptyInternalCompilationUnit() {
+ // InternalCompilationUnit ::= $empty
+ // nothing to do by default
+}
+protected void consumeEmptyMemberValuePairsopt() {
+ // MemberValuePairsopt ::= $empty
+ pushOnAstLengthStack(0);
+}
+protected void consumeEmptyMemberValueArrayInitializer() {
+ // MemberValueArrayInitializer ::= '{' ',' '}'
+ // MemberValueArrayInitializer ::= '{' '}'
+ arrayInitializer(0);
+}
+protected void consumeEmptyStatement() {
+ // EmptyStatement ::= ';'
+ if (this.scanner.source[this.endStatementPosition] == ';') {
+ pushOnAstStack(new EmptyStatement(this.endStatementPosition, this.endStatementPosition));
+ } else {
+ // we have a Unicode for the ';' (/u003B)
+ pushOnAstStack(new EmptyStatement(this.endStatementPosition - 5, this.endStatementPosition));
+ }
+}
+protected void consumeEmptySwitchBlock() {
+ // SwitchBlock ::= '{' '}'
+ pushOnAstLengthStack(0);
+}
+protected void consumeEmptyTypeDeclaration() {
+ // TypeDeclaration ::= ';'
+ pushOnAstLengthStack(0);
+ problemReporter().superfluousSemicolon(this.endPosition+1, this.endStatementPosition);
+ flushCommentsDefinedPriorTo(this.endStatementPosition);
+}
+protected void consumeEnhancedForStatementHeader(boolean hasModifiers){
+ // EnhancedForStatementHeader ::= 'for' '(' Type PushModifiers Identifier Dimsopt ':' Expression ')'
+ // EnhancedForStatementHeader ::= 'for' '(' Modifiers Type PushRealModifiers Identifier Dimsopt ':' Expression ')'
+ TypeReference type;
+
+ char[] identifierName = this.identifierStack[this.identifierPtr];
+ long namePosition = this.identifierPositionStack[this.identifierPtr];
+
+ LocalDeclaration localDeclaration = createLocalDeclaration(identifierName, (int) (namePosition >>> 32), (int) namePosition);
+ localDeclaration.declarationSourceEnd = localDeclaration.declarationEnd;
+
+ int extraDims = this.intStack[this.intPtr--];
+ this.identifierPtr--;
+ this.identifierLengthPtr--;
+ // remove fake modifiers/modifiers start
+ int declarationSourceStart = 0;
+ int modifiersValue = 0;
+ if (hasModifiers) {
+ declarationSourceStart = this.intStack[this.intPtr--];
+ modifiersValue = this.intStack[this.intPtr--];
+ } else {
+ this.intPtr-=2;
+ }
+
+ //updates are on the expression stack
+ this.expressionLengthPtr--;
+ Expression collection = this.expressionStack[this.expressionPtr--];
+
+ type = getTypeReference(this.intStack[this.intPtr--] + extraDims); // type dimension
+
+ // consume annotations
+ int length;
+ if ((length = this.expressionLengthStack[this.expressionLengthPtr--])!= 0) {
+ System.arraycopy(
+ this.expressionStack,
+ (this.expressionPtr -= length) + 1,
+ localDeclaration.annotations = new Annotation[length],
+ 0,
+ length);
+ }
+ if (hasModifiers) {
+ localDeclaration.declarationSourceStart = declarationSourceStart;
+ localDeclaration.modifiers = modifiersValue;
+ } else {
+ localDeclaration.declarationSourceStart = type.sourceStart;
+ }
+ localDeclaration.type = type;
+
+ ForeachStatement iteratorForStatement =
+ new ForeachStatement(
+ localDeclaration,
+ collection,
+ this.intStack[this.intPtr--]);
+ pushOnAstStack(iteratorForStatement);
+
+ if(options.sourceLevel < ClassFileConstants.JDK1_5 &&
+ this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
+ this.problemReporter().invalidUsageOfForeachStatements(localDeclaration, collection);
+ }
+}
+protected void consumeEnhancedForStatement() {
+ // EnhancedForStatement ::= EnhancedForStatementHeader Statement
+ // EnhancedForStatementNoShortIf ::= EnhancedForStatementHeader StatementNoShortIf
+
+ //statements
+ this.astLengthPtr--;
+ Statement statement = (Statement) this.astStack[this.astPtr--];
+
+ // foreach statement is on the ast stack
+ ForeachStatement foreachStatement = (ForeachStatement) this.astStack[this.astPtr];
+ foreachStatement.action = statement;
+ // remember useful empty statement
+ if (statement instanceof EmptyStatement) statement.bits |= ASTNode.IsUsefulEmptyStatementMASK;
+
+ foreachStatement.sourceEnd = this.endStatementPosition;
+}
+protected void consumeEnterAnonymousClassBody() {
+ // EnterAnonymousClassBody ::= $empty
+ TypeReference typeReference = getTypeReference(0);
+
+ QualifiedAllocationExpression alloc;
+ TypeDeclaration anonymousType = new TypeDeclaration(this.compilationUnit.compilationResult);
+ anonymousType.name = TypeDeclaration.ANONYMOUS_EMPTY_NAME;
+ anonymousType.bits |= ASTNode.AnonymousAndLocalMask;
+ alloc = anonymousType.allocation = new QualifiedAllocationExpression(anonymousType);
+ markEnclosingMemberWithLocalType();
+ pushOnAstStack(anonymousType);
+
+ alloc.sourceEnd = this.rParenPos; //the position has been stored explicitly
+ int argumentLength;
+ if ((argumentLength = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+ this.expressionPtr -= argumentLength;
+ System.arraycopy(
+ this.expressionStack,
+ this.expressionPtr + 1,
+ alloc.arguments = new Expression[argumentLength],
+ 0,
+ argumentLength);
+ }
+ alloc.type = typeReference;
+
+ anonymousType.sourceEnd = alloc.sourceEnd;
+ //position at the type while it impacts the anonymous declaration
+ anonymousType.sourceStart = anonymousType.declarationSourceStart = alloc.type.sourceStart;
+ alloc.sourceStart = this.intStack[this.intPtr--];
+ pushOnExpressionStack(alloc);
+
+ anonymousType.bodyStart = this.scanner.currentPosition;
+ this.listLength = 0; // will be updated when reading super-interfaces
+ // recovery
+ if (this.currentElement != null){
+ this.lastCheckPoint = anonymousType.bodyStart;
+ this.currentElement = this.currentElement.add(anonymousType, 0);
+ this.currentToken = 0; // opening brace already taken into account
+ this.lastIgnoredToken = -1;
+ }
+}
+protected void consumeEnterAnonymousClassBodySimpleName() {
+ // EnterAnonymousClassBody ::= $empty
+ pushOnGenericsLengthStack(0);
+ pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
+ TypeReference typeReference = getTypeReference(0);
+
+ QualifiedAllocationExpression alloc;
+ TypeDeclaration anonymousType = new TypeDeclaration(this.compilationUnit.compilationResult);
+ anonymousType.name = TypeDeclaration.ANONYMOUS_EMPTY_NAME;
+ anonymousType.bits |= ASTNode.AnonymousAndLocalMask;
+ alloc = anonymousType.allocation = new QualifiedAllocationExpression(anonymousType);
+ markEnclosingMemberWithLocalType();
+ pushOnAstStack(anonymousType);
+
+ alloc.sourceEnd = this.rParenPos; //the position has been stored explicitly
+ int argumentLength;
+ if ((argumentLength = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+ this.expressionPtr -= argumentLength;
+ System.arraycopy(
+ this.expressionStack,
+ this.expressionPtr + 1,
+ alloc.arguments = new Expression[argumentLength],
+ 0,
+ argumentLength);
+ }
+ alloc.type = typeReference;
+
+ anonymousType.sourceEnd = alloc.sourceEnd;
+ //position at the type while it impacts the anonymous declaration
+ anonymousType.sourceStart = anonymousType.declarationSourceStart = alloc.type.sourceStart;
+ alloc.sourceStart = this.intStack[this.intPtr--];
+ pushOnExpressionStack(alloc);
+
+ anonymousType.bodyStart = this.scanner.currentPosition;
+ this.listLength = 0; // will be updated when reading super-interfaces
+ // recovery
+ if (this.currentElement != null){
+ this.lastCheckPoint = anonymousType.bodyStart;
+ this.currentElement = this.currentElement.add(anonymousType, 0);
+ this.currentToken = 0; // opening brace already taken into account
+ this.lastIgnoredToken = -1;
+ }
+}
+protected void consumeEnterCompilationUnit() {
+ // EnterCompilationUnit ::= $empty
+ // do nothing by default
+}
+protected void consumeEnterVariable() {
+ // EnterVariable ::= $empty
+ // do nothing by default
+
+ char[] identifierName = this.identifierStack[this.identifierPtr];
+ long namePosition = this.identifierPositionStack[this.identifierPtr];
+ int extendedDimension = this.intStack[this.intPtr--];
+ AbstractVariableDeclaration declaration;
+ // create the ast node
+ boolean isLocalDeclaration = this.nestedMethod[this.nestedType] != 0;
+ if (isLocalDeclaration) {
+ // create the local variable declarations
+ declaration =
+ this.createLocalDeclaration(identifierName, (int) (namePosition >>> 32), (int) namePosition);
+ } else {
+ // create the field declaration
+ declaration =
+ this.createFieldDeclaration(identifierName, (int) (namePosition >>> 32), (int) namePosition);
+ }
+
+ this.identifierPtr--;
+ this.identifierLengthPtr--;
+ TypeReference type;
+ int variableIndex = this.variablesCounter[this.nestedType];
+ int typeDim = 0;
+ if (variableIndex == 0) {
+ // first variable of the declaration (FieldDeclaration or LocalDeclaration)
+ if (isLocalDeclaration) {
+ declaration.declarationSourceStart = this.intStack[this.intPtr--];
+ declaration.modifiers = this.intStack[this.intPtr--];
+ // consume annotations
+ int length;
+ if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+ System.arraycopy(
+ this.expressionStack,
+ (this.expressionPtr -= length) + 1,
+ declaration.annotations = new Annotation[length],
+ 0,
+ length);
+ }
+ type = getTypeReference(typeDim = this.intStack[this.intPtr--]); // type dimension
+ if (declaration.declarationSourceStart == -1) {
+ // this is true if there is no modifiers for the local variable declaration
+ declaration.declarationSourceStart = type.sourceStart;
+ }
+ pushOnAstStack(type);
+ } else {
+ type = getTypeReference(typeDim = this.intStack[this.intPtr--]); // type dimension
+ pushOnAstStack(type);
+ declaration.declarationSourceStart = this.intStack[this.intPtr--];
+ declaration.modifiers = this.intStack[this.intPtr--];
+ // consume annotations
+ int length;
+ if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+ System.arraycopy(
+ this.expressionStack,
+ (this.expressionPtr -= length) + 1,
+ declaration.annotations = new Annotation[length],
+ 0,
+ length);
+ }
+ // Store javadoc only on first declaration as it is the same for all ones
+ FieldDeclaration fieldDeclaration = (FieldDeclaration) declaration;
+ fieldDeclaration.javadoc = this.javadoc;
+ this.javadoc = null;
+ }
+ } else {
+ type = (TypeReference) this.astStack[this.astPtr - variableIndex];
+ typeDim = type.dimensions();
+ AbstractVariableDeclaration previousVariable =
+ (AbstractVariableDeclaration) this.astStack[this.astPtr];
+ declaration.declarationSourceStart = previousVariable.declarationSourceStart;
+ declaration.modifiers = previousVariable.modifiers;
+ }
+
+ if (extendedDimension == 0) {
+ declaration.type = type;
+ } else {
+ int dimension = typeDim + extendedDimension;
+ //on the this.identifierLengthStack there is the information about the type....
+ int baseType;
+ if ((baseType = this.identifierLengthStack[this.identifierLengthPtr + 1]) < 0) {
+ //it was a baseType
+ int typeSourceStart = type.sourceStart;
+ int typeSourceEnd = type.sourceEnd;
+ type = TypeReference.baseTypeReference(-baseType, dimension);
+ type.sourceStart = typeSourceStart;
+ type.sourceEnd = typeSourceEnd;
+ declaration.type = type;
+ } else {
+ declaration.type = this.copyDims(type, dimension);
+ }
+ }
+ this.variablesCounter[this.nestedType]++;
+ pushOnAstStack(declaration);
+ // recovery
+ if (this.currentElement != null) {
+ if (!(this.currentElement instanceof RecoveredType)
+ && (this.currentToken == TokenNameDOT
+ //|| declaration.modifiers != 0
+ || (this.scanner.getLineNumber(declaration.type.sourceStart)
+ != this.scanner.getLineNumber((int) (namePosition >>> 32))))){
+ this.lastCheckPoint = (int) (namePosition >>> 32);
+ this.restartRecovery = true;
+ return;
+ }
+ if (isLocalDeclaration){
+ LocalDeclaration localDecl = (LocalDeclaration) this.astStack[this.astPtr];
+ this.lastCheckPoint = localDecl.sourceEnd + 1;
+ this.currentElement = this.currentElement.add(localDecl, 0);
+ } else {
+ FieldDeclaration fieldDecl = (FieldDeclaration) this.astStack[this.astPtr];
+ this.lastCheckPoint = fieldDecl.sourceEnd + 1;
+ this.currentElement = this.currentElement.add(fieldDecl, 0);
+ }
+ this.lastIgnoredToken = -1;
+ }
+}
+protected void consumeEnumBodyNoConstants() {
+ // nothing to do
+ // The 0 on the astLengthStack has been pushed by EnumBodyDeclarationsopt
+}
+protected void consumeEnumBodyWithConstants() {
+ // merge the constants values with the class body
+ concatNodeLists();
+}
+protected void consumeEnumConstantHeader() {
+ EnumConstant enumConstant = new EnumConstant(this.compilationUnit.compilationResult);
+ long pos = this.identifierPositionStack[this.identifierPtr];
+ int enumConstantEnd = (int) pos;
+ enumConstant.sourceEnd = enumConstantEnd;
+ final int start = (int) (pos >>> 32);
+ enumConstant.sourceStart = start;
+ enumConstant.declarationSourceStart = start;
+ enumConstant.name = this.identifierStack[this.identifierPtr--];
+ this.identifierLengthPtr--;
+
+ // fill arguments if needed
+ int length;
+ if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+ this.expressionPtr -= length;
+ System.arraycopy(
+ this.expressionStack,
+ this.expressionPtr + 1,
+ enumConstant.arguments = new Expression[length],
+ 0,
+ length);
+ enumConstant.declarationSourceEnd = flushCommentsDefinedPriorTo(rParenPos);
+ enumConstant.bodyStart = rParenPos;
+ enumConstant.bodyEnd = rParenPos;
+ } else {
+ if (enumConstantEnd <= rParenPos) {
+ enumConstant.bodyEnd = rParenPos;
+ } else {
+ enumConstant.bodyEnd = enumConstantEnd;
+ }
+ }
+
+ if (this.currentToken == TokenNameLBRACE) {
+ enumConstant.bodyStart = this.scanner.currentPosition;
+ }
+
+ pushOnAstStack(enumConstant);
+}
+protected void consumeEnumConstantNoClassBody() {
+ EnumConstant enumConstant = (EnumConstant) this.astStack[this.astPtr];
+ // use to set that this enumConstant has no class body
+ enumConstant.modifiers |= CompilerModifiers.AccSemicolonBody;
+}
+protected void consumeEnumConstants() {
+ concatNodeLists();
+}
+protected void consumeEnumConstantWithClassBody() {
+ dispatchDeclarationInto(this.astLengthStack[this.astLengthPtr--]);
+ EnumConstant enumConstant = (EnumConstant) this.astStack[this.astPtr];
+ enumConstant.modifiers = 0;
+ enumConstant.bodyEnd = this.endPosition;
+ enumConstant.declarationSourceEnd = flushCommentsDefinedPriorTo(this.endStatementPosition);
+}
+protected void consumeEnumDeclaration() {
+ // EnumDeclaration ::= EnumHeader ClassHeaderImplementsopt EnumBody
+ int length;
+ if ((length = this.astLengthStack[this.astLengthPtr--]) != 0) {
+ //there are length declarations
+ //dispatch according to the type of the declarations
+ dispatchDeclarationIntoEnumDeclaration(length);
+ }
+
+ EnumDeclaration enumDeclaration = (EnumDeclaration) this.astStack[this.astPtr];
+
+ // mark initializers with local type mark if needed
+ markInitializersWithLocalType(enumDeclaration);
+
+ //convert constructor that do not have the type's name into methods
+ boolean hasConstructor = enumDeclaration.checkConstructors(this);
+
+ //add the default constructor when needed (interface don't have it)
+ if (!hasConstructor && !enumDeclaration.isInterface()) {
+ boolean insideFieldInitializer = false;
+ if (this.diet) {
+ for (int i = this.nestedType; i > 0; i--){
+ if (this.variablesCounter[i] > 0) {
+ insideFieldInitializer = true;
+ break;
+ }
+ }
+ }
+ enumDeclaration.createsInternalConstructor(!this.diet || insideFieldInitializer, true);
+ }
+
+ //always add <clinit> (will be remove at code gen time if empty)
+ if (this.scanner.containsAssertKeyword) {
+ enumDeclaration.bits |= ASTNode.AddAssertionMASK;
+ }
+ enumDeclaration.addClinit();
+ enumDeclaration.bodyEnd = this.endStatementPosition;
+ if (length == 0 && !containsComment(enumDeclaration.bodyStart, enumDeclaration.bodyEnd)) {
+ enumDeclaration.bits |= ASTNode.UndocumentedEmptyBlockMASK;
+ }
+
+ enumDeclaration.declarationSourceEnd = flushCommentsDefinedPriorTo(this.endStatementPosition);
+}
+protected void consumeEnumDeclarations() {
+ // Do nothing by default
+}
+protected void consumeEnumHeader() {
+ // EnumHeader ::= Modifiersopt 'enum' Identifier
+ EnumDeclaration enumDeclaration;
+ if (this.nestedMethod[this.nestedType] == 0) {
+ if (this.nestedType != 0) {
+ enumDeclaration = new EnumDeclaration(this.compilationUnit.compilationResult);
+ } else {
+ enumDeclaration = new EnumDeclaration(this.compilationUnit.compilationResult);
+ }
+ } else {
+ // Record that the block has a declaration for local types
+ enumDeclaration = new EnumDeclaration(this.compilationUnit.compilationResult);
+// markEnclosingMemberWithLocalType();
+ blockReal();
+ }
+ //highlight the name of the type
+ long pos = this.identifierPositionStack[this.identifierPtr];
+ enumDeclaration.sourceEnd = (int) pos;
+ enumDeclaration.sourceStart = (int) (pos >>> 32);
+ enumDeclaration.name = this.identifierStack[this.identifierPtr--];
+ this.identifierLengthPtr--;
+
+ //compute the declaration source too
+ // 'class' and 'interface' push two int positions: the beginning of the class token and its end.
+ // we want to keep the beginning position but get rid of the end position
+ // it is only used for the ClassLiteralAccess positions.
+ enumDeclaration.declarationSourceStart = this.intStack[this.intPtr--];
+ this.intPtr--; // remove the end position of the class token
+
+ enumDeclaration.modifiersSourceStart = this.intStack[this.intPtr--];
+ enumDeclaration.modifiers = this.intStack[this.intPtr--];
+ if (enumDeclaration.modifiersSourceStart >= 0) {
+ enumDeclaration.declarationSourceStart = enumDeclaration.modifiersSourceStart;
+ }
+ // consume annotations
+ int length;
+ if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+ System.arraycopy(
+ this.expressionStack,
+ (this.expressionPtr -= length) + 1,
+ enumDeclaration.annotations = new Annotation[length],
+ 0,
+ length);
+ }
+ if (this.currentToken == TokenNameLBRACE) {
+ enumDeclaration.bodyStart = this.scanner.currentPosition;
+ }
+ pushOnAstStack(enumDeclaration);
+
+ this.listLength = 0; // will be updated when reading super-interfaces
+
+ if(options.sourceLevel < ClassFileConstants.JDK1_5 &&
+ this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
+ //TODO this code will be never run while 'enum' is an identifier in 1.3 scanner
+ this.problemReporter().invalidUsageOfEnumDeclarations(enumDeclaration);
+ }
+
+ // recovery
+ if (this.currentElement != null){
+ this.lastCheckPoint = enumDeclaration.bodyStart;
+ this.currentElement = this.currentElement.add(enumDeclaration, 0);
+ this.lastIgnoredToken = -1;
+ }
+ // javadoc
+ enumDeclaration.javadoc = this.javadoc;
+ this.javadoc = null;
+}
+protected void consumeEqualityExpression(int op) {
+ // EqualityExpression ::= EqualityExpression '==' RelationalExpression
+ // EqualityExpression ::= EqualityExpression '!=' RelationalExpression
+
+ //optimize the push/pop
+
+ this.expressionPtr--;
+ this.expressionLengthPtr--;
+ this.expressionStack[this.expressionPtr] =
+ new EqualExpression(
+ this.expressionStack[this.expressionPtr],
+ this.expressionStack[this.expressionPtr + 1],
+ op);
+}
+/*
+ * @param op
+ */
+protected void consumeEqualityExpressionWithName(int op) {
+ // EqualityExpression ::= Name '==' RelationalExpression
+ // EqualityExpression ::= Name '!=' RelationalExpression
+ pushOnExpressionStack(getUnspecifiedReferenceOptimized());
+ this.expressionPtr--;
+ this.expressionLengthPtr--;
+ this.expressionStack[this.expressionPtr] =
+ new EqualExpression(
+ this.expressionStack[this.expressionPtr + 1],
+ this.expressionStack[this.expressionPtr],
+ op);
+}
+protected void consumeExitTryBlock() {
+ //ExitTryBlock ::= $empty
+ if(this.currentElement != null) {
+ this.restartRecovery = true;
+ }
+}
+protected void consumeExitVariableWithInitialization() {
+ // ExitVariableWithInitialization ::= $empty
+ // do nothing by default
+ this.expressionLengthPtr--;
+ AbstractVariableDeclaration variableDecl = (AbstractVariableDeclaration) this.astStack[this.astPtr];
+ variableDecl.initialization = this.expressionStack[this.expressionPtr--];
+ // we need to update the declarationSourceEnd of the local variable declaration to the
+ // source end position of the initialization expression
+ variableDecl.declarationSourceEnd = variableDecl.initialization.sourceEnd;
+ variableDecl.declarationEnd = variableDecl.initialization.sourceEnd;
+
+ this.recoveryExitFromVariable();
+}
+protected void consumeExitVariableWithoutInitialization() {
+ // ExitVariableWithoutInitialization ::= $empty
+ // do nothing by default
+
+ AbstractVariableDeclaration variableDecl = (AbstractVariableDeclaration) this.astStack[this.astPtr];
+ variableDecl.declarationSourceEnd = variableDecl.declarationEnd;
+
+ this.recoveryExitFromVariable();
+}
+protected void consumeExplicitConstructorInvocation(int flag, int recFlag) {
+
+ /* flag allows to distinguish 3 cases :
+ (0) :
+ ExplicitConstructorInvocation ::= 'this' '(' ArgumentListopt ')' ';'
+ ExplicitConstructorInvocation ::= 'super' '(' ArgumentListopt ')' ';'
+ (1) :
+ ExplicitConstructorInvocation ::= Primary '.' 'super' '(' ArgumentListopt ')' ';'
+ ExplicitConstructorInvocation ::= Primary '.' 'this' '(' ArgumentListopt ')' ';'
+ (2) :
+ ExplicitConstructorInvocation ::= Name '.' 'super' '(' ArgumentListopt ')' ';'
+ ExplicitConstructorInvocation ::= Name '.' 'this' '(' ArgumentListopt ')' ';'
+ */
+ int startPosition = this.intStack[this.intPtr--];
+ ExplicitConstructorCall ecc = new ExplicitConstructorCall(recFlag);
+ int length;
+ if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+ this.expressionPtr -= length;
+ System.arraycopy(this.expressionStack, this.expressionPtr + 1, ecc.arguments = new Expression[length], 0, length);
+ }
+ switch (flag) {
+ case 0 :
+ ecc.sourceStart = startPosition;
+ break;
+ case 1 :
+ this.expressionLengthPtr--;
+ ecc.sourceStart = (ecc.qualification = this.expressionStack[this.expressionPtr--]).sourceStart;
+ break;
+ case 2 :
+ ecc.sourceStart = (ecc.qualification = getUnspecifiedReferenceOptimized()).sourceStart;
+ break;
+ }
+ pushOnAstStack(ecc);
+ ecc.sourceEnd = this.endPosition;
+}
+protected void consumeExplicitConstructorInvocationWithTypeArguments(int flag, int recFlag) {
+
+ /* flag allows to distinguish 3 cases :
+ (0) :
+ ExplicitConstructorInvocation ::= TypeArguments 'this' '(' ArgumentListopt ')' ';'
+ ExplicitConstructorInvocation ::= TypeArguments 'super' '(' ArgumentListopt ')' ';'
+ (1) :
+ ExplicitConstructorInvocation ::= Primary '.' TypeArguments 'super' '(' ArgumentListopt ')' ';'
+ ExplicitConstructorInvocation ::= Primary '.' TypeArguments 'this' '(' ArgumentListopt ')' ';'
+ (2) :
+ ExplicitConstructorInvocation ::= Name '.' TypeArguments 'super' '(' ArgumentListopt ')' ';'
+ ExplicitConstructorInvocation ::= Name '.' TypeArguments 'this' '(' ArgumentListopt ')' ';'
+ */
+ int startPosition = this.intStack[this.intPtr--];
+ ExplicitConstructorCall ecc = new ExplicitConstructorCall(recFlag);
+ int length;
+ if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+ this.expressionPtr -= length;
+ System.arraycopy(this.expressionStack, this.expressionPtr + 1, ecc.arguments = new Expression[length], 0, length);
+ }
+ length = this.genericsLengthStack[this.genericsLengthPtr--];
+ this.genericsPtr -= length;
+ System.arraycopy(this.genericsStack, this.genericsPtr + 1, ecc.typeArguments = new TypeReference[length], 0, length);
+ // TODO (olivier) bug 67790 remove once DOMParser is activated
+ ecc.typeArgumentsSourceStart = this.intStack[intPtr--];
+
+ switch (flag) {
+ case 0 :
+ ecc.sourceStart = startPosition;
+ break;
+ case 1 :
+ this.expressionLengthPtr--;
+ ecc.sourceStart = (ecc.qualification = this.expressionStack[this.expressionPtr--]).sourceStart;
+ break;
+ case 2 :
+ ecc.sourceStart = (ecc.qualification = getUnspecifiedReferenceOptimized()).sourceStart;
+ break;
+ }
+
+ pushOnAstStack(ecc);
+ ecc.sourceEnd = this.endPosition;
+}
+protected void consumeExpressionStatement() {
+ // ExpressionStatement ::= StatementExpression ';'
+ this.expressionLengthPtr--;
+ pushOnAstStack(this.expressionStack[this.expressionPtr--]);
+}
+protected void consumeFieldAccess(boolean isSuperAccess) {
+ // FieldAccess ::= Primary '.' 'Identifier'
+ // FieldAccess ::= 'super' '.' 'Identifier'
+
+ FieldReference fr =
+ new FieldReference(
+ this.identifierStack[this.identifierPtr],
+ this.identifierPositionStack[this.identifierPtr--]);
+ this.identifierLengthPtr--;
+ if (isSuperAccess) {
+ //considerates the fieldReference beginning at the 'super' ....
+ fr.sourceStart = this.intStack[this.intPtr--];
+ fr.receiver = new SuperReference(fr.sourceStart, this.endPosition);
+ pushOnExpressionStack(fr);
+ } else {
+ //optimize push/pop
+ if ((fr.receiver = this.expressionStack[this.expressionPtr]).isThis()) {
+ //fieldreference begins at the this
+ fr.sourceStart = fr.receiver.sourceStart;
+ }
+ this.expressionStack[this.expressionPtr] = fr;
+ }
+}
+protected void consumeFieldDeclaration() {
+ // See consumeLocalVariableDeclarationDefaultModifier() in case of change: duplicated code
+ // FieldDeclaration ::= Modifiersopt Type VariableDeclarators ';'
+
+ /*
+ this.astStack :
+ this.expressionStack: Expression Expression ...... Expression
+ this.identifierStack : type identifier identifier ...... identifier
+ this.intStack : typeDim dim dim dim
+ ==>
+ this.astStack : FieldDeclaration FieldDeclaration ...... FieldDeclaration
+ this.expressionStack :
+ this.identifierStack :
+ this.intStack :
+
+ */
+ int variableDeclaratorsCounter = this.astLengthStack[this.astLengthPtr];
+
+ for (int i = variableDeclaratorsCounter - 1; i >= 0; i--) {
+ FieldDeclaration fieldDeclaration = (FieldDeclaration) this.astStack[this.astPtr - i];
+ fieldDeclaration.declarationSourceEnd = this.endStatementPosition;
+ fieldDeclaration.declarationEnd = this.endStatementPosition; // semi-colon included
+ }
+
+ updateSourceDeclarationParts(variableDeclaratorsCounter);
+ int endPos = flushCommentsDefinedPriorTo(this.endStatementPosition);
+ if (endPos != this.endStatementPosition) {
+ for (int i = 0; i < variableDeclaratorsCounter; i++) {
+ FieldDeclaration fieldDeclaration = (FieldDeclaration) this.astStack[this.astPtr - i];
+ fieldDeclaration.declarationSourceEnd = endPos;
+ }
+ }
+ // update the this.astStack, this.astPtr and this.astLengthStack
+ int startIndex = this.astPtr - this.variablesCounter[this.nestedType] + 1;
+ System.arraycopy(
+ this.astStack,
+ startIndex,
+ this.astStack,
+ startIndex - 1,
+ variableDeclaratorsCounter);
+ this.astPtr--; // remove the type reference
+ this.astLengthStack[--this.astLengthPtr] = variableDeclaratorsCounter;
+
+ // recovery
+ if (this.currentElement != null) {
+ this.lastCheckPoint = endPos + 1;
+ if (this.currentElement.parent != null && this.currentElement instanceof RecoveredField){
+ if (!(this.currentElement instanceof RecoveredInitializer)) {
+ this.currentElement = this.currentElement.parent;
+ }
+ }
+ this.restartRecovery = true;
+ }
+ this.variablesCounter[this.nestedType] = 0;
+}
+protected void consumeForceNoDiet() {
+ // ForceNoDiet ::= $empty
+ this.dietInt++;
+}
+protected void consumeForInit() {
+ // ForInit ::= StatementExpressionList
+ pushOnAstLengthStack(-1);
+}
+protected void consumeFormalParameter(boolean isVarArgs) {
+ // FormalParameter ::= Type VariableDeclaratorId ==> false
+ // FormalParameter ::= Modifiers Type VariableDeclaratorId ==> true
+ /*
+ this.astStack :
+ this.identifierStack : type identifier
+ this.intStack : dim dim
+ ==>
+ this.astStack : Argument
+ this.identifierStack :
+ this.intStack :
+ */
+
+ this.identifierLengthPtr--;
+ char[] identifierName = this.identifierStack[this.identifierPtr];
+ long namePositions = this.identifierPositionStack[this.identifierPtr--];
+ TypeReference type = getTypeReference(this.intStack[this.intPtr--] + this.intStack[this.intPtr--]);
+ int modifierPositions = this.intStack[this.intPtr--];
+ this.intPtr--;
+ Argument arg =
+ new Argument(
+ identifierName,
+ namePositions,
+ type,
+ this.intStack[this.intPtr + 1] & ~AccDeprecated,
+ isVarArgs); // modifiers
+ arg.declarationSourceStart = modifierPositions;
+ // consume annotations
+ int length;
+ if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+ System.arraycopy(
+ this.expressionStack,
+ (this.expressionPtr -= length) + 1,
+ arg.annotations = new Annotation[length],
+ 0,
+ length);
+ }
+ pushOnAstStack(arg);
+
+ /* if incomplete method header, this.listLength counter will not have been reset,
+ indicating that some arguments are available on the stack */
+ this.listLength++;
+
+ if(isVarArgs &&
+ options.sourceLevel < ClassFileConstants.JDK1_5 &&
+ this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
+ this.problemReporter().invalidUsageOfVarargs(arg);
+ }
+}
+protected void consumeFormalParameterList() {
+ // FormalParameterList ::= FormalParameterList ',' FormalParameter
+ optimizedConcatNodeLists();
+}
+protected void consumeFormalParameterListopt() {
+ // FormalParameterListopt ::= $empty
+ pushOnAstLengthStack(0);
+}
+protected void consumeGenericType() {
+ // nothing to do
+ // Will be consume by a getTypeRefence call
+}
+protected void consumeGenericTypeArrayType() {
+ // nothing to do
+ // Will be consume by a getTypeRefence call
+}
+protected void consumeGenericTypeNameArrayType() {
+ pushOnGenericsLengthStack(0); // handle type arguments
+}
+protected void consumeImportDeclaration() {
+ // SingleTypeImportDeclaration ::= SingleTypeImportDeclarationName ';'
+ ImportReference impt = (ImportReference) this.astStack[this.astPtr];
+ // flush annotations defined prior to import statements
+ impt.declarationEnd = this.endStatementPosition;
+ impt.declarationSourceEnd =
+ this.flushCommentsDefinedPriorTo(impt.declarationSourceEnd);
+
+ // recovery
+ if (this.currentElement != null) {
+ this.lastCheckPoint = impt.declarationSourceEnd + 1;
+ this.currentElement = this.currentElement.add(impt, 0);
+ this.lastIgnoredToken = -1;
+ this.restartRecovery = true;
+ // used to avoid branching back into the regular automaton
+ }
+}
+protected void consumeImportDeclarations() {
+ // ImportDeclarations ::= ImportDeclarations ImportDeclaration
+ optimizedConcatNodeLists();
+}
+protected void consumeInsideCastExpression() {
+ // InsideCastExpression ::= $empty
+}
+protected void consumeInsideCastExpressionLL1() {
+ // InsideCastExpressionLL1 ::= $empty
+ pushOnExpressionStack(getUnspecifiedReferenceOptimized());
+}
+protected void consumeInsideCastExpressionWithQualifiedGenerics() {
+ // InsideCastExpressionWithQualifiedGenerics ::= $empty
+}
+protected void consumeInstanceOfExpression(int op) {
+ // RelationalExpression ::= RelationalExpression 'instanceof' ReferenceType
+ //optimize the push/pop
+
+ //by construction, no base type may be used in getTypeReference
+ Expression exp;
+ this.expressionStack[this.expressionPtr] = exp =
+ new InstanceOfExpression(
+ this.expressionStack[this.expressionPtr],
+ getTypeReference(this.intStack[this.intPtr--]),
+ op);
+ if (exp.sourceEnd == 0) {
+ //array on base type....
+ exp.sourceEnd = this.scanner.startPosition - 1;
+ }
+ //the scanner is on the next token already....
+}
+/**
+ * @param op
+ */
+protected void consumeInstanceOfExpressionWithName(int op) {
+ // RelationalExpression_NotName ::= Name instanceof ReferenceType
+ //optimize the push/pop
+
+ //by construction, no base type may be used in getTypeReference
+ TypeReference reference = getTypeReference(this.intStack[this.intPtr--]);
+ pushOnExpressionStack(getUnspecifiedReferenceOptimized());
+ Expression exp;
+ this.expressionStack[this.expressionPtr] = exp =
+ new InstanceOfExpression(
+ this.expressionStack[this.expressionPtr],
+ reference,
+ op);
+ if (exp.sourceEnd == 0) {
+ //array on base type....
+ exp.sourceEnd = this.scanner.startPosition - 1;
+ }
+ //the scanner is on the next token already....
+}
+protected void consumeInterfaceDeclaration() {
+ // see consumeClassDeclaration in case of changes: duplicated code
+ // InterfaceDeclaration ::= InterfaceHeader InterfaceBody
+ int length;
+ if ((length = this.astLengthStack[this.astLengthPtr--]) != 0) {
+ //there are length declarations
+ //dispatch.....according to the type of the declarations
+ dispatchDeclarationInto(length);
+ }
+
+ TypeDeclaration typeDecl = (TypeDeclaration) this.astStack[this.astPtr];
+
+ // mark initializers with local type mark if needed
+ markInitializersWithLocalType(typeDecl);
+
+ //convert constructor that do not have the type's name into methods
+ typeDecl.checkConstructors(this);
+
+ //always add <clinit> (will be remove at code gen time if empty)
+ if (this.scanner.containsAssertKeyword) {
+ typeDecl.bits |= ASTNode.AddAssertionMASK;
+ }
+ typeDecl.addClinit();
+ typeDecl.bodyEnd = this.endStatementPosition;
+ if (length == 0 && !containsComment(typeDecl.bodyStart, typeDecl.bodyEnd)) {
+ typeDecl.bits |= ASTNode.UndocumentedEmptyBlockMASK;
+ }
+ typeDecl.declarationSourceEnd = flushCommentsDefinedPriorTo(this.endStatementPosition);
+}
+protected void consumeInterfaceHeader() {
+ // InterfaceHeader ::= InterfaceHeaderName InterfaceHeaderExtendsopt
+
+ TypeDeclaration typeDecl = (TypeDeclaration) this.astStack[this.astPtr];
+ if (this.currentToken == TokenNameLBRACE){
+ typeDecl.bodyStart = this.scanner.currentPosition;
+ }
+ if (this.currentElement != null){
+ this.restartRecovery = true; // used to avoid branching back into the regular automaton
+ }
+ // flush the comments related to the interface header
+ this.scanner.commentPtr = -1;
+}
+protected void consumeInterfaceHeaderExtends() {
+ // InterfaceHeaderExtends ::= 'extends' InterfaceTypeList
+ int length = this.astLengthStack[this.astLengthPtr--];
+ //super interfaces
+ this.astPtr -= length;
+ TypeDeclaration typeDecl = (TypeDeclaration) this.astStack[this.astPtr];
+ System.arraycopy(
+ this.astStack,
+ this.astPtr + 1,
+ typeDecl.superInterfaces = new TypeReference[length],
+ 0,
+ length);
+ for (int i = 0, max = typeDecl.superInterfaces.length; i < max; i++) {
+ typeDecl.superInterfaces[i].bits |= ASTNode.IsSuperType;
+ }
+ typeDecl.bodyStart = typeDecl.superInterfaces[length-1].sourceEnd + 1;
+ this.listLength = 0; // reset after having read super-interfaces
+ // recovery
+ if (this.currentElement != null) {
+ this.lastCheckPoint = typeDecl.bodyStart;
+ }
+}
+protected void consumeInterfaceHeaderName1() {
+ // InterfaceHeaderName ::= Modifiersopt 'interface' 'Identifier'
+ TypeDeclaration typeDecl = new TypeDeclaration(this.compilationUnit.compilationResult);
+
+ if (this.nestedMethod[this.nestedType] == 0) {
+ if (this.nestedType != 0) {
+ typeDecl.bits |= ASTNode.IsMemberTypeMASK;
+ }
+ } else {
+ // Record that the block has a declaration for local types
+ typeDecl.bits |= ASTNode.IsLocalTypeMASK;
+ markEnclosingMemberWithLocalType();
+ blockReal();
+ }
+
+ //highlight the name of the type
+ long pos = this.identifierPositionStack[this.identifierPtr];
+ typeDecl.sourceEnd = (int) pos;
+ typeDecl.sourceStart = (int) (pos >>> 32);
+ typeDecl.name = this.identifierStack[this.identifierPtr--];
+ this.identifierLengthPtr--;
+
+ //compute the declaration source too
+ // 'class' and 'interface' push two int positions: the beginning of the class token and its end.
+ // we want to keep the beginning position but get rid of the end position
+ // it is only used for the ClassLiteralAccess positions.
+ typeDecl.declarationSourceStart = this.intStack[this.intPtr--];
+ this.intPtr--; // remove the end position of the class token
+ typeDecl.modifiersSourceStart = this.intStack[this.intPtr--];
+ typeDecl.modifiers = this.intStack[this.intPtr--];
+ if (typeDecl.modifiersSourceStart >= 0) {
+ typeDecl.declarationSourceStart = typeDecl.modifiersSourceStart;
+ }
+ // consume annotations
+ int length;
+ if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+ System.arraycopy(
+ this.expressionStack,
+ (this.expressionPtr -= length) + 1,
+ typeDecl.annotations = new Annotation[length],
+ 0,
+ length);
+ }
+ typeDecl.bodyStart = typeDecl.sourceEnd + 1;
+ pushOnAstStack(typeDecl);
+ this.listLength = 0; // will be updated when reading super-interfaces
+ // recovery
+ if (this.currentElement != null){ // is recovering
+ this.lastCheckPoint = typeDecl.bodyStart;
+ this.currentElement = this.currentElement.add(typeDecl, 0);
+ this.lastIgnoredToken = -1;
+ }
+ // javadoc
+ typeDecl.javadoc = this.javadoc;
+ this.javadoc = null;
+}
+protected void consumeInterfaceMemberDeclarations() {
+ // InterfaceMemberDeclarations ::= InterfaceMemberDeclarations InterfaceMemberDeclaration
+ concatNodeLists();
+}
+protected void consumeInterfaceMemberDeclarationsopt() {
+ // InterfaceMemberDeclarationsopt ::= NestedType InterfaceMemberDeclarations
+ this.nestedType--;
+}
+protected void consumeInterfaceType() {
+ // InterfaceType ::= ClassOrInterfaceType
+ pushOnAstStack(getTypeReference(0));
+ /* if incomplete type header, this.listLength counter will not have been reset,
+ indicating that some interfaces are available on the stack */
+ this.listLength++;
+}
+protected void consumeInterfaceTypeList() {
+ // InterfaceTypeList ::= InterfaceTypeList ',' InterfaceType
+ optimizedConcatNodeLists();
+}
+protected void consumeInternalCompilationUnit() {
+ // InternalCompilationUnit ::= PackageDeclaration
+ // InternalCompilationUnit ::= PackageDeclaration ImportDeclarations ReduceImports
+ // InternalCompilationUnit ::= ImportDeclarations ReduceImports
+}
+protected void consumeInternalCompilationUnitWithTypes() {
+ // InternalCompilationUnit ::= PackageDeclaration ImportDeclarations ReduceImports TypeDeclarations
+ // InternalCompilationUnit ::= PackageDeclaration TypeDeclarations
+ // InternalCompilationUnit ::= TypeDeclarations
+ // InternalCompilationUnit ::= ImportDeclarations ReduceImports TypeDeclarations
+ // consume type declarations
+ int length;
+ if ((length = this.astLengthStack[this.astLengthPtr--]) != 0) {
+ this.astPtr -= length;
+ System.arraycopy(this.astStack, this.astPtr + 1, this.compilationUnit.types = new TypeDeclaration[length], 0, length);
+ }
+}
+protected void consumeInvalidConstructorDeclaration() {
+ // ConstructorDeclaration ::= ConstructorHeader ';'
+ // now we know that the top of stack is a constructorDeclaration
+ ConstructorDeclaration cd = (ConstructorDeclaration) this.astStack[this.astPtr];
+
+ cd.bodyEnd = this.endPosition; // position just before the trailing semi-colon
+ cd.declarationSourceEnd = flushCommentsDefinedPriorTo(this.endStatementPosition);
+ // report the problem and continue the parsing - narrowing the problem onto the method
+
+ cd.modifiers |= AccSemicolonBody; // remember semi-colon body
+}
+protected void consumeLeftParen() {
+ // PushLPAREN ::= '('
+ pushOnIntStack(this.lParenPos);
+}
+protected void consumeLocalVariableDeclaration() {
+ // LocalVariableDeclaration ::= Modifiers Type VariableDeclarators ';'
+
+ /*
+ this.astStack :
+ this.expressionStack: Expression Expression ...... Expression
+ this.identifierStack : type identifier identifier ...... identifier
+ this.intStack : typeDim dim dim dim
+ ==>
+ this.astStack : FieldDeclaration FieldDeclaration ...... FieldDeclaration
+ this.expressionStack :
+ this.identifierStack :
+ this.intStack :
+
+ */
+ int variableDeclaratorsCounter = this.astLengthStack[this.astLengthPtr];
+
+ // update the this.astStack, this.astPtr and this.astLengthStack
+ int startIndex = this.astPtr - this.variablesCounter[this.nestedType] + 1;
+ System.arraycopy(
+ this.astStack,
+ startIndex,
+ this.astStack,
+ startIndex - 1,
+ variableDeclaratorsCounter);
+ this.astPtr--; // remove the type reference
+ this.astLengthStack[--this.astLengthPtr] = variableDeclaratorsCounter;
+ this.variablesCounter[this.nestedType] = 0;
+}
+protected void consumeLocalVariableDeclarationStatement() {
+ // LocalVariableDeclarationStatement ::= LocalVariableDeclaration ';'
+ // see blockReal in case of change: duplicated code
+ // increment the amount of declared variables for this block
+ this.realBlockStack[this.realBlockPtr]++;
+
+ // update source end to include the semi-colon
+ int variableDeclaratorsCounter = this.astLengthStack[this.astLengthPtr];
+ for (int i = variableDeclaratorsCounter - 1; i >= 0; i--) {
+ LocalDeclaration localDeclaration = (LocalDeclaration) this.astStack[this.astPtr - i];
+ localDeclaration.declarationSourceEnd = this.endStatementPosition;
+ localDeclaration.declarationEnd = this.endStatementPosition; // semi-colon included
+ }
+
+}
+protected void consumeMarkerAnnotation() {
+ // MarkerAnnotation ::= '@' Name
+ MarkerAnnotation markerAnnotation = null;
+ int length = this.identifierLengthStack[this.identifierLengthPtr--];
+ if (length == 1) {
+ markerAnnotation = new MarkerAnnotation(this.identifierStack[this.identifierPtr], this.identifierPositionStack[this.identifierPtr--], this.intStack[this.intPtr--]);
+ } else {
+ char[][] tokens = new char[length][];
+ this.identifierPtr -= length;
+ long[] positions = new long[length];
+ System.arraycopy(this.identifierStack, this.identifierPtr + 1, tokens, 0, length);
+ System.arraycopy(
+ this.identifierPositionStack,
+ this.identifierPtr + 1,
+ positions,
+ 0,
+ length);
+ markerAnnotation = new MarkerAnnotation(tokens, positions, this.intStack[this.intPtr--]);
+ }
+ int sourceStart = markerAnnotation.sourceStart;
+ if (this.modifiersSourceStart < 0) {
+ this.modifiersSourceStart = sourceStart;
+ } else if (this.modifiersSourceStart > sourceStart) {
+ this.modifiersSourceStart = sourceStart;
+ }
+ markerAnnotation.declarationSourceEnd = markerAnnotation.sourceEnd;
+ pushOnExpressionStack(markerAnnotation);
+ if(options.sourceLevel < ClassFileConstants.JDK1_5 &&
+ this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
+ this.problemReporter().invalidUsageOfAnnotation(markerAnnotation);
+ }
+}
+protected void consumeMemberValueArrayInitializer() {
+ // MemberValueArrayInitializer ::= '{' MemberValues ',' '}'
+ // MemberValueArrayInitializer ::= '{' MemberValues '}'
+ arrayInitializer(this.expressionLengthStack[this.expressionLengthPtr--]);
+}
+protected void consumeMemberValueAsName() {
+ pushOnExpressionStack(getUnspecifiedReferenceOptimized());
+}
+protected void consumeMemberValuePair() {
+ // MemberValuePair ::= SimpleName '=' MemberValue
+ char[] simpleName = this.identifierStack[this.identifierPtr];
+ long position = this.identifierPositionStack[this.identifierPtr--];
+ this.identifierLengthPtr--;
+ int end = (int) position;
+ int start = (int) (position >>> 32);
+ Expression value = this.expressionStack[this.expressionPtr--];
+ this.expressionLengthPtr--;
+ MemberValuePair memberValuePair = new MemberValuePair(simpleName, start, end, value);
+ pushOnAstStack(memberValuePair);
+}
+protected void consumeMemberValuePairs() {
+ // MemberValuePairs ::= MemberValuePairs ',' MemberValuePair
+ concatNodeLists();
+}
+protected void consumeMemberValues() {
+ // MemberValues ::= MemberValues ',' MemberValue
+ concatExpressionLists();
+}
+protected void consumeMethodBody() {
+ // MethodBody ::= NestedMethod '{' BlockStatementsopt '}'
+ this.nestedMethod[this.nestedType] --;
+}
+protected void consumeMethodDeclaration(boolean isNotAbstract) {
+ // MethodDeclaration ::= MethodHeader MethodBody
+ // AbstractMethodDeclaration ::= MethodHeader ';'
+
+ /*
+ this.astStack : modifiers arguments throws statements
+ this.identifierStack : type name
+ this.intStack : dim dim dim
+ ==>
+ this.astStack : MethodDeclaration
+ this.identifierStack :
+ this.intStack :
+ */
+
+ int length;
+ if (isNotAbstract) {
+ // pop the position of the { (body of the method) pushed in block decl
+ this.intPtr--;
+ this.intPtr--;
+ }
+
+ int explicitDeclarations = 0;
+ Statement[] statements = null;
+ if (isNotAbstract) {
+ //statements
+ explicitDeclarations = this.realBlockStack[this.realBlockPtr--];
+ if ((length = this.astLengthStack[this.astLengthPtr--]) != 0) {
+ System.arraycopy(
+ this.astStack,
+ (this.astPtr -= length) + 1,
+ statements = new Statement[length],
+ 0,
+ length);
+ }
+ }
+
+ // now we know that we have a method declaration at the top of the ast stack
+ MethodDeclaration md = (MethodDeclaration) this.astStack[this.astPtr];
+ md.statements = statements;
+ md.explicitDeclarations = explicitDeclarations;
+
+ // cannot be done in consumeMethodHeader because we have no idea whether or not there
+ // is a body when we reduce the method header
+ if (!isNotAbstract) { //remember the fact that the method has a semicolon body
+ md.modifiers |= AccSemicolonBody;
+ } else {
+ if (!this.diet && statements == null) {
+ if (!containsComment(md.bodyStart, this.endPosition)) {
+ md.bits |= ASTNode.UndocumentedEmptyBlockMASK;
+ }
+ }
+ }
+ // store the this.endPosition (position just before the '}') in case there is
+ // a trailing comment behind the end of the method
+ md.bodyEnd = this.endPosition;
+ md.declarationSourceEnd = flushCommentsDefinedPriorTo(this.endStatementPosition);
+}
+protected void consumeMethodHeader() {
+ // MethodHeader ::= MethodHeaderName MethodHeaderParameters MethodHeaderExtendedDims ThrowsClauseopt
+ // retrieve end position of method declarator
+ AbstractMethodDeclaration method = (AbstractMethodDeclaration)this.astStack[this.astPtr];
+
+ if (this.currentToken == TokenNameLBRACE){
+ method.bodyStart = this.scanner.currentPosition;
+ }
+ // recovery
+ if (this.currentElement != null){
+ if (this.currentToken == TokenNameSEMICOLON){
+ method.modifiers |= AccSemicolonBody;
+ method.declarationSourceEnd = this.scanner.currentPosition-1;
+ method.bodyEnd = this.scanner.currentPosition-1;
+ if (this.currentElement.parseTree() == method && this.currentElement.parent != null) {
+ this.currentElement = this.currentElement.parent;
+ }
+ }
+ this.restartRecovery = true; // used to avoid branching back into the regular automaton
+ }
+}
+protected void consumeMethodHeaderExtendedDims() {
+ // MethodHeaderExtendedDims ::= Dimsopt
+ // now we update the returnType of the method
+ MethodDeclaration md = (MethodDeclaration) this.astStack[this.astPtr];
+ int extendedDims = this.intStack[this.intPtr--];
+ if (extendedDims != 0) {
+ TypeReference returnType = md.returnType;
+ md.sourceEnd = this.endPosition;
+ int dims = returnType.dimensions() + extendedDims;
+ int baseType;
+ if ((baseType = this.identifierLengthStack[this.identifierLengthPtr + 1]) < 0) {
+ //it was a baseType
+ int sourceStart = returnType.sourceStart;
+ int sourceEnd = returnType.sourceEnd;
+ returnType = TypeReference.baseTypeReference(-baseType, dims);
+ returnType.sourceStart = sourceStart;
+ returnType.sourceEnd = sourceEnd;
+ md.returnType = returnType;
+ } else {
+ md.returnType = this.copyDims(md.returnType, dims);
+ }
+ if (this.currentToken == TokenNameLBRACE){
+ md.bodyStart = this.endPosition + 1;
+ }
+ // recovery
+ if (this.currentElement != null){
+ this.lastCheckPoint = md.bodyStart;
+ }
+ }
+}
+protected void consumeMethodHeaderName() {
+ // MethodHeaderName ::= Modifiersopt Type 'Identifier' '('
+ MethodDeclaration md = new MethodDeclaration(this.compilationUnit.compilationResult);
+
+ //name
+ md.selector = this.identifierStack[this.identifierPtr];
+ long selectorSource = this.identifierPositionStack[this.identifierPtr--];
+ this.identifierLengthPtr--;
+ //type
+ md.returnType = getTypeReference(this.intStack[this.intPtr--]);
+ //modifiers
+ md.declarationSourceStart = this.intStack[this.intPtr--];
+ md.modifiers = this.intStack[this.intPtr--];
+ // consume annotations
+ int length;
+ if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+ System.arraycopy(
+ this.expressionStack,
+ (this.expressionPtr -= length) + 1,
+ md.annotations = new Annotation[length],
+ 0,
+ length);
+ }
+ // javadoc
+ md.javadoc = this.javadoc;
+ this.javadoc = null;
+
+ //highlight starts at selector start
+ md.sourceStart = (int) (selectorSource >>> 32);
+ pushOnAstStack(md);
+ md.sourceEnd = this.lParenPos;
+ md.bodyStart = this.lParenPos+1;
+ this.listLength = 0; // initialize this.listLength before reading parameters/throws
+
+ // recovery
+ if (this.currentElement != null){
+ if (this.currentElement instanceof RecoveredType
+ //|| md.modifiers != 0
+ || (this.scanner.getLineNumber(md.returnType.sourceStart)
+ == this.scanner.getLineNumber(md.sourceStart))){
+ this.lastCheckPoint = md.bodyStart;
+ this.currentElement = this.currentElement.add(md, 0);
+ this.lastIgnoredToken = -1;
+ } else {
+ this.lastCheckPoint = md.sourceStart;
+ this.restartRecovery = true;
+ }
+ }
+}
+protected void consumeMethodHeaderNameWithTypeParameters() {
+ // MethodHeaderName ::= Modifiersopt TypeParameters Type 'Identifier' '('
+ MethodDeclaration md = new MethodDeclaration(this.compilationUnit.compilationResult);
+
+ //name
+ md.selector = this.identifierStack[this.identifierPtr];
+ long selectorSource = this.identifierPositionStack[this.identifierPtr--];
+ this.identifierLengthPtr--;
+ //type
+ md.returnType = getTypeReference(this.intStack[this.intPtr--]);
+
+ // consume type parameters
+ int length = this.genericsLengthStack[this.genericsLengthPtr--];
+ this.genericsPtr -= length;
+ System.arraycopy(this.genericsStack, this.genericsPtr + 1, md.typeParameters = new TypeParameter[length], 0, length);
+
+ //modifiers
+ md.declarationSourceStart = this.intStack[this.intPtr--];
+ md.modifiers = this.intStack[this.intPtr--];
+ // consume annotations
+ if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+ System.arraycopy(
+ this.expressionStack,
+ (this.expressionPtr -= length) + 1,
+ md.annotations = new Annotation[length],
+ 0,
+ length);
+ }
+ // javadoc
+ md.javadoc = this.javadoc;
+ this.javadoc = null;
+
+ //highlight starts at selector start
+ md.sourceStart = (int) (selectorSource >>> 32);
+ pushOnAstStack(md);
+ md.sourceEnd = this.lParenPos;
+ md.bodyStart = this.lParenPos+1;
+ this.listLength = 0; // initialize this.listLength before reading parameters/throws
+
+ // recovery
+ if (this.currentElement != null){
+ if (this.currentElement instanceof RecoveredType
+ //|| md.modifiers != 0
+ || (this.scanner.getLineNumber(md.returnType.sourceStart)
+ == this.scanner.getLineNumber(md.sourceStart))){
+ this.lastCheckPoint = md.bodyStart;
+ this.currentElement = this.currentElement.add(md, 0);
+ this.lastIgnoredToken = -1;
+ } else {
+ this.lastCheckPoint = md.sourceStart;
+ this.restartRecovery = true;
+ }
+ }
+}
+protected void consumeMethodHeaderRightParen() {
+ // MethodHeaderParameters ::= FormalParameterListopt ')'
+ int length = this.astLengthStack[this.astLengthPtr--];
+ this.astPtr -= length;
+ AbstractMethodDeclaration md = (AbstractMethodDeclaration) this.astStack[this.astPtr];
+ md.sourceEnd = this.rParenPos;
+ //arguments
+ if (length != 0) {
+ System.arraycopy(
+ this.astStack,
+ this.astPtr + 1,
+ md.arguments = new Argument[length],
+ 0,
+ length);
+ }
+ md.bodyStart = this.rParenPos+1;
+ this.listLength = 0; // reset this.listLength after having read all parameters
+ // recovery
+ if (this.currentElement != null){
+ this.lastCheckPoint = md.bodyStart;
+ if (this.currentElement.parseTree() == md) return;
+
+ // might not have been attached yet - in some constructor scenarii
+ if (md.isConstructor()){
+ if ((length != 0)
+ || (this.currentToken == TokenNameLBRACE)
+ || (this.currentToken == TokenNamethrows)){
+ this.currentElement = this.currentElement.add(md, 0);
+ this.lastIgnoredToken = -1;
+ }
+ }
+ }
+}
+protected void consumeMethodHeaderThrowsClause() {
+ // MethodHeaderThrowsClause ::= 'throws' ClassTypeList
+ int length = this.astLengthStack[this.astLengthPtr--];
+ this.astPtr -= length;
+ AbstractMethodDeclaration md = (AbstractMethodDeclaration) this.astStack[this.astPtr];
+ System.arraycopy(
+ this.astStack,
+ this.astPtr + 1,
+ md.thrownExceptions = new TypeReference[length],
+ 0,
+ length);
+ md.sourceEnd = md.thrownExceptions[length-1].sourceEnd;
+ md.bodyStart = md.thrownExceptions[length-1].sourceEnd + 1;
+ this.listLength = 0; // reset this.listLength after having read all thrown exceptions
+ // recovery
+ if (this.currentElement != null){
+ this.lastCheckPoint = md.bodyStart;
+ }
+}
+protected void consumeMethodInvocationName() {
+ // MethodInvocation ::= Name '(' ArgumentListopt ')'
+
+ // when the name is only an identifier...we have a message send to "this" (implicit)
+
+ MessageSend m = newMessageSend();
+ m.sourceEnd = this.rParenPos;
+ m.sourceStart =
+ (int) ((m.nameSourcePosition = this.identifierPositionStack[this.identifierPtr]) >>> 32);
+ m.selector = this.identifierStack[this.identifierPtr--];
+ if (this.identifierLengthStack[this.identifierLengthPtr] == 1) {
+ m.receiver = ThisReference.implicitThis();
+ this.identifierLengthPtr--;
+ } else {
+ this.identifierLengthStack[this.identifierLengthPtr]--;
+ m.receiver = getUnspecifiedReference();
+ m.sourceStart = m.receiver.sourceStart;
+ }
+ pushOnExpressionStack(m);
+}
+protected void consumeMethodInvocationNameWithTypeArguments() {
+ // MethodInvocation ::= Name '.' TypeArguments 'Identifier' '(' ArgumentListopt ')'
+
+ // when the name is only an identifier...we have a message send to "this" (implicit)
+
+ MessageSend m = newMessageSendWithTypeArguments();
+ m.sourceEnd = this.rParenPos;
+ m.sourceStart =
+ (int) ((m.nameSourcePosition = this.identifierPositionStack[this.identifierPtr]) >>> 32);
+ m.selector = this.identifierStack[this.identifierPtr--];
+ this.identifierLengthPtr--;
+
+ // handle type arguments
+ int length = this.genericsLengthStack[this.genericsLengthPtr--];
+ this.genericsPtr -= length;
+ System.arraycopy(this.genericsStack, this.genericsPtr + 1, m.typeArguments = new TypeReference[length], 0, length);
+ // TODO (olivier) bug 67790 remove once DOMParser is activated
+ intPtr--;
+
+ m.receiver = getUnspecifiedReference();
+ m.sourceStart = m.receiver.sourceStart;
+ pushOnExpressionStack(m);
+}
+protected void consumeMethodInvocationPrimary() {
+ //optimize the push/pop
+ //MethodInvocation ::= Primary '.' 'Identifier' '(' ArgumentListopt ')'
+
+ MessageSend m = newMessageSend();
+ m.sourceStart =
+ (int) ((m.nameSourcePosition = this.identifierPositionStack[this.identifierPtr]) >>> 32);
+ m.selector = this.identifierStack[this.identifierPtr--];
+ this.identifierLengthPtr--;
+ m.receiver = this.expressionStack[this.expressionPtr];
+ m.sourceStart = m.receiver.sourceStart;
+ m.sourceEnd = this.rParenPos;
+ this.expressionStack[this.expressionPtr] = m;
+}
+protected void consumeMethodInvocationPrimaryWithTypeArguments() {
+ //optimize the push/pop
+ //MethodInvocation ::= Primary '.' TypeArguments 'Identifier' '(' ArgumentListopt ')'
+
+ MessageSend m = newMessageSendWithTypeArguments();
+ m.sourceStart =
+ (int) ((m.nameSourcePosition = this.identifierPositionStack[this.identifierPtr]) >>> 32);
+ m.selector = this.identifierStack[this.identifierPtr--];
+ this.identifierLengthPtr--;
+
+ // handle type arguments
+ int length = this.genericsLengthStack[this.genericsLengthPtr--];
+ this.genericsPtr -= length;
+ System.arraycopy(this.genericsStack, this.genericsPtr + 1, m.typeArguments = new TypeReference[length], 0, length);
+ // TODO (olivier) bug 67790 remove once DOMParser is activated
+ intPtr--;
+
+ m.receiver = this.expressionStack[this.expressionPtr];
+ m.sourceStart = m.receiver.sourceStart;
+ m.sourceEnd = this.rParenPos;
+ this.expressionStack[this.expressionPtr] = m;
+}
+protected void consumeMethodInvocationSuper() {
+ // MethodInvocation ::= 'super' '.' 'Identifier' '(' ArgumentListopt ')'
+
+ MessageSend m = newMessageSend();
+ m.sourceStart = this.intStack[this.intPtr--];
+ m.sourceEnd = this.rParenPos;
+ m.nameSourcePosition = this.identifierPositionStack[this.identifierPtr];
+ m.selector = this.identifierStack[this.identifierPtr--];
+ this.identifierLengthPtr--;
+ m.receiver = new SuperReference(m.sourceStart, this.endPosition);
+ pushOnExpressionStack(m);
+}
+protected void consumeMethodInvocationSuperWithTypeArguments() {
+ // MethodInvocation ::= 'super' '.' TypeArguments 'Identifier' '(' ArgumentListopt ')'
+
+ MessageSend m = newMessageSendWithTypeArguments();
+ m.sourceStart = this.intStack[this.intPtr--];
+ m.sourceEnd = this.rParenPos;
+ m.nameSourcePosition = this.identifierPositionStack[this.identifierPtr];
+ m.selector = this.identifierStack[this.identifierPtr--];
+ this.identifierLengthPtr--;
+
+ // handle type arguments
+ int length = this.genericsLengthStack[this.genericsLengthPtr--];
+ this.genericsPtr -= length;
+ System.arraycopy(this.genericsStack, this.genericsPtr + 1, m.typeArguments = new TypeReference[length], 0, length);
+ // TODO (olivier) bug 67790 remove once DOMParser is activated
+ intPtr--;
+
+ m.receiver = new SuperReference(m.sourceStart, this.endPosition);
+ pushOnExpressionStack(m);
+}
+protected void consumeModifiers() {
+ int savedModifiersSourceStart = this.modifiersSourceStart;
+ checkComment(); // might update modifiers with AccDeprecated
+ pushOnIntStack(this.modifiers); // modifiers
+ if (this.modifiersSourceStart >= savedModifiersSourceStart) {
+ this.modifiersSourceStart = savedModifiersSourceStart;
+ }
+ pushOnIntStack(this.modifiersSourceStart);
+ resetModifiers();
+}
+protected void consumeModifiers2() {
+ this.expressionLengthStack[this.expressionLengthPtr - 1] += this.expressionLengthStack[this.expressionLengthPtr--];
+}
+protected void consumeNameArrayType() {
+ pushOnGenericsLengthStack(0); // handle type arguments
+ pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
+}
+protected void consumeNestedMethod() {
+ // NestedMethod ::= $empty
+ jumpOverMethodBody();
+ this.nestedMethod[this.nestedType] ++;
+ pushOnIntStack(this.scanner.currentPosition);
+ consumeOpenBlock();
+}
+protected void consumeNestedType() {
+ // NestedType ::= $empty
+ int length = this.nestedMethod.length;
+ if (++this.nestedType >= length) {
+ System.arraycopy(
+ this.nestedMethod, 0,
+ this.nestedMethod = new int[length + 30], 0,
+ length);
+ // increase the size of the variablesCounter as well. It has to be consistent with the size of the nestedMethod collection
+ System.arraycopy(
+ this.variablesCounter, 0,
+ this.variablesCounter = new int[length + 30], 0,
+ length);
+ }
+ this.nestedMethod[this.nestedType] = 0;
+ this.variablesCounter[this.nestedType] = 0;
+}
+protected void consumeNormalAnnotation() {
+ // NormalAnnotation ::= '@' Name '(' MemberValuePairsopt ')'
+ NormalAnnotation normalAnnotation = null;
+ int length = this.identifierLengthStack[this.identifierLengthPtr--];
+ if (length == 1) {
+ normalAnnotation = new NormalAnnotation(this.identifierStack[this.identifierPtr], this.identifierPositionStack[this.identifierPtr--], this.intStack[this.intPtr--]);
+ } else {
+ char[][] tokens = new char[length][];
+ this.identifierPtr -= length;
+ long[] positions = new long[length];
+ System.arraycopy(this.identifierStack, this.identifierPtr + 1, tokens, 0, length);
+ System.arraycopy(
+ this.identifierPositionStack,
+ this.identifierPtr + 1,
+ positions,
+ 0,
+ length);
+ normalAnnotation = new NormalAnnotation(tokens, positions, this.intStack[this.intPtr--]);
+ }
+ if ((length = this.astLengthStack[this.astLengthPtr--]) != 0) {
+ System.arraycopy(
+ this.astStack,
+ (this.astPtr -= length) + 1,
+ normalAnnotation.memberValuePairs = new MemberValuePair[length],
+ 0,
+ length);
+ }
+ int sourceStart = normalAnnotation.sourceStart;
+ if (this.modifiersSourceStart < 0) {
+ this.modifiersSourceStart = sourceStart;
+ } else if (this.modifiersSourceStart > sourceStart) {
+ this.modifiersSourceStart = sourceStart;
+ }
+ normalAnnotation.declarationSourceEnd = this.rParenPos;
+ pushOnExpressionStack(normalAnnotation);
+ if(options.sourceLevel < ClassFileConstants.JDK1_5 &&
+ this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
+ this.problemReporter().invalidUsageOfAnnotation(normalAnnotation);
+ }
+}
+protected void consumeOneDimLoop() {
+ // OneDimLoop ::= '[' ']'
+ this.dimensions++;
+}
+protected void consumeOnlySynchronized() {
+ // OnlySynchronized ::= 'synchronized'
+ pushOnIntStack(this.synchronizedBlockSourceStart);
+ resetModifiers();
+ this.expressionLengthPtr--;
+}
+protected void consumeOnlyTypeArguments() {
+ if(options.sourceLevel < ClassFileConstants.JDK1_5 &&
+ this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
+ int length = this.genericsLengthStack[this.genericsLengthPtr];
+ this.problemReporter().invalidUsageOfTypeArguments(
+ (TypeReference)this.genericsStack[this.genericsPtr - length + 1],
+ (TypeReference)this.genericsStack[this.genericsPtr]);
+ }
+}
+protected void consumeOnlyTypeArgumentsForCastExpression() {
+ // OnlyTypeArgumentsForCastExpression ::= OnlyTypeArguments
+}
+protected void consumeOpenBlock() {
+ // OpenBlock ::= $empty
+
+ pushOnIntStack(this.scanner.startPosition);
+ int stackLength = this.realBlockStack.length;
+ if (++this.realBlockPtr >= stackLength) {
+ System.arraycopy(
+ this.realBlockStack, 0,
+ this.realBlockStack = new int[stackLength + StackIncrement], 0,
+ stackLength);
+ }
+ this.realBlockStack[this.realBlockPtr] = 0;
+}
+protected void consumePackageDeclaration() {
+ // PackageDeclaration ::= 'package' Name ';'
+ /* build an ImportRef build from the last name
+ stored in the identifier stack. */
+
+ ImportReference impt = this.compilationUnit.currentPackage;
+ // flush comments defined prior to import statements
+ impt.declarationEnd = this.endStatementPosition;
+ impt.declarationSourceEnd = this.flushCommentsDefinedPriorTo(impt.declarationSourceEnd);
+}
+protected void consumePackageDeclarationName() {
+ // PackageDeclarationName ::= 'package' Name
+ /* build an ImportRef build from the last name
+ stored in the identifier stack. */
+
+ ImportReference impt;
+ int length;
+ char[][] tokens =
+ new char[length = this.identifierLengthStack[this.identifierLengthPtr--]][];
+ this.identifierPtr -= length;
+ long[] positions = new long[length];
+ System.arraycopy(this.identifierStack, ++this.identifierPtr, tokens, 0, length);
+ System.arraycopy(
+ this.identifierPositionStack,
+ this.identifierPtr--,
+ positions,
+ 0,
+ length);
+
+ impt = new ImportReference(tokens, positions, true, AccDefault);
+ this.compilationUnit.currentPackage = impt;
+
+ if (this.currentToken == TokenNameSEMICOLON){
+ impt.declarationSourceEnd = this.scanner.currentPosition - 1;
+ } else {
+ impt.declarationSourceEnd = impt.sourceEnd;
+ }
+ impt.declarationEnd = impt.declarationSourceEnd;
+ //this.endPosition is just before the ;
+ impt.declarationSourceStart = this.intStack[this.intPtr--];
+
+ // recovery
+ if (this.currentElement != null){
+ this.lastCheckPoint = impt.declarationSourceEnd+1;
+ this.restartRecovery = true; // used to avoid branching back into the regular automaton
+ }
+}
+protected void consumePackageDeclarationNameWithModifiers() {
+ // PackageDeclarationName ::= Modifiers 'package' Name
+ /* build an ImportRef build from the last name
+ stored in the identifier stack. */
+
+ ImportReference impt;
+ int length;
+ char[][] tokens =
+ new char[length = this.identifierLengthStack[this.identifierLengthPtr--]][];
+ this.identifierPtr -= length;
+ long[] positions = new long[length];
+ System.arraycopy(this.identifierStack, ++this.identifierPtr, tokens, 0, length);
+ System.arraycopy(
+ this.identifierPositionStack,
+ this.identifierPtr--,
+ positions,
+ 0,
+ length);
+
+ int packageModifiersSourceStart = this.intStack[this.intPtr--]; // we don't need the modifiers start
+ int packageModifiers = this.intStack[this.intPtr--];
+
+ impt = new ImportReference(tokens, positions, true, packageModifiers);
+ this.compilationUnit.currentPackage = impt;
+ // consume annotations
+ if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+ System.arraycopy(
+ this.expressionStack,
+ (this.expressionPtr -= length) + 1,
+ impt.annotations = new Annotation[length],
+ 0,
+ length);
+ impt.declarationSourceStart = packageModifiersSourceStart;
+ intPtr--; // we don't need the position of the 'package keyword
+ } else {
+ impt.declarationSourceStart = this.intStack[this.intPtr--];
+ }
+
+ if (this.currentToken == TokenNameSEMICOLON){
+ impt.declarationSourceEnd = this.scanner.currentPosition - 1;
+ } else {
+ impt.declarationSourceEnd = impt.sourceEnd;
+ }
+ impt.declarationEnd = impt.declarationSourceEnd;
+
+ // recovery
+ if (this.currentElement != null){
+ this.lastCheckPoint = impt.declarationSourceEnd+1;
+ this.restartRecovery = true; // used to avoid branching back into the regular automaton
+ }
+}
+protected void consumePostfixExpression() {
+ // PostfixExpression ::= Name
+ pushOnExpressionStack(getUnspecifiedReferenceOptimized());
+}
+protected void consumePrimaryNoNewArray() {
+ // PrimaryNoNewArray ::= PushLPAREN Expression PushRPAREN
+ final Expression parenthesizedExpression = this.expressionStack[this.expressionPtr];
+ updateSourcePosition(parenthesizedExpression);
+ int numberOfParenthesis = (parenthesizedExpression.bits & ASTNode.ParenthesizedMASK) >> ASTNode.ParenthesizedSHIFT;
+ parenthesizedExpression.bits &= ~ASTNode.ParenthesizedMASK;
+ parenthesizedExpression.bits |= (numberOfParenthesis + 1) << ASTNode.ParenthesizedSHIFT;
+}
+protected void consumePrimaryNoNewArrayArrayType() {
+ // PrimaryNoNewArray ::= Name Dims '.' 'class'
+ this.intPtr--; // remove the class start position
+
+ pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
+ pushOnGenericsLengthStack(0);
+
+ pushOnExpressionStack(
+ new ClassLiteralAccess(this.intStack[this.intPtr--], getTypeReference(this.intStack[this.intPtr--])));
+}
+protected void consumePrimaryNoNewArrayName() {
+ // PrimaryNoNewArray ::= Name '.' 'class'
+ this.intPtr--; // remove the class start position
+
+ // handle type arguments
+ pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
+ pushOnGenericsLengthStack(0);
+ TypeReference typeReference = getTypeReference(0);
+
+ pushOnExpressionStack(
+ new ClassLiteralAccess(this.intStack[this.intPtr--], typeReference));
+}
+protected void consumePrimaryNoNewArrayNameSuper() {
+ // PrimaryNoNewArray ::= Name '.' 'super'
+ // handle type arguments
+ pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
+ pushOnGenericsLengthStack(0);
+ TypeReference typeReference = getTypeReference(0);
+
+ pushOnExpressionStack(
+ new QualifiedSuperReference(
+ typeReference,
+ this.intStack[this.intPtr--],
+ this.endPosition));
+}
+protected void consumePrimaryNoNewArrayNameThis() {
+ // PrimaryNoNewArray ::= Name '.' 'this'
+ // handle type arguments
+ pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
+ pushOnGenericsLengthStack(0); // handle type arguments
+
+ TypeReference typeReference = getTypeReference(0);
+
+ pushOnExpressionStack(
+ new QualifiedThisReference(
+ typeReference,
+ this.intStack[this.intPtr--],
+ this.endPosition));
+}
+protected void consumePrimaryNoNewArrayPrimitiveArrayType() {
+ // PrimaryNoNewArray ::= PrimitiveType Dims '.' 'class'
+ this.intPtr--; // remove the class start position
+ pushOnExpressionStack(
+ new ClassLiteralAccess(this.intStack[this.intPtr--], getTypeReference(this.intStack[this.intPtr--])));
+}
+protected void consumePrimaryNoNewArrayPrimitiveType() {
+ // PrimaryNoNewArray ::= PrimitiveType '.' 'class'
+ this.intPtr--; // remove the class start position
+ pushOnExpressionStack(
+ new ClassLiteralAccess(this.intStack[this.intPtr--], getTypeReference(0)));
+}
+protected void consumePrimaryNoNewArrayThis() {
+ // PrimaryNoNewArray ::= 'this'
+ pushOnExpressionStack(new ThisReference(this.intStack[this.intPtr--], this.endPosition));
+}
+protected void consumePrimaryNoNewArrayWithName() {
+ // PrimaryNoNewArray ::= PushLPAREN Expression PushRPAREN
+ pushOnExpressionStack(getUnspecifiedReferenceOptimized());
+ final Expression parenthesizedExpression = this.expressionStack[this.expressionPtr];
+ updateSourcePosition(parenthesizedExpression);
+ int numberOfParenthesis = (parenthesizedExpression.bits & ASTNode.ParenthesizedMASK) >> ASTNode.ParenthesizedSHIFT;
+ parenthesizedExpression.bits &= ~ASTNode.ParenthesizedMASK;
+ parenthesizedExpression.bits |= (numberOfParenthesis + 1) << ASTNode.ParenthesizedSHIFT;
+}
+protected void consumePrimitiveArrayType() {
+ // nothing to do
+ // Will be consume by a getTypeRefence call
+}
+protected void consumePrimitiveType() {
+ // Type ::= PrimitiveType
+ pushOnIntStack(0);
+}
+protected void consumePushLeftBrace() {
+ pushOnIntStack(this.endPosition); // modifiers
+}
+protected void consumePushRealModifiers() {
+ pushOnIntStack(this.modifiers); // modifiers
+ pushOnIntStack(this.modifiersSourceStart);
+ resetModifiers();
+}
+protected void consumePushModifiers() {
+ pushOnIntStack(this.modifiers); // modifiers
+ pushOnIntStack(this.modifiersSourceStart);
+ resetModifiers();
+ pushOnExpressionStackLengthStack(0);
+}
+protected void consumePushPosition() {
+ // for source managment purpose
+ // PushPosition ::= $empty
+ pushOnIntStack(this.endPosition);
+}
+protected void consumeQualifiedName() {
+ // QualifiedName ::= Name '.' SimpleName
+ /*back from the recursive loop of QualifiedName.
+ Updates identifier length into the length stack*/
+
+ this.identifierLengthStack[--this.identifierLengthPtr]++;
+}
+protected void consumeReduceImports() {
+ // Consume imports
+ int length;
+ if ((length = this.astLengthStack[this.astLengthPtr--]) != 0) {
+ this.astPtr -= length;
+ System.arraycopy(
+ this.astStack,
+ this.astPtr + 1,
+ this.compilationUnit.imports = new ImportReference[length],
+ 0,
+ length);
+ }
+}
+protected void consumeReferenceType() {
+ pushOnIntStack(0); // handle array type
+}
+protected void consumeReferenceType1() {
+ pushOnGenericsStack(getTypeReference(this.intStack[this.intPtr--]));
+}
+protected void consumeReferenceType2() {
+ pushOnGenericsStack(getTypeReference(this.intStack[this.intPtr--]));
+}
+protected void consumeReferenceType3() {
+ pushOnGenericsStack(getTypeReference(this.intStack[this.intPtr--]));
+}
+protected void consumeRestoreDiet() {
+ // RestoreDiet ::= $empty
+ this.dietInt--;
+}
+protected void consumeRightParen() {
+ // PushRPAREN ::= ')'
+ pushOnIntStack(this.rParenPos);
+}
+// This method is part of an automatic generation : do NOT edit-modify
+protected void consumeRule(int act) {
+ switch ( act ) {
+ case 26 : if (DEBUG) { System.out.println("Type ::= PrimitiveType"); } //$NON-NLS-1$
+ consumePrimitiveType();
+ break;
+
+ case 40 : if (DEBUG) { System.out.println("ReferenceType ::= ClassOrInterfaceType"); } //$NON-NLS-1$
+ consumeReferenceType();
+ break;
+
+ case 44 : if (DEBUG) { System.out.println("ClassOrInterface ::= Name"); } //$NON-NLS-1$
+ consumeClassOrInterfaceName();
+ break;
+
+ case 45 : if (DEBUG) { System.out.println("ClassOrInterface ::= GenericType DOT Name"); } //$NON-NLS-1$
+ consumeClassOrInterface();
+ break;
+
+ case 46 : if (DEBUG) { System.out.println("GenericType ::= ClassOrInterface TypeArguments"); } //$NON-NLS-1$
+ consumeGenericType();
+ break;
+
+ case 47 : if (DEBUG) { System.out.println("ArrayTypeWithTypeArgumentsName ::= GenericType DOT Name"); } //$NON-NLS-1$
+ consumeArrayTypeWithTypeArgumentsName();
+ break;
+
+ case 48 : if (DEBUG) { System.out.println("ArrayType ::= PrimitiveType Dims"); } //$NON-NLS-1$
+ consumePrimitiveArrayType();
+ break;
+
+ case 49 : if (DEBUG) { System.out.println("ArrayType ::= Name Dims"); } //$NON-NLS-1$
+ consumeNameArrayType();
+ break;
+
+ case 50 : if (DEBUG) { System.out.println("ArrayType ::= ArrayTypeWithTypeArgumentsName Dims"); } //$NON-NLS-1$
+ consumeGenericTypeNameArrayType();
+ break;
+
+ case 51 : if (DEBUG) { System.out.println("ArrayType ::= GenericType Dims"); } //$NON-NLS-1$
+ consumeGenericTypeArrayType();
+ break;
+
+ case 56 : if (DEBUG) { System.out.println("QualifiedName ::= Name DOT SimpleName"); } //$NON-NLS-1$
+ consumeQualifiedName();
+ break;
+
+ case 57 : if (DEBUG) { System.out.println("CompilationUnit ::= EnterCompilationUnit..."); } //$NON-NLS-1$
+ consumeCompilationUnit();
+ break;
+
+ case 58 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration"); } //$NON-NLS-1$
+ consumeInternalCompilationUnit();
+ break;
+
+ case 59 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); } //$NON-NLS-1$
+ consumeInternalCompilationUnit();
+ break;
+
+ case 60 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); } //$NON-NLS-1$
+ consumeInternalCompilationUnitWithTypes();
+ break;
+
+ case 61 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); } //$NON-NLS-1$
+ consumeInternalCompilationUnitWithTypes();
+ break;
+
+ case 62 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= ImportDeclarations..."); } //$NON-NLS-1$
+ consumeInternalCompilationUnit();
+ break;
+
+ case 63 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= TypeDeclarations"); } //$NON-NLS-1$
+ consumeInternalCompilationUnitWithTypes();
+ break;
+
+ case 64 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= ImportDeclarations..."); } //$NON-NLS-1$
+ consumeInternalCompilationUnitWithTypes();
+ break;
+
+ case 65 : if (DEBUG) { System.out.println("InternalCompilationUnit ::="); } //$NON-NLS-1$
+ consumeEmptyInternalCompilationUnit();
+ break;
+
+ case 66 : if (DEBUG) { System.out.println("ReduceImports ::="); } //$NON-NLS-1$
+ consumeReduceImports();
+ break;
+
+ case 67 : if (DEBUG) { System.out.println("EnterCompilationUnit ::="); } //$NON-NLS-1$
+ consumeEnterCompilationUnit();
+ break;
+
+ case 78 : if (DEBUG) { System.out.println("CatchHeader ::= catch LPAREN FormalParameter RPAREN..."); } //$NON-NLS-1$
+ consumeCatchHeader();
+ break;
+
+ case 80 : if (DEBUG) { System.out.println("ImportDeclarations ::= ImportDeclarations..."); } //$NON-NLS-1$
+ consumeImportDeclarations();
+ break;
+
+ case 82 : if (DEBUG) { System.out.println("TypeDeclarations ::= TypeDeclarations TypeDeclaration"); } //$NON-NLS-1$
+ consumeTypeDeclarations();
+ break;
+
+ case 83 : if (DEBUG) { System.out.println("PackageDeclaration ::= PackageDeclarationName SEMICOLON"); } //$NON-NLS-1$
+ consumePackageDeclaration();
+ break;
+
+ case 84 : if (DEBUG) { System.out.println("PackageDeclarationName ::= Modifiers package..."); } //$NON-NLS-1$
+ consumePackageDeclarationNameWithModifiers();
+ break;
+
+ case 85 : if (DEBUG) { System.out.println("PackageDeclarationName ::= package Name"); } //$NON-NLS-1$
+ consumePackageDeclarationName();
+ break;
+
+ case 90 : if (DEBUG) { System.out.println("SingleTypeImportDeclaration ::=..."); } //$NON-NLS-1$
+ consumeImportDeclaration();
+ break;
+
+ case 91 : if (DEBUG) { System.out.println("SingleTypeImportDeclarationName ::= import Name"); } //$NON-NLS-1$
+ consumeSingleTypeImportDeclarationName();
+ break;
+
+ case 92 : if (DEBUG) { System.out.println("TypeImportOnDemandDeclaration ::=..."); } //$NON-NLS-1$
+ consumeImportDeclaration();
+ break;
+
+ case 93 : if (DEBUG) { System.out.println("TypeImportOnDemandDeclarationName ::= import Name DOT..."); } //$NON-NLS-1$
+ consumeTypeImportOnDemandDeclarationName();
+ break;
+
+ case 96 : if (DEBUG) { System.out.println("TypeDeclaration ::= SEMICOLON"); } //$NON-NLS-1$
+ consumeEmptyTypeDeclaration();
+ break;
+
+ case 100 : if (DEBUG) { System.out.println("Modifiers ::= Modifiers Modifier"); } //$NON-NLS-1$
+ consumeModifiers2();
+ break;
+
+ case 112 : if (DEBUG) { System.out.println("Modifier ::= Annotation"); } //$NON-NLS-1$
+ consumeAnnotationAsModifier();
+ break;
+
+ case 113 : if (DEBUG) { System.out.println("ClassDeclaration ::= ClassHeader ClassBody"); } //$NON-NLS-1$
+ consumeClassDeclaration();
+ break;
+
+ case 114 : if (DEBUG) { System.out.println("ClassHeader ::= ClassHeaderName ClassHeaderExtendsopt..."); } //$NON-NLS-1$
+ consumeClassHeader();
+ break;
+
+ case 115 : if (DEBUG) { System.out.println("ClassHeaderName ::= ClassHeaderName1 TypeParameters"); } //$NON-NLS-1$
+ consumeTypeHeaderNameWithTypeParameters();
+ break;
+
+ case 117 : if (DEBUG) { System.out.println("ClassHeaderName1 ::= Modifiersopt class Identifier"); } //$NON-NLS-1$
+ consumeClassHeaderName1();
+ break;
+
+ case 118 : if (DEBUG) { System.out.println("ClassHeaderExtends ::= extends ClassType"); } //$NON-NLS-1$
+ consumeClassHeaderExtends();
+ break;
+
+ case 119 : if (DEBUG) { System.out.println("ClassHeaderImplements ::= implements InterfaceTypeList"); } //$NON-NLS-1$
+ consumeClassHeaderImplements();
+ break;
+
+ case 121 : if (DEBUG) { System.out.println("InterfaceTypeList ::= InterfaceTypeList COMMA..."); } //$NON-NLS-1$
+ consumeInterfaceTypeList();
+ break;
+
+ case 122 : if (DEBUG) { System.out.println("InterfaceType ::= ClassOrInterfaceType"); } //$NON-NLS-1$
+ consumeInterfaceType();
+ break;
+
+ case 125 : if (DEBUG) { System.out.println("ClassBodyDeclarations ::= ClassBodyDeclarations..."); } //$NON-NLS-1$
+ consumeClassBodyDeclarations();
+ break;
+
+ case 129 : if (DEBUG) { System.out.println("ClassBodyDeclaration ::= Diet NestedMethod Block"); } //$NON-NLS-1$
+ consumeClassBodyDeclaration();
+ break;
+
+ case 130 : if (DEBUG) { System.out.println("Diet ::="); } //$NON-NLS-1$
+ consumeDiet();
+ break;
+
+ case 131 : if (DEBUG) { System.out.println("Initializer ::= Diet NestedMethod Block"); } //$NON-NLS-1$
+ consumeClassBodyDeclaration();
+ break;
+
+ case 137 : if (DEBUG) { System.out.println("ClassMemberDeclaration ::= SEMICOLON"); } //$NON-NLS-1$
+ consumeEmptyClassMemberDeclaration();
+ break;
+
+ case 140 : if (DEBUG) { System.out.println("FieldDeclaration ::= Modifiersopt Type..."); } //$NON-NLS-1$
+ consumeFieldDeclaration();
+ break;
+
+ case 142 : if (DEBUG) { System.out.println("VariableDeclarators ::= VariableDeclarators COMMA..."); } //$NON-NLS-1$
+ consumeVariableDeclarators();
+ break;
+
+ case 145 : if (DEBUG) { System.out.println("EnterVariable ::="); } //$NON-NLS-1$
+ consumeEnterVariable();
+ break;
+
+ case 146 : if (DEBUG) { System.out.println("ExitVariableWithInitialization ::="); } //$NON-NLS-1$
+ consumeExitVariableWithInitialization();
+ break;
+
+ case 147 : if (DEBUG) { System.out.println("ExitVariableWithoutInitialization ::="); } //$NON-NLS-1$
+ consumeExitVariableWithoutInitialization();
+ break;
+
+ case 148 : if (DEBUG) { System.out.println("ForceNoDiet ::="); } //$NON-NLS-1$
+ consumeForceNoDiet();
+ break;
+
+ case 149 : if (DEBUG) { System.out.println("RestoreDiet ::="); } //$NON-NLS-1$
+ consumeRestoreDiet();
+ break;
+
+ case 154 : if (DEBUG) { System.out.println("MethodDeclaration ::= MethodHeader MethodBody"); } //$NON-NLS-1$
+ // set to true to consume a method with a body
+ consumeMethodDeclaration(true);
+ break;
+
+ case 155 : if (DEBUG) { System.out.println("AbstractMethodDeclaration ::= MethodHeader SEMICOLON"); } //$NON-NLS-1$
+ // set to false to consume a method without body
+ consumeMethodDeclaration(false);
+ break;
+
+ case 156 : if (DEBUG) { System.out.println("MethodHeader ::= MethodHeaderName FormalParameterListopt"); } //$NON-NLS-1$
+ consumeMethodHeader();
+ break;
+
+ case 157 : if (DEBUG) { System.out.println("MethodHeaderName ::= Modifiersopt TypeParameters Type..."); } //$NON-NLS-1$
+ consumeMethodHeaderNameWithTypeParameters();
+ break;
+
+ case 158 : if (DEBUG) { System.out.println("MethodHeaderName ::= Modifiersopt Type Identifier LPAREN"); } //$NON-NLS-1$
+ consumeMethodHeaderName();
+ break;
+
+ case 159 : if (DEBUG) { System.out.println("MethodHeaderRightParen ::= RPAREN"); } //$NON-NLS-1$
+ consumeMethodHeaderRightParen();
+ break;
+
+ case 160 : if (DEBUG) { System.out.println("MethodHeaderExtendedDims ::= Dimsopt"); } //$NON-NLS-1$
+ consumeMethodHeaderExtendedDims();
+ break;
+
+ case 161 : if (DEBUG) { System.out.println("MethodHeaderThrowsClause ::= throws ClassTypeList"); } //$NON-NLS-1$
+ consumeMethodHeaderThrowsClause();
+ break;
+
+ case 162 : if (DEBUG) { System.out.println("ConstructorHeader ::= ConstructorHeaderName..."); } //$NON-NLS-1$
+ consumeConstructorHeader();
+ break;
+
+ case 163 : if (DEBUG) { System.out.println("ConstructorHeaderName ::= Modifiersopt TypeParameters..."); } //$NON-NLS-1$
+ consumeConstructorHeaderNameWithTypeParameters();
+ break;
+
+ case 164 : if (DEBUG) { System.out.println("ConstructorHeaderName ::= Modifiersopt Identifier LPAREN"); } //$NON-NLS-1$
+ consumeConstructorHeaderName();
+ break;
+
+ case 166 : if (DEBUG) { System.out.println("FormalParameterList ::= FormalParameterList COMMA..."); } //$NON-NLS-1$
+ consumeFormalParameterList();
+ break;
+
+ case 167 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt Type..."); } //$NON-NLS-1$
+ consumeFormalParameter(false);
+ break;
+
+ case 168 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt Type ELLIPSIS..."); } //$NON-NLS-1$
+ consumeFormalParameter(true);
+ break;
+
+ case 170 : if (DEBUG) { System.out.println("ClassTypeList ::= ClassTypeList COMMA ClassTypeElt"); } //$NON-NLS-1$
+ consumeClassTypeList();
+ break;
+
+ case 171 : if (DEBUG) { System.out.println("ClassTypeElt ::= ClassType"); } //$NON-NLS-1$
+ consumeClassTypeElt();
+ break;
+
+ case 172 : if (DEBUG) { System.out.println("MethodBody ::= NestedMethod LBRACE BlockStatementsopt..."); } //$NON-NLS-1$
+ consumeMethodBody();
+ break;
+
+ case 173 : if (DEBUG) { System.out.println("NestedMethod ::="); } //$NON-NLS-1$
+ consumeNestedMethod();
+ break;
+
+ case 174 : if (DEBUG) { System.out.println("StaticInitializer ::= StaticOnly Block"); } //$NON-NLS-1$
+ consumeStaticInitializer();
+ break;
+
+ case 175 : if (DEBUG) { System.out.println("StaticOnly ::= static"); } //$NON-NLS-1$
+ consumeStaticOnly();
+ break;
+
+ case 176 : if (DEBUG) { System.out.println("ConstructorDeclaration ::= ConstructorHeader MethodBody"); } //$NON-NLS-1$
+ consumeConstructorDeclaration() ;
+ break;
+
+ case 177 : if (DEBUG) { System.out.println("ConstructorDeclaration ::= ConstructorHeader SEMICOLON"); } //$NON-NLS-1$
+ consumeInvalidConstructorDeclaration() ;
+ break;
+
+ case 178 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= this LPAREN..."); } //$NON-NLS-1$
+ consumeExplicitConstructorInvocation(0, THIS_CALL);
+ break;
+
+ case 179 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= OnlyTypeArguments this"); } //$NON-NLS-1$
+ consumeExplicitConstructorInvocationWithTypeArguments(0,THIS_CALL);
+ break;
+
+ case 180 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= super LPAREN..."); } //$NON-NLS-1$
+ consumeExplicitConstructorInvocation(0,SUPER_CALL);
+ break;
+
+ case 181 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= OnlyTypeArguments..."); } //$NON-NLS-1$
+ consumeExplicitConstructorInvocationWithTypeArguments(0,SUPER_CALL);
+ break;
+
+ case 182 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT super..."); } //$NON-NLS-1$
+ consumeExplicitConstructorInvocation(1, SUPER_CALL);
+ break;
+
+ case 183 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT..."); } //$NON-NLS-1$
+ consumeExplicitConstructorInvocationWithTypeArguments(1, SUPER_CALL);
+ break;
+
+ case 184 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT super LPAREN"); } //$NON-NLS-1$
+ consumeExplicitConstructorInvocation(2, SUPER_CALL);
+ break;
+
+ case 185 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT..."); } //$NON-NLS-1$
+ consumeExplicitConstructorInvocationWithTypeArguments(2, SUPER_CALL);
+ break;
+
+ case 186 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT this..."); } //$NON-NLS-1$
+ consumeExplicitConstructorInvocation(1, THIS_CALL);
+ break;
+
+ case 187 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT..."); } //$NON-NLS-1$
+ consumeExplicitConstructorInvocationWithTypeArguments(1, THIS_CALL);
+ break;
+
+ case 188 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT this LPAREN"); } //$NON-NLS-1$
+ consumeExplicitConstructorInvocation(2, THIS_CALL);
+ break;
+
+ case 189 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT..."); } //$NON-NLS-1$
+ consumeExplicitConstructorInvocationWithTypeArguments(2, THIS_CALL);
+ break;
+
+ case 190 : if (DEBUG) { System.out.println("InterfaceDeclaration ::= InterfaceHeader InterfaceBody"); } //$NON-NLS-1$
+ consumeInterfaceDeclaration();
+ break;
+
+ case 191 : if (DEBUG) { System.out.println("InterfaceHeader ::= InterfaceHeaderName..."); } //$NON-NLS-1$
+ consumeInterfaceHeader();
+ break;
+
+ case 192 : if (DEBUG) { System.out.println("InterfaceHeaderName ::= InterfaceHeaderName1..."); } //$NON-NLS-1$
+ consumeTypeHeaderNameWithTypeParameters();
+ break;
+
+ case 194 : if (DEBUG) { System.out.println("InterfaceHeaderName1 ::= Modifiersopt interface..."); } //$NON-NLS-1$
+ consumeInterfaceHeaderName1();
+ break;
+
+ case 196 : if (DEBUG) { System.out.println("InterfaceHeaderExtends ::= extends InterfaceTypeList"); } //$NON-NLS-1$
+ consumeInterfaceHeaderExtends();
+ break;
+
+ case 199 : if (DEBUG) { System.out.println("InterfaceMemberDeclarations ::=..."); } //$NON-NLS-1$
+ consumeInterfaceMemberDeclarations();
+ break;
+
+ case 200 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= SEMICOLON"); } //$NON-NLS-1$
+ consumeEmptyInterfaceMemberDeclaration();
+ break;
+
+ case 203 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= InvalidMethodDeclaration"); } //$NON-NLS-1$
+ ignoreMethodBody();
+ break;
+
+ case 204 : if (DEBUG) { System.out.println("InvalidConstructorDeclaration ::= ConstructorHeader..."); } //$NON-NLS-1$
+ ignoreInvalidConstructorDeclaration(true);
+ break;
+
+ case 205 : if (DEBUG) { System.out.println("InvalidConstructorDeclaration ::= ConstructorHeader..."); } //$NON-NLS-1$
+ ignoreInvalidConstructorDeclaration(false);
+ break;
+
+ case 212 : if (DEBUG) { System.out.println("PushLeftBrace ::="); } //$NON-NLS-1$
+ consumePushLeftBrace();
+ break;
+
+ case 213 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace ,opt RBRACE"); } //$NON-NLS-1$
+ consumeEmptyArrayInitializer();
+ break;
+
+ case 214 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace..."); } //$NON-NLS-1$
+ consumeArrayInitializer();
+ break;
+
+ case 215 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace..."); } //$NON-NLS-1$
+ consumeArrayInitializer();
+ break;
+
+ case 217 : if (DEBUG) { System.out.println("VariableInitializers ::= VariableInitializers COMMA..."); } //$NON-NLS-1$
+ consumeVariableInitializers();
+ break;
+
+ case 218 : if (DEBUG) { System.out.println("Block ::= OpenBlock LBRACE BlockStatementsopt RBRACE"); } //$NON-NLS-1$
+ consumeBlock();
+ break;
+
+ case 219 : if (DEBUG) { System.out.println("OpenBlock ::="); } //$NON-NLS-1$
+ consumeOpenBlock() ;
+ break;
+
+ case 221 : if (DEBUG) { System.out.println("BlockStatements ::= BlockStatements BlockStatement"); } //$NON-NLS-1$
+ consumeBlockStatements() ;
+ break;
+
+ case 225 : if (DEBUG) { System.out.println("BlockStatement ::= InvalidInterfaceDeclaration"); } //$NON-NLS-1$
+ ignoreInterfaceDeclaration();
+ break;
+
+ case 226 : if (DEBUG) { System.out.println("LocalVariableDeclarationStatement ::=..."); } //$NON-NLS-1$
+ consumeLocalVariableDeclarationStatement();
+ break;
+
+ case 227 : if (DEBUG) { System.out.println("LocalVariableDeclaration ::= Type PushModifiers..."); } //$NON-NLS-1$
+ consumeLocalVariableDeclaration();
+ break;
+
+ case 228 : if (DEBUG) { System.out.println("LocalVariableDeclaration ::= Modifiers Type..."); } //$NON-NLS-1$
+ consumeLocalVariableDeclaration();
+ break;
+
+ case 229 : if (DEBUG) { System.out.println("PushModifiers ::="); } //$NON-NLS-1$
+ consumePushModifiers();
+ break;
+
+ case 230 : if (DEBUG) { System.out.println("PushRealModifiers ::="); } //$NON-NLS-1$
+ consumePushRealModifiers();
+ break;
+
+ case 256 : if (DEBUG) { System.out.println("EmptyStatement ::= SEMICOLON"); } //$NON-NLS-1$
+ consumeEmptyStatement();
+ break;
+
+ case 257 : if (DEBUG) { System.out.println("LabeledStatement ::= Identifier COLON Statement"); } //$NON-NLS-1$
+ consumeStatementLabel() ;
+ break;
+
+ case 258 : if (DEBUG) { System.out.println("LabeledStatementNoShortIf ::= Identifier COLON..."); } //$NON-NLS-1$
+ consumeStatementLabel() ;
+ break;
+
+ case 259 : if (DEBUG) { System.out.println("ExpressionStatement ::= StatementExpression SEMICOLON"); } //$NON-NLS-1$
+ consumeExpressionStatement();
+ break;
+
+ case 268 : if (DEBUG) { System.out.println("IfThenStatement ::= if LPAREN Expression RPAREN..."); } //$NON-NLS-1$
+ consumeStatementIfNoElse();
+ break;
+
+ case 269 : if (DEBUG) { System.out.println("IfThenElseStatement ::= if LPAREN Expression RPAREN..."); } //$NON-NLS-1$
+ consumeStatementIfWithElse();
+ break;
+
+ case 270 : if (DEBUG) { System.out.println("IfThenElseStatementNoShortIf ::= if LPAREN Expression..."); } //$NON-NLS-1$
+ consumeStatementIfWithElse();
+ break;
+
+ case 271 : if (DEBUG) { System.out.println("SwitchStatement ::= switch LPAREN Expression RPAREN..."); } //$NON-NLS-1$
+ consumeStatementSwitch() ;
+ break;
+
+ case 272 : if (DEBUG) { System.out.println("SwitchBlock ::= LBRACE RBRACE"); } //$NON-NLS-1$
+ consumeEmptySwitchBlock() ;
+ break;
+
+ case 275 : if (DEBUG) { System.out.println("SwitchBlock ::= LBRACE SwitchBlockStatements..."); } //$NON-NLS-1$
+ consumeSwitchBlock() ;
+ break;
+
+ case 277 : if (DEBUG) { System.out.println("SwitchBlockStatements ::= SwitchBlockStatements..."); } //$NON-NLS-1$
+ consumeSwitchBlockStatements() ;
+ break;
+
+ case 278 : if (DEBUG) { System.out.println("SwitchBlockStatement ::= SwitchLabels BlockStatements"); } //$NON-NLS-1$
+ consumeSwitchBlockStatement() ;
+ break;
+
+ case 280 : if (DEBUG) { System.out.println("SwitchLabels ::= SwitchLabels SwitchLabel"); } //$NON-NLS-1$
+ consumeSwitchLabels() ;
+ break;
+
+ case 281 : if (DEBUG) { System.out.println("SwitchLabel ::= case ConstantExpression COLON"); } //$NON-NLS-1$
+ consumeCaseLabel();
+ break;
+
+ case 282 : if (DEBUG) { System.out.println("SwitchLabel ::= default COLON"); } //$NON-NLS-1$
+ consumeDefaultLabel();
+ break;
+
+ case 283 : if (DEBUG) { System.out.println("WhileStatement ::= while LPAREN Expression RPAREN..."); } //$NON-NLS-1$
+ consumeStatementWhile() ;
+ break;
+
+ case 284 : if (DEBUG) { System.out.println("WhileStatementNoShortIf ::= while LPAREN Expression..."); } //$NON-NLS-1$
+ consumeStatementWhile() ;
+ break;
+
+ case 285 : if (DEBUG) { System.out.println("DoStatement ::= do Statement while LPAREN Expression..."); } //$NON-NLS-1$
+ consumeStatementDo() ;
+ break;
+
+ case 286 : if (DEBUG) { System.out.println("ForStatement ::= for LPAREN ForInitopt SEMICOLON..."); } //$NON-NLS-1$
+ consumeStatementFor() ;
+ break;
+
+ case 287 : if (DEBUG) { System.out.println("ForStatementNoShortIf ::= for LPAREN ForInitopt..."); } //$NON-NLS-1$
+ consumeStatementFor() ;
+ break;
+
+ case 288 : if (DEBUG) { System.out.println("ForInit ::= StatementExpressionList"); } //$NON-NLS-1$
+ consumeForInit() ;
+ break;
+
+ case 292 : if (DEBUG) { System.out.println("StatementExpressionList ::= StatementExpressionList..."); } //$NON-NLS-1$
+ consumeStatementExpressionList() ;
+ break;
+
+ case 293 : if (DEBUG) { System.out.println("AssertStatement ::= assert Expression SEMICOLON"); } //$NON-NLS-1$
+ consumeSimpleAssertStatement() ;
+ break;
+
+ case 294 : if (DEBUG) { System.out.println("AssertStatement ::= assert Expression COLON Expression"); } //$NON-NLS-1$
+ consumeAssertStatement() ;
+ break;
+
+ case 295 : if (DEBUG) { System.out.println("BreakStatement ::= break SEMICOLON"); } //$NON-NLS-1$
+ consumeStatementBreak() ;
+ break;
+
+ case 296 : if (DEBUG) { System.out.println("BreakStatement ::= break Identifier SEMICOLON"); } //$NON-NLS-1$
+ consumeStatementBreakWithLabel() ;
+ break;
+
+ case 297 : if (DEBUG) { System.out.println("ContinueStatement ::= continue SEMICOLON"); } //$NON-NLS-1$
+ consumeStatementContinue() ;
+ break;
+
+ case 298 : if (DEBUG) { System.out.println("ContinueStatement ::= continue Identifier SEMICOLON"); } //$NON-NLS-1$
+ consumeStatementContinueWithLabel() ;
+ break;
+
+ case 299 : if (DEBUG) { System.out.println("ReturnStatement ::= return Expressionopt SEMICOLON"); } //$NON-NLS-1$
+ consumeStatementReturn() ;
+ break;
+
+ case 300 : if (DEBUG) { System.out.println("ThrowStatement ::= throw Expression SEMICOLON"); } //$NON-NLS-1$
+ consumeStatementThrow();
+ break;
+
+ case 301 : if (DEBUG) { System.out.println("SynchronizedStatement ::= OnlySynchronized LPAREN..."); } //$NON-NLS-1$
+ consumeStatementSynchronized();
+ break;
+
+ case 302 : if (DEBUG) { System.out.println("OnlySynchronized ::= synchronized"); } //$NON-NLS-1$
+ consumeOnlySynchronized();
+ break;
+
+ case 303 : if (DEBUG) { System.out.println("TryStatement ::= try TryBlock Catches"); } //$NON-NLS-1$
+ consumeStatementTry(false);
+ break;
+
+ case 304 : if (DEBUG) { System.out.println("TryStatement ::= try TryBlock Catchesopt Finally"); } //$NON-NLS-1$
+ consumeStatementTry(true);
+ break;
+
+ case 306 : if (DEBUG) { System.out.println("ExitTryBlock ::="); } //$NON-NLS-1$
+ consumeExitTryBlock();
+ break;
+
+ case 308 : if (DEBUG) { System.out.println("Catches ::= Catches CatchClause"); } //$NON-NLS-1$
+ consumeCatches();
+ break;
+
+ case 309 : if (DEBUG) { System.out.println("CatchClause ::= catch LPAREN FormalParameter RPAREN..."); } //$NON-NLS-1$
+ consumeStatementCatch() ;
+ break;
+
+ case 311 : if (DEBUG) { System.out.println("PushLPAREN ::= LPAREN"); } //$NON-NLS-1$
+ consumeLeftParen();
+ break;
+
+ case 312 : if (DEBUG) { System.out.println("PushRPAREN ::= RPAREN"); } //$NON-NLS-1$
+ consumeRightParen();
+ break;
+
+ case 317 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= this"); } //$NON-NLS-1$
+ consumePrimaryNoNewArrayThis();
+ break;
+
+ case 318 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PushLPAREN Expression_NotName..."); } //$NON-NLS-1$
+ consumePrimaryNoNewArray();
+ break;
+
+ case 319 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PushLPAREN Name PushRPAREN"); } //$NON-NLS-1$
+ consumePrimaryNoNewArrayWithName();
+ break;
+
+ case 322 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name DOT this"); } //$NON-NLS-1$
+ consumePrimaryNoNewArrayNameThis();
+ break;
+
+ case 323 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name DOT super"); } //$NON-NLS-1$
+ consumePrimaryNoNewArrayNameSuper();
+ break;
+
+ case 324 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name DOT class"); } //$NON-NLS-1$
+ consumePrimaryNoNewArrayName();
+ break;
+
+ case 325 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name Dims DOT class"); } //$NON-NLS-1$
+ consumePrimaryNoNewArrayArrayType();
+ break;
+
+ case 326 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PrimitiveType Dims DOT class"); } //$NON-NLS-1$
+ consumePrimaryNoNewArrayPrimitiveArrayType();
+ break;
+
+ case 327 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PrimitiveType DOT class"); } //$NON-NLS-1$
+ consumePrimaryNoNewArrayPrimitiveType();
+ break;
+
+ case 330 : if (DEBUG) { System.out.println("AllocationHeader ::= new ClassType LPAREN..."); } //$NON-NLS-1$
+ consumeAllocationHeader();
+ break;
+
+ case 331 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= new..."); } //$NON-NLS-1$
+ consumeClassInstanceCreationExpressionWithTypeArguments();
+ break;
+
+ case 332 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= new ClassType LPAREN"); } //$NON-NLS-1$
+ consumeClassInstanceCreationExpression();
+ break;
+
+ case 333 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= Primary DOT new..."); } //$NON-NLS-1$
+ consumeClassInstanceCreationExpressionQualifiedWithTypeArguments() ;
+ break;
+
+ case 334 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= Primary DOT new..."); } //$NON-NLS-1$
+ consumeClassInstanceCreationExpressionQualified() ;
+ break;
+
+ case 335 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::=..."); } //$NON-NLS-1$
+ consumeClassInstanceCreationExpressionQualified() ;
+ break;
+
+ case 336 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::=..."); } //$NON-NLS-1$
+ consumeClassInstanceCreationExpressionQualifiedWithTypeArguments() ;
+ break;
+
+ case 337 : if (DEBUG) { System.out.println("ClassInstanceCreationExpressionName ::= Name DOT"); } //$NON-NLS-1$
+ consumeClassInstanceCreationExpressionName() ;
+ break;
+
+ case 338 : if (DEBUG) { System.out.println("ClassBodyopt ::="); } //$NON-NLS-1$
+ consumeClassBodyopt();
+ break;
+
+ case 340 : if (DEBUG) { System.out.println("ClassBodySimpleNameopt ::="); } //$NON-NLS-1$
+ consumeClassBodyopt();
+ break;
+
+ case 342 : if (DEBUG) { System.out.println("EnterAnonymousClassBodySimpleName ::="); } //$NON-NLS-1$
+ consumeEnterAnonymousClassBodySimpleName();
+ break;
+
+ case 343 : if (DEBUG) { System.out.println("EnterAnonymousClassBody ::="); } //$NON-NLS-1$
+ consumeEnterAnonymousClassBody();
+ break;
+
+ case 345 : if (DEBUG) { System.out.println("ArgumentList ::= ArgumentList COMMA Expression"); } //$NON-NLS-1$
+ consumeArgumentList();
+ break;
+
+ case 346 : if (DEBUG) { System.out.println("ArrayCreationHeader ::= new PrimitiveType..."); } //$NON-NLS-1$
+ consumeArrayCreationHeader();
+ break;
+
+ case 347 : if (DEBUG) { System.out.println("ArrayCreationHeader ::= new ClassOrInterfaceType..."); } //$NON-NLS-1$
+ consumeArrayCreationHeader();
+ break;
+
+ case 348 : if (DEBUG) { System.out.println("ArrayCreationWithoutArrayInitializer ::= new..."); } //$NON-NLS-1$
+ consumeArrayCreationExpressionWithoutInitializer();
+ break;
+
+ case 349 : if (DEBUG) { System.out.println("ArrayCreationWithArrayInitializer ::= new PrimitiveType"); } //$NON-NLS-1$
+ consumeArrayCreationExpressionWithInitializer();
+ break;
+
+ case 350 : if (DEBUG) { System.out.println("ArrayCreationWithoutArrayInitializer ::= new..."); } //$NON-NLS-1$
+ consumeArrayCreationExpressionWithoutInitializer();
+ break;
+
+ case 351 : if (DEBUG) { System.out.println("ArrayCreationWithArrayInitializer ::= new..."); } //$NON-NLS-1$
+ consumeArrayCreationExpressionWithInitializer();
+ break;
+
+ case 353 : if (DEBUG) { System.out.println("DimWithOrWithOutExprs ::= DimWithOrWithOutExprs..."); } //$NON-NLS-1$
+ consumeDimWithOrWithOutExprs();
+ break;
+
+ case 355 : if (DEBUG) { System.out.println("DimWithOrWithOutExpr ::= LBRACKET RBRACKET"); } //$NON-NLS-1$
+ consumeDimWithOrWithOutExpr();
+ break;
+
+ case 356 : if (DEBUG) { System.out.println("Dims ::= DimsLoop"); } //$NON-NLS-1$
+ consumeDims();
+ break;
+
+ case 359 : if (DEBUG) { System.out.println("OneDimLoop ::= LBRACKET RBRACKET"); } //$NON-NLS-1$
+ consumeOneDimLoop();
+ break;
+
+ case 360 : if (DEBUG) { System.out.println("FieldAccess ::= Primary DOT Identifier"); } //$NON-NLS-1$
+ consumeFieldAccess(false);
+ break;
+
+ case 361 : if (DEBUG) { System.out.println("FieldAccess ::= super DOT Identifier"); } //$NON-NLS-1$
+ consumeFieldAccess(true);
+ break;
+
+ case 362 : if (DEBUG) { System.out.println("MethodInvocation ::= Name LPAREN ArgumentListopt RPAREN"); } //$NON-NLS-1$
+ consumeMethodInvocationName();
+ break;
+
+ case 363 : if (DEBUG) { System.out.println("MethodInvocation ::= Name DOT OnlyTypeArguments..."); } //$NON-NLS-1$
+ consumeMethodInvocationNameWithTypeArguments();
+ break;
+
+ case 364 : if (DEBUG) { System.out.println("MethodInvocation ::= Primary DOT OnlyTypeArguments..."); } //$NON-NLS-1$
+ consumeMethodInvocationPrimaryWithTypeArguments();
+ break;
+
+ case 365 : if (DEBUG) { System.out.println("MethodInvocation ::= Primary DOT Identifier LPAREN..."); } //$NON-NLS-1$
+ consumeMethodInvocationPrimary();
+ break;
+
+ case 366 : if (DEBUG) { System.out.println("MethodInvocation ::= super DOT OnlyTypeArguments..."); } //$NON-NLS-1$
+ consumeMethodInvocationSuperWithTypeArguments();
+ break;
+
+ case 367 : if (DEBUG) { System.out.println("MethodInvocation ::= super DOT Identifier LPAREN..."); } //$NON-NLS-1$
+ consumeMethodInvocationSuper();
+ break;
+
+ case 368 : if (DEBUG) { System.out.println("ArrayAccess ::= Name LBRACKET Expression RBRACKET"); } //$NON-NLS-1$
+ consumeArrayAccess(true);
+ break;
+
+ case 369 : if (DEBUG) { System.out.println("ArrayAccess ::= PrimaryNoNewArray LBRACKET Expression..."); } //$NON-NLS-1$
+ consumeArrayAccess(false);
+ break;
+
+ case 370 : if (DEBUG) { System.out.println("ArrayAccess ::= ArrayCreationWithArrayInitializer..."); } //$NON-NLS-1$
+ consumeArrayAccess(false);
+ break;
+
+ case 372 : if (DEBUG) { System.out.println("PostfixExpression ::= Name"); } //$NON-NLS-1$
+ consumePostfixExpression();
+ break;
+
+ case 375 : if (DEBUG) { System.out.println("PostIncrementExpression ::= PostfixExpression PLUS_PLUS"); } //$NON-NLS-1$
+ consumeUnaryExpression(OperatorIds.PLUS,true);
+ break;
+
+ case 376 : if (DEBUG) { System.out.println("PostDecrementExpression ::= PostfixExpression..."); } //$NON-NLS-1$
+ consumeUnaryExpression(OperatorIds.MINUS,true);
+ break;
+
+ case 377 : if (DEBUG) { System.out.println("PushPosition ::="); } //$NON-NLS-1$
+ consumePushPosition();
+ break;
+
+ case 380 : if (DEBUG) { System.out.println("UnaryExpression ::= PLUS PushPosition UnaryExpression"); } //$NON-NLS-1$
+ consumeUnaryExpression(OperatorIds.PLUS);
+ break;
+
+ case 381 : if (DEBUG) { System.out.println("UnaryExpression ::= MINUS PushPosition UnaryExpression"); } //$NON-NLS-1$
+ consumeUnaryExpression(OperatorIds.MINUS);
+ break;
+
+ case 383 : if (DEBUG) { System.out.println("PreIncrementExpression ::= PLUS_PLUS PushPosition..."); } //$NON-NLS-1$
+ consumeUnaryExpression(OperatorIds.PLUS,false);
+ break;
+
+ case 384 : if (DEBUG) { System.out.println("PreDecrementExpression ::= MINUS_MINUS PushPosition..."); } //$NON-NLS-1$
+ consumeUnaryExpression(OperatorIds.MINUS,false);
+ break;
+
+ case 386 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus ::= TWIDDLE PushPosition..."); } //$NON-NLS-1$
+ consumeUnaryExpression(OperatorIds.TWIDDLE);
+ break;
+
+ case 387 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus ::= NOT PushPosition..."); } //$NON-NLS-1$
+ consumeUnaryExpression(OperatorIds.NOT);
+ break;
+
+ case 389 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN PrimitiveType Dimsopt..."); } //$NON-NLS-1$
+ consumeCastExpressionWithPrimitiveType();
+ break;
+
+ case 390 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name..."); } //$NON-NLS-1$
+ consumeCastExpressionWithGenericsArray();
+ break;
+
+ case 391 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name..."); } //$NON-NLS-1$
+ consumeCastExpressionWithQualifiedGenericsArray();
+ break;
+
+ case 392 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name PushRPAREN..."); } //$NON-NLS-1$
+ consumeCastExpressionLL1();
+ break;
+
+ case 393 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name Dims PushRPAREN..."); } //$NON-NLS-1$
+ consumeCastExpressionWithNameArray();
+ break;
+
+ case 394 : if (DEBUG) { System.out.println("OnlyTypeArgumentsForCastExpression ::= OnlyTypeArguments"); } //$NON-NLS-1$
+ consumeOnlyTypeArgumentsForCastExpression();
+ break;
+
+ case 395 : if (DEBUG) { System.out.println("InsideCastExpression ::="); } //$NON-NLS-1$
+ consumeInsideCastExpression();
+ break;
+
+ case 396 : if (DEBUG) { System.out.println("InsideCastExpressionLL1 ::="); } //$NON-NLS-1$
+ consumeInsideCastExpressionLL1();
+ break;
+
+ case 397 : if (DEBUG) { System.out.println("InsideCastExpressionWithQualifiedGenerics ::="); } //$NON-NLS-1$
+ consumeInsideCastExpressionWithQualifiedGenerics();
+ break;
+
+ case 399 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.MULTIPLY);
+ break;
+
+ case 400 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.DIVIDE);
+ break;
+
+ case 401 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.REMAINDER);
+ break;
+
+ case 403 : if (DEBUG) { System.out.println("AdditiveExpression ::= AdditiveExpression PLUS..."); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.PLUS);
+ break;
+
+ case 404 : if (DEBUG) { System.out.println("AdditiveExpression ::= AdditiveExpression MINUS..."); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.MINUS);
+ break;
+
+ case 406 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression LEFT_SHIFT..."); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.LEFT_SHIFT);
+ break;
+
+ case 407 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression RIGHT_SHIFT..."); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.RIGHT_SHIFT);
+ break;
+
+ case 408 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression UNSIGNED_RIGHT_SHIFT"); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.UNSIGNED_RIGHT_SHIFT);
+ break;
+
+ case 410 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression LESS..."); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.LESS);
+ break;
+
+ case 411 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression GREATER..."); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.GREATER);
+ break;
+
+ case 412 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression LESS_EQUAL"); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.LESS_EQUAL);
+ break;
+
+ case 413 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression..."); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.GREATER_EQUAL);
+ break;
+
+ case 415 : if (DEBUG) { System.out.println("InstanceofExpression ::= InstanceofExpression instanceof"); } //$NON-NLS-1$
+ consumeInstanceOfExpression(OperatorIds.INSTANCEOF);
+ break;
+
+ case 417 : if (DEBUG) { System.out.println("EqualityExpression ::= EqualityExpression EQUAL_EQUAL..."); } //$NON-NLS-1$
+ consumeEqualityExpression(OperatorIds.EQUAL_EQUAL);
+ break;
+
+ case 418 : if (DEBUG) { System.out.println("EqualityExpression ::= EqualityExpression NOT_EQUAL..."); } //$NON-NLS-1$
+ consumeEqualityExpression(OperatorIds.NOT_EQUAL);
+ break;
+
+ case 420 : if (DEBUG) { System.out.println("AndExpression ::= AndExpression AND EqualityExpression"); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.AND);
+ break;
+
+ case 422 : if (DEBUG) { System.out.println("ExclusiveOrExpression ::= ExclusiveOrExpression XOR..."); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.XOR);
+ break;
+
+ case 424 : if (DEBUG) { System.out.println("InclusiveOrExpression ::= InclusiveOrExpression OR..."); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.OR);
+ break;
+
+ case 426 : if (DEBUG) { System.out.println("ConditionalAndExpression ::= ConditionalAndExpression..."); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.AND_AND);
+ break;
+
+ case 428 : if (DEBUG) { System.out.println("ConditionalOrExpression ::= ConditionalOrExpression..."); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.OR_OR);
+ break;
+
+ case 430 : if (DEBUG) { System.out.println("ConditionalExpression ::= ConditionalOrExpression..."); } //$NON-NLS-1$
+ consumeConditionalExpression(OperatorIds.QUESTIONCOLON) ;
+ break;
+
+ case 433 : if (DEBUG) { System.out.println("Assignment ::= PostfixExpression AssignmentOperator..."); } //$NON-NLS-1$
+ consumeAssignment();
+ break;
+
+ case 435 : if (DEBUG) { System.out.println("Assignment ::= InvalidArrayInitializerAssignement"); } //$NON-NLS-1$
+ ignoreExpressionAssignment();
+ break;
+
+ case 436 : if (DEBUG) { System.out.println("AssignmentOperator ::= EQUAL"); } //$NON-NLS-1$
+ consumeAssignmentOperator(EQUAL);
+ break;
+
+ case 437 : if (DEBUG) { System.out.println("AssignmentOperator ::= MULTIPLY_EQUAL"); } //$NON-NLS-1$
+ consumeAssignmentOperator(MULTIPLY);
+ break;
+
+ case 438 : if (DEBUG) { System.out.println("AssignmentOperator ::= DIVIDE_EQUAL"); } //$NON-NLS-1$
+ consumeAssignmentOperator(DIVIDE);
+ break;
+
+ case 439 : if (DEBUG) { System.out.println("AssignmentOperator ::= REMAINDER_EQUAL"); } //$NON-NLS-1$
+ consumeAssignmentOperator(REMAINDER);
+ break;
+
+ case 440 : if (DEBUG) { System.out.println("AssignmentOperator ::= PLUS_EQUAL"); } //$NON-NLS-1$
+ consumeAssignmentOperator(PLUS);
+ break;
+
+ case 441 : if (DEBUG) { System.out.println("AssignmentOperator ::= MINUS_EQUAL"); } //$NON-NLS-1$
+ consumeAssignmentOperator(MINUS);
+ break;
+
+ case 442 : if (DEBUG) { System.out.println("AssignmentOperator ::= LEFT_SHIFT_EQUAL"); } //$NON-NLS-1$
+ consumeAssignmentOperator(LEFT_SHIFT);
+ break;
+
+ case 443 : if (DEBUG) { System.out.println("AssignmentOperator ::= RIGHT_SHIFT_EQUAL"); } //$NON-NLS-1$
+ consumeAssignmentOperator(RIGHT_SHIFT);
+ break;
+
+ case 444 : if (DEBUG) { System.out.println("AssignmentOperator ::= UNSIGNED_RIGHT_SHIFT_EQUAL"); } //$NON-NLS-1$
+ consumeAssignmentOperator(UNSIGNED_RIGHT_SHIFT);
+ break;
+
+ case 445 : if (DEBUG) { System.out.println("AssignmentOperator ::= AND_EQUAL"); } //$NON-NLS-1$
+ consumeAssignmentOperator(AND);
+ break;
+
+ case 446 : if (DEBUG) { System.out.println("AssignmentOperator ::= XOR_EQUAL"); } //$NON-NLS-1$
+ consumeAssignmentOperator(XOR);
+ break;
+
+ case 447 : if (DEBUG) { System.out.println("AssignmentOperator ::= OR_EQUAL"); } //$NON-NLS-1$
+ consumeAssignmentOperator(OR);
+ break;
+
+ case 451 : if (DEBUG) { System.out.println("Expressionopt ::="); } //$NON-NLS-1$
+ consumeEmptyExpression();
+ break;
+
+ case 456 : if (DEBUG) { System.out.println("ClassBodyDeclarationsopt ::="); } //$NON-NLS-1$
+ consumeEmptyClassBodyDeclarationsopt();
+ break;
+
+ case 457 : if (DEBUG) { System.out.println("ClassBodyDeclarationsopt ::= NestedType..."); } //$NON-NLS-1$
+ consumeClassBodyDeclarationsopt();
+ break;
+
+ case 458 : if (DEBUG) { System.out.println("Modifiersopt ::="); } //$NON-NLS-1$
+ consumeDefaultModifiers();
+ break;
+
+ case 459 : if (DEBUG) { System.out.println("Modifiersopt ::= Modifiers"); } //$NON-NLS-1$
+ consumeModifiers();
+ break;
+
+ case 460 : if (DEBUG) { System.out.println("BlockStatementsopt ::="); } //$NON-NLS-1$
+ consumeEmptyBlockStatementsopt();
+ break;
+
+ case 462 : if (DEBUG) { System.out.println("Dimsopt ::="); } //$NON-NLS-1$
+ consumeEmptyDimsopt();
+ break;
+
+ case 464 : if (DEBUG) { System.out.println("ArgumentListopt ::="); } //$NON-NLS-1$
+ consumeEmptyArgumentListopt();
+ break;
+
+ case 468 : if (DEBUG) { System.out.println("FormalParameterListopt ::="); } //$NON-NLS-1$
+ consumeFormalParameterListopt();
+ break;
+
+ case 472 : if (DEBUG) { System.out.println("InterfaceMemberDeclarationsopt ::="); } //$NON-NLS-1$
+ consumeEmptyInterfaceMemberDeclarationsopt();
+ break;
+
+ case 473 : if (DEBUG) { System.out.println("InterfaceMemberDeclarationsopt ::= NestedType..."); } //$NON-NLS-1$
+ consumeInterfaceMemberDeclarationsopt();
+ break;
+
+ case 474 : if (DEBUG) { System.out.println("NestedType ::="); } //$NON-NLS-1$
+ consumeNestedType();
+ break;
+
+ case 475 : if (DEBUG) { System.out.println("ForInitopt ::="); } //$NON-NLS-1$
+ consumeEmptyForInitopt();
+ break;
+
+ case 477 : if (DEBUG) { System.out.println("ForUpdateopt ::="); } //$NON-NLS-1$
+ consumeEmptyForUpdateopt();
+ break;
+
+ case 481 : if (DEBUG) { System.out.println("Catchesopt ::="); } //$NON-NLS-1$
+ consumeEmptyCatchesopt();
+ break;
+
+ case 483 : if (DEBUG) { System.out.println("EnumDeclaration ::= EnumHeader ClassHeaderImplementsopt"); } //$NON-NLS-1$
+ consumeEnumDeclaration();
+ break;
+
+ case 484 : if (DEBUG) { System.out.println("EnumHeader ::= Modifiersopt enum Identifier"); } //$NON-NLS-1$
+ consumeEnumHeader();
+ break;
+
+ case 485 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumBodyDeclarationsopt RBRACE"); } //$NON-NLS-1$
+ consumeEnumBodyNoConstants();
+ break;
+
+ case 486 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE COMMA EnumBodyDeclarationsopt..."); } //$NON-NLS-1$
+ consumeEnumBodyNoConstants();
+ break;
+
+ case 487 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumConstants COMMA..."); } //$NON-NLS-1$
+ consumeEnumBodyWithConstants();
+ break;
+
+ case 488 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumConstants..."); } //$NON-NLS-1$
+ consumeEnumBodyWithConstants();
+ break;
+
+ case 490 : if (DEBUG) { System.out.println("EnumConstants ::= EnumConstants COMMA EnumConstant"); } //$NON-NLS-1$
+ consumeEnumConstants();
+ break;
+
+ case 491 : if (DEBUG) { System.out.println("EnumConstantHeader ::= Identifier Argumentsopt"); } //$NON-NLS-1$
+ consumeEnumConstantHeader();
+ break;
+
+ case 492 : if (DEBUG) { System.out.println("EnumConstant ::= EnumConstantHeader ClassBody"); } //$NON-NLS-1$
+ consumeEnumConstantWithClassBody();
+ break;
+
+ case 493 : if (DEBUG) { System.out.println("EnumConstant ::= EnumConstantHeader"); } //$NON-NLS-1$
+ consumeEnumConstantNoClassBody();
+ break;
+
+ case 494 : if (DEBUG) { System.out.println("Arguments ::= LPAREN ArgumentListopt RPAREN"); } //$NON-NLS-1$
+ consumeArguments();
+ break;
+
+ case 495 : if (DEBUG) { System.out.println("Argumentsopt ::="); } //$NON-NLS-1$
+ consumeEmptyArguments();
+ break;
+
+ case 497 : if (DEBUG) { System.out.println("EnumDeclarations ::= SEMICOLON ClassBodyDeclarationsopt"); } //$NON-NLS-1$
+ consumeEnumDeclarations();
+ break;
+
+ case 498 : if (DEBUG) { System.out.println("EnumBodyDeclarationsopt ::="); } //$NON-NLS-1$
+ consumeEmptyEnumDeclarations();
+ break;
+
+ case 500 : if (DEBUG) { System.out.println("EnhancedForStatement ::= EnhancedForStatementHeader..."); } //$NON-NLS-1$
+ consumeEnhancedForStatement();
+ break;
+
+ case 501 : if (DEBUG) { System.out.println("EnhancedForStatementNoShortIf ::=..."); } //$NON-NLS-1$
+ consumeEnhancedForStatement();
+ break;
+
+ case 502 : if (DEBUG) { System.out.println("EnhancedForStatementHeader ::= for LPAREN Type..."); } //$NON-NLS-1$
+ consumeEnhancedForStatementHeader(false);
+ break;
+
+ case 503 : if (DEBUG) { System.out.println("EnhancedForStatementHeader ::= for LPAREN Modifiers Type"); } //$NON-NLS-1$
+ consumeEnhancedForStatementHeader(true);
+ break;
+
+ case 504 : if (DEBUG) { System.out.println("SingleStaticImportDeclaration ::=..."); } //$NON-NLS-1$
+ consumeImportDeclaration();
+ break;
+
+ case 505 : if (DEBUG) { System.out.println("SingleStaticImportDeclarationName ::= import static Name"); } //$NON-NLS-1$
+ consumeSingleStaticImportDeclarationName();
+ break;
+
+ case 506 : if (DEBUG) { System.out.println("StaticImportOnDemandDeclaration ::=..."); } //$NON-NLS-1$
+ consumeImportDeclaration();
+ break;
+
+ case 507 : if (DEBUG) { System.out.println("StaticImportOnDemandDeclarationName ::= import static..."); } //$NON-NLS-1$
+ consumeStaticImportOnDemandDeclarationName();
+ break;
+
+ case 508 : if (DEBUG) { System.out.println("TypeArguments ::= LESS TypeArgumentList1"); } //$NON-NLS-1$
+ consumeTypeArguments();
+ break;
+
+ case 509 : if (DEBUG) { System.out.println("OnlyTypeArguments ::= LESS TypeArgumentList1"); } //$NON-NLS-1$
+ consumeOnlyTypeArguments();
+ break;
+
+ case 511 : if (DEBUG) { System.out.println("TypeArgumentList1 ::= TypeArgumentList COMMA..."); } //$NON-NLS-1$
+ consumeTypeArgumentList1();
+ break;
+
+ case 513 : if (DEBUG) { System.out.println("TypeArgumentList ::= TypeArgumentList COMMA TypeArgument"); } //$NON-NLS-1$
+ consumeTypeArgumentList();
+ break;
+
+ case 514 : if (DEBUG) { System.out.println("TypeArgument ::= ReferenceType"); } //$NON-NLS-1$
+ consumeTypeArgument();
+ break;
+
+ case 518 : if (DEBUG) { System.out.println("ReferenceType1 ::= ReferenceType GREATER"); } //$NON-NLS-1$
+ consumeReferenceType1();
+ break;
+
+ case 519 : if (DEBUG) { System.out.println("ReferenceType1 ::= ClassOrInterface LESS..."); } //$NON-NLS-1$
+ consumeTypeArgumentReferenceType1();
+ break;
+
+ case 521 : if (DEBUG) { System.out.println("TypeArgumentList2 ::= TypeArgumentList COMMA..."); } //$NON-NLS-1$
+ consumeTypeArgumentList2();
+ break;
+
+ case 524 : if (DEBUG) { System.out.println("ReferenceType2 ::= ReferenceType RIGHT_SHIFT"); } //$NON-NLS-1$
+ consumeReferenceType2();
+ break;
+
+ case 525 : if (DEBUG) { System.out.println("ReferenceType2 ::= ClassOrInterface LESS..."); } //$NON-NLS-1$
+ consumeTypeArgumentReferenceType2();
+ break;
+
+ case 527 : if (DEBUG) { System.out.println("TypeArgumentList3 ::= TypeArgumentList COMMA..."); } //$NON-NLS-1$
+ consumeTypeArgumentList3();
+ break;
+
+ case 530 : if (DEBUG) { System.out.println("ReferenceType3 ::= ReferenceType UNSIGNED_RIGHT_SHIFT"); } //$NON-NLS-1$
+ consumeReferenceType3();
+ break;
+
+ case 531 : if (DEBUG) { System.out.println("Wildcard ::= QUESTION"); } //$NON-NLS-1$
+ consumeWildcard();
+ break;
+
+ case 532 : if (DEBUG) { System.out.println("Wildcard ::= QUESTION WildcardBounds"); } //$NON-NLS-1$
+ consumeWildcardWithBounds();
+ break;
+
+ case 533 : if (DEBUG) { System.out.println("WildcardBounds ::= extends ReferenceType"); } //$NON-NLS-1$
+ consumeWildcardBoundsExtends();
+ break;
+
+ case 534 : if (DEBUG) { System.out.println("WildcardBounds ::= super ReferenceType"); } //$NON-NLS-1$
+ consumeWildcardBoundsSuper();
+ break;
+
+ case 535 : if (DEBUG) { System.out.println("Wildcard1 ::= QUESTION GREATER"); } //$NON-NLS-1$
+ consumeWildcard1();
+ break;
+
+ case 536 : if (DEBUG) { System.out.println("Wildcard1 ::= QUESTION WildcardBounds1"); } //$NON-NLS-1$
+ consumeWildcard1WithBounds();
+ break;
+
+ case 537 : if (DEBUG) { System.out.println("WildcardBounds1 ::= extends ReferenceType1"); } //$NON-NLS-1$
+ consumeWildcardBounds1Extends();
+ break;
+
+ case 538 : if (DEBUG) { System.out.println("WildcardBounds1 ::= super ReferenceType1"); } //$NON-NLS-1$
+ consumeWildcardBounds1Super();
+ break;
+
+ case 539 : if (DEBUG) { System.out.println("Wildcard2 ::= QUESTION RIGHT_SHIFT"); } //$NON-NLS-1$
+ consumeWildcard2();
+ break;
+
+ case 540 : if (DEBUG) { System.out.println("Wildcard2 ::= QUESTION WildcardBounds2"); } //$NON-NLS-1$
+ consumeWildcard2WithBounds();
+ break;
+
+ case 541 : if (DEBUG) { System.out.println("WildcardBounds2 ::= extends ReferenceType2"); } //$NON-NLS-1$
+ consumeWildcardBounds2Extends();
+ break;
+
+ case 542 : if (DEBUG) { System.out.println("WildcardBounds2 ::= super ReferenceType2"); } //$NON-NLS-1$
+ consumeWildcardBounds2Super();
+ break;
+
+ case 543 : if (DEBUG) { System.out.println("Wildcard3 ::= QUESTION UNSIGNED_RIGHT_SHIFT"); } //$NON-NLS-1$
+ consumeWildcard3();
+ break;
+
+ case 544 : if (DEBUG) { System.out.println("Wildcard3 ::= QUESTION WildcardBounds3"); } //$NON-NLS-1$
+ consumeWildcard3WithBounds();
+ break;
+
+ case 545 : if (DEBUG) { System.out.println("WildcardBounds3 ::= extends ReferenceType3"); } //$NON-NLS-1$
+ consumeWildcardBounds3Extends();
+ break;
+
+ case 546 : if (DEBUG) { System.out.println("WildcardBounds3 ::= super ReferenceType3"); } //$NON-NLS-1$
+ consumeWildcardBounds3Super();
+ break;
+
+ case 547 : if (DEBUG) { System.out.println("TypeParameterHeader ::= Identifier"); } //$NON-NLS-1$
+ consumeTypeParameterHeader();
+ break;
+
+ case 548 : if (DEBUG) { System.out.println("TypeParameters ::= LESS TypeParameterList1"); } //$NON-NLS-1$
+ consumeTypeParameters();
+ break;
+
+ case 550 : if (DEBUG) { System.out.println("TypeParameterList ::= TypeParameterList COMMA..."); } //$NON-NLS-1$
+ consumeTypeParameterList();
+ break;
+
+ case 552 : if (DEBUG) { System.out.println("TypeParameter ::= TypeParameterHeader extends..."); } //$NON-NLS-1$
+ consumeTypeParameterWithExtends();
+ break;
+
+ case 553 : if (DEBUG) { System.out.println("TypeParameter ::= TypeParameterHeader extends..."); } //$NON-NLS-1$
+ consumeTypeParameterWithExtendsAndBounds();
+ break;
+
+ case 555 : if (DEBUG) { System.out.println("AdditionalBoundList ::= AdditionalBoundList..."); } //$NON-NLS-1$
+ consumeAdditionalBoundList();
+ break;
+
+ case 556 : if (DEBUG) { System.out.println("AdditionalBound ::= AND ReferenceType"); } //$NON-NLS-1$
+ consumeAdditionalBound();
+ break;
+
+ case 558 : if (DEBUG) { System.out.println("TypeParameterList1 ::= TypeParameterList COMMA..."); } //$NON-NLS-1$
+ consumeTypeParameterList1();
+ break;
+
+ case 559 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader GREATER"); } //$NON-NLS-1$
+ consumeTypeParameter1();
+ break;
+
+ case 560 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader extends..."); } //$NON-NLS-1$
+ consumeTypeParameter1WithExtends();
+ break;
+
+ case 561 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader extends..."); } //$NON-NLS-1$
+ consumeTypeParameter1WithExtendsAndBounds();
+ break;
+
+ case 563 : if (DEBUG) { System.out.println("AdditionalBoundList1 ::= AdditionalBoundList..."); } //$NON-NLS-1$
+ consumeAdditionalBoundList1();
+ break;
+
+ case 564 : if (DEBUG) { System.out.println("AdditionalBound1 ::= AND ReferenceType1"); } //$NON-NLS-1$
+ consumeAdditionalBound1();
+ break;
+
+ case 570 : if (DEBUG) { System.out.println("UnaryExpression_NotName ::= PLUS PushPosition..."); } //$NON-NLS-1$
+ consumeUnaryExpression(OperatorIds.PLUS);
+ break;
+
+ case 571 : if (DEBUG) { System.out.println("UnaryExpression_NotName ::= MINUS PushPosition..."); } //$NON-NLS-1$
+ consumeUnaryExpression(OperatorIds.MINUS);
+ break;
+
+ case 574 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus_NotName ::= TWIDDLE..."); } //$NON-NLS-1$
+ consumeUnaryExpression(OperatorIds.TWIDDLE);
+ break;
+
+ case 575 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus_NotName ::= NOT PushPosition"); } //$NON-NLS-1$
+ consumeUnaryExpression(OperatorIds.NOT);
+ break;
+
+ case 578 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.MULTIPLY);
+ break;
+
+ case 579 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name MULTIPLY..."); } //$NON-NLS-1$
+ consumeBinaryExpressionWithName(OperatorIds.MULTIPLY);
+ break;
+
+ case 580 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.DIVIDE);
+ break;
+
+ case 581 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name DIVIDE..."); } //$NON-NLS-1$
+ consumeBinaryExpressionWithName(OperatorIds.DIVIDE);
+ break;
+
+ case 582 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.REMAINDER);
+ break;
+
+ case 583 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name REMAINDER..."); } //$NON-NLS-1$
+ consumeBinaryExpressionWithName(OperatorIds.REMAINDER);
+ break;
+
+ case 585 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::=..."); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.PLUS);
+ break;
+
+ case 586 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::= Name PLUS..."); } //$NON-NLS-1$
+ consumeBinaryExpressionWithName(OperatorIds.PLUS);
+ break;
+
+ case 587 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::=..."); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.MINUS);
+ break;
+
+ case 588 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::= Name MINUS..."); } //$NON-NLS-1$
+ consumeBinaryExpressionWithName(OperatorIds.MINUS);
+ break;
+
+ case 590 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.LEFT_SHIFT);
+ break;
+
+ case 591 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name LEFT_SHIFT..."); } //$NON-NLS-1$
+ consumeBinaryExpressionWithName(OperatorIds.LEFT_SHIFT);
+ break;
+
+ case 592 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.RIGHT_SHIFT);
+ break;
+
+ case 593 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name RIGHT_SHIFT..."); } //$NON-NLS-1$
+ consumeBinaryExpressionWithName(OperatorIds.RIGHT_SHIFT);
+ break;
+
+ case 594 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.UNSIGNED_RIGHT_SHIFT);
+ break;
+
+ case 595 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name UNSIGNED_RIGHT_SHIFT..."); } //$NON-NLS-1$
+ consumeBinaryExpressionWithName(OperatorIds.UNSIGNED_RIGHT_SHIFT);
+ break;
+
+ case 597 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= ShiftExpression_NotName"); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.LESS);
+ break;
+
+ case 598 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name LESS..."); } //$NON-NLS-1$
+ consumeBinaryExpressionWithName(OperatorIds.LESS);
+ break;
+
+ case 599 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= ShiftExpression_NotName"); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.GREATER);
+ break;
+
+ case 600 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name GREATER..."); } //$NON-NLS-1$
+ consumeBinaryExpressionWithName(OperatorIds.GREATER);
+ break;
+
+ case 601 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::=..."); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.LESS_EQUAL);
+ break;
+
+ case 602 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name LESS_EQUAL..."); } //$NON-NLS-1$
+ consumeBinaryExpressionWithName(OperatorIds.LESS_EQUAL);
+ break;
+
+ case 603 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::=..."); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.GREATER_EQUAL);
+ break;
+
+ case 604 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name GREATER_EQUAL..."); } //$NON-NLS-1$
+ consumeBinaryExpressionWithName(OperatorIds.GREATER_EQUAL);
+ break;
+
+ case 606 : if (DEBUG) { System.out.println("InstanceofExpression_NotName ::= Name instanceof..."); } //$NON-NLS-1$
+ consumeInstanceOfExpressionWithName(OperatorIds.INSTANCEOF);
+ break;
+
+ case 607 : if (DEBUG) { System.out.println("InstanceofExpression_NotName ::=..."); } //$NON-NLS-1$
+ consumeInstanceOfExpression(OperatorIds.INSTANCEOF);
+ break;
+
+ case 609 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::=..."); } //$NON-NLS-1$
+ consumeEqualityExpression(OperatorIds.EQUAL_EQUAL);
+ break;
+
+ case 610 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::= Name EQUAL_EQUAL..."); } //$NON-NLS-1$
+ consumeEqualityExpressionWithName(OperatorIds.EQUAL_EQUAL);
+ break;
+
+ case 611 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::=..."); } //$NON-NLS-1$
+ consumeEqualityExpression(OperatorIds.NOT_EQUAL);
+ break;
+
+ case 612 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::= Name NOT_EQUAL..."); } //$NON-NLS-1$
+ consumeEqualityExpressionWithName(OperatorIds.NOT_EQUAL);
+ break;
+
+ case 614 : if (DEBUG) { System.out.println("AndExpression_NotName ::= AndExpression_NotName AND..."); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.AND);
+ break;
+
+ case 615 : if (DEBUG) { System.out.println("AndExpression_NotName ::= Name AND EqualityExpression"); } //$NON-NLS-1$
+ consumeBinaryExpressionWithName(OperatorIds.AND);
+ break;
+
+ case 617 : if (DEBUG) { System.out.println("ExclusiveOrExpression_NotName ::=..."); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.XOR);
+ break;
+
+ case 618 : if (DEBUG) { System.out.println("ExclusiveOrExpression_NotName ::= Name XOR AndExpression"); } //$NON-NLS-1$
+ consumeBinaryExpressionWithName(OperatorIds.XOR);
+ break;
+
+ case 620 : if (DEBUG) { System.out.println("InclusiveOrExpression_NotName ::=..."); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.OR);
+ break;
+
+ case 621 : if (DEBUG) { System.out.println("InclusiveOrExpression_NotName ::= Name OR..."); } //$NON-NLS-1$
+ consumeBinaryExpressionWithName(OperatorIds.OR);
+ break;
+
+ case 623 : if (DEBUG) { System.out.println("ConditionalAndExpression_NotName ::=..."); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.AND_AND);
+ break;
+
+ case 624 : if (DEBUG) { System.out.println("ConditionalAndExpression_NotName ::= Name AND_AND..."); } //$NON-NLS-1$
+ consumeBinaryExpressionWithName(OperatorIds.AND_AND);
+ break;
+
+ case 626 : if (DEBUG) { System.out.println("ConditionalOrExpression_NotName ::=..."); } //$NON-NLS-1$
+ consumeBinaryExpression(OperatorIds.OR_OR);
+ break;
+
+ case 627 : if (DEBUG) { System.out.println("ConditionalOrExpression_NotName ::= Name OR_OR..."); } //$NON-NLS-1$
+ consumeBinaryExpressionWithName(OperatorIds.OR_OR);
+ break;
+
+ case 629 : if (DEBUG) { System.out.println("ConditionalExpression_NotName ::=..."); } //$NON-NLS-1$
+ consumeConditionalExpression(OperatorIds.QUESTIONCOLON) ;
+ break;
+
+ case 630 : if (DEBUG) { System.out.println("ConditionalExpression_NotName ::= Name QUESTION..."); } //$NON-NLS-1$
+ consumeConditionalExpressionWithName(OperatorIds.QUESTIONCOLON) ;
+ break;
+
+ case 634 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeader ::= Modifiers AT..."); } //$NON-NLS-1$
+ consumeAnnotationTypeDeclarationHeader() ;
+ break;
+
+ case 635 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeader ::= AT PushModifiers..."); } //$NON-NLS-1$
+ consumeAnnotationTypeDeclarationHeader() ;
+ break;
+
+ case 636 : if (DEBUG) { System.out.println("AnnotationTypeDeclaration ::=..."); } //$NON-NLS-1$
+ consumeAnnotationTypeDeclaration() ;
+ break;
+
+ case 638 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarationsopt ::="); } //$NON-NLS-1$
+ consumeEmptyAnnotationTypeMemberDeclarationsopt() ;
+ break;
+
+ case 641 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarations ::=..."); } //$NON-NLS-1$
+ consumeAnnotationTypeMemberDeclarations() ;
+ break;
+
+ case 642 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarationHeader ::= Modifiersopt"); } //$NON-NLS-1$
+ consumeAnnotationTypeMemberDeclarationHeader() ;
+ break;
+
+ case 643 : if (DEBUG) { System.out.println("AnnotationTypeMemberHeaderExtendedDims ::= Dimsopt"); } //$NON-NLS-1$
+ consumeAnnotationTypeMemberHeaderExtendedDims() ;
+ break;
+
+ case 644 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclaration ::=..."); } //$NON-NLS-1$
+ consumeAnnotationTypeMemberDeclaration() ;
+ break;
+
+ case 647 : if (DEBUG) { System.out.println("DefaultValueopt ::="); } //$NON-NLS-1$
+ consumeEmptyDefaultValue() ;
+ break;
+
+ case 653 : if (DEBUG) { System.out.println("NormalAnnotation ::= AT Name LPAREN MemberValuePairsopt"); } //$NON-NLS-1$
+ consumeNormalAnnotation() ;
+ break;
+
+ case 654 : if (DEBUG) { System.out.println("MemberValuePairsopt ::="); } //$NON-NLS-1$
+ consumeEmptyMemberValuePairsopt() ;
+ break;
+
+ case 657 : if (DEBUG) { System.out.println("MemberValuePairs ::= MemberValuePairs COMMA..."); } //$NON-NLS-1$
+ consumeMemberValuePairs() ;
+ break;
+
+ case 658 : if (DEBUG) { System.out.println("MemberValuePair ::= SimpleName EQUAL MemberValue"); } //$NON-NLS-1$
+ consumeMemberValuePair() ;
+ break;
+
+ case 660 : if (DEBUG) { System.out.println("MemberValue ::= Name"); } //$NON-NLS-1$
+ consumeMemberValueAsName() ;
+ break;
+
+ case 663 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::= LBRACE PushLeftBrace..."); } //$NON-NLS-1$
+ consumeMemberValueArrayInitializer() ;
+ break;
+
+ case 664 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::= LBRACE PushLeftBrace..."); } //$NON-NLS-1$
+ consumeMemberValueArrayInitializer() ;
+ break;
+
+ case 665 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::= LBRACE PushLeftBrace..."); } //$NON-NLS-1$
+ consumeEmptyMemberValueArrayInitializer() ;
+ break;
+
+ case 666 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::= LBRACE PushLeftBrace..."); } //$NON-NLS-1$
+ consumeEmptyMemberValueArrayInitializer() ;
+ break;
+
+ case 668 : if (DEBUG) { System.out.println("MemberValues ::= MemberValues COMMA MemberValue"); } //$NON-NLS-1$
+ consumeMemberValues() ;
+ break;
+
+ case 669 : if (DEBUG) { System.out.println("MarkerAnnotation ::= AT Name"); } //$NON-NLS-1$
+ consumeMarkerAnnotation() ;
+ break;
+
+ case 670 : if (DEBUG) { System.out.println("SingleMemberAnnotation ::= AT Name LPAREN MemberValue..."); } //$NON-NLS-1$
+ consumeSingleMemberAnnotation() ;
+ break;
+
+ }
+}
+protected void consumeSimpleAssertStatement() {
+ // AssertStatement ::= 'assert' Expression ';'
+ this.expressionLengthPtr--;
+ pushOnAstStack(new AssertStatement(this.expressionStack[this.expressionPtr--], this.intStack[this.intPtr--]));
+}
+protected void consumeSingleMemberAnnotation() {
+ // SingleMemberAnnotation ::= '@' Name '(' MemberValue ')'
+ SingleMemberAnnotation singleMemberAnnotation = null;
+ int length = this.identifierLengthStack[this.identifierLengthPtr--];
+ if (length == 1) {
+ singleMemberAnnotation = new SingleMemberAnnotation(this.identifierStack[this.identifierPtr], this.identifierPositionStack[this.identifierPtr--], this.intStack[this.intPtr--]);
+ } else {
+ char[][] tokens = new char[length][];
+ this.identifierPtr -= length;
+ long[] positions = new long[length];
+ System.arraycopy(this.identifierStack, this.identifierPtr + 1, tokens, 0, length);
+ System.arraycopy(
+ this.identifierPositionStack,
+ this.identifierPtr + 1,
+ positions,
+ 0,
+ length);
+ singleMemberAnnotation = new SingleMemberAnnotation(tokens, positions, this.intStack[this.intPtr--]);
+ }
+ singleMemberAnnotation.memberValue = this.expressionStack[this.expressionPtr--];
+ this.expressionLengthPtr--;
+ int sourceStart = singleMemberAnnotation.sourceStart;
+ if (this.modifiersSourceStart < 0) {
+ this.modifiersSourceStart = sourceStart;
+ } else if (this.modifiersSourceStart > sourceStart) {
+ this.modifiersSourceStart = sourceStart;
+ }
+ singleMemberAnnotation.declarationSourceEnd = this.rParenPos;
+ pushOnExpressionStack(singleMemberAnnotation);
+ if(options.sourceLevel < ClassFileConstants.JDK1_5 &&
+ this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
+ this.problemReporter().invalidUsageOfAnnotation(singleMemberAnnotation);
+ }
+}
+protected void consumeSingleStaticImportDeclarationName() {
+ // SingleTypeImportDeclarationName ::= 'import' 'static' Name
+ /* push an ImportRef build from the last name
+ stored in the identifier stack. */
+
+ ImportReference impt;
+ int length;
+ char[][] tokens = new char[length = this.identifierLengthStack[this.identifierLengthPtr--]][];
+ this.identifierPtr -= length;
+ long[] positions = new long[length];
+ System.arraycopy(this.identifierStack, this.identifierPtr + 1, tokens, 0, length);
+ System.arraycopy(this.identifierPositionStack, this.identifierPtr + 1, positions, 0, length);
+ pushOnAstStack(impt = new ImportReference(tokens, positions, false, AccStatic));
+
+ this.modifiers = AccDefault;
+ this.modifiersSourceStart = -1; // <-- see comment into modifiersFlag(int)
+
+ if (this.currentToken == TokenNameSEMICOLON){
+ impt.declarationSourceEnd = this.scanner.currentPosition - 1;
+ } else {
+ impt.declarationSourceEnd = impt.sourceEnd;
+ }
+ impt.declarationEnd = impt.declarationSourceEnd;
+ //this.endPosition is just before the ;
+ impt.declarationSourceStart = this.intStack[this.intPtr--];
+
+ if(this.options.sourceLevel < ClassFileConstants.JDK1_5 &&
+ this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
+ impt.modifiers = AccDefault; // convert the static import reference to a non-static importe reference
+ this.problemReporter().invalidUsageOfStaticImports(impt);
+ }
+
+ // recovery
+ if (this.currentElement != null){
+ this.lastCheckPoint = impt.declarationSourceEnd+1;
+ this.currentElement = this.currentElement.add(impt, 0);
+ this.lastIgnoredToken = -1;
+ this.restartRecovery = true; // used to avoid branching back into the regular automaton
+ }
+}
+protected void consumeSingleTypeImportDeclarationName() {
+ // SingleTypeImportDeclarationName ::= 'import' Name
+ /* push an ImportRef build from the last name
+ stored in the identifier stack. */
+
+ ImportReference impt;
+ int length;
+ char[][] tokens = new char[length = this.identifierLengthStack[this.identifierLengthPtr--]][];
+ this.identifierPtr -= length;
+ long[] positions = new long[length];
+ System.arraycopy(this.identifierStack, this.identifierPtr + 1, tokens, 0, length);
+ System.arraycopy(this.identifierPositionStack, this.identifierPtr + 1, positions, 0, length);
+ pushOnAstStack(impt = new ImportReference(tokens, positions, false, AccDefault));
+
+ if (this.currentToken == TokenNameSEMICOLON){
+ impt.declarationSourceEnd = this.scanner.currentPosition - 1;
+ } else {
+ impt.declarationSourceEnd = impt.sourceEnd;
+ }
+ impt.declarationEnd = impt.declarationSourceEnd;
+ //this.endPosition is just before the ;
+ impt.declarationSourceStart = this.intStack[this.intPtr--];
+
+ // recovery
+ if (this.currentElement != null){
+ this.lastCheckPoint = impt.declarationSourceEnd+1;
+ this.currentElement = this.currentElement.add(impt, 0);
+ this.lastIgnoredToken = -1;
+ this.restartRecovery = true; // used to avoid branching back into the regular automaton
+ }
+}
+protected void consumeStatementBreak() {
+ // BreakStatement ::= 'break' ';'
+ // break pushs a position on this.intStack in case there is no label
+
+ pushOnAstStack(new BreakStatement(null, this.intStack[this.intPtr--], this.endPosition));
+}
+protected void consumeStatementBreakWithLabel() {
+ // BreakStatement ::= 'break' Identifier ';'
+ // break pushs a position on this.intStack in case there is no label
+
+ pushOnAstStack(
+ new BreakStatement(
+ this.identifierStack[this.identifierPtr--],
+ this.intStack[this.intPtr--],
+ this.endPosition));
+ this.identifierLengthPtr--;
+}
+protected void consumeStatementCatch() {
+ // CatchClause ::= 'catch' '(' FormalParameter ')' Block
+
+ //catch are stored directly into the Try
+ //has they always comes two by two....
+ //we remove one entry from the astlengthPtr.
+ //The construction of the try statement must
+ //then fetch the catches using 2*i and 2*i + 1
+
+ this.astLengthPtr--;
+ this.listLength = 0; // reset formalParameter counter (incremented for catch variable)
+}
+protected void consumeStatementContinue() {
+ // ContinueStatement ::= 'continue' ';'
+ // continue pushs a position on this.intStack in case there is no label
+
+ pushOnAstStack(
+ new ContinueStatement(
+ null,
+ this.intStack[this.intPtr--],
+ this.endPosition));
+}
+protected void consumeStatementContinueWithLabel() {
+ // ContinueStatement ::= 'continue' Identifier ';'
+ // continue pushs a position on this.intStack in case there is no label
+
+ pushOnAstStack(
+ new ContinueStatement(
+ this.identifierStack[this.identifierPtr--],
+ this.intStack[this.intPtr--],
+ this.endPosition));
+ this.identifierLengthPtr--;
+}
+protected void consumeStatementDo() {
+ // DoStatement ::= 'do' Statement 'while' '(' Expression ')' ';'
+
+ //the 'while' pushes a value on this.intStack that we need to remove
+ this.intPtr--;
+
+ Statement statement = (Statement) this.astStack[this.astPtr];
+ this.expressionLengthPtr--;
+ this.astStack[this.astPtr] =
+ new DoStatement(
+ this.expressionStack[this.expressionPtr--],
+ statement,
+ this.intStack[this.intPtr--],
+ this.endPosition);
+}
+protected void consumeStatementExpressionList() {
+ // StatementExpressionList ::= StatementExpressionList ',' StatementExpression
+ concatExpressionLists();
+}
+protected void consumeStatementFor() {
+ // ForStatement ::= 'for' '(' ForInitopt ';' Expressionopt ';' ForUpdateopt ')' Statement
+ // ForStatementNoShortIf ::= 'for' '(' ForInitopt ';' Expressionopt ';' ForUpdateopt ')' StatementNoShortIf
+
+ int length;
+ Expression cond = null;
+ Statement[] inits, updates;
+ boolean scope = true;
+
+ //statements
+ this.astLengthPtr--;
+ Statement statement = (Statement) this.astStack[this.astPtr--];
+
+ //updates are on the expresion stack
+ if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) == 0) {
+ updates = null;
+ } else {
+ this.expressionPtr -= length;
+ System.arraycopy(
+ this.expressionStack,
+ this.expressionPtr + 1,
+ updates = new Statement[length],
+ 0,
+ length);
+ }
+
+ if (this.expressionLengthStack[this.expressionLengthPtr--] != 0)
+ cond = this.expressionStack[this.expressionPtr--];
+
+ //inits may be on two different stacks
+ if ((length = this.astLengthStack[this.astLengthPtr--]) == 0) {
+ inits = null;
+ scope = false;
+ } else {
+ if (length == -1) { //on this.expressionStack
+ scope = false;
+ length = this.expressionLengthStack[this.expressionLengthPtr--];
+ this.expressionPtr -= length;
+ System.arraycopy(
+ this.expressionStack,
+ this.expressionPtr + 1,
+ inits = new Statement[length],
+ 0,
+ length);
+ } else { //on this.astStack
+ this.astPtr -= length;
+ System.arraycopy(
+ this.astStack,
+ this.astPtr + 1,
+ inits = new Statement[length],
+ 0,
+ length);
+ }
+ }
+ pushOnAstStack(
+ new ForStatement(
+ inits,
+ cond,
+ updates,
+ statement,
+ scope,
+ this.intStack[this.intPtr--],
+ this.endStatementPosition));
+}
+protected void consumeStatementIfNoElse() {
+ // IfThenStatement ::= 'if' '(' Expression ')' Statement
+
+ //optimize the push/pop
+ this.expressionLengthPtr--;
+ Statement thenStatement = (Statement) this.astStack[this.astPtr];
+ this.astStack[this.astPtr] =
+ new IfStatement(
+ this.expressionStack[this.expressionPtr--],
+ thenStatement,
+ this.intStack[this.intPtr--],
+ this.endStatementPosition);
+}
+protected void consumeStatementIfWithElse() {
+ // IfThenElseStatement ::= 'if' '(' Expression ')' StatementNoShortIf 'else' Statement
+ // IfThenElseStatementNoShortIf ::= 'if' '(' Expression ')' StatementNoShortIf 'else' StatementNoShortIf
+
+ this.expressionLengthPtr--;
+
+ // optimized {..., Then, Else } ==> {..., If }
+ this.astLengthPtr--;
+
+ //optimize the push/pop
+ this.astStack[--this.astPtr] =
+ new IfStatement(
+ this.expressionStack[this.expressionPtr--],
+ (Statement) this.astStack[this.astPtr],
+ (Statement) this.astStack[this.astPtr + 1],
+ this.intStack[this.intPtr--],
+ this.endStatementPosition);
+}
+protected void consumeStatementLabel() {
+ // LabeledStatement ::= 'Identifier' ':' Statement
+ // LabeledStatementNoShortIf ::= 'Identifier' ':' StatementNoShortIf
+
+ //optimize push/pop
+ Statement stmt = (Statement) this.astStack[this.astPtr];
+ this.astStack[this.astPtr] =
+ new LabeledStatement(
+ this.identifierStack[this.identifierPtr],
+ stmt,
+ (int) (this.identifierPositionStack[this.identifierPtr--] >>> 32),
+ this.endStatementPosition);
+ this.identifierLengthPtr--;
+}
+protected void consumeStatementReturn() {
+ // ReturnStatement ::= 'return' Expressionopt ';'
+ // return pushs a position on this.intStack in case there is no expression
+
+ if (this.expressionLengthStack[this.expressionLengthPtr--] != 0) {
+ pushOnAstStack(
+ new ReturnStatement(
+ this.expressionStack[this.expressionPtr--],
+ this.intStack[this.intPtr--],
+ this.endPosition)
+ );
+ } else {
+ pushOnAstStack(new ReturnStatement(null, this.intStack[this.intPtr--], this.endPosition));
+ }
+}
+protected void consumeStatementSwitch() {
+ // SwitchStatement ::= 'switch' OpenBlock '(' Expression ')' SwitchBlock
+
+ //OpenBlock just makes the semantic action blockStart()
+ //the block is inlined but a scope need to be created
+ //if some declaration occurs.
+
+ int length;
+ SwitchStatement switchStatement = new SwitchStatement();
+ this.expressionLengthPtr--;
+ switchStatement.expression = this.expressionStack[this.expressionPtr--];
+ if ((length = this.astLengthStack[this.astLengthPtr--]) != 0) {
+ this.astPtr -= length;
+ System.arraycopy(
+ this.astStack,
+ this.astPtr + 1,
+ switchStatement.statements = new Statement[length],
+ 0,
+ length);
+ }
+ switchStatement.explicitDeclarations = this.realBlockStack[this.realBlockPtr--];
+ pushOnAstStack(switchStatement);
+ switchStatement.blockStart = this.intStack[this.intPtr--];
+ switchStatement.sourceStart = this.intStack[this.intPtr--];
+ switchStatement.sourceEnd = this.endStatementPosition;
+ if (length == 0 && !containsComment(switchStatement.blockStart, switchStatement.sourceEnd)) {
+ switchStatement.bits |= ASTNode.UndocumentedEmptyBlockMASK;
+ }
+}
+protected void consumeStatementSynchronized() {
+ // SynchronizedStatement ::= OnlySynchronized '(' Expression ')' Block
+ //optimize the push/pop
+
+ if (this.astLengthStack[this.astLengthPtr] == 0) {
+ this.astLengthStack[this.astLengthPtr] = 1;
+ this.expressionLengthPtr--;
+ this.astStack[++this.astPtr] =
+ new SynchronizedStatement(
+ this.expressionStack[this.expressionPtr--],
+ null,
+ this.intStack[this.intPtr--],
+ this.endStatementPosition);
+ } else {
+ this.expressionLengthPtr--;
+ this.astStack[this.astPtr] =
+ new SynchronizedStatement(
+ this.expressionStack[this.expressionPtr--],
+ (Block) this.astStack[this.astPtr],
+ this.intStack[this.intPtr--],
+ this.endStatementPosition);
+ }
+ resetModifiers();
+}
+protected void consumeStatementThrow() {
+ // ThrowStatement ::= 'throw' Expression ';'
+ this.expressionLengthPtr--;
+ pushOnAstStack(new ThrowStatement(this.expressionStack[this.expressionPtr--], this.intStack[this.intPtr--]));
+}
+protected void consumeStatementTry(boolean withFinally) {
+ //TryStatement ::= 'try' Block Catches
+ //TryStatement ::= 'try' Block Catchesopt Finally
+
+ int length;
+ TryStatement tryStmt = new TryStatement();
+ //finally
+ if (withFinally) {
+ this.astLengthPtr--;
+ tryStmt.finallyBlock = (Block) this.astStack[this.astPtr--];
+ }
+ //catches are handle by two <argument-block> [see statementCatch]
+ if ((length = this.astLengthStack[this.astLengthPtr--]) != 0) {
+ if (length == 1) {
+ tryStmt.catchBlocks = new Block[] {(Block) this.astStack[this.astPtr--]};
+ tryStmt.catchArguments = new Argument[] {(Argument) this.astStack[this.astPtr--]};
+ } else {
+ Block[] bks = (tryStmt.catchBlocks = new Block[length]);
+ Argument[] args = (tryStmt.catchArguments = new Argument[length]);
+ while (length-- > 0) {
+ bks[length] = (Block) this.astStack[this.astPtr--];
+ args[length] = (Argument) this.astStack[this.astPtr--];
+ }
+ }
+ }
+ //try
+ this.astLengthPtr--;
+ tryStmt.tryBlock = (Block) this.astStack[this.astPtr--];
+
+ //positions
+ tryStmt.sourceEnd = this.endStatementPosition;
+ tryStmt.sourceStart = this.intStack[this.intPtr--];
+ pushOnAstStack(tryStmt);
+}
+protected void consumeStatementWhile() {
+ // WhileStatement ::= 'while' '(' Expression ')' Statement
+ // WhileStatementNoShortIf ::= 'while' '(' Expression ')' StatementNoShortIf
+
+ this.expressionLengthPtr--;
+ Statement statement = (Statement) this.astStack[this.astPtr];
+ this.astStack[this.astPtr] =
+ new WhileStatement(
+ this.expressionStack[this.expressionPtr--],
+ statement,
+ this.intStack[this.intPtr--],
+ this.endStatementPosition);
+}
+protected void consumeStaticImportOnDemandDeclarationName() {
+ // TypeImportOnDemandDeclarationName ::= 'import' 'static' Name '.' '*'
+ /* push an ImportRef build from the last name
+ stored in the identifier stack. */
+
+ ImportReference impt;
+ int length;
+ char[][] tokens = new char[length = this.identifierLengthStack[this.identifierLengthPtr--]][];
+ this.identifierPtr -= length;
+ long[] positions = new long[length];
+ System.arraycopy(this.identifierStack, this.identifierPtr + 1, tokens, 0, length);
+ System.arraycopy(this.identifierPositionStack, this.identifierPtr + 1, positions, 0, length);
+ pushOnAstStack(impt = new ImportReference(tokens, positions, true, AccStatic));
+
+ this.modifiers = AccDefault;
+ this.modifiersSourceStart = -1; // <-- see comment into modifiersFlag(int)
+
+ if (this.currentToken == TokenNameSEMICOLON){
+ impt.declarationSourceEnd = this.scanner.currentPosition - 1;
+ } else {
+ impt.declarationSourceEnd = impt.sourceEnd;
+ }
+ impt.declarationEnd = impt.declarationSourceEnd;
+ //this.endPosition is just before the ;
+ impt.declarationSourceStart = this.intStack[this.intPtr--];
+
+ if(options.sourceLevel < ClassFileConstants.JDK1_5 &&
+ this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
+ impt.modifiers = AccDefault; // convert the static import reference to a non-static importe reference
+ this.problemReporter().invalidUsageOfStaticImports(impt);
+ }
+
+ // recovery
+ if (this.currentElement != null){
+ this.lastCheckPoint = impt.declarationSourceEnd+1;
+ this.currentElement = this.currentElement.add(impt, 0);
+ this.lastIgnoredToken = -1;
+ this.restartRecovery = true; // used to avoid branching back into the regular automaton
+ }
+}
+protected void consumeStaticInitializer() {
+ // StaticInitializer ::= StaticOnly Block
+ //push an Initializer
+ //optimize the push/pop
+ Block block = (Block) this.astStack[this.astPtr];
+ if (this.diet) block.bits &= ~ASTNode.UndocumentedEmptyBlockMASK; // clear bit set since was diet
+ Initializer initializer = new Initializer(block, AccStatic);
+ this.astStack[this.astPtr] = initializer;
+ initializer.sourceEnd = this.endStatementPosition;
+ initializer.declarationSourceEnd = flushCommentsDefinedPriorTo(this.endStatementPosition);
+ this.nestedMethod[this.nestedType] --;
+ initializer.declarationSourceStart = this.intStack[this.intPtr--];
+ initializer.bodyStart = this.intStack[this.intPtr--];
+ initializer.bodyEnd = this.endPosition;
+ // doc comment
+ initializer.javadoc = this.javadoc;
+ this.javadoc = null;
+
+ // recovery
+ if (this.currentElement != null){
+ this.lastCheckPoint = initializer.declarationSourceEnd;
+ this.currentElement = this.currentElement.add(initializer, 0);
+ this.lastIgnoredToken = -1;
+ }
+}
+protected void consumeStaticOnly() {
+ // StaticOnly ::= 'static'
+ int savedModifiersSourceStart = this.modifiersSourceStart;
+ checkComment(); // might update declaration source start
+ if (this.modifiersSourceStart >= savedModifiersSourceStart) {
+ this.modifiersSourceStart = savedModifiersSourceStart;
+ }
+ pushOnIntStack(this.scanner.currentPosition);
+ pushOnIntStack(
+ this.modifiersSourceStart >= 0 ? this.modifiersSourceStart : this.scanner.startPosition);
+ jumpOverMethodBody();
+ this.nestedMethod[this.nestedType]++;
+ resetModifiers();
+
+ // recovery
+ if (this.currentElement != null){
+ this.recoveredStaticInitializerStart = this.intStack[this.intPtr]; // remember start position only for static initializers
+ }
+}
+protected void consumeSwitchBlock() {
+ // SwitchBlock ::= '{' SwitchBlockStatements SwitchLabels '}'
+ concatNodeLists();
+}
+protected void consumeSwitchBlockStatement() {
+ // SwitchBlockStatement ::= SwitchLabels BlockStatements
+ concatNodeLists();
+}
+protected void consumeSwitchBlockStatements() {
+ // SwitchBlockStatements ::= SwitchBlockStatements SwitchBlockStatement
+ concatNodeLists();
+}
+protected void consumeSwitchLabels() {
+ // SwitchLabels ::= SwitchLabels SwitchLabel
+ optimizedConcatNodeLists();
+}
+protected void consumeToken(int type) {
+ /* remember the last consumed value */
+ /* try to minimize the number of build values */
+ checkNonExternalizedStringLiteral();
+// // clear the commentPtr of the scanner in case we read something different from a modifier
+// switch(type) {
+// case TokenNameabstract :
+// case TokenNamestrictfp :
+// case TokenNamefinal :
+// case TokenNamenative :
+// case TokenNameprivate :
+// case TokenNameprotected :
+// case TokenNamepublic :
+// case TokenNametransient :
+// case TokenNamevolatile :
+// case TokenNamestatic :
+// case TokenNamesynchronized :
+// break;
+// default:
+// this.scanner.commentPtr = -1;
+// }
+ //System.out.println(this.scanner.toStringAction(type));
+ switch (type) {
+ case TokenNameIdentifier :
+ pushIdentifier();
+ if (this.scanner.useAssertAsAnIndentifier &&
+ this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
+ long positions = this.identifierPositionStack[this.identifierPtr];
+ problemReporter().useAssertAsAnIdentifier((int) (positions >>> 32), (int) positions);
+ }
+ if (this.scanner.useEnumAsAnIndentifier &&
+ this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
+ long positions = this.identifierPositionStack[this.identifierPtr];
+ problemReporter().useEnumAsAnIdentifier((int) (positions >>> 32), (int) positions);
+ }
+ break;
+ case TokenNameinterface :
+ adjustInterfaceModifiers();
+ //'class' is pushing two int (positions) on the stack ==> 'interface' needs to do it too....
+ pushOnIntStack(this.scanner.currentPosition - 1);
+ pushOnIntStack(this.scanner.startPosition);
+ break;
+ case TokenNameabstract :
+ checkAndSetModifiers(AccAbstract);
+ pushOnExpressionStackLengthStack(0);
+ break;
+ case TokenNamestrictfp :
+ checkAndSetModifiers(AccStrictfp);
+ pushOnExpressionStackLengthStack(0);
+ break;
+ case TokenNamefinal :
+ checkAndSetModifiers(AccFinal);
+ pushOnExpressionStackLengthStack(0);
+ break;
+ case TokenNamenative :
+ checkAndSetModifiers(AccNative);
+ pushOnExpressionStackLengthStack(0);
+ break;
+ case TokenNameprivate :
+ checkAndSetModifiers(AccPrivate);
+ pushOnExpressionStackLengthStack(0);
+ break;
+ case TokenNameprotected :
+ checkAndSetModifiers(AccProtected);
+ pushOnExpressionStackLengthStack(0);
+ break;
+ case TokenNamepublic :
+ checkAndSetModifiers(AccPublic);
+ pushOnExpressionStackLengthStack(0);
+ break;
+ case TokenNametransient :
+ checkAndSetModifiers(AccTransient);
+ pushOnExpressionStackLengthStack(0);
+ break;
+ case TokenNamevolatile :
+ checkAndSetModifiers(AccVolatile);
+ pushOnExpressionStackLengthStack(0);
+ break;
+ case TokenNamestatic :
+ checkAndSetModifiers(AccStatic);
+ pushOnExpressionStackLengthStack(0);
+ break;
+ case TokenNamesynchronized :
+ this.synchronizedBlockSourceStart = this.scanner.startPosition;
+ checkAndSetModifiers(AccSynchronized);
+ pushOnExpressionStackLengthStack(0);
+ break;
+ //==============================
+ case TokenNamevoid :
+ pushIdentifier(-T_void);
+ pushOnIntStack(this.scanner.currentPosition - 1);
+ pushOnIntStack(this.scanner.startPosition);
+ break;
+ //push a default dimension while void is not part of the primitive
+ //declaration baseType and so takes the place of a type without getting into
+ //regular type parsing that generates a dimension on this.intStack
+ case TokenNameboolean :
+ pushIdentifier(-T_boolean);
+ pushOnIntStack(this.scanner.currentPosition - 1);
+ pushOnIntStack(this.scanner.startPosition);
+ break;
+ case TokenNamebyte :
+ pushIdentifier(-T_byte);
+ pushOnIntStack(this.scanner.currentPosition - 1);
+ pushOnIntStack(this.scanner.startPosition);
+ break;
+ case TokenNamechar :
+ pushIdentifier(-T_char);
+ pushOnIntStack(this.scanner.currentPosition - 1);
+ pushOnIntStack(this.scanner.startPosition);
+ break;
+ case TokenNamedouble :
+ pushIdentifier(-T_double);
+ pushOnIntStack(this.scanner.currentPosition - 1);
+ pushOnIntStack(this.scanner.startPosition);
+ break;
+ case TokenNamefloat :
+ pushIdentifier(-T_float);
+ pushOnIntStack(this.scanner.currentPosition - 1);
+ pushOnIntStack(this.scanner.startPosition);
+ break;
+ case TokenNameint :
+ pushIdentifier(-T_int);
+ pushOnIntStack(this.scanner.currentPosition - 1);
+ pushOnIntStack(this.scanner.startPosition);
+ break;
+ case TokenNamelong :
+ pushIdentifier(-T_long);
+ pushOnIntStack(this.scanner.currentPosition - 1);
+ pushOnIntStack(this.scanner.startPosition);
+ break;
+ case TokenNameshort :
+ pushIdentifier(-T_short);
+ pushOnIntStack(this.scanner.currentPosition - 1);
+ pushOnIntStack(this.scanner.startPosition);
+ break;
+ //==============================
+ case TokenNameIntegerLiteral :
+ pushOnExpressionStack(
+ new IntLiteral(
+ this.scanner.getCurrentTokenSource(),
+ this.scanner.startPosition,
+ this.scanner.currentPosition - 1));
+ break;
+ case TokenNameLongLiteral :
+ pushOnExpressionStack(
+ new LongLiteral(
+ this.scanner.getCurrentTokenSource(),
+ this.scanner.startPosition,
+ this.scanner.currentPosition - 1));
+ break;
+ case TokenNameFloatingPointLiteral :
+ pushOnExpressionStack(
+ new FloatLiteral(
+ this.scanner.getCurrentTokenSource(),
+ this.scanner.startPosition,
+ this.scanner.currentPosition - 1));
+ break;
+ case TokenNameDoubleLiteral :
+ pushOnExpressionStack(
+ new DoubleLiteral(
+ this.scanner.getCurrentTokenSource(),
+ this.scanner.startPosition,
+ this.scanner.currentPosition - 1));
+ break;
+ case TokenNameCharacterLiteral :
+ pushOnExpressionStack(
+ new CharLiteral(
+ this.scanner.getCurrentTokenSource(),
+ this.scanner.startPosition,
+ this.scanner.currentPosition - 1));
+ break;
+ case TokenNameStringLiteral :
+ StringLiteral stringLiteral = new StringLiteral(
+ this.scanner.getCurrentTokenSourceString(),
+ this.scanner.startPosition,
+ this.scanner.currentPosition - 1);
+ pushOnExpressionStack(stringLiteral);
+ break;
+ case TokenNamefalse :
+ pushOnExpressionStack(
+ new FalseLiteral(this.scanner.startPosition, this.scanner.currentPosition - 1));
+ break;
+ case TokenNametrue :
+ pushOnExpressionStack(
+ new TrueLiteral(this.scanner.startPosition, this.scanner.currentPosition - 1));
+ break;
+ case TokenNamenull :
+ pushOnExpressionStack(
+ new NullLiteral(this.scanner.startPosition, this.scanner.currentPosition - 1));
+ break;
+ //============================
+ case TokenNamesuper :
+ case TokenNamethis :
+ this.endPosition = this.scanner.currentPosition - 1;
+ pushOnIntStack(this.scanner.startPosition);
+ break;
+ case TokenNameassert :
+ case TokenNameimport :
+ case TokenNamepackage :
+ case TokenNamethrow :
+ case TokenNamedo :
+ case TokenNameif :
+ case TokenNamefor :
+ case TokenNameswitch :
+ case TokenNametry :
+ case TokenNamewhile :
+ case TokenNamebreak :
+ case TokenNamecontinue :
+ case TokenNamereturn :
+ case TokenNamecase :
+ pushOnIntStack(this.scanner.startPosition);
+ break;
+ case TokenNamenew :
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=40954
+ resetModifiers();
+ pushOnIntStack(this.scanner.startPosition);
+ break;
+ case TokenNameclass :
+ pushOnIntStack(this.scanner.currentPosition - 1);
+ pushOnIntStack(this.scanner.startPosition);
+ break;
+ case TokenNameenum :
+ pushOnIntStack(this.scanner.currentPosition - 1);
+ pushOnIntStack(this.scanner.startPosition);
+ break;
+ case TokenNamedefault :
+ pushOnIntStack(this.scanner.startPosition);
+ pushOnIntStack(this.scanner.currentPosition - 1);
+ break;
+ //let extra semantic action decide when to push
+ case TokenNameRBRACKET :
+ case TokenNamePLUS :
+ case TokenNameMINUS :
+ case TokenNameNOT :
+ case TokenNameTWIDDLE :
+ case TokenNameLBRACE :
+ this.endPosition = this.scanner.startPosition;
+ break;
+ case TokenNamePLUS_PLUS :
+ case TokenNameMINUS_MINUS :
+ this.endPosition = this.scanner.startPosition;
+ this.endStatementPosition = this.scanner.currentPosition - 1;
+ break;
+ case TokenNameRBRACE:
+ case TokenNameSEMICOLON :
+ this.endStatementPosition = this.scanner.currentPosition - 1;
+ this.endPosition = this.scanner.startPosition - 1;
+ //the item is not part of the potential futur expression/statement
+ break;
+ case TokenNameRPAREN :
+ // in order to handle ( expression) ////// (cast)expression///// foo(x)
+ this.rParenPos = this.scanner.currentPosition - 1; // position of the end of right parenthesis (in case of unicode \u0029) lex00101
+ break;
+ case TokenNameLPAREN :
+ this.lParenPos = this.scanner.startPosition;
+ break;
+ case TokenNameAT :
+ pushOnIntStack(this.scanner.startPosition);
+ break;
+ case TokenNameQUESTION :
+ pushOnIntStack(this.scanner.startPosition);
+ pushOnIntStack(this.scanner.currentPosition - 1);
+ break;
+ // TODO (olivier) bug 67790 remove once DOMParser is activated
+ case TokenNameLESS :
+ pushOnIntStack(this.scanner.startPosition);
+ break;
+ // case TokenNameCOMMA :
+ // case TokenNameCOLON :
+ // case TokenNameEQUAL :
+ // case TokenNameLBRACKET :
+ // case TokenNameDOT :
+ // case TokenNameERROR :
+ // case TokenNameEOF :
+ // case TokenNamecase :
+ // case TokenNamecatch :
+ // case TokenNameelse :
+ // case TokenNameextends :
+ // case TokenNamefinally :
+ // case TokenNameimplements :
+ // case TokenNamethrows :
+ // case TokenNameinstanceof :
+ // case TokenNameEQUAL_EQUAL :
+ // case TokenNameLESS_EQUAL :
+ // case TokenNameGREATER_EQUAL :
+ // case TokenNameNOT_EQUAL :
+ // case TokenNameLEFT_SHIFT :
+ // case TokenNameRIGHT_SHIFT :
+ // case TokenNameUNSIGNED_RIGHT_SHIFT :
+ // case TokenNamePLUS_EQUAL :
+ // case TokenNameMINUS_EQUAL :
+ // case TokenNameMULTIPLY_EQUAL :
+ // case TokenNameDIVIDE_EQUAL :
+ // case TokenNameAND_EQUAL :
+ // case TokenNameOR_EQUAL :
+ // case TokenNameXOR_EQUAL :
+ // case TokenNameREMAINDER_EQUAL :
+ // case TokenNameLEFT_SHIFT_EQUAL :
+ // case TokenNameRIGHT_SHIFT_EQUAL :
+ // case TokenNameUNSIGNED_RIGHT_SHIFT_EQUAL :
+ // case TokenNameOR_OR :
+ // case TokenNameAND_AND :
+ // case TokenNameREMAINDER :
+ // case TokenNameXOR :
+ // case TokenNameAND :
+ // case TokenNameMULTIPLY :
+ // case TokenNameOR :
+ // case TokenNameDIVIDE :
+ // case TokenNameGREATER :
+ }
+}
+protected void consumeTypeArgument() {
+ pushOnGenericsStack(getTypeReference(this.intStack[this.intPtr--]));
+}
+protected void consumeTypeArgumentList() {
+ concatGenericsLists();
+}
+protected void consumeTypeArgumentList1() {
+ concatGenericsLists();
+}
+protected void consumeTypeArgumentList2() {
+ concatGenericsLists();
+}
+protected void consumeTypeArgumentList3() {
+ concatGenericsLists();
+}
+protected void consumeTypeArgumentReferenceType1() {
+ concatGenericsLists();
+ pushOnGenericsStack(getTypeReference(0));
+ // TODO (olivier) bug 67790 remove once DOMParser is activated
+ intPtr--;
+}
+protected void consumeTypeArgumentReferenceType2() {
+ concatGenericsLists();
+ pushOnGenericsStack(getTypeReference(0));
+ // TODO (olivier) bug 67790 remove once DOMParser is activated
+ intPtr--;
+}
+protected void consumeTypeArguments() {
+ concatGenericsLists();
+ // TODO (olivier) bug 67790 remove once DOMParser is activated
+ intPtr--;
+
+ if(options.sourceLevel < ClassFileConstants.JDK1_5 &&
+ this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
+ int length = this.genericsLengthStack[this.genericsLengthPtr];
+ this.problemReporter().invalidUsageOfTypeArguments(
+ (TypeReference)this.genericsStack[this.genericsPtr - length + 1],
+ (TypeReference)this.genericsStack[this.genericsPtr]);
+ }
+}
+protected void consumeTypeDeclarations() {
+ // TypeDeclarations ::= TypeDeclarations TypeDeclaration
+ concatNodeLists();
+}
+protected void consumeTypeImportOnDemandDeclarationName() {
+ // TypeImportOnDemandDeclarationName ::= 'import' Name '.' '*'
+ /* push an ImportRef build from the last name
+ stored in the identifier stack. */
+
+ ImportReference impt;
+ int length;
+ char[][] tokens = new char[length = this.identifierLengthStack[this.identifierLengthPtr--]][];
+ this.identifierPtr -= length;
+ long[] positions = new long[length];
+ System.arraycopy(this.identifierStack, this.identifierPtr + 1, tokens, 0, length);
+ System.arraycopy(this.identifierPositionStack, this.identifierPtr + 1, positions, 0, length);
+ pushOnAstStack(impt = new ImportReference(tokens, positions, true, AccDefault));
+
+ if (this.currentToken == TokenNameSEMICOLON){
+ impt.declarationSourceEnd = this.scanner.currentPosition - 1;
+ } else {
+ impt.declarationSourceEnd = impt.sourceEnd;
+ }
+ impt.declarationEnd = impt.declarationSourceEnd;
+ //this.endPosition is just before the ;
+ impt.declarationSourceStart = this.intStack[this.intPtr--];
+
+ // recovery
+ if (this.currentElement != null){
+ this.lastCheckPoint = impt.declarationSourceEnd+1;
+ this.currentElement = this.currentElement.add(impt, 0);
+ this.lastIgnoredToken = -1;
+ this.restartRecovery = true; // used to avoid branching back into the regular automaton
+ }
+}
+protected void consumeTypeParameterHeader() {
+ //TypeParameterHeader ::= Identifier
+ TypeParameter typeParameter = new TypeParameter();
+ long pos = this.identifierPositionStack[this.identifierPtr];
+ final int end = (int) pos;
+ typeParameter.declarationSourceEnd = end;
+ typeParameter.sourceEnd = end;
+ final int start = (int) (pos >>> 32);
+ typeParameter.declarationSourceStart = start;
+ typeParameter.sourceStart = start;
+ typeParameter.name = this.identifierStack[this.identifierPtr--];
+ this.identifierLengthPtr--;
+ pushOnGenericsStack(typeParameter);
+
+ this.listTypeParameterLength++;
+}
+protected void consumeTypeParameter1() {
+ // nothing to do
+}
+protected void consumeTypeParameter1WithExtends() {
+ //TypeParameter1 ::= TypeParameterHeader 'extends' ReferenceType1
+ TypeReference superType = (TypeReference) this.genericsStack[this.genericsPtr--];
+ this.genericsLengthPtr--;
+ TypeParameter typeParameter = (TypeParameter) this.genericsStack[this.genericsPtr];
+ typeParameter.declarationSourceEnd = superType.sourceEnd;
+ typeParameter.type = superType;
+ superType.bits |= ASTNode.IsSuperType;
+ this.genericsStack[this.genericsPtr] = typeParameter;
+}
+protected void consumeTypeParameter1WithExtendsAndBounds() {
+ //TypeParameter1 ::= TypeParameterHeader 'extends' ReferenceType AdditionalBoundList1
+ int additionalBoundsLength = this.genericsLengthStack[this.genericsLengthPtr--];
+ TypeReference[] bounds = new TypeReference[additionalBoundsLength];
+ this.genericsPtr -= additionalBoundsLength;
+ System.arraycopy(this.genericsStack, this.genericsPtr + 1, bounds, 0, additionalBoundsLength);
+ TypeReference superType = getTypeReference(this.intStack[this.intPtr--]);
+ TypeParameter typeParameter = (TypeParameter) this.genericsStack[this.genericsPtr];
+ typeParameter.declarationSourceEnd = bounds[additionalBoundsLength - 1].sourceEnd;
+ typeParameter.type = superType;
+ superType.bits |= ASTNode.IsSuperType;
+ typeParameter.bounds = bounds;
+ for (int i = 0, max = bounds.length; i < max; i++) {
+ bounds[i].bits |= ASTNode.IsSuperType;
+ }
+}
+protected void consumeTypeParameterList() {
+ //TypeParameterList ::= TypeParameterList ',' TypeParameter
+ concatGenericsLists();
+}
+protected void consumeTypeParameterList1() {
+ //TypeParameterList1 ::= TypeParameterList ',' TypeParameter1
+ concatGenericsLists();
+}
+protected void consumeTypeParameters() {
+ // TODO (olivier) bug 67790 remove once DOMParser is activated
+ intPtr--;
+ if(options.sourceLevel < ClassFileConstants.JDK1_5&&
+ this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
+ int length = this.genericsLengthStack[this.genericsLengthPtr];
+ this.problemReporter().invalidUsageOfTypeParameters(
+ (TypeParameter) this.genericsStack[genericsPtr - length + 1],
+ (TypeParameter) this.genericsStack[genericsPtr]);
+ }
+}
+protected void consumeTypeParameterWithExtends() {
+ //TypeParameter ::= TypeParameterHeader 'extends' ReferenceType
+ TypeReference superType = getTypeReference(this.intStack[this.intPtr--]);
+ TypeParameter typeParameter = (TypeParameter) this.genericsStack[this.genericsPtr];
+ typeParameter.declarationSourceEnd = superType.sourceEnd;
+ typeParameter.type = superType;
+ superType.bits |= ASTNode.IsSuperType;
+}
+protected void consumeTypeParameterWithExtendsAndBounds() {
+ //TypeParameter ::= TypeParameterHeader 'extends' ReferenceType AdditionalBoundList
+ int additionalBoundsLength = this.genericsLengthStack[this.genericsLengthPtr--];
+ TypeReference[] bounds = new TypeReference[additionalBoundsLength];
+ this.genericsPtr -= additionalBoundsLength;
+ System.arraycopy(this.genericsStack, this.genericsPtr + 1, bounds, 0, additionalBoundsLength);
+ TypeReference superType = getTypeReference(this.intStack[this.intPtr--]);
+ TypeParameter typeParameter = (TypeParameter) this.genericsStack[this.genericsPtr];
+ typeParameter.type = superType;
+ superType.bits |= ASTNode.IsSuperType;
+ typeParameter.bounds = bounds;
+ typeParameter.declarationSourceEnd = bounds[additionalBoundsLength - 1].sourceEnd;
+ for (int i = 0, max = bounds.length; i < max; i++) {
+ bounds[i].bits |= ASTNode.IsSuperType;
+ }
+}
+protected void consumeUnaryExpression(int op) {
+ // UnaryExpression ::= '+' PushPosition UnaryExpression
+ // UnaryExpression ::= '-' PushPosition UnaryExpression
+ // UnaryExpressionNotPlusMinus ::= '~' PushPosition UnaryExpression
+ // UnaryExpressionNotPlusMinus ::= '!' PushPosition UnaryExpression
+
+ //optimize the push/pop
+
+ //handle manually the -2147483648 while it is not a real
+ //computation of an - and 2147483648 (notice that 2147483648
+ //is Integer.MAX_VALUE+1.....)
+ //Same for -9223372036854775808L ............
+
+ //this.intStack have the position of the operator
+
+ Expression r, exp = this.expressionStack[this.expressionPtr];
+ if (op == MINUS) {
+ if ((exp instanceof IntLiteral) && (((IntLiteral) exp).mayRepresentMIN_VALUE())) {
+ r = this.expressionStack[this.expressionPtr] = new IntLiteralMinValue();
+ } else {
+ if ((exp instanceof LongLiteral) && (((LongLiteral) exp).mayRepresentMIN_VALUE())) {
+ r = this.expressionStack[this.expressionPtr] = new LongLiteralMinValue();
+ } else {
+ r = this.expressionStack[this.expressionPtr] = new UnaryExpression(exp, op);
+ }
+ }
+ } else {
+ r = this.expressionStack[this.expressionPtr] = new UnaryExpression(exp, op);
+ }
+ r.sourceStart = this.intStack[this.intPtr--];
+ r.sourceEnd = exp.sourceEnd;
+}
+protected void consumeUnaryExpression(int op, boolean post) {
+ // PreIncrementExpression ::= '++' PushPosition UnaryExpression
+ // PreDecrementExpression ::= '--' PushPosition UnaryExpression
+
+ // ++ and -- operators
+ //optimize the push/pop
+
+ //this.intStack has the position of the operator when prefix
+
+ Expression leftHandSide = this.expressionStack[this.expressionPtr];
+ if (leftHandSide instanceof Reference) {
+ // ++foo()++ is unvalid
+ if (post) {
+ this.expressionStack[this.expressionPtr] =
+ new PostfixExpression(
+ leftHandSide,
+ IntLiteral.One,
+ op,
+ this.endStatementPosition);
+ } else {
+ this.expressionStack[this.expressionPtr] =
+ new PrefixExpression(
+ leftHandSide,
+ IntLiteral.One,
+ op,
+ this.intStack[this.intPtr--]);
+ }
+ } else {
+ //the ++ or the -- is NOT taken into account if code gen proceeds
+ if (!post) {
+ this.intPtr--;
+ }
+ problemReporter().invalidUnaryExpression(leftHandSide);
+ }
+}
+protected void consumeVariableDeclarators() {
+ // VariableDeclarators ::= VariableDeclarators ',' VariableDeclarator
+ optimizedConcatNodeLists();
+}
+protected void consumeVariableInitializers() {
+ // VariableInitializers ::= VariableInitializers ',' VariableInitializer
+ concatExpressionLists();
+}
+protected void consumeWildcard() {
+ final Wildcard wildcard = new Wildcard(Wildcard.UNBOUND);
+ wildcard.sourceEnd = this.intStack[this.intPtr--];
+ wildcard.sourceStart = this.intStack[this.intPtr--];
+ pushOnGenericsStack(wildcard);
+}
+protected void consumeWildcard1() {
+ final Wildcard wildcard = new Wildcard(Wildcard.UNBOUND);
+ wildcard.sourceEnd = this.intStack[this.intPtr--];
+ wildcard.sourceStart = this.intStack[this.intPtr--];
+ pushOnGenericsStack(wildcard);
+}
+protected void consumeWildcard1WithBounds() {
+ // Nothing to do
+ // The wildcard is created by the consumeWildcardBounds1Extends or by consumeWildcardBounds1Super
+}
+protected void consumeWildcard2() {
+ final Wildcard wildcard = new Wildcard(Wildcard.UNBOUND);
+ wildcard.sourceEnd = this.intStack[this.intPtr--];
+ wildcard.sourceStart = this.intStack[this.intPtr--];
+ pushOnGenericsStack(wildcard);
+}
+protected void consumeWildcard2WithBounds() {
+ // Nothing to do
+ // The wildcard is created by the consumeWildcardBounds2Extends or by consumeWildcardBounds2Super
+}
+protected void consumeWildcard3() {
+ final Wildcard wildcard = new Wildcard(Wildcard.UNBOUND);
+ wildcard.sourceEnd = this.intStack[this.intPtr--];
+ wildcard.sourceStart = this.intStack[this.intPtr--];
+ pushOnGenericsStack(wildcard);
+}
+protected void consumeWildcard3WithBounds() {
+ // Nothing to do
+ // The wildcard is created by the consumeWildcardBounds3Extends or by consumeWildcardBounds3Super
+}
+protected void consumeWildcardBounds1Extends() {
+ Wildcard wildcard = new Wildcard(Wildcard.EXTENDS);
+ wildcard.bound = (TypeReference) this.genericsStack[this.genericsPtr];
+ wildcard.sourceEnd = wildcard.bound.sourceEnd;
+ this.intPtr--; // remove end position of the '?'
+ wildcard.sourceStart = this.intStack[this.intPtr--];
+ this.genericsStack[this.genericsPtr] = wildcard;
+}
+protected void consumeWildcardBounds1Super() {
+ Wildcard wildcard = new Wildcard(Wildcard.SUPER);
+ wildcard.bound = (TypeReference) this.genericsStack[this.genericsPtr];
+ this.intPtr--; // remove the starting position of the super keyword
+ wildcard.sourceEnd = wildcard.bound.sourceEnd;
+ this.intPtr--; // remove end position of the '?'
+ wildcard.sourceStart = this.intStack[this.intPtr--];
+ this.genericsStack[this.genericsPtr] = wildcard;
+}
+protected void consumeWildcardBounds2Extends() {
+ Wildcard wildcard = new Wildcard(Wildcard.EXTENDS);
+ wildcard.bound = (TypeReference) this.genericsStack[this.genericsPtr];
+ wildcard.sourceEnd = wildcard.bound.sourceEnd;
+ this.intPtr--; // remove end position of the '?'
+ wildcard.sourceStart = this.intStack[this.intPtr--];
+ this.genericsStack[this.genericsPtr] = wildcard;
+}
+protected void consumeWildcardBounds2Super() {
+ Wildcard wildcard = new Wildcard(Wildcard.SUPER);
+ wildcard.bound = (TypeReference) this.genericsStack[this.genericsPtr];
+ this.intPtr--; // remove the starting position of the super keyword
+ wildcard.sourceEnd = wildcard.bound.sourceEnd;
+ this.intPtr--; // remove end position of the '?'
+ wildcard.sourceStart = this.intStack[this.intPtr--];
+ this.genericsStack[this.genericsPtr] = wildcard;
+}
+protected void consumeWildcardBounds3Extends() {
+ Wildcard wildcard = new Wildcard(Wildcard.EXTENDS);
+ wildcard.bound = (TypeReference) this.genericsStack[this.genericsPtr];
+ wildcard.sourceEnd = wildcard.bound.sourceEnd;
+ this.intPtr--; // remove end position of the '?'
+ wildcard.sourceStart = this.intStack[this.intPtr--];
+ this.genericsStack[this.genericsPtr] = wildcard;
+}
+protected void consumeWildcardBounds3Super() {
+ Wildcard wildcard = new Wildcard(Wildcard.SUPER);
+ wildcard.bound = (TypeReference) this.genericsStack[this.genericsPtr];
+ this.intPtr--; // remove the starting position of the super keyword
+ wildcard.sourceEnd = wildcard.bound.sourceEnd;
+ this.intPtr--; // remove end position of the '?'
+ wildcard.sourceStart = this.intStack[this.intPtr--];
+ this.genericsStack[this.genericsPtr] = wildcard;
+}
+protected void consumeWildcardBoundsExtends() {
+ Wildcard wildcard = new Wildcard(Wildcard.EXTENDS);
+ wildcard.bound = getTypeReference(this.intStack[this.intPtr--]);
+ wildcard.sourceEnd = wildcard.bound.sourceEnd;
+ this.intPtr--; // remove end position of the '?'
+ wildcard.sourceStart = this.intStack[this.intPtr--];
+ pushOnGenericsStack(wildcard);
+}
+protected void consumeWildcardBoundsSuper() {
+ Wildcard wildcard = new Wildcard(Wildcard.SUPER);
+ wildcard.bound = getTypeReference(this.intStack[this.intPtr--]);
+ this.intPtr--; // remove the starting position of the super keyword
+ wildcard.sourceEnd = wildcard.bound.sourceEnd;
+ this.intPtr--; // remove end position of the '?'
+ wildcard.sourceStart = this.intStack[this.intPtr--];
+ pushOnGenericsStack(wildcard);
+}
+protected void consumeWildcardWithBounds() {
+ // Nothing to do
+ // The wildcard is created by the consumeWildcardBoundsExtends or by consumeWildcardBoundsSuper
+}
+/**
+ * Given the current comment stack, answer whether some comment is available in a certain exclusive range
+ *
+ * @param sourceStart int
+ * @param sourceEnd int
+ * @return boolean
+ */
+public boolean containsComment(int sourceStart, int sourceEnd) {
+ int iComment = this.scanner.commentPtr;
+ for (; iComment >= 0; iComment--) {
+ int commentStart = this.scanner.commentStarts[iComment];
+ // ignore comments before start
+ if (commentStart < sourceStart) continue;
+ // ignore comments after end
+ if (commentStart > sourceEnd) continue;
+ return true;
+ }
+ return false;
+}
+public MethodDeclaration convertToMethodDeclaration(ConstructorDeclaration c, CompilationResult compilationResult) {
+ MethodDeclaration m = new MethodDeclaration(compilationResult);
+ m.typeParameters = c.typeParameters;
+ m.sourceStart = c.sourceStart;
+ m.sourceEnd = c.sourceEnd;
+ m.bodyStart = c.bodyStart;
+ m.bodyEnd = c.bodyEnd;
+ m.declarationSourceEnd = c.declarationSourceEnd;
+ m.declarationSourceStart = c.declarationSourceStart;
+ m.selector = c.selector;
+ m.statements = c.statements;
+ m.modifiers = c.modifiers;
+ m.annotations = c.annotations;
+ m.arguments = c.arguments;
+ m.thrownExceptions = c.thrownExceptions;
+ m.explicitDeclarations = c.explicitDeclarations;
+ m.returnType = null;
+ return m;
+}
+protected TypeReference copyDims(TypeReference typeRef, int dim) {
+ return typeRef.copyDims(dim);
+}
+protected FieldDeclaration createFieldDeclaration(char[] fieldDeclarationName, int sourceStart, int sourceEnd) {
+ return new FieldDeclaration(fieldDeclarationName, sourceStart, sourceEnd);
+}
+
+protected LocalDeclaration createLocalDeclaration(char[] localDeclarationName, int sourceStart, int sourceEnd) {
+ return new LocalDeclaration(localDeclarationName, sourceStart, sourceEnd);
+}
+
+public CompilationUnitDeclaration dietParse(ICompilationUnit sourceUnit, CompilationResult compilationResult) {
+
+ CompilationUnitDeclaration parsedUnit;
+ boolean old = this.diet;
+ try {
+ this.diet = true;
+ parsedUnit = parse(sourceUnit, compilationResult);
+ }
+ finally {
+ this.diet = old;
+ }
+ return parsedUnit;
+}
+protected void dispatchDeclarationInto(int length) {
+ /* they are length on this.astStack that should go into
+ methods fields constructors lists of the typeDecl
+
+ Return if there is a constructor declaration in the methods declaration */
+
+
+ // Looks for the size of each array .
+
+ if (length == 0)
+ return;
+ int[] flag = new int[length + 1]; //plus one -- see <HERE>
+ int size1 = 0, size2 = 0, size3 = 0, size4 = 0;
+ for (int i = length - 1; i >= 0; i--) {
+ ASTNode astNode = this.astStack[this.astPtr--];
+ if (astNode instanceof AbstractMethodDeclaration) {
+ //methods and constructors have been regrouped into one single list
+ flag[i] = 3;
+ size2++;
+ } else if (astNode instanceof EnumDeclaration) {
+ flag[i] = 2;
+ size4++;
+ } else if (astNode instanceof TypeDeclaration) {
+ flag[i] = 4;
+ size3++;
+ } else {
+ //field
+ flag[i] = 1;
+ size1++;
+ }
+ }
+
+ //arrays creation
+ TypeDeclaration typeDecl = (TypeDeclaration) this.astStack[this.astPtr];
+ if (size1 != 0) {
+ typeDecl.fields = new FieldDeclaration[size1];
+ }
+ if (size2 != 0) {
+ typeDecl.methods = new AbstractMethodDeclaration[size2];
+ }
+ if (size3 != 0) {
+ typeDecl.memberTypes = new TypeDeclaration[size3];
+ }
+ if (size4 != 0) {
+ typeDecl.enums = new EnumDeclaration[size4];
+ }
+
+ //arrays fill up
+ size1 = size2 = size3 = size4 = 0;
+ int flagI = flag[0], start = 0;
+ int length2;
+ for (int end = 0; end <= length; end++) //<HERE> the plus one allows to
+ {
+ if (flagI != flag[end]) //treat the last element as a ended flag.....
+ { //array copy
+ switch (flagI) {
+ case 1 :
+ size1 += (length2 = end - start);
+ System.arraycopy(
+ this.astStack,
+ this.astPtr + start + 1,
+ typeDecl.fields,
+ size1 - length2,
+ length2);
+ break;
+ case 2 :
+ size4 += (length2 = end - start);
+ System.arraycopy(
+ this.astStack,
+ this.astPtr + start + 1,
+ typeDecl.enums,
+ size4 - length2,
+ length2);
+ break;
+ case 3 :
+ size2 += (length2 = end - start);
+ System.arraycopy(
+ this.astStack,
+ this.astPtr + start + 1,
+ typeDecl.methods,
+ size2 - length2,
+ length2);
+ break;
+ case 4 :
+ size3 += (length2 = end - start);
+ System.arraycopy(
+ this.astStack,
+ this.astPtr + start + 1,
+ typeDecl.memberTypes,
+ size3 - length2,
+ length2);
+ break;
+ }
+ flagI = flag[start = end];
+ }
+ }
+
+ if (typeDecl.memberTypes != null) {
+ for (int i = typeDecl.memberTypes.length - 1; i >= 0; i--) {
+ typeDecl.memberTypes[i].enclosingType = typeDecl;
+ }
+ }
+}
+protected void dispatchDeclarationIntoEnumDeclaration(int length) {
+ if (length == 0)
+ return;
+ int[] flag = new int[length + 1]; //plus one -- see <HERE>
+ int size1 = 0, size2 = 0, size3 = 0, size4 = 0;
+ for (int i = length - 1; i >= 0; i--) {
+ ASTNode astNode = this.astStack[this.astPtr--];
+ if (astNode instanceof AbstractMethodDeclaration) {
+ //methods and constructors have been regrouped into one single list
+ flag[i] = 3;
+ size2++;
+ } else if (astNode instanceof EnumConstant) {
+ // enum constants
+ flag[i] = 2;
+ size4++;
+ } else if (astNode instanceof TypeDeclaration) {
+ flag[i] = 4;
+ size3++;
+ } else if (astNode instanceof FieldDeclaration) {
+ flag[i] = 1;
+ size1++;
+ }
+ }
+
+ //arrays creation
+ EnumDeclaration enumDeclaration = (EnumDeclaration) this.astStack[this.astPtr];
+ if (size1 != 0) {
+ enumDeclaration.fields = new FieldDeclaration[size1];
+ }
+ if (size2 != 0) {
+ enumDeclaration.methods = new AbstractMethodDeclaration[size2];
+ }
+ if (size3 != 0) {
+ enumDeclaration.memberTypes = new TypeDeclaration[size3];
+ }
+ if (size4 != 0) {
+ enumDeclaration.enumConstants = new EnumConstant[size4];
+ }
+
+ //arrays fill up
+ size1 = size2 = size3 = size4 = 0;
+ int flagI = flag[0], start = 0;
+ int length2;
+ for (int end = 0; end <= length; end++) //<HERE> the plus one allows to
+ {
+ if (flagI != flag[end]) //treat the last element as a ended flag.....
+ { //array copy
+ switch (flagI) {
+ case 1 :
+ size1 += (length2 = end - start);
+ System.arraycopy(
+ this.astStack,
+ this.astPtr + start + 1,
+ enumDeclaration.fields,
+ size1 - length2,
+ length2);
+ break;
+ case 2 :
+ size4 += (length2 = end - start);
+ System.arraycopy(
+ this.astStack,
+ this.astPtr + start + 1,
+ enumDeclaration.enumConstants,
+ size4 - length2,
+ length2);
+ break;
+ case 3 :
+ size2 += (length2 = end - start);
+ System.arraycopy(
+ this.astStack,
+ this.astPtr + start + 1,
+ enumDeclaration.methods,
+ size2 - length2,
+ length2);
+ break;
+ case 4 :
+ size3 += (length2 = end - start);
+ System.arraycopy(
+ this.astStack,
+ this.astPtr + start + 1,
+ enumDeclaration.memberTypes,
+ size3 - length2,
+ length2);
+ break;
+ }
+ flagI = flag[start = end];
+ }
+ }
+
+ if (enumDeclaration.memberTypes != null) {
+ for (int i = enumDeclaration.memberTypes.length - 1; i >= 0; i--) {
+ enumDeclaration.memberTypes[i].enclosingType = enumDeclaration;
+ }
+ }
+}
+protected CompilationUnitDeclaration endParse(int act) {
+
+ this.lastAct = act;
+
+ if (this.currentElement != null){
+ this.currentElement.topElement().updateParseTree();
+ if (VERBOSE_RECOVERY){
+ System.out.print(Util.bind("parser.syntaxRecovery")); //$NON-NLS-1$
+ System.out.println("--------------------------"); //$NON-NLS-1$
+ System.out.println(this.compilationUnit);
+ System.out.println("----------------------------------"); //$NON-NLS-1$
+ }
+ } else {
+ if (this.diet & VERBOSE_RECOVERY){
+ System.out.print(Util.bind("parser.regularParse")); //$NON-NLS-1$
+ System.out.println("--------------------------"); //$NON-NLS-1$
+ System.out.println(this.compilationUnit);
+ System.out.println("----------------------------------"); //$NON-NLS-1$
+ }
+ }
+ persistLineSeparatorPositions();
+ for (int i = 0; i < this.scanner.foundTaskCount; i++){
+ problemReporter().task(
+ new String(this.scanner.foundTaskTags[i]),
+ new String(this.scanner.foundTaskMessages[i]),
+ this.scanner.foundTaskPriorities[i] == null ? null : new String(this.scanner.foundTaskPriorities[i]),
+ this.scanner.foundTaskPositions[i][0],
+ this.scanner.foundTaskPositions[i][1]);
+ }
+ return this.compilationUnit;
+}
+/*
+ * Flush comments defined prior to a given positions.
+ *
+ * Note: comments are stacked in syntactical order
+ *
+ * Either answer given <position>, or the end position of a comment line
+ * immediately following the <position> (same line)
+ *
+ * e.g.
+ * void foo(){
+ * } // end of method foo
+ */
+
+public int flushCommentsDefinedPriorTo(int position) {
+
+ int lastCommentIndex = this.scanner.commentPtr;
+ if (lastCommentIndex < 0) return position; // no comment
+
+ // compute the index of the first obsolete comment
+ int index = lastCommentIndex;
+ int validCount = 0;
+ while (index >= 0){
+ int commentEnd = this.scanner.commentStops[index];
+ if (commentEnd < 0) commentEnd = -commentEnd; // negative end position for non-javadoc comments
+ if (commentEnd <= position){
+ break;
+ }
+ index--;
+ validCount++;
+ }
+ // if the source at <position> is immediately followed by a line comment, then
+ // flush this comment and shift <position> to the comment end.
+ if (validCount > 0){
+ int immediateCommentEnd = -this.scanner.commentStops[index+1]; //non-javadoc comment end positions are negative
+ if (immediateCommentEnd > 0){ // only tolerating non-javadoc comments
+ // is there any line break until the end of the immediate comment ? (thus only tolerating line comment)
+ immediateCommentEnd--; // comment end in one char too far
+ if (this.scanner.getLineNumber(position) == this.scanner.getLineNumber(immediateCommentEnd)){
+ position = immediateCommentEnd;
+ validCount--; // flush this comment
+ index++;
+ }
+ }
+ }
+
+ if (index < 0) return position; // no obsolete comment
+
+ if (validCount > 0){ // move valid comment infos, overriding obsolete comment infos
+ System.arraycopy(this.scanner.commentStarts, index + 1, this.scanner.commentStarts, 0, validCount);
+ System.arraycopy(this.scanner.commentStops, index + 1, this.scanner.commentStops, 0, validCount);
+ }
+ this.scanner.commentPtr = validCount - 1;
+ return position;
+}
+public int getFirstToken() {
+ // the first token is a virtual token that
+ // allows the parser to parse several goals
+ // even if they aren't LALR(1)....
+ // Goal ::= '++' CompilationUnit
+ // Goal ::= '--' MethodBody
+ // Goal ::= '==' ConstructorBody
+ // -- Initializer
+ // Goal ::= '>>' StaticInitializer
+ // Goal ::= '>>' Block
+ // -- error recovery
+ // Goal ::= '>>>' Headers
+ // Goal ::= '*' BlockStatements
+ // Goal ::= '*' MethodPushModifiersHeader
+ // -- JDOM
+ // Goal ::= '&&' FieldDeclaration
+ // Goal ::= '||' ImportDeclaration
+ // Goal ::= '?' PackageDeclaration
+ // Goal ::= '+' TypeDeclaration
+ // Goal ::= '/' GenericMethodDeclaration
+ // Goal ::= '&' ClassBodyDeclaration
+ // -- code snippet
+ // Goal ::= '%' Expression
+ // -- completion parser
+ // Goal ::= '!' ConstructorBlockStatementsopt
+ // Goal ::= '~' BlockStatementsopt
+
+ return this.firstToken;
+}
+/*
+ * Answer back an array of sourceStart/sourceEnd positions of the available JavaDoc comments.
+ * The array is a flattened structure: 2*n entries with consecutives start and end positions.
+ *
+ * If no JavaDoc is available, then null is answered instead of an empty array.
+ *
+ * e.g. { 10, 20, 25, 45 } --> javadoc1 from 10 to 20, javadoc2 from 25 to 45
+ */
+public int[] getJavaDocPositions() {
+
+ int javadocCount = 0;
+ for (int i = 0, max = this.scanner.commentPtr; i <= max; i++){
+ // javadoc only (non javadoc comment have negative end positions.)
+ if (this.scanner.commentStops[i] > 0){
+ javadocCount++;
+ }
+ }
+ if (javadocCount == 0) return null;
+
+ int[] positions = new int[2*javadocCount];
+ int index = 0;
+ for (int i = 0, max = this.scanner.commentPtr; i <= max; i++){
+ // javadoc only (non javadoc comment have negative end positions.)
+ if (this.scanner.commentStops[i] > 0){
+ positions[index++] = this.scanner.commentStarts[i];
+ positions[index++] = this.scanner.commentStops[i]-1; //stop is one over
+ }
+ }
+ return positions;
+}
+ public void getMethodBodies(CompilationUnitDeclaration unit) {
+ //fill the methods bodies in order for the code to be generated
+
+ if (unit == null) return;
+
+ if (unit.ignoreMethodBodies) {
+ unit.ignoreFurtherInvestigation = true;
+ return;
+ // if initial diet parse did not work, no need to dig into method bodies.
+ }
+
+ if ((unit.bits & ASTNode.HasAllMethodBodies) != 0)
+ return; //work already done ...
+
+ // save existing values to restore them at the end of the parsing process
+ // see bug 47079 for more details
+ int[] oldLineEnds = this.scanner.lineEnds;
+ int oldLinePtr = this.scanner.linePtr;
+
+ //real parse of the method....
+ CompilationResult compilationResult = unit.compilationResult;
+ this.scanner.setSource(compilationResult);
+
+ if (this.javadocParser != null && this.javadocParser.checkDocComment) {
+ char[] contents = compilationResult.compilationUnit.getContents();
+ this.javadocParser.scanner.setSource(contents);
+ }
+ if (unit.types != null) {
+ for (int i = unit.types.length; --i >= 0;)
+ unit.types[i].parseMethod(this, unit);
+ }
+
+ // tag unit has having read bodies
+ unit.bits |= ASTNode.HasAllMethodBodies;
+
+ // this is done to prevent any side effects on the compilation unit result
+ // line separator positions array.
+ this.scanner.lineEnds = oldLineEnds;
+ this.scanner.linePtr = oldLinePtr;
+ }
+protected char getNextCharacter(char[] comment, int[] index) {
+ char nextCharacter = comment[index[0]++];
+ switch(nextCharacter) {
+ case '\\' :
+ int c1, c2, c3, c4;
+ index[0]++;
+ while (comment[index[0]] == 'u') index[0]++;
+ if (!(((c1 = Character.getNumericValue(comment[index[0]++])) > 15
+ || c1 < 0)
+ || ((c2 = Character.getNumericValue(comment[index[0]++])) > 15 || c2 < 0)
+ || ((c3 = Character.getNumericValue(comment[index[0]++])) > 15 || c3 < 0)
+ || ((c4 = Character.getNumericValue(comment[index[0]++])) > 15 || c4 < 0))) {
+ nextCharacter = (char) (((c1 * 16 + c2) * 16 + c3) * 16 + c4);
+ }
+ break;
+ }
+ return nextCharacter;
+}
+protected Expression getTypeReference(Expression exp) {
+
+ exp.bits &= ~ASTNode.RestrictiveFlagMASK;
+ exp.bits |= TYPE;
+ return exp;
+}
+protected TypeReference getTypeReference(int dim) {
+ /* build a Reference on a variable that may be qualified or not
+ This variable is a type reference and dim will be its dimensions*/
+
+ TypeReference ref;
+ int length = this.identifierLengthStack[this.identifierLengthPtr--];
+ if (length < 0) { //flag for precompiled type reference on base types
+ ref = TypeReference.baseTypeReference(-length, dim);
+ ref.sourceStart = this.intStack[this.intPtr--];
+ if (dim == 0) {
+ ref.sourceEnd = this.intStack[this.intPtr--];
+ } else {
+ this.intPtr--;
+ ref.sourceEnd = this.endPosition;
+ }
+ } else {
+ int numberOfIdentifiers = this.genericsIdentifiersLengthStack[this.genericsIdentifiersLengthPtr--];
+ if (length != numberOfIdentifiers || this.genericsLengthStack[this.genericsLengthPtr] != 0) {
+ // generic type
+ ref = getTypeReferenceForGenericType(dim, length, numberOfIdentifiers);
+ } else if (length == 1) {
+ // single variable reference
+ this.genericsLengthPtr--; // pop the 0
+ if (dim == 0) {
+ ref =
+ new SingleTypeReference(
+ this.identifierStack[this.identifierPtr],
+ this.identifierPositionStack[this.identifierPtr--]);
+ } else {
+ ref =
+ new ArrayTypeReference(
+ this.identifierStack[this.identifierPtr],
+ dim,
+ this.identifierPositionStack[this.identifierPtr--]);
+ ref.sourceEnd = this.endPosition;
+ }
+ } else {
+ this.genericsLengthPtr--;
+ //Qualified variable reference
+ char[][] tokens = new char[length][];
+ this.identifierPtr -= length;
+ long[] positions = new long[length];
+ System.arraycopy(this.identifierStack, this.identifierPtr + 1, tokens, 0, length);
+ System.arraycopy(
+ this.identifierPositionStack,
+ this.identifierPtr + 1,
+ positions,
+ 0,
+ length);
+ if (dim == 0) {
+ ref = new QualifiedTypeReference(tokens, positions);
+ } else {
+ ref = new ArrayQualifiedTypeReference(tokens, dim, positions);
+ ref.sourceEnd = this.endPosition;
+ }
+ }
+ }
+ return ref;
+}
+protected TypeReference getTypeReferenceForGenericType(int dim, int identifierLength, int numberOfIdentifiers) {
+ if (identifierLength == 1 && numberOfIdentifiers == 1) {
+ int currentTypeArgumentsLength = this.genericsLengthStack[this.genericsLengthPtr--];
+ TypeReference[] typeArguments = new TypeReference[currentTypeArgumentsLength];
+ this.genericsPtr -= currentTypeArgumentsLength;
+ System.arraycopy(this.genericsStack, this.genericsPtr + 1, typeArguments, 0, currentTypeArgumentsLength);
+ return new ParameterizedSingleTypeReference(this.identifierStack[this.identifierPtr], typeArguments, dim, this.identifierPositionStack[this.identifierPtr--]);
+ } else {
+ TypeReference[][] typeArguments = new TypeReference[numberOfIdentifiers][];
+ char[][] tokens = new char[numberOfIdentifiers][];
+ long[] positions = new long[numberOfIdentifiers];
+ int index = numberOfIdentifiers;
+ int currentIdentifiersLength = identifierLength;
+ while (index > 0) {
+ int currentTypeArgumentsLength = this.genericsLengthStack[this.genericsLengthPtr--];
+ if (currentTypeArgumentsLength != 0) {
+ this.genericsPtr -= currentTypeArgumentsLength;
+ System.arraycopy(this.genericsStack, this.genericsPtr + 1, typeArguments[index - 1] = new TypeReference[currentTypeArgumentsLength], 0, currentTypeArgumentsLength);
+ }
+ switch(currentIdentifiersLength) {
+ case 1 :
+ // we are in a case A<B>.C<D> or A<B>.C<D>
+ tokens[index - 1] = this.identifierStack[this.identifierPtr];
+ positions[index - 1] = this.identifierPositionStack[this.identifierPtr--];
+ break;
+ default:
+ // we are in a case A.B.C<B>.C<D> or A.B.C<B>...
+ this.identifierPtr -= currentIdentifiersLength;
+ System.arraycopy(this.identifierStack, this.identifierPtr + 1, tokens, index - currentIdentifiersLength, currentIdentifiersLength);
+ System.arraycopy(this.identifierPositionStack, this.identifierPtr + 1, positions, index - currentIdentifiersLength, currentIdentifiersLength);
+ }
+ index -= currentIdentifiersLength;
+ if (index > 0) {
+ currentIdentifiersLength = this.identifierLengthStack[this.identifierLengthPtr--];
+ }
+ }
+ return new ParameterizedQualifiedTypeReference(tokens, typeArguments, dim, positions);
+ }
+}
+protected NameReference getUnspecifiedReference() {
+ /* build a (unspecified) NameReference which may be qualified*/
+
+ int length;
+ NameReference ref;
+ if ((length = this.identifierLengthStack[this.identifierLengthPtr--]) == 1)
+ // single variable reference
+ ref =
+ new SingleNameReference(
+ this.identifierStack[this.identifierPtr],
+ this.identifierPositionStack[this.identifierPtr--]);
+ else
+ //Qualified variable reference
+ {
+ char[][] tokens = new char[length][];
+ this.identifierPtr -= length;
+ System.arraycopy(this.identifierStack, this.identifierPtr + 1, tokens, 0, length);
+ long[] positions = new long[length];
+ System.arraycopy(this.identifierPositionStack, this.identifierPtr + 1, positions, 0, length);
+ ref =
+ new QualifiedNameReference(tokens,
+ positions,
+ (int) (this.identifierPositionStack[this.identifierPtr + 1] >> 32), // sourceStart
+ (int) this.identifierPositionStack[this.identifierPtr + length]); // sourceEnd
+ }
+ return ref;
+}
+protected NameReference getUnspecifiedReferenceOptimized() {
+ /* build a (unspecified) NameReference which may be qualified
+ The optimization occurs for qualified reference while we are
+ certain in this case the last item of the qualified name is
+ a field access. This optimization is IMPORTANT while it results
+ that when a NameReference is build, the type checker should always
+ look for that it is not a type reference */
+
+ int length;
+ NameReference ref;
+ if ((length = this.identifierLengthStack[this.identifierLengthPtr--]) == 1) {
+ // single variable reference
+ ref =
+ new SingleNameReference(
+ this.identifierStack[this.identifierPtr],
+ this.identifierPositionStack[this.identifierPtr--]);
+ ref.bits &= ~ASTNode.RestrictiveFlagMASK;
+ ref.bits |= LOCAL | FIELD;
+ return ref;
+ }
+
+ //Qualified-variable-reference
+ //In fact it is variable-reference DOT field-ref , but it would result in a type
+ //conflict tha can be only reduce by making a superclass (or inetrface ) between
+ //nameReference and FiledReference or putting FieldReference under NameReference
+ //or else..........This optimisation is not really relevant so just leave as it is
+
+ char[][] tokens = new char[length][];
+ this.identifierPtr -= length;
+ System.arraycopy(this.identifierStack, this.identifierPtr + 1, tokens, 0, length);
+ long[] positions = new long[length];
+ System.arraycopy(this.identifierPositionStack, this.identifierPtr + 1, positions, 0, length);
+ ref = new QualifiedNameReference(
+ tokens,
+ positions,
+ (int) (this.identifierPositionStack[this.identifierPtr + 1] >> 32), // sourceStart
+ (int) this.identifierPositionStack[this.identifierPtr + length]); // sourceEnd
+ ref.bits &= ~ASTNode.RestrictiveFlagMASK;
+ ref.bits |= LOCAL | FIELD;
+ return ref;
+}
+public void goForBlockStatementsopt() {
+ //tells the scanner to go for block statements opt parsing
+
+ this.firstToken = TokenNameTWIDDLE;
+ this.scanner.recordLineSeparator = false;
+}
+public void goForBlockStatementsOrCatchHeader() {
+ //tells the scanner to go for block statements or method headers parsing
+
+ this.firstToken = TokenNameMULTIPLY;
+ this.scanner.recordLineSeparator = false;
+}
+public void goForClassBodyDeclarations() {
+ //tells the scanner to go for any body declarations parsing
+
+ this.firstToken = TokenNameAND;
+ this.scanner.recordLineSeparator = true;
+}
+public void goForCompilationUnit(){
+ //tells the scanner to go for compilation unit parsing
+
+ this.firstToken = TokenNamePLUS_PLUS ;
+ this.scanner.foundTaskCount = 0;
+ this.scanner.recordLineSeparator = true;
+ this.scanner.currentLine= null;
+}
+public void goForExpression() {
+ //tells the scanner to go for an expression parsing
+
+ this.firstToken = TokenNameREMAINDER;
+ this.scanner.recordLineSeparator = true; // recovery goals must record line separators
+}
+public void goForFieldDeclaration(){
+ //tells the scanner to go for field declaration parsing
+
+ this.firstToken = TokenNameAND_AND ;
+ this.scanner.recordLineSeparator = true;
+}
+public void goForGenericMethodDeclaration(){
+ //tells the scanner to go for generic method declarations parsing
+
+ this.firstToken = TokenNameDIVIDE;
+ this.scanner.recordLineSeparator = true;
+}
+public void goForHeaders(){
+ //tells the scanner to go for headers only parsing
+
+ this.firstToken = TokenNameUNSIGNED_RIGHT_SHIFT;
+ this.scanner.recordLineSeparator = true; // recovery goals must record line separators
+}
+public void goForImportDeclaration(){
+ //tells the scanner to go for import declaration parsing
+
+ this.firstToken = TokenNameOR_OR ;
+ this.scanner.recordLineSeparator = true;
+}
+public void goForInitializer(){
+ //tells the scanner to go for initializer parsing
+
+ this.firstToken = TokenNameRIGHT_SHIFT ;
+ this.scanner.recordLineSeparator = false;
+}
+public void goForMethodBody(){
+ //tells the scanner to go for method body parsing
+
+ this.firstToken = TokenNameMINUS_MINUS ;
+ this.scanner.recordLineSeparator = false;
+}
+public void goForPackageDeclaration() {
+ //tells the scanner to go for package declaration parsing
+
+ this.firstToken = TokenNameQUESTION;
+ this.scanner.recordLineSeparator = true;
+}
+public void goForTypeDeclaration() {
+ //tells the scanner to go for type (interface or class) declaration parsing
+
+ this.firstToken = TokenNamePLUS;
+ this.scanner.recordLineSeparator = true;
+}
+protected void ignoreExpressionAssignment() {
+ // Assignment ::= InvalidArrayInitializerAssignement
+ // encoded operator would be: this.intStack[this.intPtr]
+ this.intPtr--;
+ ArrayInitializer arrayInitializer = (ArrayInitializer) this.expressionStack[this.expressionPtr--];
+ this.expressionLengthPtr -- ;
+ // report a syntax error and abort parsing
+ problemReporter().arrayConstantsOnlyInArrayInitializers(arrayInitializer.sourceStart, arrayInitializer.sourceEnd);
+}
+protected void ignoreInterfaceDeclaration() {
+ // BlockStatement ::= InvalidInterfaceDeclaration
+ //InterfaceDeclaration ::= Modifiersopt 'interface' 'Identifier' ExtendsInterfacesopt InterfaceHeader InterfaceBody
+
+ // length declarations
+ int length;
+ if ((length = this.astLengthStack[this.astLengthPtr--]) != 0) {
+ //there are length declarations
+ //dispatch according to the type of the declarations
+ dispatchDeclarationInto(length);
+ }
+
+ flushCommentsDefinedPriorTo(this.endStatementPosition);
+
+ // report the problem and continue parsing
+ TypeDeclaration typeDecl = (TypeDeclaration) this.astStack[this.astPtr];
+ typeDecl.bodyEnd = this.endStatementPosition;
+ problemReporter().cannotDeclareLocalInterface(typeDecl.name, typeDecl.sourceStart, typeDecl.sourceEnd);
+
+ // mark initializers with local type mark if needed
+ markInitializersWithLocalType(typeDecl);
+
+ // remove the ast node created in interface header
+ this.astPtr--;
+ pushOnAstLengthStack(-1);
+ concatNodeLists();
+}
+protected void ignoreInvalidConstructorDeclaration(boolean hasBody) {
+ // InvalidConstructorDeclaration ::= ConstructorHeader ConstructorBody ==> true
+ // InvalidConstructorDeclaration ::= ConstructorHeader ';' ==> false
+
+ /*
+ this.astStack : modifiers arguments throws statements
+ this.identifierStack : name
+ ==>
+ this.astStack : MethodDeclaration
+ this.identifierStack :
+ */
+ if (hasBody) {
+ // pop the position of the { (body of the method) pushed in block decl
+ this.intPtr--;
+ }
+
+ //statements
+ if (hasBody) {
+ this.realBlockPtr--;
+ }
+
+ int length;
+ if (hasBody && ((length = this.astLengthStack[this.astLengthPtr--]) != 0)) {
+ this.astPtr -= length;
+ }
+ ConstructorDeclaration constructorDeclaration = (ConstructorDeclaration) this.astStack[this.astPtr];
+ constructorDeclaration.bodyEnd = this.endStatementPosition;
+ constructorDeclaration.declarationSourceEnd = flushCommentsDefinedPriorTo(this.endStatementPosition);
+ if (!hasBody) {
+ constructorDeclaration.modifiers |= AccSemicolonBody;
+ }
+}
+protected void ignoreMethodBody() {
+ // InterfaceMemberDeclaration ::= InvalidMethodDeclaration
+
+ /*
+ this.astStack : modifiers arguments throws statements
+ this.identifierStack : type name
+ this.intStack : dim dim dim
+ ==>
+ this.astStack : MethodDeclaration
+ this.identifierStack :
+ this.intStack :
+ */
+
+ // pop the position of the { (body of the method) pushed in block decl
+ this.intPtr--;
+ // retrieve end position of method declarator
+
+ //statements
+ this.realBlockPtr--;
+ int length;
+ if ((length = this.astLengthStack[this.astLengthPtr--]) != 0) {
+ this.astPtr -= length;
+ }
+
+ //watch for } that could be given as a unicode ! ( u007D is '}' )
+ MethodDeclaration md = (MethodDeclaration) this.astStack[this.astPtr];
+ md.bodyEnd = this.endPosition;
+ md.declarationSourceEnd = flushCommentsDefinedPriorTo(this.endStatementPosition);
+
+ // report the problem and continue the parsing - narrowing the problem onto the method
+ problemReporter().abstractMethodNeedingNoBody(md);
+}
+public void initialize() {
+ //positionning the parser for a new compilation unit
+ //avoiding stack reallocation and all that....
+ this.astPtr = -1;
+ this.astLengthPtr = -1;
+ this.expressionPtr = -1;
+ this.expressionLengthPtr = -1;
+ this.identifierPtr = -1;
+ this.identifierLengthPtr = -1;
+ this.intPtr = -1;
+ this.nestedMethod[this.nestedType = 0] = 0; // need to reset for further reuse
+ this.variablesCounter[this.nestedType] = 0;
+ this.dimensions = 0 ;
+ this.realBlockPtr = -1;
+ this.compilationUnit = null;
+ this.referenceContext = null;
+ this.endStatementPosition = 0;
+
+ //remove objects from stack too, while the same parser/compiler couple is
+ //re-used between two compilations ....
+
+ int astLength = this.astStack.length;
+ if (this.noAstNodes.length < astLength){
+ this.noAstNodes = new ASTNode[astLength];
+ //System.out.println("Resized AST stacks : "+ astLength);
+
+ }
+ System.arraycopy(this.noAstNodes, 0, this.astStack, 0, astLength);
+
+ int expressionLength = this.expressionStack.length;
+ if (this.noExpressions.length < expressionLength){
+ this.noExpressions = new Expression[expressionLength];
+ //System.out.println("Resized EXPR stacks : "+ expressionLength);
+ }
+ System.arraycopy(this.noExpressions, 0, this.expressionStack, 0, expressionLength);
+
+ // reset this.scanner state
+ this.scanner.commentPtr = -1;
+ this.scanner.foundTaskCount = 0;
+ this.scanner.eofPosition = Integer.MAX_VALUE;
+ this.scanner.wasNonExternalizedStringLiteral = false;
+ this.scanner.nonNLSStrings = null;
+ this.scanner.currentLine = null;
+
+ resetModifiers();
+
+ // recovery
+ this.lastCheckPoint = -1;
+ this.currentElement = null;
+ this.restartRecovery = false;
+ this.hasReportedError = false;
+ this.recoveredStaticInitializerStart = 0;
+ this.lastIgnoredToken = -1;
+ this.lastErrorEndPosition = -1;
+ this.lastErrorEndPositionBeforeRecovery = -1;
+ this.listLength = 0;
+ this.listTypeParameterLength = 0;
+
+ this.rBraceStart = 0;
+ this.rBraceEnd = 0;
+ this.rBraceSuccessorStart = 0;
+
+ this.genericsIdentifiersLengthPtr = -1;
+ this.genericsLengthPtr = -1;
+ this.genericsPtr = -1;
+}
+public void initializeScanner(){
+ this.scanner = new Scanner(
+ false /*comment*/,
+ false /*whitespace*/,
+ this.options.getSeverity(CompilerOptions.NonExternalizedString) != ProblemSeverities.Ignore /*nls*/,
+ this.options.sourceLevel /*sourceLevel*/,
+ this.options.taskTags/*taskTags*/,
+ this.options.taskPriorites/*taskPriorities*/,
+ this.options.isTaskCaseSensitive/*taskCaseSensitive*/);
+}
+public void jumpOverMethodBody() {
+ //on diet parsing.....do not buffer method statements
+
+ //the scanner.diet is reinitialized to false
+ //automatically by the scanner once it has jumped over
+ //the statements
+
+ if (this.diet && (this.dietInt == 0))
+ this.scanner.diet = true;
+}
+protected void markEnclosingMemberWithLocalType() {
+ if (this.currentElement != null) return; // this is already done in the recovery code
+ for (int i = this.astPtr; i >= 0; i--) {
+ ASTNode node = this.astStack[i];
+ if (node instanceof AbstractMethodDeclaration
+ || node instanceof FieldDeclaration
+ || node instanceof TypeDeclaration) { // mark type for now: all initializers will be marked when added to this type
+ node.bits |= ASTNode.HasLocalTypeMASK;
+ return;
+ }
+ }
+ // default to reference context (case of parse method body)
+ if (this.referenceContext instanceof AbstractMethodDeclaration
+ || this.referenceContext instanceof TypeDeclaration) {
+ ((ASTNode)this.referenceContext).bits |= ASTNode.HasLocalTypeMASK;
+ }
+}
+protected void markInitializersWithLocalType(TypeDeclaration type) {
+ if (type.fields == null || (type.bits & ASTNode.HasLocalTypeMASK) == 0) return;
+ for (int i = 0, length = type.fields.length; i < length; i++) {
+ FieldDeclaration field = type.fields[i];
+ if (field instanceof Initializer) {
+ field.bits |= ASTNode.HasLocalTypeMASK;
+ }
+ }
+}
+/*
+ * Move checkpoint location (current implementation is moving it by one token)
+ *
+ * Answers true if successfully moved checkpoint (in other words, it did not attempt to move it
+ * beyond end of file).
+ */
+protected boolean moveRecoveryCheckpoint() {
+
+ int pos = this.lastCheckPoint;
+ /* reset this.scanner, and move checkpoint by one token */
+ this.scanner.startPosition = pos;
+ this.scanner.currentPosition = pos;
+ this.scanner.diet = false; // quit jumping over method bodies
+
+ /* if about to restart, then no need to shift token */
+ if (this.restartRecovery){
+ this.lastIgnoredToken = -1;
+ this.scanner.currentLine = null;
+ return true;
+ }
+
+ /* protect against shifting on an invalid token */
+ this.lastIgnoredToken = this.nextIgnoredToken;
+ this.nextIgnoredToken = -1;
+ do {
+ try {
+ this.nextIgnoredToken = this.scanner.getNextToken();
+ if(this.scanner.currentPosition == this.scanner.startPosition){
+ this.scanner.currentPosition++; // on fake completion identifier
+ this.nextIgnoredToken = -1;
+ }
+
+ } catch(InvalidInputException e){
+ pos = this.scanner.currentPosition;
+ }
+ } while (this.nextIgnoredToken < 0);
+
+ if (this.nextIgnoredToken == TokenNameEOF) { // no more recovery after this point
+ if (this.currentToken == TokenNameEOF) { // already tried one iteration on EOF
+ this.scanner.currentLine = null;
+ return false;
+ }
+ }
+ this.lastCheckPoint = this.scanner.currentPosition;
+
+ /* reset this.scanner again to previous checkpoint location*/
+ this.scanner.startPosition = pos;
+ this.scanner.currentPosition = pos;
+ this.scanner.commentPtr = -1;
+ this.scanner.foundTaskCount = 0;
+ this.scanner.currentLine = null;
+
+ return true;
+
+/*
+ The following implementation moves the checkpoint location by one line:
+
+ int pos = this.lastCheckPoint;
+ // reset this.scanner, and move checkpoint by one token
+ this.scanner.startPosition = pos;
+ this.scanner.currentPosition = pos;
+ this.scanner.diet = false; // quit jumping over method bodies
+
+ // if about to restart, then no need to shift token
+ if (this.restartRecovery){
+ this.lastIgnoredToken = -1;
+ return true;
+ }
+
+ // protect against shifting on an invalid token
+ this.lastIgnoredToken = this.nextIgnoredToken;
+ this.nextIgnoredToken = -1;
+
+ boolean wasTokenizingWhiteSpace = this.scanner.tokenizeWhiteSpace;
+ this.scanner.tokenizeWhiteSpace = true;
+ checkpointMove:
+ do {
+ try {
+ this.nextIgnoredToken = this.scanner.getNextToken();
+ switch(this.nextIgnoredToken){
+ case Scanner.TokenNameWHITESPACE :
+ if(this.scanner.getLineNumber(this.scanner.startPosition)
+ == this.scanner.getLineNumber(this.scanner.currentPosition)){
+ this.nextIgnoredToken = -1;
+ }
+ break;
+ case TokenNameSEMICOLON :
+ case TokenNameLBRACE :
+ case TokenNameRBRACE :
+ break;
+ case TokenNameIdentifier :
+ if(this.scanner.currentPosition == this.scanner.startPosition){
+ this.scanner.currentPosition++; // on fake completion identifier
+ }
+ default:
+ this.nextIgnoredToken = -1;
+ break;
+ case TokenNameEOF :
+ break checkpointMove;
+ }
+ } catch(InvalidInputException e){
+ pos = this.scanner.currentPosition;
+ }
+ } while (this.nextIgnoredToken < 0);
+ this.scanner.tokenizeWhiteSpace = wasTokenizingWhiteSpace;
+
+ if (this.nextIgnoredToken == TokenNameEOF) { // no more recovery after this point
+ if (this.currentToken == TokenNameEOF) { // already tried one iteration on EOF
+ return false;
+ }
+ }
+ this.lastCheckPoint = this.scanner.currentPosition;
+
+ // reset this.scanner again to previous checkpoint location
+ this.scanner.startPosition = pos;
+ this.scanner.currentPosition = pos;
+ this.scanner.commentPtr = -1;
+
+ return true;
+*/
+}
+protected MessageSend newMessageSend() {
+ // '(' ArgumentListopt ')'
+ // the arguments are on the expression stack
+
+ MessageSend m = new MessageSend();
+ int length;
+ if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+ this.expressionPtr -= length;
+ System.arraycopy(
+ this.expressionStack,
+ this.expressionPtr + 1,
+ m.arguments = new Expression[length],
+ 0,
+ length);
+ }
+ return m;
+}
+protected MessageSend newMessageSendWithTypeArguments() {
+ MessageSend m = new MessageSend();
+ int length;
+ if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+ this.expressionPtr -= length;
+ System.arraycopy(
+ this.expressionStack,
+ this.expressionPtr + 1,
+ m.arguments = new Expression[length],
+ 0,
+ length);
+ }
+ return m;
+}
+protected void optimizedConcatNodeLists() {
+ /*back from a recursive loop. Virtualy group the
+ astNode into an array using this.astLengthStack*/
+
+ /*
+ * This is a case where you have two sublists into the this.astStack that you want
+ * to merge in one list. There is no action required on the this.astStack. The only
+ * thing you need to do is merge the two lengths specified on the astStackLength.
+ * The top two length are for example:
+ * ... p n
+ * and you want to result in a list like:
+ * ... n+p
+ * This means that the p could be equals to 0 in case there is no astNode pushed
+ * on the this.astStack.
+ * Look at the InterfaceMemberDeclarations for an example.
+ * This case optimizes the fact that p == 1.
+ */
+
+ this.astLengthStack[--this.astLengthPtr]++;
+}
+/*main loop of the automat
+When a rule is reduced, the method consumeRule(int) is called with the number
+of the consumed rule. When a terminal is consumed, the method consumeToken(int) is
+called in order to remember (when needed) the consumed token */
+// (int)asr[asi(act)]
+// name[symbol_index[currentKind]]
+protected void parse() {
+ if (DEBUG) System.out.println("-- ENTER INSIDE PARSE METHOD --"); //$NON-NLS-1$
+ boolean isDietParse = this.diet;
+ int oldFirstToken = getFirstToken();
+ this.hasError = false;
+
+ this.hasReportedError = false;
+ int act = START_STATE;
+ this.stateStackTop = -1;
+ this.currentToken = getFirstToken();
+ ProcessTerminals : for (;;) {
+ int stackLength = this.stack.length;
+ if (++this.stateStackTop >= stackLength) {
+ System.arraycopy(
+ this.stack, 0,
+ this.stack = new int[stackLength + StackIncrement], 0,
+ stackLength);
+ }
+ this.stack[this.stateStackTop] = act;
+
+ act = tAction(act, this.currentToken);
+ if (act == ERROR_ACTION || this.restartRecovery) {
+ int errorPos = this.scanner.currentPosition;
+ if (!this.hasReportedError) {
+ this.hasError = true;
+ }
+ if (resumeOnSyntaxError()) {
+ if (act == ERROR_ACTION) this.lastErrorEndPosition = errorPos;
+ act = START_STATE;
+ this.stateStackTop = -1;
+ this.currentToken = getFirstToken();
+ continue ProcessTerminals;
+ }
+ act = ERROR_ACTION;
+ break ProcessTerminals;
+ }
+ if (act <= NUM_RULES) {
+ this.stateStackTop--;
+
+ } else if (act > ERROR_ACTION) { /* shift-reduce */
+ consumeToken(this.currentToken);
+ if (this.currentElement != null) this.recoveryTokenCheck();
+ try {
+ this.currentToken = this.scanner.getNextToken();
+ } catch(InvalidInputException e){
+ if (!this.hasReportedError){
+ this.problemReporter().scannerError(this, e.getMessage());
+ this.hasReportedError = true;
+ }
+ this.lastCheckPoint = this.scanner.currentPosition;
+ this.restartRecovery = true;
+ }
+ act -= ERROR_ACTION;
+
+ } else {
+ if (act < ACCEPT_ACTION) { /* shift */
+ consumeToken(this.currentToken);
+ if (this.currentElement != null) this.recoveryTokenCheck();
+ try{
+ this.currentToken = this.scanner.getNextToken();
+ } catch(InvalidInputException e){
+ if (!this.hasReportedError){
+ this.problemReporter().scannerError(this, e.getMessage());
+ this.hasReportedError = true;
+ }
+ this.lastCheckPoint = this.scanner.currentPosition;
+ this.restartRecovery = true;
+ }
+ continue ProcessTerminals;
+ }
+ break ProcessTerminals;
+ }
+
+ ProcessNonTerminals : do { /* reduce */
+ consumeRule(act);
+ this.stateStackTop -= (rhs[act] - 1);
+ act = ntAction(this.stack[this.stateStackTop], lhs[act]);
+ } while (act <= NUM_RULES);
+ }
+ endParse(act);
+
+ if (this.reportSyntaxErrorIsRequired && this.hasError) {
+ reportSyntaxErrors(isDietParse, oldFirstToken);
+ }
+ if (DEBUG) System.out.println("-- EXIT FROM PARSE METHOD --"); //$NON-NLS-1$
+}
+public void parse(ConstructorDeclaration cd, CompilationUnitDeclaration unit) {
+ parse(cd, unit, false);
+}
+public void parse(ConstructorDeclaration cd, CompilationUnitDeclaration unit, boolean recordLineSeparator) {
+ //only parse the method body of cd
+ //fill out its statements
+
+ //convert bugs into parse error
+
+ initialize();
+ goForBlockStatementsopt();
+ if (recordLineSeparator) {
+ this.scanner.recordLineSeparator = true;
+ }
+ this.nestedMethod[this.nestedType]++;
+ pushOnRealBlockStack(0);
+
+ this.referenceContext = cd;
+ this.compilationUnit = unit;
+
+ this.scanner.resetTo(cd.bodyStart, cd.bodyEnd);
+ try {
+ parse();
+ } catch (AbortCompilation ex) {
+ this.lastAct = ERROR_ACTION;
+ } finally {
+ this.nestedMethod[this.nestedType]--;
+ }
+
+ checkNonNLSAfterBodyEnd(cd.declarationSourceEnd);
+
+ if (this.lastAct == ERROR_ACTION) {
+ initialize();
+ return;
+ }
+
+ //statements
+ cd.explicitDeclarations = this.realBlockStack[this.realBlockPtr--];
+ int length;
+ if ((length = this.astLengthStack[this.astLengthPtr--]) != 0) {
+ this.astPtr -= length;
+ if (this.astStack[this.astPtr + 1] instanceof ExplicitConstructorCall)
+ //avoid a isSomeThing that would only be used here BUT what is faster between two alternatives ?
+ {
+ System.arraycopy(
+ this.astStack,
+ this.astPtr + 2,
+ cd.statements = new Statement[length - 1],
+ 0,
+ length - 1);
+ cd.constructorCall = (ExplicitConstructorCall) this.astStack[this.astPtr + 1];
+ } else { //need to add explicitly the super();
+ System.arraycopy(
+ this.astStack,
+ this.astPtr + 1,
+ cd.statements = new Statement[length],
+ 0,
+ length);
+ cd.constructorCall = SuperReference.implicitSuperConstructorCall();
+ }
+ } else {
+ cd.constructorCall = SuperReference.implicitSuperConstructorCall();
+ if (!containsComment(cd.bodyStart, cd.bodyEnd)) {
+ cd.bits |= ASTNode.UndocumentedEmptyBlockMASK;
+ }
+ }
+
+ if (cd.constructorCall.sourceEnd == 0) {
+ cd.constructorCall.sourceEnd = cd.sourceEnd;
+ cd.constructorCall.sourceStart = cd.sourceStart;
+ }
+}
+// A P I
+
+public void parse(
+ FieldDeclaration field,
+ TypeDeclaration type,
+ CompilationUnitDeclaration unit,
+ char[] initializationSource) {
+ //only parse the initializationSource of the given field
+
+ //convert bugs into parse error
+
+ initialize();
+ goForExpression();
+ this.nestedMethod[this.nestedType]++;
+
+ this.referenceContext = type;
+ this.compilationUnit = unit;
+
+ this.scanner.setSource(initializationSource);
+ this.scanner.resetTo(0, initializationSource.length-1);
+ try {
+ parse();
+ } catch (AbortCompilation ex) {
+ this.lastAct = ERROR_ACTION;
+ } finally {
+ this.nestedMethod[this.nestedType]--;
+ }
+
+ if (this.lastAct == ERROR_ACTION) {
+ return;
+ }
+
+ field.initialization = this.expressionStack[this.expressionPtr];
+
+ // mark field with local type if one was found during parsing
+ if ((type.bits & ASTNode.HasLocalTypeMASK) != 0) {
+ field.bits |= ASTNode.HasLocalTypeMASK;
+ }
+}
+// A P I
+
+public CompilationUnitDeclaration parse(
+ ICompilationUnit sourceUnit,
+ CompilationResult compilationResult) {
+ // parses a compilation unit and manages error handling (even bugs....)
+
+ return parse(sourceUnit, compilationResult, -1, -1/*parse without reseting the scanner*/);
+}
+// A P I
+
+public CompilationUnitDeclaration parse(
+ ICompilationUnit sourceUnit,
+ CompilationResult compilationResult,
+ int start,
+ int end) {
+ // parses a compilation unit and manages error handling (even bugs....)
+
+ CompilationUnitDeclaration unit;
+ try {
+ /* automaton initialization */
+ initialize();
+ goForCompilationUnit();
+
+ /* scanners initialization */
+ char[] contents = sourceUnit.getContents();
+ this.scanner.setSource(contents);
+ if (end != -1) this.scanner.resetTo(start, end);
+ if (this.javadocParser != null && this.javadocParser.checkDocComment) {
+ this.javadocParser.scanner.setSource(contents);
+ if (end != -1) {
+ this.javadocParser.scanner.resetTo(start, end);
+ }
+ }
+ /* unit creation */
+ this.referenceContext =
+ this.compilationUnit =
+ new CompilationUnitDeclaration(
+ this.problemReporter,
+ compilationResult,
+ this.scanner.source.length);
+ /* run automaton */
+ parse();
+ } finally {
+ unit = this.compilationUnit;
+ this.compilationUnit = null; // reset parser
+ // tag unit has having read bodies
+ if (!this.diet) unit.bits |= ASTNode.HasAllMethodBodies;
+ }
+ return unit;
+}
+// A P I
+
+public void parse(
+ Initializer initializer,
+ TypeDeclaration type,
+ CompilationUnitDeclaration unit) {
+ //only parse the method body of md
+ //fill out method statements
+
+ //convert bugs into parse error
+
+ initialize();
+ goForBlockStatementsopt();
+ this.nestedMethod[this.nestedType]++;
+ pushOnRealBlockStack(0);
+
+ this.referenceContext = type;
+ this.compilationUnit = unit;
+
+ this.scanner.resetTo(initializer.bodyStart, initializer.bodyEnd); // just on the beginning {
+ try {
+ parse();
+ } catch (AbortCompilation ex) {
+ this.lastAct = ERROR_ACTION;
+ } finally {
+ this.nestedMethod[this.nestedType]--;
+ }
+
+ checkNonNLSAfterBodyEnd(initializer.declarationSourceEnd);
+
+ if (this.lastAct == ERROR_ACTION) {
+ return;
+ }
+
+ //refill statements
+ initializer.block.explicitDeclarations = this.realBlockStack[this.realBlockPtr--];
+ int length;
+ if ((length = this.astLengthStack[this.astLengthPtr--]) > 0) {
+ System.arraycopy(this.astStack, (this.astPtr -= length) + 1, initializer.block.statements = new Statement[length], 0, length);
+ } else {
+ // check whether this block at least contains some comment in it
+ if (!containsComment(initializer.block.sourceStart, initializer.block.sourceEnd)) {
+ initializer.block.bits |= ASTNode.UndocumentedEmptyBlockMASK;
+ }
+ }
+
+ // mark initializer with local type if one was found during parsing
+ if ((type.bits & ASTNode.HasLocalTypeMASK) != 0) {
+ initializer.bits |= ASTNode.HasLocalTypeMASK;
+ }
+}
+// A P I
+
+public void parse(MethodDeclaration md, CompilationUnitDeclaration unit) {
+ //only parse the method body of md
+ //fill out method statements
+
+ //convert bugs into parse error
+
+ if (md.isAbstract())
+ return;
+ if (md.isNative())
+ return;
+ if ((md.modifiers & AccSemicolonBody) != 0)
+ return;
+
+ initialize();
+ goForBlockStatementsopt();
+ this.nestedMethod[this.nestedType]++;
+ pushOnRealBlockStack(0);
+
+ this.referenceContext = md;
+ this.compilationUnit = unit;
+
+ this.scanner.resetTo(md.bodyStart, md.bodyEnd);
+ // reset the scanner to parser from { down to }
+ try {
+ parse();
+ } catch (AbortCompilation ex) {
+ this.lastAct = ERROR_ACTION;
+ } finally {
+ this.nestedMethod[this.nestedType]--;
+ }
+
+ checkNonNLSAfterBodyEnd(md.declarationSourceEnd);
+
+ if (this.lastAct == ERROR_ACTION) {
+ return;
+ }
+
+ //refill statements
+ md.explicitDeclarations = this.realBlockStack[this.realBlockPtr--];
+ int length;
+ if ((length = this.astLengthStack[this.astLengthPtr--]) != 0) {
+ System.arraycopy(
+ this.astStack,
+ (this.astPtr -= length) + 1,
+ md.statements = new Statement[length],
+ 0,
+ length);
+ } else {
+ if (!containsComment(md.bodyStart, md.bodyEnd)) {
+ md.bits |= ASTNode.UndocumentedEmptyBlockMASK;
+ }
+ }
+}
+public ASTNode[] parseClassBodyDeclarations(char[] source, int offset, int length, CompilationUnitDeclaration unit) {
+ /* automaton initialization */
+ initialize();
+ goForClassBodyDeclarations();
+ /* scanner initialization */
+ this.scanner.setSource(source);
+ this.scanner.resetTo(offset, offset + length - 1);
+ if (this.javadocParser != null && this.javadocParser.checkDocComment) {
+ this.javadocParser.scanner.setSource(source);
+ this.javadocParser.scanner.resetTo(offset, offset + length - 1);
+ }
+
+ /* type declaration should be parsed as member type declaration */
+ this.nestedType = 1;
+
+ /* unit creation */
+ this.referenceContext = unit;
+ this.compilationUnit = unit;
+
+ /* run automaton */
+ try {
+ parse();
+ } catch (AbortCompilation ex) {
+ this.lastAct = ERROR_ACTION;
+ }
+
+ if (this.lastAct == ERROR_ACTION) {
+ return null;
+ }
+ int astLength;
+ if ((astLength = this.astLengthStack[this.astLengthPtr--]) != 0) {
+ ASTNode[] result = new ASTNode[astLength];
+ this.astPtr -= astLength;
+ System.arraycopy(this.astStack, this.astPtr + 1, result, 0, astLength);
+ return result;
+ }
+ return null;
+}
+public Expression parseExpression(char[] source, int offset, int length, CompilationUnitDeclaration unit) {
+
+ initialize();
+ goForExpression();
+ this.nestedMethod[this.nestedType]++;
+
+ this.referenceContext = unit;
+ this.compilationUnit = unit;
+
+ this.scanner.setSource(source);
+ this.scanner.resetTo(offset, offset + length - 1);
+ try {
+ parse();
+ } catch (AbortCompilation ex) {
+ this.lastAct = ERROR_ACTION;
+ } finally {
+ this.nestedMethod[this.nestedType]--;
+ }
+
+ if (this.lastAct == ERROR_ACTION) {
+ return null;
+ }
+
+ return this.expressionStack[this.expressionPtr];
+}
+public void persistLineSeparatorPositions() {
+ if (this.scanner.recordLineSeparator) {
+ this.compilationUnit.compilationResult.lineSeparatorPositions = this.scanner.getLineEnds();
+ }
+}
+/**
+ * Returns this parser's problem reporter initialized with its reference context.
+ * Also it is assumed that a problem is going to be reported, so initializes
+ * the compilation result's line positions.
+ *
+ * @return ProblemReporter
+ */
+public ProblemReporter problemReporter(){
+ if (this.scanner.recordLineSeparator) {
+ this.compilationUnit.compilationResult.lineSeparatorPositions = this.scanner.getLineEnds();
+ }
+ this.problemReporter.referenceContext = this.referenceContext;
+ return this.problemReporter;
+}
+protected void pushIdentifier() {
+ /*push the consumeToken on the identifier stack.
+ Increase the total number of identifier in the stack.
+ identifierPtr points on the next top */
+
+ int stackLength = this.identifierStack.length;
+ if (++this.identifierPtr >= stackLength) {
+ System.arraycopy(
+ this.identifierStack, 0,
+ this.identifierStack = new char[stackLength + 20][], 0,
+ stackLength);
+ System.arraycopy(
+ this.identifierPositionStack, 0,
+ this.identifierPositionStack = new long[stackLength + 20], 0,
+ stackLength);
+ }
+ this.identifierStack[this.identifierPtr] = this.scanner.getCurrentIdentifierSource();
+ this.identifierPositionStack[this.identifierPtr] =
+ (((long) this.scanner.startPosition) << 32) + (this.scanner.currentPosition - 1);
+
+ stackLength = this.identifierLengthStack.length;
+ if (++this.identifierLengthPtr >= stackLength) {
+ System.arraycopy(
+ this.identifierLengthStack, 0,
+ this.identifierLengthStack = new int[stackLength + 10], 0,
+ stackLength);
+ }
+ this.identifierLengthStack[this.identifierLengthPtr] = 1;
+}
+protected void pushIdentifier(int flag) {
+ /*push a special flag on the stack :
+ -zero stands for optional Name
+ -negative number for direct ref to base types.
+ identifierLengthPtr points on the top */
+
+ int stackLength = this.identifierLengthStack.length;
+ if (++this.identifierLengthPtr >= stackLength) {
+ System.arraycopy(
+ this.identifierLengthStack, 0,
+ this.identifierLengthStack = new int[stackLength + 10], 0,
+ stackLength);
+ }
+ this.identifierLengthStack[this.identifierLengthPtr] = flag;
+}
+protected void pushOnAstLengthStack(int pos) {
+
+ int stackLength = this.astLengthStack.length;
+ if (++this.astLengthPtr >= stackLength) {
+ System.arraycopy(
+ this.astLengthStack, 0,
+ this.astLengthStack = new int[stackLength + StackIncrement], 0,
+ stackLength);
+ }
+ this.astLengthStack[this.astLengthPtr] = pos;
+}
+protected void pushOnAstStack(ASTNode node) {
+ /*add a new obj on top of the ast stack
+ astPtr points on the top*/
+
+ int stackLength = this.astStack.length;
+ if (++this.astPtr >= stackLength) {
+ System.arraycopy(
+ this.astStack, 0,
+ this.astStack = new ASTNode[stackLength + AstStackIncrement], 0,
+ stackLength);
+ this.astPtr = stackLength;
+ }
+ this.astStack[this.astPtr] = node;
+
+ stackLength = this.astLengthStack.length;
+ if (++this.astLengthPtr >= stackLength) {
+ System.arraycopy(
+ this.astLengthStack, 0,
+ this.astLengthStack = new int[stackLength + AstStackIncrement], 0,
+ stackLength);
+ }
+ this.astLengthStack[this.astLengthPtr] = 1;
+}
+protected void pushOnExpressionStack(Expression expr) {
+
+ int stackLength = this.expressionStack.length;
+ if (++this.expressionPtr >= stackLength) {
+ System.arraycopy(
+ this.expressionStack, 0,
+ this.expressionStack = new Expression[stackLength + ExpressionStackIncrement], 0,
+ stackLength);
+ }
+ this.expressionStack[this.expressionPtr] = expr;
+
+ stackLength = this.expressionLengthStack.length;
+ if (++this.expressionLengthPtr >= stackLength) {
+ System.arraycopy(
+ this.expressionLengthStack, 0,
+ this.expressionLengthStack = new int[stackLength + ExpressionStackIncrement], 0,
+ stackLength);
+ }
+ this.expressionLengthStack[this.expressionLengthPtr] = 1;
+}
+protected void pushOnExpressionStackLengthStack(int pos) {
+
+ int stackLength = this.expressionLengthStack.length;
+ if (++this.expressionLengthPtr >= stackLength) {
+ System.arraycopy(
+ this.expressionLengthStack, 0,
+ this.expressionLengthStack = new int[stackLength + StackIncrement], 0,
+ stackLength);
+ }
+ this.expressionLengthStack[this.expressionLengthPtr] = pos;
+}
+protected void pushOnGenericsStack(ASTNode node) {
+ /*add a new obj on top of the generics stack
+ genericsPtr points on the top*/
+
+ int stackLength = this.genericsStack.length;
+ if (++this.genericsPtr >= stackLength) {
+ System.arraycopy(
+ this.genericsStack, 0,
+ this.genericsStack = new ASTNode[stackLength + GenericsStackIncrement], 0,
+ stackLength);
+ }
+ this.genericsStack[this.genericsPtr] = node;
+
+ stackLength = this.genericsLengthStack.length;
+ if (++this.genericsLengthPtr >= stackLength) {
+ System.arraycopy(
+ this.genericsLengthStack, 0,
+ this.genericsLengthStack = new int[stackLength + GenericsStackIncrement], 0,
+ stackLength);
+ }
+ this.genericsLengthStack[this.genericsLengthPtr] = 1;
+}
+protected void pushOnGenericsIdentifiersLengthStack(int pos) {
+ int stackLength = this.genericsIdentifiersLengthStack.length;
+ if (++this.genericsIdentifiersLengthPtr >= stackLength) {
+ System.arraycopy(
+ this.genericsIdentifiersLengthStack, 0,
+ this.genericsIdentifiersLengthStack = new int[stackLength + GenericsStackIncrement], 0,
+ stackLength);
+ }
+ this.genericsIdentifiersLengthStack[this.genericsIdentifiersLengthPtr] = pos;
+}
+protected void pushOnGenericsLengthStack(int pos) {
+ int stackLength = this.genericsLengthStack.length;
+ if (++this.genericsLengthPtr >= stackLength) {
+ System.arraycopy(
+ this.genericsLengthStack, 0,
+ this.genericsLengthStack = new int[stackLength + GenericsStackIncrement], 0,
+ stackLength);
+ }
+ this.genericsLengthStack[this.genericsLengthPtr] = pos;
+}
+protected void pushOnIntStack(int pos) {
+
+ int stackLength = this.intStack.length;
+ if (++this.intPtr >= stackLength) {
+ System.arraycopy(
+ this.intStack, 0,
+ this.intStack = new int[stackLength + StackIncrement], 0,
+ stackLength);
+ }
+ this.intStack[this.intPtr] = pos;
+}
+protected void pushOnRealBlockStack(int i){
+
+ int stackLength = this.realBlockStack.length;
+ if (++this.realBlockPtr >= stackLength) {
+ System.arraycopy(
+ this.realBlockStack, 0,
+ this.realBlockStack = new int[stackLength + StackIncrement], 0,
+ stackLength);
+ }
+ this.realBlockStack[this.realBlockPtr] = i;
+}
+public void recoveryExitFromVariable() {
+ if(this.currentElement != null && this.currentElement.parent != null) {
+ if(this.currentElement instanceof RecoveredLocalVariable) {
+
+ int end = ((RecoveredLocalVariable)this.currentElement).localDeclaration.sourceEnd;
+ this.currentElement.updateSourceEndIfNecessary(end);
+ this.currentElement = this.currentElement.parent;
+ } else if(this.currentElement instanceof RecoveredField
+ && !(this.currentElement instanceof RecoveredInitializer)) {
+
+ int end = ((RecoveredField)this.currentElement).fieldDeclaration.sourceEnd;
+ this.currentElement.updateSourceEndIfNecessary(end);
+ this.currentElement = this.currentElement.parent;
+ }
+ }
+}
+/* Token check performed on every token shift once having entered
+ * recovery mode.
+ */
+public void recoveryTokenCheck() {
+ switch (this.currentToken) {
+ case TokenNameLBRACE :
+ RecoveredElement newElement = null;
+ if(!this.ignoreNextOpeningBrace) {
+ newElement = this.currentElement.updateOnOpeningBrace(this.scanner.startPosition - 1, this.scanner.currentPosition - 1);
+ }
+ this.lastCheckPoint = this.scanner.currentPosition;
+ if (newElement != null){ // null means nothing happened
+ this.restartRecovery = true; // opening brace detected
+ this.currentElement = newElement;
+ }
+ break;
+
+ case TokenNameRBRACE :
+ this.rBraceStart = this.scanner.startPosition - 1;
+ this.rBraceEnd = this.scanner.currentPosition - 1;
+ this.endPosition = this.flushCommentsDefinedPriorTo(this.rBraceEnd);
+ newElement =
+ this.currentElement.updateOnClosingBrace(this.scanner.startPosition, this.rBraceEnd);
+ this.lastCheckPoint = this.scanner.currentPosition;
+ if (newElement != this.currentElement){
+ this.currentElement = newElement;
+ }
+ break;
+ case TokenNameSEMICOLON :
+ this.endStatementPosition = this.scanner.currentPosition - 1;
+ this.endPosition = this.scanner.startPosition - 1;
+ // fall through
+ default : {
+ if (this.rBraceEnd > this.rBraceSuccessorStart && this.scanner.currentPosition != this.scanner.startPosition){
+ this.rBraceSuccessorStart = this.scanner.startPosition;
+ }
+ break;
+ }
+ }
+ this.ignoreNextOpeningBrace = false;
+}
+// A P I
+protected void reportSyntaxErrors(boolean isDietParse, int oldFirstToken) {
+ if(this.referenceContext instanceof MethodDeclaration) {
+ MethodDeclaration methodDeclaration = (MethodDeclaration) this.referenceContext;
+ if(methodDeclaration.errorInSignature){
+ return;
+ }
+ }
+ this.compilationUnit.compilationResult.lineSeparatorPositions = this.scanner.getLineEnds();
+ this.scanner.recordLineSeparator = false;
+
+ int start = this.scanner.initialPosition;
+ int end = this.scanner.eofPosition <= Integer.MAX_VALUE ? this.scanner.eofPosition - 1 : this.scanner.eofPosition;
+ if(isDietParse) {
+ TypeDeclaration[] types = this.compilationUnit.types;
+
+ int[][] intervalToSkip = org.eclipse.wst.jsdt.internal.compiler.parser.diagnose.RangeUtil.computeDietRange(types);
+ DiagnoseParser diagnoseParser = new DiagnoseParser(this, oldFirstToken, start, end, intervalToSkip[0], intervalToSkip[1], intervalToSkip[2], this.options);
+ diagnoseParser.diagnoseParse();
+
+ reportSyntaxErrorsForSkippedMethod(types);
+ this.scanner.resetTo(start, end);
+ } else {
+ DiagnoseParser diagnoseParser = new DiagnoseParser(this, oldFirstToken, start, end, this.options);
+ diagnoseParser.diagnoseParse();
+ }
+}
+private void reportSyntaxErrorsForSkippedMethod(TypeDeclaration[] types){
+ if(types != null) {
+ for (int i = 0; i < types.length; i++) {
+ TypeDeclaration[] memberTypes = types[i].memberTypes;
+ if(memberTypes != null) {
+ reportSyntaxErrorsForSkippedMethod(memberTypes);
+ }
+
+ AbstractMethodDeclaration[] methods = types[i].methods;
+ if(methods != null) {
+ for (int j = 0; j < methods.length; j++) {
+ AbstractMethodDeclaration method = methods[j];
+ if(methods[j].errorInSignature) {
+ DiagnoseParser diagnoseParser = new DiagnoseParser(this, TokenNameDIVIDE, method.declarationSourceStart, method.declarationSourceEnd, this.options);
+ diagnoseParser.diagnoseParse();
+ }
+ }
+ }
+
+ FieldDeclaration[] fields = types[i].fields;
+ if (fields != null) {
+ int length = fields.length;
+ for (int j = 0; j < length; j++) {
+ if (fields[j] instanceof Initializer) {
+ Initializer initializer = (Initializer)fields[j];
+ if(initializer.errorInSignature){
+ DiagnoseParser diagnoseParser = new DiagnoseParser(this, TokenNameRIGHT_SHIFT, initializer.declarationSourceStart, initializer.declarationSourceEnd, this.options);
+ diagnoseParser.diagnoseParse();
+ }
+ }
+ }
+ }
+ }
+ }
+}
+protected void resetModifiers() {
+ this.modifiers = AccDefault;
+ this.modifiersSourceStart = -1; // <-- see comment into modifiersFlag(int)
+ this.scanner.commentPtr = -1;
+}
+/*
+ * Reset context so as to resume to regular parse loop
+ */
+protected void resetStacks() {
+
+ this.astPtr = -1;
+ this.astLengthPtr = -1;
+ this.expressionPtr = -1;
+ this.expressionLengthPtr = -1;
+ this.identifierPtr = -1;
+ this.identifierLengthPtr = -1;
+ this.intPtr = -1;
+ this.nestedMethod[this.nestedType = 0] = 0; // need to reset for further reuse
+ this.variablesCounter[this.nestedType] = 0;
+ this.dimensions = 0 ;
+ this.realBlockStack[this.realBlockPtr = 0] = 0;
+ this.recoveredStaticInitializerStart = 0;
+ this.listLength = 0;
+ this.listTypeParameterLength = 0;
+ // Fix for http://dev.eclipse.org/bugs/show_bug.cgi?id=29365
+ if (this.scanner != null) this.scanner.currentLine = null;
+
+ this.genericsIdentifiersLengthPtr = -1;
+ this.genericsLengthPtr = -1;
+ this.genericsPtr = -1;
+}
+/*
+ * Reset context so as to resume to regular parse loop
+ * If unable to reset for resuming, answers false.
+ *
+ * Move checkpoint location, reset internal stacks and
+ * decide which grammar goal is activated.
+ */
+protected boolean resumeAfterRecovery() {
+
+ // Reset javadoc before restart parsing after recovery
+ this.javadoc = null;
+
+ // reset internal stacks
+ this.resetStacks();
+
+ /* attempt to move checkpoint location */
+ if (!this.moveRecoveryCheckpoint()) {
+ return false;
+ }
+
+ // only look for headers
+ if (this.referenceContext instanceof CompilationUnitDeclaration){
+ goForHeaders();
+ this.diet = true; // passed this point, will not consider method bodies
+ return true;
+ }
+ // does not know how to restart
+ return false;
+}
+/*
+ * Syntax error was detected. Will attempt to perform some recovery action in order
+ * to resume to the regular parse loop.
+ */
+protected boolean resumeOnSyntaxError() {
+
+ /* request recovery initialization */
+ if (this.currentElement == null){
+ this.currentElement =
+ this.buildInitialRecoveryState(); // build some recovered elements
+ }
+ /* do not investigate deeper in recovery when no recovered element */
+ if (this.currentElement == null) return false;
+
+ /* manual forced recovery restart - after headers */
+ if (this.restartRecovery){
+ this.restartRecovery = false;
+ }
+ /* update recovery state with current error state of the parser */
+ this.updateRecoveryState();
+
+ /* attempt to reset state in order to resume to parse loop */
+ return this.resumeAfterRecovery();
+}
+public String toString() {
+
+ String s = "identifierStack : char["+(this.identifierPtr + 1)+"][] = {"; //$NON-NLS-1$ //$NON-NLS-2$
+ for (int i = 0; i <= this.identifierPtr; i++) {
+ s = s + "\"" + String.valueOf(this.identifierStack[i]) + "\","; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ s = s + "}\n"; //$NON-NLS-1$
+
+ s = s + "identifierLengthStack : int["+(this.identifierLengthPtr + 1)+"] = {"; //$NON-NLS-1$ //$NON-NLS-2$
+ for (int i = 0; i <= this.identifierLengthPtr; i++) {
+ s = s + this.identifierLengthStack[i] + ","; //$NON-NLS-1$
+ }
+ s = s + "}\n"; //$NON-NLS-1$
+
+ s = s + "astLengthStack : int["+(this.astLengthPtr + 1)+"] = {"; //$NON-NLS-1$ //$NON-NLS-2$
+ for (int i = 0; i <= this.astLengthPtr; i++) {
+ s = s + this.astLengthStack[i] + ","; //$NON-NLS-1$
+ }
+ s = s + "}\n"; //$NON-NLS-1$
+ s = s + "astPtr : int = " + String.valueOf(this.astPtr) + "\n"; //$NON-NLS-1$ //$NON-NLS-2$
+
+ s = s + "intStack : int["+(this.intPtr + 1)+"] = {"; //$NON-NLS-1$ //$NON-NLS-2$
+ for (int i = 0; i <= this.intPtr; i++) {
+ s = s + this.intStack[i] + ","; //$NON-NLS-1$
+ }
+ s = s + "}\n"; //$NON-NLS-1$
+
+ s = s + "expressionLengthStack : int["+(this.expressionLengthPtr + 1)+"] = {"; //$NON-NLS-1$ //$NON-NLS-2$
+ for (int i = 0; i <= this.expressionLengthPtr; i++) {
+ s = s + this.expressionLengthStack[i] + ","; //$NON-NLS-1$
+ }
+ s = s + "}\n"; //$NON-NLS-1$
+
+ s = s + "expressionPtr : int = " + String.valueOf(this.expressionPtr) + "\n"; //$NON-NLS-1$ //$NON-NLS-2$
+
+ s = s + "genericsIdentifiersLengthStack : int["+(this.genericsIdentifiersLengthPtr + 1)+"] = {"; //$NON-NLS-1$ //$NON-NLS-2$
+ for (int i = 0; i <= this.genericsIdentifiersLengthPtr; i++) {
+ s = s + this.genericsIdentifiersLengthStack[i] + ","; //$NON-NLS-1$
+ }
+ s = s + "}\n"; //$NON-NLS-1$
+
+ s = s + "genericsLengthStack : int["+(this.genericsLengthPtr + 1)+"] = {"; //$NON-NLS-1$ //$NON-NLS-2$
+ for (int i = 0; i <= this.genericsLengthPtr; i++) {
+ s = s + this.genericsLengthStack[i] + ","; //$NON-NLS-1$
+ }
+ s = s + "}\n"; //$NON-NLS-1$
+
+ s = s + "genericsPtr : int = " + String.valueOf(this.genericsPtr) + "\n"; //$NON-NLS-1$ //$NON-NLS-2$
+
+ s = s + "\n\n\n----------------Scanner--------------\n" + this.scanner.toString(); //$NON-NLS-1$
+ return s;
+
+}
+/*
+ * Update recovery state based on current parser/scanner state
+ */
+protected void updateRecoveryState() {
+
+ /* expose parser state to recovery state */
+ this.currentElement.updateFromParserState();
+
+ /* check and update recovered state based on current token,
+ this action is also performed when shifting token after recovery
+ got activated once.
+ */
+ this.recoveryTokenCheck();
+}
+protected void updateSourceDeclarationParts(int variableDeclaratorsCounter) {
+ //fields is a definition of fields that are grouped together like in
+ //public int[] a, b[], c
+ //which results into 3 fields.
+
+ FieldDeclaration field;
+ int endTypeDeclarationPosition =
+ -1 + this.astStack[this.astPtr - variableDeclaratorsCounter + 1].sourceStart;
+ for (int i = 0; i < variableDeclaratorsCounter - 1; i++) {
+ //last one is special(see below)
+ field = (FieldDeclaration) this.astStack[this.astPtr - i - 1];
+ field.endPart1Position = endTypeDeclarationPosition;
+ field.endPart2Position = -1 + this.astStack[this.astPtr - i].sourceStart;
+ }
+ //last one
+ (field = (FieldDeclaration) this.astStack[this.astPtr]).endPart1Position =
+ endTypeDeclarationPosition;
+ field.endPart2Position = field.declarationSourceEnd;
+
+}
+protected void updateSourcePosition(Expression exp) {
+ //update the source Position of the expression
+
+ //this.intStack : int int
+ //-->
+ //this.intStack :
+
+ exp.sourceEnd = this.intStack[this.intPtr--];
+ exp.sourceStart = this.intStack[this.intPtr--];
+}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/ParserBasicInformation.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/ParserBasicInformation.js
new file mode 100644
index 0000000..4402692
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/ParserBasicInformation.js
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.parser;
+
+/*An interface that contains static declarations for some basic information
+ about the parser such as the number of rules in the grammar, the starting state, etc...*/
+public interface ParserBasicInformation {
+
+ int ERROR_SYMBOL = 108,
+ MAX_NAME_LENGTH = 41,
+ NUM_STATES = 932,
+
+ NT_OFFSET = 108,
+ SCOPE_UBOUND = 125,
+ SCOPE_SIZE = 126,
+ LA_STATE_OFFSET = 11429,
+ MAX_LA = 1,
+ NUM_RULES = 670,
+ NUM_TERMINALS = 108,
+ NUM_NON_TERMINALS = 298,
+ NUM_SYMBOLS = 406,
+ START_STATE = 1999,
+ EOFT_SYMBOL = 68,
+ EOLT_SYMBOL = 68,
+ ACCEPT_ACTION = 11428,
+ ERROR_ACTION = 11429;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredBlock.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredBlock.js
new file mode 100644
index 0000000..9741192
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredBlock.js
@@ -0,0 +1,330 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.parser;
+
+/**
+ * Internal block structure for parsing recovery
+ */
+import org.eclipse.wst.jsdt.core.compiler.*;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Argument;
+import org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Block;
+import org.eclipse.wst.jsdt.internal.compiler.ast.FieldDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.LocalDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Statement;
+import org.eclipse.wst.jsdt.internal.compiler.ast.TypeDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BaseTypes;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.CompilerModifiers;
+
+public class RecoveredBlock extends RecoveredStatement implements CompilerModifiers, TerminalTokens, BaseTypes {
+
+ public Block blockDeclaration;
+ public RecoveredStatement[] statements;
+ public int statementCount;
+ public boolean preserveContent = false;
+ public RecoveredLocalVariable pendingArgument;
+
+public RecoveredBlock(Block block, RecoveredElement parent, int bracketBalance){
+ super(block, parent, bracketBalance);
+ this.blockDeclaration = block;
+ this.foundOpeningBrace = true;
+}
+/*
+ * Record a nested block declaration
+ */
+public RecoveredElement add(Block nestedBlockDeclaration, int bracketBalanceValue) {
+
+ /* do not consider a nested block starting passed the block end (if set)
+ it must be belonging to an enclosing block */
+ if (this.blockDeclaration.sourceEnd != 0
+ && nestedBlockDeclaration.sourceStart > this.blockDeclaration.sourceEnd){
+ return this.parent.add(nestedBlockDeclaration, bracketBalanceValue);
+ }
+
+ RecoveredBlock element = new RecoveredBlock(nestedBlockDeclaration, this, bracketBalanceValue);
+
+ // if we have a pending Argument, promote it into the new block
+ if (this.pendingArgument != null){
+ element.attach(this.pendingArgument);
+ this.pendingArgument = null;
+ }
+ this.attach(element);
+ if (nestedBlockDeclaration.sourceEnd == 0) return element;
+ return this;
+}
+/*
+ * Record a local declaration
+ */
+public RecoveredElement add(LocalDeclaration localDeclaration, int bracketBalanceValue) {
+ return this.add(localDeclaration, bracketBalanceValue, false);
+}
+/*
+ * Record a local declaration
+ */
+public RecoveredElement add(LocalDeclaration localDeclaration, int bracketBalanceValue, boolean delegatedByParent) {
+
+ /* local variables inside method can only be final and non void */
+/*
+ char[][] localTypeName;
+ if ((localDeclaration.modifiers & ~AccFinal) != 0 // local var can only be final
+ || (localDeclaration.type == null) // initializer
+ || ((localTypeName = localDeclaration.type.getTypeName()).length == 1 // non void
+ && CharOperation.equals(localTypeName[0], VoidBinding.sourceName()))){
+
+ if (delegatedByParent){
+ return this; //ignore
+ } else {
+ this.updateSourceEndIfNecessary(this.previousAvailableLineEnd(localDeclaration.declarationSourceStart - 1));
+ return this.parent.add(localDeclaration, bracketBalance);
+ }
+ }
+*/
+ /* do not consider a local variable starting passed the block end (if set)
+ it must be belonging to an enclosing block */
+ if (this.blockDeclaration.sourceEnd != 0
+ && localDeclaration.declarationSourceStart > this.blockDeclaration.sourceEnd){
+ if (delegatedByParent) return this; //ignore
+ return this.parent.add(localDeclaration, bracketBalanceValue);
+ }
+
+ RecoveredLocalVariable element = new RecoveredLocalVariable(localDeclaration, this, bracketBalanceValue);
+
+ if (localDeclaration instanceof Argument){
+ this.pendingArgument = element;
+ return this;
+ }
+
+ this.attach(element);
+ if (localDeclaration.declarationSourceEnd == 0) return element;
+ return this;
+}
+/*
+ * Record a statement declaration
+ */
+public RecoveredElement add(Statement stmt, int bracketBalanceValue) {
+ return this.add(stmt, bracketBalanceValue, false);
+}
+
+/*
+ * Record a statement declaration
+ */
+public RecoveredElement add(Statement stmt, int bracketBalanceValue, boolean delegatedByParent) {
+
+ /* do not consider a nested block starting passed the block end (if set)
+ it must be belonging to an enclosing block */
+ if (this.blockDeclaration.sourceEnd != 0
+ && stmt.sourceStart > this.blockDeclaration.sourceEnd){
+ if (delegatedByParent) return this; //ignore
+ return this.parent.add(stmt, bracketBalanceValue);
+ }
+
+ RecoveredStatement element = new RecoveredStatement(stmt, this, bracketBalanceValue);
+ this.attach(element);
+ if (stmt.sourceEnd == 0) return element;
+ return this;
+}
+/*
+ * Addition of a type to an initializer (act like inside method body)
+ */
+public RecoveredElement add(TypeDeclaration typeDeclaration, int bracketBalanceValue) {
+ return this.add(typeDeclaration, bracketBalanceValue, false);
+}
+/*
+ * Addition of a type to an initializer (act like inside method body)
+ */
+public RecoveredElement add(TypeDeclaration typeDeclaration, int bracketBalanceValue, boolean delegatedByParent) {
+
+ /* do not consider a type starting passed the block end (if set)
+ it must be belonging to an enclosing block */
+ if (this.blockDeclaration.sourceEnd != 0
+ && typeDeclaration.declarationSourceStart > this.blockDeclaration.sourceEnd){
+ if (delegatedByParent) return this; //ignore
+ return this.parent.add(typeDeclaration, bracketBalanceValue);
+ }
+
+ RecoveredStatement element = new RecoveredType(typeDeclaration, this, bracketBalanceValue);
+ this.attach(element);
+ if (typeDeclaration.declarationSourceEnd == 0) return element;
+ return this;
+}
+/*
+ * Attach a recovered statement
+ */
+void attach(RecoveredStatement recoveredStatement) {
+
+ if (this.statements == null) {
+ this.statements = new RecoveredStatement[5];
+ this.statementCount = 0;
+ } else {
+ if (this.statementCount == this.statements.length) {
+ System.arraycopy(
+ this.statements,
+ 0,
+ (this.statements = new RecoveredStatement[2 * this.statementCount]),
+ 0,
+ this.statementCount);
+ }
+ }
+ this.statements[this.statementCount++] = recoveredStatement;
+}
+/*
+ * Answer the associated parsed structure
+ */
+public ASTNode parseTree(){
+ return this.blockDeclaration;
+}
+public String toString(int tab) {
+ StringBuffer result = new StringBuffer(tabString(tab));
+ result.append("Recovered block:\n"); //$NON-NLS-1$
+ this.blockDeclaration.print(tab + 1, result);
+ if (this.statements != null) {
+ for (int i = 0; i < this.statementCount; i++) {
+ result.append("\n"); //$NON-NLS-1$
+ result.append(this.statements[i].toString(tab + 1));
+ }
+ }
+ return result.toString();
+}
+/*
+ * Rebuild a block from the nested structure which is in scope
+ */
+public Block updatedBlock(){
+
+ // if block was not marked to be preserved or empty, then ignore it
+ if (!this.preserveContent || this.statementCount == 0) return null;
+
+ Statement[] updatedStatements = new Statement[this.statementCount];
+ int updatedCount = 0;
+
+ // only collect the non-null updated statements
+ for (int i = 0; i < this.statementCount; i++){
+ Statement updatedStatement = this.statements[i].updatedStatement();
+ if (updatedStatement != null){
+ updatedStatements[updatedCount++] = updatedStatement;
+ }
+ }
+ if (updatedCount == 0) return null; // not interesting block
+
+ // resize statement collection if necessary
+ if (updatedCount != this.statementCount){
+ this.blockDeclaration.statements = new Statement[updatedCount];
+ System.arraycopy(updatedStatements, 0, this.blockDeclaration.statements, 0, updatedCount);
+ } else {
+ this.blockDeclaration.statements = updatedStatements;
+ }
+
+ return this.blockDeclaration;
+}
+/*
+ * Rebuild a statement from the nested structure which is in scope
+ */
+public Statement updatedStatement(){
+
+ return this.updatedBlock();
+}
+/*
+ * A closing brace got consumed, might have closed the current element,
+ * in which case both the currentElement is exited
+ */
+public RecoveredElement updateOnClosingBrace(int braceStart, int braceEnd){
+ if ((--this.bracketBalance <= 0) && (this.parent != null)){
+ this.updateSourceEndIfNecessary(braceStart, braceEnd);
+
+ /* if the block is the method body, then it closes the method too */
+ RecoveredMethod method = enclosingMethod();
+ if (method != null && method.methodBody == this){
+ return this.parent.updateOnClosingBrace(braceStart, braceEnd);
+ }
+ RecoveredInitializer initializer = enclosingInitializer();
+ if (initializer != null && initializer.initializerBody == this){
+ return this.parent.updateOnClosingBrace(braceStart, braceEnd);
+ }
+ return this.parent;
+ }
+ return this;
+}
+/*
+ * An opening brace got consumed, might be the expected opening one of the current element,
+ * in which case the bodyStart is updated.
+ */
+public RecoveredElement updateOnOpeningBrace(int braceStart, int braceEnd){
+
+ // create a nested block
+ Block block = new Block(0);
+ block.sourceStart = parser().scanner.startPosition;
+ return this.add(block, 1);
+}
+/*
+ * Final update the corresponding parse node
+ */
+public void updateParseTree(){
+
+ this.updatedBlock();
+}
+/*
+ * Rebuild a flattened block from the nested structure which is in scope
+ */
+public Statement updateStatement(){
+
+ // if block was closed or empty, then ignore it
+ if (this.blockDeclaration.sourceEnd != 0 || this.statementCount == 0) return null;
+
+ Statement[] updatedStatements = new Statement[this.statementCount];
+ int updatedCount = 0;
+
+ // only collect the non-null updated statements
+ for (int i = 0; i < this.statementCount; i++){
+ Statement updatedStatement = this.statements[i].updatedStatement();
+ if (updatedStatement != null){
+ updatedStatements[updatedCount++] = updatedStatement;
+ }
+ }
+ if (updatedCount == 0) return null; // not interesting block
+
+ // resize statement collection if necessary
+ if (updatedCount != this.statementCount){
+ this.blockDeclaration.statements = new Statement[updatedCount];
+ System.arraycopy(updatedStatements, 0, this.blockDeclaration.statements, 0, updatedCount);
+ } else {
+ this.blockDeclaration.statements = updatedStatements;
+ }
+
+ return this.blockDeclaration;
+}
+
+/*
+ * Record a field declaration
+ */
+public RecoveredElement add(FieldDeclaration fieldDeclaration, int bracketBalanceValue) {
+
+ /* local variables inside method can only be final and non void */
+ char[][] fieldTypeName;
+ if ((fieldDeclaration.modifiers & ~AccFinal) != 0 // local var can only be final
+ || (fieldDeclaration.type == null) // initializer
+ || ((fieldTypeName = fieldDeclaration.type.getTypeName()).length == 1 // non void
+ && CharOperation.equals(fieldTypeName[0], VoidBinding.sourceName()))){
+ this.updateSourceEndIfNecessary(this.previousAvailableLineEnd(fieldDeclaration.declarationSourceStart - 1));
+ return this.parent.add(fieldDeclaration, bracketBalanceValue);
+ }
+
+ /* do not consider a local variable starting passed the block end (if set)
+ it must be belonging to an enclosing block */
+ if (this.blockDeclaration.sourceEnd != 0
+ && fieldDeclaration.declarationSourceStart > this.blockDeclaration.sourceEnd){
+ return this.parent.add(fieldDeclaration, bracketBalanceValue);
+ }
+
+ // ignore the added field, since indicates a local variable behind recovery point
+ // which thus got parsed as a field reference. This can happen if restarting after
+ // having reduced an assistNode to get the following context (see 1GEK7SG)
+ return this;
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredElement.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredElement.js
new file mode 100644
index 0000000..f591eb1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredElement.js
@@ -0,0 +1,308 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.parser;
+
+/**
+ * Internal structure for parsing recovery
+ */
+import org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Block;
+import org.eclipse.wst.jsdt.internal.compiler.ast.FieldDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.ImportReference;
+import org.eclipse.wst.jsdt.internal.compiler.ast.LocalDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Statement;
+import org.eclipse.wst.jsdt.internal.compiler.ast.TypeDeclaration;
+
+public class RecoveredElement {
+
+ public RecoveredElement parent;
+ public int bracketBalance;
+ public boolean foundOpeningBrace;
+ protected Parser recoveringParser;
+public RecoveredElement(RecoveredElement parent, int bracketBalance){
+ this(parent, bracketBalance, null);
+}
+public RecoveredElement(RecoveredElement parent, int bracketBalance, Parser parser){
+ this.parent = parent;
+ this.bracketBalance = bracketBalance;
+ this.recoveringParser = parser;
+}
+/*
+ * Record a method declaration
+ */
+public RecoveredElement add(AbstractMethodDeclaration methodDeclaration, int bracketBalanceValue) {
+
+ /* default behavior is to delegate recording to parent if any */
+ if (this.parent == null) return this; // ignore
+ this.updateSourceEndIfNecessary(this.previousAvailableLineEnd(methodDeclaration.declarationSourceStart - 1));
+ return this.parent.add(methodDeclaration, bracketBalanceValue);
+}
+/*
+ * Record a nested block declaration
+ */
+public RecoveredElement add(Block nestedBlockDeclaration, int bracketBalanceValue) {
+
+ /* default behavior is to delegate recording to parent if any */
+ if (this.parent == null) return this; // ignore
+ this.updateSourceEndIfNecessary(this.previousAvailableLineEnd(nestedBlockDeclaration.sourceStart - 1));
+ return this.parent.add(nestedBlockDeclaration, bracketBalanceValue);
+}
+/*
+ * Record a field declaration
+ */
+public RecoveredElement add(FieldDeclaration fieldDeclaration, int bracketBalanceValue) {
+
+ /* default behavior is to delegate recording to parent if any */
+ if (this.parent == null) return this; // ignore
+ this.updateSourceEndIfNecessary(this.previousAvailableLineEnd(fieldDeclaration.declarationSourceStart - 1));
+ return this.parent.add(fieldDeclaration, bracketBalanceValue);
+}
+/*
+ * Record an import reference
+ */
+public RecoveredElement add(ImportReference importReference, int bracketBalanceValue){
+
+ /* default behavior is to delegate recording to parent if any */
+ if (this.parent == null) return this; // ignore
+ this.updateSourceEndIfNecessary(this.previousAvailableLineEnd(importReference.declarationSourceStart - 1));
+ return this.parent.add(importReference, bracketBalanceValue);
+}
+/*
+ * Record a local declaration
+ */
+public RecoveredElement add(LocalDeclaration localDeclaration, int bracketBalanceValue) {
+
+ /* default behavior is to delegate recording to parent if any */
+ if (this.parent == null) return this; // ignore
+ this.updateSourceEndIfNecessary(this.previousAvailableLineEnd(localDeclaration.declarationSourceStart - 1));
+ return this.parent.add(localDeclaration, bracketBalanceValue);
+}
+/*
+ * Record a statement
+ */
+public RecoveredElement add(Statement statement, int bracketBalanceValue) {
+
+ /* default behavior is to delegate recording to parent if any */
+ if (this.parent == null) return this; // ignore
+ this.updateSourceEndIfNecessary(this.previousAvailableLineEnd(statement.sourceStart - 1));
+ return this.parent.add(statement, bracketBalanceValue);
+}
+/*
+ * Record a type declaration
+ */
+public RecoveredElement add(TypeDeclaration typeDeclaration, int bracketBalanceValue){
+
+ /* default behavior is to delegate recording to parent if any */
+ if (this.parent == null) return this; // ignore
+ this.updateSourceEndIfNecessary(this.previousAvailableLineEnd(typeDeclaration.declarationSourceStart - 1));
+ return this.parent.add(typeDeclaration, bracketBalanceValue);
+}
+/*
+ * Answer the depth of this element, considering the parent link.
+ */
+public int depth(){
+ int depth = 0;
+ RecoveredElement current = this;
+ while ((current = current.parent) != null) depth++;
+ return depth;
+}
+/*
+ * Answer the enclosing method node, or null if none
+ */
+public RecoveredInitializer enclosingInitializer(){
+ RecoveredElement current = this;
+ while (current != null){
+ if (current instanceof RecoveredInitializer){
+ return (RecoveredInitializer) current;
+ }
+ current = current.parent;
+ }
+ return null;
+}
+/*
+ * Answer the enclosing method node, or null if none
+ */
+public RecoveredMethod enclosingMethod(){
+ RecoveredElement current = this;
+ while (current != null){
+ if (current instanceof RecoveredMethod){
+ return (RecoveredMethod) current;
+ }
+ current = current.parent;
+ }
+ return null;
+}
+/*
+ * Answer the enclosing type node, or null if none
+ */
+public RecoveredType enclosingType(){
+ RecoveredElement current = this;
+ while (current != null){
+ if (current instanceof RecoveredType){
+ return (RecoveredType) current;
+ }
+ current = current.parent;
+ }
+ return null;
+}
+/*
+ * Answer the closest specified parser
+ */
+public Parser parser(){
+ RecoveredElement current = this;
+ while (current != null){
+ if (current.recoveringParser != null){
+ return current.recoveringParser;
+ }
+ current = current.parent;
+ }
+ return null;
+}
+/*
+ * Answer the associated parsed structure
+ */
+public ASTNode parseTree(){
+ return null;
+}
+/*
+ * Iterate the enclosing blocks and tag them so as to preserve their content
+ */
+public void preserveEnclosingBlocks(){
+ RecoveredElement current = this;
+ while (current != null){
+ if (current instanceof RecoveredBlock){
+ ((RecoveredBlock)current).preserveContent = true;
+ }
+ if (current instanceof RecoveredType){ // for anonymous types
+ ((RecoveredType)current).preserveContent = true;
+ }
+ current = current.parent;
+ }
+}
+/*
+ * Answer the position of the previous line end if
+ * there is nothing but spaces in between it and the
+ * line end. Used to trim spaces on unclosed elements.
+ */
+public int previousAvailableLineEnd(int position){
+
+ Parser parser = this.parser();
+ if (parser == null) return position;
+
+ Scanner scanner = parser.scanner;
+ if (scanner.lineEnds == null) return position;
+
+ int index = scanner.getLineNumber(position);
+ if (index < 2) return position;
+ int previousLineEnd = scanner.lineEnds[index-2];
+
+ char[] source = scanner.source;
+ for (int i = previousLineEnd+1; i < position; i++){
+ if (!(source[i] == ' ' || source[i] == '\t')) return position;
+ }
+ return previousLineEnd;
+}
+/*
+ * Answer the very source end of the corresponding parse node
+ */
+public int sourceEnd(){
+ return 0;
+}
+protected String tabString(int tab) {
+ StringBuffer result = new StringBuffer();
+ for (int i = tab; i > 0; i--) {
+ result.append(" "); //$NON-NLS-1$
+ }
+ return result.toString();
+}
+/*
+ * Answer the top node
+ */
+public RecoveredElement topElement(){
+ RecoveredElement current = this;
+ while (current.parent != null){
+ current = current.parent;
+ }
+ return current;
+}
+public String toString() {
+ return toString(0);
+}
+public String toString(int tab) {
+ return super.toString();
+}
+/*
+ * Answer the enclosing type node, or null if none
+ */
+public RecoveredType type(){
+ RecoveredElement current = this;
+ while (current != null){
+ if (current instanceof RecoveredType){
+ return (RecoveredType) current;
+ }
+ current = current.parent;
+ }
+ return null;
+}
+/*
+ * Update the bodyStart of the corresponding parse node
+ */
+public void updateBodyStart(int bodyStart){
+ this.foundOpeningBrace = true;
+}
+/*
+ * Update the corresponding parse node from parser state which
+ * is about to disappear because of restarting recovery
+ */
+public void updateFromParserState(){
+ // default implementation: do nothing
+}
+/*
+ * A closing brace got consumed, might have closed the current element,
+ * in which case both the currentElement is exited
+ */
+public RecoveredElement updateOnClosingBrace(int braceStart, int braceEnd){
+ if ((--this.bracketBalance <= 0) && (this.parent != null)){
+ this.updateSourceEndIfNecessary(braceStart, braceEnd);
+ return this.parent;
+ }
+ return this;
+}
+/*
+ * An opening brace got consumed, might be the expected opening one of the current element,
+ * in which case the bodyStart is updated.
+ */
+/*public RecoveredElement updateOnOpeningBrace(int braceEnd){return null;}*/
+public RecoveredElement updateOnOpeningBrace(int braceStart, int braceEnd){
+
+ if (this.bracketBalance++ == 0){
+ this.updateBodyStart(braceEnd + 1);
+ return this;
+ }
+ return null; // no update is necessary
+}
+/*
+ * Final update the corresponding parse node
+ */
+public void updateParseTree(){
+ // default implementation: do nothing
+}
+/*
+ * Update the declarationSourceEnd of the corresponding parse node
+ */
+public void updateSourceEndIfNecessary(int braceStart, int braceEnd){
+ // default implementation: do nothing
+}
+public void updateSourceEndIfNecessary(int sourceEnd){
+ this.updateSourceEndIfNecessary(sourceEnd + 1, sourceEnd);
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredField.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredField.js
new file mode 100644
index 0000000..9b4c31e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredField.js
@@ -0,0 +1,169 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.parser;
+
+/**
+ * Internal field structure for parsing recovery
+ */
+import org.eclipse.wst.jsdt.internal.compiler.ast.ArrayTypeReference;
+import org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Expression;
+import org.eclipse.wst.jsdt.internal.compiler.ast.FieldDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Statement;
+import org.eclipse.wst.jsdt.internal.compiler.ast.TypeDeclaration;
+
+public class RecoveredField extends RecoveredElement {
+
+ public FieldDeclaration fieldDeclaration;
+ boolean alreadyCompletedFieldInitialization;
+
+ public RecoveredType[] anonymousTypes;
+ public int anonymousTypeCount;
+public RecoveredField(FieldDeclaration fieldDeclaration, RecoveredElement parent, int bracketBalance){
+ this(fieldDeclaration, parent, bracketBalance, null);
+}
+public RecoveredField(FieldDeclaration fieldDeclaration, RecoveredElement parent, int bracketBalance, Parser parser){
+ super(parent, bracketBalance, parser);
+ this.fieldDeclaration = fieldDeclaration;
+ this.alreadyCompletedFieldInitialization = fieldDeclaration.initialization != null;
+}
+/*
+ * Record an expression statement if field is expecting an initialization expression,
+ * used for completion inside field initializers.
+ */
+public RecoveredElement add(Statement statement, int bracketBalanceValue) {
+
+ if (this.alreadyCompletedFieldInitialization || !(statement instanceof Expression)) {
+ return super.add(statement, bracketBalanceValue);
+ } else {
+ this.alreadyCompletedFieldInitialization = true;
+ this.fieldDeclaration.initialization = (Expression)statement;
+ this.fieldDeclaration.declarationSourceEnd = statement.sourceEnd;
+ this.fieldDeclaration.declarationEnd = statement.sourceEnd;
+ return this;
+ }
+}
+/*
+ * Record a type declaration if this field is expecting an initialization expression
+ * and the type is an anonymous type.
+ * Used for completion inside field initializers.
+ */
+public RecoveredElement add(TypeDeclaration typeDeclaration, int bracketBalanceValue) {
+
+ if (this.alreadyCompletedFieldInitialization
+ || ((typeDeclaration.bits & ASTNode.IsAnonymousTypeMASK) == 0)
+ || (this.fieldDeclaration.declarationSourceEnd != 0 && typeDeclaration.sourceStart > this.fieldDeclaration.declarationSourceEnd)) {
+ return super.add(typeDeclaration, bracketBalanceValue);
+ } else {
+ // Prepare anonymous type list
+ if (this.anonymousTypes == null) {
+ this.anonymousTypes = new RecoveredType[5];
+ this.anonymousTypeCount = 0;
+ } else {
+ if (this.anonymousTypeCount == this.anonymousTypes.length) {
+ System.arraycopy(
+ this.anonymousTypes,
+ 0,
+ (this.anonymousTypes = new RecoveredType[2 * this.anonymousTypeCount]),
+ 0,
+ this.anonymousTypeCount);
+ }
+ }
+ // Store type declaration as an anonymous type
+ RecoveredType element = new RecoveredType(typeDeclaration, this, bracketBalanceValue);
+ this.anonymousTypes[this.anonymousTypeCount++] = element;
+ return element;
+ }
+}
+/*
+ * Answer the associated parsed structure
+ */
+public ASTNode parseTree(){
+ return fieldDeclaration;
+}
+/*
+ * Answer the very source end of the corresponding parse node
+ */
+public int sourceEnd(){
+ return this.fieldDeclaration.declarationSourceEnd;
+}
+public String toString(int tab){
+ StringBuffer buffer = new StringBuffer(tabString(tab));
+ buffer.append("Recovered field:\n"); //$NON-NLS-1$
+ fieldDeclaration.print(tab + 1, buffer);
+ if (this.anonymousTypes != null) {
+ for (int i = 0; i < this.anonymousTypeCount; i++){
+ buffer.append("\n"); //$NON-NLS-1$
+ buffer.append(anonymousTypes[i].toString(tab + 1));
+ }
+ }
+ return buffer.toString();
+}
+public FieldDeclaration updatedFieldDeclaration(){
+
+ if (this.anonymousTypes != null && fieldDeclaration.initialization == null) {
+ for (int i = 0; i < this.anonymousTypeCount; i++){
+ if (anonymousTypes[i].preserveContent){
+ fieldDeclaration.initialization = this.anonymousTypes[i].updatedTypeDeclaration().allocation;
+ }
+ }
+ if (this.anonymousTypeCount > 0) fieldDeclaration.bits |= ASTNode.HasLocalTypeMASK;
+ }
+ return fieldDeclaration;
+}
+/*
+ * A closing brace got consumed, might have closed the current element,
+ * in which case both the currentElement is exited.
+ *
+ * Fields have no associated braces, thus if matches, then update parent.
+ */
+public RecoveredElement updateOnClosingBrace(int braceStart, int braceEnd){
+ if (bracketBalance > 0){ // was an array initializer
+ bracketBalance--;
+ if (bracketBalance == 0) alreadyCompletedFieldInitialization = true;
+ return this;
+ } else if (bracketBalance == 0) {
+ alreadyCompletedFieldInitialization = true;
+ updateSourceEndIfNecessary(braceEnd - 1);
+ }
+ if (parent != null){
+ return parent.updateOnClosingBrace(braceStart, braceEnd);
+ }
+ return this;
+}
+/*
+ * An opening brace got consumed, might be the expected opening one of the current element,
+ * in which case the bodyStart is updated.
+ */
+public RecoveredElement updateOnOpeningBrace(int braceStart, int braceEnd){
+ if (fieldDeclaration.declarationSourceEnd == 0
+ && fieldDeclaration.type instanceof ArrayTypeReference
+ && !alreadyCompletedFieldInitialization){
+ bracketBalance++;
+ return null; // no update is necessary (array initializer)
+ }
+ // might be an array initializer
+ this.updateSourceEndIfNecessary(braceStart - 1, braceEnd - 1);
+ return this.parent.updateOnOpeningBrace(braceStart, braceEnd);
+}
+public void updateParseTree(){
+ this.updatedFieldDeclaration();
+}
+/*
+ * Update the declarationSourceEnd of the corresponding parse node
+ */
+public void updateSourceEndIfNecessary(int bodyStart, int bodyEnd){
+ if (this.fieldDeclaration.declarationSourceEnd == 0) {
+ this.fieldDeclaration.declarationSourceEnd = bodyEnd;
+ this.fieldDeclaration.declarationEnd = bodyEnd;
+ }
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredImport.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredImport.js
new file mode 100644
index 0000000..7a3798c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredImport.js
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.parser;
+
+/**
+ * Internal import structure for parsing recovery
+ */
+import org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode;
+import org.eclipse.wst.jsdt.internal.compiler.ast.ImportReference;
+
+public class RecoveredImport extends RecoveredElement {
+
+ public ImportReference importReference;
+public RecoveredImport(ImportReference importReference, RecoveredElement parent, int bracketBalance){
+ super(parent, bracketBalance);
+ this.importReference = importReference;
+}
+/*
+ * Answer the associated parsed structure
+ */
+public ASTNode parseTree(){
+ return importReference;
+}
+/*
+ * Answer the very source end of the corresponding parse node
+ */
+public int sourceEnd(){
+ return this.importReference.declarationSourceEnd;
+}
+public String toString(int tab) {
+ return tabString(tab) + "Recovered import: " + importReference.toString(); //$NON-NLS-1$
+}
+public ImportReference updatedImportReference(){
+
+ return importReference;
+}
+public void updateParseTree(){
+ this.updatedImportReference();
+}
+/*
+ * Update the declarationSourceEnd of the corresponding parse node
+ */
+public void updateSourceEndIfNecessary(int bodyStart, int bodyEnd){
+ if (this.importReference.declarationSourceEnd == 0) {
+ this.importReference.declarationSourceEnd = bodyEnd;
+ this.importReference.declarationEnd = bodyEnd;
+ }
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredInitializer.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredInitializer.js
new file mode 100644
index 0000000..af39dfb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredInitializer.js
@@ -0,0 +1,237 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.parser;
+
+/**
+ * Internal initializer structure for parsing recovery
+ */
+import org.eclipse.wst.jsdt.core.compiler.*;
+import org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Block;
+import org.eclipse.wst.jsdt.internal.compiler.ast.FieldDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Initializer;
+import org.eclipse.wst.jsdt.internal.compiler.ast.LocalDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Statement;
+import org.eclipse.wst.jsdt.internal.compiler.ast.TypeDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BaseTypes;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.CompilerModifiers;
+
+public class RecoveredInitializer extends RecoveredField implements CompilerModifiers, TerminalTokens, BaseTypes {
+
+ public RecoveredType[] localTypes;
+ public int localTypeCount;
+
+ public RecoveredBlock initializerBody;
+
+public RecoveredInitializer(FieldDeclaration fieldDeclaration, RecoveredElement parent, int bracketBalance){
+ this(fieldDeclaration, parent, bracketBalance, null);
+}
+public RecoveredInitializer(FieldDeclaration fieldDeclaration, RecoveredElement parent, int bracketBalance, Parser parser){
+ super(fieldDeclaration, parent, bracketBalance, parser);
+ this.foundOpeningBrace = true;
+}
+/*
+ * Record a nested block declaration
+ */
+public RecoveredElement add(Block nestedBlockDeclaration, int bracketBalanceValue) {
+
+ /* default behavior is to delegate recording to parent if any,
+ do not consider elements passed the known end (if set)
+ it must be belonging to an enclosing element
+ */
+ if (fieldDeclaration.declarationSourceEnd > 0
+ && nestedBlockDeclaration.sourceStart > fieldDeclaration.declarationSourceEnd){
+ if (this.parent == null) return this; // ignore
+ return this.parent.add(nestedBlockDeclaration, bracketBalanceValue);
+ }
+ /* consider that if the opening brace was not found, it is there */
+ if (!foundOpeningBrace){
+ foundOpeningBrace = true;
+ this.bracketBalance++;
+ }
+ initializerBody = new RecoveredBlock(nestedBlockDeclaration, this, bracketBalanceValue);
+ if (nestedBlockDeclaration.sourceEnd == 0) return initializerBody;
+ return this;
+}
+/*
+ * Record a field declaration (act like inside method body)
+ */
+public RecoveredElement add(FieldDeclaration newFieldDeclaration, int bracketBalanceValue) {
+
+ /* local variables inside initializer can only be final and non void */
+ char[][] fieldTypeName;
+ if ((newFieldDeclaration.modifiers & ~AccFinal) != 0 /* local var can only be final */
+ || (newFieldDeclaration.type == null) // initializer
+ || ((fieldTypeName = newFieldDeclaration.type.getTypeName()).length == 1 // non void
+ && CharOperation.equals(fieldTypeName[0], VoidBinding.sourceName()))){
+ if (this.parent == null) return this; // ignore
+ this.updateSourceEndIfNecessary(this.previousAvailableLineEnd(newFieldDeclaration.declarationSourceStart - 1));
+ return this.parent.add(newFieldDeclaration, bracketBalanceValue);
+ }
+
+ /* default behavior is to delegate recording to parent if any,
+ do not consider elements passed the known end (if set)
+ it must be belonging to an enclosing element
+ */
+ if (this.fieldDeclaration.declarationSourceEnd > 0
+ && newFieldDeclaration.declarationSourceStart > this.fieldDeclaration.declarationSourceEnd){
+ if (this.parent == null) return this; // ignore
+ return this.parent.add(newFieldDeclaration, bracketBalanceValue);
+ }
+ // still inside initializer, treat as local variable
+ return this; // ignore
+}
+/*
+ * Record a local declaration - regular method should have been created a block body
+ */
+public RecoveredElement add(LocalDeclaration localDeclaration, int bracketBalanceValue) {
+
+ /* do not consider a type starting passed the type end (if set)
+ it must be belonging to an enclosing type */
+ if (fieldDeclaration.declarationSourceEnd != 0
+ && localDeclaration.declarationSourceStart > fieldDeclaration.declarationSourceEnd){
+ if (parent == null) return this; // ignore
+ return this.parent.add(localDeclaration, bracketBalanceValue);
+ }
+ /* method body should have been created */
+ Block block = new Block(0);
+ block.sourceStart = ((Initializer)fieldDeclaration).sourceStart;
+ RecoveredElement element = this.add(block, 1);
+ return element.add(localDeclaration, bracketBalanceValue);
+}
+/*
+ * Record a statement - regular method should have been created a block body
+ */
+public RecoveredElement add(Statement statement, int bracketBalanceValue) {
+
+ /* do not consider a statement starting passed the initializer end (if set)
+ it must be belonging to an enclosing type */
+ if (fieldDeclaration.declarationSourceEnd != 0
+ && statement.sourceStart > fieldDeclaration.declarationSourceEnd){
+ if (parent == null) return this; // ignore
+ return this.parent.add(statement, bracketBalanceValue);
+ }
+ /* initializer body should have been created */
+ Block block = new Block(0);
+ block.sourceStart = ((Initializer)fieldDeclaration).sourceStart;
+ RecoveredElement element = this.add(block, 1);
+ return element.add(statement, bracketBalanceValue);
+}
+public RecoveredElement add(TypeDeclaration typeDeclaration, int bracketBalanceValue) {
+
+ /* do not consider a type starting passed the type end (if set)
+ it must be belonging to an enclosing type */
+ if (fieldDeclaration.declarationSourceEnd != 0
+ && typeDeclaration.declarationSourceStart > fieldDeclaration.declarationSourceEnd){
+ if (parent == null) return this; // ignore
+ return this.parent.add(typeDeclaration, bracketBalanceValue);
+ }
+ if ((typeDeclaration.bits & ASTNode.IsLocalTypeMASK) != 0){
+ /* method body should have been created */
+ Block block = new Block(0);
+ block.sourceStart = ((Initializer)fieldDeclaration).sourceStart;
+ RecoveredElement element = this.add(block, 1);
+ return element.add(typeDeclaration, bracketBalanceValue);
+ }
+ if (localTypes == null) {
+ localTypes = new RecoveredType[5];
+ localTypeCount = 0;
+ } else {
+ if (localTypeCount == localTypes.length) {
+ System.arraycopy(
+ localTypes,
+ 0,
+ (localTypes = new RecoveredType[2 * localTypeCount]),
+ 0,
+ localTypeCount);
+ }
+ }
+ RecoveredType element = new RecoveredType(typeDeclaration, this, bracketBalanceValue);
+ localTypes[localTypeCount++] = element;
+
+ /* consider that if the opening brace was not found, it is there */
+ if (!foundOpeningBrace){
+ foundOpeningBrace = true;
+ this.bracketBalance++;
+ }
+ return element;
+}
+public String toString(int tab) {
+ StringBuffer result = new StringBuffer(tabString(tab));
+ result.append("Recovered initializer:\n"); //$NON-NLS-1$
+ this.fieldDeclaration.print(tab + 1, result);
+ if (this.initializerBody != null) {
+ result.append("\n"); //$NON-NLS-1$
+ result.append(this.initializerBody.toString(tab + 1));
+ }
+ return result.toString();
+}
+public FieldDeclaration updatedFieldDeclaration(){
+
+ if (initializerBody != null){
+ Block block = initializerBody.updatedBlock();
+ if (block != null){
+ ((Initializer)fieldDeclaration).block = block;
+ }
+ if (this.localTypeCount > 0) fieldDeclaration.bits |= ASTNode.HasLocalTypeMASK;
+
+ }
+ if (fieldDeclaration.sourceEnd == 0){
+ fieldDeclaration.sourceEnd = fieldDeclaration.declarationSourceEnd;
+ }
+ return fieldDeclaration;
+}
+/*
+ * A closing brace got consumed, might have closed the current element,
+ * in which case both the currentElement is exited
+ */
+public RecoveredElement updateOnClosingBrace(int braceStart, int braceEnd){
+ if ((--bracketBalance <= 0) && (parent != null)){
+ this.updateSourceEndIfNecessary(braceStart, braceEnd);
+ return parent;
+ }
+ return this;
+}
+/*
+ * An opening brace got consumed, might be the expected opening one of the current element,
+ * in which case the bodyStart is updated.
+ */
+public RecoveredElement updateOnOpeningBrace(int braceStart, int braceEnd){
+ bracketBalance++;
+ return this; // request to restart
+}
+/*
+ * Update the declarationSourceEnd of the corresponding parse node
+ */
+public void updateSourceEndIfNecessary(int braceStart, int braceEnd){
+ if (this.fieldDeclaration.declarationSourceEnd == 0) {
+ Initializer initializer = (Initializer)fieldDeclaration;
+ if(parser().rBraceSuccessorStart >= braceEnd) {
+ if (initializer.bodyStart < parser().rBraceEnd) {
+ initializer.declarationSourceEnd = parser().rBraceEnd;
+ } else {
+ initializer.declarationSourceEnd = initializer.bodyStart;
+ }
+ if (initializer.bodyStart < parser().rBraceStart) {
+ initializer.bodyEnd = parser().rBraceStart;
+ } else {
+ initializer.bodyEnd = initializer.bodyStart;
+ }
+ } else {
+ initializer.declarationSourceEnd = braceEnd;
+ initializer.bodyEnd = braceStart - 1;
+ }
+ if(initializer.block != null) {
+ initializer.block.sourceEnd = initializer.declarationSourceEnd;
+ }
+ }
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredLocalVariable.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredLocalVariable.js
new file mode 100644
index 0000000..224ffd0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredLocalVariable.js
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.parser;
+
+/**
+ * Internal local variable structure for parsing recovery
+ */
+import org.eclipse.wst.jsdt.internal.compiler.ast.ArrayTypeReference;
+import org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Expression;
+import org.eclipse.wst.jsdt.internal.compiler.ast.LocalDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Statement;
+
+public class RecoveredLocalVariable extends RecoveredStatement {
+
+ public LocalDeclaration localDeclaration;
+ boolean alreadyCompletedLocalInitialization;
+public RecoveredLocalVariable(LocalDeclaration localDeclaration, RecoveredElement parent, int bracketBalance){
+ super(localDeclaration, parent, bracketBalance);
+ this.localDeclaration = localDeclaration;
+ this.alreadyCompletedLocalInitialization = localDeclaration.initialization != null;
+}
+/*
+ * Record an expression statement if local variable is expecting an initialization expression.
+ */
+public RecoveredElement add(Statement stmt, int bracketBalanceValue) {
+
+ if (this.alreadyCompletedLocalInitialization || !(stmt instanceof Expression)) {
+ return super.add(stmt, bracketBalanceValue);
+ } else {
+ this.alreadyCompletedLocalInitialization = true;
+ this.localDeclaration.initialization = (Expression)stmt;
+ this.localDeclaration.declarationSourceEnd = stmt.sourceEnd;
+ this.localDeclaration.declarationEnd = stmt.sourceEnd;
+ return this;
+ }
+}
+/*
+ * Answer the associated parsed structure
+ */
+public ASTNode parseTree(){
+ return localDeclaration;
+}
+/*
+ * Answer the very source end of the corresponding parse node
+ */
+public int sourceEnd(){
+ return this.localDeclaration.declarationSourceEnd;
+}
+public String toString(int tab) {
+ return tabString(tab) + "Recovered local variable:\n" + localDeclaration.print(tab + 1, new StringBuffer(10)); //$NON-NLS-1$
+}
+public Statement updatedStatement(){
+ return localDeclaration;
+}
+/*
+ * A closing brace got consumed, might have closed the current element,
+ * in which case both the currentElement is exited.
+ *
+ * Fields have no associated braces, thus if matches, then update parent.
+ */
+public RecoveredElement updateOnClosingBrace(int braceStart, int braceEnd){
+ if (bracketBalance > 0){ // was an array initializer
+ bracketBalance--;
+ if (bracketBalance == 0) alreadyCompletedLocalInitialization = true;
+ return this;
+ }
+ if (parent != null){
+ return parent.updateOnClosingBrace(braceStart, braceEnd);
+ }
+ return this;
+}
+/*
+ * An opening brace got consumed, might be the expected opening one of the current element,
+ * in which case the bodyStart is updated.
+ */
+public RecoveredElement updateOnOpeningBrace(int braceStart, int braceEnd){
+ if (localDeclaration.declarationSourceEnd == 0
+ && localDeclaration.type instanceof ArrayTypeReference
+ && !alreadyCompletedLocalInitialization){
+ bracketBalance++;
+ return null; // no update is necessary (array initializer)
+ }
+ // might be an array initializer
+ this.updateSourceEndIfNecessary(braceStart - 1, braceEnd - 1);
+ return this.parent.updateOnOpeningBrace(braceStart, braceEnd);
+}
+public void updateParseTree(){
+ this.updatedStatement();
+}
+/*
+ * Update the declarationSourceEnd of the corresponding parse node
+ */
+public void updateSourceEndIfNecessary(int bodyStart, int bodyEnd){
+ if (this.localDeclaration.declarationSourceEnd == 0) {
+ this.localDeclaration.declarationSourceEnd = bodyEnd;
+ this.localDeclaration.declarationEnd = bodyEnd;
+ }
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredMethod.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredMethod.js
new file mode 100644
index 0000000..ddf4356
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredMethod.js
@@ -0,0 +1,447 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.parser;
+
+import org.eclipse.wst.jsdt.core.compiler.*;
+import org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Argument;
+import org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Block;
+import org.eclipse.wst.jsdt.internal.compiler.ast.ConstructorDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.ExplicitConstructorCall;
+import org.eclipse.wst.jsdt.internal.compiler.ast.FieldDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.LocalDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Statement;
+import org.eclipse.wst.jsdt.internal.compiler.ast.SuperReference;
+import org.eclipse.wst.jsdt.internal.compiler.ast.TypeDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.TypeReference;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BaseTypes;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.CompilerModifiers;
+
+/**
+ * Internal method structure for parsing recovery
+ */
+
+public class RecoveredMethod extends RecoveredElement implements CompilerModifiers, TerminalTokens, BaseTypes {
+
+ public AbstractMethodDeclaration methodDeclaration;
+
+ public RecoveredType[] localTypes;
+ public int localTypeCount;
+
+ public RecoveredBlock methodBody;
+ public boolean discardBody = true;
+
+public RecoveredMethod(AbstractMethodDeclaration methodDeclaration, RecoveredElement parent, int bracketBalance, Parser parser){
+ super(parent, bracketBalance, parser);
+ this.methodDeclaration = methodDeclaration;
+ this.foundOpeningBrace = !bodyStartsAtHeaderEnd();
+ if(this.foundOpeningBrace) {
+ this.bracketBalance++;
+ }
+}
+/*
+ * Record a nested block declaration
+ */
+public RecoveredElement add(Block nestedBlockDeclaration, int bracketBalanceValue) {
+
+ /* default behavior is to delegate recording to parent if any,
+ do not consider elements passed the known end (if set)
+ it must be belonging to an enclosing element
+ */
+ if (methodDeclaration.declarationSourceEnd > 0
+ && nestedBlockDeclaration.sourceStart
+ > methodDeclaration.declarationSourceEnd){
+ if (this.parent == null){
+ return this; // ignore
+ } else {
+ return this.parent.add(nestedBlockDeclaration, bracketBalanceValue);
+ }
+ }
+ /* consider that if the opening brace was not found, it is there */
+ if (!foundOpeningBrace){
+ foundOpeningBrace = true;
+ this.bracketBalance++;
+ }
+
+ methodBody = new RecoveredBlock(nestedBlockDeclaration, this, bracketBalanceValue);
+ if (nestedBlockDeclaration.sourceEnd == 0) return methodBody;
+ return this;
+}
+/*
+ * Record a field declaration
+ */
+public RecoveredElement add(FieldDeclaration fieldDeclaration, int bracketBalanceValue) {
+
+ /* local variables inside method can only be final and non void */
+ char[][] fieldTypeName;
+ if ((fieldDeclaration.modifiers & ~AccFinal) != 0 // local var can only be final
+ || (fieldDeclaration.type == null) // initializer
+ || ((fieldTypeName = fieldDeclaration.type.getTypeName()).length == 1 // non void
+ && CharOperation.equals(fieldTypeName[0], VoidBinding.sourceName()))){
+
+ if (this.parent == null){
+ return this; // ignore
+ } else {
+ this.updateSourceEndIfNecessary(this.previousAvailableLineEnd(fieldDeclaration.declarationSourceStart - 1));
+ return this.parent.add(fieldDeclaration, bracketBalanceValue);
+ }
+ }
+ /* default behavior is to delegate recording to parent if any,
+ do not consider elements passed the known end (if set)
+ it must be belonging to an enclosing element
+ */
+ if (methodDeclaration.declarationSourceEnd > 0
+ && fieldDeclaration.declarationSourceStart
+ > methodDeclaration.declarationSourceEnd){
+ if (this.parent == null){
+ return this; // ignore
+ } else {
+ return this.parent.add(fieldDeclaration, bracketBalanceValue);
+ }
+ }
+ /* consider that if the opening brace was not found, it is there */
+ if (!foundOpeningBrace){
+ foundOpeningBrace = true;
+ this.bracketBalance++;
+ }
+ // still inside method, treat as local variable
+ return this; // ignore
+}
+/*
+ * Record a local declaration - regular method should have been created a block body
+ */
+public RecoveredElement add(LocalDeclaration localDeclaration, int bracketBalanceValue) {
+
+ /* local variables inside method can only be final and non void */
+/*
+ char[][] localTypeName;
+ if ((localDeclaration.modifiers & ~AccFinal) != 0 // local var can only be final
+ || (localDeclaration.type == null) // initializer
+ || ((localTypeName = localDeclaration.type.getTypeName()).length == 1 // non void
+ && CharOperation.equals(localTypeName[0], VoidBinding.sourceName()))){
+
+ if (this.parent == null){
+ return this; // ignore
+ } else {
+ this.updateSourceEndIfNecessary(this.previousAvailableLineEnd(localDeclaration.declarationSourceStart - 1));
+ return this.parent.add(localDeclaration, bracketBalance);
+ }
+ }
+*/
+ /* do not consider a type starting passed the type end (if set)
+ it must be belonging to an enclosing type */
+ if (methodDeclaration.declarationSourceEnd != 0
+ && localDeclaration.declarationSourceStart > methodDeclaration.declarationSourceEnd){
+
+ if (this.parent == null) {
+ return this; // ignore
+ } else {
+ return this.parent.add(localDeclaration, bracketBalanceValue);
+ }
+ }
+ if (methodBody == null){
+ Block block = new Block(0);
+ block.sourceStart = methodDeclaration.bodyStart;
+ RecoveredElement currentBlock = this.add(block, 1);
+ if (this.bracketBalance > 0){
+ for (int i = 0; i < this.bracketBalance - 1; i++){
+ currentBlock = currentBlock.add(new Block(0), 1);
+ }
+ this.bracketBalance = 1;
+ }
+ return currentBlock.add(localDeclaration, bracketBalanceValue);
+ }
+ return methodBody.add(localDeclaration, bracketBalanceValue, true);
+}
+/*
+ * Record a statement - regular method should have been created a block body
+ */
+public RecoveredElement add(Statement statement, int bracketBalanceValue) {
+
+ /* do not consider a type starting passed the type end (if set)
+ it must be belonging to an enclosing type */
+ if (methodDeclaration.declarationSourceEnd != 0
+ && statement.sourceStart > methodDeclaration.declarationSourceEnd){
+
+ if (this.parent == null) {
+ return this; // ignore
+ } else {
+ return this.parent.add(statement, bracketBalanceValue);
+ }
+ }
+ if (methodBody == null){
+ Block block = new Block(0);
+ block.sourceStart = methodDeclaration.bodyStart;
+ RecoveredElement currentBlock = this.add(block, 1);
+ if (this.bracketBalance > 0){
+ for (int i = 0; i < this.bracketBalance - 1; i++){
+ currentBlock = currentBlock.add(new Block(0), 1);
+ }
+ this.bracketBalance = 1;
+ }
+ return currentBlock.add(statement, bracketBalanceValue);
+ }
+ return methodBody.add(statement, bracketBalanceValue, true);
+}
+public RecoveredElement add(TypeDeclaration typeDeclaration, int bracketBalanceValue) {
+
+ /* do not consider a type starting passed the type end (if set)
+ it must be belonging to an enclosing type */
+ if (methodDeclaration.declarationSourceEnd != 0
+ && typeDeclaration.declarationSourceStart > methodDeclaration.declarationSourceEnd){
+
+ if (this.parent == null) {
+ return this; // ignore
+ }
+ return this.parent.add(typeDeclaration, bracketBalanceValue);
+ }
+ if ((typeDeclaration.bits & ASTNode.IsLocalTypeMASK) != 0){
+ if (methodBody == null){
+ Block block = new Block(0);
+ block.sourceStart = methodDeclaration.bodyStart;
+ this.add(block, 1);
+ }
+ return methodBody.add(typeDeclaration, bracketBalanceValue, true);
+ }
+ if (typeDeclaration.isInterface()) {
+ this.updateSourceEndIfNecessary(this.previousAvailableLineEnd(typeDeclaration.declarationSourceStart - 1));
+ if (this.parent == null) {
+ return this; // ignore
+ }
+ // close the constructor
+ return this.parent.add(typeDeclaration, bracketBalanceValue);
+ }
+ if (localTypes == null) {
+ localTypes = new RecoveredType[5];
+ localTypeCount = 0;
+ } else {
+ if (localTypeCount == localTypes.length) {
+ System.arraycopy(
+ localTypes,
+ 0,
+ (localTypes = new RecoveredType[2 * localTypeCount]),
+ 0,
+ localTypeCount);
+ }
+ }
+ RecoveredType element = new RecoveredType(typeDeclaration, this, bracketBalanceValue);
+ localTypes[localTypeCount++] = element;
+
+ /* consider that if the opening brace was not found, it is there */
+ if (!foundOpeningBrace){
+ foundOpeningBrace = true;
+ this.bracketBalance++;
+ }
+ return element;
+}
+public boolean bodyStartsAtHeaderEnd(){
+ return methodDeclaration.bodyStart == methodDeclaration.sourceEnd+1;
+}
+/*
+ * Answer the associated parsed structure
+ */
+public ASTNode parseTree(){
+ return methodDeclaration;
+}
+/*
+ * Answer the very source end of the corresponding parse node
+ */
+public int sourceEnd(){
+ return this.methodDeclaration.declarationSourceEnd;
+}
+public String toString(int tab) {
+ StringBuffer result = new StringBuffer(tabString(tab));
+ result.append("Recovered method:\n"); //$NON-NLS-1$
+ this.methodDeclaration.print(tab + 1, result);
+ if (this.localTypes != null) {
+ for (int i = 0; i < this.localTypeCount; i++) {
+ result.append("\n"); //$NON-NLS-1$
+ result.append(this.localTypes[i].toString(tab + 1));
+ }
+ }
+ if (this.methodBody != null) {
+ result.append("\n"); //$NON-NLS-1$
+ result.append(this.methodBody.toString(tab + 1));
+ }
+ return result.toString();
+}
+/*
+ * Update the bodyStart of the corresponding parse node
+ */
+public void updateBodyStart(int bodyStart){
+ this.foundOpeningBrace = true;
+ this.methodDeclaration.bodyStart = bodyStart;
+}
+public AbstractMethodDeclaration updatedMethodDeclaration(){
+
+ if (methodBody != null){
+ Block block = methodBody.updatedBlock();
+ if (block != null){
+ methodDeclaration.statements = block.statements;
+
+ /* first statement might be an explict constructor call destinated to a special slot */
+ if (methodDeclaration.isConstructor()) {
+ ConstructorDeclaration constructor = (ConstructorDeclaration)methodDeclaration;
+ if (methodDeclaration.statements != null
+ && methodDeclaration.statements[0] instanceof ExplicitConstructorCall){
+ constructor.constructorCall = (ExplicitConstructorCall)methodDeclaration.statements[0];
+ int length = methodDeclaration.statements.length;
+ System.arraycopy(
+ methodDeclaration.statements,
+ 1,
+ (methodDeclaration.statements = new Statement[length-1]),
+ 0,
+ length-1);
+ }
+ if (constructor.constructorCall == null){ // add implicit constructor call
+ constructor.constructorCall = SuperReference.implicitSuperConstructorCall();
+ }
+ }
+ }
+ }
+ if (localTypeCount > 0) methodDeclaration.bits |= ASTNode.HasLocalTypeMASK;
+ return methodDeclaration;
+}
+/*
+ * Update the corresponding parse node from parser state which
+ * is about to disappear because of restarting recovery
+ */
+public void updateFromParserState(){
+
+ if(this.bodyStartsAtHeaderEnd()){
+ Parser parser = this.parser();
+ /* might want to recover arguments or thrown exceptions */
+ if (parser.listLength > 0 && parser.astLengthPtr > 0){ // awaiting interface type references
+ /* has consumed the arguments - listed elements must be thrown exceptions */
+ if (methodDeclaration.sourceEnd == parser.rParenPos) {
+
+ // protection for bugs 15142
+ int length = parser.astLengthStack[parser.astLengthPtr];
+ int astPtr = parser.astPtr - length;
+ boolean canConsume = astPtr >= 0;
+ if(canConsume) {
+ if((!(parser.astStack[astPtr] instanceof AbstractMethodDeclaration))) {
+ canConsume = false;
+ }
+ for (int i = 1, max = length + 1; i < max; i++) {
+ if(!(parser.astStack[astPtr + i ] instanceof TypeReference)) {
+ canConsume = false;
+ }
+ }
+ }
+ if (canConsume){
+ parser.consumeMethodHeaderThrowsClause();
+ // will reset typeListLength to zero
+ // thus this check will only be performed on first errorCheck after void foo() throws X, Y,
+ } else {
+ parser.listLength = 0;
+ }
+ } else {
+ /* has not consumed arguments yet, listed elements must be arguments */
+ if (parser.currentToken == TokenNameLPAREN || parser.currentToken == TokenNameSEMICOLON){
+ /* if currentToken is parenthesis this last argument is a method/field signature */
+ parser.astLengthStack[parser.astLengthPtr] --;
+ parser.astPtr --;
+ parser.listLength --;
+ parser.currentToken = 0;
+ }
+ int argLength = parser.astLengthStack[parser.astLengthPtr];
+ int argStart = parser.astPtr - argLength + 1;
+ boolean needUpdateRParenPos = parser.rParenPos < parser.lParenPos; // 12387 : rParenPos will be used
+ // to compute bodyStart, and thus used to set next checkpoint.
+ int count;
+ for (count = 0; count < argLength; count++){
+ Argument argument = (Argument)parser.astStack[argStart+count];
+ /* cannot be an argument if non final */
+ char[][] argTypeName = argument.type.getTypeName();
+ if ((argument.modifiers & ~AccFinal) != 0
+ || (argTypeName.length == 1
+ && CharOperation.equals(argTypeName[0], VoidBinding.sourceName()))){
+ parser.astLengthStack[parser.astLengthPtr] = count;
+ parser.astPtr = argStart+count-1;
+ parser.listLength = count;
+ parser.currentToken = 0;
+ break;
+ }
+ if (needUpdateRParenPos) parser.rParenPos = argument.sourceEnd + 1;
+ }
+ if (parser.listLength > 0 && parser.astLengthPtr > 0){
+
+ // protection for bugs 15142
+ int length = parser.astLengthStack[parser.astLengthPtr];
+ int astPtr = parser.astPtr - length;
+ boolean canConsume = astPtr >= 0;
+ if(canConsume) {
+ if((!(parser.astStack[astPtr] instanceof AbstractMethodDeclaration))) {
+ canConsume = false;
+ }
+ for (int i = 1, max = length + 1; i < max; i++) {
+ if(!(parser.astStack[astPtr + i ] instanceof Argument)) {
+ canConsume = false;
+ }
+ }
+ }
+ if(canConsume) {
+ parser.consumeMethodHeaderRightParen();
+ /* fix-up positions, given they were updated against rParenPos, which did not get set */
+ if (parser.currentElement == this){ // parameter addition might have added an awaiting (no return type) method - see 1FVXQZ4 */
+ methodDeclaration.sourceEnd = methodDeclaration.arguments[methodDeclaration.arguments.length-1].sourceEnd;
+ methodDeclaration.bodyStart = methodDeclaration.sourceEnd+1;
+ parser.lastCheckPoint = methodDeclaration.bodyStart;
+ }
+ }
+ }
+ }
+ }
+ }
+}
+/*
+ * An opening brace got consumed, might be the expected opening one of the current element,
+ * in which case the bodyStart is updated.
+ */
+public RecoveredElement updateOnOpeningBrace(int braceStart, int braceEnd){
+
+ /* in case the opening brace is close enough to the signature */
+ if (bracketBalance == 0){
+ /*
+ if (parser.scanner.searchLineNumber(methodDeclaration.sourceEnd)
+ != parser.scanner.searchLineNumber(braceEnd)){
+ */
+ switch(parser().lastIgnoredToken){
+ case -1 :
+ case TokenNamethrows :
+ break;
+ default:
+ this.foundOpeningBrace = true;
+ bracketBalance = 1; // pretend the brace was already there
+ }
+ }
+ return super.updateOnOpeningBrace(braceStart, braceEnd);
+}
+public void updateParseTree(){
+ this.updatedMethodDeclaration();
+}
+/*
+ * Update the declarationSourceEnd of the corresponding parse node
+ */
+public void updateSourceEndIfNecessary(int braceStart, int braceEnd){
+ if (this.methodDeclaration.declarationSourceEnd == 0) {
+ if(parser().rBraceSuccessorStart >= braceEnd) {
+ this.methodDeclaration.declarationSourceEnd = parser().rBraceEnd;
+ this.methodDeclaration.bodyEnd = parser().rBraceStart;
+ } else {
+ this.methodDeclaration.declarationSourceEnd = braceEnd;
+ this.methodDeclaration.bodyEnd = braceStart - 1;
+ }
+ }
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredStatement.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredStatement.js
new file mode 100644
index 0000000..e0499ec
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredStatement.js
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.parser;
+
+/**
+ * Internal statement structure for parsing recovery
+ */
+import org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Statement;
+
+public class RecoveredStatement extends RecoveredElement {
+
+ public Statement statement;
+public RecoveredStatement(Statement statement, RecoveredElement parent, int bracketBalance){
+ super(parent, bracketBalance);
+ this.statement = statement;
+}
+/*
+ * Answer the associated parsed structure
+ */
+public ASTNode parseTree(){
+ return statement;
+}
+/*
+ * Answer the very source end of the corresponding parse node
+ */
+public int sourceEnd(){
+ return this.statement.sourceEnd;
+}
+public String toString(int tab){
+ return tabString(tab) + "Recovered statement:\n" + statement.print(tab + 1, new StringBuffer(10)); //$NON-NLS-1$
+}
+public Statement updatedStatement(){
+ return statement;
+}
+public void updateParseTree(){
+ this.updatedStatement();
+}
+/*
+ * Update the declarationSourceEnd of the corresponding parse node
+ */
+public void updateSourceEndIfNecessary(int bodyStart, int bodyEnd){
+ if (this.statement.sourceEnd == 0)
+ this.statement.sourceEnd = bodyEnd;
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredType.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredType.js
new file mode 100644
index 0000000..aa22a53
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredType.js
@@ -0,0 +1,511 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.parser;
+
+import org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Block;
+import org.eclipse.wst.jsdt.internal.compiler.ast.FieldDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Initializer;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Statement;
+import org.eclipse.wst.jsdt.internal.compiler.ast.TypeDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.TypeParameter;
+import org.eclipse.wst.jsdt.internal.compiler.ast.TypeReference;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.CompilerModifiers;
+
+/**
+ * Internal type structure for parsing recovery
+ */
+
+public class RecoveredType extends RecoveredStatement implements TerminalTokens, CompilerModifiers {
+ public TypeDeclaration typeDeclaration;
+
+ public RecoveredType[] memberTypes;
+ public int memberTypeCount;
+ public RecoveredField[] fields;
+ public int fieldCount;
+ public RecoveredMethod[] methods;
+ public int methodCount;
+
+ public boolean preserveContent = false; // only used for anonymous types
+ public int bodyEnd;
+
+public RecoveredType(TypeDeclaration typeDeclaration, RecoveredElement parent, int bracketBalance){
+ super(typeDeclaration, parent, bracketBalance);
+ this.typeDeclaration = typeDeclaration;
+ this.foundOpeningBrace = !bodyStartsAtHeaderEnd();
+ if(this.foundOpeningBrace) {
+ this.bracketBalance++;
+ }
+}
+public RecoveredElement add(AbstractMethodDeclaration methodDeclaration, int bracketBalanceValue) {
+
+ /* do not consider a method starting passed the type end (if set)
+ it must be belonging to an enclosing type */
+ if (typeDeclaration.declarationSourceEnd != 0
+ && methodDeclaration.declarationSourceStart > typeDeclaration.declarationSourceEnd){
+ return this.parent.add(methodDeclaration, bracketBalanceValue);
+ }
+
+ if (methods == null) {
+ methods = new RecoveredMethod[5];
+ methodCount = 0;
+ } else {
+ if (methodCount == methods.length) {
+ System.arraycopy(
+ methods,
+ 0,
+ (methods = new RecoveredMethod[2 * methodCount]),
+ 0,
+ methodCount);
+ }
+ }
+ RecoveredMethod element = new RecoveredMethod(methodDeclaration, this, bracketBalanceValue, this.recoveringParser);
+ methods[methodCount++] = element;
+
+ /* consider that if the opening brace was not found, it is there */
+ if (!foundOpeningBrace){
+ foundOpeningBrace = true;
+ this.bracketBalance++;
+ }
+ /* if method not finished, then method becomes current */
+ if (methodDeclaration.declarationSourceEnd == 0) return element;
+ return this;
+}
+public RecoveredElement add(Block nestedBlockDeclaration,int bracketBalanceValue) {
+ int modifiers = AccDefault;
+ if(this.parser().recoveredStaticInitializerStart != 0) {
+ modifiers = AccStatic;
+ }
+ return this.add(new Initializer(nestedBlockDeclaration, modifiers), bracketBalanceValue);
+}
+public RecoveredElement add(FieldDeclaration fieldDeclaration, int bracketBalanceValue) {
+
+ /* do not consider a field starting passed the type end (if set)
+ it must be belonging to an enclosing type */
+ if (typeDeclaration.declarationSourceEnd != 0
+ && fieldDeclaration.declarationSourceStart > typeDeclaration.declarationSourceEnd) {
+ return this.parent.add(fieldDeclaration, bracketBalanceValue);
+ }
+ if (fields == null) {
+ fields = new RecoveredField[5];
+ fieldCount = 0;
+ } else {
+ if (fieldCount == fields.length) {
+ System.arraycopy(
+ fields,
+ 0,
+ (fields = new RecoveredField[2 * fieldCount]),
+ 0,
+ fieldCount);
+ }
+ }
+ RecoveredField element = fieldDeclaration.isField()
+ ? new RecoveredField(fieldDeclaration, this, bracketBalanceValue)
+ : new RecoveredInitializer(fieldDeclaration, this, bracketBalanceValue);
+ fields[fieldCount++] = element;
+
+ /* consider that if the opening brace was not found, it is there */
+ if (!foundOpeningBrace){
+ foundOpeningBrace = true;
+ this.bracketBalance++;
+ }
+ /* if field not finished, then field becomes current */
+ if (fieldDeclaration.declarationSourceEnd == 0) return element;
+ return this;
+}
+public RecoveredElement add(TypeDeclaration memberTypeDeclaration, int bracketBalanceValue) {
+
+ /* do not consider a type starting passed the type end (if set)
+ it must be belonging to an enclosing type */
+ if (typeDeclaration.declarationSourceEnd != 0
+ && memberTypeDeclaration.declarationSourceStart > typeDeclaration.declarationSourceEnd){
+ return this.parent.add(memberTypeDeclaration, bracketBalanceValue);
+ }
+
+ if ((memberTypeDeclaration.bits & ASTNode.IsAnonymousTypeMASK) != 0){
+ if (this.methodCount > 0) {
+ // add it to the last method body
+ RecoveredMethod lastMethod = this.methods[this.methodCount-1];
+ lastMethod.methodDeclaration.bodyEnd = 0; // reopen method
+ lastMethod.methodDeclaration.declarationSourceEnd = 0; // reopen method
+ lastMethod.bracketBalance++; // expect one closing brace
+ return lastMethod.add(memberTypeDeclaration, bracketBalanceValue);
+ } else {
+ // ignore
+ return this;
+ }
+ }
+
+ if (memberTypes == null) {
+ memberTypes = new RecoveredType[5];
+ memberTypeCount = 0;
+ } else {
+ if (memberTypeCount == memberTypes.length) {
+ System.arraycopy(
+ memberTypes,
+ 0,
+ (memberTypes = new RecoveredType[2 * memberTypeCount]),
+ 0,
+ memberTypeCount);
+ }
+ }
+ RecoveredType element = new RecoveredType(memberTypeDeclaration, this, bracketBalanceValue);
+ memberTypes[memberTypeCount++] = element;
+
+ /* consider that if the opening brace was not found, it is there */
+ if (!foundOpeningBrace){
+ foundOpeningBrace = true;
+ this.bracketBalance++;
+ }
+ /* if member type not finished, then member type becomes current */
+ if (memberTypeDeclaration.declarationSourceEnd == 0) return element;
+ return this;
+}
+/*
+ * Answer the body end of the corresponding parse node
+ */
+public int bodyEnd(){
+ if (bodyEnd == 0) return typeDeclaration.declarationSourceEnd;
+ return bodyEnd;
+}
+public boolean bodyStartsAtHeaderEnd(){
+ if (typeDeclaration.superInterfaces == null){
+ if (typeDeclaration.superclass == null){
+ if(typeDeclaration.typeParameters == null) {
+ return typeDeclaration.bodyStart == typeDeclaration.sourceEnd+1;
+ } else {
+ return typeDeclaration.bodyStart == typeDeclaration.typeParameters[typeDeclaration.typeParameters.length-1].sourceEnd+1;
+ }
+ } else {
+ return typeDeclaration.bodyStart == typeDeclaration.superclass.sourceEnd+1;
+ }
+ } else {
+ return typeDeclaration.bodyStart
+ == typeDeclaration.superInterfaces[typeDeclaration.superInterfaces.length-1].sourceEnd+1;
+ }
+}
+/*
+ * Answer the enclosing type node, or null if none
+ */
+public RecoveredType enclosingType(){
+ RecoveredElement current = parent;
+ while (current != null){
+ if (current instanceof RecoveredType){
+ return (RecoveredType) current;
+ }
+ current = current.parent;
+ }
+ return null;
+}
+public char[] name(){
+ return typeDeclaration.name;
+}
+/*
+ * Answer the associated parsed structure
+ */
+public ASTNode parseTree(){
+ return typeDeclaration;
+}
+/*
+ * Answer the very source end of the corresponding parse node
+ */
+public int sourceEnd(){
+ return this.typeDeclaration.declarationSourceEnd;
+}
+public String toString(int tab) {
+ StringBuffer result = new StringBuffer(tabString(tab));
+ result.append("Recovered type:\n"); //$NON-NLS-1$
+ if ((typeDeclaration.bits & ASTNode.IsAnonymousTypeMASK) != 0) {
+ result.append(tabString(tab));
+ result.append(" "); //$NON-NLS-1$
+ }
+ typeDeclaration.print(tab + 1, result);
+ if (this.memberTypes != null) {
+ for (int i = 0; i < this.memberTypeCount; i++) {
+ result.append("\n"); //$NON-NLS-1$
+ result.append(this.memberTypes[i].toString(tab + 1));
+ }
+ }
+ if (this.fields != null) {
+ for (int i = 0; i < this.fieldCount; i++) {
+ result.append("\n"); //$NON-NLS-1$
+ result.append(this.fields[i].toString(tab + 1));
+ }
+ }
+ if (this.methods != null) {
+ for (int i = 0; i < this.methodCount; i++) {
+ result.append("\n"); //$NON-NLS-1$
+ result.append(this.methods[i].toString(tab + 1));
+ }
+ }
+ return result.toString();
+}
+/*
+ * Update the bodyStart of the corresponding parse node
+ */
+public void updateBodyStart(int bodyStart){
+ this.foundOpeningBrace = true;
+ this.typeDeclaration.bodyStart = bodyStart;
+}
+public Statement updatedStatement(){
+
+ // ignore closed anonymous type
+ if ((typeDeclaration.bits & ASTNode.IsAnonymousTypeMASK) != 0 && !this.preserveContent){
+ return null;
+ }
+
+ TypeDeclaration updatedType = this.updatedTypeDeclaration();
+ if ((updatedType.bits & ASTNode.IsAnonymousTypeMASK) != 0){
+ /* in presence of an anonymous type, we want the full allocation expression */
+ return updatedType.allocation;
+ }
+ return updatedType;
+}
+public TypeDeclaration updatedTypeDeclaration(){
+
+ /* update member types */
+ if (memberTypeCount > 0){
+ int existingCount = typeDeclaration.memberTypes == null ? 0 : typeDeclaration.memberTypes.length;
+ TypeDeclaration[] memberTypeDeclarations = new TypeDeclaration[existingCount + memberTypeCount];
+ if (existingCount > 0){
+ System.arraycopy(typeDeclaration.memberTypes, 0, memberTypeDeclarations, 0, existingCount);
+ }
+ // may need to update the declarationSourceEnd of the last type
+ if (memberTypes[memberTypeCount - 1].typeDeclaration.declarationSourceEnd == 0){
+ int bodyEndValue = bodyEnd();
+ memberTypes[memberTypeCount - 1].typeDeclaration.declarationSourceEnd = bodyEndValue;
+ memberTypes[memberTypeCount - 1].typeDeclaration.bodyEnd = bodyEndValue;
+ }
+ for (int i = 0; i < memberTypeCount; i++){
+ memberTypeDeclarations[existingCount + i] = memberTypes[i].updatedTypeDeclaration();
+ }
+ typeDeclaration.memberTypes = memberTypeDeclarations;
+ }
+ /* update fields */
+ if (fieldCount > 0){
+ int existingCount = typeDeclaration.fields == null ? 0 : typeDeclaration.fields.length;
+ FieldDeclaration[] fieldDeclarations = new FieldDeclaration[existingCount + fieldCount];
+ if (existingCount > 0){
+ System.arraycopy(typeDeclaration.fields, 0, fieldDeclarations, 0, existingCount);
+ }
+ // may need to update the declarationSourceEnd of the last field
+ if (fields[fieldCount - 1].fieldDeclaration.declarationSourceEnd == 0){
+ int temp = bodyEnd();
+ fields[fieldCount - 1].fieldDeclaration.declarationSourceEnd = temp;
+ fields[fieldCount - 1].fieldDeclaration.declarationEnd = temp;
+ }
+ for (int i = 0; i < fieldCount; i++){
+ fieldDeclarations[existingCount + i] = fields[i].updatedFieldDeclaration();
+ }
+ typeDeclaration.fields = fieldDeclarations;
+ }
+ /* update methods */
+ int existingCount = typeDeclaration.methods == null ? 0 : typeDeclaration.methods.length;
+ boolean hasConstructor = false, hasRecoveredConstructor = false;
+ int defaultConstructorIndex = -1;
+ if (methodCount > 0){
+ AbstractMethodDeclaration[] methodDeclarations = new AbstractMethodDeclaration[existingCount + methodCount];
+ for (int i = 0; i < existingCount; i++){
+ AbstractMethodDeclaration m = typeDeclaration.methods[i];
+ if (m.isDefaultConstructor()) defaultConstructorIndex = i;
+ methodDeclarations[i] = m;
+ }
+ // may need to update the declarationSourceEnd of the last method
+ if (methods[methodCount - 1].methodDeclaration.declarationSourceEnd == 0){
+ int bodyEndValue = bodyEnd();
+ methods[methodCount - 1].methodDeclaration.declarationSourceEnd = bodyEndValue;
+ methods[methodCount - 1].methodDeclaration.bodyEnd = bodyEndValue;
+ }
+ for (int i = 0; i < methodCount; i++){
+ AbstractMethodDeclaration updatedMethod = methods[i].updatedMethodDeclaration();
+ if (updatedMethod.isConstructor()) hasRecoveredConstructor = true;
+ methodDeclarations[existingCount + i] = updatedMethod;
+ }
+ typeDeclaration.methods = methodDeclarations;
+ hasConstructor = typeDeclaration.checkConstructors(this.parser());
+ } else {
+ for (int i = 0; i < existingCount; i++){
+ if (typeDeclaration.methods[i].isConstructor()) hasConstructor = true;
+ }
+ }
+ /* add clinit ? */
+ if (typeDeclaration.needClassInitMethod()){
+ boolean alreadyHasClinit = false;
+ for (int i = 0; i < existingCount; i++){
+ if (typeDeclaration.methods[i].isClinit()){
+ alreadyHasClinit = true;
+ break;
+ }
+ }
+ if (!alreadyHasClinit) typeDeclaration.addClinit();
+ }
+ /* add default constructor ? */
+ if (defaultConstructorIndex >= 0 && hasRecoveredConstructor){
+ /* should discard previous default construtor */
+ AbstractMethodDeclaration[] methodDeclarations = new AbstractMethodDeclaration[typeDeclaration.methods.length - 1];
+ if (defaultConstructorIndex != 0){
+ System.arraycopy(typeDeclaration.methods, 0, methodDeclarations, 0, defaultConstructorIndex);
+ }
+ if (defaultConstructorIndex != typeDeclaration.methods.length-1){
+ System.arraycopy(
+ typeDeclaration.methods,
+ defaultConstructorIndex+1,
+ methodDeclarations,
+ defaultConstructorIndex,
+ typeDeclaration.methods.length - defaultConstructorIndex - 1);
+ }
+ typeDeclaration.methods = methodDeclarations;
+ } else {
+ if (!hasConstructor && !typeDeclaration.isInterface()) {// if was already reduced, then constructor
+ boolean insideFieldInitializer = false;
+ RecoveredElement parentElement = this.parent;
+ while (parentElement != null){
+ if (parentElement instanceof RecoveredField){
+ insideFieldInitializer = true;
+ break;
+ }
+ parentElement = parentElement.parent;
+ }
+ typeDeclaration.createsInternalConstructor(!parser().diet || insideFieldInitializer, true);
+ }
+ }
+ if (parent instanceof RecoveredType){
+ typeDeclaration.bits |= ASTNode.IsMemberTypeMASK;
+ } else if (parent instanceof RecoveredMethod){
+ typeDeclaration.bits |= ASTNode.IsLocalTypeMASK;
+ }
+ return typeDeclaration;
+}
+/*
+ * Update the corresponding parse node from parser state which
+ * is about to disappear because of restarting recovery
+ */
+public void updateFromParserState(){
+
+ if(this.bodyStartsAtHeaderEnd()){
+ Parser parser = this.parser();
+ /* might want to recover implemented interfaces */
+ // protection for bugs 15142
+ if (parser.listLength > 0 && parser.astLengthPtr > 0){ // awaiting interface type references
+ int length = parser.astLengthStack[parser.astLengthPtr];
+ int astPtr = parser.astPtr - length;
+ boolean canConsume = astPtr >= 0;
+ if(canConsume) {
+ if((!(parser.astStack[astPtr] instanceof TypeDeclaration))) {
+ canConsume = false;
+ }
+ for (int i = 1, max = length + 1; i < max; i++) {
+ if(!(parser.astStack[astPtr + i ] instanceof TypeReference)) {
+ canConsume = false;
+ }
+ }
+ }
+ if(canConsume) {
+ parser.consumeClassHeaderImplements();
+ // will reset typeListLength to zero
+ // thus this check will only be performed on first errorCheck after class X implements Y,Z,
+ }
+ } else if (parser.listTypeParameterLength > 0) {
+ int length = parser.listTypeParameterLength;
+ int genericsPtr = parser.genericsPtr;
+ boolean canConsume = genericsPtr + 1 >= length && parser.astPtr > -1;
+ if(canConsume) {
+ if (!(parser.astStack[parser.astPtr] instanceof TypeDeclaration)) {
+ canConsume = false;
+ }
+ while(genericsPtr + 1 > length && !(parser.genericsStack[genericsPtr] instanceof TypeParameter)) {
+ genericsPtr--;
+ }
+ for (int i = 0; i < length; i++) {
+ if(!(parser.genericsStack[genericsPtr - i] instanceof TypeParameter)) {
+ canConsume = false;
+ }
+ }
+ }
+ if(canConsume) {
+ TypeDeclaration typeDecl = (TypeDeclaration)parser.astStack[parser.astPtr];
+ System.arraycopy(parser.genericsStack, genericsPtr - length + 1, typeDecl.typeParameters = new TypeParameter[length], 0, length);
+ typeDecl.bodyStart = typeDecl.typeParameters[length-1].declarationSourceEnd + 1;
+ parser.listTypeParameterLength = 0;
+ parser.lastCheckPoint = typeDecl.bodyStart;
+ }
+ }
+ }
+}
+/*
+ * A closing brace got consumed, might have closed the current element,
+ * in which case both the currentElement is exited
+ */
+public RecoveredElement updateOnClosingBrace(int braceStart, int braceEnd){
+ if ((--bracketBalance <= 0) && (parent != null)){
+ this.updateSourceEndIfNecessary(braceStart, braceEnd);
+ this.bodyEnd = braceStart - 1;
+ return parent;
+ }
+ return this;
+}
+/*
+ * An opening brace got consumed, might be the expected opening one of the current element,
+ * in which case the bodyStart is updated.
+ */
+public RecoveredElement updateOnOpeningBrace(int braceStart, int braceEnd){
+ /* in case the opening brace is not close enough to the signature, ignore it */
+ if (bracketBalance == 0){
+ /*
+ if (parser.scanner.searchLineNumber(typeDeclaration.sourceEnd)
+ != parser.scanner.searchLineNumber(braceEnd)){
+ */
+ Parser parser = this.parser();
+ switch(parser.lastIgnoredToken){
+ case -1 :
+ case TokenNameextends :
+ case TokenNameimplements :
+ case TokenNameGREATER :
+ case TokenNameRIGHT_SHIFT :
+ case TokenNameUNSIGNED_RIGHT_SHIFT :
+ if (parser.recoveredStaticInitializerStart == 0) break;
+ default:
+ this.foundOpeningBrace = true;
+ bracketBalance = 1; // pretend the brace was already there
+ }
+ }
+ // might be an initializer
+ if (this.bracketBalance == 1){
+ Block block = new Block(0);
+ Parser parser = this.parser();
+ block.sourceStart = parser.scanner.startPosition;
+ Initializer init;
+ if (parser.recoveredStaticInitializerStart == 0){
+ init = new Initializer(block, AccDefault);
+ } else {
+ init = new Initializer(block, AccStatic);
+ init.declarationSourceStart = parser.recoveredStaticInitializerStart;
+ }
+ init.bodyStart = parser.scanner.currentPosition;
+ return this.add(init, 1);
+ }
+ return super.updateOnOpeningBrace(braceStart, braceEnd);
+}
+public void updateParseTree(){
+ this.updatedTypeDeclaration();
+}
+/*
+ * Update the declarationSourceEnd of the corresponding parse node
+ */
+public void updateSourceEndIfNecessary(int start, int end){
+ if (this.typeDeclaration.declarationSourceEnd == 0){
+ this.bodyEnd = 0;
+ this.typeDeclaration.declarationSourceEnd = end;
+ this.typeDeclaration.bodyEnd = end;
+ }
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredUnit.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredUnit.js
new file mode 100644
index 0000000..6185e88
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredUnit.js
@@ -0,0 +1,217 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.parser;
+
+/**
+ * Internal field structure for parsing recovery
+ */
+import org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Block;
+import org.eclipse.wst.jsdt.internal.compiler.ast.CompilationUnitDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.FieldDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.ImportReference;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Initializer;
+import org.eclipse.wst.jsdt.internal.compiler.ast.TypeDeclaration;
+
+public class RecoveredUnit extends RecoveredElement {
+
+ public CompilationUnitDeclaration unitDeclaration;
+
+ public RecoveredImport[] imports;
+ public int importCount;
+ public RecoveredType[] types;
+ public int typeCount;
+public RecoveredUnit(CompilationUnitDeclaration unitDeclaration, int bracketBalance, Parser parser){
+ super(null, bracketBalance, parser);
+ this.unitDeclaration = unitDeclaration;
+}
+/*
+ * Record a method declaration: should be attached to last type
+ */
+public RecoveredElement add(AbstractMethodDeclaration methodDeclaration, int bracketBalanceValue) {
+
+ /* attach it to last type - if any */
+ if (this.typeCount > 0){
+ RecoveredType type = this.types[this.typeCount -1];
+ int start = type.bodyEnd;
+ int end = type.typeDeclaration.bodyEnd;
+ type.bodyEnd = 0; // reset position
+ type.typeDeclaration.declarationSourceEnd = 0; // reset position
+ type.typeDeclaration.bodyEnd = 0;
+
+ if(start < end) {
+ Initializer initializer = new Initializer(new Block(0), 0);
+ initializer.bodyStart = end;
+ initializer.bodyEnd = end;
+ initializer.declarationSourceStart = end;
+ initializer.declarationSourceEnd = start;
+ type.add(initializer, bracketBalanceValue);
+ }
+
+ return type.add(methodDeclaration, bracketBalanceValue);
+ }
+ return this; // ignore
+}
+/*
+ * Record a field declaration: should be attached to last type
+ */
+public RecoveredElement add(FieldDeclaration fieldDeclaration, int bracketBalanceValue) {
+
+ /* attach it to last type - if any */
+ if (this.typeCount > 0){
+ RecoveredType type = this.types[this.typeCount -1];
+ type.bodyEnd = 0; // reset position
+ type.typeDeclaration.declarationSourceEnd = 0; // reset position
+ type.typeDeclaration.bodyEnd = 0;
+ return type.add(fieldDeclaration, bracketBalanceValue);
+ }
+ return this; // ignore
+}
+public RecoveredElement add(ImportReference importReference, int bracketBalanceValue) {
+ if (this.imports == null) {
+ this.imports = new RecoveredImport[5];
+ this.importCount = 0;
+ } else {
+ if (this.importCount == this.imports.length) {
+ System.arraycopy(
+ this.imports,
+ 0,
+ (this.imports = new RecoveredImport[2 * this.importCount]),
+ 0,
+ this.importCount);
+ }
+ }
+ RecoveredImport element = new RecoveredImport(importReference, this, bracketBalanceValue);
+ this.imports[this.importCount++] = element;
+
+ /* if import not finished, then import becomes current */
+ if (importReference.declarationSourceEnd == 0) return element;
+ return this;
+}
+public RecoveredElement add(TypeDeclaration typeDeclaration, int bracketBalanceValue) {
+
+ if ((typeDeclaration.bits & ASTNode.IsAnonymousTypeMASK) != 0){
+ if (this.typeCount > 0) {
+ // add it to the last type
+ RecoveredType lastType = this.types[this.typeCount-1];
+ lastType.bodyEnd = 0; // reopen type
+ lastType.typeDeclaration.bodyEnd = 0; // reopen type
+ lastType.typeDeclaration.declarationSourceEnd = 0; // reopen type
+ lastType.bracketBalance++; // expect one closing brace
+ return lastType.add(typeDeclaration, bracketBalanceValue);
+ }
+ }
+ if (this.types == null) {
+ this.types = new RecoveredType[5];
+ this.typeCount = 0;
+ } else {
+ if (this.typeCount == this.types.length) {
+ System.arraycopy(
+ this.types,
+ 0,
+ (this.types = new RecoveredType[2 * this.typeCount]),
+ 0,
+ this.typeCount);
+ }
+ }
+ RecoveredType element = new RecoveredType(typeDeclaration, this, bracketBalanceValue);
+ this.types[this.typeCount++] = element;
+
+ /* if type not finished, then type becomes current */
+ if (typeDeclaration.declarationSourceEnd == 0) return element;
+ return this;
+}
+/*
+ * Answer the associated parsed structure
+ */
+public ASTNode parseTree(){
+ return this.unitDeclaration;
+}
+/*
+ * Answer the very source end of the corresponding parse node
+ */
+public int sourceEnd(){
+ return this.unitDeclaration.sourceEnd;
+}
+public String toString(int tab) {
+ StringBuffer result = new StringBuffer(tabString(tab));
+ result.append("Recovered unit: [\n"); //$NON-NLS-1$
+ this.unitDeclaration.print(tab + 1, result);
+ result.append(tabString(tab + 1));
+ result.append("]"); //$NON-NLS-1$
+ if (this.imports != null) {
+ for (int i = 0; i < this.importCount; i++) {
+ result.append("\n"); //$NON-NLS-1$
+ result.append(this.imports[i].toString(tab + 1));
+ }
+ }
+ if (this.types != null) {
+ for (int i = 0; i < this.typeCount; i++) {
+ result.append("\n"); //$NON-NLS-1$
+ result.append(this.types[i].toString(tab + 1));
+ }
+ }
+ return result.toString();
+}
+public CompilationUnitDeclaration updatedCompilationUnitDeclaration(){
+
+ /* update imports */
+ if (this.importCount > 0){
+ ImportReference[] importRefences = new ImportReference[this.importCount];
+ for (int i = 0; i < this.importCount; i++){
+ importRefences[i] = this.imports[i].updatedImportReference();
+ }
+ this.unitDeclaration.imports = importRefences;
+ }
+ /* update types */
+ if (this.typeCount > 0){
+ int existingCount = this.unitDeclaration.types == null ? 0 : this.unitDeclaration.types.length;
+ TypeDeclaration[] typeDeclarations = new TypeDeclaration[existingCount + this.typeCount];
+ if (existingCount > 0){
+ System.arraycopy(this.unitDeclaration.types, 0, typeDeclarations, 0, existingCount);
+ }
+ // may need to update the declarationSourceEnd of the last type
+ if (this.types[this.typeCount - 1].typeDeclaration.declarationSourceEnd == 0){
+ this.types[this.typeCount - 1].typeDeclaration.declarationSourceEnd = this.unitDeclaration.sourceEnd;
+ this.types[this.typeCount - 1].typeDeclaration.bodyEnd = this.unitDeclaration.sourceEnd;
+ }
+ int actualCount = existingCount;
+ for (int i = 0; i < this.typeCount; i++){
+ TypeDeclaration typeDecl = this.types[i].updatedTypeDeclaration();
+ // filter out local types (12454)
+ if ((typeDecl.bits & ASTNode.IsLocalTypeMASK) == 0){
+ typeDeclarations[actualCount++] = typeDecl;
+ }
+ }
+ if (actualCount != this.typeCount){
+ System.arraycopy(
+ typeDeclarations,
+ 0,
+ typeDeclarations = new TypeDeclaration[existingCount+actualCount],
+ 0,
+ existingCount+actualCount);
+ }
+ this.unitDeclaration.types = typeDeclarations;
+ }
+ return this.unitDeclaration;
+}
+public void updateParseTree(){
+ this.updatedCompilationUnitDeclaration();
+}
+/*
+ * Update the sourceEnd of the corresponding parse node
+ */
+public void updateSourceEndIfNecessary(int bodyStart, int bodyEnd){
+ if (this.unitDeclaration.sourceEnd == 0)
+ this.unitDeclaration.sourceEnd = bodyEnd;
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/Scanner.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/Scanner.js
new file mode 100644
index 0000000..96f4571
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/Scanner.js
@@ -0,0 +1,3587 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.parser;
+
+import java.util.Iterator;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.core.compiler.InvalidInputException;
+import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
+import org.eclipse.wst.jsdt.internal.compiler.ast.StringLiteral;
+import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
+
+/**
+ * IMPORTANT NOTE: Internal Scanner implementation. It is mirrored in
+ * org.eclipse.wst.jsdt.core.compiler public package where it is API.
+ * The mirror implementation is using the backward compatible ITerminalSymbols constant
+ * definitions (stable with 2.0), whereas the internal implementation uses TerminalTokens
+ * which constant values reflect the latest parser generation state.
+ */
+public class Scanner implements TerminalTokens {
+
+ /* APIs ares
+ - getNextToken() which return the current type of the token
+ (this value is not memorized by the scanner)
+ - getCurrentTokenSource() which provides with the token "REAL" source
+ (aka all unicode have been transformed into a correct char)
+ - sourceStart gives the position into the stream
+ - currentPosition-1 gives the sourceEnd position into the stream
+ */
+ private long sourceLevel;
+ // 1.4 feature
+ public boolean useAssertAsAnIndentifier = false;
+ //flag indicating if processed source contains occurrences of keyword assert
+ public boolean containsAssertKeyword = false;
+
+ // 1.5 feature
+ public boolean useEnumAsAnIndentifier = false;
+
+ public boolean recordLineSeparator = false;
+ public char currentCharacter;
+ public int startPosition;
+ public int currentPosition;
+ public int initialPosition, eofPosition;
+ // after this position eof are generated instead of real token from the source
+
+ public boolean tokenizeComments = false;
+ public boolean tokenizeWhiteSpace = false;
+
+ //source should be viewed as a window (aka a part)
+ //of a entire very large stream
+ public char source[];
+
+ //unicode support
+ public char[] withoutUnicodeBuffer;
+ public int withoutUnicodePtr; //when == 0 ==> no unicode in the current token
+ public boolean unicodeAsBackSlash = false;
+
+ public boolean scanningFloatLiteral = false;
+
+ //support for /** comments
+ public int[] commentStops = new int[10];
+ public int[] commentStarts = new int[10];
+ public int commentPtr = -1; // no comment test with commentPtr value -1
+ protected int lastCommentLinePosition = -1;
+
+ // task tag support
+ public char[][] foundTaskTags = null;
+ public char[][] foundTaskMessages;
+ public char[][] foundTaskPriorities = null;
+ public int[][] foundTaskPositions;
+ public int foundTaskCount = 0;
+ public char[][] taskTags = null;
+ public char[][] taskPriorities = null;
+ public boolean isTaskCaseSensitive = true;
+
+ //diet parsing support - jump over some method body when requested
+ public boolean diet = false;
+
+ //support for the poor-line-debuggers ....
+ //remember the position of the cr/lf
+ public int[] lineEnds = new int[250];
+ public int linePtr = -1;
+ public boolean wasAcr = false;
+
+ public static final String END_OF_SOURCE = "End_Of_Source"; //$NON-NLS-1$
+
+ public static final String INVALID_HEXA = "Invalid_Hexa_Literal"; //$NON-NLS-1$
+ public static final String INVALID_OCTAL = "Invalid_Octal_Literal"; //$NON-NLS-1$
+ public static final String INVALID_CHARACTER_CONSTANT = "Invalid_Character_Constant"; //$NON-NLS-1$
+ public static final String INVALID_ESCAPE = "Invalid_Escape"; //$NON-NLS-1$
+ public static final String INVALID_INPUT = "Invalid_Input"; //$NON-NLS-1$
+ public static final String INVALID_UNICODE_ESCAPE = "Invalid_Unicode_Escape"; //$NON-NLS-1$
+ public static final String INVALID_FLOAT = "Invalid_Float_Literal"; //$NON-NLS-1$
+
+ public static final String NULL_SOURCE_STRING = "Null_Source_String"; //$NON-NLS-1$
+ public static final String UNTERMINATED_STRING = "Unterminated_String"; //$NON-NLS-1$
+ public static final String UNTERMINATED_COMMENT = "Unterminated_Comment"; //$NON-NLS-1$
+ public static final String INVALID_CHAR_IN_STRING = "Invalid_Char_In_String"; //$NON-NLS-1$
+ public static final String INVALID_DIGIT = "Invalid_Digit"; //$NON-NLS-1$
+
+ //----------------optimized identifier managment------------------
+ static final char[] charArray_a = new char[] {'a'},
+ charArray_b = new char[] {'b'},
+ charArray_c = new char[] {'c'},
+ charArray_d = new char[] {'d'},
+ charArray_e = new char[] {'e'},
+ charArray_f = new char[] {'f'},
+ charArray_g = new char[] {'g'},
+ charArray_h = new char[] {'h'},
+ charArray_i = new char[] {'i'},
+ charArray_j = new char[] {'j'},
+ charArray_k = new char[] {'k'},
+ charArray_l = new char[] {'l'},
+ charArray_m = new char[] {'m'},
+ charArray_n = new char[] {'n'},
+ charArray_o = new char[] {'o'},
+ charArray_p = new char[] {'p'},
+ charArray_q = new char[] {'q'},
+ charArray_r = new char[] {'r'},
+ charArray_s = new char[] {'s'},
+ charArray_t = new char[] {'t'},
+ charArray_u = new char[] {'u'},
+ charArray_v = new char[] {'v'},
+ charArray_w = new char[] {'w'},
+ charArray_x = new char[] {'x'},
+ charArray_y = new char[] {'y'},
+ charArray_z = new char[] {'z'};
+
+ static final char[] initCharArray =
+ new char[] {'\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000'};
+ static final int TableSize = 30, InternalTableSize = 6; //30*6 = 180 entries
+ public static final int OptimizedLength = 6;
+ public /*static*/ final char[][][][] charArray_length =
+ new char[OptimizedLength][TableSize][InternalTableSize][];
+ // support for detecting non-externalized string literals
+ public NLSLine currentLine= null;
+ public static final String TAG_PREFIX= "//$NON-NLS-"; //$NON-NLS-1$
+ public static final int TAG_PREFIX_LENGTH= TAG_PREFIX.length();
+ public static final String TAG_POSTFIX= "$"; //$NON-NLS-1$
+ public static final int TAG_POSTFIX_LENGTH= TAG_POSTFIX.length();
+ public StringLiteral[] nonNLSStrings = null;
+ public boolean checkNonExternalizedStringLiterals = false;
+ public boolean wasNonExternalizedStringLiteral = false;
+
+ // generic support
+ public boolean returnOnlyGreater = false;
+
+ /*static*/ {
+ for (int i = 0; i < 6; i++) {
+ for (int j = 0; j < TableSize; j++) {
+ for (int k = 0; k < InternalTableSize; k++) {
+ this.charArray_length[i][j][k] = initCharArray;
+ }
+ }
+ }
+ }
+ static int newEntry2 = 0,
+ newEntry3 = 0,
+ newEntry4 = 0,
+ newEntry5 = 0,
+ newEntry6 = 0;
+
+ public static final int RoundBracket = 0;
+ public static final int SquareBracket = 1;
+ public static final int CurlyBracket = 2;
+ public static final int BracketKinds = 3;
+
+public Scanner() {
+ this(false /*comment*/, false /*whitespace*/, false /*nls*/, ClassFileConstants.JDK1_3 /*sourceLevel*/, null/*taskTag*/, null/*taskPriorities*/, true /*taskCaseSensitive*/);
+}
+
+public Scanner(
+ boolean tokenizeComments,
+ boolean tokenizeWhiteSpace,
+ boolean checkNonExternalizedStringLiterals,
+ long sourceLevel,
+ char[][] taskTags,
+ char[][] taskPriorities,
+ boolean isTaskCaseSensitive) {
+
+ this.eofPosition = Integer.MAX_VALUE;
+ this.tokenizeComments = tokenizeComments;
+ this.tokenizeWhiteSpace = tokenizeWhiteSpace;
+ this.checkNonExternalizedStringLiterals = checkNonExternalizedStringLiterals;
+ this.sourceLevel = sourceLevel;
+ this.taskTags = taskTags;
+ this.taskPriorities = taskPriorities;
+ this.isTaskCaseSensitive = isTaskCaseSensitive;
+}
+
+public final boolean atEnd() {
+ // This code is not relevant if source is
+ // Only a part of the real stream input
+
+ return this.source.length == this.currentPosition;
+}
+
+private void checkNonExternalizedString() {
+ if (this.currentLine == null)
+ return;
+ parseTags(this.currentLine);
+}
+
+// chech presence of task: tags
+// TODO (frederic) see if we need to take unicode characters into account...
+public void checkTaskTag(int commentStart, int commentEnd) {
+ char[] src = this.source;
+
+ // only look for newer task: tags
+ if (this.foundTaskCount > 0
+ && this.foundTaskPositions[this.foundTaskCount - 1][0] >= commentStart) {
+ return;
+ }
+ int foundTaskIndex = this.foundTaskCount;
+ char previous = src[commentStart+1]; // should be '*' or '/'
+ nextChar : for (
+ int i = commentStart + 2; i < commentEnd && i < this.eofPosition; i++) {
+ char[] tag = null;
+ char[] priority = null;
+ // check for tag occurrence only if not ambiguous with javadoc tag
+ if (previous != '@') {
+ nextTag : for (int itag = 0; itag < this.taskTags.length; itag++) {
+ tag = this.taskTags[itag];
+ int tagLength = tag.length;
+ if (tagLength == 0) continue nextTag;
+
+ // ensure tag is not leaded with letter if tag starts with a letter
+ if (Character.isJavaIdentifierStart(tag[0])) {
+ if (Character.isJavaIdentifierPart(previous)) {
+ continue nextTag;
+ }
+ }
+
+ for (int t = 0; t < tagLength; t++) {
+ char sc, tc;
+ int x = i+t;
+ if (x >= this.eofPosition || x >= commentEnd) continue nextTag;
+ if ((sc = src[i + t]) != (tc = tag[t])) { // case sensitive check
+ if (this.isTaskCaseSensitive || (Character.toLowerCase(sc) != Character.toLowerCase(tc))) { // case insensitive check
+ continue nextTag;
+ }
+ }
+ }
+ // ensure tag is not followed with letter if tag finishes with a letter
+ if (i+tagLength < commentEnd && Character.isJavaIdentifierPart(src[i+tagLength-1])) {
+ if (Character.isJavaIdentifierPart(src[i + tagLength]))
+ continue nextTag;
+ }
+ if (this.foundTaskTags == null) {
+ this.foundTaskTags = new char[5][];
+ this.foundTaskMessages = new char[5][];
+ this.foundTaskPriorities = new char[5][];
+ this.foundTaskPositions = new int[5][];
+ } else if (this.foundTaskCount == this.foundTaskTags.length) {
+ System.arraycopy(this.foundTaskTags, 0, this.foundTaskTags = new char[this.foundTaskCount * 2][], 0, this.foundTaskCount);
+ System.arraycopy(this.foundTaskMessages, 0, this.foundTaskMessages = new char[this.foundTaskCount * 2][], 0, this.foundTaskCount);
+ System.arraycopy(this.foundTaskPriorities, 0, this.foundTaskPriorities = new char[this.foundTaskCount * 2][], 0, this.foundTaskCount);
+ System.arraycopy(this.foundTaskPositions, 0, this.foundTaskPositions = new int[this.foundTaskCount * 2][], 0, this.foundTaskCount);
+ }
+
+ priority = this.taskPriorities != null && itag < this.taskPriorities.length
+ ? this.taskPriorities[itag]
+ : null;
+
+ this.foundTaskTags[this.foundTaskCount] = tag;
+ this.foundTaskPriorities[this.foundTaskCount] = priority;
+ this.foundTaskPositions[this.foundTaskCount] = new int[] { i, i + tagLength - 1 };
+ this.foundTaskMessages[this.foundTaskCount] = CharOperation.NO_CHAR;
+ this.foundTaskCount++;
+ i += tagLength - 1; // will be incremented when looping
+ break nextTag;
+ }
+ }
+ previous = src[i];
+ }
+ for (int i = foundTaskIndex; i < this.foundTaskCount; i++) {
+ // retrieve message start and end positions
+ int msgStart = this.foundTaskPositions[i][0] + this.foundTaskTags[i].length;
+ int max_value = i + 1 < this.foundTaskCount
+ ? this.foundTaskPositions[i + 1][0] - 1
+ : commentEnd - 1;
+ // at most beginning of next task
+ if (max_value < msgStart) {
+ max_value = msgStart; // would only occur if tag is before EOF.
+ }
+ int end = -1;
+ char c;
+ for (int j = msgStart; j < max_value; j++) {
+ if ((c = src[j]) == '\n' || c == '\r') {
+ end = j - 1;
+ break;
+ }
+ }
+ if (end == -1) {
+ for (int j = max_value; j > msgStart; j--) {
+ if ((c = src[j]) == '*') {
+ end = j - 1;
+ break;
+ }
+ }
+ if (end == -1)
+ end = max_value;
+ }
+ if (msgStart == end)
+ continue; // empty
+ // trim the message
+ while (CharOperation.isWhitespace(src[end]) && msgStart <= end)
+ end--;
+ while (CharOperation.isWhitespace(src[msgStart]) && msgStart <= end)
+ msgStart++;
+ // update the end position of the task
+ this.foundTaskPositions[i][1] = end;
+ // get the message source
+ final int messageLength = end - msgStart + 1;
+ char[] message = new char[messageLength];
+ System.arraycopy(src, msgStart, message, 0, messageLength);
+ this.foundTaskMessages[i] = message;
+ }
+}
+public char[] getCurrentIdentifierSource() {
+ //return the token REAL source (aka unicodes are precomputed)
+
+ char[] result;
+ if (this.withoutUnicodePtr != 0) {
+ //0 is used as a fast test flag so the real first char is in position 1
+ System.arraycopy(
+ this.withoutUnicodeBuffer,
+ 1,
+ result = new char[this.withoutUnicodePtr],
+ 0,
+ this.withoutUnicodePtr);
+ } else {
+ int length = this.currentPosition - this.startPosition;
+ if (length == this.source.length) return this.source;
+ switch (length) { // see OptimizedLength
+ case 1 :
+ return optimizedCurrentTokenSource1();
+ case 2 :
+ return optimizedCurrentTokenSource2();
+ case 3 :
+ return optimizedCurrentTokenSource3();
+ case 4 :
+ return optimizedCurrentTokenSource4();
+ case 5 :
+ return optimizedCurrentTokenSource5();
+ case 6 :
+ return optimizedCurrentTokenSource6();
+ }
+ //no optimization
+ System.arraycopy(this.source, this.startPosition, result = new char[length], 0, length);
+ }
+ return result;
+}
+public int getCurrentTokenEndPosition(){
+ return this.currentPosition - 1;
+}
+public final char[] getCurrentTokenSource() {
+ // Return the token REAL source (aka unicodes are precomputed)
+
+ char[] result;
+ if (this.withoutUnicodePtr != 0)
+ // 0 is used as a fast test flag so the real first char is in position 1
+ System.arraycopy(
+ this.withoutUnicodeBuffer,
+ 1,
+ result = new char[this.withoutUnicodePtr],
+ 0,
+ this.withoutUnicodePtr);
+ else {
+ int length;
+ System.arraycopy(
+ this.source,
+ this.startPosition,
+ result = new char[length = this.currentPosition - this.startPosition],
+ 0,
+ length);
+ }
+ return result;
+}
+public final char[] getCurrentTokenSourceString() {
+ //return the token REAL source (aka unicodes are precomputed).
+ //REMOVE the two " that are at the beginning and the end.
+
+ char[] result;
+ if (this.withoutUnicodePtr != 0)
+ //0 is used as a fast test flag so the real first char is in position 1
+ System.arraycopy(this.withoutUnicodeBuffer, 2,
+ //2 is 1 (real start) + 1 (to jump over the ")
+ result = new char[this.withoutUnicodePtr - 2], 0, this.withoutUnicodePtr - 2);
+ else {
+ int length;
+ System.arraycopy(
+ this.source,
+ this.startPosition + 1,
+ result = new char[length = this.currentPosition - this.startPosition - 2],
+ 0,
+ length);
+ }
+ return result;
+}
+
+public final char[] getRawTokenSource() {
+ int length = this.currentPosition - this.startPosition;
+ char[] tokenSource = new char[length];
+ System.arraycopy(this.source, this.startPosition, tokenSource, 0, length);
+ return tokenSource;
+}
+
+public final char[] getRawTokenSourceEnd() {
+ int length = this.eofPosition - this.currentPosition - 1;
+ char[] sourceEnd = new char[length];
+ System.arraycopy(this.source, this.currentPosition, sourceEnd, 0, length);
+ return sourceEnd;
+}
+
+public int getCurrentTokenStartPosition(){
+ return this.startPosition;
+}
+/*
+ * Search the source position corresponding to the end of a given line number
+ *
+ * Line numbers are 1-based, and relative to the scanner initialPosition.
+ * Character positions are 0-based.
+ *
+ * In case the given line number is inconsistent, answers -1.
+ */
+public final int getLineEnd(int lineNumber) {
+
+ if (this.lineEnds == null)
+ return -1;
+ if (lineNumber > this.lineEnds.length+1)
+ return -1;
+ if (lineNumber <= 0)
+ return -1;
+ if (lineNumber == this.lineEnds.length + 1)
+ return this.eofPosition;
+ return this.lineEnds[lineNumber-1]; // next line start one character behind the lineEnd of the previous line
+}
+
+public final int[] getLineEnds() {
+ //return a bounded copy of this.lineEnds
+
+ int[] copy;
+ System.arraycopy(this.lineEnds, 0, copy = new int[this.linePtr + 1], 0, this.linePtr + 1);
+ return copy;
+}
+
+/**
+ * Search the source position corresponding to the beginning of a given line number
+ *
+ * Line numbers are 1-based, and relative to the scanner initialPosition.
+ * Character positions are 0-based.
+ *
+ * e.g. getLineStart(1) --> 0 indicates that the first line starts at character 0.
+ *
+ * In case the given line number is inconsistent, answers -1.
+ *
+ * @param lineNumber int
+ * @return int
+ */
+public final int getLineStart(int lineNumber) {
+
+ if (this.lineEnds == null)
+ return -1;
+ if (lineNumber > this.lineEnds.length + 1)
+ return -1;
+ if (lineNumber <= 0)
+ return -1;
+
+ if (lineNumber == 1)
+ return this.initialPosition;
+ return this.lineEnds[lineNumber-2]+1; // next line start one character behind the lineEnd of the previous line
+}
+public final int getNextChar() {
+ try {
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ && (this.source[this.currentPosition] == 'u')) {
+ //-------------unicode traitement ------------
+ int c1, c2, c3, c4;
+ int unicodeSize = 6;
+ this.currentPosition++;
+ while (this.source[this.currentPosition] == 'u') {
+ this.currentPosition++;
+ unicodeSize++;
+ }
+
+ if (((c1 = Character.getNumericValue(this.source[this.currentPosition++])) > 15
+ || c1 < 0)
+ || ((c2 = Character.getNumericValue(this.source[this.currentPosition++])) > 15 || c2 < 0)
+ || ((c3 = Character.getNumericValue(this.source[this.currentPosition++])) > 15 || c3 < 0)
+ || ((c4 = Character.getNumericValue(this.source[this.currentPosition++])) > 15 || c4 < 0)) {
+ return -1;
+ }
+
+ this.currentCharacter = (char) (((c1 * 16 + c2) * 16 + c3) * 16 + c4);
+
+ this.unicodeAsBackSlash = this.currentCharacter == '\\';
+
+ //need the unicode buffer
+ if (this.withoutUnicodePtr == 0) {
+ //buffer all the entries that have been left aside....
+ unicodeInitializeBuffer(this.currentPosition - unicodeSize - this.startPosition);
+ }
+ //fill the buffer with the char
+ unicodeStoreAt(++this.withoutUnicodePtr);
+ return this.currentCharacter;
+
+ } //-------------end unicode traitement--------------
+ else {
+ this.unicodeAsBackSlash = false;
+ if (this.withoutUnicodePtr != 0) {
+ unicodeStoreAt(++this.withoutUnicodePtr);
+ }
+ return this.currentCharacter;
+ }
+ } catch (IndexOutOfBoundsException e) {
+ return -1;
+ }
+}
+public final boolean getNextChar(char testedChar) {
+ //BOOLEAN
+ //handle the case of unicode.
+ //when a unicode appears then we must use a buffer that holds char internal values
+ //At the end of this method currentCharacter holds the new visited char
+ //and currentPosition points right next after it
+ //Both previous lines are true if the currentCharacter is == to the testedChar
+ //On false, no side effect has occured.
+
+ //ALL getNextChar.... ARE OPTIMIZED COPIES
+
+ if (this.currentPosition >= this.source.length) { // handle the obvious case upfront
+ this.unicodeAsBackSlash = false;
+ return false;
+ }
+
+ int temp = this.currentPosition;
+ try {
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ && (this.source[this.currentPosition] == 'u')) {
+ //-------------unicode traitement ------------
+ int c1, c2, c3, c4;
+ int unicodeSize = 6;
+ this.currentPosition++;
+ while (this.source[this.currentPosition] == 'u') {
+ this.currentPosition++;
+ unicodeSize++;
+ }
+
+ if (((c1 = Character.getNumericValue(this.source[this.currentPosition++])) > 15
+ || c1 < 0)
+ || ((c2 = Character.getNumericValue(this.source[this.currentPosition++])) > 15 || c2 < 0)
+ || ((c3 = Character.getNumericValue(this.source[this.currentPosition++])) > 15 || c3 < 0)
+ || ((c4 = Character.getNumericValue(this.source[this.currentPosition++])) > 15 || c4 < 0)) {
+ this.currentPosition = temp;
+ return false;
+ }
+
+ this.currentCharacter = (char) (((c1 * 16 + c2) * 16 + c3) * 16 + c4);
+ if (this.currentCharacter != testedChar) {
+ this.currentPosition = temp;
+ return false;
+ }
+ this.unicodeAsBackSlash = this.currentCharacter == '\\';
+
+ //need the unicode buffer
+ if (this.withoutUnicodePtr == 0) {
+ //buffer all the entries that have been left aside....
+ unicodeInitializeBuffer(this.currentPosition - unicodeSize - this.startPosition);
+ }
+ //fill the buffer with the char
+ unicodeStoreAt(++this.withoutUnicodePtr);
+ return true;
+
+ } //-------------end unicode traitement--------------
+ else {
+ if (this.currentCharacter != testedChar) {
+ this.currentPosition = temp;
+ return false;
+ }
+ this.unicodeAsBackSlash = false;
+ if (this.withoutUnicodePtr != 0)
+ unicodeStoreAt(++this.withoutUnicodePtr);
+ return true;
+ }
+ } catch (IndexOutOfBoundsException e) {
+ this.unicodeAsBackSlash = false;
+ this.currentPosition = temp;
+ return false;
+ }
+}
+public final int getNextChar(char testedChar1, char testedChar2) {
+ //INT 0 : testChar1 \\\\///\\\\ 1 : testedChar2 \\\\///\\\\ -1 : others
+ //test can be done with (x==0) for the first and (x>0) for the second
+ //handle the case of unicode.
+ //when a unicode appears then we must use a buffer that holds char internal values
+ //At the end of this method currentCharacter holds the new visited char
+ //and currentPosition points right next after it
+ //Both previous lines are true if the currentCharacter is == to the testedChar1/2
+ //On false, no side effect has occured.
+
+ //ALL getNextChar.... ARE OPTIMIZED COPIES
+ if (this.currentPosition >= this.source.length) // handle the obvious case upfront
+ return -1;
+
+ int temp = this.currentPosition;
+ try {
+ int result;
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ && (this.source[this.currentPosition] == 'u')) {
+ //-------------unicode traitement ------------
+ int c1, c2, c3, c4;
+ int unicodeSize = 6;
+ this.currentPosition++;
+ while (this.source[this.currentPosition] == 'u') {
+ this.currentPosition++;
+ unicodeSize++;
+ }
+
+ if (((c1 = Character.getNumericValue(this.source[this.currentPosition++])) > 15
+ || c1 < 0)
+ || ((c2 = Character.getNumericValue(this.source[this.currentPosition++])) > 15 || c2 < 0)
+ || ((c3 = Character.getNumericValue(this.source[this.currentPosition++])) > 15 || c3 < 0)
+ || ((c4 = Character.getNumericValue(this.source[this.currentPosition++])) > 15 || c4 < 0)) {
+ this.currentPosition = temp;
+ return 2;
+ }
+
+ this.currentCharacter = (char) (((c1 * 16 + c2) * 16 + c3) * 16 + c4);
+ if (this.currentCharacter == testedChar1)
+ result = 0;
+ else
+ if (this.currentCharacter == testedChar2)
+ result = 1;
+ else {
+ this.currentPosition = temp;
+ return -1;
+ }
+
+ //need the unicode buffer
+ if (this.withoutUnicodePtr == 0) {
+ //buffer all the entries that have been left aside....
+ unicodeInitializeBuffer(this.currentPosition - unicodeSize - this.startPosition);
+ }
+ //fill the buffer with the char
+ unicodeStoreAt(++this.withoutUnicodePtr);
+ return result;
+ } //-------------end unicode traitement--------------
+ else {
+ if (this.currentCharacter == testedChar1)
+ result = 0;
+ else
+ if (this.currentCharacter == testedChar2)
+ result = 1;
+ else {
+ this.currentPosition = temp;
+ return -1;
+ }
+
+ if (this.withoutUnicodePtr != 0)
+ unicodeStoreAt(++this.withoutUnicodePtr);
+ return result;
+ }
+ } catch (IndexOutOfBoundsException e) {
+ this.currentPosition = temp;
+ return -1;
+ }
+}
+public final boolean getNextCharAsDigit() throws InvalidInputException {
+ //BOOLEAN
+ //handle the case of unicode.
+ //when a unicode appears then we must use a buffer that holds char internal values
+ //At the end of this method currentCharacter holds the new visited char
+ //and currentPosition points right next after it
+ //Both previous lines are true if the currentCharacter is a digit
+ //On false, no side effect has occured.
+
+ //ALL getNextChar.... ARE OPTIMIZED COPIES
+ if (this.currentPosition >= this.source.length) // handle the obvious case upfront
+ return false;
+
+ int temp = this.currentPosition;
+ try {
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ && (this.source[this.currentPosition] == 'u')) {
+ //-------------unicode traitement ------------
+ int c1, c2, c3, c4;
+ int unicodeSize = 6;
+ this.currentPosition++;
+ while (this.source[this.currentPosition] == 'u') {
+ this.currentPosition++;
+ unicodeSize++;
+ }
+
+ if (((c1 = Character.getNumericValue(this.source[this.currentPosition++])) > 15
+ || c1 < 0)
+ || ((c2 = Character.getNumericValue(this.source[this.currentPosition++])) > 15 || c2 < 0)
+ || ((c3 = Character.getNumericValue(this.source[this.currentPosition++])) > 15 || c3 < 0)
+ || ((c4 = Character.getNumericValue(this.source[this.currentPosition++])) > 15 || c4 < 0)) {
+ this.currentPosition = temp;
+ return false;
+ }
+
+ this.currentCharacter = (char) (((c1 * 16 + c2) * 16 + c3) * 16 + c4);
+ if (!isDigit(this.currentCharacter)) {
+ this.currentPosition = temp;
+ return false;
+ }
+
+ //need the unicode buffer
+ if (this.withoutUnicodePtr == 0) {
+ //buffer all the entries that have been left aside....
+ unicodeInitializeBuffer(this.currentPosition - unicodeSize - this.startPosition);
+ }
+ //fill the buffer with the char
+ unicodeStoreAt(++this.withoutUnicodePtr);
+ return true;
+ } //-------------end unicode traitement--------------
+ else {
+ if (!isDigit(this.currentCharacter)) {
+ this.currentPosition = temp;
+ return false;
+ }
+ if (this.withoutUnicodePtr != 0)
+ unicodeStoreAt(++this.withoutUnicodePtr);
+ return true;
+ }
+ } catch (IndexOutOfBoundsException e) {
+ this.currentPosition = temp;
+ return false;
+ }
+}
+public final boolean getNextCharAsDigit(int radix) {
+ //BOOLEAN
+ //handle the case of unicode.
+ //when a unicode appears then we must use a buffer that holds char internal values
+ //At the end of this method currentCharacter holds the new visited char
+ //and currentPosition points right next after it
+ //Both previous lines are true if the currentCharacter is a digit base on radix
+ //On false, no side effect has occured.
+
+ //ALL getNextChar.... ARE OPTIMIZED COPIES
+ if (this.currentPosition >= this.source.length) // handle the obvious case upfront
+ return false;
+
+ int temp = this.currentPosition;
+ try {
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ && (this.source[this.currentPosition] == 'u')) {
+ //-------------unicode traitement ------------
+ int c1, c2, c3, c4;
+ int unicodeSize = 6;
+ this.currentPosition++;
+ while (this.source[this.currentPosition] == 'u') {
+ this.currentPosition++;
+ unicodeSize++;
+ }
+
+ if (((c1 = Character.getNumericValue(this.source[this.currentPosition++])) > 15
+ || c1 < 0)
+ || ((c2 = Character.getNumericValue(this.source[this.currentPosition++])) > 15 || c2 < 0)
+ || ((c3 = Character.getNumericValue(this.source[this.currentPosition++])) > 15 || c3 < 0)
+ || ((c4 = Character.getNumericValue(this.source[this.currentPosition++])) > 15 || c4 < 0)) {
+ this.currentPosition = temp;
+ return false;
+ }
+
+ this.currentCharacter = (char) (((c1 * 16 + c2) * 16 + c3) * 16 + c4);
+ if (Character.digit(this.currentCharacter, radix) == -1) {
+ this.currentPosition = temp;
+ return false;
+ }
+
+ //need the unicode buffer
+ if (this.withoutUnicodePtr == 0) {
+ //buffer all the entries that have been left aside....
+ unicodeInitializeBuffer(this.currentPosition - unicodeSize - this.startPosition);
+ }
+ //fill the buffer with the char
+ unicodeStoreAt(++this.withoutUnicodePtr);
+ return true;
+ } //-------------end unicode traitement--------------
+ else {
+ if (Character.digit(this.currentCharacter, radix) == -1) {
+ this.currentPosition = temp;
+ return false;
+ }
+ if (this.withoutUnicodePtr != 0)
+ unicodeStoreAt(++this.withoutUnicodePtr);
+ return true;
+ }
+ } catch (IndexOutOfBoundsException e) {
+ this.currentPosition = temp;
+ return false;
+ }
+}
+public boolean getNextCharAsJavaIdentifierPart() {
+ //BOOLEAN
+ //handle the case of unicode.
+ //when a unicode appears then we must use a buffer that holds char internal values
+ //At the end of this method currentCharacter holds the new visited char
+ //and currentPosition points right next after it
+ //Both previous lines are true if the currentCharacter is a JavaIdentifierPart
+ //On false, no side effect has occured.
+
+ //ALL getNextChar.... ARE OPTIMIZED COPIES
+ if (this.currentPosition >= this.source.length) // handle the obvious case upfront
+ return false;
+
+ int temp = this.currentPosition;
+ try {
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ && (this.source[this.currentPosition] == 'u')) {
+ //-------------unicode traitement ------------
+ int c1, c2, c3, c4;
+ int unicodeSize = 6;
+ this.currentPosition++;
+ while (this.source[this.currentPosition] == 'u') {
+ this.currentPosition++;
+ unicodeSize++;
+ }
+
+ if (((c1 = Character.getNumericValue(this.source[this.currentPosition++])) > 15
+ || c1 < 0)
+ || ((c2 = Character.getNumericValue(this.source[this.currentPosition++])) > 15 || c2 < 0)
+ || ((c3 = Character.getNumericValue(this.source[this.currentPosition++])) > 15 || c3 < 0)
+ || ((c4 = Character.getNumericValue(this.source[this.currentPosition++])) > 15 || c4 < 0)) {
+ this.currentPosition = temp;
+ return false;
+ }
+
+ this.currentCharacter = (char) (((c1 * 16 + c2) * 16 + c3) * 16 + c4);
+ if (!Character.isJavaIdentifierPart(this.currentCharacter)) {
+ this.currentPosition = temp;
+ return false;
+ }
+
+ //need the unicode buffer
+ if (this.withoutUnicodePtr == 0) {
+ //buffer all the entries that have been left aside....
+ unicodeInitializeBuffer(this.currentPosition - unicodeSize - this.startPosition);
+ }
+ //fill the buffer with the char
+ unicodeStoreAt(++this.withoutUnicodePtr);
+ return true;
+ } //-------------end unicode traitement--------------
+ else {
+ if (!Character.isJavaIdentifierPart(this.currentCharacter)) {
+ this.currentPosition = temp;
+ return false;
+ }
+
+ if (this.withoutUnicodePtr != 0)
+ unicodeStoreAt(++this.withoutUnicodePtr);
+ return true;
+ }
+ } catch (IndexOutOfBoundsException e) {
+ this.currentPosition = temp;
+ return false;
+ }
+}
+public int getNextToken() throws InvalidInputException {
+ this.wasAcr = false;
+ if (this.diet) {
+ jumpOverMethodBody();
+ this.diet = false;
+ return this.currentPosition > this.source.length ? TokenNameEOF : TokenNameRBRACE;
+ }
+ int whiteStart = 0;
+ try {
+ while (true) { //loop for jumping over comments
+ this.withoutUnicodePtr = 0;
+ //start with a new token (even comment written with unicode )
+
+ // ---------Consume white space and handles startPosition---------
+ whiteStart = this.currentPosition;
+ boolean isWhiteSpace, hasWhiteSpaces = false;
+ int offset = 0;
+ do {
+ this.startPosition = this.currentPosition;
+ boolean checkIfUnicode = false;
+ try {
+ checkIfUnicode = ((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ && (this.source[this.currentPosition] == 'u');
+ } catch(IndexOutOfBoundsException e) {
+ if (this.tokenizeWhiteSpace && (whiteStart != this.currentPosition - 1)) {
+ // reposition scanner in case we are interested by spaces as tokens
+ this.currentPosition--;
+ this.startPosition = whiteStart;
+ return TokenNameWHITESPACE;
+ }
+ if (this.currentPosition > this.eofPosition)
+ return TokenNameEOF;
+ }
+ if (checkIfUnicode) {
+ isWhiteSpace = jumpOverUnicodeWhiteSpace();
+ offset = 6;
+ } else {
+ offset = 1;
+ if ((this.currentCharacter == '\r') || (this.currentCharacter == '\n')) {
+ checkNonExternalizedString();
+ if (this.recordLineSeparator) {
+ pushLineSeparator();
+ } else {
+ this.currentLine = null;
+ }
+ }
+ isWhiteSpace =
+ (this.currentCharacter == ' ') || CharOperation.isWhitespace(this.currentCharacter);
+ }
+ if (isWhiteSpace) {
+ hasWhiteSpaces = true;
+ }
+ } while (isWhiteSpace);
+ if (this.tokenizeWhiteSpace && hasWhiteSpaces) {
+ // reposition scanner in case we are interested by spaces as tokens
+ this.currentPosition-=offset;
+ this.startPosition = whiteStart;
+ return TokenNameWHITESPACE;
+ }
+ //little trick to get out in the middle of a source compuation
+ if (this.currentPosition > this.eofPosition)
+ return TokenNameEOF;
+
+ // ---------Identify the next token-------------
+
+ switch (this.currentCharacter) {
+ case '@' :
+/* if (this.sourceLevel >= ClassFileConstants.JDK1_5) {
+ return TokenNameAT;
+ } else {
+ return TokenNameERROR;
+ }*/
+ return TokenNameAT;
+ case '(' :
+ return TokenNameLPAREN;
+ case ')' :
+ return TokenNameRPAREN;
+ case '{' :
+ return TokenNameLBRACE;
+ case '}' :
+ return TokenNameRBRACE;
+ case '[' :
+ return TokenNameLBRACKET;
+ case ']' :
+ return TokenNameRBRACKET;
+ case ';' :
+ return TokenNameSEMICOLON;
+ case ',' :
+ return TokenNameCOMMA;
+ case '.' :
+ if (getNextCharAsDigit()) {
+ return scanNumber(true);
+ }
+/* if (this.sourceLevel >= ClassFileConstants.JDK1_5) {
+ int temp = this.currentPosition;
+ if (getNextChar('.')) {
+ if (getNextChar('.')) {
+ return TokenNameELLIPSIS;
+ } else {
+ this.currentPosition = temp;
+ return TokenNameDOT;
+ }
+ } else {
+ this.currentPosition = temp;
+ return TokenNameDOT;
+ }
+ } else {
+ return TokenNameDOT;
+ }*/
+ int temp = this.currentPosition;
+ if (getNextChar('.')) {
+ if (getNextChar('.')) {
+ return TokenNameELLIPSIS;
+ } else {
+ this.currentPosition = temp;
+ return TokenNameDOT;
+ }
+ } else {
+ this.currentPosition = temp;
+ return TokenNameDOT;
+ }
+ case '+' :
+ {
+ int test;
+ if ((test = getNextChar('+', '=')) == 0)
+ return TokenNamePLUS_PLUS;
+ if (test > 0)
+ return TokenNamePLUS_EQUAL;
+ return TokenNamePLUS;
+ }
+ case '-' :
+ {
+ int test;
+ if ((test = getNextChar('-', '=')) == 0)
+ return TokenNameMINUS_MINUS;
+ if (test > 0)
+ return TokenNameMINUS_EQUAL;
+ return TokenNameMINUS;
+ }
+ case '~' :
+ return TokenNameTWIDDLE;
+ case '!' :
+ if (getNextChar('='))
+ return TokenNameNOT_EQUAL;
+ return TokenNameNOT;
+ case '*' :
+ if (getNextChar('='))
+ return TokenNameMULTIPLY_EQUAL;
+ return TokenNameMULTIPLY;
+ case '%' :
+ if (getNextChar('='))
+ return TokenNameREMAINDER_EQUAL;
+ return TokenNameREMAINDER;
+ case '<' :
+ {
+ int test;
+ if ((test = getNextChar('=', '<')) == 0)
+ return TokenNameLESS_EQUAL;
+ if (test > 0) {
+ if (getNextChar('='))
+ return TokenNameLEFT_SHIFT_EQUAL;
+ return TokenNameLEFT_SHIFT;
+ }
+ return TokenNameLESS;
+ }
+ case '>' :
+ {
+ int test;
+ if (this.returnOnlyGreater) {
+ return TokenNameGREATER;
+ }
+ if ((test = getNextChar('=', '>')) == 0)
+ return TokenNameGREATER_EQUAL;
+ if (test > 0) {
+ if ((test = getNextChar('=', '>')) == 0)
+ return TokenNameRIGHT_SHIFT_EQUAL;
+ if (test > 0) {
+ if (getNextChar('='))
+ return TokenNameUNSIGNED_RIGHT_SHIFT_EQUAL;
+ return TokenNameUNSIGNED_RIGHT_SHIFT;
+ }
+ return TokenNameRIGHT_SHIFT;
+ }
+ return TokenNameGREATER;
+ }
+ case '=' :
+ if (getNextChar('='))
+ return TokenNameEQUAL_EQUAL;
+ return TokenNameEQUAL;
+ case '&' :
+ {
+ int test;
+ if ((test = getNextChar('&', '=')) == 0)
+ return TokenNameAND_AND;
+ if (test > 0)
+ return TokenNameAND_EQUAL;
+ return TokenNameAND;
+ }
+ case '|' :
+ {
+ int test;
+ if ((test = getNextChar('|', '=')) == 0)
+ return TokenNameOR_OR;
+ if (test > 0)
+ return TokenNameOR_EQUAL;
+ return TokenNameOR;
+ }
+ case '^' :
+ if (getNextChar('='))
+ return TokenNameXOR_EQUAL;
+ return TokenNameXOR;
+ case '?' :
+ return TokenNameQUESTION;
+ case ':' :
+ return TokenNameCOLON;
+ case '\'' :
+ {
+ int test;
+ if ((test = getNextChar('\n', '\r')) == 0) {
+ throw new InvalidInputException(INVALID_CHARACTER_CONSTANT);
+ }
+ if (test > 0) {
+ // relocate if finding another quote fairly close: thus unicode '/u000D' will be fully consumed
+ for (int lookAhead = 0; lookAhead < 3; lookAhead++) {
+ if (this.currentPosition + lookAhead == this.source.length)
+ break;
+ if (this.source[this.currentPosition + lookAhead] == '\n')
+ break;
+ if (this.source[this.currentPosition + lookAhead] == '\'') {
+ this.currentPosition += lookAhead + 1;
+ break;
+ }
+ }
+ throw new InvalidInputException(INVALID_CHARACTER_CONSTANT);
+ }
+ }
+ if (getNextChar('\'')) {
+ // relocate if finding another quote fairly close: thus unicode '/u000D' will be fully consumed
+ for (int lookAhead = 0; lookAhead < 3; lookAhead++) {
+ if (this.currentPosition + lookAhead == this.source.length)
+ break;
+ if (this.source[this.currentPosition + lookAhead] == '\n')
+ break;
+ if (this.source[this.currentPosition + lookAhead] == '\'') {
+ this.currentPosition += lookAhead + 1;
+ break;
+ }
+ }
+ throw new InvalidInputException(INVALID_CHARACTER_CONSTANT);
+ }
+ if (getNextChar('\\'))
+ scanEscapeCharacter();
+ else { // consume next character
+ this.unicodeAsBackSlash = false;
+ boolean checkIfUnicode = false;
+ try {
+ checkIfUnicode = ((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ && (this.source[this.currentPosition] == 'u');
+ } catch(IndexOutOfBoundsException e) {
+ this.currentPosition--;
+ throw new InvalidInputException(INVALID_CHARACTER_CONSTANT);
+ }
+ if (checkIfUnicode) {
+ getNextUnicodeChar();
+ } else {
+ if (this.withoutUnicodePtr != 0) {
+ unicodeStoreAt(++this.withoutUnicodePtr);
+ }
+ }
+ }
+ if (getNextChar('\''))
+ return TokenNameCharacterLiteral;
+ // relocate if finding another quote fairly close: thus unicode '/u000D' will be fully consumed
+ for (int lookAhead = 0; lookAhead < 20; lookAhead++) {
+ if (this.currentPosition + lookAhead == this.source.length)
+ break;
+ if (this.source[this.currentPosition + lookAhead] == '\n')
+ break;
+ if (this.source[this.currentPosition + lookAhead] == '\'') {
+ this.currentPosition += lookAhead + 1;
+ break;
+ }
+ }
+ throw new InvalidInputException(INVALID_CHARACTER_CONSTANT);
+ case '"' :
+ try {
+ // consume next character
+ this.unicodeAsBackSlash = false;
+ boolean isUnicode = false;
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ && (this.source[this.currentPosition] == 'u')) {
+ getNextUnicodeChar();
+ isUnicode = true;
+ } else {
+ if (this.withoutUnicodePtr != 0) {
+ unicodeStoreAt(++this.withoutUnicodePtr);
+ }
+ }
+
+ while (this.currentCharacter != '"') {
+ /**** \r and \n are not valid in string literals ****/
+ if ((this.currentCharacter == '\n') || (this.currentCharacter == '\r')) {
+ // relocate if finding another quote fairly close: thus unicode '/u000D' will be fully consumed
+ if (isUnicode) {
+ int start = this.currentPosition;
+ for (int lookAhead = 0; lookAhead < 50; lookAhead++) {
+ if (this.currentPosition >= this.eofPosition) {
+ this.currentPosition = start;
+ break;
+ }
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\') && (this.source[this.currentPosition] == 'u')) {
+ isUnicode = true;
+ getNextUnicodeChar();
+ } else {
+ isUnicode = false;
+ }
+ if (!isUnicode && this.currentCharacter == '\n') {
+ this.currentPosition--; // set current position on new line character
+ break;
+ }
+ if (this.currentCharacter == '\"') {
+ throw new InvalidInputException(INVALID_CHAR_IN_STRING);
+ }
+ }
+ } else {
+ this.currentPosition--; // set current position on new line character
+ }
+ throw new InvalidInputException(INVALID_CHAR_IN_STRING);
+ }
+ if (this.currentCharacter == '\\') {
+ int escapeSize = this.currentPosition;
+ boolean backSlashAsUnicodeInString = this.unicodeAsBackSlash;
+ //scanEscapeCharacter make a side effect on this value and we need the previous value few lines down this one
+ scanEscapeCharacter();
+ escapeSize = this.currentPosition - escapeSize;
+ if (this.withoutUnicodePtr == 0) {
+ //buffer all the entries that have been left aside....
+ unicodeInitializeBuffer(this.currentPosition - escapeSize - 1 - this.startPosition);
+ unicodeStoreAt(++this.withoutUnicodePtr);
+ } else { //overwrite the / in the buffer
+ unicodeStoreAt(this.withoutUnicodePtr);
+ if (backSlashAsUnicodeInString) { //there are TWO \ in the stream where only one is correct
+ this.withoutUnicodePtr--;
+ }
+ }
+ }
+ // consume next character
+ this.unicodeAsBackSlash = false;
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ && (this.source[this.currentPosition] == 'u')) {
+ getNextUnicodeChar();
+ } else {
+ if (this.withoutUnicodePtr != 0) {
+ unicodeStoreAt(++this.withoutUnicodePtr);
+ }
+ }
+
+ }
+ } catch (IndexOutOfBoundsException e) {
+ this.currentPosition--;
+ throw new InvalidInputException(UNTERMINATED_STRING);
+ } catch (InvalidInputException e) {
+ if (e.getMessage().equals(INVALID_ESCAPE)) {
+ // relocate if finding another quote fairly close: thus unicode '/u000D' will be fully consumed
+ for (int lookAhead = 0; lookAhead < 50; lookAhead++) {
+ if (this.currentPosition + lookAhead == this.source.length)
+ break;
+ if (this.source[this.currentPosition + lookAhead] == '\n')
+ break;
+ if (this.source[this.currentPosition + lookAhead] == '\"') {
+ this.currentPosition += lookAhead + 1;
+ break;
+ }
+ }
+
+ }
+ throw e; // rethrow
+ }
+ if (this.checkNonExternalizedStringLiterals){ // check for presence of NLS tags //$NON-NLS-?$ where ? is an int.
+ if (this.currentLine == null) {
+ this.currentLine = new NLSLine();
+ }
+ this.currentLine.add(
+ new StringLiteral(
+ getCurrentTokenSourceString(),
+ this.startPosition,
+ this.currentPosition - 1));
+ }
+ return TokenNameStringLiteral;
+ case '/' :
+ {
+ int test;
+ if ((test = getNextChar('/', '*')) == 0) { //line comment
+ this.lastCommentLinePosition = this.currentPosition;
+ try { //get the next char
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ && (this.source[this.currentPosition] == 'u')) {
+ //-------------unicode traitement ------------
+ int c1 = 0, c2 = 0, c3 = 0, c4 = 0;
+ this.currentPosition++;
+ while (this.source[this.currentPosition] == 'u') {
+ this.currentPosition++;
+ }
+ if ((c1 = Character.getNumericValue(this.source[this.currentPosition++])) > 15
+ || c1 < 0
+ || (c2 = Character.getNumericValue(this.source[this.currentPosition++])) > 15
+ || c2 < 0
+ || (c3 = Character.getNumericValue(this.source[this.currentPosition++])) > 15
+ || c3 < 0
+ || (c4 = Character.getNumericValue(this.source[this.currentPosition++])) > 15
+ || c4 < 0) {
+ throw new InvalidInputException(INVALID_UNICODE_ESCAPE);
+ } else {
+ this.currentCharacter = (char) (((c1 * 16 + c2) * 16 + c3) * 16 + c4);
+ }
+ }
+
+ //handle the \\u case manually into comment
+ if (this.currentCharacter == '\\') {
+ if (this.source[this.currentPosition] == '\\')
+ this.currentPosition++;
+ } //jump over the \\
+ boolean isUnicode = false;
+ while (this.currentCharacter != '\r' && this.currentCharacter != '\n') {
+ this.lastCommentLinePosition = this.currentPosition;
+ //get the next char
+ isUnicode = false;
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ && (this.source[this.currentPosition] == 'u')) {
+ isUnicode = true;
+ //-------------unicode traitement ------------
+ int c1 = 0, c2 = 0, c3 = 0, c4 = 0;
+ this.currentPosition++;
+ while (this.source[this.currentPosition] == 'u') {
+ this.currentPosition++;
+ }
+ if ((c1 = Character.getNumericValue(this.source[this.currentPosition++])) > 15
+ || c1 < 0
+ || (c2 = Character.getNumericValue(this.source[this.currentPosition++])) > 15
+ || c2 < 0
+ || (c3 = Character.getNumericValue(this.source[this.currentPosition++])) > 15
+ || c3 < 0
+ || (c4 = Character.getNumericValue(this.source[this.currentPosition++])) > 15
+ || c4 < 0) {
+ throw new InvalidInputException(INVALID_UNICODE_ESCAPE);
+ } else {
+ this.currentCharacter = (char) (((c1 * 16 + c2) * 16 + c3) * 16 + c4);
+ }
+ }
+ //handle the \\u case manually into comment
+ if (this.currentCharacter == '\\') {
+ if (this.source[this.currentPosition] == '\\')
+ this.currentPosition++;
+ } //jump over the \\
+ }
+ /*
+ * We need to completely consume the line break
+ */
+ if (this.currentCharacter == '\r'
+ && this.source.length > this.currentPosition) {
+ if (this.source[this.currentPosition] == '\n') {
+ this.currentPosition++;
+ this.currentCharacter = '\n';
+ } else if ((this.source[this.currentPosition] == '\\')
+ && (this.source[this.currentPosition + 1] == 'u')) {
+ isUnicode = true;
+ char unicodeChar;
+ int index = this.currentPosition + 1;
+ index++;
+ while (this.source[index] == 'u') {
+ index++;
+ }
+ //-------------unicode traitement ------------
+ int c1 = 0, c2 = 0, c3 = 0, c4 = 0;
+ if ((c1 = Character.getNumericValue(this.source[index++])) > 15
+ || c1 < 0
+ || (c2 = Character.getNumericValue(this.source[index++])) > 15
+ || c2 < 0
+ || (c3 = Character.getNumericValue(this.source[index++])) > 15
+ || c3 < 0
+ || (c4 = Character.getNumericValue(this.source[index++])) > 15
+ || c4 < 0) {
+ this.currentPosition = index;
+ throw new InvalidInputException(INVALID_UNICODE_ESCAPE);
+ } else {
+ unicodeChar = (char) (((c1 * 16 + c2) * 16 + c3) * 16 + c4);
+ }
+ if (unicodeChar == '\n') {
+ this.currentPosition = index;
+ this.currentCharacter = '\n';
+ }
+ }
+ }
+ recordComment(TokenNameCOMMENT_LINE);
+ if (this.taskTags != null) checkTaskTag(this.startPosition, this.currentPosition);
+ if ((this.currentCharacter == '\r') || (this.currentCharacter == '\n')) {
+ checkNonExternalizedString();
+ if (this.recordLineSeparator) {
+ if (isUnicode) {
+ pushUnicodeLineSeparator();
+ } else {
+ pushLineSeparator();
+ }
+ } else {
+ this.currentLine = null;
+ }
+ }
+ if (this.tokenizeComments) {
+ return TokenNameCOMMENT_LINE;
+ }
+ } catch (IndexOutOfBoundsException e) {
+ this.currentPosition--;
+ recordComment(TokenNameCOMMENT_LINE);
+ if (this.taskTags != null) checkTaskTag(this.startPosition, this.currentPosition);
+ if (this.tokenizeComments) {
+ return TokenNameCOMMENT_LINE;
+ } else {
+ this.currentPosition++;
+ }
+ }
+ break;
+ }
+ if (test > 0) { //traditional and javadoc comment
+ try { //get the next char
+ boolean isJavadoc = false, star = false;
+ boolean isUnicode = false;
+ // consume next character
+ this.unicodeAsBackSlash = false;
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ && (this.source[this.currentPosition] == 'u')) {
+ getNextUnicodeChar();
+ isUnicode = true;
+ } else {
+ isUnicode = false;
+ if (this.withoutUnicodePtr != 0) {
+ unicodeStoreAt(++this.withoutUnicodePtr);
+ }
+ }
+
+ if (this.currentCharacter == '*') {
+ isJavadoc = true;
+ star = true;
+ }
+ if ((this.currentCharacter == '\r') || (this.currentCharacter == '\n')) {
+ checkNonExternalizedString();
+ if (this.recordLineSeparator) {
+ if (!isUnicode) {
+ pushLineSeparator();
+ }
+ } else {
+ this.currentLine = null;
+ }
+ }
+ isUnicode = false;
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ && (this.source[this.currentPosition] == 'u')) {
+ //-------------unicode traitement ------------
+ getNextUnicodeChar();
+ isUnicode = true;
+ } else {
+ isUnicode = false;
+ }
+ //handle the \\u case manually into comment
+ if (this.currentCharacter == '\\') {
+ if (this.source[this.currentPosition] == '\\')
+ this.currentPosition++; //jump over the \\
+ }
+ // empty comment is not a javadoc /**/
+ if (this.currentCharacter == '/') {
+ isJavadoc = false;
+ }
+ //loop until end of comment */
+ while ((this.currentCharacter != '/') || (!star)) {
+ if ((this.currentCharacter == '\r') || (this.currentCharacter == '\n')) {
+ checkNonExternalizedString();
+ if (this.recordLineSeparator) {
+ if (!isUnicode) {
+ pushLineSeparator();
+ }
+ } else {
+ this.currentLine = null;
+ }
+ }
+ star = this.currentCharacter == '*';
+ //get next char
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ && (this.source[this.currentPosition] == 'u')) {
+ //-------------unicode traitement ------------
+ getNextUnicodeChar();
+ isUnicode = true;
+ } else {
+ isUnicode = false;
+ }
+ //handle the \\u case manually into comment
+ if (this.currentCharacter == '\\') {
+ if (this.source[this.currentPosition] == '\\')
+ this.currentPosition++;
+ } //jump over the \\
+ }
+ int token = isJavadoc ? TokenNameCOMMENT_JAVADOC : TokenNameCOMMENT_BLOCK;
+ recordComment(token);
+ if (this.taskTags != null) checkTaskTag(this.startPosition, this.currentPosition);
+ if (this.tokenizeComments) {
+ /*
+ if (isJavadoc)
+ return TokenNameCOMMENT_JAVADOC;
+ return TokenNameCOMMENT_BLOCK;
+ */
+ return token;
+ }
+ } catch (IndexOutOfBoundsException e) {
+ this.currentPosition--;
+ throw new InvalidInputException(UNTERMINATED_COMMENT);
+ }
+ break;
+ }
+ if (getNextChar('='))
+ return TokenNameDIVIDE_EQUAL;
+ return TokenNameDIVIDE;
+ }
+ case '\u001a' :
+ if (atEnd())
+ return TokenNameEOF;
+ //the atEnd may not be <currentPosition == source.length> if source is only some part of a real (external) stream
+ throw new InvalidInputException("Ctrl-Z"); //$NON-NLS-1$
+
+ default :
+ if (Character.isJavaIdentifierStart(this.currentCharacter))
+ return scanIdentifierOrKeyword();
+ if (isDigit(this.currentCharacter)) {
+ return scanNumber(false);
+ }
+ return TokenNameERROR;
+ }
+ }
+ } //-----------------end switch while try--------------------
+ catch (IndexOutOfBoundsException e) {
+ if (this.tokenizeWhiteSpace && (whiteStart != this.currentPosition - 1)) {
+ // reposition scanner in case we are interested by spaces as tokens
+ this.currentPosition--;
+ this.startPosition = whiteStart;
+ return TokenNameWHITESPACE;
+ }
+ }
+ return TokenNameEOF;
+}
+public final void getNextUnicodeChar()
+ throws InvalidInputException {
+ //VOID
+ //handle the case of unicode.
+ //when a unicode appears then we must use a buffer that holds char internal values
+ //At the end of this method currentCharacter holds the new visited char
+ //and currentPosition points right next after it
+
+ //ALL getNextChar.... ARE OPTIMIZED COPIES
+
+ try {
+ int c1 = 0, c2 = 0, c3 = 0, c4 = 0, unicodeSize = 6;
+ this.currentPosition++;
+ while (this.source[this.currentPosition] == 'u') {
+ this.currentPosition++;
+ unicodeSize++;
+ }
+
+ if ((c1 = Character.getNumericValue(this.source[this.currentPosition++])) > 15
+ || c1 < 0
+ || (c2 = Character.getNumericValue(this.source[this.currentPosition++])) > 15
+ || c2 < 0
+ || (c3 = Character.getNumericValue(this.source[this.currentPosition++])) > 15
+ || c3 < 0
+ || (c4 = Character.getNumericValue(this.source[this.currentPosition++])) > 15
+ || c4 < 0){
+ throw new InvalidInputException(INVALID_UNICODE_ESCAPE);
+ } else {
+ this.currentCharacter = (char) (((c1 * 16 + c2) * 16 + c3) * 16 + c4);
+ //need the unicode buffer
+ if (this.withoutUnicodePtr == 0) {
+ //buffer all the entries that have been left aside....
+ unicodeInitializeBuffer(this.currentPosition - unicodeSize - this.startPosition);
+ }
+ //fill the buffer with the char
+ unicodeStoreAt(++this.withoutUnicodePtr);
+ }
+ this.unicodeAsBackSlash = this.currentCharacter == '\\';
+ } catch (ArrayIndexOutOfBoundsException e) {
+ this.currentPosition--;
+ throw new InvalidInputException(INVALID_UNICODE_ESCAPE);
+ }
+}
+
+public char[] getSource(){
+ return this.source;
+}
+private boolean isDigit(char c) throws InvalidInputException {
+ if (Character.isDigit(c)) {
+ switch(c) {
+ case '0' :
+ case '1' :
+ case '2' :
+ case '3' :
+ case '4' :
+ case '5' :
+ case '6' :
+ case '7' :
+ case '8' :
+ case '9' :
+ return true;
+ }
+ throw new InvalidInputException(Scanner.INVALID_DIGIT);
+ } else {
+ return false;
+ }
+}
+/* Tokenize a method body, assuming that curly brackets are properly balanced.
+ */
+public final void jumpOverMethodBody() {
+
+ this.wasAcr = false;
+ int found = 1;
+ try {
+ while (true) { //loop for jumping over comments
+ // ---------Consume white space and handles startPosition---------
+ boolean isWhiteSpace;
+ do {
+ this.startPosition = this.currentPosition;
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ && (this.source[this.currentPosition] == 'u')) {
+ isWhiteSpace = jumpOverUnicodeWhiteSpace();
+ } else {
+ if (this.recordLineSeparator
+ && ((this.currentCharacter == '\r') || (this.currentCharacter == '\n')))
+ pushLineSeparator();
+ isWhiteSpace = CharOperation.isWhitespace(this.currentCharacter);
+ }
+ } while (isWhiteSpace);
+
+ // -------consume token until } is found---------
+ switch (this.currentCharacter) {
+ case '{' :
+ found++;
+ break;
+ case '}' :
+ found--;
+ if (found == 0)
+ return;
+ break;
+ case '\'' :
+ {
+ boolean test;
+ test = getNextChar('\\');
+ if (test) {
+ try {
+ scanEscapeCharacter();
+ } catch (InvalidInputException ex) {
+ // ignore
+ }
+ } else {
+ try { // consume next character
+ this.unicodeAsBackSlash = false;
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ && (this.source[this.currentPosition] == 'u')) {
+ getNextUnicodeChar();
+ } else {
+ if (this.withoutUnicodePtr != 0) {
+ unicodeStoreAt(++this.withoutUnicodePtr);
+ }
+ }
+ } catch (InvalidInputException ex) {
+ // ignore
+ }
+ }
+ getNextChar('\'');
+ break;
+ }
+ case '"' :
+ try {
+ try { // consume next character
+ this.unicodeAsBackSlash = false;
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ && (this.source[this.currentPosition] == 'u')) {
+ getNextUnicodeChar();
+ } else {
+ if (this.withoutUnicodePtr != 0) {
+ unicodeStoreAt(++this.withoutUnicodePtr);
+ }
+ }
+ } catch (InvalidInputException ex) {
+ // ignore
+ }
+ while (this.currentCharacter != '"') {
+ if (this.currentCharacter == '\r'){
+ if (this.source[this.currentPosition] == '\n') this.currentPosition++;
+ break; // the string cannot go further that the line
+ }
+ if (this.currentCharacter == '\n'){
+ break; // the string cannot go further that the line
+ }
+ if (this.currentCharacter == '\\') {
+ try {
+ scanEscapeCharacter();
+ } catch (InvalidInputException ex) {
+ // ignore
+ }
+ }
+ try { // consume next character
+ this.unicodeAsBackSlash = false;
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ && (this.source[this.currentPosition] == 'u')) {
+ getNextUnicodeChar();
+ } else {
+ if (this.withoutUnicodePtr != 0) {
+ unicodeStoreAt(++this.withoutUnicodePtr);
+ }
+ }
+ } catch (InvalidInputException ex) {
+ // ignore
+ }
+ }
+ } catch (IndexOutOfBoundsException e) {
+ return;
+ }
+ break;
+ case '/' :
+ {
+ int test;
+ if ((test = getNextChar('/', '*')) == 0) { //line comment
+ try {
+ this.lastCommentLinePosition = this.currentPosition;
+ //get the next char
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ && (this.source[this.currentPosition] == 'u')) {
+ //-------------unicode traitement ------------
+ int c1 = 0, c2 = 0, c3 = 0, c4 = 0;
+ this.currentPosition++;
+ while (this.source[this.currentPosition] == 'u') {
+ this.currentPosition++;
+ }
+ if ((c1 = Character.getNumericValue(this.source[this.currentPosition++])) > 15
+ || c1 < 0
+ || (c2 = Character.getNumericValue(this.source[this.currentPosition++])) > 15
+ || c2 < 0
+ || (c3 = Character.getNumericValue(this.source[this.currentPosition++])) > 15
+ || c3 < 0
+ || (c4 = Character.getNumericValue(this.source[this.currentPosition++])) > 15
+ || c4 < 0) { //error don't care of the value
+ this.currentCharacter = 'A';
+ } //something different from \n and \r
+ else {
+ this.currentCharacter = (char) (((c1 * 16 + c2) * 16 + c3) * 16 + c4);
+ }
+ }
+ //handle the \\u case manually into comment
+ if (this.currentCharacter == '\\') {
+ if (this.source[this.currentPosition] == '\\')
+ this.currentPosition++;
+ } //jump over the \\
+ boolean isUnicode = false;
+ while (this.currentCharacter != '\r' && this.currentCharacter != '\n') {
+ this.lastCommentLinePosition = this.currentPosition;
+ //get the next char
+ isUnicode = false;
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ && (this.source[this.currentPosition] == 'u')) {
+ isUnicode = true;
+ //-------------unicode traitement ------------
+ int c1 = 0, c2 = 0, c3 = 0, c4 = 0;
+ this.currentPosition++;
+ while (this.source[this.currentPosition] == 'u') {
+ this.currentPosition++;
+ }
+ if ((c1 = Character.getNumericValue(this.source[this.currentPosition++])) > 15
+ || c1 < 0
+ || (c2 = Character.getNumericValue(this.source[this.currentPosition++])) > 15
+ || c2 < 0
+ || (c3 = Character.getNumericValue(this.source[this.currentPosition++])) > 15
+ || c3 < 0
+ || (c4 = Character.getNumericValue(this.source[this.currentPosition++])) > 15
+ || c4 < 0) { //error don't care of the value
+ this.currentCharacter = 'A';
+ } //something different from \n and \r
+ else {
+ this.currentCharacter = (char) (((c1 * 16 + c2) * 16 + c3) * 16 + c4);
+ }
+ }
+ //handle the \\u case manually into comment
+ if (this.currentCharacter == '\\') {
+ if (this.source[this.currentPosition] == '\\')
+ this.currentPosition++;
+ } //jump over the \\
+ }
+ /*
+ * We need to completely consume the line break
+ */
+ if (this.currentCharacter == '\r'
+ && this.source.length > this.currentPosition) {
+ if (this.source[this.currentPosition] == '\n') {
+ this.currentPosition++;
+ this.currentCharacter = '\n';
+ } else if ((this.source[this.currentPosition] == '\\')
+ && (this.source[this.currentPosition + 1] == 'u')) {
+ isUnicode = true;
+ char unicodeChar;
+ int index = this.currentPosition + 1;
+ index++;
+ while (this.source[index] == 'u') {
+ index++;
+ }
+ //-------------unicode traitement ------------
+ int c1 = 0, c2 = 0, c3 = 0, c4 = 0;
+ if ((c1 = Character.getNumericValue(this.source[index++])) > 15
+ || c1 < 0
+ || (c2 = Character.getNumericValue(this.source[index++])) > 15
+ || c2 < 0
+ || (c3 = Character.getNumericValue(this.source[index++])) > 15
+ || c3 < 0
+ || (c4 = Character.getNumericValue(this.source[index++])) > 15
+ || c4 < 0) { //error don't care of the value
+ unicodeChar = 'A';
+ } else {
+ unicodeChar = (char) (((c1 * 16 + c2) * 16 + c3) * 16 + c4);
+ }
+ if (unicodeChar == '\n') {
+ this.currentPosition = index;
+ this.currentCharacter = '\n';
+ }
+ }
+ }
+ recordComment(TokenNameCOMMENT_LINE);
+ if (this.recordLineSeparator
+ && ((this.currentCharacter == '\r') || (this.currentCharacter == '\n'))) {
+ if (isUnicode) {
+ pushUnicodeLineSeparator();
+ } else {
+ pushLineSeparator();
+ }
+ }
+ } catch (IndexOutOfBoundsException e) {
+ //an eof will then be generated
+ this.currentPosition--;
+ recordComment(TokenNameCOMMENT_LINE);
+ if (!this.tokenizeComments) {
+ this.currentPosition++;
+ }
+ }
+ break;
+ }
+ if (test > 0) { //traditional and javadoc comment
+ boolean isJavadoc = false;
+ try { //get the next char
+ boolean star = false;
+ boolean isUnicode = false;
+ // consume next character
+ this.unicodeAsBackSlash = false;
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ && (this.source[this.currentPosition] == 'u')) {
+ getNextUnicodeChar();
+ isUnicode = true;
+ } else {
+ isUnicode = false;
+ if (this.withoutUnicodePtr != 0) {
+ unicodeStoreAt(++this.withoutUnicodePtr);
+ }
+ }
+
+ if (this.currentCharacter == '*') {
+ isJavadoc = true;
+ star = true;
+ }
+ if ((this.currentCharacter == '\r') || (this.currentCharacter == '\n')) {
+ if (this.recordLineSeparator) {
+ if (isUnicode) {
+ pushUnicodeLineSeparator();
+ } else {
+ pushLineSeparator();
+ }
+ } else {
+ this.currentLine = null;
+ }
+ }
+ isUnicode = false;
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ && (this.source[this.currentPosition] == 'u')) {
+ //-------------unicode traitement ------------
+ getNextUnicodeChar();
+ isUnicode = true;
+ } else {
+ isUnicode = false;
+ }
+ //handle the \\u case manually into comment
+ if (this.currentCharacter == '\\') {
+ if (this.source[this.currentPosition] == '\\')
+ this.currentPosition++; //jump over the \\
+ }
+ // empty comment is not a javadoc /**/
+ if (this.currentCharacter == '/') {
+ isJavadoc = false;
+ }
+ //loop until end of comment */
+ while ((this.currentCharacter != '/') || (!star)) {
+ if ((this.currentCharacter == '\r') || (this.currentCharacter == '\n')) {
+ if (this.recordLineSeparator) {
+ if (isUnicode) {
+ pushUnicodeLineSeparator();
+ } else {
+ pushLineSeparator();
+ }
+ } else {
+ this.currentLine = null;
+ }
+ }
+ star = this.currentCharacter == '*';
+ //get next char
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ && (this.source[this.currentPosition] == 'u')) {
+ //-------------unicode traitement ------------
+ getNextUnicodeChar();
+ isUnicode = true;
+ } else {
+ isUnicode = false;
+ }
+ //handle the \\u case manually into comment
+ if (this.currentCharacter == '\\') {
+ if (this.source[this.currentPosition] == '\\')
+ this.currentPosition++;
+ } //jump over the \\
+ }
+ recordComment(isJavadoc ? TokenNameCOMMENT_JAVADOC : TokenNameCOMMENT_BLOCK);
+ } catch (IndexOutOfBoundsException e) {
+ return;
+ }
+ break;
+ }
+ break;
+ }
+
+ default :
+ if (Character.isJavaIdentifierStart(this.currentCharacter)) {
+ scanIdentifierOrKeyword();
+ break;
+ }
+ if (isDigit(this.currentCharacter)) {
+ try {
+ scanNumber(false);
+ } catch (InvalidInputException ex) {
+ // ignore
+ }
+ break;
+ }
+ }
+ }
+ //-----------------end switch while try--------------------
+ } catch (IndexOutOfBoundsException e) {
+ // ignore
+ } catch (InvalidInputException e) {
+ // ignore
+ }
+ return;
+}
+public final boolean jumpOverUnicodeWhiteSpace() throws InvalidInputException {
+ //BOOLEAN
+ //handle the case of unicode. Jump over the next whiteSpace
+ //making startPosition pointing on the next available char
+ //On false, the currentCharacter is filled up with a potential
+ //correct char
+
+ try {
+ this.wasAcr = false;
+ int c1, c2, c3, c4;
+ int unicodeSize = 6;
+ this.currentPosition++;
+ while (this.source[this.currentPosition] == 'u') {
+ this.currentPosition++;
+ unicodeSize++;
+ }
+
+ if (((c1 = Character.getNumericValue(this.source[this.currentPosition++])) > 15
+ || c1 < 0)
+ || ((c2 = Character.getNumericValue(this.source[this.currentPosition++])) > 15 || c2 < 0)
+ || ((c3 = Character.getNumericValue(this.source[this.currentPosition++])) > 15 || c3 < 0)
+ || ((c4 = Character.getNumericValue(this.source[this.currentPosition++])) > 15 || c4 < 0)) {
+ throw new InvalidInputException(INVALID_UNICODE_ESCAPE);
+ }
+
+ this.currentCharacter = (char) (((c1 * 16 + c2) * 16 + c3) * 16 + c4);
+ if (CharOperation.isWhitespace(this.currentCharacter))
+ return true;
+
+ //buffer the new char which is not a white space
+ unicodeStoreAt(++this.withoutUnicodePtr);
+ //this.withoutUnicodePtr == 1 is true here
+ return false;
+ } catch (IndexOutOfBoundsException e){
+ this.currentPosition--;
+ throw new InvalidInputException(INVALID_UNICODE_ESCAPE);
+ }
+}
+
+final char[] optimizedCurrentTokenSource1() {
+ //return always the same char[] build only once
+
+ //optimization at no speed cost of 99.5 % of the singleCharIdentifier
+ char charOne = this.source[this.startPosition];
+ switch (charOne) {
+ case 'a' :
+ return charArray_a;
+ case 'b' :
+ return charArray_b;
+ case 'c' :
+ return charArray_c;
+ case 'd' :
+ return charArray_d;
+ case 'e' :
+ return charArray_e;
+ case 'f' :
+ return charArray_f;
+ case 'g' :
+ return charArray_g;
+ case 'h' :
+ return charArray_h;
+ case 'i' :
+ return charArray_i;
+ case 'j' :
+ return charArray_j;
+ case 'k' :
+ return charArray_k;
+ case 'l' :
+ return charArray_l;
+ case 'm' :
+ return charArray_m;
+ case 'n' :
+ return charArray_n;
+ case 'o' :
+ return charArray_o;
+ case 'p' :
+ return charArray_p;
+ case 'q' :
+ return charArray_q;
+ case 'r' :
+ return charArray_r;
+ case 's' :
+ return charArray_s;
+ case 't' :
+ return charArray_t;
+ case 'u' :
+ return charArray_u;
+ case 'v' :
+ return charArray_v;
+ case 'w' :
+ return charArray_w;
+ case 'x' :
+ return charArray_x;
+ case 'y' :
+ return charArray_y;
+ case 'z' :
+ return charArray_z;
+ default :
+ return new char[] {charOne};
+ }
+}
+final char[] optimizedCurrentTokenSource2() {
+ //try to return the same char[] build only once
+
+ char c0, c1;
+ int hash =
+ (((c0 = this.source[this.startPosition]) << 6) + (c1 = this.source[this.startPosition + 1]))
+ % TableSize;
+ char[][] table = this.charArray_length[0][hash];
+ int i = newEntry2;
+ while (++i < InternalTableSize) {
+ char[] charArray = table[i];
+ if ((c0 == charArray[0]) && (c1 == charArray[1]))
+ return charArray;
+ }
+ //---------other side---------
+ i = -1;
+ int max = newEntry2;
+ while (++i <= max) {
+ char[] charArray = table[i];
+ if ((c0 == charArray[0]) && (c1 == charArray[1]))
+ return charArray;
+ }
+ //--------add the entry-------
+ if (++max >= InternalTableSize) max = 0;
+ char[] r;
+ table[max] = (r = new char[] {c0, c1});
+ newEntry2 = max;
+ return r;
+}
+final char[] optimizedCurrentTokenSource3() {
+ //try to return the same char[] build only once
+
+ char c0, c1, c2;
+ int hash =
+ (((c0 = this.source[this.startPosition]) << 12)
+ + ((c1 = this.source[this.startPosition + 1]) << 6)
+ + (c2 = this.source[this.startPosition + 2]))
+ % TableSize;
+ char[][] table = this.charArray_length[1][hash];
+ int i = newEntry3;
+ while (++i < InternalTableSize) {
+ char[] charArray = table[i];
+ if ((c0 == charArray[0]) && (c1 == charArray[1]) && (c2 == charArray[2]))
+ return charArray;
+ }
+ //---------other side---------
+ i = -1;
+ int max = newEntry3;
+ while (++i <= max) {
+ char[] charArray = table[i];
+ if ((c0 == charArray[0]) && (c1 == charArray[1]) && (c2 == charArray[2]))
+ return charArray;
+ }
+ //--------add the entry-------
+ if (++max >= InternalTableSize) max = 0;
+ char[] r;
+ table[max] = (r = new char[] {c0, c1, c2});
+ newEntry3 = max;
+ return r;
+}
+final char[] optimizedCurrentTokenSource4() {
+ //try to return the same char[] build only once
+
+ char c0, c1, c2, c3;
+ long hash =
+ ((((long) (c0 = this.source[this.startPosition])) << 18)
+ + ((c1 = this.source[this.startPosition + 1]) << 12)
+ + ((c2 = this.source[this.startPosition + 2]) << 6)
+ + (c3 = this.source[this.startPosition + 3]))
+ % TableSize;
+ char[][] table = this.charArray_length[2][(int) hash];
+ int i = newEntry4;
+ while (++i < InternalTableSize) {
+ char[] charArray = table[i];
+ if ((c0 == charArray[0])
+ && (c1 == charArray[1])
+ && (c2 == charArray[2])
+ && (c3 == charArray[3]))
+ return charArray;
+ }
+ //---------other side---------
+ i = -1;
+ int max = newEntry4;
+ while (++i <= max) {
+ char[] charArray = table[i];
+ if ((c0 == charArray[0])
+ && (c1 == charArray[1])
+ && (c2 == charArray[2])
+ && (c3 == charArray[3]))
+ return charArray;
+ }
+ //--------add the entry-------
+ if (++max >= InternalTableSize) max = 0;
+ char[] r;
+ table[max] = (r = new char[] {c0, c1, c2, c3});
+ newEntry4 = max;
+ return r;
+
+}
+final char[] optimizedCurrentTokenSource5() {
+ //try to return the same char[] build only once
+
+ char c0, c1, c2, c3, c4;
+ long hash =
+ ((((long) (c0 = this.source[this.startPosition])) << 24)
+ + (((long) (c1 = this.source[this.startPosition + 1])) << 18)
+ + ((c2 = this.source[this.startPosition + 2]) << 12)
+ + ((c3 = this.source[this.startPosition + 3]) << 6)
+ + (c4 = this.source[this.startPosition + 4]))
+ % TableSize;
+ char[][] table = this.charArray_length[3][(int) hash];
+ int i = newEntry5;
+ while (++i < InternalTableSize) {
+ char[] charArray = table[i];
+ if ((c0 == charArray[0])
+ && (c1 == charArray[1])
+ && (c2 == charArray[2])
+ && (c3 == charArray[3])
+ && (c4 == charArray[4]))
+ return charArray;
+ }
+ //---------other side---------
+ i = -1;
+ int max = newEntry5;
+ while (++i <= max) {
+ char[] charArray = table[i];
+ if ((c0 == charArray[0])
+ && (c1 == charArray[1])
+ && (c2 == charArray[2])
+ && (c3 == charArray[3])
+ && (c4 == charArray[4]))
+ return charArray;
+ }
+ //--------add the entry-------
+ if (++max >= InternalTableSize) max = 0;
+ char[] r;
+ table[max] = (r = new char[] {c0, c1, c2, c3, c4});
+ newEntry5 = max;
+ return r;
+
+}
+final char[] optimizedCurrentTokenSource6() {
+ //try to return the same char[] build only once
+
+ char c0, c1, c2, c3, c4, c5;
+ long hash =
+ ((((long) (c0 = this.source[this.startPosition])) << 32)
+ + (((long) (c1 = this.source[this.startPosition + 1])) << 24)
+ + (((long) (c2 = this.source[this.startPosition + 2])) << 18)
+ + ((c3 = this.source[this.startPosition + 3]) << 12)
+ + ((c4 = this.source[this.startPosition + 4]) << 6)
+ + (c5 = this.source[this.startPosition + 5]))
+ % TableSize;
+ char[][] table = this.charArray_length[4][(int) hash];
+ int i = newEntry6;
+ while (++i < InternalTableSize) {
+ char[] charArray = table[i];
+ if ((c0 == charArray[0])
+ && (c1 == charArray[1])
+ && (c2 == charArray[2])
+ && (c3 == charArray[3])
+ && (c4 == charArray[4])
+ && (c5 == charArray[5]))
+ return charArray;
+ }
+ //---------other side---------
+ i = -1;
+ int max = newEntry6;
+ while (++i <= max) {
+ char[] charArray = table[i];
+ if ((c0 == charArray[0])
+ && (c1 == charArray[1])
+ && (c2 == charArray[2])
+ && (c3 == charArray[3])
+ && (c4 == charArray[4])
+ && (c5 == charArray[5]))
+ return charArray;
+ }
+ //--------add the entry-------
+ if (++max >= InternalTableSize) max = 0;
+ char[] r;
+ table[max] = (r = new char[] {c0, c1, c2, c3, c4, c5});
+ newEntry6 = max;
+ return r;
+}
+private void parseTags(NLSLine line) {
+ String s = new String(getCurrentTokenSource());
+ int pos = s.indexOf(TAG_PREFIX);
+ int lineLength = line.size();
+ while (pos != -1) {
+ int start = pos + TAG_PREFIX_LENGTH;
+ int end = s.indexOf(TAG_POSTFIX, start);
+ if (end != -1) {
+ String index = s.substring(start, end);
+ int i = 0;
+ try {
+ i = Integer.parseInt(index) - 1; // Tags are one based not zero based.
+ } catch (NumberFormatException e) {
+ i = -1; // we don't want to consider this as a valid NLS tag
+ }
+ if (line.exists(i)) {
+ line.set(i, null);
+ }
+ }
+ pos = s.indexOf(TAG_PREFIX, start);
+ }
+
+ this.nonNLSStrings = new StringLiteral[lineLength];
+ int nonNLSCounter = 0;
+ for (Iterator iterator = line.iterator(); iterator.hasNext(); ) {
+ StringLiteral literal = (StringLiteral) iterator.next();
+ if (literal != null) {
+ this.nonNLSStrings[nonNLSCounter++] = literal;
+ }
+ }
+ if (nonNLSCounter == 0) {
+ this.nonNLSStrings = null;
+ this.currentLine = null;
+ return;
+ }
+ this.wasNonExternalizedStringLiteral = true;
+ if (nonNLSCounter != lineLength) {
+ System.arraycopy(this.nonNLSStrings, 0, (this.nonNLSStrings = new StringLiteral[nonNLSCounter]), 0, nonNLSCounter);
+ }
+ this.currentLine = null;
+}
+
+public final void pushLineSeparator() {
+ //see comment on isLineDelimiter(char) for the use of '\n' and '\r'
+ final int INCREMENT = 250;
+
+ if (this.checkNonExternalizedStringLiterals) {
+ // reinitialize the current line for non externalize strings purpose
+ this.currentLine = null;
+ }
+ //currentCharacter is at position currentPosition-1
+
+ // cr 000D
+ if (this.currentCharacter == '\r') {
+ int separatorPos = this.currentPosition - 1;
+ //TODO (olivier) david - why the following line was "if ((this.linePtr > 0) && (this.lineEnds[this.linePtr] >= separatorPos)) return;" ?
+ if ((this.linePtr >= 0) && (this.lineEnds[this.linePtr] >= separatorPos)) return;
+ //System.out.println("CR-" + separatorPos);
+ int length = this.lineEnds.length;
+ if (++this.linePtr >= length)
+ System.arraycopy(this.lineEnds, 0, this.lineEnds = new int[length + INCREMENT], 0, length);
+ this.lineEnds[this.linePtr] = separatorPos;
+ // look-ahead for merged cr+lf
+ try {
+ if (this.source[this.currentPosition] == '\n') {
+ //System.out.println("look-ahead LF-" + this.currentPosition);
+ this.lineEnds[this.linePtr] = this.currentPosition;
+ this.currentPosition++;
+ this.wasAcr = false;
+ } else {
+ this.wasAcr = true;
+ }
+ } catch(IndexOutOfBoundsException e) {
+ this.wasAcr = true;
+ }
+ } else {
+ // lf 000A
+ if (this.currentCharacter == '\n') { //must merge eventual cr followed by lf
+ if (this.wasAcr && (this.lineEnds[this.linePtr] == (this.currentPosition - 2))) {
+ //System.out.println("merge LF-" + (this.currentPosition - 1));
+ this.lineEnds[this.linePtr] = this.currentPosition - 1;
+ } else {
+ int separatorPos = this.currentPosition - 1;
+ //TODO (olivier) david - why the following line was "if ((this.linePtr > 0) && (this.lineEnds[this.linePtr] >= separatorPos)) return;" ?
+ if ((this.linePtr >= 0) && (this.lineEnds[this.linePtr] >= separatorPos)) return;
+ // System.out.println("LF-" + separatorPos);
+ int length = this.lineEnds.length;
+ if (++this.linePtr >= length)
+ System.arraycopy(this.lineEnds, 0, this.lineEnds = new int[length + INCREMENT], 0, length);
+ this.lineEnds[this.linePtr] = separatorPos;
+ }
+ this.wasAcr = false;
+ }
+ }
+}
+public final void pushUnicodeLineSeparator() {
+ if (this.checkNonExternalizedStringLiterals) {
+ // reinitialize the current line for non externalize strings purpose
+ this.currentLine = null;
+ }
+
+ // cr 000D
+ if (this.currentCharacter == '\r') {
+ if (this.source[this.currentPosition] == '\n') {
+ this.wasAcr = false;
+ } else {
+ this.wasAcr = true;
+ }
+ } else {
+ // lf 000A
+ if (this.currentCharacter == '\n') { //must merge eventual cr followed by lf
+ this.wasAcr = false;
+ }
+ }
+}
+public void recordComment(int token) {
+ // compute position
+ int stopPosition = this.currentPosition;
+ switch (token) {
+ case TokenNameCOMMENT_LINE:
+ stopPosition = -this.lastCommentLinePosition;
+ break;
+ case TokenNameCOMMENT_BLOCK:
+ stopPosition = -this.currentPosition;
+ break;
+ }
+
+ // a new comment is recorded
+ int length = this.commentStops.length;
+ if (++this.commentPtr >= length) {
+ System.arraycopy(this.commentStops, 0, this.commentStops = new int[length + 30], 0, length);
+ //grows the positions buffers too
+ System.arraycopy(this.commentStarts, 0, this.commentStarts = new int[length + 30], 0, length);
+ }
+ this.commentStops[this.commentPtr] = stopPosition;
+ this.commentStarts[this.commentPtr] = this.startPosition;
+}
+
+/**
+ * Reposition the scanner on some portion of the original source. The given endPosition is the last valid position.
+ * Beyond this position, the scanner will answer EOF tokens (<code>ITerminalSymbols.TokenNameEOF</code>).
+ *
+ * @param begin the given start position
+ * @param end the given end position
+ */
+public void resetTo(int begin, int end) {
+ //reset the scanner to a given position where it may rescan again
+
+ this.diet = false;
+ this.initialPosition = this.startPosition = this.currentPosition = begin;
+ this.eofPosition = end < Integer.MAX_VALUE ? end + 1 : end;
+ this.commentPtr = -1; // reset comment stack
+ this.foundTaskCount = 0;
+
+// // if resetTo is used with being > than end.
+// if (begin > this.eofPosition) {
+// begin = this.eofPosition;
+// }
+}
+
+public final void scanEscapeCharacter() throws InvalidInputException {
+ // the string with "\\u" is a legal string of two chars \ and u
+ //thus we use a direct access to the source (for regular cases).
+
+ if (this.unicodeAsBackSlash) {
+ // consume next character
+ this.unicodeAsBackSlash = false;
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\') && (this.source[this.currentPosition] == 'u')) {
+ getNextUnicodeChar();
+ } else {
+ if (this.withoutUnicodePtr != 0) {
+ unicodeStoreAt(++this.withoutUnicodePtr);
+ }
+ }
+ } else
+ this.currentCharacter = this.source[this.currentPosition++];
+ switch (this.currentCharacter) {
+ case 'b' :
+ this.currentCharacter = '\b';
+ break;
+ case 't' :
+ this.currentCharacter = '\t';
+ break;
+ case 'n' :
+ this.currentCharacter = '\n';
+ break;
+ case 'f' :
+ this.currentCharacter = '\f';
+ break;
+ case 'r' :
+ this.currentCharacter = '\r';
+ break;
+ case '\"' :
+ this.currentCharacter = '\"';
+ break;
+ case '\'' :
+ this.currentCharacter = '\'';
+ break;
+ case '\\' :
+ this.currentCharacter = '\\';
+ break;
+ default :
+ // -----------octal escape--------------
+ // OctalDigit
+ // OctalDigit OctalDigit
+ // ZeroToThree OctalDigit OctalDigit
+
+ int number = Character.getNumericValue(this.currentCharacter);
+ if (number >= 0 && number <= 7) {
+ boolean zeroToThreeNot = number > 3;
+ if (isDigit(this.currentCharacter = this.source[this.currentPosition++])) {
+ int digit = Character.getNumericValue(this.currentCharacter);
+ if (digit >= 0 && digit <= 7) {
+ number = (number * 8) + digit;
+ if (isDigit(this.currentCharacter = this.source[this.currentPosition++])) {
+ if (zeroToThreeNot) {// has read \NotZeroToThree OctalDigit Digit --> ignore last character
+ this.currentPosition--;
+ } else {
+ digit = Character.getNumericValue(this.currentCharacter);
+ if (digit >= 0 && digit <= 7){ // has read \ZeroToThree OctalDigit OctalDigit
+ number = (number * 8) + digit;
+ } else {// has read \ZeroToThree OctalDigit NonOctalDigit --> ignore last character
+ this.currentPosition--;
+ }
+ }
+ } else { // has read \OctalDigit NonDigit--> ignore last character
+ this.currentPosition--;
+ }
+ } else { // has read \OctalDigit NonOctalDigit--> ignore last character
+ this.currentPosition--;
+ }
+ } else { // has read \OctalDigit --> ignore last character
+ this.currentPosition--;
+ }
+ if (number > 255)
+ throw new InvalidInputException(INVALID_ESCAPE);
+ this.currentCharacter = (char) number;
+ } else
+ throw new InvalidInputException(INVALID_ESCAPE);
+ }
+}
+public int scanIdentifierOrKeyword() {
+ //test keywords
+
+ //first dispatch on the first char.
+ //then the length. If there are several
+ //keywors with the same length AND the same first char, then do another
+ //dispatch on the second char
+ this.useAssertAsAnIndentifier = false;
+ this.useEnumAsAnIndentifier = false;
+ while (getNextCharAsJavaIdentifierPart()){/*empty*/}
+
+ int index, length;
+ char[] data;
+ char firstLetter;
+ if (this.withoutUnicodePtr == 0)
+
+ //quick test on length == 1 but not on length > 12 while most identifier
+ //have a length which is <= 12...but there are lots of identifier with
+ //only one char....
+
+ {
+ if ((length = this.currentPosition - this.startPosition) == 1)
+ return TokenNameIdentifier;
+ data = this.source;
+ index = this.startPosition;
+ } else {
+ if ((length = this.withoutUnicodePtr) == 1)
+ return TokenNameIdentifier;
+ data = this.withoutUnicodeBuffer;
+ index = 1;
+ }
+
+ firstLetter = data[index];
+ switch (firstLetter) {
+
+ case 'a' :
+ switch(length) {
+ case 8: //abstract
+ if ((data[++index] == 'b')
+ && (data[++index] == 's')
+ && (data[++index] == 't')
+ && (data[++index] == 'r')
+ && (data[++index] == 'a')
+ && (data[++index] == 'c')
+ && (data[++index] == 't')) {
+ return TokenNameabstract;
+ } else {
+ return TokenNameIdentifier;
+ }
+ case 6: // assert
+ if ((data[++index] == 's')
+ && (data[++index] == 's')
+ && (data[++index] == 'e')
+ && (data[++index] == 'r')
+ && (data[++index] == 't')) {
+ if (this.sourceLevel >= ClassFileConstants.JDK1_4) {
+ this.containsAssertKeyword = true;
+ return TokenNameassert;
+ } else {
+ this.useAssertAsAnIndentifier = true;
+ return TokenNameIdentifier;
+ }
+ } else {
+ return TokenNameIdentifier;
+ }
+ default:
+ return TokenNameIdentifier;
+ }
+ case 'b' : //boolean break byte
+ switch (length) {
+ case 4 :
+ if ((data[++index] == 'y') && (data[++index] == 't') && (data[++index] == 'e'))
+ return TokenNamebyte;
+ else
+ return TokenNameIdentifier;
+ case 5 :
+ if ((data[++index] == 'r')
+ && (data[++index] == 'e')
+ && (data[++index] == 'a')
+ && (data[++index] == 'k'))
+ return TokenNamebreak;
+ else
+ return TokenNameIdentifier;
+ case 7 :
+ if ((data[++index] == 'o')
+ && (data[++index] == 'o')
+ && (data[++index] == 'l')
+ && (data[++index] == 'e')
+ && (data[++index] == 'a')
+ && (data[++index] == 'n'))
+ return TokenNameboolean;
+ else
+ return TokenNameIdentifier;
+ default :
+ return TokenNameIdentifier;
+ }
+
+ case 'c' : //case char catch const class continue
+ switch (length) {
+ case 4 :
+ if (data[++index] == 'a')
+ if ((data[++index] == 's') && (data[++index] == 'e'))
+ return TokenNamecase;
+ else
+ return TokenNameIdentifier;
+ else
+ if ((data[index] == 'h') && (data[++index] == 'a') && (data[++index] == 'r'))
+ return TokenNamechar;
+ else
+ return TokenNameIdentifier;
+ case 5 :
+ if (data[++index] == 'a')
+ if ((data[++index] == 't') && (data[++index] == 'c') && (data[++index] == 'h'))
+ return TokenNamecatch;
+ else
+ return TokenNameIdentifier;
+ else
+ if (data[index] == 'l')
+ if ((data[++index] == 'a')
+ && (data[++index] == 's')
+ && (data[++index] == 's'))
+ return TokenNameclass;
+ else
+ return TokenNameIdentifier;
+ else if ((data[index] == 'o')
+ && (data[++index] == 'n')
+ && (data[++index] == 's')
+ && (data[++index] == 't'))
+ return TokenNameERROR; //const is not used in java ???????
+ else
+ return TokenNameIdentifier;
+ case 8 :
+ if ((data[++index] == 'o')
+ && (data[++index] == 'n')
+ && (data[++index] == 't')
+ && (data[++index] == 'i')
+ && (data[++index] == 'n')
+ && (data[++index] == 'u')
+ && (data[++index] == 'e'))
+ return TokenNamecontinue;
+ else
+ return TokenNameIdentifier;
+ default :
+ return TokenNameIdentifier;
+ }
+
+ case 'd' : //default do double
+ switch (length) {
+ case 2 :
+ if ((data[++index] == 'o'))
+ return TokenNamedo;
+ else
+ return TokenNameIdentifier;
+ case 6 :
+ if ((data[++index] == 'o')
+ && (data[++index] == 'u')
+ && (data[++index] == 'b')
+ && (data[++index] == 'l')
+ && (data[++index] == 'e'))
+ return TokenNamedouble;
+ else
+ return TokenNameIdentifier;
+ case 7 :
+ if ((data[++index] == 'e')
+ && (data[++index] == 'f')
+ && (data[++index] == 'a')
+ && (data[++index] == 'u')
+ && (data[++index] == 'l')
+ && (data[++index] == 't'))
+ return TokenNamedefault;
+ else
+ return TokenNameIdentifier;
+ default :
+ return TokenNameIdentifier;
+ }
+ case 'e' : //else extends
+ switch (length) {
+ case 4 :
+ if ((data[++index] == 'l') && (data[++index] == 's') && (data[++index] == 'e'))
+ return TokenNameelse;
+ else if ((data[index] == 'n')
+ && (data[++index] == 'u')
+ && (data[++index] == 'm')) {
+ if (this.sourceLevel >= ClassFileConstants.JDK1_5) {
+ return TokenNameenum;
+ } else {
+ this.useEnumAsAnIndentifier = true;
+ return TokenNameIdentifier;
+ }
+ } else {
+ return TokenNameIdentifier;
+ }
+ case 7 :
+ if ((data[++index] == 'x')
+ && (data[++index] == 't')
+ && (data[++index] == 'e')
+ && (data[++index] == 'n')
+ && (data[++index] == 'd')
+ && (data[++index] == 's'))
+ return TokenNameextends;
+ else
+ return TokenNameIdentifier;
+ default :
+ return TokenNameIdentifier;
+ }
+
+ case 'f' : //final finally float for false
+ switch (length) {
+ case 3 :
+ if ((data[++index] == 'o') && (data[++index] == 'r'))
+ return TokenNamefor;
+ else
+ return TokenNameIdentifier;
+ case 5 :
+ if (data[++index] == 'i')
+ if ((data[++index] == 'n')
+ && (data[++index] == 'a')
+ && (data[++index] == 'l')) {
+ return TokenNamefinal;
+ } else
+ return TokenNameIdentifier;
+ else
+ if (data[index] == 'l')
+ if ((data[++index] == 'o')
+ && (data[++index] == 'a')
+ && (data[++index] == 't'))
+ return TokenNamefloat;
+ else
+ return TokenNameIdentifier;
+ else
+ if ((data[index] == 'a')
+ && (data[++index] == 'l')
+ && (data[++index] == 's')
+ && (data[++index] == 'e'))
+ return TokenNamefalse;
+ else
+ return TokenNameIdentifier;
+ case 7 :
+ if ((data[++index] == 'i')
+ && (data[++index] == 'n')
+ && (data[++index] == 'a')
+ && (data[++index] == 'l')
+ && (data[++index] == 'l')
+ && (data[++index] == 'y'))
+ return TokenNamefinally;
+ else
+ return TokenNameIdentifier;
+
+ default :
+ return TokenNameIdentifier;
+ }
+ case 'g' : //goto
+ if (length == 4) {
+ if ((data[++index] == 'o')
+ && (data[++index] == 't')
+ && (data[++index] == 'o')) {
+ return TokenNameERROR;
+ }
+ } //no goto in java are allowed, so why java removes this keyword ???
+ return TokenNameIdentifier;
+
+ case 'i' : //if implements import instanceof int interface
+ switch (length) {
+ case 2 :
+ if (data[++index] == 'f')
+ return TokenNameif;
+ else
+ return TokenNameIdentifier;
+ case 3 :
+ if ((data[++index] == 'n') && (data[++index] == 't'))
+ return TokenNameint;
+ else
+ return TokenNameIdentifier;
+ case 6 :
+ if ((data[++index] == 'm')
+ && (data[++index] == 'p')
+ && (data[++index] == 'o')
+ && (data[++index] == 'r')
+ && (data[++index] == 't'))
+ return TokenNameimport;
+ else
+ return TokenNameIdentifier;
+ case 9 :
+ if ((data[++index] == 'n')
+ && (data[++index] == 't')
+ && (data[++index] == 'e')
+ && (data[++index] == 'r')
+ && (data[++index] == 'f')
+ && (data[++index] == 'a')
+ && (data[++index] == 'c')
+ && (data[++index] == 'e'))
+ return TokenNameinterface;
+ else
+ return TokenNameIdentifier;
+ case 10 :
+ if (data[++index] == 'm')
+ if ((data[++index] == 'p')
+ && (data[++index] == 'l')
+ && (data[++index] == 'e')
+ && (data[++index] == 'm')
+ && (data[++index] == 'e')
+ && (data[++index] == 'n')
+ && (data[++index] == 't')
+ && (data[++index] == 's'))
+ return TokenNameimplements;
+ else
+ return TokenNameIdentifier;
+ else
+ if ((data[index] == 'n')
+ && (data[++index] == 's')
+ && (data[++index] == 't')
+ && (data[++index] == 'a')
+ && (data[++index] == 'n')
+ && (data[++index] == 'c')
+ && (data[++index] == 'e')
+ && (data[++index] == 'o')
+ && (data[++index] == 'f'))
+ return TokenNameinstanceof;
+ else
+ return TokenNameIdentifier;
+
+ default :
+ return TokenNameIdentifier;
+ }
+
+ case 'l' : //long
+ if (length == 4) {
+ if ((data[++index] == 'o')
+ && (data[++index] == 'n')
+ && (data[++index] == 'g')) {
+ return TokenNamelong;
+ }
+ }
+ return TokenNameIdentifier;
+
+ case 'n' : //native new null
+ switch (length) {
+ case 3 :
+ if ((data[++index] == 'e') && (data[++index] == 'w'))
+ return TokenNamenew;
+ else
+ return TokenNameIdentifier;
+ case 4 :
+ if ((data[++index] == 'u') && (data[++index] == 'l') && (data[++index] == 'l'))
+ return TokenNamenull;
+ else
+ return TokenNameIdentifier;
+ case 6 :
+ if ((data[++index] == 'a')
+ && (data[++index] == 't')
+ && (data[++index] == 'i')
+ && (data[++index] == 'v')
+ && (data[++index] == 'e')) {
+ return TokenNamenative;
+ } else
+ return TokenNameIdentifier;
+ default :
+ return TokenNameIdentifier;
+ }
+
+ case 'p' : //package private protected public
+ switch (length) {
+ case 6 :
+ if ((data[++index] == 'u')
+ && (data[++index] == 'b')
+ && (data[++index] == 'l')
+ && (data[++index] == 'i')
+ && (data[++index] == 'c')) {
+ return TokenNamepublic;
+ } else
+ return TokenNameIdentifier;
+ case 7 :
+ if (data[++index] == 'a')
+ if ((data[++index] == 'c')
+ && (data[++index] == 'k')
+ && (data[++index] == 'a')
+ && (data[++index] == 'g')
+ && (data[++index] == 'e'))
+ return TokenNamepackage;
+ else
+ return TokenNameIdentifier;
+ else
+ if ((data[index] == 'r')
+ && (data[++index] == 'i')
+ && (data[++index] == 'v')
+ && (data[++index] == 'a')
+ && (data[++index] == 't')
+ && (data[++index] == 'e')) {
+ return TokenNameprivate;
+ } else
+ return TokenNameIdentifier;
+ case 9 :
+ if ((data[++index] == 'r')
+ && (data[++index] == 'o')
+ && (data[++index] == 't')
+ && (data[++index] == 'e')
+ && (data[++index] == 'c')
+ && (data[++index] == 't')
+ && (data[++index] == 'e')
+ && (data[++index] == 'd')) {
+ return TokenNameprotected;
+ } else
+ return TokenNameIdentifier;
+
+ default :
+ return TokenNameIdentifier;
+ }
+
+ case 'r' : //return
+ if (length == 6) {
+ if ((data[++index] == 'e')
+ && (data[++index] == 't')
+ && (data[++index] == 'u')
+ && (data[++index] == 'r')
+ && (data[++index] == 'n')) {
+ return TokenNamereturn;
+ }
+ }
+ return TokenNameIdentifier;
+
+ case 's' : //short static super switch synchronized strictfp
+ switch (length) {
+ case 5 :
+ if (data[++index] == 'h')
+ if ((data[++index] == 'o') && (data[++index] == 'r') && (data[++index] == 't'))
+ return TokenNameshort;
+ else
+ return TokenNameIdentifier;
+ else
+ if ((data[index] == 'u')
+ && (data[++index] == 'p')
+ && (data[++index] == 'e')
+ && (data[++index] == 'r'))
+ return TokenNamesuper;
+ else
+ return TokenNameIdentifier;
+
+ case 6 :
+ if (data[++index] == 't')
+ if ((data[++index] == 'a')
+ && (data[++index] == 't')
+ && (data[++index] == 'i')
+ && (data[++index] == 'c')) {
+ return TokenNamestatic;
+ } else
+ return TokenNameIdentifier;
+ else
+ if ((data[index] == 'w')
+ && (data[++index] == 'i')
+ && (data[++index] == 't')
+ && (data[++index] == 'c')
+ && (data[++index] == 'h'))
+ return TokenNameswitch;
+ else
+ return TokenNameIdentifier;
+ case 8 :
+ if ((data[++index] == 't')
+ && (data[++index] == 'r')
+ && (data[++index] == 'i')
+ && (data[++index] == 'c')
+ && (data[++index] == 't')
+ && (data[++index] == 'f')
+ && (data[++index] == 'p'))
+ return TokenNamestrictfp;
+ else
+ return TokenNameIdentifier;
+ case 12 :
+ if ((data[++index] == 'y')
+ && (data[++index] == 'n')
+ && (data[++index] == 'c')
+ && (data[++index] == 'h')
+ && (data[++index] == 'r')
+ && (data[++index] == 'o')
+ && (data[++index] == 'n')
+ && (data[++index] == 'i')
+ && (data[++index] == 'z')
+ && (data[++index] == 'e')
+ && (data[++index] == 'd')) {
+ return TokenNamesynchronized;
+ } else
+ return TokenNameIdentifier;
+ default :
+ return TokenNameIdentifier;
+ }
+
+ case 't' : //try throw throws transient this true
+ switch (length) {
+ case 3 :
+ if ((data[++index] == 'r') && (data[++index] == 'y'))
+ return TokenNametry;
+ else
+ return TokenNameIdentifier;
+ case 4 :
+ if (data[++index] == 'h')
+ if ((data[++index] == 'i') && (data[++index] == 's'))
+ return TokenNamethis;
+ else
+ return TokenNameIdentifier;
+ else
+ if ((data[index] == 'r') && (data[++index] == 'u') && (data[++index] == 'e'))
+ return TokenNametrue;
+ else
+ return TokenNameIdentifier;
+ case 5 :
+ if ((data[++index] == 'h')
+ && (data[++index] == 'r')
+ && (data[++index] == 'o')
+ && (data[++index] == 'w'))
+ return TokenNamethrow;
+ else
+ return TokenNameIdentifier;
+ case 6 :
+ if ((data[++index] == 'h')
+ && (data[++index] == 'r')
+ && (data[++index] == 'o')
+ && (data[++index] == 'w')
+ && (data[++index] == 's'))
+ return TokenNamethrows;
+ else
+ return TokenNameIdentifier;
+ case 9 :
+ if ((data[++index] == 'r')
+ && (data[++index] == 'a')
+ && (data[++index] == 'n')
+ && (data[++index] == 's')
+ && (data[++index] == 'i')
+ && (data[++index] == 'e')
+ && (data[++index] == 'n')
+ && (data[++index] == 't')) {
+ return TokenNametransient;
+ } else
+ return TokenNameIdentifier;
+
+ default :
+ return TokenNameIdentifier;
+ }
+
+ case 'v' : //void volatile
+ switch (length) {
+ case 4 :
+ if ((data[++index] == 'o') && (data[++index] == 'i') && (data[++index] == 'd'))
+ return TokenNamevoid;
+ else
+ return TokenNameIdentifier;
+ case 8 :
+ if ((data[++index] == 'o')
+ && (data[++index] == 'l')
+ && (data[++index] == 'a')
+ && (data[++index] == 't')
+ && (data[++index] == 'i')
+ && (data[++index] == 'l')
+ && (data[++index] == 'e')) {
+ return TokenNamevolatile;
+ } else
+ return TokenNameIdentifier;
+
+ default :
+ return TokenNameIdentifier;
+ }
+
+ case 'w' : //while widefp
+ switch (length) {
+ case 5 :
+ if ((data[++index] == 'h')
+ && (data[++index] == 'i')
+ && (data[++index] == 'l')
+ && (data[++index] == 'e'))
+ return TokenNamewhile;
+ else
+ return TokenNameIdentifier;
+ //case 6:if ( (data[++index] =='i') && (data[++index]=='d') && (data[++index]=='e') && (data[++index]=='f')&& (data[++index]=='p'))
+ //return TokenNamewidefp ;
+ //else
+ //return TokenNameIdentifier;
+ default :
+ return TokenNameIdentifier;
+ }
+
+ default :
+ return TokenNameIdentifier;
+ }
+}
+public int scanNumber(boolean dotPrefix) throws InvalidInputException {
+
+ //when entering this method the currentCharacter is the first
+ //digit of the number. It may be preceeded by a '.' when
+ //dotPrefix is true
+
+ boolean floating = dotPrefix;
+ if ((!dotPrefix) && (this.currentCharacter == '0')) {
+ if (getNextChar('x', 'X') >= 0) { //----------hexa-----------------
+ int start = this.currentPosition;
+ while (getNextCharAsDigit(16)){/*empty*/}
+ int end = this.currentPosition;
+ if (getNextChar('l', 'L') >= 0) {
+ if (end == start) {
+ throw new InvalidInputException(INVALID_HEXA);
+ }
+ return TokenNameLongLiteral;
+ } else if (getNextChar('.')) {
+ if (this.sourceLevel < ClassFileConstants.JDK1_5) {
+ // if we are in source level < 1.5, we report an integer literal
+ this.currentPosition = end;
+ return TokenNameIntegerLiteral;
+ }
+ // hexadeciman floating point literal
+ // read decimal part
+ while (getNextCharAsDigit(16)){/*empty*/}
+
+ if (getNextChar('p', 'P') >= 0) { // consume next character
+ this.unicodeAsBackSlash = false;
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ && (this.source[this.currentPosition] == 'u')) {
+ getNextUnicodeChar();
+ } else {
+ if (this.withoutUnicodePtr != 0) {
+ unicodeStoreAt(++this.withoutUnicodePtr);
+ }
+ }
+
+ if ((this.currentCharacter == '-')
+ || (this.currentCharacter == '+')) { // consume next character
+ this.unicodeAsBackSlash = false;
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ && (this.source[this.currentPosition] == 'u')) {
+ getNextUnicodeChar();
+ } else {
+ if (this.withoutUnicodePtr != 0) {
+ unicodeStoreAt(++this.withoutUnicodePtr);
+ }
+ }
+ }
+ if (!isDigit(this.currentCharacter)) {
+ throw new InvalidInputException(INVALID_HEXA);
+ }
+ while (getNextCharAsDigit()){/*empty*/}
+ if (getNextChar('f', 'F') >= 0) {
+ return TokenNameFloatingPointLiteral;
+ }
+ if (getNextChar('d', 'D') >= 0) {
+ return TokenNameDoubleLiteral;
+ }
+ if (getNextChar('l', 'L') >= 0) {
+ throw new InvalidInputException(INVALID_HEXA);
+ }
+ return TokenNameDoubleLiteral;
+ } else {
+ throw new InvalidInputException(INVALID_HEXA);
+ }
+ } else if (getNextChar('p', 'P') >= 0) { // consume next character
+ if (this.sourceLevel < ClassFileConstants.JDK1_5) {
+ // if we are in source level < 1.5 we report an integer literal
+ this.currentPosition = end;
+ return TokenNameIntegerLiteral;
+ }
+ this.unicodeAsBackSlash = false;
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ && (this.source[this.currentPosition] == 'u')) {
+ getNextUnicodeChar();
+ } else {
+ if (this.withoutUnicodePtr != 0) {
+ unicodeStoreAt(++this.withoutUnicodePtr);
+ }
+ }
+
+ if ((this.currentCharacter == '-')
+ || (this.currentCharacter == '+')) { // consume next character
+ this.unicodeAsBackSlash = false;
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ && (this.source[this.currentPosition] == 'u')) {
+ getNextUnicodeChar();
+ } else {
+ if (this.withoutUnicodePtr != 0) {
+ unicodeStoreAt(++this.withoutUnicodePtr);
+ }
+ }
+ }
+ if (!isDigit(this.currentCharacter))
+ throw new InvalidInputException(INVALID_FLOAT);
+ while (getNextCharAsDigit()){/*empty*/}
+ if (getNextChar('f', 'F') >= 0)
+ return TokenNameFloatingPointLiteral;
+ if (getNextChar('d', 'D') >= 0)
+ return TokenNameDoubleLiteral;
+ if (getNextChar('l', 'L') >= 0) {
+ throw new InvalidInputException(INVALID_HEXA);
+ }
+ return TokenNameDoubleLiteral;
+ } else {
+ if (end == start)
+ throw new InvalidInputException(INVALID_HEXA);
+ return TokenNameIntegerLiteral;
+ }
+ }
+
+ //there is x or X in the number
+ //potential octal ! ... some one may write 000099.0 ! thus 00100 < 00078.0 is true !!!!! crazy language
+ if (getNextCharAsDigit()) { //-------------potential octal-----------------
+ while (getNextCharAsDigit()){/*empty*/}
+
+ if (getNextChar('l', 'L') >= 0) {
+ return TokenNameLongLiteral;
+ }
+
+ if (getNextChar('f', 'F') >= 0) {
+ return TokenNameFloatingPointLiteral;
+ }
+
+ if (getNextChar('d', 'D') >= 0) {
+ return TokenNameDoubleLiteral;
+ } else { //make the distinction between octal and float ....
+ boolean isInteger = true;
+ if (getNextChar('.')) {
+ isInteger = false;
+ while (getNextCharAsDigit()){/*empty*/}
+ }
+ if (getNextChar('e', 'E') >= 0) { // consume next character
+ isInteger = false;
+ this.unicodeAsBackSlash = false;
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ && (this.source[this.currentPosition] == 'u')) {
+ getNextUnicodeChar();
+ } else {
+ if (this.withoutUnicodePtr != 0) {
+ unicodeStoreAt(++this.withoutUnicodePtr);
+ }
+ }
+
+ if ((this.currentCharacter == '-')
+ || (this.currentCharacter == '+')) { // consume next character
+ this.unicodeAsBackSlash = false;
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ && (this.source[this.currentPosition] == 'u')) {
+ getNextUnicodeChar();
+ } else {
+ if (this.withoutUnicodePtr != 0) {
+ unicodeStoreAt(++this.withoutUnicodePtr);
+ }
+ }
+ }
+ if (!isDigit(this.currentCharacter))
+ throw new InvalidInputException(INVALID_FLOAT);
+ while (getNextCharAsDigit()){/*empty*/}
+ }
+ if (getNextChar('f', 'F') >= 0)
+ return TokenNameFloatingPointLiteral;
+ if (getNextChar('d', 'D') >= 0 || !isInteger)
+ return TokenNameDoubleLiteral;
+ return TokenNameIntegerLiteral;
+ }
+ } else {
+ /* carry on */
+ }
+ }
+
+ while (getNextCharAsDigit()){/*empty*/}
+
+ if ((!dotPrefix) && (getNextChar('l', 'L') >= 0))
+ return TokenNameLongLiteral;
+
+ if ((!dotPrefix) && (getNextChar('.'))) { //decimal part that can be empty
+ while (getNextCharAsDigit()){/*empty*/}
+ floating = true;
+ }
+
+ //if floating is true both exponant and suffix may be optional
+
+ if (getNextChar('e', 'E') >= 0) {
+ floating = true;
+ // consume next character
+ this.unicodeAsBackSlash = false;
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ && (this.source[this.currentPosition] == 'u')) {
+ getNextUnicodeChar();
+ } else {
+ if (this.withoutUnicodePtr != 0) {
+ unicodeStoreAt(++this.withoutUnicodePtr);
+ }
+ }
+
+ if ((this.currentCharacter == '-')
+ || (this.currentCharacter == '+')) { // consume next character
+ this.unicodeAsBackSlash = false;
+ if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\')
+ && (this.source[this.currentPosition] == 'u')) {
+ getNextUnicodeChar();
+ } else {
+ if (this.withoutUnicodePtr != 0) {
+ unicodeStoreAt(++this.withoutUnicodePtr);
+ }
+ }
+ }
+ if (!isDigit(this.currentCharacter))
+ throw new InvalidInputException(INVALID_FLOAT);
+ while (getNextCharAsDigit()){/*empty*/}
+ }
+
+ if (getNextChar('d', 'D') >= 0)
+ return TokenNameDoubleLiteral;
+ if (getNextChar('f', 'F') >= 0)
+ return TokenNameFloatingPointLiteral;
+
+ //the long flag has been tested before
+
+ return floating ? TokenNameDoubleLiteral : TokenNameIntegerLiteral;
+}
+/**
+ * Search the line number corresponding to a specific position
+ * @param position int
+ * @return int
+ */
+public final int getLineNumber(int position) {
+
+ if (this.lineEnds == null)
+ return 1;
+ int length = this.linePtr+1;
+ if (length == 0)
+ return 1;
+ int g = 0, d = length - 1;
+ int m = 0;
+ while (g <= d) {
+ m = (g + d) /2;
+ if (position < this.lineEnds[m]) {
+ d = m-1;
+ } else if (position > this.lineEnds[m]) {
+ g = m+1;
+ } else {
+ return m + 1;
+ }
+ }
+ if (position < this.lineEnds[m]) {
+ return m+1;
+ }
+ return m+2;
+}
+public final void setSource(char[] sourceString){
+ //the source-buffer is set to sourceString
+
+ int sourceLength;
+ if (sourceString == null) {
+ this.source = CharOperation.NO_CHAR;
+ sourceLength = 0;
+ } else {
+ this.source = sourceString;
+ sourceLength = sourceString.length;
+ }
+ this.startPosition = -1;
+ this.eofPosition = sourceLength;
+ this.initialPosition = this.currentPosition = 0;
+ this.containsAssertKeyword = false;
+ this.linePtr = -1;
+}
+
+/*
+ * Should be used if a parse (usually a diet parse) has already been performed on the unit,
+ * so as to get the already computed line end positions.
+ */
+public final void setSource(CompilationResult compilationResult) {
+ char[] contents = compilationResult.compilationUnit.getContents();
+ setSource(contents);
+ int[] lineSeparatorPositions = compilationResult.lineSeparatorPositions;
+ if (lineSeparatorPositions != null) {
+ this.lineEnds = lineSeparatorPositions;
+ this.linePtr = lineSeparatorPositions.length - 1;
+ }
+}
+
+public String toString() {
+ if (this.startPosition == this.source.length)
+ return "EOF\n\n" + new String(this.source); //$NON-NLS-1$
+ if (this.currentPosition > this.source.length)
+ return "behind the EOF\n\n" + new String(this.source); //$NON-NLS-1$
+
+ char front[] = new char[this.startPosition];
+ System.arraycopy(this.source, 0, front, 0, this.startPosition);
+
+ int middleLength = (this.currentPosition - 1) - this.startPosition + 1;
+ char middle[];
+ if (middleLength > -1) {
+ middle = new char[middleLength];
+ System.arraycopy(
+ this.source,
+ this.startPosition,
+ middle,
+ 0,
+ middleLength);
+ } else {
+ middle = CharOperation.NO_CHAR;
+ }
+
+ char end[] = new char[this.source.length - (this.currentPosition - 1)];
+ System.arraycopy(
+ this.source,
+ (this.currentPosition - 1) + 1,
+ end,
+ 0,
+ this.source.length - (this.currentPosition - 1) - 1);
+
+ return new String(front)
+ + "\n===============================\nStarts here -->" //$NON-NLS-1$
+ + new String(middle)
+ + "<-- Ends here\n===============================\n" //$NON-NLS-1$
+ + new String(end);
+}
+public final String toStringAction(int act) {
+ switch (act) {
+ case TokenNameIdentifier :
+ return "Identifier(" + new String(getCurrentTokenSource()) + ")"; //$NON-NLS-1$ //$NON-NLS-2$
+ case TokenNameabstract :
+ return "abstract"; //$NON-NLS-1$
+ case TokenNameboolean :
+ return "boolean"; //$NON-NLS-1$
+ case TokenNamebreak :
+ return "break"; //$NON-NLS-1$
+ case TokenNamebyte :
+ return "byte"; //$NON-NLS-1$
+ case TokenNamecase :
+ return "case"; //$NON-NLS-1$
+ case TokenNamecatch :
+ return "catch"; //$NON-NLS-1$
+ case TokenNamechar :
+ return "char"; //$NON-NLS-1$
+ case TokenNameclass :
+ return "class"; //$NON-NLS-1$
+ case TokenNamecontinue :
+ return "continue"; //$NON-NLS-1$
+ case TokenNamedefault :
+ return "default"; //$NON-NLS-1$
+ case TokenNamedo :
+ return "do"; //$NON-NLS-1$
+ case TokenNamedouble :
+ return "double"; //$NON-NLS-1$
+ case TokenNameelse :
+ return "else"; //$NON-NLS-1$
+ case TokenNameextends :
+ return "extends"; //$NON-NLS-1$
+ case TokenNamefalse :
+ return "false"; //$NON-NLS-1$
+ case TokenNamefinal :
+ return "final"; //$NON-NLS-1$
+ case TokenNamefinally :
+ return "finally"; //$NON-NLS-1$
+ case TokenNamefloat :
+ return "float"; //$NON-NLS-1$
+ case TokenNamefor :
+ return "for"; //$NON-NLS-1$
+ case TokenNameif :
+ return "if"; //$NON-NLS-1$
+ case TokenNameimplements :
+ return "implements"; //$NON-NLS-1$
+ case TokenNameimport :
+ return "import"; //$NON-NLS-1$
+ case TokenNameinstanceof :
+ return "instanceof"; //$NON-NLS-1$
+ case TokenNameint :
+ return "int"; //$NON-NLS-1$
+ case TokenNameinterface :
+ return "interface"; //$NON-NLS-1$
+ case TokenNamelong :
+ return "long"; //$NON-NLS-1$
+ case TokenNamenative :
+ return "native"; //$NON-NLS-1$
+ case TokenNamenew :
+ return "new"; //$NON-NLS-1$
+ case TokenNamenull :
+ return "null"; //$NON-NLS-1$
+ case TokenNamepackage :
+ return "package"; //$NON-NLS-1$
+ case TokenNameprivate :
+ return "private"; //$NON-NLS-1$
+ case TokenNameprotected :
+ return "protected"; //$NON-NLS-1$
+ case TokenNamepublic :
+ return "public"; //$NON-NLS-1$
+ case TokenNamereturn :
+ return "return"; //$NON-NLS-1$
+ case TokenNameshort :
+ return "short"; //$NON-NLS-1$
+ case TokenNamestatic :
+ return "static"; //$NON-NLS-1$
+ case TokenNamesuper :
+ return "super"; //$NON-NLS-1$
+ case TokenNameswitch :
+ return "switch"; //$NON-NLS-1$
+ case TokenNamesynchronized :
+ return "synchronized"; //$NON-NLS-1$
+ case TokenNamethis :
+ return "this"; //$NON-NLS-1$
+ case TokenNamethrow :
+ return "throw"; //$NON-NLS-1$
+ case TokenNamethrows :
+ return "throws"; //$NON-NLS-1$
+ case TokenNametransient :
+ return "transient"; //$NON-NLS-1$
+ case TokenNametrue :
+ return "true"; //$NON-NLS-1$
+ case TokenNametry :
+ return "try"; //$NON-NLS-1$
+ case TokenNamevoid :
+ return "void"; //$NON-NLS-1$
+ case TokenNamevolatile :
+ return "volatile"; //$NON-NLS-1$
+ case TokenNamewhile :
+ return "while"; //$NON-NLS-1$
+
+ case TokenNameIntegerLiteral :
+ return "Integer(" + new String(getCurrentTokenSource()) + ")"; //$NON-NLS-1$ //$NON-NLS-2$
+ case TokenNameLongLiteral :
+ return "Long(" + new String(getCurrentTokenSource()) + ")"; //$NON-NLS-1$ //$NON-NLS-2$
+ case TokenNameFloatingPointLiteral :
+ return "Float(" + new String(getCurrentTokenSource()) + ")"; //$NON-NLS-1$ //$NON-NLS-2$
+ case TokenNameDoubleLiteral :
+ return "Double(" + new String(getCurrentTokenSource()) + ")"; //$NON-NLS-1$ //$NON-NLS-2$
+ case TokenNameCharacterLiteral :
+ return "Char(" + new String(getCurrentTokenSource()) + ")"; //$NON-NLS-1$ //$NON-NLS-2$
+ case TokenNameStringLiteral :
+ return "String(" + new String(getCurrentTokenSource()) + ")"; //$NON-NLS-1$ //$NON-NLS-2$
+
+ case TokenNamePLUS_PLUS :
+ return "++"; //$NON-NLS-1$
+ case TokenNameMINUS_MINUS :
+ return "--"; //$NON-NLS-1$
+ case TokenNameEQUAL_EQUAL :
+ return "=="; //$NON-NLS-1$
+ case TokenNameLESS_EQUAL :
+ return "<="; //$NON-NLS-1$
+ case TokenNameGREATER_EQUAL :
+ return ">="; //$NON-NLS-1$
+ case TokenNameNOT_EQUAL :
+ return "!="; //$NON-NLS-1$
+ case TokenNameLEFT_SHIFT :
+ return "<<"; //$NON-NLS-1$
+ case TokenNameRIGHT_SHIFT :
+ return ">>"; //$NON-NLS-1$
+ case TokenNameUNSIGNED_RIGHT_SHIFT :
+ return ">>>"; //$NON-NLS-1$
+ case TokenNamePLUS_EQUAL :
+ return "+="; //$NON-NLS-1$
+ case TokenNameMINUS_EQUAL :
+ return "-="; //$NON-NLS-1$
+ case TokenNameMULTIPLY_EQUAL :
+ return "*="; //$NON-NLS-1$
+ case TokenNameDIVIDE_EQUAL :
+ return "/="; //$NON-NLS-1$
+ case TokenNameAND_EQUAL :
+ return "&="; //$NON-NLS-1$
+ case TokenNameOR_EQUAL :
+ return "|="; //$NON-NLS-1$
+ case TokenNameXOR_EQUAL :
+ return "^="; //$NON-NLS-1$
+ case TokenNameREMAINDER_EQUAL :
+ return "%="; //$NON-NLS-1$
+ case TokenNameLEFT_SHIFT_EQUAL :
+ return "<<="; //$NON-NLS-1$
+ case TokenNameRIGHT_SHIFT_EQUAL :
+ return ">>="; //$NON-NLS-1$
+ case TokenNameUNSIGNED_RIGHT_SHIFT_EQUAL :
+ return ">>>="; //$NON-NLS-1$
+ case TokenNameOR_OR :
+ return "||"; //$NON-NLS-1$
+ case TokenNameAND_AND :
+ return "&&"; //$NON-NLS-1$
+ case TokenNamePLUS :
+ return "+"; //$NON-NLS-1$
+ case TokenNameMINUS :
+ return "-"; //$NON-NLS-1$
+ case TokenNameNOT :
+ return "!"; //$NON-NLS-1$
+ case TokenNameREMAINDER :
+ return "%"; //$NON-NLS-1$
+ case TokenNameXOR :
+ return "^"; //$NON-NLS-1$
+ case TokenNameAND :
+ return "&"; //$NON-NLS-1$
+ case TokenNameMULTIPLY :
+ return "*"; //$NON-NLS-1$
+ case TokenNameOR :
+ return "|"; //$NON-NLS-1$
+ case TokenNameTWIDDLE :
+ return "~"; //$NON-NLS-1$
+ case TokenNameDIVIDE :
+ return "/"; //$NON-NLS-1$
+ case TokenNameGREATER :
+ return ">"; //$NON-NLS-1$
+ case TokenNameLESS :
+ return "<"; //$NON-NLS-1$
+ case TokenNameLPAREN :
+ return "("; //$NON-NLS-1$
+ case TokenNameRPAREN :
+ return ")"; //$NON-NLS-1$
+ case TokenNameLBRACE :
+ return "{"; //$NON-NLS-1$
+ case TokenNameRBRACE :
+ return "}"; //$NON-NLS-1$
+ case TokenNameLBRACKET :
+ return "["; //$NON-NLS-1$
+ case TokenNameRBRACKET :
+ return "]"; //$NON-NLS-1$
+ case TokenNameSEMICOLON :
+ return ";"; //$NON-NLS-1$
+ case TokenNameQUESTION :
+ return "?"; //$NON-NLS-1$
+ case TokenNameCOLON :
+ return ":"; //$NON-NLS-1$
+ case TokenNameCOMMA :
+ return ","; //$NON-NLS-1$
+ case TokenNameDOT :
+ return "."; //$NON-NLS-1$
+ case TokenNameEQUAL :
+ return "="; //$NON-NLS-1$
+ case TokenNameEOF :
+ return "EOF"; //$NON-NLS-1$
+ default :
+ return "not-a-token"; //$NON-NLS-1$
+ }
+}
+public void unicodeInitializeBuffer(int length) {
+ this.withoutUnicodePtr = length;
+ if (this.withoutUnicodeBuffer == null) this.withoutUnicodeBuffer = new char[length+(1+10)];
+ int bLength = this.withoutUnicodeBuffer.length;
+ if (1+length >= bLength) {
+ System.arraycopy(this.withoutUnicodeBuffer, 0, this.withoutUnicodeBuffer = new char[length + (1+10)], 0, bLength);
+ }
+ System.arraycopy(this.source, this.startPosition, this.withoutUnicodeBuffer, 1, length);
+}
+public void unicodeStoreAt(int pos) {
+ if (this.withoutUnicodeBuffer == null) this.withoutUnicodeBuffer = new char[10];
+ int length = this.withoutUnicodeBuffer.length;
+ if (pos == length) {
+ System.arraycopy(this.withoutUnicodeBuffer, 0, this.withoutUnicodeBuffer = new char[length * 2], 0, length);
+ }
+ this.withoutUnicodeBuffer[pos] = this.currentCharacter;
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/TerminalTokens.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/TerminalTokens.js
new file mode 100644
index 0000000..c4e7682
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/TerminalTokens.js
@@ -0,0 +1,144 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.parser;
+
+/**
+ * IMPORTANT NOTE: These constants are dedicated to the internal Scanner implementation.
+ * It is mirrored in org.eclipse.wst.jsdt.core.compiler public package where it is API.
+ * The mirror implementation is using the backward compatible ITerminalSymbols constant
+ * definitions (stable with 2.0), whereas the internal implementation uses TerminalTokens
+ * which constant values reflect the latest parser generation state.
+ */
+/**
+ * Maps each terminal symbol in the java-grammar into a unique integer.
+ * This integer is used to represent the terminal when computing a parsing action.
+ *
+ * Disclaimer : These constant values are generated automatically using a Java
+ * grammar, therefore their actual values are subject to change if new keywords
+ * were added to the language (for instance, 'assert' is a keyword in 1.4).
+ */
+public interface TerminalTokens {
+
+ // special tokens not part of grammar - not autogenerated
+ int TokenNameWHITESPACE = 1000,
+ TokenNameCOMMENT_LINE = 1001,
+ TokenNameCOMMENT_BLOCK = 1002,
+ TokenNameCOMMENT_JAVADOC = 1003;
+
+ int TokenNameIdentifier = 27,
+ TokenNameabstract = 56,
+ TokenNameassert = 75,
+ TokenNameboolean = 32,
+ TokenNamebreak = 76,
+ TokenNamebyte = 33,
+ TokenNamecase = 100,
+ TokenNamecatch = 101,
+ TokenNamechar = 34,
+ TokenNameclass = 71,
+ TokenNamecontinue = 77,
+ TokenNamedefault = 98,
+ TokenNamedo = 78,
+ TokenNamedouble = 35,
+ TokenNameelse = 102,
+ TokenNameenum = 103,
+ TokenNameextends = 86,
+ TokenNamefalse = 44,
+ TokenNamefinal = 57,
+ TokenNamefinally = 104,
+ TokenNamefloat = 36,
+ TokenNamefor = 79,
+ TokenNameif = 80,
+ TokenNameimplements = 105,
+ TokenNameimport = 99,
+ TokenNameinstanceof = 12,
+ TokenNameint = 37,
+ TokenNameinterface = 72,
+ TokenNamelong = 38,
+ TokenNamenative = 58,
+ TokenNamenew = 43,
+ TokenNamenull = 45,
+ TokenNamepackage = 85,
+ TokenNameprivate = 59,
+ TokenNameprotected = 60,
+ TokenNamepublic = 61,
+ TokenNamereturn = 81,
+ TokenNameshort = 39,
+ TokenNamestatic = 54,
+ TokenNamestrictfp = 62,
+ TokenNamesuper = 41,
+ TokenNameswitch = 82,
+ TokenNamesynchronized = 55,
+ TokenNamethis = 42,
+ TokenNamethrow = 83,
+ TokenNamethrows = 106,
+ TokenNametransient = 63,
+ TokenNametrue = 46,
+ TokenNametry = 84,
+ TokenNamevoid = 40,
+ TokenNamevolatile = 64,
+ TokenNamewhile = 73,
+ TokenNameIntegerLiteral = 47,
+ TokenNameLongLiteral = 48,
+ TokenNameFloatingPointLiteral = 49,
+ TokenNameDoubleLiteral = 50,
+ TokenNameCharacterLiteral = 51,
+ TokenNameStringLiteral = 52,
+ TokenNamePLUS_PLUS = 8,
+ TokenNameMINUS_MINUS = 9,
+ TokenNameEQUAL_EQUAL = 18,
+ TokenNameLESS_EQUAL = 14,
+ TokenNameGREATER_EQUAL = 15,
+ TokenNameNOT_EQUAL = 19,
+ TokenNameLEFT_SHIFT = 17,
+ TokenNameRIGHT_SHIFT = 10,
+ TokenNameUNSIGNED_RIGHT_SHIFT = 11,
+ TokenNamePLUS_EQUAL = 87,
+ TokenNameMINUS_EQUAL = 88,
+ TokenNameMULTIPLY_EQUAL = 89,
+ TokenNameDIVIDE_EQUAL = 90,
+ TokenNameAND_EQUAL = 91,
+ TokenNameOR_EQUAL = 92,
+ TokenNameXOR_EQUAL = 93,
+ TokenNameREMAINDER_EQUAL = 94,
+ TokenNameLEFT_SHIFT_EQUAL = 95,
+ TokenNameRIGHT_SHIFT_EQUAL = 96,
+ TokenNameUNSIGNED_RIGHT_SHIFT_EQUAL = 97,
+ TokenNameOR_OR = 26,
+ TokenNameAND_AND = 25,
+ TokenNamePLUS = 1,
+ TokenNameMINUS = 2,
+ TokenNameNOT = 69,
+ TokenNameREMAINDER = 5,
+ TokenNameXOR = 21,
+ TokenNameAND = 20,
+ TokenNameMULTIPLY = 4,
+ TokenNameOR = 22,
+ TokenNameTWIDDLE = 67,
+ TokenNameDIVIDE = 6,
+ TokenNameGREATER = 16,
+ TokenNameLESS = 7,
+ TokenNameLPAREN = 29,
+ TokenNameRPAREN = 28,
+ TokenNameLBRACE = 66,
+ TokenNameRBRACE = 31,
+ TokenNameLBRACKET = 13,
+ TokenNameRBRACKET = 70,
+ TokenNameSEMICOLON = 23,
+ TokenNameQUESTION = 24,
+ TokenNameCOLON = 65,
+ TokenNameCOMMA = 30,
+ TokenNameDOT = 3,
+ TokenNameEQUAL = 74,
+ TokenNameAT = 53,
+ TokenNameELLIPSIS = 107,
+ TokenNameEOF = 68,
+ TokenNameERROR = 108;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/diagnose/DiagnoseParser.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/diagnose/DiagnoseParser.js
new file mode 100644
index 0000000..abf84fc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/diagnose/DiagnoseParser.js
@@ -0,0 +1,2295 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.parser.diagnose;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.wst.jsdt.internal.compiler.parser.Parser;
+import org.eclipse.wst.jsdt.internal.compiler.parser.ParserBasicInformation;
+import org.eclipse.wst.jsdt.internal.compiler.parser.TerminalTokens;
+import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemReporter;
+
+public class DiagnoseParser implements ParserBasicInformation, TerminalTokens {
+ private static final boolean DEBUG = false;
+ private boolean DEBUG_PARSECHECK = false;
+
+ private static final String EMPTY_STRING = ""; //$NON-NLS-1$
+ private static final int STACK_INCREMENT = 256;
+
+// private static final int ERROR_CODE = 1;
+ private static final int BEFORE_CODE = 2;
+ private static final int INSERTION_CODE = 3;
+ private static final int INVALID_CODE = 4;
+ private static final int SUBSTITUTION_CODE = 5;
+ private static final int DELETION_CODE = 6;
+ private static final int MERGE_CODE = 7;
+ private static final int MISPLACED_CODE = 8;
+ private static final int SCOPE_CODE = 9;
+ private static final int SECONDARY_CODE = 10;
+ private static final int EOF_CODE = 11;
+
+ private static final int BUFF_UBOUND = 31;
+ private static final int BUFF_SIZE = 32;
+ private static final int MAX_DISTANCE = 30;
+ private static final int MIN_DISTANCE = 3;
+
+ private CompilerOptions options;
+
+ private LexStream lexStream;
+ private int errorToken;
+ private int errorTokenStart;
+
+ private int currentToken = 0;
+
+ private int stackLength;
+ private int stateStackTop;
+ private int[] stack;
+
+ private int[] locationStack;
+ private int[] locationStartStack;
+
+ private int tempStackTop;
+ private int[] tempStack;
+
+ private int prevStackTop;
+ private int[] prevStack;
+ private int nextStackTop;
+ private int[] nextStack;
+
+ private int scopeStackTop;
+ private int[] scopeIndex;
+ private int[] scopePosition;
+
+ int[] list = new int[NUM_SYMBOLS + 1];
+ int[] buffer = new int[BUFF_SIZE];
+
+ private static final int NIL = -1;
+ int[] stateSeen;
+
+ int statePoolTop;
+ StateInfo[] statePool;
+
+ private Parser parser;
+
+ private class RepairCandidate {
+ public int symbol;
+ public int location;
+
+ public RepairCandidate(){
+ this.symbol = 0;
+ this.location = 0;
+ }
+ }
+
+ private class PrimaryRepairInfo {
+ public int distance;
+ public int misspellIndex;
+ public int code;
+ public int bufferPosition;
+ public int symbol;
+
+ public PrimaryRepairInfo(){
+ this.distance = 0;
+ this.misspellIndex = 0;
+ this.code = 0;
+ this.bufferPosition = 0;
+ this.symbol = 0;
+ }
+
+ public PrimaryRepairInfo copy(){
+ PrimaryRepairInfo c = new PrimaryRepairInfo();
+ c.distance = this.distance;
+ c.misspellIndex = this.misspellIndex;
+ c.code = this.code;
+ c.bufferPosition = this .bufferPosition;
+ c.symbol = this.symbol;
+ return c;
+
+ }
+ }
+
+ private class SecondaryRepairInfo {
+ public int code;
+ public int distance;
+ public int bufferPosition;
+ public int stackPosition;
+ public int numDeletions;
+ public int symbol;
+
+ boolean recoveryOnNextStack;
+ }
+
+ private class StateInfo {
+ int state;
+ int next;
+
+ public StateInfo(int state, int next){
+ this.state = state;
+ this.next = next;
+ }
+ }
+
+ public DiagnoseParser(Parser parser, int firstToken, int start, int end, CompilerOptions options) {
+ this(parser, firstToken, start, end, new int[0], new int[0], new int[0], options);
+ }
+
+ public DiagnoseParser(Parser parser, int firstToken, int start, int end, int[] intervalStartToSkip, int[] intervalEndToSkip, int[] intervalFlagsToSkip, CompilerOptions options) {
+ this.parser = parser;
+ this.options = options;
+ this.lexStream = new LexStream(BUFF_SIZE, parser.scanner, intervalStartToSkip, intervalEndToSkip, intervalFlagsToSkip, firstToken, start, end);
+ }
+
+ private ProblemReporter problemReporter(){
+ return parser.problemReporter();
+ }
+
+ private void reallocateStacks() {
+ int old_stack_length = stackLength;
+
+ stackLength += STACK_INCREMENT;
+
+ if(old_stack_length == 0){
+ stack = new int[stackLength];
+ locationStack = new int[stackLength];
+ locationStartStack = new int[stackLength];
+ tempStack = new int[stackLength];
+ prevStack = new int[stackLength];
+ nextStack = new int[stackLength];
+ scopeIndex = new int[stackLength];
+ scopePosition = new int[stackLength];
+ } else {
+ System.arraycopy(stack, 0, stack = new int[stackLength], 0, old_stack_length);
+ System.arraycopy(locationStack, 0, locationStack = new int[stackLength], 0, old_stack_length);
+ System.arraycopy(locationStartStack, 0, locationStartStack = new int[stackLength], 0, old_stack_length);
+ System.arraycopy(tempStack, 0, tempStack = new int[stackLength], 0, old_stack_length);
+ System.arraycopy(prevStack, 0, prevStack = new int[stackLength], 0, old_stack_length);
+ System.arraycopy(nextStack, 0, nextStack = new int[stackLength], 0, old_stack_length);
+ System.arraycopy(scopeIndex, 0, scopeIndex = new int[stackLength], 0, old_stack_length);
+ System.arraycopy(scopePosition, 0, scopePosition = new int[stackLength], 0, old_stack_length);
+ }
+ return;
+ }
+
+
+ public void diagnoseParse() {
+ lexStream.reset();
+
+ currentToken = lexStream.getToken();
+
+ int prev_pos;
+ int pos;
+ int next_pos;
+ int act = START_STATE;
+
+ reallocateStacks();
+
+ //
+ // Start parsing
+ //
+ stateStackTop = 0;
+ stack[stateStackTop] = act;
+
+ int tok = lexStream.kind(currentToken);
+ locationStack[stateStackTop] = currentToken;
+ locationStartStack[stateStackTop] = lexStream.start(currentToken);
+
+ boolean forceRecoveryAfterLBracketMissing = false;
+// int forceRecoveryToken = -1;
+
+ //
+ // Process a terminal
+ //
+ do {
+ //
+ // Synchronize state stacks and update the location stack
+ //
+ prev_pos = -1;
+ prevStackTop = -1;
+
+ next_pos = -1;
+ nextStackTop = -1;
+
+ pos = stateStackTop;
+ tempStackTop = stateStackTop - 1;
+ for (int i = 0; i <= stateStackTop; i++)
+ tempStack[i] = stack[i];
+
+ act = Parser.tAction(act, tok);
+ //
+ // When a reduce action is encountered, we compute all REDUCE
+ // and associated goto actions induced by the current token.
+ // Eventually, a SHIFT, SHIFT-REDUCE, ACCEPT or ERROR action is
+ // computed...
+ //
+ while (act <= NUM_RULES) {
+ do {
+ tempStackTop -= (Parser.rhs[act]-1);
+ act = Parser.ntAction(tempStack[tempStackTop], Parser.lhs[act]);
+ } while(act <= NUM_RULES);
+ //
+ // ... Update the maximum useful position of the
+ // (STATE_)STACK, push goto state into stack, and
+ // compute next action on current symbol ...
+ //
+ if (tempStackTop + 1 >= stackLength)
+ reallocateStacks();
+ pos = pos < tempStackTop ? pos : tempStackTop;
+ tempStack[tempStackTop + 1] = act;
+ act = Parser.tAction(act, tok);
+ }
+
+ //
+ // At this point, we have a shift, shift-reduce, accept or error
+ // action. STACK contains the configuration of the state stack
+ // prior to executing any action on curtok. next_stack contains
+ // the configuration of the state stack after executing all
+ // reduce actions induced by curtok. The variable pos indicates
+ // the highest position in STACK that is still useful after the
+ // reductions are executed.
+ //
+ while(act > ERROR_ACTION || act < ACCEPT_ACTION) { // SHIFT-REDUCE action or SHIFT action ?
+ nextStackTop = tempStackTop + 1;
+ for (int i = next_pos + 1; i <= nextStackTop; i++)
+ nextStack[i] = tempStack[i];
+
+ for (int i = pos + 1; i <= nextStackTop; i++) {
+ locationStack[i] = locationStack[stateStackTop];
+ locationStartStack[i] = locationStartStack[stateStackTop];
+ }
+
+ //
+ // If we have a shift-reduce, process it as well as
+ // the goto-reduce actions that follow it.
+ //
+ if (act > ERROR_ACTION) {
+ act -= ERROR_ACTION;
+ do {
+ nextStackTop -= (Parser.rhs[act]-1);
+ act = Parser.ntAction(nextStack[nextStackTop], Parser.lhs[act]);
+ } while(act <= NUM_RULES);
+ pos = pos < nextStackTop ? pos : nextStackTop;
+ }
+
+ if (nextStackTop + 1 >= stackLength)
+ reallocateStacks();
+
+ tempStackTop = nextStackTop;
+ nextStack[++nextStackTop] = act;
+ next_pos = nextStackTop;
+
+ //
+ // Simulate the parser through the next token without
+ // destroying STACK or next_stack.
+ //
+ currentToken = lexStream.getToken();
+ tok = lexStream.kind(currentToken);
+ act = Parser.tAction(act, tok);
+ while(act <= NUM_RULES) {
+ //
+ // ... Process all goto-reduce actions following
+ // reduction, until a goto action is computed ...
+ //
+ do {
+ int lhs_symbol = Parser.lhs[act];
+ if(DEBUG) {
+ System.out.println(Parser.name[Parser.non_terminal_index[lhs_symbol]]);
+ }
+ tempStackTop -= (Parser.rhs[act]-1);
+ act = (tempStackTop > next_pos
+ ? tempStack[tempStackTop]
+ : nextStack[tempStackTop]);
+ act = Parser.ntAction(act, lhs_symbol);
+ } while(act <= NUM_RULES);
+
+ //
+ // ... Update the maximum useful position of the
+ // (STATE_)STACK, push GOTO state into stack, and
+ // compute next action on current symbol ...
+ //
+ if (tempStackTop + 1 >= stackLength)
+ reallocateStacks();
+
+ next_pos = next_pos < tempStackTop ? next_pos : tempStackTop;
+ tempStack[tempStackTop + 1] = act;
+ act = Parser.tAction(act, tok);
+ }
+
+// if((tok != TokenNameRBRACE || (forceRecoveryToken != currentToken && (lexStream.flags(currentToken) & LexStream.LBRACE_MISSING) != 0))
+// && (lexStream.flags(currentToken) & LexStream.IS_AFTER_JUMP) !=0) {
+// act = ERROR_ACTION;
+// if(forceRecoveryToken != currentToken
+// && (lexStream.flags(currentToken) & LexStream.LBRACE_MISSING) != 0) {
+// forceRecoveryAfterLBracketMissing = true;
+// forceRecoveryToken = currentToken;
+// }
+// }
+
+ //
+ // No error was detected, Read next token into
+ // PREVTOK element, advance CURTOK pointer and
+ // update stacks.
+ //
+ if (act != ERROR_ACTION) {
+ prevStackTop = stateStackTop;
+ for (int i = prev_pos + 1; i <= prevStackTop; i++)
+ prevStack[i] = stack[i];
+ prev_pos = pos;
+
+ stateStackTop = nextStackTop;
+ for (int i = pos + 1; i <= stateStackTop; i++)
+ stack[i] = nextStack[i];
+ locationStack[stateStackTop] = currentToken;
+ locationStartStack[stateStackTop] = lexStream.start(currentToken);
+ pos = next_pos;
+ }
+ }
+
+ //
+ // At this stage, either we have an ACCEPT or an ERROR
+ // action.
+ //
+ if (act == ERROR_ACTION) {
+ //
+ // An error was detected.
+ //
+ RepairCandidate candidate = errorRecovery(currentToken, forceRecoveryAfterLBracketMissing);
+
+ forceRecoveryAfterLBracketMissing = false;
+
+ if(parser.reportOnlyOneSyntaxError) {
+ return;
+ }
+
+ if(this.parser.problemReporter().options.maxProblemsPerUnit < this.parser.compilationUnit.compilationResult.problemCount) {
+ return;
+ }
+
+ act = stack[stateStackTop];
+
+ //
+ // If the recovery was successful on a nonterminal candidate,
+ // parse through that candidate and "read" the next token.
+ //
+ if (candidate.symbol == 0) {
+ break;
+ } else if (candidate.symbol > NT_OFFSET) {
+ int lhs_symbol = candidate.symbol - NT_OFFSET;
+ if(DEBUG) {
+ System.out.println(Parser.name[Parser.non_terminal_index[lhs_symbol]]);
+ }
+ act = Parser.ntAction(act, lhs_symbol);
+ while(act <= NUM_RULES) {
+ stateStackTop -= (Parser.rhs[act]-1);
+ act = Parser.ntAction(stack[stateStackTop], Parser.lhs[act]);
+ }
+ stack[++stateStackTop] = act;
+ currentToken = lexStream.getToken();
+ tok = lexStream.kind(currentToken);
+ locationStack[stateStackTop] = currentToken;
+ locationStartStack[stateStackTop] = lexStream.start(currentToken);
+ } else {
+ tok = candidate.symbol;
+ locationStack[stateStackTop] = candidate.location;
+ locationStartStack[stateStackTop] = lexStream.start(candidate.location);
+ }
+ }
+ } while (act != ACCEPT_ACTION);
+
+ return;
+ }
+
+ //
+// This routine is invoked when an error is encountered. It
+// tries to diagnose the error and recover from it. If it is
+// successful, the state stack, the current token and the buffer
+// are readjusted; i.e., after a successful recovery,
+// state_stack_top points to the location in the state stack
+// that contains the state on which to recover; curtok
+// identifies the symbol on which to recover.
+//
+// Up to three configurations may be available when this routine
+// is invoked. PREV_STACK may contain the sequence of states
+// preceding any action on prevtok, STACK always contains the
+// sequence of states preceding any action on curtok, and
+// NEXT_STACK may contain the sequence of states preceding any
+// action on the successor of curtok.
+//
+ private RepairCandidate errorRecovery(int error_token, boolean forcedError) {
+ this.errorToken = error_token;
+ this.errorTokenStart = lexStream.start(error_token);
+
+ int prevtok = lexStream.previous(error_token);
+ int prevtokKind = lexStream.kind(prevtok);
+
+ if(forcedError) {
+ int name_index = Parser.terminal_index[TokenNameLBRACE];
+
+ reportError(INSERTION_CODE, name_index, prevtok, prevtok);
+
+ RepairCandidate candidate = new RepairCandidate();
+ candidate.symbol = TokenNameLBRACE;
+ candidate.location = error_token;
+ lexStream.reset(error_token);
+
+ stateStackTop = nextStackTop;
+ for (int j = 0; j <= stateStackTop; j++) {
+ stack[j] = nextStack[j];
+ }
+ locationStack[stateStackTop] = error_token;
+ locationStartStack[stateStackTop] = lexStream.start(error_token);
+
+ return candidate;
+ }
+
+ //
+ // Try primary phase recoveries. If not successful, try secondary
+ // phase recoveries. If not successful and we are at end of the
+ // file, we issue the end-of-file error and quit. Otherwise, ...
+ //
+ RepairCandidate candidate = primaryPhase(error_token);
+ if (candidate.symbol != 0) {
+ return candidate;
+ }
+
+ candidate = secondaryPhase(error_token);
+ if (candidate.symbol != 0) {
+ return candidate;
+ }
+
+ if (lexStream.kind(error_token) == EOFT_SYMBOL) {
+ reportError(EOF_CODE,
+ Parser.terminal_index[EOFT_SYMBOL],
+ prevtok,
+ prevtok);
+ candidate.symbol = 0;
+ candidate.location = error_token;
+ return candidate;
+ }
+
+ //
+ // At this point, primary and (initial attempt at) secondary
+ // recovery did not work. We will now get into "panic mode" and
+ // keep trying secondary phase recoveries until we either find
+ // a successful recovery or have consumed the remaining input
+ // tokens.
+ //
+ while(lexStream.kind(buffer[BUFF_UBOUND]) != EOFT_SYMBOL) {
+ candidate = secondaryPhase(buffer[MAX_DISTANCE - MIN_DISTANCE + 2]);
+ if (candidate.symbol != 0) {
+ return candidate;
+ }
+ }
+
+ //
+ // We reached the end of the file while panicking. Delete all
+ // remaining tokens in the input.
+ //
+ int i;
+ for (i = BUFF_UBOUND; lexStream.kind(buffer[i]) == EOFT_SYMBOL; i--){/*empty*/}
+
+ reportError(DELETION_CODE,
+ Parser.terminal_index[prevtokKind],//Parser.terminal_index[lexStream.kind(prevtok)],
+ error_token,
+ buffer[i]);
+
+ candidate.symbol = 0;
+ candidate.location = buffer[i];
+
+ return candidate;
+ }
+
+//
+// This function tries primary and scope recovery on each
+// available configuration. If a successful recovery is found
+// and no secondary phase recovery can do better, a diagnosis is
+// issued, the configuration is updated and the function returns
+// "true". Otherwise, it returns "false".
+//
+ private RepairCandidate primaryPhase(int error_token) {
+ PrimaryRepairInfo repair = new PrimaryRepairInfo();
+ RepairCandidate candidate = new RepairCandidate();
+
+ //
+ // Initialize the buffer.
+ //
+ int i = (nextStackTop >= 0 ? 3 : 2);
+ buffer[i] = error_token;
+
+ for (int j = i; j > 0; j--)
+ buffer[j - 1] = lexStream.previous(buffer[j]);
+
+ for (int k = i + 1; k < BUFF_SIZE; k++)
+ buffer[k] = lexStream.next(buffer[k - 1]);
+
+ //
+ // If NEXT_STACK_TOP > 0 then the parse was successful on CURTOK
+ // and the error was detected on the successor of CURTOK. In
+ // that case, first check whether or not primary recovery is
+ // possible on next_stack ...
+ //
+ if (nextStackTop >= 0) {
+ repair.bufferPosition = 3;
+ repair = checkPrimaryDistance(nextStack, nextStackTop, repair);
+ }
+
+ //
+ // ... Next, try primary recovery on the current token...
+ //
+ PrimaryRepairInfo new_repair = repair.copy();
+
+ new_repair.bufferPosition = 2;
+ new_repair = checkPrimaryDistance(stack, stateStackTop, new_repair);
+ if (new_repair.distance > repair.distance || new_repair.misspellIndex > repair.misspellIndex) {
+ repair = new_repair;
+ }
+
+ //
+ // Finally, if prev_stack_top >= 0 then try primary recovery on
+ // the prev_stack configuration.
+ //
+
+ if (prevStackTop >= 0) {
+ new_repair = repair.copy();
+ new_repair.bufferPosition = 1;
+ new_repair = checkPrimaryDistance(prevStack,prevStackTop, new_repair);
+ if (new_repair.distance > repair.distance || new_repair.misspellIndex > repair.misspellIndex) {
+ repair = new_repair;
+ }
+ }
+
+ //
+ // Before accepting the best primary phase recovery obtained,
+ // ensure that we cannot do better with a similar secondary
+ // phase recovery.
+ //
+ if (nextStackTop >= 0) {// next_stack available
+ if (secondaryCheck(nextStack,nextStackTop,3,repair.distance)) {
+ return candidate;
+ }
+ }
+ else if (secondaryCheck(stack, stateStackTop, 2, repair.distance)) {
+ return candidate;
+ }
+
+ //
+ // First, adjust distance if the recovery is on the error token;
+ // it is important that the adjustment be made here and not at
+ // each primary trial to prevent the distance tests from being
+ // biased in favor of deferred recoveries which have access to
+ // more input tokens...
+ //
+ repair.distance = repair.distance - repair.bufferPosition + 1;
+
+ //
+ // ...Next, adjust the distance if the recovery is a deletion or
+ // (some form of) substitution...
+ //
+ if (repair.code == INVALID_CODE ||
+ repair.code == DELETION_CODE ||
+ repair.code == SUBSTITUTION_CODE ||
+ repair.code == MERGE_CODE) {
+ repair.distance--;
+ }
+
+ //
+ // ... After adjustment, check if the most successful primary
+ // recovery can be applied. If not, continue with more radical
+ // recoveries...
+ //
+ if (repair.distance < MIN_DISTANCE) {
+ return candidate;
+ }
+
+ //
+ // When processing an insertion error, if the token preceeding
+ // the error token is not available, we change the repair code
+ // into a BEFORE_CODE to instruct the reporting routine that it
+ // indicates that the repair symbol should be inserted before
+ // the error token.
+ //
+ if (repair.code == INSERTION_CODE) {
+ if (buffer[repair.bufferPosition - 1] == 0) {
+ repair.code = BEFORE_CODE;
+ }
+ }
+
+ //
+ // Select the proper sequence of states on which to recover,
+ // update stack accordingly and call diagnostic routine.
+ //
+ if (repair.bufferPosition == 1) {
+ stateStackTop = prevStackTop;
+ for (int j = 0; j <= stateStackTop; j++) {
+ stack[j] = prevStack[j];
+ }
+ } else if (nextStackTop >= 0 && repair.bufferPosition >= 3) {
+ stateStackTop = nextStackTop;
+ for (int j = 0; j <= stateStackTop; j++) {
+ stack[j] = nextStack[j];
+ }
+ locationStack[stateStackTop] = buffer[3];
+ locationStartStack[stateStackTop] = lexStream.start(buffer[3]);
+ }
+
+ return primaryDiagnosis(repair);
+ }
+
+
+//
+// This function checks whether or not a given state has a
+// candidate, whose string representaion is a merging of the two
+// tokens at positions buffer_position and buffer_position+1 in
+// the buffer. If so, it returns the candidate in question;
+// otherwise it returns 0.
+//
+ private int mergeCandidate(int state, int buffer_position) {
+ char[] name1 = lexStream.name(buffer[buffer_position]);
+ char[] name2 = lexStream.name(buffer[buffer_position + 1]);
+
+ int len = name1.length + name2.length;
+
+ char[] str = CharOperation.concat(name1, name2);
+
+ for (int k = Parser.asi(state); Parser.asr[k] != 0; k++) {
+ int l = Parser.terminal_index[Parser.asr[k]];
+
+ if (len == Parser.name[l].length()) {
+ char[] name = Parser.name[l].toCharArray();
+
+ if (CharOperation.equals(str, name, false)) {
+ return Parser.asr[k];
+ }
+ }
+ }
+
+ return 0;
+ }
+
+
+//
+// This procedure takes as arguments a parsing configuration
+// consisting of a state stack (stack and stack_top) and a fixed
+// number of input tokens (starting at buffer_position) in the
+// input BUFFER; and some reference arguments: repair_code,
+// distance, misspell_index, candidate, and stack_position
+// which it sets based on the best possible recovery that it
+// finds in the given configuration. The effectiveness of a
+// a repair is judged based on two criteria:
+//
+// 1) the number of tokens that can be parsed after the repair
+// is applied: distance.
+// 2) how close to perfection is the candidate that is chosen:
+// misspell_index.
+// When this procedure is entered, distance, misspell_index and
+// repair_code are assumed to be initialized.
+//
+ private PrimaryRepairInfo checkPrimaryDistance(int stck[], int stack_top, PrimaryRepairInfo repair) {
+ int i, j, k, next_state, max_pos, act, root, symbol, tok;
+
+ //
+ // First, try scope and manual recovery.
+ //
+ PrimaryRepairInfo scope_repair = scopeTrial(stck, stack_top, repair.copy());
+ if (scope_repair.distance > repair.distance)
+ repair = scope_repair;
+
+ //
+ // Next, try merging the error token with its successor.
+ //
+ if(buffer[repair.bufferPosition] != 0 && buffer[repair.bufferPosition + 1] != 0) {// do not merge the first token
+ symbol = mergeCandidate(stck[stack_top], repair.bufferPosition);
+ if (symbol != 0) {
+ j = parseCheck(stck, stack_top, symbol, repair.bufferPosition+2);
+ if ((j > repair.distance) || (j == repair.distance && repair.misspellIndex < 10)) {
+ repair.misspellIndex = 10;
+ repair.symbol = symbol;
+ repair.distance = j;
+ repair.code = MERGE_CODE;
+ }
+ }
+ }
+
+ //
+ // Next, try deletion of the error token.
+ //
+ j = parseCheck(
+ stck,
+ stack_top,
+ lexStream.kind(buffer[repair.bufferPosition + 1]),
+ repair.bufferPosition + 2);
+ if (lexStream.kind(buffer[repair.bufferPosition]) == EOLT_SYMBOL &&
+ lexStream.afterEol(buffer[repair.bufferPosition+1])) {
+ k = 10;
+ } else {
+ k = 0;
+ }
+ if (j > repair.distance || (j == repair.distance && k > repair.misspellIndex)) {
+ repair.misspellIndex = k;
+ repair.code = DELETION_CODE;
+ repair.distance = j;
+ }
+
+ //
+ // Update the error configuration by simulating all reduce and
+ // goto actions induced by the error token. Then assign the top
+ // most state of the new configuration to next_state.
+ //
+ next_state = stck[stack_top];
+ max_pos = stack_top;
+ tempStackTop = stack_top - 1;
+
+ tok = lexStream.kind(buffer[repair.bufferPosition]);
+ lexStream.reset(buffer[repair.bufferPosition + 1]);
+ act = Parser.tAction(next_state, tok);
+ while(act <= NUM_RULES) {
+ do {
+ tempStackTop -= (Parser.rhs[act]-1);
+ symbol = Parser.lhs[act];
+ act = (tempStackTop > max_pos
+ ? tempStack[tempStackTop]
+ : stck[tempStackTop]);
+ act = Parser.ntAction(act, symbol);
+ } while(act <= NUM_RULES);
+ max_pos = max_pos < tempStackTop ? max_pos : tempStackTop;
+ tempStack[tempStackTop + 1] = act;
+ next_state = act;
+ act = Parser.tAction(next_state, tok);
+ }
+
+ //
+ // Next, place the list of candidates in proper order.
+ //
+ root = 0;
+ for (i = Parser.asi(next_state); Parser.asr[i] != 0; i++) {
+ symbol = Parser.asr[i];
+ if (symbol != EOFT_SYMBOL && symbol != ERROR_SYMBOL) {
+ if (root == 0) {
+ list[symbol] = symbol;
+ } else {
+ list[symbol] = list[root];
+ list[root] = symbol;
+ }
+ root = symbol;
+ }
+ }
+
+ if (stck[stack_top] != next_state) {
+ for (i = Parser.asi(stck[stack_top]); Parser.asr[i] != 0; i++) {
+ symbol = Parser.asr[i];
+ if (symbol != EOFT_SYMBOL && symbol != ERROR_SYMBOL && list[symbol] == 0) {
+ if (root == 0) {
+ list[symbol] = symbol;
+ } else {
+ list[symbol] = list[root];
+ list[root] = symbol;
+ }
+ root = symbol;
+ }
+ }
+ }
+
+ i = list[root];
+ list[root] = 0;
+ root = i;
+
+ //
+ // Next, try insertion for each possible candidate available in
+ // the current state, except EOFT and ERROR_SYMBOL.
+ //
+ symbol = root;
+ while(symbol != 0) {
+ if (symbol == EOLT_SYMBOL && lexStream.afterEol(buffer[repair.bufferPosition])) {
+ k = 10;
+ } else {
+ k = 0;
+ }
+ j = parseCheck(stck, stack_top, symbol, repair.bufferPosition);
+ if (j > repair.distance) {
+ repair.misspellIndex = k;
+ repair.distance = j;
+ repair.symbol = symbol;
+ repair.code = INSERTION_CODE;
+ } else if (j == repair.distance && k > repair.misspellIndex) {
+ repair.misspellIndex = k;
+ repair.distance = j;
+ repair.symbol = symbol;
+ repair.code = INSERTION_CODE;
+ } else if (j == repair.distance && k == repair.misspellIndex && isBetterSymbol(symbol, repair.symbol)) {
+ repair.misspellIndex = k;
+ repair.distance = j;
+ repair.symbol = symbol;
+ repair.code = INSERTION_CODE;
+ }
+
+ symbol = list[symbol];
+ }
+
+ //
+ // Next, Try substitution for each possible candidate available
+ // in the current state, except EOFT and ERROR_SYMBOL.
+ //
+ symbol = root;
+
+ if(buffer[repair.bufferPosition] != 0) {// do not replace the first token
+ while(symbol != 0) {
+ if (symbol == EOLT_SYMBOL && lexStream.afterEol(buffer[repair.bufferPosition+1])) {
+ k = 10;
+ } else {
+ k = misspell(symbol, buffer[repair.bufferPosition]);
+ }
+ j = parseCheck(stck, stack_top, symbol, repair.bufferPosition+1);
+ if (j > repair.distance) {
+ repair.misspellIndex = k;
+ repair.distance = j;
+ repair.symbol = symbol;
+ repair.code = SUBSTITUTION_CODE;
+ } else if (j == repair.distance && k > repair.misspellIndex) {
+ repair.misspellIndex = k;
+ repair.symbol = symbol;
+ repair.code = SUBSTITUTION_CODE;
+ } else if (j == repair.distance && k > repair.misspellIndex && isBetterSymbol(symbol, repair.symbol)) {
+ repair.misspellIndex = k;
+ repair.symbol = symbol;
+ repair.code = SUBSTITUTION_CODE;
+ }
+ i = symbol;
+ symbol = list[symbol];
+ list[i] = 0; // reset element
+ }
+ }
+
+
+ //
+ // Next, we try to insert a nonterminal candidate in front of the
+ // error token, or substituting a nonterminal candidate for the
+ // error token. Precedence is given to insertion.
+ //
+ for (i = Parser.nasi(stck[stack_top]); Parser.nasr[i] != 0; i++) {
+ symbol = Parser.nasr[i] + NT_OFFSET;
+ j = parseCheck(stck, stack_top, symbol, repair.bufferPosition+1);
+ if (j > repair.distance) {
+ repair.misspellIndex = 0;
+ repair.distance = j;
+ repair.symbol = symbol;
+ repair.code = INVALID_CODE;
+ }
+
+ j = parseCheck(stck, stack_top, symbol, repair.bufferPosition);
+ if ((j > repair.distance) || (j == repair.distance && repair.code == INVALID_CODE)) {
+ repair.misspellIndex = 0;
+ repair.distance = j;
+ repair.symbol = symbol;
+ repair.code = INSERTION_CODE;
+ }
+ }
+
+ return repair;
+ }
+
+
+//
+// This procedure is invoked to issue a diagnostic message and
+// adjust the input buffer. The recovery in question is either
+// the insertion of one or more scopes, the merging of the error
+// token with its successor, the deletion of the error token,
+// the insertion of a single token in front of the error token
+// or the substitution of another token for the error token.
+//
+ private RepairCandidate primaryDiagnosis(PrimaryRepairInfo repair) {
+ int name_index;
+
+ //
+ // Issue diagnostic.
+ //
+ int prevtok = buffer[repair.bufferPosition - 1];
+ int curtok = buffer[repair.bufferPosition];
+
+ switch(repair.code) {
+ case INSERTION_CODE:
+ case BEFORE_CODE: {
+ if (repair.symbol > NT_OFFSET)
+ name_index = getNtermIndex(stack[stateStackTop],
+ repair.symbol,
+ repair.bufferPosition);
+ else name_index = getTermIndex(stack,
+ stateStackTop,
+ repair.symbol,
+ repair.bufferPosition);
+
+ int t = (repair.code == INSERTION_CODE ? prevtok : curtok);
+ reportError(repair.code, name_index, t, t);
+ break;
+ }
+ case INVALID_CODE: {
+ name_index = getNtermIndex(stack[stateStackTop],
+ repair.symbol,
+ repair.bufferPosition + 1);
+ reportError(repair.code, name_index, curtok, curtok);
+ break;
+ }
+ case SUBSTITUTION_CODE: {
+ if (repair.misspellIndex >= 6)
+ name_index = Parser.terminal_index[repair.symbol];
+ else
+ {
+ name_index = getTermIndex(stack, stateStackTop,
+ repair.symbol,
+ repair.bufferPosition + 1);
+ if (name_index != Parser.terminal_index[repair.symbol])
+ repair.code = INVALID_CODE;
+ }
+ reportError(repair.code, name_index, curtok, curtok);
+ break;
+ }
+ case MERGE_CODE: {
+ reportError(repair.code,
+ Parser.terminal_index[repair.symbol],
+ curtok,
+ lexStream.next(curtok));
+ break;
+ }
+ case SCOPE_CODE: {
+ for (int i = 0; i < scopeStackTop; i++) {
+ reportError(repair.code,
+ -scopeIndex[i],
+ locationStack[scopePosition[i]],
+ prevtok,
+ Parser.non_terminal_index[Parser.scope_lhs[scopeIndex[i]]]);
+ }
+
+ repair.symbol = Parser.scope_lhs[scopeIndex[scopeStackTop]] + NT_OFFSET;
+ stateStackTop = scopePosition[scopeStackTop];
+ reportError(repair.code,
+ -scopeIndex[scopeStackTop],
+ locationStack[scopePosition[scopeStackTop]],
+ prevtok,
+ getNtermIndex(stack[stateStackTop],
+ repair.symbol,
+ repair.bufferPosition)
+ );
+ break;
+ }
+ default: {// deletion
+ reportError(repair.code, Parser.terminal_index[ERROR_SYMBOL], curtok, curtok);
+ }
+ }
+
+ //
+ // Update buffer.
+ //
+ RepairCandidate candidate = new RepairCandidate();
+ switch (repair.code) {
+ case INSERTION_CODE:
+ case BEFORE_CODE:
+ case SCOPE_CODE: {
+ candidate.symbol = repair.symbol;
+ candidate.location = buffer[repair.bufferPosition];
+ lexStream.reset(buffer[repair.bufferPosition]);
+ break;
+ }
+ case INVALID_CODE:
+ case SUBSTITUTION_CODE: {
+ candidate.symbol = repair.symbol;
+ candidate.location = buffer[repair.bufferPosition];
+ lexStream.reset(buffer[repair.bufferPosition + 1]);
+ break;
+ }
+ case MERGE_CODE: {
+ candidate.symbol = repair.symbol;
+ candidate.location = buffer[repair.bufferPosition];
+ lexStream.reset(buffer[repair.bufferPosition + 2]);
+ break;
+ }
+ default: {// deletion
+ candidate.location = buffer[repair.bufferPosition + 1];
+ candidate.symbol =
+ lexStream.kind(buffer[repair.bufferPosition + 1]);
+ lexStream.reset(buffer[repair.bufferPosition + 2]);
+ break;
+ }
+ }
+
+ return candidate;
+ }
+
+
+//
+// This function takes as parameter an integer STACK_TOP that
+// points to a STACK element containing the state on which a
+// primary recovery will be made; the terminal candidate on which
+// to recover; and an integer: buffer_position, which points to
+// the position of the next input token in the BUFFER. The
+// parser is simulated until a shift (or shift-reduce) action
+// is computed on the candidate. Then we proceed to compute the
+// the name index of the highest level nonterminal that can
+// directly or indirectly produce the candidate.
+//
+ private int getTermIndex(int stck[], int stack_top, int tok, int buffer_position) {
+ //
+ // Initialize stack index of temp_stack and initialize maximum
+ // position of state stack that is still useful.
+ //
+ int act = stck[stack_top],
+ max_pos = stack_top,
+ highest_symbol = tok;
+
+ tempStackTop = stack_top - 1;
+
+ //
+ // Compute all reduce and associated actions induced by the
+ // candidate until a SHIFT or SHIFT-REDUCE is computed. ERROR
+ // and ACCEPT actions cannot be computed on the candidate in
+ // this context, since we know that it is suitable for recovery.
+ //
+ lexStream.reset(buffer[buffer_position]);
+ act = Parser.tAction(act, tok);
+ while(act <= NUM_RULES) {
+ //
+ // Process all goto-reduce actions following reduction,
+ // until a goto action is computed ...
+ //
+ do {
+ tempStackTop -= (Parser.rhs[act]-1);
+ int lhs_symbol = Parser.lhs[act];
+ act = (tempStackTop > max_pos
+ ? tempStack[tempStackTop]
+ : stck[tempStackTop]);
+ act = Parser.ntAction(act, lhs_symbol);
+ } while(act <= NUM_RULES);
+
+ //
+ // Compute new maximum useful position of (STATE_)stack,
+ // push goto state into the stack, and compute next
+ // action on candidate ...
+ //
+ max_pos = max_pos < tempStackTop ? max_pos : tempStackTop;
+ tempStack[tempStackTop + 1] = act;
+ act = Parser.tAction(act, tok);
+ }
+
+ //
+ // At this stage, we have simulated all actions induced by the
+ // candidate and we are ready to shift or shift-reduce it. First,
+ // set tok and next_ptr appropriately and identify the candidate
+ // as the initial highest_symbol. If a shift action was computed
+ // on the candidate, update the stack and compute the next
+ // action. Next, simulate all actions possible on the next input
+ // token until we either have to shift it or are about to reduce
+ // below the initial starting point in the stack (indicated by
+ // max_pos as computed in the previous loop). At that point,
+ // return the highest_symbol computed.
+ //
+ tempStackTop++; // adjust top of stack to reflect last goto
+ // next move is shift or shift-reduce.
+ int threshold = tempStackTop;
+
+ tok = lexStream.kind(buffer[buffer_position]);
+ lexStream.reset(buffer[buffer_position + 1]);
+
+ if (act > ERROR_ACTION) { // shift-reduce on candidate?
+ act -= ERROR_ACTION;
+ } else {
+ tempStack[tempStackTop + 1] = act;
+ act = Parser.tAction(act, tok);
+ }
+
+ while(act <= NUM_RULES) {
+ //
+ // Process all goto-reduce actions following reduction,
+ // until a goto action is computed ...
+ //
+ do {
+ tempStackTop -= (Parser.rhs[act]-1);
+
+ if (tempStackTop < threshold) {
+ return (highest_symbol > NT_OFFSET
+ ? Parser.non_terminal_index[highest_symbol - NT_OFFSET]
+ : Parser.terminal_index[highest_symbol]);
+ }
+
+ int lhs_symbol = Parser.lhs[act];
+ if (tempStackTop == threshold)
+ highest_symbol = lhs_symbol + NT_OFFSET;
+ act = (tempStackTop > max_pos
+ ? tempStack[tempStackTop]
+ : stck[tempStackTop]);
+ act = Parser.ntAction(act, lhs_symbol);
+ } while(act <= NUM_RULES);
+
+ tempStack[tempStackTop + 1] = act;
+ act = Parser.tAction(act, tok);
+ }
+
+ return (highest_symbol > NT_OFFSET
+ ? Parser.non_terminal_index[highest_symbol - NT_OFFSET]
+ : Parser.terminal_index[highest_symbol]);
+ }
+
+//
+// This function takes as parameter a starting state number:
+// start, a nonterminal symbol, A (candidate), and an integer,
+// buffer_position, which points to the position of the next
+// input token in the BUFFER.
+// It returns the highest level non-terminal B such that
+// B =>*rm A. I.e., there does not exists a nonterminal C such
+// that C =>+rm B. (Recall that for an LALR(k) grammar if
+// C =>+rm B, it cannot be the case that B =>+rm C)
+//
+ private int getNtermIndex(int start, int sym, int buffer_position) {
+ int highest_symbol = sym - NT_OFFSET,
+ tok = lexStream.kind(buffer[buffer_position]);
+ lexStream.reset(buffer[buffer_position + 1]);
+
+ //
+ // Initialize stack index of temp_stack and initialize maximum
+ // position of state stack that is still useful.
+ //
+ tempStackTop = 0;
+ tempStack[tempStackTop] = start;
+
+ int act = Parser.ntAction(start, highest_symbol);
+ if (act > NUM_RULES) { // goto action?
+ tempStack[tempStackTop + 1] = act;
+ act = Parser.tAction(act, tok);
+ }
+
+ while(act <= NUM_RULES) {
+ //
+ // Process all goto-reduce actions following reduction,
+ // until a goto action is computed ...
+ //
+ do {
+ tempStackTop -= (Parser.rhs[act]-1);
+ if (tempStackTop < 0)
+ return Parser.non_terminal_index[highest_symbol];
+ if (tempStackTop == 0)
+ highest_symbol = Parser.lhs[act];
+ act = Parser.ntAction(tempStack[tempStackTop], Parser.lhs[act]);
+ } while(act <= NUM_RULES);
+ tempStack[tempStackTop + 1] = act;
+ act = Parser.tAction(act, tok);
+ }
+
+ return Parser.non_terminal_index[highest_symbol];
+ }
+
+ private boolean isBetterSymbol(int symbol, int actualSymbol) {
+// switch (actualSymbol) {
+// case TokenNameinterface :
+// if(symbol == TokenNameclass) {
+// return true;
+// }
+// break;
+// }
+ return false;
+ }
+
+//
+// Check whether or not there is a high probability that a
+// given string is a misspelling of another.
+// Certain singleton symbols (such as ":" and ";") are also
+// considered to be misspelling of each other.
+//
+ private int misspell(int sym, int tok) {
+
+
+ //
+ //
+ //
+ char[] name = Parser.name[Parser.terminal_index[sym]].toCharArray();
+ int n = name.length;
+ char[] s1 = new char[n + 1];
+ for (int k = 0; k < n; k++) {
+ char c = name[k];
+ s1[k] = Character.toLowerCase(c);
+ }
+ s1[n] = '\0';
+
+ //
+ //
+ //
+ char[] tokenName = lexStream.name(tok);
+ int len = tokenName.length;
+ int m = len < MAX_NAME_LENGTH ? len : MAX_NAME_LENGTH;
+ char[] s2 = new char[m + 1];
+ for (int k = 0; k < m; k++) {
+ char c = tokenName[k];
+ s2[k] = Character.toLowerCase(c);
+ }
+ s2[m] = '\0';
+
+ //
+ // Singleton mispellings:
+ //
+ // ; <----> ,
+ //
+ // ; <----> :
+ //
+ // . <----> ,
+ //
+ // ' <----> "
+ //
+ //
+ if (n == 1 && m == 1) {
+ if ((s1[0] == ';' && s2[0] == ',') ||
+ (s1[0] == ',' && s2[0] == ';') ||
+ (s1[0] == ';' && s2[0] == ':') ||
+ (s1[0] == ':' && s2[0] == ';') ||
+ (s1[0] == '.' && s2[0] == ',') ||
+ (s1[0] == ',' && s2[0] == '.') ||
+ (s1[0] == '\'' && s2[0] == '\"') ||
+ (s1[0] == '\"' && s2[0] == '\'')) {
+ return 3;
+ }
+ }
+
+ //
+ // Scan the two strings. Increment "match" count for each match.
+ // When a transposition is encountered, increase "match" count
+ // by two but count it as an error. When a typo is found, skip
+ // it and count it as an error. Otherwise we have a mismatch; if
+ // one of the strings is longer, increment its index, otherwise,
+ // increment both indices and continue.
+ //
+ // This algorithm is an adaptation of a boolean misspelling
+ // algorithm proposed by Juergen Uhl.
+ //
+ int count = 0;
+ int prefix_length = 0;
+ int num_errors = 0;
+
+ int i = 0;
+ int j = 0;
+ while ((i < n) && (j < m)) {
+ if (s1[i] == s2[j]) {
+ count++;
+ i++;
+ j++;
+ if (num_errors == 0) {
+ prefix_length++;
+ }
+ } else if (s1[i+1] == s2[j] && s1[i] == s2[j+1]) {
+ count += 2;
+ i += 2;
+ j += 2;
+ num_errors++;
+ } else if (s1[i+1] == s2[j+1]) {
+ i++;
+ j++;
+ num_errors++;
+ } else {
+ if ((n - i) > (m - j)) {
+ i++;
+ } else if ((m - j) > (n - i)) {
+ j++;
+ } else {
+ i++;
+ j++;
+ }
+ num_errors++;
+ }
+ }
+
+ if (i < n || j < m)
+ num_errors++;
+
+ if (num_errors > ((n < m ? n : m) / 6 + 1))
+ count = prefix_length;
+
+ return(count * 10 / ((n < len ? len : n) + num_errors));
+ }
+
+ private PrimaryRepairInfo scopeTrial(int stck[], int stack_top, PrimaryRepairInfo repair) {
+ stateSeen = new int[stackLength];
+ for (int i = 0; i < stackLength; i++)
+ stateSeen[i] = NIL;
+
+ statePoolTop = 0;
+ statePool = new StateInfo[stackLength];
+
+ scopeTrialCheck(stck, stack_top, repair, 0);
+
+ stateSeen = null;
+ statePoolTop = 0;
+
+ repair.code = SCOPE_CODE;
+ repair.misspellIndex = 10;
+
+ return repair;
+ }
+
+ private void scopeTrialCheck(int stck[], int stack_top, PrimaryRepairInfo repair, int indx) {
+ if(indx > 20) return; // avoid too much recursive call to improve performance
+
+ int act = stck[stack_top];
+
+ for (int i = stateSeen[stack_top]; i != NIL; i = statePool[i].next) {
+ if (statePool[i].state == act) return;
+ }
+
+ int old_state_pool_top = statePoolTop++;
+ if(statePoolTop >= statePool.length) {
+ System.arraycopy(statePool, 0, statePool = new StateInfo[statePoolTop * 2], 0, statePoolTop);
+ }
+
+ statePool[old_state_pool_top] = new StateInfo(act, stateSeen[stack_top]);
+ stateSeen[stack_top] = old_state_pool_top;
+
+ for (int i = 0; i < SCOPE_SIZE; i++) {
+ //
+ // Use the scope lookahead symbol to force all reductions
+ // inducible by that symbol.
+ //
+ act = stck[stack_top];
+ tempStackTop = stack_top - 1;
+ int max_pos = stack_top;
+ int tok = Parser.scope_la[i];
+ lexStream.reset(buffer[repair.bufferPosition]);
+ act = Parser.tAction(act, tok);
+ while(act <= NUM_RULES) {
+ //
+ // ... Process all goto-reduce actions following
+ // reduction, until a goto action is computed ...
+ //
+ do {
+ tempStackTop -= (Parser.rhs[act]-1);
+ int lhs_symbol = Parser.lhs[act];
+ act = (tempStackTop > max_pos
+ ? tempStack[tempStackTop]
+ : stck[tempStackTop]);
+ act = Parser.ntAction(act, lhs_symbol);
+ } while(act <= NUM_RULES);
+ if (tempStackTop + 1 >= stackLength)
+ return;
+ max_pos = max_pos < tempStackTop ? max_pos : tempStackTop;
+ tempStack[tempStackTop + 1] = act;
+ act = Parser.tAction(act, tok);
+ }
+
+ //
+ // If the lookahead symbol is parsable, then we check
+ // whether or not we have a match between the scope
+ // prefix and the transition symbols corresponding to
+ // the states on top of the stack.
+ //
+ if (act != ERROR_ACTION) {
+ int j, k;
+ k = Parser.scope_prefix[i];
+ for (j = tempStackTop + 1;
+ j >= (max_pos + 1) &&
+ Parser.in_symbol(tempStack[j]) == Parser.scope_rhs[k]; j--) {
+ k++;
+ }
+ if (j == max_pos) {
+ for (j = max_pos;
+ j >= 1 && Parser.in_symbol(stck[j]) == Parser.scope_rhs[k];
+ j--) {
+ k++;
+ }
+ }
+ //
+ // If the prefix matches, check whether the state
+ // newly exposed on top of the stack, (after the
+ // corresponding prefix states are popped from the
+ // stack), is in the set of "source states" for the
+ // scope in question and that it is at a position
+ // below the threshold indicated by MARKED_POS.
+ //
+ int marked_pos = (max_pos < stack_top ? max_pos + 1 : stack_top);
+ if (Parser.scope_rhs[k] == 0 && j < marked_pos) { // match?
+ int stack_position = j;
+ for (j = Parser.scope_state_set[i];
+ stck[stack_position] != Parser.scope_state[j] &&
+ Parser.scope_state[j] != 0;
+ j++){/*empty*/}
+ //
+ // If the top state is valid for scope recovery,
+ // the left-hand side of the scope is used as
+ // starting symbol and we calculate how far the
+ // parser can advance within the forward context
+ // after parsing the left-hand symbol.
+ //
+ if (Parser.scope_state[j] != 0) { // state was found
+ int previous_distance = repair.distance;
+ int distance = parseCheck(stck,
+ stack_position,
+ Parser.scope_lhs[i]+NT_OFFSET,
+ repair.bufferPosition);
+ //
+ // if the recovery is not successful, we
+ // update the stack with all actions induced
+ // by the left-hand symbol, and recursively
+ // call SCOPE_TRIAL_CHECK to try again.
+ // Otherwise, the recovery is successful. If
+ // the new distance is greater than the
+ // initial SCOPE_DISTANCE, we update
+ // SCOPE_DISTANCE and set scope_stack_top to INDX
+ // to indicate the number of scopes that are
+ // to be applied for a succesful recovery.
+ // NOTE that this procedure cannot get into
+ // an infinite loop, since each prefix match
+ // is guaranteed to take us to a lower point
+ // within the stack.
+ //
+ if ((distance - repair.bufferPosition + 1) < MIN_DISTANCE) {
+ int top = stack_position;
+ act = Parser.ntAction(stck[top], Parser.scope_lhs[i]);
+ while(act <= NUM_RULES) {
+ top -= (Parser.rhs[act]-1);
+ act = Parser.ntAction(stck[top], Parser.lhs[act]);
+ }
+ top++;
+
+ j = act;
+ act = stck[top]; // save
+ stck[top] = j; // swap
+ scopeTrialCheck(stck, top, repair, indx+1);
+ stck[top] = act; // restore
+ } else if (distance > repair.distance) {
+ scopeStackTop = indx;
+ repair.distance = distance;
+ }
+
+ if (lexStream.kind(buffer[repair.bufferPosition]) == EOFT_SYMBOL &&
+ repair.distance == previous_distance) {
+ scopeStackTop = indx;
+ repair.distance = MAX_DISTANCE;
+ }
+
+ //
+ // If this scope recovery has beaten the
+ // previous distance, then we have found a
+ // better recovery (or this recovery is one
+ // of a list of scope recoveries). Record
+ // its information at the proper location
+ // (INDX) in SCOPE_INDEX and SCOPE_STACK.
+ //
+ if (repair.distance > previous_distance) {
+ scopeIndex[indx] = i;
+ scopePosition[indx] = stack_position;
+ return;
+ }
+ }
+ }
+ }
+ }
+ }
+//
+// This function computes the ParseCheck distance for the best
+// possible secondary recovery for a given configuration that
+// either deletes none or only one symbol in the forward context.
+// If the recovery found is more effective than the best primary
+// recovery previously computed, then the function returns true.
+// Only misplacement, scope and manual recoveries are attempted;
+// simple insertion or substitution of a nonterminal are tried
+// in CHECK_PRIMARY_DISTANCE as part of primary recovery.
+//
+ private boolean secondaryCheck(int stck[], int stack_top, int buffer_position, int distance) {
+ int top, j;
+
+ for (top = stack_top - 1; top >= 0; top--) {
+ j = parseCheck(stck, top,
+ lexStream.kind(buffer[buffer_position]),
+ buffer_position + 1);
+ if (((j - buffer_position + 1) > MIN_DISTANCE) && (j > distance))
+ return true;
+ }
+
+ PrimaryRepairInfo repair = new PrimaryRepairInfo();
+ repair.bufferPosition = buffer_position + 1;
+ repair.distance = distance;
+ repair = scopeTrial(stck, stack_top, repair);
+ if ((repair.distance - buffer_position) > MIN_DISTANCE && repair.distance > distance)
+ return true;
+ return false;
+ }
+
+
+//
+// Secondary_phase is a boolean function that checks whether or
+// not some form of secondary recovery is applicable to one of
+// the error configurations. First, if "next_stack" is available,
+// misplacement and secondary recoveries are attempted on it.
+// Then, in any case, these recoveries are attempted on "stack".
+// If a successful recovery is found, a diagnosis is issued, the
+// configuration is updated and the function returns "true".
+// Otherwise, the function returns false.
+//
+ private RepairCandidate secondaryPhase(int error_token) {
+ SecondaryRepairInfo repair = new SecondaryRepairInfo();
+ SecondaryRepairInfo misplaced = new SecondaryRepairInfo();
+
+ RepairCandidate candidate = new RepairCandidate();
+
+ int i, j, k, top;
+ int next_last_index = 0;
+ int last_index;
+
+ candidate.symbol = 0;
+
+ repair.code = 0;
+ repair.distance = 0;
+ repair.recoveryOnNextStack = false;
+
+ misplaced.distance = 0;
+ misplaced.recoveryOnNextStack = false;
+
+ //
+ // If the next_stack is available, try misplaced and secondary
+ // recovery on it first.
+ //
+ if (nextStackTop >= 0) {
+ int save_location;
+
+ buffer[2] = error_token;
+ buffer[1] = lexStream.previous(buffer[2]);
+ buffer[0] = lexStream.previous(buffer[1]);
+
+ for (k = 3; k < BUFF_UBOUND; k++)
+ buffer[k] = lexStream.next(buffer[k - 1]);
+
+ buffer[BUFF_UBOUND] = lexStream.badtoken();// elmt not available
+
+ //
+ // If we are at the end of the input stream, compute the
+ // index position of the first EOFT symbol (last useful
+ // index).
+ //
+ for (next_last_index = MAX_DISTANCE - 1;
+ next_last_index >= 1 &&
+ lexStream.kind(buffer[next_last_index]) == EOFT_SYMBOL;
+ next_last_index--){/*empty*/}
+ next_last_index = next_last_index + 1;
+
+ save_location = locationStack[nextStackTop];
+ int save_location_start = locationStartStack[nextStackTop];
+ locationStack[nextStackTop] = buffer[2];
+ locationStartStack[nextStackTop] = lexStream.start(buffer[2]);
+ misplaced.numDeletions = nextStackTop;
+ misplaced = misplacementRecovery(nextStack, nextStackTop,
+ next_last_index,
+ misplaced, true);
+ if (misplaced.recoveryOnNextStack)
+ misplaced.distance++;
+
+ repair.numDeletions = nextStackTop + BUFF_UBOUND;
+ repair = secondaryRecovery(nextStack, nextStackTop,
+ next_last_index,
+ repair, true);
+ if (repair.recoveryOnNextStack)
+ repair.distance++;
+
+ locationStack[nextStackTop] = save_location;
+ locationStartStack[nextStackTop] = save_location_start;
+ } else { // next_stack not available, initialize ...
+ misplaced.numDeletions = stateStackTop;
+ repair.numDeletions = stateStackTop + BUFF_UBOUND;
+ }
+
+ //
+ // Try secondary recovery on the "stack" configuration.
+ //
+ buffer[3] = error_token;
+
+ buffer[2] = lexStream.previous(buffer[3]);
+ buffer[1] = lexStream.previous(buffer[2]);
+ buffer[0] = lexStream.previous(buffer[1]);
+
+ for (k = 4; k < BUFF_SIZE; k++)
+ buffer[k] = lexStream.next(buffer[k - 1]);
+
+ for (last_index = MAX_DISTANCE - 1;
+ last_index >= 1 && lexStream.kind(buffer[last_index]) == EOFT_SYMBOL;
+ last_index--){/*empty*/}
+ last_index++;
+
+ misplaced = misplacementRecovery(stack, stateStackTop,
+ last_index,
+ misplaced, false);
+
+ repair = secondaryRecovery(stack, stateStackTop,
+ last_index, repair, false);
+
+ //
+ // If a successful misplaced recovery was found, compare it with
+ // the most successful secondary recovery. If the misplaced
+ // recovery either deletes fewer symbols or parse-checks further
+ // then it is chosen.
+ //
+ if (misplaced.distance > MIN_DISTANCE) {
+ if (misplaced.numDeletions <= repair.numDeletions ||
+ (misplaced.distance - misplaced.numDeletions) >=
+ (repair.distance - repair.numDeletions)) {
+ repair.code = MISPLACED_CODE;
+ repair.stackPosition = misplaced.stackPosition;
+ repair.bufferPosition = 2;
+ repair.numDeletions = misplaced.numDeletions;
+ repair.distance = misplaced.distance;
+ repair.recoveryOnNextStack = misplaced.recoveryOnNextStack;
+ }
+ }
+
+ //
+ // If the successful recovery was on next_stack, update: stack,
+ // buffer, location_stack and last_index.
+ //
+ if (repair.recoveryOnNextStack) {
+ stateStackTop = nextStackTop;
+ for (i = 0; i <= stateStackTop; i++)
+ stack[i] = nextStack[i];
+
+ buffer[2] = error_token;
+ buffer[1] = lexStream.previous(buffer[2]);
+ buffer[0] = lexStream.previous(buffer[1]);
+
+ for (k = 3; k < BUFF_UBOUND; k++)
+ buffer[k] = lexStream.next(buffer[k - 1]);
+
+ buffer[BUFF_UBOUND] = lexStream.badtoken();// elmt not available
+
+ locationStack[nextStackTop] = buffer[2];
+ locationStartStack[nextStackTop] = lexStream.start(buffer[2]);
+ last_index = next_last_index;
+ }
+
+ //
+ // Next, try scope recoveries after deletion of one, two, three,
+ // four ... buffer_position tokens from the input stream.
+ //
+ if (repair.code == SECONDARY_CODE || repair.code == DELETION_CODE) {
+ PrimaryRepairInfo scope_repair = new PrimaryRepairInfo();
+
+ scope_repair.distance = 0;
+ for (scope_repair.bufferPosition = 2;
+ scope_repair.bufferPosition <= repair.bufferPosition &&
+ repair.code != SCOPE_CODE; scope_repair.bufferPosition++) {
+ scope_repair = scopeTrial(stack, stateStackTop, scope_repair);
+ j = (scope_repair.distance == MAX_DISTANCE
+ ? last_index
+ : scope_repair.distance);
+ k = scope_repair.bufferPosition - 1;
+ if ((j - k) > MIN_DISTANCE && (j - k) > (repair.distance - repair.numDeletions)) {
+ repair.code = SCOPE_CODE;
+ i = scopeIndex[scopeStackTop]; // upper bound
+ repair.symbol = Parser.scope_lhs[i] + NT_OFFSET;
+ repair.stackPosition = stateStackTop;
+ repair.bufferPosition = scope_repair.bufferPosition;
+ }
+ }
+ }
+
+ //
+ // If no successful recovery is found and we have reached the
+ // end of the file, check whether or not scope recovery is
+ // applicable at the end of the file after discarding some
+ // states.
+ //
+ if (repair.code == 0 && lexStream.kind(buffer[last_index]) == EOFT_SYMBOL) {
+ PrimaryRepairInfo scope_repair = new PrimaryRepairInfo();
+
+ scope_repair.bufferPosition = last_index;
+ scope_repair.distance = 0;
+ for (top = stateStackTop;
+ top >= 0 && repair.code == 0; top--)
+ {
+ scope_repair = scopeTrial(stack, top, scope_repair);
+ if (scope_repair.distance > 0)
+ {
+ repair.code = SCOPE_CODE;
+ i = scopeIndex[scopeStackTop]; // upper bound
+ repair.symbol = Parser.scope_lhs[i] + NT_OFFSET;
+ repair.stackPosition = top;
+ repair.bufferPosition = scope_repair.bufferPosition;
+ }
+ }
+ }
+
+ //
+ // If a successful repair was not found, quit! Otherwise, issue
+ // diagnosis and adjust configuration...
+ //
+ if (repair.code == 0)
+ return candidate;
+
+ secondaryDiagnosis(repair);
+
+ //
+ // Update buffer based on number of elements that are deleted.
+ //
+ switch(repair.code) {
+ case MISPLACED_CODE:
+ candidate.location = buffer[2];
+ candidate.symbol = lexStream.kind(buffer[2]);
+ lexStream.reset(lexStream.next(buffer[2]));
+
+ break;
+
+ case DELETION_CODE:
+ candidate.location = buffer[repair.bufferPosition];
+ candidate.symbol =
+ lexStream.kind(buffer[repair.bufferPosition]);
+ lexStream.reset(lexStream.next(buffer[repair.bufferPosition]));
+
+ break;
+
+ default: // SCOPE_CODE || SECONDARY_CODE
+ candidate.symbol = repair.symbol;
+ candidate.location = buffer[repair.bufferPosition];
+ lexStream.reset(buffer[repair.bufferPosition]);
+
+ break;
+ }
+
+ return candidate;
+ }
+
+
+//
+// This boolean function checks whether or not a given
+// configuration yields a better misplacement recovery than
+// the best misplacement recovery computed previously.
+//
+ private SecondaryRepairInfo misplacementRecovery(int stck[], int stack_top, int last_index, SecondaryRepairInfo repair, boolean stack_flag) {
+ int previous_loc = buffer[2];
+ int stack_deletions = 0;
+
+ for (int top = stack_top - 1; top >= 0; top--) {
+ if (locationStack[top] < previous_loc) {
+ stack_deletions++;
+ }
+ previous_loc = locationStack[top];
+
+ int j = parseCheck(stck, top, lexStream.kind(buffer[2]), 3);
+ if (j == MAX_DISTANCE) {
+ j = last_index;
+ }
+ if ((j > MIN_DISTANCE) && (j - stack_deletions) > (repair.distance - repair.numDeletions)) {
+ repair.stackPosition = top;
+ repair.distance = j;
+ repair.numDeletions = stack_deletions;
+ repair.recoveryOnNextStack = stack_flag;
+ }
+ }
+
+ return repair;
+ }
+
+
+//
+// This boolean function checks whether or not a given
+// configuration yields a better secondary recovery than the
+// best misplacement recovery computed previously.
+//
+ private SecondaryRepairInfo secondaryRecovery(int stck[],int stack_top, int last_index, SecondaryRepairInfo repair, boolean stack_flag) {
+ int previous_loc;
+ int stack_deletions = 0;
+
+ previous_loc = buffer[2];
+ for (int top = stack_top; top >= 0 && repair.numDeletions >= stack_deletions; top--) {
+ if (locationStack[top] < previous_loc) {
+ stack_deletions++;
+ }
+ previous_loc = locationStack[top];
+
+ for (int i = 2;
+ i <= (last_index - MIN_DISTANCE + 1) &&
+ (repair.numDeletions >= (stack_deletions + i - 1)); i++) {
+ int j = parseCheck(stck, top, lexStream.kind(buffer[i]), i + 1);
+
+ if (j == MAX_DISTANCE) {
+ j = last_index;
+ }
+ if ((j - i + 1) > MIN_DISTANCE) {
+ int k = stack_deletions + i - 1;
+ if ((k < repair.numDeletions) ||
+ (j - k) > (repair.distance - repair.numDeletions) ||
+ ((repair.code == SECONDARY_CODE) && (j - k) == (repair.distance - repair.numDeletions))) {
+ repair.code = DELETION_CODE;
+ repair.distance = j;
+ repair.stackPosition = top;
+ repair.bufferPosition = i;
+ repair.numDeletions = k;
+ repair.recoveryOnNextStack = stack_flag;
+ }
+ }
+
+ for (int l = Parser.nasi(stck[top]); l >= 0 && Parser.nasr[l] != 0; l++) {
+ int symbol = Parser.nasr[l] + NT_OFFSET;
+ j = parseCheck(stck, top, symbol, i);
+ if (j == MAX_DISTANCE) {
+ j = last_index;
+ }
+ if ((j - i + 1) > MIN_DISTANCE) {
+ int k = stack_deletions + i - 1;
+ if (k < repair.numDeletions || (j - k) > (repair.distance - repair.numDeletions)) {
+ repair.code = SECONDARY_CODE;
+ repair.symbol = symbol;
+ repair.distance = j;
+ repair.stackPosition = top;
+ repair.bufferPosition = i;
+ repair.numDeletions = k;
+ repair.recoveryOnNextStack = stack_flag;
+ }
+ }
+ }
+ }
+ }
+
+ return repair;
+ }
+
+
+//
+// This procedure is invoked to issue a secondary diagnosis and
+// adjust the input buffer. The recovery in question is either
+// an automatic scope recovery, a manual scope recovery, a
+// secondary substitution or a secondary deletion.
+//
+ private void secondaryDiagnosis(SecondaryRepairInfo repair) {
+ switch(repair.code) {
+ case SCOPE_CODE: {
+ if (repair.stackPosition < stateStackTop) {
+ reportError(DELETION_CODE,
+ Parser.terminal_index[ERROR_SYMBOL],
+ locationStack[repair.stackPosition],
+ buffer[1]);
+ }
+ for (int i = 0; i < scopeStackTop; i++) {
+ reportError(SCOPE_CODE,
+ -scopeIndex[i],
+ locationStack[scopePosition[i]],
+ buffer[1],
+ Parser.non_terminal_index[Parser.scope_lhs[scopeIndex[i]]]);
+ }
+
+ repair.symbol = Parser.scope_lhs[scopeIndex[scopeStackTop]] + NT_OFFSET;
+ stateStackTop = scopePosition[scopeStackTop];
+ reportError(SCOPE_CODE,
+ -scopeIndex[scopeStackTop],
+ locationStack[scopePosition[scopeStackTop]],
+ buffer[1],
+ getNtermIndex(stack[stateStackTop],
+ repair.symbol,
+ repair.bufferPosition)
+ );
+ break;
+ }
+ default: {
+ reportError(repair.code,
+ (repair.code == SECONDARY_CODE
+ ? getNtermIndex(stack[repair.stackPosition],
+ repair.symbol,
+ repair.bufferPosition)
+ : Parser.terminal_index[ERROR_SYMBOL]),
+ locationStack[repair.stackPosition],
+ buffer[repair.bufferPosition - 1]);
+ stateStackTop = repair.stackPosition;
+ }
+ }
+ }
+
+
+
+
+//
+// Try to parse until first_token and all tokens in BUFFER have
+// been consumed, or an error is encountered. Return the number
+// of tokens that were expended before the parse blocked.
+//
+ private int parseCheck(int stck[], int stack_top, int first_token, int buffer_position) {
+ int max_pos;
+ int indx;
+ int ct;
+ int act;
+
+ //
+ // Initialize pointer for temp_stack and initialize maximum
+ // position of state stack that is still useful.
+ //
+ act = stck[stack_top];
+ if (first_token > NT_OFFSET) {
+ tempStackTop = stack_top;
+ if(DEBUG_PARSECHECK) {
+ System.out.println(tempStackTop);
+ }
+ max_pos = stack_top;
+ indx = buffer_position;
+ ct = lexStream.kind(buffer[indx]);
+ lexStream.reset(lexStream.next(buffer[indx]));
+ int lhs_symbol = first_token - NT_OFFSET;
+ act = Parser.ntAction(act, lhs_symbol);
+ if (act <= NUM_RULES) {
+ // same loop as 'process_non_terminal'
+ do {
+ tempStackTop -= (Parser.rhs[act]-1);
+
+ if(DEBUG_PARSECHECK) {
+ System.out.print(tempStackTop);
+ System.out.print(" ("); //$NON-NLS-1$
+ System.out.print(-(Parser.rhs[act]-1));
+ System.out.print(") [max:"); //$NON-NLS-1$
+ System.out.print(max_pos);
+ System.out.print("]\tprocess_non_terminal\t"); //$NON-NLS-1$
+ System.out.print(act);
+ System.out.print("\t"); //$NON-NLS-1$
+ System.out.print(Parser.name[Parser.non_terminal_index[Parser.lhs[act]]]);
+ System.out.println();
+ }
+
+ if(Parser.rules_compliance[act] > this.options.sourceLevel) {
+ return 0;
+ }
+ lhs_symbol = Parser.lhs[act];
+ act = (tempStackTop > max_pos
+ ? tempStack[tempStackTop]
+ : stck[tempStackTop]);
+ act = Parser.ntAction(act, lhs_symbol);
+ } while(act <= NUM_RULES);
+
+ max_pos = max_pos < tempStackTop ? max_pos : tempStackTop;
+ }
+ } else {
+ tempStackTop = stack_top - 1;
+
+ if(DEBUG_PARSECHECK) {
+ System.out.println(tempStackTop);
+ }
+
+ max_pos = tempStackTop;
+ indx = buffer_position - 1;
+ ct = first_token;
+ lexStream.reset(buffer[buffer_position]);
+ }
+
+ process_terminal: for (;;) {
+ if(DEBUG_PARSECHECK) {
+ System.out.print(tempStackTop + 1);
+ System.out.print(" (+1) [max:"); //$NON-NLS-1$
+ System.out.print(max_pos);
+ System.out.print("]\tprocess_terminal \t"); //$NON-NLS-1$
+ System.out.print(ct);
+ System.out.print("\t"); //$NON-NLS-1$
+ System.out.print(Parser.name[Parser.terminal_index[ct]]);
+ System.out.println();
+ }
+
+ if (++tempStackTop >= stackLength) // Stack overflow!!!
+ return indx;
+ tempStack[tempStackTop] = act;
+
+ act = Parser.tAction(act, ct);
+
+ if (act <= NUM_RULES) { // reduce action
+ tempStackTop--;
+
+ if(DEBUG_PARSECHECK) {
+ System.out.print(tempStackTop);
+ System.out.print(" (-1) [max:"); //$NON-NLS-1$
+ System.out.print(max_pos);
+ System.out.print("]\treduce"); //$NON-NLS-1$
+ System.out.println();
+ }
+ } else if (act < ACCEPT_ACTION || // shift action
+ act > ERROR_ACTION) { // shift-reduce action
+ if (indx == MAX_DISTANCE)
+ return indx;
+ indx++;
+ ct = lexStream.kind(buffer[indx]);
+ lexStream.reset(lexStream.next(buffer[indx]));
+ if (act > ERROR_ACTION) {
+ act -= ERROR_ACTION;
+
+ if(DEBUG_PARSECHECK) {
+ System.out.print(tempStackTop);
+ System.out.print("\tshift reduce"); //$NON-NLS-1$
+ System.out.println();
+ }
+ } else {
+ if(DEBUG_PARSECHECK) {
+ System.out.println("\tshift"); //$NON-NLS-1$
+ }
+ continue process_terminal;
+ }
+ } else if (act == ACCEPT_ACTION) { // accept action
+ return MAX_DISTANCE;
+ } else {
+ return indx; // error action
+ }
+
+ // same loop as first token initialization
+ process_non_terminal:
+ do {
+ tempStackTop -= (Parser.rhs[act]-1);
+
+ if(DEBUG_PARSECHECK) {
+ System.out.print(tempStackTop);
+ System.out.print(" ("); //$NON-NLS-1$
+ System.out.print(-(Parser.rhs[act]-1));
+ System.out.print(") [max:"); //$NON-NLS-1$
+ System.out.print(max_pos);
+ System.out.print("]\tprocess_non_terminal\t"); //$NON-NLS-1$
+ System.out.print(act);
+ System.out.print("\t"); //$NON-NLS-1$
+ System.out.print(Parser.name[Parser.non_terminal_index[Parser.lhs[act]]]);
+ System.out.println();
+ }
+
+ if(act <= NUM_RULES) {
+ if(Parser.rules_compliance[act] > this.options.sourceLevel) {
+ return 0;
+ }
+ }
+ int lhs_symbol = Parser.lhs[act];
+ act = (tempStackTop > max_pos
+ ? tempStack[tempStackTop]
+ : stck[tempStackTop]);
+ act = Parser.ntAction(act, lhs_symbol);
+ } while(act <= NUM_RULES);
+
+ max_pos = max_pos < tempStackTop ? max_pos : tempStackTop;
+ } // process_terminal;
+ }
+ private void reportError(int msgCode, int nameIndex, int leftToken, int rightToken) {
+ reportError(msgCode, nameIndex, leftToken, rightToken, 0);
+ }
+
+ private void reportError(int msgCode, int nameIndex, int leftToken, int rightToken, int scopeNameIndex) {
+ int lToken = (leftToken > rightToken ? rightToken : leftToken);
+
+ if (lToken < rightToken) {
+ reportSecondaryError(msgCode, nameIndex, lToken, rightToken, scopeNameIndex);
+ } else {
+ reportPrimaryError(msgCode, nameIndex, rightToken, scopeNameIndex);
+ }
+ }
+ private void reportPrimaryError(int msgCode, int nameIndex, int token, int scopeNameIndex) {
+ String name;
+ if (nameIndex >= 0) {
+ name = Parser.readableName[nameIndex];
+ } else {
+ name = EMPTY_STRING;
+ }
+
+ int errorStart = lexStream.start(token);
+ int errorEnd = lexStream.end(token);
+ int currentKind = lexStream.kind(token);
+ String errorTokenName = Parser.name[Parser.terminal_index[lexStream.kind(token)]];
+ char[] errorTokenSource = lexStream.name(token);
+
+ switch(msgCode) {
+ case BEFORE_CODE:
+ problemReporter().parseErrorInsertBeforeToken(
+ errorStart,
+ errorEnd,
+ currentKind,
+ errorTokenSource,
+ errorTokenName,
+ name);
+ break;
+ case INSERTION_CODE:
+ problemReporter().parseErrorInsertAfterToken(
+ errorStart,
+ errorEnd,
+ currentKind,
+ errorTokenSource,
+ errorTokenName,
+ name);
+ break;
+ case DELETION_CODE:
+ problemReporter().parseErrorDeleteToken(
+ errorStart,
+ errorEnd,
+ currentKind,
+ errorTokenSource,
+ errorTokenName);
+ break;
+ case INVALID_CODE:
+ if (name.length() == 0) {
+ problemReporter().parseErrorReplaceToken(
+ errorStart,
+ errorEnd,
+ currentKind,
+ errorTokenSource,
+ errorTokenName,
+ name);
+ } else {
+ problemReporter().parseErrorInvalidToken(
+ errorStart,
+ errorEnd,
+ currentKind,
+ errorTokenSource,
+ errorTokenName,
+ name);
+ }
+ break;
+ case SUBSTITUTION_CODE:
+ problemReporter().parseErrorReplaceToken(
+ errorStart,
+ errorEnd,
+ currentKind,
+ errorTokenSource,
+ errorTokenName,
+ name);
+ break;
+ case SCOPE_CODE:
+ StringBuffer buf = new StringBuffer();
+ for (int i = Parser.scope_suffix[- nameIndex]; Parser.scope_rhs[i] != 0; i++) {
+ buf.append(Parser.readableName[Parser.scope_rhs[i]]);
+ if (Parser.scope_rhs[i + 1] != 0) // any more symbols to print?
+ buf.append(' ');
+
+ }
+
+ if (scopeNameIndex != 0) {
+ problemReporter().parseErrorInsertToComplete(
+ errorStart,
+ errorEnd,
+ buf.toString(),
+ Parser.readableName[scopeNameIndex]);
+ } else {
+ problemReporter().parseErrorInsertToCompleteScope(
+ errorStart,
+ errorEnd,
+ buf.toString());
+ }
+
+ break;
+ case EOF_CODE:
+ problemReporter().parseErrorUnexpectedEnd(
+ errorStart,
+ errorEnd);
+ break;
+ case MERGE_CODE:
+ problemReporter().parseErrorMergeTokens(
+ errorStart,
+ errorEnd,
+ name);
+ break;
+ case MISPLACED_CODE:
+ problemReporter().parseErrorMisplacedConstruct(
+ errorStart,
+ errorEnd);
+ break;
+ default:
+ if (name.length() == 0) {
+ problemReporter().parseErrorNoSuggestion(
+ errorStart,
+ errorEnd,
+ currentKind,
+ errorTokenSource,
+ errorTokenName);
+ } else {
+ problemReporter().parseErrorReplaceToken(
+ errorStart,
+ errorEnd,
+ currentKind,
+ errorTokenSource,
+ errorTokenName,
+ name);
+ }
+ break;
+ }
+ }
+
+ private void reportSecondaryError(int msgCode, int nameIndex, int leftToken, int rightToken, int scopeNameIndex) {
+ String name;
+ if (nameIndex >= 0) {
+ name = Parser.readableName[nameIndex];
+ } else {
+ name = EMPTY_STRING;
+ }
+
+ int errorStart = -1;
+ if(lexStream.isInsideStream(leftToken)) {
+ if(leftToken == 0) {
+ errorStart = lexStream.start(leftToken + 1);
+ } else {
+ errorStart = lexStream.start(leftToken);
+ }
+ } else {
+ if(leftToken == errorToken) {
+ errorStart = errorTokenStart;
+ } else {
+ for (int i = 0; i <= stateStackTop; i++) {
+ if(locationStack[i] == leftToken) {
+ errorStart = locationStartStack[i];
+ }
+ }
+ }
+ if(errorStart == -1) {
+ errorStart = lexStream.start(rightToken);
+ }
+ }
+ int errorEnd = lexStream.end(rightToken);
+
+ switch(msgCode) {
+ case MISPLACED_CODE:
+ problemReporter().parseErrorMisplacedConstruct(
+ errorStart,
+ errorEnd);
+ break;
+ case SCOPE_CODE:
+ // error start is on the last token start
+ errorStart = lexStream.start(rightToken);
+
+ StringBuffer buf = new StringBuffer();
+ for (int i = Parser.scope_suffix[- nameIndex]; Parser.scope_rhs[i] != 0; i++) {
+ buf.append(Parser.readableName[Parser.scope_rhs[i]]);
+ if (Parser.scope_rhs[i+1] != 0)
+ buf.append(' ');
+ }
+ if (scopeNameIndex != 0) {
+ problemReporter().parseErrorInsertToComplete(
+ errorStart,
+ errorEnd,
+ buf.toString(),
+ Parser.readableName[scopeNameIndex]);
+ } else {
+ problemReporter().parseErrorInsertToCompletePhrase(
+ errorStart,
+ errorEnd,
+ buf.toString());
+ }
+ break;
+ case MERGE_CODE:
+ problemReporter().parseErrorMergeTokens(
+ errorStart,
+ errorEnd,
+ name);
+ break;
+ case DELETION_CODE:
+ problemReporter().parseErrorDeleteTokens(
+ errorStart,
+ errorEnd);
+ break;
+ default:
+ if (name.length() == 0) {
+ problemReporter().parseErrorNoSuggestionForTokens(
+ errorStart,
+ errorEnd);
+ } else {
+ problemReporter().parseErrorReplaceTokens(
+ errorStart,
+ errorEnd,
+ name);
+ }
+ }
+ return;
+ }
+
+ public String toString() {
+ StringBuffer res = new StringBuffer();
+
+ res.append(lexStream.toString());
+
+ return res.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/diagnose/LexStream.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/diagnose/LexStream.js
new file mode 100644
index 0000000..20c4f81
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/diagnose/LexStream.js
@@ -0,0 +1,270 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.parser.diagnose;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.core.compiler.InvalidInputException;
+import org.eclipse.wst.jsdt.internal.compiler.parser.Scanner;
+import org.eclipse.wst.jsdt.internal.compiler.parser.TerminalTokens;
+
+public class LexStream implements TerminalTokens {
+ public static final int IS_AFTER_JUMP = 1;
+ public static final int LBRACE_MISSING = 2;
+
+ public class Token{
+ int kind;
+ char[] name;
+ int start;
+ int end;
+ int line;
+ int flags;
+
+ public String toString() {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append(name).append('[').append(kind).append(']');
+ buffer.append('{').append(start).append(',').append(end).append('}').append(line);
+ return buffer.toString();
+ }
+
+ }
+
+ private int tokenCacheIndex;
+ private int tokenCacheEOFIndex;
+ private Token[] tokenCache;
+
+ private int currentIndex = -1;
+
+ private Scanner scanner;
+ private int[] intervalStartToSkip;
+ private int[] intervalEndToSkip;
+ private int[] intervalFlagsToSkip;
+
+ private int previousInterval = -1;
+
+ public LexStream(int size, Scanner scanner, int[] intervalStartToSkip, int[] intervalEndToSkip, int[] intervalFlagsToSkip, int firstToken, int init, int eof) {
+ this.tokenCache = new Token[size];
+ this.tokenCacheIndex = 0;
+ this.tokenCacheEOFIndex = Integer.MAX_VALUE;
+ this.tokenCache[0] = new Token();
+ this.tokenCache[0].kind = firstToken;
+ this.tokenCache[0].name = CharOperation.NO_CHAR;
+ this.tokenCache[0].start = init;
+ this.tokenCache[0].end = init;
+ this.tokenCache[0].line = 0;
+
+ this.intervalStartToSkip = intervalStartToSkip;
+ this.intervalEndToSkip = intervalEndToSkip;
+ this.intervalFlagsToSkip = intervalFlagsToSkip;
+
+ scanner.resetTo(init, eof);
+ this.scanner = scanner;
+ }
+
+ private void readTokenFromScanner(){
+ int length = tokenCache.length;
+ boolean tokenNotFound = true;
+
+ while(tokenNotFound) {
+ try {
+ int tokenKind = scanner.getNextToken();
+ if(tokenKind != TokenNameEOF) {
+ int start = scanner.getCurrentTokenStartPosition();
+ int end = scanner.getCurrentTokenEndPosition();
+ if(!RangeUtil.isInInterval(start, end, intervalStartToSkip, intervalEndToSkip)) {
+ Token token = new Token();
+ token.kind = tokenKind;
+ token.name = scanner.getCurrentTokenSource();
+ token.start = start;
+ token.end = end;
+ token.line = scanner.getLineNumber(end);
+
+ int pInterval = RangeUtil.getPreviousInterval(start, end, intervalStartToSkip, intervalEndToSkip);
+ if(pInterval != previousInterval && (intervalFlagsToSkip[previousInterval + 1] & RangeUtil.IGNORE) == 0){
+ token.flags = IS_AFTER_JUMP;
+ if((intervalFlagsToSkip[pInterval] & RangeUtil.LBRACE_MISSING) != 0){
+ token.flags |= LBRACE_MISSING;
+ }
+ }
+ previousInterval = pInterval;
+
+ tokenCache[++tokenCacheIndex % length] = token;
+
+ tokenNotFound = false;
+ }
+ } else {
+ int start = scanner.getCurrentTokenStartPosition();
+ int end = scanner.getCurrentTokenEndPosition();
+ Token token = new Token();
+ token.kind = tokenKind;
+ token.name = CharOperation.NO_CHAR;
+ token.start = start;
+ token.end = end;
+ token.line = scanner.getLineNumber(end);
+
+ tokenCache[++tokenCacheIndex % length] = token;
+
+ tokenCacheEOFIndex = tokenCacheIndex;
+ tokenNotFound = false;
+ }
+ } catch (InvalidInputException e) {
+ // return next token
+ }
+ }
+ }
+
+ public Token token(int index) {
+ if(index < 0) {
+ Token eofToken = new Token();
+ eofToken.kind = TokenNameEOF;
+ eofToken.name = CharOperation.NO_CHAR;
+ return eofToken;
+ }
+ if(this.tokenCacheEOFIndex >= 0 && index > this.tokenCacheEOFIndex) {
+ return token(this.tokenCacheEOFIndex);
+ }
+ int length = tokenCache.length;
+ if(index > this.tokenCacheIndex) {
+ int tokensToRead = index - this.tokenCacheIndex;
+ while(tokensToRead-- != 0) {
+ readTokenFromScanner();
+ }
+ } else if(this.tokenCacheIndex - length >= index) {
+ return null;
+ }
+
+ return tokenCache[index % length];
+ }
+
+
+
+ public int getToken() {
+ return currentIndex = next(currentIndex);
+ }
+
+ public int previous(int tokenIndex) {
+ return tokenIndex > 0 ? tokenIndex - 1 : 0;
+ }
+
+ public int next(int tokenIndex) {
+ return tokenIndex < this.tokenCacheEOFIndex ? tokenIndex + 1 : this.tokenCacheEOFIndex;
+ }
+
+ public boolean afterEol(int i) {
+ return i < 1 ? true : line(i - 1) < line(i);
+ }
+
+ public void reset() {
+ currentIndex = -1;
+ }
+
+ public void reset(int i) {
+ currentIndex = previous(i);
+ }
+
+ public int badtoken() {
+ return 0;
+ }
+
+ public int kind(int tokenIndex) {
+ return token(tokenIndex).kind;
+ }
+
+ public char[] name(int tokenIndex) {
+ return token(tokenIndex).name;
+ }
+
+ public int line(int tokenIndex) {
+ return token(tokenIndex).line;
+ }
+
+ public int start(int tokenIndex) {
+ return token(tokenIndex).start;
+ }
+
+ public int end(int tokenIndex) {
+ return token(tokenIndex).end;
+ }
+
+ public int flags(int tokenIndex) {
+ return token(tokenIndex).flags;
+ }
+
+ public boolean isInsideStream(int index) {
+ if(this.tokenCacheEOFIndex >= 0 && index > this.tokenCacheEOFIndex) {
+ return false;
+ } else if(index > this.tokenCacheIndex) {
+ return true;
+ } else if(this.tokenCacheIndex - tokenCache.length >= index) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ StringBuffer res = new StringBuffer();
+
+ String source = new String(scanner.source);
+ if(currentIndex < 0) {
+ res.append(source);
+ } else {
+ Token token = token(currentIndex);
+ int curtokKind = token.kind;
+ int curtokStart = token.start;
+ int curtokEnd = token.end;
+
+ int previousEnd = -1;
+ for (int i = 0; i < intervalStartToSkip.length; i++) {
+ int intervalStart = intervalStartToSkip[i];
+ int intervalEnd = intervalEndToSkip[i];
+
+ if(curtokStart >= previousEnd && curtokEnd <= intervalStart) {
+ res.append(source.substring(previousEnd + 1, curtokStart));
+ res.append('<');
+ res.append('#');
+ res.append(source.substring(curtokStart, curtokEnd + 1));
+ res.append('#');
+ res.append('>');
+ res.append(source.substring(curtokEnd+1, intervalStart));
+ } else {
+ res.append(source.substring(previousEnd + 1, intervalStart));
+ }
+ res.append('<');
+ res.append('@');
+ res.append(source.substring(intervalStart, intervalEnd + 1));
+ res.append('@');
+ res.append('>');
+
+ previousEnd = intervalEnd;
+ }
+ if(curtokStart >= previousEnd) {
+ res.append(source.substring(previousEnd + 1, curtokStart));
+ res.append('<');
+ res.append('#');
+ if(curtokKind == TokenNameEOF) {
+ res.append("EOF#>"); //$NON-NLS-1$
+ } else {
+ res.append(source.substring(curtokStart, curtokEnd + 1));
+ res.append('#');
+ res.append('>');
+ res.append(source.substring(curtokEnd+1));
+ }
+ } else {
+ res.append(source.substring(previousEnd + 1));
+ }
+ }
+
+ return res.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/diagnose/RangeUtil.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/diagnose/RangeUtil.js
new file mode 100644
index 0000000..8458ad1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/diagnose/RangeUtil.js
@@ -0,0 +1,200 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.parser.diagnose;
+
+import org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.FieldDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.ast.Initializer;
+import org.eclipse.wst.jsdt.internal.compiler.ast.TypeDeclaration;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.CompilerModifiers;
+
+public class RangeUtil {
+
+ // flags
+ public static final int NO_FLAG = 0;
+ public static final int LBRACE_MISSING = 1;
+ public static final int IGNORE = 2;
+
+ static class RangeResult {
+ private static final int INITIAL_SIZE = 10;
+ int pos;
+ int[] intervalStarts;
+ int[] intervalEnds;
+ int[] intervalFlags;
+
+ RangeResult() {
+ this.pos = 0;
+ this.intervalStarts = new int[INITIAL_SIZE];
+ this.intervalEnds = new int[INITIAL_SIZE];
+ this.intervalFlags = new int[INITIAL_SIZE];
+ }
+
+ void addInterval(int start, int end){
+ addInterval(start, end, NO_FLAG);
+ }
+
+ void addInterval(int start, int end, int flags){
+ if(pos >= intervalStarts.length) {
+ System.arraycopy(intervalStarts, 0, intervalStarts = new int[pos * 2], 0, pos);
+ System.arraycopy(intervalEnds, 0, intervalEnds = new int[pos * 2], 0, pos);
+ System.arraycopy(intervalFlags, 0, intervalFlags = new int[pos * 2], 0, pos);
+ }
+ intervalStarts[pos] = start;
+ intervalEnds[pos] = end;
+ intervalFlags[pos] = flags;
+ pos++;
+ }
+
+ int[][] getRanges() {
+ int[] resultStarts = new int[pos];
+ int[] resultEnds = new int[pos];
+ int[] resultFlags = new int[pos];
+
+ System.arraycopy(intervalStarts, 0, resultStarts, 0, pos);
+ System.arraycopy(intervalEnds, 0, resultEnds, 0, pos);
+ System.arraycopy(intervalFlags, 0, resultFlags, 0, pos);
+
+ if (resultStarts.length > 1) {
+ quickSort(resultStarts, resultEnds, resultFlags, 0, resultStarts.length - 1);
+ }
+ return new int[][]{resultStarts, resultEnds, resultFlags};
+ }
+
+ private void quickSort(int[] list, int[] list2, int[] list3, int left, int right) {
+ int original_left= left;
+ int original_right= right;
+ int mid= list[(left + right) / 2];
+ do {
+ while (compare(list[left], mid) < 0) {
+ left++;
+ }
+ while (compare(mid, list[right]) < 0) {
+ right--;
+ }
+ if (left <= right) {
+ int tmp= list[left];
+ list[left]= list[right];
+ list[right]= tmp;
+
+ tmp = list2[left];
+ list2[left]= list2[right];
+ list2[right]= tmp;
+
+ tmp = list3[left];
+ list3[left]= list3[right];
+ list3[right]= tmp;
+
+ left++;
+ right--;
+ }
+ } while (left <= right);
+
+ if (original_left < right) {
+ quickSort(list, list2, list3, original_left, right);
+ }
+ if (left < original_right) {
+ quickSort(list, list2, list3, left, original_right);
+ }
+ }
+
+ private int compare(int i1, int i2) {
+ return i1 - i2;
+ }
+ }
+
+
+
+ public static boolean containsErrorInSignature(AbstractMethodDeclaration method){
+ return method.sourceEnd + 1 == method.bodyStart || method.bodyEnd == method.declarationSourceEnd;
+ }
+
+ public static int[][] computeDietRange(TypeDeclaration[] types) {
+ if(types == null || types.length == 0) {
+ return new int[3][0];
+ } else {
+ RangeResult result = new RangeResult();
+ computeDietRange0(types, result);
+ return result.getRanges();
+ }
+ }
+
+ private static void computeDietRange0(TypeDeclaration[] types, RangeResult result) {
+ for (int j = 0; j < types.length; j++) {
+ //members
+ TypeDeclaration[] memberTypeDeclarations = types[j].memberTypes;
+ if(memberTypeDeclarations != null && memberTypeDeclarations.length > 0) {
+ computeDietRange0(types[j].memberTypes, result);
+ }
+ //methods
+ AbstractMethodDeclaration[] methods = types[j].methods;
+ if (methods != null) {
+ int length = methods.length;
+ for (int i = 0; i < length; i++) {
+ AbstractMethodDeclaration method = methods[i];
+ if(containsIgnoredBody(method)) {
+ if(containsErrorInSignature(method)) {
+ method.errorInSignature = true;
+ result.addInterval(method.declarationSourceStart, method.declarationSourceEnd, IGNORE);
+ } else {
+ int flags = method.sourceEnd + 1 == method.bodyStart ? LBRACE_MISSING : NO_FLAG;
+ result.addInterval(method.bodyStart, method.bodyEnd, flags);
+ }
+ }
+ }
+ }
+
+ //initializers
+ FieldDeclaration[] fields = types[j].fields;
+ if (fields != null) {
+ int length = fields.length;
+ for (int i = 0; i < length; i++) {
+ if (fields[i] instanceof Initializer) {
+ Initializer initializer = (Initializer)fields[i];
+ if(initializer.declarationSourceEnd == initializer.bodyEnd){
+ initializer.errorInSignature = true;
+ result.addInterval(initializer.declarationSourceStart, initializer.declarationSourceEnd, IGNORE);
+ } else {
+ result.addInterval(initializer.bodyStart, initializer.bodyEnd);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public static boolean isInInterval(int start, int end, int[] intervalStart, int[] intervalEnd) {
+ int length = intervalStart.length;
+ for (int i = 0; i < length; i++) {
+ if(intervalStart[i] <= start && intervalEnd[i] >= end) {
+ return true;
+ } else if(intervalStart[i] > end) {
+ return false;
+ }
+ }
+ return false;
+ }
+
+ public static int getPreviousInterval(int start, int end, int[] intervalStart, int[] intervalEnd) {
+ int length = intervalStart.length;
+ for (int i = 0; i < length; i++) {
+ if(intervalStart[i] > end) {
+ return i - 1;
+ }
+ }
+ return length - 1;
+ }
+
+ public static boolean containsIgnoredBody(AbstractMethodDeclaration method){
+ return !method.isDefaultConstructor()
+ && !method.isClinit()
+ && (method.modifiers & CompilerModifiers.AccSemicolonBody) == 0;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser1.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser1.rsc
new file mode 100644
index 0000000..8271e20
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser1.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser10.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser10.rsc
new file mode 100644
index 0000000..fcc0acd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser10.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser11.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser11.rsc
new file mode 100644
index 0000000..4f26c0a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser11.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser12.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser12.rsc
new file mode 100644
index 0000000..6038286
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser12.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser13.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser13.rsc
new file mode 100644
index 0000000..430fb0d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser13.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser14.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser14.rsc
new file mode 100644
index 0000000..d85614f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser14.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser15.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser15.rsc
new file mode 100644
index 0000000..f65f970
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser15.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser16.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser16.rsc
new file mode 100644
index 0000000..8be2e6f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser16.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser17.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser17.rsc
new file mode 100644
index 0000000..d99247e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser17.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser18.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser18.rsc
new file mode 100644
index 0000000..cfaebfe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser18.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser19.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser19.rsc
new file mode 100644
index 0000000..3e90944
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser19.rsc
@@ -0,0 +1,2 @@
+ffFFFBBhAAA!BFeAdAI
+KK!BBB gJJH!G!!!! \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser2.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser2.rsc
new file mode 100644
index 0000000..35fe970
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser2.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser20.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser20.rsc
new file mode 100644
index 0000000..8d4a2fb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser20.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser21.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser21.rsc
new file mode 100644
index 0000000..3bddccf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser21.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser3.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser3.rsc
new file mode 100644
index 0000000..a42e8f5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser3.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser4.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser4.rsc
new file mode 100644
index 0000000..5a84572
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser4.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser5.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser5.rsc
new file mode 100644
index 0000000..445bfcd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser5.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser6.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser6.rsc
new file mode 100644
index 0000000..191c809
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser6.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser7.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser7.rsc
new file mode 100644
index 0000000..1c66e3b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser7.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser8.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser8.rsc
new file mode 100644
index 0000000..12470cd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser8.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser9.rsc b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser9.rsc
new file mode 100644
index 0000000..41dc251
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser9.rsc
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/readableNames.properties b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/readableNames.properties
new file mode 100644
index 0000000..c37dc5b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/readableNames.properties
@@ -0,0 +1,80 @@
+./newJDT/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/messages.properties
+./newJDT/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/messages.properties
+./newJDT/org.eclipse.wst.jsdt.core.tests.model/build.properties
+./newJDT/org.eclipse.wst.jsdt.core.tests.model/plugin.properties
+./newJDT/org.eclipse.wst.jsdt.launching/src/org/eclipse/jsdt/internal/launching/LaunchingMessages.properties
+./newJDT/org.eclipse.wst.jsdt.launching/src/org/eclipse/jsdt/internal/launching/environments/EnvironmentMessages.properties
+./newJDT/org.eclipse.wst.jsdt.launching/build.properties
+./newJDT/org.eclipse.wst.jsdt.launching/plugin.properties
+./newJDT/org.eclipse.wst.jsdt.core.manipulation/src/org/eclipse/jsdt/internal/core/manipulation/JavaManipulationMessages.properties
+./newJDT/org.eclipse.wst.jsdt.core.manipulation/src/org/eclipse/jsdt/internal/core/refactoring/descriptors/DescriptorMessages.properties
+./newJDT/org.eclipse.wst.jsdt.core.manipulation/build.properties
+./newJDT/org.eclipse.wst.jsdt.core.manipulation/plugin.properties
+./newJDT/org.eclipse.wst.jsdt.core/src/org/eclipse/jsdt/core/formatter/messages.properties
+./newJDT/org.eclipse.wst.jsdt.core/src/org/eclipse/jsdt/internal/core/util/messages.properties
+./newJDT/org.eclipse.wst.jsdt.core/src/org/eclipse/jsdt/internal/formatter/options.properties
+./newJDT/org.eclipse.wst.jsdt.core/src/org/eclipse/jsdt/internal/compiler/messages.properties
+./newJDT/org.eclipse.wst.jsdt.core/src/org/eclipse/jsdt/internal/compiler/batch/messages.properties
+./newJDT/org.eclipse.wst.jsdt.core/src/org/eclipse/jsdt/internal/compiler/parser/readableNames.properties
+./newJDT/org.eclipse.wst.jsdt.core/src/org/eclipse/jsdt/internal/compiler/problem/messages.properties
+./newJDT/org.eclipse.wst.jsdt.core/build.properties
+./newJDT/org.eclipse.wst.jsdt.core/plugin.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/ui/text.jsScript/JavaTextMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/callhierarchy/CallHierarchyMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/actions/FoldingMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/actions/ActionMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/jarimport/JarImportMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/search/SearchMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/preferences/formatter/FormatterMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/preferences/cleanup/CleanUpMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/preferences/PreferencesMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/dialogs/DialogsMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui.jsScriptdocexport/JavadocExportMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui.jsScripteditor/selectionactions/SelectionActionMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui.jsScripteditor/JavaEditorMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui.jsScripteditor/ConstructedJavaEditorMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui.jsScripteditor/saveparticipant/SaveParticipantMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/typehierarchy/TypeHierarchyMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/text.jsScriptdoc/JavaDocMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/text/correction/CorrectionMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/text/template/preferences/TemplatePreferencesMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/text/template/contentassist/TemplateContentAssistMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/text.jsScript/JavaTextMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/text.jsScript/hover/JavaHoverMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/text/TextMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/text/folding/FoldingMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/fix/SaveParticipantMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/fix/MultiFixMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/packageview/PackagesMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/filters/FilterMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/workingsets/WorkingSetMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/model/ModelMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/propertiesfileeditor/ConstructedPropertiesFileEditorMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/propertiesfileeditor/PropertiesFileEditorMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/infoviews/InfoViewMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/refactoring/nls/search/NLSSearchMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/refactoring/nls/NLSUIMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/refactoring/refactoringui.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/refactoring/reorg/ReorgMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/compare/ReplaceWithEditionAction.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/compare/CompareWithEditionAction.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/compare/CompareMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/compare/AddFromHistoryAction.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/compare/CompareAction.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/wizards/NewWizardMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/JavaUIMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/browsing/JavaBrowsingMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/ui/jarpackager/JarPackagerMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/corext/callhierarchy/CallHierarchyMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/corext/CorextMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/corext/codemanipulation/CodeGenerationMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/corext/fix/FixMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/corext/template.jsScript/JavaTemplateMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/corext/refactoring/refactoring.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/corext/refactoring/nls/changes/NLSChangesMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/src/org/eclipse/jsdt/internal/corext/refactoring/nls/NLSMessages.properties
+./newJDT/org.eclipse.wst.jsdt.ui/templates/default-templates.properties
+./newJDT/org.eclipse.wst.jsdt.ui/build.properties
+./newJDT/org.eclipse.wst.jsdt.ui/plugin.properties
+./newJDT/org.eclipse.wst.jsdt.core.tests.compiler/build.properties
+./newJDT/org.eclipse.wst.jsdt.core.tests.compiler/plugin.properties
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/AbortCompilation.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/AbortCompilation.js
new file mode 100644
index 0000000..f018335
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/AbortCompilation.js
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.problem;
+
+import org.eclipse.wst.jsdt.core.compiler.IProblem;
+import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
+import org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.InvocationSite;
+
+/*
+ * Special unchecked exception type used
+ * to abort from the compilation process
+ *
+ * should only be thrown from within problem handlers.
+ */
+public class AbortCompilation extends RuntimeException {
+
+ public CompilationResult compilationResult;
+ public Throwable exception;
+ public IProblem problem;
+
+ /* special fields used to abort silently (e.g. when cancelling build process) */
+ public boolean isSilent;
+ public RuntimeException silentException;
+
+ private static final long serialVersionUID = -2047226595083244852L; // backward compatible
+
+ public AbortCompilation() {
+ // empty
+ }
+
+ public AbortCompilation(CompilationResult compilationResult, IProblem problem) {
+ this();
+ this.compilationResult = compilationResult;
+ this.problem = problem;
+ }
+
+ public AbortCompilation(CompilationResult compilationResult, Throwable exception) {
+ this();
+ this.compilationResult = compilationResult;
+ this.exception = exception;
+ }
+
+ public AbortCompilation(boolean isSilent, RuntimeException silentException) {
+ this();
+ this.isSilent = isSilent;
+ this.silentException = silentException;
+ }
+
+ public void updateContext(InvocationSite invocationSite, CompilationResult unitResult) {
+ if (this.problem == null) return;
+ if (this.problem.getSourceStart() != 0 || this.problem.getSourceEnd() != 0) return;
+ this.problem.setSourceStart(invocationSite.sourceStart());
+ this.problem.setSourceEnd(invocationSite.sourceEnd());
+ this.problem.setSourceLineNumber(ProblemHandler.searchLineNumber(unitResult.lineSeparatorPositions, invocationSite.sourceStart()));
+ this.compilationResult = unitResult;
+ }
+
+ public void updateContext(ASTNode astNode, CompilationResult unitResult) {
+ if (this.problem == null) return;
+ if (this.problem.getSourceStart() != 0 || this.problem.getSourceEnd() != 0) return;
+ this.problem.setSourceStart(astNode.sourceStart());
+ this.problem.setSourceEnd(astNode.sourceEnd());
+ this.problem.setSourceLineNumber(ProblemHandler.searchLineNumber(unitResult.lineSeparatorPositions, astNode.sourceStart()));
+ this.compilationResult = unitResult;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/AbortCompilationUnit.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/AbortCompilationUnit.js
new file mode 100644
index 0000000..d5d2ba2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/AbortCompilationUnit.js
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.problem;
+
+import org.eclipse.wst.jsdt.core.compiler.IProblem;
+import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
+
+/*
+ * Special unchecked exception type used
+ * to abort from the compilation process
+ *
+ * should only be thrown from within problem handlers.
+ */
+public class AbortCompilationUnit extends AbortCompilation {
+
+ private static final long serialVersionUID = -4253893529982226734L; // backward compatible
+
+public AbortCompilationUnit(CompilationResult compilationResult, IProblem problem) {
+ super(compilationResult, problem);
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/AbortMethod.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/AbortMethod.js
new file mode 100644
index 0000000..3fb01ec
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/AbortMethod.js
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.problem;
+
+import org.eclipse.wst.jsdt.core.compiler.IProblem;
+import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
+
+/*
+ * Special unchecked exception type used
+ * to abort from the compilation process
+ *
+ * should only be thrown from within problem handlers.
+ */
+public class AbortMethod extends AbortType {
+
+ private static final long serialVersionUID = -1480267398969840003L; // backward compatible
+
+public AbortMethod(CompilationResult compilationResult, IProblem problem) {
+ super(compilationResult, problem);
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/AbortType.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/AbortType.js
new file mode 100644
index 0000000..9c8e7ba
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/AbortType.js
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.problem;
+
+import org.eclipse.wst.jsdt.core.compiler.IProblem;
+import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
+
+/*
+ * Special unchecked exception type used
+ * to abort from the compilation process
+ *
+ * should only be thrown from within problem handlers.
+ */
+public class AbortType extends AbortCompilationUnit {
+
+ private static final long serialVersionUID = -5882417089349134385L; // backward compatible
+
+public AbortType(CompilationResult compilationResult, IProblem problem) {
+ super(compilationResult, problem);
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/DefaultProblem.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/DefaultProblem.js
new file mode 100644
index 0000000..8c162e8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/DefaultProblem.js
@@ -0,0 +1,227 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.problem;
+
+import org.eclipse.wst.jsdt.core.compiler.IProblem;
+import org.eclipse.wst.jsdt.internal.compiler.util.Util;
+
+public class DefaultProblem implements ProblemSeverities, IProblem {
+
+ private static final String LINE_DELIMITER = System.getProperty("line.separator"); //$NON-NLS-1$
+
+ private char[] fileName;
+ private int id;
+ private int startPosition, endPosition, line;
+ private int severity;
+ private String[] arguments;
+ private String message;
+
+ public DefaultProblem(
+ char[] originatingFileName,
+ String message,
+ int id,
+ String[] stringArguments,
+ int severity,
+ int startPosition,
+ int endPosition,
+ int line) {
+
+ this.fileName = originatingFileName;
+ this.message = message;
+ this.id = id;
+ this.arguments = stringArguments;
+ this.severity = severity;
+ this.startPosition = startPosition;
+ this.endPosition = endPosition;
+ this.line = line;
+ }
+ public String errorReportSource(char[] unitSource) {
+ //extra from the source the innacurate token
+ //and "highlight" it using some underneath ^^^^^
+ //put some context around too.
+
+ //this code assumes that the font used in the console is fixed size
+
+ //sanity .....
+ if ((this.startPosition > this.endPosition)
+ || ((this.startPosition < 0) && (this.endPosition < 0)))
+ return Util.bind("problem.noSourceInformation"); //$NON-NLS-1$
+
+ StringBuffer errorBuffer = new StringBuffer(" "); //$NON-NLS-1$
+ errorBuffer.append(Util.bind("problem.atLine", String.valueOf(this.line))); //$NON-NLS-1$
+ errorBuffer.append(LINE_DELIMITER).append("\t"); //$NON-NLS-1$
+
+ char c;
+ final char SPACE = '\u0020';
+ final char MARK = '^';
+ final char TAB = '\t';
+ //the next code tries to underline the token.....
+ //it assumes (for a good display) that token source does not
+ //contain any \r \n. This is false on statements !
+ //(the code still works but the display is not optimal !)
+
+ // expand to line limits
+ int length = unitSource.length, begin, end;
+ for (begin = this.startPosition >= length ? length - 1 : this.startPosition; begin > 0; begin--) {
+ if ((c = unitSource[begin - 1]) == '\n' || c == '\r') break;
+ }
+ for (end = this.endPosition >= length ? length - 1 : this.endPosition ; end+1 < length; end++) {
+ if ((c = unitSource[end + 1]) == '\r' || c == '\n') break;
+ }
+
+ // trim left and right spaces/tabs
+ while ((c = unitSource[begin]) == ' ' || c == '\t') begin++;
+ //while ((c = unitSource[end]) == ' ' || c == '\t') end--; TODO (philippe) should also trim right, but all tests are to be updated
+
+ // copy source
+ errorBuffer.append(unitSource, begin, end-begin+1);
+ errorBuffer.append(LINE_DELIMITER).append("\t"); //$NON-NLS-1$
+
+ // compute underline
+ for (int i = begin; i <this.startPosition; i++) {
+ errorBuffer.append((unitSource[i] == TAB) ? TAB : SPACE);
+ }
+ for (int i = this.startPosition; i <= (this.endPosition >= length ? length - 1 : this.endPosition); i++) {
+ errorBuffer.append(MARK);
+ }
+ return errorBuffer.toString();
+ }
+
+ /**
+ * Answer back the original arguments recorded into the problem.
+ * @return java.lang.String[]
+ */
+ public String[] getArguments() {
+
+ return this.arguments;
+ }
+
+ /**
+ * Answer the type of problem.
+ * @see org.eclipse.wst.jsdt.core.compiler.IProblem#getID()
+ * @return int
+ */
+ public int getID() {
+
+ return this.id;
+ }
+
+ /**
+ * Answer a localized, human-readable message string which describes the problem.
+ * @return java.lang.String
+ */
+ public String getMessage() {
+
+ return this.message;
+ }
+
+ /**
+ * Answer the file name in which the problem was found.
+ * @return char[]
+ */
+ public char[] getOriginatingFileName() {
+
+ return this.fileName;
+ }
+
+ /**
+ * Answer the end position of the problem (inclusive), or -1 if unknown.
+ * @return int
+ */
+ public int getSourceEnd() {
+
+ return this.endPosition;
+ }
+
+ /**
+ * Answer the line number in source where the problem begins.
+ * @return int
+ */
+ public int getSourceLineNumber() {
+
+ return this.line;
+ }
+
+ /**
+ * Answer the start position of the problem (inclusive), or -1 if unknown.
+ * @return int
+ */
+ public int getSourceStart() {
+
+ return this.startPosition;
+ }
+
+ /*
+ * Helper method: checks the severity to see if the Error bit is set.
+ * @return boolean
+ */
+ public boolean isError() {
+
+ return (this.severity & ProblemSeverities.Error) != 0;
+ }
+
+ /*
+ * Helper method: checks the severity to see if the Error bit is not set.
+ * @return boolean
+ */
+ public boolean isWarning() {
+
+ return (this.severity & ProblemSeverities.Error) == 0;
+ }
+
+ public void setOriginatingFileName(char[] fileName) {
+ this.fileName = fileName;
+ }
+
+ /**
+ * Set the end position of the problem (inclusive), or -1 if unknown.
+ *
+ * Used for shifting problem positions.
+ * @param sourceEnd the new value of the sourceEnd of the receiver
+ */
+ public void setSourceEnd(int sourceEnd) {
+
+ this.endPosition = sourceEnd;
+ }
+
+ /**
+ * Set the line number in source where the problem begins.
+ * @param lineNumber the new value of the line number of the receiver
+ */
+ public void setSourceLineNumber(int lineNumber) {
+
+ this.line = lineNumber;
+ }
+
+ /**
+ * Set the start position of the problem (inclusive), or -1 if unknown.
+ *
+ * Used for shifting problem positions.
+ * @param sourceStart the new value of the source start position of the receiver
+ */
+ public void setSourceStart(int sourceStart) {
+
+ this.startPosition = sourceStart;
+ }
+
+ public String toString() {
+
+ String s = "Pb(" + (this.id & IgnoreCategoriesMask) + ") "; //$NON-NLS-1$ //$NON-NLS-2$
+ if (this.message != null) {
+ s += this.message;
+ } else {
+ if (this.arguments != null)
+ for (int i = 0; i < this.arguments.length; i++)
+ s += " " + this.arguments[i]; //$NON-NLS-1$
+ }
+ return s;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/DefaultProblemFactory.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/DefaultProblemFactory.js
new file mode 100644
index 0000000..d0aa209
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/DefaultProblemFactory.js
@@ -0,0 +1,197 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.problem;
+
+import java.util.Enumeration;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+import org.eclipse.wst.jsdt.core.compiler.*;
+import org.eclipse.wst.jsdt.core.compiler.IProblem;
+import org.eclipse.wst.jsdt.internal.compiler.IProblemFactory;
+import org.eclipse.wst.jsdt.internal.compiler.util.HashtableOfInt;
+import org.eclipse.wst.jsdt.internal.compiler.util.Util;
+
+public class DefaultProblemFactory implements IProblemFactory {
+
+ public HashtableOfInt messageTemplates;
+ private Locale locale;
+ private static HashtableOfInt DEFAULT_LOCALE_TEMPLATES;
+ private final static char[] DOUBLE_QUOTES = "''".toCharArray(); //$NON-NLS-1$
+ private final static char[] SINGLE_QUOTE = "'".toCharArray(); //$NON-NLS-1$
+
+public DefaultProblemFactory() {
+ this(Locale.getDefault());
+}
+/**
+ * @param loc the locale used to get the right message
+ */
+public DefaultProblemFactory(Locale loc) {
+ this.locale = loc;
+ if (Locale.getDefault().equals(loc)){
+ if (DEFAULT_LOCALE_TEMPLATES == null){
+ DEFAULT_LOCALE_TEMPLATES = loadMessageTemplates(loc);
+ }
+ this.messageTemplates = DEFAULT_LOCALE_TEMPLATES;
+ } else {
+ this.messageTemplates = loadMessageTemplates(loc);
+ }
+}
+/**
+ * Answer a new IProblem created according to the parameters value
+ * <ul>
+ * <li>originatingFileName the name of the file name from which the problem is originated
+ * <li>problemId the problem id
+ * <li>problemArguments the fully qualified arguments recorded inside the problem
+ * <li>messageArguments the arguments needed to set the error message (shorter names than problemArguments ones)
+ * <li>severity the severity of the problem
+ * <li>startPosition the starting position of the problem
+ * <li>endPosition the end position of the problem
+ * <li>lineNumber the line on which the problem occured
+ * </ul>
+ * @param originatingFileName char[]
+ * @param problemId int
+ * @param problemArguments String[]
+ * @param messageArguments String[]
+ * @param severity int
+ * @param startPosition int
+ * @param endPosition int
+ * @param lineNumber int
+ * @return org.eclipse.wst.jsdt.internal.compiler.IProblem
+ */
+public IProblem createProblem(
+ char[] originatingFileName,
+ int problemId,
+ String[] problemArguments,
+ String[] messageArguments,
+ int severity,
+ int startPosition,
+ int endPosition,
+ int lineNumber) {
+
+ return new DefaultProblem(
+ originatingFileName,
+ this.getLocalizedMessage(problemId, messageArguments),
+ problemId,
+ problemArguments,
+ severity,
+ startPosition,
+ endPosition,
+ lineNumber);
+}
+private final static int keyFromID(int id) {
+ return id + 1; // keys are offsetted by one in table, since it cannot handle 0 key
+}
+/**
+ * Answer the locale used to retrieve the error messages
+ * @return java.util.Locale
+ */
+public Locale getLocale() {
+ return this.locale;
+}
+public final String getLocalizedMessage(int id, String[] problemArguments) {
+ String message = (String) this.messageTemplates.get(keyFromID(id & IProblem.IgnoreCategoriesMask));
+ if (message == null) {
+ return "Unable to retrieve the error message for problem id: " //$NON-NLS-1$
+ + (id & IProblem.IgnoreCategoriesMask)
+ + ". Check compiler resources."; //$NON-NLS-1$
+ }
+
+ // for compatibility with MessageFormat which eliminates double quotes in original message
+ char[] messageWithNoDoubleQuotes =
+ CharOperation.replace(message.toCharArray(), DOUBLE_QUOTES, SINGLE_QUOTE);
+
+ if (problemArguments == null) return new String(messageWithNoDoubleQuotes);
+
+ int length = messageWithNoDoubleQuotes.length;
+ int start = 0;
+ int end = length;
+ StringBuffer output = null;
+ if ((id & IProblem.Javadoc) != 0) {
+ if (output == null) output = new StringBuffer(10+length+problemArguments.length*20);
+ output.append((String) this.messageTemplates.get(keyFromID(IProblem.JavadocMessagePrefix & IProblem.IgnoreCategoriesMask)));
+ }
+ while (true) {
+ if ((end = CharOperation.indexOf('{', messageWithNoDoubleQuotes, start)) > -1) {
+ if (output == null) output = new StringBuffer(length+problemArguments.length*20);
+ output.append(messageWithNoDoubleQuotes, start, end - start);
+ if ((start = CharOperation.indexOf('}', messageWithNoDoubleQuotes, end + 1)) > -1) {
+ int index = -1;
+ String argId = new String(messageWithNoDoubleQuotes, end + 1, start - end - 1);
+ try {
+ index = Integer.parseInt(argId);
+ output.append(problemArguments[index]);
+ } catch (NumberFormatException nfe) {
+ output.append(messageWithNoDoubleQuotes, end + 1, start - end);
+ } catch (ArrayIndexOutOfBoundsException e) {
+ return "Cannot bind message for problem (id: " //$NON-NLS-1$
+ + (id & IProblem.IgnoreCategoriesMask)
+ + ") \"" //$NON-NLS-1$
+ + message
+ + "\" with arguments: {" //$NON-NLS-1$
+ + Util.toString(problemArguments)
+ +"}"; //$NON-NLS-1$
+ }
+ start++;
+ } else {
+ output.append(messageWithNoDoubleQuotes, end, length);
+ break;
+ }
+ } else {
+ if (output == null) return new String(messageWithNoDoubleQuotes);
+ output.append(messageWithNoDoubleQuotes, start, length - start);
+ break;
+ }
+ }
+
+ return output.toString();
+}
+/**
+ * @param problem org.eclipse.wst.jsdt.internal.compiler.IProblem
+ * @return String
+ */
+public final String localizedMessage(IProblem problem) {
+ return getLocalizedMessage(problem.getID(), problem.getArguments());
+}
+
+/**
+ * This method initializes the MessageTemplates class variable according
+ * to the current Locale.
+ * @param loc Locale
+ * @return HashtableOfInt
+ */
+public static HashtableOfInt loadMessageTemplates(Locale loc) {
+ ResourceBundle bundle = null;
+ String bundleName = "org.eclipse.wst.jsdt.internal.compiler.problem.messages"; //$NON-NLS-1$
+ try {
+ bundle = ResourceBundle.getBundle(bundleName, loc);
+ } catch(MissingResourceException e) {
+ System.out.println("Missing resource : " + bundleName.replace('.', '/') + ".properties for locale " + loc); //$NON-NLS-1$//$NON-NLS-2$
+ throw e;
+ }
+ HashtableOfInt templates = new HashtableOfInt(700);
+ Enumeration keys = bundle.getKeys();
+ while (keys.hasMoreElements()) {
+ String key = (String)keys.nextElement();
+ try {
+ int messageID = Integer.parseInt(key);
+ templates.put(keyFromID(messageID), bundle.getString(key));
+ } catch(NumberFormatException e) {
+ // key ill-formed
+ } catch (MissingResourceException e) {
+ // available ID
+ }
+ }
+ return templates;
+}
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/ProblemHandler.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/ProblemHandler.js
new file mode 100644
index 0000000..535a34d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/ProblemHandler.js
@@ -0,0 +1,183 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.problem;
+
+import org.eclipse.wst.jsdt.core.compiler.IProblem;
+import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
+import org.eclipse.wst.jsdt.internal.compiler.IErrorHandlingPolicy;
+import org.eclipse.wst.jsdt.internal.compiler.IProblemFactory;
+import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.wst.jsdt.internal.compiler.impl.ReferenceContext;
+
+/*
+ * Compiler error handler, responsible to determine whether
+ * a problem is actually a warning or an error; also will
+ * decide whether the compilation task can be processed further or not.
+ *
+ * Behavior : will request its current policy if need to stop on
+ * first error, and if should proceed (persist) with problems.
+ */
+
+public class ProblemHandler implements ProblemSeverities {
+
+ public final static String[] NoArgument = new String[0];
+
+ final public IErrorHandlingPolicy policy;
+ public final IProblemFactory problemFactory;
+ public final CompilerOptions options;
+/*
+ * Problem handler can be supplied with a policy to specify
+ * its behavior in error handling. Also see static methods for
+ * built-in policies.
+ *
+ */
+public ProblemHandler(IErrorHandlingPolicy policy, CompilerOptions options, IProblemFactory problemFactory) {
+ this.policy = policy;
+ this.problemFactory = problemFactory;
+ this.options = options;
+}
+/*
+ * Given the current configuration, answers which category the problem
+ * falls into:
+ * Error | Warning | Ignore
+ */
+public int computeSeverity(int problemId){
+
+ return Error; // by default all problems are errors
+}
+public IProblem createProblem(
+ char[] fileName,
+ int problemId,
+ String[] problemArguments,
+ String[] messageArguments,
+ int severity,
+ int problemStartPosition,
+ int problemEndPosition,
+ int lineNumber) {
+
+ return this.problemFactory.createProblem(
+ fileName,
+ problemId,
+ problemArguments,
+ messageArguments,
+ severity,
+ problemStartPosition,
+ problemEndPosition,
+ lineNumber);
+}
+public void handle(
+ int problemId,
+ String[] problemArguments,
+ String[] messageArguments,
+ int severity,
+ int problemStartPosition,
+ int problemEndPosition,
+ ReferenceContext referenceContext,
+ CompilationResult unitResult) {
+
+ if (severity == Ignore)
+ return;
+
+ // if no reference context, we need to abort from the current compilation process
+ if (referenceContext == null) {
+ if ((severity & Error) != 0) { // non reportable error is fatal
+ IProblem problem = this.createProblem(null, problemId, problemArguments, messageArguments, severity, 0, 0, 0);
+ throw new AbortCompilation(null, problem);
+ } else {
+ return; // ignore non reportable warning
+ }
+ }
+
+ IProblem problem =
+ this.createProblem(
+ unitResult.getFileName(),
+ problemId,
+ problemArguments,
+ messageArguments,
+ severity,
+ problemStartPosition,
+ problemEndPosition,
+ problemStartPosition >= 0
+ ? searchLineNumber(unitResult.lineSeparatorPositions, problemStartPosition)
+ : 0);
+ if (problem == null) return; // problem couldn't be created, ignore
+
+ switch (severity & Error) {
+ case Error :
+ this.record(problem, unitResult, referenceContext);
+ referenceContext.tagAsHavingErrors();
+
+ // should abort ?
+ int abortLevel;
+ if ((abortLevel =
+ (this.policy.stopOnFirstError() ? AbortCompilation : severity & Abort)) != 0) {
+
+ referenceContext.abort(abortLevel, problem);
+ }
+ break;
+ case Warning :
+ this.record(problem, unitResult, referenceContext);
+ break;
+ }
+}
+/**
+ * Standard problem handling API, the actual severity (warning/error/ignore) is deducted
+ * from the problem ID and the current compiler options.
+ */
+public void handle(
+ int problemId,
+ String[] problemArguments,
+ String[] messageArguments,
+ int problemStartPosition,
+ int problemEndPosition,
+ ReferenceContext referenceContext,
+ CompilationResult unitResult) {
+
+ this.handle(
+ problemId,
+ problemArguments,
+ messageArguments,
+ this.computeSeverity(problemId), // severity inferred using the ID
+ problemStartPosition,
+ problemEndPosition,
+ referenceContext,
+ unitResult);
+}
+public void record(IProblem problem, CompilationResult unitResult, ReferenceContext referenceContext) {
+ unitResult.record(problem, referenceContext);
+}
+/**
+ * Search the line number corresponding to a specific position
+ */
+public static final int searchLineNumber(int[] startLineIndexes, int position) {
+ if (startLineIndexes == null)
+ return 1;
+ int length = startLineIndexes.length;
+ if (length == 0)
+ return 1;
+ int g = 0, d = length - 1;
+ int m = 0;
+ while (g <= d) {
+ m = (g + d) /2;
+ if (position < startLineIndexes[m]) {
+ d = m-1;
+ } else if (position > startLineIndexes[m]) {
+ g = m+1;
+ } else {
+ return m + 1;
+ }
+ }
+ if (position < startLineIndexes[m]) {
+ return m+1;
+ }
+ return m+2;
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/ProblemReporter.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/ProblemReporter.js
new file mode 100644
index 0000000..58f42ac
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/ProblemReporter.js
@@ -0,0 +1,4731 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.problem;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.core.compiler.IProblem;
+import org.eclipse.wst.jsdt.internal.compiler.*;
+import org.eclipse.wst.jsdt.internal.compiler.ast.*;
+import org.eclipse.wst.jsdt.internal.compiler.env.IConstants;
+import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.wst.jsdt.internal.compiler.impl.ReferenceContext;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.*;
+import org.eclipse.wst.jsdt.internal.compiler.parser.*;
+import org.eclipse.wst.jsdt.internal.compiler.util.Util;
+
+public class ProblemReporter extends ProblemHandler implements ProblemReasons {
+
+ public ReferenceContext referenceContext;
+
+public ProblemReporter(IErrorHandlingPolicy policy, CompilerOptions options, IProblemFactory problemFactory) {
+ super(policy, options, problemFactory);
+}
+public void abortDueToInternalError(String errorMessage) {
+ String[] arguments = new String[] {errorMessage};
+ this.handle(
+ IProblem.Unclassified,
+ arguments,
+ arguments,
+ Error | Abort,
+ 0,
+ 0);
+}
+public void abortDueToInternalError(String errorMessage, ASTNode location) {
+ String[] arguments = new String[] {errorMessage};
+ this.handle(
+ IProblem.Unclassified,
+ arguments,
+ arguments,
+ Error | Abort,
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void abstractMethodCannotBeOverridden(SourceTypeBinding type, MethodBinding concreteMethod) {
+
+ this.handle(
+ // %1 must be abstract since it cannot override the inherited package-private abstract method %2
+ IProblem.AbstractMethodCannotBeOverridden,
+ new String[] {
+ new String(type.sourceName()),
+ new String(
+ CharOperation.concat(
+ concreteMethod.declaringClass.readableName(),
+ concreteMethod.readableName(),
+ '.'))},
+ new String[] {
+ new String(type.sourceName()),
+ new String(
+ CharOperation.concat(
+ concreteMethod.declaringClass.shortReadableName(),
+ concreteMethod.shortReadableName(),
+ '.'))},
+ type.sourceStart(),
+ type.sourceEnd());
+}
+public void abstractMethodInAbstractClass(SourceTypeBinding type, AbstractMethodDeclaration methodDecl) {
+
+ String[] arguments = new String[] {new String(type.sourceName()), new String(methodDecl.selector)};
+ this.handle(
+ IProblem.AbstractMethodInAbstractClass,
+ arguments,
+ arguments,
+ methodDecl.sourceStart,
+ methodDecl.sourceEnd);
+}
+public void abstractMethodMustBeImplemented(SourceTypeBinding type, MethodBinding abstractMethod) {
+ this.handle(
+ // Must implement the inherited abstract method %1
+ // 8.4.3 - Every non-abstract subclass of an abstract type, A, must provide a concrete implementation of all of A's methods.
+ IProblem.AbstractMethodMustBeImplemented,
+ new String[] {
+ new String(
+ CharOperation.concat(
+ abstractMethod.declaringClass.readableName(),
+ abstractMethod.readableName(),
+ '.'))},
+ new String[] {
+ new String(
+ CharOperation.concat(
+ abstractMethod.declaringClass.shortReadableName(),
+ abstractMethod.shortReadableName(),
+ '.'))},
+ type.sourceStart(),
+ type.sourceEnd());
+}
+public void abstractMethodNeedingNoBody(AbstractMethodDeclaration method) {
+ this.handle(
+ IProblem.BodyForAbstractMethod,
+ NoArgument,
+ NoArgument,
+ method.sourceStart,
+ method.sourceEnd,
+ method,
+ method.compilationResult());
+}
+public void alreadyDefinedLabel(char[] labelName, ASTNode location) {
+ String[] arguments = new String[] {new String(labelName)};
+ this.handle(
+ IProblem.DuplicateLabel,
+ arguments,
+ arguments,
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void annotationTypeMemberDeclarationWithConstructorName(AnnotationTypeMemberDeclaration annotationTypeMemberDeclaration) {
+ this.handle(
+ IProblem.AnnotationButConstructorName,
+ NoArgument,
+ NoArgument,
+ annotationTypeMemberDeclaration.sourceStart,
+ annotationTypeMemberDeclaration.sourceEnd);
+}
+public void anonymousClassCannotExtendFinalClass(Expression expression, TypeBinding type) {
+ this.handle(
+ IProblem.AnonymousClassCannotExtendFinalClass,
+ new String[] {new String(type.readableName())},
+ new String[] {new String(type.shortReadableName())},
+ expression.sourceStart,
+ expression.sourceEnd);
+}
+public void argumentTypeCannotBeVoid(SourceTypeBinding type, AbstractMethodDeclaration methodDecl, Argument arg) {
+ String[] arguments = new String[] {new String(methodDecl.selector), new String(arg.name)};
+ this.handle(
+ IProblem.ArgumentTypeCannotBeVoid,
+ arguments,
+ arguments,
+ methodDecl.sourceStart,
+ methodDecl.sourceEnd);
+}
+public void argumentTypeCannotBeVoidArray(SourceTypeBinding type, AbstractMethodDeclaration methodDecl, Argument arg) {
+ String[] arguments = new String[] {new String(methodDecl.selector), new String(arg.name)};
+ this.handle(
+ IProblem.ArgumentTypeCannotBeVoidArray,
+ arguments,
+ arguments,
+ methodDecl.sourceStart,
+ methodDecl.sourceEnd);
+}
+public void arrayConstantsOnlyInArrayInitializers(int sourceStart, int sourceEnd) {
+ this.handle(
+ IProblem.ArrayConstantsOnlyInArrayInitializers,
+ NoArgument,
+ NoArgument,
+ sourceStart,
+ sourceEnd);
+}
+public void assignmentHasNoEffect(Assignment assignment, char[] name){
+ String[] arguments = new String[] { new String(name) };
+ this.handle(
+ IProblem.AssignmentHasNoEffect,
+ arguments,
+ arguments,
+ assignment.sourceStart,
+ assignment.sourceEnd);
+}
+public void attemptToReturnNonVoidExpression(ReturnStatement returnStatement, TypeBinding expectedType) {
+ this.handle(
+ IProblem.VoidMethodReturnsValue,
+ new String[] {new String(expectedType.readableName())},
+ new String[] {new String(expectedType.shortReadableName())},
+ returnStatement.sourceStart,
+ returnStatement.sourceEnd);
+}
+public void attemptToReturnVoidValue(ReturnStatement returnStatement) {
+ this.handle(
+ IProblem.MethodReturnsVoid,
+ NoArgument,
+ NoArgument,
+ returnStatement.sourceStart,
+ returnStatement.sourceEnd);
+}
+public void boundsMustBeAnInterface(ASTNode location, TypeBinding type) {
+ this.handle(
+ IProblem.BoundsMustBeAnInterface,
+ new String[] {new String(type.readableName())},
+ new String[] {new String(type.shortReadableName())},
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void bytecodeExceeds64KLimit(AbstractMethodDeclaration location) {
+ if (location.isConstructor()) {
+ this.handle(
+ IProblem.BytecodeExceeds64KLimitForConstructor,
+ new String[] {new String(location.selector), parametersAsString(location.binding.parameters, false)},
+ new String[] {new String(location.selector), parametersAsString(location.binding.parameters, true)},
+ Error | Abort,
+ location.sourceStart,
+ location.sourceEnd);
+ } else {
+ this.handle(
+ IProblem.BytecodeExceeds64KLimit,
+ new String[] {new String(location.selector), parametersAsString(location.binding.parameters, false)},
+ new String[] {new String(location.selector), parametersAsString(location.binding.parameters, true)},
+ Error | Abort,
+ location.sourceStart,
+ location.sourceEnd);
+ }
+}
+public void bytecodeExceeds64KLimit(TypeDeclaration location) {
+ this.handle(
+ IProblem.BytecodeExceeds64KLimitForClinit,
+ NoArgument,
+ NoArgument,
+ Error | Abort,
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void cannotAllocateVoidArray(Expression expression) {
+ this.handle(
+ IProblem.CannotAllocateVoidArray,
+ NoArgument,
+ NoArgument,
+ expression.sourceStart,
+ expression.sourceEnd);
+}
+public void cannotAssignToFinalField(FieldBinding field, ASTNode location) {
+ this.handle(
+ IProblem.FinalFieldAssignment,
+ new String[] {
+ (field.declaringClass == null ? "array" : new String(field.declaringClass.readableName())), //$NON-NLS-1$
+ new String(field.readableName())},
+ new String[] {
+ (field.declaringClass == null ? "array" : new String(field.declaringClass.shortReadableName())), //$NON-NLS-1$
+ new String(field.shortReadableName())},
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void cannotAssignToFinalLocal(LocalVariableBinding local, ASTNode location) {
+ String[] arguments = new String[] { new String(local.readableName())};
+ this.handle(
+ IProblem.NonBlankFinalLocalAssignment,
+ arguments,
+ arguments,
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void cannotAssignToFinalOuterLocal(LocalVariableBinding local, ASTNode location) {
+ String[] arguments = new String[] {new String(local.readableName())};
+ this.handle(
+ IProblem.FinalOuterLocalAssignment,
+ arguments,
+ arguments,
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void cannotDeclareLocalInterface(char[] interfaceName, int sourceStart, int sourceEnd) {
+ String[] arguments = new String[] {new String(interfaceName)};
+ this.handle(
+ IProblem.CannotDefineInterfaceInLocalType,
+ arguments,
+ arguments,
+ sourceStart,
+ sourceEnd);
+}
+public void cannotDefineDimensionsAndInitializer(ArrayAllocationExpression expresssion) {
+ this.handle(
+ IProblem.CannotDefineDimensionExpressionsWithInit,
+ NoArgument,
+ NoArgument,
+ expresssion.sourceStart,
+ expresssion.sourceEnd);
+}
+public void cannotDireclyInvokeAbstractMethod(MessageSend messageSend, MethodBinding method) {
+ this.handle(
+ IProblem.DirectInvocationOfAbstractMethod,
+ new String[] {new String(method.declaringClass.readableName()), new String(method.selector), parametersAsString(method.parameters, false)},
+ new String[] {new String(method.declaringClass.shortReadableName()), new String(method.selector), parametersAsString(method.parameters, true)},
+ messageSend.sourceStart,
+ messageSend.sourceEnd);
+}
+public void cannotImportPackage(ImportReference importRef) {
+ String[] arguments = new String[] {CharOperation.toString(importRef.tokens)};
+ this.handle(
+ IProblem.CannotImportPackage,
+ arguments,
+ arguments,
+ importRef.sourceStart,
+ importRef.sourceEnd);
+}
+public void cannotInstantiate(TypeReference typeRef, TypeBinding type) {
+ this.handle(
+ IProblem.InvalidClassInstantiation,
+ new String[] {new String(type.readableName())},
+ new String[] {new String(type.shortReadableName())},
+ typeRef.sourceStart,
+ typeRef.sourceEnd);
+}
+public void cannotReferToNonFinalOuterLocal(LocalVariableBinding local, ASTNode location) {
+ String[] arguments =new String[]{ new String(local.readableName())};
+ this.handle(
+ IProblem.OuterLocalMustBeFinal,
+ arguments,
+ arguments,
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void cannotReturnInInitializer(ASTNode location) {
+ this.handle(
+ IProblem.CannotReturnInInitializer,
+ NoArgument,
+ NoArgument,
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void cannotThrowNull(ThrowStatement statement) {
+ this.handle(
+ IProblem.CannotThrowNull,
+ NoArgument,
+ NoArgument,
+ statement.sourceStart,
+ statement.sourceEnd);
+}
+public void cannotThrowType(SourceTypeBinding type, AbstractMethodDeclaration methodDecl, TypeReference exceptionType, TypeBinding expectedType) {
+ this.handle(
+ IProblem.CannotThrowType,
+ new String[] {new String(expectedType.readableName())},
+ new String[] {new String(expectedType.shortReadableName())},
+ exceptionType.sourceStart,
+ exceptionType.sourceEnd);
+}
+public void cannotUseSuperInCodeSnippet(int start, int end) {
+ this.handle(
+ IProblem.CannotUseSuperInCodeSnippet,
+ NoArgument,
+ NoArgument,
+ Error | Abort,
+ start,
+ end);
+}
+public void cannotUseSuperInJavaLangObject(ASTNode reference) {
+ this.handle(
+ IProblem.ObjectHasNoSuperclass,
+ NoArgument,
+ NoArgument,
+ reference.sourceStart,
+ reference.sourceEnd);
+}
+public void caseExpressionMustBeConstant(Expression expression) {
+ this.handle(
+ IProblem.NonConstantExpression,
+ NoArgument,
+ NoArgument,
+ expression.sourceStart,
+ expression.sourceEnd);
+}
+public void classExtendFinalClass(SourceTypeBinding type, TypeReference superclass, TypeBinding superTypeBinding) {
+ String name = new String(type.sourceName());
+ String superTypeFullName = new String(superTypeBinding.readableName());
+ String superTypeShortName = new String(superTypeBinding.shortReadableName());
+ if (superTypeShortName.equals(name)) superTypeShortName = superTypeFullName;
+ this.handle(
+ IProblem.ClassExtendFinalClass,
+ new String[] {superTypeFullName, name},
+ new String[] {superTypeShortName, name},
+ superclass.sourceStart,
+ superclass.sourceEnd);
+}
+public void codeSnippetMissingClass(String missing, int start, int end) {
+ String[] arguments = new String[]{missing};
+ this.handle(
+ IProblem.CodeSnippetMissingClass,
+ arguments,
+ arguments,
+ Error | Abort,
+ start,
+ end);
+}
+public void codeSnippetMissingMethod(String className, String missingMethod, String argumentTypes, int start, int end) {
+ String[] arguments = new String[]{ className, missingMethod, argumentTypes };
+ this.handle(
+ IProblem.CodeSnippetMissingMethod,
+ arguments,
+ arguments,
+ Error | Abort,
+ start,
+ end);
+}
+/*
+ * Given the current configuration, answers which category the problem
+ * falls into:
+ * Error | Warning | Ignore
+ */
+public int computeSeverity(int problemId){
+
+ // severity can have been preset on the problem
+// if ((problem.severity & Fatal) != 0){
+// return Error;
+// }
+
+ // if not then check whether it is a configurable problem
+ switch(problemId){
+
+ case IProblem.MaskedCatch :
+ return this.options.getSeverity(CompilerOptions.MaskedCatchBlock);
+
+ case IProblem.UnusedImport :
+ return this.options.getSeverity(CompilerOptions.UnusedImport);
+
+ case IProblem.MethodButWithConstructorName :
+ return this.options.getSeverity(CompilerOptions.MethodWithConstructorName);
+
+ case IProblem.OverridingNonVisibleMethod :
+ return this.options.getSeverity(CompilerOptions.OverriddenPackageDefaultMethod);
+
+ case IProblem.IncompatibleReturnTypeForNonInheritedInterfaceMethod :
+ case IProblem.IncompatibleExceptionInThrowsClauseForNonInheritedInterfaceMethod :
+ return this.options.getSeverity(CompilerOptions.IncompatibleNonInheritedInterfaceMethod);
+
+ case IProblem.OverridingDeprecatedMethod :
+ case IProblem.UsingDeprecatedType :
+ case IProblem.UsingDeprecatedMethod :
+ case IProblem.UsingDeprecatedConstructor :
+ case IProblem.UsingDeprecatedField :
+ return this.options.getSeverity(CompilerOptions.UsingDeprecatedAPI);
+
+ case IProblem.LocalVariableIsNeverUsed :
+ return this.options.getSeverity(CompilerOptions.UnusedLocalVariable);
+
+ case IProblem.ArgumentIsNeverUsed :
+ return this.options.getSeverity(CompilerOptions.UnusedArgument);
+
+ case IProblem.NoImplicitStringConversionForCharArrayExpression :
+ return this.options.getSeverity(CompilerOptions.NoImplicitStringConversion);
+
+ case IProblem.NeedToEmulateFieldReadAccess :
+ case IProblem.NeedToEmulateFieldWriteAccess :
+ case IProblem.NeedToEmulateMethodAccess :
+ case IProblem.NeedToEmulateConstructorAccess :
+ return this.options.getSeverity(CompilerOptions.AccessEmulation);
+
+ case IProblem.NonExternalizedStringLiteral :
+ return this.options.getSeverity(CompilerOptions.NonExternalizedString);
+
+ case IProblem.UseAssertAsAnIdentifier :
+ return this.options.getSeverity(CompilerOptions.AssertUsedAsAnIdentifier);
+ case IProblem.UseEnumAsAnIdentifier :
+ return this.options.getSeverity(CompilerOptions.EnumUsedAsAnIdentifier);
+
+ case IProblem.NonStaticAccessToStaticMethod :
+ case IProblem.NonStaticAccessToStaticField :
+ return this.options.getSeverity(CompilerOptions.NonStaticAccessToStatic);
+
+ case IProblem.IndirectAccessToStaticMethod :
+ case IProblem.IndirectAccessToStaticField :
+ case IProblem.IndirectAccessToStaticType :
+ return this.options.getSeverity(CompilerOptions.IndirectStaticAccess);
+
+ case IProblem.AssignmentHasNoEffect:
+ return this.options.getSeverity(CompilerOptions.NoEffectAssignment);
+
+ case IProblem.UnusedPrivateConstructor:
+ case IProblem.UnusedPrivateMethod:
+ case IProblem.UnusedPrivateField:
+ case IProblem.UnusedPrivateType:
+ return this.options.getSeverity(CompilerOptions.UnusedPrivateMember);
+
+ case IProblem.Task :
+ return Warning;
+
+ case IProblem.LocalVariableHidingLocalVariable:
+ case IProblem.LocalVariableHidingField:
+ case IProblem.ArgumentHidingLocalVariable:
+ case IProblem.ArgumentHidingField:
+ return this.options.getSeverity(CompilerOptions.LocalVariableHiding);
+
+ case IProblem.FieldHidingLocalVariable:
+ case IProblem.FieldHidingField:
+ return this.options.getSeverity(CompilerOptions.FieldHiding);
+
+ case IProblem.PossibleAccidentalBooleanAssignment:
+ return this.options.getSeverity(CompilerOptions.AccidentalBooleanAssign);
+
+ case IProblem.SuperfluousSemicolon:
+ case IProblem.EmptyControlFlowStatement:
+ return this.options.getSeverity(CompilerOptions.EmptyStatement);
+
+ case IProblem.UndocumentedEmptyBlock:
+ return this.options.getSeverity(CompilerOptions.UndocumentedEmptyBlock);
+
+ case IProblem.UnnecessaryCast:
+ case IProblem.UnnecessaryArgumentCast:
+ case IProblem.UnnecessaryInstanceof:
+ return this.options.getSeverity(CompilerOptions.UnnecessaryTypeCheck);
+
+ case IProblem.FinallyMustCompleteNormally:
+ return this.options.getSeverity(CompilerOptions.FinallyBlockNotCompleting);
+
+ case IProblem.UnusedMethodDeclaredThrownException:
+ case IProblem.UnusedConstructorDeclaredThrownException:
+ return this.options.getSeverity(CompilerOptions.UnusedDeclaredThrownException);
+
+ case IProblem.UnqualifiedFieldAccess:
+ return this.options.getSeverity(CompilerOptions.UnqualifiedFieldAccess);
+
+ case IProblem.UnnecessaryElse:
+ return this.options.getSeverity(CompilerOptions.UnnecessaryElse);
+
+ case IProblem.UnsafeRawConstructorInvocation:
+ case IProblem.UnsafeRawMethodInvocation:
+ case IProblem.UnsafeRawConversion:
+ case IProblem.UnsafeRawFieldAssignment:
+ case IProblem.UnsafeGenericCast:
+ case IProblem.UnsafeReturnTypeOverride:
+ return this.options.getSeverity(CompilerOptions.UnsafeTypeOperation);
+
+ case IProblem.FinalBoundForTypeVariable:
+ return this.options.getSeverity(CompilerOptions.FinalParameterBound);
+
+ case IProblem.MissingSerialVersion:
+ return this.options.getSeverity(CompilerOptions.MissingSerialVersion);
+
+ case IProblem.ForbiddenReference:
+ return this.options.getSeverity(CompilerOptions.ForbiddenReference);
+
+ /*
+ * Javadoc syntax errors
+ */
+ case IProblem.JavadocUnexpectedTag:
+ case IProblem.JavadocDuplicateReturnTag:
+ case IProblem.JavadocInvalidThrowsClass:
+ case IProblem.JavadocInvalidReference:
+ case IProblem.JavadocMalformedSeeReference:
+ case IProblem.JavadocInvalidSeeHref:
+ case IProblem.JavadocInvalidSeeArgs:
+ case IProblem.JavadocInvalidTag:
+ case IProblem.JavadocUnterminatedInlineTag:
+ case IProblem.JavadocMissingHashCharacter:
+ case IProblem.JavadocEmptyReturnTag:
+ case IProblem.JavadocUnexpectedText:
+ if (this.options.docCommentSupport) {
+ return this.options.getSeverity(CompilerOptions.InvalidJavadoc);
+ } else {
+ return ProblemSeverities.Ignore;
+ }
+
+ /*
+ * Javadoc tags resolved references errors
+ */
+ case IProblem.JavadocInvalidParamName:
+ case IProblem.JavadocDuplicateParamName:
+ case IProblem.JavadocMissingParamName:
+ case IProblem.JavadocInvalidThrowsClassName:
+ case IProblem.JavadocDuplicateThrowsClassName:
+ case IProblem.JavadocMissingThrowsClassName:
+ case IProblem.JavadocMissingReference:
+ case IProblem.JavadocInvalidValueReference:
+ case IProblem.JavadocUsingDeprecatedField:
+ case IProblem.JavadocUsingDeprecatedConstructor:
+ case IProblem.JavadocUsingDeprecatedMethod:
+ case IProblem.JavadocUsingDeprecatedType:
+ case IProblem.JavadocUndefinedField:
+ case IProblem.JavadocNotVisibleField:
+ case IProblem.JavadocAmbiguousField:
+ case IProblem.JavadocUndefinedConstructor:
+ case IProblem.JavadocNotVisibleConstructor:
+ case IProblem.JavadocAmbiguousConstructor:
+ case IProblem.JavadocUndefinedMethod:
+ case IProblem.JavadocNotVisibleMethod:
+ case IProblem.JavadocAmbiguousMethod:
+ case IProblem.JavadocAmbiguousMethodReference:
+ case IProblem.JavadocParameterMismatch:
+ case IProblem.JavadocUndefinedType:
+ case IProblem.JavadocNotVisibleType:
+ case IProblem.JavadocAmbiguousType:
+ case IProblem.JavadocInternalTypeNameProvided:
+ case IProblem.JavadocNoMessageSendOnArrayType:
+ case IProblem.JavadocNoMessageSendOnBaseType:
+ case IProblem.JavadocInheritedMethodHidesEnclosingName:
+ case IProblem.JavadocInheritedFieldHidesEnclosingName:
+ case IProblem.JavadocInheritedNameHidesEnclosingTypeName:
+ if (this.options.docCommentSupport && this.options.reportInvalidJavadocTags) {
+ return this.options.getSeverity(CompilerOptions.InvalidJavadoc);
+ } else {
+ return ProblemSeverities.Ignore;
+ }
+
+ /*
+ * Javadoc missing tags errors
+ */
+ case IProblem.JavadocMissingParamTag:
+ case IProblem.JavadocMissingReturnTag:
+ case IProblem.JavadocMissingThrowsTag:
+ if (this.options.docCommentSupport) {
+ return this.options.getSeverity(CompilerOptions.MissingJavadocTags);
+ } else {
+ return ProblemSeverities.Ignore;
+ }
+
+ /*
+ * Missing Javadoc errors
+ */
+ case IProblem.JavadocMissing:
+ if (this.options.docCommentSupport) {
+ return this.options.getSeverity(CompilerOptions.MissingJavadocComments);
+ } else {
+ return ProblemSeverities.Ignore;
+ }
+
+ // by default problems are errors.
+ default:
+ return Error;
+ }
+}
+public void conditionalArgumentsIncompatibleTypes(ConditionalExpression expression, TypeBinding trueType, TypeBinding falseType) {
+ this.handle(
+ IProblem.IncompatibleTypesInConditionalOperator,
+ new String[] {new String(trueType.readableName()), new String(falseType.readableName())},
+ new String[] {new String(trueType.sourceName()), new String(falseType.sourceName())},
+ expression.sourceStart,
+ expression.sourceEnd);
+}
+public void conflictingImport(ImportReference importRef) {
+ String[] arguments = new String[] {CharOperation.toString(importRef.tokens)};
+ this.handle(
+ IProblem.ConflictingImport,
+ arguments,
+ arguments,
+ importRef.sourceStart,
+ importRef.sourceEnd);
+}
+public void constantOutOfFormat(NumberLiteral literal) {
+ // the literal is not in a correct format
+ // this code is called on IntLiteral and LongLiteral
+ // example 000811 ...the 8 is uncorrect.
+
+ if ((literal instanceof LongLiteral) || (literal instanceof IntLiteral)) {
+ char[] source = literal.source();
+ try {
+ final String Radix;
+ final int radix;
+ if ((source[1] == 'x') || (source[1] == 'X')) {
+ radix = 16;
+ Radix = "Hex"; //$NON-NLS-1$
+ } else {
+ radix = 8;
+ Radix = "Octal"; //$NON-NLS-1$
+ }
+ //look for the first digit that is incorrect
+ int place = -1;
+ label : for (int i = radix == 8 ? 1 : 2; i < source.length; i++) {
+ if (Character.digit(source[i], radix) == -1) {
+ place = i;
+ break label;
+ }
+ }
+ String[] arguments = new String[] {
+ new String(literal.literalType(null).readableName()), // numeric literals do not need scope to reach type
+ Radix + " " + new String(source) + " (digit " + new String(new char[] {source[place]}) + ")"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+ this.handle(
+ IProblem.NumericValueOutOfRange,
+ arguments,
+ arguments,
+ literal.sourceStart,
+ literal.sourceEnd);
+ return;
+ } catch (IndexOutOfBoundsException ex) {
+ // should never happen
+ }
+
+ // just in case .... use a predefined error..
+ // we should never come here...(except if the code changes !)
+ this.constantOutOfRange(literal, literal.literalType(null)); // numeric literals do not need scope to reach type
+ }
+}
+public void constantOutOfRange(Literal literal, TypeBinding literalType) {
+ String[] arguments = new String[] {new String(literalType.readableName()), new String(literal.source())};
+ this.handle(
+ IProblem.NumericValueOutOfRange,
+ arguments,
+ arguments,
+ literal.sourceStart,
+ literal.sourceEnd);
+}
+public void corruptedSignature(TypeBinding enclosingType, char[] signature, int position) {
+ this.handle(
+ IProblem.CorruptedSignature,
+ new String[] { new String(enclosingType.readableName()), new String(signature), String.valueOf(position) },
+ new String[] { new String(enclosingType.shortReadableName()), new String(signature), String.valueOf(position) },
+ Error | Abort,
+ 0,
+ 0);
+}
+public void deprecatedField(FieldBinding field, ASTNode location) {
+ this.handle(
+ IProblem.UsingDeprecatedField,
+ new String[] {new String(field.declaringClass.readableName()), new String(field.name)},
+ new String[] {new String(field.declaringClass.shortReadableName()), new String(field.name)},
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void deprecatedMethod(MethodBinding method, ASTNode location) {
+ if (method.isConstructor()) {
+ this.handle(
+ IProblem.UsingDeprecatedConstructor,
+ new String[] {new String(method.declaringClass.readableName()), parametersAsString(method.parameters, false)},
+ new String[] {new String(method.declaringClass.shortReadableName()), parametersAsString(method.parameters, true)},
+ location.sourceStart,
+ location.sourceEnd);
+ } else {
+ this.handle(
+ IProblem.UsingDeprecatedMethod,
+ new String[] {new String(method.declaringClass.readableName()), new String(method.selector), parametersAsString(method.parameters, false)},
+ new String[] {new String(method.declaringClass.shortReadableName()), new String(method.selector), parametersAsString(method.parameters, true)},
+ location.sourceStart,
+ location.sourceEnd);
+ }
+}
+public void deprecatedType(TypeBinding type, ASTNode location) {
+ if (location == null) return; // 1G828DN - no type ref for synthetic arguments
+ this.handle(
+ IProblem.UsingDeprecatedType,
+ new String[] {new String(type.readableName())},
+ new String[] {new String(type.shortReadableName())},
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void duplicateCase(CaseStatement caseStatement) {
+ this.handle(
+ IProblem.DuplicateCase,
+ NoArgument,
+ NoArgument,
+ caseStatement.sourceStart,
+ caseStatement.sourceEnd);
+}
+public void duplicateDefaultCase(ASTNode statement) {
+ this.handle(
+ IProblem.DuplicateDefaultCase,
+ NoArgument,
+ NoArgument,
+ statement.sourceStart,
+ statement.sourceEnd);
+}
+public void duplicateFieldInType(SourceTypeBinding type, FieldDeclaration fieldDecl) {
+ this.handle(
+ IProblem.DuplicateField,
+ new String[] {new String(type.sourceName()), new String(fieldDecl.name)},
+ new String[] {new String(type.shortReadableName()), new String(fieldDecl.name)},
+ fieldDecl.sourceStart,
+ fieldDecl.sourceEnd);
+}
+
+public void duplicateImport(ImportReference importRef) {
+ String[] arguments = new String[] {CharOperation.toString(importRef.tokens)};
+ this.handle(
+ IProblem.DuplicateImport,
+ arguments,
+ arguments,
+ importRef.sourceStart,
+ importRef.sourceEnd);
+}
+public void duplicateInitializationOfBlankFinalField(FieldBinding field, Reference reference) {
+ String[] arguments = new String[]{ new String(field.readableName())};
+ this.handle(
+ IProblem.DuplicateBlankFinalFieldInitialization,
+ arguments,
+ arguments,
+ reference.sourceStart,
+ reference.sourceEnd);
+}
+public void duplicateInitializationOfFinalLocal(LocalVariableBinding local, ASTNode location) {
+ String[] arguments = new String[] { new String(local.readableName())};
+ this.handle(
+ IProblem.DuplicateFinalLocalInitialization,
+ arguments,
+ arguments,
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void duplicateMethodInType(SourceTypeBinding type, AbstractMethodDeclaration methodDecl) {
+ MethodBinding method = methodDecl.binding;
+ boolean duplicateErasure = false;
+ if ((method.modifiers & CompilerModifiers.AccGenericSignature) != 0) {
+ // chech it occurs in parameters (the bit is set for return type | params | thrown exceptions
+ for (int i = 0, length = method.parameters.length; i < length; i++) {
+ if ((method.parameters[i].tagBits & TagBits.HasTypeVariable) != 0) {
+ duplicateErasure = true;
+ break;
+ }
+ }
+ }
+ if (duplicateErasure) {
+ int length = method.parameters.length;
+ TypeBinding[] erasures = new TypeBinding[length];
+ for (int i = 0; i < length; i++) {
+ erasures[i] = method.parameters[i].erasure();
+ }
+ this.handle(
+ IProblem.DuplicateMethodErasure,
+ new String[] {
+ new String(methodDecl.selector),
+ new String(method.declaringClass.readableName()),
+ parametersAsString(method.parameters, false),
+ parametersAsString(erasures, false) } ,
+ new String[] {
+ new String(methodDecl.selector),
+ new String(method.declaringClass.shortReadableName()),
+ parametersAsString(method.parameters, true),
+ parametersAsString(erasures, true) },
+ methodDecl.sourceStart,
+ methodDecl.sourceEnd);
+ } else {
+ this.handle(
+ IProblem.DuplicateMethod,
+ new String[] {
+ new String(methodDecl.selector),
+ new String(method.declaringClass.readableName()),
+ parametersAsString(method.parameters, false)},
+ new String[] {
+ new String(methodDecl.selector),
+ new String(method.declaringClass.shortReadableName()),
+ parametersAsString(method.parameters, true)},
+ methodDecl.sourceStart,
+ methodDecl.sourceEnd);
+ }
+}
+public void duplicateModifierForField(ReferenceBinding type, FieldDeclaration fieldDecl) {
+/* to highlight modifiers use:
+ this.handle(
+ new Problem(
+ DuplicateModifierForField,
+ new String[] {new String(fieldDecl.name)},
+ fieldDecl.modifiers.sourceStart,
+ fieldDecl.modifiers.sourceEnd));
+*/
+ String[] arguments = new String[] {new String(fieldDecl.name)};
+ this.handle(
+ IProblem.DuplicateModifierForField,
+ arguments,
+ arguments,
+ fieldDecl.sourceStart,
+ fieldDecl.sourceEnd);
+}
+public void duplicateModifierForMethod(ReferenceBinding type, AbstractMethodDeclaration methodDecl) {
+ this.handle(
+ IProblem.DuplicateModifierForMethod,
+ new String[] {new String(type.sourceName()), new String(methodDecl.selector)},
+ new String[] {new String(type.shortReadableName()), new String(methodDecl.selector)},
+ methodDecl.sourceStart,
+ methodDecl.sourceEnd);
+}
+public void duplicateModifierForType(SourceTypeBinding type) {
+ String[] arguments = new String[] {new String(type.sourceName())};
+ this.handle(
+ IProblem.DuplicateModifierForType,
+ arguments,
+ arguments,
+ type.sourceStart(),
+ type.sourceEnd());
+}
+public void duplicateModifierForVariable(LocalDeclaration localDecl, boolean complainForArgument) {
+ String[] arguments = new String[] {new String(localDecl.name)};
+ this.handle(
+ complainForArgument
+ ? IProblem.DuplicateModifierForArgument
+ : IProblem.DuplicateModifierForVariable,
+ arguments,
+ arguments,
+ localDecl.sourceStart,
+ localDecl.sourceEnd);
+}
+public void duplicateNestedType(TypeDeclaration typeDecl) {
+ String[] arguments = new String[] {new String(typeDecl.name)};
+ this.handle(
+ IProblem.DuplicateNestedType,
+ arguments,
+ arguments,
+ typeDecl.sourceStart,
+ typeDecl.sourceEnd);
+}
+public void duplicateSuperinterface(SourceTypeBinding type, TypeDeclaration typeDecl, ReferenceBinding superType) {
+ this.handle(
+ IProblem.DuplicateSuperInterface,
+ new String[] {
+ new String(superType.readableName()),
+ new String(type.sourceName())},
+ new String[] {
+ new String(superType.shortReadableName()),
+ new String(type.sourceName())},
+ typeDecl.sourceStart,
+ typeDecl.sourceEnd);
+}
+public void duplicateTypeParameterInType(TypeParameter typeParameter) {
+ this.handle(
+ IProblem.DuplicateTypeVariable,
+ new String[] { new String(typeParameter.name)},
+ new String[] { new String(typeParameter.name)},
+ typeParameter.sourceStart,
+ typeParameter.sourceEnd);
+}
+public void duplicateTypes(CompilationUnitDeclaration compUnitDecl, TypeDeclaration typeDecl) {
+ String[] arguments = new String[] {new String(compUnitDecl.getFileName()), new String(typeDecl.name)};
+ this.referenceContext = typeDecl; // report the problem against the type not the entire compilation unit
+ this.handle(
+ IProblem.DuplicateTypes,
+ arguments,
+ arguments,
+ typeDecl.sourceStart,
+ typeDecl.sourceEnd,
+ compUnitDecl.compilationResult);
+}
+public void emptyControlFlowStatement(int sourceStart, int sourceEnd) {
+ this.handle(
+ IProblem.EmptyControlFlowStatement,
+ NoArgument,
+ NoArgument,
+ sourceStart,
+ sourceEnd);
+}
+public void errorNoMethodFor(MessageSend messageSend, TypeBinding recType, TypeBinding[] params) {
+ StringBuffer buffer = new StringBuffer();
+ StringBuffer shortBuffer = new StringBuffer();
+ for (int i = 0, length = params.length; i < length; i++) {
+ if (i != 0){
+ buffer.append(", "); //$NON-NLS-1$
+ shortBuffer.append(", "); //$NON-NLS-1$
+ }
+ buffer.append(new String(params[i].readableName()));
+ shortBuffer.append(new String(params[i].shortReadableName()));
+ }
+
+ int id = recType.isArrayType() ? IProblem.NoMessageSendOnArrayType : IProblem.NoMessageSendOnBaseType;
+ /*
+ if ((messageSend.bits & ASTNode.InsideJavadoc) != 0) {
+ id |= IProblem.Javadoc;
+ if (!reportInvalidJavadocTagsVisibility()) return;
+ }
+ */
+ this.handle(
+ id,
+ new String[] {new String(recType.readableName()), new String(messageSend.selector), buffer.toString()},
+ new String[] {new String(recType.shortReadableName()), new String(messageSend.selector), shortBuffer.toString()},
+ messageSend.sourceStart,
+ messageSend.sourceEnd);
+}
+public void errorThisSuperInStatic(ASTNode reference) {
+ String[] arguments = new String[] {reference.isSuper() ? "super" : "this"}; //$NON-NLS-2$ //$NON-NLS-1$
+ this.handle(
+ IProblem.ThisInStaticContext,
+ arguments,
+ arguments,
+ reference.sourceStart,
+ reference.sourceEnd);
+}
+public void expressionShouldBeAVariable(Expression expression) {
+ this.handle(
+ IProblem.ExpressionShouldBeAVariable,
+ NoArgument,
+ NoArgument,
+ expression.sourceStart,
+ expression.sourceEnd);
+}
+public void fieldHiding(FieldDeclaration fieldDecl, Binding hiddenVariable) {
+ FieldBinding field = fieldDecl.binding;
+ if (CharOperation.equals(TypeConstants.SERIALVERSIONUID, field.name)
+ && field.isStatic()
+ && field.isFinal()
+ && BaseTypes.LongBinding == field.type) {
+ return; // do not report unused serialVersionUID field
+ }
+ if (CharOperation.equals(TypeConstants.SERIALPERSISTENTFIELDS, field.name)
+ && field.isStatic()
+ && field.isFinal()
+ && field.type.dimensions() == 1
+ && CharOperation.equals(TypeConstants.CharArray_JAVA_IO_OBJECTSTREAMFIELD, field.type.leafComponentType().readableName())) {
+ return; // do not report unused serialPersistentFields field
+ }
+
+ if (hiddenVariable instanceof LocalVariableBinding) {
+ this.handle(
+ IProblem.FieldHidingLocalVariable,
+ new String[] {new String(field.declaringClass.readableName()), new String(field.name) },
+ new String[] {new String(field.declaringClass.shortReadableName()), new String(field.name) },
+ fieldDecl.sourceStart,
+ fieldDecl.sourceEnd);
+ } else if (hiddenVariable instanceof FieldBinding) {
+ FieldBinding hiddenField = (FieldBinding) hiddenVariable;
+ this.handle(
+ IProblem.FieldHidingField,
+ new String[] {new String(field.declaringClass.readableName()), new String(field.name) , new String(hiddenField.declaringClass.readableName()) },
+ new String[] {new String(field.declaringClass.shortReadableName()), new String(field.name) , new String(hiddenField.declaringClass.shortReadableName()) },
+ fieldDecl.sourceStart,
+ fieldDecl.sourceEnd);
+ }
+}
+private int fieldLocation(FieldBinding field, ASTNode node) {
+ if (node instanceof QualifiedNameReference) {
+ QualifiedNameReference ref = (QualifiedNameReference) node;
+ FieldBinding[] bindings = ref.otherBindings;
+ if (bindings != null)
+ for (int i = bindings.length; --i >= 0;)
+ if (bindings[i] == field)
+ return (int) ref.sourcePositions[i + 1]; // first position is for the primary field
+ }
+ return node.sourceEnd;
+}
+public void fieldsOrThisBeforeConstructorInvocation(ThisReference reference) {
+ this.handle(
+ IProblem.ThisSuperDuringConstructorInvocation,
+ NoArgument,
+ NoArgument,
+ reference.sourceStart,
+ reference.sourceEnd);
+}
+public void finallyMustCompleteNormally(Block finallyBlock) {
+ this.handle(
+ IProblem.FinallyMustCompleteNormally,
+ NoArgument,
+ NoArgument,
+ finallyBlock.sourceStart,
+ finallyBlock.sourceEnd);
+}
+public void finalMethodCannotBeOverridden(MethodBinding currentMethod, MethodBinding inheritedMethod) {
+ this.handle(
+ // Cannot override the final method from %1
+ // 8.4.3.3 - Final methods cannot be overridden or hidden.
+ IProblem.FinalMethodCannotBeOverridden,
+ new String[] {new String(inheritedMethod.declaringClass.readableName())},
+ new String[] {new String(inheritedMethod.declaringClass.shortReadableName())},
+ currentMethod.sourceStart(),
+ currentMethod.sourceEnd());
+}
+public void finalVariableBound(TypeVariableBinding typeVariable, TypeReference typeRef) {
+ this.handle(
+ IProblem.FinalBoundForTypeVariable,
+ new String[] { new String(typeVariable.sourceName), new String(typeRef.resolvedType.readableName())},
+ new String[] { new String(typeVariable.sourceName), new String(typeRef.resolvedType.shortReadableName())},
+ typeRef.sourceStart,
+ typeRef.sourceEnd);
+}
+public void forbiddenReference(TypeBinding type, ASTNode location, String visibilityRuleOwner) {
+ if (location == null) return;
+ this.handle(
+ IProblem.ForbiddenReference,
+ new String[] {new String(type.readableName()), visibilityRuleOwner},
+ new String[] {new String(type.shortReadableName()), visibilityRuleOwner},
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void forwardReference(Reference reference, int indexInQualification, TypeBinding type) {
+ this.handle(
+ IProblem.ReferenceToForwardField,
+ NoArgument,
+ NoArgument,
+ reference.sourceStart,
+ reference.sourceEnd);
+}
+public void forwardTypeVariableReference(ASTNode location, TypeVariableBinding type) {
+ this.handle(
+ IProblem.ReferenceToForwardTypeVariable,
+ new String[] {new String(type.readableName())},
+ new String[] {new String(type.shortReadableName())},
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void genericTypeCannotExtendThrowable(TypeDeclaration typeDecl) {
+ this.handle(
+ IProblem.GenericTypeCannotExtendThrowable,
+ new String[]{ new String(typeDecl.binding.readableName()) },
+ new String[]{ new String(typeDecl.binding.shortReadableName()) },
+ typeDecl.superclass.sourceStart,
+ typeDecl.superclass.sourceEnd);
+}
+// use this private API when the compilation unit result can be found through the
+// reference context. Otherwise, use the other API taking a problem and a compilation result
+// as arguments
+private void handle(
+ int problemId,
+ String[] problemArguments,
+ String[] messageArguments,
+ int problemStartPosition,
+ int problemEndPosition){
+
+ this.handle(
+ problemId,
+ problemArguments,
+ messageArguments,
+ problemStartPosition,
+ problemEndPosition,
+ this.referenceContext,
+ this.referenceContext == null ? null : this.referenceContext.compilationResult());
+ this.referenceContext = null;
+}
+// use this private API when the compilation unit result cannot be found through the
+// reference context.
+
+private void handle(
+ int problemId,
+ String[] problemArguments,
+ String[] messageArguments,
+ int problemStartPosition,
+ int problemEndPosition,
+ CompilationResult unitResult){
+
+ this.handle(
+ problemId,
+ problemArguments,
+ messageArguments,
+ problemStartPosition,
+ problemEndPosition,
+ this.referenceContext,
+ unitResult);
+ this.referenceContext = null;
+}
+// use this private API when the compilation unit result can be found through the
+// reference context. Otherwise, use the other API taking a problem and a compilation result
+// as arguments
+private void handle(
+ int problemId,
+ String[] problemArguments,
+ String[] messageArguments,
+ int severity,
+ int problemStartPosition,
+ int problemEndPosition){
+
+ this.handle(
+ problemId,
+ problemArguments,
+ messageArguments,
+ severity,
+ problemStartPosition,
+ problemEndPosition,
+ this.referenceContext,
+ this.referenceContext == null ? null : this.referenceContext.compilationResult());
+ this.referenceContext = null;
+}
+public void hiddenCatchBlock(ReferenceBinding exceptionType, ASTNode location) {
+ this.handle(
+ IProblem.MaskedCatch,
+ new String[] {
+ new String(exceptionType.readableName()),
+ },
+ new String[] {
+ new String(exceptionType.shortReadableName()),
+ },
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void hidingEnclosingType(TypeDeclaration typeDecl) {
+ String[] arguments = new String[] {new String(typeDecl.name)};
+ this.handle(
+ IProblem.HidingEnclosingType,
+ arguments,
+ arguments,
+ typeDecl.sourceStart,
+ typeDecl.sourceEnd);
+}
+public void hierarchyCircularity(SourceTypeBinding sourceType, ReferenceBinding superType, TypeReference reference) {
+ int start = 0;
+ int end = 0;
+ String typeName = new String(superType.readableName());
+ String shortTypeName = new String(superType.sourceName());
+
+ if (reference == null) { // can only happen when java.lang.Object is busted
+ start = sourceType.sourceStart();
+ end = sourceType.sourceEnd();
+ } else {
+ start = reference.sourceStart;
+ end = reference.sourceEnd;
+ if (sourceType != superType) {
+ char[][] qName = reference.getTypeName();
+ typeName = CharOperation.toString(qName);
+ shortTypeName = new String(qName[qName.length-1]);
+ }
+ }
+
+ if (sourceType == superType)
+ this.handle(
+ IProblem.HierarchyCircularitySelfReference,
+ new String[] {typeName},
+ new String[] {shortTypeName},
+ start,
+ end);
+ else
+ this.handle(
+ IProblem.HierarchyCircularity,
+ new String[] {new String(sourceType.sourceName()), typeName},
+ new String[] {new String(sourceType.sourceName()), shortTypeName},
+ start,
+ end);
+}
+public void hierarchyHasProblems(SourceTypeBinding type) {
+ String[] arguments = new String[] {new String(type.sourceName())};
+ this.handle(
+ IProblem.HierarchyHasProblems,
+ arguments,
+ arguments,
+ type.sourceStart(),
+ type.sourceEnd());
+}
+public void illegalAbstractModifierCombinationForMethod(ReferenceBinding type, AbstractMethodDeclaration methodDecl) {
+ String[] arguments = new String[] {new String(type.sourceName()), new String(methodDecl.selector)};
+ this.handle(
+ IProblem.IllegalAbstractModifierCombinationForMethod,
+ arguments,
+ arguments,
+ methodDecl.sourceStart,
+ methodDecl.sourceEnd);
+}
+public void illegalClassLiteralForTypeVariable(TypeVariableBinding variable, ASTNode location) {
+ String[] arguments = new String[] { new String(variable.sourceName) };
+ this.handle(
+ IProblem.IllegalClassLiteralForTypeVariable,
+ arguments,
+ arguments,
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void illegalExtendedDimensions(AnnotationTypeMemberDeclaration annotationTypeMemberDeclaration) {
+ this.handle(
+ IProblem.IllegalExtendedDimensions,
+ NoArgument,
+ NoArgument,
+ annotationTypeMemberDeclaration.sourceStart,
+ annotationTypeMemberDeclaration.sourceEnd);
+}
+public void illegalGenericArray(TypeBinding leadtComponentType, ASTNode location) {
+ this.handle(
+ IProblem.IllegalGenericArray,
+ new String[]{ new String(leadtComponentType.readableName())},
+ new String[]{ new String(leadtComponentType.shortReadableName())},
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void illegalInstanceOfGenericType(TypeBinding checkedType, ASTNode location) {
+ if (checkedType.isTypeVariable()) {
+ this.handle(
+ IProblem.IllegalInstanceofTypeParameter,
+ new String[] { new String(checkedType.readableName()), new String(checkedType.erasure().readableName())},
+ new String[] { new String(checkedType.shortReadableName()), new String(checkedType.erasure().shortReadableName())},
+ location.sourceStart,
+ location.sourceEnd);
+ return;
+ }
+ this.handle(
+ IProblem.IllegalInstanceofParameterizedType,
+ new String[] { new String(checkedType.readableName()), new String(checkedType.erasure().sourceName())},
+ new String[] { new String(checkedType.shortReadableName()), new String(checkedType.erasure().sourceName())},
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void illegalModifierCombinationFinalAbstractForClass(SourceTypeBinding type) {
+ String[] arguments = new String[] {new String(type.sourceName())};
+ this.handle(
+ IProblem.IllegalModifierCombinationFinalAbstractForClass,
+ arguments,
+ arguments,
+ type.sourceStart(),
+ type.sourceEnd());
+}
+public void illegalModifierCombinationFinalVolatileForField(ReferenceBinding type, FieldDeclaration fieldDecl) {
+ String[] arguments = new String[] {new String(fieldDecl.name)};
+
+ this.handle(
+ IProblem.IllegalModifierCombinationFinalVolatileForField,
+ arguments,
+ arguments,
+ fieldDecl.sourceStart,
+ fieldDecl.sourceEnd);
+}
+
+public void illegalModifierForClass(SourceTypeBinding type) {
+ String[] arguments = new String[] {new String(type.sourceName())};
+ this.handle(
+ IProblem.IllegalModifierForClass,
+ arguments,
+ arguments,
+ type.sourceStart(),
+ type.sourceEnd());
+}
+public void illegalModifierForField(ReferenceBinding type, FieldDeclaration fieldDecl) {
+ String[] arguments = new String[] {new String(fieldDecl.name)};
+ this.handle(
+ IProblem.IllegalModifierForField,
+ arguments,
+ arguments,
+ fieldDecl.sourceStart,
+ fieldDecl.sourceEnd);
+}
+public void illegalModifierForInterface(SourceTypeBinding type) {
+ String[] arguments = new String[] {new String(type.sourceName())};
+ this.handle(
+ IProblem.IllegalModifierForInterface,
+ arguments,
+ arguments,
+ type.sourceStart(),
+ type.sourceEnd());
+}
+public void illegalModifierForInterfaceField(ReferenceBinding type, FieldDeclaration fieldDecl) {
+ String[] arguments = new String[] {new String(fieldDecl.name)};
+ this.handle(
+ IProblem.IllegalModifierForInterfaceField,
+ arguments,
+ arguments,
+ fieldDecl.sourceStart,
+ fieldDecl.sourceEnd);
+}
+public void illegalModifierForInterfaceMethod(ReferenceBinding type, AbstractMethodDeclaration methodDecl) {
+ String[] arguments = new String[] {new String(type.sourceName()), new String(methodDecl.selector)};
+ this.handle(
+ IProblem.IllegalModifierForInterfaceMethod,
+ arguments,
+ arguments,
+ methodDecl.sourceStart,
+ methodDecl.sourceEnd);
+}
+public void illegalModifierForLocalClass(SourceTypeBinding type) {
+ String[] arguments = new String[] {new String(type.sourceName())};
+ this.handle(
+ IProblem.IllegalModifierForLocalClass,
+ arguments,
+ arguments,
+ type.sourceStart(),
+ type.sourceEnd());
+}
+public void illegalModifierForMemberClass(SourceTypeBinding type) {
+ String[] arguments = new String[] {new String(type.sourceName())};
+ this.handle(
+ IProblem.IllegalModifierForMemberClass,
+ arguments,
+ arguments,
+ type.sourceStart(),
+ type.sourceEnd());
+}
+public void illegalModifierForMemberInterface(SourceTypeBinding type) {
+ String[] arguments = new String[] {new String(type.sourceName())};
+ this.handle(
+ IProblem.IllegalModifierForMemberInterface,
+ arguments,
+ arguments,
+ type.sourceStart(),
+ type.sourceEnd());
+}
+public void illegalModifierForMethod(ReferenceBinding type, AbstractMethodDeclaration methodDecl) {
+ String[] arguments = new String[] {new String(type.sourceName()), new String(methodDecl.selector)};
+ this.handle(
+ IProblem.IllegalModifierForMethod,
+ arguments,
+ arguments,
+ methodDecl.sourceStart,
+ methodDecl.sourceEnd);
+}
+public void illegalModifierForVariable(LocalDeclaration localDecl, boolean complainAsArgument) {
+ String[] arguments = new String[] {new String(localDecl.name)};
+ this.handle(
+ complainAsArgument
+ ? IProblem.IllegalModifierForArgument
+ : IProblem.IllegalModifierForVariable,
+ arguments,
+ arguments,
+ localDecl.sourceStart,
+ localDecl.sourceEnd);
+}
+public void illegalPrimitiveOrArrayTypeForEnclosingInstance(TypeBinding enclosingType, ASTNode location) {
+ this.handle(
+ IProblem.IllegalPrimitiveOrArrayTypeForEnclosingInstance,
+ new String[] {new String(enclosingType.readableName())},
+ new String[] {new String(enclosingType.shortReadableName())},
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void illegalStaticModifierForMemberType(SourceTypeBinding type) {
+ String[] arguments = new String[] {new String(type.sourceName())};
+ this.handle(
+ IProblem.IllegalStaticModifierForMemberType,
+ arguments,
+ arguments,
+ type.sourceStart(),
+ type.sourceEnd());
+}
+public void illegalUsageOfQualifiedTypeReference(QualifiedTypeReference qualifiedTypeReference) {
+ StringBuffer buffer = new StringBuffer();
+ char[][] tokens = qualifiedTypeReference.tokens;
+ for (int i = 0; i < tokens.length; i++) {
+ if (i > 0) buffer.append('.');
+ buffer.append(tokens[i]);
+ }
+ String[] arguments = new String[] { String.valueOf(buffer)};
+ this.handle(
+ IProblem.IllegalUsageOfQualifiedTypeReference,
+ arguments,
+ arguments,
+ qualifiedTypeReference.sourceStart,
+ qualifiedTypeReference.sourceEnd);
+}
+public void illegalVisibilityModifierCombinationForField(ReferenceBinding type, FieldDeclaration fieldDecl) {
+ String[] arguments = new String[] {new String(fieldDecl.name)};
+ this.handle(
+ IProblem.IllegalVisibilityModifierCombinationForField,
+ arguments,
+ arguments,
+ fieldDecl.sourceStart,
+ fieldDecl.sourceEnd);
+}
+public void illegalVisibilityModifierCombinationForMemberType(SourceTypeBinding type) {
+ String[] arguments = new String[] {new String(type.sourceName())};
+ this.handle(
+ IProblem.IllegalVisibilityModifierCombinationForMemberType,
+ arguments,
+ arguments,
+ type.sourceStart(),
+ type.sourceEnd());
+}
+public void illegalVisibilityModifierCombinationForMethod(ReferenceBinding type, AbstractMethodDeclaration methodDecl) {
+ String[] arguments = new String[] {new String(type.sourceName()), new String(methodDecl.selector)};
+ this.handle(
+ IProblem.IllegalVisibilityModifierCombinationForMethod,
+ arguments,
+ arguments,
+ methodDecl.sourceStart,
+ methodDecl.sourceEnd);
+}
+public void illegalVisibilityModifierForInterfaceMemberType(SourceTypeBinding type) {
+ String[] arguments = new String[] {new String(type.sourceName())};
+ this.handle(
+ IProblem.IllegalVisibilityModifierForInterfaceMemberType,
+ arguments,
+ arguments,
+ type.sourceStart(),
+ type.sourceEnd());
+}
+public void illegalVoidExpression(ASTNode location) {
+ this.handle(
+ IProblem.InvalidVoidExpression,
+ NoArgument,
+ NoArgument,
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void importProblem(ImportReference importRef, Binding expectedImport) {
+ if (expectedImport.problemId() == NotFound) {
+ char[][] tokens = expectedImport instanceof ProblemReferenceBinding
+ ? ((ProblemReferenceBinding) expectedImport).compoundName
+ : importRef.tokens;
+ String[] arguments = new String[]{CharOperation.toString(tokens)};
+ this.handle(
+ IProblem.ImportNotFound,
+ arguments,
+ arguments,
+ importRef.sourceStart,
+ (int) importRef.sourcePositions[tokens.length - 1]);
+ return;
+ }
+ invalidType(importRef, (TypeBinding)expectedImport);
+}
+public void incompatibleExceptionInThrowsClause(SourceTypeBinding type, MethodBinding currentMethod, MethodBinding inheritedMethod, ReferenceBinding exceptionType) {
+ if (type == currentMethod.declaringClass) {
+ int id;
+ if (currentMethod.declaringClass.isInterface()
+ && !inheritedMethod.isPublic()){ // interface inheriting Object protected method
+ id = IProblem.IncompatibleExceptionInThrowsClauseForNonInheritedInterfaceMethod;
+ } else {
+ id = IProblem.IncompatibleExceptionInThrowsClause;
+ }
+ this.handle(
+ // Exception %1 is not compatible with throws clause in %2
+ // 9.4.4 - The type of exception in the throws clause is incompatible.
+ id,
+ new String[] {
+ new String(exceptionType.sourceName()),
+ new String(
+ CharOperation.concat(
+ inheritedMethod.declaringClass.readableName(),
+ inheritedMethod.readableName(),
+ '.'))},
+ new String[] {
+ new String(exceptionType.sourceName()),
+ new String(
+ CharOperation.concat(
+ inheritedMethod.declaringClass.shortReadableName(),
+ inheritedMethod.shortReadableName(),
+ '.'))},
+ currentMethod.sourceStart(),
+ currentMethod.sourceEnd());
+ } else
+ this.handle(
+ // Exception %1 in throws clause of %2 is not compatible with %3
+ // 9.4.4 - The type of exception in the throws clause is incompatible.
+ IProblem.IncompatibleExceptionInInheritedMethodThrowsClause,
+ new String[] {
+ new String(exceptionType.sourceName()),
+ new String(
+ CharOperation.concat(
+ currentMethod.declaringClass.sourceName(),
+ currentMethod.readableName(),
+ '.')),
+ new String(
+ CharOperation.concat(
+ inheritedMethod.declaringClass.readableName(),
+ inheritedMethod.readableName(),
+ '.'))},
+ new String[] {
+ new String(exceptionType.sourceName()),
+ new String(
+ CharOperation.concat(
+ currentMethod.declaringClass.sourceName(),
+ currentMethod.shortReadableName(),
+ '.')),
+ new String(
+ CharOperation.concat(
+ inheritedMethod.declaringClass.shortReadableName(),
+ inheritedMethod.shortReadableName(),
+ '.'))},
+ type.sourceStart(),
+ type.sourceEnd());
+}
+public void incompatibleReturnType(MethodBinding currentMethod, MethodBinding inheritedMethod) {
+ StringBuffer methodSignature = new StringBuffer();
+ methodSignature
+ .append(inheritedMethod.declaringClass.readableName())
+ .append('.')
+ .append(inheritedMethod.readableName());
+
+ StringBuffer shortSignature = new StringBuffer();
+ shortSignature
+ .append(inheritedMethod.declaringClass.shortReadableName())
+ .append('.')
+ .append(inheritedMethod.shortReadableName());
+
+ int id;
+ if (currentMethod.declaringClass.isInterface()
+ && !inheritedMethod.isPublic()){ // interface inheriting Object protected method
+ id = IProblem.IncompatibleReturnTypeForNonInheritedInterfaceMethod;
+ } else {
+ id = IProblem.IncompatibleReturnType;
+ }
+ this.handle(
+ id,
+ new String[] {methodSignature.toString()},
+ new String[] {shortSignature.toString()},
+ currentMethod.sourceStart(),
+ currentMethod.sourceEnd());
+}
+public void incorrectArityForParameterizedType(ASTNode location, TypeBinding type, TypeBinding[] argumentTypes) {
+ if (location == null) {
+ this.handle(
+ IProblem.IncorrectArityForParameterizedType,
+ new String[] {new String(type.readableName()), parametersAsString(argumentTypes, false)},
+ new String[] {new String(type.shortReadableName()), parametersAsString(argumentTypes, true)},
+ AbortCompilation | Error,
+ 0,
+ 1);
+ }
+ this.handle(
+ IProblem.IncorrectArityForParameterizedType,
+ new String[] {new String(type.readableName()), parametersAsString(argumentTypes, false)},
+ new String[] {new String(type.shortReadableName()), parametersAsString(argumentTypes, true)},
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void incorrectLocationForEmptyDimension(ArrayAllocationExpression expression, int index) {
+ this.handle(
+ IProblem.IllegalDimension,
+ NoArgument,
+ NoArgument,
+ expression.dimensions[index + 1].sourceStart,
+ expression.dimensions[index + 1].sourceEnd);
+}
+public void incorrectSwitchType(Expression expression, TypeBinding testType) {
+ this.handle(
+ IProblem.IncorrectSwitchType,
+ new String[] {new String(testType.readableName())},
+ new String[] {new String(testType.shortReadableName())},
+ expression.sourceStart,
+ expression.sourceEnd);
+}
+public void indirectAccessToStaticField(ASTNode location, FieldBinding field){
+ this.handle(
+ IProblem.IndirectAccessToStaticField,
+ new String[] {new String(field.declaringClass.readableName()), new String(field.name)},
+ new String[] {new String(field.declaringClass.shortReadableName()), new String(field.name)},
+ location.sourceStart,
+ fieldLocation(field, location));
+}
+public void indirectAccessToStaticMethod(ASTNode location, MethodBinding method) {
+ this.handle(
+ IProblem.IndirectAccessToStaticMethod,
+ new String[] {new String(method.declaringClass.readableName()), new String(method.selector), parametersAsString(method.parameters, false)},
+ new String[] {new String(method.declaringClass.shortReadableName()), new String(method.selector), parametersAsString(method.parameters, true)},
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void indirectAccessToStaticType(ASTNode location, ReferenceBinding type) {
+ this.handle(
+ IProblem.IndirectAccessToStaticMethod,
+ new String[] {new String(type.enclosingType().readableName()), new String(type.sourceName) },
+ new String[] {new String(type.enclosingType().shortReadableName()), new String(type.sourceName) },
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void inheritedMethodReducesVisibility(SourceTypeBinding type, MethodBinding concreteMethod, MethodBinding[] abstractMethods) {
+ StringBuffer concreteSignature = new StringBuffer();
+ concreteSignature
+ .append(concreteMethod.declaringClass.readableName())
+ .append('.')
+ .append(concreteMethod.readableName());
+ StringBuffer shortSignature = new StringBuffer();
+ shortSignature
+ .append(concreteMethod.declaringClass.shortReadableName())
+ .append('.')
+ .append(concreteMethod.shortReadableName());
+ this.handle(
+ // The inherited method %1 cannot hide the public abstract method in %2
+ IProblem.InheritedMethodReducesVisibility,
+ new String[] {
+ concreteSignature.toString(),
+ new String(abstractMethods[0].declaringClass.readableName())},
+ new String[] {
+ new String(shortSignature.toString()),
+ new String(abstractMethods[0].declaringClass.shortReadableName())},
+ type.sourceStart(),
+ type.sourceEnd());
+}
+public void inheritedMethodsHaveIncompatibleReturnTypes(SourceTypeBinding type, MethodBinding[] inheritedMethods, int length) {
+ StringBuffer methodSignatures = new StringBuffer();
+ StringBuffer shortSignatures = new StringBuffer();
+ for (int i = length; --i >= 0;) {
+ methodSignatures
+ .append(inheritedMethods[i].declaringClass.readableName())
+ .append('.')
+ .append(inheritedMethods[i].readableName());
+ shortSignatures
+ .append(inheritedMethods[i].declaringClass.shortReadableName())
+ .append('.')
+ .append(inheritedMethods[i].shortReadableName());
+ if (i != 0){
+ methodSignatures.append(", "); //$NON-NLS-1$
+ shortSignatures.append(", "); //$NON-NLS-1$
+ }
+ }
+
+ this.handle(
+ // Return type is incompatible with %1
+ // 9.4.2 - The return type from the method is incompatible with the declaration.
+ IProblem.IncompatibleReturnType,
+ new String[] {methodSignatures.toString()},
+ new String[] {shortSignatures.toString()},
+ type.sourceStart(),
+ type.sourceEnd());
+}
+public void initializerMustCompleteNormally(FieldDeclaration fieldDecl) {
+ this.handle(
+ IProblem.InitializerMustCompleteNormally,
+ NoArgument,
+ NoArgument,
+ fieldDecl.sourceStart,
+ fieldDecl.sourceEnd);
+}
+public void innerTypesCannotDeclareStaticInitializers(ReferenceBinding innerType, ASTNode location) {
+ this.handle(
+ IProblem.CannotDefineStaticInitializerInLocalType,
+ new String[] {new String(innerType.readableName())},
+ new String[] {new String(innerType.shortReadableName())},
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void interfaceCannotHaveConstructors(ConstructorDeclaration constructor) {
+ this.handle(
+ IProblem.InterfaceCannotHaveConstructors,
+ NoArgument,
+ NoArgument,
+ constructor.sourceStart,
+ constructor.sourceEnd,
+ constructor,
+ constructor.compilationResult());
+}
+public void interfaceCannotHaveInitializers(SourceTypeBinding type, FieldDeclaration fieldDecl) {
+ String[] arguments = new String[] {new String(type.sourceName())};
+
+ this.handle(
+ IProblem.InterfaceCannotHaveInitializers,
+ arguments,
+ arguments,
+ fieldDecl.sourceStart,
+ fieldDecl.sourceEnd);
+}
+public void invalidBreak(ASTNode location) {
+ this.handle(
+ IProblem.InvalidBreak,
+ NoArgument,
+ NoArgument,
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void invalidConstructor(Statement statement, MethodBinding targetConstructor) {
+
+ boolean insideDefaultConstructor =
+ (this.referenceContext instanceof ConstructorDeclaration)
+ && ((ConstructorDeclaration)this.referenceContext).isDefaultConstructor();
+ boolean insideImplicitConstructorCall =
+ (statement instanceof ExplicitConstructorCall)
+ && (((ExplicitConstructorCall) statement).accessMode == ExplicitConstructorCall.ImplicitSuper);
+
+ int id = IProblem.UndefinedConstructor; //default...
+ MethodBinding shownConstructor = targetConstructor;
+ switch (targetConstructor.problemId()) {
+ case NotFound :
+ if (insideDefaultConstructor){
+ id = IProblem.UndefinedConstructorInDefaultConstructor;
+ } else if (insideImplicitConstructorCall){
+ id = IProblem.UndefinedConstructorInImplicitConstructorCall;
+ } else {
+ id = IProblem.UndefinedConstructor;
+ }
+ break;
+ case NotVisible :
+ if (insideDefaultConstructor){
+ id = IProblem.NotVisibleConstructorInDefaultConstructor;
+ } else if (insideImplicitConstructorCall){
+ id = IProblem.NotVisibleConstructorInImplicitConstructorCall;
+ } else {
+ id = IProblem.NotVisibleConstructor;
+ }
+ ProblemMethodBinding problemConstructor = (ProblemMethodBinding) targetConstructor;
+ if (problemConstructor.closestMatch != null) {
+ shownConstructor = problemConstructor.closestMatch.original();
+ }
+ break;
+ case Ambiguous :
+ if (insideDefaultConstructor){
+ id = IProblem.AmbiguousConstructorInDefaultConstructor;
+ } else if (insideImplicitConstructorCall){
+ id = IProblem.AmbiguousConstructorInImplicitConstructorCall;
+ } else {
+ id = IProblem.AmbiguousConstructor;
+ }
+ break;
+ case ParameterBoundMismatch :
+ problemConstructor = (ProblemMethodBinding) targetConstructor;
+ ParameterizedGenericMethodBinding substitutedConstructor = (ParameterizedGenericMethodBinding) problemConstructor.closestMatch;
+ shownConstructor = substitutedConstructor.original();
+ TypeBinding typeArgument = targetConstructor.parameters[0];
+ TypeVariableBinding typeParameter = (TypeVariableBinding) targetConstructor.parameters[1];
+ this.handle(
+ IProblem.GenericConstructorTypeArgumentMismatch,
+ new String[] {
+ new String(shownConstructor.declaringClass.sourceName()),
+ parametersAsString(shownConstructor.parameters, false),
+ new String(shownConstructor.declaringClass.readableName()),
+ parametersAsString(substitutedConstructor.parameters, false),
+ new String(typeArgument.readableName()),
+ new String(typeParameter.sourceName),
+ parameterBoundAsString(typeParameter, false) },
+ new String[] {
+ new String(shownConstructor.declaringClass.sourceName()),
+ parametersAsString(shownConstructor.parameters, true),
+ new String(shownConstructor.declaringClass.shortReadableName()),
+ parametersAsString(substitutedConstructor.parameters, true),
+ new String(typeArgument.shortReadableName()),
+ new String(typeParameter.sourceName),
+ parameterBoundAsString(typeParameter, true) },
+ statement.sourceStart,
+ statement.sourceEnd);
+ return;
+
+ case TypeParameterArityMismatch :
+ problemConstructor = (ProblemMethodBinding) targetConstructor;
+ shownConstructor = problemConstructor.closestMatch;
+ if (shownConstructor.typeVariables == TypeConstants.NoTypeVariables) {
+ this.handle(
+ IProblem.NonGenericConstructor,
+ new String[] {
+ new String(shownConstructor.declaringClass.sourceName()),
+ parametersAsString(shownConstructor.parameters, false),
+ new String(shownConstructor.declaringClass.readableName()),
+ parametersAsString(targetConstructor.parameters, false) },
+ new String[] {
+ new String(shownConstructor.declaringClass.sourceName()),
+ parametersAsString(shownConstructor.parameters, true),
+ new String(shownConstructor.declaringClass.shortReadableName()),
+ parametersAsString(targetConstructor.parameters, true) },
+ statement.sourceStart,
+ statement.sourceEnd);
+ } else {
+ this.handle(
+ IProblem.IncorrectArityForParameterizedConstructor ,
+ new String[] {
+ new String(shownConstructor.declaringClass.sourceName()),
+ parametersAsString(shownConstructor.parameters, false),
+ new String(shownConstructor.declaringClass.readableName()),
+ parametersAsString(shownConstructor.typeVariables, false),
+ parametersAsString(targetConstructor.parameters, false) },
+ new String[] {
+ new String(shownConstructor.declaringClass.sourceName()),
+ parametersAsString(shownConstructor.parameters, true),
+ new String(shownConstructor.declaringClass.shortReadableName()),
+ parametersAsString(shownConstructor.typeVariables, true),
+ parametersAsString(targetConstructor.parameters, true) },
+ statement.sourceStart,
+ statement.sourceEnd);
+ }
+ return;
+ case ParameterizedMethodTypeMismatch :
+ problemConstructor = (ProblemMethodBinding) targetConstructor;
+ shownConstructor = problemConstructor.closestMatch;
+ this.handle(
+ IProblem.ParameterizedConstructorArgumentTypeMismatch,
+ new String[] {
+ new String(shownConstructor.declaringClass.sourceName()),
+ parametersAsString(shownConstructor.parameters, false),
+ new String(shownConstructor.declaringClass.readableName()),
+ parametersAsString(((ParameterizedGenericMethodBinding)shownConstructor).typeArguments, false),
+ parametersAsString(targetConstructor.parameters, false) },
+ new String[] {
+ new String(shownConstructor.declaringClass.sourceName()),
+ parametersAsString(shownConstructor.parameters, true),
+ new String(shownConstructor.declaringClass.shortReadableName()),
+ parametersAsString(((ParameterizedGenericMethodBinding)shownConstructor).typeArguments, true),
+ parametersAsString(targetConstructor.parameters, true) },
+ statement.sourceStart,
+ statement.sourceEnd);
+ return;
+ case TypeArgumentsForRawGenericMethod :
+ problemConstructor = (ProblemMethodBinding) targetConstructor;
+ shownConstructor = problemConstructor.closestMatch;
+ this.handle(
+ IProblem.TypeArgumentsForRawGenericConstructor,
+ new String[] {
+ new String(shownConstructor.declaringClass.sourceName()),
+ parametersAsString(shownConstructor.parameters, false),
+ new String(shownConstructor.declaringClass.readableName()),
+ parametersAsString(targetConstructor.parameters, false) },
+ new String[] {
+ new String(shownConstructor.declaringClass.sourceName()),
+ parametersAsString(shownConstructor.parameters, true),
+ new String(shownConstructor.declaringClass.shortReadableName()),
+ parametersAsString(targetConstructor.parameters, true) },
+ statement.sourceStart,
+ statement.sourceEnd);
+ return;
+ case NoError : // 0
+ default :
+ needImplementation(); // want to fail to see why we were here...
+ break;
+ }
+
+ this.handle(
+ id,
+ new String[] {new String(targetConstructor.declaringClass.readableName()), parametersAsString(shownConstructor.parameters, false)},
+ new String[] {new String(targetConstructor.declaringClass.shortReadableName()), parametersAsString(shownConstructor.parameters, true)},
+ statement.sourceStart,
+ statement.sourceEnd);
+}
+public void invalidContinue(ASTNode location) {
+ this.handle(
+ IProblem.InvalidContinue,
+ NoArgument,
+ NoArgument,
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void invalidEnclosingType(Expression expression, TypeBinding type, ReferenceBinding enclosingType) {
+
+ if (enclosingType.isAnonymousType()) enclosingType = enclosingType.superclass();
+ int flag = IProblem.UndefinedType; // default
+ switch (type.problemId()) {
+ case NotFound : // 1
+ flag = IProblem.UndefinedType;
+ break;
+ case NotVisible : // 2
+ flag = IProblem.NotVisibleType;
+ break;
+ case Ambiguous : // 3
+ flag = IProblem.AmbiguousType;
+ break;
+ case InternalNameProvided :
+ flag = IProblem.InternalTypeNameProvided;
+ break;
+ case NoError : // 0
+ default :
+ needImplementation(); // want to fail to see why we were here...
+ break;
+ }
+
+ this.handle(
+ flag,
+ new String[] {new String(enclosingType.readableName()) + "." + new String(type.readableName())}, //$NON-NLS-1$
+ new String[] {new String(enclosingType.shortReadableName()) + "." + new String(type.shortReadableName())}, //$NON-NLS-1$
+ expression.sourceStart,
+ expression.sourceEnd);
+}
+
+public void invalidExplicitConstructorCall(ASTNode location) {
+
+ this.handle(
+ IProblem.InvalidExplicitConstructorCall,
+ NoArgument,
+ NoArgument,
+ location.sourceStart,
+ location.sourceEnd);
+}
+
+public void invalidExpressionAsStatement(Expression expression){
+ this.handle(
+ IProblem.InvalidExpressionAsStatement,
+ NoArgument,
+ NoArgument,
+ expression.sourceStart,
+ expression.sourceEnd);
+}
+public void invalidField(FieldReference fieldRef, TypeBinding searchedType) {
+ int id = IProblem.UndefinedField;
+ FieldBinding field = fieldRef.binding;
+ switch (field.problemId()) {
+ case NotFound :
+ id = IProblem.UndefinedField;
+/* also need to check that the searchedType is the receiver type
+ if (searchedType.isHierarchyInconsistent())
+ severity = SecondaryError;
+*/
+ break;
+ case NotVisible :
+ id = IProblem.NotVisibleField;
+ break;
+ case Ambiguous :
+ id = IProblem.AmbiguousField;
+ break;
+ case NonStaticReferenceInStaticContext :
+ id = IProblem.NonStaticFieldFromStaticInvocation;
+ break;
+ case NonStaticReferenceInConstructorInvocation :
+ id = IProblem.InstanceFieldDuringConstructorInvocation;
+ break;
+ case InheritedNameHidesEnclosingName :
+ id = IProblem.InheritedFieldHidesEnclosingName;
+ break;
+ case ReceiverTypeNotVisible :
+ this.handle(
+ IProblem.NotVisibleType, // cannot occur in javadoc comments
+ new String[] {new String(searchedType.leafComponentType().readableName())},
+ new String[] {new String(searchedType.leafComponentType().shortReadableName())},
+ fieldRef.receiver.sourceStart,
+ fieldRef.receiver.sourceEnd);
+ return;
+
+ case NoError : // 0
+ default :
+ needImplementation(); // want to fail to see why we were here...
+ break;
+ }
+
+ String[] arguments = new String[] {new String(field.readableName())};
+ this.handle(
+ id,
+ arguments,
+ arguments,
+ fieldRef.sourceStart,
+ fieldRef.sourceEnd);
+}
+public void invalidField(NameReference nameRef, FieldBinding field) {
+ int id = IProblem.UndefinedField;
+ switch (field.problemId()) {
+ case NotFound :
+ id = IProblem.UndefinedField;
+ break;
+ case NotVisible :
+ id = IProblem.NotVisibleField;
+ break;
+ case Ambiguous :
+ id = IProblem.AmbiguousField;
+ break;
+ case NonStaticReferenceInStaticContext :
+ id = IProblem.NonStaticFieldFromStaticInvocation;
+ break;
+ case NonStaticReferenceInConstructorInvocation :
+ id = IProblem.InstanceFieldDuringConstructorInvocation;
+ break;
+ case InheritedNameHidesEnclosingName :
+ id = IProblem.InheritedFieldHidesEnclosingName;
+ break;
+ case ReceiverTypeNotVisible :
+ this.handle(
+ IProblem.NotVisibleType,
+ new String[] {new String(field.declaringClass.leafComponentType().readableName())},
+ new String[] {new String(field.declaringClass.leafComponentType().shortReadableName())},
+ nameRef.sourceStart,
+ nameRef.sourceEnd);
+ return;
+ case NoError : // 0
+ default :
+ needImplementation(); // want to fail to see why we were here...
+ break;
+ }
+ String[] arguments = new String[] {new String(field.readableName())};
+ this.handle(
+ id,
+ arguments,
+ arguments,
+ nameRef.sourceStart,
+ nameRef.sourceEnd);
+}
+public void invalidField(QualifiedNameReference nameRef, FieldBinding field, int index, TypeBinding searchedType) {
+ //the resolution of the index-th field of qname failed
+ //qname.otherBindings[index] is the binding that has produced the error
+
+ //The different targetted errors should be :
+ //UndefinedField
+ //NotVisibleField
+ //AmbiguousField
+
+ if (searchedType.isBaseType()) {
+ this.handle(
+ IProblem.NoFieldOnBaseType,
+ new String[] {
+ new String(searchedType.readableName()),
+ CharOperation.toString(CharOperation.subarray(nameRef.tokens, 0, index)),
+ new String(nameRef.tokens[index])},
+ new String[] {
+ new String(searchedType.sourceName()),
+ CharOperation.toString(CharOperation.subarray(nameRef.tokens, 0, index)),
+ new String(nameRef.tokens[index])},
+ nameRef.sourceStart,
+ (int) nameRef.sourcePositions[index]);
+ return;
+ }
+
+ int id = IProblem.UndefinedField;
+ switch (field.problemId()) {
+ case NotFound :
+ id = IProblem.UndefinedField;
+/* also need to check that the searchedType is the receiver type
+ if (searchedType.isHierarchyInconsistent())
+ severity = SecondaryError;
+*/
+ break;
+ case NotVisible :
+ id = IProblem.NotVisibleField;
+ break;
+ case Ambiguous :
+ id = IProblem.AmbiguousField;
+ break;
+ case NonStaticReferenceInStaticContext :
+ id = IProblem.NonStaticFieldFromStaticInvocation;
+ break;
+ case NonStaticReferenceInConstructorInvocation :
+ id = IProblem.InstanceFieldDuringConstructorInvocation;
+ break;
+ case InheritedNameHidesEnclosingName :
+ id = IProblem.InheritedFieldHidesEnclosingName;
+ break;
+ case ReceiverTypeNotVisible :
+ this.handle(
+ IProblem.NotVisibleType,
+ new String[] {new String(searchedType.leafComponentType().readableName())},
+ new String[] {new String(searchedType.leafComponentType().shortReadableName())},
+ nameRef.sourceStart,
+ nameRef.sourceEnd);
+ return;
+ case NoError : // 0
+ default :
+ needImplementation(); // want to fail to see why we were here...
+ break;
+ }
+ String[] arguments = new String[] {CharOperation.toString(CharOperation.subarray(nameRef.tokens, 0, index + 1))};
+ this.handle(
+ id,
+ arguments,
+ arguments,
+ nameRef.sourceStart,
+ (int) nameRef.sourcePositions[index]);
+}
+public void invalidFileNameForPackageAnnotations(Annotation annotation) {
+ this.handle(
+ IProblem.InvalidFileNameForPackageAnnotations,
+ NoArgument,
+ NoArgument,
+ annotation.sourceStart,
+ annotation.sourceEnd);
+}
+public void invalidMethod(MessageSend messageSend, MethodBinding method) {
+ int id = IProblem.UndefinedMethod; //default...
+ MethodBinding shownMethod = method;
+ switch (method.problemId()) {
+ case NotFound :
+ id = IProblem.UndefinedMethod;
+ ProblemMethodBinding problemMethod = (ProblemMethodBinding) method;
+ if (problemMethod.closestMatch != null) {
+ shownMethod = problemMethod.closestMatch;
+ String closestParameterTypeNames = parametersAsString(shownMethod.parameters, false);
+ String parameterTypeNames = parametersAsString(method.parameters, false);
+ String closestParameterTypeShortNames = parametersAsString(shownMethod.parameters, true);
+ String parameterTypeShortNames = parametersAsString(method.parameters, true);
+ if (closestParameterTypeShortNames.equals(parameterTypeShortNames)){
+ closestParameterTypeShortNames = closestParameterTypeNames;
+ parameterTypeShortNames = parameterTypeNames;
+ }
+ this.handle(
+ IProblem.ParameterMismatch,
+ new String[] {
+ new String(shownMethod.declaringClass.readableName()),
+ new String(shownMethod.selector),
+ closestParameterTypeNames,
+ parameterTypeNames
+ },
+ new String[] {
+ new String(shownMethod.declaringClass.shortReadableName()),
+ new String(shownMethod.selector),
+ closestParameterTypeShortNames,
+ parameterTypeShortNames
+ },
+ (int) (messageSend.nameSourcePosition >>> 32),
+ (int) messageSend.nameSourcePosition);
+ return;
+ }
+ break;
+ case NotVisible :
+ id = IProblem.NotVisibleMethod;
+ problemMethod = (ProblemMethodBinding) method;
+ if (problemMethod.closestMatch != null) {
+ shownMethod = problemMethod.closestMatch.original();
+ }
+ break;
+ case Ambiguous :
+ id = IProblem.AmbiguousMethod;
+ break;
+ case InheritedNameHidesEnclosingName :
+ id = IProblem.InheritedMethodHidesEnclosingName;
+ break;
+ case NonStaticReferenceInConstructorInvocation :
+ id = IProblem.InstanceMethodDuringConstructorInvocation;
+ break;
+ case NonStaticReferenceInStaticContext :
+ id = IProblem.StaticMethodRequested;
+ break;
+ case ReceiverTypeNotVisible :
+ this.handle(
+ IProblem.NotVisibleType, // cannot occur in javadoc comments
+ new String[] {new String(method.declaringClass.leafComponentType().readableName())},
+ new String[] {new String(method.declaringClass.leafComponentType().shortReadableName())},
+ messageSend.receiver.sourceStart,
+ messageSend.receiver.sourceEnd);
+ return;
+ case ParameterBoundMismatch :
+ problemMethod = (ProblemMethodBinding) method;
+ ParameterizedGenericMethodBinding substitutedMethod = (ParameterizedGenericMethodBinding) problemMethod.closestMatch;
+ shownMethod = substitutedMethod.original();
+ TypeBinding typeArgument = method.parameters[0];
+ TypeVariableBinding typeParameter = (TypeVariableBinding) method.parameters[1];
+ this.handle(
+ IProblem.GenericMethodTypeArgumentMismatch,
+ new String[] {
+ new String(shownMethod.selector),
+ parametersAsString(shownMethod.parameters, false),
+ new String(shownMethod.declaringClass.readableName()),
+ parametersAsString(substitutedMethod.parameters, false),
+ new String(typeArgument.readableName()),
+ new String(typeParameter.sourceName),
+ parameterBoundAsString(typeParameter, false) },
+ new String[] {
+ new String(shownMethod.selector),
+ parametersAsString(shownMethod.parameters, true),
+ new String(shownMethod.declaringClass.shortReadableName()),
+ parametersAsString(substitutedMethod.parameters, true),
+ new String(typeArgument.shortReadableName()),
+ new String(typeParameter.sourceName),
+ parameterBoundAsString(typeParameter, true) },
+ (int) (messageSend.nameSourcePosition >>> 32),
+ (int) messageSend.nameSourcePosition);
+ return;
+ case TypeParameterArityMismatch :
+ problemMethod = (ProblemMethodBinding) method;
+ shownMethod = problemMethod.closestMatch;
+ if (shownMethod.typeVariables == TypeConstants.NoTypeVariables) {
+ this.handle(
+ IProblem.NonGenericMethod ,
+ new String[] {
+ new String(shownMethod.selector),
+ parametersAsString(shownMethod.parameters, false),
+ new String(shownMethod.declaringClass.readableName()),
+ parametersAsString(method.parameters, false) },
+ new String[] {
+ new String(shownMethod.selector),
+ parametersAsString(shownMethod.parameters, true),
+ new String(shownMethod.declaringClass.shortReadableName()),
+ parametersAsString(method.parameters, true) },
+ (int) (messageSend.nameSourcePosition >>> 32),
+ (int) messageSend.nameSourcePosition);
+ } else {
+ this.handle(
+ IProblem.IncorrectArityForParameterizedMethod ,
+ new String[] {
+ new String(shownMethod.selector),
+ parametersAsString(shownMethod.parameters, false),
+ new String(shownMethod.declaringClass.readableName()),
+ parametersAsString(shownMethod.typeVariables, false),
+ parametersAsString(method.parameters, false) },
+ new String[] {
+ new String(shownMethod.selector),
+ parametersAsString(shownMethod.parameters, true),
+ new String(shownMethod.declaringClass.shortReadableName()),
+ parametersAsString(shownMethod.typeVariables, true),
+ parametersAsString(method.parameters, true) },
+ (int) (messageSend.nameSourcePosition >>> 32),
+ (int) messageSend.nameSourcePosition);
+ }
+ return;
+ case ParameterizedMethodTypeMismatch :
+ problemMethod = (ProblemMethodBinding) method;
+ shownMethod = problemMethod.closestMatch;
+ this.handle(
+ IProblem.ParameterizedMethodArgumentTypeMismatch,
+ new String[] {
+ new String(shownMethod.selector),
+ parametersAsString(shownMethod.parameters, false),
+ new String(shownMethod.declaringClass.readableName()),
+ parametersAsString(((ParameterizedGenericMethodBinding)shownMethod).typeArguments, false),
+ parametersAsString(method.parameters, false) },
+ new String[] {
+ new String(shownMethod.selector),
+ parametersAsString(shownMethod.parameters, true),
+ new String(shownMethod.declaringClass.shortReadableName()),
+ parametersAsString(((ParameterizedGenericMethodBinding)shownMethod).typeArguments, true),
+ parametersAsString(method.parameters, true) },
+ (int) (messageSend.nameSourcePosition >>> 32),
+ (int) messageSend.nameSourcePosition);
+ return;
+ case TypeArgumentsForRawGenericMethod :
+ problemMethod = (ProblemMethodBinding) method;
+ shownMethod = problemMethod.closestMatch;
+ this.handle(
+ IProblem.TypeArgumentsForRawGenericMethod ,
+ new String[] {
+ new String(shownMethod.selector),
+ parametersAsString(shownMethod.parameters, false),
+ new String(shownMethod.declaringClass.readableName()),
+ parametersAsString(method.parameters, false) },
+ new String[] {
+ new String(shownMethod.selector),
+ parametersAsString(shownMethod.parameters, true),
+ new String(shownMethod.declaringClass.shortReadableName()),
+ parametersAsString(method.parameters, true) },
+ (int) (messageSend.nameSourcePosition >>> 32),
+ (int) messageSend.nameSourcePosition);
+ return;
+ case NoError : // 0
+ default :
+ needImplementation(); // want to fail to see why we were here...
+ break;
+ }
+
+ this.handle(
+ id,
+ new String[] {
+ new String(method.declaringClass.readableName()),
+ new String(shownMethod.selector), parametersAsString(shownMethod.parameters, false)},
+ new String[] {
+ new String(method.declaringClass.shortReadableName()),
+ new String(shownMethod.selector), parametersAsString(shownMethod.parameters, true)},
+ (int) (messageSend.nameSourcePosition >>> 32),
+ (int) messageSend.nameSourcePosition);
+}
+public void invalidNullToSynchronize(Expression expression) {
+ this.handle(
+ IProblem.InvalidNullToSynchronized,
+ NoArgument,
+ NoArgument,
+ expression.sourceStart,
+ expression.sourceEnd);
+}
+public void invalidOperator(BinaryExpression expression, TypeBinding leftType, TypeBinding rightType) {
+ String leftName = new String(leftType.readableName());
+ String rightName = new String(rightType.readableName());
+ String leftShortName = new String(leftType.shortReadableName());
+ String rightShortName = new String(rightType.shortReadableName());
+ if (leftShortName.equals(rightShortName)){
+ leftShortName = leftName;
+ rightShortName = rightName;
+ }
+ this.handle(
+ IProblem.InvalidOperator,
+ new String[] {
+ expression.operatorToString(),
+ leftName + ", " + rightName}, //$NON-NLS-1$
+ new String[] {
+ expression.operatorToString(),
+ leftShortName + ", " + rightShortName}, //$NON-NLS-1$
+ expression.sourceStart,
+ expression.sourceEnd);
+}
+public void invalidOperator(CompoundAssignment assign, TypeBinding leftType, TypeBinding rightType) {
+ String leftName = new String(leftType.readableName());
+ String rightName = new String(rightType.readableName());
+ String leftShortName = new String(leftType.shortReadableName());
+ String rightShortName = new String(rightType.shortReadableName());
+ if (leftShortName.equals(rightShortName)){
+ leftShortName = leftName;
+ rightShortName = rightName;
+ }
+ this.handle(
+ IProblem.InvalidOperator,
+ new String[] {
+ assign.operatorToString(),
+ leftName + ", " + rightName}, //$NON-NLS-1$
+ new String[] {
+ assign.operatorToString(),
+ leftShortName + ", " + rightShortName}, //$NON-NLS-1$
+ assign.sourceStart,
+ assign.sourceEnd);
+}
+public void invalidOperator(UnaryExpression expression, TypeBinding type) {
+ this.handle(
+ IProblem.InvalidOperator,
+ new String[] {expression.operatorToString(), new String(type.readableName())},
+ new String[] {expression.operatorToString(), new String(type.shortReadableName())},
+ expression.sourceStart,
+ expression.sourceEnd);
+}
+public void invalidParameterizedExceptionType(TypeBinding exceptionType, ASTNode location) {
+ this.handle(
+ IProblem.InvalidParameterizedExceptionType,
+ new String[] {new String(exceptionType.readableName())},
+ new String[] {new String(exceptionType.shortReadableName())},
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void invalidParenthesizedExpression(ASTNode reference) {
+ this.handle(
+ IProblem.InvalidParenthesizedExpression,
+ NoArgument,
+ NoArgument,
+ reference.sourceStart,
+ reference.sourceEnd);
+}
+public void invalidType(ASTNode location, TypeBinding type) {
+ int id = IProblem.UndefinedType; // default
+ switch (type.problemId()) {
+ case NotFound :
+ id = IProblem.UndefinedType;
+ break;
+ case NotVisible :
+ id = IProblem.NotVisibleType;
+ break;
+ case Ambiguous :
+ id = IProblem.AmbiguousType;
+ break;
+ case InternalNameProvided :
+ id = IProblem.InternalTypeNameProvided;
+ break;
+ case InheritedNameHidesEnclosingName :
+ id = IProblem.InheritedTypeHidesEnclosingName;
+ break;
+ case NonStaticReferenceInStaticContext :
+ id = IProblem.TypeVariableReferenceFromStaticContext;
+ break;
+ case IllegalSuperTypeVariable :
+ id = IProblem.IllegalTypeVariableSuperReference;
+ break;
+ case NoError : // 0
+ default :
+ needImplementation(); // want to fail to see why we were here...
+ break;
+ }
+
+ int end = location.sourceEnd;
+ if (location instanceof QualifiedNameReference) {
+ QualifiedNameReference ref = (QualifiedNameReference) location;
+ if (ref.indexOfFirstFieldBinding >= 1)
+ end = (int) ref.sourcePositions[ref.indexOfFirstFieldBinding - 1];
+ } else if (location instanceof QualifiedTypeReference) {
+ QualifiedTypeReference ref = (QualifiedTypeReference) location;
+ if (type instanceof ReferenceBinding) {
+ char[][] name = ((ReferenceBinding) type).compoundName;
+ end = (int) ref.sourcePositions[name.length - 1];
+ }
+ } else if (location instanceof ImportReference) {
+ ImportReference ref = (ImportReference) location;
+ if (type instanceof ReferenceBinding) {
+ char[][] name = ((ReferenceBinding) type).compoundName;
+ end = (int) ref.sourcePositions[name.length - 1];
+ }
+ }
+ this.handle(
+ id,
+ new String[] {new String(type.readableName()) },
+ new String[] {new String(type.shortReadableName())},
+ location.sourceStart,
+ end);
+}
+public void invalidTypeForCollection(Expression expression) {
+ this.handle(
+ IProblem.InvalidTypeForCollection,
+ NoArgument,
+ NoArgument,
+ expression.sourceStart,
+ expression.sourceEnd);
+}
+public void invalidTypeReference(Expression expression) {
+ this.handle(
+ IProblem.InvalidTypeExpression,
+ NoArgument,
+ NoArgument,
+ expression.sourceStart,
+ expression.sourceEnd);
+}
+public void invalidTypeToSynchronize(Expression expression, TypeBinding type) {
+ this.handle(
+ IProblem.InvalidTypeToSynchronized,
+ new String[] {new String(type.readableName())},
+ new String[] {new String(type.shortReadableName())},
+ expression.sourceStart,
+ expression.sourceEnd);
+}
+public void invalidTypeVariableAsException(TypeBinding exceptionType, ASTNode location) {
+ this.handle(
+ IProblem.InvalidTypeVariableExceptionType,
+ new String[] {new String(exceptionType.readableName())},
+ new String[] {new String(exceptionType.shortReadableName())},
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void invalidUnaryExpression(Expression expression) {
+ this.handle(
+ IProblem.InvalidUnaryExpression,
+ NoArgument,
+ NoArgument,
+ expression.sourceStart,
+ expression.sourceEnd);
+}
+public void invalidUsageOfAnnotation(Annotation annotation) {
+ this.handle(
+ IProblem.InvalidUsageOfAnnotations,
+ NoArgument,
+ NoArgument,
+ annotation.sourceStart,
+ annotation.sourceEnd);
+}
+public void invalidUsageOfAnnotationDeclarations(AnnotationTypeDeclaration annotationTypeDeclaration) {
+ this.handle(
+ IProblem.InvalidUsageOfAnnotationDeclarations,
+ NoArgument,
+ NoArgument,
+ annotationTypeDeclaration.sourceStart,
+ annotationTypeDeclaration.sourceEnd);
+}
+public void invalidUsageOfEnumDeclarations(EnumDeclaration enumDeclaration) {
+ this.handle(
+ IProblem.InvalidUsageOfEnumDeclarations,
+ NoArgument,
+ NoArgument,
+ enumDeclaration.sourceStart,
+ enumDeclaration.sourceEnd);
+}
+public void invalidUsageOfForeachStatements(LocalDeclaration elementVariable, Expression collection) {
+ this.handle(
+ IProblem.InvalidUsageOfForeachStatements,
+ NoArgument,
+ NoArgument,
+ elementVariable.declarationSourceStart,
+ collection.sourceEnd);
+}
+public void invalidUsageOfStaticImports(ImportReference staticImport) {
+ this.handle(
+ IProblem.InvalidUsageOfStaticImports,
+ NoArgument,
+ NoArgument,
+ staticImport.declarationSourceStart,
+ staticImport.declarationSourceEnd);
+}
+public void invalidUsageOfTypeArguments(TypeReference firstTypeReference, TypeReference lastTypeReference) {
+ this.handle(
+ IProblem.InvalidUsageOfTypeArguments,
+ NoArgument,
+ NoArgument,
+ firstTypeReference.sourceStart,
+ lastTypeReference.sourceEnd);
+}
+public void invalidUsageOfTypeParameters(TypeParameter firstTypeParameter, TypeParameter lastTypeParameter) {
+ this.handle(
+ IProblem.InvalidUsageOfTypeParameters,
+ NoArgument,
+ NoArgument,
+ firstTypeParameter.declarationSourceStart,
+ lastTypeParameter.declarationSourceEnd);
+}
+public void invalidUsageOfVarargs(Argument argument) {
+ this.handle(
+ IProblem.InvalidUsageOfVarargs,
+ NoArgument,
+ NoArgument,
+ argument.type.sourceStart,
+ argument.sourceEnd);
+}
+public void isClassPathCorrect(char[][] wellKnownTypeName, CompilationUnitDeclaration compUnitDecl) {
+ this.referenceContext = compUnitDecl;
+ String[] arguments = new String[] {CharOperation.toString(wellKnownTypeName)};
+ this.handle(
+ IProblem.IsClassPathCorrect,
+ arguments,
+ arguments,
+ AbortCompilation | Error,
+ 0,
+ 0);
+}
+
+private boolean isIdentifier(int token) {
+ return token == TerminalTokens.TokenNameIdentifier;
+}
+
+private boolean isKeyword(int token) {
+ switch(token) {
+ case TerminalTokens.TokenNameabstract:
+ case TerminalTokens.TokenNameassert:
+ case TerminalTokens.TokenNamebyte:
+ case TerminalTokens.TokenNamebreak:
+ case TerminalTokens.TokenNameboolean:
+ case TerminalTokens.TokenNamecase:
+ case TerminalTokens.TokenNamechar:
+ case TerminalTokens.TokenNamecatch:
+ case TerminalTokens.TokenNameclass:
+ case TerminalTokens.TokenNamecontinue:
+ case TerminalTokens.TokenNamedo:
+ case TerminalTokens.TokenNamedouble:
+ case TerminalTokens.TokenNamedefault:
+ case TerminalTokens.TokenNameelse:
+ case TerminalTokens.TokenNameextends:
+ case TerminalTokens.TokenNamefor:
+ case TerminalTokens.TokenNamefinal:
+ case TerminalTokens.TokenNamefloat:
+ case TerminalTokens.TokenNamefalse:
+ case TerminalTokens.TokenNamefinally:
+ case TerminalTokens.TokenNameif:
+ case TerminalTokens.TokenNameint:
+ case TerminalTokens.TokenNameimport:
+ case TerminalTokens.TokenNameinterface:
+ case TerminalTokens.TokenNameimplements:
+ case TerminalTokens.TokenNameinstanceof:
+ case TerminalTokens.TokenNamelong:
+ case TerminalTokens.TokenNamenew:
+ case TerminalTokens.TokenNamenull:
+ case TerminalTokens.TokenNamenative:
+ case TerminalTokens.TokenNamepublic:
+ case TerminalTokens.TokenNamepackage:
+ case TerminalTokens.TokenNameprivate:
+ case TerminalTokens.TokenNameprotected:
+ case TerminalTokens.TokenNamereturn:
+ case TerminalTokens.TokenNameshort:
+ case TerminalTokens.TokenNamesuper:
+ case TerminalTokens.TokenNamestatic:
+ case TerminalTokens.TokenNameswitch:
+ case TerminalTokens.TokenNamestrictfp:
+ case TerminalTokens.TokenNamesynchronized:
+ case TerminalTokens.TokenNametry:
+ case TerminalTokens.TokenNamethis:
+ case TerminalTokens.TokenNametrue:
+ case TerminalTokens.TokenNamethrow:
+ case TerminalTokens.TokenNamethrows:
+ case TerminalTokens.TokenNametransient:
+ case TerminalTokens.TokenNamevoid:
+ case TerminalTokens.TokenNamevolatile:
+ case TerminalTokens.TokenNamewhile:
+ return true;
+ default:
+ return false;
+ }
+}
+
+private boolean isLiteral(int token) {
+ switch(token) {
+ case TerminalTokens.TokenNameIntegerLiteral:
+ case TerminalTokens.TokenNameLongLiteral:
+ case TerminalTokens.TokenNameFloatingPointLiteral:
+ case TerminalTokens.TokenNameDoubleLiteral:
+ case TerminalTokens.TokenNameStringLiteral:
+ case TerminalTokens.TokenNameCharacterLiteral:
+ return true;
+ default:
+ return false;
+ }
+}
+public void javadocAmbiguousMethodReference(int sourceStart, int sourceEnd, Binding fieldBinding, int modifiers) {
+ int id = IProblem.JavadocAmbiguousMethodReference;
+ if (javadocVisibility(this.options.reportInvalidJavadocTagsVisibility, modifiers)) {
+ String[] arguments = new String[] {new String(fieldBinding.readableName())};
+ handle(id, arguments, arguments, sourceStart, sourceEnd);
+ }
+}
+public void javadocDeprecatedField(FieldBinding field, ASTNode location, int modifiers) {
+ if (javadocVisibility(this.options.reportInvalidJavadocTagsVisibility, modifiers)) {
+ this.handle(
+ IProblem.JavadocUsingDeprecatedField,
+ new String[] {new String(field.declaringClass.readableName()), new String(field.name)},
+ new String[] {new String(field.declaringClass.shortReadableName()), new String(field.name)},
+ location.sourceStart,
+ location.sourceEnd);
+ }
+}
+public void javadocDeprecatedMethod(MethodBinding method, ASTNode location, int modifiers) {
+ if (javadocVisibility(this.options.reportInvalidJavadocTagsVisibility, modifiers)) {
+ if (method.isConstructor()) {
+ this.handle(
+ IProblem.JavadocUsingDeprecatedConstructor,
+ new String[] {new String(method.declaringClass.readableName()), parametersAsString(method.parameters, false)},
+ new String[] {new String(method.declaringClass.shortReadableName()), parametersAsString(method.parameters, true)},
+ location.sourceStart,
+ location.sourceEnd);
+ } else {
+ this.handle(
+ IProblem.JavadocUsingDeprecatedMethod,
+ new String[] {new String(method.declaringClass.readableName()), new String(method.selector), parametersAsString(method.parameters, false)},
+ new String[] {new String(method.declaringClass.shortReadableName()), new String(method.selector), parametersAsString(method.parameters, true)},
+ location.sourceStart,
+ location.sourceEnd);
+ }
+ }
+}
+public void javadocDeprecatedType(TypeBinding type, ASTNode location, int modifiers) {
+ if (location == null) return; // 1G828DN - no type ref for synthetic arguments
+ if (javadocVisibility(this.options.reportInvalidJavadocTagsVisibility, modifiers)) {
+ this.handle(
+ IProblem.JavadocUsingDeprecatedType,
+ new String[] {new String(type.readableName())},
+ new String[] {new String(type.shortReadableName())},
+ location.sourceStart,
+ location.sourceEnd);
+ }
+}
+public void javadocDuplicatedParamTag(JavadocSingleNameReference param, int modifiers) {
+ if (javadocVisibility(this.options.reportInvalidJavadocTagsVisibility, modifiers)) {
+ String[] arguments = new String[] {String.valueOf(param.token)};
+ this.handle(IProblem.JavadocDuplicateParamName, arguments, arguments, param.sourceStart, param.sourceEnd);
+ }
+}
+public void javadocDuplicatedReturnTag(int sourceStart, int sourceEnd){
+ this.handle(IProblem.JavadocDuplicateReturnTag, NoArgument, NoArgument, sourceStart, sourceEnd);
+}
+public void javadocDuplicatedThrowsClassName(TypeReference typeReference, int modifiers) {
+ if (javadocVisibility(this.options.reportInvalidJavadocTagsVisibility, modifiers)) {
+ String[] arguments = new String[] {String.valueOf(typeReference.resolvedType.sourceName())};
+ this.handle(IProblem.JavadocDuplicateThrowsClassName, arguments, arguments, typeReference.sourceStart, typeReference.sourceEnd);
+ }
+}
+public void javadocEmptyReturnTag(int sourceStart, int sourceEnd) {
+ this.handle(IProblem.JavadocEmptyReturnTag, NoArgument, NoArgument, sourceStart, sourceEnd);
+}
+public void javadocErrorNoMethodFor(MessageSend messageSend, TypeBinding recType, TypeBinding[] params, int modifiers) {
+ StringBuffer buffer = new StringBuffer();
+ StringBuffer shortBuffer = new StringBuffer();
+ for (int i = 0, length = params.length; i < length; i++) {
+ if (i != 0){
+ buffer.append(", "); //$NON-NLS-1$
+ shortBuffer.append(", "); //$NON-NLS-1$
+ }
+ buffer.append(new String(params[i].readableName()));
+ shortBuffer.append(new String(params[i].shortReadableName()));
+ }
+
+ int id = recType.isArrayType() ? IProblem.JavadocNoMessageSendOnArrayType : IProblem.JavadocNoMessageSendOnBaseType;
+ if (javadocVisibility(this.options.reportInvalidJavadocTagsVisibility, modifiers)) {
+ this.handle(
+ id,
+ new String[] {new String(recType.readableName()), new String(messageSend.selector), buffer.toString()},
+ new String[] {new String(recType.shortReadableName()), new String(messageSend.selector), shortBuffer.toString()},
+ messageSend.sourceStart,
+ messageSend.sourceEnd);
+ }
+}
+public void javadocInvalidConstructor(Statement statement, MethodBinding targetConstructor, int modifiers) {
+
+ if (!javadocVisibility(this.options.reportInvalidJavadocTagsVisibility, modifiers)) {
+ return;
+ }
+// boolean insideDefaultConstructor =
+// (this.referenceContext instanceof ConstructorDeclaration)
+// && ((ConstructorDeclaration)this.referenceContext).isDefaultConstructor();
+// boolean insideImplicitConstructorCall =
+// (statement instanceof ExplicitConstructorCall)
+// && (((ExplicitConstructorCall) statement).accessMode == ExplicitConstructorCall.ImplicitSuper);
+
+ int id = IProblem.JavadocUndefinedConstructor; //default...
+ switch (targetConstructor.problemId()) {
+ case NotFound :
+// if (insideDefaultConstructor){
+// id = IProblem.JavadocUndefinedConstructorInDefaultConstructor;
+// } else if (insideImplicitConstructorCall){
+// id = IProblem.JavadocUndefinedConstructorInImplicitConstructorCall;
+// } else {
+ id = IProblem.JavadocUndefinedConstructor;
+// }
+ break;
+ case NotVisible :
+// if (insideDefaultConstructor){
+// id = IProblem.JavadocNotVisibleConstructorInDefaultConstructor;
+// } else if (insideImplicitConstructorCall){
+// id = IProblem.JavadocNotVisibleConstructorInImplicitConstructorCall;
+// } else {
+ id = IProblem.JavadocNotVisibleConstructor;
+// }
+ break;
+ case Ambiguous :
+// if (insideDefaultConstructor){
+// id = IProblem.AmbiguousConstructorInDefaultConstructor;
+// } else if (insideImplicitConstructorCall){
+// id = IProblem.AmbiguousConstructorInImplicitConstructorCall;
+// } else {
+ id = IProblem.JavadocAmbiguousConstructor;
+// }
+ break;
+ case NoError : // 0
+ default :
+ needImplementation(); // want to fail to see why we were here...
+ break;
+ }
+
+ this.handle(
+ id,
+ new String[] {new String(targetConstructor.declaringClass.readableName()), parametersAsString(targetConstructor.parameters, false)},
+ new String[] {new String(targetConstructor.declaringClass.shortReadableName()), parametersAsString(targetConstructor.parameters, true)},
+ statement.sourceStart,
+ statement.sourceEnd);
+}
+/*
+ * Similar implementation than invalidField(FieldReference...)
+ * Note that following problem id cannot occur for Javadoc:
+ * - NonStaticReferenceInStaticContext :
+ * - NonStaticReferenceInConstructorInvocation :
+ * - ReceiverTypeNotVisible :
+ */
+public void javadocInvalidField(int sourceStart, int sourceEnd, Binding fieldBinding, TypeBinding searchedType, int modifiers) {
+ int id = IProblem.JavadocUndefinedField;
+ switch (fieldBinding.problemId()) {
+ case NotFound :
+ id = IProblem.JavadocUndefinedField;
+ break;
+ case NotVisible :
+ id = IProblem.JavadocNotVisibleField;
+ break;
+ case Ambiguous :
+ id = IProblem.JavadocAmbiguousField;
+ break;
+ case InheritedNameHidesEnclosingName :
+ id = IProblem.JavadocInheritedFieldHidesEnclosingName;
+ break;
+ case NoError : // 0
+ default :
+ needImplementation(); // want to fail to see why we were here...
+ break;
+ }
+
+ if (javadocVisibility(this.options.reportInvalidJavadocTagsVisibility, modifiers)) {
+ String[] arguments = new String[] {new String(fieldBinding.readableName())};
+ handle(id, arguments, arguments, sourceStart, sourceEnd);
+ }
+}
+/*
+ * Similar implementation than invalidMethod(MessageSend...)
+ * Note that following problem id cannot occur for Javadoc:
+ * - NonStaticReferenceInStaticContext :
+ * - NonStaticReferenceInConstructorInvocation :
+ * - ReceiverTypeNotVisible :
+ */
+public void javadocInvalidMethod(MessageSend messageSend, MethodBinding method, int modifiers) {
+ if (!javadocVisibility(this.options.reportInvalidJavadocTagsVisibility, modifiers)) {
+ return;
+ }
+ int id = IProblem.JavadocUndefinedMethod; //default...
+ switch (method.problemId()) {
+ case NotFound :
+ id = IProblem.JavadocUndefinedMethod;
+ break;
+ case NotVisible :
+ id = IProblem.JavadocNotVisibleMethod;
+ break;
+ case Ambiguous :
+ id = IProblem.JavadocAmbiguousMethod;
+ break;
+ case InheritedNameHidesEnclosingName :
+ id = IProblem.JavadocInheritedMethodHidesEnclosingName;
+ break;
+ case NoError : // 0
+ default :
+ needImplementation(); // want to fail to see why we were here...
+ break;
+ }
+
+ if (id == IProblem.JavadocUndefinedMethod) {
+ ProblemMethodBinding problemMethod = (ProblemMethodBinding) method;
+ if (problemMethod.closestMatch != null) {
+ String closestParameterTypeNames = parametersAsString(problemMethod.closestMatch.parameters, false);
+ String parameterTypeNames = parametersAsString(method.parameters, false);
+ String closestParameterTypeShortNames = parametersAsString(problemMethod.closestMatch.parameters, true);
+ String parameterTypeShortNames = parametersAsString(method.parameters, true);
+ if (closestParameterTypeShortNames.equals(parameterTypeShortNames)){
+ closestParameterTypeShortNames = closestParameterTypeNames;
+ parameterTypeShortNames = parameterTypeNames;
+ }
+ this.handle(
+ IProblem.JavadocParameterMismatch,
+ new String[] {
+ new String(problemMethod.closestMatch.declaringClass.readableName()),
+ new String(problemMethod.closestMatch.selector),
+ closestParameterTypeNames,
+ parameterTypeNames
+ },
+ new String[] {
+ new String(problemMethod.closestMatch.declaringClass.shortReadableName()),
+ new String(problemMethod.closestMatch.selector),
+ closestParameterTypeShortNames,
+ parameterTypeShortNames
+ },
+ (int) (messageSend.nameSourcePosition >>> 32),
+ (int) messageSend.nameSourcePosition);
+ return;
+ }
+ }
+
+ this.handle(
+ id,
+ new String[] {
+ new String(method.declaringClass.readableName()),
+ new String(method.selector), parametersAsString(method.parameters, false)},
+ new String[] {
+ new String(method.declaringClass.shortReadableName()),
+ new String(method.selector), parametersAsString(method.parameters, true)},
+ (int) (messageSend.nameSourcePosition >>> 32),
+ (int) messageSend.nameSourcePosition);
+}
+public void javadocInvalidParamName(JavadocSingleNameReference param, int modifiers) {
+ if (javadocVisibility(this.options.reportInvalidJavadocTagsVisibility, modifiers)) {
+ String[] arguments = new String[] {String.valueOf(param.token)};
+ this.handle(IProblem.JavadocInvalidParamName, arguments, arguments, param.sourceStart, param.sourceEnd);
+ }
+}
+public void javadocInvalidReference(int sourceStart, int sourceEnd) {
+ this.handle(IProblem.JavadocInvalidReference, NoArgument, NoArgument, sourceStart, sourceEnd);
+}
+public void javadocInvalidSeeReferenceArgs(int sourceStart, int sourceEnd) {
+ this.handle(IProblem.JavadocInvalidSeeArgs, NoArgument, NoArgument, sourceStart, sourceEnd);
+}
+public void javadocInvalidSeeUrlReference(int sourceStart, int sourceEnd) {
+ this.handle(IProblem.JavadocInvalidSeeHref, NoArgument, NoArgument, sourceStart, sourceEnd);
+}
+public void javadocInvalidTag(int sourceStart, int sourceEnd) {
+ this.handle(IProblem.JavadocInvalidTag, NoArgument, NoArgument, sourceStart, sourceEnd);
+}
+public void javadocInvalidThrowsClass(int sourceStart, int sourceEnd) {
+ this.handle(IProblem.JavadocInvalidThrowsClass, NoArgument, NoArgument, sourceStart, sourceEnd);
+}
+public void javadocInvalidThrowsClassName(TypeReference typeReference, int modifiers) {
+ if (javadocVisibility(this.options.reportInvalidJavadocTagsVisibility, modifiers)) {
+ String[] arguments = new String[] {String.valueOf(typeReference.resolvedType.sourceName())};
+ this.handle(IProblem.JavadocInvalidThrowsClassName, arguments, arguments, typeReference.sourceStart, typeReference.sourceEnd);
+ }
+}
+public void javadocInvalidType(ASTNode location, TypeBinding type, int modifiers) {
+ if (javadocVisibility(this.options.reportInvalidJavadocTagsVisibility, modifiers)) {
+ int id = IProblem.JavadocUndefinedType; // default
+ switch (type.problemId()) {
+ case NotFound :
+ id = IProblem.JavadocUndefinedType;
+ break;
+ case NotVisible :
+ id = IProblem.JavadocNotVisibleType;
+ break;
+ case Ambiguous :
+ id = IProblem.JavadocAmbiguousType;
+ break;
+ case InternalNameProvided :
+ id = IProblem.JavadocInternalTypeNameProvided;
+ break;
+ case InheritedNameHidesEnclosingName :
+ id = IProblem.JavadocInheritedNameHidesEnclosingTypeName;
+ break;
+ case NoError : // 0
+ default :
+ needImplementation(); // want to fail to see why we were here...
+ break;
+ }
+ this.handle(
+ id,
+ new String[] {new String(type.readableName())},
+ new String[] {new String(type.shortReadableName())},
+ location.sourceStart,
+ location.sourceEnd);
+ }
+}
+public void javadocInvalidValueReference(int sourceStart, int sourceEnd) {
+ this.handle(IProblem.JavadocInvalidValueReference, NoArgument, NoArgument, sourceStart, sourceEnd);
+}
+public void javadocMalformedSeeReference(int sourceStart, int sourceEnd) {
+ this.handle(IProblem.JavadocMalformedSeeReference, NoArgument, NoArgument, sourceStart, sourceEnd);
+}
+public void javadocMissing(int sourceStart, int sourceEnd, int modifiers){
+ boolean overriding = (modifiers & (CompilerModifiers.AccImplementing+CompilerModifiers.AccOverriding)) != 0;
+ boolean report = (this.options.getSeverity(CompilerOptions.MissingJavadocComments) != ProblemSeverities.Ignore)
+ && (!overriding || this.options.reportMissingJavadocCommentsOverriding);
+ if (report) {
+ String arg = javadocVisibilityArgument(this.options.reportMissingJavadocCommentsVisibility, modifiers);
+ if (arg != null) {
+ String[] arguments = new String[] { arg };
+ this.handle(IProblem.JavadocMissing, arguments, arguments, sourceStart, sourceEnd);
+ }
+ }
+}
+public void javadocMissingHashCharacter(int sourceStart, int sourceEnd, String ref){
+ String[] arguments = new String[] { ref };
+ this.handle(IProblem.JavadocMissingHashCharacter, arguments, arguments, sourceStart, sourceEnd);
+}
+public void javadocMissingParamName(int sourceStart, int sourceEnd){
+ this.handle(IProblem.JavadocMissingParamName, NoArgument, NoArgument, sourceStart, sourceEnd);
+}
+public void javadocMissingParamTag(Argument param, int modifiers) {
+ boolean overriding = (modifiers & (CompilerModifiers.AccImplementing+CompilerModifiers.AccOverriding)) != 0;
+ boolean report = (this.options.getSeverity(CompilerOptions.MissingJavadocTags) != ProblemSeverities.Ignore)
+ && (!overriding || this.options.reportMissingJavadocTagsOverriding);
+ if (report && javadocVisibility(this.options.reportMissingJavadocTagsVisibility, modifiers)) {
+ String[] arguments = new String[] { String.valueOf(param.name) };
+ this.handle(IProblem.JavadocMissingParamTag, arguments, arguments, param.sourceStart, param.sourceEnd);
+ }
+}
+public void javadocMissingReference(int sourceStart, int sourceEnd){
+ this.handle(IProblem.JavadocMissingReference, NoArgument, NoArgument, sourceStart, sourceEnd);
+}
+public void javadocMissingReturnTag(int sourceStart, int sourceEnd, int modifiers){
+ boolean overriding = (modifiers & (CompilerModifiers.AccImplementing+CompilerModifiers.AccOverriding)) != 0;
+ boolean report = (this.options.getSeverity(CompilerOptions.MissingJavadocTags) != ProblemSeverities.Ignore)
+ && (!overriding || this.options.reportMissingJavadocTagsOverriding);
+ if (report && javadocVisibility(this.options.reportMissingJavadocTagsVisibility, modifiers)) {
+ this.handle(IProblem.JavadocMissingReturnTag, NoArgument, NoArgument, sourceStart, sourceEnd);
+ }
+}
+public void javadocMissingThrowsClassName(int sourceStart, int sourceEnd){
+ this.handle(IProblem.JavadocMissingThrowsClassName, NoArgument, NoArgument, sourceStart, sourceEnd);
+}
+public void javadocMissingThrowsTag(TypeReference typeRef, int modifiers){
+ boolean overriding = (modifiers & (CompilerModifiers.AccImplementing+CompilerModifiers.AccOverriding)) != 0;
+ boolean report = (this.options.getSeverity(CompilerOptions.MissingJavadocTags) != ProblemSeverities.Ignore)
+ && (!overriding || this.options.reportMissingJavadocTagsOverriding);
+ if (report && javadocVisibility(this.options.reportMissingJavadocTagsVisibility, modifiers)) {
+ String[] arguments = new String[] { String.valueOf(typeRef.resolvedType.sourceName()) };
+ this.handle(IProblem.JavadocMissingThrowsTag, arguments, arguments, typeRef.sourceStart, typeRef.sourceEnd);
+ }
+}
+public void javadocUnexpectedTag(int sourceStart, int sourceEnd) {
+ this.handle(IProblem.JavadocUnexpectedTag, NoArgument, NoArgument, sourceStart, sourceEnd);
+}
+public void javadocUnexpectedText(int sourceStart, int sourceEnd) {
+ this.handle(IProblem.JavadocUnexpectedText, NoArgument, NoArgument, sourceStart, sourceEnd);
+}
+public void javadocUnterminatedInlineTag(int sourceStart, int sourceEnd) {
+ this.handle(IProblem.JavadocUnterminatedInlineTag, NoArgument, NoArgument, sourceStart, sourceEnd);
+}
+private boolean javadocVisibility(int visibility, int modifiers) {
+ switch (modifiers & CompilerModifiers.AccVisibilityMASK) {
+ case IConstants.AccPublic :
+ return true;
+ case IConstants.AccProtected:
+ return (visibility != IConstants.AccPublic);
+ case IConstants.AccDefault:
+ return (visibility == IConstants.AccDefault || visibility == IConstants.AccPrivate);
+ case IConstants.AccPrivate:
+ return (visibility == IConstants.AccPrivate);
+ }
+ return true;
+}
+private String javadocVisibilityArgument(int visibility, int modifiers) {
+ String argument = null;
+ switch (modifiers & CompilerModifiers.AccVisibilityMASK) {
+ case IConstants.AccPublic :
+ argument = CompilerOptions.PUBLIC;
+ break;
+ case IConstants.AccProtected:
+ if (visibility != IConstants.AccPublic) {
+ argument = CompilerOptions.PROTECTED;
+ }
+ break;
+ case IConstants.AccDefault:
+ if (visibility == IConstants.AccDefault || visibility == IConstants.AccPrivate) {
+ argument = CompilerOptions.DEFAULT;
+ }
+ break;
+ case IConstants.AccPrivate:
+ if (visibility == IConstants.AccPrivate) {
+ argument = CompilerOptions.PRIVATE;
+ }
+ break;
+ }
+ return argument;
+}
+public void localVariableHiding(LocalDeclaration local, Binding hiddenVariable, boolean isSpecialArgHidingField) {
+ if (hiddenVariable instanceof LocalVariableBinding) {
+ String[] arguments = new String[] {new String(local.name) };
+ this.handle(
+ (local instanceof Argument)
+ ? IProblem.ArgumentHidingLocalVariable
+ : IProblem.LocalVariableHidingLocalVariable,
+ arguments,
+ arguments,
+ local.sourceStart,
+ local.sourceEnd);
+ } else if (hiddenVariable instanceof FieldBinding) {
+ if (isSpecialArgHidingField && !this.options.reportSpecialParameterHidingField){
+ return;
+ }
+ FieldBinding field = (FieldBinding) hiddenVariable;
+ this.handle(
+ (local instanceof Argument)
+ ? IProblem.ArgumentHidingField
+ : IProblem.LocalVariableHidingField,
+ new String[] {new String(local.name) , new String(field.declaringClass.readableName()) },
+ new String[] {new String(local.name), new String(field.declaringClass.shortReadableName()) },
+ local.sourceStart,
+ local.sourceEnd);
+ }
+}
+public void methodNameClash(MethodBinding currentMethod, MethodBinding inheritedMethod) {
+
+ this.handle(
+ IProblem.MethodNameClash,
+ new String[] {
+ new String(currentMethod.selector),
+ parametersAsString(currentMethod.original().parameters, false),
+ new String(currentMethod.declaringClass.readableName()),
+ parametersAsString(inheritedMethod.original().parameters, false),
+ new String(inheritedMethod.declaringClass.readableName()),
+ },
+ new String[] {
+ new String(currentMethod.selector),
+ parametersAsString(currentMethod.original().parameters, true),
+ new String(currentMethod.declaringClass.shortReadableName()),
+ parametersAsString(inheritedMethod.original().parameters, true),
+ new String(inheritedMethod.declaringClass.shortReadableName()),
+ },
+ currentMethod.sourceStart(),
+ currentMethod.sourceEnd());
+}
+
+public void methodNeedBody(AbstractMethodDeclaration methodDecl) {
+ this.handle(
+ IProblem.MethodRequiresBody,
+ NoArgument,
+ NoArgument,
+ methodDecl.sourceStart,
+ methodDecl.sourceEnd);
+}
+public void methodNeedingNoBody(MethodDeclaration methodDecl) {
+ this.handle(
+ ((methodDecl.modifiers & IConstants.AccNative) != 0) ? IProblem.BodyForNativeMethod : IProblem.BodyForAbstractMethod,
+ NoArgument,
+ NoArgument,
+ methodDecl.sourceStart,
+ methodDecl.sourceEnd);
+}
+public void methodWithConstructorName(MethodDeclaration methodDecl) {
+ this.handle(
+ IProblem.MethodButWithConstructorName,
+ NoArgument,
+ NoArgument,
+ methodDecl.sourceStart,
+ methodDecl.sourceEnd);
+}
+public void parameterizedMemberTypeMissingArguments(ASTNode location, TypeBinding type) {
+ if (location == null) { // binary case
+ this.handle(
+ IProblem.MissingArgumentsForParameterizedMemberType,
+ new String[] {new String(type.readableName())},
+ new String[] {new String(type.shortReadableName())},
+ AbortCompilation | Error,
+ 0,
+ 1);
+ return;
+ }
+ this.handle(
+ IProblem.MissingArgumentsForParameterizedMemberType,
+ new String[] {new String(type.readableName())},
+ new String[] {new String(type.shortReadableName())},
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void missingReturnType(AbstractMethodDeclaration methodDecl) {
+ this.handle(
+ IProblem.MissingReturnType,
+ NoArgument,
+ NoArgument,
+ methodDecl.sourceStart,
+ methodDecl.sourceEnd);
+}
+public void missingSemiColon(Expression expression){
+ this.handle(
+ IProblem.MissingSemiColon,
+ NoArgument,
+ NoArgument,
+ expression.sourceStart,
+ expression.sourceEnd);
+}
+public void missingSerialVersion(TypeDeclaration typeDecl) {
+ String[] arguments = new String[] {new String(typeDecl.name)};
+ this.handle(
+ IProblem.MissingSerialVersion,
+ arguments,
+ arguments,
+ typeDecl.sourceStart,
+ typeDecl.sourceEnd);
+}
+public void mustDefineDimensionsOrInitializer(ArrayAllocationExpression expression) {
+ this.handle(
+ IProblem.MustDefineEitherDimensionExpressionsOrInitializer,
+ NoArgument,
+ NoArgument,
+ expression.sourceStart,
+ expression.sourceEnd);
+}
+public void mustSpecifyPackage(CompilationUnitDeclaration compUnitDecl) {
+ String[] arguments = new String[] {new String(compUnitDecl.getFileName())};
+ this.handle(
+ IProblem.MustSpecifyPackage,
+ arguments,
+ arguments,
+ compUnitDecl.sourceStart,
+ compUnitDecl.sourceStart + 1);
+}
+public void mustUseAStaticMethod(MessageSend messageSend, MethodBinding method) {
+ this.handle(
+ IProblem.StaticMethodRequested,
+ new String[] {new String(method.declaringClass.readableName()), new String(method.selector), parametersAsString(method.parameters, false)},
+ new String[] {new String(method.declaringClass.shortReadableName()), new String(method.selector), parametersAsString(method.parameters, true)},
+ messageSend.sourceStart,
+ messageSend.sourceEnd);
+}
+
+public void nativeMethodsCannotBeStrictfp(ReferenceBinding type, AbstractMethodDeclaration methodDecl) {
+ String[] arguments = new String[] {new String(type.sourceName()), new String(methodDecl.selector)};
+ this.handle(
+ IProblem.NativeMethodsCannotBeStrictfp,
+ arguments,
+ arguments,
+ methodDecl.sourceStart,
+ methodDecl.sourceEnd);
+}
+public void needImplementation() {
+ this.abortDueToInternalError(Util.bind("abort.missingCode")); //$NON-NLS-1$
+}
+public void needToEmulateFieldAccess(FieldBinding field, ASTNode location, boolean isReadAccess) {
+ this.handle(
+ isReadAccess
+ ? IProblem.NeedToEmulateFieldReadAccess
+ : IProblem.NeedToEmulateFieldWriteAccess,
+ new String[] {new String(field.declaringClass.readableName()), new String(field.name)},
+ new String[] {new String(field.declaringClass.shortReadableName()), new String(field.name)},
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void needToEmulateMethodAccess(
+ MethodBinding method,
+ ASTNode location) {
+
+ if (method.isConstructor())
+ this.handle(
+ IProblem.NeedToEmulateConstructorAccess,
+ new String[] {
+ new String(method.declaringClass.readableName()),
+ parametersAsString(method.parameters, false)
+ },
+ new String[] {
+ new String(method.declaringClass.shortReadableName()),
+ parametersAsString(method.parameters, true)
+ },
+ location.sourceStart,
+ location.sourceEnd);
+ else
+ this.handle(
+ IProblem.NeedToEmulateMethodAccess,
+ new String[] {
+ new String(method.declaringClass.readableName()),
+ new String(method.selector),
+ parametersAsString(method.parameters, false)
+ },
+ new String[] {
+ new String(method.declaringClass.shortReadableName()),
+ new String(method.selector),
+ parametersAsString(method.parameters, true)
+ },
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void nestedClassCannotDeclareInterface(TypeDeclaration typeDecl) {
+ String[] arguments = new String[] {new String(typeDecl.name)};
+ this.handle(
+ IProblem.CannotDefineInterfaceInLocalType,
+ arguments,
+ arguments,
+ typeDecl.sourceStart,
+ typeDecl.sourceEnd);
+}
+public void noMoreAvailableSpaceForArgument(LocalVariableBinding local, ASTNode location) {
+ String[] arguments = new String[]{ new String(local.name) };
+ this.handle(
+ local instanceof SyntheticArgumentBinding
+ ? IProblem.TooManySyntheticArgumentSlots
+ : IProblem.TooManyArgumentSlots,
+ arguments,
+ arguments,
+ Abort | Error,
+ location.sourceStart,
+ location.sourceEnd);
+}
+
+public void noMoreAvailableSpaceForConstant(TypeDeclaration typeDeclaration) {
+ this.handle(
+ IProblem.TooManyBytesForStringConstant,
+ new String[]{ new String(typeDeclaration.binding.readableName())},
+ new String[]{ new String(typeDeclaration.binding.shortReadableName())},
+ Abort | Error,
+ typeDeclaration.sourceStart,
+ typeDeclaration.sourceEnd);
+}
+public void noMoreAvailableSpaceForLocal(LocalVariableBinding local, ASTNode location) {
+ String[] arguments = new String[]{ new String(local.name) };
+ this.handle(
+ IProblem.TooManyLocalVariableSlots,
+ arguments,
+ arguments,
+ Abort | Error,
+ location.sourceStart,
+ location.sourceEnd);
+}
+
+public void noMoreAvailableSpaceInConstantPool(TypeDeclaration typeDeclaration) {
+ this.handle(
+ IProblem.TooManyConstantsInConstantPool,
+ new String[]{ new String(typeDeclaration.binding.readableName())},
+ new String[]{ new String(typeDeclaration.binding.shortReadableName())},
+ Abort | Error,
+ typeDeclaration.sourceStart,
+ typeDeclaration.sourceEnd);
+}
+public void nonExternalizedStringLiteral(ASTNode location) {
+ this.handle(
+ IProblem.NonExternalizedStringLiteral,
+ NoArgument,
+ NoArgument,
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void nonGenericTypeCannotBeParameterized(ASTNode location, TypeBinding type, TypeBinding[] argumentTypes) {
+ if (location == null) { // binary case
+ this.handle(
+ IProblem.NonGenericType,
+ new String[] {new String(type.readableName()), parametersAsString(argumentTypes, false)},
+ new String[] {new String(type.shortReadableName()), parametersAsString(argumentTypes, true)},
+ AbortCompilation | Error,
+ 0,
+ 1);
+ return;
+ }
+ this.handle(
+ IProblem.NonGenericType,
+ new String[] {new String(type.readableName()), parametersAsString(argumentTypes, false)},
+ new String[] {new String(type.shortReadableName()), parametersAsString(argumentTypes, true)},
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void nonStaticAccessToStaticField(ASTNode location, FieldBinding field) {
+ this.handle(
+ IProblem.NonStaticAccessToStaticField,
+ new String[] {new String(field.declaringClass.readableName()), new String(field.name)},
+ new String[] {new String(field.declaringClass.shortReadableName()), new String(field.name)},
+ location.sourceStart,
+ fieldLocation(field, location));
+}
+public void nonStaticAccessToStaticMethod(ASTNode location, MethodBinding method) {
+ this.handle(
+ IProblem.NonStaticAccessToStaticMethod,
+ new String[] {new String(method.declaringClass.readableName()), new String(method.selector), parametersAsString(method.parameters, false)},
+ new String[] {new String(method.declaringClass.shortReadableName()), new String(method.selector), parametersAsString(method.parameters, true)},
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void noSuchEnclosingInstance(TypeBinding targetType, ASTNode location, boolean isConstructorCall) {
+
+ int id;
+
+ if (isConstructorCall) {
+ //28 = No enclosing instance of type {0} is available due to some intermediate constructor invocation
+ id = IProblem.EnclosingInstanceInConstructorCall;
+ } else if ((location instanceof ExplicitConstructorCall)
+ && ((ExplicitConstructorCall) location).accessMode == ExplicitConstructorCall.ImplicitSuper) {
+ //20 = No enclosing instance of type {0} is accessible to invoke the super constructor. Must define a constructor and explicitly qualify its super constructor invocation with an instance of {0} (e.g. x.super() where x is an instance of {0}).
+ id = IProblem.MissingEnclosingInstanceForConstructorCall;
+ } else if (location instanceof AllocationExpression
+ && (((AllocationExpression) location).binding.declaringClass.isMemberType()
+ || (((AllocationExpression) location).binding.declaringClass.isAnonymousType()
+ && ((AllocationExpression) location).binding.declaringClass.superclass().isMemberType()))) {
+ //21 = No enclosing instance of type {0} is accessible. Must qualify the allocation with an enclosing instance of type {0} (e.g. x.new A() where x is an instance of {0}).
+ id = IProblem.MissingEnclosingInstance;
+ } else { // default
+ //22 = No enclosing instance of the type {0} is accessible in scope
+ id = IProblem.IncorrectEnclosingInstanceReference;
+ }
+
+ this.handle(
+ id,
+ new String[] { new String(targetType.readableName())},
+ new String[] { new String(targetType.shortReadableName())},
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void notCompatibleTypesError(EqualExpression expression, TypeBinding leftType, TypeBinding rightType) {
+ String leftName = new String(leftType.readableName());
+ String rightName = new String(rightType.readableName());
+ String leftShortName = new String(leftType.shortReadableName());
+ String rightShortName = new String(rightType.shortReadableName());
+ if (leftShortName.equals(rightShortName)){
+ leftShortName = leftName;
+ rightShortName = rightName;
+ }
+ this.handle(
+ IProblem.IncompatibleTypesInEqualityOperator,
+ new String[] {leftName, rightName },
+ new String[] {leftShortName, rightShortName },
+ expression.sourceStart,
+ expression.sourceEnd);
+}
+public void notCompatibleTypesError(InstanceOfExpression expression, TypeBinding leftType, TypeBinding rightType) {
+ String leftName = new String(leftType.readableName());
+ String rightName = new String(rightType.readableName());
+ String leftShortName = new String(leftType.shortReadableName());
+ String rightShortName = new String(rightType.shortReadableName());
+ if (leftShortName.equals(rightShortName)){
+ leftShortName = leftName;
+ rightShortName = rightName;
+ }
+ this.handle(
+ IProblem.IncompatibleTypesInConditionalOperator,
+ new String[] {leftName, rightName },
+ new String[] {leftShortName, rightShortName },
+ expression.sourceStart,
+ expression.sourceEnd);
+}
+public void notCompatibleTypesErrorInForeach(Expression expression, TypeBinding leftType, TypeBinding rightType) {
+ String leftName = new String(leftType.readableName());
+ String rightName = new String(rightType.readableName());
+ String leftShortName = new String(leftType.shortReadableName());
+ String rightShortName = new String(rightType.shortReadableName());
+ if (leftShortName.equals(rightShortName)){
+ leftShortName = leftName;
+ rightShortName = rightName;
+ }
+ this.handle(
+ IProblem.IncompatibleTypesInForeach,
+ new String[] {leftName, rightName },
+ new String[] {leftShortName, rightShortName },
+ expression.sourceStart,
+ expression.sourceEnd);
+}
+public void objectCannotBeGeneric(TypeDeclaration typeDecl) {
+ this.handle(
+ IProblem.ObjectCannotBeGeneric,
+ NoArgument,
+ NoArgument,
+ typeDecl.typeParameters[0].sourceStart,
+ typeDecl.typeParameters[typeDecl.typeParameters.length-1].sourceEnd);
+}
+public void objectCannotHaveSuperTypes(SourceTypeBinding type) {
+ this.handle(
+ IProblem.ObjectCannotHaveSuperTypes,
+ NoArgument,
+ NoArgument,
+ type.sourceStart(),
+ type.sourceEnd());
+}
+public void operatorOnlyValidOnNumericType(CompoundAssignment assignment, TypeBinding leftType, TypeBinding rightType) {
+ String leftName = new String(leftType.readableName());
+ String rightName = new String(rightType.readableName());
+ String leftShortName = new String(leftType.shortReadableName());
+ String rightShortName = new String(rightType.shortReadableName());
+ if (leftShortName.equals(rightShortName)){
+ leftShortName = leftName;
+ rightShortName = rightName;
+ }
+ this.handle(
+ IProblem.TypeMismatch,
+ new String[] {leftName, rightName },
+ new String[] {leftShortName, rightShortName },
+ assignment.sourceStart,
+ assignment.sourceEnd);
+}
+public void overridesDeprecatedMethod(MethodBinding localMethod, MethodBinding inheritedMethod) {
+ this.handle(
+ IProblem.OverridingDeprecatedMethod,
+ new String[] {
+ new String(
+ CharOperation.concat(
+ localMethod.declaringClass.readableName(),
+ localMethod.readableName(),
+ '.')),
+ new String(inheritedMethod.declaringClass.readableName())},
+ new String[] {
+ new String(
+ CharOperation.concat(
+ localMethod.declaringClass.shortReadableName(),
+ localMethod.shortReadableName(),
+ '.')),
+ new String(inheritedMethod.declaringClass.shortReadableName())},
+ localMethod.sourceStart(),
+ localMethod.sourceEnd());
+}
+public void overridesPackageDefaultMethod(MethodBinding localMethod, MethodBinding inheritedMethod) {
+ this.handle(
+ IProblem.OverridingNonVisibleMethod,
+ new String[] {
+ new String(
+ CharOperation.concat(
+ localMethod.declaringClass.readableName(),
+ localMethod.readableName(),
+ '.')),
+ new String(inheritedMethod.declaringClass.readableName())},
+ new String[] {
+ new String(
+ CharOperation.concat(
+ localMethod.declaringClass.shortReadableName(),
+ localMethod.shortReadableName(),
+ '.')),
+ new String(inheritedMethod.declaringClass.shortReadableName())},
+ localMethod.sourceStart(),
+ localMethod.sourceEnd());
+}
+public void packageCollidesWithType(CompilationUnitDeclaration compUnitDecl) {
+ String[] arguments = new String[] {CharOperation.toString(compUnitDecl.currentPackage.tokens)};
+ this.handle(
+ IProblem.PackageCollidesWithType,
+ arguments,
+ arguments,
+ compUnitDecl.currentPackage.sourceStart,
+ compUnitDecl.currentPackage.sourceEnd);
+}
+public void packageIsNotExpectedPackage(CompilationUnitDeclaration compUnitDecl) {
+ String[] arguments = new String[] {CharOperation.toString(compUnitDecl.compilationResult.compilationUnit.getPackageName())};
+ this.handle(
+ IProblem.PackageIsNotExpectedPackage,
+ arguments,
+ arguments,
+ compUnitDecl.currentPackage == null ? 0 : compUnitDecl.currentPackage.sourceStart,
+ compUnitDecl.currentPackage == null ? 0 : compUnitDecl.currentPackage.sourceEnd);
+}
+private String parameterBoundAsString(TypeVariableBinding typeVariable, boolean makeShort) {
+ StringBuffer nameBuffer = new StringBuffer(10);
+ if (typeVariable.firstBound == typeVariable.superclass) {
+ nameBuffer.append(makeShort ? typeVariable.superclass.shortReadableName() : typeVariable.superclass.readableName());
+ }
+ int length;
+ if ((length = typeVariable.superInterfaces.length) > 0) {
+ for (int i = 0; i < length; i++) {
+ if (i > 0 || typeVariable.firstBound == typeVariable.superclass) nameBuffer.append(" & "); //$NON-NLS-1$
+ nameBuffer.append(makeShort ? typeVariable.superInterfaces[i].shortReadableName() : typeVariable.superInterfaces[i].readableName());
+ }
+ }
+ return nameBuffer.toString();
+}
+private String parametersAsString(TypeBinding[] params, boolean makeShort) {
+ StringBuffer buffer = new StringBuffer(10);
+ for (int i = 0, length = params.length; i < length; i++) {
+ if (i != 0)
+ buffer.append(", "); //$NON-NLS-1$
+ buffer.append(new String(makeShort ? params[i].shortReadableName() : params[i].readableName()));
+ }
+ return buffer.toString();
+}
+public void parseError(
+ int startPosition,
+ int endPosition,
+ int currentToken,
+ char[] currentTokenSource,
+ String errorTokenName,
+ String[] possibleTokens) {
+
+ if (possibleTokens.length == 0) { //no suggestion available
+ if (isKeyword(currentToken)) {
+ String[] arguments = new String[] {new String(currentTokenSource)};
+ this.handle(
+ IProblem.ParsingErrorOnKeywordNoSuggestion,
+ arguments,
+ arguments,
+ // this is the current -invalid- token position
+ startPosition,
+ endPosition);
+ return;
+ } else {
+ String[] arguments = new String[] {errorTokenName};
+ this.handle(
+ IProblem.ParsingErrorNoSuggestion,
+ arguments,
+ arguments,
+ // this is the current -invalid- token position
+ startPosition,
+ endPosition);
+ return;
+ }
+ }
+
+ //build a list of probable right tokens
+ StringBuffer list = new StringBuffer(20);
+ for (int i = 0, max = possibleTokens.length; i < max; i++) {
+ if (i > 0)
+ list.append(", "); //$NON-NLS-1$
+ list.append('"');
+ list.append(possibleTokens[i]);
+ list.append('"');
+ }
+
+ if (isKeyword(currentToken)) {
+ String[] arguments = new String[] {new String(currentTokenSource), list.toString()};
+ this.handle(
+ IProblem.ParsingErrorOnKeyword,
+ arguments,
+ arguments,
+ // this is the current -invalid- token position
+ startPosition,
+ endPosition);
+ return;
+ }
+ //extract the literal when it's a literal
+ if (isLiteral(currentToken) ||
+ isIdentifier(currentToken)) { //$NON-NLS-1$
+ errorTokenName = new String(currentTokenSource);
+ }
+
+ String[] arguments = new String[] {errorTokenName, list.toString()};
+ this.handle(
+ IProblem.ParsingError,
+ arguments,
+ arguments,
+ // this is the current -invalid- token position
+ startPosition,
+ endPosition);
+}
+public void parseErrorDeleteToken(
+ int start,
+ int end,
+ int currentKind,
+ char[] errorTokenSource,
+ String errorTokenName){
+ this.syntaxError(
+ IProblem.ParsingErrorDeleteToken,
+ start,
+ end,
+ currentKind,
+ errorTokenSource,
+ errorTokenName,
+ null);
+}
+public void parseErrorDeleteTokens(
+ int start,
+ int end){
+ this.handle(
+ IProblem.ParsingErrorDeleteTokens,
+ NoArgument,
+ NoArgument,
+ start,
+ end);
+}
+public void parseErrorInsertAfterToken(
+ int start,
+ int end,
+ int currentKind,
+ char[] errorTokenSource,
+ String errorTokenName,
+ String expectedToken){
+ this.syntaxError(
+ IProblem.ParsingErrorInsertTokenAfter,
+ start,
+ end,
+ currentKind,
+ errorTokenSource,
+ errorTokenName,
+ expectedToken);
+}
+
+public void parseErrorInsertBeforeToken(
+ int start,
+ int end,
+ int currentKind,
+ char[] errorTokenSource,
+ String errorTokenName,
+ String expectedToken){
+ this.syntaxError(
+ IProblem.ParsingErrorInsertTokenBefore,
+ start,
+ end,
+ currentKind,
+ errorTokenSource,
+ errorTokenName,
+ expectedToken);
+}
+public void parseErrorInsertToComplete(
+ int start,
+ int end,
+ String inserted,
+ String completed){
+ String[] arguments = new String[] {inserted, completed};
+ this.handle(
+ IProblem.ParsingErrorInsertToComplete,
+ arguments,
+ arguments,
+ start,
+ end);
+}
+public void parseErrorInsertToCompletePhrase(
+ int start,
+ int end,
+ String inserted){
+ String[] arguments = new String[] {inserted};
+ this.handle(
+ IProblem.ParsingErrorInsertToCompletePhrase,
+ arguments,
+ arguments,
+ start,
+ end);
+}
+public void parseErrorInsertToCompleteScope(
+ int start,
+ int end,
+ String inserted){
+ String[] arguments = new String[] {inserted};
+ this.handle(
+ IProblem.ParsingErrorInsertToCompleteScope,
+ arguments,
+ arguments,
+ start,
+ end);
+}
+public void parseErrorInvalidToken(
+ int start,
+ int end,
+ int currentKind,
+ char[] errorTokenSource,
+ String errorTokenName,
+ String expectedToken){
+ this.syntaxError(
+ IProblem.ParsingErrorInvalidToken,
+ start,
+ end,
+ currentKind,
+ errorTokenSource,
+ errorTokenName,
+ expectedToken);
+}
+public void parseErrorMergeTokens(
+ int start,
+ int end,
+ String expectedToken){
+ String[] arguments = new String[] {expectedToken};
+ this.handle(
+ IProblem.ParsingErrorMergeTokens,
+ arguments,
+ arguments,
+ start,
+ end);
+}
+public void parseErrorMisplacedConstruct(
+ int start,
+ int end){
+ this.handle(
+ IProblem.ParsingErrorMisplacedConstruct,
+ NoArgument,
+ NoArgument,
+ start,
+ end);
+}
+public void parseErrorNoSuggestion(
+ int start,
+ int end,
+ int currentKind,
+ char[] errorTokenSource,
+ String errorTokenName){
+ this.syntaxError(
+ IProblem.ParsingErrorNoSuggestion,
+ start,
+ end,
+ currentKind,
+ errorTokenSource,
+ errorTokenName,
+ null);
+}
+public void parseErrorNoSuggestionForTokens(
+ int start,
+ int end){
+ this.handle(
+ IProblem.ParsingErrorNoSuggestionForTokens,
+ NoArgument,
+ NoArgument,
+ start,
+ end);
+}
+public void parseErrorReplaceToken(
+ int start,
+ int end,
+ int currentKind,
+ char[] errorTokenSource,
+ String errorTokenName,
+ String expectedToken){
+ this.syntaxError(
+ IProblem.ParsingError,
+ start,
+ end,
+ currentKind,
+ errorTokenSource,
+ errorTokenName,
+ expectedToken);
+}
+public void parseErrorReplaceTokens(
+ int start,
+ int end,
+ String expectedToken){
+ String[] arguments = new String[] {expectedToken};
+ this.handle(
+ IProblem.ParsingErrorReplaceTokens,
+ arguments,
+ arguments,
+ start,
+ end);
+}
+public void parseErrorUnexpectedEnd(
+ int start,
+ int end){
+
+ String[] arguments;
+ if(this.referenceContext instanceof ConstructorDeclaration) {
+ arguments = new String[] {Util.bind("parser.endOfConstructor")}; //$NON-NLS-1$
+ } else if(this.referenceContext instanceof MethodDeclaration) {
+ arguments = new String[] {Util.bind("parser.endOfMethod")}; //$NON-NLS-1$
+ } else if(this.referenceContext instanceof TypeDeclaration) {
+ arguments = new String[] {Util.bind("parser.endOfInitializer")}; //$NON-NLS-1$
+ } else {
+ arguments = new String[] {Util.bind("parser.endOfFile")}; //$NON-NLS-1$
+ }
+ this.handle(
+ IProblem.ParsingErrorUnexpectedEOF,
+ arguments,
+ arguments,
+ start,
+ end);
+}
+public void possibleAccidentalBooleanAssignment(Assignment assignment) {
+ this.handle(
+ IProblem.PossibleAccidentalBooleanAssignment,
+ NoArgument,
+ NoArgument,
+ assignment.sourceStart,
+ assignment.sourceEnd);
+}
+public void publicClassMustMatchFileName(CompilationUnitDeclaration compUnitDecl, TypeDeclaration typeDecl) {
+ this.referenceContext = typeDecl; // report the problem against the type not the entire compilation unit
+ String[] arguments = new String[] {new String(compUnitDecl.getFileName()), new String(typeDecl.name)};
+ this.handle(
+ IProblem.PublicClassMustMatchFileName,
+ arguments,
+ arguments,
+ typeDecl.sourceStart,
+ typeDecl.sourceEnd,
+ compUnitDecl.compilationResult);
+}
+public void rawMemberTypeCannotBeParameterized(ASTNode location, ReferenceBinding type, TypeBinding[] argumentTypes) {
+ if (location == null) { // binary case
+ this.handle(
+ IProblem.RawMemberTypeCannotBeParameterized,
+ new String[] {new String(type.readableName()), parametersAsString(argumentTypes, false), new String(type.enclosingType().readableName())},
+ new String[] {new String(type.shortReadableName()), parametersAsString(argumentTypes, true), new String(type.enclosingType().shortReadableName())},
+ AbortCompilation | Error,
+ 0,
+ 1);
+ return;
+ }
+ this.handle(
+ IProblem.RawMemberTypeCannotBeParameterized,
+ new String[] {new String(type.readableName()), parametersAsString(argumentTypes, false), new String(type.enclosingType().readableName())},
+ new String[] {new String(type.shortReadableName()), parametersAsString(argumentTypes, true), new String(type.enclosingType().shortReadableName())},
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void recursiveConstructorInvocation(ExplicitConstructorCall constructorCall) {
+
+ this.handle(
+ IProblem.RecursiveConstructorInvocation,
+ new String[] {
+ new String(constructorCall.binding.declaringClass.readableName()),
+ parametersAsString(constructorCall.binding.parameters, false)
+ },
+ new String[] {
+ new String(constructorCall.binding.declaringClass.shortReadableName()),
+ parametersAsString(constructorCall.binding.parameters, true)
+ },
+ constructorCall.sourceStart,
+ constructorCall.sourceEnd);
+}
+
+public void redefineArgument(Argument arg) {
+ String[] arguments = new String[] {new String(arg.name)};
+ this.handle(
+ IProblem.RedefinedArgument,
+ arguments,
+ arguments,
+ arg.sourceStart,
+ arg.sourceEnd);
+}
+public void redefineLocal(LocalDeclaration localDecl) {
+ String[] arguments = new String[] {new String(localDecl.name)};
+ this.handle(
+ IProblem.RedefinedLocal,
+ arguments,
+ arguments,
+ localDecl.sourceStart,
+ localDecl.sourceEnd);
+}
+public void referenceMustBeArrayTypeAt(TypeBinding arrayType, ArrayReference arrayRef) {
+ this.handle(
+ IProblem.ArrayReferenceRequired,
+ new String[] {new String(arrayType.readableName())},
+ new String[] {new String(arrayType.shortReadableName())},
+ arrayRef.sourceStart,
+ arrayRef.sourceEnd);
+}
+public void returnTypeCannotBeVoidArray(SourceTypeBinding type, MethodDeclaration methodDecl) {
+ String[] arguments = new String[] {new String(methodDecl.selector)};
+ this.handle(
+ IProblem.ReturnTypeCannotBeVoidArray,
+ arguments,
+ arguments,
+ methodDecl.sourceStart,
+ methodDecl.sourceEnd);
+}
+
+public void scannerError(Parser parser, String errorTokenName) {
+ Scanner scanner = parser.scanner;
+
+ int flag = IProblem.ParsingErrorNoSuggestion;
+ int startPos = scanner.startPosition;
+
+ //special treatment for recognized errors....
+ if (errorTokenName.equals(Scanner.END_OF_SOURCE))
+ flag = IProblem.EndOfSource;
+ else if (errorTokenName.equals(Scanner.INVALID_HEXA))
+ flag = IProblem.InvalidHexa;
+ else if (errorTokenName.equals(Scanner.INVALID_OCTAL))
+ flag = IProblem.InvalidOctal;
+ else if (errorTokenName.equals(Scanner.INVALID_CHARACTER_CONSTANT))
+ flag = IProblem.InvalidCharacterConstant;
+ else if (errorTokenName.equals(Scanner.INVALID_ESCAPE))
+ flag = IProblem.InvalidEscape;
+ else if (errorTokenName.equals(Scanner.INVALID_UNICODE_ESCAPE)){
+ flag = IProblem.InvalidUnicodeEscape;
+ // better locate the error message
+ char[] source = scanner.source;
+ int checkPos = scanner.currentPosition - 1;
+ if (checkPos >= source.length) checkPos = source.length - 1;
+ while (checkPos >= startPos){
+ if (source[checkPos] == '\\') break;
+ checkPos --;
+ }
+ startPos = checkPos;
+ } else if (errorTokenName.equals(Scanner.INVALID_FLOAT))
+ flag = IProblem.InvalidFloat;
+ else if (errorTokenName.equals(Scanner.UNTERMINATED_STRING))
+ flag = IProblem.UnterminatedString;
+ else if (errorTokenName.equals(Scanner.UNTERMINATED_COMMENT))
+ flag = IProblem.UnterminatedComment;
+ else if (errorTokenName.equals(Scanner.INVALID_CHAR_IN_STRING))
+ flag = IProblem.UnterminatedString;
+ else if (errorTokenName.equals(Scanner.INVALID_DIGIT))
+ flag = IProblem.InvalidDigit;
+
+ String[] arguments = flag == IProblem.ParsingErrorNoSuggestion
+ ? new String[] {errorTokenName}
+ : NoArgument;
+ this.handle(
+ flag,
+ arguments,
+ arguments,
+ // this is the current -invalid- token position
+ startPos,
+ scanner.currentPosition - 1,
+ parser.compilationUnit.compilationResult);
+}
+public void shouldReturn(TypeBinding returnType, ASTNode location) {
+ this.handle(
+ IProblem.ShouldReturnValue,
+ new String[] { new String (returnType.readableName())},
+ new String[] { new String (returnType.shortReadableName())},
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void signalNoImplicitStringConversionForCharArrayExpression(Expression expression) {
+ this.handle(
+ IProblem.NoImplicitStringConversionForCharArrayExpression,
+ NoArgument,
+ NoArgument,
+ expression.sourceStart,
+ expression.sourceEnd);
+}
+public void staticAndInstanceConflict(MethodBinding currentMethod, MethodBinding inheritedMethod) {
+ if (currentMethod.isStatic())
+ this.handle(
+ // This static method cannot hide the instance method from %1
+ // 8.4.6.4 - If a class inherits more than one method with the same signature a static (non-abstract) method cannot hide an instance method.
+ IProblem.CannotHideAnInstanceMethodWithAStaticMethod,
+ new String[] {new String(inheritedMethod.declaringClass.readableName())},
+ new String[] {new String(inheritedMethod.declaringClass.shortReadableName())},
+ currentMethod.sourceStart(),
+ currentMethod.sourceEnd());
+ else
+ this.handle(
+ // This instance method cannot override the static method from %1
+ // 8.4.6.4 - If a class inherits more than one method with the same signature an instance (non-abstract) method cannot override a static method.
+ IProblem.CannotOverrideAStaticMethodWithAnInstanceMethod,
+ new String[] {new String(inheritedMethod.declaringClass.readableName())},
+ new String[] {new String(inheritedMethod.declaringClass.shortReadableName())},
+ currentMethod.sourceStart(),
+ currentMethod.sourceEnd());
+}
+public void staticFieldAccessToNonStaticVariable(ASTNode location, FieldBinding field) {
+ String[] arguments = new String[] {new String(field.readableName())};
+ this.handle(
+ IProblem.NonStaticFieldFromStaticInvocation,
+ arguments,
+ arguments,
+ location.sourceStart,
+ fieldLocation(field, location));
+}
+public void staticInheritedMethodConflicts(SourceTypeBinding type, MethodBinding concreteMethod, MethodBinding[] abstractMethods) {
+ this.handle(
+ // The static method %1 conflicts with the abstract method in %2
+ // 8.4.6.4 - If a class inherits more than one method with the same signature it is an error for one to be static (non-abstract) and the other abstract.
+ IProblem.StaticInheritedMethodConflicts,
+ new String[] {
+ new String(concreteMethod.readableName()),
+ new String(abstractMethods[0].declaringClass.readableName())},
+ new String[] {
+ new String(concreteMethod.readableName()),
+ new String(abstractMethods[0].declaringClass.shortReadableName())},
+ type.sourceStart(),
+ type.sourceEnd());
+}
+public void staticMemberOfParameterizedType(ASTNode location, ReferenceBinding type) {
+ if (location == null) { // binary case
+ this.handle(
+ IProblem.StaticMemberOfParameterizedType,
+ new String[] {new String(type.readableName()), new String(type.enclosingType().readableName()), },
+ new String[] {new String(type.shortReadableName()), new String(type.enclosingType().shortReadableName()), },
+ AbortCompilation | Error,
+ 0,
+ 1);
+ return;
+ }
+ this.handle(
+ IProblem.StaticMemberOfParameterizedType,
+ new String[] {new String(type.readableName()), new String(type.enclosingType().readableName()), },
+ new String[] {new String(type.shortReadableName()), new String(type.enclosingType().shortReadableName()), },
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void stringConstantIsExceedingUtf8Limit(ASTNode location) {
+ this.handle(
+ IProblem.StringConstantIsExceedingUtf8Limit,
+ NoArgument,
+ NoArgument,
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void superclassMustBeAClass(SourceTypeBinding type, TypeReference superclassRef, ReferenceBinding superType) {
+ this.handle(
+ IProblem.SuperclassMustBeAClass,
+ new String[] {new String(superType.readableName()), new String(type.sourceName())},
+ new String[] {new String(superType.shortReadableName()), new String(type.sourceName())},
+ superclassRef.sourceStart,
+ superclassRef.sourceEnd);
+}
+public void superfluousSemicolon(int sourceStart, int sourceEnd) {
+ this.handle(
+ IProblem.SuperfluousSemicolon,
+ NoArgument,
+ NoArgument,
+ sourceStart,
+ sourceEnd);
+}
+public void superinterfaceMustBeAnInterface(SourceTypeBinding type, TypeReference superInterfaceRef, ReferenceBinding superType) {
+ this.handle(
+ IProblem.SuperInterfaceMustBeAnInterface,
+ new String[] {new String(superType.readableName()), new String(type.sourceName())},
+ new String[] {new String(superType.shortReadableName()), new String(type.sourceName())},
+ superInterfaceRef.sourceStart,
+ superInterfaceRef.sourceEnd);
+}
+public void superinterfacesCollide(ReferenceBinding type, TypeDeclaration typeDecl, ReferenceBinding superType, ReferenceBinding inheritedSuperType) {
+ this.handle(
+ IProblem.SuperInterfacesCollide,
+ new String[] {new String(superType.readableName()), new String(inheritedSuperType.readableName()), new String(type.sourceName())},
+ new String[] {new String(superType.shortReadableName()), new String(inheritedSuperType.shortReadableName()), new String(type.sourceName())},
+ typeDecl.sourceStart,
+ typeDecl.sourceEnd);
+}
+public void superTypeCannotUseWildcard(SourceTypeBinding type, TypeReference superclass, TypeBinding superTypeBinding) {
+ String name = new String(type.sourceName());
+ String superTypeFullName = new String(superTypeBinding.readableName());
+ String superTypeShortName = new String(superTypeBinding.shortReadableName());
+ if (superTypeShortName.equals(name)) superTypeShortName = superTypeFullName;
+ this.handle(
+ IProblem.SuperTypeUsingWildcard,
+ new String[] {superTypeFullName, name},
+ new String[] {superTypeShortName, name},
+ superclass.sourceStart,
+ superclass.sourceEnd);
+}
+
+private void syntaxError(
+ int id,
+ int startPosition,
+ int endPosition,
+ int currentKind,
+ char[] currentTokenSource,
+ String errorTokenName,
+ String expectedToken) {
+
+ String eTokenName;
+ if (isKeyword(currentKind) ||
+ isLiteral(currentKind) ||
+ isIdentifier(currentKind)) { //$NON-NLS-1$
+ eTokenName = new String(currentTokenSource);
+ } else {
+ eTokenName = errorTokenName;
+ }
+
+ String[] arguments;
+ if(expectedToken != null) {
+ arguments = new String[] {eTokenName, expectedToken};
+ } else {
+ arguments = new String[] {eTokenName};
+ }
+ this.handle(
+ id,
+ arguments,
+ arguments,
+ startPosition,
+ endPosition);
+}
+
+public void task(String tag, String message, String priority, int start, int end){
+ this.handle(
+ IProblem.Task,
+ new String[] { tag, message, priority/*secret argument that is not surfaced in getMessage()*/},
+ new String[] { tag, message, priority/*secret argument that is not surfaced in getMessage()*/},
+ start,
+ end);
+}
+public void tooManyDimensions(ASTNode expression) {
+ this.handle(
+ IProblem.TooManyArrayDimensions,
+ NoArgument,
+ NoArgument,
+ expression.sourceStart,
+ expression.sourceEnd);
+}
+public void tooManyFields(TypeDeclaration typeDeclaration) {
+ this.handle(
+ IProblem.TooManyFields,
+ new String[]{ new String(typeDeclaration.binding.readableName())},
+ new String[]{ new String(typeDeclaration.binding.shortReadableName())},
+ Abort | Error,
+ typeDeclaration.sourceStart,
+ typeDeclaration.sourceEnd);
+}
+public void tooManyMethods(TypeDeclaration typeDeclaration) {
+ this.handle(
+ IProblem.TooManyMethods,
+ new String[]{ new String(typeDeclaration.binding.readableName())},
+ new String[]{ new String(typeDeclaration.binding.shortReadableName())},
+ Abort | Error,
+ typeDeclaration.sourceStart,
+ typeDeclaration.sourceEnd);
+}
+public void typeCastError(CastExpression expression, TypeBinding leftType, TypeBinding rightType) {
+ String leftName = new String(leftType.readableName());
+ String rightName = new String(rightType.readableName());
+ String leftShortName = new String(leftType.shortReadableName());
+ String rightShortName = new String(rightType.shortReadableName());
+ if (leftShortName.equals(rightShortName)){
+ leftShortName = leftName;
+ rightShortName = rightName;
+ }
+ this.handle(
+ IProblem.IllegalCast,
+ new String[] { rightName, leftName },
+ new String[] { rightShortName, leftShortName },
+ expression.sourceStart,
+ expression.sourceEnd);
+}
+public void typeCollidesWithPackage(CompilationUnitDeclaration compUnitDecl, TypeDeclaration typeDecl) {
+ this.referenceContext = typeDecl; // report the problem against the type not the entire compilation unit
+ String[] arguments = new String[] {new String(compUnitDecl.getFileName()), new String(typeDecl.name)};
+ this.handle(
+ IProblem.TypeCollidesWithPackage,
+ arguments,
+ arguments,
+ typeDecl.sourceStart,
+ typeDecl.sourceEnd,
+ compUnitDecl.compilationResult);
+}
+public void typeMismatchError(TypeBinding actualType, TypeBinding expectedType, ASTNode location) {
+ this.handle(
+ IProblem.TypeMismatch,
+ new String[] {new String(actualType.readableName()), new String(expectedType.readableName())},
+ new String[] {new String(actualType.shortReadableName()), new String(expectedType.shortReadableName())},
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void typeMismatchError(TypeBinding typeArgument, TypeVariableBinding typeParameter, ReferenceBinding genericType, ASTNode location) {
+ if (location == null) { // binary case
+ this.handle(
+ IProblem.TypeArgumentMismatch,
+ new String[] { new String(typeArgument.readableName()), new String(genericType.readableName()), new String(typeParameter.sourceName), parameterBoundAsString(typeParameter, false) },
+ new String[] { new String(typeArgument.shortReadableName()), new String(genericType.shortReadableName()), new String(typeParameter.sourceName), parameterBoundAsString(typeParameter, true) },
+ AbortCompilation | Error,
+ 0,
+ 1);
+ return;
+ }
+ this.handle(
+ IProblem.TypeArgumentMismatch,
+ new String[] { new String(typeArgument.readableName()), new String(genericType.readableName()), new String(typeParameter.sourceName), parameterBoundAsString(typeParameter, false) },
+ new String[] { new String(typeArgument.shortReadableName()), new String(genericType.shortReadableName()), new String(typeParameter.sourceName), parameterBoundAsString(typeParameter, true) },
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void undefinedLabel(BranchStatement statement) {
+ String[] arguments = new String[] {new String(statement.label)};
+ this.handle(
+ IProblem.UndefinedLabel,
+ arguments,
+ arguments,
+ statement.sourceStart,
+ statement.sourceEnd);
+}
+// can only occur inside binaries
+public void undefinedTypeVariableSignature(char[] variableName, ReferenceBinding binaryType) {
+ this.handle(
+ IProblem.UndefinedTypeVariable,
+ new String[] {new String(variableName), new String(binaryType.readableName()) },
+ new String[] {new String(variableName), new String(binaryType.shortReadableName())},
+ AbortCompilation | Error,
+ 0,
+ 1);
+}
+public void undocumentedEmptyBlock(int blockStart, int blockEnd) {
+ this.handle(
+ IProblem.UndocumentedEmptyBlock,
+ NoArgument,
+ NoArgument,
+ blockStart,
+ blockEnd);
+}
+public void unexpectedStaticModifierForField(SourceTypeBinding type, FieldDeclaration fieldDecl) {
+ String[] arguments = new String[] {new String(fieldDecl.name)};
+ this.handle(
+ IProblem.UnexpectedStaticModifierForField,
+ arguments,
+ arguments,
+ fieldDecl.sourceStart,
+ fieldDecl.sourceEnd);
+}
+public void unexpectedStaticModifierForMethod(ReferenceBinding type, AbstractMethodDeclaration methodDecl) {
+ String[] arguments = new String[] {new String(type.sourceName()), new String(methodDecl.selector)};
+ this.handle(
+ IProblem.UnexpectedStaticModifierForMethod,
+ arguments,
+ arguments,
+ methodDecl.sourceStart,
+ methodDecl.sourceEnd);
+}
+public void unhandledException(TypeBinding exceptionType, ASTNode location) {
+
+ boolean insideDefaultConstructor =
+ (this.referenceContext instanceof ConstructorDeclaration)
+ && ((ConstructorDeclaration)this.referenceContext).isDefaultConstructor();
+ boolean insideImplicitConstructorCall =
+ (location instanceof ExplicitConstructorCall)
+ && (((ExplicitConstructorCall) location).accessMode == ExplicitConstructorCall.ImplicitSuper);
+
+ this.handle(
+ insideDefaultConstructor
+ ? IProblem.UnhandledExceptionInDefaultConstructor
+ : (insideImplicitConstructorCall
+ ? IProblem.UndefinedConstructorInImplicitConstructorCall
+ : IProblem.UnhandledException),
+ new String[] {new String(exceptionType.readableName())},
+ new String[] {new String(exceptionType.shortReadableName())},
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void uninitializedBlankFinalField(FieldBinding binding, ASTNode location) {
+ String[] arguments = new String[] {new String(binding.readableName())};
+ this.handle(
+ IProblem.UninitializedBlankFinalField,
+ arguments,
+ arguments,
+ location.sourceStart,
+ fieldLocation(binding, location));
+}
+public void uninitializedLocalVariable(LocalVariableBinding binding, ASTNode location) {
+ String[] arguments = new String[] {new String(binding.readableName())};
+ this.handle(
+ IProblem.UninitializedLocalVariable,
+ arguments,
+ arguments,
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void unmatchedBracket(int position, ReferenceContext context, CompilationResult compilationResult) {
+ this.handle(
+ IProblem.UnmatchedBracket,
+ NoArgument,
+ NoArgument,
+ position,
+ position,
+ context,
+ compilationResult);
+}
+public void unnecessaryCast(CastExpression castExpression) {
+ TypeBinding castedExpressionType = castExpression.expression.resolvedType;
+ this.handle(
+ IProblem.UnnecessaryCast,
+ new String[]{ new String(castedExpressionType.readableName()), new String(castExpression.resolvedType.readableName())},
+ new String[]{ new String(castedExpressionType.shortReadableName()), new String(castExpression.resolvedType.shortReadableName())},
+ castExpression.sourceStart,
+ castExpression.sourceEnd);
+}
+public void unnecessaryCastForArgument(CastExpression castExpression, TypeBinding parameterType) {
+ TypeBinding castedExpressionType = castExpression.expression.resolvedType;
+ this.handle(
+ IProblem.UnnecessaryArgumentCast,
+ new String[]{ new String(castedExpressionType.readableName()), new String(castExpression.resolvedType.readableName()), new String(parameterType.readableName())},
+ new String[]{ new String(castedExpressionType.shortReadableName()), new String(castExpression.resolvedType.shortReadableName()), new String(parameterType.shortReadableName())},
+ castExpression.sourceStart,
+ castExpression.sourceEnd);
+}
+public void unnecessaryElse(ASTNode location) {
+ this.handle(
+ IProblem.UnnecessaryElse,
+ NoArgument,
+ NoArgument,
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void unnecessaryEnclosingInstanceSpecification(Expression expression, ReferenceBinding targetType) {
+ this.handle(
+ IProblem.IllegalEnclosingInstanceSpecification,
+ new String[]{ new String(targetType.readableName())},
+ new String[]{ new String(targetType.shortReadableName())},
+ expression.sourceStart,
+ expression.sourceEnd);
+}
+public void unnecessaryInstanceof(InstanceOfExpression instanceofExpression, TypeBinding checkType) {
+ TypeBinding expressionType = instanceofExpression.expression.resolvedType;
+ this.handle(
+ IProblem.UnnecessaryInstanceof,
+ new String[]{ new String(expressionType.readableName()), new String(checkType.readableName())},
+ new String[]{ new String(expressionType.shortReadableName()), new String(checkType.shortReadableName())},
+ instanceofExpression.sourceStart,
+ instanceofExpression.sourceEnd);
+}
+public void unqualifiedFieldAccess(NameReference reference, FieldBinding field) {
+ int end = reference.sourceEnd;
+ if (reference instanceof QualifiedNameReference) {
+ QualifiedNameReference qref = (QualifiedNameReference) reference;
+ end = (int) qref.sourcePositions[0];
+ }
+ this.handle(
+ IProblem.UnqualifiedFieldAccess,
+ new String[] {new String(field.declaringClass.readableName()), new String(field.name)},
+ new String[] {new String(field.declaringClass.shortReadableName()), new String(field.name)},
+ reference.sourceStart,
+ end);
+}
+public void unreachableCatchBlock(ReferenceBinding exceptionType, ASTNode location) {
+ this.handle(
+ IProblem.UnreachableCatch,
+ new String[] {
+ new String(exceptionType.readableName()),
+ },
+ new String[] {
+ new String(exceptionType.shortReadableName()),
+ },
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void unreachableCode(Statement statement) {
+ this.handle(
+ IProblem.CodeCannotBeReached,
+ NoArgument,
+ NoArgument,
+ statement.sourceStart,
+ statement.sourceEnd);
+}
+public void unresolvableReference(NameReference nameRef, Binding binding) {
+ int severity = Error;
+/* also need to check that the searchedType is the receiver type
+ if (binding instanceof ProblemBinding) {
+ ProblemBinding problem = (ProblemBinding) binding;
+ if (problem.searchType != null && problem.searchType.isHierarchyInconsistent())
+ severity = SecondaryError;
+ }
+*/
+ String[] arguments = new String[] {new String(binding.readableName())};
+ int end = nameRef.sourceEnd;
+ if (nameRef instanceof QualifiedNameReference) {
+ QualifiedNameReference ref = (QualifiedNameReference) nameRef;
+ if (ref.indexOfFirstFieldBinding >= 1)
+ end = (int) ref.sourcePositions[ref.indexOfFirstFieldBinding - 1];
+ }
+ this.handle(
+ IProblem.UndefinedName,
+ arguments,
+ arguments,
+ severity,
+ nameRef.sourceStart,
+ end);
+}
+public void unsafeCast(CastExpression castExpression) {
+ TypeBinding castedExpressionType = castExpression.expression.resolvedType;
+ this.handle(
+ IProblem.UnsafeGenericCast,
+ new String[]{ new String(castedExpressionType.readableName()), new String(castExpression.resolvedType.readableName())},
+ new String[]{ new String(castedExpressionType.shortReadableName()), new String(castExpression.resolvedType.shortReadableName())},
+ castExpression.sourceStart,
+ castExpression.sourceEnd);
+}
+public void unsafeRawConversion(Expression expression, TypeBinding expressionType, TypeBinding expectedType) {
+ this.handle(
+ IProblem.UnsafeRawConversion,
+ new String[] { new String(expressionType.readableName()), new String(expectedType.readableName()), new String(expectedType.erasure().readableName()) },
+ new String[] { new String(expressionType.shortReadableName()), new String(expectedType.shortReadableName()), new String(expectedType.erasure().shortReadableName()) },
+ expression.sourceStart,
+ expression.sourceEnd);
+}
+public void unsafeRawFieldAssignment(FieldBinding rawField, TypeBinding expressionType, ASTNode location) {
+ this.handle(
+ IProblem.UnsafeRawFieldAssignment,
+ new String[] {
+ new String(expressionType.readableName()), new String(rawField.name), new String(rawField.declaringClass.readableName()), new String(rawField.declaringClass.erasure().readableName()) },
+ new String[] {
+ new String(expressionType.shortReadableName()), new String(rawField.name), new String(rawField.declaringClass.shortReadableName()), new String(rawField.declaringClass.erasure().shortReadableName()) },
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void unsafeRawInvocation(ASTNode location, TypeBinding receiverType, MethodBinding method) {
+ if (method.isConstructor()) {
+ this.handle(
+ IProblem.UnsafeRawConstructorInvocation,
+ new String[] {
+ new String(receiverType.readableName()),
+ parametersAsString(method.original().parameters, false),
+ new String(receiverType.erasure().readableName()),
+ },
+ new String[] {
+ new String(receiverType.shortReadableName()),
+ parametersAsString(method.original().parameters, true),
+ new String(receiverType.erasure().shortReadableName()),
+ },
+ location.sourceStart,
+ location.sourceEnd);
+ } else {
+ this.handle(
+ IProblem.UnsafeRawMethodInvocation,
+ new String[] {
+ new String(method.selector),
+ parametersAsString(method.original().parameters, false),
+ new String(receiverType.readableName()),
+ new String(receiverType.erasure().readableName()),
+ },
+ new String[] {
+ new String(method.selector),
+ parametersAsString(method.original().parameters, true),
+ new String(receiverType.shortReadableName()),
+ new String(receiverType.erasure().shortReadableName()),
+ },
+ location.sourceStart,
+ location.sourceEnd);
+ }
+}
+public void unsafeReturnTypeOverride(MethodBinding currentMethod, MethodBinding inheritedMethod, ASTNode location) {
+
+ this.handle(
+ IProblem.UnsafeReturnTypeOverride,
+ new String[] {
+ new String(currentMethod.returnType.readableName()),
+ new String(currentMethod.selector),
+ parametersAsString(currentMethod.original().parameters, false),
+ new String(currentMethod.declaringClass.readableName()),
+ new String(inheritedMethod.returnType.readableName()),
+ //new String(inheritedMethod.returnType.erasure().readableName()),
+ },
+ new String[] {
+ new String(currentMethod.returnType.shortReadableName()),
+ new String(currentMethod.selector),
+ parametersAsString(currentMethod.original().parameters, true),
+ new String(currentMethod.declaringClass.shortReadableName()),
+ new String(inheritedMethod.returnType.shortReadableName()),
+ //new String(inheritedMethod.returnType.erasure().shortReadableName()),
+ },
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void unusedArgument(LocalDeclaration localDecl) {
+
+ String[] arguments = new String[] {new String(localDecl.name)};
+ this.handle(
+ IProblem.ArgumentIsNeverUsed,
+ arguments,
+ arguments,
+ localDecl.sourceStart,
+ localDecl.sourceEnd);
+}
+public void unusedDeclaredThrownException(ReferenceBinding exceptionType, AbstractMethodDeclaration method, ASTNode location) {
+ if (method.isConstructor()) {
+ this.handle(
+ IProblem.UnusedConstructorDeclaredThrownException,
+ new String[] {
+ new String(method.binding.declaringClass.readableName()),
+ parametersAsString(method.binding.parameters, false),
+ new String(exceptionType.readableName()),
+ },
+ new String[] {
+ new String(method.binding.declaringClass.shortReadableName()),
+ parametersAsString(method.binding.parameters, true),
+ new String(exceptionType.shortReadableName()),
+ },
+ location.sourceStart,
+ location.sourceEnd);
+ } else {
+ this.handle(
+ IProblem.UnusedMethodDeclaredThrownException,
+ new String[] {
+ new String(method.binding.declaringClass.readableName()),
+ new String(method.selector),
+ parametersAsString(method.binding.parameters, false),
+ new String(exceptionType.readableName()),
+ },
+ new String[] {
+ new String(method.binding.declaringClass.shortReadableName()),
+ new String(method.selector),
+ parametersAsString(method.binding.parameters, true),
+ new String(exceptionType.shortReadableName()),
+ },
+ location.sourceStart,
+ location.sourceEnd);
+ }
+}
+public void unusedImport(ImportReference importRef) {
+ String[] arguments = new String[] { CharOperation.toString(importRef.tokens) };
+ this.handle(
+ IProblem.UnusedImport,
+ arguments,
+ arguments,
+ importRef.sourceStart,
+ importRef.sourceEnd);
+}
+public void unusedLocalVariable(LocalDeclaration localDecl) {
+ String[] arguments = new String[] {new String(localDecl.name)};
+ this.handle(
+ IProblem.LocalVariableIsNeverUsed,
+ arguments,
+ arguments,
+ localDecl.sourceStart,
+ localDecl.sourceEnd);
+}
+public void unusedPrivateConstructor(ConstructorDeclaration constructorDecl) {
+
+ if (computeSeverity(IProblem.UnusedPrivateConstructor) == Ignore) return;
+
+ // no complaint for no-arg constructors (or default ones) - known pattern to block instantiation
+ if (constructorDecl.arguments == null || constructorDecl.arguments.length == 0) return;
+
+ MethodBinding constructor = constructorDecl.binding;
+ this.handle(
+ IProblem.UnusedPrivateConstructor,
+ new String[] {
+ new String(constructor.declaringClass.readableName()),
+ parametersAsString(constructor.parameters, false)
+ },
+ new String[] {
+ new String(constructor.declaringClass.shortReadableName()),
+ parametersAsString(constructor.parameters, true)
+ },
+ constructorDecl.sourceStart,
+ constructorDecl.sourceEnd);
+}
+public void unusedPrivateField(FieldDeclaration fieldDecl) {
+
+ if (computeSeverity(IProblem.UnusedPrivateField) == Ignore) return;
+
+ FieldBinding field = fieldDecl.binding;
+
+ if (CharOperation.equals(TypeConstants.SERIALVERSIONUID, field.name)
+ && field.isStatic()
+ && field.isFinal()
+ && BaseTypes.LongBinding == field.type) {
+ return; // do not report unused serialVersionUID field
+ }
+ if (CharOperation.equals(TypeConstants.SERIALPERSISTENTFIELDS, field.name)
+ && field.isStatic()
+ && field.isFinal()
+ && field.type.dimensions() == 1
+ && CharOperation.equals(TypeConstants.CharArray_JAVA_IO_OBJECTSTREAMFIELD, field.type.leafComponentType().readableName())) {
+ return; // do not report unused serialPersistentFields field
+ }
+ this.handle(
+ IProblem.UnusedPrivateField,
+ new String[] {
+ new String(field.declaringClass.readableName()),
+ new String(field.name),
+ },
+ new String[] {
+ new String(field.declaringClass.shortReadableName()),
+ new String(field.name),
+ },
+ fieldDecl.sourceStart,
+ fieldDecl.sourceEnd);
+}
+public void unusedPrivateMethod(AbstractMethodDeclaration methodDecl) {
+
+ if (computeSeverity(IProblem.UnusedPrivateMethod) == Ignore) return;
+
+ MethodBinding method = methodDecl.binding;
+
+ // no report for serialization support 'void readObject(ObjectInputStream)'
+ if (!method.isStatic()
+ && BaseTypes.VoidBinding == method.returnType
+ && method.parameters.length == 1
+ && method.parameters[0].dimensions() == 0
+ && CharOperation.equals(method.selector, TypeConstants.READOBJECT)
+ && CharOperation.equals(TypeConstants.CharArray_JAVA_IO_OBJECTINPUTSTREAM, method.parameters[0].readableName())) {
+ return;
+ }
+ // no report for serialization support 'void writeObject(ObjectOutputStream)'
+ if (!method.isStatic()
+ && BaseTypes.VoidBinding == method.returnType
+ && method.parameters.length == 1
+ && method.parameters[0].dimensions() == 0
+ && CharOperation.equals(method.selector, TypeConstants.WRITEOBJECT)
+ && CharOperation.equals(TypeConstants.CharArray_JAVA_IO_OBJECTOUTPUTSTREAM, method.parameters[0].readableName())) {
+ return;
+ }
+ // no report for serialization support 'Object readResolve()'
+ if (!method.isStatic()
+ && TypeIds.T_Object == method.returnType.id
+ && method.parameters.length == 0
+ && CharOperation.equals(method.selector, TypeConstants.READRESOLVE)) {
+ return;
+ }
+ // no report for serialization support 'Object writeReplace()'
+ if (!method.isStatic()
+ && TypeIds.T_Object == method.returnType.id
+ && method.parameters.length == 0
+ && CharOperation.equals(method.selector, TypeConstants.WRITEREPLACE)) {
+ return;
+ }
+ this.handle(
+ IProblem.UnusedPrivateMethod,
+ new String[] {
+ new String(method.declaringClass.readableName()),
+ new String(method.selector),
+ parametersAsString(method.parameters, false)
+ },
+ new String[] {
+ new String(method.declaringClass.shortReadableName()),
+ new String(method.selector),
+ parametersAsString(method.parameters, true)
+ },
+ methodDecl.sourceStart,
+ methodDecl.sourceEnd);
+}
+public void unusedPrivateType(TypeDeclaration typeDecl) {
+
+ if (computeSeverity(IProblem.UnusedPrivateType) == Ignore) return;
+
+ ReferenceBinding type = typeDecl.binding;
+ this.handle(
+ IProblem.UnusedPrivateType,
+ new String[] {
+ new String(type.readableName()),
+ },
+ new String[] {
+ new String(type.shortReadableName()),
+ },
+ typeDecl.sourceStart,
+ typeDecl.sourceEnd);
+}
+public void useAssertAsAnIdentifier(int sourceStart, int sourceEnd) {
+ this.handle(
+ IProblem.UseAssertAsAnIdentifier,
+ NoArgument,
+ NoArgument,
+ sourceStart,
+ sourceEnd);
+}
+public void useEnumAsAnIdentifier(int sourceStart, int sourceEnd) {
+ this.handle(
+ IProblem.UseEnumAsAnIdentifier,
+ NoArgument,
+ NoArgument,
+ sourceStart,
+ sourceEnd);
+}
+public void variableTypeCannotBeVoid(AbstractVariableDeclaration varDecl) {
+ String[] arguments = new String[] {new String(varDecl.name)};
+ this.handle(
+ IProblem.VariableTypeCannotBeVoid,
+ arguments,
+ arguments,
+ varDecl.sourceStart,
+ varDecl.sourceEnd);
+}
+public void variableTypeCannotBeVoidArray(AbstractVariableDeclaration varDecl) {
+ String[] arguments = new String[] {new String(varDecl.name)};
+ this.handle(
+ IProblem.VariableTypeCannotBeVoidArray,
+ arguments,
+ arguments,
+ varDecl.sourceStart,
+ varDecl.sourceEnd);
+}
+public void visibilityConflict(MethodBinding currentMethod, MethodBinding inheritedMethod) {
+ this.handle(
+ // Cannot reduce the visibility of the inherited method from %1
+ // 8.4.6.3 - The access modifier of an hiding method must provide at least as much access as the hidden method.
+ // 8.4.6.3 - The access modifier of an overiding method must provide at least as much access as the overriden method.
+ IProblem.MethodReducesVisibility,
+ new String[] {new String(inheritedMethod.declaringClass.readableName())},
+ new String[] {new String(inheritedMethod.declaringClass.shortReadableName())},
+ currentMethod.sourceStart(),
+ currentMethod.sourceEnd());
+}
+public void wildcardAssignment(TypeBinding variableType, TypeBinding expressionType, ASTNode location) {
+ this.handle(
+ IProblem.WildcardFieldAssignment,
+ new String[] {
+ new String(expressionType.readableName()), new String(variableType.readableName()) },
+ new String[] {
+ new String(expressionType.shortReadableName()), new String(variableType.shortReadableName()) },
+ location.sourceStart,
+ location.sourceEnd);
+}
+public void wildcardInvocation(ASTNode location, TypeBinding receiverType, MethodBinding method, TypeBinding[] arguments) {
+ TypeBinding offendingArgument = null;
+ TypeBinding offendingParameter = null;
+ for (int i = 0, length = method.parameters.length; i < length; i++) {
+ TypeBinding parameter = method.parameters[i];
+ if (parameter.isWildcard() && (((WildcardBinding) parameter).kind != Wildcard.SUPER)) {
+ offendingParameter = parameter;
+ offendingArgument = arguments[i];
+ break;
+ }
+ }
+
+ if (method.isConstructor()) {
+ this.handle(
+ IProblem.WildcardConstructorInvocation,
+ new String[] {
+ new String(receiverType.sourceName()),
+ parametersAsString(method.parameters, false),
+ new String(receiverType.readableName()),
+ parametersAsString(arguments, false),
+ new String(offendingArgument.readableName()),
+ new String(offendingParameter.readableName()),
+ },
+ new String[] {
+ new String(receiverType.sourceName()),
+ parametersAsString(method.parameters, true),
+ new String(receiverType.shortReadableName()),
+ parametersAsString(arguments, true),
+ new String(offendingArgument.shortReadableName()),
+ new String(offendingParameter.shortReadableName()),
+ },
+ location.sourceStart,
+ location.sourceEnd);
+ } else {
+ this.handle(
+ IProblem.WildcardMethodInvocation,
+ new String[] {
+ new String(method.selector),
+ parametersAsString(method.parameters, false),
+ new String(receiverType.readableName()),
+ parametersAsString(arguments, false),
+ new String(offendingArgument.readableName()),
+ new String(offendingParameter.readableName()),
+ },
+ new String[] {
+ new String(method.selector),
+ parametersAsString(method.parameters, true),
+ new String(receiverType.shortReadableName()),
+ parametersAsString(arguments, true),
+ new String(offendingArgument.shortReadableName()),
+ new String(offendingParameter.shortReadableName()),
+ },
+ location.sourceStart,
+ location.sourceEnd);
+ }
+}
+public void wrongSequenceOfExceptionTypesError(TryStatement statement, TypeBinding exceptionType, int under, TypeBinding hidingExceptionType) {
+ //the two catch block under and upper are in an incorrect order.
+ //under should be define BEFORE upper in the source
+
+ TypeReference typeRef = statement.catchArguments[under].type;
+ this.handle(
+ IProblem.InvalidCatchBlockSequence,
+ new String[] {
+ new String(exceptionType.readableName()),
+ new String(hidingExceptionType.readableName()),
+ },
+ new String[] {
+ new String(exceptionType.shortReadableName()),
+ new String(hidingExceptionType.shortReadableName()),
+ },
+ typeRef.sourceStart,
+ typeRef.sourceEnd);
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/ProblemSeverities.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/ProblemSeverities.js
new file mode 100644
index 0000000..066a21b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/ProblemSeverities.js
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.problem;
+
+public interface ProblemSeverities {
+
+ final int Ignore = -1; // during handling only
+ final int Warning = 0; // during handling only
+
+ final int Error = 1; // when bit is set: problem is error, if not it is a warning
+ final int AbortCompilation = 2;
+ final int AbortCompilationUnit = 4;
+ final int AbortType = 8;
+ final int AbortMethod = 16;
+ final int Abort = 30; // 2r11110
+ final int SecondaryError = 64;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/ShouldNotImplement.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/ShouldNotImplement.js
new file mode 100644
index 0000000..290285a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/ShouldNotImplement.js
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.problem;
+
+/*
+ * Special unchecked exception type used
+ * to denote implementation that should never be reached.
+ *
+ * (internal only)
+ */
+public class ShouldNotImplement extends RuntimeException {
+ private static final long serialVersionUID = 2669970476264283736L; // backward compatible
+ public ShouldNotImplement(String message) {
+ super(message);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/messages.properties b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/messages.properties
new file mode 100644
index 0000000..4e6bed4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/messages.properties
@@ -0,0 +1,465 @@
+###############################################################################
+# Copyright (c) 2000, 2004 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Common Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/cpl-v10.html
+#
+# Contributors:
+# IBM Corporation - initial API and implementation
+###############################################################################
+0 = {0}
+1 = super cannot be used in.jsScript.lang.Object
+2 = {0} cannot be resolved to a type
+3 = The type {0} is not visible
+4 = The type {0} is ambiguous
+5 = The type {0} is deprecated
+6 = The nested type {0} cannot be referenced using its binary name
+7 = The private type {0} is never used locally
+
+15 = Incompatible operand types {0} and {1}
+16 = Incompatible conditional operand types {0} and {1}
+17 = Type mismatch: cannot convert from {0} to {1}
+18 = The static member type {0}.{1} should be accessed directly
+
+20 = No enclosing instance of type {0} is accessible to invoke the super constructor. Must define a constructor and explicitly qualify its super constructor invocation with an instance of {0} (e.g. x.super() where x is an instance of {0}).
+21 = No enclosing instance of type {0} is accessible. Must qualify the allocation with an enclosing instance of type {0} (e.g. x.new A() where x is an instance of {0}).
+22 = No enclosing instance of the type {0} is accessible in scope
+23 = Illegal enclosing instance specification for type {0}
+24 = Cannot define static initializer in inner type {0}
+25 = Cannot refer to a non-final variable {0} inside an inner class defined in a different function
+26 = The member interface {0} can only be defined inside a top-level class or interface
+27 = Cannot use an expression of the type {0} as a valid enclosing instance
+28 = No enclosing instance of type {0} is available due to some intermediate constructor invocation
+29 = An anonymous class cannot subclass the final class {0}
+
+50 = {0} cannot be resolved
+51 = The local variable {0} may not have been initialized
+52 = void is an invalid type for the variable {0}
+53 = An array of void is an invalid type for the variable {0}
+54 = An array of void is an invalid type
+55 = Duplicate local variable {0}
+56 = Duplicate parameter {0}
+57 = The final local variable {0} may already have been assigned
+58 = The final local variable {0} cannot be assigned. It must be blank and not using a compound assignment
+
+60 = The final local variable {0} cannot be assigned, since it is defined in an enclosing type
+61 = The local variable {0} is never read
+62 = The parameter {0} is never read
+63 = The code of function {0}({1}) is exceeding the 65535 bytes limit
+64 = The code for the static initializer is exceeding the 65535 bytes limit
+65 = Too many parameters, parameter {0} is exceeding the limit of 255 words eligible for function parameters
+66 = Too many local variables, local variable {0} is exceeding the limit of 65535 words eligible for function local variables
+67 = Too many synthetic parameters, emulated parameter {0} is exceeding the limit of 255 words eligible for function parameters
+68 = Too many array dimensions. Maximum is 255
+69 = The code of constructor {0}({1}) is exceeding the 65535 bytes limit
+70 = {0} cannot be resolved or is not a var
+71 = The var {0} is not visible
+72 = The var {0} is ambiguous
+73 = The var {0}.{1} is deprecated
+74 = Cannot make a static reference to the non-static var {0}
+75 = Cannot reference a var before it is defined
+76 = The static var {0}.{1} should be accessed in a static way
+77 = The private var {0}.{1} is never read locally
+78 = The static var {0}.{1} should be accessed directly
+79 = Unqualified access to the var {0}.{1}
+80 = The final var {0}.{1} cannot be assigned. It must be blank in this context, not qualified and not in compound assignment
+81 = The blank final var {0} may not have been initialized
+82 = The final var {0} may already have been assigned
+
+90 = The local variable {0} is hiding another local variable defined in an enclosing type scope
+91 = The local variable {0} is hiding a var from type {1}
+92 = The var {0}.{1} is hiding another local variable defined in an enclosing type scope
+93 = The var {0}.{1} is hiding a var from type {2}
+94 = The parameter {0} is hiding another local variable defined in an enclosing type scope
+95 = The parameter {0} is hiding a var from type {1}
+96 = The serializable class {0} does not declare a static final serialVersionUID var of type long
+
+100 = The function {1}({2}) is undefined for the type {0}
+101 = The function {1}({2}) from the type {0} is not visible
+102 = The function {1}({2}) is ambiguous for the type {0}
+103 = The function {1}({2}) from the type {0} is deprecated
+104 = Cannot directly invoke the abstract function {1}({2}) for the type {0}
+105 = Void functions cannot return a value
+106 = Cannot return a void result
+107 = This function requires a body instead of a semicolon
+108 = This function must return a result of type {0}
+
+110 = This function has a constructor name
+111 = Return type for the function is missing
+112 = Native functions do not specify a body
+113 = Abstract functions do not specify a body
+114 = Cannot invoke {1}({2}) on the primitive type {0}
+115 = The function {1}({2}) in the type {0} is not applicable for the arguments ({3})
+116 = Cannot invoke {1}({2}) on the array type {0}
+117 = The static function {1}({2}) from the type {0} should be accessed in a static way
+118 = The private function {1}({2}) from the type {0} is never used locally
+119 = The static function {1}({2}) from the type {0} should be accessed directly
+
+130 = The constructor {0}({1}) is undefined
+131 = The constructor {0}({1}) is not visible
+132 = The constructor {0}({1}) is ambiguous
+133 = The constructor {0}({1}) is deprecated
+134 = The private constructor {0}({1}) is never used locally
+135 = Cannot refer to an instance var {0} while explicitly invoking a constructor
+136 = Cannot refer to an instance function while explicitly invoking a constructor
+137 = Recursive constructor invocation {0}({1})
+138 = Cannot refer to ''this'' nor ''super'' while explicitly invoking a constructor
+139 = Constructor call must be the first statement in a constructor
+140 = Implicit super constructor {0}({1}) is undefined for default constructor. Must define an explicit constructor
+141 = Implicit super constructor {0}({1}) is not visible for default constructor. Must define an explicit constructor
+142 = Implicit super constructor {0}({1}) is ambiguous for default constructor. Must define an explicit constructor
+143 = Implicit super constructor {0}({1}) is undefined. Must explicitly invoke another constructor
+144 = Implicit super constructor {0}({1}) is not visible. Must explicitly invoke another constructor
+145 = Implicit super constructor {0}({1}) is ambiguous. Must explicitly invoke another constructor
+146 = Default constructor cannot handle exception type {0} thrown by implicit super constructor. Must define an explicit constructor
+147 = Unhandled exception type {0} thrown by implicit super constructor
+
+150 = The type of the expression must be an array type but it resolved to {0}
+151 = Must explicitly convert the char[] to a String
+152 = String constant is exceeding the limit of 65535 bytes of UTF8 encoding
+153 = case expressions must be constant expressions
+154 = The literal {1} of type {0} is out of range
+156 = Cannot cast from {0} to {1}
+157 = Cannot instantiate the type {0}, since it is not a concrete class
+158 = Cannot define dimension expressions when an array initializer is provided
+159 = Variable must provide either dimension expressions or an array initializer
+160 = The operator {0} is undefined for the argument type(s) {1}
+161 = Unreachable code
+162 = Cannot return from within an initializer
+163 = Initializer does not complete normally
+164 = Expression must return a value
+165 = Unreachable catch block for {0}. Only more specific exceptions are thrown and handled by previous catch block(s).
+166 = The default case is already defined
+167 = Unreachable catch block for {0}. This exception is never thrown from the try statement body
+168 = Unhandled exception type {0}
+169 = case constant must be a char, byte, short, or int instead of {0}
+170 = Duplicate case
+171 = Duplicate label {0}
+172 = break cannot be used outside of a loop or a switch
+173 = continue cannot be used outside of a loop
+174 = The label {0} is missing
+175 = {0} is not a valid type''s argument for the synchronized statement
+176 = null is not a valid argument for the synchronized statement
+177 = Cannot throw null
+178 = The assignment to variable {0} has no effect
+179 = Possible accidental assignment in place of a comparison. A condition expression should not be reduced to an assignment
+180 = Unnecessary semicolon
+181 = Unnecessary cast to type {1} for expression of type {0}
+182 = Unnecessary cast to type {1} for expression of type {0}. It is already compatible with the argument type {2}
+183 = The expression of type {0} is already an instance of type {1}
+184 = finally block does not complete normally
+185 = The declared exception {3} is not actually thrown by the function {1}({2}) from type {0}
+186 = The declared exception {2} is not actually thrown by the constructor {0}({1})
+187 = Unreachable catch block for {0}. It is already handled by the catch block for {1}
+188 = Empty control-flow statement
+189 = Statement unnecessarily nested within else clause. The corresponding then clause does not complete normally
+
+190 = Read access to enclosing var {0}.{1} is emulated by a synthetic accessor function. Increasing its visibility will improve your performance
+191 = Write access to enclosing var {0}.{1} is emulated by a synthetic accessor function. Increasing its visibility will improve your performance
+192 = Access to enclosing function {1}({2}) from the type {0} is emulated by a synthetic accessor function. Increasing its visibility will improve your performance
+193 = Access to enclosing constructor {0}({1}) is emulated by a synthetic accessor function. Increasing its visibility will improve your performance
+195 = The function {1} is defined in an inherited type and an enclosing scope
+196 = The var {0} is defined in an inherited type and an enclosing scope
+197 = The type {0} is defined in an inherited type and an enclosing scope
+198 = Cannot allocate the member type {0} using its compound name when qualified by an enclosing instance. The member type name is resolved relatively to the qualifying instance type
+
+200 = Cannot use {0} in a static context
+201 = Cannot make a static reference to the non-static function {1}({2}) from the type {0}
+202 = Cannot specify an array dimension after an empty dimension
+203 = Invalid cast type expression
+204 = Syntax error on token "{0}", {1} expected
+205 = Syntax error on token "{0}", no accurate correction available
+206 = Invalid argument to operation ++/--
+207 = Interfaces cannot have constructors
+208 = Array constants can only be used in initializers
+209 = Syntax error on keyword "{0}"; {1} expected
+210 = Syntax error on keyword "{0}", no accurate correction available
+
+220 = Unmatched bracket
+221 = The primitive type {0} of {1} does not have a var {2}
+222 = Invalid expression as statement
+223 = The left-hand side of an assignment must be a variable
+224 = Missing semicolon
+225 = Invalid parenthesized expression
+
+230 = Syntax error on token "{0}", {1} expected before this token
+231 = Syntax error on token "{0}", {1} expected after this token
+232 = Syntax error on token "{0}", delete this token
+233 = Syntax error on tokens, delete these tokens
+234 = Syntax error on tokens, they can be merge to form {0}
+235 = Syntax error on token "{0}", invalid {1}
+236 = Syntax error on token(s), misplaced construct(s)
+237 = Syntax error on tokens, {0} expected instead
+238 = Syntax error on tokens, no accurate correction available
+239 = Syntax error, unexpected {0}
+240 = Syntax error, insert "{0}" to complete {1}
+241 = Syntax error, insert "{0}" to complete scope
+242 = Syntax error, insert "{0}" to complete phrase
+
+250 = Unexpected end of file
+251 = Invalid hex literal number
+252 = Invalid octal literal number
+253 = Invalid character constant
+254 = Invalid escape sequence (valid ones are \\b \\t \\n \\f \\r \\" \\'' \\\\ )
+255 = Invalid input
+256 = Invalid unicode
+257 = Invalid float literal number
+258 = Null source string
+259 = String literal is not properly closed by a double-quote
+260 = Unexpected end of comment
+261 = Non-externalized string literal; it should be followed by //$NON-NLS-<n>$
+262 = Invalid digit (valid ones are 0..9)
+
+300 = The interface {0} cannot define an initializer
+301 = Duplicate modifier for the type {0}
+302 = Illegal modifier for the class {0}; only public, abstract & final are permitted
+303 = Illegal modifier for the interface {0}; only public & abstract are permitted
+304 = Illegal modifier for the member class {0}; only public, protected, private, static, abstract & final are permitted
+305 = Illegal modifier for the member interface {0}; only public, protected, private, static & abstract are permitted
+306 = Illegal modifier for the local class {0}; only one of abstract or final is permitted
+307 = Access to the type {0} is restricted as specified by {1}
+308 = The class {0} can be either abstract or final, not both
+309 = The interface member type {0} can only be public
+310 = The member type {0} can only set one of public / protected / private
+311 = The member type {0} cannot be declared static; static types can only be declared in static or top level types
+312 = The interface {0} cannot be the superclass of {1}; a superclass must be a class
+313 = The type {1} cannot subclass the final class {0}
+314 = Duplicate interface {0} for the type {1}
+315 = The class {0} cannot be a superinterface of {1}; a superinterface must be an interface
+316 = Cycle detected: the type {0} cannot extend/implement itself or one of its own member types
+317 = A cycle exists in the type hierarchy between {0} and {1}
+318 = Nested type {0} hides an enclosing type
+319 = Duplicate nested type {0}
+320 = Cannot throw the type {0}
+321 = The package {0} collides with a type
+322 = The type {1} collides with a package
+323 = The type {1} is already defined
+324 = The type {0} cannot be resolved. It is indirectly referenced from required .class files
+325 = The public type {1} must be defined in its own file
+326 = A package must be specified in {0} or a default package created
+327 = The hierarchy of the type {0} is inconsistent
+328 = The declared package does not match the expected package {0}
+329 = The type.jsScript.lang.Object cannot have a superclass or superinterfaces
+
+###[obsolete] 330 = {0} cannot be resolved or is not a valid superclass
+###[obsolete] 331 = Superclass {0} is not visible
+###[obsolete] 332 = Superclass {0} is ambiguous
+###[obsolete] 333 = Superclass {0} cannot be referenced using its binary name
+###[obsolete] 334 = Superclass {0} is defined in an inherited type and an enclosing scope
+###[obsolete] 335 = {0} cannot be resolved or is not a valid superinterface
+###[obsolete] 336 = Superinterface {0} is not visible
+###[obsolete] 337 = Superinterface {0} is ambiguous
+###[obsolete] 338 = Superinterface {0} cannot be referenced using its binary name
+###[obsolete] 339 = Superinterface {0} is defined in an inherited type and an enclosing scope
+
+340 = Duplicate var {0}.{1}
+341 = Duplicate modifier for the var {0}
+342 = Illegal modifier for the var {0}; only public, protected, private, static, final, transient & volatile are permitted
+343 = Illegal modifier for the interface var {0}; only public, static & final are permitted
+344 = The var {0} can only set one of public / protected / private
+345 = The var {0} can be either final or volatile, not both
+346 = The var {0} cannot be declared static; static vars can only be declared in static or top level types
+
+###[obsolete] 350 = {2} cannot be resolved (or is not a valid type) for the var {1}.{0}
+###[obsolete] 351 = The type {2} is not visible for the var {1}.{0}
+###[obsolete] 352 = The type {2} is ambiguous for the var {1}.{0}
+###[obsolete] 353 = The var type {2} cannot be referenced using its binary name
+###[obsolete] 354 = The var type {2} is defined in an inherited type and an enclosing scope
+
+355 = Duplicate function {0}({2}) in type {1}
+356 = Illegal modifier for parameter {0}; only final is permitted
+357 = Duplicate modifier for the function {1} in type {0}
+358 = Illegal modifier for the function {1} in type {0}
+359 = Illegal modifier for the interface function {1} in type {0}; only public & abstract are permitted
+360 = The function {1} in type {0} can only set one of public / protected / private
+361 = The function {1} cannot be declared static; static functions can only be declared in a static or top level type
+362 = The abstract function {1} in type {0} can only set a visibility modifier, one of public or protected
+363 = The abstract function {1} in type {0} can only be defined by an abstract class
+364 = void is an invalid type for the parameter {1} of the function {0}
+365 = An array of void is an invalid type for the parameter {1} of the function {0}
+366 = An array of void is an invalid return type for the function {0}
+367 = The native function {1} cannot also be declared strictfp
+368 = Duplicate modifier for parameter {0}
+
+###[obsolete] 370 = {2} cannot be resolved (or is not a valid type) for the parameter {1} of the function {0}
+###[obsolete] 371 = The type {2} is not visible for the parameter {1} of the function {0}
+###[obsolete] 372 = The type {2} is ambiguous for the parameter {1} of the function {0}
+###[obsolete] 373 = The parameter type {2} cannot be referenced using its binary name
+###[obsolete] 374 = The parameter type {2} is defined in an inherited type and an enclosing scope
+###[obsolete] 375 = {1} cannot be resolved (or is not an exception type) for the function {0}
+###[obsolete] 376 = The exception type {1} is not visible for the function {0}
+###[obsolete] 377 = The exception type {1} is ambiguous for the function {0}
+###[obsolete] 378 = The exception type {1} cannot be referenced using its binary name
+###[obsolete] 379 = The exception type {1} is defined in an inherited type and an enclosing scope
+###[obsolete] 380 = {1} cannot be resolved (or is not a valid return type) for the function {0}
+###[obsolete] 381 = The return type {1} is not visible for the function {0}
+###[obsolete] 382 = The return type {1} is ambiguous for the function {0}
+###[obsolete] 383 = The return type {1} cannot be referenced using its binary name
+###[obsolete] 384 = The return type {1} is defined in an inherited type and an enclosing scope
+
+385 = The import {0} conflicts with a type defined in the same file
+386 = The import {0} collides with another imported type
+387 = Only a type can be imported. {0} resolves to a package
+388 = The import {0} is never used
+390 = The import {0} cannot be resolved
+
+###[obsolete] 391 = The imported type {0} is not visible
+###[obsolete] 392 = The imported type {0} is ambiguous
+###[obsolete] 393 = The imported type {0} cannot be referenced using its binary name
+###[obsolete] 394 = The imported type {0} is defined in an inherited type and an enclosing scope
+
+395 = Duplicate modifier for the variable {0}
+396 = Illegal modifier for the variable {0}; only final is permitted
+
+400 = Class must implement the inherited abstract function {0}
+401 = Cannot override the final function from {0}
+402 = Exception {0} is not compatible with throws clause in {1}
+403 = Exception {0} in throws clause of {1} is not compatible with {2}
+404 = The return type is incompatible with {0}
+405 = The inherited function {0} cannot hide the public abstract function in {1}
+406 = This instance function cannot override the static function from {0}
+407 = This static function cannot hide the instance function from {0}
+408 = The static function {0} conflicts with the abstract function in {1}
+409 = Cannot reduce the visibility of the inherited function from {0}
+410 = The function {0} does not override the inherited function from {1} since it is private to a different package.
+411 = This class must implement the inherited abstract function {1}, but cannot override it since it is not visible from {0}. Either make the type abstract or make the inherited function visible.
+412 = The function {0} overrides a deprecated function from {1}
+413 = The return type is incompatible with {0}, thus this interface cannot be implemented
+414 = Exception {0} is not compatible with throws clause in {1}, thus this interface cannot be implemented
+
+420 = Code snippet support cannot find the class {0}
+421 = Code snippet support cannot find the function {0}.{1}({2})
+422 = super cannot be used in the code snippet code
+
+430 = Too many constants, the constant pool for {0} would exceed 65536 entries
+431 = The type generates a string that requires more than 65535 bytes to encode in Utf8 format in the constant pool
+
+432 = Too many vars for type {0}. Maximum is 65535
+433 = Too many functions for type {0}. Maximum is 65535
+
+440 = ''assert'' should not be used as an identifier, since it is a reserved keyword from source level 1.4 on
+441 = ''enum'' should not be used as an identifier, since it is a reserved keyword from source level 1.5 on
+
+450 = {0} {1}
+
+460 = Empty block should be documented
+
+### DOC
+470 = Unexpected tag
+471 = Missing tag for parameter {0}
+472 = Missing parameter name
+473 = Duplicate tag for parameter
+474 = Parameter {0} is not declared
+475 = Missing tag for return type
+476 = Duplicate tag for return type
+477 = Missing tag for declared exception {0}
+478 = Missing class name
+479 = Invalid class name
+480 = Duplicate tag for thrown exception
+481 = Exception {0} is not declared
+482 = Missing reference
+483 = Invalid reference
+484 = Malformed link reference
+485 = Invalid parameters declaration
+486 = Missing comment for {0} declaration
+487 = Invalid tag
+488 = {0} cannot be resolved or is not a var
+489 = The var {0} is not visible
+490 = The var {0} is ambiguous
+491 = The var {0}.{1} is deprecated
+492 = The constructor {0}({1}) is undefined
+493 = The constructor {0}({1}) is not visible
+494 = The constructor {0}({1}) is ambiguous
+495 = The constructor {0}({1}) is deprecated
+496 = The function {1}({2}) is undefined for the type {0}
+497 = The function {1}({2}) from the type {0} is not visible
+498 = The function {1}({2}) is ambiguous for the type {0}
+499 = The function {1}({2}) from the type {0} is deprecated
+500 = Cannot invoke {1}({2}) on the primitive type {0}
+501 = The function {1}({2}) in the type {0} is not applicable for the arguments ({3})
+502 = Cannot invoke {1}({2}) on the array type {0}
+503 = {0} cannot be resolved to a type
+504 = The type {0} is not visible
+505 = The type {0} is ambiguous
+506 = The type {0} is deprecated
+507 = The nested type {0} cannot be referenced using its binary name
+508 = The function {1} is defined in an inherited type and an enclosing scope
+509 = The var {0} is defined in an inherited type and an enclosing scope
+510 = The type {0} is defined in an inherited type and an enclosing scope
+511 = {0} is an ambiguous function reference or is not a var
+512 = Missing closing brace for inline tag
+513 = Missing #: "{0}"
+514 = Malformed reference (missing end space separator)
+515 = Missing return type description
+516 = Only static var reference is allowed for @value tag
+517 = Unexpected text
+519 = Javadoc:
+
+### GENERICS
+520 = Duplicate type parameter {0}
+521 = Cannot refer to the type parameter {0} as a supertype
+522 = Cannot make a static reference to the type parameter {0}
+523 = The type.jsScript.lang.Object cannot be declared as a generic
+524 = The type {0} is not generic; it cannot be parameterized with arguments <{1}>
+525 = Incorrect number of arguments for type {0}; it cannot be parameterized with arguments <{1}>
+526 = Bound mismatch: The type {0} is not a valid substitute for the bounded parameter <{2} extends {3}> of the type {1}
+527 = Method {0}({2}) has the same erasure {0}({3}) as another function in type {1}
+528 = Illegal forward reference to type parameter {0}
+529 = The type {0} is not an interface; it cannot be specified as a bounded parameter
+530 = Unsafe type operation: Should not invoke the constructor {0}({1}) of raw type {0}. References to generic type {2} should be parameterized
+531 = Unsafe type operation: Should not invoke the function {0}({1}) of raw type {2}. References to generic type {3} should be parameterized
+532 = Unsafe type operation: Should not convert expression of raw type {0} to type {1}. References to generic type {2} should be parameterized
+533 = Cannot use the type parameter {0} in a catch block
+534 = Cannot use the parameterized type {0} either in catch block or throws clause
+535 = Cannot create a generic array of {0}
+536 = Unsafe type operation: Should not assign expression of type {0} to the var {1} of raw type {2}. References to generic type {3} should be parameterized
+537 = The type parameter {0} should not be bounded by the final type {1}. Final types cannot be further extended
+538 = Inconsistent classfile encountered: The undefined type parameter {0} is referenced from within {1}
+539 = The interface {2} cannot be implemented simultaneously with different arguments: {0} and {1}
+540 = Bound mismatch: The constructor {0}({1}) of type {2} is not applicable for the arguments ({3}). The wildcard parameter {5} has no lower bound, and may actually be more restrictive than argument {4}
+541 = Bound mismatch: The function {0}({1}) of type {2} is not applicable for the arguments ({3}). The wildcard parameter {5} has no lower bound, and may actually be more restrictive than argument {4}
+542 = Bound mismatch: Cannot assign expression of type {0} to wildcard type {1}. The wildcard type has no lower bound, and may actually be more restrictive than expression type
+543 = Bound mismatch: The generic function {0}({1}) of type {2} is not applicable for the arguments ({3}) since the type {4} is not a valid substitute for the bounded parameter <{5} extends {6}>
+544 = Bound mismatch: The generic constructor {0}({1}) of type {2} is not applicable for the arguments ({3}) since the type {4} is not a valid substitute for the bounded parameter <{5} extends {6}>
+545 = Unsafe type operation: The cast from {0} to parameterized type {1} will not check conformance of type arguments at runtime
+546 = Cannot perform instanceof check against parameterized type {0}. Use instead its raw form {1} since generic type information will be erased at runtime
+547 = Cannot perform instanceof check against type parameter {0}. Use instead its erasure {1} since generic type information will be erased at runtime
+548 = The function {0}({1}) of type {2} is not generic; it cannot be parameterized with arguments <{3}>
+549 = Incorrect number of type arguments for generic function <{3}>{0}({1}) of type {2}; it cannot be parameterized with arguments <{4}>
+550 = The parameterized function <{3}>{0}({1}) of type {2} is not applicable for the arguments ({4})
+551 = The constructor {0}({1}) of type {2} is not generic; it cannot be parameterized with arguments <{3}>
+552 = Incorrect number of type arguments for generic constructor <{3}>{0}({1}) of type {2}; it cannot be parameterized with arguments <{4}>
+553 = The parameterized constructor <{3}>{0}({1}) of type {2} is not applicable for the arguments ({4})
+554 = The function {0}({1}) of raw type {2} is no more generic; it cannot be parameterized with arguments <{3}>
+555 = The constructor {0}({1}) of raw type {2} is no more generic; it cannot be parameterized with arguments <{3}>
+556 = The type {1} cannot extend or implement {0}. A supertype may not specify any wildcard
+557 = The generic class {0} may not subclass.jsScript.lang.Throwable
+558 = Illegal class literal for the type parameter {0}
+559 = Unsafe type operation: The return type {0} of the function {1}({2}) of type {3} needs unchecked conversion to conform to the return type {4} of inherited function
+560 = Name clash : The function {0}({1}) of type {2} has the same erasure as {0}({3}) of type {4} but does not override it
+561 = The member type {0}<{1}> must be qualified with a parameterized type, since it is not static
+562 = The member type {0} must be parameterized, since it is qualified with a parameterized type
+563 = The member type {0} cannot be qualified with a parameterized type, since it is static. Remove arguments from qualifying type {1}
+
+### FOREACH
+580 = Type mismatch: cannot convert from element type {0} to {1}
+581 = Can only iterate over an array or an instance of.jsScript.lang.Iterable
+
+### SOURCE LEVEL
+590 = Syntax error, type parameters are only available if source level is 1.5
+591 = Syntax error, static imports are only available if source level is 1.5
+592 = Syntax error, ''for each'' statements are only available if source level is 1.5
+593 = Syntax error, parameterized types are only available if source level is 1.5
+594 = Syntax error, enum declarations are only available if source level is 1.5
+595 = Syntax error, varargs are only available if source level is 1.5
+596 = Syntax error, annotations are only available if source level is 1.5
+597 = Syntax error, annotation declarations are only available if source level is 1.5
+
+### ANNOTATIONS
+600 = This annotation type member declaration has a constructor name
+601 = Extended dimensions are illegal in an annotation type member declaration
+602 = Package annotations must be in file package-info.jsScript
+
+### CORRUPTED BINARIES
+700 = The class file {0} contains a signature ''{1}'' ill-formed at position {2}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/CompoundNameVector.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/CompoundNameVector.js
new file mode 100644
index 0000000..4851692
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/CompoundNameVector.js
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.util;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+
+public final class CompoundNameVector {
+ static int INITIAL_SIZE = 10;
+
+ public int size;
+ int maxSize;
+ char[][][] elements;
+public CompoundNameVector() {
+ maxSize = INITIAL_SIZE;
+ size = 0;
+ elements = new char[maxSize][][];
+}
+public void add(char[][] newElement) {
+ if (size == maxSize) // knows that size starts <= maxSize
+ System.arraycopy(elements, 0, (elements = new char[maxSize *= 2][][]), 0, size);
+ elements[size++] = newElement;
+}
+public void addAll(char[][][] newElements) {
+ if (size + newElements.length >= maxSize) {
+ maxSize = size + newElements.length; // assume no more elements will be added
+ System.arraycopy(elements, 0, (elements = new char[maxSize][][]), 0, size);
+ }
+ System.arraycopy(newElements, 0, elements, size, newElements.length);
+ size += newElements.length;
+}
+public boolean contains(char[][] element) {
+ for (int i = size; --i >= 0;)
+ if (CharOperation.equals(element, elements[i]))
+ return true;
+ return false;
+}
+public char[][] elementAt(int index) {
+ return elements[index];
+}
+public char[][] remove(char[][] element) {
+ // assumes only one occurrence of the element exists
+ for (int i = size; --i >= 0;)
+ if (element == elements[i]) {
+ // shift the remaining elements down one spot
+ System.arraycopy(elements, i + 1, elements, i, --size - i);
+ elements[size] = null;
+ return element;
+ }
+ return null;
+}
+public void removeAll() {
+ for (int i = size; --i >= 0;)
+ elements[i] = null;
+ size = 0;
+}
+public String toString() {
+ StringBuffer buffer = new StringBuffer();
+ for (int i = 0; i < size; i++) {
+ buffer.append(CharOperation.toString(elements[i])).append("\n"); //$NON-NLS-1$
+ }
+ return buffer.toString();
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/FloatUtil.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/FloatUtil.js
new file mode 100644
index 0000000..73d4dfd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/FloatUtil.js
@@ -0,0 +1,421 @@
+/*******************************************************************************
+ * Copyright (c) 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.util;
+
+/**
+ * Internal utility for declaing with hexadecimal double and float literals.
+ *
+ * @since 3.1
+ */
+public class FloatUtil {
+
+ private static final int DOUBLE_FRACTION_WIDTH = 52;
+
+ private static final int DOUBLE_PRECISION = 53;
+
+ private static final int MAX_DOUBLE_EXPONENT = +1023;
+
+ private static final int MIN_NORMALIZED_DOUBLE_EXPONENT = -1022;
+
+ private static final int MIN_UNNORMALIZED_DOUBLE_EXPONENT = MIN_NORMALIZED_DOUBLE_EXPONENT
+ - DOUBLE_PRECISION;
+
+ private static final int DOUBLE_EXPONENT_BIAS = +1023;
+
+ private static final int DOUBLE_EXPONENT_SHIFT = 52;
+
+ private static final int SINGLE_FRACTION_WIDTH = 23;
+
+ private static final int SINGLE_PRECISION = 24;
+
+ private static final int MAX_SINGLE_EXPONENT = +127;
+
+ private static final int MIN_NORMALIZED_SINGLE_EXPONENT = -126;
+
+ private static final int MIN_UNNORMALIZED_SINGLE_EXPONENT = MIN_NORMALIZED_SINGLE_EXPONENT
+ - SINGLE_PRECISION;
+
+ private static final int SINGLE_EXPONENT_BIAS = +127;
+
+ private static final int SINGLE_EXPONENT_SHIFT = 23;
+
+ /**
+ * Returns the float value corresponding to the given
+ * hexadecimal floating-point single precision literal.
+ * The literal must be syntactially correct, and must be
+ * a float literal (end in a 'f' or 'F'). It must not
+ * include either leading or trailing whitespace or
+ * a sign.
+ * <p>
+ * This method returns the same answer as
+ * Float.parseFloat(new String(source)) does in JDK 1.5,
+ * except that this method returns Floal.NaN if it
+ * would underflow to 0 (parseFloat just returns 0).
+ * The method handles all the tricky cases, including
+ * fraction rounding to 24 bits and gradual underflow.
+ * </p>
+ *
+ * @param source source string containing single precision
+ * hexadecimal floating-point literal
+ * @return the float value, including Float.POSITIVE_INFINITY
+ * if the non-zero value is too large to be represented, and
+ * Float.NaN if the non-zero value is too small to be represented
+ */
+ public static float valueOfHexFloatLiteral(char[] source) {
+ long bits = convertHexFloatingPointLiteralToBits(source);
+ return Float.intBitsToFloat((int) bits);
+ }
+
+ /**
+ * Returns the double value corresponding to the given
+ * hexadecimal floating-point double precision literal.
+ * The literal must be syntactially correct, and must be
+ * a double literal (end in an optional 'd' or 'D').
+ * It must not include either leading or trailing whitespace or
+ * a sign.
+ * <p>
+ * This method returns the same answer as
+ * Double.parseDouble(new String(source)) does in JDK 1.5,
+ * except that this method throw NumberFormatException in
+ * the case of overflow to infinity or underflow to 0.
+ * The method handles all the tricky cases, including
+ * fraction rounding to 53 bits and gradual underflow.
+ * </p>
+ *
+ * @param source source string containing double precision
+ * hexadecimal floating-point literal
+ * @return the double value, including Double.POSITIVE_INFINITY
+ * if the non-zero value is too large to be represented, and
+ * Double.NaN if the non-zero value is too small to be represented
+ */
+ public static double valueOfHexDoubleLiteral(char[] source) {
+ long bits = convertHexFloatingPointLiteralToBits(source);
+ return Double.longBitsToDouble(bits);
+ }
+
+ /**
+ * Returns the given hexadecimal floating-point literal as
+ * the bits for a single-precision (float) or a
+ * double-precision (double) IEEE floating point number.
+ * The literal must be syntactially correct. It must not
+ * include either leading or trailing whitespace or a sign.
+ *
+ * @param source source string containing hexadecimal floating-point literal
+ * @return for double precision literals, bits suitable
+ * for passing to Double.longBitsToDouble; for single precision literals,
+ * bits suitable for passing to Single.intBitsToDouble in the bottom
+ * 32 bits of the result
+ * @throws NumberFormatException if the number cannot be parsed
+ */
+ private static long convertHexFloatingPointLiteralToBits(char[] source) {
+ int length = source.length;
+ long mantissa = 0;
+
+ // Step 1: process the '0x' lead-in
+ int next = 0;
+ char nextChar = source[next];
+ nextChar = source[next];
+ if (nextChar == '0') {
+ next++;
+ } else {
+ throw new NumberFormatException();
+ }
+ nextChar = source[next];
+ if (nextChar == 'X' || nextChar == 'x') {
+ next++;
+ } else {
+ throw new NumberFormatException();
+ }
+
+ // Step 2: process leading '0's either before or after the '.'
+ int binaryPointPosition = -1;
+ loop: while (true) {
+ nextChar = source[next];
+ switch (nextChar) {
+ case '0':
+ next++;
+ continue loop;
+ case '.':
+ binaryPointPosition = next;
+ next++;
+ continue loop;
+ default:
+ break loop;
+ }
+ }
+
+ // Step 3: process the mantissa
+ // leading zeros have been trimmed
+ int mantissaBits = 0;
+ int leadingDigitPosition = -1;
+ loop: while (true) {
+ nextChar = source[next];
+ int hexdigit;
+ switch (nextChar) {
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ hexdigit = nextChar - '0';
+ break;
+ case 'a':
+ case 'b':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f':
+ hexdigit = (nextChar - 'a') + 10;
+ break;
+ case 'A':
+ case 'B':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ hexdigit = (nextChar - 'A') + 10;
+ break;
+ case '.':
+ binaryPointPosition = next;
+ next++;
+ continue loop;
+ default:
+ if (binaryPointPosition < 0) {
+ // record virtual '.' as being to right of all digits
+ binaryPointPosition = next;
+ }
+ break loop;
+ }
+ if (mantissaBits == 0) {
+ // this is the first non-zero hex digit
+ // ignore leading binary 0's in hex digit
+ leadingDigitPosition = next;
+ mantissa = hexdigit;
+ mantissaBits = 4;
+ } else if (mantissaBits < 60) {
+ // middle hex digits
+ mantissa <<= 4;
+ mantissa |= hexdigit;
+ mantissaBits += 4;
+ } else {
+ // more mantissa bits than we can handle
+ // drop this hex digit on the ground
+ }
+ next++;
+ continue loop;
+ }
+
+ // Step 4: process the 'P'
+ nextChar = source[next];
+ if (nextChar == 'P' || nextChar == 'p') {
+ next++;
+ } else {
+ throw new NumberFormatException();
+ }
+
+ // Step 5: process the exponent
+ int exponent = 0;
+ int exponentSign = +1;
+ loop: while (next < length) {
+ nextChar = source[next];
+ switch (nextChar) {
+ case '+':
+ exponentSign = +1;
+ next++;
+ continue loop;
+ case '-':
+ exponentSign = -1;
+ next++;
+ continue loop;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ int digit = nextChar - '0';
+ exponent = (exponent * 10) + digit;
+ next++;
+ continue loop;
+ default:
+ break loop;
+ }
+ }
+
+ // Step 6: process the optional 'f' or 'd'
+ boolean doublePrecision = true;
+ if (next < length) {
+ nextChar = source[next];
+ switch (nextChar) {
+ case 'f':
+ case 'F':
+ doublePrecision = false;
+ next++;
+ break;
+ case 'd':
+ case 'D':
+ doublePrecision = true;
+ next++;
+ break;
+ default:
+ throw new NumberFormatException();
+ }
+ }
+
+ // at this point, all the parsing is done
+ // Step 7: handle mantissa of zero
+ if (mantissa == 0) {
+ return 0L;
+ }
+
+ // Step 8: normalize non-zero mantissa
+ // mantissa is in right-hand mantissaBits
+ // ensure that top bit (as opposed to hex digit) is 1
+ int scaleFactorCompensation = 0;
+ long top = (mantissa >>> (mantissaBits - 4));
+ if ((top & 0x8) == 0) {
+ mantissaBits--;
+ scaleFactorCompensation++;
+ if ((top & 0x4) == 0) {
+ mantissaBits--;
+ scaleFactorCompensation++;
+ if ((top & 0x2) == 0) {
+ mantissaBits--;
+ scaleFactorCompensation++;
+ }
+ }
+ }
+
+ // Step 9: convert double literals to IEEE double
+ long result = 0L;
+ if (doublePrecision) {
+ long fraction;
+ if (mantissaBits > DOUBLE_PRECISION) {
+ // more bits than we can keep
+ int extraBits = mantissaBits - DOUBLE_PRECISION;
+ // round to DOUBLE_PRECISION bits
+ fraction = mantissa >>> (extraBits - 1);
+ long lowBit = fraction & 0x1;
+ fraction += lowBit;
+ fraction = fraction >>> 1;
+ if ((fraction & (1L << DOUBLE_PRECISION)) != 0) {
+ fraction = fraction >>> 1;
+ scaleFactorCompensation -= 1;
+ }
+ } else {
+ // less bits than the faction can hold - pad on right with 0s
+ fraction = mantissa << (DOUBLE_PRECISION - mantissaBits);
+ }
+
+ int scaleFactor = 0; // how many bits to move '.' to before leading hex digit
+ if (mantissaBits > 0) {
+ if (leadingDigitPosition < binaryPointPosition) {
+ // e.g., 0x80.0p0 has scaleFactor == +8
+ scaleFactor = 4 * (binaryPointPosition - leadingDigitPosition);
+ // e.g., 0x10.0p0 has scaleFactorCompensation == +3
+ scaleFactor -= scaleFactorCompensation;
+ } else {
+ // e.g., 0x0.08p0 has scaleFactor == -4
+ scaleFactor = -4
+ * (leadingDigitPosition - binaryPointPosition - 1);
+ // e.g., 0x0.01p0 has scaleFactorCompensation == +3
+ scaleFactor -= scaleFactorCompensation;
+ }
+ }
+
+ int e = (exponentSign * exponent) + scaleFactor;
+ if (e - 1 > MAX_DOUBLE_EXPONENT) {
+ // overflow to +infinity
+ result = Double.doubleToLongBits(Double.POSITIVE_INFINITY);
+ } else if (e - 1 >= MIN_NORMALIZED_DOUBLE_EXPONENT) {
+ // can be represented as a normalized double
+ // the left most bit must be discarded (it's always a 1)
+ long biasedExponent = e - 1 + DOUBLE_EXPONENT_BIAS;
+ result = fraction & ~(1L << DOUBLE_FRACTION_WIDTH);
+ result |= (biasedExponent << DOUBLE_EXPONENT_SHIFT);
+ } else if (e - 1 > MIN_UNNORMALIZED_DOUBLE_EXPONENT) {
+ // can be represented as an unnormalized double
+ long biasedExponent = 0;
+ result = fraction >>> (MIN_NORMALIZED_DOUBLE_EXPONENT - e + 1);
+ result |= (biasedExponent << DOUBLE_EXPONENT_SHIFT);
+ } else {
+ // underflow - return Double.NaN
+ result = Double.doubleToLongBits(Double.NaN);
+ }
+ return result;
+ }
+
+ // Step 10: convert float literals to IEEE single
+ long fraction;
+ if (mantissaBits > SINGLE_PRECISION) {
+ // more bits than we can keep
+ int extraBits = mantissaBits - SINGLE_PRECISION;
+ // round to DOUBLE_PRECISION bits
+ fraction = mantissa >>> (extraBits - 1);
+ long lowBit = fraction & 0x1;
+ fraction += lowBit;
+ fraction = fraction >>> 1;
+ if ((fraction & (1L << SINGLE_PRECISION)) != 0) {
+ fraction = fraction >>> 1;
+ scaleFactorCompensation -= 1;
+ }
+ } else {
+ // less bits than the faction can hold - pad on right with 0s
+ fraction = mantissa << (SINGLE_PRECISION - mantissaBits);
+ }
+
+ int scaleFactor = 0; // how many bits to move '.' to before leading hex digit
+ if (mantissaBits > 0) {
+ if (leadingDigitPosition < binaryPointPosition) {
+ // e.g., 0x80.0p0 has scaleFactor == +8
+ scaleFactor = 4 * (binaryPointPosition - leadingDigitPosition);
+ // e.g., 0x10.0p0 has scaleFactorCompensation == +3
+ scaleFactor -= scaleFactorCompensation;
+ } else {
+ // e.g., 0x0.08p0 has scaleFactor == -4
+ scaleFactor = -4
+ * (leadingDigitPosition - binaryPointPosition - 1);
+ // e.g., 0x0.01p0 has scaleFactorCompensation == +3
+ scaleFactor -= scaleFactorCompensation;
+ }
+ }
+
+ int e = (exponentSign * exponent) + scaleFactor;
+ if (e - 1 > MAX_SINGLE_EXPONENT) {
+ // overflow to +infinity
+ result = Float.floatToIntBits(Float.POSITIVE_INFINITY);
+ } else if (e - 1 >= MIN_NORMALIZED_SINGLE_EXPONENT) {
+ // can be represented as a normalized single
+ // the left most bit must be discarded (it's always a 1)
+ long biasedExponent = e - 1 + SINGLE_EXPONENT_BIAS;
+ result = fraction & ~(1L << SINGLE_FRACTION_WIDTH);
+ result |= (biasedExponent << SINGLE_EXPONENT_SHIFT);
+ } else if (e - 1 > MIN_UNNORMALIZED_SINGLE_EXPONENT) {
+ // can be represented as an unnormalized single
+ long biasedExponent = 0;
+ result = fraction >>> (MIN_NORMALIZED_SINGLE_EXPONENT - e + 1);
+ result |= (biasedExponent << SINGLE_EXPONENT_SHIFT);
+ } else {
+ // underflow - return Float.NaN
+ result = Float.floatToIntBits(Float.NaN);
+ }
+ return result;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/HashtableOfInt.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/HashtableOfInt.js
new file mode 100644
index 0000000..482d71e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/HashtableOfInt.js
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.util;
+
+ /**
+ * Hashtable for non-zero int keys.
+ */
+
+public final class HashtableOfInt {
+ // to avoid using Enumerations, walk the individual tables skipping nulls
+ public int[] keyTable;
+ public Object[] valueTable;
+
+ public int elementSize; // number of elements in the table
+ int threshold;
+public HashtableOfInt() {
+ this(13);
+}
+public HashtableOfInt(int size) {
+ this.elementSize = 0;
+ this.threshold = size; // size represents the expected number of elements
+ int extraRoom = (int) (size * 1.75f);
+ if (this.threshold == extraRoom)
+ extraRoom++;
+ this.keyTable = new int[extraRoom];
+ this.valueTable = new Object[extraRoom];
+}
+public boolean containsKey(int key) {
+ int index = key % valueTable.length;
+ int currentKey;
+ while ((currentKey = keyTable[index]) != 0) {
+ if (currentKey == key)
+ return true;
+ index = (index + 1) % keyTable.length;
+ }
+ return false;
+}
+public Object get(int key) {
+ int index = key % valueTable.length;
+ int currentKey;
+ while ((currentKey = keyTable[index]) != 0) {
+ if (currentKey == key) return valueTable[index];
+ index = (index + 1) % keyTable.length;
+ }
+ return null;
+}
+public Object put(int key, Object value) {
+ int index = key % valueTable.length;
+ int currentKey;
+ while ((currentKey = keyTable[index]) != 0) {
+ if (currentKey == key) return valueTable[index] = value;
+ index = (index + 1) % keyTable.length;
+ }
+ keyTable[index] = key;
+ valueTable[index] = value;
+
+ // assumes the threshold is never equal to the size of the table
+ if (++elementSize > threshold)
+ rehash();
+ return value;
+}
+private void rehash() {
+ HashtableOfInt newHashtable = new HashtableOfInt(elementSize * 2); // double the number of expected elements
+ int currentKey;
+ for (int i = keyTable.length; --i >= 0;)
+ if ((currentKey = keyTable[i]) != 0)
+ newHashtable.put(currentKey, valueTable[i]);
+
+ this.keyTable = newHashtable.keyTable;
+ this.valueTable = newHashtable.valueTable;
+ this.threshold = newHashtable.threshold;
+}
+public int size() {
+ return elementSize;
+}
+public String toString() {
+ String s = ""; //$NON-NLS-1$
+ Object object;
+ for (int i = 0, length = valueTable.length; i < length; i++)
+ if ((object = valueTable[i]) != null)
+ s += keyTable[i] + " -> " + object.toString() + "\n"; //$NON-NLS-2$ //$NON-NLS-1$
+ return s;
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/HashtableOfIntValues.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/HashtableOfIntValues.js
new file mode 100644
index 0000000..955f14b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/HashtableOfIntValues.js
@@ -0,0 +1,148 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.util;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+
+/**
+ * Hashtable of {char[] --> int}
+ */
+public final class HashtableOfIntValues implements Cloneable {
+
+ public static final int NO_VALUE = Integer.MIN_VALUE;
+
+ // to avoid using Enumerations, walk the individual tables skipping nulls
+ public char[] keyTable[];
+ public int valueTable[];
+
+ public int elementSize; // number of elements in the table
+ int threshold;
+
+ public HashtableOfIntValues() {
+ this(13);
+ }
+
+ public HashtableOfIntValues(int size) {
+
+ this.elementSize = 0;
+ this.threshold = size; // size represents the expected number of elements
+ int extraRoom = (int) (size * 1.75f);
+ if (this.threshold == extraRoom)
+ extraRoom++;
+ this.keyTable = new char[extraRoom][];
+ this.valueTable = new int[extraRoom];
+ }
+
+ public Object clone() throws CloneNotSupportedException {
+ HashtableOfIntValues result = (HashtableOfIntValues) super.clone();
+ result.elementSize = this.elementSize;
+ result.threshold = this.threshold;
+
+ int length = this.keyTable.length;
+ result.keyTable = new char[length][];
+ System.arraycopy(this.keyTable, 0, result.keyTable, 0, length);
+
+ length = this.valueTable.length;
+ result.valueTable = new int[length];
+ System.arraycopy(this.valueTable, 0, result.valueTable, 0, length);
+ return result;
+ }
+
+ public boolean containsKey(char[] key) {
+
+ int index = CharOperation.hashCode(key) % valueTable.length;
+ int keyLength = key.length;
+ char[] currentKey;
+ while ((currentKey = keyTable[index]) != null) {
+ if (currentKey.length == keyLength && CharOperation.equals(currentKey, key))
+ return true;
+ index = (index + 1) % keyTable.length;
+ }
+ return false;
+ }
+
+ public int get(char[] key) {
+
+ int index = CharOperation.hashCode(key) % valueTable.length;
+ int keyLength = key.length;
+ char[] currentKey;
+ while ((currentKey = keyTable[index]) != null) {
+ if (currentKey.length == keyLength && CharOperation.equals(currentKey, key))
+ return valueTable[index];
+ index = (index + 1) % keyTable.length;
+ }
+ return NO_VALUE;
+ }
+
+ public int put(char[] key, int value) {
+
+ int index = CharOperation.hashCode(key) % valueTable.length;
+ int keyLength = key.length;
+ char[] currentKey;
+ while ((currentKey = keyTable[index]) != null) {
+ if (currentKey.length == keyLength && CharOperation.equals(currentKey, key))
+ return valueTable[index] = value;
+ index = (index + 1) % keyTable.length;
+ }
+ keyTable[index] = key;
+ valueTable[index] = value;
+
+ // assumes the threshold is never equal to the size of the table
+ if (++elementSize > threshold)
+ rehash();
+ return value;
+ }
+
+ public int removeKey(char[] key) {
+
+ int index = CharOperation.hashCode(key) % valueTable.length;
+ int keyLength = key.length;
+ char[] currentKey;
+ while ((currentKey = keyTable[index]) != null) {
+ if (currentKey.length == keyLength && CharOperation.equals(currentKey, key)) {
+ int value = valueTable[index];
+ elementSize--;
+ keyTable[index] = null;
+ valueTable[index] = NO_VALUE;
+ rehash();
+ return value;
+ }
+ index = (index + 1) % keyTable.length;
+ }
+ return NO_VALUE;
+ }
+
+ private void rehash() {
+
+ HashtableOfIntValues newHashtable = new HashtableOfIntValues(elementSize * 2); // double the number of expected elements
+ char[] currentKey;
+ for (int i = keyTable.length; --i >= 0;)
+ if ((currentKey = keyTable[i]) != null)
+ newHashtable.put(currentKey, valueTable[i]);
+
+ this.keyTable = newHashtable.keyTable;
+ this.valueTable = newHashtable.valueTable;
+ this.threshold = newHashtable.threshold;
+ }
+
+ public int size() {
+ return elementSize;
+ }
+
+ public String toString() {
+ String s = ""; //$NON-NLS-1$
+ char[] key;
+ for (int i = 0, length = valueTable.length; i < length; i++)
+ if ((key = keyTable[i]) != null)
+ s += new String(key) + " -> " + valueTable[i] + "\n"; //$NON-NLS-2$ //$NON-NLS-1$
+ return s;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/HashtableOfLong.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/HashtableOfLong.js
new file mode 100644
index 0000000..b92bb19
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/HashtableOfLong.js
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.util;
+
+ /**
+ * Hashtable for non-zero long keys.
+ */
+
+public final class HashtableOfLong {
+ // to avoid using Enumerations, walk the individual tables skipping nulls
+ public long[] keyTable;
+ public Object[] valueTable;
+
+ public int elementSize; // number of elements in the table
+ int threshold;
+public HashtableOfLong() {
+ this(13);
+}
+public HashtableOfLong(int size) {
+ this.elementSize = 0;
+ this.threshold = size; // size represents the expected number of elements
+ int extraRoom = (int) (size * 1.75f);
+ if (this.threshold == extraRoom)
+ extraRoom++;
+ this.keyTable = new long[extraRoom];
+ this.valueTable = new Object[extraRoom];
+}
+public boolean containsKey(long key) {
+ int index = ((int)(key >>> 32)) % valueTable.length;
+ long currentKey;
+ while ((currentKey = keyTable[index]) != 0) {
+ if (currentKey == key)
+ return true;
+ index = (index + 1) % keyTable.length;
+ }
+ return false;
+}
+public Object get(long key) {
+ int index = ((int)(key >>> 32)) % valueTable.length;
+ long currentKey;
+ while ((currentKey = keyTable[index]) != 0) {
+ if (currentKey == key) return valueTable[index];
+ index = (index + 1) % keyTable.length;
+ }
+ return null;
+}
+public Object put(long key, Object value) {
+ int index = ((int)(key >>> 32)) % valueTable.length;
+ long currentKey;
+ while ((currentKey = keyTable[index]) != 0) {
+ if (currentKey == key) return valueTable[index] = value;
+ index = (index + 1) % keyTable.length;
+ }
+ keyTable[index] = key;
+ valueTable[index] = value;
+
+ // assumes the threshold is never equal to the size of the table
+ if (++elementSize > threshold)
+ rehash();
+ return value;
+}
+private void rehash() {
+ HashtableOfLong newHashtable = new HashtableOfLong(elementSize * 2); // double the number of expected elements
+ long currentKey;
+ for (int i = keyTable.length; --i >= 0;)
+ if ((currentKey = keyTable[i]) != 0)
+ newHashtable.put(currentKey, valueTable[i]);
+
+ this.keyTable = newHashtable.keyTable;
+ this.valueTable = newHashtable.valueTable;
+ this.threshold = newHashtable.threshold;
+}
+public int size() {
+ return elementSize;
+}
+public String toString() {
+ String s = ""; //$NON-NLS-1$
+ Object object;
+ for (int i = 0, length = valueTable.length; i < length; i++)
+ if ((object = valueTable[i]) != null)
+ s += keyTable[i] + " -> " + object.toString() + "\n"; //$NON-NLS-2$ //$NON-NLS-1$
+ return s;
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/HashtableOfObject.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/HashtableOfObject.js
new file mode 100644
index 0000000..4bec213
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/HashtableOfObject.js
@@ -0,0 +1,146 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.util;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+
+/**
+ * Hashtable of {char[] --> Object }
+ */
+public final class HashtableOfObject implements Cloneable {
+
+ // to avoid using Enumerations, walk the individual tables skipping nulls
+ public char[] keyTable[];
+ public Object valueTable[];
+
+ public int elementSize; // number of elements in the table
+ int threshold;
+
+ public HashtableOfObject() {
+ this(13);
+ }
+
+ public HashtableOfObject(int size) {
+
+ this.elementSize = 0;
+ this.threshold = size; // size represents the expected number of elements
+ int extraRoom = (int) (size * 1.75f);
+ if (this.threshold == extraRoom)
+ extraRoom++;
+ this.keyTable = new char[extraRoom][];
+ this.valueTable = new Object[extraRoom];
+ }
+
+ public Object clone() throws CloneNotSupportedException {
+ HashtableOfObject result = (HashtableOfObject) super.clone();
+ result.elementSize = this.elementSize;
+ result.threshold = this.threshold;
+
+ int length = this.keyTable.length;
+ result.keyTable = new char[length][];
+ System.arraycopy(this.keyTable, 0, result.keyTable, 0, length);
+
+ length = this.valueTable.length;
+ result.valueTable = new Object[length];
+ System.arraycopy(this.valueTable, 0, result.valueTable, 0, length);
+ return result;
+ }
+
+ public boolean containsKey(char[] key) {
+
+ int index = CharOperation.hashCode(key) % valueTable.length;
+ int keyLength = key.length;
+ char[] currentKey;
+ while ((currentKey = keyTable[index]) != null) {
+ if (currentKey.length == keyLength && CharOperation.equals(currentKey, key))
+ return true;
+ index = (index + 1) % keyTable.length;
+ }
+ return false;
+ }
+
+ public Object get(char[] key) {
+
+ int index = CharOperation.hashCode(key) % valueTable.length;
+ int keyLength = key.length;
+ char[] currentKey;
+ while ((currentKey = keyTable[index]) != null) {
+ if (currentKey.length == keyLength && CharOperation.equals(currentKey, key))
+ return valueTable[index];
+ index = (index + 1) % keyTable.length;
+ }
+ return null;
+ }
+
+ public Object put(char[] key, Object value) {
+
+ int index = CharOperation.hashCode(key) % valueTable.length;
+ int keyLength = key.length;
+ char[] currentKey;
+ while ((currentKey = keyTable[index]) != null) {
+ if (currentKey.length == keyLength && CharOperation.equals(currentKey, key))
+ return valueTable[index] = value;
+ index = (index + 1) % keyTable.length;
+ }
+ keyTable[index] = key;
+ valueTable[index] = value;
+
+ // assumes the threshold is never equal to the size of the table
+ if (++elementSize > threshold)
+ rehash();
+ return value;
+ }
+
+ public Object removeKey(char[] key) {
+
+ int index = CharOperation.hashCode(key) % valueTable.length;
+ int keyLength = key.length;
+ char[] currentKey;
+ while ((currentKey = keyTable[index]) != null) {
+ if (currentKey.length == keyLength && CharOperation.equals(currentKey, key)) {
+ Object value = valueTable[index];
+ elementSize--;
+ keyTable[index] = null;
+ valueTable[index] = null;
+ rehash();
+ return value;
+ }
+ index = (index + 1) % keyTable.length;
+ }
+ return null;
+ }
+
+ private void rehash() {
+
+ HashtableOfObject newHashtable = new HashtableOfObject(elementSize * 2); // double the number of expected elements
+ char[] currentKey;
+ for (int i = keyTable.length; --i >= 0;)
+ if ((currentKey = keyTable[i]) != null)
+ newHashtable.put(currentKey, valueTable[i]);
+
+ this.keyTable = newHashtable.keyTable;
+ this.valueTable = newHashtable.valueTable;
+ this.threshold = newHashtable.threshold;
+ }
+
+ public int size() {
+ return elementSize;
+ }
+
+ public String toString() {
+ String s = ""; //$NON-NLS-1$
+ Object object;
+ for (int i = 0, length = valueTable.length; i < length; i++)
+ if ((object = valueTable[i]) != null)
+ s += new String(keyTable[i]) + " -> " + object.toString() + "\n"; //$NON-NLS-2$ //$NON-NLS-1$
+ return s;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/HashtableOfPackage.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/HashtableOfPackage.js
new file mode 100644
index 0000000..62ba421
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/HashtableOfPackage.js
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.util;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.PackageBinding;
+
+public final class HashtableOfPackage {
+ // to avoid using Enumerations, walk the individual tables skipping nulls
+ public char[] keyTable[];
+ public PackageBinding valueTable[];
+
+ public int elementSize; // number of elements in the table
+ int threshold;
+public HashtableOfPackage() {
+ this(3); // usually not very large
+}
+public HashtableOfPackage(int size) {
+ this.elementSize = 0;
+ this.threshold = size; // size represents the expected number of elements
+ int extraRoom = (int) (size * 1.75f);
+ if (this.threshold == extraRoom)
+ extraRoom++;
+ this.keyTable = new char[extraRoom][];
+ this.valueTable = new PackageBinding[extraRoom];
+}
+public boolean containsKey(char[] key) {
+ int index = CharOperation.hashCode(key) % valueTable.length;
+ int keyLength = key.length;
+ char[] currentKey;
+ while ((currentKey = keyTable[index]) != null) {
+ if (currentKey.length == keyLength && CharOperation.equals(currentKey, key))
+ return true;
+ index = (index + 1) % keyTable.length;
+ }
+ return false;
+}
+public PackageBinding get(char[] key) {
+ int index = CharOperation.hashCode(key) % valueTable.length;
+ int keyLength = key.length;
+ char[] currentKey;
+ while ((currentKey = keyTable[index]) != null) {
+ if (currentKey.length == keyLength && CharOperation.equals(currentKey, key))
+ return valueTable[index];
+ index = (index + 1) % keyTable.length;
+ }
+ return null;
+}
+public PackageBinding put(char[] key, PackageBinding value) {
+ int index = CharOperation.hashCode(key) % valueTable.length;
+ int keyLength = key.length;
+ char[] currentKey;
+ while ((currentKey = keyTable[index]) != null) {
+ if (currentKey.length == keyLength && CharOperation.equals(currentKey, key))
+ return valueTable[index] = value;
+ index = (index + 1) % keyTable.length;
+ }
+ keyTable[index] = key;
+ valueTable[index] = value;
+
+ // assumes the threshold is never equal to the size of the table
+ if (++elementSize > threshold)
+ rehash();
+ return value;
+}
+private void rehash() {
+ HashtableOfPackage newHashtable = new HashtableOfPackage(elementSize * 2); // double the number of expected elements
+ char[] currentKey;
+ for (int i = keyTable.length; --i >= 0;)
+ if ((currentKey = keyTable[i]) != null)
+ newHashtable.put(currentKey, valueTable[i]);
+
+ this.keyTable = newHashtable.keyTable;
+ this.valueTable = newHashtable.valueTable;
+ this.threshold = newHashtable.threshold;
+}
+public int size() {
+ return elementSize;
+}
+public String toString() {
+ String s = ""; //$NON-NLS-1$
+ PackageBinding pkg;
+ for (int i = 0, length = valueTable.length; i < length; i++)
+ if ((pkg = valueTable[i]) != null)
+ s += pkg.toString() + "\n"; //$NON-NLS-1$
+ return s;
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/HashtableOfType.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/HashtableOfType.js
new file mode 100644
index 0000000..9301276
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/HashtableOfType.js
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.util;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding;
+
+public final class HashtableOfType {
+ // to avoid using Enumerations, walk the individual tables skipping nulls
+ public char[] keyTable[];
+ public ReferenceBinding valueTable[];
+
+ public int elementSize; // number of elements in the table
+ int threshold;
+public HashtableOfType() {
+ this(3);
+}
+public HashtableOfType(int size) {
+ this.elementSize = 0;
+ this.threshold = size; // size represents the expected number of elements
+ int extraRoom = (int) (size * 1.75f);
+ if (this.threshold == extraRoom)
+ extraRoom++;
+ this.keyTable = new char[extraRoom][];
+ this.valueTable = new ReferenceBinding[extraRoom];
+}
+public boolean containsKey(char[] key) {
+ int index = CharOperation.hashCode(key) % valueTable.length;
+ int keyLength = key.length;
+ char[] currentKey;
+ while ((currentKey = keyTable[index]) != null) {
+ if (currentKey.length == keyLength && CharOperation.equals(currentKey, key))
+ return true;
+ index = (index + 1) % keyTable.length;
+ }
+ return false;
+}
+public ReferenceBinding get(char[] key) {
+ int index = CharOperation.hashCode(key) % valueTable.length;
+ int keyLength = key.length;
+ char[] currentKey;
+ while ((currentKey = keyTable[index]) != null) {
+ if (currentKey.length == keyLength && CharOperation.equals(currentKey, key))
+ return valueTable[index];
+ index = (index + 1) % keyTable.length;
+ }
+ return null;
+}
+public ReferenceBinding put(char[] key, ReferenceBinding value) {
+ int index = CharOperation.hashCode(key) % valueTable.length;
+ int keyLength = key.length;
+ char[] currentKey;
+ while ((currentKey = keyTable[index]) != null) {
+ if (currentKey.length == keyLength && CharOperation.equals(currentKey, key))
+ return valueTable[index] = value;
+ index = (index + 1) % keyTable.length;
+ }
+ keyTable[index] = key;
+ valueTable[index] = value;
+
+ // assumes the threshold is never equal to the size of the table
+ if (++elementSize > threshold)
+ rehash();
+ return value;
+}
+private void rehash() {
+ HashtableOfType newHashtable = new HashtableOfType(elementSize < 100 ? 100 : elementSize * 2); // double the number of expected elements
+ char[] currentKey;
+ for (int i = keyTable.length; --i >= 0;)
+ if ((currentKey = keyTable[i]) != null)
+ newHashtable.put(currentKey, valueTable[i]);
+
+ this.keyTable = newHashtable.keyTable;
+ this.valueTable = newHashtable.valueTable;
+ this.threshold = newHashtable.threshold;
+}
+public int size() {
+ return elementSize;
+}
+public String toString() {
+ String s = ""; //$NON-NLS-1$
+ ReferenceBinding type;
+ for (int i = 0, length = valueTable.length; i < length; i++)
+ if ((type = valueTable[i]) != null)
+ s += type.toString() + "\n"; //$NON-NLS-1$
+ return s;
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/ObjectVector.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/ObjectVector.js
new file mode 100644
index 0000000..a01c8ad
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/ObjectVector.js
@@ -0,0 +1,132 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.util;
+
+public final class ObjectVector {
+
+ static int INITIAL_SIZE = 10;
+
+ public int size;
+ int maxSize;
+ Object[] elements;
+
+ public ObjectVector() {
+
+ this.maxSize = INITIAL_SIZE;
+ this.size = 0;
+ this.elements = new Object[this.maxSize];
+ }
+
+ public void add(Object newElement) {
+
+ if (this.size == this.maxSize) // knows that size starts <= maxSize
+ System.arraycopy(this.elements, 0, (this.elements = new Object[this.maxSize *= 2]), 0, this.size);
+ this.elements[this.size++] = newElement;
+ }
+
+ public void addAll(Object[] newElements) {
+
+ if (this.size + newElements.length >= this.maxSize) {
+ maxSize = this.size + newElements.length; // assume no more elements will be added
+ System.arraycopy(this.elements, 0, (this.elements = new Object[this.maxSize]), 0, this.size);
+ }
+ System.arraycopy(newElements, 0, this.elements, size, newElements.length);
+ this.size += newElements.length;
+ }
+
+ public void addAll(ObjectVector newVector) {
+
+ if (this.size + newVector.size >= this.maxSize) {
+ maxSize = this.size + newVector.size; // assume no more elements will be added
+ System.arraycopy(this.elements, 0, (this.elements = new Object[this.maxSize]), 0, this.size);
+ }
+ System.arraycopy(newVector.elements, 0, this.elements, size, newVector.size);
+ this.size += newVector.size;
+ }
+
+ /**
+ * Identity check
+ */
+ public boolean containsIdentical(Object element) {
+
+ for (int i = this.size; --i >= 0;)
+ if (element == this.elements[i])
+ return true;
+ return false;
+ }
+
+ /**
+ * Equality check
+ */
+ public boolean contains(Object element) {
+
+ for (int i = this.size; --i >= 0;)
+ if (element.equals(this.elements[i]))
+ return true;
+ return false;
+ }
+
+ public void copyInto(Object[] targetArray){
+
+ this.copyInto(targetArray, 0);
+ }
+
+ public void copyInto(Object[] targetArray, int index){
+
+ System.arraycopy(this.elements, 0, targetArray, index, this.size);
+ }
+
+ public Object elementAt(int index) {
+
+ return this.elements[index];
+ }
+
+ public Object find(Object element) {
+
+ for (int i = this.size; --i >= 0;)
+ if (element.equals(this.elements[i]))
+ return element;
+ return null;
+ }
+
+ public Object remove(Object element) {
+
+ // assumes only one occurrence of the element exists
+ for (int i = this.size; --i >= 0;)
+ if (element.equals(this.elements[i])) {
+ // shift the remaining elements down one spot
+ System.arraycopy(this.elements, i + 1, this.elements, i, --this.size - i);
+ this.elements[this.size] = null;
+ return element;
+ }
+ return null;
+ }
+
+ public void removeAll() {
+
+ for (int i = this.size; --i >= 0;)
+ this.elements[i] = null;
+ this.size = 0;
+ }
+
+ public int size(){
+
+ return this.size;
+ }
+
+ public String toString() {
+
+ String s = ""; //$NON-NLS-1$
+ for (int i = 0; i < this.size; i++)
+ s += this.elements[i].toString() + "\n"; //$NON-NLS-1$
+ return s;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/SimpleLookupTable.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/SimpleLookupTable.js
new file mode 100644
index 0000000..5ade59e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/SimpleLookupTable.js
@@ -0,0 +1,156 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.util;
+
+/**
+ * A simple lookup table is a non-synchronized Hashtable, whose keys
+ * and values are Objects. It also uses linear probing to resolve collisions
+ * rather than a linked list of hash table entries.
+ */
+public final class SimpleLookupTable implements Cloneable {
+
+// to avoid using Enumerations, walk the individual tables skipping nulls
+public Object[] keyTable;
+public Object[] valueTable;
+public int elementSize; // number of elements in the table
+public int threshold;
+
+public SimpleLookupTable() {
+ this(13);
+}
+
+public SimpleLookupTable(int size) {
+ this.elementSize = 0;
+ this.threshold = size; // size represents the expected number of elements
+ int extraRoom = (int) (size * 1.5f);
+ if (this.threshold == extraRoom)
+ extraRoom++;
+ this.keyTable = new Object[extraRoom];
+ this.valueTable = new Object[extraRoom];
+}
+
+public Object clone() throws CloneNotSupportedException {
+ SimpleLookupTable result = (SimpleLookupTable) super.clone();
+ result.elementSize = this.elementSize;
+ result.threshold = this.threshold;
+
+ int length = this.keyTable.length;
+ result.keyTable = new Object[length];
+ System.arraycopy(this.keyTable, 0, result.keyTable, 0, length);
+
+ length = this.valueTable.length;
+ result.valueTable = new Object[length];
+ System.arraycopy(this.valueTable, 0, result.valueTable, 0, length);
+ return result;
+}
+
+public boolean containsKey(Object key) {
+ int length = keyTable.length;
+ int index = (key.hashCode() & 0x7FFFFFFF) % length;
+ Object currentKey;
+ while ((currentKey = keyTable[index]) != null) {
+ if (currentKey.equals(key)) return true;
+ if (++index == length) index = 0;
+ }
+ return false;
+}
+
+public Object get(Object key) {
+ int length = keyTable.length;
+ int index = (key.hashCode() & 0x7FFFFFFF) % length;
+ Object currentKey;
+ while ((currentKey = keyTable[index]) != null) {
+ if (currentKey.equals(key)) return valueTable[index];
+ if (++index == length) index = 0;
+ }
+ return null;
+}
+
+public Object keyForValue(Object valueToMatch) {
+ if (valueToMatch != null)
+ for (int i = 0, l = valueTable.length; i < l; i++)
+ if (valueToMatch.equals(valueTable[i]))
+ return keyTable[i];
+ return null;
+}
+
+public Object put(Object key, Object value) {
+ int length = keyTable.length;
+ int index = (key.hashCode() & 0x7FFFFFFF) % length;
+ Object currentKey;
+ while ((currentKey = keyTable[index]) != null) {
+ if (currentKey.equals(key)) return valueTable[index] = value;
+ if (++index == length) index = 0;
+ }
+ keyTable[index] = key;
+ valueTable[index] = value;
+
+ // assumes the threshold is never equal to the size of the table
+ if (++elementSize > threshold) rehash();
+ return value;
+}
+
+public Object removeKey(Object key) {
+ int length = keyTable.length;
+ int index = (key.hashCode() & 0x7FFFFFFF) % length;
+ Object currentKey;
+ while ((currentKey = keyTable[index]) != null) {
+ if (currentKey.equals(key)) {
+ elementSize--;
+ Object oldValue = valueTable[index];
+ keyTable[index] = null;
+ valueTable[index] = null;
+ if (keyTable[index + 1 == length ? 0 : index + 1] != null)
+ rehash(); // only needed if a possible collision existed
+ return oldValue;
+ }
+ if (++index == length) index = 0;
+ }
+ return null;
+}
+
+public void removeValue(Object valueToRemove) {
+ boolean rehash = false;
+ for (int i = 0, l = valueTable.length; i < l; i++) {
+ Object value = valueTable[i];
+ if (value != null && value.equals(valueToRemove)) {
+ elementSize--;
+ keyTable[i] = null;
+ valueTable[i] = null;
+ if (!rehash && keyTable[i + 1 == l ? 0 : i + 1] != null)
+ rehash = true; // only needed if a possible collision existed
+ }
+ }
+ if (rehash) rehash();
+}
+
+private void rehash() {
+ SimpleLookupTable newLookupTable = new SimpleLookupTable(elementSize * 2); // double the number of expected elements
+ Object currentKey;
+ for (int i = keyTable.length; --i >= 0;)
+ if ((currentKey = keyTable[i]) != null)
+ newLookupTable.put(currentKey, valueTable[i]);
+
+ this.keyTable = newLookupTable.keyTable;
+ this.valueTable = newLookupTable.valueTable;
+ this.elementSize = newLookupTable.elementSize;
+ this.threshold = newLookupTable.threshold;
+}
+
+public String toString() {
+ String s = ""; //$NON-NLS-1$
+ Object object;
+ for (int i = 0, l = valueTable.length; i < l; i++)
+ if ((object = valueTable[i]) != null)
+ s += keyTable[i].toString() + " -> " + object.toString() + "\n"; //$NON-NLS-2$ //$NON-NLS-1$
+ return s;
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/SimpleNameVector.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/SimpleNameVector.js
new file mode 100644
index 0000000..9c29773
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/SimpleNameVector.js
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.util;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+
+public final class SimpleNameVector {
+
+ static int INITIAL_SIZE = 10;
+
+ public int size;
+ int maxSize;
+ char[][] elements;
+
+ public SimpleNameVector() {
+
+ this.maxSize = INITIAL_SIZE;
+ this.size = 0;
+ this.elements = new char[this.maxSize][];
+ }
+
+ public void add(char[] newElement) {
+
+ if (this.size == this.maxSize) // knows that size starts <= maxSize
+ System.arraycopy(this.elements, 0, (this.elements = new char[this.maxSize *= 2][]), 0, this.size);
+ this.elements[size++] = newElement;
+ }
+
+ public void addAll(char[][] newElements) {
+
+ if (this.size + newElements.length >= this.maxSize) {
+ this.maxSize = this.size + newElements.length; // assume no more elements will be added
+ System.arraycopy(this.elements, 0, (this.elements = new char[this.maxSize][]), 0, this.size);
+ }
+ System.arraycopy(newElements, 0, this.elements, this.size, newElements.length);
+ this.size += newElements.length;
+ }
+
+ public void copyInto(Object[] targetArray){
+
+ System.arraycopy(this.elements, 0, targetArray, 0, this.size);
+ }
+
+ public boolean contains(char[] element) {
+
+ for (int i = this.size; --i >= 0;)
+ if (CharOperation.equals(element, this.elements[i]))
+ return true;
+ return false;
+ }
+
+ public char[] elementAt(int index) {
+ return this.elements[index];
+ }
+
+ public char[] remove(char[] element) {
+
+ // assumes only one occurrence of the element exists
+ for (int i = this.size; --i >= 0;)
+ if (element == this.elements[i]) {
+ // shift the remaining elements down one spot
+ System.arraycopy(this.elements, i + 1, this.elements, i, --this.size - i);
+ this.elements[this.size] = null;
+ return element;
+ }
+ return null;
+ }
+
+ public void removeAll() {
+
+ for (int i = this.size; --i >= 0;)
+ this.elements[i] = null;
+ this.size = 0;
+ }
+
+ public int size(){
+
+ return this.size;
+ }
+
+ public String toString() {
+ StringBuffer buffer = new StringBuffer();
+ for (int i = 0; i < this.size; i++) {
+ buffer.append(this.elements[i]).append("\n"); //$NON-NLS-1$
+ }
+ return buffer.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/SuffixConstants.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/SuffixConstants.js
new file mode 100644
index 0000000..8e138c6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/SuffixConstants.js
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.util;
+
+public interface SuffixConstants {
+ public final static String EXTENSION_class = "class"; //$NON-NLS-1$
+ public final static String EXTENSION_CLASS = "CLASS"; //$NON-NLS-1$
+ public final static String EXTENSION_java = "java"; //$NON-NLS-1$
+ public final static String EXTENSION_JAVA = "JAVA"; //$NON-NLS-1$
+
+ public final static String SUFFIX_STRING_class = "." + EXTENSION_class; //$NON-NLS-1$
+ public final static String SUFFIX_STRING_CLASS = "." + EXTENSION_CLASS; //$NON-NLS-1$
+ public final static String SUFFIX_STRING_java = "." + EXTENSION_java; //$NON-NLS-1$
+ public final static String SUFFIX_STRING_JAVA = "." + EXTENSION_JAVA; //$NON-NLS-1$
+
+ public final static char[] SUFFIX_class = SUFFIX_STRING_class.toCharArray();
+ public final static char[] SUFFIX_CLASS = SUFFIX_STRING_CLASS.toCharArray();
+ public final static char[] SUFFIX_java = SUFFIX_STRING_java.toCharArray();
+ public final static char[] SUFFIX_JAVA = SUFFIX_STRING_JAVA.toCharArray();
+
+ public final static String EXTENSION_jar = "jar"; //$NON-NLS-1$
+ public final static String EXTENSION_JAR = "JAR"; //$NON-NLS-1$
+ public final static String EXTENSION_zip = "zip"; //$NON-NLS-1$
+ public final static String EXTENSION_ZIP = "ZIP"; //$NON-NLS-1$
+
+ public final static String SUFFIX_STRING_jar = "." + EXTENSION_jar; //$NON-NLS-1$
+ public final static String SUFFIX_STRING_JAR = "." + EXTENSION_JAR; //$NON-NLS-1$
+ public final static String SUFFIX_STRING_zip = "." + EXTENSION_zip; //$NON-NLS-1$
+ public final static String SUFFIX_STRING_ZIP = "." + EXTENSION_ZIP; //$NON-NLS-1$
+
+ public final static char[] SUFFIX_jar = SUFFIX_STRING_jar.toCharArray();
+ public final static char[] SUFFIX_JAR = SUFFIX_STRING_JAR.toCharArray();
+ public final static char[] SUFFIX_zip = SUFFIX_STRING_zip.toCharArray();
+ public final static char[] SUFFIX_ZIP = SUFFIX_STRING_ZIP.toCharArray();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/Util.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/Util.js
new file mode 100644
index 0000000..3924eeb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/Util.js
@@ -0,0 +1,523 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.util;
+
+import java.io.BufferedInputStream;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+
+public class Util implements SuffixConstants {
+
+ public interface Displayable {
+ String displayString(Object o);
+ }
+
+ public static String LINE_SEPARATOR = System.getProperty("line.separator"); //$NON-NLS-1$
+ public static char[] LINE_SEPARATOR_CHARS = LINE_SEPARATOR.toCharArray();
+
+ private final static char[] DOUBLE_QUOTES = "''".toCharArray(); //$NON-NLS-1$
+ private final static char[] SINGLE_QUOTE = "'".toCharArray(); //$NON-NLS-1$
+ private static final int DEFAULT_READING_SIZE = 8192;
+
+ /* Bundle containing messages */
+ protected static ResourceBundle bundle;
+ private final static String bundleName =
+ "org.eclipse.wst.jsdt.internal.compiler.util.messages"; //$NON-NLS-1$
+ static {
+ relocalize();
+ }
+ /**
+ * Lookup the message with the given ID in this catalog and bind its
+ * substitution locations with the given strings.
+ */
+ public static String bind(String id, String binding1, String binding2) {
+ return bind(id, new String[] { binding1, binding2 });
+ }
+ /**
+ * Lookup the message with the given ID in this catalog and bind its
+ * substitution locations with the given string.
+ */
+ public static String bind(String id, String binding) {
+ return bind(id, new String[] { binding });
+ }
+ /**
+ * Lookup the message with the given ID in this catalog and bind its
+ * substitution locations with the given string values.
+ */
+ public static String bind(String id, String[] bindings) {
+ if (id == null)
+ return "No message available"; //$NON-NLS-1$
+ String message = null;
+ try {
+ message = bundle.getString(id);
+ } catch (MissingResourceException e) {
+ // If we got an exception looking for the message, fail gracefully by just returning
+ // the id we were looking for. In most cases this is semi-informative so is not too bad.
+ return "Missing message: " + id + " in: " + bundleName; //$NON-NLS-2$ //$NON-NLS-1$
+ }
+ // for compatibility with MessageFormat which eliminates double quotes in original message
+ char[] messageWithNoDoubleQuotes =
+ CharOperation.replace(message.toCharArray(), DOUBLE_QUOTES, SINGLE_QUOTE);
+
+ if (bindings == null) return new String(messageWithNoDoubleQuotes);
+
+ int length = messageWithNoDoubleQuotes.length;
+ int start = 0;
+ int end = length;
+ StringBuffer output = null;
+ while (true) {
+ if ((end = CharOperation.indexOf('{', messageWithNoDoubleQuotes, start)) > -1) {
+ if (output == null) output = new StringBuffer(length+bindings.length*20);
+ output.append(messageWithNoDoubleQuotes, start, end - start);
+ if ((start = CharOperation.indexOf('}', messageWithNoDoubleQuotes, end + 1)) > -1) {
+ int index = -1;
+ String argId = new String(messageWithNoDoubleQuotes, end + 1, start - end - 1);
+ try {
+ index = Integer.parseInt(argId);
+ output.append(bindings[index]);
+ } catch (NumberFormatException nfe) { // could be nested message ID {compiler.name}
+ boolean done = false;
+ if (!id.equals(argId)) {
+ String argMessage = null;
+ try {
+ argMessage = bundle.getString(argId);
+ output.append(argMessage);
+ done = true;
+ } catch (MissingResourceException e) {
+ // unable to bind argument, ignore (will leave argument in)
+ }
+ }
+ if (!done) output.append(messageWithNoDoubleQuotes, end + 1, start - end);
+ } catch (ArrayIndexOutOfBoundsException e) {
+ output.append("{missing " + Integer.toString(index) + "}"); //$NON-NLS-2$ //$NON-NLS-1$
+ }
+ start++;
+ } else {
+ output.append(messageWithNoDoubleQuotes, end, length);
+ break;
+ }
+ } else {
+ if (output == null) return new String(messageWithNoDoubleQuotes);
+ output.append(messageWithNoDoubleQuotes, start, length - start);
+ break;
+ }
+ }
+ return output.toString();
+ }
+ /**
+ * Lookup the message with the given ID in this catalog
+ */
+ public static String bind(String id) {
+ return bind(id, (String[]) null);
+ }
+ /**
+ * Creates a NLS catalog for the given locale.
+ */
+ public static void relocalize() {
+ try {
+ bundle = ResourceBundle.getBundle(bundleName, Locale.getDefault());
+ } catch(MissingResourceException e) {
+ System.out.println("Missing resource : " + bundleName.replace('.', '/') + ".properties for locale " + Locale.getDefault()); //$NON-NLS-1$//$NON-NLS-2$
+ throw e;
+ }
+ }
+ /**
+ * Returns the given bytes as a char array using a given encoding (null means platform default).
+ */
+ public static char[] bytesToChar(byte[] bytes, String encoding) throws IOException {
+
+ return getInputStreamAsCharArray(new ByteArrayInputStream(bytes), bytes.length, encoding);
+
+ }
+ /**
+ * Returns the contents of the given file as a byte array.
+ * @throws IOException if a problem occured reading the file.
+ */
+ public static byte[] getFileByteContent(File file) throws IOException {
+ InputStream stream = null;
+ try {
+ stream = new BufferedInputStream(new FileInputStream(file));
+ return getInputStreamAsByteArray(stream, (int) file.length());
+ } finally {
+ if (stream != null) {
+ try {
+ stream.close();
+ } catch (IOException e) {
+ // ignore
+ }
+ }
+ }
+ }
+ /**
+ * Returns the contents of the given file as a char array.
+ * When encoding is null, then the platform default one is used
+ * @throws IOException if a problem occured reading the file.
+ */
+ public static char[] getFileCharContent(File file, String encoding) throws IOException {
+ InputStream stream = null;
+ try {
+ stream = new BufferedInputStream(new FileInputStream(file));
+ return getInputStreamAsCharArray(stream, (int) file.length(), encoding);
+ } finally {
+ if (stream != null) {
+ try {
+ stream.close();
+ } catch (IOException e) {
+ // ignore
+ }
+ }
+ }
+ }
+ /*
+ * NIO support to get input stream as byte array.
+ * Not used as with JDK 1.4.2 this support is slower than standard IO one...
+ * Keep it as comment for future in case of next JDK versions improve performance
+ * in this area...
+ *
+ public static byte[] getInputStreamAsByteArray(FileInputStream stream, int length)
+ throws IOException {
+
+ FileChannel channel = stream.getChannel();
+ int size = (int)channel.size();
+ if (length >= 0 && length < size) size = length;
+ byte[] contents = new byte[size];
+ ByteBuffer buffer = ByteBuffer.wrap(contents);
+ channel.read(buffer);
+ return contents;
+ }
+ */
+ /**
+ * Returns the given input stream's contents as a byte array.
+ * If a length is specified (ie. if length != -1), only length bytes
+ * are returned. Otherwise all bytes in the stream are returned.
+ * Note this doesn't close the stream.
+ * @throws IOException if a problem occured reading the stream.
+ */
+ public static byte[] getInputStreamAsByteArray(InputStream stream, int length)
+ throws IOException {
+ byte[] contents;
+ if (length == -1) {
+ contents = new byte[0];
+ int contentsLength = 0;
+ int amountRead = -1;
+ do {
+ int amountRequested = Math.max(stream.available(), DEFAULT_READING_SIZE); // read at least 8K
+
+ // resize contents if needed
+ if (contentsLength + amountRequested > contents.length) {
+ System.arraycopy(
+ contents,
+ 0,
+ contents = new byte[contentsLength + amountRequested],
+ 0,
+ contentsLength);
+ }
+
+ // read as many bytes as possible
+ amountRead = stream.read(contents, contentsLength, amountRequested);
+
+ if (amountRead > 0) {
+ // remember length of contents
+ contentsLength += amountRead;
+ }
+ } while (amountRead != -1);
+
+ // resize contents if necessary
+ if (contentsLength < contents.length) {
+ System.arraycopy(
+ contents,
+ 0,
+ contents = new byte[contentsLength],
+ 0,
+ contentsLength);
+ }
+ } else {
+ contents = new byte[length];
+ int len = 0;
+ int readSize = 0;
+ while ((readSize != -1) && (len != length)) {
+ // See PR 1FMS89U
+ // We record first the read size. In this case len is the actual read size.
+ len += readSize;
+ readSize = stream.read(contents, len, length - len);
+ }
+ }
+
+ return contents;
+ }
+ /*
+ * NIO support to get input stream as char array.
+ * Not used as with JDK 1.4.2 this support is slower than standard IO one...
+ * Keep it as comment for future in case of next JDK versions improve performance
+ * in this area...
+ public static char[] getInputStreamAsCharArray(FileInputStream stream, int length, String encoding)
+ throws IOException {
+
+ FileChannel channel = stream.getChannel();
+ int size = (int)channel.size();
+ if (length >= 0 && length < size) size = length;
+ Charset charset = encoding==null?systemCharset:Charset.forName(encoding);
+ if (charset != null) {
+ MappedByteBuffer bbuffer = channel.map(FileChannel.MapMode.READ_ONLY, 0, size);
+ CharsetDecoder decoder = charset.newDecoder();
+ CharBuffer buffer = decoder.decode(bbuffer);
+ char[] contents = new char[buffer.limit()];
+ buffer.get(contents);
+ return contents;
+ }
+ throw new UnsupportedCharsetException(SYSTEM_FILE_ENCODING);
+ }
+ */
+ /**
+ * Returns the given input stream's contents as a character array.
+ * If a length is specified (ie. if length != -1), only length chars
+ * are returned. Otherwise all chars in the stream are returned.
+ * Note this doesn't close the stream.
+ * @throws IOException if a problem occured reading the stream.
+ */
+ public static char[] getInputStreamAsCharArray(InputStream stream, int length, String encoding)
+ throws IOException {
+ InputStreamReader reader = null;
+ reader = encoding == null
+ ? new InputStreamReader(stream)
+ : new InputStreamReader(stream, encoding);
+ char[] contents;
+ if (length == -1) {
+ contents = CharOperation.NO_CHAR;
+ int contentsLength = 0;
+ int amountRead = -1;
+ do {
+ int amountRequested = Math.max(stream.available(), DEFAULT_READING_SIZE); // read at least 8K
+
+ // resize contents if needed
+ if (contentsLength + amountRequested > contents.length) {
+ System.arraycopy(
+ contents,
+ 0,
+ contents = new char[contentsLength + amountRequested],
+ 0,
+ contentsLength);
+ }
+
+ // read as many chars as possible
+ amountRead = reader.read(contents, contentsLength, amountRequested);
+
+ if (amountRead > 0) {
+ // remember length of contents
+ contentsLength += amountRead;
+ }
+ } while (amountRead != -1);
+
+ // Do not keep first character for UTF-8 BOM encoding
+ int start = 0;
+ if (contentsLength > 0 && "UTF-8".equals(encoding)) { //$NON-NLS-1$
+ if (contents[0] == 0xFEFF) { // if BOM char then skip
+ contentsLength--;
+ start = 1;
+ }
+ }
+ // resize contents if necessary
+ if (contentsLength < contents.length) {
+ System.arraycopy(
+ contents,
+ start,
+ contents = new char[contentsLength],
+ 0,
+ contentsLength);
+ }
+ } else {
+ contents = new char[length];
+ int len = 0;
+ int readSize = 0;
+ while ((readSize != -1) && (len != length)) {
+ // See PR 1FMS89U
+ // We record first the read size. In this case len is the actual read size.
+ len += readSize;
+ readSize = reader.read(contents, len, length - len);
+ }
+ // Do not keep first character for UTF-8 BOM encoding
+ int start = 0;
+ if (length > 0 && "UTF-8".equals(encoding)) { //$NON-NLS-1$
+ if (contents[0] == 0xFEFF) { // if BOM char then skip
+ len--;
+ start = 1;
+ }
+ }
+ // See PR 1FMS89U
+ // Now we need to resize in case the default encoding used more than one byte for each
+ // character
+ if (len != length)
+ System.arraycopy(contents, start, (contents = new char[len]), 0, len);
+ }
+
+ return contents;
+ }
+
+ /**
+ * Returns the contents of the given zip entry as a byte array.
+ * @throws IOException if a problem occured reading the zip entry.
+ */
+ public static byte[] getZipEntryByteContent(ZipEntry ze, ZipFile zip)
+ throws IOException {
+
+ InputStream stream = null;
+ try {
+ stream = new BufferedInputStream(zip.getInputStream(ze));
+ return getInputStreamAsByteArray(stream, (int) ze.getSize());
+ } finally {
+ if (stream != null) {
+ try {
+ stream.close();
+ } catch (IOException e) {
+ // ignore
+ }
+ }
+ }
+ }
+ /**
+ * Returns true iff str.toLowerCase().endsWith(".jar") || str.toLowerCase().endsWith(".zip")
+ * implementation is not creating extra strings.
+ */
+ public final static boolean isArchiveFileName(String name) {
+ int nameLength = name == null ? 0 : name.length();
+ int suffixLength = SUFFIX_JAR.length;
+ if (nameLength < suffixLength) return false;
+
+ // try to match as JAR file
+ for (int i = 0; i < suffixLength; i++) {
+ char c = name.charAt(nameLength - i - 1);
+ int suffixIndex = suffixLength - i - 1;
+ if (c != SUFFIX_jar[suffixIndex] && c != SUFFIX_JAR[suffixIndex]) {
+
+ // try to match as ZIP file
+ suffixLength = SUFFIX_ZIP.length;
+ if (nameLength < suffixLength) return false;
+ for (int j = 0; j < suffixLength; j++) {
+ c = name.charAt(nameLength - j - 1);
+ suffixIndex = suffixLength - j - 1;
+ if (c != SUFFIX_zip[suffixIndex] && c != SUFFIX_ZIP[suffixIndex]) return false;
+ }
+ return true;
+ }
+ }
+ return true;
+ }
+ /**
+ * Returns true iff str.toLowerCase().endsWith(".class")
+ * implementation is not creating extra strings.
+ */
+ public final static boolean isClassFileName(String name) {
+ int nameLength = name == null ? 0 : name.length();
+ int suffixLength = SUFFIX_CLASS.length;
+ if (nameLength < suffixLength) return false;
+
+ for (int i = 0; i < suffixLength; i++) {
+ char c = name.charAt(nameLength - i - 1);
+ int suffixIndex = suffixLength - i - 1;
+ if (c != SUFFIX_class[suffixIndex] && c != SUFFIX_CLASS[suffixIndex]) return false;
+ }
+ return true;
+ }
+ /**
+ * Returns true iff str.toLowerCase().endsWith(".class")
+ * implementation is not creating extra strings.
+ */
+ public final static boolean isClassFileName(char[] name) {
+ int nameLength = name == null ? 0 : name.length;
+ int suffixLength = SUFFIX_CLASS.length;
+ if (nameLength < suffixLength) return false;
+
+ for (int i = 0, offset = nameLength - suffixLength; i < suffixLength; i++) {
+ char c = name[offset + i];
+ if (c != SUFFIX_class[i] && c != SUFFIX_CLASS[i]) return false;
+ }
+ return true;
+ }
+ /**
+ * Returns true iff str.toLowerCase().endsWith(".java")
+ * implementation is not creating extra strings.
+ */
+ public final static boolean isJavaFileName(String name) {
+ int nameLength = name == null ? 0 : name.length();
+ int suffixLength = SUFFIX_JAVA.length;
+ if (nameLength < suffixLength) return false;
+
+ for (int i = 0; i < suffixLength; i++) {
+ char c = name.charAt(nameLength - i - 1);
+ int suffixIndex = suffixLength - i - 1;
+ if (c != SUFFIX_java[suffixIndex] && c != SUFFIX_JAVA[suffixIndex]) return false;
+ }
+ return true;
+ }
+ /**
+ * Returns true iff str.toLowerCase().endsWith(".java")
+ * implementation is not creating extra strings.
+ */
+ public final static boolean isJavaFileName(char[] name) {
+ int nameLength = name == null ? 0 : name.length;
+ int suffixLength = SUFFIX_JAVA.length;
+ if (nameLength < suffixLength) return false;
+
+ for (int i = 0, offset = nameLength - suffixLength; i < suffixLength; i++) {
+ char c = name[offset + i];
+ if (c != SUFFIX_java[i] && c != SUFFIX_JAVA[i]) return false;
+ }
+ return true;
+ }
+ /**
+ * Converts an array of Objects into String.
+ */
+ public static String toString(Object[] objects) {
+ return toString(objects,
+ new Displayable(){
+ public String displayString(Object o) {
+ if (o == null) return "null"; //$NON-NLS-1$
+ return o.toString();
+ }
+ });
+ }
+
+ /**
+ * Converts an array of Objects into String.
+ */
+ public static String toString(Object[] objects, Displayable renderer) {
+ if (objects == null) return ""; //$NON-NLS-1$
+ StringBuffer buffer = new StringBuffer(10);
+ for (int i = 0; i < objects.length; i++){
+ if (i > 0) buffer.append(", "); //$NON-NLS-1$
+ buffer.append(renderer.displayString(objects[i]));
+ }
+ return buffer.toString();
+ }
+
+ /**
+ * Converts a boolean value into Boolean.
+ * @param bool The boolean to convert
+ * @return The corresponding Boolean object (TRUE or FALSE).
+ */
+ public static Boolean toBoolean(boolean bool) {
+ if (bool) {
+ return Boolean.TRUE;
+ } else {
+ return Boolean.FALSE;
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/WeakHashSet.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/WeakHashSet.js
new file mode 100644
index 0000000..3f7975e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/WeakHashSet.js
@@ -0,0 +1,206 @@
+/*******************************************************************************
+ * Copyright (c) 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.compiler.util;
+import java.lang.ref.ReferenceQueue;
+import java.lang.ref.WeakReference;
+
+/**
+ * A hashset whose values can be garbage collected.
+ */
+public class WeakHashSet {
+
+ public class HashableWeakReference extends WeakReference {
+ public int hashCode;
+ public HashableWeakReference(Object referent, ReferenceQueue queue) {
+ super(referent, queue);
+ this.hashCode = referent.hashCode();
+ }
+ public boolean equals(Object obj) {
+ if (!(obj instanceof HashableWeakReference)) return false;
+ Object referent = get();
+ Object other = ((HashableWeakReference) obj).get();
+ if (referent == null) return other == null;
+ return referent.equals(other);
+ }
+ public int hashCode() {
+ return this.hashCode;
+ }
+ public String toString() {
+ Object referent = get();
+ if (referent == null) return "[hashCode=" + this.hashCode + "] <referent was garbage collected>"; //$NON-NLS-1$ //$NON-NLS-2$
+ return "[hashCode=" + this.hashCode + "] " + referent.toString(); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ HashableWeakReference[] values;
+ public int elementSize; // number of elements in the table
+ int threshold;
+ ReferenceQueue referenceQueue = new ReferenceQueue();
+
+ public WeakHashSet() {
+ this(5);
+ }
+
+ public WeakHashSet(int size) {
+ this.elementSize = 0;
+ this.threshold = size; // size represents the expected number of elements
+ int extraRoom = (int) (size * 1.75f);
+ if (this.threshold == extraRoom)
+ extraRoom++;
+ this.values = new HashableWeakReference[extraRoom];
+ }
+
+ /*
+ * Adds the given object to this set.
+ * If an object that is equals to the given object already exists, do nothing.
+ * Returns the existing object or the new object if not found.
+ */
+ public Object add(Object obj) {
+ cleanupGarbageCollectedValues();
+ int index = (obj.hashCode() & 0x7FFFFFFF) % this.values.length;
+ HashableWeakReference currentValue;
+ while ((currentValue = this.values[index]) != null) {
+ Object referent;
+ if (obj.equals(referent = currentValue.get())) {
+ return referent;
+ }
+ index = (index + 1) % this.values.length;
+ }
+ this.values[index] = new HashableWeakReference(obj, this.referenceQueue);
+
+ // assumes the threshold is never equal to the size of the table
+ if (++this.elementSize > this.threshold)
+ rehash();
+
+ return obj;
+ }
+
+ private void addValue(HashableWeakReference value) {
+ Object obj = value.get();
+ if (obj == null) return;
+ int valuesLength = this.values.length;
+ int index = (value.hashCode & 0x7FFFFFFF) % valuesLength;
+ HashableWeakReference currentValue;
+ while ((currentValue = this.values[index]) != null) {
+ if (obj.equals(currentValue.get())) {
+ return;
+ }
+ index = (index + 1) % valuesLength;
+ }
+ this.values[index] = value;
+
+ // assumes the threshold is never equal to the size of the table
+ if (++this.elementSize > this.threshold)
+ rehash();
+ }
+
+ private void cleanupGarbageCollectedValues() {
+ HashableWeakReference toBeRemoved;
+ while ((toBeRemoved = (HashableWeakReference) this.referenceQueue.poll()) != null) {
+ int hashCode = toBeRemoved.hashCode;
+ int valuesLength = this.values.length;
+ int index = (hashCode & 0x7FFFFFFF) % valuesLength;
+ HashableWeakReference currentValue;
+ while ((currentValue = this.values[index]) != null) {
+ if (currentValue == toBeRemoved) {
+ // replace the value at index with the last value with the same hash
+ int sameHash = index;
+ int current;
+ while ((currentValue = this.values[current = (sameHash + 1) % valuesLength]) != null && currentValue.hashCode == hashCode)
+ sameHash = current;
+ this.values[index] = this.values[sameHash];
+ this.values[sameHash] = null;
+ this.elementSize--;
+ break;
+ }
+ index = (index + 1) % valuesLength;
+ }
+ }
+ }
+
+ public boolean contains(Object obj) {
+ return get(obj) != null;
+ }
+
+ /*
+ * Return the object that is in this set and that is equals to the given object.
+ * Return null if not found.
+ */
+ public Object get(Object obj) {
+ cleanupGarbageCollectedValues();
+ int valuesLength = this.values.length;
+ int index = (obj.hashCode() & 0x7FFFFFFF) % valuesLength;
+ HashableWeakReference currentValue;
+ while ((currentValue = this.values[index]) != null) {
+ Object referent;
+ if (obj.equals(referent = currentValue.get())) {
+ return referent;
+ }
+ index = (index + 1) % valuesLength;
+ }
+ return null;
+ }
+
+ private void rehash() {
+ WeakHashSet newHashSet = new WeakHashSet(this.elementSize * 2); // double the number of expected elements
+ newHashSet.referenceQueue = this.referenceQueue;
+ HashableWeakReference currentValue;
+ for (int i = 0, length = this.values.length; i < length; i++)
+ if ((currentValue = this.values[i]) != null)
+ newHashSet.addValue(currentValue);
+
+ this.values = newHashSet.values;
+ this.threshold = newHashSet.threshold;
+ this.elementSize = newHashSet.elementSize;
+ }
+
+ /*
+ * Removes the object that is in this set and that is equals to the given object.
+ * Return the object that was in the set, or null if not found.
+ */
+ public Object remove(Object obj) {
+ cleanupGarbageCollectedValues();
+ int valuesLength = this.values.length;
+ int index = (obj.hashCode() & 0x7FFFFFFF) % valuesLength;
+ HashableWeakReference currentValue;
+ while ((currentValue = this.values[index]) != null) {
+ Object referent;
+ if (obj.equals(referent = currentValue.get())) {
+ this.elementSize--;
+ this.values[index] = null;
+ rehash();
+ return referent;
+ }
+ index = (index + 1) % valuesLength;
+ }
+ return null;
+ }
+
+ public int size() {
+ return this.elementSize;
+ }
+
+ public String toString() {
+ StringBuffer buffer = new StringBuffer("{"); //$NON-NLS-1$
+ for (int i = 0, length = this.values.length; i < length; i++) {
+ HashableWeakReference value = this.values[i];
+ if (value != null) {
+ Object ref = value.get();
+ if (ref != null) {
+ buffer.append(ref.toString());
+ buffer.append(", "); //$NON-NLS-1$
+ }
+ }
+ }
+ buffer.append("}"); //$NON-NLS-1$
+ return buffer.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/messages.properties b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/messages.properties
new file mode 100644
index 0000000..c6ddb5b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/messages.properties
@@ -0,0 +1,66 @@
+###############################################################################
+# Copyright (c) 2000, 2004 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Common Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/cpl-v10.html
+#
+# Contributors:
+# IBM Corporation - initial API and implementation
+###############################################################################
+### Eclipse Java Core Compiler messages.
+
+### compilation
+compilation.unresolvedProblem = Unresolved compilation problem: \n
+compilation.unresolvedProblems = Unresolved compilation problems: \n
+compilation.request = [parsing {2} - #{0}/{1}]
+compilation.loadBinary = [reading {0}.class]
+compilation.process = [analyzing {2} - #{0}/{1}]
+compilation.write = [writing {1} - #{0}]
+compilation.done = [completed {2} - #{0}/{1}]
+compilation.units = [{0} units compiled]
+compilation.unit = [{0} unit compiled]
+compilation.internalError = Internal compiler error
+
+### output
+output.isFile = The outDir is a file : {0}
+output.isFileNotDirectory = The outDir is a file not a directory.
+output.dirName = The output dir name is : {0}
+output.notValidAll = The outDir is not a valid directory name. All the directories cannot be created.
+output.fileName = file name : {0}
+output.notValid = The outDir is not a valid directory name. The directory cannot be created.
+
+### problem
+problem.noSourceInformation = \n!! no source information available !!
+problem.atLine = (at line {0})
+
+### abort
+abort.invalidAttribute = SANITY CHECK: Invalid attribute for local variable {0}
+abort.missingCode = Missing code implementation in the compiler
+abort.againstSourceModel = Cannot compile against source model {0} issued from {1}
+
+### accept
+accept.cannot = Cannot accept the compilation unit:
+
+### parser
+parser.incorrectPath = The path for the.jsScriptdcl.jsScript file is incorrect
+parser.moveFiles = MOVE FILES IN THE Runtime DIRECTORY OF Parser.class
+parser.syntaxRecovery = SYNTAX RECOVERY
+parser.regularParse = REGULAR PARSE
+parser.missingFile = missing file {0}
+parser.corruptedFile = corrupted file {0}
+parser.endOfFile = end of file
+parser.endOfConstructor = end of constructor
+parser.endOfMethod = end of function
+parser.endOfInitializer = end of initializer
+
+### ast
+ast.missingCode = Missing code gen implementation
+
+### constant
+constant.cannotCastedInto = {0} constant cannot be casted into {1}
+constant.cannotConvertedTo = {0} constant cannot be converted to {1}
+
+### miscellaneous
+error.undefinedTypeVariable = Undefined type variable: {0}
+error.missingBound = The class files for {0} and {1} are out of sync \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/constructors.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/constructors.jar
new file mode 100644
index 0000000..e8374af
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/constructors.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/constructorssrc.zip b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/constructorssrc.zip
new file mode 100644
index 0000000..be53e39
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/constructorssrc.zip
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/generics.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/generics.jar
new file mode 100644
index 0000000..0898750
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/generics.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/genericssrc.zip b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/genericssrc.zip
new file mode 100644
index 0000000..ed67185
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/genericssrc.zip
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/lib.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/lib.jar
new file mode 100644
index 0000000..a0aa3d6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/lib.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/pack.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/pack.jar
new file mode 100644
index 0000000..c8cba3b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/pack.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/same.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/same.jar
new file mode 100644
index 0000000..f7f4a60
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/same.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/A.js
new file mode 100644
index 0000000..69d90ed
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/A.js
@@ -0,0 +1,7 @@
+public class A {
+ public int bar;
+ public void bar(){}
+ public void foobar(){}
+ public void foobar(int i){}
+ public static void foo(){}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/B.js
new file mode 100644
index 0000000..1caa842
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/B.js
@@ -0,0 +1,4 @@
+public interface B {
+ public void foobar();
+ public void foobar(int i);
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CUWithSecondaryType.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CUWithSecondaryType.js
new file mode 100644
index 0000000..74f7dec
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CUWithSecondaryType.js
@@ -0,0 +1,6 @@
+public class CUWithSecondaryType {
+
+}
+class SecondaryType2 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/ClassWithComplexName.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/ClassWithComplexName.js
new file mode 100644
index 0000000..8dccb5f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/ClassWithComplexName.js
@@ -0,0 +1,2 @@
+public class ClassWithComplexName {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/Completion2InterfacesWithSameMethod.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/Completion2InterfacesWithSameMethod.js
new file mode 100644
index 0000000..eb210e4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/Completion2InterfacesWithSameMethod.js
@@ -0,0 +1,13 @@
+public class Completion2InterfacesWithSameMethod {
+ void foo(Completion2InterfacesWithSameMethodI1 var){
+ var.meth
+ }
+}
+interface Completion2InterfacesWithSameMethodI1 extends Completion2InterfacesWithSameMethodI2, Completion2InterfacesWithSameMethodI3{
+}
+interface Completion2InterfacesWithSameMethodI2 {
+ void method();
+}
+interface Completion2InterfacesWithSameMethodI3 {
+ void method();
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAfterCase1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAfterCase1.js
new file mode 100644
index 0000000..58fdcec
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAfterCase1.js
@@ -0,0 +1,8 @@
+public class CompletionAfterCase1 {
+ static final int zzz = 5;
+ void foo(){
+ switch(1) {
+ case zz
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAfterCase2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAfterCase2.js
new file mode 100644
index 0000000..fdbac40
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAfterCase2.js
@@ -0,0 +1,9 @@
+public class CompletionAfterCase2 {
+ static final int zzz = 5;
+ void foo(){
+ switch(1) {
+ case 25:
+ case zz
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAfterSupercall1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAfterSupercall1.js
new file mode 100644
index 0000000..a35f010
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAfterSupercall1.js
@@ -0,0 +1,14 @@
+public class CompletionAfterSupercall1 extends CompletionAfterSupercall1_1 {
+ public void foo(){
+ super.foo
+ }
+}
+abstract class CompletionAfterSupercall1_1 extends CompletionAfterSupercall1_2 implements CompletionAfterSupercall1_3 {
+
+}
+class CompletionAfterSupercall1_2 implements CompletionAfterSupercall1_3 {
+ public void foo(){}
+}
+interface CompletionAfterSupercall1_3 {
+ public void foo();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAfterSwitch.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAfterSwitch.js
new file mode 100644
index 0000000..922c8c0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAfterSwitch.js
@@ -0,0 +1,14 @@
+public class CompletionAfterSwitch {
+ int x;
+ void foo() {
+ switch (x) {
+ case 0:
+ x += 1;
+ break;
+ }
+ bar
+ }
+ void bar() {
+ }
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAllocationExpressionIsParent1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAllocationExpressionIsParent1.js
new file mode 100644
index 0000000..4f3fb22
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAllocationExpressionIsParent1.js
@@ -0,0 +1,14 @@
+public class CompletionAllocationExpressionIsParent1 {
+ CompletionAllocationExpressionIsParent1(int i, long j){super();}
+ CompletionAllocationExpressionIsParent1(int i, Object j){super();}
+
+ long zzlong;
+ int zzint;
+ double zzdouble;
+ boolean zzboolean;
+ Object zzObject;
+
+ void foo() {
+ new CompletionAllocationExpressionIsParent1(1, zz
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAllocationExpressionIsParent4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAllocationExpressionIsParent4.js
new file mode 100644
index 0000000..9eb3edf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAllocationExpressionIsParent4.js
@@ -0,0 +1,14 @@
+public class CompletionAllocationExpressionIsParent4 {
+ CompletionAllocationExpressionIsParent4(long i, long j){}
+ CompletionAllocationExpressionIsParent4(Object i, Object j){}
+
+ long zzlong;
+ int zzint;
+ double zzdouble;
+ boolean zzboolean;
+ Object zzObject;
+
+ void foo() {
+ new CompletionAllocationExpressionIsParent4(1, zz
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAllocationExpressionIsParent5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAllocationExpressionIsParent5.js
new file mode 100644
index 0000000..e7e64b5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAllocationExpressionIsParent5.js
@@ -0,0 +1,13 @@
+public class CompletionAllocationExpressionIsParent5 {
+ CompletionAllocationExpressionIsParent5(int i){}
+
+ long zzlong;
+ int zzint;
+ double zzdouble;
+ boolean zzboolean;
+ Object zzObject;
+
+ void foo() {
+ new CompletionAllocationExpressionIsParent5(1, zz
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAmbiguousFieldName.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAmbiguousFieldName.js
new file mode 100644
index 0000000..72ccb63
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAmbiguousFieldName.js
@@ -0,0 +1,6 @@
+public class CompletionAmbiguousFieldName {
+ int xBar;
+ public void foo(int xBar){
+ xBa
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAmbiguousFieldName3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAmbiguousFieldName3.js
new file mode 100644
index 0000000..4a3a940
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAmbiguousFieldName3.js
@@ -0,0 +1,12 @@
+public class CompletionAmbiguousFieldName3 {
+ public void foo(){
+ class ClassFoo {
+ int xBar;
+ class ClassFoo2{
+ public void foo(int xBar){
+ xBa
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAmbiguousFieldName4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAmbiguousFieldName4.js
new file mode 100644
index 0000000..5147b6d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAmbiguousFieldName4.js
@@ -0,0 +1,12 @@
+public class CompletionAmbiguousFieldName4 {
+ public void foo(){
+ new Object() {
+ int xBar;
+ class ClassFoo {
+ public void foo(int xBar){
+ xBa
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAmbiguousType.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAmbiguousType.js
new file mode 100644
index 0000000..0ce0efc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAmbiguousType.js
@@ -0,0 +1,6 @@
+import p1.*;
+import p2.*;
+
+public class CompletionAmbiguousType {
+ ABC
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAmbiguousType2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAmbiguousType2.js
new file mode 100644
index 0000000..6a31096
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAmbiguousType2.js
@@ -0,0 +1,6 @@
+import p1.ABC;
+import p2.*;
+
+public class CompletionAmbiguousType2 {
+ ABC
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionArgumentName.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionArgumentName.js
new file mode 100644
index 0000000..378c0ea
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionArgumentName.js
@@ -0,0 +1,7 @@
+import java.io.FileInputStream;
+
+public class CompletionArgumentName {
+ public void foo(ClassWithComplexName complexName, ClassWithComplexName ){
+
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionArrayAccess1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionArrayAccess1.js
new file mode 100644
index 0000000..dfa8757
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionArrayAccess1.js
@@ -0,0 +1,8 @@
+public class CompletionArrayAccess1 {
+ String zzz1;
+ int zzz2;
+ void foo(){
+ String[] s;
+ String s2 = s[zzz]
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionArraysCloneMethod.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionArraysCloneMethod.js
new file mode 100644
index 0000000..a51adc8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionArraysCloneMethod.js
@@ -0,0 +1,5 @@
+public class CompletionArraysCloneMethod {
+ public void foo(){
+ new int[]{}.cl
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAssignmentInMethod1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAssignmentInMethod1.js
new file mode 100644
index 0000000..8c4f6dc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAssignmentInMethod1.js
@@ -0,0 +1,12 @@
+public class CompletionAssignmentInMethod1 {
+ long zzlong;
+ int zzint;
+ double zzdouble;
+ boolean zzboolean;
+ Object zzObject;
+
+ void foo {
+ long o;
+ o = zz
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAssignmentInMethod2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAssignmentInMethod2.js
new file mode 100644
index 0000000..a97e68b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAssignmentInMethod2.js
@@ -0,0 +1,12 @@
+public class CompletionAssignmentInMethod2 {
+ long zzlong;
+ int zzint;
+ double zzdouble;
+ boolean zzboolean;
+ Object zzObject;
+
+ void foo {
+ Object o;
+ o = zz
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAssignmentInMethod3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAssignmentInMethod3.js
new file mode 100644
index 0000000..3c9a630
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAssignmentInMethod3.js
@@ -0,0 +1,6 @@
+public class CompletionAssignmentInMethod3 {
+ void foo {
+ Object o;
+ o = new Objec
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAssignmentInMethod4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAssignmentInMethod4.js
new file mode 100644
index 0000000..56e31a2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAssignmentInMethod4.js
@@ -0,0 +1,6 @@
+public class CompletionAssignmentInMethod4 {
+ void foo {
+ Object o;
+ o = new Objec;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicField1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicField1.js
new file mode 100644
index 0000000..6d3c689
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicField1.js
@@ -0,0 +1,6 @@
+public class CompletionBasicField1 {
+ public int zzvarzz;
+ void foo() {
+ zzvar
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicKeyword1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicKeyword1.js
new file mode 100644
index 0000000..4438459
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicKeyword1.js
@@ -0,0 +1,5 @@
+//public class CompletionBasicKeyword1 {
+ function foo() {
+ whil
+ }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicLocalVariable1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicLocalVariable1.js
new file mode 100644
index 0000000..fe9efa9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicLocalVariable1.js
@@ -0,0 +1,6 @@
+//public class CompletionBasicLocalVariable1 {
+ function foo() {
+ var zzvarzz;
+ zzvar
+ }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicMethod1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicMethod1.js
new file mode 100644
index 0000000..8d6126d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicMethod1.js
@@ -0,0 +1,5 @@
+//public class CompletionBasicMethod1 {
+ function zzfoo() {
+ zzfo
+ }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicMethodDeclaration1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicMethodDeclaration1.js
new file mode 100644
index 0000000..b2c4b3b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicMethodDeclaration1.js
@@ -0,0 +1,3 @@
+public class CompletionBasicMethodDeclaration1 {
+ equals
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicPackage1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicPackage1.js
new file mode 100644
index 0000000..150f314
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicPackage1.js
@@ -0,0 +1,3 @@
+public class CompletionBasicPackage1 {
+ java.lan
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicPotentialMethodDeclaration1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicPotentialMethodDeclaration1.js
new file mode 100644
index 0000000..c43f84f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicPotentialMethodDeclaration1.js
@@ -0,0 +1,3 @@
+public class CompletionBasicPotentialMethodDeclaration1 {
+ zzpot
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicType1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicType1.js
new file mode 100644
index 0000000..811d069
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicType1.js
@@ -0,0 +1,5 @@
+public class CompletionBasicType1 {
+ void foo() {
+ Objec
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBinaryOperator1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBinaryOperator1.js
new file mode 100644
index 0000000..377937e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBinaryOperator1.js
@@ -0,0 +1,10 @@
+public class CompletionBinaryOperator1 {
+ int var1;
+ boolean var2;
+ Object var3;
+ String var4
+
+ void foo() {
+ int x = 1 + var
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBinaryOperator2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBinaryOperator2.js
new file mode 100644
index 0000000..b0ed185
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBinaryOperator2.js
@@ -0,0 +1,9 @@
+public class CompletionBinaryOperator2 {
+ int var1;
+ boolean var2;
+ Object var3;
+
+ void foo() {
+ boolean b = true || var
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBinaryOperator3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBinaryOperator3.js
new file mode 100644
index 0000000..7276e33
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBinaryOperator3.js
@@ -0,0 +1,9 @@
+public class CompletionBinaryOperator3 {
+ int var1;
+ boolean var2;
+ Object var3;
+
+ void foo() {
+ double x = 1 / var
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionCaseInsensitive.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionCaseInsensitive.js
new file mode 100644
index 0000000..f8ea5de
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionCaseInsensitive.js
@@ -0,0 +1,6 @@
+//public class CompletionCaseInsensitive {
+ var field;
+// public void foo() {
+ Field
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionCaseInsensitivePackage.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionCaseInsensitivePackage.js
new file mode 100644
index 0000000..a696604
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionCaseInsensitivePackage.js
@@ -0,0 +1,5 @@
+public class CompletionCaseInsensitivePackage {
+ public void foo() {
+ Ja
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionCastIsParent1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionCastIsParent1.js
new file mode 100644
index 0000000..4c057aa
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionCastIsParent1.js
@@ -0,0 +1,27 @@
+public class CompletionCastIsParent1 {
+ Object zzOb;
+ XX00 zz00;
+ XX01 zz01;
+ XX02 zz02;
+ XX10 zz10;
+ XX11 zz11;
+ XX12 zz12;
+ XX20 zz20;
+ XX21 zz21;
+ XX22 zz22;
+
+ Object zzObM(){}
+ XX00 zz00M(){}
+ XX01 zz01M(){}
+ XX02 zz02M(){}
+ XX10 zz10M(){}
+ XX11 zz11M(){}
+ XX12 zz12M(){}
+ XX20 zz20M(){}
+ XX21 zz21M(){}
+ XX22 zz22M(){}
+
+ XX11 foo() {
+ return (XX11)zz
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionCastIsParent2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionCastIsParent2.js
new file mode 100644
index 0000000..035d375
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionCastIsParent2.js
@@ -0,0 +1,5 @@
+public class CompletionCastIsParent2 {
+ XX11 foo() {
+ return (XX11)xx
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionCatchArgumentName2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionCatchArgumentName2.js
new file mode 100644
index 0000000..3369fb8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionCatchArgumentName2.js
@@ -0,0 +1,7 @@
+public class CompletionCatchArgumentName2 {
+ public void foo(){
+ try{
+
+ } catch (Exception )
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionClassLiteralAfterAnonymousType1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionClassLiteralAfterAnonymousType1.js
new file mode 100644
index 0000000..b061762
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionClassLiteralAfterAnonymousType1.js
@@ -0,0 +1,13 @@
+public class CompletionClassLiteralAfterAnonymousType1 {
+ public class X {
+ void foo() {
+ new X() {
+ void bar() {
+ new Object() {
+ };
+ double.
+ }
+ };
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionConditionalExpression1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionConditionalExpression1.js
new file mode 100644
index 0000000..67c542d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionConditionalExpression1.js
@@ -0,0 +1,12 @@
+public class CompletionConditionalExpression1 {
+ int var1;
+ boolean var2;
+ Object var3;
+ String var4
+
+ void foo() {
+ boolean a, b;
+ int c;
+ c = a == b ? var
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionConditionalExpression2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionConditionalExpression2.js
new file mode 100644
index 0000000..e2f391a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionConditionalExpression2.js
@@ -0,0 +1,12 @@
+public class CompletionConditionalExpression2 {
+ int var1;
+ boolean var2;
+ Object var3;
+ String var4
+
+ void foo() {
+ boolean a, b;
+ int c;
+ c = a == b ? var1 : var
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionConditionalExpression3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionConditionalExpression3.js
new file mode 100644
index 0000000..8faa992
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionConditionalExpression3.js
@@ -0,0 +1,12 @@
+public class CompletionConditionalExpression3 {
+ int var1;
+ boolean var2;
+ Object var3;
+ String var4
+
+ void foo() {
+ boolean a, b;
+ int c;
+ c = a == b ? var1 : (var
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionConstructorForAnonymousType.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionConstructorForAnonymousType.js
new file mode 100644
index 0000000..4d17d82
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionConstructorForAnonymousType.js
@@ -0,0 +1,5 @@
+public class CompletionConstructorForAnonymousType {
+ void foo() {
+ TypeWithConstructor a = new TypeWithConstructor(
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionDefaultPackage.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionDefaultPackage.js
new file mode 100644
index 0000000..13f50b5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionDefaultPackage.js
@@ -0,0 +1,5 @@
+public class CompletionDefaultPackage {
+ public void foo() {
+ Default.foo();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionEmptyToken1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionEmptyToken1.js
new file mode 100644
index 0000000..d88ebdf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionEmptyToken1.js
@@ -0,0 +1,6 @@
+public class CompletionEmptyToken1 {
+ int zzyy;
+ void foo() {
+ zzyy
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionEmptyTypeName2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionEmptyTypeName2.js
new file mode 100644
index 0000000..b3cd74b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionEmptyTypeName2.js
@@ -0,0 +1,5 @@
+public class CompletionEmptyTypeName2 {
+ void foo() {
+ A a =
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionEmptyTypeName3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionEmptyTypeName3.js
new file mode 100644
index 0000000..699a5e6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionEmptyTypeName3.js
@@ -0,0 +1,8 @@
+public class CompletionEmptyTypeName3 {
+ void foo() {
+ CompletionEmptyTypeName2 x =
+ }
+ class CompletionEmptyTypeName3_1 {}
+}
+class CompletionEmptyTypeName3_2 {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionEndOfCompilationUnit.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionEndOfCompilationUnit.js
new file mode 100644
index 0000000..9393614
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionEndOfCompilationUnit.js
@@ -0,0 +1,5 @@
+public class CompletionEndOfCompilationUnit {
+ public void foo() {
+ }
+ public void foo(int i) {
+ foo \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionExactNameCaseInsensitive.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionExactNameCaseInsensitive.js
new file mode 100644
index 0000000..d4d72bd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionExactNameCaseInsensitive.js
@@ -0,0 +1,6 @@
+public class CompletionExactNameCaseInsensitive {
+ void foo(compleTionexactnamecaseInsensitive c){}
+}
+class CompletionExactNameCaseInsensitivePlus {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionExpectedTypeIsNotValid.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionExpectedTypeIsNotValid.js
new file mode 100644
index 0000000..8e3b0aa
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionExpectedTypeIsNotValid.js
@@ -0,0 +1,5 @@
+public class CompletionExpectedTypeIsNotValid {
+ public void foo() {
+ UnknownType var = new U
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFieldInitializer1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFieldInitializer1.js
new file mode 100644
index 0000000..9889f00
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFieldInitializer1.js
@@ -0,0 +1,9 @@
+public class CompletionFieldInitializer1 {
+ long zzlong;
+ int zzint;
+ double zzdouble;
+ boolean zzboolean;
+ Object zzObject;
+
+ long o = zz
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFieldInitializer2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFieldInitializer2.js
new file mode 100644
index 0000000..1e1e239
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFieldInitializer2.js
@@ -0,0 +1,9 @@
+public class CompletionFieldInitializer2 {
+ long zzlong;
+ int zzint;
+ double zzdouble;
+ boolean zzboolean;
+ Object zzObject;
+
+ Object o = zz
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFieldInitializer3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFieldInitializer3.js
new file mode 100644
index 0000000..dd25a79
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFieldInitializer3.js
@@ -0,0 +1,3 @@
+public class CompletionFieldInitializer3 {
+ Object o = new Objec
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFieldInitializer4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFieldInitializer4.js
new file mode 100644
index 0000000..f07fd11
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFieldInitializer4.js
@@ -0,0 +1,3 @@
+public class CompletionFieldInitializer4 {
+ Object o = new Objec;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFieldName.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFieldName.js
new file mode 100644
index 0000000..d0135e7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFieldName.js
@@ -0,0 +1,4 @@
+public class CompletionFieldName {
+ ClassWithComplexName complexName;
+ ClassWithComplexName
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindClass2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindClass2.js
new file mode 100644
index 0000000..19484de
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindClass2.js
@@ -0,0 +1,5 @@
+public class CompletionFindClass2 {
+ public void foo(){
+ pack1.PX
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindException1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindException1.js
new file mode 100644
index 0000000..efd8a6f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindException1.js
@@ -0,0 +1,7 @@
+public class CompletionFindException1 {
+ void foo(){
+ try{
+ } catch(Ex e) {
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindException2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindException2.js
new file mode 100644
index 0000000..ce82e44
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindException2.js
@@ -0,0 +1,4 @@
+public class CompletionFindException2 {
+ void foo() throws Ex {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindField1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindField1.js
new file mode 100644
index 0000000..e34f846
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindField1.js
@@ -0,0 +1,8 @@
+public class CompletionFindField1 {
+ int var;
+ public void foo(int i)
+ public void bar(int var) {
+ foo(var);
+ }
+}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindField2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindField2.js
new file mode 100644
index 0000000..430f94a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindField2.js
@@ -0,0 +1,8 @@
+public class CompletionFindField2 {
+ int var;
+ public void foo(int i)
+ public void bar(int var) {
+ this.var;
+ }
+}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindField3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindField3.js
new file mode 100644
index 0000000..26e9027
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindField3.js
@@ -0,0 +1,13 @@
+interface A3 {
+ public static final String bar = "a";
+}
+interface B3 extends A3 {
+ public static final String bar = "b";
+}
+public class CompletionFindField3 {
+ public void foo() {
+ B3 b = null;
+ System.out.println(b.ba);
+ }
+}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindLocalVariable.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindLocalVariable.js
new file mode 100644
index 0000000..2518e0d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindLocalVariable.js
@@ -0,0 +1,8 @@
+public class CompletionFindLocalVariable {
+ public void foo(int i)
+ public void bar() {
+ int var
+ foo(var);
+ }
+}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindMethod1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindMethod1.js
new file mode 100644
index 0000000..8b8a3eb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindMethod1.js
@@ -0,0 +1,6 @@
+public class CompletionFindMethod1 {
+ A a;
+ void foo(){
+ a.fooba
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindMethod2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindMethod2.js
new file mode 100644
index 0000000..374f740
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindMethod2.js
@@ -0,0 +1,5 @@
+public class CompletionFindMethod2 {
+ void foo(B b){
+ b.fooba
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindMethodInProcess.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindMethodInProcess.js
new file mode 100644
index 0000000..eb7866f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindMethodInProcess.js
@@ -0,0 +1,7 @@
+public class CompletionFindMethodInProcess {
+ public void foobar(){
+ }
+ public int foo () {
+ fooba
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindMethodInThis.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindMethodInThis.js
new file mode 100644
index 0000000..8079190
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindMethodInThis.js
@@ -0,0 +1,7 @@
+public class CompletionFindMethodInThis {
+ public void foobar(int i){
+ }
+ void foo(){
+ foobar(45);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindSecondaryType1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindSecondaryType1.js
new file mode 100644
index 0000000..fb2171d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindSecondaryType1.js
@@ -0,0 +1,6 @@
+public class CompletionFindSecondaryType1 {
+ /**/Secondary
+}
+class SecondaryType1 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindThisDotField.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindThisDotField.js
new file mode 100644
index 0000000..8fd795c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindThisDotField.js
@@ -0,0 +1,7 @@
+public class CompletionFindThisDotField {
+ public int bar;
+ void foo() {
+ this.bar = 45;
+ }
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionInsideStaticMethod.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionInsideStaticMethod.js
new file mode 100644
index 0000000..4412090
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionInsideStaticMethod.js
@@ -0,0 +1,10 @@
+public class CompletionInsideStaticMethod {
+ public static void main () {
+ Object r = new Object() {
+ public void run() {
+ doT
+ }
+ private void doTheThing() { }
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionInstanceofOperator1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionInstanceofOperator1.js
new file mode 100644
index 0000000..387bf12
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionInstanceofOperator1.js
@@ -0,0 +1,21 @@
+public class CompletionInstanceofOperator1 {
+ void foo(WWWCompletionInstanceof2 x) {
+ if(x instanceof WWWCompletionInstanceof){}
+ }
+}
+
+class WWWCompletionInstanceof1 {
+
+}
+
+class WWWCompletionInstanceof2 extends WWWCompletionInstanceof1 {
+
+}
+
+class WWWCompletionInstanceof3 extends WWWCompletionInstanceof2 {
+
+}
+
+class WWWCompletionInstanceof4 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionLocalName.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionLocalName.js
new file mode 100644
index 0000000..adf1fc2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionLocalName.js
@@ -0,0 +1,6 @@
+public class CompletionLocalName {
+ public void foo(){
+ ClassWithComplexName complexName;
+ ClassWithComplexName
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMessageSendIsParent1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMessageSendIsParent1.js
new file mode 100644
index 0000000..09595a1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMessageSendIsParent1.js
@@ -0,0 +1,14 @@
+public class CompletionMessageSendIsParent1 {
+ void bar(int i, long j){}
+ void bar(int i, Object j){}
+
+ long zzlong;
+ int zzint;
+ double zzdouble;
+ boolean zzboolean;
+ Object zzObject;
+
+ void foo() {
+ bar(1, zz
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMessageSendIsParent2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMessageSendIsParent2.js
new file mode 100644
index 0000000..1fef95c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMessageSendIsParent2.js
@@ -0,0 +1,16 @@
+public class CompletionMessageSendIsParent2 {
+ long zzlong;
+ int zzint;
+ double zzdouble;
+ boolean zzboolean;
+ Object zzObject;
+
+ void foo(CompletionMessageSendIsParent2Interface i) {
+ i.bar(1, zz
+ }
+}
+
+interface CompletionMessageSendIsParent2Interface {
+ void bar(int i, long j);
+ void bar(int i, Object j);
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMessageSendIsParent3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMessageSendIsParent3.js
new file mode 100644
index 0000000..9453552
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMessageSendIsParent3.js
@@ -0,0 +1,16 @@
+public class CompletionMessageSendIsParent3 extends CompletionMessageSendIsParent3SuperClass {
+ long zzlong;
+ int zzint;
+ double zzdouble;
+ boolean zzboolean;
+ Object zzObject;
+
+ void foo() {
+ bar(1, zz
+ }
+}
+
+class CompletionMessageSendIsParent3SuperClass {
+ void bar(int i, long j);
+ void bar(int i, Object j);
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMessageSendIsParent4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMessageSendIsParent4.js
new file mode 100644
index 0000000..7cba727
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMessageSendIsParent4.js
@@ -0,0 +1,14 @@
+public class CompletionMessageSendIsParent4 {
+ void bar(long i, long j){}
+ void bar(Object i, Object j){}
+
+ long zzlong;
+ int zzint;
+ double zzdouble;
+ boolean zzboolean;
+ Object zzObject;
+
+ void foo() {
+ bar(1, zz
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMessageSendIsParent5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMessageSendIsParent5.js
new file mode 100644
index 0000000..daeb3e8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMessageSendIsParent5.js
@@ -0,0 +1,13 @@
+public class CompletionMessageSendIsParent5 {
+ void bar(int i){}
+
+ long zzlong;
+ int zzint;
+ double zzdouble;
+ boolean zzboolean;
+ Object zzObject;
+
+ void foo() {
+ bar(1, zz
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMessageSendIsParent6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMessageSendIsParent6.js
new file mode 100644
index 0000000..3d2475b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMessageSendIsParent6.js
@@ -0,0 +1,13 @@
+public class CompletionMessageSendIsParent6 {
+ int bar(int i, int j){return 0;}
+
+ long zzlong;
+ int zzint;
+ double zzdouble;
+ boolean zzboolean;
+ Object zzObject;
+
+ void foo() {
+ bar(new CompletionMessageSendIsParent6().bar(0,0), zz
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodDeclaration.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodDeclaration.js
new file mode 100644
index 0000000..1c3e69e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodDeclaration.js
@@ -0,0 +1,9 @@
+public class CompletionMethodDeclaration extends SuperClass {
+ eq
+}
+
+class SuperClass {
+ public int eqFoo(int a,Object b){
+ return 1;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodDeclaration10.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodDeclaration10.js
new file mode 100644
index 0000000..830c749
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodDeclaration10.js
@@ -0,0 +1,4 @@
+public class CompletionMethodDeclaration10 {
+ clon
+ foo();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodDeclaration6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodDeclaration6.js
new file mode 100644
index 0000000..7dff20a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodDeclaration6.js
@@ -0,0 +1,10 @@
+public class CompletionMethodDeclaration6 {
+ void foo() {
+ new Object(){
+ protected Object clone() throws CloneNotSupportedException {
+ return super.clone();
+ }
+ clon
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodDeclaration7.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodDeclaration7.js
new file mode 100644
index 0000000..7f2679e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodDeclaration7.js
@@ -0,0 +1,3 @@
+public class CompletionMethodDeclaration7 {
+ clon x
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodDeclaration8.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodDeclaration8.js
new file mode 100644
index 0000000..f8d59ca
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodDeclaration8.js
@@ -0,0 +1,4 @@
+public class CompletionMethodDeclaration8 {
+ clon
+ x
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodDeclaration9.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodDeclaration9.js
new file mode 100644
index 0000000..188dd97
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodDeclaration9.js
@@ -0,0 +1,4 @@
+public class CompletionMethodDeclaration9 {
+ clon foo(){
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodThrowsClause.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodThrowsClause.js
new file mode 100644
index 0000000..d8d8a4c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodThrowsClause.js
@@ -0,0 +1,3 @@
+public class CompletionMethodThrowsClause {
+ void foo() throws Ex
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodThrowsClause2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodThrowsClause2.js
new file mode 100644
index 0000000..a423c2f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodThrowsClause2.js
@@ -0,0 +1,3 @@
+public class CompletionMethodThrowsClause2 {
+ void foo() throws java.lang.Ex
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionNonEmptyToken1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionNonEmptyToken1.js
new file mode 100644
index 0000000..77cf9e8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionNonEmptyToken1.js
@@ -0,0 +1,6 @@
+public class CompletionNonEmptyToken1 {
+ int zzyy;
+ void foo() {
+ zzyy
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionNonStaticFieldRelevance.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionNonStaticFieldRelevance.js
new file mode 100644
index 0000000..3c10722
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionNonStaticFieldRelevance.js
@@ -0,0 +1,11 @@
+public class CompletionNonStaticFieldRelevance {
+ void foo() {
+ CompletionNonStaticFieldRelevance2 var = null;
+ int i = 0 + var.Ii
+ }
+
+}
+class CompletionNonStaticFieldRelevance2 {
+ public static Object Ii0;
+ public Object ii1;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionNullRequestor.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionNullRequestor.js
new file mode 100644
index 0000000..da12d0f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionNullRequestor.js
@@ -0,0 +1,3 @@
+public class CompletionNullequestor {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionObjectsMethodWithInterfaceReceiver.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionObjectsMethodWithInterfaceReceiver.js
new file mode 100644
index 0000000..812f7ce
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionObjectsMethodWithInterfaceReceiver.js
@@ -0,0 +1,16 @@
+interface A {
+ int hashCode();
+}
+interface B extends A {
+}
+class C implements B {
+ public int hashCode() {
+ return super.hashCode();
+ }
+}
+public class CompletionObjectsMethodWithInterfaceReceiver {
+ public static void main(String[] arguments) {
+ C c = new C();
+ System.out.println("((A)c).hashCode() : " + ((A) c).hash
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionOnStaticMember1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionOnStaticMember1.js
new file mode 100644
index 0000000..8397c90
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionOnStaticMember1.js
@@ -0,0 +1,7 @@
+public class CompletionOnStaticMember1 {
+ public static int var1;
+ public int var2;
+ void foo() {
+ this.var
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionOnStaticMember2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionOnStaticMember2.js
new file mode 100644
index 0000000..00ef489
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionOnStaticMember2.js
@@ -0,0 +1,7 @@
+public class CompletionOnStaticMember2 {
+ public static void method1(){}
+ public void method2(){}
+ void foo(){
+ this.method
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionOutOfBounds.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionOutOfBounds.js
new file mode 100644
index 0000000..ca09e23
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionOutOfBounds.js
@@ -0,0 +1,3 @@
+public class CompletionOutOfBounds {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionRepeatedType.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionRepeatedType.js
new file mode 100644
index 0000000..fb7376a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionRepeatedType.js
@@ -0,0 +1,9 @@
+public class CompletionRepeatedType {
+ void foo() {
+ /**/CompletionRepeated
+ }
+}
+
+class CompletionRepeatedOtherType {
+}
+ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionReturnInInitializer.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionReturnInInitializer.js
new file mode 100644
index 0000000..ea35673
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionReturnInInitializer.js
@@ -0,0 +1,5 @@
+public class CompletionReturnInInitializer {
+ {
+ return eq
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionReturnStatementIsParent1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionReturnStatementIsParent1.js
new file mode 100644
index 0000000..9d0f047
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionReturnStatementIsParent1.js
@@ -0,0 +1,27 @@
+public class CompletionReturnStatementIsParent1 {
+ Object zzOb;
+ XX00 zz00;
+ XX01 zz01;
+ XX02 zz02;
+ XX10 zz10;
+ XX11 zz11;
+ XX12 zz12;
+ XX20 zz20;
+ XX21 zz21;
+ XX22 zz22;
+
+ Object zzObM(){}
+ XX00 zz00M(){}
+ XX01 zz01M(){}
+ XX02 zz02M(){}
+ XX10 zz10M(){}
+ XX11 zz11M(){}
+ XX12 zz12M(){}
+ XX20 zz20M(){}
+ XX21 zz21M(){}
+ XX22 zz22M(){}
+
+ XX11 foo() {
+ return zz
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionReturnStatementIsParent2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionReturnStatementIsParent2.js
new file mode 100644
index 0000000..165f896
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionReturnStatementIsParent2.js
@@ -0,0 +1,5 @@
+public class CompletionReturnStatementIsParent2 {
+ XX11 foo() {
+ return xx
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionSameClass.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionSameClass.js
new file mode 100644
index 0000000..9087d28
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionSameClass.js
@@ -0,0 +1,3 @@
+public class CompletionSameClass {
+ void foo(CompletionSameClas var){}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionThrowStatement.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionThrowStatement.js
new file mode 100644
index 0000000..fb7b1a9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionThrowStatement.js
@@ -0,0 +1,5 @@
+public class CompletionThrowStatement {
+ void foo(){
+ throw new Ex
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionType1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionType1.js
new file mode 100644
index 0000000..c8b87f5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionType1.js
@@ -0,0 +1,7 @@
+import q1.*;
+import q1.CT1;
+public class CompletionType1 {
+ void foo(){
+ CT1
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionUnaryOperator1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionUnaryOperator1.js
new file mode 100644
index 0000000..b1cf77c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionUnaryOperator1.js
@@ -0,0 +1,9 @@
+public class CompletionUnaryOperator1 {
+ int var1;
+ boolean var2;
+ Object var3;
+
+ void foo() {
+ int i = -var
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionUnaryOperator2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionUnaryOperator2.js
new file mode 100644
index 0000000..239a688
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionUnaryOperator2.js
@@ -0,0 +1,9 @@
+public class CompletionUnaryOperator2 {
+ int var1;
+ boolean var2;
+ Object var3;
+
+ void foo() {
+ if(!var){}
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionUnresolvedEnclosingType.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionUnresolvedEnclosingType.js
new file mode 100644
index 0000000..831b4d3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionUnresolvedEnclosingType.js
@@ -0,0 +1,5 @@
+public class CompletionUnresolvedEnclosingType {
+ public void foo(){
+ zzz.new ZZZ(
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionUnresolvedFieldType.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionUnresolvedFieldType.js
new file mode 100644
index 0000000..7217c80
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionUnresolvedFieldType.js
@@ -0,0 +1,5 @@
+public class CompletionUnresolvedFieldType extends pack.Bin3{
+ void foo() {
+ this.bar
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionUnresolvedParameterType.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionUnresolvedParameterType.js
new file mode 100644
index 0000000..6dc370f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionUnresolvedParameterType.js
@@ -0,0 +1,5 @@
+public class CompletionUnresolvedParameterType extends pack.Bin2{
+ void foo() {
+ this.bar
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionUnresolvedReturnType.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionUnresolvedReturnType.js
new file mode 100644
index 0000000..83f46e4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionUnresolvedReturnType.js
@@ -0,0 +1,5 @@
+public class CompletionUnresolvedReturnType extends pack.Bin1{
+ void foo() {
+ this.bar
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInInitializer1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInInitializer1.js
new file mode 100644
index 0000000..913f8ba
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInInitializer1.js
@@ -0,0 +1,11 @@
+public class CompletionVariableInitializerInInitializer1 {
+ long zzlong;
+ int zzint;
+ double zzdouble;
+ boolean zzboolean;
+ Object zzObject;
+
+ {
+ long o = zz
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInInitializer2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInInitializer2.js
new file mode 100644
index 0000000..4b29b39
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInInitializer2.js
@@ -0,0 +1,11 @@
+public class CompletionVariableInitializerInInitializer2 {
+ long zzlong;
+ int zzint;
+ double zzdouble;
+ boolean zzboolean;
+ Object zzObject;
+
+ {
+ Object o = zz
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInInitializer3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInInitializer3.js
new file mode 100644
index 0000000..fe5c98a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInInitializer3.js
@@ -0,0 +1,5 @@
+public class CompletionVariableInitializerInInitializer3 {
+ {
+ Object o = new Objec
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInInitializer4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInInitializer4.js
new file mode 100644
index 0000000..70007a5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInInitializer4.js
@@ -0,0 +1,5 @@
+public class CompletionVariableInitializerInInitializer4 {
+ {
+ Object o = new Objec;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInMethod1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInMethod1.js
new file mode 100644
index 0000000..ca72f4f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInMethod1.js
@@ -0,0 +1,11 @@
+public class CompletionVariableInitializerInMethod1 {
+ long zzlong;
+ int zzint;
+ double zzdouble;
+ boolean zzboolean;
+ Object zzObject;
+
+ void foo {
+ long o = zz
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInMethod2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInMethod2.js
new file mode 100644
index 0000000..9f3030d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInMethod2.js
@@ -0,0 +1,11 @@
+public class CompletionVariableInitializerInMethod2 {
+ long zzlong;
+ int zzint;
+ double zzdouble;
+ boolean zzboolean;
+ Object zzObject;
+
+ void foo {
+ Object o = zz
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInMethod3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInMethod3.js
new file mode 100644
index 0000000..98520e8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInMethod3.js
@@ -0,0 +1,5 @@
+public class CompletionVariableInitializerInMethod3 {
+ void foo {
+ Object o = new Objec
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInMethod4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInMethod4.js
new file mode 100644
index 0000000..6328b5d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInMethod4.js
@@ -0,0 +1,5 @@
+public class CompletionVariableInitializerInMethod4 {
+ void foo {
+ Object o = new Objec;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableName1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableName1.js
new file mode 100644
index 0000000..e968c87
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableName1.js
@@ -0,0 +1,5 @@
+public class CompletionVariableName1 {
+ void foo() {
+ TEST_FOO_MyClass
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableName2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableName2.js
new file mode 100644
index 0000000..0159b6a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableName2.js
@@ -0,0 +1,5 @@
+public class CompletionVariableName2 {
+ void foo() {
+ Test_Bar_MyClass
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableName3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableName3.js
new file mode 100644
index 0000000..147d2a9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableName3.js
@@ -0,0 +1,6 @@
+public class CompletionVariableName3 {
+ class OneName {}
+ void foo() {
+ OneName
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableNameUnresolvedType.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableNameUnresolvedType.js
new file mode 100644
index 0000000..41855d9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableNameUnresolvedType.js
@@ -0,0 +1,3 @@
+public class CompletionVariableNameUnresolvedType {
+ Objectz ob
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVisibilityCheck.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVisibilityCheck.js
new file mode 100644
index 0000000..309c4a5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVisibilityCheck.js
@@ -0,0 +1,12 @@
+public class CompletionVisibilityCheck {
+ public void foo(){
+ CompletionVisibilityCheck1 x = new CompletionVisibilityCheck1();
+ x.p
+ }
+}
+
+class CompletionVisibilityCheck1{
+ private void privateFoo(){}
+ protected void protectedFoo(){}
+ public void publicFoo(){}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVoidMethod.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVoidMethod.js
new file mode 100644
index 0000000..2d1472e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVoidMethod.js
@@ -0,0 +1,8 @@
+public class CompletionVoidMethod {
+ int foo1() {return 0;}
+ void foo() {}
+ Object foo3() {return null;}
+ void bar() {
+ int i = foo
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionWithBinaryFolder.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionWithBinaryFolder.js
new file mode 100644
index 0000000..b4461f4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionWithBinaryFolder.js
@@ -0,0 +1,5 @@
+import mypackage.*;
+
+public class CompletionWithBinaryFolder {
+ My
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/Default.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/Default.js
new file mode 100644
index 0000000..3e8b585
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/Default.js
@@ -0,0 +1,3 @@
+public class Default {
+ public static void foo(){}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/SuperClass.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/SuperClass.js
new file mode 100644
index 0000000..aebd97b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/SuperClass.js
@@ -0,0 +1,2 @@
+public class SuperClass {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/SuperInterface.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/SuperInterface.js
new file mode 100644
index 0000000..ed405d4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/SuperInterface.js
@@ -0,0 +1,2 @@
+public interface SuperInterface {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/TEST_FOO_MyClass.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/TEST_FOO_MyClass.js
new file mode 100644
index 0000000..e7315f2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/TEST_FOO_MyClass.js
@@ -0,0 +1,3 @@
+public class TEST_FOO_MyClass {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/Test_Bar_MyClass.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/Test_Bar_MyClass.js
new file mode 100644
index 0000000..23c764f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/Test_Bar_MyClass.js
@@ -0,0 +1,3 @@
+public class Test_Bar_MyClass {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/TypeWithConstructor.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/TypeWithConstructor.js
new file mode 100644
index 0000000..f535f8c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/TypeWithConstructor.js
@@ -0,0 +1,4 @@
+public abstract class TypeWithConstructor {
+ protected TypeWithConstructor(int i) {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX00.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX00.js
new file mode 100644
index 0000000..6ff899c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX00.js
@@ -0,0 +1,11 @@
+/**
+ * @author david
+ *
+ * To change this generated comment edit the template variable "typecomment":
+ * Window>Preferences>Java>Templates.
+ * To enable and disable the creation of type comments go to
+ * Window>Preferences>Java>Code Generation.
+ */
+public class XX00 {
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX01.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX01.js
new file mode 100644
index 0000000..217fcf5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX01.js
@@ -0,0 +1,11 @@
+/**
+ * @author david
+ *
+ * To change this generated comment edit the template variable "typecomment":
+ * Window>Preferences>Java>Templates.
+ * To enable and disable the creation of type comments go to
+ * Window>Preferences>Java>Code Generation.
+ */
+public class XX01 {
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX02.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX02.js
new file mode 100644
index 0000000..a4abc80
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX02.js
@@ -0,0 +1,11 @@
+/**
+ * @author david
+ *
+ * To change this generated comment edit the template variable "typecomment":
+ * Window>Preferences>Java>Templates.
+ * To enable and disable the creation of type comments go to
+ * Window>Preferences>Java>Code Generation.
+ */
+public class XX02 {
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX10.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX10.js
new file mode 100644
index 0000000..5b5a4c3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX10.js
@@ -0,0 +1,11 @@
+/**
+ * @author david
+ *
+ * To change this generated comment edit the template variable "typecomment":
+ * Window>Preferences>Java>Templates.
+ * To enable and disable the creation of type comments go to
+ * Window>Preferences>Java>Code Generation.
+ */
+public class XX10 extends XX00 {
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX11.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX11.js
new file mode 100644
index 0000000..e6db005
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX11.js
@@ -0,0 +1,11 @@
+/**
+ * @author david
+ *
+ * To change this generated comment edit the template variable "typecomment":
+ * Window>Preferences>Java>Templates.
+ * To enable and disable the creation of type comments go to
+ * Window>Preferences>Java>Code Generation.
+ */
+public class XX11 extends XX01 {
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX12.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX12.js
new file mode 100644
index 0000000..623a2f4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX12.js
@@ -0,0 +1,11 @@
+/**
+ * @author david
+ *
+ * To change this generated comment edit the template variable "typecomment":
+ * Window>Preferences>Java>Templates.
+ * To enable and disable the creation of type comments go to
+ * Window>Preferences>Java>Code Generation.
+ */
+public class XX12 extends XX02 {
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX20.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX20.js
new file mode 100644
index 0000000..15cf3db
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX20.js
@@ -0,0 +1,11 @@
+/**
+ * @author david
+ *
+ * To change this generated comment edit the template variable "typecomment":
+ * Window>Preferences>Java>Templates.
+ * To enable and disable the creation of type comments go to
+ * Window>Preferences>Java>Code Generation.
+ */
+public class XX20 extends XX10{
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX21.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX21.js
new file mode 100644
index 0000000..6a32c95
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX21.js
@@ -0,0 +1,11 @@
+/**
+ * @author david
+ *
+ * To change this generated comment edit the template variable "typecomment":
+ * Window>Preferences>Java>Templates.
+ * To enable and disable the creation of type comments go to
+ * Window>Preferences>Java>Code Generation.
+ */
+public class XX21 extends XX11 {
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX22.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX22.js
new file mode 100644
index 0000000..005e143
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX22.js
@@ -0,0 +1,11 @@
+/**
+ * @author david
+ *
+ * To change this generated comment edit the template variable "typecomment":
+ * Window>Preferences>Java>Templates.
+ * To enable and disable the creation of type comments go to
+ * Window>Preferences>Java>Code Generation.
+ */
+public class XX22 extends XX12 {
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/deprecation/Bug127628Type1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/deprecation/Bug127628Type1.js
new file mode 100644
index 0000000..4dd099f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/deprecation/Bug127628Type1.js
@@ -0,0 +1,6 @@
+package deprecation;
+public class Bug127628Type1 {
+ public class Bug127628TypeInner1 {
+
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/deprecation/Bug127628Type2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/deprecation/Bug127628Type2.js
new file mode 100644
index 0000000..c7ed40a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/deprecation/Bug127628Type2.js
@@ -0,0 +1,9 @@
+package deprecation;
+/**
+ * @deprecated
+ */
+public class Bug127628Type2 {
+ public class Bug127628TypeInner2 {
+
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/org/eclipse/jsdt/core/tests/BasicTestReferences.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/org/eclipse/jsdt/core/tests/BasicTestReferences.js
new file mode 100644
index 0000000..37b141a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/org/eclipse/jsdt/core/tests/BasicTestReferences.js
@@ -0,0 +1,6 @@
+package org.eclipse.wst.jsdt.core.tests;
+
+
+public class BasicTestReferences {
+ public static final int FIELD = 0;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/p1/ABC.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/p1/ABC.js
new file mode 100644
index 0000000..6667471
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/p1/ABC.js
@@ -0,0 +1,5 @@
+package p1;
+
+public class ABC {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/p2/ABC.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/p2/ABC.js
new file mode 100644
index 0000000..7fe69fd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/p2/ABC.js
@@ -0,0 +1,5 @@
+package p2;
+
+public class ABC {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/p3/CompletionToplevelType1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/p3/CompletionToplevelType1.js
new file mode 100644
index 0000000..721fe02
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/p3/CompletionToplevelType1.js
@@ -0,0 +1,4 @@
+package p3;
+public class CompletionToplevelType1 {
+ p3.CompletionToplevelType1
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/pack1/PX.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/pack1/PX.js
new file mode 100644
index 0000000..ba47e85
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/pack1/PX.js
@@ -0,0 +1,4 @@
+package pack1;
+
+public class PX {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/pack1/pack3/PX.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/pack1/pack3/PX.js
new file mode 100644
index 0000000..3d61851
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/pack1/pack3/PX.js
@@ -0,0 +1,4 @@
+package pack1.pack3;
+
+public class PX {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/pack2/PX.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/pack2/PX.js
new file mode 100644
index 0000000..90d66c3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/pack2/PX.js
@@ -0,0 +1,4 @@
+package pack2;
+
+public class PX {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/q1/CT1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/q1/CT1.js
new file mode 100644
index 0000000..78ba376
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/q1/CT1.js
@@ -0,0 +1,4 @@
+package q1;
+public class CT1 {
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/q2/CT1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/q2/CT1.js
new file mode 100644
index 0000000..1f7715d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/q2/CT1.js
@@ -0,0 +1,4 @@
+package q2;
+public class CT1 {
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/z1/z2/Qla1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/z1/z2/Qla1.js
new file mode 100644
index 0000000..98174ea
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/z1/z2/Qla1.js
@@ -0,0 +1,5 @@
+package z1.z2;
+
+public class Qla1 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/z1/z2/qla0/Qla3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/z1/z2/qla0/Qla3.js
new file mode 100644
index 0000000..bbbd0fd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/z1/z2/qla0/Qla3.js
@@ -0,0 +1,7 @@
+package z1.z2.qla0;
+
+public class Qla3 {
+ {
+ z1.z2.ql
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/z1/z2/qla0/Qla4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/z1/z2/qla0/Qla4.js
new file mode 100644
index 0000000..a1e7c22
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/z1/z2/qla0/Qla4.js
@@ -0,0 +1,5 @@
+package z1.z2.qla0;
+
+public class Qla4 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/z1/z2/qla0/Wla.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/z1/z2/qla0/Wla.js
new file mode 100644
index 0000000..79dd4b8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/z1/z2/qla0/Wla.js
@@ -0,0 +1,7 @@
+package z1.z2.qla0;
+
+public class Wla {
+ {
+ z1.z2.qla0.
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/z1/z2/qla2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/z1/z2/qla2.js
new file mode 100644
index 0000000..0968776
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/z1/z2/qla2.js
@@ -0,0 +1,5 @@
+package z1.z2;
+
+public class qla2 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract1.js
new file mode 100644
index 0000000..bc05192
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract1.js
@@ -0,0 +1 @@
+abs \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract10.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract10.js
new file mode 100644
index 0000000..ba94e34
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract10.js
@@ -0,0 +1,2 @@
+#
+final abs \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract11.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract11.js
new file mode 100644
index 0000000..6d46add
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract11.js
@@ -0,0 +1,2 @@
+#
+abs class \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract12.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract12.js
new file mode 100644
index 0000000..f162e6f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract12.js
@@ -0,0 +1,2 @@
+#
+public abs \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract13.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract13.js
new file mode 100644
index 0000000..070d884
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract13.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordAbstract13 {
+ abs
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract14.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract14.js
new file mode 100644
index 0000000..228aefe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract14.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordAbstract14 {
+ final abs
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract15.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract15.js
new file mode 100644
index 0000000..e07e562
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract15.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordAbstract15 {
+ abs class
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract16.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract16.js
new file mode 100644
index 0000000..1a73d08
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract16.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordAbstract16 {
+ public abs
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract2.js
new file mode 100644
index 0000000..a6119aa
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract2.js
@@ -0,0 +1 @@
+final abs \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract3.js
new file mode 100644
index 0000000..e274149
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract3.js
@@ -0,0 +1 @@
+abs class \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract4.js
new file mode 100644
index 0000000..fb5ab14
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract4.js
@@ -0,0 +1 @@
+public abs \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract5.js
new file mode 100644
index 0000000..1fec4be
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract5.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordAbstract5 {
+ abs
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract6.js
new file mode 100644
index 0000000..af760ab
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract6.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordAbstract6 {
+ final abs
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract7.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract7.js
new file mode 100644
index 0000000..974dfc1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract7.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordAbstract7 {
+ abs class
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract8.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract8.js
new file mode 100644
index 0000000..daa0a04
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract8.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordAbstract8 {
+ public abs
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract9.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract9.js
new file mode 100644
index 0000000..27e2bca
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract9.js
@@ -0,0 +1,2 @@
+#
+abs \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAssert1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAssert1.js
new file mode 100644
index 0000000..10b9402
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAssert1.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordAssert1 {
+ void foo() {
+ as
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAssert2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAssert2.js
new file mode 100644
index 0000000..a5e270f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAssert2.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordAssert2 {
+ void foo() {
+ if(as
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAssert3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAssert3.js
new file mode 100644
index 0000000..121e072
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAssert3.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordAssert3 {
+ as
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAssert4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAssert4.js
new file mode 100644
index 0000000..70daa81
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAssert4.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordAssert4 {
+ void foo() {
+ #
+ as
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAssert5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAssert5.js
new file mode 100644
index 0000000..03e2848
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAssert5.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordAssert5 {
+ void foo() {
+ #
+ if(as
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAssert6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAssert6.js
new file mode 100644
index 0000000..7c518f1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAssert6.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordAssert6 {
+ as
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordBreak1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordBreak1.js
new file mode 100644
index 0000000..e7b1357
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordBreak1.js
@@ -0,0 +1,7 @@
+public class CompletionKeywordBreak1 {
+ void foo() {
+ for(;;) {
+ {
+ bre
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordBreak2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordBreak2.js
new file mode 100644
index 0000000..b87ab04
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordBreak2.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordBreak2 {
+ void foo() {
+ if(true) {
+ bre
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordBreak3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordBreak3.js
new file mode 100644
index 0000000..0c3d972
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordBreak3.js
@@ -0,0 +1,8 @@
+public class CompletionKeywordBreak3 {
+ void foo() {
+ switch(0) {
+ case 1 :
+ bre
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordBreak4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordBreak4.js
new file mode 100644
index 0000000..b0497e8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordBreak4.js
@@ -0,0 +1,8 @@
+public class CompletionKeywordBreak4 {
+ void foo() {
+ #
+ for(;;) {
+ {
+ bre
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordBreak5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordBreak5.js
new file mode 100644
index 0000000..61ae016
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordBreak5.js
@@ -0,0 +1,7 @@
+public class CompletionKeywordBreak5 {
+ void foo() {
+ #
+ if(true) {
+ bre
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordBreak6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordBreak6.js
new file mode 100644
index 0000000..3a3422e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordBreak6.js
@@ -0,0 +1,9 @@
+public class CompletionKeywordBreak6 {
+ void foo() {
+ #
+ switch(0) {
+ case 1 :
+ bre
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase1.js
new file mode 100644
index 0000000..6a115ee
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase1.js
@@ -0,0 +1,7 @@
+public class CompletionKeywordCase1 {
+ void foo(){
+ switch(0){
+ cas
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase10.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase10.js
new file mode 100644
index 0000000..c6d3d3d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase10.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordCase10 {
+ void foo(){
+ #
+ cas
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase2.js
new file mode 100644
index 0000000..012da9d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase2.js
@@ -0,0 +1,8 @@
+public class CompletionKeywordCase2 {
+ void foo(){
+ switch(0){
+ case 0:
+ cas
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase3.js
new file mode 100644
index 0000000..865b8c3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase3.js
@@ -0,0 +1,8 @@
+public class CompletionKeywordCase3 {
+ void foo(){
+ switch(0){
+ default:
+ cas
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase4.js
new file mode 100644
index 0000000..ac235df
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase4.js
@@ -0,0 +1,9 @@
+public class CompletionKeywordCase4 {
+ void foo(){
+ switch(0){
+ case 0:
+ break;
+ cas
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase5.js
new file mode 100644
index 0000000..0d56acc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase5.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordCase5 {
+ void foo(){
+ cas
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase6.js
new file mode 100644
index 0000000..e853d25
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase6.js
@@ -0,0 +1,8 @@
+public class CompletionKeywordCase6 {
+ void foo(){
+ #
+ switch(0){
+ cas
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase7.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase7.js
new file mode 100644
index 0000000..f291228
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase7.js
@@ -0,0 +1,9 @@
+public class CompletionKeywordCase7 {
+ void foo(){
+ #
+ switch(0){
+ case 0:
+ cas
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase8.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase8.js
new file mode 100644
index 0000000..6178cde
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase8.js
@@ -0,0 +1,9 @@
+public class CompletionKeywordCase8 {
+ void foo(){
+ #
+ switch(0){
+ default:
+ cas
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase9.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase9.js
new file mode 100644
index 0000000..8fbd3ab
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase9.js
@@ -0,0 +1,10 @@
+public class CompletionKeywordCase9 {
+ void foo(){
+ #
+ switch(0){
+ case 0:
+ break;
+ cas
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch1.js
new file mode 100644
index 0000000..5d49e61
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch1.js
@@ -0,0 +1,8 @@
+public class CompletionKeywordCatch1 {
+ int catchz;
+ void foo() {
+ try {
+
+ } cat
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch10.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch10.js
new file mode 100644
index 0000000..8b52286
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch10.js
@@ -0,0 +1,10 @@
+public class CompletionKeywordCatch10 {
+ int catchz;
+ void foo() {
+ #
+ try {
+
+ } catch(Exception e) {
+ } cat
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch2.js
new file mode 100644
index 0000000..2a841da
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch2.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordCatch2 {
+ void foo() {
+ cat
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch3.js
new file mode 100644
index 0000000..22073f9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch3.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordCatch3 {
+ cat
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch4.js
new file mode 100644
index 0000000..2437b1d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch4.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordCatch4 {
+ void foo() {
+ if(cat
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch5.js
new file mode 100644
index 0000000..77b7cb8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch5.js
@@ -0,0 +1,9 @@
+public class CompletionKeywordCatch5 {
+ int catchz;
+ void foo() {
+ try {
+
+ } catch(Exception e) {
+ } cat
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch6.js
new file mode 100644
index 0000000..5640976
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch6.js
@@ -0,0 +1,9 @@
+public class CompletionKeywordCatch6 {
+ int catchz;
+ void foo() {
+ #
+ try {
+
+ } cat
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch7.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch7.js
new file mode 100644
index 0000000..cd2f983
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch7.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordCatch7 {
+ void foo() {
+ #
+ cat
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch8.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch8.js
new file mode 100644
index 0000000..ab5a31a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch8.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordCath8 {
+ cat
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch9.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch9.js
new file mode 100644
index 0000000..68a4aea
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch9.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordCatch9 {
+ void foo() {
+ #
+ if(cat
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass1.js
new file mode 100644
index 0000000..50f43d4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass1.js
@@ -0,0 +1 @@
+cla \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass10.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass10.js
new file mode 100644
index 0000000..e00c241
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass10.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordClass10 {
+ void foo(){
+ cla
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass11.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass11.js
new file mode 100644
index 0000000..ddc0226
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass11.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordClass11 {
+ void foo(){
+ final cla
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass12.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass12.js
new file mode 100644
index 0000000..1f0e0bf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass12.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordClass12 {
+ void foo(){
+ final cla X
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass13.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass13.js
new file mode 100644
index 0000000..66eec34
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass13.js
@@ -0,0 +1,2 @@
+#
+cla \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass14.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass14.js
new file mode 100644
index 0000000..4d4b909
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass14.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordClass14 {
+ void foo(){
+ #
+ cla
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass15.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass15.js
new file mode 100644
index 0000000..92f8cd8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass15.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordClass15 {
+ void foo(){
+ #
+ final cla
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass16.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass16.js
new file mode 100644
index 0000000..9e9d676
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass16.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordClass16 {
+ void foo(){
+ #
+ final cla X
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass17.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass17.js
new file mode 100644
index 0000000..e381471
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass17.js
@@ -0,0 +1,5 @@
+#
+public class CompletionKeywordClass17 {
+
+}
+cla \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass18.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass18.js
new file mode 100644
index 0000000..a5863c1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass18.js
@@ -0,0 +1,2 @@
+#
+public cla \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass19.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass19.js
new file mode 100644
index 0000000..9cb057b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass19.js
@@ -0,0 +1,2 @@
+#
+public abstract cla \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass2.js
new file mode 100644
index 0000000..1ca9bd8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass2.js
@@ -0,0 +1,4 @@
+public class CompletionKeywordClass2 {
+
+}
+cla \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass20.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass20.js
new file mode 100644
index 0000000..2f1470f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass20.js
@@ -0,0 +1,2 @@
+#
+public cla CompletionKeywordClass20 \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass21.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass21.js
new file mode 100644
index 0000000..2026fd8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass21.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordClass21 {
+ cla
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass22.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass22.js
new file mode 100644
index 0000000..d2c45c2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass22.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordClass22 {
+ public cla
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass23.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass23.js
new file mode 100644
index 0000000..ad1f2c3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass23.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordClass23 {
+ public abstract cla
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass24.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass24.js
new file mode 100644
index 0000000..62aa087
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass24.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordClass24 {
+ public cla X
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass3.js
new file mode 100644
index 0000000..ae11224
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass3.js
@@ -0,0 +1 @@
+public cla \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass4.js
new file mode 100644
index 0000000..cad873b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass4.js
@@ -0,0 +1 @@
+public abstract cla \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass5.js
new file mode 100644
index 0000000..96e5eba
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass5.js
@@ -0,0 +1 @@
+public cla CompletionKeywordClass5 \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass6.js
new file mode 100644
index 0000000..e31818f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass6.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordClass6 {
+ cla
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass7.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass7.js
new file mode 100644
index 0000000..f6698e5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass7.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordClass7 {
+ public cla
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass8.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass8.js
new file mode 100644
index 0000000..12f7c37
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass8.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordClass8 {
+ public abstract cla
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass9.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass9.js
new file mode 100644
index 0000000..6e216ae
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass9.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordClass9 {
+ public cla X
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordContinue1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordContinue1.js
new file mode 100644
index 0000000..868619b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordContinue1.js
@@ -0,0 +1,7 @@
+public class CompletionKeywordContinue1 {
+ void foo() {
+ for(;;) {
+ {
+ cont
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordContinue2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordContinue2.js
new file mode 100644
index 0000000..0b01887
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordContinue2.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordContinue2 {
+ void foo() {
+ if(true) {
+ cont
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordContinue3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordContinue3.js
new file mode 100644
index 0000000..173034b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordContinue3.js
@@ -0,0 +1,8 @@
+public class CompletionKeywordContinue3 {
+ void foo() {
+ #
+ for(;;) {
+ {
+ cont
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordContinue4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordContinue4.js
new file mode 100644
index 0000000..038337a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordContinue4.js
@@ -0,0 +1,7 @@
+public class CompletionKeywordContinue4 {
+ void foo() {
+ #
+ if(true) {
+ cont
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault1.js
new file mode 100644
index 0000000..4a71d17
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault1.js
@@ -0,0 +1,7 @@
+public class CompletionKeywordDefault1 {
+ void foo(){
+ switch(0){
+ def
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault10.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault10.js
new file mode 100644
index 0000000..b288447
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault10.js
@@ -0,0 +1,9 @@
+public class CompletionKeywordDefault10 {
+ void foo(){
+ #
+ switch(0){
+ default:
+ def
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault2.js
new file mode 100644
index 0000000..020254f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault2.js
@@ -0,0 +1,8 @@
+public class CompletionKeywordDefault2 {
+ void foo(){
+ switch(0){
+ case 0:
+ def
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault3.js
new file mode 100644
index 0000000..eb2c9d6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault3.js
@@ -0,0 +1,9 @@
+public class CompletionKeywordDefault3 {
+ void foo(){
+ switch(0){
+ case 0:
+ break;
+ def
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault4.js
new file mode 100644
index 0000000..0d8b3ba
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault4.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordDefault4 {
+ void foo(){
+ def
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault5.js
new file mode 100644
index 0000000..981ff96
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault5.js
@@ -0,0 +1,8 @@
+public class CompletionKeywordDefault5 {
+ void foo(){
+ switch(0){
+ default:
+ def
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault6.js
new file mode 100644
index 0000000..3f5069a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault6.js
@@ -0,0 +1,8 @@
+public class CompletionKeywordDefault6 {
+ void foo(){
+ #
+ switch(0){
+ def
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault7.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault7.js
new file mode 100644
index 0000000..3a1fdaf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault7.js
@@ -0,0 +1,9 @@
+public class CompletionKeywordDefault7 {
+ void foo(){
+ #
+ switch(0){
+ case 0:
+ def
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault8.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault8.js
new file mode 100644
index 0000000..350011f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault8.js
@@ -0,0 +1,10 @@
+public class CompletionKeywordDefault8 {
+ void foo(){
+ #
+ switch(0){
+ case 0:
+ break;
+ def
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault9.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault9.js
new file mode 100644
index 0000000..c6b5d3c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault9.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordDefault9 {
+ void foo(){
+ #
+ def
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDo1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDo1.js
new file mode 100644
index 0000000..cb7afd5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDo1.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordDo1 {
+ void foo() {
+ do
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDo2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDo2.js
new file mode 100644
index 0000000..bac5e83
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDo2.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordDo2 {
+ void foo() {
+ if(do
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDo3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDo3.js
new file mode 100644
index 0000000..1cb7fa4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDo3.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordDo3 {
+ do
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDo4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDo4.js
new file mode 100644
index 0000000..20f65c9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDo4.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordDo4 {
+ void foo() {
+ #
+ do
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDo5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDo5.js
new file mode 100644
index 0000000..1059840
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDo5.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordDo5 {
+ void foo() {
+ #
+ if(do
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDo6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDo6.js
new file mode 100644
index 0000000..afb54eb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDo6.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordDo6 {
+ do
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse1.js
new file mode 100644
index 0000000..3613f67
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse1.js
@@ -0,0 +1,7 @@
+public class CompletionKeywordElse1 {
+ void foo() {
+ if(true) {
+
+ } els
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse2.js
new file mode 100644
index 0000000..86b6e64
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse2.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordElse2 {
+ void foo() {
+ els
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse3.js
new file mode 100644
index 0000000..58cc0e1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse3.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordElse3 {
+ els
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse4.js
new file mode 100644
index 0000000..48fceb8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse4.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordElse4 {
+ void foo() {
+ if(els
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse5.js
new file mode 100644
index 0000000..194469c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse5.js
@@ -0,0 +1,8 @@
+public class CompletionKeywordElse5 {
+ void foo() {
+ #
+ if(true) {
+
+ } els
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse6.js
new file mode 100644
index 0000000..6156315
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse6.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordElse6 {
+ void foo() {
+ #
+ els
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse7.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse7.js
new file mode 100644
index 0000000..a3a7041
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse7.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordElse7 {
+ els
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse8.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse8.js
new file mode 100644
index 0000000..dfc5408
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse8.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordElse8 {
+ void foo() {
+ #
+ if(els
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends1.js
new file mode 100644
index 0000000..db7aaf0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends1.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordExtends1 ext {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends10.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends10.js
new file mode 100644
index 0000000..17c4d03
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends10.js
@@ -0,0 +1,4 @@
+#
+public interface CompletionKeywordExtends10 extends SuperInterface ext{
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends2.js
new file mode 100644
index 0000000..c351b81
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends2.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordExtends2 extends SuperClass ext {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends3.js
new file mode 100644
index 0000000..a43dcbc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends3.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordExtends3 implements SuperInterface ext {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends4.js
new file mode 100644
index 0000000..497ca4f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends4.js
@@ -0,0 +1,3 @@
+public interface CompletionKeywordExtends4 ext {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends5.js
new file mode 100644
index 0000000..afcb011
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends5.js
@@ -0,0 +1,3 @@
+public interface CompletionKeywordExtends5 extends SuperInterface ext{
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends6.js
new file mode 100644
index 0000000..7c94c48
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends6.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordExtends6 ext {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends7.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends7.js
new file mode 100644
index 0000000..58464ea
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends7.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordExtends7 extends SuperClass ext {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends8.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends8.js
new file mode 100644
index 0000000..443ccc1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends8.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordExtends8 implements SuperInterface ext {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends9.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends9.js
new file mode 100644
index 0000000..c0f29ee
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends9.js
@@ -0,0 +1,4 @@
+#
+public interface CompletionKeywordExtends9 ext {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFalse1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFalse1.js
new file mode 100644
index 0000000..6665870
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFalse1.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordFalse1 {
+ void foo() {
+ fal
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFalse2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFalse2.js
new file mode 100644
index 0000000..9bd66a1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFalse2.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordFalse2 {
+ void foo() {
+ if(fal
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFalse3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFalse3.js
new file mode 100644
index 0000000..f8e04c0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFalse3.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordFalse3 {
+ void foo() {
+ #
+ fal
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFalse4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFalse4.js
new file mode 100644
index 0000000..9facc44
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFalse4.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordFalse4 {
+ void foo() {
+ #
+ if(fal
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal1.js
new file mode 100644
index 0000000..baf752b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal1.js
@@ -0,0 +1 @@
+fin \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal10.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal10.js
new file mode 100644
index 0000000..b8f77e9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal10.js
@@ -0,0 +1,2 @@
+#
+fin \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal11.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal11.js
new file mode 100644
index 0000000..31b0ab9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal11.js
@@ -0,0 +1,2 @@
+#
+abstract fin \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal12.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal12.js
new file mode 100644
index 0000000..e134839
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal12.js
@@ -0,0 +1,2 @@
+#
+fin class \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal13.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal13.js
new file mode 100644
index 0000000..5e03373
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal13.js
@@ -0,0 +1,2 @@
+#
+public fin \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal14.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal14.js
new file mode 100644
index 0000000..32e25c3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal14.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordFinal14 {
+ fin
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal15.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal15.js
new file mode 100644
index 0000000..6bd1069
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal15.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordFinal15 {
+ abstract fin
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal16.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal16.js
new file mode 100644
index 0000000..638eb89
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal16.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordFinal16 {
+ fin class
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal17.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal17.js
new file mode 100644
index 0000000..0caba01
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal17.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordFinal17 {
+ public fin
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal18.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal18.js
new file mode 100644
index 0000000..c0b64fe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal18.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordFinal18 {
+ void foo(){
+ #
+ fin
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal2.js
new file mode 100644
index 0000000..d44bee0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal2.js
@@ -0,0 +1 @@
+abstract fin \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal3.js
new file mode 100644
index 0000000..33294e2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal3.js
@@ -0,0 +1 @@
+fin class \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal4.js
new file mode 100644
index 0000000..7f62626
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal4.js
@@ -0,0 +1 @@
+public fin \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal5.js
new file mode 100644
index 0000000..300cfc8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal5.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordFinal5 {
+ fin
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal6.js
new file mode 100644
index 0000000..32d2757
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal6.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordFinal6 {
+ abstract fin
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal7.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal7.js
new file mode 100644
index 0000000..78c5783
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal7.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordFinal7 {
+ fin class
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal8.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal8.js
new file mode 100644
index 0000000..61d0f4c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal8.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordFinal8 {
+ public fin
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal9.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal9.js
new file mode 100644
index 0000000..0b8d287
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal9.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordFinal9 {
+ void foo(){
+ fin
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally1.js
new file mode 100644
index 0000000..d355db7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally1.js
@@ -0,0 +1,8 @@
+public class CompletionKeywordFinally1 {
+ int finallyz;
+ void foo() {
+ try {
+
+ } finall
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally10.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally10.js
new file mode 100644
index 0000000..de3e457
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally10.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordFinally10 {
+ finall
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally11.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally11.js
new file mode 100644
index 0000000..5e040c4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally11.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordFinally11 {
+ void foo() {
+ #
+ if(finall
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally12.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally12.js
new file mode 100644
index 0000000..d67447e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally12.js
@@ -0,0 +1,10 @@
+public class CompletionKeywordFinally12 {
+ void foo() {
+ #
+ try {
+
+ } catch(E e){
+
+ } finall
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally13.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally13.js
new file mode 100644
index 0000000..6623695
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally13.js
@@ -0,0 +1,10 @@
+public class CompletionKeywordFinally13 {
+ int finallyz;
+ void foo() {
+ #
+ try {
+
+ } catch(Exception e) {
+ } finall
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally14.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally14.js
new file mode 100644
index 0000000..b985016
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally14.js
@@ -0,0 +1,10 @@
+public class CompletionKeywordFinally14 {
+ int finallyz;
+ void foo() {
+ #
+ try {
+
+ } finally {
+ } finall
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally2.js
new file mode 100644
index 0000000..4cad896
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally2.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordFinally2 {
+ void foo() {
+ finall
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally3.js
new file mode 100644
index 0000000..a6ba483
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally3.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordFinally3 {
+ finall
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally4.js
new file mode 100644
index 0000000..88aa17d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally4.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordFinally4 {
+ void foo() {
+ if(finall
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally5.js
new file mode 100644
index 0000000..e86a9bd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally5.js
@@ -0,0 +1,9 @@
+public class CompletionKeywordFinally5 {
+ void foo() {
+ try {
+
+ } catch(E e){
+
+ } finall
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally6.js
new file mode 100644
index 0000000..dfbfb04
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally6.js
@@ -0,0 +1,9 @@
+public class CompletionKeywordFinally6 {
+ int finallyz;
+ void foo() {
+ try {
+
+ } catch(Exception e) {
+ } finall
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally7.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally7.js
new file mode 100644
index 0000000..7b7bc14
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally7.js
@@ -0,0 +1,9 @@
+public class CompletionKeywordFinally7 {
+ int finallyz;
+ void foo() {
+ try {
+
+ } finally {
+ } finall
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally8.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally8.js
new file mode 100644
index 0000000..bb4c2aa
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally8.js
@@ -0,0 +1,9 @@
+public class CompletionKeywordFinally8 {
+ int finallyz;
+ void foo() {
+ #
+ try {
+
+ } finall
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally9.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally9.js
new file mode 100644
index 0000000..4c1fac2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally9.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordFinally9 {
+ void foo() {
+ #
+ finall
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFor1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFor1.js
new file mode 100644
index 0000000..554a1f5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFor1.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordFor1 {
+ void foo() {
+ fo
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFor2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFor2.js
new file mode 100644
index 0000000..45070ef
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFor2.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordFor2 {
+ void foo() {
+ if(fo
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFor3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFor3.js
new file mode 100644
index 0000000..7b82461
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFor3.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordFor3 {
+ fo
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFor4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFor4.js
new file mode 100644
index 0000000..465aa93
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFor4.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordFor4 {
+ void foo() {
+ #
+ fo
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFor5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFor5.js
new file mode 100644
index 0000000..61184d5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFor5.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordFor5 {
+ void foo() {
+ #
+ if(fo
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFor6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFor6.js
new file mode 100644
index 0000000..8c48cfe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFor6.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordFor6 {
+ fo
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordIf1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordIf1.js
new file mode 100644
index 0000000..e586b07
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordIf1.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordIf1 {
+ void foo() {
+ if
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordIf2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordIf2.js
new file mode 100644
index 0000000..e65258c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordIf2.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordIf2 {
+ void foo() {
+ if(if
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordIf3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordIf3.js
new file mode 100644
index 0000000..3368086
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordIf3.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordIf3 {
+ if
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordIf4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordIf4.js
new file mode 100644
index 0000000..c767681
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordIf4.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordIf4 {
+ void foo() {
+ #
+ if
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordIf5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordIf5.js
new file mode 100644
index 0000000..a2534fd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordIf5.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordIf5 {
+ void foo() {
+ #
+ if(if
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordIf6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordIf6.js
new file mode 100644
index 0000000..2c6f0bd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordIf6.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordIf6 {
+ if
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImplements1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImplements1.js
new file mode 100644
index 0000000..3e73264
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImplements1.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordImplements1 imp {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImplements2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImplements2.js
new file mode 100644
index 0000000..48c08d8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImplements2.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordImplements2 extends SuperClass imp {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImplements3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImplements3.js
new file mode 100644
index 0000000..a54b2a2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImplements3.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordImplements3 implements SuperInterface imp {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImplements4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImplements4.js
new file mode 100644
index 0000000..c3d177e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImplements4.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordImplements4 imp {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImplements5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImplements5.js
new file mode 100644
index 0000000..5c7d7b7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImplements5.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordImplements5 extends SuperClass imp {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImplements6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImplements6.js
new file mode 100644
index 0000000..684012d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImplements6.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordImplements6 implements SuperInterface imp {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImport1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImport1.js
new file mode 100644
index 0000000..6edf555
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImport1.js
@@ -0,0 +1,5 @@
+imp
+
+public class CompletionKeywordImport1 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImport3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImport3.js
new file mode 100644
index 0000000..41cf5ba
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImport3.js
@@ -0,0 +1,5 @@
+import java.lang.Object;
+imp
+public class CompletionKeywordImport3 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImport4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImport4.js
new file mode 100644
index 0000000..14eda8a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImport4.js
@@ -0,0 +1,4 @@
+public class CompletionKeywordImport4 {
+
+}
+imp \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImport5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImport5.js
new file mode 100644
index 0000000..753e297
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImport5.js
@@ -0,0 +1,5 @@
+import java.lang.Object;
+imp
+public class CompletionKeywordImport5 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImport6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImport6.js
new file mode 100644
index 0000000..d51ec54
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImport6.js
@@ -0,0 +1,5 @@
+#
+public class CompletionKeywordImport6 {
+
+}
+imp \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImport7.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImport7.js
new file mode 100644
index 0000000..1424d03
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImport7.js
@@ -0,0 +1,7 @@
+#
+imp
+
+package bbb;
+public class CompletionKeywordImport7 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInstanceof1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInstanceof1.js
new file mode 100644
index 0000000..74507ec
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInstanceof1.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordInstanceof1 {
+ void foo() {
+ if(zzz ins
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInstanceof2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInstanceof2.js
new file mode 100644
index 0000000..35f473d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInstanceof2.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordInstanceof1 {
+ void foo() {
+ ins
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInstanceof3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInstanceof3.js
new file mode 100644
index 0000000..273ad25
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInstanceof3.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordInstanceof1 {
+ void foo() {
+ if(zzz zzz ins
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInstanceof4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInstanceof4.js
new file mode 100644
index 0000000..19891dc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInstanceof4.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordInstanceof4 {
+ void foo() {
+ #
+ if(zzz ins
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInstanceof5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInstanceof5.js
new file mode 100644
index 0000000..99b2e92
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInstanceof5.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordInstanceof5 {
+ void foo() {
+ #
+ ins
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInstanceof6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInstanceof6.js
new file mode 100644
index 0000000..991cd40
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInstanceof6.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordInstanceof6 {
+ void foo() {
+ #
+ if(zzz zzz ins
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface1.js
new file mode 100644
index 0000000..2195f20
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface1.js
@@ -0,0 +1 @@
+interf \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface10.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface10.js
new file mode 100644
index 0000000..d28770e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface10.js
@@ -0,0 +1,2 @@
+#
+interf \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface11.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface11.js
new file mode 100644
index 0000000..cf0ee30
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface11.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordInterface11 {
+}
+interf \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface12.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface12.js
new file mode 100644
index 0000000..8db3e4e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface12.js
@@ -0,0 +1,2 @@
+#
+public interf \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface13.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface13.js
new file mode 100644
index 0000000..89302a8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface13.js
@@ -0,0 +1,2 @@
+#
+public abstract interf \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface14.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface14.js
new file mode 100644
index 0000000..e89eee2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface14.js
@@ -0,0 +1,2 @@
+#
+public interf CompletionKeywordInterface14 \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface15.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface15.js
new file mode 100644
index 0000000..500ca54
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface15.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordInterface15 {
+ interf
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface16.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface16.js
new file mode 100644
index 0000000..62bb82d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface16.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordInterface16 {
+ public interf
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface17.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface17.js
new file mode 100644
index 0000000..2d683ce
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface17.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordInterface17 {
+ public abstract interf
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface18.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface18.js
new file mode 100644
index 0000000..c46ed77
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface18.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordInterface18 {
+ public interf X
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface2.js
new file mode 100644
index 0000000..21ad0bc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface2.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordInterface2 {
+}
+interf \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface3.js
new file mode 100644
index 0000000..786edf8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface3.js
@@ -0,0 +1 @@
+public interf \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface4.js
new file mode 100644
index 0000000..ceba81f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface4.js
@@ -0,0 +1 @@
+public abstract interf \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface5.js
new file mode 100644
index 0000000..5586456
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface5.js
@@ -0,0 +1 @@
+public interf CompletionKeywordInterface5 \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface6.js
new file mode 100644
index 0000000..307950b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface6.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordInterface6 {
+ interf
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface7.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface7.js
new file mode 100644
index 0000000..0c72244
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface7.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordInterface7 {
+ public interf
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface8.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface8.js
new file mode 100644
index 0000000..9c03949
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface8.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordInterface8 {
+ public abstract interf
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface9.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface9.js
new file mode 100644
index 0000000..d737e97
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface9.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordInterface9 {
+ public interf X
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative1.js
new file mode 100644
index 0000000..a0af345
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative1.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordNative1 {
+ nat
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative2.js
new file mode 100644
index 0000000..fe4586f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative2.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordNative2 {
+ volatile nat
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative3.js
new file mode 100644
index 0000000..e4a6e29
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative3.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordNative3 {
+ public nat
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative4.js
new file mode 100644
index 0000000..2972d07
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative4.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordNative4 {
+ abstract nat
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative5.js
new file mode 100644
index 0000000..35cc56b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative5.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordNative5 {
+ nat
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative6.js
new file mode 100644
index 0000000..7564765
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative6.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordNative6 {
+ volatile nat
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative7.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative7.js
new file mode 100644
index 0000000..dd38643
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative7.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordNative7 {
+ public nat
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative8.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative8.js
new file mode 100644
index 0000000..fb80211
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative8.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordNative8 {
+ abstract nat
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew1.js
new file mode 100644
index 0000000..dbe0610
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew1.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordNew1 {
+ void foo(){
+ ne
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew10.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew10.js
new file mode 100644
index 0000000..3552f32
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew10.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordNew10 {
+ void foo(){
+ #
+ ne X
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew11.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew11.js
new file mode 100644
index 0000000..be72211
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew11.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordNew11 {
+ void foo(){
+ #
+ ne X()
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew12.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew12.js
new file mode 100644
index 0000000..f004839
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew12.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordNew12 {
+ void foo(){
+ #
+ if(ne
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew13.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew13.js
new file mode 100644
index 0000000..f26612a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew13.js
@@ -0,0 +1,7 @@
+public class CompletionKeywordNew13 {
+ public class X{}
+ void foo(){
+ #
+ this.ne
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew14.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew14.js
new file mode 100644
index 0000000..0318c17
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew14.js
@@ -0,0 +1,7 @@
+public class CompletionKeywordNew14 {
+ public class X{}
+ void foo(){
+ #
+ this.ne X
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew15.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew15.js
new file mode 100644
index 0000000..74a4391
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew15.js
@@ -0,0 +1,7 @@
+public class CompletionKeywordNew15 {
+ public class X{}
+ void foo(){
+ #
+ this.ne X()
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew16.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew16.js
new file mode 100644
index 0000000..b18afd4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew16.js
@@ -0,0 +1,7 @@
+public class CompletionKeywordNew16 {
+ public class X{}
+ void foo(){
+ #
+ if(this.ne
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew2.js
new file mode 100644
index 0000000..e17d261
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew2.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordNew2 {
+ void foo(){
+ ne X
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew3.js
new file mode 100644
index 0000000..2a1c876
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew3.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordNew3 {
+ void foo(){
+ ne X()
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew4.js
new file mode 100644
index 0000000..1d6d637
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew4.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordNew4 {
+ void foo(){
+ if(ne
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew5.js
new file mode 100644
index 0000000..d2bfbe1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew5.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordNew5 {
+ public class X{}
+ void foo(){
+ this.ne
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew6.js
new file mode 100644
index 0000000..3351aec
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew6.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordNew6 {
+ public class X{}
+ void foo(){
+ this.ne X
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew7.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew7.js
new file mode 100644
index 0000000..7d8a2e5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew7.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordNew7 {
+ public class X{}
+ void foo(){
+ this.ne X()
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew8.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew8.js
new file mode 100644
index 0000000..319627d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew8.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordNew8 {
+ public class X{}
+ void foo(){
+ if(this.ne
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew9.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew9.js
new file mode 100644
index 0000000..9a8a139
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew9.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordNew9 {
+ void foo(){
+ #
+ ne
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNull1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNull1.js
new file mode 100644
index 0000000..c093ee2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNull1.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordNull1 {
+ void foo() {
+ nul
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNull2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNull2.js
new file mode 100644
index 0000000..be455e4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNull2.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordNull2 {
+ void foo() {
+ if(nul
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNull3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNull3.js
new file mode 100644
index 0000000..b8a4c5d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNull3.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordNull2 {
+ void foo() {
+ #
+ nul
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNull4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNull4.js
new file mode 100644
index 0000000..0bddc1b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNull4.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordNull4 {
+ void foo() {
+ #
+ if(nul
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPackage1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPackage1.js
new file mode 100644
index 0000000..c9d4508
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPackage1.js
@@ -0,0 +1,5 @@
+pac
+
+public class CompletionKeywordPackage1 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPackage3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPackage3.js
new file mode 100644
index 0000000..11bfc1a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPackage3.js
@@ -0,0 +1,6 @@
+import java.lang.Object;
+pac
+
+public class CompletionKeywordPackage3 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPackage4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPackage4.js
new file mode 100644
index 0000000..3b29a94
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPackage4.js
@@ -0,0 +1,4 @@
+public class CompletionKeywordPackage4 {
+
+}
+pac \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPackage5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPackage5.js
new file mode 100644
index 0000000..4e63973
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPackage5.js
@@ -0,0 +1,7 @@
+#
+import java.lang.Object;
+pac
+
+public class CompletionKeywordPackage5 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPackage6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPackage6.js
new file mode 100644
index 0000000..9c84323
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPackage6.js
@@ -0,0 +1,5 @@
+#
+public class CompletionKeywordPackage6 {
+
+}
+pac \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPackage7.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPackage7.js
new file mode 100644
index 0000000..b485731
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPackage7.js
@@ -0,0 +1,7 @@
+#
+pac
+
+package bbb;
+public class CompletionKeywordPackage7 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate1.js
new file mode 100644
index 0000000..d358941
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate1.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordPrivate1 {
+ pri
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate10.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate10.js
new file mode 100644
index 0000000..d9c8c5b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate10.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordPrivate10 {
+ public pri
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate2.js
new file mode 100644
index 0000000..d10e221
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate2.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordPrivate2 {
+ pri class
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate3.js
new file mode 100644
index 0000000..7ec0811
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate3.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordPrivate3{
+ final pri
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate4.js
new file mode 100644
index 0000000..09cbb86
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate4.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordPrivate4 {
+ private pri
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate5.js
new file mode 100644
index 0000000..edbd9c2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate5.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordPrivate5 {
+ public pri
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate6.js
new file mode 100644
index 0000000..47493ff
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate6.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordPrivate6 {
+ pri
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate7.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate7.js
new file mode 100644
index 0000000..9e6007c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate7.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordPrivate7 {
+ pri class
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate8.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate8.js
new file mode 100644
index 0000000..9074bd2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate8.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordPrivate8{
+ final pri
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate9.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate9.js
new file mode 100644
index 0000000..728103a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate9.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordPrivate9 {
+ private pri
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected1.js
new file mode 100644
index 0000000..759c999
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected1.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordProtected1 {
+ pro
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected10.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected10.js
new file mode 100644
index 0000000..5b30f17
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected10.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordProtected10 {
+ public pro
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected2.js
new file mode 100644
index 0000000..2b6900a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected2.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordProtected2 {
+ pro class
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected3.js
new file mode 100644
index 0000000..ff43595
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected3.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordProtected3{
+ final pro
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected4.js
new file mode 100644
index 0000000..ab36b74
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected4.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordProtected4 {
+ protected pro
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected5.js
new file mode 100644
index 0000000..da41f4e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected5.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordProtected5 {
+ public pro
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected6.js
new file mode 100644
index 0000000..98042d8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected6.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordProtected6 {
+ pro
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected7.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected7.js
new file mode 100644
index 0000000..163972a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected7.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordProtected7 {
+ pro class
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected8.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected8.js
new file mode 100644
index 0000000..5059ad2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected8.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordProtected8{
+ final pro
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected9.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected9.js
new file mode 100644
index 0000000..ec25552
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected9.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordProtected9 {
+ protected pro
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic1.js
new file mode 100644
index 0000000..8b6b7b2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic1.js
@@ -0,0 +1 @@
+pub \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic10.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic10.js
new file mode 100644
index 0000000..93ce37a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic10.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordPublic10 {
+ private pub
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic11.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic11.js
new file mode 100644
index 0000000..5954da7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic11.js
@@ -0,0 +1,2 @@
+#
+pub \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic12.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic12.js
new file mode 100644
index 0000000..daf1a4a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic12.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordPublic12 {
+ private pub
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic13.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic13.js
new file mode 100644
index 0000000..a60b426
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic13.js
@@ -0,0 +1,4 @@
+#
+pub class CompletionKeywordPublic13 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic14.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic14.js
new file mode 100644
index 0000000..3877d51
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic14.js
@@ -0,0 +1,2 @@
+#
+final pub \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic15.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic15.js
new file mode 100644
index 0000000..7d9c499
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic15.js
@@ -0,0 +1,2 @@
+#
+public pub \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic16.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic16.js
new file mode 100644
index 0000000..e6db882
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic16.js
@@ -0,0 +1,5 @@
+#
+public class CompletionKeywordPublic16 {
+
+}
+pub \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic17.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic17.js
new file mode 100644
index 0000000..7165f60
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic17.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordPublic17 {
+ pub
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic18.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic18.js
new file mode 100644
index 0000000..385ec31
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic18.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordPublic18 {
+ pub class
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic19.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic19.js
new file mode 100644
index 0000000..f77f5ba
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic19.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordPublic19 {
+ final pub
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic2.js
new file mode 100644
index 0000000..3396681
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic2.js
@@ -0,0 +1,3 @@
+pub class CompletionKeywordPublic2 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic20.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic20.js
new file mode 100644
index 0000000..3356173
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic20.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordPublic20 {
+ public pub
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic3.js
new file mode 100644
index 0000000..92836e9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic3.js
@@ -0,0 +1 @@
+final pub \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic4.js
new file mode 100644
index 0000000..11633a7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic4.js
@@ -0,0 +1 @@
+public pub \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic5.js
new file mode 100644
index 0000000..7f03eea
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic5.js
@@ -0,0 +1,4 @@
+public class CompletionKeywordPublic5 {
+
+}
+pub \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic6.js
new file mode 100644
index 0000000..2741297
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic6.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordPublic6 {
+ pub
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic7.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic7.js
new file mode 100644
index 0000000..0307b3c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic7.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordPublic7 {
+ pub class
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic8.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic8.js
new file mode 100644
index 0000000..733808a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic8.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordPublic8 {
+ final pub
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic9.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic9.js
new file mode 100644
index 0000000..2dc6b91
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic9.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordPublic9 {
+ public pub
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordReturn1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordReturn1.js
new file mode 100644
index 0000000..f5f0f3b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordReturn1.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordReturn1 {
+ void foo() {
+ re
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordReturn2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordReturn2.js
new file mode 100644
index 0000000..91b4bc8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordReturn2.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordReturn2 {
+ void foo() {
+ if(re
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordReturn3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordReturn3.js
new file mode 100644
index 0000000..cb17415
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordReturn3.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordReturn3 {
+ re
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordReturn4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordReturn4.js
new file mode 100644
index 0000000..d2c38ea
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordReturn4.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordReturn4 {
+ void foo() {
+ #
+ re
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordReturn5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordReturn5.js
new file mode 100644
index 0000000..e3b94d3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordReturn5.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordReturn5 {
+ void foo() {
+ #
+ if(re
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordReturn6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordReturn6.js
new file mode 100644
index 0000000..798de1b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordReturn6.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordReturn6 {
+ re
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic1.js
new file mode 100644
index 0000000..6d5defd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic1.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordStatic1 {
+ sta
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic10.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic10.js
new file mode 100644
index 0000000..1d0ee0c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic10.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordStatic10 {
+ public sta foo
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic2.js
new file mode 100644
index 0000000..9b4452c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic2.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordStatic2 {
+ public sta
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic3.js
new file mode 100644
index 0000000..eccdaa4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic3.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordStatic3 {
+ sta foo
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic4.js
new file mode 100644
index 0000000..0d7c163
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic4.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordStatic4 {
+ abstract sta
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic5.js
new file mode 100644
index 0000000..fcc6a4d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic5.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordStatic5 {
+ public sta foo
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic6.js
new file mode 100644
index 0000000..25da1cf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic6.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordStatic6 {
+ sta
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic7.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic7.js
new file mode 100644
index 0000000..3a9f94e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic7.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordStatic7 {
+ public sta
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic8.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic8.js
new file mode 100644
index 0000000..10497b6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic8.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordStatic8 {
+ sta foo
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic9.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic9.js
new file mode 100644
index 0000000..395d7ce
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic9.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordStatic9 {
+ abstract sta
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp1.js
new file mode 100644
index 0000000..c38d8ec
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp1.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordStrictfp1 {
+ stric
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp2.js
new file mode 100644
index 0000000..4137b86
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp2.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordStrictfp2 {
+ volatile stric
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp3.js
new file mode 100644
index 0000000..657f36c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp3.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordStrictfp3 {
+ public stric
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp4.js
new file mode 100644
index 0000000..0569987
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp4.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordStrictfp4 {
+ abstract stric
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp5.js
new file mode 100644
index 0000000..fa29e87
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp5.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordStrictfp5 {
+ stric
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp6.js
new file mode 100644
index 0000000..8f66f51
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp6.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordStrictfp6 {
+ volatile stric
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp7.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp7.js
new file mode 100644
index 0000000..3668524
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp7.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordStrictfp7 {
+ public stric
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp8.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp8.js
new file mode 100644
index 0000000..5f473ae
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp8.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordStrictfp8 {
+ abstract stric
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper1.js
new file mode 100644
index 0000000..5cb918b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper1.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordSuper1 {
+ void foo() {
+ sup
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper10.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper10.js
new file mode 100644
index 0000000..cad4347
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper10.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordSuper10 {
+ {
+ #
+ sup
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper11.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper11.js
new file mode 100644
index 0000000..9d5bcdc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper11.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordSuper11 {
+ static void foo() {
+ #
+ sup
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper2.js
new file mode 100644
index 0000000..4e8b5e1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper2.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordSuper2 {
+ void foo() {
+ if(sup
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper3.js
new file mode 100644
index 0000000..57b8c03
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper3.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordSuper3 {
+ sup
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper4.js
new file mode 100644
index 0000000..2ceea5b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper4.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordSuper4 {
+ {
+ sup
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper5.js
new file mode 100644
index 0000000..6fa2822
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper5.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordSuper5 {
+ static void foo() {
+ sup
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper7.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper7.js
new file mode 100644
index 0000000..1db7224
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper7.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordSuper7 {
+ void foo() {
+ #
+ sup
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper8.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper8.js
new file mode 100644
index 0000000..bdd5a6b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper8.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordSuper8 {
+ void foo() {
+ #
+ if(sup
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper9.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper9.js
new file mode 100644
index 0000000..3f677e2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper9.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordSuper9 {
+ sup
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSwitch1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSwitch1.js
new file mode 100644
index 0000000..a9fa432
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSwitch1.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordSwitch1 {
+ void foo() {
+ sw
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSwitch2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSwitch2.js
new file mode 100644
index 0000000..8781e13
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSwitch2.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordSwitch2 {
+ void foo() {
+ if(sw
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSwitch3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSwitch3.js
new file mode 100644
index 0000000..a7e4e4a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSwitch3.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordSwitch3 {
+ sw
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSwitch4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSwitch4.js
new file mode 100644
index 0000000..1e2ef9e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSwitch4.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordSwitch4 {
+ void foo() {
+ #
+ sw
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSwitch5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSwitch5.js
new file mode 100644
index 0000000..e2e09a7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSwitch5.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordSwitch5 {
+ void foo() {
+ #
+ if(sw
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSwitch6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSwitch6.js
new file mode 100644
index 0000000..e0ca482
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSwitch6.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordSwitch6 {
+ sw
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized1.js
new file mode 100644
index 0000000..7524327
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized1.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordSynchronized1 {
+ syn
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized10.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized10.js
new file mode 100644
index 0000000..313dba2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized10.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordSynchronized10 {
+ abstract syn
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized11.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized11.js
new file mode 100644
index 0000000..5c604c4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized11.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordSynchronized11 {
+ void foo() {
+ #
+ syn
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized12.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized12.js
new file mode 100644
index 0000000..b80a825
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized12.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordSynchronized12 {
+ void foo() {
+ #
+ if(syn
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized2.js
new file mode 100644
index 0000000..e251bbf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized2.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordSynchronized2 {
+ volatile syn
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized3.js
new file mode 100644
index 0000000..4ede753
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized3.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordSynchronized3 {
+ public syn
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized4.js
new file mode 100644
index 0000000..100290f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized4.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordSynchronized4 {
+ abstract syn
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized5.js
new file mode 100644
index 0000000..0c15d76
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized5.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordSynchronized5 {
+ void foo() {
+ syn
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized6.js
new file mode 100644
index 0000000..81edfa4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized6.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordSynchronized6 {
+ void foo() {
+ if(syn
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized7.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized7.js
new file mode 100644
index 0000000..744831d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized7.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordSynchronized7 {
+ syn
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized8.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized8.js
new file mode 100644
index 0000000..07c2939
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized8.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordSynchronized8 {
+ volatile syn
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized9.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized9.js
new file mode 100644
index 0000000..0b45c5c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized9.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordSynchronized9 {
+ public syn
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis1.js
new file mode 100644
index 0000000..6f0b61c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis1.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordThis1 {
+ void foo() {
+ thi
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis10.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis10.js
new file mode 100644
index 0000000..8d65bcb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis10.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordThis10 {
+ thi
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis11.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis11.js
new file mode 100644
index 0000000..5ba37e6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis11.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordThis11 {
+ {
+ #
+ thi
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis12.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis12.js
new file mode 100644
index 0000000..46102f8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis12.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordThis12 {
+ static void foo() {
+ #
+ thi
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis13.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis13.js
new file mode 100644
index 0000000..f9cd8c7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis13.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordThis13 {
+ void foo() {
+ #
+ CompletionKeywordThis13.thi
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis14.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis14.js
new file mode 100644
index 0000000..63697a2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis14.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordThis14 {
+ static void foo() {
+ #
+ CompletionKeywordThis14.thi
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis2.js
new file mode 100644
index 0000000..3886b90
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis2.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordThis2 {
+ void foo() {
+ if(thi
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis3.js
new file mode 100644
index 0000000..4aa7c84
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis3.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordThis3 {
+ thi
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis4.js
new file mode 100644
index 0000000..c8afde7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis4.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordThis4 {
+ {
+ thi
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis5.js
new file mode 100644
index 0000000..4006684
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis5.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordThis5 {
+ static void foo() {
+ thi
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis6.js
new file mode 100644
index 0000000..bc2c7be
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis6.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordThis6 {
+ void foo() {
+ CompletionKeywordThis6.thi
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis7.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis7.js
new file mode 100644
index 0000000..52bffc9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis7.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordThis7 {
+ static void foo() {
+ CompletionKeywordThis7.thi
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis8.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis8.js
new file mode 100644
index 0000000..5177d5d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis8.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordThis8 {
+ void foo() {
+ #
+ thi
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis9.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis9.js
new file mode 100644
index 0000000..0e491f7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis9.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordThis9 {
+ void foo() {
+ #
+ if(thi
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrow1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrow1.js
new file mode 100644
index 0000000..9362744
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrow1.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordThrow1 {
+ void foo() {
+ thr
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrow2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrow2.js
new file mode 100644
index 0000000..2ccb0fe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrow2.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordThrow2 {
+ void foo() {
+ if(thr
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrow3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrow3.js
new file mode 100644
index 0000000..59edcd2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrow3.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordThrow3 {
+ thr
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrow4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrow4.js
new file mode 100644
index 0000000..2405a4b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrow4.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordThrow4 {
+ void foo() {
+ #
+ thr
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrow5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrow5.js
new file mode 100644
index 0000000..96eb296
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrow5.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordThrow5 {
+ void foo() {
+ #
+ if(thr
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrow6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrow6.js
new file mode 100644
index 0000000..3033cb8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrow6.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordThrow6 {
+ thr
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows1.js
new file mode 100644
index 0000000..cc5c3bc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows1.js
@@ -0,0 +1,4 @@
+public class CompletionKeywordThrows1 {
+ void foo() thro {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows2.js
new file mode 100644
index 0000000..a2fe443
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows2.js
@@ -0,0 +1,4 @@
+public class CompletionKeywordThrows2 {
+ void foo() throw Exception thro {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows3.js
new file mode 100644
index 0000000..ddc4e8b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows3.js
@@ -0,0 +1,4 @@
+public class CompletionKeywordThrows3 {
+ int foo()[] thro {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows4.js
new file mode 100644
index 0000000..e23131d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows4.js
@@ -0,0 +1,4 @@
+public class CompletionKeywordThrows4 {
+ public CompletionKeywordThrows4() thro {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows5.js
new file mode 100644
index 0000000..70a3b0b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows5.js
@@ -0,0 +1,5 @@
+#
+public class CompletionKeywordThrows5 {
+ void foo() thro {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows6.js
new file mode 100644
index 0000000..123e5a9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows6.js
@@ -0,0 +1,5 @@
+#
+public class CompletionKeywordThrows6 {
+ void foo() throw Exception thro {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows7.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows7.js
new file mode 100644
index 0000000..227230a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows7.js
@@ -0,0 +1,5 @@
+#
+public class CompletionKeywordThrows7 {
+ int foo()[] thro {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows8.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows8.js
new file mode 100644
index 0000000..1e7086e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows8.js
@@ -0,0 +1,5 @@
+#
+public class CompletionKeywordThrows8 {
+ public CompletionKeywordThrows8() thro {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient1.js
new file mode 100644
index 0000000..d2fffa6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient1.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordTransient1 {
+ tran
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient2.js
new file mode 100644
index 0000000..17eb00a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient2.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordTransient2 {
+ native tran
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient3.js
new file mode 100644
index 0000000..15187db
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient3.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordTransient3 {
+ public tran
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient4.js
new file mode 100644
index 0000000..078193d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient4.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordTransient4 {
+ abstract tran
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient5.js
new file mode 100644
index 0000000..c09938a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient5.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordTransient5 {
+ tran
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient6.js
new file mode 100644
index 0000000..4fb9d0c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient6.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordTransient6 {
+ native tran
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient7.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient7.js
new file mode 100644
index 0000000..2753500
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient7.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordTransient7 {
+ public tran
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient8.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient8.js
new file mode 100644
index 0000000..6dd95d5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient8.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordTransient8 {
+ abstract tran
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTrue1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTrue1.js
new file mode 100644
index 0000000..74f8746
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTrue1.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordTrue1 {
+ void foo() {
+ tru
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTrue2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTrue2.js
new file mode 100644
index 0000000..b515a83
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTrue2.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordTrue2 {
+ void foo() {
+ if(tru
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTrue3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTrue3.js
new file mode 100644
index 0000000..adbe4be
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTrue3.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordTrue3 {
+ void foo() {
+ #
+ tru
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTrue4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTrue4.js
new file mode 100644
index 0000000..64fe1eb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTrue4.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordTrue4 {
+ void foo() {
+ #
+ if(tru
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTry1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTry1.js
new file mode 100644
index 0000000..0914cc6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTry1.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordTry1 {
+ void foo() {
+ tr
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTry2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTry2.js
new file mode 100644
index 0000000..5b9d6ee
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTry2.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordTry2 {
+ void foo() {
+ if(tr
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTry3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTry3.js
new file mode 100644
index 0000000..0c22222
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTry3.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordTry3 {
+ try
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTry4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTry4.js
new file mode 100644
index 0000000..b3fd208
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTry4.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordTry4 {
+ void foo() {
+ #
+ tr
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTry5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTry5.js
new file mode 100644
index 0000000..2f359fd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTry5.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordTry5 {
+ void foo() {
+ #
+ if(tr
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTry6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTry6.js
new file mode 100644
index 0000000..29934d8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTry6.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordTry6 {
+ try
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile1.js
new file mode 100644
index 0000000..17ae698
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile1.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordVolatile1 {
+ vol
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile2.js
new file mode 100644
index 0000000..f9a2b6e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile2.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordVolatile2 {
+ native vol
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile3.js
new file mode 100644
index 0000000..f8838fc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile3.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordVolatile3 {
+ public vol
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile4.js
new file mode 100644
index 0000000..f33e8fd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile4.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordVolatile4 {
+ abstract vol
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile5.js
new file mode 100644
index 0000000..85eacc1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile5.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordVolatile5 {
+ vol
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile6.js
new file mode 100644
index 0000000..592ae74
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile6.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordVolatile6 {
+ native vol
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile7.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile7.js
new file mode 100644
index 0000000..9748aa0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile7.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordVolatile7 {
+ public vol
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile8.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile8.js
new file mode 100644
index 0000000..21e405f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile8.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordVolatile8 {
+ abstract vol
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile1.js
new file mode 100644
index 0000000..56f7075
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile1.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordWhile1 {
+ void foo() {
+ wh
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile10.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile10.js
new file mode 100644
index 0000000..98d4e5e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile10.js
@@ -0,0 +1,8 @@
+public class CompletionKeywordWhile10 {
+ int whilez;
+ void foo(){
+ #
+ do {
+ } wh
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile2.js
new file mode 100644
index 0000000..120aa86
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile2.js
@@ -0,0 +1,5 @@
+public class CompletionKeywordWhile2 {
+ void foo() {
+ if(wh
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile3.js
new file mode 100644
index 0000000..11b9184
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile3.js
@@ -0,0 +1,3 @@
+public class CompletionKeywordWhile3 {
+ wh
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile4.js
new file mode 100644
index 0000000..5d94bda
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile4.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordWhile4 {
+ void foo(){
+ do {
+ } wh
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile5.js
new file mode 100644
index 0000000..fad71ae
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile5.js
@@ -0,0 +1,7 @@
+public class CompletionKeywordWhile5 {
+ int whilez;
+ void foo(){
+ do {
+ } wh
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile6.js
new file mode 100644
index 0000000..3d7dd3e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile6.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordWhile6 {
+ void foo() {
+ #
+ wh
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile7.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile7.js
new file mode 100644
index 0000000..1ed1cbc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile7.js
@@ -0,0 +1,6 @@
+public class CompletionKeywordWhile7 {
+ void foo() {
+ #
+ if(wh
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile8.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile8.js
new file mode 100644
index 0000000..1fe57fc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile8.js
@@ -0,0 +1,4 @@
+#
+public class CompletionKeywordWhile8 {
+ wh
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile9.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile9.js
new file mode 100644
index 0000000..af79d5f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile9.js
@@ -0,0 +1,7 @@
+public class CompletionKeywordWhile9 {
+ void foo(){
+ #
+ do {
+ } wh
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/p/CompletionKeywordImport2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/p/CompletionKeywordImport2.js
new file mode 100644
index 0000000..20c9c75
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/p/CompletionKeywordImport2.js
@@ -0,0 +1,6 @@
+package p;
+imp
+
+public class CompletionKeywordImport2 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/p/CompletionKeywordImport8.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/p/CompletionKeywordImport8.js
new file mode 100644
index 0000000..01caffd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/p/CompletionKeywordImport8.js
@@ -0,0 +1,7 @@
+#
+package p;
+imp
+
+public class CompletionKeywordImport8 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/p/CompletionKeywordPackage2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/p/CompletionKeywordPackage2.js
new file mode 100644
index 0000000..926c8b3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/p/CompletionKeywordPackage2.js
@@ -0,0 +1,5 @@
+package p;
+pac
+public class CompletionKeywordPackage2 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/p/CompletionKeywordPackage8.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/p/CompletionKeywordPackage8.js
new file mode 100644
index 0000000..ce5afec
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/p/CompletionKeywordPackage8.js
@@ -0,0 +1,6 @@
+#
+package p;
+pac
+public class CompletionKeywordPackage8 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0001/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0001/Test.js
new file mode 100644
index 0000000..f9547d7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0001/Test.js
@@ -0,0 +1,11 @@
+package test0001;
+
+public class Test {
+ void foo() {
+ X<St
+ }
+}
+
+class X<T> {
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0002/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0002/Test.js
new file mode 100644
index 0000000..b61c610
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0002/Test.js
@@ -0,0 +1,11 @@
+package test0002;
+
+public class Test {
+ void foo() {
+ X<Ob
+ }
+}
+
+class X<T> {
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0003/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0003/Test.js
new file mode 100644
index 0000000..b871c31
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0003/Test.js
@@ -0,0 +1,11 @@
+package test0003;
+
+public class Test {
+ void foo() {
+ X<St
+ }
+}
+
+class X<T extends String> {
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0004/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0004/Test.js
new file mode 100644
index 0000000..068ebf2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0004/Test.js
@@ -0,0 +1,17 @@
+package test0004;
+
+public class Test {
+ void foo() {
+ X<XZ
+ }
+}
+
+class X<T extends XZXSuper> {
+
+}
+class XZX {
+
+}
+class XZXSuper {
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0009/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0009/Test.js
new file mode 100644
index 0000000..349316a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0009/Test.js
@@ -0,0 +1,5 @@
+package test0009;
+
+public class Test <T_1, T_2>{
+ /**/T_
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0010/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0010/Test.js
new file mode 100644
index 0000000..e833c8c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0010/Test.js
@@ -0,0 +1,7 @@
+package test0010;
+
+public class Test <T_1, T_2>{
+ <T_3, T_4> void foo() {
+ /**/T_
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0023/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0023/Test.js
new file mode 100644
index 0000000..d64f50f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0023/Test.js
@@ -0,0 +1,12 @@
+package test0023;
+
+public class Test {
+ void foo() {
+ Z0023<St
+ }
+}
+class Z0023 {
+
+}
+
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0024/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0024/Test.js
new file mode 100644
index 0000000..2d9a7d3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0024/Test.js
@@ -0,0 +1,8 @@
+package test0024;
+
+public class Test {
+ void foo() {
+ String<St
+ }
+}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0025/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0025/Test.js
new file mode 100644
index 0000000..d0c57c2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0025/Test.js
@@ -0,0 +1,9 @@
+package test0025;
+
+public class Test {
+ Z0025<St, String> var;
+}
+class Z0025 <T1, T2 extends String>{
+
+}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0028/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0028/Test.js
new file mode 100644
index 0000000..3d9e10e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0028/Test.js
@@ -0,0 +1,12 @@
+package test0028;
+
+public class Test {
+ void foo() {
+ Object o = (Z0028<St
+ }
+}
+class Z0028 <T extends String>{
+
+}
+
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0030/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0030/Test.js
new file mode 100644
index 0000000..b932e76
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0030/Test.js
@@ -0,0 +1,8 @@
+package test0030;
+
+public class Test<ZZY,ZZX> {
+
+ public Test(Function<ZZY,ZZZ> function) {
+ ZZ
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0032/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0032/Test.js
new file mode 100644
index 0000000..3d0edcc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0032/Test.js
@@ -0,0 +1,6 @@
+package test0032;
+
+public class Test <T> {
+ Test<Stri
+}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0033/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0033/Test.js
new file mode 100644
index 0000000..9e5d308
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0033/Test.js
@@ -0,0 +1,8 @@
+package test0033;
+
+public class Test <T> {
+ void foo() {
+ Test<Stri
+ }
+}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0034/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0034/Test.js
new file mode 100644
index 0000000..43354fb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0034/Test.js
@@ -0,0 +1,6 @@
+package test0034;
+
+public class Test <T> {
+ Object<Stri
+}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0035/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0035/Test.js
new file mode 100644
index 0000000..bac44b3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0035/Test.js
@@ -0,0 +1,8 @@
+package test0035;
+
+public class Test <T> {
+ void foo() {
+ Object<Stri
+ }
+}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0036/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0036/Test.js
new file mode 100644
index 0000000..f6f26c3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0036/Test.js
@@ -0,0 +1,6 @@
+package test0036;
+
+public class Test <T> {
+ Test<Object, Stri
+}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0037/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0037/Test.js
new file mode 100644
index 0000000..f31de8f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0037/Test.js
@@ -0,0 +1,8 @@
+package test0037;
+
+public class Test <T> {
+ void foo() {
+ Test<Object, Stri
+ }
+}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0038/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0038/Test.js
new file mode 100644
index 0000000..f567044
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0038/Test.js
@@ -0,0 +1,6 @@
+package test0038;
+
+public class Test <T> {
+ Test<Object, Stri, Object> x;
+}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0039/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0039/Test.js
new file mode 100644
index 0000000..8bdc3d8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0039/Test.js
@@ -0,0 +1,8 @@
+package test0039;
+
+public class Test <T> {
+ void foo() {
+ Test<Object, Stri, Object> x;
+ }
+}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0048/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0048/Test.js
new file mode 100644
index 0000000..7466a40
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0048/Test.js
@@ -0,0 +1,11 @@
+package test0048;
+
+public class Test<E> {
+ void bar(E e) {
+ }
+ void foo() {
+ Test<? extends Object> l= new Test<Object>();
+ l.ba
+ }
+}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0049/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0049/Test.js
new file mode 100644
index 0000000..84fa95a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0049/Test.js
@@ -0,0 +1,9 @@
+package test0049;
+
+public class Test {
+ void foo() {
+ TestJar<? extends Object> l= new TestJar<Object>();
+ l.ba
+ }
+}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0050/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0050/Test.js
new file mode 100644
index 0000000..a343991
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0050/Test.js
@@ -0,0 +1,17 @@
+package test0050;
+
+public class Test<T_0050> {
+ void foo() {
+ Test<T_0050> c = null;
+ void bar(Object ... var) {}
+ void toto(){}
+ static class X {
+ void titi(){
+ if(i < length) {
+
+ }
+ }
+ }
+ }
+}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0057/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0057/Test.js
new file mode 100644
index 0000000..dc81793
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0057/Test.js
@@ -0,0 +1,7 @@
+package test0057;
+import static pkgstaticimport.QQType3.*;
+public class Test {
+ void foo() {
+ Inner
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0060/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0060/Test.js
new file mode 100644
index 0000000..ebcd218
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0060/Test.js
@@ -0,0 +1,7 @@
+package test0060;
+import static pkgstaticimport.QQType4.*;
+public class Test extends pkgstaticimport.QQType4 {
+ void foo() {
+ zzvarzz
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0064/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0064/Test.js
new file mode 100644
index 0000000..92c85b2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0064/Test.js
@@ -0,0 +1,7 @@
+package test0060;
+import static pkgstaticimport.QQType6.*;
+public class Test {
+ void foo() {
+ zzvarzz
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0067/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0067/Test.js
new file mode 100644
index 0000000..12c8b26
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0067/Test.js
@@ -0,0 +1,7 @@
+package test0067;
+import static pkgstaticimport.QQType7.*;
+public class Test extends pkgstaticimport.QQType7 {
+ void foo() {
+ zzfoozz
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0068/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0068/Test.js
new file mode 100644
index 0000000..25e8ff7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0068/Test.js
@@ -0,0 +1,7 @@
+package test0068;
+import static pkgstaticimport.QQType9.*;
+public class Test {
+ void foo() {
+ zzfoozz
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0069/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0069/Test.js
new file mode 100644
index 0000000..449e193
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0069/Test.js
@@ -0,0 +1,11 @@
+package test0069;
+public class Test<T extends Object> {
+ T fValue;
+ void putValue(T value) {
+ this.fValue= value;
+ }
+ void foo() {
+ Test<String> icell= new Test<String>();
+ icell.p
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0070/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0070/Test.js
new file mode 100644
index 0000000..decb5a7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0070/Test.js
@@ -0,0 +1,7 @@
+package test0070;
+
+import static test0070
+
+public class Test {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0072/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0072/Test.js
new file mode 100644
index 0000000..1fe2098
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0072/Test.js
@@ -0,0 +1,7 @@
+package test0072;
+
+import static test0072.p.ImportedClass.ZZ
+
+public class Test {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0073/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0073/Test.js
new file mode 100644
index 0000000..bebb2e4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0073/Test.js
@@ -0,0 +1,7 @@
+package test0073;
+
+import static test0073.p.ImportedClass.Inner.ZZ
+
+public class Test {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0074/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0074/Test.js
new file mode 100644
index 0000000..a476be5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0074/Test.js
@@ -0,0 +1,7 @@
+package test0074;
+
+import static test0074.p.ImportedClass.Inner.ZZ
+
+public class Test {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/test0049.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/test0049.jar
new file mode 100644
index 0000000..bc05bb2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/test0049.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/test0049src.zip b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/test0049src.zip
new file mode 100644
index 0000000..7f5c8b6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/test0049src.zip
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/tmpDoc.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/tmpDoc.jar
new file mode 100644
index 0000000..15b5ad3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/tmpDoc.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/tmpDocDoc.zip b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/tmpDocDoc.zip
new file mode 100644
index 0000000..4aae6e2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/tmpDocDoc.zip
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/tmpDocsrc.zip b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/tmpDocsrc.zip
new file mode 100644
index 0000000..3cec9c9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/tmpDocsrc.zip
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/zzz.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/zzz.jar
new file mode 100644
index 0000000..3aca5b1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/zzz.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/zzzsrc.zip b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/zzzsrc.zip
new file mode 100644
index 0000000..fa08ccb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/zzzsrc.zip
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/Hello.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/Hello.js
new file mode 100644
index 0000000..42c53af
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/Hello.js
@@ -0,0 +1,23 @@
+void ___eval() {
+ new Runnable() {
+ void ___run() throws Throwable {
+ return blah;
+ }
+ private String blarg;
+ public void run() {
+ }
+ };
+}
+public class Hello {
+ private static int x;
+ private String blah;
+ public static void main(String[] args) {
+ }
+ public void hello() {
+ }
+ public boolean blah() {
+ return false;
+ }
+ public void foo() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/NO_WORKING.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/NO_WORKING.js
new file mode 100644
index 0000000..b7a33a6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/NO_WORKING.js
@@ -0,0 +1,4 @@
+public class NO_WORKING {
+
+ public void method() { }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/Test0157.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/Test0157.js
new file mode 100644
index 0000000..b19d3bc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/Test0157.js
@@ -0,0 +1,3 @@
+ var tab;
+ var t;
+ var t2;
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/Test0158.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/Test0158.js
new file mode 100644
index 0000000..1ac5c03
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/Test0158.js
@@ -0,0 +1 @@
+ var t2;
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/Test0170.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/Test0170.js
new file mode 100644
index 0000000..61a60c8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/Test0170.js
@@ -0,0 +1,3 @@
+import java.util.*;
+class Test0170 {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/Test462.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/Test462.js
new file mode 100644
index 0000000..ff43459
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/Test462.js
@@ -0,0 +1,2 @@
+public interface Test462 {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/codeManipulation/bug.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/codeManipulation/bug.js
new file mode 100644
index 0000000..e08b07b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/codeManipulation/bug.js
@@ -0,0 +1,14 @@
+package codeManipulation;
+
+public class bug {
+ static private int dummyFct3() {
+ return 3;
+ }
+ static private int dummyFct2() {
+ return 3;
+ }
+ static private void pipo () {
+ int z = bug.dummyFct3(),y=bug.dummyFct2();
+
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/examples.oneofeach/ASTPosterChild.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/examples.oneofeach/ASTPosterChild.js
new file mode 100644
index 0000000..6b18491
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/examples.oneofeach/ASTPosterChild.js
@@ -0,0 +1,188 @@
+/*******************************************************************************
+ * Copyright (c) 2002 IBM Corp. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial implementation
+ ******************************************************************************/
+/*
+ * Syntactically correct Java program containing at least an instance of
+ * each different kind of construct in the Java language (1.4).
+ */
+// PackageDeclaration
+package examples.oneofeach;
+
+// ImportDeclaration (single-type)
+import java.io.Serializable;
+// ImportDeclaration (on-demand)
+import java.util.*;
+
+/**
+ * TypeDeclaration (class)
+ */
+public final class ASTPosterChild extends java.lang.Object
+ implements Serializable, ASTPosterInterface {
+
+ /**
+ * FieldDeclaration
+ */
+ public transient boolean[] f1 = {true, false};
+
+ // Initializer
+ {
+ f1 = null;
+ }
+
+ /**
+ * MethodDeclaration (constructor)
+ */
+ ASTPosterChild() {
+ // ConstructorInvocation
+ this(true);
+ }
+
+ /**
+ * MethodDeclaration (constructor)
+ */
+ ASTPosterChild(boolean flag) {
+ // SuperConstructorInvocation
+ super();
+ }
+
+ /**
+ * MethodDeclaration (method)
+ */
+ public void op() {
+
+ // PrimitiveType, NumberLiteral
+ byte a = 0;
+ // BooleanLiteral
+ boolean b = true;
+ // CharacterLiteral
+ char c = 'x';
+ short s = 1;
+ long l = 1L;
+ float f = 1.0f;
+ double d = 1e6;
+ // SimpleType, StringLiteral
+ String z = "hello";//$NON-NLS-1$
+ // NullLiteral
+ Vector o1 = null;
+ // ArrayType, ArrayInitializer
+ int[] t1 = {1};
+ int[][] t2 = {{1,2}, {3,4}};
+ int[][][] t3 = null;
+ // ClassInstanceCreation
+ java.lang.Object o = new Object();
+ // ArrayCreation (initializer)
+ Object[] o2 = new Object[]{"0", "1"};//$NON-NLS-1$//$NON-NLS-2$
+ // ArrayCreation (dimensions)
+ Object[][] o3 = new Object[3][];
+ // Assigment
+ o3 = null;
+ // ArrayAccess
+ Object x1 = o3[0];
+ // CastExpression
+ Object x2 = (Object) o3;
+ // ConditionalExpression
+ int x3 = b ? 1 : 2;
+ // FieldAccess
+ Object x4 = System.out;
+ // InfixExpression
+ String x5 = "a" + "b";//$NON-NLS-1$//$NON-NLS-2$
+ // InfixExpression (extended operands)
+ String x6 = "a" + "b" + "c" + "d";//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
+ // MethodInvocation
+ notifyAll();
+ // ParenthesizedExpression
+ Object x7 = ((o));
+ // PostfixExpression
+ l++;
+ // PrefixExpression
+ --l;
+ // ThisExpression
+ Object x8 = ASTPosterChild.this;
+ // TypeLiteral
+ Object x9 = void.class;
+
+ // AssertStatement
+ // assert true: "unhappy";//$NON-NLS-1$
+ // Block
+ {}
+ // DoStatement
+ do {
+ } while (false);
+ // VariableDeclarationStatement
+ int i;
+ // ExpressionStatement
+ i = 1;
+ // LabeledStatement
+ looping:
+ // ForStatement, VariableDeclarationExpression
+ for (int j=0; j<10; j++) {
+ // ContinueStatement
+ continue looping;
+ }
+ // IfStatement
+ if (false)
+ System.exit(0);
+ else
+ i++;
+ // SwitchStatement
+ switch (2) {
+ // SwitchCase
+ case 2:
+ // BreakStatement
+ break;
+ default:
+ // EmptyStatement
+ ;
+ }
+ // SynchronizedStatement
+ synchronized (this) {
+ }
+ // TryStatement
+ try {
+ // ThrowStatement
+ throw new RuntimeException();
+ } catch (Exception e) // CatchClause
+ {
+ } finally {
+ }
+
+ // TypeDeclarationStatement
+ abstract class X {
+ int f;
+ void m() {
+ }
+ }
+ // ClassInstanceCreation (with body declarations)
+ Object anon = new X() {
+ void m() {
+ // SuperMethodInvocation
+ super.m();
+ // SuperFieldAccess
+ super.f = 1;
+ }
+ };
+ // WhileStatement
+ boolean b1 = true;
+ while (b1);
+ // ReturnStatement;
+ return;
+ }
+
+}
+
+/**
+ * TypeDeclaration (interface)
+ */
+interface ASTPosterInterface {
+
+ String FOO = "hi";//$NON-NLS-1$
+ void op();
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test000/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test000/Test.js
new file mode 100644
index 0000000..17e3868
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test000/Test.js
@@ -0,0 +1,36 @@
+package javadoc.test000;
+import java.io.IOException;
+import java.util.*;
+public class Test {
+int field;
+class X {
+ int x;
+}
+/**
+ * Method outside javaDoc Comment
+ * 1) {@link String} tag description not empty
+ * 2) {@link CharOperation Unknown class} tag description not empty
+ * @param str
+ * @param VAR Unknown parameter
+ * @param list third param with embedded tag: {@link Vector}
+ * @param array fourth param with several embedded tags on several lines:
+ * 1) {@link String} tag description not empty
+ * 2) {@link CharOperation Unknown class} tag description not empty
+ * @throws IllegalAccessException Unknown class
+ * @throws NullPointerException
+ * @return an integer
+ * @see String
+ * @see Vector tag description not empty
+ * @see Object tag description includes embedded tags and several lines:
+ * 1) {@link String} tag description not empty
+ * 2) {@link CharOperation Unknown class} tag description not empty
+ * @see Object#equals(Object)
+ * @see Object#equals() Not applicable method
+ * @see #foo(String,int,Vector,char[])
+ * @see #foo(String str,int var,Vector list,char[] array) valid method
+ * @see #field
+ * @see X#x valid field
+ * @see Object#unknown Unknown field
+ */
+int foo(String str, int var, Vector list, char[] array) throws IOException { return 0; }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test001/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test001/Test.js
new file mode 100644
index 0000000..f44a18f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test001/Test.js
@@ -0,0 +1,13 @@
+/**
+ * Comment 1
+ */
+package javadoc.test001;
+
+/**
+ * Comment 2
+ */
+public class Test {
+
+}
+
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test002/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test002/Test.js
new file mode 100644
index 0000000..c941c1b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test002/Test.js
@@ -0,0 +1,10 @@
+package javadoc.test002;
+import java.util.*;
+public class Test {
+/**
+ * @see Vector
+ * @see java.util.Vector
+ */
+public void foo() {
+}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test003/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test003/Test.js
new file mode 100644
index 0000000..ba753f6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test003/Test.js
@@ -0,0 +1,8 @@
+package javadoc.test003;
+public class Test {
+/**
+ * {@link Exception}
+ * @see Exception
+ */
+public void foo() {}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test004/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test004/Test.js
new file mode 100644
index 0000000..ed57a11
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test004/Test.js
@@ -0,0 +1,12 @@
+package javadoc.test004;
+import java.util.*;
+public class Test {
+/**
+ * @see #foo(Vector)
+ * @see Test#foo(Vector)
+ * @see javadoc.test004.Test#foo(Vector)
+ */
+public void foo(Vector v) {
+ Vector vs;
+}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test005/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test005/Test.js
new file mode 100644
index 0000000..3fb6128
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test005/Test.js
@@ -0,0 +1,8 @@
+package javadoc.test005;
+import java.util.Vector;
+public class Test {
+/**
+ * @see Test#Test(String)
+ */
+public Test(String str) {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test006/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test006/Test.js
new file mode 100644
index 0000000..6da3972
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test006/Test.js
@@ -0,0 +1,11 @@
+package javadoc.test006;
+public class Test {
+/**
+ * @see String
+ * @see StringBuffer#StringBuffer(String)
+ * @see java.lang.String
+ * @see java.lang.StringBuffer#StringBuffer(java.lang.String)
+ */
+public void foo() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test007/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test007/Test.js
new file mode 100644
index 0000000..91c1e57
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test007/Test.js
@@ -0,0 +1,9 @@
+package javadoc.test007;
+public class Test {
+/**
+ * @see #foo()
+ * @see Test#foo()
+ * @see javadoc.test007.Test#foo()
+ */
+public void foo() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test008/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test008/Test.js
new file mode 100644
index 0000000..2cfbbe4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test008/Test.js
@@ -0,0 +1,15 @@
+package javadoc.test008;
+public class Test {
+/**
+ * @see #foo(Object[],String[][][])
+ */
+public void foo(Object[] o1,String[][][] s3) {}
+/**
+ * @see #foo(java.util.Vector[],java.util.Vector[][][])
+ */
+public void foo(java.util.Vector[] v1,java.util.Vector[][][] v3) {}
+/**
+ * @see #foo(int[],char[][][])
+ */
+public void foo(int[] a1,char[][][] a3) {}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test009/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test009/Test.js
new file mode 100644
index 0000000..1e4a1b9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test009/Test.js
@@ -0,0 +1,15 @@
+package javadoc.test009;
+public class Test {
+/**
+ * @see #foo(Object[] obj,String[][][] str)
+ */
+public void foo(Object[] o1,String[][][] s3) {}
+/**
+ * @see #foo(java.util.Vector[] v1,java.util.Vector[][][] v2)
+ */
+public void foo(java.util.Vector[] v1,java.util.Vector[][][] v3) {}
+/**
+ * @see #foo(int[] array1,char[][][] array2)
+ */
+public void foo(int[] a1,char[][][] a3) {}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test010/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test010/Test.js
new file mode 100644
index 0000000..99f7507
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test010/Test.js
@@ -0,0 +1,10 @@
+package javadoc.test010;
+public class Test {
+int val;
+/**
+ * {@link java.util.Vector#Vector()}
+ * @param name {@link java.lang.String inline tag}
+ * @see Object {@link java.lang.String inline tag} leading comment
+ */
+public void gee(String name) {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test011/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test011/Test.js
new file mode 100644
index 0000000..162b0f8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test011/Test.js
@@ -0,0 +1,5 @@
+package javadoc.test011;
+public class Test {
+ /** @deprecated *//
+ public Test(int myParam) { }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test012/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test012/Test.js
new file mode 100644
index 0000000..01f7958
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test012/Test.js
@@ -0,0 +1,8 @@
+package javadoc.test012;
+public class Test {
+int val;
+ /**
+ * Leading comment {@link java.util.Vector#Vector()} trailing comment.
+ */
+ public void foo() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test013/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test013/Test.js
new file mode 100644
index 0000000..45188da
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test013/Test.js
@@ -0,0 +1,16 @@
+package javadoc.test013;
+import java.util.*;
+public class Test {
+ /**
+ * Javadoc comment
+ */
+ public static void main(String[] args) {
+ /* method main */
+ System.out.println("Hello" + " world"); // comment
+ }
+
+ /** */
+ public void foo() {
+ System.out.println("Hello" + /* inside comment */ " world");
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test014/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test014/X.js
new file mode 100644
index 0000000..4b5ad1a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test014/X.js
@@ -0,0 +1,11 @@
+package javadoc.test014;
+public class X {
+ public static final String COMPILER_PB_INVALID_JAVADOC = ".compiler.problem.invalidJavadoc"; //$NON-NLS-1$
+ /**
+ * Possible configurable option ID.
+ * @see #COMPILER_PB_INVALID_JAVADOC
+ * @deprecated
+ * TODO (frederic) remove after 3.0 M6
+ */
+ public static final String COMPILER_PB_INVALID_ANNOTATION = COMPILER_PB_INVALID_JAVADOC;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test015/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test015/Test.js
new file mode 100644
index 0000000..965fb4a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test015/Test.js
@@ -0,0 +1,14 @@
+package javadoc.test015;
+
+public class Test {
+ /**
+ * Makes the given resource committable. Committable means that it is
+ * writeable and that its content hasn't changed by calling
+ * <code>validateEdit</code> for the given resource on <tt>IWorkspace</tt>.
+ *
+ * @param list Liste of things
+ * @see #foo(java.util.
+ * Vector)
+ */
+ public void foo(java.util.Vector list) {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test100/TestB1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test100/TestB1.js
new file mode 100644
index 0000000..7a5077c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test100/TestB1.js
@@ -0,0 +1,11 @@
+package javadoc.test100;
+public class TestB1 { /* C0 */ /* C1 */
+ /* C2 */ /* C3 */
+ /* C4 */ /* C5 */
+ void foo() {} /* C6 */ /* C7 */
+ /* C8 */ /* C9 */
+ /* C10 */ /* C11 */
+ void bar() {}
+ /* C12 */ /* C13 */
+ /* C14 */ /* C15 */
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test100/TestB2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test100/TestB2.js
new file mode 100644
index 0000000..ba76172
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test100/TestB2.js
@@ -0,0 +1,11 @@
+package javadoc.test100;
+public class TestB2 { /* C0 */ // C1 */
+ /* C2 */ // C3 */
+ /* C4 */ // C5 */
+ void foo() {} /* C6 */ // C7 */
+ /* C8 */ // C9 */
+ /* C10 */ // C11 */
+ void bar() {}
+ /* C12 */ // C13 */
+ /* C14 */ // C15 */
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test100/TestD1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test100/TestD1.js
new file mode 100644
index 0000000..fe0d3a7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test100/TestD1.js
@@ -0,0 +1,11 @@
+package javadoc.test100;
+public class TestD1 { /** C0 */ /** C1 */
+ /** C2 */ /** C3 */
+ /** C4 */ /** C5 */
+ void foo() {} /** C6 */ /** C7 */
+ /** C8 */ /** C9 */
+ /** C10 */ /** C11 */
+ void bar() {}
+ /** C12 */ /** C13 */
+ /** C14 */ /** C15 */
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test100/TestD2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test100/TestD2.js
new file mode 100644
index 0000000..a6355e2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test100/TestD2.js
@@ -0,0 +1,11 @@
+package javadoc.test100;
+public class TestD2 { /** C0 */ // C1 */
+ /** C2 */ // C3 */
+ /** C4 */ // C5 */
+ void foo() {} /** C6 */ // C7 */
+ /** C8 */ // C9 */
+ /** C10 */ // C11 */
+ void bar() {}
+ /** C12 */ // C13 */
+ /** C14 */ // C15 */
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test101/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test101/Test.js
new file mode 100644
index 0000000..6e3278e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test101/Test.js
@@ -0,0 +1,11 @@
+package javadoc.test101;
+public class Test { // C0 */ // C0b */
+ // C1 */ // C1b */
+ // C2 */ // C2b */
+ void foo() {} // C3 */ // C3b */
+ // C4 */ // C4b */
+ // C5 */ // C5b */
+ void bar() {}
+ // C6 */ // C6b */
+ // C7 */ // C7b */
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test102/TestB1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test102/TestB1.js
new file mode 100644
index 0000000..59ee938
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test102/TestB1.js
@@ -0,0 +1,14 @@
+package javadoc.test102;
+public class TestB1 { /* C0 */ /* C1 */
+ /* C2 */ /* C3 */
+
+ /* C4 */ /* C5 */
+ void foo() {} /* C6 */ /* C7 */
+ /* C8 */ /* C9 */
+
+ /* C10 */ /* C11 */
+ void bar() {}
+ /* C12 */ /* C13 */
+
+ /* C14 */ /* C15 */
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test102/TestB2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test102/TestB2.js
new file mode 100644
index 0000000..34325de
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test102/TestB2.js
@@ -0,0 +1,14 @@
+package javadoc.test102;
+public class TestB2 { /* C0 */ // C1 */
+ /* C2 */ // C3 */
+
+ /* C4 */ // C5 */
+ void foo() {} /* C6 */ // C7 */
+ /* C8 */ // C9 */
+
+ /* C10 */ // C11 */
+ void bar() {}
+ /* C12 */ // C13 */
+
+ /* C14 */ // C15 */
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test102/TestD1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test102/TestD1.js
new file mode 100644
index 0000000..7d5ddde
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test102/TestD1.js
@@ -0,0 +1,14 @@
+package javadoc.test102;
+public class TestD1 { /** C0 */ /** C1 */
+ /** C2 */ /** C3 */
+
+ /** C4 */ /** C5 */
+ void foo() {} /** C6 */ /** C7 */
+ /** C8 */ /** C9 */
+
+ /** C10 */ /** C11 */
+ void bar() {}
+ /** C12 */ /** C13 */
+
+ /** C14 */ /** C15 */
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test102/TestD2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test102/TestD2.js
new file mode 100644
index 0000000..9eae768
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test102/TestD2.js
@@ -0,0 +1,14 @@
+package javadoc.test102;
+public class TestD2 { /** C0 */ // C1 */
+ /** C2 */ // C3 */
+
+ /** C4 */ // C5 */
+ void foo() {} /** C6 */ // C7 */
+ /** C8 */ // C9 */
+
+ /** C10 */ // C11 */
+ void bar() {}
+ /** C12 */ // C13 */
+
+ /** C14 */ // C15 */
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test103/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test103/Test.js
new file mode 100644
index 0000000..2406e11
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test103/Test.js
@@ -0,0 +1,14 @@
+package javadoc.test103;
+public class Test { // C0 */ // C0b */
+ // C1 */ // C1b */
+
+ // C2 */ // C2b */
+ void foo() {} // C3 */ // C3b */
+ // C4 */ // C4b */
+
+ // C5 */ // C5b */
+ void bar() {}
+ // C6 */ // C6b */
+
+ // C7 */ // C7b */
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test104/TestD1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test104/TestD1.js
new file mode 100644
index 0000000..d2081e8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test104/TestD1.js
@@ -0,0 +1,13 @@
+package javadoc.test104;
+public class TestD1 { /** C0 */ /** C1 */
+ /** C2 */ /** C3 */
+ /** C4 */ /** C5 */
+
+ void foo() {} /** C6 */ /** C7 */
+ /** C8 */ /** C9 */
+ /** C10 */ /** C11 */
+
+ void bar() {}
+ /** C12 */ /** C13 */
+ /** C14 */ /** C15 */
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test104/TestD2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test104/TestD2.js
new file mode 100644
index 0000000..c1d4d5b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test104/TestD2.js
@@ -0,0 +1,13 @@
+package javadoc.test104;
+public class TestD2 { /** C0 */ // C1 */
+ /** C2 */ // C3 */
+ /** C4 */ // C5 */
+
+ void foo() {} /** C6 */ // C7 */
+ /** C8 */ // C9 */
+ /** C10 */ // C11 */
+
+ void bar() {}
+ /** C12 */ // C13 */
+ /** C14 */ // C15 */
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test105/TestB1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test105/TestB1.js
new file mode 100644
index 0000000..38db287
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test105/TestB1.js
@@ -0,0 +1,13 @@
+package javadoc.test105;
+public class TestB1 { /* C0 */ /* C1 */
+ /* C2 */ /* C3 */
+ /* C4 */ /* C5 */
+
+ void foo() {} /* C6 */ /* C7 */
+ /* C8 */ /* C9 */
+ /* C10 */ /* C11 */
+
+ void bar() {}
+ /* C12 */ /* C13 */
+ /* C14 */ /* C15 */
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test105/TestB2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test105/TestB2.js
new file mode 100644
index 0000000..f65ace8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test105/TestB2.js
@@ -0,0 +1,13 @@
+package javadoc.test105;
+public class TestB2 { /* C0 */ // C1 */
+ /* C2 */ // C3 */
+ /* C4 */ // C5 */
+
+ void foo() {} /* C6 */ // C7 */
+ /* C8 */ // C9 */
+ /* C10 */ // C11 */
+
+ void bar() {}
+ /* C12 */ // C13 */
+ /* C14 */ // C15 */
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test106/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test106/Test.js
new file mode 100644
index 0000000..c921ab8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test106/Test.js
@@ -0,0 +1,13 @@
+package javadoc.test106;
+public class Test { // C0 */ // C0b */
+ // C1 */ // C1b */
+ // C2 */ // C2b */
+
+ void foo() {} // C3 */ // C3b */
+ // C4 */ // C4b */
+ // C5 */ // C5b */
+
+ void bar() {}
+ // C6 */ // C6b */
+ // C7 */ // C7b */
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test107/TestB1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test107/TestB1.js
new file mode 100644
index 0000000..c2698e3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test107/TestB1.js
@@ -0,0 +1,14 @@
+package javadoc.test107;
+public class TestB1 { /* C0 */ /* C1 */
+
+ /* C2 */ /* C3 */
+ /* C4 */ /* C5 */
+ void foo() {} /* C6 */ /* C7 */
+
+ /* C8 */ /* C9 */
+ /* C10 */ /* C11 */
+ void bar() {}
+
+ /* C12 */ /* C13 */
+ /* C14 */ /* C15 */
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test107/TestB2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test107/TestB2.js
new file mode 100644
index 0000000..e57c959
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test107/TestB2.js
@@ -0,0 +1,14 @@
+package javadoc.test107;
+public class TestB2 { /* C0 */ // C1 */
+
+ /* C2 */ // C3 */
+ /* C4 */ // C5 */
+ void foo() {} /* C6 */ // C7 */
+
+ /* C8 */ // C9 */
+ /* C10 */ // C11 */
+ void bar() {}
+
+ /* C12 */ // C13 */
+ /* C14 */ // C15 */
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test107/TestD1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test107/TestD1.js
new file mode 100644
index 0000000..2f8c03b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test107/TestD1.js
@@ -0,0 +1,14 @@
+package javadoc.test107;
+public class TestD1 { /** C0 */ /** C1 */
+
+ /** C2 */ /** C3 */
+ /** C4 */ /** C5 */
+ void foo() {} /** C6 */ /** C7 */
+
+ /** C8 */ /** C9 */
+ /** C10 */ /** C11 */
+ void bar() {}
+
+ /** C12 */ /** C13 */
+ /** C14 */ /** C15 */
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test107/TestD2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test107/TestD2.js
new file mode 100644
index 0000000..f38f395
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test107/TestD2.js
@@ -0,0 +1,14 @@
+package javadoc.test107;
+public class TestD2 { /** C0 */ // C1 */
+
+ /** C2 */ // C3 */
+ /** C4 */ // C5 */
+ void foo() {} /** C6 */ // C7 */
+
+ /** C8 */ // C9 */
+ /** C10 */ // C11 */
+ void bar() {}
+
+ /** C12 */ // C13 */
+ /** C14 */ // C15 */
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test108/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test108/Test.js
new file mode 100644
index 0000000..c42575d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test108/Test.js
@@ -0,0 +1,14 @@
+package javadoc.test108;
+public class Test { // C0 */ // C0b */
+
+ // C1 */ // C1b */
+ // C2 */ // C2b */
+ void foo() {} // C3 */ // C3b */
+
+ // C4 */ // C4b */
+ // C5 */ // C5b */
+ void bar() {}
+
+ // C6 */ // C6b */
+ // C7 */ // C7b */
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug48489/TestA.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug48489/TestA.js
new file mode 100644
index 0000000..92f5c29
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug48489/TestA.js
@@ -0,0 +1,11 @@
+package javadoc.testBug48489;
+import java.util.*;
+public class TestA {
+ /**
+ * Javadoc comment
+ */
+ public static void main(String[] args) {
+ /* method main */
+ System.out.println("Hello" + " world"); // comment
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug48489/TestB.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug48489/TestB.js
new file mode 100644
index 0000000..fe436d4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug48489/TestB.js
@@ -0,0 +1,8 @@
+package javadoc.testBug48489;
+import java.util.*;
+public class TestB {
+ /**
+ * Javadoc
+ */
+ public static final /* */ String s = "NULL", s2="";// line comment
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug48489/TestC.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug48489/TestC.js
new file mode 100644
index 0000000..d21e317
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug48489/TestC.js
@@ -0,0 +1,11 @@
+package javadoc.testBug48489;
+import java.util.*;
+public class TestC {
+ /**
+ * Javadoc
+ */
+ static {
+ /* */
+ System.out.println("Hello" + " world"); // line comment
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug48489/TestD.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug48489/TestD.js
new file mode 100644
index 0000000..83623af
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug48489/TestD.js
@@ -0,0 +1,10 @@
+package javadoc.testBug48489;
+import java.util.*;
+public class TestD {
+ /**
+ * Javadoc
+ */
+ public static void main(String[] args) {
+ System.out./* */println("Hello" + " world");
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug48489/TestE.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug48489/TestE.js
new file mode 100644
index 0000000..95435f7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug48489/TestE.js
@@ -0,0 +1,10 @@
+package javadoc.testBug48489;
+import java.util.*;
+public class TestE {
+ /**
+ * Javadoc
+ */
+ public static void main(String[] args) {
+ System.out.println("Hello" + /* */ " world");
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug50898/G.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug50898/G.js
new file mode 100644
index 0000000..9c4e0a1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug50898/G.js
@@ -0,0 +1,4 @@
+package javadoc.testBug50898;
+public class G {
+ private static class Inner {}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug50898/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug50898/Test.js
new file mode 100644
index 0000000..608096b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug50898/Test.js
@@ -0,0 +1,8 @@
+package javadoc.testBug50898;
+public class Test {
+ /**
+ * @see G.Inner
+ */
+ public void foo() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51226/X1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51226/X1.js
new file mode 100644
index 0000000..a739d2d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51226/X1.js
@@ -0,0 +1,6 @@
+package javadoc.testBug51226;
+/*\u002A
+ * Test
+ */
+public class X1 {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51226/X2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51226/X2.js
new file mode 100644
index 0000000..bb73455
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51226/X2.js
@@ -0,0 +1,6 @@
+package javadoc.testBug51226;
+/\u002A*
+ * Test
+ */
+public class X2 {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51226/X3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51226/X3.js
new file mode 100644
index 0000000..c6fbacc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51226/X3.js
@@ -0,0 +1,6 @@
+package javadoc.testBug51226;
+\u002F**
+ * Test
+ */
+public class X3 {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51226/X4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51226/X4.js
new file mode 100644
index 0000000..31cbf2b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51226/X4.js
@@ -0,0 +1,6 @@
+package javadoc.testBug51226;
+/\u002A\u002A
+ \u002A Test
+ \u002A/
+public class X4 {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51226/X5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51226/X5.js
new file mode 100644
index 0000000..21af930
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51226/X5.js
@@ -0,0 +1,6 @@
+package javadoc.testBug51226;
+\u002F**
+ * Test
+ *\u002F
+public class X5 {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51226/X6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51226/X6.js
new file mode 100644
index 0000000..ab00ecf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51226/X6.js
@@ -0,0 +1,6 @@
+package javadoc.testBug51226;
+\u002F\u002A\u002A
+ \u002A Test
+ \u002A\u002F
+public class X6 {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51241/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51241/X.js
new file mode 100644
index 0000000..61e659f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51241/X.js
@@ -0,0 +1,20 @@
+package javadoc.testBug51241;
+public class X {
+ // First class line comment
+ int i;
+ // C1
+
+ void foo() {
+ int x;
+ // C2
+ int y;
+ // First method line comment
+ }
+ // Syntax error here!
+ int z
+
+ // Second class line comment
+ void bar() {
+ // Second method line comment
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51363/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51363/Test.js
new file mode 100644
index 0000000..f44c112
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51363/Test.js
@@ -0,0 +1,4 @@
+package javadoc.testBug51363;
+\u002F\u002FUnicode comment\u000D\u000Apublic class Test {
+ \u002F\u002FUnicode comment\u000Dvoid foo() {}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51476/X1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51476/X1.js
new file mode 100644
index 0000000..0c088be
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51476/X1.js
@@ -0,0 +1,7 @@
+package javadoc.testBug51476;
+/**
+ * @see "Test class X"
+ * @see <a href="http://www.ibm.com">Valid URL</a>
+ */
+public class X1 {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51476/X2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51476/X2.js
new file mode 100644
index 0000000..870032d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51476/X2.js
@@ -0,0 +1,6 @@
+package javadoc.testBug51476;
+/**
+ * @see "Test class X"
+ */
+public class X2 {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51476/X3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51476/X3.js
new file mode 100644
index 0000000..dd4eb94
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51476/X3.js
@@ -0,0 +1,6 @@
+package javadoc.testBug51476;
+/**
+ * @see <a href="http://www.ibm.com">Valid URL</a>
+ */
+public class X3 {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51478/X1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51478/X1.js
new file mode 100644
index 0000000..19b2152
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51478/X1.js
@@ -0,0 +1,7 @@
+package javadoc.testBug51478;
+/**
+ * {@inheritDoc}
+ * @deprecated
+ */
+public class X1 {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51478/X2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51478/X2.js
new file mode 100644
index 0000000..a10f8a2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51478/X2.js
@@ -0,0 +1,6 @@
+package javadoc.testBug51478;
+/**
+ * {@inheritDoc}
+ */
+public class X2 {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51478/X3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51478/X3.js
new file mode 100644
index 0000000..be6302e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51478/X3.js
@@ -0,0 +1,6 @@
+package javadoc.testBug51478;
+/**
+ * @deprecated
+ */
+public class X3 {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51508/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51508/X.js
new file mode 100644
index 0000000..054ce96
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51508/X.js
@@ -0,0 +1,7 @@
+package javadoc.testBug51508;
+/**
+ * @see java
+ * @see java.util
+ */
+public class X {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51600/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51600/Test.js
new file mode 100644
index 0000000..c1ed6c0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51600/Test.js
@@ -0,0 +1,17 @@
+package javadoc.testBug51600;
+public class Test {
+ /**
+ * @param str
+ * @param
+ * @param str
+ * @see
+ * @see
+ * @see #
+ * @see "Invalid
+ * @return String
+ * @return
+ * @return String
+ */
+ String foo(String str) { return ""; }
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51617/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51617/Test.js
new file mode 100644
index 0000000..89dbe0b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51617/Test.js
@@ -0,0 +1,10 @@
+package javadoc.testBug51617;
+public class Test {
+ /**
+ * Set in separated folder as we have an unbound reference...
+ * @exception e
+ * @param name The name to set
+ */
+ public void setName1(String name) {
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51650/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51650/X.js
new file mode 100644
index 0000000..90fc1cc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51650/X.js
@@ -0,0 +1,9 @@
+package javadoc.testBug51650;
+public class X {
+ /**
+ * @see Exception
+ * {@link Exception}
+ */
+ public void foo() {
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51660/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51660/Test.js
new file mode 100644
index 0000000..a05dc2a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51660/Test.js
@@ -0,0 +1,37 @@
+package javadoc.testBug51660;
+/**
+ * @ejb!bean test non-java id character '!' (val=33) in tag name
+ * @ejb"bean test non-java id character '"' (val=34) in tag name
+ * @ejb#bean test non-java id character '#' (val=35) in tag name
+ * @ejb%bean test non-java id character '%' (val=37) in tag name
+ * @ejb&bean test non-java id character '&' (val=38) in tag name
+ * @ejb'bean test non-java id character ''' (val=39) in tag name
+ * @ejb(bean test non-java id character '(' (val=40) in tag name
+ * @ejb)bean test non-java id character ')' (val=41) in tag name
+ * @ejb*bean test non-java id character '*' (val=42) in tag name
+ * @ejb+bean test non-java id character '+' (val=43) in tag name
+ * @ejb,bean test non-java id character ',' (val=44) in tag name
+ * @ejb-bean test non-java id character '-' (val=45) in tag name
+ * @ejb.bean test non-java id character '.' (val=46) in tag name
+ * @ejb/bean test non-java id character '/' (val=47) in tag name
+ * @ejb:bean test non-java id character ':' (val=58) in tag name
+ * @ejb;bean test non-java id character ';' (val=59) in tag name
+ * @ejb<bean test non-java id character '<' (val=60) in tag name
+ * @ejb=bean test non-java id character '=' (val=61) in tag name
+ * @ejb>bean test non-java id character '>' (val=62) in tag name
+ * @ejb?bean test non-java id character '?' (val=63) in tag name
+ * @ejb@bean test non-java id character '@' (val=64) in tag name
+ * @ejb[bean test non-java id character '[' (val=91) in tag name
+ * @ejb\bean test non-java id character '\' (val=92) in tag name
+ * @ejb]bean test non-java id character ']' (val=93) in tag name
+ * @ejb^bean test non-java id character '^' (val=94) in tag name
+ * @ejb`bean test non-java id character '`' (val=96) in tag name
+ * @ejb{bean test non-java id character '{' (val=123) in tag name
+ * @ejb|bean test non-java id character '|' (val=124) in tag name
+ * @ejb}bean test non-java id character '}' (val=125) in tag name
+ * @ejb~bean test non-java id character '~' (val=126) in tag name
+ * @unknown test java id
+ */
+public class Test {
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51770/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51770/X.js
new file mode 100644
index 0000000..704a06d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51770/X.js
@@ -0,0 +1,6 @@
+package javadoc.testBug51770;
+/**
+ * @see java.util.Vector
+ */
+public class X {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51911/TestInvalid.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51911/TestInvalid.js
new file mode 100644
index 0000000..7bb1639
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51911/TestInvalid.js
@@ -0,0 +1,8 @@
+package javadoc.testBug51911;
+/**
+ * @see #foo
+ */
+public class TestInvalid {
+ public void foo(int i, float f) {}
+ public void foo(String str) {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51911/TestValid1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51911/TestValid1.js
new file mode 100644
index 0000000..dd1e63f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51911/TestValid1.js
@@ -0,0 +1,8 @@
+package javadoc.testBug51911;
+/**
+ * @see #foo
+ */
+public class TestValid1 {
+ public int foo;
+ public void foo(String str) {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51911/TestValid2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51911/TestValid2.js
new file mode 100644
index 0000000..e8bd5e4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51911/TestValid2.js
@@ -0,0 +1,7 @@
+package javadoc.testBug51911;
+/**
+ * @see #foo
+ */
+public class TestValid2 {
+ public void foo(String str) {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51911/TestValid3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51911/TestValid3.js
new file mode 100644
index 0000000..ceafa1f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51911/TestValid3.js
@@ -0,0 +1,9 @@
+package javadoc.testBug51911;
+/**
+ * @see #foo
+ */
+public class TestValid3 {
+ public int foo;
+ public void foo() {}
+ public void foo(String str) {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug52908/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug52908/X.js
new file mode 100644
index 0000000..eec80f0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug52908/X.js
@@ -0,0 +1,47 @@
+package javadoc.testBug52908;
+public class X {
+ /**
+ * Text element starting with a
+ * { caused troubles in its position
+ * if the bug is not fixed
+ * @see Object
+ */
+ Object x1;
+ /**
+ * Text element ending with a }
+ * caused troubles in its position
+ * if the bug is not fixed
+ * @see Object
+ */
+ Object x2;
+ /**
+ * Text element starting with a
+ * } caused troubles in its position
+ * if the bug is not fixed
+ * @see Object
+ */
+ Object x3;
+ /**
+ * Text element ending with a {
+ * caused troubles in its position
+ * if the bug is not fixed
+ * @see Object
+ */
+ Object x4;
+ /**
+ * Text element starting with
+ * { and ending with }
+ * caused troubles in its position
+ * if the bug is not fixed
+ * @see Object
+ */
+ Object x6;
+ /**
+ * Text element starting with
+ * } and ending with {
+ * caused troubles in its position
+ * if the bug is not fixed
+ * @see Object
+ */
+ Object x7;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug52908/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug52908/Y.js
new file mode 100644
index 0000000..10f1fbb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug52908/Y.js
@@ -0,0 +1,14 @@
+package javadoc.testBug52908;
+public class Y {
+ /**
+ * while (true)
+ * {
+ * int token = scanner.getNextToken();
+ * if (token == ITerminalSymbols.TokenNameEOF) break;
+ * System.out.println(token + " : " + new String(scanner.getCurrentTokenSource()));
+ * }
+ * <pre>
+ * </pre>
+ */
+ void foo() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug52908a/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug52908a/Test.js
new file mode 100644
index 0000000..9fc34af
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug52908a/Test.js
@@ -0,0 +1,15 @@
+package javadoc.testBug52908a;
+import java.util.Vector;
+
+/**
+ * AST node for a parameter within a method reference ({@link Object}).
+ * These nodes only occur within doc comments ({@link Vector}).
+ * <pre>
+ * MethodRefParameter:
+ * Type [ Identifier ]
+ * </pre>
+ *
+ * @see Vector
+ * @since 3.0
+ */
+public class Test {}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug52908unicode/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug52908unicode/X.js
new file mode 100644
index 0000000..3885ff0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug52908unicode/X.js
@@ -0,0 +1,47 @@
+package javadoc.testBug52908unicode;
+public class X {
+ /**
+ * Text element starting with a
+ * \u007b caused troubles in its position
+ * if the bug is not fixed
+ * @see Object
+ */
+ Object x1;
+ /**
+ * Text element ending with a \u007d
+ * caused troubles in its position
+ * if the bug is not fixed
+ * @see Object
+ */
+ Object x2;
+ /**
+ * Text element starting with a
+ * \u007d caused troubles in its position
+ * if the bug is not fixed
+ * @see Object
+ */
+ Object x3;
+ /**
+ * Text element ending with a \u007b
+ * caused troubles in its position
+ * if the bug is not fixed
+ * @see Object
+ */
+ Object x4;
+ /**
+ * Text element starting with
+ * \u007b and ending with \u007d
+ * caused troubles in its position
+ * if the bug is not fixed
+ * @see Object
+ */
+ Object x6;
+ /**
+ * Text element starting with
+ * \u007d and ending with \u007b
+ * caused troubles in its position
+ * if the bug is not fixed
+ * @see Object
+ */
+ Object x7;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug52908unicode/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug52908unicode/Y.js
new file mode 100644
index 0000000..108dd7e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug52908unicode/Y.js
@@ -0,0 +1,14 @@
+package javadoc.testBug52908unicode;
+public class Y {
+ /**
+ * while (true)
+ * \u007b
+ * int token = scanner.getNextToken();
+ * if (token == ITerminalSymbols.TokenNameEOF) break;
+ * System.out.println(token + " : " + new String(scanner.getCurrentTokenSource()));
+ * \u007d
+ * <pre>
+ * </pre>
+ */
+ void foo() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug53075/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug53075/X.js
new file mode 100644
index 0000000..68b47ea
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug53075/X.js
@@ -0,0 +1,9 @@
+package javadoc.testBug53075;
+class X {
+/**
+ * @link aggregates
+ * [... some more ...]
+ * @linkplain plain aggregates
+ */
+void foo() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug53276/TestA.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug53276/TestA.js
new file mode 100644
index 0000000..00310d3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug53276/TestA.js
@@ -0,0 +1,15 @@
+package javadoc.testBug53276;
+public interface TestA {
+ /**
+ * Return the string specifying the pattern of this ignore. The string
+ * may include the wildcard characters '*' and '?'. If you wish to
+ * include either of these characters verbatim (i.e. you do not wish
+ * them to expand to wildcards), you must escape them with a backslash '\'.
+ * <p>
+ * If you are using string literals in Java to represent the patterns, don't
+ * forget escape characters are represented by "\\".
+ *
+ * @return the pattern represented by this ignore info
+ */
+ public String getPattern();
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug53276/TestB.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug53276/TestB.js
new file mode 100644
index 0000000..b8b71d0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug53276/TestB.js
@@ -0,0 +1,23 @@
+package javadoc.testBug53276;
+
+/**
+ * Handles a "Removed" response from the CVS server.
+ * <p>
+ * Suppose as a result of performing a command the CVS server responds
+ * as follows:<br>
+ * <pre>
+ * [...]
+ * Removed ??? \n
+ * [...]
+ * </pre>
+ * Then
+ * </p>
+ */
+
+/**
+ * It removes the file from both the entries of the parent-folder
+ * and from the local filesystem.
+ */
+public class TestB {
+}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug53276/TestC.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug53276/TestC.js
new file mode 100644
index 0000000..f848392
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug53276/TestC.js
@@ -0,0 +1,12 @@
+package javadoc.testBug53276;
+public class TestC {
+
+ /**
+ * Returns the progress monitor. It there is no progress monitor the monitor\
+ * is set to the <code>NullProgressMonitor</code>.
+ *
+ * @return the progress monitor
+ */
+ public Object foo() { return null; }
+}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug53757/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug53757/Test.js
new file mode 100644
index 0000000..9cde4f3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug53757/Test.js
@@ -0,0 +1,55 @@
+package javadoc.testBug53757;
+public class Test {
+ /**
+ * Test all grammar keywords
+ * @abstract = 60,
+ * @assert = 71,
+ * @boolean = 31,
+ * @break = 72,
+ * @byte = 32,
+ * @case = 83,
+ * @catch = 86,
+ * @char = 33,
+ * @class = 81,
+ * @continue = 73,
+ * @default = 84,
+ * @do = 74,
+ * @double = 34,
+ * @else = 87,
+ * @extends = 91,
+ * @false = 44,
+ * @final = 61,
+ * @finally = 88,
+ * @float = 35,
+ * @for = 75,
+ * @if = 76,
+ * @implements = 103,
+ * @import = 82,
+ * @instanceof = 13,
+ * @int = 36,
+ * @interface = 89,
+ * @long = 37,
+ * @native = 62,
+ * @new = 41,
+ * @null = 45,
+ * @package = 85,
+ * @private = 63,
+ * @protected = 64,
+ * @public = 65,
+ * @short = 38,
+ * @static = 57,
+ * @strictfp = 66,
+ * @super = 42,
+ * @switch = 78,
+ * @synchronized = 55,
+ * @this = 43,
+ * @throw = 79,
+ * @transient = 67,
+ * @true = 46,
+ * @try = 80,
+ * @void = 39,
+ * @volatile = 68,
+ * @while = 70,
+ */
+ void foo() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug54424/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug54424/Test.js
new file mode 100644
index 0000000..8ea97a7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug54424/Test.js
@@ -0,0 +1,25 @@
+package javadoc.testBug54424;
+import java.io.IOException;
+import java.util.AbstractList;
+
+public class Test {
+ /**
+ * @param
+ * @param tho {@link getList(int, long)}
+ * @version throwaway
+ * @param from 1st param of {@link A#getList(int, long, boolean) me}
+ * @see #getList(Object, java.util.AbstractList)
+ * @param from 2nd
+ * @see #getList(int from, tho long)
+ * @see #getList(int from, long tho)
+ * @param
+ * @return the list
+ * @see #getList(..)
+ * @param to
+ * @throws .IOException
+ * @deprecated
+ * @throws IOException.
+ * @todo it
+ */
+ public AbstractList getList(int from, long to) throws IOException {return null;}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug54776/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug54776/Test.js
new file mode 100644
index 0000000..7eb491c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug54776/Test.js
@@ -0,0 +1,9 @@
+package javadoc.testBug54776;
+public class Test {
+
+ private int field= /*]*/foo()/*[*/;
+
+ public int foo() {
+ return 1;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug55221/a/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug55221/a/Test.js
new file mode 100644
index 0000000..86466c4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug55221/a/Test.js
@@ -0,0 +1,18 @@
+package javadoc.testBug55221.a;
+public class Test {
+ public int bar() {
+ int x=0;
+ if (true) {
+ x=1;
+ } else {
+ x=2;
+ }
+ return x;
+ }
+ /**
+ * This comment should not be attached to previous method body!
+ * @return int
+ */
+
+ public int foo() { return 1; }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug55221/b/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug55221/b/Test.js
new file mode 100644
index 0000000..450028d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug55221/b/Test.js
@@ -0,0 +1,17 @@
+package javadoc.testBug55221.b;
+public class Test {
+ public int bar() {
+ int x=0;
+ if (true) {
+ x=1;
+ } else {
+ x=2;
+ }
+ return x;
+ } /**
+ * This comment should not be attached to previous method body!
+ * @return int
+ */
+
+ public int foo() { return 1; }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug55221/c/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug55221/c/Test.js
new file mode 100644
index 0000000..8e4efb8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug55221/c/Test.js
@@ -0,0 +1,16 @@
+package javadoc.testBug55221.c;
+public class Test {
+ public int bar() {
+ int x=0;
+ if (true) {
+ x=1;
+ } else {
+ x=2;
+ }
+ return x;
+ } /*
+ * This comment should not be attached to previous method body!
+ * @return int
+ */
+ public int foo() { return 1; }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug55221/d/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug55221/d/Test.js
new file mode 100644
index 0000000..7e58ec8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug55221/d/Test.js
@@ -0,0 +1,7 @@
+package javadoc.testBug55221.d;
+public class Test {
+ /**
+ * Javadoc comment
+ */// Line comment
+ boolean foo() { return false; }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug55223/TestA.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug55223/TestA.js
new file mode 100644
index 0000000..a38f38e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug55223/TestA.js
@@ -0,0 +1,6 @@
+package javadoc.testBug55223;
+public class TestA {
+ private void foo() {
+ foo();/* a */ foo(); /* b */ foo();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug55223/TestB.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug55223/TestB.js
new file mode 100644
index 0000000..ce9e2db
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug55223/TestB.js
@@ -0,0 +1,10 @@
+package javadoc.testBug55223;
+public class TestB {
+ /**
+ * Returns all of the filter elements of this shortcut as a List of String Pairs.
+ *
+ * @return all of the filter elements of this shortcut, or <code>null</code> if not
+ * specified
+ */
+ public /* <Pair> */ Object getFilters() { return null; }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug63044/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug63044/Test.js
new file mode 100644
index 0000000..5b01aa4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug63044/Test.js
@@ -0,0 +1,11 @@
+package javadoc.testBug63044;
+/**
+ * @see #Test()
+ * @see Test#Test()
+ * @see javadoc.testBug63044.Test#Test()
+ */
+public class Test{
+ Test( ){
+ new Test();
+ };
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug65174/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug65174/Test.js
new file mode 100644
index 0000000..3671075
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug65174/Test.js
@@ -0,0 +1,39 @@
+package javadoc.testBug65174;
+public class Test {
+ /**
+ * Comment with no error: {@link
+ * Object valid} because it's not on first line
+ */
+ void foo_ok() {}
+ /** Comment previously with error: {@link
+ * Object valid} because tag is on comment very first line
+ */
+ void foo_ko() {}
+ /**
+ * Comment with no error: {@link
+ * Object valid} because it's not on first line
+ */
+ void fooA_ok() {}
+ /** Comment previously with error: {@link
+ * Object valid} because tag is on comment very first line
+ */
+ void fooA_ko() {}
+ /**
+ * Comment with no error: {@link java.lang.
+ * Object valid} because it's not on first line
+ */
+ void fooB_ok() {}
+ /** Comment previously with error: {@link java.lang.
+ * Object valid} because tag is on comment very first line
+ */
+ void fooB_ko() {}
+ /**
+ * Comment with no error: {@link Object
+ * valid} because it's not on first line
+ */
+ void fooC_ok() {}
+ /** Comment previously with error: {@link Object
+ * valid} because tag is on comment very first line
+ */
+ void fooC_ko() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug65253/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug65253/Test.js
new file mode 100644
index 0000000..1c122b0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug65253/Test.js
@@ -0,0 +1,15 @@
+package javadoc.testBug65253;
+/**
+ * Comment
+ * @@@@see Unknown Should not complain on ref
+ */
+public class Test {
+ /**
+ * Comment
+ * @@@param xxx Should not complain on param
+ * @@return int Should not be '@return' tag element
+ */
+ int foo() { // should warn on missing tag for return type
+ return 0;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug65253/TestD.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug65253/TestD.js
new file mode 100644
index 0000000..53ff22a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug65253/TestD.js
@@ -0,0 +1,21 @@
+package javadoc.testBug65253;
+public class TestD {
+ /** Comment previously with no error: {@link Object valid} comment on one line */
+ void foo1() {}
+ /** Comment previously with no error: {@link Object valid} */
+ void foo2() {}
+ /** Comment previously with no error: {@link Object valid}*/
+ void foo3() {}
+ /** {@link Object valid} comment on one line */
+ void foo4() {}
+ /**{@link Object valid} comment on one line */
+ void foo5() {}
+ /** {@link Object valid} */
+ void foo6() {}
+ /**{@link Object valid} */
+ void foo7() {}
+ /** {@link Object valid}*/
+ void foo8() {}
+ /**{@link Object valid}*/
+ void foo9() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug65288/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug65288/Test.js
new file mode 100644
index 0000000..5580f9a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug65288/Test.js
@@ -0,0 +1,7 @@
+package javadoc.testBug65288;
+/**
+ * @see
+ * @see*/
+public class Test {
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68017/TestInvalid.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68017/TestInvalid.js
new file mode 100644
index 0000000..a9fba86
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68017/TestInvalid.js
@@ -0,0 +1,13 @@
+package javadoc.testBug68017;
+public class TestInvalid {
+ /**@return*/
+ public int foo1() {return 0; }
+ /**@return */
+ public int foo2() {return 0; }
+ /**@return****/
+ public int foo3() {return 0; }
+ /**
+ * @return
+ */
+ public int foo4() {return 0; }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68017/TestValid.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68017/TestValid.js
new file mode 100644
index 0000000..774a4a4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68017/TestValid.js
@@ -0,0 +1,9 @@
+package javadoc.testBug68017;
+public class TestValid {
+ /**@return integer*/
+ public int foo1() {return 0; }
+ /**
+ * @return #
+ */
+ public int foo2() {return 0; }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68017/TestWarn1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68017/TestWarn1.js
new file mode 100644
index 0000000..d6d1b6b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68017/TestWarn1.js
@@ -0,0 +1,8 @@
+package javadoc.testBug68017;
+public class TestWarn1 {
+ /**
+ * @return* */
+ public int foo1() {return 0; }
+ /**@return** **/
+ public int foo2() {return 0; }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68017/TestWarn2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68017/TestWarn2.js
new file mode 100644
index 0000000..40583a8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68017/TestWarn2.js
@@ -0,0 +1,7 @@
+package javadoc.testBug68017;
+public class TestWarn2 {
+ /**
+ * @return#
+ */
+ public int foo() {return 0; }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68025/TestA.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68025/TestA.js
new file mode 100644
index 0000000..1eec4d8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68025/TestA.js
@@ -0,0 +1,12 @@
+
+package javadoc.testBug68025;
+public class TestA {
+
+ /**
+ * @see IJavaElement#getElementName#bug
+ * or closer to the reality (COPY is a constant):
+ * @see org.eclipse.ui.actions.ActionFactory#COPY#getId
+ */
+ void foo() {
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68025/TestB.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68025/TestB.js
new file mode 100644
index 0000000..78b6067
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68025/TestB.js
@@ -0,0 +1,17 @@
+package javadoc.testBug68025;
+public class TestB {
+ public int field;
+ public void foo() {}
+ /**
+ * @see #field#invalid
+ * @see #foo#invalid
+ */
+ public void foo1() {}
+ /**@see Y#field# invalid*/
+ public void foo2() {}
+ /**@see Y#foo# invalid*/
+ public void foo3() {}
+ /**@see Y#foo()#
+ *valid*/
+ public void foo4() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68726/TestBug68726conform1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68726/TestBug68726conform1.js
new file mode 100644
index 0000000..ff54e3e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68726/TestBug68726conform1.js
@@ -0,0 +1,9 @@
+package javadoc.testBug68726;
+public class TestBug68726conform1 {
+ /**
+ * @see Object <a href="http://www.eclipse.org" target="_top">Eclipse</a>
+ */
+ void foo1() {}
+ /**@see Object <a href="http://www.eclipse.org" target="_top" target1="_top1" target2="_top2">Eclipse</a>*/
+ void foo2() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68726/TestBug68726conform2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68726/TestBug68726conform2.js
new file mode 100644
index 0000000..08a41c5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68726/TestBug68726conform2.js
@@ -0,0 +1,20 @@
+package javadoc.testBug68726;
+/**
+ * @see <a href="http:/www.ibm.com" target="_top">IBM Home Page</a>
+ * @see <a href="http:/www.ibm.com" target="_top">
+ * IBM Home Page</a>
+ * @see <a href="http:/www.ibm.com" target="_top">
+ * IBM Home Page
+ * </a>
+ * @see <a href="http:/www.ibm.com" target="_top">
+ *
+ * IBM
+ *
+ * Home Page
+ *
+ *
+ * </a>
+ * @see Object
+ */
+public class TestBug68726conform2 {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68726/TestBug68726negative1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68726/TestBug68726negative1.js
new file mode 100644
index 0000000..ddc920a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68726/TestBug68726negative1.js
@@ -0,0 +1,21 @@
+package javadoc.testBug68726;
+public class TestBug68726negative1 {
+ /**
+ * Invalid URL link references
+ *
+ * @see <a href="invalid" target
+ * @see <a href="invalid" target=
+ * @see <a href="invalid" target="
+ * @see <a href="invalid" target="_top
+ * @see <a href="invalid" target="_top"
+ * @see <a href="invalid" target="_top">
+ * @see <a href="invalid" target="_top">
+ * @see <a href="invalid" target="_top">invalid
+ * @see <a href="invalid" target="_top">invalid<
+ * @see <a href="invalid" target="_top">invalid</
+ * @see <a href="invalid" target="_top">invalid</a
+ * @see <a href="invalid" target="_top">invalid</a> no text allowed after the href
+ */
+ public void s_foo() {
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68726/TestBug68726negative2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68726/TestBug68726negative2.js
new file mode 100644
index 0000000..52bf42e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68726/TestBug68726negative2.js
@@ -0,0 +1,20 @@
+package javadoc.testBug68726;
+/**
+ * @see <a href="http:/www.ibm.com" target="_top">IBM Home Page
+ * @see <a href="http:/www.ibm.com" target="_top">
+ * IBM Home Page
+ * @see <a href="http:/www.ibm.com" target="_top">
+ * IBM Home Page<
+ * /a>
+ * @see <a href="http:/www.ibm.com" target="_top">
+ *
+ * IBM
+ *
+ * Home Page
+ *
+ *
+ *
+ * @see Unknown Unknown reference
+ */
+public class TestBug68726negative2 {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69272/TestClassInvalid.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69272/TestClassInvalid.js
new file mode 100644
index 0000000..f71d846
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69272/TestClassInvalid.js
@@ -0,0 +1,10 @@
+package javadoc.testBug69272;
+public class TestClassInvalid {
+ /**@see Object* */
+ public void foo1() {}
+ /**@see Object*** ***/
+ public void foo2() {}
+ /**@see Object***
+ */
+ public void foo3() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69272/TestClassValid.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69272/TestClassValid.js
new file mode 100644
index 0000000..b12529a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69272/TestClassValid.js
@@ -0,0 +1,14 @@
+package javadoc.testBug69272;
+public class TestClassValid {
+ /**@see Object*/
+ public void foo1() {}
+ /**@see Object
+ */
+ public void foo2() {}
+ /**@see Object */
+ public void foo3() {}
+ /**@see Object****/
+ public void foo4() {}
+ /**@see Object ****/
+ public void foo5() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69272/TestFieldInvalid.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69272/TestFieldInvalid.js
new file mode 100644
index 0000000..941233e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69272/TestFieldInvalid.js
@@ -0,0 +1,11 @@
+package javadoc.testBug69272;
+public class TestFieldInvalid {
+ int field;
+ /**@see #field* */
+ public void foo1() {}
+ /**@see #field*** ***/
+ public void foo2() {}
+ /**@see #field***
+ */
+ public void foo3() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69272/TestFieldValid.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69272/TestFieldValid.js
new file mode 100644
index 0000000..136a357
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69272/TestFieldValid.js
@@ -0,0 +1,15 @@
+package javadoc.testBug69272;
+public class TestFieldValid {
+ int field;
+ /**@see #field*/
+ public void foo1() {}
+ /**@see #field
+ */
+ public void foo2() {}
+ /**@see #field */
+ public void foo3() {}
+ /**@see #field****/
+ public void foo4() {}
+ /**@see #field ********/
+ public void foo5() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69272/TestMethInvalid.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69272/TestMethInvalid.js
new file mode 100644
index 0000000..4b3a9a3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69272/TestMethInvalid.js
@@ -0,0 +1,10 @@
+package javadoc.testBug69272;
+public class TestMethInvalid {
+ /**@see Object#wait()* */
+ public void foo1() {}
+ /**@see Object#wait()*** ***/
+ public void foo2() {}
+ /**@see Object#wait()***
+ */
+ public void foo3() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69272/TestMethValid.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69272/TestMethValid.js
new file mode 100644
index 0000000..e2aae08
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69272/TestMethValid.js
@@ -0,0 +1,14 @@
+package javadoc.testBug69272;
+public class TestMethValid {
+ /**@see Object#wait()*/
+ public void foo1() {}
+ /**@see Object#wait()
+ */
+ public void foo2() {}
+ /**@see Object#wait() */
+ public void foo3() {}
+ /**@see Object#wait()****/
+ public void foo4() {}
+ /**@see Object#wait() ****/
+ public void foo5() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69275/TestA.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69275/TestA.js
new file mode 100644
index 0000000..9c61f01
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69275/TestA.js
@@ -0,0 +1,14 @@
+package javadoc.testBug69275;
+public class TestA {
+ /**@see <a href="http://www.eclipse.org">text</a>*/
+ void foo1() {}
+ /**@see <a href="http://www.eclipse.org">text</a>
+ */
+ void foo2() {}
+ /**@see <a href="http://www.eclipse.org">text</a> */
+ void foo3() {}
+ /**@see <a href="http://www.eclipse.org">text</a>**/
+ void foo4() {}
+ /**@see <a href="http://www.eclipse.org">text</a> *****/
+ void foo5() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69275/TestB.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69275/TestB.js
new file mode 100644
index 0000000..4fa5a31
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69275/TestB.js
@@ -0,0 +1,10 @@
+package javadoc.testBug69275;
+public class TestA {
+ /**@see <a href="http://www.eclipse.org">text</a>* */
+ void foo1() {}
+ /**@see <a href="http://www.eclipse.org">text</a> *** **/
+ void foo2() {}
+ /**@see <a href="http://www.eclipse.org">text</a>***
+ */
+ void foo3() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69302/TestInvalid.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69302/TestInvalid.js
new file mode 100644
index 0000000..aca089e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69302/TestInvalid.js
@@ -0,0 +1,7 @@
+package javadoc.testBug69302;
+public class TestInvalid {
+ /**@see Unknown Unknown reference <a href="http://www.eclipse.org">text</a>*/
+ void foo1() {}
+ /**@see Unknown Unknown reference "Valid string reference"*/
+ void foo2() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69302/TestValid1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69302/TestValid1.js
new file mode 100644
index 0000000..3a017ea
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69302/TestValid1.js
@@ -0,0 +1,12 @@
+package javadoc.testBug69302;
+public class TestValid1 {
+ /**
+ * @see Object <a href="http://www.eclipse.org">Eclipse</a>
+ */
+ void foo1() {}
+ /**
+ * @see Object "Valid string reference"
+ */
+ void foo2() {}
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69302/TestValid2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69302/TestValid2.js
new file mode 100644
index 0000000..e522272
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69302/TestValid2.js
@@ -0,0 +1,11 @@
+package javadoc.testBug69302;
+public class TestValid2 {
+ /**
+ * @see Unknown <a href="http://www.eclipse.org">Unknown</a>
+ */
+ void foo1() {}
+ /**
+ * @see Unknown "Valid Unknown reference"
+ */
+ void foo2() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug70892/TestInvalid1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug70892/TestInvalid1.js
new file mode 100644
index 0000000..6547aa7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug70892/TestInvalid1.js
@@ -0,0 +1,12 @@
+package javadoc.testBug70892;
+/**
+ * {@value "invalid"}
+ * {@value <a href="invalid">invalid</a>} invalid
+ * {@value #field}
+ * {@value #foo}
+ * {@value #foo()}
+ */
+public class TestInvalid1 {
+ int field;
+ void foo() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug70892/TestInvalid2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug70892/TestInvalid2.js
new file mode 100644
index 0000000..6ace3b1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug70892/TestInvalid2.js
@@ -0,0 +1,12 @@
+package javadoc.testBug70892;
+/**
+ * {@value "invalid}
+ * {@value <a href}
+ * {@value <a href="invalid">invalid</a} invalid
+ * {@value #xxx Unknown}
+ * {@value #xxx() Unknown}
+ */
+public class TestInvalid2 {
+ int field;
+ void foo() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug70892/TestValid.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug70892/TestValid.js
new file mode 100644
index 0000000..fe38fff
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug70892/TestValid.js
@@ -0,0 +1,9 @@
+package javadoc.testBug70892;
+/**
+ * {@value}
+ * {@value }
+ * {@value #field}
+ */
+public class TestValid {
+ static int field;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug73348/TestInvalid.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug73348/TestInvalid.js
new file mode 100644
index 0000000..2f36a5d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug73348/TestInvalid.js
@@ -0,0 +1,14 @@
+package javadoc.testBug73348;
+
+public class TestInvalid {
+ /**
+ * @return
+ * @see Object
+ */
+ public int foo1(int x) {return 0; }
+ /**
+ * @return
+ * @see Object
+ */
+ public int foo2(int x) {return 0; }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug73348/TestValid.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug73348/TestValid.js
new file mode 100644
index 0000000..d5b89f1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug73348/TestValid.js
@@ -0,0 +1,14 @@
+package javadoc.testBug73348;
+public class TestValid {
+ /**
+ * @return
+ * int
+ */
+ public int foo1() {return 0; }
+ /**
+ * @return
+ * int
+ * @see Object
+ */
+ public int foo2() {return 0; }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug77644/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug77644/A.js
new file mode 100644
index 0000000..a263904
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug77644/A.js
@@ -0,0 +1,7 @@
+public class A {
+ int x;
+ void foo(boolean b) {
+ if (b)
+ x = 1; // comment
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug77644/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug77644/B.js
new file mode 100644
index 0000000..5d8cfe8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug77644/B.js
@@ -0,0 +1,13 @@
+public class B {
+ private void computeDocumentNames(String[] onDiskNames, int[] positions, Object indexedDocuments) {
+ int onDiskLength = onDiskNames.length;
+ Object[] docNames = new Object[0];
+ Object[] referenceTables = new Object[1];
+ if (onDiskLength == 0) {
+ // disk index was empty, so add every indexed document
+ for (int i = 0, l = referenceTables.length; i < l; i++)
+ if (referenceTables[i] != null)
+ indexedDocuments.equals(null); // remember each new document
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug77644/C.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug77644/C.js
new file mode 100644
index 0000000..2003344
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug77644/C.js
@@ -0,0 +1,16 @@
+public class C {
+ Object pipeIn;
+
+ public String foo() {
+ if (pipeIn == null)
+ getReader(); // spawn parsing thread
+ return "ok";
+ }
+
+ public String bar() {
+ if (pipeIn == null)
+ getReader(); // spawn parsing thread
+ return "ok";
+ }
+ void getReader() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/awtui/AboutDialog.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/awtui/AboutDialog.js
new file mode 100644
index 0000000..021d078
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/awtui/AboutDialog.js
@@ -0,0 +1,67 @@
+package junit.awtui;
+
+import java.awt.*;
+import java.awt.event.*;
+
+import junit.runner.Version;
+
+class AboutDialog extends Dialog {
+ public AboutDialog(Frame parent) {
+ super(parent);
+
+ setResizable(false);
+ setLayout(new GridBagLayout());
+ setSize(330, 138);
+ setTitle("About");
+
+ Button button= new Button("Close");
+ button.addActionListener(
+ new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ dispose();
+ }
+ }
+ );
+
+ Label label1= new Label("JUnit");
+ label1.setFont(new Font("dialog", Font.PLAIN, 36));
+
+ Label label2= new Label("JUnit "+Version.id()+ " by Kent Beck and Erich Gamma");
+ label2.setFont(new Font("dialog", Font.PLAIN, 14));
+
+ Logo logo= new Logo();
+
+ GridBagConstraints constraintsLabel1= new GridBagConstraints();
+ constraintsLabel1.gridx = 3; constraintsLabel1.gridy = 0;
+ constraintsLabel1.gridwidth = 1; constraintsLabel1.gridheight = 1;
+ constraintsLabel1.anchor = GridBagConstraints.CENTER;
+ add(label1, constraintsLabel1);
+
+ GridBagConstraints constraintsLabel2= new GridBagConstraints();
+ constraintsLabel2.gridx = 2; constraintsLabel2.gridy = 1;
+ constraintsLabel2.gridwidth = 2; constraintsLabel2.gridheight = 1;
+ constraintsLabel2.anchor = GridBagConstraints.CENTER;
+ add(label2, constraintsLabel2);
+
+ GridBagConstraints constraintsButton1= new GridBagConstraints();
+ constraintsButton1.gridx = 2; constraintsButton1.gridy = 2;
+ constraintsButton1.gridwidth = 2; constraintsButton1.gridheight = 1;
+ constraintsButton1.anchor = GridBagConstraints.CENTER;
+ constraintsButton1.insets= new Insets(8, 0, 8, 0);
+ add(button, constraintsButton1);
+
+ GridBagConstraints constraintsLogo1= new GridBagConstraints();
+ constraintsLogo1.gridx = 2; constraintsLogo1.gridy = 0;
+ constraintsLogo1.gridwidth = 1; constraintsLogo1.gridheight = 1;
+ constraintsLogo1.anchor = GridBagConstraints.CENTER;
+ add(logo, constraintsLogo1);
+
+ addWindowListener(
+ new WindowAdapter() {
+ public void windowClosing(WindowEvent e) {
+ dispose();
+ }
+ }
+ );
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/awtui/Logo.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/awtui/Logo.js
new file mode 100644
index 0000000..e9dde2f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/awtui/Logo.js
@@ -0,0 +1,53 @@
+package junit.awtui;
+
+import java.awt.*;
+import java.awt.image.*;
+import java.net.URL;
+
+import junit.runner.BaseTestRunner;
+
+public class Logo extends Canvas {
+ private Image fImage;
+ private int fWidth;
+ private int fHeight;
+
+ public Logo() {
+ fImage= loadImage("logo.gif");
+ MediaTracker tracker= new MediaTracker(this);
+ tracker.addImage(fImage, 0);
+ try {
+ tracker.waitForAll();
+ } catch (Exception e) {
+ }
+
+ if (fImage != null) {
+ fWidth= fImage.getWidth(this);
+ fHeight= fImage.getHeight(this);
+ } else {
+ fWidth= 20;
+ fHeight= 20;
+ }
+ setSize(fWidth, fHeight);
+ }
+
+ public Image loadImage(String name) {
+ Toolkit toolkit= Toolkit.getDefaultToolkit();
+ try {
+ URL url= BaseTestRunner.class.getResource(name);
+ return toolkit.createImage((ImageProducer) url.getContent());
+ } catch (Exception ex) {
+ }
+ return null;
+ }
+
+ public void paint(Graphics g) {
+ paintBackground(g);
+ if (fImage != null)
+ g.drawImage(fImage, 0, 0, fWidth, fHeight, this);
+ }
+
+ public void paintBackground( java.awt.Graphics g) {
+ g.setColor(SystemColor.control);
+ g.fillRect(0, 0, getBounds().width, getBounds().height);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/awtui/ProgressBar.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/awtui/ProgressBar.js
new file mode 100644
index 0000000..0c4a419
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/awtui/ProgressBar.js
@@ -0,0 +1,84 @@
+package junit.awtui;
+
+import java.awt.*;
+
+public class ProgressBar extends Canvas {
+ public boolean fError= false;
+ public int fTotal= 0;
+ public int fProgress= 0;
+ public int fProgressX= 0;
+
+ public ProgressBar() {
+ super();
+ setSize(20, 30);
+ }
+
+ private Color getStatusColor() {
+ if (fError)
+ return Color.red;
+ return Color.green;
+ }
+
+ public void paint(Graphics g) {
+ paintBackground(g);
+ paintStatus(g);
+ }
+
+ public void paintBackground(Graphics g) {
+ g.setColor(SystemColor.control);
+ Rectangle r= getBounds();
+ g.fillRect(0, 0, r.width, r.height);
+ g.setColor(Color.darkGray);
+ g.drawLine(0, 0, r.width-1, 0);
+ g.drawLine(0, 0, 0, r.height-1);
+ g.setColor(Color.white);
+ g.drawLine(r.width-1, 0, r.width-1, r.height-1);
+ g.drawLine(0, r.height-1, r.width-1, r.height-1);
+ }
+
+ public void paintStatus(Graphics g) {
+ g.setColor(getStatusColor());
+ Rectangle r= new Rectangle(0, 0, fProgressX, getBounds().height);
+ g.fillRect(1, 1, r.width-1, r.height-2);
+ }
+
+ private void paintStep(int startX, int endX) {
+ repaint(startX, 1, endX-startX, getBounds().height-2);
+ }
+
+ public void reset() {
+ fProgressX= 1;
+ fProgress= 0;
+ fError= false;
+ paint(getGraphics());
+ }
+
+ public int scale(int value) {
+ if (fTotal > 0)
+ return Math.max(1, value*(getBounds().width-1)/fTotal);
+ return value;
+ }
+
+ public void setBounds(int x, int y, int w, int h) {
+ super.setBounds(x, y, w, h);
+ fProgressX= scale(fProgress);
+ }
+
+ public void start(int total) {
+ fTotal= total;
+ reset();
+ }
+
+ public void step(boolean successful) {
+ fProgress++;
+ int x= fProgressX;
+
+ fProgressX= scale(fProgress);
+
+ if (!fError && !successful) {
+ fError= true;
+ x= 1;
+ }
+ paintStep(x, fProgressX);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/awtui/TestRunner.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/awtui/TestRunner.js
new file mode 100644
index 0000000..741bbb4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/awtui/TestRunner.js
@@ -0,0 +1,539 @@
+package junit.awtui;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.awt.image.ImageProducer;
+import java.util.Vector;
+
+import junit.framework.*;
+import junit.runner.*;
+
+/**
+ * An AWT based user interface to run tests.
+ * Enter the name of a class which either provides a static
+ * suite method or is a subclass of TestCase.
+ * <pre>
+ * Synopsis: java junit.awtui.TestRunner [-noloading] [TestCase]
+ * </pre>
+ * TestRunner takes as an optional argument the name of the testcase class to be run.
+ */
+ public class TestRunner extends BaseTestRunner {
+ protected Frame fFrame;
+ protected Vector fExceptions;
+ protected Vector fFailedTests;
+ protected Thread fRunner;
+ protected TestResult fTestResult;
+
+ protected TextArea fTraceArea;
+ protected TextField fSuiteField;
+ protected Button fRun;
+ protected ProgressBar fProgressIndicator;
+ protected List fFailureList;
+ protected Logo fLogo;
+ protected Label fNumberOfErrors;
+ protected Label fNumberOfFailures;
+ protected Label fNumberOfRuns;
+ protected Button fQuitButton;
+ protected Button fRerunButton;
+ protected TextField fStatusLine;
+ protected Checkbox fUseLoadingRunner;
+
+ protected static final Font PLAIN_FONT= new Font("dialog", Font.PLAIN, 12);
+ private static final int GAP= 4;
+
+ public TestRunner() {
+ }
+
+ private void about() {
+ AboutDialog about= new AboutDialog(fFrame);
+ about.setModal(true);
+ about.setLocation(300, 300);
+ about.setVisible(true);
+ }
+
+ public void testStarted(String testName) {
+ showInfo("Running: "+testName);
+ }
+
+ public void testEnded(String testName) {
+ setLabelValue(fNumberOfRuns, fTestResult.runCount());
+ synchronized(this) {
+ fProgressIndicator.step(fTestResult.wasSuccessful());
+ }
+ }
+
+ public void testFailed(int status, Test test, Throwable t) {
+ switch (status) {
+ case TestRunListener.STATUS_ERROR:
+ fNumberOfErrors.setText(Integer.toString(fTestResult.errorCount()));
+ appendFailure("Error", test, t);
+ break;
+ case TestRunListener.STATUS_FAILURE:
+ fNumberOfFailures.setText(Integer.toString(fTestResult.failureCount()));
+ appendFailure("Failure", test, t);
+ break;
+ }
+ }
+
+ protected void addGrid(Panel p, Component co, int x, int y, int w, int fill, double wx, int anchor) {
+ GridBagConstraints c= new GridBagConstraints();
+ c.gridx= x; c.gridy= y;
+ c.gridwidth= w;
+ c.anchor= anchor;
+ c.weightx= wx;
+ c.fill= fill;
+ if (fill == GridBagConstraints.BOTH || fill == GridBagConstraints.VERTICAL)
+ c.weighty= 1.0;
+ c.insets= new Insets(y == 0 ? GAP : 0, x == 0 ? GAP : 0, GAP, GAP);
+ p.add(co, c);
+ }
+
+ private void appendFailure(String kind, Test test, Throwable t) {
+ kind+= ": " + test;
+ String msg= t.getMessage();
+ if (msg != null) {
+ kind+= ":" + truncate(msg);
+ }
+ fFailureList.add(kind);
+ fExceptions.addElement(t);
+ fFailedTests.addElement(test);
+ if (fFailureList.getItemCount() == 1) {
+ fFailureList.select(0);
+ failureSelected();
+ }
+ }
+ /**
+ * Creates the JUnit menu. Clients override this
+ * method to add additional menu items.
+ */
+ protected Menu createJUnitMenu() {
+ Menu menu= new Menu("JUnit");
+ MenuItem mi= new MenuItem("About...");
+ mi.addActionListener(
+ new ActionListener() {
+ public void actionPerformed(ActionEvent event) {
+ about();
+ }
+ }
+ );
+ menu.add(mi);
+
+ menu.addSeparator();
+ mi= new MenuItem("Exit");
+ mi.addActionListener(
+ new ActionListener() {
+ public void actionPerformed(ActionEvent event) {
+ System.exit(0);
+ }
+ }
+ );
+ menu.add(mi);
+ return menu;
+ }
+
+ protected void createMenus(MenuBar mb) {
+ mb.add(createJUnitMenu());
+ }
+ protected TestResult createTestResult() {
+ return new TestResult();
+ }
+
+ protected Frame createUI(String suiteName) {
+ Frame frame= new Frame("JUnit");
+ Image icon= loadFrameIcon();
+ if (icon != null)
+ frame.setIconImage(icon);
+
+ frame.setLayout(new BorderLayout(0, 0));
+ frame.setBackground(SystemColor.control);
+ final Frame finalFrame= frame;
+
+ frame.addWindowListener(
+ new WindowAdapter() {
+ public void windowClosing(WindowEvent e) {
+ finalFrame.dispose();
+ System.exit(0);
+ }
+ }
+ );
+
+ MenuBar mb = new MenuBar();
+ createMenus(mb);
+ frame.setMenuBar(mb);
+
+ //---- first section
+ Label suiteLabel= new Label("Test class name:");
+
+ fSuiteField= new TextField(suiteName != null ? suiteName : "");
+ fSuiteField.selectAll();
+ fSuiteField.requestFocus();
+ fSuiteField.setFont(PLAIN_FONT);
+ fSuiteField.setColumns(40);
+ fSuiteField.addActionListener(
+ new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ runSuite();
+ }
+ }
+ );
+ fSuiteField.addTextListener(
+ new TextListener() {
+ public void textValueChanged(TextEvent e) {
+ fRun.setEnabled(fSuiteField.getText().length() > 0);
+ fStatusLine.setText("");
+ }
+ }
+ );
+ fRun= new Button("Run");
+ fRun.setEnabled(false);
+ fRun.addActionListener(
+ new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ runSuite();
+ }
+ }
+ );
+ boolean useLoader= useReloadingTestSuiteLoader();
+ fUseLoadingRunner= new Checkbox("Reload classes every run", useLoader);
+ if (inVAJava())
+ fUseLoadingRunner.setVisible(false);
+
+ //---- second section
+ fProgressIndicator= new ProgressBar();
+
+ //---- third section
+ fNumberOfErrors= new Label("0000", Label.RIGHT);
+ fNumberOfErrors.setText("0");
+ fNumberOfErrors.setFont(PLAIN_FONT);
+
+ fNumberOfFailures= new Label("0000", Label.RIGHT);
+ fNumberOfFailures.setText("0");
+ fNumberOfFailures.setFont(PLAIN_FONT);
+
+ fNumberOfRuns= new Label("0000", Label.RIGHT);
+ fNumberOfRuns.setText("0");
+ fNumberOfRuns.setFont(PLAIN_FONT);
+
+ Panel numbersPanel= createCounterPanel();
+
+ //---- fourth section
+ Label failureLabel= new Label("Errors and Failures:");
+
+ fFailureList= new List(5);
+ fFailureList.addItemListener(
+ new ItemListener() {
+ public void itemStateChanged(ItemEvent e) {
+ failureSelected();
+ }
+ }
+ );
+ fRerunButton= new Button("Run");
+ fRerunButton.setEnabled(false);
+ fRerunButton.addActionListener(
+ new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ rerun();
+ }
+ }
+ );
+
+ Panel failedPanel= new Panel(new GridLayout(0, 1, 0, 2));
+ failedPanel.add(fRerunButton);
+
+ fTraceArea= new TextArea();
+ fTraceArea.setRows(5);
+ fTraceArea.setColumns(60);
+
+ //---- fifth section
+ fStatusLine= new TextField();
+ fStatusLine.setFont(PLAIN_FONT);
+ fStatusLine.setEditable(false);
+ fStatusLine.setForeground(Color.red);
+
+ fQuitButton= new Button("Exit");
+ fQuitButton.addActionListener(
+ new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ System.exit(0);
+ }
+ }
+ );
+
+ // ---------
+ fLogo= new Logo();
+
+ //---- overall layout
+ Panel panel= new Panel(new GridBagLayout());
+
+ addGrid(panel, suiteLabel, 0, 0, 2, GridBagConstraints.HORIZONTAL, 1.0, GridBagConstraints.WEST);
+
+ addGrid(panel, fSuiteField, 0, 1, 2, GridBagConstraints.HORIZONTAL, 1.0, GridBagConstraints.WEST);
+ addGrid(panel, fRun, 2, 1, 1, GridBagConstraints.HORIZONTAL, 0.0, GridBagConstraints.CENTER);
+ addGrid(panel, fUseLoadingRunner, 0, 2, 2, GridBagConstraints.NONE, 1.0, GridBagConstraints.WEST);
+ addGrid(panel, fProgressIndicator, 0, 3, 2, GridBagConstraints.HORIZONTAL, 1.0, GridBagConstraints.WEST);
+ addGrid(panel, fLogo, 2, 3, 1, GridBagConstraints.NONE, 0.0, GridBagConstraints.NORTH);
+
+ addGrid(panel, numbersPanel, 0, 4, 2, GridBagConstraints.NONE, 0.0, GridBagConstraints.WEST);
+
+ addGrid(panel, failureLabel, 0, 5, 2, GridBagConstraints.HORIZONTAL, 1.0, GridBagConstraints.WEST);
+ addGrid(panel, fFailureList, 0, 6, 2, GridBagConstraints.BOTH, 1.0, GridBagConstraints.WEST);
+ addGrid(panel, failedPanel, 2, 6, 1, GridBagConstraints.HORIZONTAL, 0.0, GridBagConstraints.CENTER);
+ addGrid(panel, fTraceArea, 0, 7, 2, GridBagConstraints.BOTH, 1.0, GridBagConstraints.WEST);
+
+ addGrid(panel, fStatusLine, 0, 8, 2, GridBagConstraints.HORIZONTAL, 1.0, GridBagConstraints.CENTER);
+ addGrid(panel, fQuitButton, 2, 8, 1, GridBagConstraints.HORIZONTAL, 0.0, GridBagConstraints.CENTER);
+
+ frame.add(panel, BorderLayout.CENTER);
+ frame.pack();
+ return frame;
+ }
+
+ protected Panel createCounterPanel() {
+ Panel numbersPanel= new Panel(new GridBagLayout());
+ addToCounterPanel(
+ numbersPanel,
+ new Label("Runs:"),
+ 0, 0, 1, 1, 0.0, 0.0,
+ GridBagConstraints.CENTER, GridBagConstraints.NONE,
+ new Insets(0, 0, 0, 0)
+ );
+ addToCounterPanel(
+ numbersPanel,
+ fNumberOfRuns,
+ 1, 0, 1, 1, 0.33, 0.0,
+ GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL,
+ new Insets(0, 8, 0, 40)
+ );
+ addToCounterPanel(
+ numbersPanel,
+ new Label("Errors:"),
+ 2, 0, 1, 1, 0.0, 0.0,
+ GridBagConstraints.CENTER, GridBagConstraints.NONE,
+ new Insets(0, 8, 0, 0)
+ );
+ addToCounterPanel(
+ numbersPanel,
+ fNumberOfErrors,
+ 3, 0, 1, 1, 0.33, 0.0,
+ GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL,
+ new Insets(0, 8, 0, 40)
+ );
+ addToCounterPanel(
+ numbersPanel,
+ new Label("Failures:"),
+ 4, 0, 1, 1, 0.0, 0.0,
+ GridBagConstraints.CENTER, GridBagConstraints.NONE,
+ new Insets(0, 8, 0, 0)
+ );
+ addToCounterPanel(
+ numbersPanel,
+ fNumberOfFailures,
+ 5, 0, 1, 1, 0.33, 0.0,
+ GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL,
+ new Insets(0, 8, 0, 0)
+ );
+ return numbersPanel;
+ }
+
+ private void addToCounterPanel(Panel counter, Component comp,
+ int gridx, int gridy, int gridwidth, int gridheight,
+ double weightx, double weighty,
+ int anchor, int fill,
+ Insets insets) {
+
+ GridBagConstraints constraints= new GridBagConstraints();
+ constraints.gridx= gridx;
+ constraints.gridy= gridy;
+ constraints.gridwidth= gridwidth;
+ constraints.gridheight= gridheight;
+ constraints.weightx= weightx;
+ constraints.weighty= weighty;
+ constraints.anchor= anchor;
+ constraints.fill= fill;
+ constraints.insets= insets;
+ counter.add(comp, constraints);
+ }
+
+
+ public void failureSelected() {
+ fRerunButton.setEnabled(isErrorSelected());
+ showErrorTrace();
+ }
+
+ private boolean isErrorSelected() {
+ return fFailureList.getSelectedIndex() != -1;
+ }
+
+ private Image loadFrameIcon() {
+ Toolkit toolkit= Toolkit.getDefaultToolkit();
+ try {
+ java.net.URL url= BaseTestRunner.class.getResource("smalllogo.gif");
+ return toolkit.createImage((ImageProducer) url.getContent());
+ } catch (Exception ex) {
+ }
+ return null;
+ }
+
+ public Thread getRunner() {
+ return fRunner;
+ }
+
+ public static void main(String[] args) {
+ new TestRunner().start(args);
+ }
+
+ public static void run(Class test) {
+ String args[]= { test.getName() };
+ main(args);
+ }
+
+ public void rerun() {
+ int index= fFailureList.getSelectedIndex();
+ if (index == -1)
+ return;
+
+ Test test= (Test)fFailedTests.elementAt(index);
+ rerunTest(test);
+ }
+
+ private void rerunTest(Test test) {
+ if (!(test instanceof TestCase)) {
+ showInfo("Could not reload "+ test.toString());
+ return;
+ }
+ Test reloadedTest= null;
+ TestCase rerunTest= (TestCase)test;
+ try {
+ Class reloadedTestClass= getLoader().reload(test.getClass());
+ reloadedTest= TestSuite.createTest(reloadedTestClass, rerunTest.getName());
+ } catch(Exception e) {
+ showInfo("Could not reload "+ test.toString());
+ return;
+ }
+ TestResult result= new TestResult();
+ reloadedTest.run(result);
+
+ String message= reloadedTest.toString();
+ if(result.wasSuccessful())
+ showInfo(message+" was successful");
+ else if (result.errorCount() == 1)
+ showStatus(message+" had an error");
+ else
+ showStatus(message+" had a failure");
+ }
+
+ protected void reset() {
+ setLabelValue(fNumberOfErrors, 0);
+ setLabelValue(fNumberOfFailures, 0);
+ setLabelValue(fNumberOfRuns, 0);
+ fProgressIndicator.reset();
+ fRerunButton.setEnabled(false);
+ fFailureList.removeAll();
+ fExceptions= new Vector(10);
+ fFailedTests= new Vector(10);
+ fTraceArea.setText("");
+
+ }
+
+ protected void runFailed(String message) {
+ showStatus(message);
+ fRun.setLabel("Run");
+ fRunner= null;
+ }
+
+ synchronized public void runSuite() {
+ if (fRunner != null && fTestResult != null) {
+ fTestResult.stop();
+ } else {
+ setLoading(shouldReload());
+ fRun.setLabel("Stop");
+ showInfo("Initializing...");
+ reset();
+
+ showInfo("Load Test Case...");
+
+ final Test testSuite= getTest(fSuiteField.getText());
+ if (testSuite != null) {
+ fRunner= new Thread() {
+ public void run() {
+ fTestResult= createTestResult();
+ fTestResult.addListener(TestRunner.this);
+ fProgressIndicator.start(testSuite.countTestCases());
+ showInfo("Running...");
+
+ long startTime= System.currentTimeMillis();
+ testSuite.run(fTestResult);
+
+ if (fTestResult.shouldStop()) {
+ showStatus("Stopped");
+ } else {
+ long endTime= System.currentTimeMillis();
+ long runTime= endTime-startTime;
+ showInfo("Finished: " + elapsedTimeAsString(runTime) + " seconds");
+ }
+ fTestResult= null;
+ fRun.setLabel("Run");
+ fRunner= null;
+ System.gc();
+ }
+ };
+ fRunner.start();
+ }
+ }
+ }
+
+ private boolean shouldReload() {
+ return !inVAJava() && fUseLoadingRunner.getState();
+ }
+
+ private void setLabelValue(Label label, int value) {
+ label.setText(Integer.toString(value));
+ label.invalidate();
+ label.getParent().validate();
+
+ }
+
+ public void setSuiteName(String suite) {
+ fSuiteField.setText(suite);
+ }
+
+ private void showErrorTrace() {
+ int index= fFailureList.getSelectedIndex();
+ if (index == -1)
+ return;
+
+ Throwable t= (Throwable) fExceptions.elementAt(index);
+ fTraceArea.setText(getFilteredTrace(t));
+ }
+
+
+ private void showInfo(String message) {
+ fStatusLine.setFont(PLAIN_FONT);
+ fStatusLine.setForeground(Color.black);
+ fStatusLine.setText(message);
+ }
+
+ protected void clearStatus() {
+ showStatus("");
+ }
+
+ private void showStatus(String status) {
+ fStatusLine.setFont(PLAIN_FONT);
+ fStatusLine.setForeground(Color.red);
+ fStatusLine.setText(status);
+ }
+ /**
+ * Starts the TestRunner
+ */
+ public void start(String[] args) {
+ String suiteName= processArguments(args);
+ fFrame= createUI(suiteName);
+ fFrame.setLocation(200, 200);
+ fFrame.setVisible(true);
+
+ if (suiteName != null) {
+ setSuiteName(suiteName);
+ runSuite();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/extensions/ActiveTestSuite.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/extensions/ActiveTestSuite.js
new file mode 100644
index 0000000..7f3e271
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/extensions/ActiveTestSuite.js
@@ -0,0 +1,64 @@
+package junit.extensions;
+
+import junit.framework.*;
+
+/**
+ * A TestSuite for active Tests. It runs each
+ * test in a separate thread and waits until all
+ * threads have terminated.
+ * -- Aarhus Radisson Scandinavian Center 11th floor
+ */
+public class ActiveTestSuite extends TestSuite {
+ private volatile int fActiveTestDeathCount;
+
+ public ActiveTestSuite() {
+ }
+
+ public ActiveTestSuite(Class theClass) {
+ super(theClass);
+ }
+
+ public ActiveTestSuite(String name) {
+ super (name);
+ }
+
+ public ActiveTestSuite(Class theClass, String name) {
+ super(theClass, name);
+ }
+
+ public void run(TestResult result) {
+ fActiveTestDeathCount= 0;
+ super.run(result);
+ waitUntilFinished();
+ }
+
+ public void runTest(final Test test, final TestResult result) {
+ Thread t= new Thread() {
+ public void run() {
+ try {
+ // inlined due to limitation in VA/Java
+ //ActiveTestSuite.super.runTest(test, result);
+ test.run(result);
+ } finally {
+ ActiveTestSuite.this.runFinished(test);
+ }
+ }
+ };
+ t.start();
+ }
+
+ synchronized void waitUntilFinished() {
+ while (fActiveTestDeathCount < testCount()) {
+ try {
+ wait();
+ } catch (InterruptedException e) {
+ return; // ignore
+ }
+ }
+ }
+
+ synchronized public void runFinished(Test test) {
+ fActiveTestDeathCount++;
+ notifyAll();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/extensions/ExceptionTestCase.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/extensions/ExceptionTestCase.js
new file mode 100644
index 0000000..2bf79c3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/extensions/ExceptionTestCase.js
@@ -0,0 +1,46 @@
+package junit.extensions;
+
+import junit.framework.*;
+
+/**
+ * A TestCase that expects an Exception of class fExpected to be thrown.
+ * The other way to check that an expected exception is thrown is:
+ * <pre>
+ * try {
+ * shouldThrow();
+ * }
+ * catch (SpecialException e) {
+ * return;
+ * }
+ * fail("Expected SpecialException");
+ * </pre>
+ *
+ * To use ExceptionTestCase, create a TestCase like:
+ * <pre>
+ * new ExceptionTestCase("testShouldThrow", SpecialException.class);
+ * </pre>
+ */
+public class ExceptionTestCase extends TestCase {
+ Class fExpected;
+
+ public ExceptionTestCase(String name, Class exception) {
+ super(name);
+ fExpected= exception;
+ }
+ /**
+ * Execute the test method expecting that an Exception of
+ * class fExpected or one of its subclasses will be thrown
+ */
+ protected void runTest() throws Throwable {
+ try {
+ super.runTest();
+ }
+ catch (Exception e) {
+ if (fExpected.isAssignableFrom(e.getClass()))
+ return;
+ else
+ throw e;
+ }
+ fail("Expected exception " + fExpected);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/extensions/RepeatedTest.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/extensions/RepeatedTest.js
new file mode 100644
index 0000000..2eb3e0b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/extensions/RepeatedTest.js
@@ -0,0 +1,31 @@
+package junit.extensions;
+
+import junit.framework.*;
+
+/**
+ * A Decorator that runs a test repeatedly.
+ *
+ */
+public class RepeatedTest extends TestDecorator {
+ private int fTimesRepeat;
+
+ public RepeatedTest(Test test, int repeat) {
+ super(test);
+ if (repeat < 0)
+ throw new IllegalArgumentException("Repetition count must be > 0");
+ fTimesRepeat= repeat;
+ }
+ public int countTestCases() {
+ return super.countTestCases()*fTimesRepeat;
+ }
+ public void run(TestResult result) {
+ for (int i= 0; i < fTimesRepeat; i++) {
+ if (result.shouldStop())
+ break;
+ super.run(result);
+ }
+ }
+ public String toString() {
+ return super.toString()+"(repeated)";
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/extensions/TestDecorator.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/extensions/TestDecorator.js
new file mode 100644
index 0000000..1989300
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/extensions/TestDecorator.js
@@ -0,0 +1,38 @@
+package junit.extensions;
+
+import junit.framework.*;
+
+/**
+ * A Decorator for Tests. Use TestDecorator as the base class
+ * for defining new test decorators. Test decorator subclasses
+ * can be introduced to add behaviour before or after a test
+ * is run.
+ *
+ */
+public class TestDecorator extends Assert implements Test {
+ protected Test fTest;
+
+ public TestDecorator(Test test) {
+ fTest= test;
+ }
+ /**
+ * The basic run behaviour.
+ */
+ public void basicRun(TestResult result) {
+ fTest.run(result);
+ }
+ public int countTestCases() {
+ return fTest.countTestCases();
+ }
+ public void run(TestResult result) {
+ basicRun(result);
+ }
+
+ public String toString() {
+ return fTest.toString();
+ }
+
+ public Test getTest() {
+ return fTest;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/extensions/TestSetup.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/extensions/TestSetup.js
new file mode 100644
index 0000000..a4e9e3a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/extensions/TestSetup.js
@@ -0,0 +1,37 @@
+package junit.extensions;
+
+import junit.framework.*;
+
+/**
+ * A Decorator to set up and tear down additional fixture state.
+ * Subclass TestSetup and insert it into your tests when you want
+ * to set up additional state once before the tests are run.
+ */
+public class TestSetup extends TestDecorator {
+
+ public TestSetup(Test test) {
+ super(test);
+ }
+ public void run(final TestResult result) {
+ Protectable p= new Protectable() {
+ public void protect() throws Exception {
+ setUp();
+ basicRun(result);
+ tearDown();
+ }
+ };
+ result.runProtected(this, p);
+ }
+ /**
+ * Sets up the fixture. Override to set up additional fixture
+ * state.
+ */
+ protected void setUp() throws Exception {
+ }
+ /**
+ * Tears down the fixture. Override to tear down the additional
+ * fixture state.
+ */
+ protected void tearDown() throws Exception {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/Assert.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/Assert.js
new file mode 100644
index 0000000..31776f9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/Assert.js
@@ -0,0 +1,291 @@
+package junit.framework;
+
+/**
+ * A set of assert methods. Messages are only displayed when an assert fails.
+ */
+
+public class Assert {
+ /**
+ * Protect constructor since it is a static only class
+ */
+ protected Assert() {
+ }
+
+ /**
+ * Asserts that a condition is true. If it isn't it throws
+ * an AssertionFailedError with the given message.
+ */
+ static public void assertTrue(String message, boolean condition) {
+ if (!condition)
+ fail(message);
+ }
+ /**
+ * Asserts that a condition is true. If it isn't it throws
+ * an AssertionFailedError.
+ */
+ static public void assertTrue(boolean condition) {
+ assertTrue(null, condition);
+ }
+ /**
+ * Asserts that a condition is false. If it isn't it throws
+ * an AssertionFailedError with the given message.
+ */
+ static public void assertFalse(String message, boolean condition) {
+ assertTrue(message, !condition);
+ }
+ /**
+ * Asserts that a condition is false. If it isn't it throws
+ * an AssertionFailedError.
+ */
+ static public void assertFalse(boolean condition) {
+ assertFalse(null, condition);
+ }
+ /**
+ * Fails a test with the given message.
+ */
+ static public void fail(String message) {
+ throw new AssertionFailedError(message);
+ }
+ /**
+ * Fails a test with no message.
+ */
+ static public void fail() {
+ fail(null);
+ }
+ /**
+ * Asserts that two objects are equal. If they are not
+ * an AssertionFailedError is thrown with the given message.
+ */
+ static public void assertEquals(String message, Object expected, Object actual) {
+ if (expected == null && actual == null)
+ return;
+ if (expected != null && expected.equals(actual))
+ return;
+ failNotEquals(message, expected, actual);
+ }
+ /**
+ * Asserts that two objects are equal. If they are not
+ * an AssertionFailedError is thrown.
+ */
+ static public void assertEquals(Object expected, Object actual) {
+ assertEquals(null, expected, actual);
+ }
+ /**
+ * Asserts that two Strings are equal.
+ */
+ static public void assertEquals(String message, String expected, String actual) {
+ if (expected == null && actual == null)
+ return;
+ if (expected != null && expected.equals(actual))
+ return;
+ throw new ComparisonFailure(message, expected, actual);
+ }
+ /**
+ * Asserts that two Strings are equal.
+ */
+ static public void assertEquals(String expected, String actual) {
+ assertEquals(null, expected, actual);
+ }
+ /**
+ * Asserts that two doubles are equal concerning a delta. If they are not
+ * an AssertionFailedError is thrown with the given message. If the expected
+ * value is infinity then the delta value is ignored.
+ */
+ static public void assertEquals(String message, double expected, double actual, double delta) {
+ // handle infinity specially since subtracting to infinite values gives NaN and the
+ // the following test fails
+ if (Double.isInfinite(expected)) {
+ if (!(expected == actual))
+ failNotEquals(message, new Double(expected), new Double(actual));
+ } else if (!(Math.abs(expected-actual) <= delta)) // Because comparison with NaN always returns false
+ failNotEquals(message, new Double(expected), new Double(actual));
+ }
+ /**
+ * Asserts that two doubles are equal concerning a delta. If the expected
+ * value is infinity then the delta value is ignored.
+ */
+ static public void assertEquals(double expected, double actual, double delta) {
+ assertEquals(null, expected, actual, delta);
+ }
+ /**
+ * Asserts that two floats are equal concerning a delta. If they are not
+ * an AssertionFailedError is thrown with the given message. If the expected
+ * value is infinity then the delta value is ignored.
+ */
+ static public void assertEquals(String message, float expected, float actual, float delta) {
+ // handle infinity specially since subtracting to infinite values gives NaN and the
+ // the following test fails
+ if (Float.isInfinite(expected)) {
+ if (!(expected == actual))
+ failNotEquals(message, new Float(expected), new Float(actual));
+ } else if (!(Math.abs(expected-actual) <= delta))
+ failNotEquals(message, new Float(expected), new Float(actual));
+ }
+ /**
+ * Asserts that two floats are equal concerning a delta. If the expected
+ * value is infinity then the delta value is ignored.
+ */
+ static public void assertEquals(float expected, float actual, float delta) {
+ assertEquals(null, expected, actual, delta);
+ }
+ /**
+ * Asserts that two longs are equal. If they are not
+ * an AssertionFailedError is thrown with the given message.
+ */
+ static public void assertEquals(String message, long expected, long actual) {
+ assertEquals(message, new Long(expected), new Long(actual));
+ }
+ /**
+ * Asserts that two longs are equal.
+ */
+ static public void assertEquals(long expected, long actual) {
+ assertEquals(null, expected, actual);
+ }
+ /**
+ * Asserts that two booleans are equal. If they are not
+ * an AssertionFailedError is thrown with the given message.
+ */
+ static public void assertEquals(String message, boolean expected, boolean actual) {
+ assertEquals(message, new Boolean(expected), new Boolean(actual));
+ }
+ /**
+ * Asserts that two booleans are equal.
+ */
+ static public void assertEquals(boolean expected, boolean actual) {
+ assertEquals(null, expected, actual);
+ }
+ /**
+ * Asserts that two bytes are equal. If they are not
+ * an AssertionFailedError is thrown with the given message.
+ */
+ static public void assertEquals(String message, byte expected, byte actual) {
+ assertEquals(message, new Byte(expected), new Byte(actual));
+ }
+ /**
+ * Asserts that two bytes are equal.
+ */
+ static public void assertEquals(byte expected, byte actual) {
+ assertEquals(null, expected, actual);
+ }
+ /**
+ * Asserts that two chars are equal. If they are not
+ * an AssertionFailedError is thrown with the given message.
+ */
+ static public void assertEquals(String message, char expected, char actual) {
+ assertEquals(message, new Character(expected), new Character(actual));
+ }
+ /**
+ * Asserts that two chars are equal.
+ */
+ static public void assertEquals(char expected, char actual) {
+ assertEquals(null, expected, actual);
+ }
+ /**
+ * Asserts that two shorts are equal. If they are not
+ * an AssertionFailedError is thrown with the given message.
+ */
+ static public void assertEquals(String message, short expected, short actual) {
+ assertEquals(message, new Short(expected), new Short(actual));
+ }
+ /**
+ * Asserts that two shorts are equal.
+ */
+ static public void assertEquals(short expected, short actual) {
+ assertEquals(null, expected, actual);
+ }
+ /**
+ * Asserts that two ints are equal. If they are not
+ * an AssertionFailedError is thrown with the given message.
+ */
+ static public void assertEquals(String message, int expected, int actual) {
+ assertEquals(message, new Integer(expected), new Integer(actual));
+ }
+ /**
+ * Asserts that two ints are equal.
+ */
+ static public void assertEquals(int expected, int actual) {
+ assertEquals(null, expected, actual);
+ }
+ /**
+ * Asserts that an object isn't null.
+ */
+ static public void assertNotNull(Object object) {
+ assertNotNull(null, object);
+ }
+ /**
+ * Asserts that an object isn't null. If it is
+ * an AssertionFailedError is thrown with the given message.
+ */
+ static public void assertNotNull(String message, Object object) {
+ assertTrue(message, object != null);
+ }
+ /**
+ * Asserts that an object is null.
+ */
+ static public void assertNull(Object object) {
+ assertNull(null, object);
+ }
+ /**
+ * Asserts that an object is null. If it is not
+ * an AssertionFailedError is thrown with the given message.
+ */
+ static public void assertNull(String message, Object object) {
+ assertTrue(message, object == null);
+ }
+ /**
+ * Asserts that two objects refer to the same object. If they are not
+ * an AssertionFailedError is thrown with the given message.
+ */
+ static public void assertSame(String message, Object expected, Object actual) {
+ if (expected == actual)
+ return;
+ failNotSame(message, expected, actual);
+ }
+ /**
+ * Asserts that two objects refer to the same object. If they are not
+ * the same an AssertionFailedError is thrown.
+ */
+ static public void assertSame(Object expected, Object actual) {
+ assertSame(null, expected, actual);
+ }
+ /**
+ * Asserts that two objects refer to the same object. If they are not
+ * an AssertionFailedError is thrown with the given message.
+ */
+ static public void assertNotSame(String message, Object expected, Object actual) {
+ if (expected == actual)
+ failSame(message);
+ }
+ /**
+ * Asserts that two objects refer to the same object. If they are not
+ * the same an AssertionFailedError is thrown.
+ */
+ static public void assertNotSame(Object expected, Object actual) {
+ assertNotSame(null, expected, actual);
+ }
+
+ static private void failSame(String message) {
+ String formatted= "";
+ if (message != null)
+ formatted= message+" ";
+ fail(formatted+"expected not same");
+ }
+
+ static private void failNotSame(String message, Object expected, Object actual) {
+ String formatted= "";
+ if (message != null)
+ formatted= message+" ";
+ fail(formatted+"expected same:<"+expected+"> was not:<"+actual+">");
+ }
+
+ static private void failNotEquals(String message, Object expected, Object actual) {
+ fail(format(message, expected, actual));
+ }
+
+ static String format(String message, Object expected, Object actual) {
+ String formatted= "";
+ if (message != null)
+ formatted= message+" ";
+ return formatted+"expected:<"+expected+"> but was:<"+actual+">";
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/AssertionFailedError.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/AssertionFailedError.js
new file mode 100644
index 0000000..d09cd10
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/AssertionFailedError.js
@@ -0,0 +1,13 @@
+package junit.framework;
+
+/**
+ * Thrown when an assertion failed.
+ */
+public class AssertionFailedError extends Error {
+
+ public AssertionFailedError () {
+ }
+ public AssertionFailedError (String message) {
+ super (message);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/ComparisonFailure.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/ComparisonFailure.js
new file mode 100644
index 0000000..d0f55d4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/ComparisonFailure.js
@@ -0,0 +1,68 @@
+package junit.framework;
+
+/**
+ * Thrown when an assert equals for Strings failed.
+ *
+ * Inspired by a patch from Alex Chaffee mailto:alex@purpletech.com
+ */
+public class ComparisonFailure extends AssertionFailedError {
+ private String fExpected;
+ private String fActual;
+
+ /**
+ * Constructs a comparison failure.
+ * @param message the identifying message or null
+ * @param expected the expected string value
+ * @param actual the actual string value
+ */
+ public ComparisonFailure (String message, String expected, String actual) {
+ super (message);
+ fExpected= expected;
+ fActual= actual;
+ }
+
+ /**
+ * Returns "..." in place of common prefix and "..." in
+ * place of common suffix between expected and actual.
+ *
+ * @see java.lang.Throwable#getMessage()
+ */
+ public String getMessage() {
+ if (fExpected == null || fActual == null)
+ return Assert.format(super.getMessage(), fExpected, fActual);
+
+ int end= Math.min(fExpected.length(), fActual.length());
+
+ int i= 0;
+ for(; i < end; i++) {
+ if (fExpected.charAt(i) != fActual.charAt(i))
+ break;
+ }
+ int j= fExpected.length()-1;
+ int k= fActual.length()-1;
+ for (; k >= i && j >= i; k--,j--) {
+ if (fExpected.charAt(j) != fActual.charAt(k))
+ break;
+ }
+ String actual, expected;
+
+ // equal strings
+ if (j < i && k < i) {
+ expected= fExpected;
+ actual= fActual;
+ } else {
+ expected= fExpected.substring(i, j+1);
+ actual= fActual.substring(i, k+1);
+ if (i <= end && i > 0) {
+ expected= "..."+expected;
+ actual= "..."+actual;
+ }
+
+ if (j < fExpected.length()-1)
+ expected= expected+"...";
+ if (k < fActual.length()-1)
+ actual= actual+"...";
+ }
+ return Assert.format(super.getMessage(), expected, actual);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/Protectable.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/Protectable.js
new file mode 100644
index 0000000..509ddc2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/Protectable.js
@@ -0,0 +1,14 @@
+package junit.framework;
+
+/**
+ * A <em>Protectable</em> can be run and can throw a Throwable.
+ *
+ * @see TestResult
+ */
+public interface Protectable {
+
+ /**
+ * Run the the following method protected.
+ */
+ public abstract void protect() throws Throwable;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/Test.js
new file mode 100644
index 0000000..4bb25b7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/Test.js
@@ -0,0 +1,17 @@
+package junit.framework;
+
+/**
+ * A <em>Test</em> can be run and collect its results.
+ *
+ * @see TestResult
+ */
+public interface Test {
+ /**
+ * Counts the number of test cases that will be run by this test.
+ */
+ public abstract int countTestCases();
+ /**
+ * Runs a test and collects its result in a TestResult instance.
+ */
+ public abstract void run(TestResult result);
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/TestCase.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/TestCase.js
new file mode 100644
index 0000000..9ac7b8b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/TestCase.js
@@ -0,0 +1,197 @@
+package junit.framework;
+
+import java.lang.reflect.*;
+
+/**
+ * A test case defines the fixture to run multiple tests. To define a test case<br>
+ * 1) implement a subclass of TestCase<br>
+ * 2) define instance variables that store the state of the fixture<br>
+ * 3) initialize the fixture state by overriding <code>setUp</code><br>
+ * 4) clean-up after a test by overriding <code>tearDown</code>.<br>
+ * Each test runs in its own fixture so there
+ * can be no side effects among test runs.
+ * Here is an example:
+ * <pre>
+ * public class MathTest extends TestCase {
+ * protected double fValue1;
+ * protected double fValue2;
+ *
+ * protected void setUp() {
+ * fValue1= 2.0;
+ * fValue2= 3.0;
+ * }
+ * }
+ * </pre>
+ *
+ * For each test implement a method which interacts
+ * with the fixture. Verify the expected results with assertions specified
+ * by calling <code>assertTrue</code> with a boolean.
+ * <pre>
+ * public void testAdd() {
+ * double result= fValue1 + fValue2;
+ * assertTrue(result == 5.0);
+ * }
+ * </pre>
+ * Once the methods are defined you can run them. The framework supports
+ * both a static type safe and more dynamic way to run a test.
+ * In the static way you override the runTest method and define the method to
+ * be invoked. A convenient way to do so is with an anonymous inner class.
+ * <pre>
+ * TestCase test= new MathTest("add") {
+ * public void runTest() {
+ * testAdd();
+ * }
+ * };
+ * test.run();
+ * </pre>
+ * The dynamic way uses reflection to implement <code>runTest</code>. It dynamically finds
+ * and invokes a method.
+ * In this case the name of the test case has to correspond to the test method
+ * to be run.
+ * <pre>
+ * TestCase= new MathTest("testAdd");
+ * test.run();
+ * </pre>
+ * The tests to be run can be collected into a TestSuite. JUnit provides
+ * different <i>test runners</i> which can run a test suite and collect the results.
+ * A test runner either expects a static method <code>suite</code> as the entry
+ * point to get a test to run or it will extract the suite automatically.
+ * <pre>
+ * public static Test suite() {
+ * suite.addTest(new MathTest("testAdd"));
+ * suite.addTest(new MathTest("testDivideByZero"));
+ * return suite;
+ * }
+ * </pre>
+ * @see TestResult
+ * @see TestSuite
+ */
+
+public abstract class TestCase extends Assert implements Test {
+ /**
+ * the name of the test case
+ */
+ private String fName;
+
+ /**
+ * No-arg constructor to enable serialization. This method
+ * is not intended to be used by mere mortals without calling setName().
+ */
+ public TestCase() {
+ fName= null;
+ }
+ /**
+ * Constructs a test case with the given name.
+ */
+ public TestCase(String name) {
+ fName= name;
+ }
+ /**
+ * Counts the number of test cases executed by run(TestResult result).
+ */
+ public int countTestCases() {
+ return 1;
+ }
+ /**
+ * Creates a default TestResult object
+ *
+ * @see TestResult
+ */
+ protected TestResult createResult() {
+ return new TestResult();
+ }
+ /**
+ * A convenience method to run this test, collecting the results with a
+ * default TestResult object.
+ *
+ * @see TestResult
+ */
+ public TestResult run() {
+ TestResult result= createResult();
+ run(result);
+ return result;
+ }
+ /**
+ * Runs the test case and collects the results in TestResult.
+ */
+ public void run(TestResult result) {
+ result.run(this);
+ }
+ /**
+ * Runs the bare test sequence.
+ * @exception Throwable if any exception is thrown
+ */
+ public void runBare() throws Throwable {
+ setUp();
+ try {
+ runTest();
+ }
+ finally {
+ tearDown();
+ }
+ }
+ /**
+ * Override to run the test and assert its state.
+ * @exception Throwable if any exception is thrown
+ */
+ protected void runTest() throws Throwable {
+ assertNotNull(fName);
+ Method runMethod= null;
+ try {
+ // use getMethod to get all public inherited
+ // methods. getDeclaredMethods returns all
+ // methods of this class but excludes the
+ // inherited ones.
+ runMethod= getClass().getMethod(fName, null);
+ } catch (NoSuchMethodException e) {
+ fail("Method \""+fName+"\" not found");
+ }
+ if (!Modifier.isPublic(runMethod.getModifiers())) {
+ fail("Method \""+fName+"\" should be public");
+ }
+
+ try {
+ runMethod.invoke(this, new Class[0]);
+ }
+ catch (InvocationTargetException e) {
+ e.fillInStackTrace();
+ throw e.getTargetException();
+ }
+ catch (IllegalAccessException e) {
+ e.fillInStackTrace();
+ throw e;
+ }
+ }
+ /**
+ * Sets up the fixture, for example, open a network connection.
+ * This method is called before a test is executed.
+ */
+ protected void setUp() throws Exception {
+ }
+ /**
+ * Tears down the fixture, for example, close a network connection.
+ * This method is called after a test is executed.
+ */
+ protected void tearDown() throws Exception {
+ }
+ /**
+ * Returns a string representation of the test case
+ */
+ public String toString() {
+ return getName() + "(" + getClass().getName() + ")";
+ }
+ /**
+ * Gets the name of a TestCase
+ * @return returns a String
+ */
+ public String getName() {
+ return fName;
+ }
+ /**
+ * Sets the name of a TestCase
+ * @param name The name to set
+ */
+ public void setName(String name) {
+ fName= name;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/TestFailure.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/TestFailure.js
new file mode 100644
index 0000000..7734499
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/TestFailure.js
@@ -0,0 +1,57 @@
+package junit.framework;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+
+/**
+ * A <code>TestFailure</code> collects a failed test together with
+ * the caught exception.
+ * @see TestResult
+ */
+public class TestFailure extends Object {
+ protected Test fFailedTest;
+ protected Throwable fThrownException;
+
+
+ /**
+ * Constructs a TestFailure with the given test and exception.
+ */
+ public TestFailure(Test failedTest, Throwable thrownException) {
+ fFailedTest= failedTest;
+ fThrownException= thrownException;
+ }
+ /**
+ * Gets the failed test.
+ */
+ public Test failedTest() {
+ return fFailedTest;
+ }
+ /**
+ * Gets the thrown exception.
+ */
+ public Throwable thrownException() {
+ return fThrownException;
+ }
+ /**
+ * Returns a short description of the failure.
+ */
+ public String toString() {
+ StringBuffer buffer= new StringBuffer();
+ buffer.append(fFailedTest+": "+fThrownException.getMessage());
+ return buffer.toString();
+ }
+ public String trace() {
+ StringWriter stringWriter= new StringWriter();
+ PrintWriter writer= new PrintWriter(stringWriter);
+ thrownException().printStackTrace(writer);
+ StringBuffer buffer= stringWriter.getBuffer();
+ return buffer.toString();
+ }
+ public String exceptionMessage() {
+ return thrownException().getMessage();
+ }
+ public boolean isFailure() {
+ return thrownException() instanceof AssertionFailedError;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/TestListener.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/TestListener.js
new file mode 100644
index 0000000..6b0b7bf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/TestListener.js
@@ -0,0 +1,23 @@
+package junit.framework;
+
+/**
+ * A Listener for test progress
+ */
+public interface TestListener {
+ /**
+ * An error occurred.
+ */
+ public void addError(Test test, Throwable t);
+ /**
+ * A failure occurred.
+ */
+ public void addFailure(Test test, AssertionFailedError t);
+ /**
+ * A test ended.
+ */
+ public void endTest(Test test);
+ /**
+ * A test started.
+ */
+ public void startTest(Test test);
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/TestResult.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/TestResult.js
new file mode 100644
index 0000000..0d9e53e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/TestResult.js
@@ -0,0 +1,166 @@
+package junit.framework;
+
+import java.util.Vector;
+import java.util.Enumeration;
+
+/**
+ * A <code>TestResult</code> collects the results of executing
+ * a test case. It is an instance of the Collecting Parameter pattern.
+ * The test framework distinguishes between <i>failures</i> and <i>errors</i>.
+ * A failure is anticipated and checked for with assertions. Errors are
+ * unanticipated problems like an <code>ArrayIndexOutOfBoundsException</code>.
+ *
+ * @see Test
+ */
+public class TestResult extends Object {
+ protected Vector fFailures;
+ protected Vector fErrors;
+ protected Vector fListeners;
+ protected int fRunTests;
+ private boolean fStop;
+
+ public TestResult() {
+ fFailures= new Vector();
+ fErrors= new Vector();
+ fListeners= new Vector();
+ fRunTests= 0;
+ fStop= false;
+ }
+ /**
+ * Adds an error to the list of errors. The passed in exception
+ * caused the error.
+ */
+ public synchronized void addError(Test test, Throwable t) {
+ fErrors.addElement(new TestFailure(test, t));
+ for (Enumeration e= cloneListeners().elements(); e.hasMoreElements(); ) {
+ ((TestListener)e.nextElement()).addError(test, t);
+ }
+ }
+ /**
+ * Adds a failure to the list of failures. The passed in exception
+ * caused the failure.
+ */
+ public synchronized void addFailure(Test test, AssertionFailedError t) {
+ fFailures.addElement(new TestFailure(test, t));
+ for (Enumeration e= cloneListeners().elements(); e.hasMoreElements(); ) {
+ ((TestListener)e.nextElement()).addFailure(test, t);
+ }
+ }
+ /**
+ * Registers a TestListener
+ */
+ public synchronized void addListener(TestListener listener) {
+ fListeners.addElement(listener);
+ }
+ /**
+ * Unregisters a TestListener
+ */
+ public synchronized void removeListener(TestListener listener) {
+ fListeners.removeElement(listener);
+ }
+ /**
+ * Returns a copy of the listeners.
+ */
+ private synchronized Vector cloneListeners() {
+ return (Vector)fListeners.clone();
+ }
+ /**
+ * Informs the result that a test was completed.
+ */
+ public void endTest(Test test) {
+ for (Enumeration e= cloneListeners().elements(); e.hasMoreElements(); ) {
+ ((TestListener)e.nextElement()).endTest(test);
+ }
+ }
+ /**
+ * Gets the number of detected errors.
+ */
+ public synchronized int errorCount() {
+ return fErrors.size();
+ }
+ /**
+ * Returns an Enumeration for the errors
+ */
+ public synchronized Enumeration errors() {
+ return fErrors.elements();
+ }
+ /**
+ * Gets the number of detected failures.
+ */
+ public synchronized int failureCount() {
+ return fFailures.size();
+ }
+ /**
+ * Returns an Enumeration for the failures
+ */
+ public synchronized Enumeration failures() {
+ return fFailures.elements();
+ }
+ /**
+ * Runs a TestCase.
+ */
+ protected void run(final TestCase test) {
+ startTest(test);
+ Protectable p= new Protectable() {
+ public void protect() throws Throwable {
+ test.runBare();
+ }
+ };
+ runProtected(test, p);
+
+ endTest(test);
+ }
+ /**
+ * Gets the number of run tests.
+ */
+ public synchronized int runCount() {
+ return fRunTests;
+ }
+ /**
+ * Runs a TestCase.
+ */
+ public void runProtected(final Test test, Protectable p) {
+ try {
+ p.protect();
+ }
+ catch (AssertionFailedError e) {
+ addFailure(test, e);
+ }
+ catch (ThreadDeath e) { // don't catch ThreadDeath by accident
+ throw e;
+ }
+ catch (Throwable e) {
+ addError(test, e);
+ }
+ }
+ /**
+ * Checks whether the test run should stop
+ */
+ public synchronized boolean shouldStop() {
+ return fStop;
+ }
+ /**
+ * Informs the result that a test will be started.
+ */
+ public void startTest(Test test) {
+ final int count= test.countTestCases();
+ synchronized(this) {
+ fRunTests+= count;
+ }
+ for (Enumeration e= cloneListeners().elements(); e.hasMoreElements(); ) {
+ ((TestListener)e.nextElement()).startTest(test);
+ }
+ }
+ /**
+ * Marks that the test run should stop.
+ */
+ public synchronized void stop() {
+ fStop= true;
+ }
+ /**
+ * Returns whether the entire test was successful or not.
+ */
+ public synchronized boolean wasSuccessful() {
+ return failureCount() == 0 && errorCount() == 0;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/TestSuite.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/TestSuite.js
new file mode 100644
index 0000000..7645925
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/TestSuite.js
@@ -0,0 +1,267 @@
+package junit.framework;
+
+import java.util.Vector;
+import java.util.Enumeration;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.lang.reflect.*;
+import java.lang.reflect.Constructor;
+
+/**
+ * A <code>TestSuite</code> is a <code>Composite</code> of Tests.
+ * It runs a collection of test cases. Here is an example using
+ * the dynamic test definition.
+ * <pre>
+ * TestSuite suite= new TestSuite();
+ * suite.addTest(new MathTest("testAdd"));
+ * suite.addTest(new MathTest("testDivideByZero"));
+ * </pre>
+ * Alternatively, a TestSuite can extract the tests to be run automatically.
+ * To do so you pass the class of your TestCase class to the
+ * TestSuite constructor.
+ * <pre>
+ * TestSuite suite= new TestSuite(MathTest.class);
+ * </pre>
+ * This constructor creates a suite with all the methods
+ * starting with "test" that take no arguments.
+ *
+ * @see Test
+ */
+public class TestSuite implements Test {
+
+ private Vector fTests= new Vector(10);
+ private String fName;
+
+ /**
+ * Constructs an empty TestSuite.
+ */
+ public TestSuite() {
+ }
+
+ /**
+ * Constructs a TestSuite from the given class with the given name.
+ * @see TestSuite#TestSuite(Class)
+ */
+ public TestSuite(Class theClass, String name) {
+ this(theClass);
+ setName(name);
+ }
+
+ /**
+ * Constructs a TestSuite from the given class. Adds all the methods
+ * starting with "test" as test cases to the suite.
+ * Parts of this method was written at 2337 meters in the Hüffihütte,
+ * Kanton Uri
+ */
+ public TestSuite(final Class theClass) {
+ fName= theClass.getName();
+ try {
+ getTestConstructor(theClass); // Avoid generating multiple error messages
+ } catch (NoSuchMethodException e) {
+ addTest(warning("Class "+theClass.getName()+" has no public constructor TestCase(String name) or TestCase()"));
+ return;
+ }
+
+ if (!Modifier.isPublic(theClass.getModifiers())) {
+ addTest(warning("Class "+theClass.getName()+" is not public"));
+ return;
+ }
+
+ Class superClass= theClass;
+ Vector names= new Vector();
+ while (Test.class.isAssignableFrom(superClass)) {
+ Method[] methods= superClass.getDeclaredMethods();
+ for (int i= 0; i < methods.length; i++) {
+ addTestMethod(methods[i], names, theClass);
+ }
+ superClass= superClass.getSuperclass();
+ }
+ if (fTests.size() == 0)
+ addTest(warning("No tests found in "+theClass.getName()));
+ }
+
+ /**
+ * Constructs an empty TestSuite.
+ */
+ public TestSuite(String name) {
+ setName(name);
+ }
+
+ /**
+ * Adds a test to the suite.
+ */
+ public void addTest(Test test) {
+ fTests.addElement(test);
+ }
+
+ /**
+ * Adds the tests from the given class to the suite
+ */
+ public void addTestSuite(Class testClass) {
+ addTest(new TestSuite(testClass));
+ }
+
+ private void addTestMethod(Method m, Vector names, Class theClass) {
+ String name= m.getName();
+ if (names.contains(name))
+ return;
+ if (! isPublicTestMethod(m)) {
+ if (isTestMethod(m))
+ addTest(warning("Test method isn't public: "+m.getName()));
+ return;
+ }
+ names.addElement(name);
+ addTest(createTest(theClass, name));
+ }
+
+ /**
+ * ...as the moon sets over the early morning Merlin, Oregon
+ * mountains, our intrepid adventurers type...
+ */
+ static public Test createTest(Class theClass, String name) {
+ Constructor constructor;
+ try {
+ constructor= getTestConstructor(theClass);
+ } catch (NoSuchMethodException e) {
+ return warning("Class "+theClass.getName()+" has no public constructor TestCase(String name) or TestCase()");
+ }
+ Object test;
+ try {
+ if (constructor.getParameterTypes().length == 0) {
+ test= constructor.newInstance(new Object[0]);
+ if (test instanceof TestCase)
+ ((TestCase) test).setName(name);
+ } else {
+ test= constructor.newInstance(new Object[]{name});
+ }
+ } catch (InstantiationException e) {
+ return(warning("Cannot instantiate test case: "+name+" ("+exceptionToString(e)+")"));
+ } catch (InvocationTargetException e) {
+ return(warning("Exception in constructor: "+name+" ("+exceptionToString(e.getTargetException())+")"));
+ } catch (IllegalAccessException e) {
+ return(warning("Cannot access test case: "+name+" ("+exceptionToString(e)+")"));
+ }
+ return (Test) test;
+ }
+
+ /**
+ * Converts the stack trace into a string
+ */
+ private static String exceptionToString(Throwable t) {
+ StringWriter stringWriter= new StringWriter();
+ PrintWriter writer= new PrintWriter(stringWriter);
+ t.printStackTrace(writer);
+ return stringWriter.toString();
+
+ }
+
+ /**
+ * Counts the number of test cases that will be run by this test.
+ */
+ public int countTestCases() {
+ int count= 0;
+ for (Enumeration e= tests(); e.hasMoreElements(); ) {
+ Test test= (Test)e.nextElement();
+ count= count + test.countTestCases();
+ }
+ return count;
+ }
+
+ /**
+ * Gets a constructor which takes a single String as
+ * its argument or a no arg constructor.
+ */
+ public static Constructor getTestConstructor(Class theClass) throws NoSuchMethodException {
+ Class[] args= { String.class };
+ try {
+ return theClass.getConstructor(args);
+ } catch (NoSuchMethodException e) {
+ // fall through
+ }
+ return theClass.getConstructor(new Class[0]);
+ }
+
+ private boolean isPublicTestMethod(Method m) {
+ return isTestMethod(m) && Modifier.isPublic(m.getModifiers());
+ }
+
+ private boolean isTestMethod(Method m) {
+ String name= m.getName();
+ Class[] parameters= m.getParameterTypes();
+ Class returnType= m.getReturnType();
+ return parameters.length == 0 && name.startsWith("test") && returnType.equals(Void.TYPE);
+ }
+
+ /**
+ * Runs the tests and collects their result in a TestResult.
+ */
+ public void run(TestResult result) {
+ for (Enumeration e= tests(); e.hasMoreElements(); ) {
+ if (result.shouldStop() )
+ break;
+ Test test= (Test)e.nextElement();
+ runTest(test, result);
+ }
+ }
+
+ public void runTest(Test test, TestResult result) {
+ test.run(result);
+ }
+
+ /**
+ * Returns the test at the given index
+ */
+ public Test testAt(int index) {
+ return (Test)fTests.elementAt(index);
+ }
+
+ /**
+ * Returns the number of tests in this suite
+ */
+ public int testCount() {
+ return fTests.size();
+ }
+
+ /**
+ * Returns the tests as an enumeration
+ */
+ public Enumeration tests() {
+ return fTests.elements();
+ }
+
+ /**
+ */
+ public String toString() {
+ if (getName() != null)
+ return getName();
+ return super.toString();
+ }
+
+ /**
+ * Sets the name of the suite.
+ * @param name The name to set
+ */
+ public void setName(String name) {
+ fName= name;
+ }
+
+ /**
+ * Returns the name of the suite. Not all
+ * test suites have a name and this method
+ * can return null.
+ */
+ public String getName() {
+ return fName;
+ }
+
+ /**
+ * Returns a test which will fail and log a warning message.
+ */
+ private static Test warning(final String message) {
+ return new TestCase("warning") {
+ protected void runTest() {
+ fail(message);
+ }
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/BaseTestRunner.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/BaseTestRunner.js
new file mode 100644
index 0000000..7f484dc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/BaseTestRunner.js
@@ -0,0 +1,323 @@
+package junit.runner;
+
+import junit.framework.*;
+import java.lang.reflect.*;
+import java.text.NumberFormat;
+import java.io.*;
+import java.util.*;
+
+/**
+ * Base class for all test runners.
+ * This class was born live on stage in Sardinia during XP2000.
+ */
+public abstract class BaseTestRunner implements TestListener {
+ public static final String SUITE_METHODNAME= "suite";
+
+ private static Properties fPreferences;
+ static int fgMaxMessageLength= 500;
+ static boolean fgFilterStack= true;
+ boolean fLoading= true;
+
+ /*
+ * Implementation of TestListener
+ */
+ public synchronized void startTest(Test test) {
+ testStarted(test.toString());
+ }
+
+ protected static void setPreferences(Properties preferences) {
+ fPreferences= preferences;
+ }
+
+ protected static Properties getPreferences() {
+ if (fPreferences == null) {
+ fPreferences= new Properties();
+ fPreferences.put("loading", "true");
+ fPreferences.put("filterstack", "true");
+ readPreferences();
+ }
+ return fPreferences;
+ }
+
+ public static void savePreferences() throws IOException {
+ FileOutputStream fos= new FileOutputStream(getPreferencesFile());
+ try {
+ getPreferences().store(fos, "");
+ } finally {
+ fos.close();
+ }
+ }
+
+ public void setPreference(String key, String value) {
+ getPreferences().setProperty(key, value);
+ }
+
+ public synchronized void endTest(Test test) {
+ testEnded(test.toString());
+ }
+
+ public synchronized void addError(final Test test, final Throwable t) {
+ testFailed(TestRunListener.STATUS_ERROR, test, t);
+ }
+
+ public synchronized void addFailure(final Test test, final AssertionFailedError t) {
+ testFailed(TestRunListener.STATUS_FAILURE, test, t);
+ }
+
+ // TestRunListener implementation
+
+ public abstract void testStarted(String testName);
+
+ public abstract void testEnded(String testName);
+
+ public abstract void testFailed(int status, Test test, Throwable t);
+
+ /**
+ * Returns the Test corresponding to the given suite. This is
+ * a template method, subclasses override runFailed(), clearStatus().
+ */
+ public Test getTest(String suiteClassName) {
+ if (suiteClassName.length() <= 0) {
+ clearStatus();
+ return null;
+ }
+ Class testClass= null;
+ try {
+ testClass= loadSuiteClass(suiteClassName);
+ } catch (ClassNotFoundException e) {
+ String clazz= e.getMessage();
+ if (clazz == null)
+ clazz= suiteClassName;
+ runFailed("Class not found \""+clazz+"\"");
+ return null;
+ } catch(Exception e) {
+ runFailed("Error: "+e.toString());
+ return null;
+ }
+ Method suiteMethod= null;
+ try {
+ suiteMethod= testClass.getMethod(SUITE_METHODNAME, new Class[0]);
+ } catch(Exception e) {
+ // try to extract a test suite automatically
+ clearStatus();
+ return new TestSuite(testClass);
+ }
+ if (! Modifier.isStatic(suiteMethod.getModifiers())) {
+ runFailed("Suite() method must be static");
+ return null;
+ }
+ Test test= null;
+ try {
+ test= (Test)suiteMethod.invoke(null, new Class[0]); // static method
+ if (test == null)
+ return test;
+ }
+ catch (InvocationTargetException e) {
+ runFailed("Failed to invoke suite():" + e.getTargetException().toString());
+ return null;
+ }
+ catch (IllegalAccessException e) {
+ runFailed("Failed to invoke suite():" + e.toString());
+ return null;
+ }
+
+ clearStatus();
+ return test;
+ }
+
+ /**
+ * Returns the formatted string of the elapsed time.
+ */
+ public String elapsedTimeAsString(long runTime) {
+ return NumberFormat.getInstance().format((double)runTime/1000);
+ }
+
+ /**
+ * Processes the command line arguments and
+ * returns the name of the suite class to run or null
+ */
+ protected String processArguments(String[] args) {
+ String suiteName= null;
+ for (int i= 0; i < args.length; i++) {
+ if (args[i].equals("-noloading")) {
+ setLoading(false);
+ } else if (args[i].equals("-nofilterstack")) {
+ fgFilterStack= false;
+ } else if (args[i].equals("-c")) {
+ if (args.length > i+1)
+ suiteName= extractClassName(args[i+1]);
+ else
+ System.out.println("Missing Test class name");
+ i++;
+ } else {
+ suiteName= args[i];
+ }
+ }
+ return suiteName;
+ }
+
+ /**
+ * Sets the loading behaviour of the test runner
+ */
+ public void setLoading(boolean enable) {
+ fLoading= enable;
+ }
+ /**
+ * Extract the class name from a String in VA/Java style
+ */
+ public String extractClassName(String className) {
+ if(className.startsWith("Default package for"))
+ return className.substring(className.lastIndexOf(".")+1);
+ return className;
+ }
+
+ /**
+ * Truncates a String to the maximum length.
+ */
+ public static String truncate(String s) {
+ if (fgMaxMessageLength != -1 && s.length() > fgMaxMessageLength)
+ s= s.substring(0, fgMaxMessageLength)+"...";
+ return s;
+ }
+
+ /**
+ * Override to define how to handle a failed loading of
+ * a test suite.
+ */
+ protected abstract void runFailed(String message);
+
+ /**
+ * Returns the loaded Class for a suite name.
+ */
+ protected Class loadSuiteClass(String suiteClassName) throws ClassNotFoundException {
+ return getLoader().load(suiteClassName);
+ }
+
+ /**
+ * Clears the status message.
+ */
+ protected void clearStatus() { // Belongs in the GUI TestRunner class
+ }
+
+ /**
+ * Returns the loader to be used.
+ */
+ public TestSuiteLoader getLoader() {
+ if (useReloadingTestSuiteLoader())
+ return new ReloadingTestSuiteLoader();
+ return new StandardTestSuiteLoader();
+ }
+
+ protected boolean useReloadingTestSuiteLoader() {
+ return getPreference("loading").equals("true") && !inVAJava() && fLoading;
+ }
+
+ private static File getPreferencesFile() {
+ String home= System.getProperty("user.home");
+ return new File(home, "junit.properties");
+ }
+
+ private static void readPreferences() {
+ InputStream is= null;
+ try {
+ is= new FileInputStream(getPreferencesFile());
+ setPreferences(new Properties(getPreferences()));
+ getPreferences().load(is);
+ } catch (IOException e) {
+ try {
+ if (is != null)
+ is.close();
+ } catch (IOException e1) {
+ }
+ }
+ }
+
+ public static String getPreference(String key) {
+ return getPreferences().getProperty(key);
+ }
+
+ public static int getPreference(String key, int dflt) {
+ String value= getPreference(key);
+ int intValue= dflt;
+ if (value == null)
+ return intValue;
+ try {
+ intValue= Integer.parseInt(value);
+ } catch (NumberFormatException ne) {
+ }
+ return intValue;
+ }
+
+ public static boolean inVAJava() {
+ try {
+ Class.forName("com.ibm.uvm.tools.DebugSupport");
+ }
+ catch (Exception e) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Returns a filtered stack trace
+ */
+ public static String getFilteredTrace(Throwable t) {
+ StringWriter stringWriter= new StringWriter();
+ PrintWriter writer= new PrintWriter(stringWriter);
+ t.printStackTrace(writer);
+ StringBuffer buffer= stringWriter.getBuffer();
+ String trace= buffer.toString();
+ return BaseTestRunner.getFilteredTrace(trace);
+ }
+
+ /**
+ * Filters stack frames from internal JUnit classes
+ */
+ public static String getFilteredTrace(String stack) {
+ if (showStackRaw())
+ return stack;
+
+ StringWriter sw= new StringWriter();
+ PrintWriter pw= new PrintWriter(sw);
+ StringReader sr= new StringReader(stack);
+ BufferedReader br= new BufferedReader(sr);
+
+ String line;
+ try {
+ while ((line= br.readLine()) != null) {
+ if (!filterLine(line))
+ pw.println(line);
+ }
+ } catch (Exception IOException) {
+ return stack; // return the stack unfiltered
+ }
+ return sw.toString();
+ }
+
+ protected static boolean showStackRaw() {
+ return !getPreference("filterstack").equals("true") || fgFilterStack == false;
+ }
+
+ static boolean filterLine(String line) {
+ String[] patterns= new String[] {
+ "junit.framework.TestCase",
+ "junit.framework.TestResult",
+ "junit.framework.TestSuite",
+ "junit.framework.Assert.", // don't filter AssertionFailure
+ "junit.swingui.TestRunner",
+ "junit.awtui.TestRunner",
+ "junit.textui.TestRunner",
+ "java.lang.reflect.Method.invoke("
+ };
+ for (int i= 0; i < patterns.length; i++) {
+ if (line.indexOf(patterns[i]) > 0)
+ return true;
+ }
+ return false;
+ }
+
+ static {
+ fgMaxMessageLength= getPreference("maxmessage", fgMaxMessageLength);
+ }
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/ClassPathTestCollector.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/ClassPathTestCollector.js
new file mode 100644
index 0000000..1c26939
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/ClassPathTestCollector.js
@@ -0,0 +1,80 @@
+package junit.runner;
+
+import java.util.*;
+import java.io.*;
+
+/**
+ * An implementation of a TestCollector that consults the
+ * class path. It considers all classes on the class path
+ * excluding classes in JARs. It leaves it up to subclasses
+ * to decide whether a class is a runnable Test.
+ *
+ * @see TestCollector
+ */
+public abstract class ClassPathTestCollector implements TestCollector {
+
+ static final int SUFFIX_LENGTH= ".class".length();
+
+ public ClassPathTestCollector() {
+ }
+
+ public Enumeration collectTests() {
+ String classPath= System.getProperty("java.class.path");
+ Hashtable result = collectFilesInPath(classPath);
+ return result.elements();
+ }
+
+ public Hashtable collectFilesInPath(String classPath) {
+ Hashtable result= collectFilesInRoots(splitClassPath(classPath));
+ return result;
+ }
+
+ Hashtable collectFilesInRoots(Vector roots) {
+ Hashtable result= new Hashtable(100);
+ Enumeration e= roots.elements();
+ while (e.hasMoreElements())
+ gatherFiles(new File((String)e.nextElement()), "", result);
+ return result;
+ }
+
+ void gatherFiles(File classRoot, String classFileName, Hashtable result) {
+ File thisRoot= new File(classRoot, classFileName);
+ if (thisRoot.isFile()) {
+ if (isTestClass(classFileName)) {
+ String className= classNameFromFile(classFileName);
+ result.put(className, className);
+ }
+ return;
+ }
+ String[] contents= thisRoot.list();
+ if (contents != null) {
+ for (int i= 0; i < contents.length; i++)
+ gatherFiles(classRoot, classFileName+File.separatorChar+contents[i], result);
+ }
+ }
+
+ Vector splitClassPath(String classPath) {
+ Vector result= new Vector();
+ String separator= System.getProperty("path.separator");
+ StringTokenizer tokenizer= new StringTokenizer(classPath, separator);
+ while (tokenizer.hasMoreTokens())
+ result.addElement(tokenizer.nextToken());
+ return result;
+ }
+
+ protected boolean isTestClass(String classFileName) {
+ return
+ classFileName.endsWith(".class") &&
+ classFileName.indexOf('$') < 0 &&
+ classFileName.indexOf("Test") > 0;
+ }
+
+ protected String classNameFromFile(String classFileName) {
+ // convert /a/b.class to a.b
+ String s= classFileName.substring(0, classFileName.length()-SUFFIX_LENGTH);
+ String s2= s.replace(File.separatorChar, '.');
+ if (s2.startsWith("."))
+ return s2.substring(1);
+ return s2;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/FailureDetailView.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/FailureDetailView.js
new file mode 100644
index 0000000..3682ac4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/FailureDetailView.js
@@ -0,0 +1,23 @@
+package junit.runner;
+
+import java.awt.Component;
+
+import junit.framework.*;
+
+/**
+ * A view to show a details about a failure
+ */
+public interface FailureDetailView {
+ /**
+ * Returns the component used to present the TraceView
+ */
+ public Component getComponent();
+ /**
+ * Shows details of a TestFailure
+ */
+ public void showFailure(TestFailure failure);
+ /**
+ * Clears the view
+ */
+ public void clear();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/LoadingTestCollector.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/LoadingTestCollector.js
new file mode 100644
index 0000000..e22a249
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/LoadingTestCollector.js
@@ -0,0 +1,69 @@
+package junit.runner;
+
+import java.lang.reflect.*;
+import junit.runner.*;
+import junit.framework.*;
+
+/**
+ * An implementation of a TestCollector that loads
+ * all classes on the class path and tests whether
+ * it is assignable from Test or provides a static suite method.
+ * @see TestCollector
+ */
+public class LoadingTestCollector extends ClassPathTestCollector {
+
+ TestCaseClassLoader fLoader;
+
+ public LoadingTestCollector() {
+ fLoader= new TestCaseClassLoader();
+ }
+
+ protected boolean isTestClass(String classFileName) {
+ try {
+ if (classFileName.endsWith(".class")) {
+ Class testClass= classFromFile(classFileName);
+ return (testClass != null) && isTestClass(testClass);
+ }
+ }
+ catch (ClassNotFoundException expected) {
+ }
+ catch (NoClassDefFoundError notFatal) {
+ }
+ return false;
+ }
+
+ Class classFromFile(String classFileName) throws ClassNotFoundException {
+ String className= classNameFromFile(classFileName);
+ if (!fLoader.isExcluded(className))
+ return fLoader.loadClass(className, false);
+ return null;
+ }
+
+ boolean isTestClass(Class testClass) {
+ if (hasSuiteMethod(testClass))
+ return true;
+ if (Test.class.isAssignableFrom(testClass) &&
+ Modifier.isPublic(testClass.getModifiers()) &&
+ hasPublicConstructor(testClass))
+ return true;
+ return false;
+ }
+
+ boolean hasSuiteMethod(Class testClass) {
+ try {
+ testClass.getMethod(BaseTestRunner.SUITE_METHODNAME, new Class[0]);
+ } catch(Exception e) {
+ return false;
+ }
+ return true;
+ }
+
+ boolean hasPublicConstructor(Class testClass) {
+ try {
+ TestSuite.getTestConstructor(testClass);
+ } catch(NoSuchMethodException e) {
+ return false;
+ }
+ return true;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/ReloadingTestSuiteLoader.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/ReloadingTestSuiteLoader.js
new file mode 100644
index 0000000..a87128d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/ReloadingTestSuiteLoader.js
@@ -0,0 +1,19 @@
+package junit.runner;
+
+/**
+ * A TestSuite loader that can reload classes.
+ */
+public class ReloadingTestSuiteLoader implements TestSuiteLoader {
+
+ public Class load(String suiteClassName) throws ClassNotFoundException {
+ return createLoader().loadClass(suiteClassName, true);
+ }
+
+ public Class reload(Class aClass) throws ClassNotFoundException {
+ return createLoader().loadClass(aClass.getName(), true);
+ }
+
+ protected TestCaseClassLoader createLoader() {
+ return new TestCaseClassLoader();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/SimpleTestCollector.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/SimpleTestCollector.js
new file mode 100644
index 0000000..3527bd9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/SimpleTestCollector.js
@@ -0,0 +1,20 @@
+package junit.runner;
+
+/**
+ * An implementation of a TestCollector that considers
+ * a class to be a test class when it contains the
+ * pattern "Test" in its name
+ * @see TestCollector
+ */
+public class SimpleTestCollector extends ClassPathTestCollector {
+
+ public SimpleTestCollector() {
+ }
+
+ protected boolean isTestClass(String classFileName) {
+ return
+ classFileName.endsWith(".class") &&
+ classFileName.indexOf('$') < 0 &&
+ classFileName.indexOf("Test") > 0;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/Sorter.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/Sorter.js
new file mode 100644
index 0000000..2c82712
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/Sorter.js
@@ -0,0 +1,38 @@
+package junit.runner;
+
+import java.util.*;
+
+import junit.runner.*;
+
+/**
+ * A custom quick sort with support to customize the swap behaviour.
+ * NOTICE: We can't use the the sorting support from the JDK 1.2 collection
+ * classes because of the JDK 1.1.7 compatibility.
+ */
+public class Sorter {
+ public static interface Swapper {
+ public void swap(Vector values, int left, int right);
+ }
+
+ public static void sortStrings(Vector values , int left, int right, Swapper swapper) {
+ int oleft= left;
+ int oright= right;
+ String mid= (String)values.elementAt((left + right) / 2);
+ do {
+ while (((String)(values.elementAt(left))).compareTo(mid) < 0)
+ left++;
+ while (mid.compareTo((String)(values.elementAt(right))) < 0)
+ right--;
+ if (left <= right) {
+ swapper.swap(values, left, right);
+ left++;
+ right--;
+ }
+ } while (left <= right);
+
+ if (oleft < right)
+ sortStrings(values, oleft, right, swapper);
+ if (left < oright)
+ sortStrings(values, left, oright, swapper);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/StandardTestSuiteLoader.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/StandardTestSuiteLoader.js
new file mode 100644
index 0000000..770f3d9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/StandardTestSuiteLoader.js
@@ -0,0 +1,19 @@
+package junit.runner;
+
+/**
+ * The standard test suite loader. It can only load the same class once.
+ */
+public class StandardTestSuiteLoader implements TestSuiteLoader {
+ /**
+ * Uses the system class loader to load the test class
+ */
+ public Class load(String suiteClassName) throws ClassNotFoundException {
+ return Class.forName(suiteClassName);
+ }
+ /**
+ * Uses the system class loader to load the test class
+ */
+ public Class reload(Class aClass) throws ClassNotFoundException {
+ return aClass;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/TestCaseClassLoader.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/TestCaseClassLoader.js
new file mode 100644
index 0000000..5bf6ffd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/TestCaseClassLoader.js
@@ -0,0 +1,224 @@
+package junit.runner;
+
+import java.util.*;
+import java.io.*;
+import java.net.URL;
+import java.util.zip.*;
+
+/**
+ * A custom class loader which enables the reloading
+ * of classes for each test run. The class loader
+ * can be configured with a list of package paths that
+ * should be excluded from loading. The loading
+ * of these packages is delegated to the system class
+ * loader. They will be shared across test runs.
+ * <p>
+ * The list of excluded package paths is specified in
+ * a properties file "excluded.properties" that is located in
+ * the same place as the TestCaseClassLoader class.
+ * <p>
+ * <b>Known limitation:</b> the TestCaseClassLoader cannot load classes
+ * from jar files.
+ */
+
+
+public class TestCaseClassLoader extends ClassLoader {
+ /** scanned class path */
+ private Vector fPathItems;
+ /** default excluded paths */
+ private String[] defaultExclusions= {
+ "junit.framework.",
+ "junit.extensions.",
+ "junit.runner."
+ };
+ /** name of excluded properties file */
+ static final String EXCLUDED_FILE= "excluded.properties";
+ /** excluded paths */
+ private Vector fExcluded;
+
+ /**
+ * Constructs a TestCaseLoader. It scans the class path
+ * and the excluded package paths
+ */
+ public TestCaseClassLoader() {
+ this(System.getProperty("java.class.path"));
+ }
+
+ /**
+ * Constructs a TestCaseLoader. It scans the class path
+ * and the excluded package paths
+ */
+ public TestCaseClassLoader(String classPath) {
+ scanPath(classPath);
+ readExcludedPackages();
+ }
+
+ private void scanPath(String classPath) {
+ String separator= System.getProperty("path.separator");
+ fPathItems= new Vector(10);
+ StringTokenizer st= new StringTokenizer(classPath, separator);
+ while (st.hasMoreTokens()) {
+ fPathItems.addElement(st.nextToken());
+ }
+ }
+
+ public URL getResource(String name) {
+ return ClassLoader.getSystemResource(name);
+ }
+
+ public InputStream getResourceAsStream(String name) {
+ return ClassLoader.getSystemResourceAsStream(name);
+ }
+
+ public boolean isExcluded(String name) {
+ for (int i= 0; i < fExcluded.size(); i++) {
+ if (name.startsWith((String) fExcluded.elementAt(i))) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public synchronized Class loadClass(String name, boolean resolve)
+ throws ClassNotFoundException {
+
+ Class c= findLoadedClass(name);
+ if (c != null)
+ return c;
+ //
+ // Delegate the loading of excluded classes to the
+ // standard class loader.
+ //
+ if (isExcluded(name)) {
+ try {
+ c= findSystemClass(name);
+ return c;
+ } catch (ClassNotFoundException e) {
+ // keep searching
+ }
+ }
+ if (c == null) {
+ byte[] data= lookupClassData(name);
+ if (data == null)
+ throw new ClassNotFoundException();
+ c= defineClass(name, data, 0, data.length);
+ }
+ if (resolve)
+ resolveClass(c);
+ return c;
+ }
+
+ private byte[] lookupClassData(String className) throws ClassNotFoundException {
+ byte[] data= null;
+ for (int i= 0; i < fPathItems.size(); i++) {
+ String path= (String) fPathItems.elementAt(i);
+ String fileName= className.replace('.', '/')+".class";
+ if (isJar(path)) {
+ data= loadJarData(path, fileName);
+ } else {
+ data= loadFileData(path, fileName);
+ }
+ if (data != null)
+ return data;
+ }
+ throw new ClassNotFoundException(className);
+ }
+
+ boolean isJar(String pathEntry) {
+ return pathEntry.endsWith(".jar") || pathEntry.endsWith(".zip");
+ }
+
+ private byte[] loadFileData(String path, String fileName) {
+ File file= new File(path, fileName);
+ if (file.exists()) {
+ return getClassData(file);
+ }
+ return null;
+ }
+
+ private byte[] getClassData(File f) {
+ try {
+ FileInputStream stream= new FileInputStream(f);
+ ByteArrayOutputStream out= new ByteArrayOutputStream(1000);
+ byte[] b= new byte[1000];
+ int n;
+ while ((n= stream.read(b)) != -1)
+ out.write(b, 0, n);
+ stream.close();
+ out.close();
+ return out.toByteArray();
+
+ } catch (IOException e) {
+ }
+ return null;
+ }
+
+ private byte[] loadJarData(String path, String fileName) {
+ ZipFile zipFile= null;
+ InputStream stream= null;
+ File archive= new File(path);
+ if (!archive.exists())
+ return null;
+ try {
+ zipFile= new ZipFile(archive);
+ } catch(IOException io) {
+ return null;
+ }
+ ZipEntry entry= zipFile.getEntry(fileName);
+ if (entry == null)
+ return null;
+ int size= (int) entry.getSize();
+ try {
+ stream= zipFile.getInputStream(entry);
+ byte[] data= new byte[size];
+ int pos= 0;
+ while (pos < size) {
+ int n= stream.read(data, pos, data.length - pos);
+ pos += n;
+ }
+ zipFile.close();
+ return data;
+ } catch (IOException e) {
+ } finally {
+ try {
+ if (stream != null)
+ stream.close();
+ } catch (IOException e) {
+ }
+ }
+ return null;
+ }
+
+ private void readExcludedPackages() {
+ fExcluded= new Vector(10);
+ for (int i= 0; i < defaultExclusions.length; i++)
+ fExcluded.addElement(defaultExclusions[i]);
+
+ InputStream is= getClass().getResourceAsStream(EXCLUDED_FILE);
+ if (is == null)
+ return;
+ Properties p= new Properties();
+ try {
+ p.load(is);
+ }
+ catch (IOException e) {
+ return;
+ } finally {
+ try {
+ is.close();
+ } catch (IOException e) {
+ }
+ }
+ for (Enumeration e= p.propertyNames(); e.hasMoreElements(); ) {
+ String key= (String)e.nextElement();
+ if (key.startsWith("excluded.")) {
+ String path= p.getProperty(key);
+ path= path.trim();
+ if (path.endsWith("*"))
+ path= path.substring(0, path.length()-1);
+ if (path.length() > 0)
+ fExcluded.addElement(path);
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/TestCollector.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/TestCollector.js
new file mode 100644
index 0000000..bd4837a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/TestCollector.js
@@ -0,0 +1,16 @@
+package junit.runner;
+
+import java.util.*;
+
+
+/**
+ * Collects Test class names to be presented
+ * by the TestSelector.
+ * @see TestSelector
+ */
+public interface TestCollector {
+ /**
+ * Returns an enumeration of Strings with qualified class names
+ */
+ public Enumeration collectTests();
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/TestRunListener.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/TestRunListener.js
new file mode 100644
index 0000000..0d81df4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/TestRunListener.js
@@ -0,0 +1,19 @@
+package junit.runner;
+/**
+ * A listener interface for observing the
+ * execution of a test run. Unlike TestListener,
+ * this interface using only primitive objects,
+ * making it suitable for remote test execution.
+ */
+ public interface TestRunListener {
+ /* test status constants*/
+ public static final int STATUS_ERROR= 1;
+ public static final int STATUS_FAILURE= 2;
+
+ public void testRunStarted(String testSuiteName, int testCount);
+ public void testRunEnded(long elapsedTime);
+ public void testRunStopped(long elapsedTime);
+ public void testStarted(String testName);
+ public void testEnded(String testName);
+ public void testFailed(int status, String testName, String trace);
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/TestSuiteLoader.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/TestSuiteLoader.js
new file mode 100644
index 0000000..57d06c4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/TestSuiteLoader.js
@@ -0,0 +1,9 @@
+package junit.runner;
+
+/**
+ * An interface to define how a test suite should be loaded.
+ */
+public interface TestSuiteLoader {
+ abstract public Class load(String suiteClassName) throws ClassNotFoundException;
+ abstract public Class reload(Class aClass) throws ClassNotFoundException;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/Version.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/Version.js
new file mode 100644
index 0000000..f292428
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/Version.js
@@ -0,0 +1,14 @@
+package junit.runner;
+
+/**
+ * This class defines the current version of JUnit
+ */
+public class Version {
+ private Version() {
+ // don't instantiate
+ }
+
+ public static String id() {
+ return "3.8.1";
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/AboutDialog.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/AboutDialog.js
new file mode 100644
index 0000000..1cbfc28
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/AboutDialog.js
@@ -0,0 +1,81 @@
+package junit.swingui;
+
+import java.awt.*;
+import java.awt.event.*;
+
+import javax.swing.*;
+import junit.runner.*;
+
+/**
+ * The AboutDialog.
+ */
+class AboutDialog extends JDialog {
+ public AboutDialog(JFrame parent) {
+ super(parent, true);
+
+ setResizable(false);
+ getContentPane().setLayout(new GridBagLayout());
+ setSize(330, 138);
+ setTitle("About");
+ // setLocationRelativeTo is only available in JDK 1.4
+ try {
+ setLocationRelativeTo(parent);
+ } catch (NoSuchMethodError e) {
+ TestSelector.centerWindow(this);
+ }
+
+ JButton close= new JButton("Close");
+ close.addActionListener(
+ new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ dispose();
+ }
+ }
+ );
+ getRootPane().setDefaultButton(close);
+ JLabel label1= new JLabel("JUnit");
+ label1.setFont(new Font("dialog", Font.PLAIN, 36));
+
+ JLabel label2= new JLabel("JUnit "+Version.id()+" by Kent Beck and Erich Gamma");
+ label2.setFont(new Font("dialog", Font.PLAIN, 14));
+
+ JLabel logo= createLogo();
+
+ GridBagConstraints constraintsLabel1= new GridBagConstraints();
+ constraintsLabel1.gridx = 3; constraintsLabel1.gridy = 0;
+ constraintsLabel1.gridwidth = 1; constraintsLabel1.gridheight = 1;
+ constraintsLabel1.anchor = GridBagConstraints.CENTER;
+ getContentPane().add(label1, constraintsLabel1);
+
+ GridBagConstraints constraintsLabel2= new GridBagConstraints();
+ constraintsLabel2.gridx = 2; constraintsLabel2.gridy = 1;
+ constraintsLabel2.gridwidth = 2; constraintsLabel2.gridheight = 1;
+ constraintsLabel2.anchor = GridBagConstraints.CENTER;
+ getContentPane().add(label2, constraintsLabel2);
+
+ GridBagConstraints constraintsButton1= new GridBagConstraints();
+ constraintsButton1.gridx = 2; constraintsButton1.gridy = 2;
+ constraintsButton1.gridwidth = 2; constraintsButton1.gridheight = 1;
+ constraintsButton1.anchor = GridBagConstraints.CENTER;
+ constraintsButton1.insets= new Insets(8, 0, 8, 0);
+ getContentPane().add(close, constraintsButton1);
+
+ GridBagConstraints constraintsLogo1= new GridBagConstraints();
+ constraintsLogo1.gridx = 2; constraintsLogo1.gridy = 0;
+ constraintsLogo1.gridwidth = 1; constraintsLogo1.gridheight = 1;
+ constraintsLogo1.anchor = GridBagConstraints.CENTER;
+ getContentPane().add(logo, constraintsLogo1);
+
+ addWindowListener(
+ new WindowAdapter() {
+ public void windowClosing(WindowEvent e) {
+ dispose();
+ }
+ }
+ );
+ }
+ protected JLabel createLogo() {
+ Icon icon= TestRunner.getIconResource(BaseTestRunner.class, "logo.gif");
+ return new JLabel(icon);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/CounterPanel.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/CounterPanel.js
new file mode 100644
index 0000000..2b7356a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/CounterPanel.js
@@ -0,0 +1,110 @@
+package junit.swingui;
+
+import java.awt.*;
+
+import javax.swing.*;
+
+/**
+ * A panel with test run counters
+ */
+public class CounterPanel extends JPanel {
+ private JTextField fNumberOfErrors;
+ private JTextField fNumberOfFailures;
+ private JTextField fNumberOfRuns;
+ private Icon fFailureIcon= TestRunner.getIconResource(getClass(), "icons/failure.gif");
+ private Icon fErrorIcon= TestRunner.getIconResource(getClass(), "icons/error.gif");
+
+ private int fTotal;
+
+ public CounterPanel() {
+ super(new GridBagLayout());
+ fNumberOfErrors= createOutputField(5);
+ fNumberOfFailures= createOutputField(5);
+ fNumberOfRuns= createOutputField(9);
+
+ addToGrid(new JLabel("Runs:", JLabel.CENTER),
+ 0, 0, 1, 1, 0.0, 0.0,
+ GridBagConstraints.CENTER, GridBagConstraints.NONE,
+ new Insets(0, 0, 0, 0));
+ addToGrid(fNumberOfRuns,
+ 1, 0, 1, 1, 0.33, 0.0,
+ GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL,
+ new Insets(0, 8, 0, 0));
+
+ addToGrid(new JLabel("Errors:", fErrorIcon, SwingConstants.LEFT),
+ 2, 0, 1, 1, 0.0, 0.0,
+ GridBagConstraints.CENTER, GridBagConstraints.NONE,
+ new Insets(0, 8, 0, 0));
+ addToGrid(fNumberOfErrors,
+ 3, 0, 1, 1, 0.33, 0.0,
+ GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL,
+ new Insets(0, 8, 0, 0));
+
+ addToGrid(new JLabel("Failures:", fFailureIcon, SwingConstants.LEFT),
+ 4, 0, 1, 1, 0.0, 0.0,
+ GridBagConstraints.CENTER, GridBagConstraints.NONE,
+ new Insets(0, 8, 0, 0));
+ addToGrid(fNumberOfFailures,
+ 5, 0, 1, 1, 0.33, 0.0,
+ GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL,
+ new Insets(0, 8, 0, 0));
+ }
+
+ private JTextField createOutputField(int width) {
+ JTextField field= new JTextField("0", width);
+ // force a fixed layout to avoid accidental hiding on relayout
+ field.setMinimumSize(field.getPreferredSize());
+ field.setMaximumSize(field.getPreferredSize());
+ field.setHorizontalAlignment(JTextField.LEFT);
+ field.setFont(StatusLine.BOLD_FONT);
+ field.setEditable(false);
+ field.setBorder(BorderFactory.createEmptyBorder());
+ return field;
+ }
+
+ public void addToGrid(Component comp,
+ int gridx, int gridy, int gridwidth, int gridheight,
+ double weightx, double weighty,
+ int anchor, int fill,
+ Insets insets) {
+
+ GridBagConstraints constraints= new GridBagConstraints();
+ constraints.gridx= gridx;
+ constraints.gridy= gridy;
+ constraints.gridwidth= gridwidth;
+ constraints.gridheight= gridheight;
+ constraints.weightx= weightx;
+ constraints.weighty= weighty;
+ constraints.anchor= anchor;
+ constraints.fill= fill;
+ constraints.insets= insets;
+ add(comp, constraints);
+ }
+
+ public void reset() {
+ setLabelValue(fNumberOfErrors, 0);
+ setLabelValue(fNumberOfFailures, 0);
+ setLabelValue(fNumberOfRuns, 0);
+ fTotal= 0;
+ }
+
+ public void setTotal(int value) {
+ fTotal= value;
+ }
+
+ public void setRunValue(int value) {
+ fNumberOfRuns.setText(Integer.toString(value) + "/" + fTotal);
+ }
+
+ public void setErrorValue(int value) {
+ setLabelValue(fNumberOfErrors, value);
+ }
+
+ public void setFailureValue(int value) {
+ setLabelValue(fNumberOfFailures, value);
+ }
+
+ private void setLabelValue(JTextField label, int value) {
+ label.setText(Integer.toString(value));
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/DefaultFailureDetailView.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/DefaultFailureDetailView.js
new file mode 100644
index 0000000..882d28a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/DefaultFailureDetailView.js
@@ -0,0 +1,94 @@
+package junit.swingui;
+
+import java.awt.*;
+import java.util.*;
+
+import javax.swing.*;
+import junit.framework.TestFailure;
+import junit.runner.*;
+
+/**
+ * A view that shows a stack trace of a failure
+ */
+public class DefaultFailureDetailView implements FailureDetailView {
+ JList fList;
+
+ /**
+ * A ListModel representing the scanned failure stack trace.
+ */
+ static class StackTraceListModel extends AbstractListModel {
+ private Vector fLines= new Vector(20);
+
+ public Object getElementAt(int index) {
+ return fLines.elementAt(index);
+ }
+
+ public int getSize() {
+ return fLines.size();
+ }
+
+ public void setTrace(String trace) {
+ scan(trace);
+ fireContentsChanged(this, 0, fLines.size());
+ }
+
+ public void clear() {
+ fLines.removeAllElements();
+ fireContentsChanged(this, 0, fLines.size());
+ }
+
+ private void scan(String trace) {
+ fLines.removeAllElements();
+ StringTokenizer st= new StringTokenizer(trace, "\n\r", false);
+ while (st.hasMoreTokens())
+ fLines.add(st.nextToken());
+ }
+ }
+
+ /**
+ * Renderer for stack entries
+ */
+ static class StackEntryRenderer extends DefaultListCellRenderer {
+
+ public Component getListCellRendererComponent(
+ JList list, Object value, int modelIndex,
+ boolean isSelected, boolean cellHasFocus) {
+ String text= ((String)value).replace('\t', ' ');
+ Component c= super.getListCellRendererComponent(list, text, modelIndex, isSelected, cellHasFocus);
+ setText(text);
+ setToolTipText(text);
+ return c;
+ }
+ }
+
+ /**
+ * Returns the component used to present the trace
+ */
+ public Component getComponent() {
+ if (fList == null) {
+ fList= new JList(new StackTraceListModel());
+ fList.setFont(new Font("Dialog", Font.PLAIN, 12));
+ fList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ fList.setVisibleRowCount(5);
+ fList.setCellRenderer(new StackEntryRenderer());
+ }
+ return fList;
+ }
+
+ /**
+ * Shows a TestFailure
+ */
+ public void showFailure(TestFailure failure) {
+ getModel().setTrace(BaseTestRunner.getFilteredTrace(failure.trace()));
+ }
+ /**
+ * Clears the output.
+ */
+ public void clear() {
+ getModel().clear();
+ }
+
+ private StackTraceListModel getModel() {
+ return (StackTraceListModel)fList.getModel();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/FailureRunView.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/FailureRunView.js
new file mode 100644
index 0000000..8c75fb9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/FailureRunView.js
@@ -0,0 +1,110 @@
+package junit.swingui;
+
+import java.awt.*;
+
+import javax.swing.*;
+import javax.swing.event.*;
+import junit.framework.*;
+import junit.runner.BaseTestRunner;
+
+
+/**
+ * A view presenting the test failures as a list.
+ */
+public class FailureRunView implements TestRunView {
+ JList fFailureList;
+ TestRunContext fRunContext;
+
+ /**
+ * Renders TestFailures in a JList
+ */
+ static class FailureListCellRenderer extends DefaultListCellRenderer {
+ private Icon fFailureIcon;
+ private Icon fErrorIcon;
+
+ FailureListCellRenderer() {
+ super();
+ loadIcons();
+ }
+
+ void loadIcons() {
+ fFailureIcon= TestRunner.getIconResource(getClass(), "icons/failure.gif");
+ fErrorIcon= TestRunner.getIconResource(getClass(), "icons/error.gif");
+ }
+
+ public Component getListCellRendererComponent(
+ JList list, Object value, int modelIndex,
+ boolean isSelected, boolean cellHasFocus) {
+
+ Component c= super.getListCellRendererComponent(list, value, modelIndex, isSelected, cellHasFocus);
+ TestFailure failure= (TestFailure)value;
+ String text= failure.failedTest().toString();
+ String msg= failure.exceptionMessage();
+ if (msg != null)
+ text+= ":" + BaseTestRunner.truncate(msg);
+
+ if (failure.isFailure()) {
+ if (fFailureIcon != null)
+ setIcon(fFailureIcon);
+ } else {
+ if (fErrorIcon != null)
+ setIcon(fErrorIcon);
+ }
+ setText(text);
+ setToolTipText(text);
+ return c;
+ }
+ }
+
+ public FailureRunView(TestRunContext context) {
+ fRunContext= context;
+ fFailureList= new JList(fRunContext.getFailures());
+ fFailureList.setFont(new Font("Dialog", Font.PLAIN, 12));
+
+ fFailureList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ fFailureList.setCellRenderer(new FailureListCellRenderer());
+ fFailureList.setVisibleRowCount(5);
+
+ fFailureList.addListSelectionListener(
+ new ListSelectionListener() {
+ public void valueChanged(ListSelectionEvent e) {
+ testSelected();
+ }
+ }
+ );
+ }
+
+ public Test getSelectedTest() {
+ int index= fFailureList.getSelectedIndex();
+ if (index == -1)
+ return null;
+
+ ListModel model= fFailureList.getModel();
+ TestFailure failure= (TestFailure)model.getElementAt(index);
+ return failure.failedTest();
+ }
+
+ public void activate() {
+ testSelected();
+ }
+
+ public void addTab(JTabbedPane pane) {
+ JScrollPane scrollPane= new JScrollPane(fFailureList, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
+ Icon errorIcon= TestRunner.getIconResource(getClass(), "icons/error.gif");
+ pane.addTab("Failures", errorIcon, scrollPane, "The list of failed tests");
+ }
+
+ public void revealFailure(Test failure) {
+ fFailureList.setSelectedIndex(0);
+ }
+
+ public void aboutToStart(Test suite, TestResult result) {
+ }
+
+ public void runFinished(Test suite, TestResult result) {
+ }
+
+ protected void testSelected() {
+ fRunContext.handleTestSelected(getSelectedTest());
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/ProgressBar.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/ProgressBar.js
new file mode 100644
index 0000000..0e52304
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/ProgressBar.js
@@ -0,0 +1,42 @@
+package junit.swingui;
+
+import java.awt.Color;
+
+import javax.swing.JProgressBar;
+
+/**
+ * A progress bar showing the green/red status
+ */
+class ProgressBar extends JProgressBar {
+ boolean fError= false;
+
+ public ProgressBar() {
+ super();
+ setForeground(getStatusColor());
+ }
+
+ private Color getStatusColor() {
+ if (fError)
+ return Color.red;
+ return Color.green;
+ }
+
+ public void reset() {
+ fError= false;
+ setForeground(getStatusColor());
+ setValue(0);
+ }
+
+ public void start(int total) {
+ setMaximum(total);
+ reset();
+ }
+
+ public void step(int value, boolean successful) {
+ setValue(value);
+ if (!fError && !successful) {
+ fError= true;
+ setForeground(getStatusColor());
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/StatusLine.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/StatusLine.js
new file mode 100644
index 0000000..9a0e7a5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/StatusLine.js
@@ -0,0 +1,42 @@
+package junit.swingui;
+
+import java.awt.*;
+
+import javax.swing.*;
+import javax.swing.border.BevelBorder;
+
+/**
+ * A status line component.
+ */
+public class StatusLine extends JTextField {
+ public static final Font PLAIN_FONT= new Font("dialog", Font.PLAIN, 12);
+ public static final Font BOLD_FONT= new Font("dialog", Font.BOLD, 12);
+
+ public StatusLine(int preferredWidth) {
+ super();
+ setFont(BOLD_FONT);
+ setEditable(false);
+ setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
+ Dimension d= getPreferredSize();
+ d.width= preferredWidth;
+ setPreferredSize(d);
+ }
+
+ public void showInfo(String message) {
+ setFont(PLAIN_FONT);
+ setForeground(Color.black);
+ setText(message);
+ }
+
+ public void showError(String status) {
+ setFont(BOLD_FONT);
+ setForeground(Color.red);
+ setText(status);
+ setToolTipText(status);
+ }
+
+ public void clear() {
+ setText("");
+ setToolTipText(null);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestHierarchyRunView.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestHierarchyRunView.js
new file mode 100644
index 0000000..cc1c996
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestHierarchyRunView.js
@@ -0,0 +1,72 @@
+package junit.swingui;
+
+import java.util.Vector;
+
+import javax.swing.*;
+import javax.swing.event.*;
+import javax.swing.tree.TreePath;
+import junit.framework.*;
+
+/**
+ * A hierarchical view of a test run.
+ * The contents of a test suite is shown
+ * as a tree.
+ */
+public class TestHierarchyRunView implements TestRunView {
+ TestSuitePanel fTreeBrowser;
+ TestRunContext fTestContext;
+
+ public TestHierarchyRunView(TestRunContext context) {
+ fTestContext= context;
+ fTreeBrowser= new TestSuitePanel();
+ fTreeBrowser.getTree().addTreeSelectionListener(
+ new TreeSelectionListener() {
+ public void valueChanged(TreeSelectionEvent e) {
+ testSelected();
+ }
+ }
+ );
+ }
+
+ public void addTab(JTabbedPane pane) {
+ Icon treeIcon= TestRunner.getIconResource(getClass(), "icons/hierarchy.gif");
+ pane.addTab("Test Hierarchy", treeIcon, fTreeBrowser, "The test hierarchy");
+ }
+
+ public Test getSelectedTest() {
+ return fTreeBrowser.getSelectedTest();
+ }
+
+ public void activate() {
+ testSelected();
+ }
+
+ public void revealFailure(Test failure) {
+ JTree tree= fTreeBrowser.getTree();
+ TestTreeModel model= (TestTreeModel)tree.getModel();
+ Vector vpath= new Vector();
+ int index= model.findTest(failure, (Test)model.getRoot(), vpath);
+ if (index >= 0) {
+ Object[] path= new Object[vpath.size()+1];
+ vpath.copyInto(path);
+ Object last= path[vpath.size()-1];
+ path[vpath.size()]= model.getChild(last, index);
+ TreePath selectionPath= new TreePath(path);
+ tree.setSelectionPath(selectionPath);
+ tree.makeVisible(selectionPath);
+ }
+ }
+
+ public void aboutToStart(Test suite, TestResult result) {
+ fTreeBrowser.showTestTree(suite);
+ result.addListener(fTreeBrowser);
+ }
+
+ public void runFinished(Test suite, TestResult result) {
+ result.removeListener(fTreeBrowser);
+ }
+
+ protected void testSelected() {
+ fTestContext.handleTestSelected(getSelectedTest());
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestRunContext.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestRunContext.js
new file mode 100644
index 0000000..916b545
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestRunContext.js
@@ -0,0 +1,21 @@
+package junit.swingui;
+
+import javax.swing.ListModel;
+
+import junit.framework.Test;
+
+/**
+ * The interface for accessing the Test run context. Test run views
+ * should use this interface rather than accessing the TestRunner
+ * directly.
+ */
+public interface TestRunContext {
+ /**
+ * Handles the selection of a Test.
+ */
+ public void handleTestSelected(Test test);
+ /**
+ * Returns the failure model
+ */
+ public ListModel getFailures();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestRunView.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestRunView.js
new file mode 100644
index 0000000..8142396
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestRunView.js
@@ -0,0 +1,37 @@
+package junit.swingui;
+
+import javax.swing.JTabbedPane;
+import junit.framework.*;
+
+/**
+ * A TestRunView is shown as a page in a tabbed folder.
+ * It contributes the page contents and can return
+ * the currently selected tests. A TestRunView is
+ * notified about the start and finish of a run.
+ */
+interface TestRunView {
+ /**
+ * Returns the currently selected Test in the View
+ */
+ public Test getSelectedTest();
+ /**
+ * Activates the TestRunView
+ */
+ public void activate();
+ /**
+ * Reveals the given failure
+ */
+ public void revealFailure(Test failure);
+ /**
+ * Adds the TestRunView to the test run views tab
+ */
+ public void addTab(JTabbedPane pane);
+ /**
+ * Informs that the suite is about to start
+ */
+ public void aboutToStart(Test suite, TestResult result);
+ /**
+ * Informs that the run of the test suite has finished
+ */
+ public void runFinished(Test suite, TestResult result);
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestRunner.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestRunner.js
new file mode 100644
index 0000000..e82872d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestRunner.js
@@ -0,0 +1,774 @@
+package junit.swingui;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.io.*;
+import java.net.URL;
+import java.util.*;
+
+import javax.swing.*;
+import javax.swing.event.*;
+import junit.framework.*;
+import junit.runner.*;
+
+/**
+ * A Swing based user interface to run tests.
+ * Enter the name of a class which either provides a static
+ * suite method or is a subclass of TestCase.
+ * <pre>
+ * Synopsis: java junit.swingui.TestRunner [-noloading] [TestCase]
+ * </pre>
+ * TestRunner takes as an optional argument the name of the testcase class to be run.
+ */
+public class TestRunner extends BaseTestRunner implements TestRunContext {
+ private static final int GAP= 4;
+ private static final int HISTORY_LENGTH= 5;
+
+ protected JFrame fFrame;
+ private Thread fRunner;
+ private TestResult fTestResult;
+
+ private JComboBox fSuiteCombo;
+ private ProgressBar fProgressIndicator;
+ private DefaultListModel fFailures;
+ private JLabel fLogo;
+ private CounterPanel fCounterPanel;
+ private JButton fRun;
+ private JButton fQuitButton;
+ private JButton fRerunButton;
+ private StatusLine fStatusLine;
+ private FailureDetailView fFailureView;
+ private JTabbedPane fTestViewTab;
+ private JCheckBox fUseLoadingRunner;
+ private Vector fTestRunViews= new Vector(); // view associated with tab in tabbed pane
+
+ private static final String TESTCOLLECTOR_KEY= "TestCollectorClass";
+ private static final String FAILUREDETAILVIEW_KEY= "FailureViewClass";
+
+ public TestRunner() {
+ }
+
+ public static void main(String[] args) {
+ new TestRunner().start(args);
+ }
+
+ public static void run(Class test) {
+ String args[]= { test.getName() };
+ main(args);
+ }
+
+ public void testFailed(final int status, final Test test, final Throwable t) {
+ SwingUtilities.invokeLater(
+ new Runnable() {
+ public void run() {
+ switch (status) {
+ case TestRunListener.STATUS_ERROR:
+ fCounterPanel.setErrorValue(fTestResult.errorCount());
+ appendFailure(test, t);
+ break;
+ case TestRunListener.STATUS_FAILURE:
+ fCounterPanel.setFailureValue(fTestResult.failureCount());
+ appendFailure(test, t);
+ break;
+ }
+ }
+ }
+ );
+ }
+
+ public void testStarted(String testName) {
+ postInfo("Running: "+testName);
+ }
+
+ public void testEnded(String stringName) {
+ synchUI();
+ SwingUtilities.invokeLater(
+ new Runnable() {
+ public void run() {
+ if (fTestResult != null) {
+ fCounterPanel.setRunValue(fTestResult.runCount());
+ fProgressIndicator.step(fTestResult.runCount(), fTestResult.wasSuccessful());
+ }
+ }
+ }
+ );
+ }
+
+ public void setSuite(String suiteName) {
+ fSuiteCombo.getEditor().setItem(suiteName);
+ }
+
+ private void addToHistory(final String suite) {
+ for (int i= 0; i < fSuiteCombo.getItemCount(); i++) {
+ if (suite.equals(fSuiteCombo.getItemAt(i))) {
+ fSuiteCombo.removeItemAt(i);
+ fSuiteCombo.insertItemAt(suite, 0);
+ fSuiteCombo.setSelectedIndex(0);
+ return;
+ }
+ }
+ fSuiteCombo.insertItemAt(suite, 0);
+ fSuiteCombo.setSelectedIndex(0);
+ pruneHistory();
+ }
+
+ private void pruneHistory() {
+ int historyLength= getPreference("maxhistory", HISTORY_LENGTH);
+ if (historyLength < 1)
+ historyLength= 1;
+ for (int i= fSuiteCombo.getItemCount()-1; i > historyLength-1; i--)
+ fSuiteCombo.removeItemAt(i);
+ }
+
+ private void appendFailure(Test test, Throwable t) {
+ fFailures.addElement(new TestFailure(test, t));
+ if (fFailures.size() == 1)
+ revealFailure(test);
+ }
+
+ private void revealFailure(Test test) {
+ for (Enumeration e= fTestRunViews.elements(); e.hasMoreElements(); ) {
+ TestRunView v= (TestRunView) e.nextElement();
+ v.revealFailure(test);
+ }
+ }
+
+ protected void aboutToStart(final Test testSuite) {
+ for (Enumeration e= fTestRunViews.elements(); e.hasMoreElements(); ) {
+ TestRunView v= (TestRunView) e.nextElement();
+ v.aboutToStart(testSuite, fTestResult);
+ }
+ }
+
+ protected void runFinished(final Test testSuite) {
+ SwingUtilities.invokeLater(
+ new Runnable() {
+ public void run() {
+ for (Enumeration e= fTestRunViews.elements(); e.hasMoreElements(); ) {
+ TestRunView v= (TestRunView) e.nextElement();
+ v.runFinished(testSuite, fTestResult);
+ }
+ }
+ }
+ );
+ }
+
+ protected CounterPanel createCounterPanel() {
+ return new CounterPanel();
+ }
+
+ protected JPanel createFailedPanel() {
+ JPanel failedPanel= new JPanel(new GridLayout(0, 1, 0, 2));
+ fRerunButton= new JButton("Run");
+ fRerunButton.setEnabled(false);
+ fRerunButton.addActionListener(
+ new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ rerun();
+ }
+ }
+ );
+ failedPanel.add(fRerunButton);
+ return failedPanel;
+ }
+
+ protected FailureDetailView createFailureDetailView() {
+ String className= BaseTestRunner.getPreference(FAILUREDETAILVIEW_KEY);
+ if (className != null) {
+ Class viewClass= null;
+ try {
+ viewClass= Class.forName(className);
+ return (FailureDetailView)viewClass.newInstance();
+ } catch(Exception e) {
+ JOptionPane.showMessageDialog(fFrame, "Could not create Failure DetailView - using default view");
+ }
+ }
+ return new DefaultFailureDetailView();
+ }
+
+ /**
+ * Creates the JUnit menu. Clients override this
+ * method to add additional menu items.
+ */
+ protected JMenu createJUnitMenu() {
+ JMenu menu= new JMenu("JUnit");
+ menu.setMnemonic('J');
+ JMenuItem mi1= new JMenuItem("About...");
+ mi1.addActionListener(
+ new ActionListener() {
+ public void actionPerformed(ActionEvent event) {
+ about();
+ }
+ }
+ );
+ mi1.setMnemonic('A');
+ menu.add(mi1);
+
+ menu.addSeparator();
+ JMenuItem mi2= new JMenuItem(" Exit ");
+ mi2.addActionListener(
+ new ActionListener() {
+ public void actionPerformed(ActionEvent event) {
+ terminate();
+ }
+ }
+ );
+ mi2.setMnemonic('x');
+ menu.add(mi2);
+
+ return menu;
+ }
+
+ protected JFrame createFrame() {
+ JFrame frame= new JFrame("JUnit");
+ Image icon= loadFrameIcon();
+ if (icon != null)
+ frame.setIconImage(icon);
+ frame.getContentPane().setLayout(new BorderLayout(0, 0));
+
+ frame.addWindowListener(
+ new WindowAdapter() {
+ public void windowClosing(WindowEvent e) {
+ terminate();
+ }
+ }
+ );
+ return frame;
+ }
+
+ protected JLabel createLogo() {
+ JLabel label;
+ Icon icon= getIconResource(BaseTestRunner.class, "logo.gif");
+ if (icon != null)
+ label= new JLabel(icon);
+ else
+ label= new JLabel("JV");
+ label.setToolTipText("JUnit Version "+Version.id());
+ return label;
+ }
+
+ protected void createMenus(JMenuBar mb) {
+ mb.add(createJUnitMenu());
+ }
+
+ protected JCheckBox createUseLoaderCheckBox() {
+ boolean useLoader= useReloadingTestSuiteLoader();
+ JCheckBox box= new JCheckBox("Reload classes every run", useLoader);
+ box.setToolTipText("Use a custom class loader to reload the classes for every run");
+ if (inVAJava())
+ box.setVisible(false);
+ return box;
+ }
+
+ protected JButton createQuitButton() {
+ // spaces required to avoid layout flicker
+ // Exit is shorter than Stop that shows in the same column
+ JButton quit= new JButton(" Exit ");
+ quit.addActionListener(
+ new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ terminate();
+ }
+ }
+ );
+ return quit;
+ }
+
+ protected JButton createRunButton() {
+ JButton run= new JButton("Run");
+ run.setEnabled(true);
+ run.addActionListener(
+ new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ runSuite();
+ }
+ }
+ );
+ return run;
+ }
+
+ protected Component createBrowseButton() {
+ JButton browse= new JButton("...");
+ browse.setToolTipText("Select a Test class");
+ browse.addActionListener(
+ new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ browseTestClasses();
+ }
+ }
+ );
+ return browse;
+ }
+
+ protected StatusLine createStatusLine() {
+ return new StatusLine(380);
+ }
+
+ protected JComboBox createSuiteCombo() {
+ JComboBox combo= new JComboBox();
+ combo.setEditable(true);
+ combo.setLightWeightPopupEnabled(false);
+
+ combo.getEditor().getEditorComponent().addKeyListener(
+ new KeyAdapter() {
+ public void keyTyped(KeyEvent e) {
+ textChanged();
+ if (e.getKeyChar() == KeyEvent.VK_ENTER)
+ runSuite();
+ }
+ }
+ );
+ try {
+ loadHistory(combo);
+ } catch (IOException e) {
+ // fails the first time
+ }
+ combo.addItemListener(
+ new ItemListener() {
+ public void itemStateChanged(ItemEvent event) {
+ if (event.getStateChange() == ItemEvent.SELECTED) {
+ textChanged();
+ }
+ }
+ }
+ );
+ return combo;
+ }
+
+ protected JTabbedPane createTestRunViews() {
+ JTabbedPane pane= new JTabbedPane(JTabbedPane.BOTTOM);
+
+ FailureRunView lv= new FailureRunView(this);
+ fTestRunViews.addElement(lv);
+ lv.addTab(pane);
+
+ TestHierarchyRunView tv= new TestHierarchyRunView(this);
+ fTestRunViews.addElement(tv);
+ tv.addTab(pane);
+
+ pane.addChangeListener(
+ new ChangeListener() {
+ public void stateChanged(ChangeEvent e) {
+ testViewChanged();
+ }
+ }
+ );
+ return pane;
+ }
+
+ public void testViewChanged() {
+ TestRunView view= (TestRunView)fTestRunViews.elementAt(fTestViewTab.getSelectedIndex());
+ view.activate();
+ }
+
+ protected TestResult createTestResult() {
+ return new TestResult();
+ }
+
+ protected JFrame createUI(String suiteName) {
+ JFrame frame= createFrame();
+ JMenuBar mb= new JMenuBar();
+ createMenus(mb);
+ frame.setJMenuBar(mb);
+
+ JLabel suiteLabel= new JLabel("Test class name:");
+ fSuiteCombo= createSuiteCombo();
+ fRun= createRunButton();
+ frame.getRootPane().setDefaultButton(fRun);
+ Component browseButton= createBrowseButton();
+
+ fUseLoadingRunner= createUseLoaderCheckBox();
+ fProgressIndicator= new ProgressBar();
+ fCounterPanel= createCounterPanel();
+
+ fFailures= new DefaultListModel();
+
+ fTestViewTab= createTestRunViews();
+ JPanel failedPanel= createFailedPanel();
+
+ fFailureView= createFailureDetailView();
+ JScrollPane tracePane= new JScrollPane(fFailureView.getComponent(), JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
+
+ fStatusLine= createStatusLine();
+ fQuitButton= createQuitButton();
+ fLogo= createLogo();
+
+ JPanel panel= new JPanel(new GridBagLayout());
+
+ addGrid(panel, suiteLabel, 0, 0, 2, GridBagConstraints.HORIZONTAL, 1.0, GridBagConstraints.WEST);
+ addGrid(panel, fSuiteCombo, 0, 1, 1, GridBagConstraints.HORIZONTAL, 1.0, GridBagConstraints.WEST);
+ addGrid(panel, browseButton, 1, 1, 1, GridBagConstraints.NONE, 0.0, GridBagConstraints.WEST);
+ addGrid(panel, fRun, 2, 1, 1, GridBagConstraints.HORIZONTAL, 0.0, GridBagConstraints.CENTER);
+
+ addGrid(panel, fUseLoadingRunner, 0, 2, 3, GridBagConstraints.NONE, 1.0, GridBagConstraints.WEST);
+ //addGrid(panel, new JSeparator(), 0, 3, 3, GridBagConstraints.HORIZONTAL, 1.0, GridBagConstraints.WEST);
+
+
+ addGrid(panel, fProgressIndicator, 0, 3, 2, GridBagConstraints.HORIZONTAL, 1.0, GridBagConstraints.WEST);
+ addGrid(panel, fLogo, 2, 3, 1, GridBagConstraints.NONE, 0.0, GridBagConstraints.NORTH);
+
+ addGrid(panel, fCounterPanel, 0, 4, 2, GridBagConstraints.NONE, 0.0, GridBagConstraints.WEST);
+ addGrid(panel, new JSeparator(), 0, 5, 2, GridBagConstraints.HORIZONTAL, 1.0, GridBagConstraints.WEST);
+ addGrid(panel, new JLabel("Results:"), 0, 6, 2, GridBagConstraints.HORIZONTAL, 1.0, GridBagConstraints.WEST);
+
+ JSplitPane splitter= new JSplitPane(JSplitPane.VERTICAL_SPLIT, fTestViewTab, tracePane);
+ addGrid(panel, splitter, 0, 7, 2, GridBagConstraints.BOTH, 1.0, GridBagConstraints.WEST);
+
+ addGrid(panel, failedPanel, 2, 7, 1, GridBagConstraints.HORIZONTAL, 0.0, GridBagConstraints.NORTH/*CENTER*/);
+
+ addGrid(panel, fStatusLine, 0, 9, 2, GridBagConstraints.HORIZONTAL, 1.0, GridBagConstraints.CENTER);
+ addGrid(panel, fQuitButton, 2, 9, 1, GridBagConstraints.HORIZONTAL, 0.0, GridBagConstraints.CENTER);
+
+ frame.setContentPane(panel);
+ frame.pack();
+ frame.setLocation(200, 200);
+ return frame;
+ }
+
+ private void addGrid(JPanel p, Component co, int x, int y, int w, int fill, double wx, int anchor) {
+ GridBagConstraints c= new GridBagConstraints();
+ c.gridx= x; c.gridy= y;
+ c.gridwidth= w;
+ c.anchor= anchor;
+ c.weightx= wx;
+ c.fill= fill;
+ if (fill == GridBagConstraints.BOTH || fill == GridBagConstraints.VERTICAL)
+ c.weighty= 1.0;
+ c.insets= new Insets(y == 0 ? 10 : 0, x == 0 ? 10 : GAP, GAP, GAP);
+ p.add(co, c);
+ }
+
+ protected String getSuiteText() {
+ if (fSuiteCombo == null)
+ return "";
+ return (String)fSuiteCombo.getEditor().getItem();
+ }
+
+ public ListModel getFailures() {
+ return fFailures;
+ }
+
+ public void insertUpdate(DocumentEvent event) {
+ textChanged();
+ }
+
+ public void browseTestClasses() {
+ TestCollector collector= createTestCollector();
+ TestSelector selector= new TestSelector(fFrame, collector);
+ if (selector.isEmpty()) {
+ JOptionPane.showMessageDialog(fFrame, "No Test Cases found.\nCheck that the configured \'TestCollector\' is supported on this platform.");
+ return;
+ }
+ selector.show();
+ String className= selector.getSelectedItem();
+ if (className != null)
+ setSuite(className);
+ }
+
+ TestCollector createTestCollector() {
+ String className= BaseTestRunner.getPreference(TESTCOLLECTOR_KEY);
+ if (className != null) {
+ Class collectorClass= null;
+ try {
+ collectorClass= Class.forName(className);
+ return (TestCollector)collectorClass.newInstance();
+ } catch(Exception e) {
+ JOptionPane.showMessageDialog(fFrame, "Could not create TestCollector - using default collector");
+ }
+ }
+ return new SimpleTestCollector();
+ }
+
+ private Image loadFrameIcon() {
+ ImageIcon icon= (ImageIcon)getIconResource(BaseTestRunner.class, "smalllogo.gif");
+ if (icon != null)
+ return icon.getImage();
+ return null;
+ }
+
+ private void loadHistory(JComboBox combo) throws IOException {
+ BufferedReader br= new BufferedReader(new FileReader(getSettingsFile()));
+ int itemCount= 0;
+ try {
+ String line;
+ while ((line= br.readLine()) != null) {
+ combo.addItem(line);
+ itemCount++;
+ }
+ if (itemCount > 0)
+ combo.setSelectedIndex(0);
+
+ } finally {
+ br.close();
+ }
+ }
+
+ private File getSettingsFile() {
+ String home= System.getProperty("user.home");
+ return new File(home,".junitsession");
+ }
+
+ private void postInfo(final String message) {
+ SwingUtilities.invokeLater(
+ new Runnable() {
+ public void run() {
+ showInfo(message);
+ }
+ }
+ );
+ }
+
+ private void postStatus(final String status) {
+ SwingUtilities.invokeLater(
+ new Runnable() {
+ public void run() {
+ showStatus(status);
+ }
+ }
+ );
+ }
+
+ public void removeUpdate(DocumentEvent event) {
+ textChanged();
+ }
+
+ private void rerun() {
+ TestRunView view= (TestRunView)fTestRunViews.elementAt(fTestViewTab.getSelectedIndex());
+ Test rerunTest= view.getSelectedTest();
+ if (rerunTest != null)
+ rerunTest(rerunTest);
+ }
+
+ private void rerunTest(Test test) {
+ if (!(test instanceof TestCase)) {
+ showInfo("Could not reload "+ test.toString());
+ return;
+ }
+ Test reloadedTest= null;
+ TestCase rerunTest= (TestCase)test;
+
+ try {
+ Class reloadedTestClass= getLoader().reload(test.getClass());
+ reloadedTest= TestSuite.createTest(reloadedTestClass, rerunTest.getName());
+ } catch(Exception e) {
+ showInfo("Could not reload "+ test.toString());
+ return;
+ }
+ TestResult result= new TestResult();
+ reloadedTest.run(result);
+
+ String message= reloadedTest.toString();
+ if(result.wasSuccessful())
+ showInfo(message+" was successful");
+ else if (result.errorCount() == 1)
+ showStatus(message+" had an error");
+ else
+ showStatus(message+" had a failure");
+ }
+
+ protected void reset() {
+ fCounterPanel.reset();
+ fProgressIndicator.reset();
+ fRerunButton.setEnabled(false);
+ fFailureView.clear();
+ fFailures.clear();
+ }
+
+ protected void runFailed(String message) {
+ showStatus(message);
+ fRun.setText("Run");
+ fRunner= null;
+ }
+
+ synchronized public void runSuite() {
+ if (fRunner != null) {
+ fTestResult.stop();
+ } else {
+ setLoading(shouldReload());
+ reset();
+ showInfo("Load Test Case...");
+ final String suiteName= getSuiteText();
+ final Test testSuite= getTest(suiteName);
+ if (testSuite != null) {
+ addToHistory(suiteName);
+ doRunTest(testSuite);
+ }
+ }
+ }
+
+ private boolean shouldReload() {
+ return !inVAJava() && fUseLoadingRunner.isSelected();
+ }
+
+
+ synchronized protected void runTest(final Test testSuite) {
+ if (fRunner != null) {
+ fTestResult.stop();
+ } else {
+ reset();
+ if (testSuite != null) {
+ doRunTest(testSuite);
+ }
+ }
+ }
+
+ private void doRunTest(final Test testSuite) {
+ setButtonLabel(fRun, "Stop");
+ fRunner= new Thread("TestRunner-Thread") {
+ public void run() {
+ TestRunner.this.start(testSuite);
+ postInfo("Running...");
+
+ long startTime= System.currentTimeMillis();
+ testSuite.run(fTestResult);
+
+ if (fTestResult.shouldStop()) {
+ postStatus("Stopped");
+ } else {
+ long endTime= System.currentTimeMillis();
+ long runTime= endTime-startTime;
+ postInfo("Finished: " + elapsedTimeAsString(runTime) + " seconds");
+ }
+ runFinished(testSuite);
+ setButtonLabel(fRun, "Run");
+ fRunner= null;
+ System.gc();
+ }
+ };
+ // make sure that the test result is created before we start the
+ // test runner thread so that listeners can register for it.
+ fTestResult= createTestResult();
+ fTestResult.addListener(TestRunner.this);
+ aboutToStart(testSuite);
+
+ fRunner.start();
+ }
+
+ private void saveHistory() throws IOException {
+ BufferedWriter bw= new BufferedWriter(new FileWriter(getSettingsFile()));
+ try {
+ for (int i= 0; i < fSuiteCombo.getItemCount(); i++) {
+ String testsuite= fSuiteCombo.getItemAt(i).toString();
+ bw.write(testsuite, 0, testsuite.length());
+ bw.newLine();
+ }
+ } finally {
+ bw.close();
+ }
+ }
+
+ private void setButtonLabel(final JButton button, final String label) {
+ SwingUtilities.invokeLater(
+ new Runnable() {
+ public void run() {
+ button.setText(label);
+ }
+ }
+ );
+ }
+
+ public void handleTestSelected(Test test) {
+ fRerunButton.setEnabled(test != null && (test instanceof TestCase));
+ showFailureDetail(test);
+ }
+
+ private void showFailureDetail(Test test) {
+ if (test != null) {
+ ListModel failures= getFailures();
+ for (int i= 0; i < failures.getSize(); i++) {
+ TestFailure failure= (TestFailure)failures.getElementAt(i);
+ if (failure.failedTest() == test) {
+ fFailureView.showFailure(failure);
+ return;
+ }
+ }
+ }
+ fFailureView.clear();
+ }
+
+ private void showInfo(String message) {
+ fStatusLine.showInfo(message);
+ }
+
+ private void showStatus(String status) {
+ fStatusLine.showError(status);
+ }
+
+ /**
+ * Starts the TestRunner
+ */
+ public void start(String[] args) {
+ String suiteName= processArguments(args);
+ fFrame= createUI(suiteName);
+ fFrame.pack();
+ fFrame.setVisible(true);
+
+ if (suiteName != null) {
+ setSuite(suiteName);
+ runSuite();
+ }
+ }
+
+ private void start(final Test test) {
+ SwingUtilities.invokeLater(
+ new Runnable() {
+ public void run() {
+ int total= test.countTestCases();
+ fProgressIndicator.start(total);
+ fCounterPanel.setTotal(total);
+ }
+ }
+ );
+ }
+
+ /**
+ * Wait until all the events are processed in the event thread
+ */
+ private void synchUI() {
+ try {
+ SwingUtilities.invokeAndWait(
+ new Runnable() {
+ public void run() {}
+ }
+ );
+ }
+ catch (Exception e) {
+ }
+ }
+
+ /**
+ * Terminates the TestRunner
+ */
+ public void terminate() {
+ fFrame.dispose();
+ try {
+ saveHistory();
+ } catch (IOException e) {
+ System.out.println("Couldn't save test run history");
+ }
+ System.exit(0);
+ }
+
+ public void textChanged() {
+ fRun.setEnabled(getSuiteText().length() > 0);
+ clearStatus();
+ }
+
+ protected void clearStatus() {
+ fStatusLine.clear();
+ }
+
+ public static Icon getIconResource(Class clazz, String name) {
+ URL url= clazz.getResource(name);
+ if (url == null) {
+ System.err.println("Warning: could not load \""+name+"\" icon");
+ return null;
+ }
+ return new ImageIcon(url);
+ }
+
+ private void about() {
+ AboutDialog about= new AboutDialog(fFrame);
+ about.show();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestSelector.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestSelector.js
new file mode 100644
index 0000000..f2eaa7f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestSelector.js
@@ -0,0 +1,258 @@
+package junit.swingui;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.util.*;
+
+import javax.swing.*;
+import javax.swing.event.*;
+import junit.runner.*;
+
+/**
+ * A test class selector. A simple dialog to pick the name of a test suite.
+ */
+class TestSelector extends JDialog {
+ private JButton fCancel;
+ private JButton fOk;
+ private JList fList;
+ private JScrollPane fScrolledList;
+ private JLabel fDescription;
+ private String fSelectedItem;
+
+ /**
+ * Renders TestFailures in a JList
+ */
+ static class TestCellRenderer extends DefaultListCellRenderer {
+ Icon fLeafIcon;
+ Icon fSuiteIcon;
+
+ public TestCellRenderer() {
+ fLeafIcon= UIManager.getIcon("Tree.leafIcon");
+ fSuiteIcon= UIManager.getIcon("Tree.closedIcon");
+ }
+
+ public Component getListCellRendererComponent(
+ JList list, Object value, int modelIndex,
+ boolean isSelected, boolean cellHasFocus) {
+ Component c= super.getListCellRendererComponent(list, value, modelIndex, isSelected, cellHasFocus);
+ String displayString= displayString((String)value);
+
+ if (displayString.startsWith("AllTests"))
+ setIcon(fSuiteIcon);
+ else
+ setIcon(fLeafIcon);
+
+ setText(displayString);
+ return c;
+ }
+
+ public static String displayString(String className) {
+ int typeIndex= className.lastIndexOf('.');
+ if (typeIndex < 0)
+ return className;
+ return className.substring(typeIndex+1) + " - " + className.substring(0, typeIndex);
+ }
+
+ public static boolean matchesKey(String s, char ch) {
+ return ch == Character.toUpperCase(s.charAt(typeIndex(s)));
+ }
+
+ private static int typeIndex(String s) {
+ int typeIndex= s.lastIndexOf('.');
+ int i= 0;
+ if (typeIndex > 0)
+ i= typeIndex+1;
+ return i;
+ }
+ }
+
+ protected class DoubleClickListener extends MouseAdapter {
+ public void mouseClicked(MouseEvent e) {
+ if (e.getClickCount() == 2) {
+ okSelected();
+ }
+ }
+ }
+
+ protected class KeySelectListener extends KeyAdapter {
+ public void keyTyped(KeyEvent e) {
+ keySelectTestClass(e.getKeyChar());
+ }
+ }
+
+ public TestSelector(Frame parent, TestCollector testCollector) {
+ super(parent, true);
+ setSize(350, 300);
+ setResizable(false);
+ // setLocationRelativeTo only exists in 1.4
+ try {
+ setLocationRelativeTo(parent);
+ } catch (NoSuchMethodError e) {
+ centerWindow(this);
+ }
+ setTitle("Test Selector");
+
+ Vector list= null;
+ try {
+ parent.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
+ list= createTestList(testCollector);
+ } finally {
+ parent.setCursor(Cursor.getDefaultCursor());
+ }
+ fList= new JList(list);
+ fList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ fList.setCellRenderer(new TestCellRenderer());
+ fScrolledList= new JScrollPane(fList);
+
+ fCancel= new JButton("Cancel");
+ fDescription= new JLabel("Select the Test class:");
+ fOk= new JButton("OK");
+ fOk.setEnabled(false);
+ getRootPane().setDefaultButton(fOk);
+
+ defineLayout();
+ addListeners();
+ }
+
+ public static void centerWindow(Component c) {
+ Dimension paneSize= c.getSize();
+ Dimension screenSize= c.getToolkit().getScreenSize();
+ c.setLocation((screenSize.width-paneSize.width)/2, (screenSize.height-paneSize.height)/2);
+ }
+
+ private void addListeners() {
+ fCancel.addActionListener(
+ new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ dispose();
+ }
+ }
+ );
+
+ fOk.addActionListener(
+ new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ okSelected();
+ }
+ }
+ );
+
+ fList.addMouseListener(new DoubleClickListener());
+ fList.addKeyListener(new KeySelectListener());
+ fList.addListSelectionListener(
+ new ListSelectionListener() {
+ public void valueChanged(ListSelectionEvent e) {
+ checkEnableOK(e);
+ }
+ }
+ );
+
+ addWindowListener(
+ new WindowAdapter() {
+ public void windowClosing(WindowEvent e) {
+ dispose();
+ }
+ }
+ );
+ }
+
+ private void defineLayout() {
+ getContentPane().setLayout(new GridBagLayout());
+ GridBagConstraints labelConstraints = new GridBagConstraints();
+ labelConstraints.gridx= 0; labelConstraints.gridy= 0;
+ labelConstraints.gridwidth= 1; labelConstraints.gridheight= 1;
+ labelConstraints.fill= GridBagConstraints.BOTH;
+ labelConstraints.anchor= GridBagConstraints.WEST;
+ labelConstraints.weightx= 1.0;
+ labelConstraints.weighty= 0.0;
+ labelConstraints.insets= new Insets(8, 8, 0, 8);
+ getContentPane().add(fDescription, labelConstraints);
+
+ GridBagConstraints listConstraints = new GridBagConstraints();
+ listConstraints.gridx= 0; listConstraints.gridy= 1;
+ listConstraints.gridwidth= 4; listConstraints.gridheight= 1;
+ listConstraints.fill= GridBagConstraints.BOTH;
+ listConstraints.anchor= GridBagConstraints.CENTER;
+ listConstraints.weightx= 1.0;
+ listConstraints.weighty= 1.0;
+ listConstraints.insets= new Insets(8, 8, 8, 8);
+ getContentPane().add(fScrolledList, listConstraints);
+
+ GridBagConstraints okConstraints= new GridBagConstraints();
+ okConstraints.gridx= 2; okConstraints.gridy= 2;
+ okConstraints.gridwidth= 1; okConstraints.gridheight= 1;
+ okConstraints.anchor= java.awt.GridBagConstraints.EAST;
+ okConstraints.insets= new Insets(0, 8, 8, 8);
+ getContentPane().add(fOk, okConstraints);
+
+
+ GridBagConstraints cancelConstraints = new GridBagConstraints();
+ cancelConstraints.gridx= 3; cancelConstraints.gridy= 2;
+ cancelConstraints.gridwidth= 1; cancelConstraints.gridheight= 1;
+ cancelConstraints.anchor= java.awt.GridBagConstraints.EAST;
+ cancelConstraints.insets= new Insets(0, 8, 8, 8);
+ getContentPane().add(fCancel, cancelConstraints);
+ }
+
+ public void checkEnableOK(ListSelectionEvent e) {
+ fOk.setEnabled(fList.getSelectedIndex() != -1);
+ }
+
+ public void okSelected() {
+ fSelectedItem= (String)fList.getSelectedValue();
+ dispose();
+ }
+
+ public boolean isEmpty() {
+ return fList.getModel().getSize() == 0;
+ }
+
+ public void keySelectTestClass(char ch) {
+ ListModel model= fList.getModel();
+ if (!Character.isJavaIdentifierStart(ch))
+ return;
+ for (int i= 0; i < model.getSize(); i++) {
+ String s= (String)model.getElementAt(i);
+ if (TestCellRenderer.matchesKey(s, Character.toUpperCase(ch))) {
+ fList.setSelectedIndex(i);
+ fList.ensureIndexIsVisible(i);
+ return;
+ }
+ }
+ Toolkit.getDefaultToolkit().beep();
+ }
+
+ public String getSelectedItem() {
+ return fSelectedItem;
+ }
+
+ private Vector createTestList(TestCollector collector) {
+ Enumeration each= collector.collectTests();
+ Vector v= new Vector(200);
+ Vector displayVector= new Vector(v.size());
+ while(each.hasMoreElements()) {
+ String s= (String)each.nextElement();
+ v.addElement(s);
+ displayVector.addElement(TestCellRenderer.displayString(s));
+ }
+ if (v.size() > 0)
+ Sorter.sortStrings(displayVector, 0, displayVector.size()-1, new ParallelSwapper(v));
+ return v;
+ }
+
+ private class ParallelSwapper implements Sorter.Swapper {
+ Vector fOther;
+
+ ParallelSwapper(Vector other) {
+ fOther= other;
+ }
+ public void swap(Vector values, int left, int right) {
+ Object tmp= values.elementAt(left);
+ values.setElementAt(values.elementAt(right), left);
+ values.setElementAt(tmp, right);
+ Object tmp2= fOther.elementAt(left);
+ fOther.setElementAt(fOther.elementAt(right), left);
+ fOther.setElementAt(tmp2, right);
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestSuitePanel.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestSuitePanel.js
new file mode 100644
index 0000000..f233f48
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestSuitePanel.js
@@ -0,0 +1,159 @@
+package junit.swingui;
+
+import java.awt.*;
+import java.util.Vector;
+
+import javax.swing.*;
+import javax.swing.tree.*;
+import junit.framework.*;
+
+/**
+ * A Panel showing a test suite as a tree.
+ */
+class TestSuitePanel extends JPanel implements TestListener {
+ private JTree fTree;
+ private JScrollPane fScrollTree;
+ private TestTreeModel fModel;
+
+ static class TestTreeCellRenderer extends DefaultTreeCellRenderer {
+ private Icon fErrorIcon;
+ private Icon fOkIcon;
+ private Icon fFailureIcon;
+
+ TestTreeCellRenderer() {
+ super();
+ loadIcons();
+ }
+
+ void loadIcons() {
+ fErrorIcon= TestRunner.getIconResource(getClass(), "icons/error.gif");
+ fOkIcon= TestRunner.getIconResource(getClass(), "icons/ok.gif");
+ fFailureIcon= TestRunner.getIconResource(getClass(), "icons/failure.gif");
+ }
+
+ String stripParenthesis(Object o) {
+ String text= o.toString ();
+ int pos= text.indexOf('(');
+ if (pos < 1)
+ return text;
+ return text.substring (0, pos);
+ }
+
+ public Component getTreeCellRendererComponent(JTree tree, Object value,
+ boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) {
+
+ Component c= super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);
+ TreeModel model= tree.getModel();
+ if (model instanceof TestTreeModel) {
+ TestTreeModel testModel= (TestTreeModel)model;
+ Test t= (Test)value;
+ String s= "";
+ if (testModel.isFailure(t)) {
+ if (fFailureIcon != null)
+ setIcon(fFailureIcon);
+ s= " - Failed";
+ }
+ else if (testModel.isError(t)) {
+ if (fErrorIcon != null)
+ setIcon(fErrorIcon);
+ s= " - Error";
+ }
+ else if (testModel.wasRun(t)) {
+ if (fOkIcon != null)
+ setIcon(fOkIcon);
+ s= " - Passed";
+ }
+ if (c instanceof JComponent)
+ ((JComponent)c).setToolTipText(getText()+s);
+ }
+ setText(stripParenthesis(value));
+ return c;
+ }
+ }
+
+ public TestSuitePanel() {
+ super(new BorderLayout());
+ setPreferredSize(new Dimension(300, 100));
+ fTree= new JTree();
+ fTree.setModel(null);
+ fTree.setRowHeight(20);
+ ToolTipManager.sharedInstance().registerComponent(fTree);
+ fTree.putClientProperty("JTree.lineStyle", "Angled");
+ fScrollTree= new JScrollPane(fTree);
+ add(fScrollTree, BorderLayout.CENTER);
+ }
+
+ public void addError(final Test test, final Throwable t) {
+ fModel.addError(test);
+ fireTestChanged(test, true);
+ }
+
+ public void addFailure(final Test test, final AssertionFailedError t) {
+ fModel.addFailure(test);
+ fireTestChanged(test, true);
+ }
+
+ /**
+ * A test ended.
+ */
+ public void endTest(Test test) {
+ fModel.addRunTest(test);
+ fireTestChanged(test, false);
+ }
+
+ /**
+ * A test started.
+ */
+ public void startTest(Test test) {
+ }
+
+ /**
+ * Returns the selected test or null if multiple or none is selected
+ */
+ public Test getSelectedTest() {
+ TreePath[] paths= fTree.getSelectionPaths();
+ if (paths != null && paths.length == 1)
+ return (Test)paths[0].getLastPathComponent();
+ return null;
+ }
+
+ /**
+ * Returns the Tree
+ */
+ public JTree getTree() {
+ return fTree;
+ }
+
+ /**
+ * Shows the test hierarchy starting at the given test
+ */
+ public void showTestTree(Test root) {
+ fModel= new TestTreeModel(root);
+ fTree.setModel(fModel);
+ fTree.setCellRenderer(new TestTreeCellRenderer());
+ }
+
+ private void fireTestChanged(final Test test, final boolean expand) {
+ SwingUtilities.invokeLater(
+ new Runnable() {
+ public void run() {
+ Vector vpath= new Vector();
+ int index= fModel.findTest(test, (Test)fModel.getRoot(), vpath);
+ if (index >= 0) {
+ Object[] path= new Object[vpath.size()];
+ vpath.copyInto(path);
+ TreePath treePath= new TreePath(path);
+ fModel.fireNodeChanged(treePath, index);
+ if (expand) {
+ Object[] fullPath= new Object[vpath.size()+1];
+ vpath.copyInto(fullPath);
+ fullPath[vpath.size()]= fModel.getChild(treePath.getLastPathComponent(), index);;
+ TreePath fullTreePath= new TreePath(fullPath);
+ fTree.scrollPathToVisible(fullTreePath);
+ }
+ }
+ }
+ }
+ );
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestTreeModel.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestTreeModel.js
new file mode 100644
index 0000000..a1c79f0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestTreeModel.js
@@ -0,0 +1,184 @@
+package junit.swingui;
+
+import java.util.*;
+
+import javax.swing.event.*;
+import javax.swing.tree.*;
+import junit.extensions.TestDecorator;
+import junit.framework.*;
+
+/**
+ * A tree model for a Test.
+ */
+class TestTreeModel implements TreeModel {
+ private Test fRoot;
+ private Vector fModelListeners= new Vector();
+ private Hashtable fFailures= new Hashtable();
+ private Hashtable fErrors= new Hashtable();
+ private Hashtable fRunTests= new Hashtable();
+
+ /**
+ * Constructs a tree model with the given test as its root.
+ */
+ public TestTreeModel(Test root) {
+ super();
+ fRoot= root;
+ }
+
+ /**
+ * adds a TreeModelListener
+ */
+ public void addTreeModelListener(TreeModelListener l) {
+ if (!fModelListeners.contains(l))
+ fModelListeners.addElement(l);
+ }
+ /**
+ * Removes a TestModelListener
+ */
+ public void removeTreeModelListener(TreeModelListener l) {
+ fModelListeners.removeElement(l);
+ }
+ /**
+ * Finds the path to a test. Returns the index of the test in its
+ * parent test suite.
+ */
+ public int findTest(Test target, Test node, Vector path) {
+ if (target.equals(node))
+ return 0;
+
+ TestSuite suite= isTestSuite(node);
+ for (int i= 0; i < getChildCount(node); i++) {
+ Test t= suite.testAt(i);
+ int index= findTest(target, t, path);
+ if (index >= 0) {
+ path.insertElementAt(node, 0);
+ if (path.size() == 1)
+ return i;
+ return index;
+ }
+ }
+ return -1;
+ }
+ /**
+ * Fires a node changed event
+ */
+ public void fireNodeChanged(TreePath path, int index) {
+ int[] indices= {index};
+ Object[] changedChildren= {getChild(path.getLastPathComponent(), index)};
+ TreeModelEvent event= new TreeModelEvent(this, path, indices, changedChildren);
+
+ Enumeration e= fModelListeners.elements();
+ while (e.hasMoreElements()) {
+ TreeModelListener l= (TreeModelListener) e.nextElement();
+ l.treeNodesChanged(event);
+ }
+ }
+ /**
+ * Gets the test at the given index
+ */
+ public Object getChild(Object parent, int index) {
+ TestSuite suite= isTestSuite(parent);
+ if (suite != null)
+ return suite.testAt(index);
+ return null;
+ }
+ /**
+ * Gets the number of tests.
+ */
+ public int getChildCount(Object parent) {
+ TestSuite suite= isTestSuite(parent);
+ if (suite != null)
+ return suite.testCount();
+ return 0;
+ }
+ /**
+ * Gets the index of a test in a test suite
+ */
+ public int getIndexOfChild(Object parent, Object child) {
+ TestSuite suite= isTestSuite(parent);
+ if (suite != null) {
+ int i= 0;
+ for (Enumeration e= suite.tests(); e.hasMoreElements(); i++) {
+ if (child.equals((Test)e.nextElement()))
+ return i;
+ }
+ }
+ return -1;
+ }
+ /**
+ * Returns the root of the tree
+ */
+ public Object getRoot() {
+ return fRoot;
+ }
+ /**
+ * Tests if the test is a leaf.
+ */
+ public boolean isLeaf(Object node) {
+ return isTestSuite(node) == null;
+ }
+ /**
+ * Tests if the node is a TestSuite.
+ */
+ TestSuite isTestSuite(Object node) {
+ if (node instanceof TestSuite)
+ return (TestSuite)node;
+ if (node instanceof TestDecorator) {
+ Test baseTest= ((TestDecorator)node).getTest();
+ return isTestSuite(baseTest);
+ }
+ return null;
+ }
+
+ /**
+ * Called when the value of the model object was changed in the view
+ */
+ public void valueForPathChanged(TreePath path, Object newValue) {
+ // we don't support direct editing of the model
+ System.out.println("TreeModel.valueForPathChanged: not implemented");
+ }
+ /**
+ * Remembers a test failure
+ */
+ void addFailure(Test t) {
+ fFailures.put(t, t);
+ }
+ /**
+ * Remembers a test error
+ */
+ void addError(Test t) {
+ fErrors.put(t, t);
+ }
+ /**
+ * Remembers that a test was run
+ */
+ void addRunTest(Test t) {
+ fRunTests.put(t, t);
+ }
+ /**
+ * Returns whether a test was run
+ */
+ boolean wasRun(Test t) {
+ return fRunTests.get(t) != null;
+ }
+ /**
+ * Tests whether a test was an error
+ */
+ boolean isError(Test t) {
+ return (fErrors != null) && fErrors.get(t) != null;
+ }
+ /**
+ * Tests whether a test was a failure
+ */
+ boolean isFailure(Test t) {
+ return (fFailures != null) && fFailures.get(t) != null;
+ }
+ /**
+ * Resets the test results
+ */
+ void resetResults() {
+ fFailures= new Hashtable();
+ fRunTests= new Hashtable();
+ fErrors= new Hashtable();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/textui/ResultPrinter.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/textui/ResultPrinter.js
new file mode 100644
index 0000000..6057165
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/textui/ResultPrinter.js
@@ -0,0 +1,138 @@
+
+package junit.textui;
+
+import java.io.PrintStream;
+import java.text.NumberFormat;
+import java.util.Enumeration;
+
+import junit.framework.AssertionFailedError;
+import junit.framework.Test;
+import junit.framework.TestFailure;
+import junit.framework.TestListener;
+import junit.framework.TestResult;
+import junit.runner.BaseTestRunner;
+
+public class ResultPrinter implements TestListener {
+ PrintStream fWriter;
+ int fColumn= 0;
+
+ public ResultPrinter(PrintStream writer)
+ fWriter= writer;
+
+ /* API for use by textui.TestRunner
+ */
+
+ synchronized void print(TestResult result, long runTime) {
+ printHeader(runTime);
+ printErrors(result);
+ printFailures(result);
+ printFooter(result);
+ }
+
+ void printWaitPrompt() {
+ getWriter().println();
+ getWriter().println("<RETURN> to continue");
+ }
+
+ /* Internal methods
+ */
+
+ protected void printHeader(long runTime) {
+ getWriter().println();
+ getWriter().println("Time: "+elapsedTimeAsString(runTime));
+ }
+
+ protected void printErrors(TestResult result) {
+ printDefects(result.errors(), result.errorCount(), "error");
+ }
+
+ protected void printFailures(TestResult result) {
+ printDefects(result.failures(), result.failureCount(), "failure");
+ }
+
+ protected void printDefects(Enumeration booBoos, int count, String type) {
+ if (count == 0) return;
+ if (count == 1)
+ getWriter().println("There was " + count + " " + type + ":");
+ else
+ getWriter().println("There were " + count + " " + type + "s:");
+ for (int i= 1; booBoos.hasMoreElements(); i++) {
+ printDefect((TestFailure) booBoos.nextElement(), i);
+ }
+ }
+
+ public void printDefect(TestFailure booBoo, int count) { // only public for testing purposes
+ printDefectHeader(booBoo, count);
+ printDefectTrace(booBoo);
+ }
+
+ protected void printDefectHeader(TestFailure booBoo, int count) {
+ // I feel like making this a println, then adding a line giving the throwable a chance to print something
+ // before we get to the stack trace.
+ getWriter().print(count + ") " + booBoo.failedTest());
+ }
+
+ protected void printDefectTrace(TestFailure booBoo) {
+ getWriter().print(BaseTestRunner.getFilteredTrace(booBoo.trace()));
+ }
+
+ protected void printFooter(TestResult result) {
+ if (result.wasSuccessful()) {
+ getWriter().println();
+ getWriter().print("OK");
+ getWriter().println (" (" + result.runCount() + " test" + (result.runCount() == 1 ? "": "s") + ")");
+
+ } else {
+ getWriter().println();
+ getWriter().println("FAILURES!!!");
+ getWriter().println("Tests run: "+result.runCount()+
+ ", Failures: "+result.failureCount()+
+ ", Errors: "+result.errorCount());
+ }
+ getWriter().println();
+ }
+
+
+ /**
+ * Returns the formatted string of the elapsed time.
+ * Duplicated from BaseTestRunner. Fix it.
+ */
+ protected String elapsedTimeAsString(long runTime) {
+ return NumberFormat.getInstance().format((double)runTime/1000);
+ }
+
+ public PrintStream getWriter() {
+ return fWriter;
+ }
+ /**
+ * @see junit.framework.TestListener#addError(Test, Throwable)
+ */
+ public void addError(Test test, Throwable t) {
+ getWriter().print("E");
+ }
+
+ /**
+ * @see junit.framework.TestListener#addFailure(Test, AssertionFailedError)
+ */
+ public void addFailure(Test test, AssertionFailedError t) {
+ getWriter().print("F");
+ }
+
+ /**
+ * @see junit.framework.TestListener#endTest(Test)
+ */
+ public void endTest(Test test) {
+ }
+
+ /**
+ * @see junit.framework.TestListener#startTest(Test)
+ */
+ public void startTest(Test test) {
+ getWriter().print(".");
+ if (fColumn++ >= 40) {
+ getWriter().println();
+ fColumn= 0;
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/textui/TestRunner.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/textui/TestRunner.js
new file mode 100644
index 0000000..a34bdfd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/textui/TestRunner.js
@@ -0,0 +1,189 @@
+package junit.textui;
+
+
+import java.io.PrintStream;
+
+import junit.framework.*;
+import junit.runner.*;
+
+/**
+ * A command line based tool to run tests.
+ * <pre>
+ * java junit.textui.TestRunner [-wait] TestCaseClass
+ * </pre>
+ * TestRunner expects the name of a TestCase class as argument.
+ * If this class defines a static <code>suite</code> method it
+ * will be invoked and the returned test is run. Otherwise all
+ * the methods starting with "test" having no arguments are run.
+ * <p>
+ * When the wait command line argument is given TestRunner
+ * waits until the users types RETURN.
+ * <p>
+ * TestRunner prints a trace as the tests are executed followed by a
+ * summary at the end.
+ */
+public class TestRunner extends BaseTestRunner {
+ private ResultPrinter fPrinter;
+
+ public static final int SUCCESS_EXIT= 0;
+ public static final int FAILURE_EXIT= 1;
+ public static final int EXCEPTION_EXIT= 2;
+
+ /**
+ * Constructs a TestRunner.
+ */
+ public TestRunner() {
+ this(System.out);
+ }
+
+ /**
+ * Constructs a TestRunner using the given stream for all the output
+ */
+ public TestRunner(PrintStream writer) {
+ this(new ResultPrinter(writer));
+ }
+
+ /**
+ * Constructs a TestRunner using the given ResultPrinter all the output
+ */
+ public TestRunner(ResultPrinter printer) {
+ fPrinter= printer;
+ }
+
+ /**
+ * Runs a suite extracted from a TestCase subclass.
+ */
+ static public void run(Class testClass) {
+ run(new TestSuite(testClass));
+ }
+
+ /**
+ * Runs a single test and collects its results.
+ * This method can be used to start a test run
+ * from your program.
+ * <pre>
+ * public static void main (String[] args) {
+ * test.textui.TestRunner.run(suite());
+ * }
+ * </pre>
+ */
+ static public TestResult run(Test test) {
+ TestRunner runner= new TestRunner();
+ return runner.doRun(test);
+ }
+
+ /**
+ * Runs a single test and waits until the user
+ * types RETURN.
+ */
+ static public void runAndWait(Test suite) {
+ TestRunner aTestRunner= new TestRunner();
+ aTestRunner.doRun(suite, true);
+ }
+
+ /**
+ * Always use the StandardTestSuiteLoader. Overridden from
+ * BaseTestRunner.
+ */
+ public TestSuiteLoader getLoader() {
+ return new StandardTestSuiteLoader();
+ }
+
+ public void testFailed(int status, Test test, Throwable t) {
+ }
+
+ public void testStarted(String testName) {
+ }
+
+ public void testEnded(String testName) {
+ }
+
+ /**
+ * Creates the TestResult to be used for the test run.
+ */
+ protected TestResult createTestResult() {
+ return new TestResult();
+ }
+
+ public TestResult doRun(Test test) {
+ return doRun(test, false);
+ }
+
+ public TestResult doRun(Test suite, boolean wait) {
+ TestResult result= createTestResult();
+ result.addListener(fPrinter);
+ long startTime= System.currentTimeMillis();
+ suite.run(result);
+ long endTime= System.currentTimeMillis();
+ long runTime= endTime-startTime;
+ fPrinter.print(result, runTime);
+
+ pause(wait);
+ return result;
+ }
+
+ protected void pause(boolean wait) {
+ if (!wait) return;
+ fPrinter.printWaitPrompt();
+ try {
+ System.in.read();
+ }
+ catch(Exception e) {
+ }
+ }
+
+ public static void main(String args[]) {
+ TestRunner aTestRunner= new TestRunner();
+ try {
+ TestResult r= aTestRunner.start(args);
+ if (!r.wasSuccessful())
+ System.exit(FAILURE_EXIT);
+ System.exit(SUCCESS_EXIT);
+ } catch(Exception e) {
+ System.err.println(e.getMessage());
+ System.exit(EXCEPTION_EXIT);
+ }
+ }
+
+ /**
+ * Starts a test run. Analyzes the command line arguments
+ * and runs the given test suite.
+ */
+ protected TestResult start(String args[]) throws Exception {
+ String testCase= "";
+ boolean wait= false;
+
+ for (int i= 0; i < args.length; i++) {
+ if (args[i].equals("-wait"))
+ wait= true;
+ else if (args[i].equals("-c"))
+ testCase= extractClassName(args[++i]);
+ else if (args[i].equals("-v"))
+ System.err.println("JUnit "+Version.id()+" by Kent Beck and Erich Gamma");
+ else
+ testCase= args[i];
+ }
+
+ if (testCase.equals(""))
+ throw new Exception("Usage: TestRunner [-wait] testCaseName, where name is the name of the TestCase class");
+
+ try {
+ Test suite= getTest(testCase);
+ return doRun(suite, wait);
+ }
+ catch(Exception e) {
+ throw new Exception("Could not create and run test suite: "+e);
+ }
+ }
+
+ protected void runFailed(String message) {
+ System.err.println(message);
+ System.exit(FAILURE_EXIT);
+ }
+
+ public void setPrinter(ResultPrinter printer) {
+ fPrinter= printer;
+ }
+
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/p1/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/p1/A.js
new file mode 100644
index 0000000..f662ea4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/p1/A.js
@@ -0,0 +1,7 @@
+package p1;
+
+public class A {
+
+ public static void foo() {
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/p2/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/p2/A.js
new file mode 100644
index 0000000..7344a8f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/p2/A.js
@@ -0,0 +1,6 @@
+package p2;
+
+public class A {
+ public static void foo() {
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/p3/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/p3/B.js
new file mode 100644
index 0000000..795526c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/p3/B.js
@@ -0,0 +1,13 @@
+package p3;
+
+import p1.*;
+
+public class B {
+
+ public static void bar() {
+ p2.A.foo();
+ }
+ public static void main(String[] args) {
+ A.foo();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0001/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0001/Test.js
new file mode 100644
index 0000000..c5df6af
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0001/Test.js
@@ -0,0 +1,3 @@
+ function main(args) {
+ System.out.println("Hello" + " world");
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0002/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0002/Test.js
new file mode 100644
index 0000000..aab5816
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0002/Test.js
@@ -0,0 +1,3 @@
+ function main(args) {
+ System.out.println(new Object());
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0003/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0003/Test.js
new file mode 100644
index 0000000..62ef822
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0003/Test.js
@@ -0,0 +1,3 @@
+ function main(args) {
+ System.out.println(new java.lang.Object());
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0004/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0004/Test.js
new file mode 100644
index 0000000..adfe819
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0004/Test.js
@@ -0,0 +1,3 @@
+ function main(args) {
+ System.out.println(new java.lang.Exception("ERROR"));
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0005/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0005/Test.js
new file mode 100644
index 0000000..d2a60a6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0005/Test.js
@@ -0,0 +1,3 @@
+// public static void main(String[] args) {
+// System.out.println(new java.lang.Object() {});
+// }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0006/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0006/Test.js
new file mode 100644
index 0000000..286d207
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0006/Test.js
@@ -0,0 +1,3 @@
+// public static void main(String[] args) {
+// System.out.println(new java.lang.Runnable() { public void run() {}});
+// }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0007/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0007/Test.js
new file mode 100644
index 0000000..422c099
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0007/Test.js
@@ -0,0 +1,6 @@
+
+// public static void main(String[] args) {
+// System.out.println(new Test().new D());
+// }
+// class D {
+// }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0008/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0008/Test.js
new file mode 100644
index 0000000..bd67d19
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0008/Test.js
@@ -0,0 +1,3 @@
+ function main( args) {
+ System.out.println([1, 2, 3, 4]);
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0009/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0009/Test.js
new file mode 100644
index 0000000..7e9a3b1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0009/Test.js
@@ -0,0 +1,3 @@
+ function main( args) {
+ System.out.println([[1], [2]]);
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0010/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0010/Test.js
new file mode 100644
index 0000000..e734abe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0010/Test.js
@@ -0,0 +1,4 @@
+
+// public static void main(String[] args) {
+// System.out.println(new int[3]);
+// }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0011/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0011/Test.js
new file mode 100644
index 0000000..60b6c6c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0011/Test.js
@@ -0,0 +1,8 @@
+package test0011;
+import java.util.*;
+public class Test {
+
+ public static void main(String[] args) {
+ System.out.println(new int[3][]);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0012/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0012/Test.js
new file mode 100644
index 0000000..5903664
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0012/Test.js
@@ -0,0 +1,8 @@
+package test0012;
+import java.util.*;
+public class Test {
+
+ public static void main(String[] args) {
+ System.out.println(new int[][] {{}, {}});
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0013/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0013/Test.js
new file mode 100644
index 0000000..28d7ea6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0013/Test.js
@@ -0,0 +1,3 @@
+ function main( args) {
+ var i;
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0014/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0014/Test.js
new file mode 100644
index 0000000..7ebb364
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0014/Test.js
@@ -0,0 +1,3 @@
+ function main( args) {
+ var i = 0;
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0015/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0015/Test.js
new file mode 100644
index 0000000..0533c1e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0015/Test.js
@@ -0,0 +1,4 @@
+ function main( args) {
+ var i = 0;
+ i = 1;
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0016/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0016/Test.js
new file mode 100644
index 0000000..6a5dee5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0016/Test.js
@@ -0,0 +1,4 @@
+ function main( args) {
+ var i = 0;
+ i += 2;
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0017/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0017/Test.js
new file mode 100644
index 0000000..6db136e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0017/Test.js
@@ -0,0 +1,5 @@
+ function main( args) {
+ var i = 0;
+ i -= 2;
+ }
+ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0018/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0018/Test.js
new file mode 100644
index 0000000..9ebce8b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0018/Test.js
@@ -0,0 +1,4 @@
+ function main(args) {
+ var i = 0;
+ i *= 2;
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0019/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0019/Test.js
new file mode 100644
index 0000000..e32f353
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0019/Test.js
@@ -0,0 +1,4 @@
+ function main(args) {
+ var i = 0;
+ i /= 2;
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0020/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0020/Test.js
new file mode 100644
index 0000000..47e85c9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0020/Test.js
@@ -0,0 +1,4 @@
+ function main(args) {
+ var i = 0;
+ i &= 2;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0021/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0021/Test.js
new file mode 100644
index 0000000..a86e2d1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0021/Test.js
@@ -0,0 +1,4 @@
+ function main(args) {
+ var i = 0;
+ i |= 2;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0022/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0022/Test.js
new file mode 100644
index 0000000..764418c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0022/Test.js
@@ -0,0 +1,4 @@
+ function main(args) {
+ var i = 0;
+ i ^= 2;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0023/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0023/Test.js
new file mode 100644
index 0000000..528fd89
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0023/Test.js
@@ -0,0 +1,4 @@
+ function main(args) {
+ var i = 0;
+ i %= 2;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0024/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0024/Test.js
new file mode 100644
index 0000000..c91b609
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0024/Test.js
@@ -0,0 +1,4 @@
+ function main(args) {
+ var i = 0;
+ i <<= 2;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0025/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0025/Test.js
new file mode 100644
index 0000000..fc2a9e2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0025/Test.js
@@ -0,0 +1,4 @@
+ function main(args) {
+ var i = 0;
+ i >>= 2;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0026/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0026/Test.js
new file mode 100644
index 0000000..9b9f724
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0026/Test.js
@@ -0,0 +1,4 @@
+ function main(args) {
+ var i = 0;
+ i >>>= 2;
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0027/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0027/Test.js
new file mode 100644
index 0000000..0df0f76
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0027/Test.js
@@ -0,0 +1,4 @@
+ function main(args) {
+ var i = 0;
+ --i;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0028/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0028/Test.js
new file mode 100644
index 0000000..98413eb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0028/Test.js
@@ -0,0 +1,4 @@
+ function main(args) {
+ var i = 0;
+ ++i;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0029/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0029/Test.js
new file mode 100644
index 0000000..e1db223
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0029/Test.js
@@ -0,0 +1,4 @@
+ function main(args) {
+ var i = 0;
+ i--;
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0030/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0030/Test.js
new file mode 100644
index 0000000..f296e14
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0030/Test.js
@@ -0,0 +1,4 @@
+ function main(args) {
+ var i = 0;
+ i++;
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0031/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0031/Test.js
new file mode 100644
index 0000000..f034fdc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0031/Test.js
@@ -0,0 +1,4 @@
+// public static void main(String[] args) {
+// Object o = "Hello";
+// String s = (String) o;
+// }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0032/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0032/Test.js
new file mode 100644
index 0000000..74d1e8c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0032/Test.js
@@ -0,0 +1,4 @@
+// public static void main(String[] args) {
+// double d = 1.0;
+// int i = (int) d;
+// }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0033/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0033/Test.js
new file mode 100644
index 0000000..e0cf337
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0033/Test.js
@@ -0,0 +1,4 @@
+// public static void main(String[] args) {
+// double d = 1.0;
+// float f = (float) d;
+// }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0034/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0034/Test.js
new file mode 100644
index 0000000..c14a27f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0034/Test.js
@@ -0,0 +1,4 @@
+// public static void main(String[] args) {
+// double d = 1.0;
+// byte b = (byte) d;
+// }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0035/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0035/Test.js
new file mode 100644
index 0000000..02cb76f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0035/Test.js
@@ -0,0 +1,6 @@
+
+// function main(String[] args) {
+// double d = 1.0;
+// short s = (short) d;
+// }
+ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0036/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0036/Test.js
new file mode 100644
index 0000000..16d7db6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0036/Test.js
@@ -0,0 +1,4 @@
+// public static void main(String[] args) {
+// double d = 1.0;
+// long l = (long) d;
+// }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0037/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0037/Test.js
new file mode 100644
index 0000000..fdc9a52
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0037/Test.js
@@ -0,0 +1,4 @@
+// public static void main(String[] args) {
+// int i = 1;
+// char c = (char) i;
+// }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0038/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0038/Test.js
new file mode 100644
index 0000000..025e309
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0038/Test.js
@@ -0,0 +1,3 @@
+// public static void main(String[] args) {
+// Class c = int.class;
+// }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0039/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0039/Test.js
new file mode 100644
index 0000000..4a140a9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0039/Test.js
@@ -0,0 +1,3 @@
+// public static void main(String[] args) {
+// Class c = void.class;
+// }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0040/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0040/Test.js
new file mode 100644
index 0000000..514e287
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0040/Test.js
@@ -0,0 +1,3 @@
+// public static void main(String[] args) {
+// Class c = double.class;
+// }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0041/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0041/Test.js
new file mode 100644
index 0000000..5b0bb8f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0041/Test.js
@@ -0,0 +1,3 @@
+// public static void main(String[] args) {
+// Class c = long.class;
+// }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0042/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0042/Test.js
new file mode 100644
index 0000000..60be1ce
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0042/Test.js
@@ -0,0 +1,3 @@
+ function main(args) {
+ System.out.println(false);
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0043/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0043/Test.js
new file mode 100644
index 0000000..3e46359
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0043/Test.js
@@ -0,0 +1,3 @@
+ function main(args) {
+ System.out.println(true);
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0044/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0044/Test.js
new file mode 100644
index 0000000..3566ff3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0044/Test.js
@@ -0,0 +1,3 @@
+ function main(args) {
+ System.out.println(null);
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0045/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0045/Test.js
new file mode 100644
index 0000000..4eb4ac0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0045/Test.js
@@ -0,0 +1,4 @@
+ function main(args) {
+ System.out.println('c');
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0046/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0046/Test.js
new file mode 100644
index 0000000..0309eac
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0046/Test.js
@@ -0,0 +1,4 @@
+ function main(args) {
+ System.out.println(1.00001);
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0047/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0047/Test.js
new file mode 100644
index 0000000..c9b121d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0047/Test.js
@@ -0,0 +1,3 @@
+ function main(args) {
+ System.out.println(1.00001f);
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0048/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0048/Test.js
new file mode 100644
index 0000000..57c8917
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0048/Test.js
@@ -0,0 +1,4 @@
+ function main(args) {
+ System.out.println(30000);
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0049/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0049/Test.js
new file mode 100644
index 0000000..4c97289
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0049/Test.js
@@ -0,0 +1,5 @@
+ function main(args) {
+ System.out.println(-2147483648);
+
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0050/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0050/Test.js
new file mode 100644
index 0000000..e659545
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0050/Test.js
@@ -0,0 +1,5 @@
+ function main(args) {
+ System.out.println(2147483648L);
+
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0051/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0051/Test.js
new file mode 100644
index 0000000..121c864
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0051/Test.js
@@ -0,0 +1,5 @@
+ function main(args) {
+ System.out.println(-2147483648L);
+
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0052/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0052/Test.js
new file mode 100644
index 0000000..a284260
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0052/Test.js
@@ -0,0 +1,5 @@
+ function main(args) {
+ System.out.println(-9223372036854775808L);
+
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0053/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0053/Test.js
new file mode 100644
index 0000000..e44d828
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0053/Test.js
@@ -0,0 +1,5 @@
+ function main(args) {
+ System.out.println("Hello" + " World");
+
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0054/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0054/Test.js
new file mode 100644
index 0000000..bfa4c4a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0054/Test.js
@@ -0,0 +1,5 @@
+ function main( args) {
+ var b = true;
+ var b2 = true;
+ var b3 = b && b2;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0055/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0055/Test.js
new file mode 100644
index 0000000..1fd4af9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0055/Test.js
@@ -0,0 +1,6 @@
+function main(args) {
+ var b = true;
+ var b2 = true;
+ var b3 = b || b2;
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0056/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0056/Test.js
new file mode 100644
index 0000000..987345c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0056/Test.js
@@ -0,0 +1,5 @@
+ function main( args) {
+ var b = true;
+ var b2 = true;
+ var b3 = b == b2;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0057/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0057/Test.js
new file mode 100644
index 0000000..3d49dd4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0057/Test.js
@@ -0,0 +1,6 @@
+function main(args) {
+ var i = 2;
+ var j = 3;
+ var n = i + j;
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0058/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0058/Test.js
new file mode 100644
index 0000000..a95cfa7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0058/Test.js
@@ -0,0 +1,7 @@
+function main(args) {
+ var i = 2;
+ var j = 3;
+ var n = i - j;
+
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0059/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0059/Test.js
new file mode 100644
index 0000000..a8c48a3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0059/Test.js
@@ -0,0 +1,5 @@
+ function main(args) {
+ var i = 2;
+ var j = 3;
+ var n = i * j;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0060/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0060/Test.js
new file mode 100644
index 0000000..d181fdf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0060/Test.js
@@ -0,0 +1,5 @@
+function main(args) {
+ var i = 2;
+ var j = 3;
+ var n = i / j;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0061/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0061/Test.js
new file mode 100644
index 0000000..ac36597
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0061/Test.js
@@ -0,0 +1,5 @@
+function main(args) {
+ var i = 2;
+ var j = 3;
+ var n = i % j;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0062/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0062/Test.js
new file mode 100644
index 0000000..90295df
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0062/Test.js
@@ -0,0 +1,7 @@
+function main(args) {
+ var i = 2;
+ var j = 3;
+ var n = i ^ j;
+
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0063/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0063/Test.js
new file mode 100644
index 0000000..7e547f9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0063/Test.js
@@ -0,0 +1,6 @@
+function main(args) {
+ var i = 2;
+ var j = 3;
+ var n = i & j;
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0064/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0064/Test.js
new file mode 100644
index 0000000..f5f7315
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0064/Test.js
@@ -0,0 +1,6 @@
+function main(args) {
+ var i = 2;
+ var j = 3;
+ var n = i | j;
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0065/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0065/Test.js
new file mode 100644
index 0000000..c5c7c55
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0065/Test.js
@@ -0,0 +1,6 @@
+function main(args) {
+ var b = true;
+ var b1 = true;
+ var b2 = b < b1;
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0066/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0066/Test.js
new file mode 100644
index 0000000..70eb9f0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0066/Test.js
@@ -0,0 +1,6 @@
+function main(args) {
+ var b = true;
+ var b1 = true;
+ var b2 = b <= b1;
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0067/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0067/Test.js
new file mode 100644
index 0000000..0b7226a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0067/Test.js
@@ -0,0 +1,5 @@
+function main(args) {
+ var b = true;
+ var b1 = true;
+ var b2 = b > b1;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0068/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0068/Test.js
new file mode 100644
index 0000000..34f0cd0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0068/Test.js
@@ -0,0 +1,5 @@
+function main(args) {
+ var b = true;
+ var b1 = true;
+ var b2 = b >= b1;
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0069/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0069/Test.js
new file mode 100644
index 0000000..fbd5db9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0069/Test.js
@@ -0,0 +1,5 @@
+ function main( args) {
+ var b = true;
+ var b1 = true;
+ var b2 = b != b1;
+ } \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0070/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0070/Test.js
new file mode 100644
index 0000000..3dee4f6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0070/Test.js
@@ -0,0 +1,4 @@
+ function main( args) {
+ var o = new Object();
+ var b = o instanceof Number;
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0071/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0071/Test.js
new file mode 100644
index 0000000..ed94058
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0071/Test.js
@@ -0,0 +1,4 @@
+ function main(args) {
+ var o = new Object();
+ var b = o instanceof java.lang.Integer;
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0072/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0072/Test.js
new file mode 100644
index 0000000..aec67ad
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0072/Test.js
@@ -0,0 +1,4 @@
+function main(args) {
+ var b = true;
+ var b1 = !b;
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0073/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0073/Test.js
new file mode 100644
index 0000000..b65c196
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0073/Test.js
@@ -0,0 +1,4 @@
+ function main(args) {
+ var i = 2;
+ var n = ~i;
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0074/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0074/Test.js
new file mode 100644
index 0000000..e9c3462
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0074/Test.js
@@ -0,0 +1,3 @@
+function main(args) {
+ var i = +2;
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0075/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0075/Test.js
new file mode 100644
index 0000000..fd33db4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0075/Test.js
@@ -0,0 +1,3 @@
+ function main(args) {
+ var i = -2;
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0076/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0076/Test.js
new file mode 100644
index 0000000..723957f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0076/Test.js
@@ -0,0 +1,4 @@
+ function main(args) {
+ var b = args != null ? true : false;
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0077/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0077/Test.js
new file mode 100644
index 0000000..37dff34
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0077/Test.js
@@ -0,0 +1,5 @@
+ function main(args) {
+ var i = true ? args.length: 0;
+ }
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0078/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0078/Test.js
new file mode 100644
index 0000000..a414f64
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0078/Test.js
@@ -0,0 +1,3 @@
+// public void foo() {
+// super.bar();
+// }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0079/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0079/Test.js
new file mode 100644
index 0000000..c32aa43
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0079/Test.js
@@ -0,0 +1,3 @@
+//function foo() {
+// super.bar(4);
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0080/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0080/Test.js
new file mode 100644
index 0000000..aefc303
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0080/Test.js
@@ -0,0 +1,3 @@
+ function foo() {
+ bar(4);
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0081/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0081/Test.js
new file mode 100644
index 0000000..5073bbe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0081/Test.js
@@ -0,0 +1,4 @@
+ function foo() {
+ this.bar(4);
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0082/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0082/Test.js
new file mode 100644
index 0000000..dbac964
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0082/Test.js
@@ -0,0 +1,4 @@
+ function foo() {
+ for (;;);
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0083/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0083/Test.js
new file mode 100644
index 0000000..df518bf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0083/Test.js
@@ -0,0 +1,4 @@
+ function foo() {
+ for (var i = 0; i < 10; i++) {}
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0084/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0084/Test.js
new file mode 100644
index 0000000..ed90df9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0084/Test.js
@@ -0,0 +1,4 @@
+ function foo() {
+ for (var i = 0; i < 10; i++);
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0085/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0085/Test.js
new file mode 100644
index 0000000..27eafea
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0085/Test.js
@@ -0,0 +1,4 @@
+ function foo() {
+ for (var i = 0;; i++);
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0086/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0086/Test.js
new file mode 100644
index 0000000..2ec6d0e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0086/Test.js
@@ -0,0 +1,3 @@
+ function foo() {
+ for (; i < 10; i++);
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0087/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0087/Test.js
new file mode 100644
index 0000000..377a58f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0087/Test.js
@@ -0,0 +1,4 @@
+ function foo() {
+ for (;;i++);
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0088/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0088/Test.js
new file mode 100644
index 0000000..93fb99e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0088/Test.js
@@ -0,0 +1,4 @@
+ function foo() {
+ var i;
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0089/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0089/Test.js
new file mode 100644
index 0000000..c3bdc7c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0089/Test.js
@@ -0,0 +1,8 @@
+//package test0089;
+//import java.util.*;
+//public class Test {
+// public void foo() {
+ //java.lang.String s;
+// }
+//
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0090/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0090/Test.js
new file mode 100644
index 0000000..149a608
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0090/Test.js
@@ -0,0 +1,4 @@
+ function foo() {
+ var tab = [1, 2];
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0091/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0091/Test.js
new file mode 100644
index 0000000..c94e6c3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0091/Test.js
@@ -0,0 +1,3 @@
+ function foo( s) {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0092/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0092/Test.js
new file mode 100644
index 0000000..ffff995
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0092/Test.js
@@ -0,0 +1,7 @@
+//package test0092;
+//
+//public class Test {
+// public void foo(final String s) {
+// }
+//
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0093/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0093/Test.js
new file mode 100644
index 0000000..8bc7d1a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0093/Test.js
@@ -0,0 +1,6 @@
+ function foo() {
+ for (var i = 0; i < 10; i++) {
+ break;
+ }
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0094/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0094/Test.js
new file mode 100644
index 0000000..cd1c3b1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0094/Test.js
@@ -0,0 +1,7 @@
+ function foo(s) {
+ for (var i = 0; i < 10; i++) {
+ continue;
+ }
+ }
+
+ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0095/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0095/Test.js
new file mode 100644
index 0000000..c26ea05
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0095/Test.js
@@ -0,0 +1,6 @@
+ function foo() {
+ label: for (var i = 0; i < 10; i++) {
+ continue label;
+ }
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0096/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0096/Test.js
new file mode 100644
index 0000000..7098538
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0096/Test.js
@@ -0,0 +1,5 @@
+ function foo() {
+ label: for (var i = 0; i < 10; i++) {
+ break label;
+ }
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0097/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0097/Test.js
new file mode 100644
index 0000000..15d3768
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0097/Test.js
@@ -0,0 +1,11 @@
+ function foo(i) {
+ switch(i) {
+ case 1:
+ break;
+ case 2:
+ System.out.println(2);
+ break;
+ default:
+ System.out.println("default");
+ }
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0098/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0098/Test.js
new file mode 100644
index 0000000..8327916
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0098/Test.js
@@ -0,0 +1,4 @@
+ function foo( i ) {
+ ;
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0099/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0099/Test.js
new file mode 100644
index 0000000..c6fd502
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0099/Test.js
@@ -0,0 +1,5 @@
+ function foo() {
+ do {;
+ } while(true);
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0100/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0100/Test.js
new file mode 100644
index 0000000..90290d3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0100/Test.js
@@ -0,0 +1,4 @@
+ function foo( i ) {
+ while(true);
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0101/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0101/Test.js
new file mode 100644
index 0000000..1fb7f7d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0101/Test.js
@@ -0,0 +1,4 @@
+ function foo(i ) {
+ while(true) {}
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0102/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0102/Test.js
new file mode 100644
index 0000000..6b865fd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0102/Test.js
@@ -0,0 +1,4 @@
+ function main( args) {
+ System.out.println("Hello" + " World" + "!");
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0103/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0103/Test.js
new file mode 100644
index 0000000..c4004bb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0103/Test.js
@@ -0,0 +1,4 @@
+ function main( args) {
+ System.out.println("Hello" + " World" + "!" + "!");
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0104/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0104/Test.js
new file mode 100644
index 0000000..f745b25
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0104/Test.js
@@ -0,0 +1,4 @@
+ function main(args) {
+ System.out.println("Hello" + " World" + "!" + 4);
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0105/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0105/Test.js
new file mode 100644
index 0000000..4174b7f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0105/Test.js
@@ -0,0 +1,4 @@
+ function main( args) {
+ System.out.println(4 + 5 + 6 + 4);
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0106/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0106/Test.js
new file mode 100644
index 0000000..660c282
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0106/Test.js
@@ -0,0 +1,4 @@
+ function main( args) {
+ System.out.println(4 - 5 + 6 + 4);
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0107/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0107/Test.js
new file mode 100644
index 0000000..303432e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0107/Test.js
@@ -0,0 +1,5 @@
+ function main( args) {
+ System.out.println(4 - 5 - 6 - 4);
+
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0108/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0108/Test.js
new file mode 100644
index 0000000..06c6834
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0108/Test.js
@@ -0,0 +1,4 @@
+ function main( args) {
+ System.out.println("4" + 5 + 6 + 4);
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0109/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0109/Test.js
new file mode 100644
index 0000000..3098cde
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0109/Test.js
@@ -0,0 +1,4 @@
+ function main( args) {
+ System.out.println("4" - 5 + 6 + 4);
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0110/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0110/Test.js
new file mode 100644
index 0000000..5a09b21
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0110/Test.js
@@ -0,0 +1,4 @@
+ function foo(i ) {
+ return 2;
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0111/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0111/Test.js
new file mode 100644
index 0000000..d666ee1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0111/Test.js
@@ -0,0 +1,5 @@
+ function foo( i ) {
+ return 2\u003B
+
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0112/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0112/Test.js
new file mode 100644
index 0000000..eda4e13
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0112/Test.js
@@ -0,0 +1,9 @@
+//package test0112;
+//import java.util.*;
+//public class Test {
+// public int foo(int i ) {
+ //synchronized(this) {
+// }
+// }
+
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0113/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0113/Test.js
new file mode 100644
index 0000000..202a007
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0113/Test.js
@@ -0,0 +1,7 @@
+ function foo( i ) {
+ try {
+ } catch( e) {
+ } finally {
+ }
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0114/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0114/Test.js
new file mode 100644
index 0000000..d70ba9f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0114/Test.js
@@ -0,0 +1,7 @@
+function foo(i ) {
+ try {
+ } catch(e) {
+ }
+ }
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0115/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0115/Test.js
new file mode 100644
index 0000000..e376391
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0115/Test.js
@@ -0,0 +1,8 @@
+ function foo(i ) {
+ try {
+ return 2;
+ } catch(e) {
+ }
+ }
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0116/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0116/Test.js
new file mode 100644
index 0000000..9d9a732
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0116/Test.js
@@ -0,0 +1,3 @@
+ function foo(e) {
+ throw e \u003B
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0117/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0117/Test.js
new file mode 100644
index 0000000..83eb0b4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0117/Test.js
@@ -0,0 +1,4 @@
+ function foo(e) {
+ throw e /* comment in the middle of a throw */ \u003B
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0118/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0118/Test.js
new file mode 100644
index 0000000..06f9e97
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0118/Test.js
@@ -0,0 +1,3 @@
+ function foo(e) {
+ throw e /* comment in the middle of a throw */ \u003B/** */
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0119/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0119/Test.js
new file mode 100644
index 0000000..384d33b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0119/Test.js
@@ -0,0 +1,5 @@
+ function foo(e) {
+ if (true)\u003B
+
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0120/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0120/Test.js
new file mode 100644
index 0000000..0c9923e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0120/Test.js
@@ -0,0 +1,6 @@
+ function foo(e) {
+ if (true)\u003B
+ else ;
+ }
+
+ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0121/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0121/Test.js
new file mode 100644
index 0000000..f9eb541
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0121/Test.js
@@ -0,0 +1,6 @@
+ function foo(e) {
+ if (true) {}
+ else ;
+
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0122/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0122/Test.js
new file mode 100644
index 0000000..319beb0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0122/Test.js
@@ -0,0 +1,4 @@
+ function foo(e) {
+ if (true) return 2\u003B
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0123/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0123/Test.js
new file mode 100644
index 0000000..1964b46
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0123/Test.js
@@ -0,0 +1,5 @@
+function foo(e) {
+ if (true) return 2;
+ else return 3;
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0124/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0124/Test.js
new file mode 100644
index 0000000..4ebbd0f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0124/Test.js
@@ -0,0 +1,3 @@
+// function foo(e) {
+// int x= 10, z[] = null, i, j[][];
+// }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0125/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0125/Test.js
new file mode 100644
index 0000000..cc4601d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0125/Test.js
@@ -0,0 +1,8 @@
+//package test0125;
+//import java.util.*;
+//public class Test {
+// public int foo(Exception e) {
+ //int[] x= 10, z[] = null, i, j[][];
+ //}
+//
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0126/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0126/Test.js
new file mode 100644
index 0000000..1cc9aca
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0126/Test.js
@@ -0,0 +1,8 @@
+//package test0126;
+//import java.util.*;
+//public class Test {
+// public void foo(int i) {
+ //for (String[] tab[] = null;; ++i) {}
+// }
+//
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0127/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0127/Test.js
new file mode 100644
index 0000000..c65a633
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0127/Test.js
@@ -0,0 +1,8 @@
+//package test0127;
+//import java.util.*;
+//public class Test {
+// public void foo(int i) {
+ //for (String tab[] = null;; ++i) {}
+// }
+
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0128/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0128/Test.js
new file mode 100644
index 0000000..15bc01c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0128/Test.js
@@ -0,0 +1,4 @@
+function foo(i) {
+ for (var tab = null;; i++/**/) {}
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0129/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0129/Test.js
new file mode 100644
index 0000000..4c7e59c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0129/Test.js
@@ -0,0 +1 @@
+ var i;
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0130/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0130/Test.js
new file mode 100644
index 0000000..98eb359
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0130/Test.js
@@ -0,0 +1 @@
+ var x= 10, y = null, i, j;
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0131/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0131/Test.js
new file mode 100644
index 0000000..04b1276
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0131/Test.js
@@ -0,0 +1,6 @@
+//package test0131;
+//import java.util.*;
+//public class Test {
+// void foo(final int i) {}
+//
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0132/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0132/Test.js
new file mode 100644
index 0000000..25bf20e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0132/Test.js
@@ -0,0 +1,3 @@
+ /** JavaDoc Comment*/
+ function foo(i) {}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0133/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0133/Test.js
new file mode 100644
index 0000000..32f49e0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0133/Test.js
@@ -0,0 +1,4 @@
+ /* Multiple line Comment
+ */
+ function foo(i) {}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0134/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0134/Test.js
new file mode 100644
index 0000000..6e7cfe9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0134/Test.js
@@ -0,0 +1,3 @@
+ // Line comment
+ function foo( i) {}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0135/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0135/Test.js
new file mode 100644
index 0000000..9950f25
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0135/Test.js
@@ -0,0 +1,3 @@
+ /** JavaDoc Comment*/
+ var i;
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0136/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0136/Test.js
new file mode 100644
index 0000000..3fc88f1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0136/Test.js
@@ -0,0 +1,4 @@
+ /* Multiple lines comment
+ */
+ var i;
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0137/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0137/Test.js
new file mode 100644
index 0000000..3ff6ce9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0137/Test.js
@@ -0,0 +1,3 @@
+ // Line comment
+ var i;
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0138/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0138/Test.js
new file mode 100644
index 0000000..eb08a8f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0138/Test.js
@@ -0,0 +1,6 @@
+//package test0138;
+//import java.util.*;
+ // //Line comment
+//public class Test {
+// int i;
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0139/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0139/Test.js
new file mode 100644
index 0000000..3f5d76f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0139/Test.js
@@ -0,0 +1,7 @@
+//package test0139;
+//import java.util.*;
+///* Line comment
+ //*/
+//public class Test {
+// int i;
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0140/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0140/Test.js
new file mode 100644
index 0000000..3b7920d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0140/Test.js
@@ -0,0 +1,6 @@
+//package test0140;
+//import java.util.*;
+///** JavaDoc Comment*/
+//public class Test {
+// int i;
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0141/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0141/Test.js
new file mode 100644
index 0000000..21960a2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0141/Test.js
@@ -0,0 +1,6 @@
+//package test0141;
+//import java.util.*;
+//public class Test {
+// /** JavaDoc Comment*/
+// class B {}
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0142/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0142/Test.js
new file mode 100644
index 0000000..fc8227b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0142/Test.js
@@ -0,0 +1,8 @@
+//package test0142;
+//import java.util.*;
+//public class Test {
+// /* Multiple lines comment
+// */
+// class B {}
+//
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0143/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0143/Test.js
new file mode 100644
index 0000000..55a8364
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0143/Test.js
@@ -0,0 +1,7 @@
+//package test0143;
+//import java.util.*;
+//public class Test {
+// // Line comment
+// public static class B {}
+//
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0144/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0144/Test.js
new file mode 100644
index 0000000..bb451c0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0144/Test.js
@@ -0,0 +1,5 @@
+//package test0144;
+//import java.util.*;
+//public class Test {
+// public static class B {}
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0145/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0145/Test.js
new file mode 100644
index 0000000..1845447
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0145/Test.js
@@ -0,0 +1,5 @@
+//package test0145;
+//import java.util.*;
+//public class Test {
+// {}
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0146/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0146/Test.js
new file mode 100644
index 0000000..fe5b00e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0146/Test.js
@@ -0,0 +1,6 @@
+//package test0146;
+//import java.util.*;
+//public class Test {
+// static {}
+//
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0147/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0147/Test.js
new file mode 100644
index 0000000..e79afcb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0147/Test.js
@@ -0,0 +1,7 @@
+//package test0147;
+//import java.util.*;
+//public class Test {
+//
+// /** JavaDoc Comment*/
+// static {}
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0148/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0148/Test.js
new file mode 100644
index 0000000..e9bd6ec
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0148/Test.js
@@ -0,0 +1,7 @@
+//package test0148;
+//import java.util.*;
+//public class Test {
+//
+// /** JavaDoc Comment*/
+// {}
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0149/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0149/Test.js
new file mode 100644
index 0000000..3edd4a8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0149/Test.js
@@ -0,0 +1,8 @@
+//package test0149;
+//import java.util.*;
+//public class Test {
+//
+// /* JavaDoc Comment
+// */
+// {}
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0150/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0150/Test.js
new file mode 100644
index 0000000..8cd6cff
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0150/Test.js
@@ -0,0 +1 @@
+function foo(){} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0151/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0151/Test.js
new file mode 100644
index 0000000..0ffdf80
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0151/Test.js
@@ -0,0 +1,4 @@
+//package test0151;
+//import java.util.*;
+//public class Test {
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0152/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0152/Test.js
new file mode 100644
index 0000000..4da069e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0152/Test.js
@@ -0,0 +1,2 @@
+ function foo(() {}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0153/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0153/Test.js
new file mode 100644
index 0000000..e5df525
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0153/Test.js
@@ -0,0 +1,4 @@
+ function foo() {
+ var i=
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0154/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0154/Test.js
new file mode 100644
index 0000000..31dbaed
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0154/Test.js
@@ -0,0 +1,7 @@
+//package test0154;
+//import java.util.*;
+//class Test {
+// int[] tab;
+// String[] t;
+// Test[] t2;
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0155/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0155/Test.js
new file mode 100644
index 0000000..4509727
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0155/Test.js
@@ -0,0 +1 @@
+ function m(i, b){}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0156/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0156/Test.js
new file mode 100644
index 0000000..9655361
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0156/Test.js
@@ -0,0 +1,5 @@
+ function foo( i) {
+ i++;
+ return i;
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0159/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0159/Test.js
new file mode 100644
index 0000000..e5de2ea
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0159/Test.js
@@ -0,0 +1,14 @@
+//package test0159;
+//import java.util.*;
+//public class Test {
+// Test(int i){
+// }
+// void n(){
+// final int y= 0;
+// new Test(y){
+// void f(){
+// int y= 9;
+// }
+// };
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0160/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0160/Test.js
new file mode 100644
index 0000000..cc6089d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0160/Test.js
@@ -0,0 +1,3 @@
+
+ var t, g = null;
+ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0161/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0161/Test.js
new file mode 100644
index 0000000..64351d5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0161/Test.js
@@ -0,0 +1,5 @@
+//package test0161;
+//import java.util.*;
+//
+//public class Test implements Cloneable {
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0162/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0162/Test.js
new file mode 100644
index 0000000..f153983
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0162/Test.js
@@ -0,0 +1,5 @@
+//package test0162;
+//import java.util.*;
+//public interface Test {
+//
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0163/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0163/Test.js
new file mode 100644
index 0000000..e0ee73e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0163/Test.js
@@ -0,0 +1,7 @@
+//package test0163;
+//import java.util.*;
+//public class Test {
+// public static void main(String[] args) {
+// System.out.println(new java.lang.Object() {});
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0164/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0164/Test.js
new file mode 100644
index 0000000..f06fecd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0164/Test.js
@@ -0,0 +1,5 @@
+//package test0164;
+//import java.util.*;
+//public class Test {
+// private class B {}
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0165/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0165/Test.js
new file mode 100644
index 0000000..e3bc53b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0165/Test.js
@@ -0,0 +1,8 @@
+//package test0165;
+//import java.util.*;
+//public class Test {
+// void foo() {
+// class C {
+// }
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0166/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0166/Test.js
new file mode 100644
index 0000000..723a26e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0166/Test.js
@@ -0,0 +1,4 @@
+function foo(e) {
+ var x= 10, z = null, i, j;
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0167/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0167/Test.js
new file mode 100644
index 0000000..b2a382b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0167/Test.js
@@ -0,0 +1,3 @@
+// function f() {
+// var f = new Test[1+2].length;
+// }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0168/test1/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0168/test1/Test.js
new file mode 100644
index 0000000..a759e1b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0168/test1/Test.js
@@ -0,0 +1,4 @@
+//package test0168.test1;
+//import java.util.*;
+//public class Test {
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0169/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0169/Test.js
new file mode 100644
index 0000000..0f0f548
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0169/Test.js
@@ -0,0 +1,4 @@
+//package test0169;
+//import java.util.*;
+//public class Test {
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0171/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0171/Test.js
new file mode 100644
index 0000000..4ad6326
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0171/Test.js
@@ -0,0 +1,8 @@
+//package test0171;
+//import java.util.*;
+//
+//class A {
+//}
+//
+//public class Test {
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0172/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0172/Test.js
new file mode 100644
index 0000000..38a5c92
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0172/Test.js
@@ -0,0 +1,9 @@
+ function foo( i) {
+ }
+
+ function main( args) {
+ }
+
+ function bar( s) {
+ return s;
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0173/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0173/Test.js
new file mode 100644
index 0000000..016c507
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0173/Test.js
@@ -0,0 +1,5 @@
+ function foo() {
+ var i = 0;
+ i++;
+ return i;
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0174/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0174/Test.js
new file mode 100644
index 0000000..1230906
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0174/Test.js
@@ -0,0 +1,5 @@
+ var i;
+ function foo() {
+ i++;
+ return i;
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0175/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0175/Test.js
new file mode 100644
index 0000000..218dc0f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0175/Test.js
@@ -0,0 +1 @@
+ var i = 0;
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0176/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0176/Test.js
new file mode 100644
index 0000000..b0929e7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0176/Test.js
@@ -0,0 +1,4 @@
+ var i = 0;
+ function foo() {
+ return i;
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0177/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0177/Test.js
new file mode 100644
index 0000000..3d9687f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0177/Test.js
@@ -0,0 +1,10 @@
+ function bar() {
+ var i = 1.0;
+ System.out.println(i);
+ }
+
+ function foo() {
+ var i = 0;
+ i++;
+ return i;
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0178/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0178/Test.js
new file mode 100644
index 0000000..50ebdf5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0178/Test.js
@@ -0,0 +1,12 @@
+//package test0178;
+//import java.util.*;
+//
+//class Top {
+// int j;
+//}
+//
+//public class Test extends Top {
+// int foo() {
+// return super.j;
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0179/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0179/Test.js
new file mode 100644
index 0000000..337a1a4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0179/Test.js
@@ -0,0 +1,10 @@
+ function foo() {
+ var t = new Test();
+ System.out.println(t);
+ }
+
+ function Test()
+ {
+ }
+
+ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0180/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0180/Test.js
new file mode 100644
index 0000000..9f2ef70
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0180/Test.js
@@ -0,0 +1,8 @@
+//package test0180;
+//import java.util.*;
+//public class Test {
+// public void foo() {
+// Test[] t = new Test[0];
+// System.out.println(t);
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0181/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0181/Test.js
new file mode 100644
index 0000000..2c2e4f2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0181/Test.js
@@ -0,0 +1,8 @@
+//package test0181;
+//import java.util.*;
+//public class Test {
+// public void foo() {
+// Test[] t = {};
+// System.out.println(t);
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0182/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0182/Test.js
new file mode 100644
index 0000000..afd64fa
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0182/Test.js
@@ -0,0 +1,5 @@
+ function foo() {
+ var i= 10;
+ if (/*]*/i < 10/*[*/)
+ foo();
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0183/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0183/Test.js
new file mode 100644
index 0000000..345b77d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0183/Test.js
@@ -0,0 +1,5 @@
+function foo() {
+ var i= 10;
+ if (/*]*/i < 10 && i < 20/*[*/)
+ foo();
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0184/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0184/Test.js
new file mode 100644
index 0000000..830fd19
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0184/Test.js
@@ -0,0 +1,5 @@
+function foo() {
+ var i= 10;
+ if (/*]*/i < 10 || i < 20/*[*/)
+ foo();
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0185/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0185/Test.js
new file mode 100644
index 0000000..17770b3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0185/Test.js
@@ -0,0 +1,5 @@
+function foo() {
+ var i= 10;
+ if (/*]*/i == 10/*[*/)
+ foo();
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0186/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0186/Test.js
new file mode 100644
index 0000000..5d25cab
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0186/Test.js
@@ -0,0 +1,5 @@
+function foo() {
+ var o= null;
+ if (/*]*/o == o/*[*/)
+ foo();
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0187/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0187/Test.js
new file mode 100644
index 0000000..f4885fd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0187/Test.js
@@ -0,0 +1,6 @@
+function foo() {
+ var i= 0;
+ while (/*]*/i <= 10/*[*/)
+ foo();
+ foo();
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0188/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0188/Test.js
new file mode 100644
index 0000000..e207154
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0188/Test.js
@@ -0,0 +1,7 @@
+function foo() {
+ var i= 0;
+ foo();
+ do {
+ foo();
+ } while (/*]*/i <= 10/*[*/);
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0189/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0189/Test.js
new file mode 100644
index 0000000..bd9138d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0189/Test.js
@@ -0,0 +1,4 @@
+function foo() {
+ for (var i= 0;/*[*/ i < 10/*]*/; i++)
+ foo();
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0190/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0190/Test.js
new file mode 100644
index 0000000..a63c419
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0190/Test.js
@@ -0,0 +1,23 @@
+//package test0190;
+//import java.util.*;
+//public class Test {
+// public static class Scanner {
+// public int x;
+// public int y;
+// }
+// public static class Selection {
+// public int start;
+// public int end;
+// }
+//
+// public void foo(Selection selection) {
+// Scanner scanner= new Scanner();
+//
+// if (/*]*/scanner.x < selection.start && selection.start < scanner.y/*[*/) {
+// g();
+// }
+// }
+//
+// public void g() {
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0191/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0191/Test.js
new file mode 100644
index 0000000..8be45ab
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0191/Test.js
@@ -0,0 +1,4 @@
+ function foo() {
+ var b;
+ b= 1 < 10 && /*]*/2 < 20/*[*/;
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0192/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0192/Test.js
new file mode 100644
index 0000000..a8212ea
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0192/Test.js
@@ -0,0 +1,3 @@
+ function foo() {
+ var i= /*]*/0/*[*/;
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0193/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0193/Test.js
new file mode 100644
index 0000000..51bfab2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0193/Test.js
@@ -0,0 +1,9 @@
+//package test0193;
+//import java.util.*;
+//public class Test {
+// class Inner {
+// }
+// public void foo() {
+// Inner inner= /*]*/new Inner();/*[*/
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0194/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0194/Test.js
new file mode 100644
index 0000000..16dec94
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0194/Test.js
@@ -0,0 +1,9 @@
+//package test0194;
+//import java.util.*;
+//public class Test {
+// class Inner {
+// }
+// public void foo() {
+// Inner[] inner= /*]*/new Inner[10];/*[*/
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0195/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0195/Test.js
new file mode 100644
index 0000000..0881de1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0195/Test.js
@@ -0,0 +1,18 @@
+//package test0195;
+//import java.util.*;
+//import java.io.File;
+//
+//class A {
+// public File getFile() {
+// return null;
+// }
+// public void useFile(File file) {
+// }
+//}
+//
+//public class Test {
+// public void foo() {
+// A a= null;
+// a.useFile(/*]*/a.getFile()/*[*/);
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0196/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0196/Test.js
new file mode 100644
index 0000000..6535948
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0196/Test.js
@@ -0,0 +1,11 @@
+//package test0196;
+//import java.util.*;
+//public class Test {
+// class Inner {
+// }
+// public void foo() {
+// Inner inner= null;
+// boolean b;
+// b= /*]*/inner instanceof Inner/*[*/;
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0197/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0197/Test.js
new file mode 100644
index 0000000..84068db
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0197/Test.js
@@ -0,0 +1,16 @@
+//package test0197;
+//import java.io.File;
+//class A {
+// public File getFile() {
+// return null;
+// }
+// public void useFile(File file) {
+// }
+//}
+//
+//public class Test {
+// public void foo() {
+// A a= new A();
+// /*]*/a.getFile()/*[*/.getName();
+// }
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0198/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0198/Test.js
new file mode 100644
index 0000000..c6364f8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0198/Test.js
@@ -0,0 +1,3 @@
+function foo() {
+ return 10 + /*]*/20 * 30/*[*/ + 10;
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0199/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0199/Test.js
new file mode 100644
index 0000000..3dc0360
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0199/Test.js
@@ -0,0 +1,3 @@
+function foo() {
+ var i= 20 + /*]*/10 * 30/*[*/ + 10;
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0200/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0200/Test.js
new file mode 100644
index 0000000..9fab67b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0200/Test.js
@@ -0,0 +1,17 @@
+//package test0200;
+//import java.util.*;
+//import java.io.File;
+//
+//class A {
+// public File getFile() {
+// return null;
+// }
+// public void useFile(File file) {
+// }
+//}
+//
+//public class Test {
+// public void foo() {
+// int f= new A[/*]*/1 + 2/*[*/].length;
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0201/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0201/Test.js
new file mode 100644
index 0000000..8c8ad5f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0201/Test.js
@@ -0,0 +1,6 @@
+function foo() {
+ /*]*/foo();/*[*/
+
+ for (var i= 0; i < 10; i++)
+ foo();
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0202/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0202/Test.js
new file mode 100644
index 0000000..aec0f71
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0202/Test.js
@@ -0,0 +1 @@
+ var f= (2);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0203/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0203/Test.js
new file mode 100644
index 0000000..aec0f71
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0203/Test.js
@@ -0,0 +1 @@
+ var f= (2);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0204/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0204/Test.js
new file mode 100644
index 0000000..84ebb66
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0204/Test.js
@@ -0,0 +1 @@
+ var f= ((2));
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0205/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0205/Test.js
new file mode 100644
index 0000000..3be1b43
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0205/Test.js
@@ -0,0 +1,3 @@
+// void f(){
+// /*[*/class AA extends Test {}/*]*/
+// }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0206/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0206/Test.js
new file mode 100644
index 0000000..00c647d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0206/Test.js
@@ -0,0 +1,9 @@
+// public Test field1;
+// public Test field2;
+// public Test field3;
+// public Test field4;
+// public int i;
+//
+// public int foo() {
+// return field1.field2.field3.field4.i;
+// }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0207/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0207/Test.js
new file mode 100644
index 0000000..28b8153
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0207/Test.js
@@ -0,0 +1,3 @@
+ /** JavaDoc Comment*/
+ function foo( i) {}/**/
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0208/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0208/Test.js
new file mode 100644
index 0000000..2c6aed3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0208/Test.js
@@ -0,0 +1,4 @@
+ /* Multiple line Comment
+ */
+ function foo( i) {}/**/
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0209/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0209/Test.js
new file mode 100644
index 0000000..198f5c4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0209/Test.js
@@ -0,0 +1,3 @@
+ // Line comment
+ function foo( i) {}/**/
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0210/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0210/Test.js
new file mode 100644
index 0000000..517bdf0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0210/Test.js
@@ -0,0 +1,5 @@
+
+ /** JavaDoc Comment*/
+ var i;/**/
+
+ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0211/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0211/Test.js
new file mode 100644
index 0000000..5ffc520
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0211/Test.js
@@ -0,0 +1,6 @@
+
+ /* Multiple lines comment
+ */
+ var i;/**/
+
+ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0212/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0212/Test.js
new file mode 100644
index 0000000..b41f056
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0212/Test.js
@@ -0,0 +1,5 @@
+
+ // Line comment
+ var i;/**/
+
+ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0213/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0213/Test.js
new file mode 100644
index 0000000..18cc6ec
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0213/Test.js
@@ -0,0 +1,3 @@
+
+ var i;
+ /**/ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0214/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0214/Test.js
new file mode 100644
index 0000000..0f45233
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0214/Test.js
@@ -0,0 +1,7 @@
+//package test0214;
+//import java.util.*;
+///* Line comment
+// */
+//public class Test {
+// int i;
+//}/**/ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0215/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0215/Test.js
new file mode 100644
index 0000000..c05bba8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0215/Test.js
@@ -0,0 +1,6 @@
+//package test0215;
+//import java.util.*;
+///** JavaDoc Comment*/
+//public class Test {
+// int i;
+//}/**/ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0216/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0216/Test.js
new file mode 100644
index 0000000..1f44720
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0216/Test.js
@@ -0,0 +1,6 @@
+//package test0216;
+//import java.util.*;
+//public class Test {
+// /** JavaDoc Comment*/
+// class B {}/**/
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0217/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0217/Test.js
new file mode 100644
index 0000000..d14494c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0217/Test.js
@@ -0,0 +1,8 @@
+//package test0217;
+//import java.util.*;
+//public class Test {
+// /* Multiple lines comment
+// */
+// class B {}/**/
+//
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0218/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0218/Test.js
new file mode 100644
index 0000000..258029f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0218/Test.js
@@ -0,0 +1,7 @@
+//package test0218;
+//import java.util.*;
+//public class Test {
+// // Line comment
+// public static class B {}/**/
+//
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0219/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0219/Test.js
new file mode 100644
index 0000000..9528c1c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0219/Test.js
@@ -0,0 +1,5 @@
+//package test0219;
+//import java.util.*;
+//public class Test {
+// public static class B {}/**/
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0220/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0220/Test.js
new file mode 100644
index 0000000..5f00e83
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0220/Test.js
@@ -0,0 +1,5 @@
+//package test0220;
+//import java.util.*;
+//public class Test {
+// {}/**/
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0221/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0221/Test.js
new file mode 100644
index 0000000..1a430ed
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0221/Test.js
@@ -0,0 +1,6 @@
+//package test0221;
+//import java.util.*;
+//public class Test {
+// static {}/**/
+//
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0222/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0222/Test.js
new file mode 100644
index 0000000..ab95632
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0222/Test.js
@@ -0,0 +1,7 @@
+//package test0222;
+//import java.util.*;
+//public class Test {
+//
+// /** JavaDoc Comment*/
+// static {}/**/
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0223/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0223/Test.js
new file mode 100644
index 0000000..5055f42
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0223/Test.js
@@ -0,0 +1,7 @@
+//package test0223;
+//import java.util.*;
+//public class Test {
+//
+// /** JavaDoc Comment*/
+// {}/**/
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0224/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0224/Test.js
new file mode 100644
index 0000000..5e5fd74
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0224/Test.js
@@ -0,0 +1,8 @@
+//package test0224;
+//import java.util.*;
+//public class Test {
+//
+// /* JavaDoc Comment
+// */
+// {}/**/
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0225/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0225/Test.js
new file mode 100644
index 0000000..7c9252d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0225/Test.js
@@ -0,0 +1,6 @@
+ function foo(s) {
+ label: for (var i = 0; i < 10; i++) {
+ continue label;
+ }
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0226/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0226/Test.js
new file mode 100644
index 0000000..d731b74
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0226/Test.js
@@ -0,0 +1,5 @@
+ function foo( s) {
+ label: for (var i = 0; i < 10; i++) {
+ break label;
+ }
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0227/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0227/Test.js
new file mode 100644
index 0000000..c22aaa6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0227/Test.js
@@ -0,0 +1,19 @@
+//package test0227;
+//import java.util.*;
+//class A {
+// long j;
+//}
+//class B {
+// A fA;
+//}
+//class C {
+// B fB;
+//}
+//public class Test {
+// public C field;
+// public int i;
+//
+// public int foo() {
+// return field.fB.fA.j;
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0228/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0228/Test.js
new file mode 100644
index 0000000..616fd32
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0228/Test.js
@@ -0,0 +1,11 @@
+//package test0228;
+//import java.util.*;
+//public class Test {
+// public static int foo() {
+// return 4;
+// }
+//
+// public int bar() {
+// return test0228.Test.foo();
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0229/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0229/Test.js
new file mode 100644
index 0000000..4098608
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0229/Test.js
@@ -0,0 +1,6 @@
+//package test0229;
+//public class Test {
+// public void foo() {
+// System.err.println();
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0230/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0230/Test.js
new file mode 100644
index 0000000..964b84f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0230/Test.js
@@ -0,0 +1,8 @@
+//package test0230;
+//import java.io.PrintStream;
+//public class Test {
+// PrintStream err = System.err;
+// public void foo() {
+// err.println();
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0231/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0231/Test.js
new file mode 100644
index 0000000..ee80fb1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0231/Test.js
@@ -0,0 +1,7 @@
+//package test0231;
+//import java.util.*;
+//public class Test {
+// public void foo() {
+// System.err.println();
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0232/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0232/Test.js
new file mode 100644
index 0000000..f46cb12
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0232/Test.js
@@ -0,0 +1,5 @@
+function foo( array) {
+ var i = array.length;
+ System.out.println(i);
+ }
+ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0233/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0233/Test.js
new file mode 100644
index 0000000..08e3747
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0233/Test.js
@@ -0,0 +1,5 @@
+//package test0233;
+//
+//public class Test {
+// Toto t;
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0234/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0234/Test.js
new file mode 100644
index 0000000..1b68c3c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0234/Test.js
@@ -0,0 +1,4 @@
+//package test0234;
+//public class Test {
+// List field;
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0235/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0235/Test.js
new file mode 100644
index 0000000..f5a07cb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0235/Test.js
@@ -0,0 +1,6 @@
+//package test0235;
+//
+//import java.awt.List;
+//
+//public class Test {
+ var field=new String();
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0236/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0236/Test.js
new file mode 100644
index 0000000..8b1768e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0236/Test.js
@@ -0,0 +1 @@
+ var i= 0, k = 1;
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0238/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0238/Test.js
new file mode 100644
index 0000000..0e84db3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0238/Test.js
@@ -0,0 +1,17 @@
+//package test0238;
+//import java.util.*;
+//
+//public class Test {
+// public int foo() {
+// class X {
+// int foo() {
+// return Test.this.bar();
+// }
+// }
+// return new X().foo();
+// }
+//
+// public int bar() {
+// return 0;
+// }
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0239/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0239/Test.js
new file mode 100644
index 0000000..41acf29
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0239/Test.js
@@ -0,0 +1,23 @@
+//package test0239;
+//
+//import java.util.*;
+//class T {
+// int bar() {
+// return 0;
+// }
+//}
+//
+//public class Test extends T {
+// public int foo() {
+// class X {
+// int foo() {
+// return Test.super.bar();
+// }
+// }
+// return new X().foo();
+// }
+//
+// public int bar() {
+// return 0;
+// }
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0240/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0240/Test.js
new file mode 100644
index 0000000..51b923d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0240/Test.js
@@ -0,0 +1,14 @@
+//package test0240;
+//import java.util.*;
+//public class Test {
+// public int foo() {
+// class X {
+// int foo() {
+// return Test.this.f;
+// }
+// }
+// return new X().foo();
+// }
+//
+// public int f = 0;
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0241/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0241/Test.js
new file mode 100644
index 0000000..62880e5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0241/Test.js
@@ -0,0 +1,27 @@
+
+ var i;
+
+ function foo() {}
+//
+// class B {
+// }
+//
+// class D {
+// }
+
+ function bar() {
+ }
+
+ var j;
+
+ function foo3() {
+ return 3;
+ }
+ var k = foo3();
+
+ var l, n, m;
+
+ function foo2() {
+ }
+
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0242/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0242/Test.js
new file mode 100644
index 0000000..7d5742b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0242/Test.js
@@ -0,0 +1,16 @@
+//package test0242;
+//import java.util.*;
+//class T {
+// public int f = 0;
+//}
+//
+//public class Test extends T {
+// public int foo() {
+// class X {
+// int foo() {
+// return Test.super.f;
+// }
+// }
+// return new X().foo();
+// }
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0243/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0243/Test.js
new file mode 100644
index 0000000..87433dd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0243/Test.js
@@ -0,0 +1,5 @@
+function m(){
+ try{
+ } catch (e){m();}
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0244/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0244/Test.js
new file mode 100644
index 0000000..a24cb54
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0244/Test.js
@@ -0,0 +1,5 @@
+function m(){
+ try{
+ } catch (e){m();}
+}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0245/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0245/Test.js
new file mode 100644
index 0000000..6ebdfab
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0245/Test.js
@@ -0,0 +1,5 @@
+function a() {
+ var i= 0;
+ return i;
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0246/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0246/Test.js
new file mode 100644
index 0000000..2886cb2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0246/Test.js
@@ -0,0 +1,8 @@
+//package test0246;
+//
+//import java.util.*;
+//import java.io.IOException;
+//
+//public class Test {
+//
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0247/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0247/Test.js
new file mode 100644
index 0000000..1dbbb1d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0247/Test.js
@@ -0,0 +1,5 @@
+//package test0247;
+//import java.util.*;
+//public class Test {
+//
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0248/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0248/Test.js
new file mode 100644
index 0000000..3b17542
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0248/Test.js
@@ -0,0 +1,3 @@
+
+ function m( i);
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0249/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0249/Test.js
new file mode 100644
index 0000000..ddc3615
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0249/Test.js
@@ -0,0 +1,12 @@
+//package test0249;
+//import java.util.*;
+//public class Test {
+// int k;
+// static class j{
+// static int k;
+// }
+// void m(){
+// int y= 0;
+// j.k= 0;
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0250/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0250/Test.js
new file mode 100644
index 0000000..0eed919
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0250/Test.js
@@ -0,0 +1,5 @@
+//package test0250;
+//import java.util.*;
+//interface Test {
+// void m(int i, int j);
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0251/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0251/Test.js
new file mode 100644
index 0000000..755d3ce
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0251/Test.js
@@ -0,0 +1,7 @@
+//package test0251;
+//import java.util.*;
+//public class Test {
+// void foo() {
+// java.lang.System.out.println();
+// }
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0252/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0252/Test.js
new file mode 100644
index 0000000..ed8bcd3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0252/Test.js
@@ -0,0 +1,14 @@
+//package test0252;
+//import java.util.*;
+//public class Test {
+// Object foo() {
+// final int j = 4;
+//
+// return new Object() {
+// int bar() {
+// return j;
+// }
+// };
+// }
+//}
+//
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0253/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0253/Test.js
new file mode 100644
index 0000000..cafeb8d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0253/Test.js
@@ -0,0 +1,4 @@
+ function foo() {
+ return new String();
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0254/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0254/Test.js
new file mode 100644
index 0000000..28ab4cc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0254/Test.js
@@ -0,0 +1,11 @@
+//package test0254;
+//import java.util.*;
+//public class Test {
+//
+// class C {
+// }
+//
+// Object foo() {
+// return new Test().new C();
+// }
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0255/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0255/Test.js
new file mode 100644
index 0000000..6d5ad9b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0255/Test.js
@@ -0,0 +1,13 @@
+//package test0255;
+//import java.util.*;
+//public class Test {
+// public void bar() {
+// foo((String[]) null);
+// }
+//
+// void foo(String[] arg) {
+// }
+//
+// void foo(Object arg) {
+// }
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0256/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0256/Test.js
new file mode 100644
index 0000000..0e6a470
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0256/Test.js
@@ -0,0 +1,14 @@
+//package test0256;
+//import java.util.*;
+//public class Test {
+// public void bar() {
+// foo((Object) null);
+// }
+//
+// void foo(String[] arg) {
+// }
+//
+// void foo(Object arg) {
+// }
+//}
+//
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0257/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0257/Test.js
new file mode 100644
index 0000000..b9b41cd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0257/Test.js
@@ -0,0 +1,13 @@
+//package test0257;
+//import java.util.*;
+//public class Test {
+// public void bar() {
+// foo((int) 0);
+// }
+//
+// void foo(int arg) {
+// }
+//
+// void foo(long arg) {
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0258/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0258/Test.js
new file mode 100644
index 0000000..c44fdf9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0258/Test.js
@@ -0,0 +1,14 @@
+//package test0256;
+//import java.util.*;
+//public class Test {
+// public void bar() {
+// foo((java.lang.Object) null);
+// }
+//
+// void foo(String[] arg) {
+// }
+//
+// void foo(Object arg) {
+// }
+//}
+//
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0259/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0259/Test.js
new file mode 100644
index 0000000..05d3b1f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0259/Test.js
@@ -0,0 +1,5 @@
+ function m(){
+ var i, /*[*/ j/*]*/;
+ return 0;
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0260/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0260/Test.js
new file mode 100644
index 0000000..0d6fb5b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0260/Test.js
@@ -0,0 +1,5 @@
+//package test0260;
+//import java.util.*;
+//public interface Test {
+// void m(int i, int j);
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0261/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0261/Test.js
new file mode 100644
index 0000000..4dc0bb1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0261/Test.js
@@ -0,0 +1,4 @@
+function foo(variable) {
+ return varble; // <-- Unable to resolve binding here
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0262/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0262/Test.js
new file mode 100644
index 0000000..60e3cdf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0262/Test.js
@@ -0,0 +1,4 @@
+function main(args) {
+ System.out.println(new java.lang.Exception("ERROR"));
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0263/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0263/Test.js
new file mode 100644
index 0000000..9a5c876
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0263/Test.js
@@ -0,0 +1,4 @@
+function m(i){
+ m(i);
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0264/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0264/Test.js
new file mode 100644
index 0000000..0f5380a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0264/Test.js
@@ -0,0 +1,11 @@
+//package test0264;
+//import java.util.*;
+//public class Test {
+// void m(final int i){
+// Test a= new Test(){
+// void m(int k){
+// k= i;
+// }
+// };
+// }
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0265/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0265/Test.js
new file mode 100644
index 0000000..ba1fc09
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0265/Test.js
@@ -0,0 +1,4 @@
+function foo() {
+ return 10 + /*]*/20 * 30/*[*/ + 10;
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0266/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0266/Test.js
new file mode 100644
index 0000000..baccd8b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0266/Test.js
@@ -0,0 +1,8 @@
+//package test0266;
+//import java.util.*;
+//public class Test {
+// public static class Inner{}
+// public static void m(){
+// Inner\u005b] i;
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0267/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0267/Test.js
new file mode 100644
index 0000000..ede9834
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0267/Test.js
@@ -0,0 +1,8 @@
+//package test0267;
+//import java.util.*;
+//public class Test {
+// public static class Inner{}
+// public static void m(){
+// Inner[] i;
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0268/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0268/Test.js
new file mode 100644
index 0000000..6b52e1c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0268/Test.js
@@ -0,0 +1,8 @@
+//package test0268;
+//import java.util.*;
+//public class Test {
+// public static class Inner{}
+// public static void m(){
+// test0268.Test.Inner[] i;
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0269/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0269/Test.js
new file mode 100644
index 0000000..73bfeb8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0269/Test.js
@@ -0,0 +1,8 @@
+//package test0269;
+//import java.util.*;
+//public class Test {
+// public static class Inner{}
+// public static void m(){
+// test0269.Test.Inner[/**/] i;
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0270/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0270/Test.js
new file mode 100644
index 0000000..1c29b59
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0270/Test.js
@@ -0,0 +1,8 @@
+//package test0270;
+//import java.util.*;
+//public class Test {
+// public static class Inner{}
+// public static void m(){
+// test0270.Test.Inner i[];
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0271/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0271/Test.js
new file mode 100644
index 0000000..3b3729a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0271/Test.js
@@ -0,0 +1,8 @@
+//package test0271;
+//import java.util.*;
+//public class Test {
+// public static class Inner{}
+// public static void m(){
+// test0271.Test.Inner[] i[];
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0272/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0272/Test.js
new file mode 100644
index 0000000..5412dcc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0272/Test.js
@@ -0,0 +1,4 @@
+ function foo() {
+ for (var i= 0; i < 10; i++) foo();
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0273/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0273/Test.js
new file mode 100644
index 0000000..e32fffe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0273/Test.js
@@ -0,0 +1,3 @@
+ function foo() {
+ for (var i= 0; i < 10; i++) { foo(); }
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0274/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0274/Test.js
new file mode 100644
index 0000000..503683e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0274/Test.js
@@ -0,0 +1,4 @@
+ function foo( j) {
+ var i = 0;
+ while (i < 10) { foo(i++); }
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0275/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0275/Test.js
new file mode 100644
index 0000000..3af54f9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0275/Test.js
@@ -0,0 +1,4 @@
+ function foo(j) {
+ var i = 0;
+ while (i < 10) foo(i++);
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0276/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0276/Test.js
new file mode 100644
index 0000000..086e772
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0276/Test.js
@@ -0,0 +1,4 @@
+ function foo() {
+ foo();
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0277/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0277/Test.js
new file mode 100644
index 0000000..72d8472
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0277/Test.js
@@ -0,0 +1,3 @@
+ function foo() {
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0278/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0278/Test.js
new file mode 100644
index 0000000..9dee789
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0278/Test.js
@@ -0,0 +1,5 @@
+//package test0278;
+//
+//public class Test {
+// Class c = java.lang.String.class;
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0279/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0279/Test.js
new file mode 100644
index 0000000..db571b0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0279/Test.js
@@ -0,0 +1,7 @@
+//package test0279;
+//
+//public class Test {
+// void foo() {
+// Class c = java.lang.String.class;
+// }
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0280/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0280/Test.js
new file mode 100644
index 0000000..bc86d3b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0280/Test.js
@@ -0,0 +1,5 @@
+//package test0280;
+//import java.util.*;
+//public class Test {
+//
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0281/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0281/Test.js
new file mode 100644
index 0000000..dea418c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0281/Test.js
@@ -0,0 +1,2 @@
+ var o= /*]*/new Object()/*[*/;
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0282/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0282/Test.js
new file mode 100644
index 0000000..c13d01e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0282/Test.js
@@ -0,0 +1,2 @@
+ var b = /*]*/true/*[*/;
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0283/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0283/Test.js
new file mode 100644
index 0000000..4420bc8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0283/Test.js
@@ -0,0 +1,2 @@
+ var c = /*]*/'c'/*[*/;
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0284/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0284/Test.js
new file mode 100644
index 0000000..6a6e8ee
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0284/Test.js
@@ -0,0 +1,2 @@
+ var o = /*]*/null/*[*/;
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0285/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0285/Test.js
new file mode 100644
index 0000000..a4a10a2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0285/Test.js
@@ -0,0 +1,5 @@
+//package test0285;
+//
+//public class Test {
+// Object o = /*]*/Object.class/*[*/;
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0286/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0286/Test.js
new file mode 100644
index 0000000..94ee6af
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0286/Test.js
@@ -0,0 +1,2 @@
+ var i = /**/(2)/**/;
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0287/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0287/Test.js
new file mode 100644
index 0000000..d8e94df
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0287/Test.js
@@ -0,0 +1,2 @@
+ var tab = /**/new String/**/;
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0288/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0288/Test.js
new file mode 100644
index 0000000..7abd170
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0288/Test.js
@@ -0,0 +1,2 @@
+ var tab = /**/[]/**/;
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0289/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0289/Test.js
new file mode 100644
index 0000000..f3934c7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0289/Test.js
@@ -0,0 +1,3 @@
+ var tab1 = [] ;
+ var s = /**/tab1[0]/**/;
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0290/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0290/Test.js
new file mode 100644
index 0000000..4aa746c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0290/Test.js
@@ -0,0 +1,5 @@
+//package test0290;
+//
+//public class Test {
+// Object o = /*]*/new java.lang.Object()/*[*/;
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0291/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0291/Test.js
new file mode 100644
index 0000000..5549881
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0291/Test.js
@@ -0,0 +1,5 @@
+//package test0291;
+//
+//public class Test {
+// bar() {}
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0292/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0292/Test.js
new file mode 100644
index 0000000..d59d396
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0292/Test.js
@@ -0,0 +1,5 @@
+ function bar() {
+ return Test.x;
+ }
+Test.prototype=new Object();
+Test.x=1;
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0293/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0293/Test.js
new file mode 100644
index 0000000..3c8900d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0293/Test.js
@@ -0,0 +1,11 @@
+//package test0293;
+//
+//public class Test {
+// public void foo() {
+// Runnable run= new Runnable() {
+// public void run() {
+// /*]*/foo();/*[*/
+// }
+// };
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0294/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0294/Test.js
new file mode 100644
index 0000000..095c67e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0294/Test.js
@@ -0,0 +1,7 @@
+ function fails() {
+ foo()
+ }
+ function foo() {
+ foo();
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0295/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0295/Test.js
new file mode 100644
index 0000000..00d03b7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0295/Test.js
@@ -0,0 +1,6 @@
+ function g() {
+ return null;
+ }
+ function foo() {
+ g();
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0296/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0296/Test.js
new file mode 100644
index 0000000..095c67e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0296/Test.js
@@ -0,0 +1,7 @@
+ function fails() {
+ foo()
+ }
+ function foo() {
+ foo();
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0297/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0297/Test.js
new file mode 100644
index 0000000..0d89c66
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0297/Test.js
@@ -0,0 +1,10 @@
+ function foo() {
+ var i= 10;
+ switch (i) {
+ case 1:
+ var l= null;
+ break;
+ default:
+ }
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0298/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0298/Test.js
new file mode 100644
index 0000000..13c56ea
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0298/Test.js
@@ -0,0 +1,7 @@
+// function m(){
+// return /*[*/a().length != 3/*]*/;
+// }
+// function a(){
+// return null;
+// }
+//
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0299/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0299/Test.js
new file mode 100644
index 0000000..4afd41d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0299/Test.js
@@ -0,0 +1 @@
+ var i = (/**/2/**/);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0300/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0300/Test.js
new file mode 100644
index 0000000..51bc524
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0300/Test.js
@@ -0,0 +1 @@
+ var b = /**/true/**/;
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0301/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0301/Test.js
new file mode 100644
index 0000000..7d3e605
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0301/Test.js
@@ -0,0 +1 @@
+ var o = /**/null/**/;
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0302/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0302/Test.js
new file mode 100644
index 0000000..3404192
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0302/Test.js
@@ -0,0 +1,6 @@
+function foo() {
+ /*]*/do
+ foo();
+ while(1 < 10);/*[*/
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0303/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0303/Test.js
new file mode 100644
index 0000000..81dfce1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0303/Test.js
@@ -0,0 +1,5 @@
+ function foo() {
+ var x;
+ x = 3;
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0304/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0304/Test.js
new file mode 100644
index 0000000..b88ca2b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0304/Test.js
@@ -0,0 +1,2 @@
+ function foo(arg);
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0307/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0307/Test.js
new file mode 100644
index 0000000..ff5da50
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0307/Test.js
@@ -0,0 +1,16 @@
+//package test0307;
+//
+//import java.net.MalformedURLException;
+//
+//public class Test {
+// static class A {
+// public A(int i) throws MalformedURLException {
+// }
+// }
+//
+// static class B extends A {
+// public B() throws MalformedURLException {
+// super(10);
+// }
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0308/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0308/Test.js
new file mode 100644
index 0000000..5d8c5be
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0308/Test.js
@@ -0,0 +1,16 @@
+//package test0308;
+//
+//import java.net.MalformedURLException;
+//
+//public class Test {
+// static class A {
+// public A(int i) throws MalformedURLException {
+// }
+// }
+//
+// static class B extends A {
+// public B() {
+// super(10);
+// }
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0309/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0309/Test.js
new file mode 100644
index 0000000..18ea87a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0309/Test.js
@@ -0,0 +1,4 @@
+ function f(y){
+ var i= (y==7) ? 1 : 2 ;
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0310/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0310/Test.js
new file mode 100644
index 0000000..8274306
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0310/Test.js
@@ -0,0 +1,10 @@
+ var G = I.GR;
+
+ function c(){
+ var cp = null;
+ }
+
+I.prototype=new Object();
+I.GR=1;
+
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0311/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0311/Test.js
new file mode 100644
index 0000000..5954429
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0311/Test.js
@@ -0,0 +1,12 @@
+//package test0311;
+//
+//public class Test {
+// void m(){
+// final int j= 0;
+// Test a= new Test(){
+// void m(int j){
+// int u= j;
+// }
+// };
+// }
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0312/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0312/Test.js
new file mode 100644
index 0000000..0f36703
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0312/Test.js
@@ -0,0 +1,12 @@
+//package test0312;
+//
+//public class Test {
+// void m(){
+// final int j= 0;
+// A a= new A(){
+// void m(int j){
+// int u= j;
+// }
+// };
+// }
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0313/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0313/Test.js
new file mode 100644
index 0000000..f13c70e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0313/Test.js
@@ -0,0 +1,4 @@
+ function m( i, j){
+ var u= i+j;
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0314/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0314/Test.js
new file mode 100644
index 0000000..a20f18d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0314/Test.js
@@ -0,0 +1 @@
+function main(args) { int x= 3;} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0315/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0315/Test.js
new file mode 100644
index 0000000..b695e7e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0315/Test.js
@@ -0,0 +1,4 @@
+ function foo() {
+ return "abc" instanceof String;
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0317/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0317/Test.js
new file mode 100644
index 0000000..8c50757
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0317/Test.js
@@ -0,0 +1,3 @@
+ function foo(x) {
+ return x instanceof Boolean;
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0318/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0318/Test.js
new file mode 100644
index 0000000..97131cb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0318/Test.js
@@ -0,0 +1,4 @@
+ function ___run(args) {
+ private var x;
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0319/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0319/Test.js
new file mode 100644
index 0000000..819189c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0319/Test.js
@@ -0,0 +1,4 @@
+ function ___run(args){
+ var obj= [];
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0320/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0320/Test.js
new file mode 100644
index 0000000..2eb9d93
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0320/Test.js
@@ -0,0 +1,4 @@
+ function ___run(args) {
+ var tab = [10];
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0321/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0321/Test.js
new file mode 100644
index 0000000..8c13f0a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0321/Test.js
@@ -0,0 +1,7 @@
+//package test0321;
+//
+//public class Test {
+// static void ___run(java.lang.String[] args) throws Throwable {
+// java.lang.Object[][] obj= new Object[10][0];
+// }
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0322/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0322/Test.js
new file mode 100644
index 0000000..4f88c5a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0322/Test.js
@@ -0,0 +1 @@
+ var fField= null;
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0323/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0323/Test.js
new file mode 100644
index 0000000..04b1926
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0323/Test.js
@@ -0,0 +1,5 @@
+ function foo() {
+ var x;
+ x = "s";
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0324/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0324/Test.js
new file mode 100644
index 0000000..6a31e66
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0324/Test.js
@@ -0,0 +1,8 @@
+//package test0324;
+//
+//public class Test {
+// void foo() {
+// Object x;
+// x = (java.lang.Object[]) null;
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0325/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0325/Test.js
new file mode 100644
index 0000000..fada3e2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0325/Test.js
@@ -0,0 +1,8 @@
+//package test0325;
+//
+//public class Test {
+// void foo() {
+// Object x;
+// x = (int[]) null;
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0326/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0326/A.js
new file mode 100644
index 0000000..a9c99d9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0326/A.js
@@ -0,0 +1,7 @@
+// A f;
+// public A a() {
+ function a() {
+ a().f= a();
+ return null;
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0327/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0327/Test.js
new file mode 100644
index 0000000..a9eca34
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0327/Test.js
@@ -0,0 +1,9 @@
+//package test0327;
+//
+//import java.util.Vector;
+//
+//public class Test {
+// public static void goo(Object o) {
+// Vector s= (String) ooo;
+// }
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0328/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0328/Test.js
new file mode 100644
index 0000000..3de16d3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0328/Test.js
@@ -0,0 +1,7 @@
+//package test0328;
+//
+//public class Test {
+// static void ___run(java.lang.String[] args) throws Throwable {
+// java.lang.Object[] obj= new Object[] {null, new Object()};
+// }
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0329/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0329/Test.js
new file mode 100644
index 0000000..cc234c1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0329/Test.js
@@ -0,0 +1,7 @@
+//package test0329;
+//
+//public class Test {
+// static void ___run(java.lang.String[] args) throws Throwable {
+// java.lang.Object[] obj= new Object[] {};
+// }
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0330/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0330/Test.js
new file mode 100644
index 0000000..3cfbde7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0330/Test.js
@@ -0,0 +1,13 @@
+//package test0330;
+//
+//public class Test {
+// public foo() {
+// return 0;
+// }
+//}
+//
+//class A {
+// void bar() {
+// new Test().foo();
+// }
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0331/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0331/Test.js
new file mode 100644
index 0000000..86ad443
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0331/Test.js
@@ -0,0 +1,5 @@
+ function main() {
+ var args = [];
+ var i = args.length;
+ }
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0332/LocalSelectionTransfer.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0332/LocalSelectionTransfer.js
new file mode 100644
index 0000000..5b609cf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0332/LocalSelectionTransfer.js
@@ -0,0 +1,88 @@
+///*
+// * (c) Copyright IBM Corp. 2000, 2001.
+// * All Rights Reserved.
+// */
+//package test0332;
+//
+//import org.eclipse.swt.dnd.ByteArrayTransfer;
+//import org.eclipse.swt.dnd.TransferData;
+//import org.eclipse.swt.widgets.Widget;
+//
+//import org.eclipse.jdt.internal.ui.JavaPlugin;
+//import org.eclipse.jface.viewers.ISelection;
+//import org.eclipse.jdt.internal.ui.JavaUIMessages;
+//
+//public class LocalSelectionTransfer extends ByteArrayTransfer {
+//
+// // First attempt to create a UUID for the type name to make sure that
+// // different Eclipse applications use different "types" of
+// // <code>LocalSelectionTransfer</code>
+// private static final String TYPE_NAME= "local-selection-transfer-format" + (new Long(System.currentTimeMillis())).toString(); //$NON-NLS-1$;
+// private static final int TYPEID= registerType(TYPE_NAME);
+//
+// private static final LocalSelectionTransfer INSTANCE= new LocalSelectionTransfer();
+//
+// private ISelection fSelection;
+// private int fTime;
+//
+// private LocalSelectionTransfer() {
+// }
+//
+// /**
+// * Returns the singleton.
+// */
+// public static LocalSelectionTransfer getInstance() {
+// return INSTANCE;
+// }
+//
+// /**
+// * Sets the transfer data for local use.
+// */
+// public void setSelection(ISelection s) {
+// fSelection= s;
+// }
+//
+// /**
+// * Returns the local transfer data.
+// */
+// public ISelection getSelection() {
+// return fSelection;
+// }
+//
+// public void javaToNative(Object object, TransferData transferData) {
+// byte[] check= TYPE_NAME.getBytes();
+// super.javaToNative(check, transferData);
+// }
+//
+// public Object nativeToJava(TransferData transferData) {
+// Object result= super.nativeToJava(transferData);
+// if (isInvalidNativeType(result)) {
+// JavaPlugin.logErrorMessage(JavaUIMessages.getString("LocalSelectionTransfer.errorMessage")); //$NON-NLS-1$
+// }
+// return fSelection;
+// }
+//
+// private boolean isInvalidNativeType(Object result) {
+// return !(result instanceof byte[]) || !TYPE_NAME.equals(new String((byte[])result));
+// }
+//
+// /**
+// * The type id used to identify this transfer.
+// */
+// protected int[] getTypeIds() {
+// return new int[] {TYPEID};
+// }
+//
+// protected String[] getTypeNames(){
+// return new String[] {TYPE_NAME};
+// }
+//
+// public int getTime() {
+// return fTime;
+// }
+//
+// public void setTime(int time) {
+// fTime= time;
+// }
+//
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0333/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0333/Test.js
new file mode 100644
index 0000000..f67aee1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0333/Test.js
@@ -0,0 +1,7 @@
+//package test0333;
+//
+//public class Test {
+// static void ___run(java.lang.String[] args) throws Throwable {
+// java.lang.Object[][] obj= new Object[10][];
+// }
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0334/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0334/Test.js
new file mode 100644
index 0000000..3af8b22
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0334/Test.js
@@ -0,0 +1,7 @@
+//package test0334;
+//
+//public class Test {
+// static void ___run(java.lang.String[] args) throws Throwable {
+// java.lang.Object[][][] obj= new Object[10][][];
+// }
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0335/ExceptionTestCaseTest.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0335/ExceptionTestCaseTest.js
new file mode 100644
index 0000000..0e4dbd8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0335/ExceptionTestCaseTest.js
@@ -0,0 +1,8 @@
+//package test0335;
+//
+//public class ExceptionTestCaseTest extends junit.framework.TestCase {
+//
+// public ExceptionTestCaseTest(String s) {
+// super(s);
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0336/SorterTest.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0336/SorterTest.js
new file mode 100644
index 0000000..d33bd94
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0336/SorterTest.js
@@ -0,0 +1,11 @@
+//package test0336;
+//
+//import junit.runner.Sorter;
+//import java.util.Vector;
+//
+//public class SorterTest {
+// static class Swapper implements Sorter.Swapper {
+// public void swap(Vector values, int left, int right) {
+// }
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0337/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0337/Test.js
new file mode 100644
index 0000000..7dac695
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0337/Test.js
@@ -0,0 +1,9 @@
+//package test0337;
+//
+//public class Test {
+// String message= Test.m("s", new String[]{"g"});
+//
+// static String m(String g, String[] s){
+// return null;
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0338/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0338/Test.js
new file mode 100644
index 0000000..bfc0221
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0338/Test.js
@@ -0,0 +1,8 @@
+//package test0338;
+//
+//import java.io.IOException;
+//
+//public class Test {
+// public void foo() throws IOException {
+// }
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0339/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0339/Test.js
new file mode 100644
index 0000000..a98296e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0339/Test.js
@@ -0,0 +1,6 @@
+ function doQuery( x){}
+
+ function setX( x) {
+
+ z=
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0341/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0341/A.js
new file mode 100644
index 0000000..6add4c2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0341/A.js
@@ -0,0 +1,29 @@
+package test0341;
+
+import java.io.IOException;
+import java.io.InterruptedIOException;
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.util.Vector;
+
+public class A {
+
+ private Vector field;
+
+ public void l()
+ throws
+ IOException,
+ MalformedURLException,
+ InterruptedIOException,
+ UnsupportedEncodingException {
+ if (field != null) {
+ throw new IOException();
+ } else if (field == null) {
+ throw new MalformedURLException();
+ } else if (field == null) {
+ throw new InterruptedIOException();
+ } else {
+ throw new UnsupportedEncodingException();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0342/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0342/Test.js
new file mode 100644
index 0000000..3aff78e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0342/Test.js
@@ -0,0 +1,19 @@
+package test0342;
+
+public class Test {
+
+ public int junk1(int i) {
+ return 0;
+ }
+
+ public long junk2() {
+ return 0;
+ }
+
+ public Object junk3() {
+ return null;
+ }
+
+ Test(int i) {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0343/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0343/Test.js
new file mode 100644
index 0000000..4f9dcaf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0343/Test.js
@@ -0,0 +1,13 @@
+package test0343;
+
+public class Test {
+
+ public volatile boolean flag;
+
+ public void foo() {
+ int i= 5;
+ /*]*/if (flag)
+ i= 10;/*[*/
+ i--;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0344/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0344/Test.js
new file mode 100644
index 0000000..8295b88
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0344/Test.js
@@ -0,0 +1,14 @@
+package test0344;
+
+public class Test {
+
+ public void bugTest() {
+ System.out.println("bla");
+ System.out.println("blubb");
+ }
+
+ private void containsAssert() {
+ assert true;
+ }
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0345/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0345/A.js
new file mode 100644
index 0000000..6d83c68
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0345/A.js
@@ -0,0 +1,14 @@
+package test0345;
+
+public class A {
+ Bar.B[] field= new Bar.B[]{
+ new Bar.B()
+ };
+ void f(){
+ int temp;
+ }
+}
+
+class Bar{
+ static class B{}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0346/Test2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0346/Test2.js
new file mode 100644
index 0000000..90717c9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0346/Test2.js
@@ -0,0 +1,9 @@
+package test0346;
+
+import java.util.Vector;
+
+public class Test2 {
+ public static void main(String[] arguments) {
+ Vector editors[]= null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0347/Test2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0347/Test2.js
new file mode 100644
index 0000000..a2d6647
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0347/Test2.js
@@ -0,0 +1,9 @@
+package test0347;
+
+import java.util.Vector;
+
+public class Test2 {
+ public static void main(String[] arguments) {
+ Vector[] editors[]= null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0348/Test2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0348/Test2.js
new file mode 100644
index 0000000..c06fc39
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0348/Test2.js
@@ -0,0 +1,9 @@
+package test0348;
+
+import java.util.Vector;
+
+public class Test2 {
+ public static void main(String[] arguments) {
+ Vector[][] editors[]= null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0349/Test2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0349/Test2.js
new file mode 100644
index 0000000..6838324
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0349/Test2.js
@@ -0,0 +1,7 @@
+package test0349;
+
+import java.util.Vector;
+
+public class Test2 {
+ Vector[][] editors[]= null;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0350/Test2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0350/Test2.js
new file mode 100644
index 0000000..5d5e96d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0350/Test2.js
@@ -0,0 +1,7 @@
+package test0350;
+
+import java.util.Vector;
+
+public class Test2 {
+ Vector editors[]= null;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0351/Test2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0351/Test2.js
new file mode 100644
index 0000000..068a954
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0351/Test2.js
@@ -0,0 +1,6 @@
+package test0351;
+
+public class Test2 {
+ void m1(int a, int[] b){}
+ void m(int a, int b[]){}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0352/Test2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0352/Test2.js
new file mode 100644
index 0000000..4071da2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0352/Test2.js
@@ -0,0 +1,6 @@
+package test0352;
+
+public class Test2 {
+ void m1(final int a, final int[] b){}
+ void m(final int a, final int b[]){}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0353/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0353/Test.js
new file mode 100644
index 0000000..ef55178
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0353/Test.js
@@ -0,0 +1,10 @@
+package test0353;
+
+import java.io.InputStream;
+
+public class Test {
+ void foo() {
+ InputStream i = null;
+ while (true);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0354/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0354/Test.js
new file mode 100644
index 0000000..ed2a6ae
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0354/Test.js
@@ -0,0 +1,12 @@
+package test0354;
+
+public class Test {
+
+ protected void primExecute() {
+ this.toString();
+ }
+
+ if (image != null) {
+ Object loc = null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0355/Foo.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0355/Foo.js
new file mode 100644
index 0000000..d5152c8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0355/Foo.js
@@ -0,0 +1,10 @@
+package test0355;
+
+public class Foo {
+ public Object bar() {
+ if ( ((Object)null).toString() == null ) {
+ return (Object)null;
+ }
+ return null;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0356/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0356/A.js
new file mode 100644
index 0000000..58aedb6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0356/A.js
@@ -0,0 +1,8 @@
+package test0356;
+
+public class A {
+
+}
+
+class ActionFactory {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0356/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0356/X.js
new file mode 100644
index 0000000..a75dde3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0356/X.js
@@ -0,0 +1,7 @@
+package test0356;
+
+public class X {
+ public void foo() {
+ ActionFactory af=new MyActionFactory();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0357/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0357/A.js
new file mode 100644
index 0000000..0c54581
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0357/A.js
@@ -0,0 +1,3 @@
+package test0357;
+class A{
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0358/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0358/A.js
new file mode 100644
index 0000000..bd10d92
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0358/A.js
@@ -0,0 +1,6 @@
+package test0358;
+
+class A {
+ public void mdd(int y){
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0359/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0359/A.js
new file mode 100644
index 0000000..e11bb6f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0359/A.js
@@ -0,0 +1,6 @@
+package test0359;
+
+class A {
+ public void mdd(int y) throws Exception{
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0360/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0360/X.js
new file mode 100644
index 0000000..022f0c1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0360/X.js
@@ -0,0 +1,9 @@
+package test0360;
+
+public class X {
+ public void foo() {
+ for (int i=0, j=0, k=0; i<10 ; i++,j++,k++) {
+ System.out.println("L");
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0361/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0361/X.js
new file mode 100644
index 0000000..04c0c01
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0361/X.js
@@ -0,0 +1,9 @@
+package test0361;
+
+public class X {
+ public void foo() {
+ for (int i=0; i<10 ; i++) {
+ System.out.println("L");
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0362/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0362/Test.js
new file mode 100644
index 0000000..cdf1847
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0362/Test.js
@@ -0,0 +1,8 @@
+package test0362;
+/* Regression test for bug 21916 */
+public class Test {
+ public void foo(int i) {
+ for (int i=0, j=0, k=0; i<10 ; i++, j++, k++) {}
+ }
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0363/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0363/A.js
new file mode 100644
index 0000000..8f832f4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0363/A.js
@@ -0,0 +1,8 @@
+package test0363;
+/* Regression test for bug 22939 */
+public class A {
+ void f(){
+ String xxxx= "xx";
+ String y= ( xxxx );
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0364/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0364/A.js
new file mode 100644
index 0000000..13360e4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0364/A.js
@@ -0,0 +1,9 @@
+package test0364;
+/* Regression test for bug 11529 */
+public class A {
+ void theMethod() {
+ int local;
+/* for (int i = 0; i < 5; ++i) {
+ }*/
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0365/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0365/A.js
new file mode 100644
index 0000000..db973fe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0365/A.js
@@ -0,0 +1,9 @@
+package test0365
+;
+/* Regression test for bug 11529 */
+public class A {
+ void theMethod() {
+ for (int i = 0; i < 5; ++i) {
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0366/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0366/A.js
new file mode 100644
index 0000000..e2bde1e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0366/A.js
@@ -0,0 +1,9 @@
+package test0366;
+
+/* Regression test for bug 23048 */
+
+public class A {
+ void theMethod() {
+ for (int i = 0; i < 5; ++i);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0367/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0367/A.js
new file mode 100644
index 0000000..2c1628d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0367/A.js
@@ -0,0 +1,9 @@
+package test0367;
+
+/* Regression test for bug 23048 */
+
+public class A {
+ void theMethod(int i) {
+ while(i == 2);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0368/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0368/A.js
new file mode 100644
index 0000000..8e880df
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0368/A.js
@@ -0,0 +1,9 @@
+package test0368;
+
+/* Regression test for bug 23048 */
+
+public class A {
+ void foo() {
+ test:;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0369/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0369/A.js
new file mode 100644
index 0000000..e7edb9e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0369/A.js
@@ -0,0 +1,9 @@
+package test0369;
+
+/* Regression test for bug 23048 */
+
+public class A {
+ void foo() {
+ test:\u003B
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0370/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0370/Test.js
new file mode 100644
index 0000000..18602b6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0370/Test.js
@@ -0,0 +1,8 @@
+package test0370;
+
+public class Test {
+ public void foo() {
+ do ; while(true);
+ }
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0371/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0371/A.js
new file mode 100644
index 0000000..e4995ff
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0371/A.js
@@ -0,0 +1,9 @@
+package test0371;
+
+/* Regression test for bug 23048 */
+
+public class A {
+ void foo(int i) {
+ if (i == 6);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0372/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0372/A.js
new file mode 100644
index 0000000..0301d9d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0372/A.js
@@ -0,0 +1,9 @@
+package test0372;
+
+/* Regression test for bug 23048 */
+
+public class A {
+ void foo(int i) {
+ if (i == 6) {} else ;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0373/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0373/A.js
new file mode 100644
index 0000000..6028605
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0373/A.js
@@ -0,0 +1,11 @@
+package test0373;
+
+/* Regression test for bug 23118 */
+
+public class A {
+ void foo() {
+ for (int i = 0; i < 10; i++) {
+ break;
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0374/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0374/A.js
new file mode 100644
index 0000000..a3b39aa
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0374/A.js
@@ -0,0 +1,11 @@
+package test0374;
+
+/* Regression test for bug 23118 */
+
+public class A {
+ void foo() {
+ for (int i = 0; i < 10; i++) {
+ continue;
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0375/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0375/A.js
new file mode 100644
index 0000000..1740634
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0375/A.js
@@ -0,0 +1,8 @@
+package test0375;
+
+import test0375.A.*;
+
+/* Regression test for bug 23052 */
+
+public class A {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0376/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0376/A.js
new file mode 100644
index 0000000..152c7f1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0376/A.js
@@ -0,0 +1,7 @@
+package test0376;
+
+class A {
+ void f() {
+ A a = ( A ) this;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0377/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0377/A.js
new file mode 100644
index 0000000..3019a58
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0377/A.js
@@ -0,0 +1,7 @@
+package test0377;
+
+class A {
+ void f() {
+ final int i;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0378/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0378/A.js
new file mode 100644
index 0000000..25e530e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0378/A.js
@@ -0,0 +1,8 @@
+package test0378;
+
+public class A {
+ public static class B {
+ public void foo() {
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0379/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0379/Test.js
new file mode 100644
index 0000000..926d3ed
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0379/Test.js
@@ -0,0 +1,7 @@
+package test0005;
+import java.util.*;
+public class Test {
+ public static void main(String[] args) {
+ System.out.println(new Object() {});
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0380/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0380/A.js
new file mode 100644
index 0000000..4a6013a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0380/A.js
@@ -0,0 +1,7 @@
+package test0380;
+
+public class A {
+ public String toString() {
+ return super.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0381/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0381/A.js
new file mode 100644
index 0000000..bd292f8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0381/A.js
@@ -0,0 +1,7 @@
+package test0381;
+
+public class A {
+ /** Method theMethod.*/
+ void theMethod() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0382/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0382/A.js
new file mode 100644
index 0000000..7e42e91
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0382/A.js
@@ -0,0 +1,4 @@
+package test0382;
+
+public class A {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0383/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0383/A.js
new file mode 100644
index 0000000..ca0c048
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0383/A.js
@@ -0,0 +1,8 @@
+package test0383;
+
+public class A {
+ public static class B {
+ public void foo() {
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0384/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0384/A.js
new file mode 100644
index 0000000..2b5d55c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0384/A.js
@@ -0,0 +1,8 @@
+package test0384;
+
+public class A {
+ public static class B {
+ public class D {
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0385/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0385/A.js
new file mode 100644
index 0000000..3346949
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0385/A.js
@@ -0,0 +1,8 @@
+package test0385;
+
+public class A {
+
+ int getClass() {
+ return 0;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0386/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0386/A.js
new file mode 100644
index 0000000..23e9495
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0386/A.js
@@ -0,0 +1,14 @@
+package test0386;
+
+public class A {
+
+ void foo(int i) {
+ switch(i) {
+ case 1:
+ System.out.println();
+ break;
+ default :
+ return;
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0387/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0387/A.js
new file mode 100644
index 0000000..793ba30
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0387/A.js
@@ -0,0 +1,7 @@
+package test0387;
+
+class A {
+ void f() {
+ A a = (\u0020A\u0020) this;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0388/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0388/A.js
new file mode 100644
index 0000000..d5ce18e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0388/A.js
@@ -0,0 +1,4 @@
+package test0388;
+
+class A {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0389/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0389/A.js
new file mode 100644
index 0000000..70ff02f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0389/A.js
@@ -0,0 +1,6 @@
+package test0389;
+
+class A {
+ class B {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0390/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0390/A.js
new file mode 100644
index 0000000..4793424
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0390/A.js
@@ -0,0 +1,7 @@
+package test0390;
+
+class A {
+ int foo() {
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0391/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0391/A.js
new file mode 100644
index 0000000..0cd852e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0391/A.js
@@ -0,0 +1,7 @@
+package test0391;
+
+class A {
+ int[] foo() {
+ return null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0392/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0392/A.js
new file mode 100644
index 0000000..352aba3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0392/A.js
@@ -0,0 +1,7 @@
+package test0392;
+
+class A {
+ String[] foo() {
+ return null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0393/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0393/A.js
new file mode 100644
index 0000000..ba1c752
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0393/A.js
@@ -0,0 +1,7 @@
+package test0393;
+
+class A {
+ String foo()[] {
+ return null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0394/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0394/A.js
new file mode 100644
index 0000000..483f459
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0394/A.js
@@ -0,0 +1,7 @@
+package test0394;
+
+class A {
+ String foo() {
+ return null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0395/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0395/A.js
new file mode 100644
index 0000000..4e017ef
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0395/A.js
@@ -0,0 +1,7 @@
+package test0395;
+
+class A {
+ String[] foo()[] {
+ return null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0396/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0396/A.js
new file mode 100644
index 0000000..1be11ca
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0396/A.js
@@ -0,0 +1,7 @@
+package test0396;
+
+public class A {
+ public void foo(final String s[]) {
+ }
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0397/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0397/A.js
new file mode 100644
index 0000000..8a6fcb3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0397/A.js
@@ -0,0 +1,7 @@
+package test0397;
+
+public class A {
+ public void foo(final String[] \u0073\u005B][]) {
+ }
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0398/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0398/A.js
new file mode 100644
index 0000000..58f5e07
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0398/A.js
@@ -0,0 +1,7 @@
+package test0397;
+
+public class A {
+ public void foo() {
+ int i= (1 + 2) * 3;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0399/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0399/A.js
new file mode 100644
index 0000000..151409a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0399/A.js
@@ -0,0 +1,8 @@
+package test0399;
+
+public class A {
+ public A() {
+ int i;
+ int k;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0400/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0400/A.js
new file mode 100644
index 0000000..daf9f40
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0400/A.js
@@ -0,0 +1,10 @@
+package test0400;
+
+public class A {
+ public A() {
+ super();
+ int i;
+ int k;
+
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0401/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0401/A.js
new file mode 100644
index 0000000..86be377
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0401/A.js
@@ -0,0 +1,7 @@
+package test0401;
+
+public class A {
+ correctThis() {
+ return 1;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0402/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0402/A.js
new file mode 100644
index 0000000..eacb300
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0402/A.js
@@ -0,0 +1,14 @@
+package test0402;
+
+class A{
+ class Inner{
+ Inner(){
+ }
+ }
+}
+
+class I2 extends A.Inner{
+ I2(){
+ new A().super();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0403/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0403/A.js
new file mode 100644
index 0000000..0cb4d41
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0403/A.js
@@ -0,0 +1,12 @@
+package test0403;
+
+class Test {
+ public void foo(){};
+}
+
+public class A {
+ void test1() throws CloneNotSupportedException {
+ Test test = new Test();
+ test.clone();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0404/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0404/A.js
new file mode 100644
index 0000000..bed3f77
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0404/A.js
@@ -0,0 +1,8 @@
+package test0404;
+
+class A{
+ void f() {
+ A a= new A();
+ a.clone();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0405/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0405/A.js
new file mode 100644
index 0000000..c80766a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0405/A.js
@@ -0,0 +1,13 @@
+package test0405;
+
+class A {
+ public void foo() {
+ }
+}
+
+class Test {
+ void test() throws CloneNotSupportedException {
+ A a = new A();
+ a.clone();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0406/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0406/A.js
new file mode 100644
index 0000000..eb649ee
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0406/A.js
@@ -0,0 +1,10 @@
+package test0406;
+
+import test0406_a.A;
+
+class Test {
+ void test() {
+ A a = new A();
+ a.foo("");
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0406_a/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0406_a/A.js
new file mode 100644
index 0000000..5b2e402
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0406_a/A.js
@@ -0,0 +1,6 @@
+package test0406_a;
+
+public class A {
+ protected A foo(String s) {
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0407/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0407/A.js
new file mode 100644
index 0000000..6b9d1b8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0407/A.js
@@ -0,0 +1,9 @@
+package test0407;
+
+public class A {
+ void foo() {
+ }
+ void bar() {
+ }
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0408/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0408/A.js
new file mode 100644
index 0000000..eb58e4c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0408/A.js
@@ -0,0 +1,7 @@
+package test0408;
+
+public class A {
+ java.lang.Object foo() {
+ return null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0409/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0409/A.js
new file mode 100644
index 0000000..293c95d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0409/A.js
@@ -0,0 +1,102 @@
+package test0409;
+
+import java.io.*;
+import java.lang.Object;
+
+class Super extends java.lang.Object {
+ int k;
+
+ int foo2() {
+ return 0;
+ }
+}
+/**
+ *
+ */
+public class A extends Super implements Cloneable, Serializable {
+
+ private static final long serialVersionUID = 1L;
+ public static final int i = 0;
+
+ {
+ int j;
+ }
+
+ int[] foo(float f) throws Exception {
+ assert f > 0 : "it works";
+ {
+ }
+ test: for (int i = 0; i < 10; i++) {
+ if (f > 0) {
+ break test;
+ } else {
+ continue test;
+ }
+ }
+ Object o = new Object();
+ int k = 0;
+ do {
+ o = new Object();
+ k++;
+ if (k < 10) {
+ o = null;
+ break;
+ }
+ } while (o != null);
+ ;
+ if (o == null) {
+ throw new Exception();
+ }
+ int j = 9;
+ switch(j) {
+ case 4 :
+ break;
+ default :
+ return null;
+ }
+ synchronized(o) {
+ }
+ try {
+ System.out.println();
+ } catch(Exception e) {
+ System.out.println();
+ } finally {
+ j = (int) 'c';
+ }
+ while (j > 0) {
+ --j;
+ }
+ int[] tab = { 1, 2, 3, 4};
+ j = tab[3];
+ boolean b = (true && false);
+
+ j = o instanceof Object ? 4 : 5 + 9;
+
+ j = k;
+
+ j = foo2();
+
+ o = this.bar();
+
+ o = A.class;
+
+ return new int[] {};
+ }
+
+ Object bar() {
+ class C {
+ }
+ return new C() {};
+ }
+
+ A() {
+ this(0);
+ }
+
+ A(int i) {
+ super();
+ }
+
+ class B {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0410/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0410/A.js
new file mode 100644
index 0000000..15ed7a3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0410/A.js
@@ -0,0 +1,7 @@
+package test0410;
+
+public class A {
+ int foo() {
+ return 1 + 2 + 3 + 4 + 3;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0411/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0411/A.js
new file mode 100644
index 0000000..f32ecb3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0411/A.js
@@ -0,0 +1,12 @@
+package test0411;
+
+public class A {
+
+ int bar(int a, int b) {
+ return a*b + 2 + foo();
+ }
+
+ int foo() {
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0412/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0412/A.js
new file mode 100644
index 0000000..ef38fed
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0412/A.js
@@ -0,0 +1,5 @@
+package test0412;
+
+interface A {
+ void m();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0413/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0413/A.js
new file mode 100644
index 0000000..b613723
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0413/A.js
@@ -0,0 +1,8 @@
+package test0413;
+
+class E extends Exception {
+}
+
+interface A {
+ void m() throws IOException, E;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0414/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0414/A.js
new file mode 100644
index 0000000..ef148da
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0414/A.js
@@ -0,0 +1,11 @@
+package test0414;
+
+public class A {
+ B foo() {
+ return null;
+ }
+
+ A bar() {
+ return null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0414/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0414/B.js
new file mode 100644
index 0000000..f6e8640
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0414/B.js
@@ -0,0 +1,4 @@
+package test0414;
+
+class B {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0415/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0415/A.js
new file mode 100644
index 0000000..f7a7159
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0415/A.js
@@ -0,0 +1,13 @@
+package test0415;
+
+public class A {
+ public void foo(int i) {
+ switch(i) {
+ case 2:
+ System.out.println();
+ break;
+ default:
+ System.out.println();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0416/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0416/A.js
new file mode 100644
index 0000000..3cc58a9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0416/A.js
@@ -0,0 +1,11 @@
+package test0416;
+
+interface I {
+ int CONST= 1;
+}
+
+public class A {
+ void foo() {
+ int x= I.CONST;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0417/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0417/A.js
new file mode 100644
index 0000000..d4a6f01
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0417/A.js
@@ -0,0 +1,7 @@
+package test0417;
+
+public class A {
+ void foo() {
+ A.NewClass c;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0418/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0418/A.js
new file mode 100644
index 0000000..f638f3e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0418/A.js
@@ -0,0 +1,10 @@
+package test0418;
+
+public class A {
+ private void foo() {
+ }
+
+ private static void goo() {
+ foo();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0419/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0419/A.js
new file mode 100644
index 0000000..61ee597
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0419/A.js
@@ -0,0 +1,14 @@
+package test0419;
+
+class C {
+ private int fCoo;
+}
+
+public class A {
+ public static void goo(C c) {
+ fCoo= 1;
+/* super.fCoo= 1;
+ C.fCoo= 1;
+ c.fCoo= 1;*/
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0420/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0420/A.js
new file mode 100644
index 0000000..5573625
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0420/A.js
@@ -0,0 +1,7 @@
+package test0420;
+
+public class A{
+ void f(){
+ int i= 1 + (2 + 3) + 4;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0421/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0421/A.js
new file mode 100644
index 0000000..552f85b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0421/A.js
@@ -0,0 +1,7 @@
+package test0421;
+
+public class A{
+ void f(){
+ int i= (1 + 2) + 3;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0422/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0422/A.js
new file mode 100644
index 0000000..c283933
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0422/A.js
@@ -0,0 +1,7 @@
+package test0422;
+
+public class A{
+ void f(){
+ int i= ( 1 + 2 ) + 3;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0423/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0423/A.js
new file mode 100644
index 0000000..eb93c9f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0423/A.js
@@ -0,0 +1,7 @@
+package test0423;
+
+public class A{
+ void f(){
+ int i= 1 + ( 2 + 3 ) + 4;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0424/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0424/A.js
new file mode 100644
index 0000000..76ea0b9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0424/A.js
@@ -0,0 +1,7 @@
+package test0424;
+
+public class A{
+ void f(){
+ int i= 1 + 4 + ( 2 + 3 );
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0425/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0425/A.js
new file mode 100644
index 0000000..fc48542
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0425/A.js
@@ -0,0 +1,7 @@
+package test0425;
+
+public class A{
+ void f(){
+ int i= 1 + 4 * ( 2 + 3 );
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0426/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0426/A.js
new file mode 100644
index 0000000..be9a3f3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0426/A.js
@@ -0,0 +1,12 @@
+package test0426;
+
+class C {
+ private class CInner {
+ }
+}
+
+public class A extends C {
+ public static void goo() {
+ CInner c;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0427/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0427/A.js
new file mode 100644
index 0000000..aa5649c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0427/A.js
@@ -0,0 +1,13 @@
+package test0427;
+
+class C {
+ private int fCoo;
+}
+
+public class A extends C {
+ public static void goo(C c) {
+ super.fCoo= 1;
+/* C.fCoo= 1;
+ c.fCoo= 1;*/
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0428/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0428/A.js
new file mode 100644
index 0000000..18d1a50
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0428/A.js
@@ -0,0 +1,12 @@
+package test0428;
+
+class C {
+ private int fCoo;
+}
+
+public class A extends C {
+ public static void goo(C c) {
+ C.fCoo= 1;
+// c.fCoo= 1;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0429/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0429/A.js
new file mode 100644
index 0000000..f927fad
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0429/A.js
@@ -0,0 +1,11 @@
+package test0429;
+
+class C {
+ private int fCoo;
+}
+
+public class A extends C {
+ public static void goo(C c) {
+ c.fCoo= 1;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0430/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0430/A.js
new file mode 100644
index 0000000..aa35c7e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0430/A.js
@@ -0,0 +1,14 @@
+package test0430;
+
+public class A {
+ private A() {
+ this(coo2());
+ }
+
+ private A(int i) {
+ }
+
+ private int coo2() {
+ return 7;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0431/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0431/A.js
new file mode 100644
index 0000000..c276340
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0431/A.js
@@ -0,0 +1,12 @@
+package test0431;
+
+public class A {
+ private A() {
+ this(fCoo);
+ }
+
+ private A(int i) {
+ }
+
+ private int fCoo= 8;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0432/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0432/A.js
new file mode 100644
index 0000000..d3e9c8e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0432/A.js
@@ -0,0 +1,11 @@
+package test0432;
+
+class C {
+ private int fCoo;
+}
+
+public class A extends C {
+ public void goo(C c) {
+ fCoo= 1;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0433/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0433/A.js
new file mode 100644
index 0000000..a41a6c1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0433/A.js
@@ -0,0 +1,11 @@
+package test0433;
+
+class C {
+ private int fCoo;
+}
+
+public class A extends C {
+ public void goo(C c) {
+ super.fCoo= 1;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0434/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0434/A.js
new file mode 100644
index 0000000..7a10b15
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0434/A.js
@@ -0,0 +1,11 @@
+package test0434;
+
+class C {
+ private int fCoo;
+}
+
+public class A extends C {
+ public void goo(C c) {
+ C.fCoo= 1;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0435/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0435/A.js
new file mode 100644
index 0000000..919f333
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0435/A.js
@@ -0,0 +1,11 @@
+package test0435;
+
+class C {
+ private int fCoo;
+}
+
+public class A extends C {
+ public void goo(C c) {
+ c.fCoo= 1;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0436/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0436/A.js
new file mode 100644
index 0000000..50bf08e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0436/A.js
@@ -0,0 +1,12 @@
+package test0436;
+
+public class A {
+ private class CInner {
+ }
+}
+
+class D extends A {
+ public void goo() {
+ A.CInner a;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0437/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0437/A.js
new file mode 100644
index 0000000..4077e01
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0437/A.js
@@ -0,0 +1,12 @@
+package test0437;
+
+public class A {
+ private class CInner {
+ }
+}
+
+class D extends A {
+ public void goo() {
+ CInner a;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0438/D.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0438/D.js
new file mode 100644
index 0000000..1803207
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0438/D.js
@@ -0,0 +1,6 @@
+package test0438;
+
+import test0438_a.W;
+
+class D {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0438_a/W.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0438_a/W.js
new file mode 100644
index 0000000..2cfd30a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0438_a/W.js
@@ -0,0 +1,4 @@
+package test0438_a;
+
+class W {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0439/C.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0439/C.js
new file mode 100644
index 0000000..5946e81
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0439/C.js
@@ -0,0 +1,6 @@
+package test0439;
+
+public class C {
+ private class CInner {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0439/E.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0439/E.js
new file mode 100644
index 0000000..5016be7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0439/E.js
@@ -0,0 +1,7 @@
+package test0439;
+
+public class E extends C {
+ public void foo() {
+ CInner c= null;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0440/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0440/A.js
new file mode 100644
index 0000000..b36168a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0440/A.js
@@ -0,0 +1,7 @@
+package test0440;
+
+public class A {
+ void test() {
+ String i= 2 * 3 + "" + (true);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0441/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0441/A.js
new file mode 100644
index 0000000..1143720
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0441/A.js
@@ -0,0 +1,7 @@
+package test0441;
+
+public class A {
+ void test() {
+ int i= (2 + 2) * 3 * 1;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0442/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0442/A.js
new file mode 100644
index 0000000..cf9e7e2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0442/A.js
@@ -0,0 +1,7 @@
+package test0442;
+
+public class A {
+ void test() {
+ int i= 2 + (2 * 3) + 1;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0443/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0443/A.js
new file mode 100644
index 0000000..5b0c1c5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0443/A.js
@@ -0,0 +1,7 @@
+package test0443;
+
+public class A {
+ public abstract void foo() {
+ return;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0444/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0444/A.js
new file mode 100644
index 0000000..2305e6e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0444/A.js
@@ -0,0 +1,11 @@
+package test0444;
+
+public class A {
+ public void foo() {
+ return;
+ }
+
+ public void foo() {
+ return;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0445/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0445/A.js
new file mode 100644
index 0000000..eccd6c3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0445/A.js
@@ -0,0 +1,11 @@
+package test0445;
+
+import java.io.IOException;
+
+public class A {
+ public void goo() throws IOException {
+ }
+ public void foo() {
+ goo();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0446/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0446/A.js
new file mode 100644
index 0000000..1408d81
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0446/A.js
@@ -0,0 +1,7 @@
+package test0446;
+
+public class A {
+ void foob() {
+ int b = b;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0447/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0447/A.js
new file mode 100644
index 0000000..3399e19
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0447/A.js
@@ -0,0 +1,12 @@
+package test0447;
+
+public class A {
+ public static void collectCorrections() {
+ processors= null;
+ }
+ try {
+ int id= 2;
+ } catch (CoreException e) {
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0448/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0448/A.js
new file mode 100644
index 0000000..1dc4fdb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0448/A.js
@@ -0,0 +1,6 @@
+package test0448;
+
+public class A {
+ A() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0449/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0449/A.js
new file mode 100644
index 0000000..18d9f4e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0449/A.js
@@ -0,0 +1,7 @@
+package test0449;
+
+public class A {
+ A() {
+ super();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0450/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0450/A.js
new file mode 100644
index 0000000..b0292e8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0450/A.js
@@ -0,0 +1,22 @@
+package test0450;
+
+public final class A {
+
+ void outerMethod() {
+
+ new Object() {
+
+ class Subroutine {
+ class B {
+ }
+ }
+
+ private void innerMethod() {
+ class B {
+ }
+ Subroutine sub = null;
+ }
+
+ };
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0451/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0451/A.js
new file mode 100644
index 0000000..c8a66a2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0451/A.js
@@ -0,0 +1,6 @@
+package test0451;
+
+public class A {
+ private int A()[]{
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0453/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0453/A.js
new file mode 100644
index 0000000..d9f9398
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0453/A.js
@@ -0,0 +1,7 @@
+package test0453;
+
+public class A {
+ public String foo() {
+ return super.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0454/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0454/A.js
new file mode 100644
index 0000000..2f1a342
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0454/A.js
@@ -0,0 +1,10 @@
+package test0454;
+
+public class A {
+
+ public A() {
+ int a= 2;
+ int b= (int) (3.14f * a);
+ }
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0455/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0455/A.js
new file mode 100644
index 0000000..c50077e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0455/A.js
@@ -0,0 +1,10 @@
+package test0455;
+
+public class A {
+
+ public void foo() {
+ for (int i = 0; i < 10; i++) // for 1
+ for (int j = 0; j < 10; j++) // for 2
+ if (true) { }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0456/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0456/A.js
new file mode 100644
index 0000000..1341acb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0456/A.js
@@ -0,0 +1,17 @@
+package test0456;
+
+public class A {
+ public void main() {
+ for (int x= 10; x < 20; x++)
+ main();
+ /*]*/foo(10);/*[*/
+ }
+
+ public void foo(int x) {
+ x= 20;
+ bar(x);
+ }
+
+ public void bar(int z) {
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0457/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0457/A.js
new file mode 100644
index 0000000..c33248e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0457/A.js
@@ -0,0 +1,10 @@
+package test0457;
+
+public class A {
+ public void foo() {
+ for (int i= 10; i < 10; i++)/*[*/
+ for (int z= 10; z < 10; z++)
+ foo();
+ /*]*/foo();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0458/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0458/A.js
new file mode 100644
index 0000000..edce28b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0458/A.js
@@ -0,0 +1,10 @@
+package test0458;
+
+public class A {
+ public void foo() {
+ for (int i= 10; i < 10; i++)/*[*/
+ for (int z= 10; z < 10; z++)
+ ;
+ /*]*/foo();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0459/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0459/A.js
new file mode 100644
index 0000000..ce35995
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0459/A.js
@@ -0,0 +1,10 @@
+package test0459;
+
+public class A {
+ public void foo() {
+ for (int i= 10; i < 10; i++)/*[*/
+ for (int z= 10; z < 10; z++)
+ { }
+ /*]*/foo();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0460/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0460/A.js
new file mode 100644
index 0000000..8ac1574
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0460/A.js
@@ -0,0 +1,9 @@
+package test0460;
+
+public class A {
+ public void foo() {
+ final int bar;
+
+ bar = 1;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0461/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0461/A.js
new file mode 100644
index 0000000..9f7789d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0461/A.js
@@ -0,0 +1,7 @@
+package test0461;
+
+public class A {
+ public void foo() {
+ z= foo().y.toList();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0463/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0463/A.js
new file mode 100644
index 0000000..e625e62
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0463/A.js
@@ -0,0 +1,7 @@
+package test0463;
+
+public class A {
+ public String foo() {
+ return "\012\015\u0061";
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0464/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0464/A.js
new file mode 100644
index 0000000..e5f3d20
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0464/A.js
@@ -0,0 +1,9 @@
+package test0464;
+
+public class A {
+
+ public static int foo() {
+ return null;
+ }
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0465/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0465/A.js
new file mode 100644
index 0000000..4b57374
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0465/A.js
@@ -0,0 +1,11 @@
+package test0465;
+
+public class A {
+
+ int i;
+
+ public int foo() {
+ return this.i;
+ }
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0466/Assert.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0466/Assert.js
new file mode 100644
index 0000000..b7a2f0a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0466/Assert.js
@@ -0,0 +1,15 @@
+package test0466;
+
+public class Assert {
+ public static final void notNull(Object ref, String message)
+ {
+ assert ref != null : message;
+ }
+
+ void method(String param1, String param2, String param3)
+ {
+ Assert.notNull(param1, "param1 != null");
+ Assert.notNull(param2, "param2 != null");
+ Assert.notNull(param3, "param3 != null");
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0467/Assert.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0467/Assert.js
new file mode 100644
index 0000000..1110a55
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0467/Assert.js
@@ -0,0 +1,16 @@
+package test0467;
+
+public class Assert {
+ public static final void notNull(Object ref, String message)
+ {
+ assert ref != null : message\u003B
+ assert ref != null\u003B
+ }
+
+ void method(String param1, String param2, String param3)
+ {
+ Assert.notNull(param1, "param1 != null");
+ Assert.notNull(param2, "param2 != null");
+ Assert.notNull(param3, "param3 != null");
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0468/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0468/A.js
new file mode 100644
index 0000000..0b9c3ef
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0468/A.js
@@ -0,0 +1,14 @@
+package test0468;
+
+public class A {
+
+ int i;
+
+ public int foo() {
+ return this.i;
+ }
+
+ public void bar() {
+ foo();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0470/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0470/A.js
new file mode 100644
index 0000000..122b47a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0470/A.js
@@ -0,0 +1,13 @@
+package test0470;
+
+public class A {
+
+ public void foo() {
+ for (int i= 0, j= goo(3); i < 0; i++) {
+ }
+ }
+
+ int goo(int i) {
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0471/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0471/A.js
new file mode 100644
index 0000000..80aaddd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0471/A.js
@@ -0,0 +1,15 @@
+package test0471;
+
+public class A {
+
+ private void foo(){
+ // missing closing bracket
+ /*
+ *
+ */
+ private void foo1(){
+ }
+
+ private void foo2(){
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0473/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0473/A.js
new file mode 100644
index 0000000..f5826c6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0473/A.js
@@ -0,0 +1,10 @@
+package test0473;
+
+import java.math.BigDecimal;
+
+public class A {
+ public static void main(String[] args) {
+ assert(true);
+ BigDecimal f = null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0474/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0474/A.js
new file mode 100644
index 0000000..477b4c2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0474/A.js
@@ -0,0 +1,14 @@
+package test0474;
+
+public class A {
+ public boolean b() {
+ return true;
+ }
+
+ public void foo() {
+ while(b())
+ /*]*/while(b())
+ foo();
+ /*]*/foo();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0475/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0475/A.js
new file mode 100644
index 0000000..18bf5f1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0475/A.js
@@ -0,0 +1,14 @@
+package test0475;
+
+public class A {
+ public boolean b() {
+ return true;
+ }
+
+ public void foo() {
+ if (b())
+ /*]*/if(b())
+ foo();
+ /*]*/foo();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0476/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0476/A.js
new file mode 100644
index 0000000..0816d70
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0476/A.js
@@ -0,0 +1,14 @@
+package test0476;
+
+public class A {
+ public boolean b() {
+ return true;
+ }
+
+ public void foo() {
+ for (;b();)
+ /*]*/for(;b();)
+ foo();
+ /*]*/foo();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0477/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0477/A.js
new file mode 100644
index 0000000..6a37c6d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0477/A.js
@@ -0,0 +1,19 @@
+package test0477;
+
+public class A {
+ public A(String name) {
+ }
+
+ public A() {
+ this(undef());
+ }
+
+ void bar(String s) {
+ }
+
+ void bar() {
+ }
+
+ void bar(int i) {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0478/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0478/A.js
new file mode 100644
index 0000000..d663679
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0478/A.js
@@ -0,0 +1,13 @@
+package test0478;
+
+class A {
+ public void foo() {
+ }
+}
+
+class Test {
+ void test() throws CloneNotSupportedException {
+ A a = new A();
+ a.clone();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0479/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0479/A.js
new file mode 100644
index 0000000..bfcd6ab
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0479/A.js
@@ -0,0 +1,13 @@
+package test0479;
+
+class A {
+ public void foo() {
+ }
+}
+
+class Test {
+ void test() throws CloneNotSupportedException {
+ A a = new A();
+ a.clone();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0480/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0480/A.js
new file mode 100644
index 0000000..309c56e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0480/A.js
@@ -0,0 +1,11 @@
+package test0480;
+
+public class A {
+ void test() throws CloneNotSupportedException {
+ Runnable runnable = new Runnable() {
+ public void run() {
+ System.out.println();
+ }
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0481/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0481/A.js
new file mode 100644
index 0000000..7cb0d57
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0481/A.js
@@ -0,0 +1,11 @@
+package test0481;
+
+public class A {
+ void test() throws CloneNotSupportedException {
+ Runnable runnable = new Runnable() {
+ public void run() {
+ System.out.println();
+ }
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0482/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0482/A.js
new file mode 100644
index 0000000..da8da61
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0482/A.js
@@ -0,0 +1,13 @@
+package test0482;
+
+public class A {
+ public class B {
+ void test() throws CloneNotSupportedException {
+ Runnable runnable = new Runnable() {
+ public void run() {
+ System.out.println();
+ }
+ };
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0483/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0483/A.js
new file mode 100644
index 0000000..dffb734
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0483/A.js
@@ -0,0 +1,16 @@
+package test0483;
+
+public class A {
+
+ /**
+ *
+ *
+ */
+ public A() {
+ Runnable runnable = new Runnable() {
+ public void run() {
+ System.out.println();
+ }
+ };
+ } // comment
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0484/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0484/A.js
new file mode 100644
index 0000000..8a09eb4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0484/A.js
@@ -0,0 +1,13 @@
+package test0484;
+
+public class A {
+ public class B {
+ void test() throws CloneNotSupportedException {
+ Runnable runnable = new Runnable() {
+ public void run() {
+ System.out.println();
+ }
+ };
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0485/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0485/A.js
new file mode 100644
index 0000000..00ee0bd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0485/A.js
@@ -0,0 +1,17 @@
+package test0485;
+
+public class A {
+ /*
+ *
+ *
+ */
+ public class B {
+ void test() throws CloneNotSupportedException {
+ Runnable runnable = new Runnable() {
+ public void run() {
+ System.out.println();
+ }
+ };
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0486/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0486/A.js
new file mode 100644
index 0000000..5073527
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0486/A.js
@@ -0,0 +1,14 @@
+package test0486;
+
+public class A {
+ int field;
+ void foo(int i, int k) {
+ i= k;
+ }
+
+ int goo() {
+ // offset here
+ field= 1;
+ return;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0487/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0487/A.js
new file mode 100644
index 0000000..e978297
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0487/A.js
@@ -0,0 +1,27 @@
+package test0487;
+
+public class A {
+ int field = 4;
+ static int i = bar();
+
+ {
+ System.out.println();
+ }
+
+ static {
+ i = 5;
+ }
+
+ void foo(int j, int k) {
+ j = k;
+ }
+
+ int goo() {
+ field= 1;
+ return;
+ }
+
+ static int bar() {
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0488/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0488/A.js
new file mode 100644
index 0000000..dd8952b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0488/A.js
@@ -0,0 +1,27 @@
+package test0488;
+
+public class A {
+ int field = 4;
+ static int i = bar();
+
+ {
+ System.out.println();
+ }
+
+ static {
+ i = 5;
+ }
+
+ void foo(int j, int k) {
+ j = k;
+ }
+
+ int goo() {
+ field= 1;
+ return;
+ }
+
+ static int bar() {
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0489/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0489/A.js
new file mode 100644
index 0000000..92fb357
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0489/A.js
@@ -0,0 +1,13 @@
+package test0489;
+
+import test0489.Y;
+import test0489.Zork;
+
+public class A {
+ class B {
+ public void bar(Y y) {
+ Y y = new Y();
+ System.out.println(y.toString());
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0490/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0490/A.js
new file mode 100644
index 0000000..6342009
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0490/A.js
@@ -0,0 +1,11 @@
+package test0490;
+
+public class A {
+
+ public void method() {
+ switch(1) {
+ case B.ONE : break;
+ case B.TWO : break;
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0490/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0490/B.js
new file mode 100644
index 0000000..440487c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0490/B.js
@@ -0,0 +1,6 @@
+package test0490;
+
+public interface B {
+ int ONE = 1;
+ int TWO = 2;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0491/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0491/A.js
new file mode 100644
index 0000000..772f663
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0491/A.js
@@ -0,0 +1,8 @@
+package test0491;
+
+public class A {
+
+ public void method(String loginName) {
+ assert(loginName != null);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0492/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0492/A.js
new file mode 100644
index 0000000..feef8b6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0492/A.js
@@ -0,0 +1,8 @@
+package test0492;
+
+public class A {
+
+ public void method(String loginName) {
+ assert loginName != null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0493/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0493/A.js
new file mode 100644
index 0000000..6b42177
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0493/A.js
@@ -0,0 +1,5 @@
+package test0493;
+
+public class A {
+ Class[][] cls;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0494/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0494/A.js
new file mode 100644
index 0000000..bee9442
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0494/A.js
@@ -0,0 +1,5 @@
+package test0494;
+
+public class A {
+ Class[][][] cls;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0495/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0495/A.js
new file mode 100644
index 0000000..9ace714
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0495/A.js
@@ -0,0 +1,5 @@
+package test0495;
+
+public class A {
+ Class[][] cls[];
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0496/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0496/A.js
new file mode 100644
index 0000000..26ff027
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0496/A.js
@@ -0,0 +1,5 @@
+package test0496;
+
+public class A {
+ Class[][][][] cls;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0497/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0497/A.js
new file mode 100644
index 0000000..13fe5c2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0497/A.js
@@ -0,0 +1,5 @@
+package test0497;
+
+public class A {
+ Class[] cls;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0498/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0498/A.js
new file mode 100644
index 0000000..0fd8a34
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0498/A.js
@@ -0,0 +1,12 @@
+package test0497;
+
+public abstract class A {
+ public Object foo1() { return null; }
+ public Object foo2() throws IllegalArgumentException { return null; }
+ public Object foo3()[][] { return null; }
+ public Object foo4()[][] throws IllegalArgumentException { return null; }
+ public Object foo5()[][] { return null; }
+ public Object foo6(int i)[][] throws IllegalArgumentException { return null; }
+ public Object foo7(int i)[][] { return null; }
+ public Object[] foo8(int i)[][] { return null; }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0499/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0499/A.js
new file mode 100644
index 0000000..8f18fb2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0499/A.js
@@ -0,0 +1,6 @@
+class A {
+ public void foo() {
+ int x= 10;
+ x= x + 1;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0500/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0500/A.js
new file mode 100644
index 0000000..6292f71
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0500/A.js
@@ -0,0 +1,13 @@
+package test0500;
+/**
+ * Test for bug 45436
+ */
+public class A {
+ /**
+ * @param b
+ * comment on second line.
+ * @param c
+ */
+ public void foo(int a, int b, int c) { }
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0501/JavaEditor.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0501/JavaEditor.js
new file mode 100644
index 0000000..8148d19
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0501/JavaEditor.js
@@ -0,0 +1,3243 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package test0501;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.text.CollationElementIterator;
+import java.text.Collator;
+import java.text.RuleBasedCollator;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ResourceBundle;
+import java.util.StringTokenizer;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Preferences;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.BidiSegmentEvent;
+import org.eclipse.swt.custom.BidiSegmentListener;
+import org.eclipse.swt.custom.ST;
+import org.eclipse.swt.custom.StyleRange;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.FocusListener;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.events.MouseMoveListener;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Cursor;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.GroupMarker;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IStatusLineManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.jface.viewers.IPostSelectionProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.DefaultInformationControl;
+import org.eclipse.jface.text.DocumentEvent;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IDocumentListener;
+import org.eclipse.jface.text.IInformationControl;
+import org.eclipse.jface.text.IInformationControlCreator;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextHover;
+import org.eclipse.jface.text.ITextInputListener;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.ITextViewerExtension2;
+import org.eclipse.jface.text.ITextViewerExtension3;
+import org.eclipse.jface.text.ITextViewerExtension4;
+import org.eclipse.jface.text.ITypedRegion;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.TextSelection;
+import org.eclipse.jface.text.TextUtilities;
+import org.eclipse.jface.text.information.IInformationProvider;
+import org.eclipse.jface.text.information.IInformationProviderExtension2;
+import org.eclipse.jface.text.information.InformationPresenter;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.IAnnotationAccess;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.jface.text.source.IOverviewRuler;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.text.source.IVerticalRuler;
+import org.eclipse.jface.text.source.LineChangeHover;
+import org.eclipse.jface.text.source.SourceViewerConfiguration;
+
+import org.eclipse.ui.editors.text.DefaultEncodingSupport;
+import org.eclipse.ui.editors.text.IEncodingSupport;
+
+import org.eclipse.ui.IEditorActionBarContributor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IPartService;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.actions.ActionContext;
+import org.eclipse.ui.actions.ActionGroup;
+import org.eclipse.ui.help.WorkbenchHelp;
+import org.eclipse.ui.part.EditorActionBarContributor;
+import org.eclipse.ui.part.IShowInTargetList;
+import org.eclipse.ui.texteditor.AddTaskAction;
+import org.eclipse.ui.texteditor.AnnotationPreference;
+import org.eclipse.ui.texteditor.DefaultAnnotation;
+import org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess;
+import org.eclipse.ui.texteditor.DefaultRangeIndicator;
+import org.eclipse.ui.texteditor.ExtendedTextEditor;
+import org.eclipse.ui.texteditor.IAbstractTextEditorHelpContextIds;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.IEditorStatusLine;
+import org.eclipse.ui.texteditor.ITextEditorActionConstants;
+import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
+import org.eclipse.ui.texteditor.MarkerAnnotation;
+import org.eclipse.ui.texteditor.MarkerAnnotationPreferences;
+import org.eclipse.ui.texteditor.ResourceAction;
+import org.eclipse.ui.texteditor.SourceViewerDecorationSupport;
+import org.eclipse.ui.texteditor.TextEditorAction;
+import org.eclipse.ui.texteditor.TextNavigationAction;
+import org.eclipse.ui.texteditor.TextOperationAction;
+import org.eclipse.ui.views.contentoutline.ContentOutline;
+import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
+
+import org.eclipse.search.ui.SearchUI;
+
+import org.eclipse.wst.jsdt.core.IClassFile;
+import org.eclipse.wst.jsdt.core.ICodeAssist;
+import org.eclipse.wst.jsdt.core.ICompilationUnit;
+import org.eclipse.wst.jsdt.core.IImportContainer;
+import org.eclipse.wst.jsdt.core.IImportDeclaration;
+import org.eclipse.wst.jsdt.core.IJavaElement;
+import org.eclipse.wst.jsdt.core.IMember;
+import org.eclipse.wst.jsdt.core.IPackageDeclaration;
+import org.eclipse.wst.jsdt.core.ISourceRange;
+import org.eclipse.wst.jsdt.core.ISourceReference;
+import org.eclipse.wst.jsdt.core.JavaCore;
+import org.eclipse.wst.jsdt.core.JavaModelException;
+import org.eclipse.wst.jsdt.core.dom.ASTNode;
+
+import org.eclipse.wst.jsdt.ui.IContextMenuConstants;
+import org.eclipse.wst.jsdt.ui.JavaUI;
+import org.eclipse.wst.jsdt.ui.PreferenceConstants;
+import org.eclipse.wst.jsdt.ui.actions.IJavaEditorActionDefinitionIds;
+import org.eclipse.wst.jsdt.ui.actions.JavaSearchActionGroup;
+import org.eclipse.wst.jsdt.ui.actions.OpenEditorActionGroup;
+import org.eclipse.wst.jsdt.ui.actions.OpenViewActionGroup;
+import org.eclipse.wst.jsdt.ui.actions.ShowActionGroup;
+import org.eclipse.wst.jsdt.ui.text.JavaSourceViewerConfiguration;
+import org.eclipse.wst.jsdt.ui.text.JavaTextTools;
+
+import org.eclipse.wst.jsdt.internal.ui.IJavaHelpContextIds;
+import org.eclipse.wst.jsdt.internal.ui.JavaPlugin;
+import org.eclipse.wst.jsdt.internal.ui.actions.CompositeActionGroup;
+import org.eclipse.wst.jsdt.internal.ui.actions.SelectionConverter;
+import org.eclipse.wst.jsdt.internal.ui.javaeditor.selectionactions.GoToNextPreviousMemberAction;
+import org.eclipse.wst.jsdt.internal.ui.javaeditor.selectionactions.SelectionHistory;
+import org.eclipse.wst.jsdt.internal.ui.javaeditor.selectionactions.StructureSelectEnclosingAction;
+import org.eclipse.wst.jsdt.internal.ui.javaeditor.selectionactions.StructureSelectHistoryAction;
+import org.eclipse.wst.jsdt.internal.ui.javaeditor.selectionactions.StructureSelectNextAction;
+import org.eclipse.wst.jsdt.internal.ui.javaeditor.selectionactions.StructureSelectPreviousAction;
+import org.eclipse.wst.jsdt.internal.ui.javaeditor.selectionactions.StructureSelectionAction;
+import org.eclipse.wst.jsdt.internal.ui.search.FindOccurrencesEngine;
+import org.eclipse.wst.jsdt.internal.ui.text.HTMLTextPresenter;
+import org.eclipse.wst.jsdt.internal.ui.text.IJavaPartitions;
+import org.eclipse.wst.jsdt.internal.ui.text.JavaChangeHover;
+import org.eclipse.wst.jsdt.internal.ui.text.JavaPairMatcher;
+import org.eclipse.wst.jsdt.internal.ui.util.JavaUIHelp;
+import org.eclipse.wst.jsdt.internal.ui.viewsupport.IViewPartInputProvider;
+
+
+/**
+ * Java specific text editor.
+ */
+public abstract class JavaEditor extends ExtendedTextEditor implements IViewPartInputProvider {
+
+ /**
+ * Internal implementation class for a change listener.
+ * @since 3.0
+ */
+ protected abstract class AbstractSelectionChangedListener implements ISelectionChangedListener {
+
+ /**
+ * Installs this selection changed listener with the given selection provider. If
+ * the selection provider is a post selection provider, post selection changed
+ * events are the preferred choice, otherwise normal selection changed events
+ * are requested.
+ *
+ * @param selectionProvider
+ */
+ public void install(ISelectionProvider selectionProvider) {
+ if (selectionProvider == null)
+ return;
+
+ if (selectionProvider instanceof IPostSelectionProvider) {
+ IPostSelectionProvider provider= (IPostSelectionProvider) selectionProvider;
+ provider.addPostSelectionChangedListener(this);
+ } else {
+ selectionProvider.addSelectionChangedListener(this);
+ }
+ }
+
+ /**
+ * Removes this selection changed listener from the given selection provider.
+ *
+ * @param selectionProvider
+ */
+ public void uninstall(ISelectionProvider selectionProvider) {
+ if (selectionProvider == null)
+ return;
+
+ if (selectionProvider instanceof IPostSelectionProvider) {
+ IPostSelectionProvider provider= (IPostSelectionProvider) selectionProvider;
+ provider.removePostSelectionChangedListener(this);
+ } else {
+ selectionProvider.removeSelectionChangedListener(this);
+ }
+ }
+ }
+
+ /**
+ * Updates the Java outline page selection and this editor's range indicator.
+ *
+ * @since 3.0
+ */
+ private class EditorSelectionChangedListener extends AbstractSelectionChangedListener {
+
+ /*
+ * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
+ */
+ public void selectionChanged(SelectionChangedEvent event) {
+ selectionChanged();
+ }
+
+ public void selectionChanged() {
+ ISourceReference element= computeHighlightRangeSourceReference();
+ synchronizeOutlinePage(element);
+ setSelection(element, false);
+ updateStatusLine();
+ updateOccurrences();
+ }
+ }
+
+ /**
+ * Updates the selection in the editor's widget with the selection of the outline page.
+ */
+ class OutlineSelectionChangedListener extends AbstractSelectionChangedListener {
+ public void selectionChanged(SelectionChangedEvent event) {
+ doSelectionChanged(event);
+ }
+ }
+
+ /*
+ * Link mode.
+ */
+ class MouseClickListener implements KeyListener, MouseListener, MouseMoveListener,
+ FocusListener, PaintListener, IPropertyChangeListener, IDocumentListener, ITextInputListener {
+
+ /** The session is active. */
+ private boolean fActive;
+
+ /** The currently active style range. */
+ private IRegion fActiveRegion;
+ /** The currently active style range as position. */
+ private Position fRememberedPosition;
+ /** The hand cursor. */
+ private Cursor fCursor;
+
+ /** The link color. */
+ private Color fColor;
+ /** The key modifier mask. */
+ private int fKeyModifierMask;
+
+ /**
+ * Style ranges before link mode.
+ * @since 3.0
+ */
+ private StyleRange[] fOldStyleRanges;
+ /**
+ * Link mode style ranges region.
+ * @since 3.0
+ */
+ IRegion fOldStyleRangeRegion;
+
+
+ public void deactivate() {
+ deactivate(false);
+ }
+
+ public void deactivate(boolean redrawAll) {
+ if (!fActive)
+ return;
+
+ repairRepresentation(redrawAll);
+ fActive= false;
+ }
+
+ public void install() {
+
+ ISourceViewer sourceViewer= getSourceViewer();
+ if (sourceViewer == null)
+ return;
+
+ StyledText text= sourceViewer.getTextWidget();
+ if (text == null || text.isDisposed())
+ return;
+
+ updateColor(sourceViewer);
+
+ sourceViewer.addTextInputListener(this);
+
+ IDocument document= sourceViewer.getDocument();
+ if (document != null)
+ document.addDocumentListener(this);
+
+ text.addKeyListener(this);
+ text.addMouseListener(this);
+ text.addMouseMoveListener(this);
+ text.addFocusListener(this);
+ text.addPaintListener(this);
+
+ updateKeyModifierMask();
+
+ IPreferenceStore preferenceStore= getPreferenceStore();
+ preferenceStore.addPropertyChangeListener(this);
+ }
+
+ private void updateKeyModifierMask() {
+ String modifiers= getPreferenceStore().getString(BROWSER_LIKE_LINKS_KEY_MODIFIER);
+ fKeyModifierMask= computeStateMask(modifiers);
+ if (fKeyModifierMask == -1) {
+ // Fallback to stored state mask
+ fKeyModifierMask= getPreferenceStore().getInt(BROWSER_LIKE_LINKS_KEY_MODIFIER_MASK);
+ }
+ }
+
+ private int computeStateMask(String modifiers) {
+ if (modifiers == null)
+ return -1;
+
+ if (modifiers.length() == 0)
+ return SWT.NONE;
+
+ int stateMask= 0;
+ StringTokenizer modifierTokenizer= new StringTokenizer(modifiers, ",;.:+-* "); //$NON-NLS-1$
+ while (modifierTokenizer.hasMoreTokens()) {
+ int modifier= EditorUtility.findLocalizedModifier(modifierTokenizer.nextToken());
+ if (modifier == 0 || (stateMask & modifier) == modifier)
+ return -1;
+ stateMask= stateMask | modifier;
+ }
+ return stateMask;
+ }
+
+ public void uninstall() {
+
+ if (fColor != null) {
+ fColor.dispose();
+ fColor= null;
+ }
+
+ if (fCursor != null) {
+ fCursor.dispose();
+ fCursor= null;
+ }
+
+ ISourceViewer sourceViewer= getSourceViewer();
+ if (sourceViewer == null)
+ return;
+
+ sourceViewer.removeTextInputListener(this);
+
+ IDocument document= sourceViewer.getDocument();
+ if (document != null)
+ document.removeDocumentListener(this);
+
+ IPreferenceStore preferenceStore= getPreferenceStore();
+ if (preferenceStore != null)
+ preferenceStore.removePropertyChangeListener(this);
+
+ StyledText text= sourceViewer.getTextWidget();
+ if (text == null || text.isDisposed())
+ return;
+
+ text.removeKeyListener(this);
+ text.removeMouseListener(this);
+ text.removeMouseMoveListener(this);
+ text.removeFocusListener(this);
+ text.removePaintListener(this);
+ }
+
+ /*
+ * @see IPropertyChangeListener#propertyChange(PropertyChangeEvent)
+ */
+ public void propertyChange(PropertyChangeEvent event) {
+ if (event.getProperty().equals(JavaEditor.LINK_COLOR)) {
+ ISourceViewer viewer= getSourceViewer();
+ if (viewer != null)
+ updateColor(viewer);
+ } else if (event.getProperty().equals(BROWSER_LIKE_LINKS_KEY_MODIFIER)) {
+ updateKeyModifierMask();
+ }
+ }
+
+ private void updateColor(ISourceViewer viewer) {
+ if (fColor != null)
+ fColor.dispose();
+
+ StyledText text= viewer.getTextWidget();
+ if (text == null || text.isDisposed())
+ return;
+
+ Display display= text.getDisplay();
+ fColor= createColor(getPreferenceStore(), JavaEditor.LINK_COLOR, display);
+ }
+
+ /**
+ * Creates a color from the information stored in the given preference store.
+ * Returns <code>null</code> if there is no such information available.
+ */
+ private Color createColor(IPreferenceStore store, String key, Display display) {
+
+ RGB rgb= null;
+
+ if (store.contains(key)) {
+
+ if (store.isDefault(key))
+ rgb= PreferenceConverter.getDefaultColor(store, key);
+ else
+ rgb= PreferenceConverter.getColor(store, key);
+
+ if (rgb != null)
+ return new Color(display, rgb);
+ }
+
+ return null;
+ }
+
+ private void repairRepresentation() {
+ repairRepresentation(false);
+ }
+
+ private void repairRepresentation(boolean redrawAll) {
+
+ if (fActiveRegion == null)
+ return;
+
+ int offset= fActiveRegion.getOffset();
+ int length= fActiveRegion.getLength();
+ fActiveRegion= null;
+
+ ISourceViewer viewer= getSourceViewer();
+ if (viewer != null) {
+ resetCursor(viewer);
+
+ // remove style
+ if (!redrawAll && viewer instanceof ITextViewerExtension2)
+ ((ITextViewerExtension2) viewer).invalidateTextPresentation(offset, length);
+ else
+ viewer.invalidateTextPresentation();
+
+ if (viewer instanceof ITextViewerExtension3) {
+ ITextViewerExtension3 extension= (ITextViewerExtension3) viewer;
+ offset= extension.modelOffset2WidgetOffset(offset);
+ } else {
+ offset -= viewer.getVisibleRegion().getOffset();
+ }
+
+ try {
+ StyledText text= viewer.getTextWidget();
+ // Removes style
+ text.replaceStyleRanges(fOldStyleRangeRegion.getOffset(), fOldStyleRangeRegion.getLength(), fOldStyleRanges);
+// text.replaceStyleRanges(offset, length, fOldStyleRanges);
+ // Causes underline to disappear
+ text.redrawRange(offset, length, false);
+ } catch (IllegalArgumentException x) {
+ JavaPlugin.log(x);
+ }
+ }
+ }
+
+ // will eventually be replaced by a method provided by jdt.core
+ private IRegion selectWord(IDocument document, int anchor) {
+
+ try {
+ int offset= anchor;
+ char c;
+
+ while (offset >= 0) {
+ c= document.getChar(offset);
+ if (!Character.isJavaIdentifierPart(c))
+ break;
+ --offset;
+ }
+
+ int start= offset;
+
+ offset= anchor;
+ int length= document.getLength();
+
+ while (offset < length) {
+ c= document.getChar(offset);
+ if (!Character.isJavaIdentifierPart(c))
+ break;
+ ++offset;
+ }
+
+ int end= offset;
+
+ if (start == end)
+ return new Region(start, 0);
+ else
+ return new Region(start + 1, end - start - 1);
+
+ } catch (BadLocationException x) {
+ return null;
+ }
+ }
+
+ IRegion getCurrentTextRegion(ISourceViewer viewer) {
+
+ int offset= getCurrentTextOffset(viewer);
+ if (offset == -1)
+ return null;
+
+ IJavaElement input= SelectionConverter.getInput(JavaEditor.this);
+ if (input == null)
+ return null;
+
+ try {
+
+ IJavaElement[] elements= null;
+ synchronized (input) {
+ elements= ((ICodeAssist) input).codeSelect(offset, 0);
+ }
+
+ if (elements == null || elements.length == 0)
+ return null;
+
+ return selectWord(viewer.getDocument(), offset);
+
+ } catch (JavaModelException e) {
+ return null;
+ }
+ }
+
+ private int getCurrentTextOffset(ISourceViewer viewer) {
+
+ try {
+ StyledText text= viewer.getTextWidget();
+ if (text == null || text.isDisposed())
+ return -1;
+
+ Display display= text.getDisplay();
+ Point absolutePosition= display.getCursorLocation();
+ Point relativePosition= text.toControl(absolutePosition);
+
+ int widgetOffset= text.getOffsetAtLocation(relativePosition);
+ if (viewer instanceof ITextViewerExtension3) {
+ ITextViewerExtension3 extension= (ITextViewerExtension3) viewer;
+ return extension.widgetOffset2ModelOffset(widgetOffset);
+ } else {
+ return widgetOffset + viewer.getVisibleRegion().getOffset();
+ }
+
+ } catch (IllegalArgumentException e) {
+ return -1;
+ }
+ }
+
+ private void highlightRegion(ISourceViewer viewer, IRegion region) {
+
+ if (region.equals(fActiveRegion))
+ return;
+
+ repairRepresentation();
+
+ StyledText text= viewer.getTextWidget();
+ if (text == null || text.isDisposed())
+ return;
+
+ // highlight region
+ int offset= 0;
+ int length= 0;
+
+ if (viewer instanceof ITextViewerExtension3) {
+ ITextViewerExtension3 extension= (ITextViewerExtension3) viewer;
+ IRegion widgetRange= extension.modelRange2WidgetRange(region);
+ if (widgetRange == null)
+ return;
+
+ offset= widgetRange.getOffset();
+ length= widgetRange.getLength();
+
+ } else {
+ offset= region.getOffset() - viewer.getVisibleRegion().getOffset();
+ length= region.getLength();
+ }
+
+ fOldStyleRanges = text.getStyleRanges(offset, length);
+ fOldStyleRangeRegion= new Region(offset, length);
+
+ applyForgroundStyle(text, offset, length);
+ text.redrawRange(offset, length, false);
+
+ fActiveRegion= region;
+ }
+
+ private void applyForgroundStyle(StyledText fTextWidget, int offset, int length) {
+ StyleRange[] styleRanges= fTextWidget.getStyleRanges(offset, length);
+ ArrayList newStyleRanges= new ArrayList(styleRanges.length + 10);
+ int rangeOffset= offset;
+ for (int i= 0, max= styleRanges.length; i < max; i++) {
+ StyleRange sr= styleRanges[i];
+ if (rangeOffset < sr.start) {
+ // Unstyled range
+ StyleRange usr= new StyleRange(rangeOffset, sr.start - rangeOffset, fColor, null);
+ newStyleRanges.add(usr);
+ }
+ rangeOffset= sr.start + sr.length;
+ // Important: Must create a new one
+ sr= new StyleRange(sr.start, sr.length, fColor, sr.background, sr.fontStyle);
+ newStyleRanges.add(sr);
+ }
+ int endOffset= offset + length;
+ if (rangeOffset < endOffset) {
+ // Last unstyled range
+ StyleRange usr= new StyleRange(rangeOffset, endOffset - rangeOffset, fColor, null);
+ newStyleRanges.add(usr);
+ }
+ styleRanges= (StyleRange[])newStyleRanges.toArray(new StyleRange[newStyleRanges.size()]);
+ fTextWidget.replaceStyleRanges(offset, length, styleRanges);
+ }
+
+ private void activateCursor(ISourceViewer viewer) {
+ StyledText text= viewer.getTextWidget();
+ if (text == null || text.isDisposed())
+ return;
+ Display display= text.getDisplay();
+ if (fCursor == null)
+ fCursor= new Cursor(display, SWT.CURSOR_HAND);
+ text.setCursor(fCursor);
+ }
+
+ private void resetCursor(ISourceViewer viewer) {
+ StyledText text= viewer.getTextWidget();
+ if (text != null && !text.isDisposed())
+ text.setCursor(null);
+
+ if (fCursor != null) {
+ fCursor.dispose();
+ fCursor= null;
+ }
+ }
+
+ /*
+ * @see org.eclipse.swt.events.KeyListener#keyPressed(org.eclipse.swt.events.KeyEvent)
+ */
+ public void keyPressed(KeyEvent event) {
+
+ if (fActive) {
+ deactivate();
+ return;
+ }
+
+ if (event.keyCode != fKeyModifierMask) {
+ deactivate();
+ return;
+ }
+
+ fActive= true;
+
+// removed for #25871
+//
+// ISourceViewer viewer= getSourceViewer();
+// if (viewer == null)
+// return;
+//
+// IRegion region= getCurrentTextRegion(viewer);
+// if (region == null)
+// return;
+//
+// highlightRegion(viewer, region);
+// activateCursor(viewer);
+ }
+
+ /*
+ * @see org.eclipse.swt.events.KeyListener#keyReleased(org.eclipse.swt.events.KeyEvent)
+ */
+ public void keyReleased(KeyEvent event) {
+
+ if (!fActive)
+ return;
+
+ deactivate();
+ }
+
+ /*
+ * @see org.eclipse.swt.events.MouseListener#mouseDoubleClick(org.eclipse.swt.events.MouseEvent)
+ */
+ public void mouseDoubleClick(MouseEvent e) {}
+ /*
+ * @see org.eclipse.swt.events.MouseListener#mouseDown(org.eclipse.swt.events.MouseEvent)
+ */
+ public void mouseDown(MouseEvent event) {
+
+ if (!fActive)
+ return;
+
+ if (event.stateMask != fKeyModifierMask) {
+ deactivate();
+ return;
+ }
+
+ if (event.button != 1) {
+ deactivate();
+ return;
+ }
+ }
+
+ /*
+ * @see org.eclipse.swt.events.MouseListener#mouseUp(org.eclipse.swt.events.MouseEvent)
+ */
+ public void mouseUp(MouseEvent e) {
+
+ if (!fActive)
+ return;
+
+ if (e.button != 1) {
+ deactivate();
+ return;
+ }
+
+ boolean wasActive= fCursor != null;
+
+ deactivate();
+
+ if (wasActive) {
+ IAction action= getAction("OpenEditor"); //$NON-NLS-1$
+ if (action != null)
+ action.run();
+ }
+ }
+
+ /*
+ * @see org.eclipse.swt.events.MouseMoveListener#mouseMove(org.eclipse.swt.events.MouseEvent)
+ */
+ public void mouseMove(MouseEvent event) {
+
+ if (event.widget instanceof Control && !((Control) event.widget).isFocusControl()) {
+ deactivate();
+ return;
+ }
+
+ if (!fActive) {
+ if (event.stateMask != fKeyModifierMask)
+ return;
+ // modifier was already pressed
+ fActive= true;
+ }
+
+ ISourceViewer viewer= getSourceViewer();
+ if (viewer == null) {
+ deactivate();
+ return;
+ }
+
+ StyledText text= viewer.getTextWidget();
+ if (text == null || text.isDisposed()) {
+ deactivate();
+ return;
+ }
+
+ if ((event.stateMask & SWT.BUTTON1) != 0 && text.getSelectionCount() != 0) {
+ deactivate();
+ return;
+ }
+
+ IRegion region= getCurrentTextRegion(viewer);
+ if (region == null || region.getLength() == 0) {
+ repairRepresentation();
+ return;
+ }
+
+ highlightRegion(viewer, region);
+ activateCursor(viewer);
+ }
+
+ /*
+ * @see org.eclipse.swt.events.FocusListener#focusGained(org.eclipse.swt.events.FocusEvent)
+ */
+ public void focusGained(FocusEvent e) {}
+
+ /*
+ * @see org.eclipse.swt.events.FocusListener#focusLost(org.eclipse.swt.events.FocusEvent)
+ */
+ public void focusLost(FocusEvent event) {
+ deactivate();
+ }
+
+ /*
+ * @see org.eclipse.jface.text.IDocumentListener#documentAboutToBeChanged(org.eclipse.jface.text.DocumentEvent)
+ */
+ public void documentAboutToBeChanged(DocumentEvent event) {
+ if (fActive && fActiveRegion != null) {
+ fRememberedPosition= new Position(fActiveRegion.getOffset(), fActiveRegion.getLength());
+ try {
+ event.getDocument().addPosition(fRememberedPosition);
+ } catch (BadLocationException x) {
+ fRememberedPosition= null;
+ }
+ }
+ }
+
+ /*
+ * @see org.eclipse.jface.text.IDocumentListener#documentChanged(org.eclipse.jface.text.DocumentEvent)
+ */
+ public void documentChanged(DocumentEvent event) {
+ if (fRememberedPosition != null) {
+ if (!fRememberedPosition.isDeleted()) {
+
+ event.getDocument().removePosition(fRememberedPosition);
+ fActiveRegion= new Region(fRememberedPosition.getOffset(), fRememberedPosition.getLength());
+ fRememberedPosition= null;
+
+ ISourceViewer viewer= getSourceViewer();
+ if (viewer != null) {
+ StyledText widget= viewer.getTextWidget();
+ if (widget != null && !widget.isDisposed()) {
+ widget.getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ deactivate();
+ }
+ });
+ }
+ }
+
+ } else {
+ fActiveRegion= null;
+ fRememberedPosition= null;
+ deactivate();
+ }
+ }
+ }
+
+ /*
+ * @see org.eclipse.jface.text.ITextInputListener#inputDocumentAboutToBeChanged(org.eclipse.jface.text.IDocument, org.eclipse.jface.text.IDocument)
+ */
+ public void inputDocumentAboutToBeChanged(IDocument oldInput, IDocument newInput) {
+ if (oldInput == null)
+ return;
+ deactivate();
+ oldInput.removeDocumentListener(this);
+ }
+
+ /*
+ * @see org.eclipse.jface.text.ITextInputListener#inputDocumentChanged(org.eclipse.jface.text.IDocument, org.eclipse.jface.text.IDocument)
+ */
+ public void inputDocumentChanged(IDocument oldInput, IDocument newInput) {
+ if (newInput == null)
+ return;
+ newInput.addDocumentListener(this);
+ }
+
+ /*
+ * @see PaintListener#paintControl(PaintEvent)
+ */
+ public void paintControl(PaintEvent event) {
+ if (fActiveRegion == null)
+ return;
+
+ ISourceViewer viewer= getSourceViewer();
+ if (viewer == null)
+ return;
+
+ StyledText text= viewer.getTextWidget();
+ if (text == null || text.isDisposed())
+ return;
+
+
+ int offset= 0;
+ int length= 0;
+
+ if (viewer instanceof ITextViewerExtension3) {
+
+ ITextViewerExtension3 extension= (ITextViewerExtension3) viewer;
+ IRegion widgetRange= extension.modelRange2WidgetRange(new Region(offset, length));
+ if (widgetRange == null)
+ return;
+
+ offset= widgetRange.getOffset();
+ length= widgetRange.getLength();
+
+ } else {
+
+ IRegion region= viewer.getVisibleRegion();
+ if (!includes(region, fActiveRegion))
+ return;
+
+ offset= fActiveRegion.getOffset() - region.getOffset();
+ length= fActiveRegion.getLength();
+ }
+
+ // support for bidi
+ Point minLocation= getMinimumLocation(text, offset, length);
+ Point maxLocation= getMaximumLocation(text, offset, length);
+
+ int x1= minLocation.x;
+ int x2= minLocation.x + maxLocation.x - minLocation.x - 1;
+ int y= minLocation.y + text.getLineHeight() - 1;
+
+ GC gc= event.gc;
+ if (fColor != null && !fColor.isDisposed())
+ gc.setForeground(fColor);
+ gc.drawLine(x1, y, x2, y);
+ }
+
+ private boolean includes(IRegion region, IRegion position) {
+ return
+ position.getOffset() >= region.getOffset() &&
+ position.getOffset() + position.getLength() <= region.getOffset() + region.getLength();
+ }
+
+ private Point getMinimumLocation(StyledText text, int offset, int length) {
+ Point minLocation= new Point(Integer.MAX_VALUE, Integer.MAX_VALUE);
+
+ for (int i= 0; i <= length; i++) {
+ Point location= text.getLocationAtOffset(offset + i);
+
+ if (location.x < minLocation.x)
+ minLocation.x= location.x;
+ if (location.y < minLocation.y)
+ minLocation.y= location.y;
+ }
+
+ return minLocation;
+ }
+
+ private Point getMaximumLocation(StyledText text, int offset, int length) {
+ Point maxLocation= new Point(Integer.MIN_VALUE, Integer.MIN_VALUE);
+
+ for (int i= 0; i <= length; i++) {
+ Point location= text.getLocationAtOffset(offset + i);
+
+ if (location.x > maxLocation.x)
+ maxLocation.x= location.x;
+ if (location.y > maxLocation.y)
+ maxLocation.y= location.y;
+ }
+
+ return maxLocation;
+ }
+ }
+
+ /**
+ * This action dispatches into two behaviours: If there is no current text
+ * hover, the javadoc is displayed using information presenter. If there is
+ * a current text hover, it is converted into a information presenter in
+ * order to make it sticky.
+ */
+ class InformationDispatchAction extends TextEditorAction {
+
+ /** The wrapped text operation action. */
+ private final TextOperationAction fTextOperationAction;
+
+ /**
+ * Creates a dispatch action.
+ */
+ public InformationDispatchAction(ResourceBundle resourceBundle, String prefix, final TextOperationAction textOperationAction) {
+ super(resourceBundle, prefix, JavaEditor.this);
+ if (textOperationAction == null)
+ throw new IllegalArgumentException();
+ fTextOperationAction= textOperationAction;
+ }
+
+ /*
+ * @see org.eclipse.jface.action.IAction#run()
+ */
+ public void run() {
+
+ /**
+ * Information provider used to present the information.
+ *
+ * @since 3.0
+ */
+ class InformationProvider implements IInformationProvider, IInformationProviderExtension2 {
+
+ private IRegion fHoverRegion;
+ private String fHoverInfo;
+ private IInformationControlCreator fControlCreator;
+
+ InformationProvider(IRegion hoverRegion, String hoverInfo, IInformationControlCreator controlCreator) {
+ fHoverRegion= hoverRegion;
+ fHoverInfo= hoverInfo;
+ fControlCreator= controlCreator;
+ }
+ /*
+ * @see org.eclipse.jface.text.information.IInformationProvider#getSubject(org.eclipse.jface.text.ITextViewer, int)
+ */
+ public IRegion getSubject(ITextViewer textViewer, int invocationOffset) {
+ return fHoverRegion;
+ }
+ /*
+ * @see org.eclipse.jface.text.information.IInformationProvider#getInformation(org.eclipse.jface.text.ITextViewer, org.eclipse.jface.text.IRegion)
+ */
+ public String getInformation(ITextViewer textViewer, IRegion subject) {
+ return fHoverInfo;
+ }
+ /*
+ * @see org.eclipse.jface.text.information.IInformationProviderExtension2#getInformationPresenterControlCreator()
+ * @since 3.0
+ */
+ public IInformationControlCreator getInformationPresenterControlCreator() {
+ return fControlCreator;
+ }
+ }
+
+ ISourceViewer sourceViewer= getSourceViewer();
+ if (sourceViewer == null) {
+ fTextOperationAction.run();
+ return;
+ }
+
+ if (sourceViewer instanceof ITextViewerExtension4) {
+ ITextViewerExtension4 extension4= (ITextViewerExtension4) sourceViewer;
+ if (extension4.moveFocusToWidgetToken())
+ return;
+ }
+
+ if (! (sourceViewer instanceof ITextViewerExtension2)) {
+ fTextOperationAction.run();
+ return;
+ }
+
+ ITextViewerExtension2 textViewerExtension2= (ITextViewerExtension2) sourceViewer;
+
+ // does a text hover exist?
+ ITextHover textHover= textViewerExtension2.getCurrentTextHover();
+ if (textHover == null) {
+ fTextOperationAction.run();
+ return;
+ }
+
+ Point hoverEventLocation= textViewerExtension2.getHoverEventLocation();
+ int offset= computeOffsetAtLocation(sourceViewer, hoverEventLocation.x, hoverEventLocation.y);
+ if (offset == -1) {
+ fTextOperationAction.run();
+ return;
+ }
+
+ try {
+ // get the text hover content
+ String contentType= TextUtilities.getContentType(sourceViewer.getDocument(), IJavaPartitions.JAVA_PARTITIONING, offset);
+
+ IRegion hoverRegion= textHover.getHoverRegion(sourceViewer, offset);
+ if (hoverRegion == null)
+ return;
+
+ String hoverInfo= textHover.getHoverInfo(sourceViewer, hoverRegion);
+
+ IInformationControlCreator controlCreator= null;
+ if (textHover instanceof IInformationProviderExtension2)
+ controlCreator= ((IInformationProviderExtension2)textHover).getInformationPresenterControlCreator();
+
+ IInformationProvider informationProvider= new InformationProvider(hoverRegion, hoverInfo, controlCreator);
+
+ fInformationPresenter.setOffset(offset);
+ fInformationPresenter.setInformationProvider(informationProvider, contentType);
+ fInformationPresenter.showInformation();
+
+ } catch (BadLocationException e) {
+ }
+ }
+
+ // modified version from TextViewer
+ private int computeOffsetAtLocation(ITextViewer textViewer, int x, int y) {
+
+ StyledText styledText= textViewer.getTextWidget();
+ IDocument document= textViewer.getDocument();
+
+ if (document == null)
+ return -1;
+
+ try {
+ int widgetLocation= styledText.getOffsetAtLocation(new Point(x, y));
+ if (textViewer instanceof ITextViewerExtension3) {
+ ITextViewerExtension3 extension= (ITextViewerExtension3) textViewer;
+ return extension.widgetOffset2ModelOffset(widgetLocation);
+ } else {
+ IRegion visibleRegion= textViewer.getVisibleRegion();
+ return widgetLocation + visibleRegion.getOffset();
+ }
+ } catch (IllegalArgumentException e) {
+ return -1;
+ }
+
+ }
+ }
+
+ static protected class AnnotationAccess extends DefaultMarkerAnnotationAccess {
+
+ public AnnotationAccess(MarkerAnnotationPreferences markerAnnotationPreferences) {
+ super(markerAnnotationPreferences);
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IAnnotationAccess#getType(org.eclipse.jface.text.source.Annotation)
+ */
+ public Object getType(Annotation annotation) {
+ if (annotation instanceof IJavaAnnotation) {
+ IJavaAnnotation javaAnnotation= (IJavaAnnotation) annotation;
+ if (javaAnnotation.isRelevant())
+ return javaAnnotation.getAnnotationType();
+ return null;
+ }
+ return super.getType(annotation);
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IAnnotationAccess#isMultiLine(org.eclipse.jface.text.source.Annotation)
+ */
+ public boolean isMultiLine(Annotation annotation) {
+ return true;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IAnnotationAccess#isTemporary(org.eclipse.jface.text.source.Annotation)
+ */
+ public boolean isTemporary(Annotation annotation) {
+ if (annotation instanceof IJavaAnnotation) {
+ IJavaAnnotation javaAnnotation= (IJavaAnnotation) annotation;
+ if (javaAnnotation.isRelevant())
+ return javaAnnotation.isTemporary();
+ }
+ return false;
+ }
+ }
+
+ private class PropertyChangeListener implements org.eclipse.core.runtime.Preferences.IPropertyChangeListener {
+ /*
+ * @see IPropertyChangeListener#propertyChange(PropertyChangeEvent)
+ */
+ public void propertyChange(org.eclipse.core.runtime.Preferences.PropertyChangeEvent event) {
+ handlePreferencePropertyChanged(event);
+ }
+ }
+
+ /**
+ * This action implements smart home.
+ *
+ * Instead of going to the start of a line it does the following:
+ *
+ * - if smart home/end is enabled and the caret is after the line's first non-whitespace then the caret is moved directly before it, taking JavaDoc and multi-line comments into account.
+ * - if the caret is before the line's first non-whitespace the caret is moved to the beginning of the line
+ * - if the caret is at the beginning of the line see first case.
+ *
+ * @since 3.0
+ */
+ protected class SmartLineStartAction extends LineStartAction {
+
+ /**
+ * Creates a new smart line start action
+ *
+ * @param textWidget the styled text widget
+ * @param doSelect a boolean flag which tells if the text up to the beginning of the line should be selected
+ */
+ public SmartLineStartAction(final StyledText textWidget, final boolean doSelect) {
+ super(textWidget, doSelect);
+ }
+
+ /*
+ * @see org.eclipse.ui.texteditor.AbstractTextEditor.LineStartAction#getLineStartPosition(java.lang.String, int, java.lang.String)
+ */
+ protected int getLineStartPosition(final IDocument document, final String line, final int length, final int offset) {
+
+ String type= IDocument.DEFAULT_CONTENT_TYPE;
+ try {
+ type= TextUtilities.getPartition(document, IJavaPartitions.JAVA_PARTITIONING, offset).getType();
+ } catch (BadLocationException exception) {
+ // Should not happen
+ }
+
+ int index= super.getLineStartPosition(document, line, length, offset);
+ if (type.equals(IJavaPartitions.JAVA_DOC) || type.equals(IJavaPartitions.JAVA_MULTI_LINE_COMMENT)) {
+ if (index < length - 1 && line.charAt(index) == '*' && line.charAt(index + 1) != '/') {
+ do {
+ ++index;
+ } while (index < length && Character.isWhitespace(line.charAt(index)));
+ }
+ } else {
+ if (index < length - 1 && line.charAt(index) == '/' && line.charAt(++index) == '/') {
+ do {
+ ++index;
+ } while (index < length && Character.isWhitespace(line.charAt(index)));
+ }
+ }
+ return index;
+ }
+ }
+
+ /**
+ * Text navigation action to navigate to the next sub-word.
+ *
+ * @since 3.0
+ */
+ protected abstract class NextSubWordAction extends TextNavigationAction {
+
+ /** Collator to determine the sub-word boundaries */
+ private final RuleBasedCollator fCollator= (RuleBasedCollator)Collator.getInstance();
+
+ /**
+ * Creates a new next sub-word action.
+ *
+ * @param code Action code for the default operation. Must be an action code from @see org.eclipse.swt.custom.ST.
+ */
+ protected NextSubWordAction(int code) {
+ super(getSourceViewer().getTextWidget(), code);
+
+ // Only compare upper-/lower case
+ fCollator.setStrength(Collator.TERTIARY);
+ }
+
+ /*
+ * @see org.eclipse.jface.action.IAction#run()
+ */
+ public void run() {
+ try {
+
+ final ISourceViewer viewer= getSourceViewer();
+ final IDocument document= viewer.getDocument();
+
+ int position= widgetOffset2ModelOffset(viewer, viewer.getTextWidget().getCaretOffset());
+
+ // Check whether we are in a java code partititon and the preference is enabled
+ final IPreferenceStore store= getPreferenceStore();
+ final ITypedRegion region= TextUtilities.getPartition(document, IJavaPartitions.JAVA_PARTITIONING, position);
+ if (!store.getBoolean(PreferenceConstants.EDITOR_SUB_WORD_NAVIGATION)) {
+ super.run();
+ return;
+ }
+
+ // Check whether right hand character of caret is valid identifier start
+ if (Character.isJavaIdentifierStart(document.getChar(position))) {
+
+ int offset= 0;
+ int order= CollationElementIterator.NULLORDER;
+ short previous= Short.MAX_VALUE;
+ short next= Short.MAX_VALUE;
+
+ // Acquire collator for partition around caret
+ final String buffer= document.get(position, region.getOffset() + region.getLength() - position);
+ final CollationElementIterator iterator= fCollator.getCollationElementIterator(buffer);
+
+ // Iterate to first upper-case character
+ do {
+ // Check whether we reached end of word
+ offset= iterator.getOffset();
+ if (!Character.isJavaIdentifierPart(document.getChar(position + offset)))
+ throw new BadLocationException();
+
+ // Test next characters
+ order= iterator.next();
+ next= CollationElementIterator.tertiaryOrder(order);
+ if (next <= previous)
+ previous= next;
+ else
+ break;
+
+ } while (order != CollationElementIterator.NULLORDER);
+
+ // Check for leading underscores
+ position += offset;
+ if (Character.getType(document.getChar(position - 1)) != Character.CONNECTOR_PUNCTUATION) {
+ setCaretPosition(position);
+ getTextWidget().showSelection();
+ fireSelectionChanged();
+ return;
+ }
+ }
+ } catch (BadLocationException exception) {
+ // Use default behavior
+ }
+ super.run();
+ }
+
+ /**
+ * Sets the caret position to the sub-word boundary given with <code>position</code>.
+ *
+ * @param position Position where the action should move the caret
+ */
+ protected abstract void setCaretPosition(int position);
+ }
+
+ /**
+ * Text navigation action to navigate to the next sub-word.
+ *
+ * @since 3.0
+ */
+ protected class NavigateNextSubWordAction extends NextSubWordAction {
+
+ /**
+ * Creates a new navigate next sub-word action.
+ */
+ public NavigateNextSubWordAction() {
+ super(ST.WORD_NEXT);
+ }
+
+ /*
+ * @see org.eclipse.wst.jsdt.internal.ui.javaeditor.JavaEditor.NextSubWordAction#setCaretPosition(int)
+ */
+ protected void setCaretPosition(final int position) {
+ getTextWidget().setCaretOffset(modelOffset2WidgetOffset(getSourceViewer(), position));
+ }
+ }
+
+ /**
+ * Text operation action to delete the next sub-word.
+ *
+ * @since 3.0
+ */
+ protected class DeleteNextSubWordAction extends NextSubWordAction {
+
+ /**
+ * Creates a new delete next sub-word action.
+ */
+ public DeleteNextSubWordAction() {
+ super(ST.DELETE_WORD_NEXT);
+ }
+
+ /*
+ * @see org.eclipse.wst.jsdt.internal.ui.javaeditor.JavaEditor.NextSubWordAction#setCaretPosition(int)
+ */
+ protected void setCaretPosition(final int position) {
+ final ISourceViewer viewer= getSourceViewer();
+ final int caret= widgetOffset2ModelOffset(viewer, viewer.getTextWidget().getCaretOffset());
+
+ try {
+ viewer.getDocument().replace(caret, position - caret, ""); //$NON-NLS-1$
+ } catch (BadLocationException exception) {
+ // Should not happen
+ }
+ }
+ }
+
+ /**
+ * Text operation action to select the next sub-word.
+ *
+ * @since 3.0
+ */
+ protected class SelectNextSubWordAction extends NextSubWordAction {
+
+ /**
+ * Creates a new select next sub-word action.
+ */
+ public SelectNextSubWordAction() {
+ super(ST.SELECT_WORD_NEXT);
+ }
+
+ /*
+ * @see org.eclipse.wst.jsdt.internal.ui.javaeditor.JavaEditor.NextSubWordAction#setCaretPosition(int)
+ */
+ protected void setCaretPosition(final int position) {
+ final ISourceViewer viewer= getSourceViewer();
+
+ final StyledText text= viewer.getTextWidget();
+ if (text != null && !text.isDisposed()) {
+
+ final Point selection= text.getSelection();
+ final int caret= text.getCaretOffset();
+ final int offset= modelOffset2WidgetOffset(viewer, position);
+
+ if (caret == selection.x)
+ text.setSelectionRange(selection.y, offset - selection.y);
+ else
+ text.setSelectionRange(selection.x, offset - selection.x);
+ }
+ }
+ }
+
+ /**
+ * Text navigation action to navigate to the previous sub-word.
+ *
+ * @since 3.0
+ */
+ protected abstract class PreviousSubWordAction extends TextNavigationAction {
+
+ /** Collator to determine the sub-word boundaries */
+ private final RuleBasedCollator fCollator= (RuleBasedCollator)Collator.getInstance();
+
+ /**
+ * Creates a new previous sub-word action.
+ *
+ * @param code Action code for the default operation. Must be an action code from @see org.eclipse.swt.custom.ST.
+ */
+ protected PreviousSubWordAction(final int code) {
+ super(getSourceViewer().getTextWidget(), code);
+
+ // Only compare upper-/lower case
+ fCollator.setStrength(Collator.TERTIARY);
+ }
+
+ /*
+ * @see org.eclipse.jface.action.IAction#run()
+ */
+ public void run() {
+ try {
+
+ final ISourceViewer viewer= getSourceViewer();
+ final IDocument document= viewer.getDocument();
+
+ int position= widgetOffset2ModelOffset(viewer, viewer.getTextWidget().getCaretOffset()) - 1;
+
+ // Check whether we are in a java code partititon and the preference is enabled
+ final IPreferenceStore store= getPreferenceStore();
+ if (!store.getBoolean(PreferenceConstants.EDITOR_SUB_WORD_NAVIGATION)) {
+ super.run();
+ return;
+ }
+
+ // Ignore trailing white spaces
+ char character= document.getChar(position);
+ while (position > 0 && Character.isWhitespace(character)) {
+ --position;
+ character= document.getChar(position);
+ }
+
+ // Check whether left hand character of caret is valid identifier part
+ if (Character.isJavaIdentifierPart(character)) {
+
+ int offset= 0;
+ int order= CollationElementIterator.NULLORDER;
+ short previous= Short.MAX_VALUE;
+ short next= Short.MAX_VALUE;
+
+ // Acquire collator for partition around caret
+ final ITypedRegion region= TextUtilities.getPartition(document, IJavaPartitions.JAVA_PARTITIONING, position);
+ final String buffer= document.get(region.getOffset(), position - region.getOffset() + 1);
+ final CollationElementIterator iterator= fCollator.getCollationElementIterator(buffer);
+
+ // Iterate to first upper-case character
+ iterator.setOffset(buffer.length() - 1);
+ do {
+
+ // Check whether we reached begin of word or single upper-case start
+ offset= iterator.getOffset();
+ character= document.getChar(region.getOffset() + offset);
+ if (!Character.isJavaIdentifierPart(character))
+ throw new BadLocationException();
+ else if (Character.isUpperCase(character)) {
+ ++offset;
+ break;
+ }
+
+ // Test next characters
+ order= iterator.previous();
+ next= CollationElementIterator.tertiaryOrder(order);
+ if (next <= previous)
+ previous= next;
+ else
+ break;
+
+ } while (order != CollationElementIterator.NULLORDER);
+
+ // Check left character for multiple upper-case characters
+ position= position - buffer.length() + offset - 1;
+ character= document.getChar(position);
+
+ while (position >= 0 && Character.isUpperCase(character))
+ character= document.getChar(--position);
+
+ setCaretPosition(position + 1);
+ getTextWidget().showSelection();
+ fireSelectionChanged();
+ return;
+ }
+ } catch (BadLocationException exception) {
+ // Use default behavior
+ }
+ super.run();
+ }
+
+ /**
+ * Sets the caret position to the sub-word boundary given with <code>position</code>.
+ *
+ * @param position Position where the action should move the caret
+ */
+ protected abstract void setCaretPosition(int position);
+ }
+
+ /**
+ * Text navigation action to navigate to the previous sub-word.
+ *
+ * @since 3.0
+ */
+ protected class NavigatePreviousSubWordAction extends PreviousSubWordAction {
+
+ /**
+ * Creates a new navigate previous sub-word action.
+ */
+ public NavigatePreviousSubWordAction() {
+ super(ST.WORD_PREVIOUS);
+ }
+
+ /*
+ * @see org.eclipse.wst.jsdt.internal.ui.javaeditor.JavaEditor.PreviousSubWordAction#setCaretPosition(int)
+ */
+ protected void setCaretPosition(final int position) {
+ getTextWidget().setCaretOffset(modelOffset2WidgetOffset(getSourceViewer(), position));
+ }
+ }
+
+ /**
+ * Text operation action to delete the previous sub-word.
+ *
+ * @since 3.0
+ */
+ protected class DeletePreviousSubWordAction extends PreviousSubWordAction {
+
+ /**
+ * Creates a new delete previous sub-word action.
+ */
+ public DeletePreviousSubWordAction() {
+ super(ST.DELETE_WORD_PREVIOUS);
+ }
+
+ /*
+ * @see org.eclipse.wst.jsdt.internal.ui.javaeditor.JavaEditor.PreviousSubWordAction#setCaretPosition(int)
+ */
+ protected void setCaretPosition(final int position) {
+ final ISourceViewer viewer= getSourceViewer();
+ final int caret= widgetOffset2ModelOffset(viewer, viewer.getTextWidget().getCaretOffset());
+
+ try {
+ viewer.getDocument().replace(position, caret - position, ""); //$NON-NLS-1$
+ } catch (BadLocationException exception) {
+ // Should not happen
+ }
+ }
+ }
+
+ /**
+ * Text operation action to select the previous sub-word.
+ *
+ * @since 3.0
+ */
+ protected class SelectPreviousSubWordAction extends PreviousSubWordAction {
+
+ /**
+ * Creates a new select previous sub-word action.
+ */
+ public SelectPreviousSubWordAction() {
+ super(ST.SELECT_WORD_PREVIOUS);
+ }
+
+ /*
+ * @see org.eclipse.wst.jsdt.internal.ui.javaeditor.JavaEditor.PreviousSubWordAction#setCaretPosition(int)
+ */
+ protected void setCaretPosition(final int position) {
+ final ISourceViewer viewer= getSourceViewer();
+
+ final StyledText text= viewer.getTextWidget();
+ if (text != null && !text.isDisposed()) {
+
+ final Point selection= text.getSelection();
+ final int caret= text.getCaretOffset();
+ final int offset= modelOffset2WidgetOffset(viewer, position);
+
+ if (caret == selection.x)
+ text.setSelectionRange(selection.y, offset - selection.y);
+ else
+ text.setSelectionRange(selection.x, offset - selection.x);
+ }
+ }
+ }
+
+ /**
+ * Quick format action to format the enclosing java element.
+ * <p>
+ * The quick format action works as follows:
+ * <ul>
+ * <li>If there is no selection and the caret is positioned on a Java element,
+ * only this element is formatted. If the element has some accompanying comment,
+ * then the comment is formatted as well.</li>
+ * <li>If the selection spans one or more partitions of the document, then all
+ * partitions covered by the selection are entirely formatted.</li>
+ * <p>
+ * Partitions at the end of the selection are not completed, except for comments.
+ *
+ * @since 3.0
+ */
+ protected class QuickFormatAction extends Action {
+
+ /*
+ * @see org.eclipse.jface.action.IAction#run()
+ */
+ public void run() {
+
+ final JavaSourceViewer viewer= (JavaSourceViewer) getSourceViewer();
+ if (viewer.isEditable()) {
+
+ final Point selection= viewer.rememberSelection();
+ try {
+ viewer.setRedraw(false);
+
+ final String type= TextUtilities.getContentType(viewer.getDocument(), IJavaPartitions.JAVA_PARTITIONING, selection.x);
+ if (type.equals(IDocument.DEFAULT_CONTENT_TYPE) && selection.y == 0) {
+
+ try {
+ final IJavaElement element= getElementAt(selection.x, true);
+ if (element != null && element.exists()) {
+
+ final int kind= element.getElementType();
+ if (kind == IJavaElement.TYPE || kind == IJavaElement.METHOD || kind == IJavaElement.INITIALIZER) {
+
+ final ISourceReference reference= (ISourceReference)element;
+ final ISourceRange range= reference.getSourceRange();
+
+ if (range != null) {
+ viewer.setSelectedRange(range.getOffset(), range.getLength());
+ viewer.doOperation(ISourceViewer.FORMAT);
+ }
+ }
+ }
+ } catch (JavaModelException exception) {
+ // Should not happen
+ }
+ } else {
+ viewer.setSelectedRange(selection.x, 1);
+ viewer.doOperation(ISourceViewer.FORMAT);
+ }
+ } catch (BadLocationException exception) {
+ // Can not happen
+ } finally {
+
+ viewer.setRedraw(true);
+ viewer.restoreSelection();
+ }
+ }
+ }
+ }
+
+ /** Preference key for the link color */
+ protected final static String LINK_COLOR= PreferenceConstants.EDITOR_LINK_COLOR;
+ /** Preference key for matching brackets */
+ protected final static String MATCHING_BRACKETS= PreferenceConstants.EDITOR_MATCHING_BRACKETS;
+ /** Preference key for matching brackets color */
+ protected final static String MATCHING_BRACKETS_COLOR= PreferenceConstants.EDITOR_MATCHING_BRACKETS_COLOR;
+ /** Preference key for compiler task tags */
+ private final static String COMPILER_TASK_TAGS= JavaCore.COMPILER_TASK_TAGS;
+ /** Preference key for browser like links */
+ private final static String BROWSER_LIKE_LINKS= PreferenceConstants.EDITOR_BROWSER_LIKE_LINKS;
+ /** Preference key for key modifier of browser like links */
+ private final static String BROWSER_LIKE_LINKS_KEY_MODIFIER= PreferenceConstants.EDITOR_BROWSER_LIKE_LINKS_KEY_MODIFIER;
+ /**
+ * Preference key for key modifier mask of browser like links.
+ * The value is only used if the value of <code>EDITOR_BROWSER_LIKE_LINKS</code>
+ * cannot be resolved to valid SWT modifier bits.
+ *
+ * @since 2.1.1
+ */
+ private final static String BROWSER_LIKE_LINKS_KEY_MODIFIER_MASK= PreferenceConstants.EDITOR_BROWSER_LIKE_LINKS_KEY_MODIFIER_MASK;
+
+ protected final static char[] BRACKETS= { '{', '}', '(', ')', '[', ']' };
+
+ /** The outline page */
+ protected JavaOutlinePage fOutlinePage;
+ /** Outliner context menu Id */
+ protected String fOutlinerContextMenuId;
+ /**
+ * The editor selection changed listener.
+ *
+ * @since 3.0
+ */
+ private EditorSelectionChangedListener fEditorSelectionChangedListener;
+ /** The selection changed listener */
+ protected AbstractSelectionChangedListener fOutlineSelectionChangedListener= new OutlineSelectionChangedListener();
+ /** The editor's bracket matcher */
+ protected JavaPairMatcher fBracketMatcher= new JavaPairMatcher(BRACKETS);
+ /** This editor's encoding support */
+ private DefaultEncodingSupport fEncodingSupport;
+ /** The mouse listener */
+ private MouseClickListener fMouseListener;
+ /** The information presenter. */
+ private InformationPresenter fInformationPresenter;
+ /** History for structure select action */
+ private SelectionHistory fSelectionHistory;
+ /** The preference property change listener for java core. */
+ private org.eclipse.core.runtime.Preferences.IPropertyChangeListener fPropertyChangeListener= new PropertyChangeListener();
+ /**
+ * Indicates whether this editor is about to update any annotation views.
+ * @since 3.0
+ */
+ private boolean fIsUpdatingAnnotationViews= false;
+ /**
+ * The marker that served as last target for a goto marker request.
+ * @since 3.0
+ */
+ private IMarker fLastMarkerTarget= null;
+ protected CompositeActionGroup fActionGroups;
+ private CompositeActionGroup fContextMenuGroup;
+ /**
+ * Holds the current occurrence annotations.
+ * @since 3.0
+ */
+ private ArrayList fOccurrenceAnnotations= new ArrayList();
+ /**
+ * Counts the number of background computation requests.
+ * @since 3.0
+ */
+ private volatile int fComputeCount;
+ private boolean fMarkOccurrenceAnnotations;
+
+
+ /**
+ * Returns the most narrow java element including the given offset.
+ *
+ * @param offset the offset inside of the requested element
+ * @return the most narrow java element
+ */
+ abstract protected IJavaElement getElementAt(int offset);
+
+ /**
+ * Returns the java element of this editor's input corresponding to the given IJavaElement
+ */
+ abstract protected IJavaElement getCorrespondingElement(IJavaElement element);
+
+ /**
+ * Sets the input of the editor's outline page.
+ */
+ abstract protected void setOutlinePageInput(JavaOutlinePage page, IEditorInput input);
+
+
+ /**
+ * Default constructor.
+ */
+ public JavaEditor() {
+ super();
+ JavaTextTools textTools= JavaPlugin.getDefault().getJavaTextTools();
+ setSourceViewerConfiguration(new JavaSourceViewerConfiguration(textTools, this, IJavaPartitions.JAVA_PARTITIONING));
+ setRangeIndicator(new DefaultRangeIndicator());
+ IPreferenceStore store= JavaPlugin.getDefault().getPreferenceStore();
+ setPreferenceStore(store);
+ setKeyBindingScopes(new String[] { "org.eclipse.wst.jsdt.ui.javaEditorScope" }); //$NON-NLS-1$
+ fMarkOccurrenceAnnotations= store.getBoolean(PreferenceConstants.EDITOR_MARK_OCCURRENCES);
+ }
+
+ /*
+ * @see AbstractTextEditor#createSourceViewer(Composite, IVerticalRuler, int)
+ */
+ protected final ISourceViewer createSourceViewer(Composite parent, IVerticalRuler verticalRuler, int styles) {
+
+ ISourceViewer viewer= createJavaSourceViewer(parent, verticalRuler, getOverviewRuler(), isOverviewRulerVisible(), styles);
+
+ StyledText text= viewer.getTextWidget();
+ text.addBidiSegmentListener(new BidiSegmentListener() {
+ public void lineGetSegments(BidiSegmentEvent event) {
+ event.segments= getBidiLineSegments(event.lineOffset, event.lineText);
+ }
+ });
+
+ JavaUIHelp.setHelp(this, text, IJavaHelpContextIds.JAVA_EDITOR);
+
+ // ensure source viewer decoration support has been created and configured
+ getSourceViewerDecorationSupport(viewer);
+
+ return viewer;
+ }
+
+ /*
+ * @see org.eclipse.ui.texteditor.ExtendedTextEditor#createAnnotationAccess()
+ */
+ protected IAnnotationAccess createAnnotationAccess() {
+ return new AnnotationAccess(new MarkerAnnotationPreferences());
+ }
+
+ public final ISourceViewer getViewer() {
+ return getSourceViewer();
+ }
+
+ /*
+ * @see AbstractTextEditor#createSourceViewer(Composite, IVerticalRuler, int)
+ */
+ protected ISourceViewer createJavaSourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler, boolean isOverviewRulerVisible, int styles) {
+ return new JavaSourceViewer(parent, verticalRuler, getOverviewRuler(), isOverviewRulerVisible(), styles);
+ }
+
+ /*
+ * @see AbstractTextEditor#affectsTextPresentation(PropertyChangeEvent)
+ */
+ protected boolean affectsTextPresentation(PropertyChangeEvent event) {
+ JavaTextTools textTools= JavaPlugin.getDefault().getJavaTextTools();
+ return textTools.affectsBehavior(event);
+ }
+
+ /**
+ * Sets the outliner's context menu ID.
+ */
+ protected void setOutlinerContextMenuId(String menuId) {
+ fOutlinerContextMenuId= menuId;
+ }
+
+ /**
+ * Returns the standard action group of this editor.
+ */
+ protected ActionGroup getActionGroup() {
+ return fActionGroups;
+ }
+
+ /*
+ * @see AbstractTextEditor#editorContextMenuAboutToShow
+ */
+ public void editorContextMenuAboutToShow(IMenuManager menu) {
+
+ super.editorContextMenuAboutToShow(menu);
+ menu.appendToGroup(ITextEditorActionConstants.GROUP_UNDO, new Separator(IContextMenuConstants.GROUP_OPEN));
+ menu.insertAfter(IContextMenuConstants.GROUP_OPEN, new GroupMarker(IContextMenuConstants.GROUP_SHOW));
+
+ ActionContext context= new ActionContext(getSelectionProvider().getSelection());
+ fContextMenuGroup.setContext(context);
+ fContextMenuGroup.fillContextMenu(menu);
+ fContextMenuGroup.setContext(null);
+ }
+
+ /**
+ * Creates the outline page used with this editor.
+ */
+ protected JavaOutlinePage createOutlinePage() {
+ JavaOutlinePage page= new JavaOutlinePage(fOutlinerContextMenuId, this);
+ fOutlineSelectionChangedListener.install(page);
+ setOutlinePageInput(page, getEditorInput());
+ return page;
+ }
+
+ /**
+ * Informs the editor that its outliner has been closed.
+ */
+ public void outlinePageClosed() {
+ if (fOutlinePage != null) {
+ fOutlineSelectionChangedListener.uninstall(fOutlinePage);
+ fOutlinePage= null;
+ resetHighlightRange();
+ }
+ }
+
+ /**
+ * Synchronizes the outliner selection with the given element
+ * position in the editor.
+ *
+ * @param element the java element to select
+ */
+ protected void synchronizeOutlinePage(ISourceReference element) {
+ synchronizeOutlinePage(element, true);
+ }
+
+ /**
+ * Synchronizes the outliner selection with the given element
+ * position in the editor.
+ *
+ * @param element the java element to select
+ * @param checkIfOutlinePageActive <code>true</code> if check for active outline page needs to be done
+ */
+ protected void synchronizeOutlinePage(ISourceReference element, boolean checkIfOutlinePageActive) {
+ if (fOutlinePage != null && element != null && !(checkIfOutlinePageActive && isJavaOutlinePageActive())) {
+ fOutlineSelectionChangedListener.uninstall(fOutlinePage);
+ fOutlinePage.select(element);
+ fOutlineSelectionChangedListener.install(fOutlinePage);
+ }
+ }
+
+ /**
+ * Synchronizes the outliner selection with the actual cursor
+ * position in the editor.
+ */
+ public void synchronizeOutlinePageSelection() {
+ synchronizeOutlinePage(computeHighlightRangeSourceReference());
+ }
+
+
+ /*
+ * Get the desktop's StatusLineManager
+ */
+ protected IStatusLineManager getStatusLineManager() {
+ IEditorActionBarContributor contributor= getEditorSite().getActionBarContributor();
+ if (contributor instanceof EditorActionBarContributor) {
+ return ((EditorActionBarContributor) contributor).getActionBars().getStatusLineManager();
+ }
+ return null;
+ }
+
+ /*
+ * @see AbstractTextEditor#getAdapter(Class)
+ */
+ public Object getAdapter(Class required) {
+
+ if (IContentOutlinePage.class.equals(required)) {
+ if (fOutlinePage == null)
+ fOutlinePage= createOutlinePage();
+ return fOutlinePage;
+ }
+
+ if (IEncodingSupport.class.equals(required))
+ return fEncodingSupport;
+
+ if (required == IShowInTargetList.class) {
+ return new IShowInTargetList() {
+ public String[] getShowInTargetIds() {
+ return new String[] { JavaUI.ID_PACKAGES, IPageLayout.ID_OUTLINE, IPageLayout.ID_RES_NAV };
+ }
+
+ };
+ }
+
+ return super.getAdapter(required);
+ }
+
+ protected void setSelection(ISourceReference reference, boolean moveCursor) {
+
+ ISelection selection= getSelectionProvider().getSelection();
+ if (selection instanceof TextSelection) {
+ TextSelection textSelection= (TextSelection) selection;
+ // PR 39995: [navigation] Forward history cleared after going back in navigation history:
+ // mark only in navigation history if the cursor is being moved (which it isn't if
+ // this is called from a PostSelectionEvent that should only update the magnet)
+ if (moveCursor && (textSelection.getOffset() != 0 || textSelection.getLength() != 0))
+ markInNavigationHistory();
+ }
+
+ if (reference != null) {
+
+ StyledText textWidget= null;
+
+ ISourceViewer sourceViewer= getSourceViewer();
+ if (sourceViewer != null)
+ textWidget= sourceViewer.getTextWidget();
+
+ if (textWidget == null)
+ return;
+
+ try {
+
+ ISourceRange range= reference.getSourceRange();
+ if (range == null)
+ return;
+
+ int offset= range.getOffset();
+ int length= range.getLength();
+
+ if (offset < 0 || length < 0)
+ return;
+
+ setHighlightRange(offset, length, moveCursor);
+
+ if (!moveCursor)
+ return;
+
+ offset= -1;
+ length= -1;
+
+ if (reference instanceof IMember) {
+ range= ((IMember) reference).getNameRange();
+ if (range != null) {
+ offset= range.getOffset();
+ length= range.getLength();
+ }
+ } else if (reference instanceof IImportDeclaration) {
+ String name= ((IImportDeclaration) reference).getElementName();
+ if (name != null && name.length() > 0) {
+ String content= reference.getSource();
+ if (content != null) {
+ offset= range.getOffset() + content.indexOf(name);
+ length= name.length();
+ }
+ }
+ } else if (reference instanceof IPackageDeclaration) {
+ String name= ((IPackageDeclaration) reference).getElementName();
+ if (name != null && name.length() > 0) {
+ String content= reference.getSource();
+ if (content != null) {
+ offset= range.getOffset() + content.indexOf(name);
+ length= name.length();
+ }
+ }
+ }
+
+ if (offset > -1 && length > 0) {
+
+ try {
+ textWidget.setRedraw(false);
+ sourceViewer.revealRange(offset, length);
+ sourceViewer.setSelectedRange(offset, length);
+ } finally {
+ textWidget.setRedraw(true);
+ }
+
+ markInNavigationHistory();
+ }
+
+ } catch (JavaModelException x) {
+ } catch (IllegalArgumentException x) {
+ }
+
+ } else if (moveCursor) {
+ resetHighlightRange();
+ markInNavigationHistory();
+ }
+ }
+
+ public void setSelection(IJavaElement element) {
+
+ if (element == null || element instanceof ICompilationUnit || element instanceof IClassFile) {
+ /*
+ * If the element is an ICompilationUnit this unit is either the input
+ * of this editor or not being displayed. In both cases, nothing should
+ * happened. (http://dev.eclipse.org/bugs/show_bug.cgi?id=5128)
+ */
+ return;
+ }
+
+ IJavaElement corresponding= getCorrespondingElement(element);
+ if (corresponding instanceof ISourceReference) {
+ ISourceReference reference= (ISourceReference) corresponding;
+ // set hightlight range
+ setSelection(reference, true);
+ // set outliner selection
+ if (fOutlinePage != null) {
+ fOutlineSelectionChangedListener.uninstall(fOutlinePage);
+ fOutlinePage.select(reference);
+ fOutlineSelectionChangedListener.install(fOutlinePage);
+ }
+ }
+ }
+
+ protected void doSelectionChanged(SelectionChangedEvent event) {
+
+ ISourceReference reference= null;
+
+ ISelection selection= event.getSelection();
+ Iterator iter= ((IStructuredSelection) selection).iterator();
+ while (iter.hasNext()) {
+ Object o= iter.next();
+ if (o instanceof ISourceReference) {
+ reference= (ISourceReference) o;
+ break;
+ }
+ }
+ if (!isActivePart() && JavaPlugin.getActivePage() != null)
+ JavaPlugin.getActivePage().bringToTop(this);
+
+ setSelection(reference, !isActivePart());
+ }
+
+ /*
+ * @see AbstractTextEditor#adjustHighlightRange(int, int)
+ */
+ protected void adjustHighlightRange(int offset, int length) {
+
+ try {
+
+ IJavaElement element= getElementAt(offset);
+ while (element instanceof ISourceReference) {
+ ISourceRange range= ((ISourceReference) element).getSourceRange();
+ if (offset < range.getOffset() + range.getLength() && range.getOffset() < offset + length) {
+ setHighlightRange(range.getOffset(), range.getLength(), true);
+ if (fOutlinePage != null) {
+ fOutlineSelectionChangedListener.uninstall(fOutlinePage);
+ fOutlinePage.select((ISourceReference) element);
+ fOutlineSelectionChangedListener.install(fOutlinePage);
+ }
+ return;
+ }
+ element= element.getParent();
+ }
+
+ } catch (JavaModelException x) {
+ JavaPlugin.log(x.getStatus());
+ }
+
+ resetHighlightRange();
+ }
+
+ protected boolean isActivePart() {
+ IWorkbenchPart part= getActivePart();
+ return part != null && part.equals(this);
+ }
+
+ private boolean isJavaOutlinePageActive() {
+ IWorkbenchPart part= getActivePart();
+ return part instanceof ContentOutline && ((ContentOutline)part).getCurrentPage() == fOutlinePage;
+ }
+
+ private IWorkbenchPart getActivePart() {
+ IWorkbenchWindow window= getSite().getWorkbenchWindow();
+ IPartService service= window.getPartService();
+ IWorkbenchPart part= service.getActivePart();
+ return part;
+ }
+
+ /*
+ * @see StatusTextEditor#getStatusHeader(IStatus)
+ */
+ protected String getStatusHeader(IStatus status) {
+ if (fEncodingSupport != null) {
+ String message= fEncodingSupport.getStatusHeader(status);
+ if (message != null)
+ return message;
+ }
+ return super.getStatusHeader(status);
+ }
+
+ /*
+ * @see StatusTextEditor#getStatusBanner(IStatus)
+ */
+ protected String getStatusBanner(IStatus status) {
+ if (fEncodingSupport != null) {
+ String message= fEncodingSupport.getStatusBanner(status);
+ if (message != null)
+ return message;
+ }
+ return super.getStatusBanner(status);
+ }
+
+ /*
+ * @see StatusTextEditor#getStatusMessage(IStatus)
+ */
+ protected String getStatusMessage(IStatus status) {
+ if (fEncodingSupport != null) {
+ String message= fEncodingSupport.getStatusMessage(status);
+ if (message != null)
+ return message;
+ }
+ return super.getStatusMessage(status);
+ }
+
+ /*
+ * @see AbstractTextEditor#doSetInput
+ */
+ protected void doSetInput(IEditorInput input) throws CoreException {
+ super.doSetInput(input);
+ if (fEncodingSupport != null)
+ fEncodingSupport.reset();
+ setOutlinePageInput(fOutlinePage, input);
+ }
+
+ /*
+ * @see IWorkbenchPart#dispose()
+ */
+ public void dispose() {
+ // cancel possible running computation
+ fMarkOccurrenceAnnotations= false;
+ fComputeCount++;
+
+ if (isBrowserLikeLinks())
+ disableBrowserLikeLinks();
+
+ if (fEncodingSupport != null) {
+ fEncodingSupport.dispose();
+ fEncodingSupport= null;
+ }
+
+ if (fPropertyChangeListener != null) {
+ Preferences preferences= JavaCore.getPlugin().getPluginPreferences();
+ preferences.removePropertyChangeListener(fPropertyChangeListener);
+ fPropertyChangeListener= null;
+ }
+
+ if (fBracketMatcher != null) {
+ fBracketMatcher.dispose();
+ fBracketMatcher= null;
+ }
+
+ if (fSelectionHistory != null) {
+ fSelectionHistory.dispose();
+ fSelectionHistory= null;
+ }
+
+ if (fEditorSelectionChangedListener != null) {
+ fEditorSelectionChangedListener.uninstall(getSelectionProvider());
+ fEditorSelectionChangedListener= null;
+ }
+
+ super.dispose();
+ }
+
+ protected void createActions() {
+ super.createActions();
+
+ ResourceAction resAction= new AddTaskAction(JavaEditorMessages.getResourceBundle(), "AddTask.", this); //$NON-NLS-1$
+ resAction.setHelpContextId(IAbstractTextEditorHelpContextIds.ADD_TASK_ACTION);
+ resAction.setActionDefinitionId(ITextEditorActionDefinitionIds.ADD_TASK);
+ setAction(ITextEditorActionConstants.ADD_TASK, resAction);
+
+ ActionGroup oeg, ovg, jsg, sg;
+ fActionGroups= new CompositeActionGroup(new ActionGroup[] {
+ oeg= new OpenEditorActionGroup(this),
+ sg= new ShowActionGroup(this),
+ ovg= new OpenViewActionGroup(this),
+ jsg= new JavaSearchActionGroup(this)
+ });
+ fContextMenuGroup= new CompositeActionGroup(new ActionGroup[] {oeg, ovg, sg, jsg});
+
+ resAction= new TextOperationAction(JavaEditorMessages.getResourceBundle(), "ShowJavaDoc.", this, ISourceViewer.INFORMATION, true); //$NON-NLS-1$
+ resAction= new InformationDispatchAction(JavaEditorMessages.getResourceBundle(), "ShowJavaDoc.", (TextOperationAction) resAction); //$NON-NLS-1$
+ resAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.SHOW_JAVADOC);
+ setAction("ShowJavaDoc", resAction); //$NON-NLS-1$
+ WorkbenchHelp.setHelp(resAction, IJavaHelpContextIds.SHOW_JAVADOC_ACTION);
+
+ Action action= new GotoMatchingBracketAction(this);
+ action.setActionDefinitionId(IJavaEditorActionDefinitionIds.GOTO_MATCHING_BRACKET);
+ setAction(GotoMatchingBracketAction.GOTO_MATCHING_BRACKET, action);
+
+ action= new TextOperationAction(JavaEditorMessages.getResourceBundle(),"ShowOutline.", this, JavaSourceViewer.SHOW_OUTLINE, true); //$NON-NLS-1$
+ action.setActionDefinitionId(IJavaEditorActionDefinitionIds.SHOW_OUTLINE);
+ setAction(IJavaEditorActionDefinitionIds.SHOW_OUTLINE, action);
+ WorkbenchHelp.setHelp(action, IJavaHelpContextIds.SHOW_OUTLINE_ACTION);
+
+ action= new TextOperationAction(JavaEditorMessages.getResourceBundle(),"OpenStructure.", this, JavaSourceViewer.OPEN_STRUCTURE, true); //$NON-NLS-1$
+ action.setActionDefinitionId(IJavaEditorActionDefinitionIds.OPEN_STRUCTURE);
+ setAction(IJavaEditorActionDefinitionIds.OPEN_STRUCTURE, action);
+ WorkbenchHelp.setHelp(action, IJavaHelpContextIds.OPEN_STRUCTURE_ACTION);
+
+ action= new TextOperationAction(JavaEditorMessages.getResourceBundle(),"OpenHierarchy.", this, JavaSourceViewer.SHOW_HIERARCHY, true); //$NON-NLS-1$
+ action.setActionDefinitionId(IJavaEditorActionDefinitionIds.OPEN_HIERARCHY);
+ setAction(IJavaEditorActionDefinitionIds.OPEN_HIERARCHY, action);
+ WorkbenchHelp.setHelp(action, IJavaHelpContextIds.OPEN_HIERARCHY_ACTION);
+
+ fEncodingSupport= new DefaultEncodingSupport();
+ fEncodingSupport.initialize(this);
+
+ fSelectionHistory= new SelectionHistory(this);
+
+ action= new StructureSelectEnclosingAction(this, fSelectionHistory);
+ action.setActionDefinitionId(IJavaEditorActionDefinitionIds.SELECT_ENCLOSING);
+ setAction(StructureSelectionAction.ENCLOSING, action);
+
+ action= new StructureSelectNextAction(this, fSelectionHistory);
+ action.setActionDefinitionId(IJavaEditorActionDefinitionIds.SELECT_NEXT);
+ setAction(StructureSelectionAction.NEXT, action);
+
+ action= new StructureSelectPreviousAction(this, fSelectionHistory);
+ action.setActionDefinitionId(IJavaEditorActionDefinitionIds.SELECT_PREVIOUS);
+ setAction(StructureSelectionAction.PREVIOUS, action);
+
+ StructureSelectHistoryAction historyAction= new StructureSelectHistoryAction(this, fSelectionHistory);
+ historyAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.SELECT_LAST);
+ setAction(StructureSelectionAction.HISTORY, historyAction);
+ fSelectionHistory.setHistoryAction(historyAction);
+
+ action= GoToNextPreviousMemberAction.newGoToNextMemberAction(this);
+ action.setActionDefinitionId(IJavaEditorActionDefinitionIds.GOTO_NEXT_MEMBER);
+ setAction(GoToNextPreviousMemberAction.NEXT_MEMBER, action);
+
+ action= GoToNextPreviousMemberAction.newGoToPreviousMemberAction(this);
+ action.setActionDefinitionId(IJavaEditorActionDefinitionIds.GOTO_PREVIOUS_MEMBER);
+ setAction(GoToNextPreviousMemberAction.PREVIOUS_MEMBER, action);
+
+ action= new QuickFormatAction();
+ action.setActionDefinitionId(IJavaEditorActionDefinitionIds.QUICK_FORMAT);
+ setAction(IJavaEditorActionDefinitionIds.QUICK_FORMAT, action);
+
+ action= new RemoveOccurrenceAnnotations(this);
+ action.setActionDefinitionId(IJavaEditorActionDefinitionIds.REMOVE_OCCURRENCE_ANNOTATIONS);
+ setAction("RemoveOccurrenceAnnotations", action); //$NON-NLS-1$
+ }
+
+ public void updatedTitleImage(Image image) {
+ setTitleImage(image);
+ }
+
+ /*
+ * @see AbstractTextEditor#handlePreferenceStoreChanged(PropertyChangeEvent)
+ */
+ protected void handlePreferenceStoreChanged(PropertyChangeEvent event) {
+
+ try {
+
+ ISourceViewer sourceViewer= getSourceViewer();
+ if (sourceViewer == null)
+ return;
+
+ String property= event.getProperty();
+
+ if (PreferenceConstants.EDITOR_TAB_WIDTH.equals(property)) {
+ Object value= event.getNewValue();
+ if (value instanceof Integer) {
+ sourceViewer.getTextWidget().setTabs(((Integer) value).intValue());
+ } else if (value instanceof String) {
+ sourceViewer.getTextWidget().setTabs(Integer.parseInt((String) value));
+ }
+ return;
+ }
+
+ if (isJavaEditorHoverProperty(property))
+ updateHoverBehavior();
+
+ if (BROWSER_LIKE_LINKS.equals(property)) {
+ if (isBrowserLikeLinks())
+ enableBrowserLikeLinks();
+ else
+ disableBrowserLikeLinks();
+ return;
+ }
+
+ if (PreferenceConstants.EDITOR_SYNC_OUTLINE_ON_CURSOR_MOVE.equals(property)) {
+ if ((event.getNewValue() instanceof Boolean) && ((Boolean)event.getNewValue()).booleanValue()) {
+ fEditorSelectionChangedListener= new EditorSelectionChangedListener();
+ fEditorSelectionChangedListener.install(getSelectionProvider());
+ fEditorSelectionChangedListener.selectionChanged();
+ } else {
+ fEditorSelectionChangedListener.uninstall(getSelectionProvider());
+ fEditorSelectionChangedListener= null;
+ }
+ return;
+ }
+
+ if (PreferenceConstants.EDITOR_DISABLE_OVERWRITE_MODE.equals(property)) {
+ if (event.getNewValue() instanceof Boolean) {
+ Boolean disable= (Boolean) event.getNewValue();
+ configureInsertMode(OVERWRITE, !disable.booleanValue());
+ }
+ }
+
+ if (PreferenceConstants.EDITOR_MARK_OCCURRENCES.equals(property)) {
+ if (event.getNewValue() instanceof Boolean) {
+ fMarkOccurrenceAnnotations= ((Boolean)event.getNewValue()).booleanValue();
+ if (!fMarkOccurrenceAnnotations) {
+ fComputeCount++;
+ removeOccurrenceAnnotations();
+ }
+ }
+ }
+
+ } finally {
+ super.handlePreferenceStoreChanged(event);
+ }
+ }
+
+ /**
+ * Initializes the given viewer's colors.
+ *
+ * @param viewer the viewer to be initialized
+ * @since 3.0
+ */
+ protected void initializeViewerColors(ISourceViewer viewer) {
+ // is handled by JavaSourceViewer
+ }
+
+ private boolean isJavaEditorHoverProperty(String property) {
+ return PreferenceConstants.EDITOR_TEXT_HOVER_MODIFIERS.equals(property);
+ }
+
+ /**
+ * Return whether the browser like links should be enabled
+ * according to the preference store settings.
+ * @return <code>true</code> if the browser like links should be enabled
+ */
+ private boolean isBrowserLikeLinks() {
+ IPreferenceStore store= getPreferenceStore();
+ return store.getBoolean(BROWSER_LIKE_LINKS);
+ }
+
+ /**
+ * Enables browser like links.
+ */
+ private void enableBrowserLikeLinks() {
+ if (fMouseListener == null) {
+ fMouseListener= new MouseClickListener();
+ fMouseListener.install();
+ }
+ }
+
+ /**
+ * Disables browser like links.
+ */
+ private void disableBrowserLikeLinks() {
+ if (fMouseListener != null) {
+ fMouseListener.uninstall();
+ fMouseListener= null;
+ }
+ }
+
+ /**
+ * Handles a property change event describing a change
+ * of the java core's preferences and updates the preference
+ * related editor properties.
+ *
+ * @param event the property change event
+ */
+ protected void handlePreferencePropertyChanged(org.eclipse.core.runtime.Preferences.PropertyChangeEvent event) {
+ if (COMPILER_TASK_TAGS.equals(event.getProperty())) {
+ ISourceViewer sourceViewer= getSourceViewer();
+ if (sourceViewer != null && affectsTextPresentation(new PropertyChangeEvent(event.getSource(), event.getProperty(), event.getOldValue(), event.getNewValue())))
+ sourceViewer.invalidateTextPresentation();
+ }
+ }
+
+ /**
+ * Returns a segmentation of the line of the given viewer's input document appropriate for
+ * bidi rendering. The default implementation returns only the string literals of a java code
+ * line as segments.
+ *
+ * @param viewer the text viewer
+ * @param lineOffset the offset of the line
+ * @return the line's bidi segmentation
+ * @throws BadLocationException in case lineOffset is not valid in document
+ */
+ public static int[] getBidiLineSegments(ITextViewer viewer, int lineOffset) throws BadLocationException {
+
+ IDocument document= viewer.getDocument();
+ if (document == null)
+ return null;
+
+ IRegion line= document.getLineInformationOfOffset(lineOffset);
+ ITypedRegion[] linePartitioning= TextUtilities.computePartitioning(document, IJavaPartitions.JAVA_PARTITIONING, lineOffset, line.getLength());
+
+ List segmentation= new ArrayList();
+ for (int i= 0; i < linePartitioning.length; i++) {
+ if (IJavaPartitions.JAVA_STRING.equals(linePartitioning[i].getType()))
+ segmentation.add(linePartitioning[i]);
+ }
+
+
+ if (segmentation.size() == 0)
+ return null;
+
+ int size= segmentation.size();
+ int[] segments= new int[size * 2 + 1];
+
+ int j= 0;
+ for (int i= 0; i < size; i++) {
+ ITypedRegion segment= (ITypedRegion) segmentation.get(i);
+
+ if (i == 0)
+ segments[j++]= 0;
+
+ int offset= segment.getOffset() - lineOffset;
+ if (offset > segments[j - 1])
+ segments[j++]= offset;
+
+ if (offset + segment.getLength() >= line.getLength())
+ break;
+
+ segments[j++]= offset + segment.getLength();
+ }
+
+ if (j < segments.length) {
+ int[] result= new int[j];
+ System.arraycopy(segments, 0, result, 0, j);
+ segments= result;
+ }
+
+ return segments;
+ }
+
+ /**
+ * Returns a segmentation of the given line appropriate for bidi rendering. The default
+ * implementation returns only the string literals of a java code line as segments.
+ *
+ * @param lineOffset the offset of the line
+ * @param line the content of the line
+ * @return the line's bidi segmentation
+ */
+ protected int[] getBidiLineSegments(int widgetLineOffset, String line) {
+ if (line != null && line.length() > 0) {
+ ISourceViewer sourceViewer= getSourceViewer();
+ if (sourceViewer != null) {
+ int lineOffset;
+ if (sourceViewer instanceof ITextViewerExtension3) {
+ ITextViewerExtension3 extension= (ITextViewerExtension3) sourceViewer;
+ lineOffset= extension.widgetOffset2ModelOffset(widgetLineOffset);
+ } else {
+ IRegion visible= sourceViewer.getVisibleRegion();
+ lineOffset= visible.getOffset() + widgetLineOffset;
+ }
+ try {
+ return getBidiLineSegments(sourceViewer, lineOffset);
+ } catch (BadLocationException x) {
+ // don't segment line in this case
+ }
+ }
+ }
+ return null;
+ }
+
+ /*
+ * @see org.eclipse.ui.texteditor.AbstractTextEditor#updatePropertyDependentActions()
+ */
+ protected void updatePropertyDependentActions() {
+ super.updatePropertyDependentActions();
+ if (fEncodingSupport != null)
+ fEncodingSupport.reset();
+ }
+
+ /*
+ * Update the hovering behavior depending on the preferences.
+ */
+ private void updateHoverBehavior() {
+ SourceViewerConfiguration configuration= getSourceViewerConfiguration();
+ String[] types= configuration.getConfiguredContentTypes(getSourceViewer());
+
+ for (int i= 0; i < types.length; i++) {
+
+ String t= types[i];
+
+ ISourceViewer sourceViewer= getSourceViewer();
+ if (sourceViewer instanceof ITextViewerExtension2) {
+ // Remove existing hovers
+ ((ITextViewerExtension2)sourceViewer).removeTextHovers(t);
+
+ int[] stateMasks= configuration.getConfiguredTextHoverStateMasks(getSourceViewer(), t);
+
+ if (stateMasks != null) {
+ for (int j= 0; j < stateMasks.length; j++) {
+ int stateMask= stateMasks[j];
+ ITextHover textHover= configuration.getTextHover(sourceViewer, t, stateMask);
+ ((ITextViewerExtension2)sourceViewer).setTextHover(textHover, t, stateMask);
+ }
+ } else {
+ ITextHover textHover= configuration.getTextHover(sourceViewer, t);
+ ((ITextViewerExtension2)sourceViewer).setTextHover(textHover, t, ITextViewerExtension2.DEFAULT_HOVER_STATE_MASK);
+ }
+ } else
+ sourceViewer.setTextHover(configuration.getTextHover(sourceViewer, t), t);
+ }
+ }
+
+ /*
+ * @see org.eclipse.wst.jsdt.internal.ui.viewsupport.IViewPartInputProvider#getViewPartInput()
+ */
+ public Object getViewPartInput() {
+ return getEditorInput().getAdapter(IJavaElement.class);
+ }
+
+ /*
+ * @see org.eclipse.ui.texteditor.AbstractTextEditor#doSetSelection(ISelection)
+ */
+ protected void doSetSelection(ISelection selection) {
+ super.doSetSelection(selection);
+ synchronizeOutlinePageSelection();
+ }
+
+ /*
+ * @see org.eclipse.ui.IWorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+ */
+ public void createPartControl(Composite parent) {
+ super.createPartControl(parent);
+
+ Preferences preferences= JavaCore.getPlugin().getPluginPreferences();
+ preferences.addPropertyChangeListener(fPropertyChangeListener);
+
+ IInformationControlCreator informationControlCreator= new IInformationControlCreator() {
+ public IInformationControl createInformationControl(Shell shell) {
+ boolean cutDown= false;
+ int style= cutDown ? SWT.NONE : (SWT.V_SCROLL | SWT.H_SCROLL);
+ return new DefaultInformationControl(shell, SWT.RESIZE, style, new HTMLTextPresenter(cutDown));
+ }
+ };
+
+ fInformationPresenter= new InformationPresenter(informationControlCreator);
+ fInformationPresenter.setSizeConstraints(60, 10, true, true);
+ fInformationPresenter.install(getSourceViewer());
+
+ if (PreferenceConstants.getPreferenceStore().getBoolean(PreferenceConstants.EDITOR_SYNC_OUTLINE_ON_CURSOR_MOVE)) {
+ fEditorSelectionChangedListener= new EditorSelectionChangedListener();
+ fEditorSelectionChangedListener.install(getSelectionProvider());
+ }
+
+ if (isBrowserLikeLinks())
+ enableBrowserLikeLinks();
+
+ if (PreferenceConstants.getPreferenceStore().getBoolean(PreferenceConstants.EDITOR_DISABLE_OVERWRITE_MODE))
+ configureInsertMode(OVERWRITE, false);
+ }
+
+ protected void configureSourceViewerDecorationSupport(SourceViewerDecorationSupport support) {
+
+ support.setCharacterPairMatcher(fBracketMatcher);
+ support.setMatchingCharacterPainterPreferenceKeys(MATCHING_BRACKETS, MATCHING_BRACKETS_COLOR);
+
+ super.configureSourceViewerDecorationSupport(support);
+ }
+
+ /*
+ * @see org.eclipse.ui.texteditor.AbstractTextEditor#gotoMarker(org.eclipse.core.resources.IMarker)
+ */
+ public void gotoMarker(IMarker marker) {
+ fLastMarkerTarget= marker;
+ if (!fIsUpdatingAnnotationViews)
+ super.gotoMarker(marker);
+ }
+
+ /**
+ * Jumps to the next enabled annotation according to the given direction.
+ * An annotation type is enabled if it is configured to be in the
+ * Next/Previous tool bar drop down menu and if it is checked.
+ *
+ * @param forward <code>true</code> if search direction is forward, <code>false</code> if backward
+ */
+ public void gotoAnnotation(boolean forward) {
+ ITextSelection selection= (ITextSelection) getSelectionProvider().getSelection();
+ Position position= new Position(0, 0);
+ if (false /* delayed - see bug 18316 */) {
+ getNextAnnotation(selection.getOffset(), selection.getLength(), forward, position);
+ selectAndReveal(position.getOffset(), position.getLength());
+ } else /* no delay - see bug 18316 */ {
+ Annotation annotation= getNextAnnotation(selection.getOffset(), selection.getLength(), forward, position);
+ setStatusLineErrorMessage(null);
+ setStatusLineMessage(null);
+ if (annotation != null) {
+ updateAnnotationViews(annotation);
+ selectAndReveal(position.getOffset(), position.getLength());
+ if (annotation instanceof IJavaAnnotation && ((IJavaAnnotation)annotation).isProblem())
+ setStatusLineMessage(((IJavaAnnotation)annotation).getMessage());
+ }
+ }
+ }
+
+ /**
+ * Updates the annotation views that show the given annotation.
+ *
+ * @param annotation the annotation
+ */
+ private void updateAnnotationViews(Annotation annotation) {
+ IMarker marker= null;
+ if (annotation instanceof MarkerAnnotation)
+ marker= ((MarkerAnnotation) annotation).getMarker();
+ else if (annotation instanceof IJavaAnnotation) {
+ Iterator e= ((IJavaAnnotation) annotation).getOverlaidIterator();
+ if (e != null) {
+ while (e.hasNext()) {
+ Object o= e.next();
+ if (o instanceof MarkerAnnotation) {
+ marker= ((MarkerAnnotation) o).getMarker();
+ break;
+ }
+ }
+ }
+ }
+
+ if (marker != null && !marker.equals(fLastMarkerTarget)) {
+ try {
+ boolean isProblem= marker.isSubtypeOf(IMarker.PROBLEM);
+ IWorkbenchPage page= getSite().getPage();
+ IViewPart view= page.findView(isProblem ? IPageLayout.ID_PROBLEM_VIEW: IPageLayout.ID_TASK_LIST); //$NON-NLS-1$ //$NON-NLS-2$
+ if (view != null) {
+ Method method= view.getClass().getMethod("setSelection", new Class[] { IStructuredSelection.class, boolean.class}); //$NON-NLS-1$
+ method.invoke(view, new Object[] {new StructuredSelection(marker), Boolean.TRUE });
+ }
+ } catch (CoreException x) {
+ } catch (NoSuchMethodException x) {
+ } catch (IllegalAccessException x) {
+ } catch (InvocationTargetException x) {
+ }
+ // ignore exceptions, don't update any of the lists, just set statusline
+ }
+ }
+
+ /**
+ * Finds and marks occurrence annotations.
+ *
+ * @since 3.0
+ */
+ class OccurrencesFinder implements Runnable, IDocumentListener {
+
+ private int fCount;
+ private IDocument fDocument;
+ private ITextSelection fSelection;
+ private boolean fCancelled= false;
+
+ public OccurrencesFinder(int count, IDocument document, ITextSelection selection) {
+ fCount= count;
+ fDocument= document;
+ fSelection= selection;
+ fDocument.addDocumentListener(this);
+ }
+
+ private boolean isCancelled() {
+ return fCount != fComputeCount || fCancelled;
+ }
+
+ /*
+ * @see java.lang.Runnable#run()
+ */
+ public void run() {
+
+ try {
+
+ if (isCancelled())
+ return;
+
+ // Find occurrences
+ FindOccurrencesEngine engine= FindOccurrencesEngine.create(getInputJavaElement());
+ List matches= new ArrayList();
+ try {
+ matches= engine.findOccurrences(fSelection.getOffset(), fSelection.getLength());
+ } catch (JavaModelException e) {
+ JavaPlugin.log(e);
+ return;
+ }
+
+ if (matches == null || matches.isEmpty())
+ return;
+
+ if (isCancelled())
+ return;
+
+ removeOccurrenceAnnotations();
+
+ if (isCancelled())
+ return;
+
+ ITextViewer textViewer= getViewer();
+ if (textViewer == null)
+ return;
+
+ IDocument document= textViewer.getDocument();
+ if (document == null)
+ return;
+
+ IDocumentProvider documentProvider= getDocumentProvider();
+ if (documentProvider == null)
+ return;
+
+ IAnnotationModel annotationModel= documentProvider.getAnnotationModel(getEditorInput());
+ if (annotationModel == null)
+ return;
+
+ // Add occurrence annotations
+ ArrayList annotations= new ArrayList();
+ ArrayList positions= new ArrayList();
+ for (Iterator each= matches.iterator(); each.hasNext();) {
+
+ if (isCancelled())
+ return;
+
+ ASTNode node= (ASTNode) each.next();
+ if (node == null)
+ continue;
+
+ String message;
+ // Create & add annotation
+ try {
+ message= document.get(node.getStartPosition(), node.getLength());
+ } catch (BadLocationException ex) {
+ // Skip this match
+ continue;
+ }
+ annotations.add(new DefaultAnnotation(SearchUI.SEARCH_MARKER, IMarker.SEVERITY_INFO, true, message));
+ positions.add(new Position(node.getStartPosition(), node.getLength()));
+ }
+
+ if (isCancelled())
+ return;
+
+ synchronized (annotationModel) {
+ fOccurrenceAnnotations= annotations;
+ for (int i= 0, size= annotations.size(); i < size; i++)
+ annotationModel.addAnnotation((Annotation) annotations.get(i), (Position) positions.get(i));
+ }
+
+ } finally {
+ fDocument.removeDocumentListener(this);
+ }
+ }
+
+ /*
+ * @see org.eclipse.jface.text.IDocumentListener#documentAboutToBeChanged(org.eclipse.jface.text.DocumentEvent)
+ */
+ public void documentAboutToBeChanged(DocumentEvent event) {
+ fCancelled= true;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.IDocumentListener#documentChanged(org.eclipse.jface.text.DocumentEvent)
+ */
+ public void documentChanged(DocumentEvent event) {
+ }
+ } /**
+ * Updates the occurrences annotations based
+ * on the current selection.
+ *
+ * @since 3.0
+ */
+ protected void updateOccurrences() {
+
+ if (!fMarkOccurrenceAnnotations)
+ return;
+
+ IDocument document= getSourceViewer().getDocument();
+ if (document == null)
+ return;
+
+ OccurrencesFinder finder= new OccurrencesFinder(++fComputeCount, document, (ITextSelection) getSelectionProvider().getSelection());
+ Thread thread= new Thread(finder, "Occurrences Marker"); //$NON-NLS-1$
+ thread.setDaemon(true);
+ thread.start();
+ }
+
+ void removeOccurrenceAnnotations() {
+ IDocumentProvider documentProvider= getDocumentProvider();
+ if (documentProvider == null)
+ return;
+
+ IAnnotationModel annotationModel= documentProvider.getAnnotationModel(getEditorInput());
+ if (annotationModel == null)
+ return;
+
+ synchronized (annotationModel) {
+ for (int i= 0, size= fOccurrenceAnnotations.size(); i < size; i++)
+ annotationModel.removeAnnotation((Annotation)fOccurrenceAnnotations.get(i));
+ fOccurrenceAnnotations.clear();
+ }
+ }
+
+ /**
+ * Returns the Java element wrapped by this editors input.
+ *
+ * @return the Java element wrapped by this editors input.
+ * @since 3.0
+ */
+ abstract protected IJavaElement getInputJavaElement();
+
+ protected void updateStatusLine() {
+ ITextSelection selection= (ITextSelection) getSelectionProvider().getSelection();
+ Annotation annotation= getAnnotation(selection.getOffset(), selection.getLength());
+ setStatusLineErrorMessage(null);
+ setStatusLineMessage(null);
+ if (annotation != null) {
+ try {
+ fIsUpdatingAnnotationViews= true;
+ updateAnnotationViews(annotation);
+ } finally {
+ fIsUpdatingAnnotationViews= false;
+ }
+ if (annotation instanceof IJavaAnnotation && ((IJavaAnnotation)annotation).isProblem())
+ setStatusLineMessage(((IJavaAnnotation)annotation).getMessage());
+ }
+ }
+
+ /**
+ * Jumps to the matching bracket.
+ */
+ public void gotoMatchingBracket() {
+
+ ISourceViewer sourceViewer= getSourceViewer();
+ IDocument document= sourceViewer.getDocument();
+ if (document == null)
+ return;
+
+ IRegion selection= getSignedSelection(sourceViewer);
+
+ int selectionLength= Math.abs(selection.getLength());
+ if (selectionLength > 1) {
+ setStatusLineErrorMessage(JavaEditorMessages.getString("GotoMatchingBracket.error.invalidSelection")); //$NON-NLS-1$
+ sourceViewer.getTextWidget().getDisplay().beep();
+ return;
+ }
+
+ // #26314
+ int sourceCaretOffset= selection.getOffset() + selection.getLength();
+ if (isSurroundedByBrackets(document, sourceCaretOffset))
+ sourceCaretOffset -= selection.getLength();
+
+ IRegion region= fBracketMatcher.match(document, sourceCaretOffset);
+ if (region == null) {
+ setStatusLineErrorMessage(JavaEditorMessages.getString("GotoMatchingBracket.error.noMatchingBracket")); //$NON-NLS-1$
+ sourceViewer.getTextWidget().getDisplay().beep();
+ return;
+ }
+
+ int offset= region.getOffset();
+ int length= region.getLength();
+
+ if (length < 1)
+ return;
+
+ int anchor= fBracketMatcher.getAnchor();
+ // http://dev.eclipse.org/bugs/show_bug.cgi?id=34195
+ int targetOffset= (JavaPairMatcher.RIGHT == anchor) ? offset + 1: offset + length;
+
+ boolean visible= false;
+ if (sourceViewer instanceof ITextViewerExtension3) {
+ ITextViewerExtension3 extension= (ITextViewerExtension3) sourceViewer;
+ visible= (extension.modelOffset2WidgetOffset(targetOffset) > -1);
+ } else {
+ IRegion visibleRegion= sourceViewer.getVisibleRegion();
+ // http://dev.eclipse.org/bugs/show_bug.cgi?id=34195
+ visible= (targetOffset >= visibleRegion.getOffset() && targetOffset <= visibleRegion.getOffset() + visibleRegion.getLength());
+ }
+
+ if (!visible) {
+ setStatusLineErrorMessage(JavaEditorMessages.getString("GotoMatchingBracket.error.bracketOutsideSelectedElement")); //$NON-NLS-1$
+ sourceViewer.getTextWidget().getDisplay().beep();
+ return;
+ }
+
+ if (selection.getLength() < 0)
+ targetOffset -= selection.getLength();
+
+ sourceViewer.setSelectedRange(targetOffset, selection.getLength());
+ sourceViewer.revealRange(targetOffset, selection.getLength());
+ }
+
+ /**
+ * Sets the given message as error message to this editor's status line.
+ *
+ * @param msg message to be set
+ */
+ protected void setStatusLineErrorMessage(String msg) {
+ IEditorStatusLine statusLine= (IEditorStatusLine) getAdapter(IEditorStatusLine.class);
+ if (statusLine != null)
+ statusLine.setMessage(true, msg, null);
+ }
+
+ /**
+ * Sets the given message as message to this editor's status line.
+ *
+ * @param msg message to be set
+ * @since 3.0
+ */
+ protected void setStatusLineMessage(String msg) {
+ IEditorStatusLine statusLine= (IEditorStatusLine) getAdapter(IEditorStatusLine.class);
+ if (statusLine != null)
+ statusLine.setMessage(false, msg, null);
+ }
+
+ private static IRegion getSignedSelection(ITextViewer viewer) {
+
+ StyledText text= viewer.getTextWidget();
+ int caretOffset= text.getCaretOffset();
+ Point selection= text.getSelection();
+
+ // caret left
+ int offset, length;
+ if (caretOffset == selection.x) {
+ offset= selection.y;
+ length= selection.x - selection.y;
+
+ // caret right
+ } else {
+ offset= selection.x;
+ length= selection.y - selection.x;
+ }
+
+ return new Region(offset, length);
+ }
+
+ private static boolean isBracket(char character) {
+ for (int i= 0; i != BRACKETS.length; ++i)
+ if (character == BRACKETS[i])
+ return true;
+ return false;
+ }
+
+ private static boolean isSurroundedByBrackets(IDocument document, int offset) {
+ if (offset == 0 || offset == document.getLength())
+ return false;
+
+ try {
+ return
+ isBracket(document.getChar(offset - 1)) &&
+ isBracket(document.getChar(offset));
+
+ } catch (BadLocationException e) {
+ return false;
+ }
+ }
+
+ /**
+ * Returns the annotation closest to the given range respecting the given
+ * direction. If an annotation is found, the annotations current position
+ * is copied into the provided annotation position.
+ *
+ * @param offset the region offset
+ * @param length the region length
+ * @param forward <code>true</code> for forwards, <code>false</code> for backward
+ * @param annotationPosition the position of the found annotation
+ * @return the found annotation
+ */
+ private Annotation getNextAnnotation(int offset, int length, boolean forward, Position annotationPosition) {
+
+ Annotation nextAnnotation= null;
+ Position nextAnnotationPosition= null;
+ Annotation containingAnnotation= null;
+ Position containingAnnotationPosition= null;
+ boolean currentAnnotation= false;
+
+ IDocument document= getDocumentProvider().getDocument(getEditorInput());
+ int endOfDocument= document.getLength();
+ int distance= 0;
+
+ IAnnotationAccess access= getAnnotationAccess();
+
+ IAnnotationModel model= getDocumentProvider().getAnnotationModel(getEditorInput());
+ Iterator e= new JavaAnnotationIterator(model, true, true);
+ while (e.hasNext()) {
+ Annotation a= (Annotation) e.next();
+ Object type;
+ if (a instanceof IJavaAnnotation)
+ type= ((IJavaAnnotation) a).getAnnotationType();
+ else
+ type= access.getType(a);
+ boolean isNavigationTarget= isNavigationTargetType(type);
+
+ if ((a instanceof IJavaAnnotation) && ((IJavaAnnotation)a).hasOverlay() || !isNavigationTarget)
+ continue;
+
+ Position p= model.getPosition(a);
+ if (p == null)
+ continue;
+
+ if (!(p.includes(offset) || (p.getLength() == 0 && offset == p.offset))) {
+
+ int currentDistance= 0;
+
+ if (forward) {
+ currentDistance= p.getOffset() - offset;
+ if (currentDistance < 0)
+ currentDistance= endOfDocument - offset + p.getOffset();
+ } else {
+ currentDistance= offset - p.getOffset();
+ if (currentDistance < 0)
+ currentDistance= offset + endOfDocument - p.getOffset();
+ }
+
+ if (nextAnnotation == null || currentDistance < distance) {
+ distance= currentDistance;
+ nextAnnotation= a;
+ nextAnnotationPosition= p;
+ }
+ } else {
+ if (containingAnnotationPosition == null || containingAnnotationPosition.length > p.length) {
+ containingAnnotation= a;
+ containingAnnotationPosition= p;
+ if (length == p.length)
+ currentAnnotation= true;
+ }
+ }
+ }
+ if (containingAnnotationPosition != null && (!currentAnnotation || nextAnnotation == null)) {
+ annotationPosition.setOffset(containingAnnotationPosition.getOffset());
+ annotationPosition.setLength(containingAnnotationPosition.getLength());
+ return containingAnnotation;
+ }
+ if (nextAnnotationPosition != null) {
+ annotationPosition.setOffset(nextAnnotationPosition.getOffset());
+ annotationPosition.setLength(nextAnnotationPosition.getLength());
+ }
+
+ return nextAnnotation;
+ }
+
+ /**
+ * Returns the annotation overlapping with the given range or <code>null</code>.
+ *
+ * @param offset the region offset
+ * @param length the region length
+ * @return the found annotation or <code>null</code>
+ * @since 3.0
+ */
+ private Annotation getAnnotation(int offset, int length) {
+ IAnnotationAccess access= getAnnotationAccess();
+ IAnnotationModel model= getDocumentProvider().getAnnotationModel(getEditorInput());
+ Iterator e= new JavaAnnotationIterator(model, true, true);
+ while (e.hasNext()) {
+ Annotation a= (Annotation) e.next();
+ if (a instanceof IJavaAnnotation) {
+ IJavaAnnotation annotation= (IJavaAnnotation) a;
+ if (annotation.hasOverlay() || !isNavigationTargetType(annotation.getAnnotationType()))
+ continue;
+ } else if (!isNavigationTargetType(access.getType(a)))
+ continue;
+
+ Position p= model.getPosition(a);
+ if (p != null && p.overlapsWith(offset, length))
+ return a;
+ }
+
+ return null;
+ }
+
+ /**
+ * Returns whether the given annotation type is configured as a target type
+ * for the "Go to Next/Previous Annotation" actions
+ *
+ * @param type the annotation type
+ * @return <code>true</code> if this is a target type, <code>false</code>
+ * otherwise
+ * @since 3.0
+ */
+ private boolean isNavigationTargetType(Object type) {
+ Preferences preferences= Platform.getPlugin("org.eclipse.ui.workbench.texteditor").getPluginPreferences(); //$NON-NLS-1$
+ Iterator i= getAnnotationPreferences().getAnnotationPreferences().iterator();
+ while (i.hasNext()) {
+ AnnotationPreference annotationPref= (AnnotationPreference) i.next();
+ if (annotationPref.getAnnotationType().equals(type)) {
+// See bug 41689
+// String key= forward ? annotationPref.getIsGoToNextNavigationTargetKey() : annotationPref.getIsGoToPreviousNavigationTargetKey();
+ String key= annotationPref.getIsGoToNextNavigationTargetKey();
+ if (key != null && preferences.getBoolean(key))
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Computes and returns the source reference that includes the caret and
+ * serves as provider for the outline page selection and the editor range
+ * indication.
+ *
+ * @return the computed source reference
+ * @since 3.0
+ */
+ protected ISourceReference computeHighlightRangeSourceReference() {
+ ISourceViewer sourceViewer= getSourceViewer();
+ if (sourceViewer == null)
+ return null;
+
+ StyledText styledText= sourceViewer.getTextWidget();
+ if (styledText == null)
+ return null;
+
+ int caret= 0;
+ if (sourceViewer instanceof ITextViewerExtension3) {
+ ITextViewerExtension3 extension= (ITextViewerExtension3)sourceViewer;
+ caret= extension.widgetOffset2ModelOffset(styledText.getCaretOffset());
+ } else {
+ int offset= sourceViewer.getVisibleRegion().getOffset();
+ caret= offset + styledText.getCaretOffset();
+ }
+
+ IJavaElement element= getElementAt(caret, false);
+
+ if ( !(element instanceof ISourceReference))
+ return null;
+
+ if (element.getElementType() == IJavaElement.IMPORT_DECLARATION) {
+
+ IImportDeclaration declaration= (IImportDeclaration) element;
+ IImportContainer container= (IImportContainer) declaration.getParent();
+ ISourceRange srcRange= null;
+
+ try {
+ srcRange= container.getSourceRange();
+ } catch (JavaModelException e) {
+ }
+
+ if (srcRange != null && srcRange.getOffset() == caret)
+ return container;
+ }
+
+ return (ISourceReference) element;
+ }
+
+ /**
+ * Returns the most narrow java element including the given offset.
+ *
+ * @param offset the offset inside of the requested element
+ * @param reconcile <code>true</code> if editor input should be reconciled in advance
+ * @return the most narrow java element
+ * @since 3.0
+ */
+ protected IJavaElement getElementAt(int offset, boolean reconcile) {
+ return getElementAt(offset);
+ }
+
+ /*
+ * @see org.eclipse.ui.texteditor.ExtendedTextEditor#createChangeHover()
+ */
+ protected LineChangeHover createChangeHover() {
+ return new JavaChangeHover(IJavaPartitions.JAVA_PARTITIONING);
+ }
+
+ protected boolean isPrefQuickDiffAlwaysOn() {
+ return false; // never show change ruler for the non-editable java editor. Overridden in subclasses like CompilationUnitEditor
+ }
+
+ /*
+ * @see org.eclipse.ui.texteditor.AbstractTextEditor#createNavigationActions()
+ */
+ protected void createNavigationActions() {
+ super.createNavigationActions();
+
+ final StyledText textWidget= getSourceViewer().getTextWidget();
+
+ IAction action= new SmartLineStartAction(textWidget, false);
+ action.setActionDefinitionId(ITextEditorActionDefinitionIds.LINE_START);
+ setAction(ITextEditorActionDefinitionIds.LINE_START, action);
+
+ action= new SmartLineStartAction(textWidget, true);
+ action.setActionDefinitionId(ITextEditorActionDefinitionIds.SELECT_LINE_START);
+ setAction(ITextEditorActionDefinitionIds.SELECT_LINE_START, action);
+
+ action= new NavigatePreviousSubWordAction();
+ action.setActionDefinitionId(ITextEditorActionDefinitionIds.WORD_PREVIOUS);
+ setAction(ITextEditorActionDefinitionIds.WORD_PREVIOUS, action);
+ textWidget.setKeyBinding(SWT.CTRL | SWT.ARROW_LEFT, SWT.NULL);
+
+ action= new NavigateNextSubWordAction();
+ action.setActionDefinitionId(ITextEditorActionDefinitionIds.WORD_NEXT);
+ setAction(ITextEditorActionDefinitionIds.WORD_NEXT, action);
+ textWidget.setKeyBinding(SWT.CTRL | SWT.ARROW_RIGHT, SWT.NULL);
+
+ action= new DeletePreviousSubWordAction();
+ action.setActionDefinitionId(ITextEditorActionDefinitionIds.DELETE_PREVIOUS_WORD);
+ setAction(ITextEditorActionDefinitionIds.DELETE_PREVIOUS_WORD, action);
+ textWidget.setKeyBinding(SWT.CTRL | SWT.BS, SWT.NULL);
+
+ action= new DeleteNextSubWordAction();
+ action.setActionDefinitionId(ITextEditorActionDefinitionIds.DELETE_NEXT_WORD);
+ setAction(ITextEditorActionDefinitionIds.DELETE_NEXT_WORD, action);
+ textWidget.setKeyBinding(SWT.CTRL | SWT.DEL, SWT.NULL);
+
+ action= new SelectPreviousSubWordAction();
+ action.setActionDefinitionId(ITextEditorActionDefinitionIds.SELECT_WORD_PREVIOUS);
+ setAction(ITextEditorActionDefinitionIds.SELECT_WORD_PREVIOUS, action);
+ textWidget.setKeyBinding(SWT.CTRL | SWT.SHIFT | SWT.ARROW_LEFT, SWT.NULL);
+
+ action= new SelectNextSubWordAction();
+ action.setActionDefinitionId(ITextEditorActionDefinitionIds.SELECT_WORD_NEXT);
+ setAction(ITextEditorActionDefinitionIds.SELECT_WORD_NEXT, action);
+ textWidget.setKeyBinding(SWT.CTRL | SWT.SHIFT | SWT.ARROW_RIGHT, SWT.NULL);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0502/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0502/A.js
new file mode 100644
index 0000000..0ae7de0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0502/A.js
@@ -0,0 +1,28 @@
+package test0502;
+
+public class A {
+ {
+ int i = 1;
+ if (i == 1) {
+ int j = 1;
+ }
+ }
+
+ void foo() {
+ int i = 2;
+ if (i == 2) {
+ int j = 2;
+ } else {
+ int j = 3;
+ }
+ new Object() {
+ };
+ class B {
+ int field;
+ void bar() {
+ }
+ }
+ new Object() {
+ };
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0503/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0503/A.js
new file mode 100644
index 0000000..3a6eaba
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0503/A.js
@@ -0,0 +1,27 @@
+package test0503;
+
+public class A {
+ public class B {
+ void bar() {
+ class C {
+ }
+ new Object() {
+ class D {
+ }
+ };
+ }
+ }
+
+ void foo() {
+ class E {
+ }
+ new Object() {
+ class F {
+ }
+ };
+ if (false) {
+ class G {
+ }
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0504/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0504/A.js
new file mode 100644
index 0000000..10b520f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0504/A.js
@@ -0,0 +1,14 @@
+package test0504;
+
+public class A
+{
+ public A()
+ {
+
+ }
+
+}
+interface B
+{
+ public method(final int parameter);
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0505/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0505/A.js
new file mode 100644
index 0000000..299db32
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0505/A.js
@@ -0,0 +1,14 @@
+package test0505;
+
+public class A
+{
+ public A()
+ {
+
+ }
+
+}
+interface B
+{
+ public method(final int parameter) { }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0506/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0506/A.js
new file mode 100644
index 0000000..dbf04ed
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0506/A.js
@@ -0,0 +1,7 @@
+package test0506;
+
+public class A {
+ public void foo() {
+ new A();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0507/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0507/A.js
new file mode 100644
index 0000000..f8b8c18
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0507/A.js
@@ -0,0 +1,7 @@
+package test0507;
+
+public class A {
+ public void foo() {
+ new B();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0507/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0507/B.js
new file mode 100644
index 0000000..89416b4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0507/B.js
@@ -0,0 +1,4 @@
+package test0507;
+
+public class B {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0508/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0508/A.js
new file mode 100644
index 0000000..01c48e5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0508/A.js
@@ -0,0 +1,9 @@
+package test0508;
+
+public class A {
+ A() {
+ }
+ public void foo() {
+ new A();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0509/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0509/A.js
new file mode 100644
index 0000000..0167e43
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0509/A.js
@@ -0,0 +1,7 @@
+package test0509;
+
+public class A {
+ public void foo() {
+ new B();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0509/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0509/B.js
new file mode 100644
index 0000000..92cba9b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0509/B.js
@@ -0,0 +1,6 @@
+package test0509;
+
+public class B {
+ B() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0510/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0510/A.js
new file mode 100644
index 0000000..249c3c5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0510/A.js
@@ -0,0 +1,7 @@
+package test0510;
+
+public class A {
+ public void foo() {
+ new Y();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0511/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0511/A.js
new file mode 100644
index 0000000..1b78c75
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0511/A.js
@@ -0,0 +1,7 @@
+package test0511;
+
+public class A {
+ public void foo() {
+ new Y();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0512/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0512/A.js
new file mode 100644
index 0000000..c525854
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0512/A.js
@@ -0,0 +1,5 @@
+package test0512;
+
+public interface A {
+ public A();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0513/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0513/A.js
new file mode 100644
index 0000000..9697a8a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0513/A.js
@@ -0,0 +1,6 @@
+package test0513;
+
+public interface A {
+ void playerJoined(final final Object player);
+ void playerLeft(final Object player);
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0514/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0514/A.js
new file mode 100644
index 0000000..1bb0f12
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0514/A.js
@@ -0,0 +1,7 @@
+package test0514;
+
+public class A {
+ public A() { }
+ { // <- insert '{' before comment
+ public static void main(String[] args) { }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0515/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0515/A.js
new file mode 100644
index 0000000..440bd15
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0515/A.js
@@ -0,0 +1,12 @@
+package test0515;
+
+public class A {
+ public void method() {
+ if (true)
+ ; // <-- this one is correct
+ else if (true)
+ ; // <--- this one will visit twice
+ else
+ ; // <--- this one didn't visit
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0516/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0516/A.js
new file mode 100644
index 0000000..981e292
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0516/A.js
@@ -0,0 +1,11 @@
+package test0516;
+import java.util.*;
+public class Test {
+ /**
+ * Javadoc comment
+ */
+ public static void main(String[] args) {
+ /* method main */
+ System.out.println("Hello" + " world"); // comment
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0517/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0517/A.js
new file mode 100644
index 0000000..b129082
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0517/A.js
@@ -0,0 +1,8 @@
+package test0517;
+import java.util.*;
+public class Test {
+ /**
+ * Javadoc
+ */
+ public static final /* */ String s = "NULL", s2;// line comment
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0518/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0518/A.js
new file mode 100644
index 0000000..85cfb60
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0518/A.js
@@ -0,0 +1,11 @@
+package test0518;
+import java.util.*;
+public class Test {
+ /**
+ * Javadoc
+ */
+ static {
+ /* */
+ System.out.println("Hello" + " world"); // line comment
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0519/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0519/A.js
new file mode 100644
index 0000000..81bcab2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0519/A.js
@@ -0,0 +1,10 @@
+package test0519;
+import java.util.*;
+public class Test {
+ /**
+ * Javadoc
+ */
+ public static void main(String[] args) {
+ System.out./**/println("Hello" + " world");
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0520/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0520/A.js
new file mode 100644
index 0000000..ae7ada5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0520/A.js
@@ -0,0 +1,10 @@
+package test0519;
+import java.util.*;
+public class Test {
+ /**
+ * Javadoc
+ */
+ public static void main(String[] args) {
+ System.out.println("Hello" + /* */ " world");
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0521/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0521/A.js
new file mode 100644
index 0000000..dda75dd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0521/A.js
@@ -0,0 +1,6 @@
+package test0521;
+
+public class A {
+ public void method() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0522/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0522/A.js
new file mode 100644
index 0000000..5cb1abd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0522/A.js
@@ -0,0 +1,13 @@
+package test0522;
+
+class A {
+ public void foo() {
+ }
+}
+
+class Test {
+ void test() throws CloneNotSupportedException {
+ A a = new A();
+ a.clone();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0523/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0523/A.js
new file mode 100644
index 0000000..e556b72
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0523/A.js
@@ -0,0 +1,13 @@
+package test0523;
+
+class A {
+ public void foo() {
+ }
+}
+
+class Test {
+ void test() throws CloneNotSupportedException {
+ A a = new A();
+ a.clone();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0524/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0524/A.js
new file mode 100644
index 0000000..b0b9119
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0524/A.js
@@ -0,0 +1,11 @@
+package test0524;
+
+public class A {
+ void test() throws CloneNotSupportedException {
+ Runnable runnable = new Runnable() {
+ public void run() {
+ System.out.println();
+ }
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0525/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0525/A.js
new file mode 100644
index 0000000..6a3f745
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0525/A.js
@@ -0,0 +1,11 @@
+package test0525;
+
+public class A {
+ void test() throws CloneNotSupportedException {
+ Runnable runnable = new Runnable() {
+ public void run() {
+ System.out.println();
+ }
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0526/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0526/A.js
new file mode 100644
index 0000000..6fd01b1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0526/A.js
@@ -0,0 +1,13 @@
+package test0526;
+
+public class A {
+ public class B {
+ void test() throws CloneNotSupportedException {
+ Runnable runnable = new Runnable() {
+ public void run() {
+ System.out.println();
+ }
+ };
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0527/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0527/A.js
new file mode 100644
index 0000000..fa8c1b1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0527/A.js
@@ -0,0 +1,16 @@
+package test0527;
+
+public class A {
+
+ /**
+ *
+ *
+ */
+ public A() {
+ Runnable runnable = new Runnable() {
+ public void run() {
+ System.out.println();
+ }
+ };
+ } // comment
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0528/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0528/A.js
new file mode 100644
index 0000000..afeeadb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0528/A.js
@@ -0,0 +1,13 @@
+package test0528;
+
+public class A {
+ public class B {
+ void test() throws CloneNotSupportedException {
+ Runnable runnable = new Runnable() {
+ public void run() {
+ System.out.println();
+ }
+ };
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0529/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0529/A.js
new file mode 100644
index 0000000..c8c1c36
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0529/A.js
@@ -0,0 +1,17 @@
+package test0529;
+
+public class A {
+ /*
+ *
+ *
+ */
+ public class B {
+ void test() throws CloneNotSupportedException {
+ Runnable runnable = new Runnable() {
+ public void run() {
+ System.out.println();
+ }
+ };
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0530/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0530/A.js
new file mode 100644
index 0000000..ecc6601
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0530/A.js
@@ -0,0 +1,14 @@
+package test0530;
+
+public class A {
+ int field;
+ void foo(int i, int k) {
+ i= k;
+ }
+
+ int goo() {
+ // offset here
+ field= 1;
+ return;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0531/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0531/A.js
new file mode 100644
index 0000000..b50f9a5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0531/A.js
@@ -0,0 +1,27 @@
+package test0531;
+
+public class A {
+ int field = 4;
+ static int i = bar();
+
+ {
+ System.out.println();
+ }
+
+ static {
+ i = 5;
+ }
+
+ void foo(int j, int k) {
+ j = k;
+ }
+
+ int goo() {
+ field= 1;
+ return;
+ }
+
+ static int bar() {
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0532/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0532/A.js
new file mode 100644
index 0000000..633dbbc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0532/A.js
@@ -0,0 +1,27 @@
+package test0532;
+
+public class A {
+ int field = 4;
+ static int i = bar();
+
+ {
+ System.out.println();
+ }
+
+ static {
+ i = 5;
+ }
+
+ void foo(int j, int k) {
+ j = k;
+ }
+
+ int goo() {
+ field= 1;
+ return;
+ }
+
+ static int bar() {
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0533/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0533/A.js
new file mode 100644
index 0000000..3db16e6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0533/A.js
@@ -0,0 +1,7 @@
+package test0533;
+import java.util.*;
+public class Test {
+ public static void main(String[] args) {
+ System.out.println("Hello" + " world")
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0534/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0534/A.js
new file mode 100644
index 0000000..89ed998
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0534/A.js
@@ -0,0 +1,5 @@
+package test0534;
+import java.util.*;
+public class Test {
+ public static final String s = "NULL", s2
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0535/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0535/A.js
new file mode 100644
index 0000000..dbeb57f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0535/A.js
@@ -0,0 +1,7 @@
+package test05;
+import java.util.*;
+public class Test {
+ static {
+ System.out.println("Hello" + " world")
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0536/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0536/A.js
new file mode 100644
index 0000000..dc5dc3f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0536/A.js
@@ -0,0 +1,505 @@
+/*
+ * Created on Jan 20, 2004
+ *
+ * To change the template for this generated file go to
+ * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
+ */
+package test0536;
+
+import java.util.HashMap;
+import java.util.LinkedList;
+
+import SerSolver.SerBranchNode;
+import SerSolver.SerChipExitNode;
+import SerSolver.SerChipGoalNode;
+import SerSolver.SerColor;
+import SerSolver.SerGoalNode;
+import SerSolver.SerNode;
+
+import utilities.*;
+import utilities.Move;
+import utilities.NodeStatistics;
+
+abstract public class A
+{
+
+ protected static final int STAGESIZE = 15;
+ protected static int globalTargetDistance;
+ protected static Move[] moves;
+ static HashMap map;
+ public static SerNode exitNode;
+ static
+ {
+ globalTargetDistance = 10000;
+ exitNode = null;
+ moves = new Move[100];
+ for (int i = 0; i < 100; i++)
+ {
+ moves[i] = new Move();
+ }
+ map = new HashMap(100000);
+ }
+
+ protected int chips;
+ protected SerColor currentKey;
+ protected int startIndex;
+ protected int moveIndex;
+ protected int targetDistance;
+ protected LinkedList[] dependencies;
+ protected A nextSolver;
+ A(int _startIndex)
+ {
+ dependencies = new LinkedList[5];
+ for (int i = 0; i < 5; i++)
+ dependencies[i] = new LinkedList();
+ startIndex = _startIndex;
+ }
+ /**
+ * @param moveIndex
+ * @param moves
+ * @param chips
+ * @param dependencies
+ * @return the best solution for the remainder of the board
+ */
+ v
+ public Solution subSolve(int _moveIndex, int _chips, LinkedList[] _dependencies)
+ {
+ assert (_moveIndex==startIndex);
+ key.set(_dependencies);
+ Solution solution = (Solution) map.get(key);
+ if (solution == null)
+ {
+ chips = _chips;
+ targetDistance = 10000;
+ moveIndex = _moveIndex;
+ currentKey = moves[startIndex - 1].node.getKey();
+ for (int i = 1; i < 5; i++)
+ {
+ dependencies[i].clear();
+ dependencies[i].addAll(_dependencies[i]);
+ }
+
+ solution = findSolution();
+ Key saveKey = new Key(key);
+ map.put(saveKey, solution);
+
+ }
+ else
+ {
+ solution.hits++;
+ }
+ return solution;
+ }
+
+ /**
+ * like the method in the main solution finder but it is
+ * only looking for the best end game
+ * @param chips
+ */
+ abstract protected Solution findSolution();
+
+ /**
+ * @return
+ */
+ protected boolean pickNode(int index)
+ {
+ LinkedList list = dependencies[currentKey.getValue()];
+ if (list.isEmpty())
+ return false;
+ else
+ {
+ SerNode node = (SerNode) list.get(index);
+ Move lastMove = moves[moveIndex - 1];
+ int distance = NodeStatistics.nodeDistance(lastMove.node, node);
+ int cost = distance + lastMove.distance;
+ if (cost > targetDistance)
+ return false;
+ list.remove(index);
+ chooseNode(node, index, cost);
+ return true;
+ }
+
+ }
+
+ /**
+ *
+ */
+ protected int backoff()
+ {
+ Move move = moves[--moveIndex];
+ if (move.node instanceof SerChipGoalNode)
+ {
+ chips--;
+ }
+ if (move.node instanceof SerBranchNode)
+ {
+ SerNode[] nodes = ((SerBranchNode) move.node).getDependentNodes();
+ removeFromStack(nodes[0]);
+ removeFromStack(nodes[1]);
+ }
+ else
+ removeFromStack(((SerGoalNode) move.node).getDependentNode());
+ currentKey = move.node.getDoor();
+ boolean more = reputStack(move.node, move.indexOnStack);
+ if (!more)
+ return backoff();
+ else
+ return move.indexOnStack + 1;
+ }
+
+ /**
+ * @param node
+ */
+ protected void chooseNode(SerNode node, int cameFrom, int distance)
+ {
+ //NOTE assume already own green key
+ // if (node instanceof SerGreenKeyGoalNode)
+ // {
+ // sawGreen = true;
+ // drainGreenQueue();
+ // }
+ if (node instanceof SerBranchNode)
+ {
+ SerBranchNode branch = (SerBranchNode) node;
+ putStack(branch.getDependentNodes()[0]);
+ putStack(branch.getDependentNodes()[1]);
+ }
+ else
+ {
+ putStack(((SerGoalNode) node).getDependentNode());
+ if (node instanceof SerChipGoalNode)
+ {
+ chips++;
+ }
+ }
+
+ currentKey = node.getKey();
+
+ moves[moveIndex].indexOnStack = cameFrom;
+ moves[moveIndex].node = node;
+ moves[moveIndex].distance = distance;
+ moveIndex++;
+ }
+ /**
+ * @param board
+ * @param node
+ */
+ protected void putStack(SerNode node)
+ {
+ /* if the last node on a branch is a goal node it doesn't expose any other nodes
+ */
+ if (node == null)
+ return;
+ else if (node instanceof SerChipExitNode)
+ exitNode = node;
+ //NOTE assume already own green key
+ // else if (!sawGreen && node instanceof SerChipGoalNode)
+ // getDependencies(SerColor.GREEN_LITERAL).add(node);
+ else
+ dependencies[node.getDoor().getValue()].add(node);
+
+ }
+ /**
+ * @param node
+ */
+ protected void removeFromStack(SerNode node)
+ {
+ if (node == null)
+ return;
+ if (node instanceof SerChipExitNode)
+ return;
+
+ LinkedList list = dependencies[node.getDoor().getValue()];
+ if (!list.remove(node))
+ throw new RuntimeException("door not available");
+ }
+ /**
+ * @param node
+ * @param i
+ * @return
+ */
+ protected boolean reputStack(SerNode node, int i)
+ {
+ LinkedList list = dependencies[node.getDoor().getValue()];
+ list.add(i, node);
+ return list.size() > (i + 1);
+ }
+ protected void dumpMoves()
+ {
+ StringBuffer output = new StringBuffer(3000);
+ SerNode oldNode = moves[0].node;
+ int testDistance = 2;
+ for (int i = 1; i < moveIndex; i++)
+ {
+ SerNode node = moves[i].node;
+ int distance = moves[i].distance;
+ testDistance += NodeStatistics.nodeDistance(oldNode,node);
+ assert(testDistance==distance);
+ output.append(
+ i
+ + "("
+ + node.getColumn()
+ + ","
+ + node.getRow()
+ + ") "
+ + (2 * distance - 1)
+ + "\n");
+ oldNode = node;
+ }
+ System.out.println(output);
+
+ }
+}Content-Type: text/plain
+
+/*
+ * Created on Jan 20, 2004
+ *
+ * To change the template for this generated file go to
+ * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
+ */
+package test0536;
+
+import java.util.HashMap;
+import java.util.LinkedList;
+
+import SerSolver.SerBranchNode;
+import SerSolver.SerChipExitNode;
+import SerSolver.SerChipGoalNode;
+import SerSolver.SerColor;
+import SerSolver.SerGoalNode;
+import SerSolver.SerNode;
+
+import utilities.*;
+import utilities.Move;
+import utilities.NodeStatistics;
+
+abstract public class A
+{
+
+ protected static final int STAGESIZE = 15;
+ protected static int globalTargetDistance;
+ protected static Move[] moves;
+ static HashMap map;
+ public static SerNode exitNode;
+ static
+ {
+ globalTargetDistance = 10000;
+ exitNode = null;
+ moves = new Move[100];
+ for (int i = 0; i < 100; i++)
+ {
+ moves[i] = new Move();
+ }
+ map = new HashMap(100000);
+ }
+
+ protected int chips;
+ protected SerColor currentKey;
+ protected int startIndex;
+ protected int moveIndex;
+ protected int targetDistance;
+ protected LinkedList[] dependencies;
+ protected A nextSolver;
+ A(int _startIndex)
+ {
+ dependencies = new LinkedList[5];
+ for (int i = 0; i < 5; i++)
+ dependencies[i] = new LinkedList();
+ startIndex = _startIndex;
+ }
+ /**
+ * @param moveIndex
+ * @param moves
+ * @param chips
+ * @param dependencies
+ * @return the best solution for the remainder of the board
+ */
+ v
+ public Solution subSolve(int _moveIndex, int _chips, LinkedList[] _dependencies)
+ {
+ assert (_moveIndex==startIndex);
+ key.set(_dependencies);
+ Solution solution = (Solution) map.get(key);
+ if (solution == null)
+ {
+ chips = _chips;
+ targetDistance = 10000;
+ moveIndex = _moveIndex;
+ currentKey = moves[startIndex - 1].node.getKey();
+ for (int i = 1; i < 5; i++)
+ {
+ dependencies[i].clear();
+ dependencies[i].addAll(_dependencies[i]);
+ }
+
+ solution = findSolution();
+ Key saveKey = new Key(key);
+ map.put(saveKey, solution);
+
+ }
+ else
+ {
+ solution.hits++;
+ }
+ return solution;
+ }
+
+ /**
+ * like the method in the main solution finder but it is
+ * only looking for the best end game
+ * @param chips
+ */
+ abstract protected Solution findSolution();
+
+ /**
+ * @return
+ */
+ protected boolean pickNode(int index)
+ {
+ LinkedList list = dependencies[currentKey.getValue()];
+ if (list.isEmpty())
+ return false;
+ else
+ {
+ SerNode node = (SerNode) list.get(index);
+ Move lastMove = moves[moveIndex - 1];
+ int distance = NodeStatistics.nodeDistance(lastMove.node, node);
+ int cost = distance + lastMove.distance;
+ if (cost > targetDistance)
+ return false;
+ list.remove(index);
+ chooseNode(node, index, cost);
+ return true;
+ }
+
+ }
+
+ /**
+ *
+ */
+ protected int backoff()
+ {
+ Move move = moves[--moveIndex];
+ if (move.node instanceof SerChipGoalNode)
+ {
+ chips--;
+ }
+ if (move.node instanceof SerBranchNode)
+ {
+ SerNode[] nodes = ((SerBranchNode) move.node).getDependentNodes();
+ removeFromStack(nodes[0]);
+ removeFromStack(nodes[1]);
+ }
+ else
+ removeFromStack(((SerGoalNode) move.node).getDependentNode());
+ currentKey = move.node.getDoor();
+ boolean more = reputStack(move.node, move.indexOnStack);
+ if (!more)
+ return backoff();
+ else
+ return move.indexOnStack + 1;
+ }
+
+ /**
+ * @param node
+ */
+ protected void chooseNode(SerNode node, int cameFrom, int distance)
+ {
+ //NOTE assume already own green key
+ // if (node instanceof SerGreenKeyGoalNode)
+ // {
+ // sawGreen = true;
+ // drainGreenQueue();
+ // }
+ if (node instanceof SerBranchNode)
+ {
+ SerBranchNode branch = (SerBranchNode) node;
+ putStack(branch.getDependentNodes()[0]);
+ putStack(branch.getDependentNodes()[1]);
+ }
+ else
+ {
+ putStack(((SerGoalNode) node).getDependentNode());
+ if (node instanceof SerChipGoalNode)
+ {
+ chips++;
+ }
+ }
+
+ currentKey = node.getKey();
+
+ moves[moveIndex].indexOnStack = cameFrom;
+ moves[moveIndex].node = node;
+ moves[moveIndex].distance = distance;
+ moveIndex++;
+ }
+ /**
+ * @param board
+ * @param node
+ */
+ protected void putStack(SerNode node)
+ {
+ /* if the last node on a branch is a goal node it doesn't expose any other nodes
+ */
+ if (node == null)
+ return;
+ else if (node instanceof SerChipExitNode)
+ exitNode = node;
+ //NOTE assume already own green key
+ // else if (!sawGreen && node instanceof SerChipGoalNode)
+ // getDependencies(SerColor.GREEN_LITERAL).add(node);
+ else
+ dependencies[node.getDoor().getValue()].add(node);
+
+ }
+ /**
+ * @param node
+ */
+ protected void removeFromStack(SerNode node)
+ {
+ if (node == null)
+ return;
+ if (node instanceof SerChipExitNode)
+ return;
+
+ LinkedList list = dependencies[node.getDoor().getValue()];
+ if (!list.remove(node))
+ throw new RuntimeException("door not available");
+ }
+ /**
+ * @param node
+ * @param i
+ * @return
+ */
+ protected boolean reputStack(SerNode node, int i)
+ {
+ LinkedList list = dependencies[node.getDoor().getValue()];
+ list.add(i, node);
+ return list.size() > (i + 1);
+ }
+ protected void dumpMoves()
+ {
+ StringBuffer output = new StringBuffer(3000);
+ SerNode oldNode = moves[0].node;
+ int testDistance = 2;
+ for (int i = 1; i < moveIndex; i++)
+ {
+ SerNode node = moves[i].node;
+ int distance = moves[i].distance;
+ testDistance += NodeStatistics.nodeDistance(oldNode,node);
+ assert(testDistance==distance);
+ output.append(
+ i
+ + "("
+ + node.getColumn()
+ + ","
+ + node.getRow()
+ + ") "
+ + (2 * distance - 1)
+ + "\n");
+ oldNode = node;
+ }
+ System.out.println(output);
+
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0537/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0537/A.js
new file mode 100644
index 0000000..bfca453
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0537/A.js
@@ -0,0 +1,4 @@
+package test0537;
+public class A {
+ Object clons;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0537/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0537/B.js
new file mode 100644
index 0000000..6af24fb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0537/B.js
@@ -0,0 +1,4 @@
+package test0537;
+public class B {
+ int flals;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0537/C.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0537/C.js
new file mode 100644
index 0000000..46d290f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0537/C.js
@@ -0,0 +1,4 @@
+package test0537;
+public class C {
+ boolean thru;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0538/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0538/A.js
new file mode 100644
index 0000000..a4d5dca
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0538/A.js
@@ -0,0 +1,3 @@
+package test0538;
+public class A {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0539/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0539/A.js
new file mode 100644
index 0000000..64d3564
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0539/A.js
@@ -0,0 +1,7 @@
+public class A {
+ class Inner {
+ }
+ void make() {
+ new A(){}.new Inner(){/*x*/};
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0541/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0541/A.js
new file mode 100644
index 0000000..69be93d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0541/A.js
@@ -0,0 +1,11 @@
+package test0541;
+
+class A {
+ private int[] tab = new int[] {
+ B.CODNIVEL3, B.NOMNIVEL3, B.CODAUTORIZA,
+ B.NOMUSRCIA, B.TIPAUTORIZA, B.NOMAUTORIZA,
+ B.CODCTOAUTORIZA, B.NOMCTOAUTORIZA, B.CODMON,
+ B.NOMMON, B.MCAINH, B.IMPORTEAUTORIZA,
+ B.NUMDECIMALES
+ };
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0541/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0541/B.js
new file mode 100644
index 0000000..180f2be
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0541/B.js
@@ -0,0 +1,21 @@
+package test0541;
+
+public class B {
+ protected static final int NUMSECUK = 0;
+ protected static final int CODCIA = 1;
+ protected static final int CODNIVEL3 = 2;
+ protected static final int NOMNIVEL3 = 3;
+ protected static final int CODAUTORIZA = 4;
+ protected static final int NOMUSRCIA = 5;
+ protected static final int TIPAUTORIZA = 6;
+ protected static final int NOMAUTORIZA = 7;
+ protected static final int CODCTOAUTORIZA = 8;
+ protected static final int NOMCTOAUTORIZA = 9;
+ protected static final int IMPORTEAUTORIZA = 10;
+ protected static final int CODMON = 11;
+ protected static final int NOMMON = 12;
+ protected static final int NUMDECIMALES = 13;
+ protected static final int CODUSR = 14;
+ protected static final int FECACTU = 15;
+ protected static final int MCAINH = 16;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0542/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0542/A.js
new file mode 100644
index 0000000..8e3f73b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0542/A.js
@@ -0,0 +1,14 @@
+package test0542;
+
+public class A {
+ private static final String STRING_FIELD = "Hello world!";
+ private static final boolean BOOLEAN_FIELD = true;
+ private static final byte BYTE_FIELD = 1;
+ private static final char CHAR_FIELD = '{';
+ private static final double DOUBLE_FIELD = 3.1415;
+ private static final float FLOAT_FIELD = 3.14159f;
+ private static final int INT_FIELD = Integer.MAX_VALUE; //0x7fffffff
+ private static final long LONG_FIELD = 34L;
+ private static final short SHORT_FIELD = 130;
+ private int int_field = Integer.MAX_VALUE; //0x7fffffff
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0543/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0543/A.js
new file mode 100644
index 0000000..b93f4a0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0543/A.js
@@ -0,0 +1,8 @@
+package test0543;
+
+public class A {
+ public static void main(String[] args) {
+ Object c = new java.io.PrintStream() {};
+ System.out.println(c);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0544/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0544/A.js
new file mode 100644
index 0000000..2b9ba77
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0544/A.js
@@ -0,0 +1,7 @@
+package test0544;
+
+public abstract class A {
+ abstract void foo();
+ static A a = new A() {
+ };
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0545/First.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0545/First.js
new file mode 100644
index 0000000..efb2b0e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0545/First.js
@@ -0,0 +1,12 @@
+package test0545;
+
+public class First {
+ private static class Test {
+ // default constructor
+ Test(float f) {
+ }
+ }
+ First() {
+ final Test t = new Test(0.0f);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0545/Second.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0545/Second.js
new file mode 100644
index 0000000..7730fcb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0545/Second.js
@@ -0,0 +1,11 @@
+package test0545;
+
+public class Second {
+ private static class Test {
+ Test(int i) {
+ }
+ }
+ Second() {
+ final Test t = new Test(0);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0545/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0545/Test.js
new file mode 100644
index 0000000..78a8911
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0545/Test.js
@@ -0,0 +1,6 @@
+package test0545;
+
+public class Test {
+ Test(Object o) {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0545/Third.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0545/Third.js
new file mode 100644
index 0000000..c59434a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0545/Third.js
@@ -0,0 +1,9 @@
+package test0545;
+
+public class Third {
+ private static class Test {
+ }
+ Third() {
+ final Test t = new Test();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0546/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0546/A.js
new file mode 100644
index 0000000..bd2b702
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0546/A.js
@@ -0,0 +1,10 @@
+package test0546;
+
+interface MyInterface {}
+
+public class A {
+ public static void main(String[] args) {
+ MyInterface myi = new MyInterface() {};
+ myi.toString();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0547/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0547/A.js
new file mode 100644
index 0000000..fe1a256
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0547/A.js
@@ -0,0 +1,12 @@
+package test0547;
+
+public class A {
+ public void foo() {
+ class Local {
+ class LocalMember {
+ }
+ LocalMember x;
+ Vector v;
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0548/PaletteStackEditPart.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0548/PaletteStackEditPart.js
new file mode 100644
index 0000000..8e35130
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0548/PaletteStackEditPart.js
@@ -0,0 +1,16 @@
+public class PaletteStackEditPart {
+
+// listen to changes in palette layout.
+private PropertyChangeListener paletteLayoutListener = new PropertyChangeListener() {};
+
+// listen to changes in stack
+private PropertyChangeListener stackListener = new PropertyChangeListener() {
+ };
+ }
+ }
+};
+
+// listen to changes of clickable tool figure
+private ChangeListener clickableListener = new ChangeListener() {};
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0549/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0549/A.js
new file mode 100644
index 0000000..f69b140
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0549/A.js
@@ -0,0 +1,8 @@
+public class A
+{
+ public void broken(}
+{}
+
+ public void thereMustSomethingHere()
+ {}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0550/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0550/A.js
new file mode 100644
index 0000000..63a6133
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0550/A.js
@@ -0,0 +1,6 @@
+public class A
+{
+ public A() { }
+ { // <- insert '{' before comment
+ public static void main(String[] args) { }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0551/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0551/A.js
new file mode 100644
index 0000000..17e6cb3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0551/A.js
@@ -0,0 +1,7 @@
+package test0551;
+
+public class A {
+// some code
+}
+/*
+// some comments \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0552/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0552/Test.js
new file mode 100644
index 0000000..e9741c2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0552/Test.js
@@ -0,0 +1,7 @@
+package test0552;
+
+public class Test {
+ void foo() {
+ "aaa".equals("a" + "a" + "a");
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0553/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0553/A.js
new file mode 100644
index 0000000..3fd7652
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0553/A.js
@@ -0,0 +1,8 @@
+package test0553;
+
+public class A {
+ private static final String BUNDLE_NAME = A.getString();
+ public static String getString() {
+ return "";
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0554/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0554/A.js
new file mode 100644
index 0000000..39b806f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0554/A.js
@@ -0,0 +1,8 @@
+package test0554;
+
+public class A {
+ private static final String BUNDLE_NAME = "test.test";//$NON-NLS-1$
+ public static String getString(String s) {
+ return "";
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0554/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0554/B.js
new file mode 100644
index 0000000..6a68d18
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0554/B.js
@@ -0,0 +1,9 @@
+package test0554;
+
+import test0554.A;
+
+public class B {
+ public static String foo() {
+ return A.getString("xx");
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0555/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0555/A.js
new file mode 100644
index 0000000..900c0e4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0555/A.js
@@ -0,0 +1,8 @@
+package test0555;
+
+public class A {
+ public static final String BUNDLE_NAME = "test.test";//$NON-NLS-1$
+ public static String getString(String s) {
+ return "";
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0555/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0555/B.js
new file mode 100644
index 0000000..330f440
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0555/B.js
@@ -0,0 +1,9 @@
+package test0555;
+
+import test0555.A;
+
+public class B {
+ public static String foo() {
+ return A.BUNDLE_NAME;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0556/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0556/A.js
new file mode 100644
index 0000000..abc7718
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0556/A.js
@@ -0,0 +1,13 @@
+package test0556;
+
+import java.util.Vector;
+
+public class A {
+ AA aa;
+ void foo() {
+ (aa.bar()).size();
+ }
+}
+class AA {
+ Vector bar() { return new Vector(1); };
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0557/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0557/A.js
new file mode 100644
index 0000000..7ef1ff8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0557/A.js
@@ -0,0 +1,18 @@
+package test0557;
+
+import java.util.Vector;
+public class A {
+ AA aa;
+ void foo() {
+ (aa.bar()).get(0);
+ // comment
+ if (true) {
+ System.out.println("Hello: " + toString()); //$NON-NLS-1$
+ }
+ }
+}
+class AA {
+ Vector bar() {
+ return new Vector(1);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0559/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0559/A.js
new file mode 100644
index 0000000..2b23e07
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0559/A.js
@@ -0,0 +1,8 @@
+package test0559;
+
+public class A {
+
+ void foo() {
+ if( (/*X:press_any_key_b*/ " " /**/).length() > 1 );
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0560/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0560/A.js
new file mode 100644
index 0000000..8f14498
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0560/A.js
@@ -0,0 +1,8 @@
+package test0560;
+
+public class A {
+
+ void foo() {
+ if( (/*X:press_any_key_b*/" ").length() > 1 );
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0561/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0561/A.js
new file mode 100644
index 0000000..0127230
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0561/A.js
@@ -0,0 +1,8 @@
+package test0561;
+
+public class A {
+
+ void foo() {
+ if( (/*X:press_any_key_b*//**/ " " /**/).length() > 1 );
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0562/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0562/A.js
new file mode 100644
index 0000000..592e3eb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0562/A.js
@@ -0,0 +1,8 @@
+package test0562;
+
+public class A {
+
+ void foo() {
+ if( (/*X:press_any_key_b*//**/" "/**/ /**/ ).length() > 1 );
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0563/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0563/A.js
new file mode 100644
index 0000000..98261fd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0563/A.js
@@ -0,0 +1,8 @@
+package test0563;
+
+public class A {
+
+ void foo() {
+ if( (/*X:press_any_key_b*//**/new String()/**/ /**/ ).length() > 1 );
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0564/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0564/A.js
new file mode 100644
index 0000000..fe2e20b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0564/A.js
@@ -0,0 +1,8 @@
+package test0564;
+
+public class A {
+
+ void foo() {
+ if( ( new String() ).length() > 1 );
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0565/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0565/A.js
new file mode 100644
index 0000000..c109ba8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0565/A.js
@@ -0,0 +1,8 @@
+package test0565;
+
+public class A {
+
+ void foo() {
+ if( ( (/**/ String /**/) new String() /**/ ).length() > 1 );
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0566/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0566/A.js
new file mode 100644
index 0000000..8fa2156
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0566/A.js
@@ -0,0 +1,6 @@
+package test0566;
+
+public class A {
+ public String foo() {
+ return "";} //$NON-NLS-1$
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0567/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0567/A.js
new file mode 100644
index 0000000..ede63ea
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0567/A.js
@@ -0,0 +1,7 @@
+package test0567;
+
+public class A {
+ public String foo() {
+ return "";
+ } //$NON-NLS-1$
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0568/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0568/A.js
new file mode 100644
index 0000000..73c6e22
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0568/A.js
@@ -0,0 +1,8 @@
+package test0568;
+
+public class A {
+ public void foo() {
+ StringTokenizer tokeniser = new StringTokenizer( "", "" );
+ if ( tokeniser.countTokens() = 3 ) {}
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0569/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0569/A.js
new file mode 100644
index 0000000..a23a1c5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0569/A.js
@@ -0,0 +1,19 @@
+package test0569;
+
+/**
+ * javadoc comment
+ */
+public class A {
+
+ /**
+ * javadoc comment
+ */
+ public void method() {
+ /**
+ * not javadoc comment
+ */
+ System.out.println("println");
+ class Local {
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0570/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0570/A.js
new file mode 100644
index 0000000..1cd3866
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0570/A.js
@@ -0,0 +1,9 @@
+package test0570;
+
+public class A {
+
+ public String m(String s) {
+ return s + "a" + "abc" + "e" + ("i" + ("i" + "ib2") + "i2") + "c";
+ }
+}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0573/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0573/X.js
new file mode 100644
index 0000000..5cf7d0b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0573/X.js
@@ -0,0 +1,6 @@
+package test0573;
+
+public class X {
+
+}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0573/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0573/Y.js
new file mode 100644
index 0000000..87598c2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0573/Y.js
@@ -0,0 +1,6 @@
+package test0573;
+
+public class Y extends X
+{
+}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0573/Z.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0573/Z.js
new file mode 100644
index 0000000..91109d2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0573/Z.js
@@ -0,0 +1,12 @@
+package test0573;
+
+public class Z extends Y
+{
+ public void foo() {
+ this.bar();
+ }
+ public void bar() throws Exception {
+
+ }
+}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0574/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0574/X.js
new file mode 100644
index 0000000..bd92aaf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0574/X.js
@@ -0,0 +1,17 @@
+package test0574;
+
+public class X {
+ int field;
+
+ class Inner {
+ int field;
+ public void foo() {
+ field= 10;
+ X.this.field= 11;
+ }
+ }
+
+ public void foo() {
+ field= 10;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0575/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0575/X.js
new file mode 100644
index 0000000..3ad69fa
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0575/X.js
@@ -0,0 +1,17 @@
+package test0575;
+
+public class X {
+ int field;
+
+ class Inner {
+ int field;
+ public void foo() {
+ field= 10;
+ X.this.field= 11;
+ }
+ }
+
+ public void foo() {
+ field= 10;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0578/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0578/X.js
new file mode 100644
index 0000000..b3a6ea8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0578/X.js
@@ -0,0 +1,51 @@
+package test0578;
+
+public class X {
+
+ static {
+ int var1 = 0;
+ System.out.println(var1);
+ }
+
+ {
+ int var2 = 0;
+ System.out.println(var2);
+ }
+
+ public int var3;
+
+ public void foo() {
+ int var4;
+ }
+
+ public Object bar() {
+ return new Object() {
+ public void foo2() {
+ int var5;
+ }
+ };
+ }
+
+ public int bar2() {
+ class C {
+ int var6;
+
+ public void foo3() {
+ int var7;
+ }
+ };
+ return new C().var6;
+ }
+
+ public X() {
+ int var8;
+ }
+
+ public void bar3(int var9) {
+ for (int var10 = 0; var10 < 10; var10++) {
+ }
+ }
+
+ public X(Object var11) {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0579/ParserTask.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0579/ParserTask.js
new file mode 100644
index 0000000..5b41995
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0579/ParserTask.js
@@ -0,0 +1,91 @@
+package test0579;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+import org.eclipse.wst.jsdt.core.dom.AST;
+import org.eclipse.wst.jsdt.core.dom.CompilationUnit;
+import org.eclipse.wst.jsdt.core.dom.ImportDeclaration;
+import org.eclipse.wst.jsdt.core.dom.MethodDeclaration;
+import org.eclipse.wst.jsdt.core.dom.Name;
+import org.eclipse.wst.jsdt.core.dom.PackageDeclaration;
+import org.eclipse.wst.jsdt.core.dom.TypeDeclaration;
+
+/**
+ *
+ */
+public class ParserTask extends Task {
+ public void doNothingMethod() {
+ //
+ int x = 0;
+ }
+
+ public void execute() throws BuildException {
+ try {
+ String line = null;
+ StringBuffer buffer = new StringBuffer();
+
+ /* Read in this source file */
+ BufferedReader bufferedReader = new BufferedReader(new FileReader(
+ "C:\\Projects5.1\\ParserTask\\src\\ParserTask.java"));
+
+ /* Put source file contents into a StringBuffer */
+ while ((line = bufferedReader.readLine()) != null) {
+ buffer.append(line);
+ }
+
+ /* Parse the source code */
+ CompilationUnit compUnit = AST.parseCompilationUnit(buffer
+ .toString().toCharArray());
+
+ System.out.println("\nPackage Declaration: ");
+ PackageDeclaration packageDecl = compUnit.getPackage();
+ System.out.println(packageDecl == null ? "(default)" : packageDecl
+ .getName().toString());
+
+ System.out.println("\nImports: ");
+ List importList = compUnit.imports();
+ Iterator itr = importList.iterator();
+ while (itr.hasNext()) {
+ ImportDeclaration importDecl = (ImportDeclaration) itr.next();
+
+ System.out.println(importDecl.getName());
+ }
+
+ List typeList = compUnit.types();
+ itr = typeList.iterator();
+ while (itr.hasNext()) {
+ TypeDeclaration typeDecl = (TypeDeclaration) itr.next();
+
+ System.out.println("\nClass: " + typeDecl.getName());
+
+ System.out.print("Superclass: ");
+ Name superClassName = typeDecl.getSuperclass();
+
+ System.out.println(superClassName == null ? "(none)"
+ : superClassName.toString());
+
+ MethodDeclaration[] methodDecls = typeDecl.getMethods();
+ System.out.println("Methods: ");
+
+ for (int i = 0; i < methodDecls.length; i++) {
+ System.out.println("\t\t"
+ + methodDecls[i].getName().toString());
+ }
+ }
+
+ } catch (Exception e) {
+ throw new BuildException(e);
+ }
+
+ }
+
+ void anotherDoNothingMethod() {
+ int x = 0;
+ }
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0580/DiamondSquareTerrainGenerator.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0580/DiamondSquareTerrainGenerator.js
new file mode 100644
index 0000000..6c37714
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0580/DiamondSquareTerrainGenerator.js
@@ -0,0 +1,123 @@
+package test0580;
+
+import ecosim.model.DefaultLocationModel;
+import ecosim.model.LocationModel;
+import ecosim.model.MapModel;
+
+
+/**
+ * @author Ben Hutchison
+ *
+ */
+public class DiamondSquareTerrainGenerator implements MapGenerator
+{
+ //number of halving recursive subdivisons to cover map
+ int _subdivisions;
+
+ //both width and height = 2^_subdivisions + 1 (ie square map)
+ int _width, _height;
+
+ d
+
+ LocationModel[][] _map;
+
+ /* (non-Javadoc)
+ * @see ecosim.model.map.MapGenerator#generateLocation(int, int, ecosim.model.MapModel)
+ */
+ public LocationModel generateLocation(int i, int j, MapModel mapModel)
+ {
+
+ // TODO Auto-generated method stub
+ return null;
+ }
+ /* (non-Javadoc)
+ * @see ecosim.model.map.MapGenerator#setSize(int, int)
+ */
+ public void setSize(int width, int height)
+ {
+ _subdivisions = Math.max(ceilLogBase2(width), ceilLogBase2(height));
+
+ //diamond-square alg needs map size == power of 2 plus one; select next suitable size
+ _width = powerOf2(_subdivisions) + 1;
+ _height = powerOf2(_subdivisions) + 1;
+
+ _map = new LocationModel[_width][_height];
+
+ generateMap();
+ }
+
+ void generateMap() {
+ int lod = _subdivisions;
+ for (int i = 0; i < lod; ++ i) {
+ int q = 1 << i, r = 1 << (lod - i), s = r >> 1;
+ for (int j = 0; j < divisions; j += r)
+ for (int k = 0; k < divisions; k += r)
+ diamond (j, k, r, rough);
+ if (s > 0)
+ for (int j = 0; j <= divisions; j += s)
+ for (int k = (j + s) % r; k <= divisions; k += r)
+ square (j - s, k - s, r, rough);
+ rough *= roughness;
+ }
+ }
+
+ void diamond(int x, int y, int side, double scale) {
+ if (side > 1) {
+ int half = side / 2;
+ double avg = (terrain[x][y] + terrain[x + side][y] +
+ terrain[x + side][y + side] + terrain[x][y + side]) * 0.25;
+ terrain[x + half][y + half] = avg + rnd () * scale;
+ }
+
+ }
+
+ void square (int x, int y, int side, double scale) {
+ int half = side / 2;
+ double avg = 0.0, sum = 0.0;
+ if (x >= 0)
+ { avg += terrain[x][y + half]; sum += 1.0; }
+ if (y >= 0)
+ { avg += terrain[x + half][y]; sum += 1.0; }
+ if (x + side <= divisions)
+ { avg += terrain[x + side][y + half]; sum += 1.0; }
+ if (y + side <= divisions)
+ { avg += terrain[x + half][y + side]; sum += 1.0; }
+ terrain[x + half][y + half] = avg / sum + rnd () * scale;
+ }
+
+
+ public static int ceilLogBase2(int value) {
+ if (value <= 1)
+ return 0;
+ int exponent = 1;
+ value--;
+ while ((value = value >> 1) != 0)
+ exponent++;
+ return exponent;
+ }
+ public static int powerOf2(int exponent) {
+ int value = 1;
+ while (exponent-- > 0)
+ value = value << 1;
+ return value;
+ }
+
+
+ public static void main(String[] args)
+ {
+ System.out.println("1: "+ceilLogBase2(1));
+ System.out.println("2: "+ceilLogBase2(2));
+ System.out.println("3: "+ceilLogBase2(3));
+ System.out.println("4: "+ceilLogBase2(4));
+ System.out.println("5: "+ceilLogBase2(5));
+ System.out.println("-3: "+ceilLogBase2(3));
+ System.out.println("1024: "+ceilLogBase2(1024));
+ System.out.println("1023: "+ceilLogBase2(1023));
+ System.out.println("1025: "+ceilLogBase2(1025));
+
+ System.out.println("1 "+powerOf2(1));
+ System.out.println("2 "+powerOf2(2));
+ System.out.println("3 "+powerOf2(3));
+ }
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0582/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0582/X.js
new file mode 100644
index 0000000..42126b4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0582/X.js
@@ -0,0 +1,6 @@
+package test0582;
+public class X {
+ private int[][][][][] MethodName(int[][] tab) {
+ return null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0595/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0595/X.js
new file mode 100644
index 0000000..504b6ae
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0595/X.js
@@ -0,0 +1,9 @@
+package test0595;
+
+import test0595a.A.*;
+
+public class X {
+ public Object foo() {
+ return new B();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0595a/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0595a/A.js
new file mode 100644
index 0000000..222d999
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0595a/A.js
@@ -0,0 +1,6 @@
+package test0595a;
+
+public class A {
+
+ public static class B {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0597/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0597/X.js
new file mode 100644
index 0000000..964f049
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0597/X.js
@@ -0,0 +1,10 @@
+package test0597;
+
+import junit.framework.Protectable;
+import junit.framework.Test;
+
+public class X {
+ void m(Test t) {
+ if (t instanceof Protectable) {}
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0599/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0599/X.js
new file mode 100644
index 0000000..e57277a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0599/X.js
@@ -0,0 +1,7 @@
+package test0599;
+
+public class X implements Zork {
+ int m(int i) {
+ return 1 + 2 + ++i;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0600/C.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0600/C.js
new file mode 100644
index 0000000..bead345
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0600/C.js
@@ -0,0 +1,7 @@
+package test0600;
+
+class C {
+ public static void world() {
+ System.out.println("x");
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0600/Try.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0600/Try.js
new file mode 100644
index 0000000..86028c9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0600/Try.js
@@ -0,0 +1,7 @@
+package test0600;
+
+public class Try {
+ void hello() {
+ C.world();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0602/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0602/X.js
new file mode 100644
index 0000000..bacf0fb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0602/X.js
@@ -0,0 +1,2890 @@
+package test0602;
+
+class X {
+ void foo(String s) {
+ }
+
+ public X(){
+foo(
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\052\057\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\052\057\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\052\057\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\052\057\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\052\057\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" +
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040"
+);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0603/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0603/X.js
new file mode 100644
index 0000000..1fd06a9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0603/X.js
@@ -0,0 +1,15 @@
+package test0603;
+
+public class X {
+ String fa;
+ String[] fb;
+ String[][] fc;
+ String[][][] fd;
+
+ void foo() {
+ String a;
+ String[] b;
+ String[][] c;
+ String[][][] d;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0604/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0604/X.js
new file mode 100644
index 0000000..d881bbf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0604/X.js
@@ -0,0 +1,15 @@
+package test0604;
+
+public class X {
+ java.lang.String fa;
+ java.lang.String[] fb;
+ java.lang.String[][] fc;
+ java.lang.String[][][] fd;
+
+ void foo() {
+ java.lang.String a;
+ java.lang.String[] b;
+ java.lang.String[][] c;
+ java.lang.String[][][] d;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0605/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0605/X.js
new file mode 100644
index 0000000..2f68655
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0605/X.js
@@ -0,0 +1,16 @@
+package test0605;
+
+public class X {
+
+ void foo() {
+ int[] a= null;
+ int lenA= a.length;
+ int lenB = this.a.length;
+ C c = new C();
+ int lenC = c.d.length;
+ }
+ int[] a = {};
+ class C {
+ int[] d = {};
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0606/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0606/X.js
new file mode 100644
index 0000000..61429ee
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0606/X.js
@@ -0,0 +1,7 @@
+package test0606;
+
+public class X {
+
+ void foo(int i) {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0610/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0610/Test.js
new file mode 100644
index 0000000..25e520b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0610/Test.js
@@ -0,0 +1,5 @@
+package test0610;
+
+/** @deprecated */
+public class Test {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0610/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0610/X.js
new file mode 100644
index 0000000..72dbfeb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0610/X.js
@@ -0,0 +1,5 @@
+package test0610;
+
+public class X {
+ Test test;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0619/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0619/A.js
new file mode 100644
index 0000000..c0b285f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0619/A.js
@@ -0,0 +1,6 @@
+package test0619;
+public class Test {
+ public static void main(String[] args) {
+ String s, t, u, v;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0629/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0629/X.js
new file mode 100644
index 0000000..38c2b2f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0629/X.js
@@ -0,0 +1,5 @@
+package test0629;
+
+public class X {
+ String[] s = {"",,,};
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0630/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0630/X.js
new file mode 100644
index 0000000..f64b803
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0630/X.js
@@ -0,0 +1,7 @@
+package test0630;
+
+public class X {
+ public void foo() {
+ String[] s = {"",,,};
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0631/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0631/X.js
new file mode 100644
index 0000000..7bb009a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0631/X.js
@@ -0,0 +1,5 @@
+package test0631;
+
+public class X {
+ String[] s = {"",,,;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0653/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0653/A.js
new file mode 100644
index 0000000..24dca73
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0653/A.js
@@ -0,0 +1,9 @@
+package test0653;
+
+public class A {
+ private String name = null;
+
+ public A(String aName) {
+ this.name = aName;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0653/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0653/X.js
new file mode 100644
index 0000000..4a54bc1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0653/X.js
@@ -0,0 +1,22 @@
+package test0653;
+
+import java.util.ArrayList;
+
+public class X extends A {
+
+ public X(String name) {
+ super(name);
+ }
+
+ public static void main(String[] args) {
+ new X("SimpleTest").test();
+ }
+
+ public void test() {
+ System.out.println(this.name.length());
+ ArrayList arrayList = new ArrayList(); // BREAKPOINT
+ for (int i = 0; i < 100; i++) {
+ arrayList.add(new Integer(i));
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0657/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0657/A.js
new file mode 100644
index 0000000..66dc7aa
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0657/A.js
@@ -0,0 +1,3 @@
+package test0657;
+
+public class A {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0657/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0657/X.js
new file mode 100644
index 0000000..61b3712
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0657/X.js
@@ -0,0 +1,4 @@
+package test0657;
+
+public class X {}
+class A {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/bins/binaries.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/bins/binaries.jar
new file mode 100644
index 0000000..fbcb8bf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/bins/binaries.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/javadoc/b83804/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/javadoc/b83804/Test.js
new file mode 100644
index 0000000..4cf00e2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/javadoc/b83804/Test.js
@@ -0,0 +1,5 @@
+package javadoc.b83804;
+public class Test {
+ public int field;
+ public void foo() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/javadoc/b83804/package-info.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/javadoc/b83804/package-info.js
new file mode 100644
index 0000000..b248cd4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/javadoc/b83804/package-info.js
@@ -0,0 +1,15 @@
+/**
+ * Valid javadoc.
+ * @see Test
+ * @see Unknown Unknown
+ * @see Test#foo()
+ * @see Test#unknown() Unknown
+ * @see Test#field
+ * @see Test#unknown Unknown
+ * @param unexpected Unknown
+ * @throws unexpected Unknown
+ * @return unexpected
+ * @deprecated unexpected in spec, but accepted by javadoc.exe
+ * @other-tags should be valid
+ */
+package javadoc.b83804;
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/javadoc/b83804a/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/javadoc/b83804a/Test.js
new file mode 100644
index 0000000..b407ba7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/javadoc/b83804a/Test.js
@@ -0,0 +1,5 @@
+package javadoc.b83804a;
+public class Test {
+ public int field;
+ public void foo() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/javadoc/b83804a/package-info.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/javadoc/b83804a/package-info.js
new file mode 100644
index 0000000..4e40699
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/javadoc/b83804a/package-info.js
@@ -0,0 +1,16 @@
+/**
+ * Valid javadoc.
+ * @see Test
+ * @see Unknown Unknown
+ * @see Test#foo()
+ * @see Test#unknown() Unknown
+ * @see Test#field
+ * @see Test#unknown Unknown
+ * @param unexpected Unknown
+ * @throws unexpected Unknown
+ * @return unexpected
+ * @deprecated unexpected in spec, but accepted by javadoc.exe
+ * @other-tags should be valid
+ */
+@Deprecated
+package javadoc.b83804a;
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/pack/A1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/pack/A1.js
new file mode 100644
index 0000000..9beff64
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/pack/A1.js
@@ -0,0 +1,8 @@
+package pack;
+
+
+public @interface A1 {
+ E value();
+ E[] list();
+ Class clazz();
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/pack/A2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/pack/A2.js
new file mode 100644
index 0000000..e0e2d51
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/pack/A2.js
@@ -0,0 +1,9 @@
+package pack;
+
+
+public @interface A2 {
+ A1 annot();
+ E value();
+ E[] list();
+ Class clazz();
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/pack/A3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/pack/A3.js
new file mode 100644
index 0000000..7d85362
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/pack/A3.js
@@ -0,0 +1,9 @@
+package pack;
+
+
+public @interface A3 {
+ A2 annot();
+ E value();
+ E[] list();
+ Class clazz();
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/pack/E.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/pack/E.js
new file mode 100644
index 0000000..695bcee
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/pack/E.js
@@ -0,0 +1,9 @@
+package pack;
+
+
+public enum E {
+ // constants used in value field of annotations
+ CC, CF, CM, CP, CV,
+ // constants used in list field of annotations
+ CAC, CAF, CAM, CAP, CAV,
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0001/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0001/X.js
new file mode 100644
index 0000000..aee69a4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0001/X.js
@@ -0,0 +1,13 @@
+package test0001;
+
+public class X {
+
+ public static final String HELLO_WORLD = "Hello" + " world";
+
+ private static String bar(final String s) {
+ return s;
+ }
+ public static void main(String[] args) {
+ System.out.println(bar(HELLO_WORLD));
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0002/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0002/X.js
new file mode 100644
index 0000000..7e4869e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0002/X.js
@@ -0,0 +1,6 @@
+package test0002;
+
+public @interface X {
+ String first();
+ String last();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0003/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0003/X.js
new file mode 100644
index 0000000..84ac705
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0003/X.js
@@ -0,0 +1,14 @@
+package test0003;
+
+@interface Name {
+ String first();
+ String last();
+}
+
+@interface Author {
+ Name value();
+}
+
+@Author(@Name(first="Joe", last="Hacker"))
+
+public class X {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0004/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0004/X.js
new file mode 100644
index 0000000..d62aebd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0004/X.js
@@ -0,0 +1,13 @@
+package test0004;
+
+@interface Name {
+ String first();
+ String last();
+}
+
+@interface Author {
+ Name value();
+}
+
+public @Author(@Name(first="Joe", last="Hacker"))
+class X {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0005/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0005/X.js
new file mode 100644
index 0000000..7791047
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0005/X.js
@@ -0,0 +1,17 @@
+package test0005;
+
+@interface Name {
+ String first() default "Joe";
+ String last() default "Smith";
+ int age();
+}
+
+@interface Author {
+ Name value();
+}
+
+@interface Retention {
+}
+
+@Retention public @Author(@Name(first="Joe", last="Hacker", age=32))
+class X {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0006/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0006/X.js
new file mode 100644
index 0000000..16920e5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0006/X.js
@@ -0,0 +1,17 @@
+@Retention package test0006;
+
+@interface Name {
+ String first() default "Joe";
+ String last() default "Smith";
+ int age();
+}
+
+@interface Author {
+ Name value();
+}
+
+@interface Retention {
+}
+
+@Retention() @Author(@Name(first="Joe", last="Hacker", age=32))
+class X {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0007/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0007/X.js
new file mode 100644
index 0000000..5d27cc8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0007/X.js
@@ -0,0 +1,14 @@
+package test0007;
+
+import java.util.*;
+import static java.io.File.*;
+
+public class X {
+ Map<String, String> foo() {
+ return null;
+ }
+
+ char bar() {
+ return separatorChar;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0008/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0008/X.js
new file mode 100644
index 0000000..0c46a1a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0008/X.js
@@ -0,0 +1,14 @@
+package test0008;
+
+import java.util.*;
+import static java.io.File.*;
+
+public class X {
+ Map<String, String> foo() {
+ return null;
+ }
+
+ char bar() {
+ return separatorChar;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0009/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0009/X.js
new file mode 100644
index 0000000..ff75bcc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0009/X.js
@@ -0,0 +1,8 @@
+package test0009;
+
+public class X {
+
+ public static void main(String[] args) {
+ for (String s : args) {System.out.println(s);}
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0010/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0010/X.js
new file mode 100644
index 0000000..2bbc5b2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0010/X.js
@@ -0,0 +1,11 @@
+package test0010;
+
+@interface Foo {
+}
+
+public class X {
+
+ public static void main(String[] args) {
+ for (@Foo final String s : args) {System.out.println(s);}
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0011/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0011/X.js
new file mode 100644
index 0000000..87a912a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0011/X.js
@@ -0,0 +1,11 @@
+package test0011;
+
+@interface Foo {
+}
+
+public class X {
+
+ public void bar(String[][] args) {
+ for (@Foo final String s[] : args) {System.out.println(s);}
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0012/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0012/X.js
new file mode 100644
index 0000000..87edab2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0012/X.js
@@ -0,0 +1,10 @@
+package test0012;
+
+@interface Foo {
+}
+
+public class X {
+
+ public void bar(@Foo final String[][]... args) {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0013/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0013/X.js
new file mode 100644
index 0000000..b79302b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0013/X.js
@@ -0,0 +1,8 @@
+package test0013;
+
+interface Convertible<T> {
+ T convert();
+}
+
+public class X<A extends Convertible<B>, B extends Convertible<A>> {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0014/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0014/X.js
new file mode 100644
index 0000000..a2d4d7f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0014/X.js
@@ -0,0 +1,8 @@
+package test0014;
+
+interface Convertible<T> {
+ T convert();
+}
+
+public class X<A extends Convertible<Convertible<A>>> {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0015/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0015/X.js
new file mode 100644
index 0000000..e955f3d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0015/X.js
@@ -0,0 +1,4 @@
+package test0015;
+
+public class X<A extends Object & java.io.Serializable & Comparable<?>> {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0016/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0016/X.js
new file mode 100644
index 0000000..1c34ad2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0016/X.js
@@ -0,0 +1,82 @@
+package test0016;
+
+class Seq<E> {
+ E head;
+ Seq<E> tail;
+ Seq() {
+ this(null, null);
+ }
+ boolean isEmpty() {
+ return this.tail == null;
+ }
+ Seq(E head, Seq<E> tail) {
+ this.head = head;
+ this.tail = tail;
+ }
+ <T> Seq<Pair<E,T>> zip(Seq<T> that) {
+ if (this.isEmpty() || that.isEmpty())
+ return new Seq<Pair<E,T>>();
+ else
+ return new Seq<Pair<E,T>>(
+ new Pair<E,T>(this.head, that.head),
+ this.tail.zip(that.tail));
+ }
+ @Override
+ public String toString() {
+ StringBuffer buffer = new StringBuffer();
+ if (head != null) {
+ buffer.append(head);
+ }
+ if (tail != null) {
+ buffer.append(tail);
+ }
+ return String.valueOf(buffer);
+ }
+ public class Zipper<T> {
+ Seq<Pair<E,T>> zip(Seq<T> that) {
+ if (Seq.this.isEmpty() || that.isEmpty())
+ return new Seq<Pair<E,T>>();
+ else
+ return new Seq<Pair<E,T>>(
+ new Pair<E,T>(Seq.this.head, that.head),
+ Seq.this.tail.zip(that.tail));
+ }
+ }
+}
+class Pair<A, B> {
+ A fst;
+ B snd;
+
+ Pair(A a, B b) {
+ this.fst = a;
+ this.snd = b;
+ }
+ @Override
+ public String toString() {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("(");
+ buffer.append(fst);
+ buffer.append(", ");
+ buffer.append(snd);
+ buffer.append(")");
+ return String.valueOf(buffer);
+ }
+ @Override
+ public boolean equals(Object other) {
+ return other instanceof Pair &&
+ equals(fst, ((Pair)other).fst) &&
+ equals(snd, ((Pair)other).snd);
+ }
+ private boolean equals(Object x, Object y) {
+ return x == null && y == null || x != null && x.equals(y);
+ }
+}
+public class X {
+ public static void main(String[] args) {
+ Seq<String> strs = new Seq<String>("a", new Seq<String>("b", new Seq<String>()));
+ Seq<Number> nums = new Seq<Number>(new Integer(1), new Seq<Number>(new Double(1.5), new Seq<Number>()));
+ Seq<String>.Zipper<Number> zipper = strs.new Zipper<Number>();
+ Seq<Pair<String,Number>> combined = zipper.zip(nums);
+ System.out.println(combined);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0017/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0017/X.js
new file mode 100644
index 0000000..955412c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0017/X.js
@@ -0,0 +1,30 @@
+package test0017;
+
+class A<E> {
+ E e;
+
+ A(E e) {
+ this.e = e;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(this.e);
+ }
+ class B<T> {
+ T t;
+ B(T t) {
+ this.t = t;
+ }
+ @Override
+ public String toString() {
+ return String.valueOf(this.t);
+ }
+ }
+}
+public class X {
+ public static void main(String[] args) {
+ test0017.A<String>.B<Integer> o = new test0017.A<String>("Hello").new B<Integer>(new Integer(1));
+ System.out.println(o);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0018/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0018/X.js
new file mode 100644
index 0000000..ead3a18
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0018/X.js
@@ -0,0 +1,41 @@
+package test0018;
+
+class A<E> {
+ E e;
+
+ A(E e) {
+ this.e = e;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(this.e);
+ }
+ class B {
+ Integer t;
+ B(Integer t) {
+ this.t = t;
+ }
+ @Override
+ public String toString() {
+ return String.valueOf(this.t);
+ }
+
+ class C<Z> {
+ Z z;
+ C(Z z) {
+ this.z = z;
+ }
+ @Override
+ public String toString() {
+ return String.valueOf(this.z);
+ }
+ }
+ }
+}
+public class X {
+ public static void main(String[] args) {
+ test0018.A<String>.B.C<Float> o = new test0018.A<String>("Hello").new B(new Integer(1)).new C<Float>(new Float(1.2f));
+ System.out.println(o);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0019/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0019/X.js
new file mode 100644
index 0000000..4caf36b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0019/X.js
@@ -0,0 +1,41 @@
+package test0019;
+
+class A<E> {
+ E e;
+
+ A(E e) {
+ this.e = e;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(this.e);
+ }
+ class B<T> {
+ T t;
+ B(T t) {
+ this.t = t;
+ }
+ @Override
+ public String toString() {
+ return String.valueOf(this.t);
+ }
+
+ class C {
+ Float z;
+ C(Float z) {
+ this.z = z;
+ }
+ @Override
+ public String toString() {
+ return String.valueOf(this.z);
+ }
+ }
+ }
+}
+public class X {
+ public static void main(String[] args) {
+ test0019.A<String>.B<Integer>.C o = new test0019.A<String>("Hello").new B<Integer>(new Integer(1)).new C(new Float(1.2f));
+ System.out.println(o);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0020/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0020/X.js
new file mode 100644
index 0000000..17dae31
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0020/X.js
@@ -0,0 +1,7 @@
+package test0020;
+
+public class X<E> {
+
+ public void foo(X<?> x) {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0021/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0021/X.js
new file mode 100644
index 0000000..66d6e3a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0021/X.js
@@ -0,0 +1,7 @@
+package test0021;
+
+public class X<E> {
+
+ public void foo(X<? extends E> x) {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0022/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0022/X.js
new file mode 100644
index 0000000..6de71df
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0022/X.js
@@ -0,0 +1,7 @@
+package test0022;
+
+public class X<E> {
+
+ public void foo(X<? super E> x) {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0023/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0023/X.js
new file mode 100644
index 0000000..ba7e8ab
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0023/X.js
@@ -0,0 +1,82 @@
+package test0023;
+
+class Seq<E> {
+ E head;
+ Seq<E> tail;
+ Seq() {
+ this(null, null);
+ }
+ boolean isEmpty() {
+ return this.tail == null;
+ }
+ Seq(E head, Seq<E> tail) {
+ this.head = head;
+ this.tail = tail;
+ }
+ <T> Seq<Pair<E,T>> zip(Seq<T> that) {
+ if (this.isEmpty() || that.isEmpty())
+ return new Seq<Pair<E,T>>();
+ else
+ return new Seq<Pair<E,T>>(
+ new Pair<E,T>(this.head, that.head),
+ this.tail.zip(that.tail));
+ }
+ @Override
+ public String toString() {
+ StringBuffer buffer = new StringBuffer();
+ if (head != null) {
+ buffer.append(head);
+ }
+ if (tail != null) {
+ buffer.append(tail);
+ }
+ return String.valueOf(buffer);
+ }
+ public class Zipper<T> {
+ Seq<Pair<E,T>> zip(Seq<T> that) {
+ if (Seq.this.isEmpty() || that.isEmpty())
+ return new Seq<Pair<E,T>>();
+ else
+ return new Seq<Pair<E,T>>(
+ new Pair<E,T>(Seq.this.head, that.head),
+ Seq.this.tail.zip(that.tail));
+ }
+ }
+}
+class Pair<A, B> {
+ A fst;
+ B snd;
+
+ Pair(A a, B b) {
+ this.fst = a;
+ this.snd = b;
+ }
+ @Override
+ public String toString() {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("(");
+ buffer.append(fst);
+ buffer.append(", ");
+ buffer.append(snd);
+ buffer.append(")");
+ return String.valueOf(buffer);
+ }
+ @Override
+ public boolean equals(Object other) {
+ return other instanceof Pair &&
+ equals(fst, ((Pair)other).fst) &&
+ equals(snd, ((Pair)other).snd);
+ }
+ private boolean equals(Object x, Object y) {
+ return x == null && y == null || x != null && x.equals(y);
+ }
+}
+public class X {
+ public static void main(String[] args) {
+ Seq<String> strs = new Seq<String>("a", new Seq<String>("b", new Seq<String>()));
+ Seq<Number> nums = new Seq<Number>(new Integer(1), new Seq<Number>(new Double(1.5), new Seq<Number>()));
+ Seq<String>.Zipper<Number> zipper = strs.new Zipper<Number>();
+ Seq<Pair<String,Number>> combined = zipper.zip(nums);
+ System.out.println(combined);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0024/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0024/X.js
new file mode 100644
index 0000000..96b1f22
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0024/X.js
@@ -0,0 +1,12 @@
+package test0024;
+
+public class X<E> {
+
+ <E> X() {
+ }
+
+ public static void main(String[] args) {
+ X<String> x = new <String> X<String>();
+ System.out.println(x);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0025/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0025/X.js
new file mode 100644
index 0000000..b7b2aff
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0025/X.js
@@ -0,0 +1,11 @@
+package test0025;
+
+public class X<E> {
+
+ <E> X(E e) {
+ <E> this();
+ }
+
+ <E> X() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0026/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0026/X.js
new file mode 100644
index 0000000..44ea1a6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0026/X.js
@@ -0,0 +1,39 @@
+package test0026;
+
+public enum X {
+ PLUS {
+ @Override
+ double eval(double x, double y) { return x + y; }
+ } // comment
+ ,
+
+ MINUS {
+ @Override
+ double eval(double x, double y) { return x - y; }
+ },
+
+ TIMES {
+ @Override
+ double eval(double x, double y) { return x * y; }
+ },
+
+ DIVIDED_BY {
+ @Override
+ double eval(double x, double y) { return x / y; }
+ };
+
+ // Perform the arithmetic X represented by this constant
+ abstract double eval(double x, double y);
+
+ public static void main(String args[]) {
+ if (args.length < 2) {
+ System.out.println("Usage: X <double> <double>");
+ return;
+ }
+ double x = Double.parseDouble(args[0]);
+ double y = Double.parseDouble(args[1]);
+
+ for (X op : X.values())
+ System.out.println(x + " " + op + " " + y + " = " + op.eval(x, y));
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0027/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0027/X.js
new file mode 100644
index 0000000..37968e0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0027/X.js
@@ -0,0 +1,11 @@
+package test0027;
+
+public enum X {
+ PENNY(1), NICKEL(5), DIME(10), QUARTER(25);
+
+ X(int val) { this.val = val; }
+
+ private final int val;
+
+ public int val() { return val; }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0028/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0028/X.js
new file mode 100644
index 0000000..909872c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0028/X.js
@@ -0,0 +1,25 @@
+package test0028;
+
+public abstract class X {
+
+ void foo(String[] args) {
+ if (args.length < 2) {
+ System.out.println("Usage: X <double> <double>");
+ return;
+ }
+ double x = Double.parseDouble(args[0]);
+ double y = Double.parseDouble(args[1]);
+
+ for (X op : X.values())
+ System.out.println(x + " " + op + " " + y + " = " + op.eval(x, y));
+ }
+
+ // Perform the arithmetic X represented by this constant
+ abstract double bar(double x, double y);
+
+ static X[] values() {
+ return null;
+ }
+
+ abstract double eval(double x, double y);
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0029/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0029/X.js
new file mode 100644
index 0000000..3ffc867
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0029/X.js
@@ -0,0 +1,28 @@
+package test0029;
+
+import java.util.Iterator;
+
+interface Predicate<T> {
+ boolean is(T t);
+}
+
+interface List<T> {
+ List<T> select(Predicate<T> p);
+}
+
+class X<T> implements List<T>, Iterable<T> {
+ public List<T> select(Predicate<T> p) {
+ X<T> result = new X<T>();
+ for (T t : this) {
+ if (p.is(t))
+ result.add(t);
+ }
+ return result;
+ }
+
+ public Iterator<T> iterator() {
+ return null;
+ }
+ void add(T t) {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0030/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0030/X.js
new file mode 100644
index 0000000..d01ab49
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0030/X.js
@@ -0,0 +1,11 @@
+package test0030;
+
+public class X<T> {
+
+ public X(int i) {
+ <T>this();
+ }
+
+ public <T> X() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0031/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0031/X.js
new file mode 100644
index 0000000..8693193
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0031/X.js
@@ -0,0 +1,28 @@
+package test0031;
+
+public class X {
+ public static class A {
+ public class A1 {
+ public int foo() {
+ return 1;
+ }
+ }
+ public class A2 {
+ }
+ public int foo() {
+ return 2;
+ }
+ }
+}
+class F {
+ public int goo(int param0) {
+ class C extends X.A {
+ A1 b;
+ @Override
+ public int foo() {
+ return 3;
+ }
+ }
+ return 4;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0032/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0032/X.js
new file mode 100644
index 0000000..72cba48
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0032/X.js
@@ -0,0 +1,7 @@
+package test0032;
+
+interface C<T> {
+}
+
+public abstract class X<T, U> implements C<T> {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0033/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0033/X.js
new file mode 100644
index 0000000..dbfccb1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0033/X.js
@@ -0,0 +1,6 @@
+package test0033;
+
+interface X {
+ enum Location {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0034/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0034/X.js
new file mode 100644
index 0000000..a582ce4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0034/X.js
@@ -0,0 +1,12 @@
+package test0034;
+
+enum Bar {
+ CONSTANT
+}
+
+@interface Foo {
+ Bar value();
+}
+
+public @Foo(Bar.CONSTANT) class X {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0035/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0035/X.js
new file mode 100644
index 0000000..d3bae01
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0035/X.js
@@ -0,0 +1,3 @@
+package test0035;
+
+public enum X {ONE, TWO, THREE; } \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0036/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0036/X.js
new file mode 100644
index 0000000..1bc427f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0036/X.js
@@ -0,0 +1,11 @@
+package test0036;
+
+public class X<T> {
+
+ public X() {
+ this.<T>foo();
+ }
+
+ public <T> void foo() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0037/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0037/X.js
new file mode 100644
index 0000000..cf8bc3f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0037/X.js
@@ -0,0 +1,5 @@
+package test0037;
+
+public abstract class X<T,U> {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0038/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0038/X.js
new file mode 100644
index 0000000..ae13f52
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0038/X.js
@@ -0,0 +1,12 @@
+package test0038;
+
+public class X<T> {
+ T x;
+ T get(){
+ X<T> s= this;
+ return x;
+ }
+ void set(T o1){
+ x = o1;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0039/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0039/X.js
new file mode 100644
index 0000000..aa697fe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0039/X.js
@@ -0,0 +1,18 @@
+package test0039;
+
+import static test0039.Z.*;
+
+enum Z {
+ A, B, C, D
+}
+@interface Foo {
+ Z[] value();
+}
+@interface Bar {
+ Z value();
+}
+@Foo({A, B, C, D})
+@Bar(Z.B)
+public @interface X {
+ String[] bar();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0040/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0040/X.js
new file mode 100644
index 0000000..b7fbf1f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0040/X.js
@@ -0,0 +1,7 @@
+package test0040;
+
+public class X {
+ <T> T foo(){
+ return null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0041/Action.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0041/Action.js
new file mode 100644
index 0000000..7869941
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0041/Action.js
@@ -0,0 +1,3 @@
+@interface Action {
+ Forward[] forwards();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0041/Controller.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0041/Controller.js
new file mode 100644
index 0000000..349fcc1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0041/Controller.js
@@ -0,0 +1 @@
+@interface Controller {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0041/Forward.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0041/Forward.js
new file mode 100644
index 0000000..03919c6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0041/Forward.js
@@ -0,0 +1,4 @@
+@interface Forward {
+ String name();
+ String path();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0041/ViewProperties.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0041/ViewProperties.js
new file mode 100644
index 0000000..52148a8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0041/ViewProperties.js
@@ -0,0 +1,3 @@
+@interface ViewProperties {
+ String[] val();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0041/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0041/X.js
new file mode 100644
index 0000000..c38e7a9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0041/X.js
@@ -0,0 +1,50 @@
+package test0041;
+
+class PageFlowController {}
+
+class T {
+ T(String s) {}
+}
+/**
+ * This is the default controller for a blank web application.
+ */
+@test0041.Controller
+@test0041.ViewProperties(
+ val = {
+ "<!-- This data is auto-generated. Hand-editing this section is not recommended. -->",
+ "<view-properties>",
+ "<pageflow-object id='action:begin.do'>",
+ " <property value='60' name='x'/>",
+ " <property value='80' name='y'/>",
+ "</pageflow-object>",
+ "<pageflow-object id='forward:path#index#index.jsp#@action:begin.do@'>",
+ " <property value='96,130,130,164' name='elbowsX'/>",
+ " <property value='72,72,72,72' name='elbowsY'/>",
+ " <property value='East_1' name='fromPort'/>",
+ " <property value='West_1' name='toPort'/>",
+ " <property value='index' name='label'/>",
+ "</pageflow-object>",
+ "<pageflow-object id='page:index.jsp'>",
+ " <property value='200' name='x'/>",
+ " <property value='80' name='y'/>",
+ "</pageflow-object>",
+ "<pageflow-object id='page:error.jsp'>",
+ " <property value='60' name='x'/>",
+ " <property value='180' name='y'/>",
+ "</pageflow-object>",
+ "</view-properties>"
+ }
+ )
+public class X
+ extends PageFlowController
+{
+ @test0041.Action(
+ forwards={
+ @test0041.Forward(name="success", path="index.jsp")
+ }
+ )
+ protected T begin()
+ {
+ return new T("success");
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0042/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0042/X.js
new file mode 100644
index 0000000..176659a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0042/X.js
@@ -0,0 +1,7 @@
+package test0042;
+
+public class X {
+ <T> T[] foo(){
+ return null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0043/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0043/X.js
new file mode 100644
index 0000000..b8c4aca
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0043/X.js
@@ -0,0 +1,5 @@
+package test0043;
+
+public class X<T> {
+ void foo(T t) {}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0044/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0044/X.js
new file mode 100644
index 0000000..d25d4da
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0044/X.js
@@ -0,0 +1,5 @@
+package test0044;
+
+public abstract class X {
+ abstract <Z> void foo(Z z);
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0045/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0045/X.js
new file mode 100644
index 0000000..94b52a0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0045/X.js
@@ -0,0 +1,14 @@
+package test0045;
+
+class B {
+ <Z> void foo(Z z) {
+ System.out.println(z);
+ }
+}
+
+public class X {
+ public static void main(String[] args) {
+ B b = new B();
+ b.<String>foo("SUCCESS");
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0046/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0046/X.js
new file mode 100644
index 0000000..52811e3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0046/X.js
@@ -0,0 +1,8 @@
+package test0046;
+
+class B<T> {
+}
+
+public class X extends B<String> {
+ B<Integer> val;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0047/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0047/X.js
new file mode 100644
index 0000000..14d7e09
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0047/X.js
@@ -0,0 +1,12 @@
+package test0047;
+
+public enum X {
+ TOTO ;
+
+ private static final long[] overflows = {
+ 0, // unused
+ Long.MAX_VALUE / 1000,
+ Long.MAX_VALUE / (1000 * 1000),
+ Long.MAX_VALUE / (1000 * 1000 * 1000)
+ };
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0048/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0048/X.js
new file mode 100644
index 0000000..a2bce5c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0048/X.js
@@ -0,0 +1,7 @@
+package test0048;
+
+enum X { GREEN(0, 1), RED();
+
+X(int i, int j) {}
+X() {}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0049/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0049/X.js
new file mode 100644
index 0000000..00404fa
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0049/X.js
@@ -0,0 +1,7 @@
+package test0049;
+
+enum X { GREEN(0, 1), RED;
+
+X(int i, int j) {}
+X() {}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0050/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0050/X.js
new file mode 100644
index 0000000..60d9373
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0050/X.js
@@ -0,0 +1,7 @@
+package test0050;
+
+public class X {
+
+ public void foo(String[]...i[]) {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0051/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0051/X.js
new file mode 100644
index 0000000..b6f7383
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0051/X.js
@@ -0,0 +1,7 @@
+package test0051;
+
+public class X {
+
+ public void foo(String[] ... i) {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0052/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0052/X.js
new file mode 100644
index 0000000..3738bb1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0052/X.js
@@ -0,0 +1,7 @@
+package test0052;
+
+class X {
+ public @interface E {
+ String val();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0053/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0053/X.js
new file mode 100644
index 0000000..cc3e38a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0053/X.js
@@ -0,0 +1,8 @@
+package test0053;
+
+/**
+ * test
+ */
+public @interface X {
+ int val() default 1;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0054/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0054/X.js
new file mode 100644
index 0000000..7090259
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0054/X.js
@@ -0,0 +1,7 @@
+package test0054;
+
+/**
+ * test
+ */
+public enum X {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0055/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0055/X.js
new file mode 100644
index 0000000..4522afc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0055/X.js
@@ -0,0 +1,8 @@
+package test0055;
+
+/**
+ * test
+ */
+@interface X {
+ int val() default 1;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0056/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0056/X.js
new file mode 100644
index 0000000..d0a9b74
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0056/X.js
@@ -0,0 +1,15 @@
+package test0056;
+
+public enum X {
+
+ BLEU(){
+ void foo() {}},
+ BLANC,
+ ROUGE;
+
+ int i = 0;
+ void foo(int... i) {
+ new Object() {}; //
+ Zork1 z;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0057/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0057/X.js
new file mode 100644
index 0000000..d5b2a31
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0057/X.js
@@ -0,0 +1,4 @@
+package test0057;
+
+public enum X {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0058/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0058/X.js
new file mode 100644
index 0000000..e9410de
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0058/X.js
@@ -0,0 +1,9 @@
+package test0058;
+
+@Jpf.Controller(
+ catches={
+ @Jpf.Catch(type=java.lang.Exception.class, method="handleException"),
+ @Jpf.Catch(type=PageFlowException.class, method="handlePageFlowException")
+ }
+ )
+ public class X {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0059/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0059/X.js
new file mode 100644
index 0000000..e9d4158
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0059/X.js
@@ -0,0 +1,23 @@
+package test0059;
+
+public class X {
+ public static final String val = "foo";
+
+ public static void main(String[] args) {
+ for (Test t : Test.values()) {
+ System.out.println(t.name());
+ }
+ }
+}
+enum Test {
+ VAL_A;
+
+ private static final String VAL_A_LABEL;
+
+ static {
+ VAL_A_LABEL = X.val;
+ }
+}
+
+
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0063/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0063/X.js
new file mode 100644
index 0000000..a1e2de9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0063/X.js
@@ -0,0 +1,13 @@
+package test0063;
+
+import java.util.List;
+
+public class X<T> {
+
+ Object foo() {
+ return new X<String>();
+ }
+
+ public void bar(List<? extends X<?>> c) {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0064/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0064/X.js
new file mode 100644
index 0000000..44f1812
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0064/X.js
@@ -0,0 +1,13 @@
+package test0064;
+
+import java.util.List;
+
+public class X<T, U> {
+
+ Object foo() {
+ return new X<String, Integer>();
+ }
+
+ public void bar(List<? extends X<?,?>> c) {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0065/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0065/X.js
new file mode 100644
index 0000000..1641384
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0065/X.js
@@ -0,0 +1,13 @@
+package test0065;
+
+import java.util.List;
+
+public class X<T, U extends List<?>> {
+
+ Object foo() {
+ return new X<String, List<?>>();
+ }
+
+ public void bar(List<? extends X<?, ?>> c) {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0067/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0067/X.js
new file mode 100644
index 0000000..cba6dff
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0067/X.js
@@ -0,0 +1,5 @@
+package test0067;
+
+public class X {
+ private void foo(Class<? extends Object> class1) {}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0068/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0068/X.js
new file mode 100644
index 0000000..6eedfa9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0068/X.js
@@ -0,0 +1,5 @@
+package test0068;
+
+public class X {
+ private void foo(Class<? super Object> class1) {}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0069/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0069/X.js
new file mode 100644
index 0000000..89cc259
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0069/X.js
@@ -0,0 +1,12 @@
+package test0069;
+
+class Outer<A> {
+ class Inner<B> {
+ }
+}
+
+public class X {
+ void foo() {
+ test0069.Outer<String>.Inner<Integer> in = new Outer<String>().new Inner<Integer>();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0070/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0070/X.js
new file mode 100644
index 0000000..34eee51
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0070/X.js
@@ -0,0 +1,12 @@
+package test0070;
+
+class Outer<A> {
+ class Inner<C> {
+ }
+}
+
+public class X {
+ void foo() {
+ Outer<String>.Inner<Number> in = new Outer<String>().new Inner<Number>();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0071/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0071/X.js
new file mode 100644
index 0000000..b3074d4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0071/X.js
@@ -0,0 +1,5 @@
+package test0071;
+
+public class X {
+ <E extends Object> void m(E e) {}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0072/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0072/X.js
new file mode 100644
index 0000000..78e7fbb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0072/X.js
@@ -0,0 +1,52 @@
+package test0072;
+
+public class X {
+
+ static {
+ int var1 = 0;
+ System.out.println(var1);
+ }
+
+ {
+ int var2 = 0;
+ System.out.println(var2);
+ }
+
+ public int var3;
+
+ public void foo() {
+ int var4;
+ }
+
+ public Object bar() {
+ return new Object() {
+ public void foo2() {
+ int var5;
+ }
+ };
+ }
+
+ public int bar2() {
+ class C {
+ int var6;
+
+ public void foo3() {
+ int var7;
+ }
+ };
+ return new C().var6;
+ }
+
+ public X() {
+ int var8;
+ }
+
+ public void bar3(int var9) {
+ int[] var10 = new int[] {};
+ for (int var11 : var10) {
+ }
+ }
+
+ public X(Object var12) {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0073/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0073/X.js
new file mode 100644
index 0000000..a7528e4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0073/X.js
@@ -0,0 +1,10 @@
+package test0073;
+
+import java.util.List;
+
+public class X {
+
+ List<String> foo() {
+ return null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0074/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0074/X.js
new file mode 100644
index 0000000..6e2215d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0074/X.js
@@ -0,0 +1,8 @@
+package test0074;
+
+public class X {
+
+ java.util.List<String> foo() {
+ return null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0076/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0076/X.js
new file mode 100644
index 0000000..df57c16
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0076/X.js
@@ -0,0 +1,5 @@
+package test0076;
+import java.util.Map;
+public class X {
+ private Map<String, Double>[][] fScoreTable = new Map[10];
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0077/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0077/X.js
new file mode 100644
index 0000000..b44d0c3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0077/X.js
@@ -0,0 +1,4 @@
+package test0077;
+public class X {
+ private java.util.Map<String, Double>[][] fScoreTable = new java.util.Map[10];
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0081/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0081/X.js
new file mode 100644
index 0000000..3d12195
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0081/X.js
@@ -0,0 +1,13 @@
+package test0081;
+
+class Y<T> {
+ <T> Class foo(T t) {
+ return t.getClass();
+ }
+}
+public class X {
+
+ public static void main(String[] args) {
+ Class c = new Y().foo(null);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0082/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0082/X.js
new file mode 100644
index 0000000..8bc9dfe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0082/X.js
@@ -0,0 +1,11 @@
+package test0082;
+
+class Gen<X> {
+ class Inn {
+ }
+
+ Gen<String> v1;
+ Gen<String>.Inn v2;
+ Gen v3;
+ Gen.Inn v4;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0083/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0083/X.js
new file mode 100644
index 0000000..122af96
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0083/X.js
@@ -0,0 +1,10 @@
+package test0083;
+
+import java.util.List;
+
+public class X<T> {
+ List<Integer> list1;
+ List<Number> list2;
+ List<? extends Number> list3;
+ List<T> list4;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0084/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0084/X.js
new file mode 100644
index 0000000..4ebd760
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0084/X.js
@@ -0,0 +1,6 @@
+package test0084;
+
+public class X {
+ Integer a;
+ int b;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0085/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0085/X.js
new file mode 100644
index 0000000..6523b30
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0085/X.js
@@ -0,0 +1,6 @@
+package test0085;
+
+public class X {
+ <T> void foo(T t) {}
+ <Q> void bar(Q t) {}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0088/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0088/X.js
new file mode 100644
index 0000000..a0f6e9d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0088/X.js
@@ -0,0 +1,8 @@
+package test0088;
+
+public class X {
+ public <E> void foo(E param) {
+ E local= param;
+ foo(local);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0103/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0103/A.js
new file mode 100644
index 0000000..cf74ade
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0103/A.js
@@ -0,0 +1,15 @@
+package test0103;
+
+enum A {
+ ONE, TWO, THREE;
+
+ public static int foo(int i) {
+ return i;
+ }
+ public static int foo() {
+ return 0;
+ }
+ public static int foo(double d) {
+ return (int) d;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0103/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0103/X.js
new file mode 100644
index 0000000..351fff1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0103/X.js
@@ -0,0 +1,10 @@
+package test0103;
+
+import static test0103.A.ONE;
+import static test0103.A.foo;
+
+public class X {
+ Object o = ONE;
+
+ int i = foo();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0104/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0104/X.js
new file mode 100644
index 0000000..ac82518
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0104/X.js
@@ -0,0 +1,10 @@
+package test0104;
+
+import static test0104a.A.C;
+
+public class X {
+ public static void main(String[] args) {
+ System.out.println(C);
+ System.out.println(C());
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0104a/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0104a/A.js
new file mode 100644
index 0000000..5c4a692
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0104a/A.js
@@ -0,0 +1,9 @@
+package test0104a;
+
+public class A {
+
+ public static int C = 5;
+ public static int C() {
+ return C;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0137/Source.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0137/Source.js
new file mode 100644
index 0000000..9805428
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0137/Source.js
@@ -0,0 +1,5 @@
+package test0137;
+
+public class Source {
+ public static interface TestInterface<T>{}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0137/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0137/X.js
new file mode 100644
index 0000000..baf3691
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0137/X.js
@@ -0,0 +1,7 @@
+package test0137;
+
+public class X {
+ public void main(String[] args) {
+ Source.TestInterface<String> c;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0139/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0139/X.js
new file mode 100644
index 0000000..de08cf7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0139/X.js
@@ -0,0 +1,7 @@
+package test0139;
+
+public class X {
+ public void foo() {
+ test0139a.C<String> c= null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0139a/C.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0139a/C.js
new file mode 100644
index 0000000..f0c0b57
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0139a/C.js
@@ -0,0 +1,4 @@
+package test0139a;
+
+class C<T> {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0140/Annot.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0140/Annot.js
new file mode 100644
index 0000000..144c3ac
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0140/Annot.js
@@ -0,0 +1,4 @@
+package test0140;
+
+public @interface Annot {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0140/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0140/X.js
new file mode 100644
index 0000000..fe5b217
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0140/X.js
@@ -0,0 +1,5 @@
+package test0140;
+
+@Annot
+public enum X {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0147/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0147/X.js
new file mode 100644
index 0000000..5512411
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0147/X.js
@@ -0,0 +1,20 @@
+package test0147;
+
+import java.lang.Comparable;
+import java.util.Collection;
+import java.util.Iterator;
+
+public class X {
+ public static <T extends Object & Comparable<? super T>> T min(
+ Collection<? extends T> coll) {
+ Iterator<? extends T> i = coll.iterator();
+ T candidate = i.next();
+
+ while (i.hasNext()) {
+ T next = i.next();
+ if (next.compareTo(candidate) < 0)
+ candidate = next;
+ }
+ return candidate;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0153/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0153/X.js
new file mode 100644
index 0000000..2197e5b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0153/X.js
@@ -0,0 +1,10 @@
+package test0153;
+
+public class X {
+ int
+\ud800\udc05\ud800\udc04\ud800\udc03\ud800\udc02\ud800\udc01\ud800\udc00;
+ void foo() {
+ int
+\ud800\udc05\ud800\udc04\ud800\udc03\ud800\udc02\ud800\udc01\ud800\udc00;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0167/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0167/X.js
new file mode 100644
index 0000000..4c59c87
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0167/X.js
@@ -0,0 +1,27 @@
+package test0167;
+
+import java.lang.annotation.Target;
+import static java.lang.annotation.ElementType.*;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.*;
+import static test0167.Jpf.*;
+
+interface Jpf {
+ @Target(value=METHOD)
+ @Retention(value=RUNTIME)
+ public static @interface ExceptionHandler {}
+
+ @Target(value=ANNOTATION_TYPE)
+ @Retention(value=RUNTIME)
+ public static @interface Forward {}
+}
+
+public class X {
+
+ @Jpf.ExceptionHandler()
+ protected Forward newExceptionHandler1(Exception ex, String actionName,
+ String message, Object form)
+ {
+ return null;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0185/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0185/X.js
new file mode 100644
index 0000000..a91b784
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0185/X.js
@@ -0,0 +1,9 @@
+package test0185;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@SuppressWarnings("unchecked")
+public class X {
+ List<String> ls = new ArrayList();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0186/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0186/X.js
new file mode 100644
index 0000000..5e427f0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0186/X.js
@@ -0,0 +1,9 @@
+package test0186;
+
+import java.util.ArrayList;
+import java.util.List;
+
+//@SuppressWarnings("unchecked")
+public class X {
+ List<String> ls = new ArrayList();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0191/E.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0191/E.js
new file mode 100644
index 0000000..9858695
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0191/E.js
@@ -0,0 +1,62 @@
+package test0191;
+
+import java.io.*;
+import java.util.*;
+
+public class E<T, U extends Number> {
+ boolean bool= false;
+ char c= 0;
+ byte b= 0;
+ short s= 0;
+ int i= 0;
+ long l= 0;
+ float f= 0;
+ double d= 0;
+
+ Boolean bool_class= null;
+ Character c_class= null;
+ Byte b_class= null;
+ Short s_class= null;
+ Integer i_class= null;
+ Long l_class= null;
+ Float f_class= null;
+ Double d_class= null;
+
+ Object object= null;
+ Vector vector= null;
+ Socket socket= null;
+ Cloneable cloneable= null;
+ Collection collection= null;
+ Serializable serializable= null;
+ Object[] objectArr= null;
+ int[] int_arr= null;
+ long[] long_arr= null;
+ Vector[] vector_arr= null;
+ Collection[] collection_arr= null;
+ Object[][] objectArrArr= null;
+ Collection[][] collection_arrarr= null;
+ Vector[][] vector_arrarr= null;
+
+ Collection<String> collection_string= null;
+ Collection<Object> collection_object= null;
+ Collection<Number> collection_number= null;
+ Collection<Integer> collection_integer= null;
+ Collection<? extends Number> collection_upper_number= null;
+ Collection<? super Number> collection_lower_number= null;
+ Vector<Object> vector_object= null;
+ Vector<Number> vector_number= null;
+ Vector<Integer> vector_integer= null;
+ Vector<? extends Number> vector_upper_number= null;
+ Vector<? super Number> vector_lower_number= null;
+ Vector<? extends Exception> vector_upper_exception= null;
+ Vector<? super Exception> vector_lower_exception= null;
+
+ T t= null;
+ U u= null;
+ Vector<T> vector_t= null;
+ Vector<U> vector_u= null;
+ Vector<? extends T> vector_upper_t= null;
+ Vector<? extends U> vector_upper_u= null;
+ Vector<? super T> vector_lower_t= null;
+ Vector<? super U> vector_lower_u= null;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0191/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0191/X.js
new file mode 100644
index 0000000..d611e04
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0191/X.js
@@ -0,0 +1,8 @@
+package test0191;
+
+public class X<T, U extends Number> extends E<T, U> {
+ void foo() {
+ java.util.Vector<java.lang.Object> v =
+ (java.util.Vector<java.lang.Object>) collection_upper_number;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0230/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0230/Test.js
new file mode 100644
index 0000000..1a291f0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0230/Test.js
@@ -0,0 +1,12 @@
+package test0230;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.*;
+
+@Target({TYPE,METHOD})
+@Retention(RUNTIME)
+public @interface Test {
+ String value() default "";
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0230/Test2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0230/Test2.js
new file mode 100644
index 0000000..10e0577
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0230/Test2.js
@@ -0,0 +1,7 @@
+package test0230;
+
+@Test("SUCCESS")
+@Test("FAILED")
+public class Test2 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0230/Test3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0230/Test3.js
new file mode 100644
index 0000000..7fc2e4e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0230/Test3.js
@@ -0,0 +1,5 @@
+package test0230;
+
+public class Test3 extends Test2 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0231/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0231/Test.js
new file mode 100644
index 0000000..fdd00f1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0231/Test.js
@@ -0,0 +1,12 @@
+package test0231;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.*;
+
+@Target({TYPE,METHOD})
+@Retention(RUNTIME)
+public @interface Test {
+ String value() default "";
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0231/Test2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0231/Test2.js
new file mode 100644
index 0000000..e9b0276
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0231/Test2.js
@@ -0,0 +1,7 @@
+package test0231;
+
+@Test("SUCCESS")
+@Test("FAILED")
+public class Test2 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0231/Test3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0231/Test3.js
new file mode 100644
index 0000000..6ffa9bd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0231/Test3.js
@@ -0,0 +1,5 @@
+package test0231;
+
+public class Test3 extends Test2 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CreateMembers/src/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CreateMembers/src/A.js
new file mode 100644
index 0000000..7011ba4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CreateMembers/src/A.js
@@ -0,0 +1 @@
+var aVar; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CreateMembers/src/A2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CreateMembers/src/A2.js
new file mode 100644
index 0000000..7011ba4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CreateMembers/src/A2.js
@@ -0,0 +1 @@
+var aVar; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CreateMembers/src/Annot.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CreateMembers/src/Annot.js
new file mode 100644
index 0000000..e6bece5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CreateMembers/src/Annot.js
@@ -0,0 +1,3 @@
+public @interface Annot {
+ String foo();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CreateMembers/src/E.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CreateMembers/src/E.js
new file mode 100644
index 0000000..57c8bcd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CreateMembers/src/E.js
@@ -0,0 +1,4 @@
+public enum E {
+ E1, E2;
+ int j;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CreateMembers/src/E2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CreateMembers/src/E2.js
new file mode 100644
index 0000000..861b912
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CreateMembers/src/E2.js
@@ -0,0 +1,3 @@
+public enum E2 {
+ A, B, C
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CreateMembers/src/E3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CreateMembers/src/E3.js
new file mode 100644
index 0000000..1f22c39
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CreateMembers/src/E3.js
@@ -0,0 +1,3 @@
+public enum E3 {
+ A, B, C
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/src/testBug110576/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/src/testBug110576/Test.js
new file mode 100644
index 0000000..9723af4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/src/testBug110576/Test.js
@@ -0,0 +1,10 @@
+
+package pack;
+/**
+ * C'est un exemple de fichier contenant
+ * des caractères UTF-8: Noël même où çà?
+ * x
+ */
+class Test {
+}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/src/testBug66898/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/src/testBug66898/Test.js
new file mode 100644
index 0000000..b4f539b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/src/testBug66898/Test.js
@@ -0,0 +1,22 @@
+package testUTF8;
+/**
+ * <B>Farsi / Persian</B>: .???? ???? ?????????? ???????? ?????????? ?????? ???????? ??????????
+ * <B>Russian:</B> ?? ?????????? ?????? ??????-?????? ??????????? ????, ???? ?????????????????? ??????????????!
+ * <B>Hungarian:</B> rv??zt??r?? t??k??rf??r??g??p.
+ * <B>Spanish:</B> El ping??ino Wenceslao hizo kil??metros bajo exhaustiva
+ * lluvia y fr??o, a??oraba a su querido cachorro.
+ * <B>French:</B> Les na??fs ??githales h??tifs pondant ?? No??l o?? il g??le sont
+ * s??rs d'??tre d????us et de voir leurs dr??les d'??ufs ab??m??s. </B>
+ * <B>Esperanto:</B> E??oano ??iu??a??de.
+ */
+public class Test {
+ public static void main(String[] args) {
+ System.out.println("Some sentences using UTF-8 encoded characters:");
+ System.out.println("Farsi / Persian</B>: .???? ???? ?????????? ???????? ?????????? ?????? ???????? ??????????");
+ System.out.println("Russian:</B> ?? ?????????? ?????? ??????-?????? ??????????? ????, ???? ?????????????????? ??????????????!");
+ System.out.println("Hungarian:</B> rv??zt??r?? t??k??rf??r??g??p.");
+ System.out.println("Spanish:</B> El ping??ino Wenceslao hizo kil??metros bajo exhaustiva lluvia y fr??o, a??oraba a su querido cachorro.");
+ System.out.println("French:</B> Les na??fs ??githales h??tifs pondant ?? No??l o?? il g??le sont s??rs d'??tre d????us et de voir leurs dr??les d'??ufs ab??m??s.");
+ System.out.println("Esperanto:</B> E??oano ??iu??a??de. ");
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/src/testBug66898b/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/src/testBug66898b/Test.js
new file mode 100644
index 0000000..b4f539b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/src/testBug66898b/Test.js
@@ -0,0 +1,22 @@
+package testUTF8;
+/**
+ * <B>Farsi / Persian</B>: .???? ???? ?????????? ???????? ?????????? ?????? ???????? ??????????
+ * <B>Russian:</B> ?? ?????????? ?????? ??????-?????? ??????????? ????, ???? ?????????????????? ??????????????!
+ * <B>Hungarian:</B> rv??zt??r?? t??k??rf??r??g??p.
+ * <B>Spanish:</B> El ping??ino Wenceslao hizo kil??metros bajo exhaustiva
+ * lluvia y fr??o, a??oraba a su querido cachorro.
+ * <B>French:</B> Les na??fs ??githales h??tifs pondant ?? No??l o?? il g??le sont
+ * s??rs d'??tre d????us et de voir leurs dr??les d'??ufs ab??m??s. </B>
+ * <B>Esperanto:</B> E??oano ??iu??a??de.
+ */
+public class Test {
+ public static void main(String[] args) {
+ System.out.println("Some sentences using UTF-8 encoded characters:");
+ System.out.println("Farsi / Persian</B>: .???? ???? ?????????? ???????? ?????????? ?????? ???????? ??????????");
+ System.out.println("Russian:</B> ?? ?????????? ?????? ??????-?????? ??????????? ????, ???? ?????????????????? ??????????????!");
+ System.out.println("Hungarian:</B> rv??zt??r?? t??k??rf??r??g??p.");
+ System.out.println("Spanish:</B> El ping??ino Wenceslao hizo kil??metros bajo exhaustiva lluvia y fr??o, a??oraba a su querido cachorro.");
+ System.out.println("French:</B> Les na??fs ??githales h??tifs pondant ?? No??l o?? il g??le sont s??rs d'??tre d????us et de voir leurs dr??les d'??ufs ab??m??s.");
+ System.out.println("Esperanto:</B> E??oano ??iu??a??de. ");
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/src/testUTF8/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/src/testUTF8/Test.js
new file mode 100644
index 0000000..26457ad
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/src/testUTF8/Test.js
@@ -0,0 +1,22 @@
+package testUTF8;
+/**
+ * <B>Farsi / Persian</B>: .من می توانم بدون احساس درد شيشه بخورم
+ * <B>Russian:</B> В чащах юга жил-был цитру? Да, но фальшивый кземплр!
+ * <B>Hungarian:</B> rvíztűrő tükörfúrógép.
+ * <B>Spanish:</B> El pingüino Wenceslao hizo kilómetros bajo exhaustiva
+ * lluvia y frío, añoraba a su querido cachorro.
+ * <B>French:</B> Les naïfs ægithales hâtifs pondant à Noël où il gèle sont
+ * sûrs d'être déçus et de voir leurs drôles d'œufs abîmés. </B>
+ * <B>Esperanto:</B> Eĥoano ĉiuĵaŭde.
+ */
+public class Test {
+ public static void main(String[] args) {
+ System.out.println("Some sentences using UTF-8 encoded characters:");
+ System.out.println("Farsi / Persian</B>: .من می توانم بدون احساس درد شيشه بخورم");
+ System.out.println("Russian:</B> В чащах юга жил-был цитру? Да, но фальшивый кземплр!");
+ System.out.println("Hungarian:</B> rvíztűrő tükörfúrógép.");
+ System.out.println("Spanish:</B> El pingüino Wenceslao hizo kilómetros bajo exhaustiva lluvia y frío, añoraba a su querido cachorro.");
+ System.out.println("French:</B> Les naïfs ægithales hâtifs pondant à Noël où il gèle sont sûrs d'être déçus et de voir leurs drôles d'œufs abîmés.");
+ System.out.println("Esperanto:</B> Eĥoano ĉiuĵaŭde. ");
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/src/testUTF8BOM/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/src/testUTF8BOM/Test.js
new file mode 100644
index 0000000..555d2a5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/src/testUTF8BOM/Test.js
@@ -0,0 +1,22 @@
+package testUTF8;
+/**
+ * <B>Farsi / Persian</B>: .من می توانم بدون احساس درد شيشه بخورم
+ * <B>Russian:</B> В чащах юга жил-был цитру? Да, но фальшивый кземплр!
+ * <B>Hungarian:</B> rvíztűrő tükörfúrógép.
+ * <B>Spanish:</B> El pingüino Wenceslao hizo kilómetros bajo exhaustiva
+ * lluvia y frío, añoraba a su querido cachorro.
+ * <B>French:</B> Les naïfs ægithales hâtifs pondant à Noël où il gèle sont
+ * sûrs d'être déçus et de voir leurs drôles d'œufs abîmés. </B>
+ * <B>Esperanto:</B> Eĥoano ĉiuĵaŭde.
+ */
+public class Test {
+ public static void main(String[] args) {
+ System.out.println("Some sentences using UTF-8 encoded characters:");
+ System.out.println("Farsi / Persian</B>: .من می توانم بدون احساس درد شيشه بخورم");
+ System.out.println("Russian:</B> В чащах юга жил-был цитру? Да, но фальшивый кземплр!");
+ System.out.println("Hungarian:</B> rvíztűrő tükörfúrógép.");
+ System.out.println("Spanish:</B> El pingüino Wenceslao hizo kilómetros bajo exhaustiva lluvia y frío, añoraba a su querido cachorro.");
+ System.out.println("French:</B> Les naïfs ægithales hâtifs pondant à Noël où il gèle sont sûrs d'être déçus et de voir leurs drôles d'œufs abîmés.");
+ System.out.println("Esperanto:</B> Eĥoano ĉiuĵaŭde. ");
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/testUTF8.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/testUTF8.jar
new file mode 100644
index 0000000..4bc370f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/testUTF8.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/testUTF8.zip b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/testUTF8.zip
new file mode 100644
index 0000000..9206e92
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/testUTF8.zip
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test001/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test001/A_in.js
new file mode 100644
index 0000000..c28318b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test001/A_in.js
@@ -0,0 +1,5 @@
+ function run() {
+ }
+
+ function foo() {
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test001/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test001/A_out.js
new file mode 100644
index 0000000..f8fb517
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test001/A_out.js
@@ -0,0 +1,4 @@
+function run() {
+}
+function foo() {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test002/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test002/A_in.js
new file mode 100644
index 0000000..83bafc2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test002/A_in.js
@@ -0,0 +1,4 @@
+function openFlashWin() {
+ var xPos = ((screen.availWidth - 675) / 2);
+ var yPos = ((screen.availHeight - 550) / 2);
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test002/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test002/A_out.js
new file mode 100644
index 0000000..83bafc2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test002/A_out.js
@@ -0,0 +1,4 @@
+function openFlashWin() {
+ var xPos = ((screen.availWidth - 675) / 2);
+ var yPos = ((screen.availHeight - 550) / 2);
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test003/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test003/A_in.js
new file mode 100644
index 0000000..e178f78
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test003/A_in.js
@@ -0,0 +1,8 @@
+// test003
+package p1.p2.test;
+
+import java.io.Serializable;
+import java.io.IOException;
+
+public abstract class A extends java.lang.Object implements Runnable, Cloneable, Serializable {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test003/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test003/A_out.js
new file mode 100644
index 0000000..c2963b4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test003/A_out.js
@@ -0,0 +1,10 @@
+// test003
+package p1.p2.test;
+import java.io.Serializable;
+import java.io.IOException;
+public abstract class A extends java.lang.Object
+ implements
+ Runnable,
+ Cloneable,
+ Serializable {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test004/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test004/A_in.js
new file mode 100644
index 0000000..0332fec
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test004/A_in.js
@@ -0,0 +1,8 @@
+// test004
+package p1.p2.test;
+
+import java.io.Serializable;
+import java.io.IOException;
+
+public abstract class A implements Runnable {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test004/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test004/A_out.js
new file mode 100644
index 0000000..e1ac603
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test004/A_out.js
@@ -0,0 +1,6 @@
+// test004
+package p1.p2.test;
+import java.io.Serializable;
+import java.io.IOException;
+public abstract class A implements Runnable {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test005/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test005/A_in.js
new file mode 100644
index 0000000..920b787
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test005/A_in.js
@@ -0,0 +1,8 @@
+// test005
+package p1.p2.test;
+
+import java.io.Serializable;
+import java.io.IOException;
+
+public abstract class A implements /* */ Runnable {
+} /* last comment: end of class A */ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test005/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test005/A_out.js
new file mode 100644
index 0000000..4ec0ea8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test005/A_out.js
@@ -0,0 +1,8 @@
+// test005
+package p1.p2.test;
+import java.io.Serializable;
+import java.io.IOException;
+public abstract class A
+ implements
+ /* */Runnable {
+} /* last comment: end of class A */ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test006/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test006/A_in.js
new file mode 100644
index 0000000..54e1c3a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test006/A_in.js
@@ -0,0 +1,10 @@
+// test006
+package p1.p2.test;
+
+import java.io.Serializable;
+import java.io.IOException;
+
+public abstract class A implements /* */ Runnable {
+public abstract class B implements /* */ Runnable {
+} /* last comment: end of member class A */
+} /* last comment: end of class A */ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test006/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test006/A_out.js
new file mode 100644
index 0000000..306d2ff
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test006/A_out.js
@@ -0,0 +1,12 @@
+// test006
+package p1.p2.test;
+import java.io.Serializable;
+import java.io.IOException;
+public abstract class A
+ implements
+ /* */Runnable {
+ public abstract class B
+ implements
+ /* */Runnable {
+ } /* last comment: end of member class A */
+} /* last comment: end of class A */ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test007/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test007/A_in.js
new file mode 100644
index 0000000..ec771a2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test007/A_in.js
@@ -0,0 +1,14 @@
+/**
+ * test007
+ *
+ */
+package /* test2 */ p1.p2./* */test;
+
+import java.io.Serializable;
+import java.io.IOException;
+
+/**
+ * Class javadoc comment
+ */
+public abstract /* */ class A extends java.lang.Object implements Runnable, Cloneable, Serializable {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test007/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test007/A_out.js
new file mode 100644
index 0000000..0b8e84e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test007/A_out.js
@@ -0,0 +1,16 @@
+/**
+ * test007
+ *
+ */
+package /* test2 */p1.p2./* */test;
+import java.io.Serializable;
+import java.io.IOException;
+/**
+ * Class javadoc comment
+ */
+public abstract/* */class A extends java.lang.Object
+ implements
+ Runnable,
+ Cloneable,
+ Serializable {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test008/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test008/A_in.js
new file mode 100644
index 0000000..5f7d3c3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test008/A_in.js
@@ -0,0 +1,6 @@
+// test008
+package p1.p2.test;
+import java.io.Serializable;
+import java.io.IOException;
+public abstract /* */ class A extends p1.p2.pfpfpfpfpfpfpfpfpfpfpfpfpfpfpfpfpfpfpfpfpfpfpfppffp.A implements Runnable, Cloneable, Serializable, Toto, Titi, Tata {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test008/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test008/A_out.js
new file mode 100644
index 0000000..f80d47d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test008/A_out.js
@@ -0,0 +1,15 @@
+// test008
+package p1.p2.test;
+import java.io.Serializable;
+import java.io.IOException;
+public abstract/* */class A
+ extends
+ p1.p2.pfpfpfpfpfpfpfpfpfpfpfpfpfpfpfpfpfpfpfpfpfpfpfppffp.A
+ implements
+ Runnable,
+ Cloneable,
+ Serializable,
+ Toto,
+ Titi,
+ Tata {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test009/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test009/A_in.js
new file mode 100644
index 0000000..7f30e7a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test009/A_in.js
@@ -0,0 +1,4 @@
+// test009
+ var CONST = 12; // CONST comment
+ var value = CONST; // value comment
+ var s = a; // s comment
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test009/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test009/A_out.js
new file mode 100644
index 0000000..2da7fa8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test009/A_out.js
@@ -0,0 +1,4 @@
+// test009
+var CONST = 12; // CONST comment
+var value = CONST; // value comment
+var s = a; // s comment
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test010/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test010/A_in.js
new file mode 100644
index 0000000..630a030
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test010/A_in.js
@@ -0,0 +1 @@
+var i; var j; var d; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test010/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test010/A_out.js
new file mode 100644
index 0000000..afad35b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test010/A_out.js
@@ -0,0 +1,3 @@
+var i;
+var j;
+var d; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test011/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test011/A_in.js
new file mode 100644
index 0000000..6f8bfe3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test011/A_in.js
@@ -0,0 +1,7 @@
+// test011
+package p1.p2.test;
+import java.io.Serializable;
+import java.io.IOException;
+public abstract /* */ class A extends p1.p2.fpfpfpfppffp.A implements Runnable, Cloneable, Serializable, Toto, Titi, Tata {
+int CONST;int value;long s;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test011/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test011/A_out.js
new file mode 100644
index 0000000..18124fc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test011/A_out.js
@@ -0,0 +1,16 @@
+// test011
+package p1.p2.test;
+import java.io.Serializable;
+import java.io.IOException;
+public abstract/* */class A extends p1.p2.fpfpfpfppffp.A
+ implements
+ Runnable,
+ Cloneable,
+ Serializable,
+ Toto,
+ Titi,
+ Tata {
+ int CONST;
+ int value;
+ long s;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test012/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test012/A_in.js
new file mode 100644
index 0000000..96b1562
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test012/A_in.js
@@ -0,0 +1,2 @@
+// test012
+var CONST;var value;var s;function foo(){}function A(){} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test012/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test012/A_out.js
new file mode 100644
index 0000000..212864a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test012/A_out.js
@@ -0,0 +1,8 @@
+// test012
+var CONST;
+var value;
+var s;
+function foo() {
+}
+function A() {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test013/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test013/A_in.js
new file mode 100644
index 0000000..d80e390
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test013/A_in.js
@@ -0,0 +1,4 @@
+// test013
+var value = /* */ true; // boolean
+var s = null; // test
+function foo( String_s1, int_l, final_java_lang_String_s2, a, b) {}function A( i) {var i = 0; i = 2;;;} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test013/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test013/A_out.js
new file mode 100644
index 0000000..caebb09
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test013/A_out.js
@@ -0,0 +1,10 @@
+// test013
+var value = /* */true; // boolean
+var s = null; // test
+function foo(String_s1, int_l,
+ final_java_lang_String_s2, a, b) {
+}
+function A(i) {
+ var i = 0;
+ i = 2;;;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test014/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test014/A_in.js
new file mode 100644
index 0000000..2fd3cfa
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test014/A_in.js
@@ -0,0 +1,6 @@
+// test014
+var value = /* */ true; // boolean
+var s = null; // test
+function foo(s1, l) {}function A( i) {var i = 0; i = 2;;;}
+var value = 0; // blabla
+var x; // test \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test014/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test014/A_out.js
new file mode 100644
index 0000000..d5f6cf1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test014/A_out.js
@@ -0,0 +1,11 @@
+// test014
+var value = /* */true; // boolean
+var s = null; // test
+function foo(s1, l) {
+}
+function A( i) {
+ var i = 0;
+ i = 2;;;
+}
+var value = 0; // blabla
+var X x; // test \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test015/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test015/A_in.js
new file mode 100644
index 0000000..16b1509
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test015/A_in.js
@@ -0,0 +1,8 @@
+// test015
+package p1.p2.test;
+import java.io.Serializable;
+import java.io.IOException;
+public abstract /* */ class A implements Serializable, Toto, Titi, Tata {
+Object s = null; // test
+A a; // test
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test015/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test015/A_out.js
new file mode 100644
index 0000000..41a1ddc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test015/A_out.js
@@ -0,0 +1,8 @@
+// test015
+package p1.p2.test;
+import java.io.Serializable;
+import java.io.IOException;
+public abstract/* */class A implements Serializable, Toto, Titi, Tata {
+ Object s = null; // test
+ A a; // test
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test016/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test016/A_in.js
new file mode 100644
index 0000000..c8dca06
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test016/A_in.js
@@ -0,0 +1,5 @@
+// test016
+public abstract class A extends p1.p2.fpfpfpfppffp.A implements Runnable, Cloneable, Serializable, Toto, Titi, Tata {
+Object[] s[] = null, o, s2[/* */] = null; // test
+A s3, o2, s4 = null; // test
+} // end of class
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test016/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test016/A_out.js
new file mode 100644
index 0000000..42f450e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test016/A_out.js
@@ -0,0 +1,12 @@
+// test016
+public abstract class A extends p1.p2.fpfpfpfppffp.A
+ implements
+ Runnable,
+ Cloneable,
+ Serializable,
+ Toto,
+ Titi,
+ Tata {
+ Object[] s[] = null, o, s2[/* */] = null; // test
+ A s3, o2, s4 = null; // test
+} // end of class
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test017/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test017/A_in.js
new file mode 100644
index 0000000..ddf8e06
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test017/A_in.js
@@ -0,0 +1,7 @@
+// test017
+public class A {
+String s2;
+ Object oooooooooooooooooooooooooooooooo = null, sssssssssssssssssssssssssssssssssssss; // toto
+int iiiiiiiiiiiiiiiiiiiii = 1, jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj = 2, kkkkkkkkkkkkk; // test
+String s;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test017/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test017/A_out.js
new file mode 100644
index 0000000..634e21d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test017/A_out.js
@@ -0,0 +1,9 @@
+// test017
+public class A {
+ String s2;
+ Object oooooooooooooooooooooooooooooooo = null,
+ sssssssssssssssssssssssssssssssssssss; // toto
+ int iiiiiiiiiiiiiiiiiiiii = 1,
+ jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj = 2, kkkkkkkkkkkkk; // test
+ String s;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test018/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test018/A_in.js
new file mode 100644
index 0000000..53aa056
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test018/A_in.js
@@ -0,0 +1,5 @@
+// test018
+public class A {
+ int oooooooooooo00000000000000000000000000000000000000000000000oooooooooooooooooooo = "125665332563256522ddddddddddddddd"; // toto
+String s;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test018/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test018/A_out.js
new file mode 100644
index 0000000..9cb8295
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test018/A_out.js
@@ -0,0 +1,5 @@
+// test018
+public class A {
+ int oooooooooooo00000000000000000000000000000000000000000000000oooooooooooooooooooo = "125665332563256522ddddddddddddddd"; // toto
+ String s;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test019/A_1_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test019/A_1_in.js
new file mode 100644
index 0000000..eb0a018
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test019/A_1_in.js
@@ -0,0 +1,5 @@
+// test019: use TAB
+public class A {
+protected synchronized void foo(final java.lang.String s1, long l) throws IOException,Exception{
+foo("Helloddddddddddddddddddddddddddddddddddddd", 121212121221212121212121);f("Helloddddddddddddddddddddddddddddddddddddd", 121212121221212121212121);fooooooobaaaaaaar("Helloddddddddddddddddddddddddddddddddddddd", 121212121221212121212121);
+}} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test019/A_1_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test019/A_1_out.js
new file mode 100644
index 0000000..41a9cfa
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test019/A_1_out.js
@@ -0,0 +1,12 @@
+// test019: use TAB
+public class A {
+ protected synchronized void foo(final java.lang.String s1, long l)
+ throws IOException, Exception {
+ foo("Helloddddddddddddddddddddddddddddddddddddd",
+ 121212121221212121212121);
+ f("Helloddddddddddddddddddddddddddddddddddddd",
+ 121212121221212121212121);
+ fooooooobaaaaaaar("Helloddddddddddddddddddddddddddddddddddddd",
+ 121212121221212121212121);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test019/A_2_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test019/A_2_in.js
new file mode 100644
index 0000000..0c06342
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test019/A_2_in.js
@@ -0,0 +1,4 @@
+// test019: using SPACE
+public class A {
+protected synchronized void foo(final java.lang.String s1, long l) throws IOException,Exception{
+foo("Helloddddddddddddddddddddddddddddddddddddd", 121212121221212121212121);f("Helloddddddddddddddddddddddddddddddddddddd", 121212121221212121212121);fooooooobaaaaaaar("Helloddddddddddddddddddddddddddddddddddddd", 121212121221212121212121);}} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test019/A_2_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test019/A_2_out.js
new file mode 100644
index 0000000..1523882
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test019/A_2_out.js
@@ -0,0 +1,12 @@
+// test019: using SPACE
+public class A {
+ protected synchronized void foo(final java.lang.String s1, long l)
+ throws IOException, Exception {
+ foo("Helloddddddddddddddddddddddddddddddddddddd",
+ 121212121221212121212121);
+ f("Helloddddddddddddddddddddddddddddddddddddd",
+ 121212121221212121212121);
+ fooooooobaaaaaaar("Helloddddddddddddddddddddddddddddddddddddd",
+ 121212121221212121212121);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test020/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test020/A_in.js
new file mode 100644
index 0000000..b449e25
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test020/A_in.js
@@ -0,0 +1,5 @@
+// test020
+public class A {
+protected synchronized String foo(final java.lang.String s1) throws IOException,Exception{
+foo(foo(foo(foo(foo(foo("Helloddddddddddddddddddddddddddddddddddddd"))))));
+}} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test020/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test020/A_out.js
new file mode 100644
index 0000000..82b4fd4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test020/A_out.js
@@ -0,0 +1,7 @@
+// test020
+public class A {
+ protected synchronized String foo(final java.lang.String s1)
+ throws IOException, Exception {
+ foo(foo(foo(foo(foo(foo("Helloddddddddddddddddddddddddddddddddddddd"))))));
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test021/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test021/A_in.js
new file mode 100644
index 0000000..0be6902
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test021/A_in.js
@@ -0,0 +1,4 @@
+// test021
+public class A {
+protected synchronized String foo(final java.lang.String s1) throws IOException,Exception{
+}} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test021/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test021/A_out.js
new file mode 100644
index 0000000..4a65fd0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test021/A_out.js
@@ -0,0 +1,6 @@
+// test021
+public class A {
+ protected synchronized String foo(final java.lang.String s1)
+ throws IOException, Exception {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test022/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test022/A_in.js
new file mode 100644
index 0000000..74ad0d9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test022/A_in.js
@@ -0,0 +1,6 @@
+// test022
+public class A {
+ public int i =2; // end of line comment
+ public String s ="Hello";
+ private String tab[] ={"Hello","World"}; // this is an array
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test022/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test022/A_out.js
new file mode 100644
index 0000000..c7979fe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test022/A_out.js
@@ -0,0 +1,6 @@
+// test022
+public class A {
+ public int i = 2; // end of line comment
+ public String s = "Hello";
+ private String tab[] = {"Hello", "World"}; // this is an array
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test023/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test023/A_in.js
new file mode 100644
index 0000000..f9d291f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test023/A_in.js
@@ -0,0 +1,14 @@
+// test023
+public class A {
+ public AAAAAAAA fooooooo() { //comment1
+ return this;
+ } // end of foo() comment
+ synchronized int foo() { //comment2
+ return 3;
+ } // end of foobar() comment
+ public String s ="Hello";
+ int baz() { //comment
+ return 3;
+ } // end of baz() comment
+ private String tab[] ={"Hello","World"}; // this is an array
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test023/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test023/A_out.js
new file mode 100644
index 0000000..6ace504
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test023/A_out.js
@@ -0,0 +1,14 @@
+// test023
+public class A {
+ public AAAAAAAA fooooooo() { //comment1
+ return this;
+ } // end of foo() comment
+ synchronized int foo() { //comment2
+ return 3;
+ } // end of foobar() comment
+ public String s = "Hello";
+ int baz() { //comment
+ return 3;
+ } // end of baz() comment
+ private String tab[] = {"Hello", "World"}; // this is an array
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test024/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test024/A_in.js
new file mode 100644
index 0000000..a83a719
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test024/A_in.js
@@ -0,0 +1,8 @@
+// test024
+public class A {
+ public void foo() {
+ if (shortCondition) fitOnSameLine();
+ if (this.condition.isQuiteLong()) cannotFitOnSameLineAsIf("some argument", "some other argument");
+ if (should-split-first) if (should-split-second) if (remainCompact) if (remainCompact) whatever();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test024/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test024/A_out.js
new file mode 100644
index 0000000..b22b44e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test024/A_out.js
@@ -0,0 +1,11 @@
+// test024
+public class A {
+ public void foo() {
+ if (shortCondition) fitOnSameLine();
+ if (this.condition.isQuiteLong())
+ cannotFitOnSameLineAsIf("some argument", "some other argument");
+ if (should - split - first)
+ if (should - split - second)
+ if (remainCompact) if (remainCompact) whatever();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test025/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test025/A_in.js
new file mode 100644
index 0000000..81f6b4b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test025/A_in.js
@@ -0,0 +1,6 @@
+// test025
+public class A {
+ public void foo() {
+ }
+ public int field1;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test025/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test025/A_out.js
new file mode 100644
index 0000000..3887f11
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test025/A_out.js
@@ -0,0 +1,6 @@
+// test025
+public class A {
+ public void foo() {
+ }
+ public int field1;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test026/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test026/A_in.js
new file mode 100644
index 0000000..cfa4154
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test026/A_in.js
@@ -0,0 +1,8 @@
+// test026
+public class A {
+ public void foo() {
+ this.longReceiver.someQuiteLongMessageSend("aaaaaaaaaaa","bbbbbbbbbbbbb","cccccccc");
+ this.extremlylongReceiverWillCauseTwoSplitActions.someQuiteLongMessageSend("aaaaaaaaaaa","bbbbbbbbbbbbb","cccccccc");
+ Alignment expressionsAlignment = this.scribe.createAlignment("expressions", Alignment.M_COMPACT_SPLIT + someMessageSend(Alignment.M_COMPACT_SPLIT, Alignment.M_COMPACT_SPLIT, Alignment.M_COMPACT_SPLIT, Alignment.M_COMPACT_SPLIT),expressionsLength - 1, this.scribe.scanner.currentPosition);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test026/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test026/A_out.js
new file mode 100644
index 0000000..0b1feef
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test026/A_out.js
@@ -0,0 +1,17 @@
+// test026
+public class A {
+ public void foo() {
+ this.longReceiver.someQuiteLongMessageSend("aaaaaaaaaaa",
+ "bbbbbbbbbbbbb", "cccccccc");
+ this.extremlylongReceiverWillCauseTwoSplitActions
+ .someQuiteLongMessageSend("aaaaaaaaaaa", "bbbbbbbbbbbbb",
+ "cccccccc");
+ Alignment expressionsAlignment = this.scribe.createAlignment(
+ "expressions", Alignment.M_COMPACT_SPLIT
+ + someMessageSend(Alignment.M_COMPACT_SPLIT,
+ Alignment.M_COMPACT_SPLIT,
+ Alignment.M_COMPACT_SPLIT,
+ Alignment.M_COMPACT_SPLIT),
+ expressionsLength - 1, this.scribe.scanner.currentPosition);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test027/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test027/A_in.js
new file mode 100644
index 0000000..b733470
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test027/A_in.js
@@ -0,0 +1,5 @@
+// test027
+public class A {
+ public void foo(boolean b) {
+ do {} while(b);;;int i = 0, k = 3;i = 2; }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test027/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test027/A_out.js
new file mode 100644
index 0000000..cc43fa3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test027/A_out.js
@@ -0,0 +1,9 @@
+// test027
+public class A {
+ public void foo(boolean b) {
+ do {
+ } while (b);;;
+ int i = 0, k = 3;
+ i = 2;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test028/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test028/A_in.js
new file mode 100644
index 0000000..2408277
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test028/A_in.js
@@ -0,0 +1,5 @@
+// test028
+public class A {
+ public void foo(boolean b) {
+ ;;}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test028/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test028/A_out.js
new file mode 100644
index 0000000..a11d436
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test028/A_out.js
@@ -0,0 +1,6 @@
+// test028
+public class A {
+ public void foo(boolean b) {
+ ;;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test029/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test029/A_in.js
new file mode 100644
index 0000000..c0f90e6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test029/A_in.js
@@ -0,0 +1,8 @@
+package test.test1.test2;
+import java.io.*;import java.util.Vector;
+public class Test {
+public int i;public void foo(int k) {if (k > 0) { i = 3;;;} else if (k == 0) { i = 2;}if (i == 2) return;
+if (k > 0) i = 3;}public void bar() {}
+public long l; // long field
+public String s = null;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test029/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test029/A_out.js
new file mode 100644
index 0000000..81f1bd4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test029/A_out.js
@@ -0,0 +1,19 @@
+package test.test1.test2;
+import java.io.*;
+import java.util.Vector;
+public class Test {
+ public int i;
+ public void foo(int k) {
+ if (k > 0) {
+ i = 3;;;
+ } else if (k == 0) {
+ i = 2;
+ }
+ if (i == 2) return;
+ if (k > 0) i = 3;
+ }
+ public void bar() {
+ }
+ public long l; // long field
+ public String s = null;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test030/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test030/A_in.js
new file mode 100644
index 0000000..5c95c33
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test030/A_in.js
@@ -0,0 +1,13 @@
+package test.test1.test2;
+import java.io.*;import java.util.Vector;
+public class Test {
+public int i;
+public void foo(int k) {
+if (k > 0) { i = 3;;;} else if (k == 0) { i = 2;}
+if (i == 2) return;
+if (k > 0) i = 3;
+}
+public void bar() {}
+public String s = null;
+public long l; // long field
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test030/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test030/A_out.js
new file mode 100644
index 0000000..61d93bc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test030/A_out.js
@@ -0,0 +1,19 @@
+package test.test1.test2;
+import java.io.*;
+import java.util.Vector;
+public class Test {
+ public int i;
+ public void foo(int k) {
+ if (k > 0) {
+ i = 3;;;
+ } else if (k == 0) {
+ i = 2;
+ }
+ if (i == 2) return;
+ if (k > 0) i = 3;
+ }
+ public void bar() {
+ }
+ public String s = null;
+ public long l; // long field
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test031/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test031/A_in.js
new file mode 100644
index 0000000..fe62f92
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test031/A_in.js
@@ -0,0 +1,8 @@
+// test031
+package p1.p2.test;
+import java.io.Serializable;
+import java.io.IOException;
+public abstract /* */ class A extends p1.p2.fpfpfpfppffp.A implements Runnable, Cloneable, Serializable, Toto, Titi, Tata {
+int CONST;
+ /* comment */
+int value;transient long s;protected synchronized void foo() throws IOException,Exception{}public A() throws IOException,Exception{}} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test031/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test031/A_out.js
new file mode 100644
index 0000000..f174ba7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test031/A_out.js
@@ -0,0 +1,21 @@
+// test031
+package p1.p2.test;
+import java.io.Serializable;
+import java.io.IOException;
+public abstract/* */class A extends p1.p2.fpfpfpfppffp.A
+ implements
+ Runnable,
+ Cloneable,
+ Serializable,
+ Toto,
+ Titi,
+ Tata {
+ int CONST;
+ /* comment */
+ int value;
+ transient long s;
+ protected synchronized void foo() throws IOException, Exception {
+ }
+ public A() throws IOException, Exception {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test032/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test032/A_in.js
new file mode 100644
index 0000000..f6b7003
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test032/A_in.js
@@ -0,0 +1,3 @@
+// test032
+public class A {
+protected synchronized Object foo() throws IOException,Exception{return new String("this is a very long long long long string") != null ? new Object() : null;}} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test032/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test032/A_out.js
new file mode 100644
index 0000000..45f7b74
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test032/A_out.js
@@ -0,0 +1,8 @@
+// test032
+public class A {
+ protected synchronized Object foo() throws IOException, Exception {
+ return new String("this is a very long long long long string") != null
+ ? new Object()
+ : null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test033/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test033/A_in.js
new file mode 100644
index 0000000..a608541
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test033/A_in.js
@@ -0,0 +1,4 @@
+// test033
+public class A {
+protected synchronized Object foo() throws IOException,Exception{
+return new String("") != null ? null : null;}} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test033/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test033/A_out.js
new file mode 100644
index 0000000..389495b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test033/A_out.js
@@ -0,0 +1,6 @@
+// test033
+public class A {
+ protected synchronized Object foo() throws IOException, Exception {
+ return new String("") != null ? null : null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test034/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test034/A_in.js
new file mode 100644
index 0000000..3cc2394
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test034/A_in.js
@@ -0,0 +1,3 @@
+// test034
+public class A {
+void foo(){if ((condition1 && condition2) && (condition3 && condition4) || (condition5 && conditionnnnnnnnn6)) { doSomething(); }}} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test034/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test034/A_out.js
new file mode 100644
index 0000000..abc3f92
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test034/A_out.js
@@ -0,0 +1,9 @@
+// test034
+public class A {
+ void foo() {
+ if ((condition1 && condition2) && (condition3 && condition4)
+ || (condition5 && conditionnnnnnnnn6)) {
+ doSomething();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test035/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test035/A_in.js
new file mode 100644
index 0000000..106c860
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test035/A_in.js
@@ -0,0 +1,3 @@
+// test035
+public class A {
+void foo(){if ((condition1 && condition2) || (condition3 && condition4)) { doSomething(); }}} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test035/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test035/A_out.js
new file mode 100644
index 0000000..5030647
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test035/A_out.js
@@ -0,0 +1,8 @@
+// test035
+public class A {
+ void foo() {
+ if ((condition1 && condition2) || (condition3 && condition4)) {
+ doSomething();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test036/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test036/A_in.js
new file mode 100644
index 0000000..1c9bfb4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test036/A_in.js
@@ -0,0 +1,3 @@
+// test036
+public class A {
+void foo(){if ((condition1 && condition2) || (condition3 && condition4)) { doSomething(); }}} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test036/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test036/A_out.js
new file mode 100644
index 0000000..9eb6dae
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test036/A_out.js
@@ -0,0 +1,8 @@
+// test036
+public class A {
+ void foo() {
+ if ((condition1 && condition2) || (condition3 && condition4)) {
+ doSomething();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test037/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test037/A_in.js
new file mode 100644
index 0000000..80668ab
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test037/A_in.js
@@ -0,0 +1,10 @@
+class F{
+ public void foo() {
+ F foo= new F() {
+ public void bar() {
+ // comment
+ return;
+ }
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test037/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test037/A_out.js
new file mode 100644
index 0000000..4736338
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test037/A_out.js
@@ -0,0 +1,10 @@
+class F {
+ public void foo() {
+ F foo = new F() {
+ public void bar() {
+ // comment
+ return;
+ }
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test038/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test038/A_in.js
new file mode 100644
index 0000000..430b589
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test038/A_in.js
@@ -0,0 +1,6 @@
+class F{
+ public void foo() {
+ F foo= new F() { public void bar() { return; }
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test038/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test038/A_out.js
new file mode 100644
index 0000000..877b9a5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test038/A_out.js
@@ -0,0 +1,9 @@
+class F {
+ public void foo() {
+ F foo = new F() {
+ public void bar() {
+ return;
+ }
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test039/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test039/A_in.js
new file mode 100644
index 0000000..5deb1db
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test039/A_in.js
@@ -0,0 +1,5 @@
+class F{
+public void bar() {;}
+ public void foo() {}
+public void bar2() {//todo
+}} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test039/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test039/A_out.js
new file mode 100644
index 0000000..a28751b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test039/A_out.js
@@ -0,0 +1,9 @@
+class F {
+ public void bar() {
+ ;
+ }
+ public void foo() {
+ }
+ public void bar2() {//todo
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test040/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test040/A_in.js
new file mode 100644
index 0000000..7fb95a1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test040/A_in.js
@@ -0,0 +1,3 @@
+class F{
+public Runnable bar() { return new Runnable() {};}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test040/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test040/A_out.js
new file mode 100644
index 0000000..ce81817
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test040/A_out.js
@@ -0,0 +1,6 @@
+class F {
+ public Runnable bar() {
+ return new Runnable() {
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test041/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test041/A_in.js
new file mode 100644
index 0000000..c6559ff
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test041/A_in.js
@@ -0,0 +1,2 @@
+class F{
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test041/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test041/A_out.js
new file mode 100644
index 0000000..5d41131
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test041/A_out.js
@@ -0,0 +1 @@
+class F {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test042/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test042/A_in.js
new file mode 100644
index 0000000..b25c080
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test042/A_in.js
@@ -0,0 +1,10 @@
+class F{
+{
+ if (size < currentSize) {
+ try {
+ size = (long) inStream.available();
+ } catch (IOException e) {
+ } } else if (size == currentSize) {
+ ++size; } else { --size; }
+
+}} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test042/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test042/A_out.js
new file mode 100644
index 0000000..b923b3e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test042/A_out.js
@@ -0,0 +1,14 @@
+class F {
+ {
+ if (size < currentSize) {
+ try {
+ size = (long) inStream.available();
+ } catch (IOException e) {
+ }
+ } else if (size == currentSize) {
+ ++size;
+ } else {
+ --size;
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test043/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test043/A_in.js
new file mode 100644
index 0000000..938917d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test043/A_in.js
@@ -0,0 +1,8 @@
+/*
+ *
+ */
+/*
+ *
+ */
+class F{
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test043/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test043/A_out.js
new file mode 100644
index 0000000..c869b6d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test043/A_out.js
@@ -0,0 +1,7 @@
+/*
+ *
+ */
+/*
+ *
+ */
+class F {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test044/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test044/A_in.js
new file mode 100644
index 0000000..3fd500c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test044/A_in.js
@@ -0,0 +1 @@
+class F{String s = "\n";} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test044/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test044/A_out.js
new file mode 100644
index 0000000..808309d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test044/A_out.js
@@ -0,0 +1,3 @@
+class F {
+ String s = "\n";
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test045/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test045/A_in.js
new file mode 100644
index 0000000..d72ce73
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test045/A_in.js
@@ -0,0 +1,8 @@
+class F{
+ void foo() {
+ if (local.useFlag == LocalVariableBinding.UNUSED
+ && (local.declaration != null) // unused (and non secret) local
+ && ((local.declaration.bits & AstNode.IsLocalDeclarationReachableMASK) != 0)) { // declaration is reachable
+ }
+}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test045/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test045/A_out.js
new file mode 100644
index 0000000..33c83af
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test045/A_out.js
@@ -0,0 +1,8 @@
+class F {
+ void foo() {
+ if (local.useFlag == LocalVariableBinding.UNUSED
+ && (local.declaration != null) // unused (and non secret) local
+ && ((local.declaration.bits & AstNode.IsLocalDeclarationReachableMASK) != 0)) { // declaration is reachable
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test046/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test046/A_in.js
new file mode 100644
index 0000000..7fbde39
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test046/A_in.js
@@ -0,0 +1 @@
+i = 4 \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test046/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test046/A_out.js
new file mode 100644
index 0000000..4db932c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test046/A_out.js
@@ -0,0 +1 @@
+i=4 \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test047/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test047/A_in.js
new file mode 100644
index 0000000..c23d08e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test047/A_in.js
@@ -0,0 +1,2 @@
+i=
+4; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test047/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test047/A_out.js
new file mode 100644
index 0000000..08dec30
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test047/A_out.js
@@ -0,0 +1 @@
+ i = 4; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test048/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test048/A_in.js
new file mode 100644
index 0000000..2dbe071
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test048/A_in.js
@@ -0,0 +1 @@
+{ i=4; }System.out.println();j = 5; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test048/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test048/A_out.js
new file mode 100644
index 0000000..42045fb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test048/A_out.js
@@ -0,0 +1,5 @@
+{
+ i= 4;
+}
+System.out.println();
+j= 5; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test049/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test049/A_in.js
new file mode 100644
index 0000000..89187b5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test049/A_in.js
@@ -0,0 +1 @@
+void foo() {{ i=4; }System.out.println();j = 5;} void foo2() {{ i=4; }System.out.println();j = 5;} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test049/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test049/A_out.js
new file mode 100644
index 0000000..562b8b2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test049/A_out.js
@@ -0,0 +1,14 @@
+void foo() {
+ {
+ i= 4;
+ }
+ System.out.println();
+ j= 5;
+}
+void foo2() {
+ {
+ i= 4;
+ }
+ System.out.println();
+ j= 5;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test050/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test050/A_in.js
new file mode 100644
index 0000000..9532e2d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test050/A_in.js
@@ -0,0 +1 @@
+3- -3 \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test050/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test050/A_out.js
new file mode 100644
index 0000000..319b745
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test050/A_out.js
@@ -0,0 +1 @@
+3 - -3 \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test051/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test051/A_in.js
new file mode 100644
index 0000000..89187b5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test051/A_in.js
@@ -0,0 +1 @@
+void foo() {{ i=4; }System.out.println();j = 5;} void foo2() {{ i=4; }System.out.println();j = 5;} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test051/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test051/A_out.js
new file mode 100644
index 0000000..562b8b2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test051/A_out.js
@@ -0,0 +1,14 @@
+void foo() {
+ {
+ i= 4;
+ }
+ System.out.println();
+ j= 5;
+}
+void foo2() {
+ {
+ i= 4;
+ }
+ System.out.println();
+ j= 5;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test052/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test052/A_in.js
new file mode 100644
index 0000000..e178f78
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test052/A_in.js
@@ -0,0 +1,8 @@
+// test003
+package p1.p2.test;
+
+import java.io.Serializable;
+import java.io.IOException;
+
+public abstract class A extends java.lang.Object implements Runnable, Cloneable, Serializable {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test052/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test052/A_out.js
new file mode 100644
index 0000000..c2963b4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test052/A_out.js
@@ -0,0 +1,10 @@
+// test003
+package p1.p2.test;
+import java.io.Serializable;
+import java.io.IOException;
+public abstract class A extends java.lang.Object
+ implements
+ Runnable,
+ Cloneable,
+ Serializable {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test053/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test053/A_in.js
new file mode 100644
index 0000000..312a99a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test053/A_in.js
@@ -0,0 +1,15 @@
+/*
+ * test
+ * 003
+ */
+package p1.p2.test;
+
+import java.io.Serializable;
+import java.io.IOException;
+
+public abstract class A extends java.lang.Object implements Runnable, Cloneable, Serializable {
+/*
+ * test4
+ * 004
+ */
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test053/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test053/A_out.js
new file mode 100644
index 0000000..6b75c35
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test053/A_out.js
@@ -0,0 +1,17 @@
+/*
+ * test
+ * 003
+ */
+package p1.p2.test;
+import java.io.Serializable;
+import java.io.IOException;
+public abstract class A extends java.lang.Object
+ implements
+ Runnable,
+ Cloneable,
+ Serializable {
+ /*
+ * test4
+ * 004
+ */
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test054/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test054/A_in.js
new file mode 100644
index 0000000..3f49605
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test054/A_in.js
@@ -0,0 +1,15 @@
+/*
+ * test
+ * 003
+ */
+package p1.p2.test;
+
+import java.io.Serializable;
+import java.io.IOException;
+
+public abstract class A extends java.lang.Object implements Runnable, Cloneable, Serializable {
+ /*
+ * test4
+ * 004
+ */
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test054/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test054/A_out.js
new file mode 100644
index 0000000..6b75c35
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test054/A_out.js
@@ -0,0 +1,17 @@
+/*
+ * test
+ * 003
+ */
+package p1.p2.test;
+import java.io.Serializable;
+import java.io.IOException;
+public abstract class A extends java.lang.Object
+ implements
+ Runnable,
+ Cloneable,
+ Serializable {
+ /*
+ * test4
+ * 004
+ */
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test055/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test055/A_in.js
new file mode 100644
index 0000000..316e1ee
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test055/A_in.js
@@ -0,0 +1,31 @@
+/*
+ * @see ITypeBinding#getDeclaredMethods()
+ */
+public IMethodBinding[] getDeclaredMethods() {
+if (this.binding.isClass() || this.binding.isInterface()) {
+ReferenceBinding referenceBinding = (ReferenceBinding) this.binding;
+ org.eclipse.wst.jsdt.internal.compiler.lookup.MethodBinding[] methods = referenceBinding.methods();
+int length = methods.length;
+ int removeSyntheticsCounter = 0;
+IMethodBinding[] newMethods = new IMethodBinding[length];
+ for (int i = 0; i < length; i++) {
+ org.eclipse.wst.jsdt.internal.compiler.lookup.MethodBinding methodBinding = methods[i];
+if (!shouldBeRemoved(methodBinding)) {
+ newMethods[removeSyntheticsCounter++] = this.resolver.getMethodBinding(methodBinding);
+}
+}
+if (removeSyntheticsCounter != length) {
+ System.arraycopy(newMethods, 0, (newMethods = new IMethodBinding[removeSyntheticsCounter]), 0, removeSyntheticsCounter);
+ }
+return newMethods;
+ } else {
+
+return NO_DECLARED_METHODS;
+ }
+}
+// comment 1
+// comment 2
+// comment 3
+
+
+// comment 4
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test055/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test055/A_out.js
new file mode 100644
index 0000000..1eb2f24
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test055/A_out.js
@@ -0,0 +1,32 @@
+/*
+ * @see ITypeBinding#getDeclaredMethods()
+ */
+public IMethodBinding[] getDeclaredMethods() {
+ if (this.binding.isClass() || this.binding.isInterface()) {
+ ReferenceBinding referenceBinding = (ReferenceBinding) this.binding;
+ org.eclipse.wst.jsdt.internal.compiler.lookup.MethodBinding[] methods = referenceBinding
+ .methods();
+ int length = methods.length;
+ int removeSyntheticsCounter = 0;
+ IMethodBinding[] newMethods = new IMethodBinding[length];
+ for (int i = 0; i < length; i++) {
+ org.eclipse.wst.jsdt.internal.compiler.lookup.MethodBinding methodBinding = methods[i];
+ if (!shouldBeRemoved(methodBinding)) {
+ newMethods[removeSyntheticsCounter++] = this.resolver
+ .getMethodBinding(methodBinding);
+ }
+ }
+ if (removeSyntheticsCounter != length) {
+ System.arraycopy(newMethods, 0,
+ (newMethods = new IMethodBinding[removeSyntheticsCounter]),
+ 0, removeSyntheticsCounter);
+ }
+ return newMethods;
+ } else {
+ return NO_DECLARED_METHODS;
+ }
+}
+// comment 1
+// comment 2
+// comment 3
+// comment 4
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test056/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test056/A_in.js
new file mode 100644
index 0000000..19508b3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test056/A_in.js
@@ -0,0 +1 @@
+if (true);else System.out.println(); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test056/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test056/A_out.js
new file mode 100644
index 0000000..0357ce9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test056/A_out.js
@@ -0,0 +1,2 @@
+if (true) ;
+else System.out.println(); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test057/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test057/A_in.js
new file mode 100644
index 0000000..c988c36
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test057/A_in.js
@@ -0,0 +1,293 @@
+package test0002;
+
+public class Parser
+ implements BindingIds, ParserBasicInformation, TerminalTokens,
+ CompilerModifiers, OperatorIds, TypeIds {
+
+ protected ProblemReporter problemReporter;
+ protected CompilerOptions options;
+ public int firstToken; // handle for multiple parsing goals
+ public int lastAct; //handle for multiple parsing goals
+ protected ReferenceContext referenceContext;
+ public int currentToken;
+ private int synchronizedBlockSourceStart;
+
+ //error recovery management
+ protected int lastCheckPoint;
+ protected RecoveredElement currentElement;
+ public static boolean VERBOSE_RECOVERY = false;
+ protected boolean restartRecovery;
+ protected int listLength; // for recovering some incomplete list (interfaces, throws or parameters)
+ protected boolean hasError;
+ protected boolean hasReportedError;
+ public static boolean fineErrorDiagnose = true; //TODO remove the static modifier when new diagnose is ready
+ public boolean reportSyntaxErrorIsRequired = true;
+ public boolean reportOnlyOneSyntaxError = false;
+ protected int recoveredStaticInitializerStart;
+ protected int lastIgnoredToken, nextIgnoredToken; // comment
+ protected int lastErrorEndPosition;
+ protected boolean ignoreNextOpeningBrace;
+
+ //internal data for the automat
+ protected final static int StackIncrement = 255;
+ protected int stateStackTop;
+ protected int[] stack = new int[StackIncrement];
+
+ //scanner token
+ public Scanner scanner;
+
+ //ast stack
+ final static int AstStackIncrement = 100;
+ protected int astPtr;
+ protected AstNode[] astStack =
+ new AstNode[AstStackIncrement];
+ protected int astLengthPtr;
+ protected int[] astLengthStack;
+ public CompilationUnitDeclaration compilationUnit; /*the result from parse()*/
+ AstNode[] noAstNodes =
+ new AstNode[AstStackIncrement];
+
+ //expression stack
+ final static int ExpressionStackIncrement = 100;
+ protected int expressionPtr;
+ protected Expression[] expressionStack =
+ new Expression[ExpressionStackIncrement];
+ protected int expressionLengthPtr;
+ protected int[] expressionLengthStack;
+ Expression[] noExpressions =
+ new Expression[ExpressionStackIncrement];
+
+ //identifiers stacks
+ protected int identifierPtr;
+ protected char[][] identifierStack;
+ protected int identifierLengthPtr;
+ protected int[] identifierLengthStack;
+ protected long[] identifierPositionStack;
+
+ //positions , dimensions , .... (what ever is int) ..... stack
+ protected int intPtr;
+ protected int[] intStack;
+ protected int endPosition; //accurate only when used ! (the start position is pushed into intStack while the end the current one)
+ protected int endStatementPosition;
+ protected int lParenPos, rParenPos; //accurate only when used !
+
+ //modifiers dimensions nestedType etc.......
+ protected boolean optimizeStringLiterals = true;
+ protected int modifiers;
+ protected int modifiersSourceStart;
+ protected int nestedType, dimensions;
+ protected int[] nestedMethod; //the ptr is nestedType
+ protected int[] realBlockStack;
+ protected int realBlockPtr;
+ protected boolean diet = false; //tells the scanner to jump over some parts of the code/expressions like method bodies
+ protected int dietInt = 0; // if > 0 force the none-diet-parsing mode (even if diet if requested) [field parsing with anonymous inner classes...]
+ protected int[] variablesCounter;
+
+ //===DATA===DATA===DATA===DATA===DATA===DATA===//
+ public final static byte rhs[] = {
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 2, 1, 1, 1, 1, 3, 4, 0, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1,
+ 2, 1, 2, 2, 2, 1, 1, 2, 2, 2, 4, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 2, 3, 3, 2, 2, 1, 3, 1, 3, 1, 2, 1, 1, 1, 3, 0, 3, 1, 1,
+ 1, 1, 1, 1, 1, 4, 1, 3, 3, 7, 0, 0, 0, 0, 0, 2, 1, 1, 1, 2, 2, 4, 4,
+ 5, 4, 4, 2, 1, 2, 3, 3, 1, 3, 3, 1, 3, 1, 4, 0, 2, 1, 2, 2, 4, 1, 1,
+ 2, 5, 5, 7, 7, 7, 7, 2, 2, 3, 2, 2, 3, 1, 2, 1, 2, 1, 1, 2, 2, 1, 1,
+ 1, 1, 1, 3, 3, 4, 1, 3, 4, 0, 1, 2, 1, 1, 1, 1, 2, 3, 4, 0, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3,
+ 2, 1, 1, 1, 1, 1, 1, 1, 5, 7, 7, 6, 2, 3, 3, 4, 1, 2, 2, 1, 2, 3, 2,
+ 5, 5, 7, 9, 9, 1, 1, 1, 1, 3, 3, 5, 2, 3, 2, 3, 3, 3, 5, 1, 3, 4, 1,
+ 2, 5, 2, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 3, 3, 3, 3, 3, 1, 1, 5, 6, 8,
+ 7, 2, 0, 2, 0, 1, 3, 3, 3, 3, 4, 3, 4, 1, 2, 3, 2, 1, 1, 2, 2, 3, 3,
+ 4, 6, 6, 4, 4, 4, 1, 1, 1, 1, 2, 2, 0, 1, 1, 3, 3, 1, 3, 3, 1, 3, 3,
+ 1, 6, 6, 5, 0, 0, 1, 3, 3, 3, 1, 3, 3, 1, 3, 3, 3, 1, 3, 3, 3, 3, 3,
+ 1, 3, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 5, 1, 1, 3, 3, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 2, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 0, 1, 0, 1,
+ 0, 1, 0, 1
+ };
+ public static char asb[] = null;
+ public static char asr[] = null;
+ public static char nasb[] = null;
+ public static char nasr[] = null;
+ public static char terminal_index[] = null;
+ public static char non_terminal_index[] = null;
+ public static char term_action[] = null;
+ public final static byte term_check[] = {
+ 0, 0, 0, 0, 0, 3, 0, 3, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 22, 0, 24, 25, 25, 4, 5, 6, 25, 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 54, 55, 0,
+ 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 0, 0, 0, 70, 71, 72, 73, 74,
+ 75, 76, 77, 78, 79, 80, 0, 0, 0, 84, 85, 18, 19, 7, 8, 0, 1, 2, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 22, 21, 24, 25, 0, 26, 27, 28, 55, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ 50, 51, 52, 81, 54, 55, 0, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 81,
+ 12, 83, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 0, 56, 0, 84, 85,
+ 0, 4, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 22, 0, 24, 25,
+ 24, 4, 5, 6, 55, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
+ 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 54, 55, 56, 57, 58, 59, 60, 61,
+ 62, 63, 64, 65, 66, 0, 0, 0, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 0, 13, 14, 15, 16, 17, 82, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
+ 11, 12, 22, 0, 24, 25, 0, 4, 5, 6, 0, 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 81, 54, 55,
+ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 41, 82, 0, 70, 71, 72, 73,
+ 74, 75, 76, 77, 78, 79, 80, 0, 13, 14, 15, 16, 17, 57, 7, 8, 0, 1, 2,
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 22, 0, 24, 25, 0, 4, 5, 6, 0, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ 50, 51, 52, 27, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 0,
+ 0, 0, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 0, 13, 14, 15, 16,
+ 17, 0, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 22, 0, 24, 25,
+ 3, 0, 22, 0, 24, 31, 32, 33, 34, 35, 36, 37, 38, 39, 91, 41, 42, 43,
+ 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 54, 55, 3, 57, 58, 59, 60, 61,
+ 62, 63, 64, 65, 66, 40, 82, 0, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 0, 83, 0, 0, 0, 18, 19, 7, 8, 0, 1, 2, 0, 4, 5, 6, 7, 8, 9,
+ 10, 11, 0, 22, 0, 24, 25, 22, 0, 24, 84, 85, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 54,
+ 55, 3, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 40, 0, 29, 70, 71, 72,
+ 73, 74, 75, 76, 77, 78, 79, 80, 81, 0, 83, 0, 1, 2, 0, 86, 7, 8, 0, 1,
+ 2, 91, 4, 5, 6, 7, 8, 9, 10, 11, 0, 22, 82, 24, 25, 87, 22, 89, 84,
+ 85, 31, 32, 33, 34, 35, 36, 37, 38, 39, 0, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 0, 54, 55, 70, 57, 58, 59, 60, 61, 62, 63, 64, 65,
+ 66, 0, 1, 2, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 0, 83, 0,
+ 1, 2, 0, 0, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 0, 0, 12, 22, 3, 24,
+ 25, 55, 9, 10, 11, 0, 31, 32, 33, 34, 35, 36, 37, 38, 39, 21, 41, 42,
+ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 54, 55, 0, 57, 58, 59, 60,
+ 61, 62, 63, 64, 65, 66, 0, 1, 2, 70, 71, 72, 73, 74, 75, 76, 77, 78,
+ 79, 80, 0, 26, 0, 28, 55, 0, 87, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0,
+ 0, 0, 12, 22, 0, 24, 25, 24, 9, 10, 11, 25, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 20, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 30,
+ 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 0, 0, 0, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, 79, 80, 0, 0, 0, 0, 3, 0, 3, 7, 8, 0, 1,
+ 2, 3, 4, 5, 6, 7, 8, 0, 0, 0, 12, 22, 0, 24, 25, 25, 9, 10, 11, 25,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48,
+ 49, 50, 51, 52, 0, 54, 69, 0, 1, 2, 0, 4, 5, 6, 7, 8, 25, 7, 8, 0, 0,
+ 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 22, 0, 24, 25, 0, 0, 0, 0,
+ 0, 31, 32, 33, 34, 35, 36, 37, 38, 39, 12, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 23, 54, 0, 30, 0, 3, 4, 5, 6, 7, 8, 7, 8, 40, 12,
+ 104, 40, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 24, 25, 55, 0,
+ 56, 0, 3, 31, 32, 33, 34, 35, 36, 37, 38, 39, 103, 41, 42, 43, 44, 45,
+ 46, 47, 48, 49, 50, 51, 52, 24, 54, 0, 86, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 0, 1, 2, 41, 4, 5, 6, 7, 8, 9, 10, 11, 0, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 0, 23, 0, 3, 26, 27, 28, 7, 8, 7, 8, 0, 12, 0, 0,
+ 1, 2, 0, 0, 0, 54, 7, 8, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 22,
+ 0, 22, 0, 3, 24, 25, 29, 30, 29, 30, 30, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 90, 55,
+ 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 67, 68, 0, 1, 2, 69, 0,
+ 0, 22, 7, 8, 90, 0, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 0,
+ 87, 24, 25, 4, 5, 6, 7, 8, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 0, 55, 0, 1, 2, 55, 55,
+ 0, 0, 7, 8, 55, 12, 67, 68, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 25, 24, 25,
+ 12, 30, 22, 24, 25, 31, 32, 33, 34, 35, 36, 37, 38, 39, 0, 41, 42, 43,
+ 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 0, 55, 0, 1, 2, 53, 7, 8, 0, 7,
+ 8, 25, 12, 67, 68, 56, 0, 1, 2, 3, 4, 5, 6, 7, 8, 25, 24, 25, 12, 0,
+ 22, 0, 0, 31, 32, 33, 34, 35, 36, 37, 38, 39, 0, 41, 42, 43, 44, 45,
+ 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 29, 0, 0, 0, 7, 8, 4, 5, 6, 7, 8,
+ 67, 68, 69, 0, 1, 2, 0, 4, 5, 6, 24, 25, 9, 10, 11, 25, 24, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
+ 51, 52, 0, 1, 2, 0, 0, 0, 0, 7, 8, 3, 0, 24, 7, 8, 67, 68, 69, 0, 1,
+ 2, 0, 4, 5, 6, 24, 25, 22, 24, 41, 42, 43, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 30, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 0, 55,
+ 89, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 67, 68, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 30, 0, 26, 27, 28, 29, 30, 0, 0, 1, 2,
+ 0, 4, 5, 6, 40, 40, 9, 10, 11, 0, 13, 14, 15, 16, 17, 18, 19, 20, 53,
+ 29, 56, 56, 22, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 24, 69, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 0, 26, 27, 28, 29, 30,
+ 0, 0, 1, 2, 0, 4, 5, 6, 69, 40, 9, 10, 11, 0, 13, 14, 15, 16, 17, 18,
+ 19, 0, 53, 29, 3, 56, 22, 0, 7, 8, 0, 1, 2, 3, 4, 5, 6, 24, 69, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 88, 55, 26, 27,
+ 28, 29, 30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 40, 0, 0, 0, 1, 2, 0, 4, 5, 6,
+ 7, 8, 0, 53, 12, 3, 56, 0, 0, 7, 8, 0, 1, 2, 3, 4, 5, 6, 22, 69, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 0, 26, 27,
+ 28, 29, 30, 0, 0, 9, 10, 11, 40, 40, 0, 54, 40, 56, 57, 58, 59, 60,
+ 61, 62, 63, 64, 65, 66, 0, 53, 22, 3, 56, 0, 0, 7, 8, 0, 1, 2, 3, 4,
+ 5, 6, 30, 69, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 0, 0, 26, 27, 28, 29, 30, 0, 0, 69, 3, 4, 5, 6, 7, 8, 40, 0, 1, 2,
+ 12, 0, 22, 0, 7, 8, 25, 55, 0, 53, 30, 0, 56, 25, 3, 4, 5, 6, 7, 8,
+ 12, 24, 25, 12, 0, 69, 25, 24, 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
+ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 29, 0, 0, 0,
+ 7, 8, 0, 0, 24, 3, 3, 67, 68, 7, 8, 0, 0, 0, 12, 12, 0, 24, 25, 22, 9,
+ 10, 11, 24, 31, 32, 33, 34, 35, 36, 37, 38, 39, 20, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 0, 0, 0, 3, 7, 8, 0, 0, 0, 3,
+ 3, 67, 68, 7, 8, 7, 8, 0, 12, 12, 53, 24, 25, 22, 22, 25, 0, 0, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ 50, 51, 52, 0, 1, 2, 90, 0, 0, 0, 7, 8, 0, 0, 0, 3, 3, 67, 68, 7, 8,
+ 7, 8, 0, 12, 12, 0, 24, 25, 22, 7, 8, 24, 24, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 1,
+ 2, 69, 0, 0, 0, 7, 8, 0, 0, 0, 3, 3, 67, 68, 7, 8, 7, 8, 0, 12, 12,
+ 53, 24, 25, 22, 7, 8, 24, 24, 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
+ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 0, 0, 0, 0,
+ 7, 8, 0, 0, 0, 3, 3, 67, 68, 7, 8, 12, 0, 0, 12, 12, 12, 24, 25, 23,
+ 40, 0, 25, 25, 31, 32, 33, 34, 35, 36, 37, 38, 39, 12, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 0, 0, 0, 40, 7, 8, 0, 0, 0,
+ 3, 3, 67, 68, 7, 8, 0, 0, 53, 12, 12, 12, 24, 25, 0, 0, 25, 25, 25,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48,
+ 49, 50, 51, 52, 0, 1, 2, 0, 0, 0, 40, 7, 8, 0, 0, 24, 3, 3, 67, 68, 7,
+ 8, 0, 0, 55, 12, 12, 0, 24, 25, 22, 0, 25, 24, 0, 31, 32, 33, 34, 35,
+ 36, 37, 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0,
+ 1, 2, 29, 0, 0, 29, 7, 8, 0, 0, 0, 3, 3, 67, 68, 7, 8, 0, 0, 0, 12,
+ 12, 3, 24, 25, 0, 40, 0, 25, 25, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 29, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 0, 0, 40,
+ 0, 7, 8, 0, 0, 0, 3, 3, 67, 68, 7, 8, 0, 0, 0, 12, 12, 3, 24, 25, 0,
+ 0, 25, 25, 24, 31, 32, 33, 34, 35, 36, 37, 38, 39, 29, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 29, 0, 40, 0, 7, 8, 0, 0, 0,
+ 3, 3, 67, 68, 7, 8, 0, 0, 0, 12, 12, 3, 24, 25, 0, 0, 0, 25, 24, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 29, 41, 42, 43, 44, 45, 46, 47, 48,
+ 49, 50, 51, 52, 0, 1, 2, 30, 29, 0, 0, 7, 8, 0, 0, 0, 3, 3, 67, 68, 7,
+ 8, 12, 0, 0, 12, 12, 12, 24, 25, 0, 0, 0, 3, 25, 31, 32, 33, 34, 35,
+ 36, 37, 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0,
+ 1, 2, 29, 0, 30, 0, 7, 8, 0, 0, 0, 3, 0, 67, 68, 7, 8, 0, 0, 0, 12,
+ 12, 3, 24, 25, 22, 0, 22, 0, 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 22, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 89, 30,
+ 29, 29, 7, 8, 0, 0, 0, 3, 3, 67, 68, 7, 8, 0, 0, 0, 12, 88, 0, 24, 25,
+ 0, 0, 0, 0, 0, 31, 32, 33, 34, 35, 36, 37, 38, 39, 29, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 29, 29, 29, 0, 7, 8, 0, 0, 0,
+ 3, 0, 67, 68, 7, 8, 0, 0, 0, 12, 0, 0, 24, 25, 0, 0, 22, 0, 0, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
+ 51, 52, 0, 1, 2, 0, 0, 29, 29, 7, 8, 0, 0, 0, 25, 0, 67, 68, 0, 0, 0,
+ 0, 0, 0, 0, 0, 24, 25, 0, 0, 25, 25, 0, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 29, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 30, 88,
+ 29, 29, 0, 0, 29, 0, 1, 2, 3, 4, 5, 6, 67, 68, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 0, 26, 27, 28, 29, 30, 0, 1, 2,
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 53, 23, 30, 56, 26, 27, 28, 0, 0, 1, 2, 3, 4, 5, 6, 0, 69, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 0, 26, 27, 28, 29,
+ 30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
+ 19, 20, 21, 53, 23, 0, 56, 26, 27, 28, 0, 0, 1, 2, 3, 4, 5, 6, 0, 69,
+ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 0, 26,
+ 27, 28, 29, 30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 53, 23, 0, 56, 26, 27, 28, 0, 0, 1, 2, 3, 4,
+ 5, 6, 0, 69, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 0, 0, 26, 27, 28, 29, 30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 53, 23, 0, 56, 26, 27, 28, 0,
+ 0, 1, 2, 3, 4, 5, 6, 0, 69, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 0, 0, 26, 27, 28, 29, 30, 0, 1, 2, 3, 4, 5, 6, 7, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 53, 23, 0, 56, 0,
+ 1, 2, 3, 4, 5, 6, 0, 0, 9, 10, 11, 69, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 0, 0, 26, 27, 28, 29, 30, 24, 0, 1, 2, 0, 4, 5, 6, 0, 40,
+ 9, 10, 11, 0, 13, 14, 15, 16, 17, 0, 0, 0, 53, 29, 0, 56, 0, 1, 2, 3,
+ 4, 5, 6, 29, 0, 9, 10, 11, 69, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 29, 0, 26, 27, 28, 29, 30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 53, 23, 0, 56, 0, 1, 2, 0, 4,
+ 5, 6, 0, 0, 9, 10, 11, 69, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 0, 22, 26, 27, 28, 29, 30, 0, 24, 0, 3, 4, 5, 6, 7, 8, 40, 0, 0, 12,
+ 0, 0, 22, 0, 0, 0, 42, 43, 0, 53, 0, 22, 56, 0, 1, 2, 0, 4, 5, 6, 22,
+ 24, 9, 10, 11, 69, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 29, 40,
+ 26, 27, 28, 29, 30, 0, 81, 0, 0, 0, 0, 0, 0, 54, 40, 0, 57, 58, 59,
+ 60, 61, 62, 63, 64, 65, 66, 0, 53, 0, 22, 56, 0, 1, 2, 22, 4, 5, 6,
+ 29, 24, 9, 10, 11, 69, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0,
+ 0, 26, 27, 28, 29, 30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, 53, 23, 0, 56, 0, 1, 2, 0, 4, 5, 6, 0,
+ 0, 9, 10, 11, 69, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 22,
+ 26, 27, 28, 29, 30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 53, 23, 0, 56, 26, 27, 28, 0, 0, 1, 2, 3,
+ 4, 5, 6, 0, 69, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 0, 0, 26, 27, 28, 22, 30, 0, 0, 1, 2, 3, 4, 5, 6, 0, 40, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 0, 26, 27, 28,
+ 0, 30, 0, 0, 1, 2, 3, 4, 5, 6, 0, 40, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 0, 0, 26, 27, 28, 0, 30, 0, 0, 1, 2, 3, 4,
+ 5, 6, 0, 40, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 0, 0, 26, 27, 28, 0, 30, 0, 0, 1, 2, 3, 4, 5, 6, 0, 40, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 0, 26, 27, 28, 0,
+ 30, 0, 3, 4, 5, 6, 7, 8, 0, 0, 40, 12, 3, 4, 5, 6, 7, 8, 24, 25, 0,
+ };
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test057/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test057/A_out.js
new file mode 100644
index 0000000..0654588
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test057/A_out.js
@@ -0,0 +1,289 @@
+package test0002;
+public class Parser
+ implements
+ BindingIds,
+ ParserBasicInformation,
+ TerminalTokens,
+ CompilerModifiers,
+ OperatorIds,
+ TypeIds {
+ protected ProblemReporter problemReporter;
+ protected CompilerOptions options;
+ public int firstToken; // handle for multiple parsing goals
+ public int lastAct; //handle for multiple parsing goals
+ protected ReferenceContext referenceContext;
+ public int currentToken;
+ private int synchronizedBlockSourceStart;
+ //error recovery management
+ protected int lastCheckPoint;
+ protected RecoveredElement currentElement;
+ public static boolean VERBOSE_RECOVERY = false;
+ protected boolean restartRecovery;
+ protected int listLength; // for recovering some incomplete list (interfaces, throws or parameters)
+ protected boolean hasError;
+ protected boolean hasReportedError;
+ public static boolean fineErrorDiagnose = true; //TODO remove the static modifier when new diagnose is ready
+ public boolean reportSyntaxErrorIsRequired = true;
+ public boolean reportOnlyOneSyntaxError = false;
+ protected int recoveredStaticInitializerStart;
+ protected int lastIgnoredToken, nextIgnoredToken; // comment
+ protected int lastErrorEndPosition;
+ protected boolean ignoreNextOpeningBrace;
+ //internal data for the automat
+ protected final static int StackIncrement = 255;
+ protected int stateStackTop;
+ protected int[] stack = new int[StackIncrement];
+ //scanner token
+ public Scanner scanner;
+ //ast stack
+ final static int AstStackIncrement = 100;
+ protected int astPtr;
+ protected AstNode[] astStack = new AstNode[AstStackIncrement];
+ protected int astLengthPtr;
+ protected int[] astLengthStack;
+ public CompilationUnitDeclaration compilationUnit; /*the result from parse()*/
+ AstNode[] noAstNodes = new AstNode[AstStackIncrement];
+ //expression stack
+ final static int ExpressionStackIncrement = 100;
+ protected int expressionPtr;
+ protected Expression[] expressionStack = new Expression[ExpressionStackIncrement];
+ protected int expressionLengthPtr;
+ protected int[] expressionLengthStack;
+ Expression[] noExpressions = new Expression[ExpressionStackIncrement];
+ //identifiers stacks
+ protected int identifierPtr;
+ protected char[][] identifierStack;
+ protected int identifierLengthPtr;
+ protected int[] identifierLengthStack;
+ protected long[] identifierPositionStack;
+ //positions , dimensions , .... (what ever is int) ..... stack
+ protected int intPtr;
+ protected int[] intStack;
+ protected int endPosition; //accurate only when used ! (the start position is pushed into intStack while the end the current one)
+ protected int endStatementPosition;
+ protected int lParenPos, rParenPos; //accurate only when used !
+ //modifiers dimensions nestedType etc.......
+ protected boolean optimizeStringLiterals = true;
+ protected int modifiers;
+ protected int modifiersSourceStart;
+ protected int nestedType, dimensions;
+ protected int[] nestedMethod; //the ptr is nestedType
+ protected int[] realBlockStack;
+ protected int realBlockPtr;
+ protected boolean diet = false; //tells the scanner to jump over some parts of the code/expressions like method bodies
+ protected int dietInt = 0; // if > 0 force the none-diet-parsing mode (even if diet if requested) [field parsing with anonymous inner classes...]
+ protected int[] variablesCounter;
+ //===DATA===DATA===DATA===DATA===DATA===DATA===//
+ public final static byte rhs[] = {0, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
+ 2, 1, 1, 1, 1, 3, 4, 0, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1,
+ 2, 1, 2, 2, 2, 1, 1, 2, 2, 2, 4, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 2, 3, 3, 2, 2, 1, 3, 1, 3, 1, 2, 1, 1, 1, 3, 0, 3,
+ 1, 1, 1, 1, 1, 1, 1, 4, 1, 3, 3, 7, 0, 0, 0, 0, 0, 2, 1, 1, 1, 2,
+ 2, 4, 4, 5, 4, 4, 2, 1, 2, 3, 3, 1, 3, 3, 1, 3, 1, 4, 0, 2, 1, 2,
+ 2, 4, 1, 1, 2, 5, 5, 7, 7, 7, 7, 2, 2, 3, 2, 2, 3, 1, 2, 1, 2, 1,
+ 1, 2, 2, 1, 1, 1, 1, 1, 3, 3, 4, 1, 3, 4, 0, 1, 2, 1, 1, 1, 1, 2,
+ 3, 4, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 3, 3, 2, 1, 1, 1, 1, 1, 1, 1, 5, 7, 7, 6, 2, 3, 3,
+ 4, 1, 2, 2, 1, 2, 3, 2, 5, 5, 7, 9, 9, 1, 1, 1, 1, 3, 3, 5, 2, 3,
+ 2, 3, 3, 3, 5, 1, 3, 4, 1, 2, 5, 2, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1,
+ 3, 3, 3, 3, 3, 1, 1, 5, 6, 8, 7, 2, 0, 2, 0, 1, 3, 3, 3, 3, 4, 3,
+ 4, 1, 2, 3, 2, 1, 1, 2, 2, 3, 3, 4, 6, 6, 4, 4, 4, 1, 1, 1, 1, 2,
+ 2, 0, 1, 1, 3, 3, 1, 3, 3, 1, 3, 3, 1, 6, 6, 5, 0, 0, 1, 3, 3, 3,
+ 1, 3, 3, 1, 3, 3, 3, 1, 3, 3, 3, 3, 3, 1, 3, 3, 1, 3, 1, 3, 1, 3,
+ 1, 3, 1, 3, 1, 5, 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 0, 1, 0, 1, 0, 1, 0, 1};
+ public static char asb[] = null;
+ public static char asr[] = null;
+ public static char nasb[] = null;
+ public static char nasr[] = null;
+ public static char terminal_index[] = null;
+ public static char non_terminal_index[] = null;
+ public static char term_action[] = null;
+ public final static byte term_check[] = {0, 0, 0,
+ 0, 0, 3, 0, 3, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 22,
+ 0, 24, 25, 25, 4, 5, 6, 25, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 54, 55, 0, 57,
+ 58, 59, 60, 61, 62, 63, 64, 65, 66, 0, 0, 0, 70, 71, 72, 73, 74,
+ 75, 76, 77, 78, 79, 80, 0, 0, 0, 84, 85, 18, 19, 7, 8, 0, 1, 2, 3,
+ 4, 5, 6, 7, 8, 9, 10, 11, 12, 22, 21, 24, 25, 0, 26, 27, 28, 55,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 81, 54, 55, 0, 57, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 81, 12, 83, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 0,
+ 56, 0, 84, 85, 0, 4, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 22, 0, 24, 25, 24, 4, 5, 6, 55, 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 54, 55,
+ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 0, 0, 0, 70, 71, 72,
+ 73, 74, 75, 76, 77, 78, 79, 80, 0, 13, 14, 15, 16, 17, 82, 7, 8, 0,
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 22, 0, 24, 25, 0, 4, 5, 6,
+ 0, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
+ 47, 48, 49, 50, 51, 52, 81, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 41, 82, 0, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
+ 0, 13, 14, 15, 16, 17, 57, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
+ 11, 12, 22, 0, 24, 25, 0, 4, 5, 6, 0, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 27, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 0, 0, 0, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, 79, 80, 0, 13, 14, 15, 16, 17, 0, 7, 8,
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 22, 0, 24, 25, 3, 0, 22,
+ 0, 24, 31, 32, 33, 34, 35, 36, 37, 38, 39, 91, 41, 42, 43, 44, 45,
+ 46, 47, 48, 49, 50, 51, 52, 0, 54, 55, 3, 57, 58, 59, 60, 61, 62,
+ 63, 64, 65, 66, 40, 82, 0, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 0, 83, 0, 0, 0, 18, 19, 7, 8, 0, 1, 2, 0, 4, 5, 6, 7, 8, 9,
+ 10, 11, 0, 22, 0, 24, 25, 22, 0, 24, 84, 85, 31, 32, 33, 34, 35,
+ 36, 37, 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
+ 0, 54, 55, 3, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 40, 0, 29,
+ 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 0, 83, 0, 1, 2, 0,
+ 86, 7, 8, 0, 1, 2, 91, 4, 5, 6, 7, 8, 9, 10, 11, 0, 22, 82, 24, 25,
+ 87, 22, 89, 84, 85, 31, 32, 33, 34, 35, 36, 37, 38, 39, 0, 41, 42,
+ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 54, 55, 70, 57, 58, 59,
+ 60, 61, 62, 63, 64, 65, 66, 0, 1, 2, 70, 71, 72, 73, 74, 75, 76,
+ 77, 78, 79, 80, 81, 0, 83, 0, 1, 2, 0, 0, 7, 8, 0, 1, 2, 3, 4, 5,
+ 6, 7, 8, 0, 0, 0, 12, 22, 3, 24, 25, 55, 9, 10, 11, 0, 31, 32, 33,
+ 34, 35, 36, 37, 38, 39, 21, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
+ 51, 52, 0, 54, 55, 0, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 0, 1,
+ 2, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 0, 26, 0, 28, 55, 0,
+ 87, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 0, 0, 12, 22, 0, 24, 25,
+ 24, 9, 10, 11, 25, 31, 32, 33, 34, 35, 36, 37, 38, 39, 20, 41, 42,
+ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 30, 54, 55, 56, 57, 58, 59,
+ 60, 61, 62, 63, 64, 65, 66, 0, 0, 0, 70, 71, 72, 73, 74, 75, 76,
+ 77, 78, 79, 80, 0, 0, 0, 0, 3, 0, 3, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7,
+ 8, 0, 0, 0, 12, 22, 0, 24, 25, 25, 9, 10, 11, 25, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ 52, 0, 54, 69, 0, 1, 2, 0, 4, 5, 6, 7, 8, 25, 7, 8, 0, 0, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, 79, 80, 22, 0, 24, 25, 0, 0, 0, 0, 0,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 12, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 23, 54, 0, 30, 0, 3, 4, 5, 6, 7, 8, 7, 8, 40,
+ 12, 104, 40, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 24, 25,
+ 55, 0, 56, 0, 3, 31, 32, 33, 34, 35, 36, 37, 38, 39, 103, 41, 42,
+ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 24, 54, 0, 86, 57, 58, 59,
+ 60, 61, 62, 63, 64, 65, 66, 0, 1, 2, 41, 4, 5, 6, 7, 8, 9, 10, 11,
+ 0, 13, 14, 15, 16, 17, 18, 19, 20, 21, 0, 23, 0, 3, 26, 27, 28, 7,
+ 8, 7, 8, 0, 12, 0, 0, 1, 2, 0, 0, 0, 54, 7, 8, 57, 58, 59, 60, 61,
+ 62, 63, 64, 65, 66, 22, 0, 22, 0, 3, 24, 25, 29, 30, 29, 30, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 0, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 0, 90, 55, 92, 93, 94, 95, 96, 97, 98, 99, 100,
+ 101, 102, 67, 68, 0, 1, 2, 69, 0, 0, 22, 7, 8, 90, 0, 92, 93, 94,
+ 95, 96, 97, 98, 99, 100, 101, 102, 0, 87, 24, 25, 4, 5, 6, 7, 8,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 0, 0, 55, 0, 1, 2, 55, 55, 0, 0, 7, 8, 55, 12,
+ 67, 68, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 25, 24, 25, 12, 30, 22, 24,
+ 25, 31, 32, 33, 34, 35, 36, 37, 38, 39, 0, 41, 42, 43, 44, 45, 46,
+ 47, 48, 49, 50, 51, 52, 0, 0, 55, 0, 1, 2, 53, 7, 8, 0, 7, 8, 25,
+ 12, 67, 68, 56, 0, 1, 2, 3, 4, 5, 6, 7, 8, 25, 24, 25, 12, 0, 22,
+ 0, 0, 31, 32, 33, 34, 35, 36, 37, 38, 39, 0, 41, 42, 43, 44, 45,
+ 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 29, 0, 0, 0, 7, 8, 4, 5, 6, 7,
+ 8, 67, 68, 69, 0, 1, 2, 0, 4, 5, 6, 24, 25, 9, 10, 11, 25, 24, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48,
+ 49, 50, 51, 52, 0, 1, 2, 0, 0, 0, 0, 7, 8, 3, 0, 24, 7, 8, 67, 68,
+ 69, 0, 1, 2, 0, 4, 5, 6, 24, 25, 22, 24, 41, 42, 43, 31, 32, 33,
+ 34, 35, 36, 37, 38, 39, 30, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
+ 51, 52, 0, 0, 55, 89, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 67, 68, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 30, 0, 26, 27,
+ 28, 29, 30, 0, 0, 1, 2, 0, 4, 5, 6, 40, 40, 9, 10, 11, 0, 13, 14,
+ 15, 16, 17, 18, 19, 20, 53, 29, 56, 56, 22, 0, 0, 0, 0, 1, 2, 3, 4,
+ 5, 6, 24, 69, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 25, 0, 26, 27, 28, 29, 30, 0, 0, 1, 2, 0, 4, 5, 6, 69, 40,
+ 9, 10, 11, 0, 13, 14, 15, 16, 17, 18, 19, 0, 53, 29, 3, 56, 22, 0,
+ 7, 8, 0, 1, 2, 3, 4, 5, 6, 24, 69, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 88, 55, 26, 27, 28, 29, 30, 0, 1, 2, 3,
+ 4, 5, 6, 7, 8, 40, 0, 0, 0, 1, 2, 0, 4, 5, 6, 7, 8, 0, 53, 12, 3,
+ 56, 0, 0, 7, 8, 0, 1, 2, 3, 4, 5, 6, 22, 69, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 0, 26, 27, 28, 29, 30, 0, 0,
+ 9, 10, 11, 40, 40, 0, 54, 40, 56, 57, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 0, 53, 22, 3, 56, 0, 0, 7, 8, 0, 1, 2, 3, 4, 5, 6, 30, 69,
+ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 0,
+ 26, 27, 28, 29, 30, 0, 0, 69, 3, 4, 5, 6, 7, 8, 40, 0, 1, 2, 12, 0,
+ 22, 0, 7, 8, 25, 55, 0, 53, 30, 0, 56, 25, 3, 4, 5, 6, 7, 8, 12,
+ 24, 25, 12, 0, 69, 25, 24, 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
+ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 29, 0, 0,
+ 0, 7, 8, 0, 0, 24, 3, 3, 67, 68, 7, 8, 0, 0, 0, 12, 12, 0, 24, 25,
+ 22, 9, 10, 11, 24, 31, 32, 33, 34, 35, 36, 37, 38, 39, 20, 41, 42,
+ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 0, 0, 0, 3, 7, 8,
+ 0, 0, 0, 3, 3, 67, 68, 7, 8, 7, 8, 0, 12, 12, 53, 24, 25, 22, 22,
+ 25, 0, 0, 31, 32, 33, 34, 35, 36, 37, 38, 39, 0, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 90, 0, 0, 0, 7, 8, 0, 0,
+ 0, 3, 3, 67, 68, 7, 8, 7, 8, 0, 12, 12, 0, 24, 25, 22, 7, 8, 24,
+ 24, 31, 32, 33, 34, 35, 36, 37, 38, 39, 0, 41, 42, 43, 44, 45, 46,
+ 47, 48, 49, 50, 51, 52, 0, 1, 2, 69, 0, 0, 0, 7, 8, 0, 0, 0, 3, 3,
+ 67, 68, 7, 8, 7, 8, 0, 12, 12, 53, 24, 25, 22, 7, 8, 24, 24, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48,
+ 49, 50, 51, 52, 0, 1, 2, 0, 0, 0, 0, 7, 8, 0, 0, 0, 3, 3, 67, 68,
+ 7, 8, 12, 0, 0, 12, 12, 12, 24, 25, 23, 40, 0, 25, 25, 31, 32, 33,
+ 34, 35, 36, 37, 38, 39, 12, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
+ 51, 52, 0, 1, 2, 0, 0, 0, 40, 7, 8, 0, 0, 0, 3, 3, 67, 68, 7, 8, 0,
+ 0, 53, 12, 12, 12, 24, 25, 0, 0, 25, 25, 25, 31, 32, 33, 34, 35,
+ 36, 37, 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
+ 0, 1, 2, 0, 0, 0, 40, 7, 8, 0, 0, 24, 3, 3, 67, 68, 7, 8, 0, 0, 55,
+ 12, 12, 0, 24, 25, 22, 0, 25, 24, 0, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 1, 2,
+ 29, 0, 0, 29, 7, 8, 0, 0, 0, 3, 3, 67, 68, 7, 8, 0, 0, 0, 12, 12,
+ 3, 24, 25, 0, 40, 0, 25, 25, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 29, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 0, 0,
+ 40, 0, 7, 8, 0, 0, 0, 3, 3, 67, 68, 7, 8, 0, 0, 0, 12, 12, 3, 24,
+ 25, 0, 0, 25, 25, 24, 31, 32, 33, 34, 35, 36, 37, 38, 39, 29, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 29, 0, 40, 0,
+ 7, 8, 0, 0, 0, 3, 3, 67, 68, 7, 8, 0, 0, 0, 12, 12, 3, 24, 25, 0,
+ 0, 0, 25, 24, 31, 32, 33, 34, 35, 36, 37, 38, 39, 29, 41, 42, 43,
+ 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 30, 29, 0, 0, 7, 8, 0,
+ 0, 0, 3, 3, 67, 68, 7, 8, 12, 0, 0, 12, 12, 12, 24, 25, 0, 0, 0, 3,
+ 25, 31, 32, 33, 34, 35, 36, 37, 38, 39, 0, 41, 42, 43, 44, 45, 46,
+ 47, 48, 49, 50, 51, 52, 0, 1, 2, 29, 0, 30, 0, 7, 8, 0, 0, 0, 3, 0,
+ 67, 68, 7, 8, 0, 0, 0, 12, 12, 3, 24, 25, 22, 0, 22, 0, 0, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 22, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ 50, 51, 52, 0, 1, 2, 89, 30, 29, 29, 7, 8, 0, 0, 0, 3, 3, 67, 68,
+ 7, 8, 0, 0, 0, 12, 88, 0, 24, 25, 0, 0, 0, 0, 0, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 29, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ 52, 0, 1, 2, 29, 29, 29, 0, 7, 8, 0, 0, 0, 3, 0, 67, 68, 7, 8, 0,
+ 0, 0, 12, 0, 0, 24, 25, 0, 0, 22, 0, 0, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 1, 2,
+ 0, 0, 29, 29, 7, 8, 0, 0, 0, 25, 0, 67, 68, 0, 0, 0, 0, 0, 0, 0, 0,
+ 24, 25, 0, 0, 25, 25, 0, 31, 32, 33, 34, 35, 36, 37, 38, 39, 29,
+ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 30, 88, 29, 29, 0,
+ 0, 29, 0, 1, 2, 3, 4, 5, 6, 67, 68, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 0, 0, 26, 27, 28, 29, 30, 0, 1, 2, 3,
+ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 53, 23, 30, 56, 26, 27, 28, 0, 0, 1, 2, 3, 4, 5, 6, 0, 69, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 0, 26, 27,
+ 28, 29, 30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 53, 23, 0, 56, 26, 27, 28, 0, 0, 1, 2, 3,
+ 4, 5, 6, 0, 69, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 0, 0, 26, 27, 28, 29, 30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 53, 23, 0, 56, 26, 27,
+ 28, 0, 0, 1, 2, 3, 4, 5, 6, 0, 69, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 0, 0, 26, 27, 28, 29, 30, 0, 1, 2, 3,
+ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 53, 23, 0, 56, 26, 27, 28, 0, 0, 1, 2, 3, 4, 5, 6, 0, 69, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 0, 26, 27,
+ 28, 29, 30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 53, 23, 0, 56, 0, 1, 2, 3, 4, 5, 6, 0, 0,
+ 9, 10, 11, 69, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 0,
+ 26, 27, 28, 29, 30, 24, 0, 1, 2, 0, 4, 5, 6, 0, 40, 9, 10, 11, 0,
+ 13, 14, 15, 16, 17, 0, 0, 0, 53, 29, 0, 56, 0, 1, 2, 3, 4, 5, 6,
+ 29, 0, 9, 10, 11, 69, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 29, 0, 26, 27, 28, 29, 30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 53, 23, 0, 56, 0, 1, 2, 0,
+ 4, 5, 6, 0, 0, 9, 10, 11, 69, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 0, 22, 26, 27, 28, 29, 30, 0, 24, 0, 3, 4, 5, 6, 7, 8, 40,
+ 0, 0, 12, 0, 0, 22, 0, 0, 0, 42, 43, 0, 53, 0, 22, 56, 0, 1, 2, 0,
+ 4, 5, 6, 22, 24, 9, 10, 11, 69, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 29, 40, 26, 27, 28, 29, 30, 0, 81, 0, 0, 0, 0, 0, 0, 54,
+ 40, 0, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 0, 53, 0, 22, 56, 0,
+ 1, 2, 22, 4, 5, 6, 29, 24, 9, 10, 11, 69, 13, 14, 15, 16, 17, 18,
+ 19, 20, 21, 22, 23, 0, 0, 26, 27, 28, 29, 30, 0, 1, 2, 3, 4, 5, 6,
+ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 53, 23, 0,
+ 56, 0, 1, 2, 0, 4, 5, 6, 0, 0, 9, 10, 11, 69, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 0, 22, 26, 27, 28, 29, 30, 0, 1, 2, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 53,
+ 23, 0, 56, 26, 27, 28, 0, 0, 1, 2, 3, 4, 5, 6, 0, 69, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 0, 26, 27, 28,
+ 22, 30, 0, 0, 1, 2, 3, 4, 5, 6, 0, 40, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 0, 0, 26, 27, 28, 0, 30, 0, 0, 1,
+ 2, 3, 4, 5, 6, 0, 40, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 0, 0, 26, 27, 28, 0, 30, 0, 0, 1, 2, 3, 4, 5, 6, 0,
+ 40, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0,
+ 0, 26, 27, 28, 0, 30, 0, 0, 1, 2, 3, 4, 5, 6, 0, 40, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 0, 26, 27, 28, 0,
+ 30, 0, 3, 4, 5, 6, 7, 8, 0, 0, 40, 12, 3, 4, 5, 6, 7, 8, 24, 25, 0,};
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test058/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test058/A_in.js
new file mode 100644
index 0000000..189318a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test058/A_in.js
@@ -0,0 +1,135 @@
+package org.eclipse.wst.jsdt.internal.compiler.parser;
+
+
+
+import java.io.*;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.core.compiler.InvalidInputException;
+import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
+import org.eclipse.wst.jsdt.internal.compiler.ast.*;
+import org.eclipse.wst.jsdt.internal.compiler.env.ICompilationUnit;
+import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.wst.jsdt.internal.compiler.impl.ReferenceContext;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BindingIds;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.CompilerModifiers;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeIds;
+import org.eclipse.wst.jsdt.internal.compiler.parser.diagnose.DiagnoseParser;
+import org.eclipse.wst.jsdt.internal.compiler.problem.AbortCompilation;
+import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemReporter;
+import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemSeverities;
+import org.eclipse.wst.jsdt.internal.compiler.util.Util;
+
+
+public class Parser
+ implements BindingIds, ParserBasicInformation, TerminalTokens,
+ CompilerModifiers, OperatorIds, TypeIds {
+
+ protected ProblemReporter problemReporter;
+ public int firstToken; // handle for multiple parsing goals
+ public int lastAct; //handle for multiple parsing goals
+ protected ReferenceContext referenceContext;
+ public int currentToken;
+ private int synchronizedBlockSourceStart;
+
+ //error recovery management
+ protected int lastCheckPoint;
+ protected RecoveredElement currentElement;
+ public static boolean VERBOSE_RECOVERY = false;
+ protected boolean restartRecovery;
+ protected int listLength; // for recovering some incomplete list (interfaces, throws or parameters)
+ protected boolean hasError;
+ protected boolean hasReportedError;
+ public static boolean fineErrorDiagnose = true; //TODO remove the static modifier when new diagnose is ready
+ public boolean reportSyntaxErrorIsRequired = true;
+ public boolean reportOnlyOneSyntaxError = false;
+ protected int recoveredStaticInitializerStart;
+ protected int lastIgnoredToken, nextIgnoredToken;
+ protected int lastErrorEndPosition;
+ protected boolean ignoreNextOpeningBrace;
+
+ // assert is 1.4 feature only
+ protected long sourceLevel;
+
+ //internal data for the automat
+ protected final static int StackIncrement = 255;
+ protected int stateStackTop;
+ protected int[] stack = new int[StackIncrement];
+
+ //scanner token
+ public Scanner scanner;
+
+ //ast stack
+ final static int AstStackIncrement = 100;
+ protected int astPtr;
+ protected AstNode[] astStack =
+ new AstNode[AstStackIncrement];
+ protected int astLengthPtr;
+ protected int[] astLengthStack;
+ public CompilationUnitDeclaration compilationUnit; /*the result from parse()*/
+ AstNode[] noAstNodes =
+ new AstNode[AstStackIncrement];
+
+ //expression stack
+ final static int ExpressionStackIncrement = 100;
+ protected int expressionPtr;
+ protected Expression[] expressionStack =
+ new Expression[ExpressionStackIncrement];
+ protected int expressionLengthPtr;
+ protected int[] expressionLengthStack;
+ Expression[] noExpressions =
+ new Expression[ExpressionStackIncrement];
+
+ //identifiers stacks
+ protected int identifierPtr;
+ protected char[][] identifierStack;
+ protected int identifierLengthPtr;
+ protected int[] identifierLengthStack;
+ protected long[] identifierPositionStack;
+
+ //positions , dimensions , .... (what ever is int) ..... stack
+ protected int intPtr;
+ protected int[] intStack;
+ protected int endPosition; //accurate only when used ! (the start position is pushed into intStack while the end the current one)
+ protected int endStatementPosition;
+ protected int lParenPos, rParenPos; //accurate only when used !
+
+ //modifiers dimensions nestedType etc.......
+ protected boolean optimizeStringLiterals = true;
+ protected int modifiers;
+ protected int modifiersSourceStart;
+ protected int nestedType, dimensions;
+ protected int[] nestedMethod; //the ptr is nestedType
+ protected int[] realBlockStack;
+ protected int realBlockPtr;
+ protected boolean diet = false; //tells the scanner to jump over some parts of the code/expressions like method bodies
+ protected int dietInt = 0; // if > 0 force the none-diet-parsing mode (even if diet if requested) [field parsing with anonymous inner classes...]
+ protected int[] variablesCounter;
+
+ public void foo() {
+
+ byte rhs[] = {
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 2, 2, 1, 1, 1, 1, 3, 4, 0, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 5, 1, 2, 1, 2, 2, 2, 1, 1, 2, 2, 2, 4, 1, 1, 1, 1, 2, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 2, 2, 1, 3, 1, 3, 1, 2, 1, 1, 1,
+ 3, 0, 3, 1, 1, 1, 1, 1, 1, 1, 4, 1, 3, 3, 7, 0, 0, 0, 0, 0, 2, 1,
+ 1, 1, 2, 2, 4, 4, 5, 4, 4, 2, 1, 2, 3, 3, 1, 3, 3, 1, 3, 1, 4, 0,
+ 2, 1, 2, 2, 4, 1, 1, 2, 5, 5, 7, 7, 7, 7, 2, 2, 3, 2, 2, 3, 1, 2,
+ 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 3, 3, 4, 1, 3, 4, 0, 1, 2, 1, 1,
+ 1, 1, 2, 3, 4, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 2, 1, 1, 1, 1, 1, 1, 1, 5, 7, 7, 6,
+ 2, 3, 3, 4, 1, 2, 2, 1, 2, 3, 2, 5, 5, 7, 9, 9, 1, 1, 1, 1, 3, 3,
+ 5, 2, 3, 2, 3, 3, 3, 5, 1, 3, 4, 1, 2, 5, 2, 1, 1, 1, 1, 1, 1, 1,
+ 3, 1, 1, 3, 3, 3, 3, 3, 1, 1, 5, 6, 8, 7, 2, 0, 2, 0, 1, 3, 3, 3,
+ 3, 4, 3, 4, 1, 2, 3, 2, 1, 1, 2, 2, 3, 3, 4, 6, 6, 4, 4, 4, 1, 1,
+ 1, 1, 2, 2, 0, 1, 1, 3, 3, 1, 3, 3, 1, 3, 3, 1, 6, 6, 5, 0, 0, 1,
+ 3, 3, 3, 1, 3, 3, 1, 3, 3, 3, 1, 3, 3, 3, 3, 3, 1, 3, 3, 1, 3, 1,
+ 3, 1, 3, 1, 3, 1, 3, 1, 5, 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 0, 1, 0, 1, 0, 1, 0,
+ 1
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test058/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test058/A_out.js
new file mode 100644
index 0000000..3627f59
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test058/A_out.js
@@ -0,0 +1,117 @@
+package org.eclipse.wst.jsdt.internal.compiler.parser;
+import java.io.*;
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.core.compiler.InvalidInputException;
+import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
+import org.eclipse.wst.jsdt.internal.compiler.ast.*;
+import org.eclipse.wst.jsdt.internal.compiler.env.ICompilationUnit;
+import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.wst.jsdt.internal.compiler.impl.ReferenceContext;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BindingIds;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.CompilerModifiers;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeIds;
+import org.eclipse.wst.jsdt.internal.compiler.parser.diagnose.DiagnoseParser;
+import org.eclipse.wst.jsdt.internal.compiler.problem.AbortCompilation;
+import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemReporter;
+import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemSeverities;
+import org.eclipse.wst.jsdt.internal.compiler.util.Util;
+public class Parser
+ implements
+ BindingIds,
+ ParserBasicInformation,
+ TerminalTokens,
+ CompilerModifiers,
+ OperatorIds,
+ TypeIds {
+ protected ProblemReporter problemReporter;
+ public int firstToken; // handle for multiple parsing goals
+ public int lastAct; //handle for multiple parsing goals
+ protected ReferenceContext referenceContext;
+ public int currentToken;
+ private int synchronizedBlockSourceStart;
+ //error recovery management
+ protected int lastCheckPoint;
+ protected RecoveredElement currentElement;
+ public static boolean VERBOSE_RECOVERY = false;
+ protected boolean restartRecovery;
+ protected int listLength; // for recovering some incomplete list (interfaces, throws or parameters)
+ protected boolean hasError;
+ protected boolean hasReportedError;
+ public static boolean fineErrorDiagnose = true; //TODO remove the static modifier when new diagnose is ready
+ public boolean reportSyntaxErrorIsRequired = true;
+ public boolean reportOnlyOneSyntaxError = false;
+ protected int recoveredStaticInitializerStart;
+ protected int lastIgnoredToken, nextIgnoredToken;
+ protected int lastErrorEndPosition;
+ protected boolean ignoreNextOpeningBrace;
+ // assert is 1.4 feature only
+ protected long sourceLevel;
+ //internal data for the automat
+ protected final static int StackIncrement = 255;
+ protected int stateStackTop;
+ protected int[] stack = new int[StackIncrement];
+ //scanner token
+ public Scanner scanner;
+ //ast stack
+ final static int AstStackIncrement = 100;
+ protected int astPtr;
+ protected AstNode[] astStack = new AstNode[AstStackIncrement];
+ protected int astLengthPtr;
+ protected int[] astLengthStack;
+ public CompilationUnitDeclaration compilationUnit; /*the result from parse()*/
+ AstNode[] noAstNodes = new AstNode[AstStackIncrement];
+ //expression stack
+ final static int ExpressionStackIncrement = 100;
+ protected int expressionPtr;
+ protected Expression[] expressionStack = new Expression[ExpressionStackIncrement];
+ protected int expressionLengthPtr;
+ protected int[] expressionLengthStack;
+ Expression[] noExpressions = new Expression[ExpressionStackIncrement];
+ //identifiers stacks
+ protected int identifierPtr;
+ protected char[][] identifierStack;
+ protected int identifierLengthPtr;
+ protected int[] identifierLengthStack;
+ protected long[] identifierPositionStack;
+ //positions , dimensions , .... (what ever is int) ..... stack
+ protected int intPtr;
+ protected int[] intStack;
+ protected int endPosition; //accurate only when used ! (the start position is pushed into intStack while the end the current one)
+ protected int endStatementPosition;
+ protected int lParenPos, rParenPos; //accurate only when used !
+ //modifiers dimensions nestedType etc.......
+ protected boolean optimizeStringLiterals = true;
+ protected int modifiers;
+ protected int modifiersSourceStart;
+ protected int nestedType, dimensions;
+ protected int[] nestedMethod; //the ptr is nestedType
+ protected int[] realBlockStack;
+ protected int realBlockPtr;
+ protected boolean diet = false; //tells the scanner to jump over some parts of the code/expressions like method bodies
+ protected int dietInt = 0; // if > 0 force the none-diet-parsing mode (even if diet if requested) [field parsing with anonymous inner classes...]
+ protected int[] variablesCounter;
+ public void foo() {
+ byte rhs[] = {0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 3, 4, 0, 1, 2, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 5, 1, 2, 1, 2, 2, 2, 1, 1, 2, 2, 2, 4, 1, 1,
+ 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 2, 2, 1, 3,
+ 1, 3, 1, 2, 1, 1, 1, 3, 0, 3, 1, 1, 1, 1, 1, 1, 1, 4, 1, 3, 3,
+ 7, 0, 0, 0, 0, 0, 2, 1, 1, 1, 2, 2, 4, 4, 5, 4, 4, 2, 1, 2, 3,
+ 3, 1, 3, 3, 1, 3, 1, 4, 0, 2, 1, 2, 2, 4, 1, 1, 2, 5, 5, 7, 7,
+ 7, 7, 2, 2, 3, 2, 2, 3, 1, 2, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1,
+ 3, 3, 4, 1, 3, 4, 0, 1, 2, 1, 1, 1, 1, 2, 3, 4, 0, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
+ 3, 2, 1, 1, 1, 1, 1, 1, 1, 5, 7, 7, 6, 2, 3, 3, 4, 1, 2, 2, 1,
+ 2, 3, 2, 5, 5, 7, 9, 9, 1, 1, 1, 1, 3, 3, 5, 2, 3, 2, 3, 3, 3,
+ 5, 1, 3, 4, 1, 2, 5, 2, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 3, 3, 3,
+ 3, 3, 1, 1, 5, 6, 8, 7, 2, 0, 2, 0, 1, 3, 3, 3, 3, 4, 3, 4, 1,
+ 2, 3, 2, 1, 1, 2, 2, 3, 3, 4, 6, 6, 4, 4, 4, 1, 1, 1, 1, 2, 2,
+ 0, 1, 1, 3, 3, 1, 3, 3, 1, 3, 3, 1, 6, 6, 5, 0, 0, 1, 3, 3, 3,
+ 1, 3, 3, 1, 3, 3, 3, 1, 3, 3, 3, 3, 3, 1, 3, 3, 1, 3, 1, 3, 1,
+ 3, 1, 3, 1, 3, 1, 5, 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 0, 1, 0, 1, 0, 1,
+ 0, 1};
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test059/Parser_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test059/Parser_in.js
new file mode 100644
index 0000000..c988c36
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test059/Parser_in.js
@@ -0,0 +1,293 @@
+package test0002;
+
+public class Parser
+ implements BindingIds, ParserBasicInformation, TerminalTokens,
+ CompilerModifiers, OperatorIds, TypeIds {
+
+ protected ProblemReporter problemReporter;
+ protected CompilerOptions options;
+ public int firstToken; // handle for multiple parsing goals
+ public int lastAct; //handle for multiple parsing goals
+ protected ReferenceContext referenceContext;
+ public int currentToken;
+ private int synchronizedBlockSourceStart;
+
+ //error recovery management
+ protected int lastCheckPoint;
+ protected RecoveredElement currentElement;
+ public static boolean VERBOSE_RECOVERY = false;
+ protected boolean restartRecovery;
+ protected int listLength; // for recovering some incomplete list (interfaces, throws or parameters)
+ protected boolean hasError;
+ protected boolean hasReportedError;
+ public static boolean fineErrorDiagnose = true; //TODO remove the static modifier when new diagnose is ready
+ public boolean reportSyntaxErrorIsRequired = true;
+ public boolean reportOnlyOneSyntaxError = false;
+ protected int recoveredStaticInitializerStart;
+ protected int lastIgnoredToken, nextIgnoredToken; // comment
+ protected int lastErrorEndPosition;
+ protected boolean ignoreNextOpeningBrace;
+
+ //internal data for the automat
+ protected final static int StackIncrement = 255;
+ protected int stateStackTop;
+ protected int[] stack = new int[StackIncrement];
+
+ //scanner token
+ public Scanner scanner;
+
+ //ast stack
+ final static int AstStackIncrement = 100;
+ protected int astPtr;
+ protected AstNode[] astStack =
+ new AstNode[AstStackIncrement];
+ protected int astLengthPtr;
+ protected int[] astLengthStack;
+ public CompilationUnitDeclaration compilationUnit; /*the result from parse()*/
+ AstNode[] noAstNodes =
+ new AstNode[AstStackIncrement];
+
+ //expression stack
+ final static int ExpressionStackIncrement = 100;
+ protected int expressionPtr;
+ protected Expression[] expressionStack =
+ new Expression[ExpressionStackIncrement];
+ protected int expressionLengthPtr;
+ protected int[] expressionLengthStack;
+ Expression[] noExpressions =
+ new Expression[ExpressionStackIncrement];
+
+ //identifiers stacks
+ protected int identifierPtr;
+ protected char[][] identifierStack;
+ protected int identifierLengthPtr;
+ protected int[] identifierLengthStack;
+ protected long[] identifierPositionStack;
+
+ //positions , dimensions , .... (what ever is int) ..... stack
+ protected int intPtr;
+ protected int[] intStack;
+ protected int endPosition; //accurate only when used ! (the start position is pushed into intStack while the end the current one)
+ protected int endStatementPosition;
+ protected int lParenPos, rParenPos; //accurate only when used !
+
+ //modifiers dimensions nestedType etc.......
+ protected boolean optimizeStringLiterals = true;
+ protected int modifiers;
+ protected int modifiersSourceStart;
+ protected int nestedType, dimensions;
+ protected int[] nestedMethod; //the ptr is nestedType
+ protected int[] realBlockStack;
+ protected int realBlockPtr;
+ protected boolean diet = false; //tells the scanner to jump over some parts of the code/expressions like method bodies
+ protected int dietInt = 0; // if > 0 force the none-diet-parsing mode (even if diet if requested) [field parsing with anonymous inner classes...]
+ protected int[] variablesCounter;
+
+ //===DATA===DATA===DATA===DATA===DATA===DATA===//
+ public final static byte rhs[] = {
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 2, 1, 1, 1, 1, 3, 4, 0, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1,
+ 2, 1, 2, 2, 2, 1, 1, 2, 2, 2, 4, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 2, 3, 3, 2, 2, 1, 3, 1, 3, 1, 2, 1, 1, 1, 3, 0, 3, 1, 1,
+ 1, 1, 1, 1, 1, 4, 1, 3, 3, 7, 0, 0, 0, 0, 0, 2, 1, 1, 1, 2, 2, 4, 4,
+ 5, 4, 4, 2, 1, 2, 3, 3, 1, 3, 3, 1, 3, 1, 4, 0, 2, 1, 2, 2, 4, 1, 1,
+ 2, 5, 5, 7, 7, 7, 7, 2, 2, 3, 2, 2, 3, 1, 2, 1, 2, 1, 1, 2, 2, 1, 1,
+ 1, 1, 1, 3, 3, 4, 1, 3, 4, 0, 1, 2, 1, 1, 1, 1, 2, 3, 4, 0, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3,
+ 2, 1, 1, 1, 1, 1, 1, 1, 5, 7, 7, 6, 2, 3, 3, 4, 1, 2, 2, 1, 2, 3, 2,
+ 5, 5, 7, 9, 9, 1, 1, 1, 1, 3, 3, 5, 2, 3, 2, 3, 3, 3, 5, 1, 3, 4, 1,
+ 2, 5, 2, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 3, 3, 3, 3, 3, 1, 1, 5, 6, 8,
+ 7, 2, 0, 2, 0, 1, 3, 3, 3, 3, 4, 3, 4, 1, 2, 3, 2, 1, 1, 2, 2, 3, 3,
+ 4, 6, 6, 4, 4, 4, 1, 1, 1, 1, 2, 2, 0, 1, 1, 3, 3, 1, 3, 3, 1, 3, 3,
+ 1, 6, 6, 5, 0, 0, 1, 3, 3, 3, 1, 3, 3, 1, 3, 3, 3, 1, 3, 3, 3, 3, 3,
+ 1, 3, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 5, 1, 1, 3, 3, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 2, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 0, 1, 0, 1,
+ 0, 1, 0, 1
+ };
+ public static char asb[] = null;
+ public static char asr[] = null;
+ public static char nasb[] = null;
+ public static char nasr[] = null;
+ public static char terminal_index[] = null;
+ public static char non_terminal_index[] = null;
+ public static char term_action[] = null;
+ public final static byte term_check[] = {
+ 0, 0, 0, 0, 0, 3, 0, 3, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 22, 0, 24, 25, 25, 4, 5, 6, 25, 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 54, 55, 0,
+ 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 0, 0, 0, 70, 71, 72, 73, 74,
+ 75, 76, 77, 78, 79, 80, 0, 0, 0, 84, 85, 18, 19, 7, 8, 0, 1, 2, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 22, 21, 24, 25, 0, 26, 27, 28, 55, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ 50, 51, 52, 81, 54, 55, 0, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 81,
+ 12, 83, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 0, 56, 0, 84, 85,
+ 0, 4, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 22, 0, 24, 25,
+ 24, 4, 5, 6, 55, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
+ 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 54, 55, 56, 57, 58, 59, 60, 61,
+ 62, 63, 64, 65, 66, 0, 0, 0, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 0, 13, 14, 15, 16, 17, 82, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
+ 11, 12, 22, 0, 24, 25, 0, 4, 5, 6, 0, 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 81, 54, 55,
+ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 41, 82, 0, 70, 71, 72, 73,
+ 74, 75, 76, 77, 78, 79, 80, 0, 13, 14, 15, 16, 17, 57, 7, 8, 0, 1, 2,
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 22, 0, 24, 25, 0, 4, 5, 6, 0, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ 50, 51, 52, 27, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 0,
+ 0, 0, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 0, 13, 14, 15, 16,
+ 17, 0, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 22, 0, 24, 25,
+ 3, 0, 22, 0, 24, 31, 32, 33, 34, 35, 36, 37, 38, 39, 91, 41, 42, 43,
+ 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 54, 55, 3, 57, 58, 59, 60, 61,
+ 62, 63, 64, 65, 66, 40, 82, 0, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 0, 83, 0, 0, 0, 18, 19, 7, 8, 0, 1, 2, 0, 4, 5, 6, 7, 8, 9,
+ 10, 11, 0, 22, 0, 24, 25, 22, 0, 24, 84, 85, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 54,
+ 55, 3, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 40, 0, 29, 70, 71, 72,
+ 73, 74, 75, 76, 77, 78, 79, 80, 81, 0, 83, 0, 1, 2, 0, 86, 7, 8, 0, 1,
+ 2, 91, 4, 5, 6, 7, 8, 9, 10, 11, 0, 22, 82, 24, 25, 87, 22, 89, 84,
+ 85, 31, 32, 33, 34, 35, 36, 37, 38, 39, 0, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 0, 54, 55, 70, 57, 58, 59, 60, 61, 62, 63, 64, 65,
+ 66, 0, 1, 2, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 0, 83, 0,
+ 1, 2, 0, 0, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 0, 0, 12, 22, 3, 24,
+ 25, 55, 9, 10, 11, 0, 31, 32, 33, 34, 35, 36, 37, 38, 39, 21, 41, 42,
+ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 54, 55, 0, 57, 58, 59, 60,
+ 61, 62, 63, 64, 65, 66, 0, 1, 2, 70, 71, 72, 73, 74, 75, 76, 77, 78,
+ 79, 80, 0, 26, 0, 28, 55, 0, 87, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0,
+ 0, 0, 12, 22, 0, 24, 25, 24, 9, 10, 11, 25, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 20, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 30,
+ 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 0, 0, 0, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, 79, 80, 0, 0, 0, 0, 3, 0, 3, 7, 8, 0, 1,
+ 2, 3, 4, 5, 6, 7, 8, 0, 0, 0, 12, 22, 0, 24, 25, 25, 9, 10, 11, 25,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48,
+ 49, 50, 51, 52, 0, 54, 69, 0, 1, 2, 0, 4, 5, 6, 7, 8, 25, 7, 8, 0, 0,
+ 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 22, 0, 24, 25, 0, 0, 0, 0,
+ 0, 31, 32, 33, 34, 35, 36, 37, 38, 39, 12, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 23, 54, 0, 30, 0, 3, 4, 5, 6, 7, 8, 7, 8, 40, 12,
+ 104, 40, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 24, 25, 55, 0,
+ 56, 0, 3, 31, 32, 33, 34, 35, 36, 37, 38, 39, 103, 41, 42, 43, 44, 45,
+ 46, 47, 48, 49, 50, 51, 52, 24, 54, 0, 86, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 0, 1, 2, 41, 4, 5, 6, 7, 8, 9, 10, 11, 0, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 0, 23, 0, 3, 26, 27, 28, 7, 8, 7, 8, 0, 12, 0, 0,
+ 1, 2, 0, 0, 0, 54, 7, 8, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 22,
+ 0, 22, 0, 3, 24, 25, 29, 30, 29, 30, 30, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 90, 55,
+ 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 67, 68, 0, 1, 2, 69, 0,
+ 0, 22, 7, 8, 90, 0, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 0,
+ 87, 24, 25, 4, 5, 6, 7, 8, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 0, 55, 0, 1, 2, 55, 55,
+ 0, 0, 7, 8, 55, 12, 67, 68, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 25, 24, 25,
+ 12, 30, 22, 24, 25, 31, 32, 33, 34, 35, 36, 37, 38, 39, 0, 41, 42, 43,
+ 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 0, 55, 0, 1, 2, 53, 7, 8, 0, 7,
+ 8, 25, 12, 67, 68, 56, 0, 1, 2, 3, 4, 5, 6, 7, 8, 25, 24, 25, 12, 0,
+ 22, 0, 0, 31, 32, 33, 34, 35, 36, 37, 38, 39, 0, 41, 42, 43, 44, 45,
+ 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 29, 0, 0, 0, 7, 8, 4, 5, 6, 7, 8,
+ 67, 68, 69, 0, 1, 2, 0, 4, 5, 6, 24, 25, 9, 10, 11, 25, 24, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
+ 51, 52, 0, 1, 2, 0, 0, 0, 0, 7, 8, 3, 0, 24, 7, 8, 67, 68, 69, 0, 1,
+ 2, 0, 4, 5, 6, 24, 25, 22, 24, 41, 42, 43, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 30, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 0, 55,
+ 89, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 67, 68, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 30, 0, 26, 27, 28, 29, 30, 0, 0, 1, 2,
+ 0, 4, 5, 6, 40, 40, 9, 10, 11, 0, 13, 14, 15, 16, 17, 18, 19, 20, 53,
+ 29, 56, 56, 22, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 24, 69, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 0, 26, 27, 28, 29, 30,
+ 0, 0, 1, 2, 0, 4, 5, 6, 69, 40, 9, 10, 11, 0, 13, 14, 15, 16, 17, 18,
+ 19, 0, 53, 29, 3, 56, 22, 0, 7, 8, 0, 1, 2, 3, 4, 5, 6, 24, 69, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 88, 55, 26, 27,
+ 28, 29, 30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 40, 0, 0, 0, 1, 2, 0, 4, 5, 6,
+ 7, 8, 0, 53, 12, 3, 56, 0, 0, 7, 8, 0, 1, 2, 3, 4, 5, 6, 22, 69, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 0, 26, 27,
+ 28, 29, 30, 0, 0, 9, 10, 11, 40, 40, 0, 54, 40, 56, 57, 58, 59, 60,
+ 61, 62, 63, 64, 65, 66, 0, 53, 22, 3, 56, 0, 0, 7, 8, 0, 1, 2, 3, 4,
+ 5, 6, 30, 69, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 0, 0, 26, 27, 28, 29, 30, 0, 0, 69, 3, 4, 5, 6, 7, 8, 40, 0, 1, 2,
+ 12, 0, 22, 0, 7, 8, 25, 55, 0, 53, 30, 0, 56, 25, 3, 4, 5, 6, 7, 8,
+ 12, 24, 25, 12, 0, 69, 25, 24, 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
+ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 29, 0, 0, 0,
+ 7, 8, 0, 0, 24, 3, 3, 67, 68, 7, 8, 0, 0, 0, 12, 12, 0, 24, 25, 22, 9,
+ 10, 11, 24, 31, 32, 33, 34, 35, 36, 37, 38, 39, 20, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 0, 0, 0, 3, 7, 8, 0, 0, 0, 3,
+ 3, 67, 68, 7, 8, 7, 8, 0, 12, 12, 53, 24, 25, 22, 22, 25, 0, 0, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ 50, 51, 52, 0, 1, 2, 90, 0, 0, 0, 7, 8, 0, 0, 0, 3, 3, 67, 68, 7, 8,
+ 7, 8, 0, 12, 12, 0, 24, 25, 22, 7, 8, 24, 24, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 1,
+ 2, 69, 0, 0, 0, 7, 8, 0, 0, 0, 3, 3, 67, 68, 7, 8, 7, 8, 0, 12, 12,
+ 53, 24, 25, 22, 7, 8, 24, 24, 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
+ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 0, 0, 0, 0,
+ 7, 8, 0, 0, 0, 3, 3, 67, 68, 7, 8, 12, 0, 0, 12, 12, 12, 24, 25, 23,
+ 40, 0, 25, 25, 31, 32, 33, 34, 35, 36, 37, 38, 39, 12, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 0, 0, 0, 40, 7, 8, 0, 0, 0,
+ 3, 3, 67, 68, 7, 8, 0, 0, 53, 12, 12, 12, 24, 25, 0, 0, 25, 25, 25,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48,
+ 49, 50, 51, 52, 0, 1, 2, 0, 0, 0, 40, 7, 8, 0, 0, 24, 3, 3, 67, 68, 7,
+ 8, 0, 0, 55, 12, 12, 0, 24, 25, 22, 0, 25, 24, 0, 31, 32, 33, 34, 35,
+ 36, 37, 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0,
+ 1, 2, 29, 0, 0, 29, 7, 8, 0, 0, 0, 3, 3, 67, 68, 7, 8, 0, 0, 0, 12,
+ 12, 3, 24, 25, 0, 40, 0, 25, 25, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 29, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 0, 0, 40,
+ 0, 7, 8, 0, 0, 0, 3, 3, 67, 68, 7, 8, 0, 0, 0, 12, 12, 3, 24, 25, 0,
+ 0, 25, 25, 24, 31, 32, 33, 34, 35, 36, 37, 38, 39, 29, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 29, 0, 40, 0, 7, 8, 0, 0, 0,
+ 3, 3, 67, 68, 7, 8, 0, 0, 0, 12, 12, 3, 24, 25, 0, 0, 0, 25, 24, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 29, 41, 42, 43, 44, 45, 46, 47, 48,
+ 49, 50, 51, 52, 0, 1, 2, 30, 29, 0, 0, 7, 8, 0, 0, 0, 3, 3, 67, 68, 7,
+ 8, 12, 0, 0, 12, 12, 12, 24, 25, 0, 0, 0, 3, 25, 31, 32, 33, 34, 35,
+ 36, 37, 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0,
+ 1, 2, 29, 0, 30, 0, 7, 8, 0, 0, 0, 3, 0, 67, 68, 7, 8, 0, 0, 0, 12,
+ 12, 3, 24, 25, 22, 0, 22, 0, 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 22, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 89, 30,
+ 29, 29, 7, 8, 0, 0, 0, 3, 3, 67, 68, 7, 8, 0, 0, 0, 12, 88, 0, 24, 25,
+ 0, 0, 0, 0, 0, 31, 32, 33, 34, 35, 36, 37, 38, 39, 29, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 29, 29, 29, 0, 7, 8, 0, 0, 0,
+ 3, 0, 67, 68, 7, 8, 0, 0, 0, 12, 0, 0, 24, 25, 0, 0, 22, 0, 0, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
+ 51, 52, 0, 1, 2, 0, 0, 29, 29, 7, 8, 0, 0, 0, 25, 0, 67, 68, 0, 0, 0,
+ 0, 0, 0, 0, 0, 24, 25, 0, 0, 25, 25, 0, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 29, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 30, 88,
+ 29, 29, 0, 0, 29, 0, 1, 2, 3, 4, 5, 6, 67, 68, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 0, 26, 27, 28, 29, 30, 0, 1, 2,
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 53, 23, 30, 56, 26, 27, 28, 0, 0, 1, 2, 3, 4, 5, 6, 0, 69, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 0, 26, 27, 28, 29,
+ 30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
+ 19, 20, 21, 53, 23, 0, 56, 26, 27, 28, 0, 0, 1, 2, 3, 4, 5, 6, 0, 69,
+ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 0, 26,
+ 27, 28, 29, 30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 53, 23, 0, 56, 26, 27, 28, 0, 0, 1, 2, 3, 4,
+ 5, 6, 0, 69, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 0, 0, 26, 27, 28, 29, 30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 53, 23, 0, 56, 26, 27, 28, 0,
+ 0, 1, 2, 3, 4, 5, 6, 0, 69, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 0, 0, 26, 27, 28, 29, 30, 0, 1, 2, 3, 4, 5, 6, 7, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 53, 23, 0, 56, 0,
+ 1, 2, 3, 4, 5, 6, 0, 0, 9, 10, 11, 69, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 0, 0, 26, 27, 28, 29, 30, 24, 0, 1, 2, 0, 4, 5, 6, 0, 40,
+ 9, 10, 11, 0, 13, 14, 15, 16, 17, 0, 0, 0, 53, 29, 0, 56, 0, 1, 2, 3,
+ 4, 5, 6, 29, 0, 9, 10, 11, 69, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 29, 0, 26, 27, 28, 29, 30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 53, 23, 0, 56, 0, 1, 2, 0, 4,
+ 5, 6, 0, 0, 9, 10, 11, 69, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 0, 22, 26, 27, 28, 29, 30, 0, 24, 0, 3, 4, 5, 6, 7, 8, 40, 0, 0, 12,
+ 0, 0, 22, 0, 0, 0, 42, 43, 0, 53, 0, 22, 56, 0, 1, 2, 0, 4, 5, 6, 22,
+ 24, 9, 10, 11, 69, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 29, 40,
+ 26, 27, 28, 29, 30, 0, 81, 0, 0, 0, 0, 0, 0, 54, 40, 0, 57, 58, 59,
+ 60, 61, 62, 63, 64, 65, 66, 0, 53, 0, 22, 56, 0, 1, 2, 22, 4, 5, 6,
+ 29, 24, 9, 10, 11, 69, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0,
+ 0, 26, 27, 28, 29, 30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, 53, 23, 0, 56, 0, 1, 2, 0, 4, 5, 6, 0,
+ 0, 9, 10, 11, 69, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 22,
+ 26, 27, 28, 29, 30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 53, 23, 0, 56, 26, 27, 28, 0, 0, 1, 2, 3,
+ 4, 5, 6, 0, 69, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 0, 0, 26, 27, 28, 22, 30, 0, 0, 1, 2, 3, 4, 5, 6, 0, 40, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 0, 26, 27, 28,
+ 0, 30, 0, 0, 1, 2, 3, 4, 5, 6, 0, 40, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 0, 0, 26, 27, 28, 0, 30, 0, 0, 1, 2, 3, 4,
+ 5, 6, 0, 40, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 0, 0, 26, 27, 28, 0, 30, 0, 0, 1, 2, 3, 4, 5, 6, 0, 40, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 0, 26, 27, 28, 0,
+ 30, 0, 3, 4, 5, 6, 7, 8, 0, 0, 40, 12, 3, 4, 5, 6, 7, 8, 24, 25, 0,
+ };
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test059/Parser_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test059/Parser_out.js
new file mode 100644
index 0000000..413d273
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test059/Parser_out.js
@@ -0,0 +1,289 @@
+package test0002;
+public class Parser
+ implements
+ BindingIds,
+ ParserBasicInformation,
+ TerminalTokens,
+ CompilerModifiers,
+ OperatorIds,
+ TypeIds {
+ protected ProblemReporter problemReporter;
+ protected CompilerOptions options;
+ public int firstToken; // handle for multiple parsing goals
+ public int lastAct; //handle for multiple parsing goals
+ protected ReferenceContext referenceContext;
+ public int currentToken;
+ private int synchronizedBlockSourceStart;
+ //error recovery management
+ protected int lastCheckPoint;
+ protected RecoveredElement currentElement;
+ public static boolean VERBOSE_RECOVERY = false;
+ protected boolean restartRecovery;
+ protected int listLength; // for recovering some incomplete list (interfaces, throws or parameters)
+ protected boolean hasError;
+ protected boolean hasReportedError;
+ public static boolean fineErrorDiagnose = true; //TODO remove the static modifier when new diagnose is ready
+ public boolean reportSyntaxErrorIsRequired = true;
+ public boolean reportOnlyOneSyntaxError = false;
+ protected int recoveredStaticInitializerStart;
+ protected int lastIgnoredToken, nextIgnoredToken; // comment
+ protected int lastErrorEndPosition;
+ protected boolean ignoreNextOpeningBrace;
+ //internal data for the automat
+ protected final static int StackIncrement = 255;
+ protected int stateStackTop;
+ protected int[] stack = new int[StackIncrement];
+ //scanner token
+ public Scanner scanner;
+ //ast stack
+ final static int AstStackIncrement = 100;
+ protected int astPtr;
+ protected AstNode[] astStack = new AstNode[AstStackIncrement];
+ protected int astLengthPtr;
+ protected int[] astLengthStack;
+ public CompilationUnitDeclaration compilationUnit; /*the result from parse()*/
+ AstNode[] noAstNodes = new AstNode[AstStackIncrement];
+ //expression stack
+ final static int ExpressionStackIncrement = 100;
+ protected int expressionPtr;
+ protected Expression[] expressionStack = new Expression[ExpressionStackIncrement];
+ protected int expressionLengthPtr;
+ protected int[] expressionLengthStack;
+ Expression[] noExpressions = new Expression[ExpressionStackIncrement];
+ //identifiers stacks
+ protected int identifierPtr;
+ protected char[][] identifierStack;
+ protected int identifierLengthPtr;
+ protected int[] identifierLengthStack;
+ protected long[] identifierPositionStack;
+ //positions , dimensions , .... (what ever is int) ..... stack
+ protected int intPtr;
+ protected int[] intStack;
+ protected int endPosition; //accurate only when used ! (the start position is pushed into intStack while the end the current one)
+ protected int endStatementPosition;
+ protected int lParenPos, rParenPos; //accurate only when used !
+ //modifiers dimensions nestedType etc.......
+ protected boolean optimizeStringLiterals = true;
+ protected int modifiers;
+ protected int modifiersSourceStart;
+ protected int nestedType, dimensions;
+ protected int[] nestedMethod; //the ptr is nestedType
+ protected int[] realBlockStack;
+ protected int realBlockPtr;
+ protected boolean diet = false; //tells the scanner to jump over some parts of the code/expressions like method bodies
+ protected int dietInt = 0; // if > 0 force the none-diet-parsing mode (even if diet if requested) [field parsing with anonymous inner classes...]
+ protected int[] variablesCounter;
+ //===DATA===DATA===DATA===DATA===DATA===DATA===//
+ public final static byte rhs[] = {0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 3, 4, 0, 1, 2, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 2, 1, 2, 2, 2, 1, 1, 2, 2, 2, 4,
+ 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 2, 2, 1,
+ 3, 1, 3, 1, 2, 1, 1, 1, 3, 0, 3, 1, 1, 1, 1, 1, 1, 1, 4, 1, 3, 3,
+ 7, 0, 0, 0, 0, 0, 2, 1, 1, 1, 2, 2, 4, 4, 5, 4, 4, 2, 1, 2, 3, 3,
+ 1, 3, 3, 1, 3, 1, 4, 0, 2, 1, 2, 2, 4, 1, 1, 2, 5, 5, 7, 7, 7, 7,
+ 2, 2, 3, 2, 2, 3, 1, 2, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 3, 3, 4,
+ 1, 3, 4, 0, 1, 2, 1, 1, 1, 1, 2, 3, 4, 0, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 2, 1, 1, 1,
+ 1, 1, 1, 1, 5, 7, 7, 6, 2, 3, 3, 4, 1, 2, 2, 1, 2, 3, 2, 5, 5, 7,
+ 9, 9, 1, 1, 1, 1, 3, 3, 5, 2, 3, 2, 3, 3, 3, 5, 1, 3, 4, 1, 2, 5,
+ 2, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 3, 3, 3, 3, 3, 1, 1, 5, 6, 8, 7,
+ 2, 0, 2, 0, 1, 3, 3, 3, 3, 4, 3, 4, 1, 2, 3, 2, 1, 1, 2, 2, 3, 3,
+ 4, 6, 6, 4, 4, 4, 1, 1, 1, 1, 2, 2, 0, 1, 1, 3, 3, 1, 3, 3, 1, 3,
+ 3, 1, 6, 6, 5, 0, 0, 1, 3, 3, 3, 1, 3, 3, 1, 3, 3, 3, 1, 3, 3, 3,
+ 3, 3, 1, 3, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 5, 1, 1, 3, 3, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2,
+ 0, 0, 1, 0, 1, 0, 1, 0, 1};
+ public static char asb[] = null;
+ public static char asr[] = null;
+ public static char nasb[] = null;
+ public static char nasr[] = null;
+ public static char terminal_index[] = null;
+ public static char non_terminal_index[] = null;
+ public static char term_action[] = null;
+ public final static byte term_check[] = {0, 0, 0, 0, 0, 3, 0, 3, 7, 8, 0,
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 22, 0, 24, 25, 25, 4, 5, 6,
+ 25, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
+ 47, 48, 49, 50, 51, 52, 0, 54, 55, 0, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 0, 0, 0, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 0,
+ 0, 0, 84, 85, 18, 19, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 22, 21, 24, 25, 0, 26, 27, 28, 55, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 81, 54,
+ 55, 0, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 81, 12, 83, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, 79, 80, 0, 56, 0, 84, 85, 0, 4, 7, 8,
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 22, 0, 24, 25, 24, 4, 5,
+ 6, 55, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
+ 46, 47, 48, 49, 50, 51, 52, 0, 54, 55, 56, 57, 58, 59, 60, 61, 62,
+ 63, 64, 65, 66, 0, 0, 0, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 0, 13, 14, 15, 16, 17, 82, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
+ 10, 11, 12, 22, 0, 24, 25, 0, 4, 5, 6, 0, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 81,
+ 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 41, 82, 0, 70,
+ 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 0, 13, 14, 15, 16, 17, 57,
+ 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 22, 0, 24, 25, 0,
+ 4, 5, 6, 0, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 27, 54, 55, 56, 57, 58, 59, 60, 61,
+ 62, 63, 64, 65, 66, 0, 0, 0, 70, 71, 72, 73, 74, 75, 76, 77, 78,
+ 79, 80, 0, 13, 14, 15, 16, 17, 0, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8,
+ 9, 10, 11, 0, 22, 0, 24, 25, 3, 0, 22, 0, 24, 31, 32, 33, 34, 35,
+ 36, 37, 38, 39, 91, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
+ 0, 54, 55, 3, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 40, 82, 0,
+ 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 0, 83, 0, 0, 0, 18,
+ 19, 7, 8, 0, 1, 2, 0, 4, 5, 6, 7, 8, 9, 10, 11, 0, 22, 0, 24, 25,
+ 22, 0, 24, 84, 85, 31, 32, 33, 34, 35, 36, 37, 38, 39, 0, 41, 42,
+ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 54, 55, 3, 57, 58, 59,
+ 60, 61, 62, 63, 64, 65, 66, 40, 0, 29, 70, 71, 72, 73, 74, 75, 76,
+ 77, 78, 79, 80, 81, 0, 83, 0, 1, 2, 0, 86, 7, 8, 0, 1, 2, 91, 4, 5,
+ 6, 7, 8, 9, 10, 11, 0, 22, 82, 24, 25, 87, 22, 89, 84, 85, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ 50, 51, 52, 0, 54, 55, 70, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
+ 0, 1, 2, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 0, 83, 0,
+ 1, 2, 0, 0, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 0, 0, 12, 22, 3,
+ 24, 25, 55, 9, 10, 11, 0, 31, 32, 33, 34, 35, 36, 37, 38, 39, 21,
+ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 54, 55, 0, 57,
+ 58, 59, 60, 61, 62, 63, 64, 65, 66, 0, 1, 2, 70, 71, 72, 73, 74,
+ 75, 76, 77, 78, 79, 80, 0, 26, 0, 28, 55, 0, 87, 7, 8, 0, 1, 2, 3,
+ 4, 5, 6, 7, 8, 0, 0, 0, 12, 22, 0, 24, 25, 24, 9, 10, 11, 25, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 20, 41, 42, 43, 44, 45, 46, 47, 48,
+ 49, 50, 51, 52, 30, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
+ 66, 0, 0, 0, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 0, 0, 0,
+ 0, 3, 0, 3, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 0, 0, 12, 22, 0,
+ 24, 25, 25, 9, 10, 11, 25, 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
+ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 54, 69, 0, 1, 2,
+ 0, 4, 5, 6, 7, 8, 25, 7, 8, 0, 0, 70, 71, 72, 73, 74, 75, 76, 77,
+ 78, 79, 80, 22, 0, 24, 25, 0, 0, 0, 0, 0, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 12, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 23,
+ 54, 0, 30, 0, 3, 4, 5, 6, 7, 8, 7, 8, 40, 12, 104, 40, 70, 71, 72,
+ 73, 74, 75, 76, 77, 78, 79, 80, 24, 25, 55, 0, 56, 0, 3, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 103, 41, 42, 43, 44, 45, 46, 47, 48,
+ 49, 50, 51, 52, 24, 54, 0, 86, 57, 58, 59, 60, 61, 62, 63, 64, 65,
+ 66, 0, 1, 2, 41, 4, 5, 6, 7, 8, 9, 10, 11, 0, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, 0, 23, 0, 3, 26, 27, 28, 7, 8, 7, 8, 0, 12, 0, 0,
+ 1, 2, 0, 0, 0, 54, 7, 8, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
+ 22, 0, 22, 0, 3, 24, 25, 29, 30, 29, 30, 30, 31, 32, 33, 34, 35,
+ 36, 37, 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
+ 0, 90, 55, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 67, 68,
+ 0, 1, 2, 69, 0, 0, 22, 7, 8, 90, 0, 92, 93, 94, 95, 96, 97, 98, 99,
+ 100, 101, 102, 0, 87, 24, 25, 4, 5, 6, 7, 8, 31, 32, 33, 34, 35,
+ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
+ 0, 0, 55, 0, 1, 2, 55, 55, 0, 0, 7, 8, 55, 12, 67, 68, 0, 0, 1, 2,
+ 3, 4, 5, 6, 7, 8, 25, 24, 25, 12, 30, 22, 24, 25, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ 52, 0, 0, 55, 0, 1, 2, 53, 7, 8, 0, 7, 8, 25, 12, 67, 68, 56, 0, 1,
+ 2, 3, 4, 5, 6, 7, 8, 25, 24, 25, 12, 0, 22, 0, 0, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ 52, 0, 1, 2, 29, 0, 0, 0, 7, 8, 4, 5, 6, 7, 8, 67, 68, 69, 0, 1, 2,
+ 0, 4, 5, 6, 24, 25, 9, 10, 11, 25, 24, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 1, 2,
+ 0, 0, 0, 0, 7, 8, 3, 0, 24, 7, 8, 67, 68, 69, 0, 1, 2, 0, 4, 5, 6,
+ 24, 25, 22, 24, 41, 42, 43, 31, 32, 33, 34, 35, 36, 37, 38, 39, 30,
+ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 0, 55, 89, 0, 0,
+ 0, 0, 1, 2, 3, 4, 5, 6, 67, 68, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 30, 0, 26, 27, 28, 29, 30, 0, 0, 1, 2, 0,
+ 4, 5, 6, 40, 40, 9, 10, 11, 0, 13, 14, 15, 16, 17, 18, 19, 20, 53,
+ 29, 56, 56, 22, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 24, 69, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 0, 26, 27, 28,
+ 29, 30, 0, 0, 1, 2, 0, 4, 5, 6, 69, 40, 9, 10, 11, 0, 13, 14, 15,
+ 16, 17, 18, 19, 0, 53, 29, 3, 56, 22, 0, 7, 8, 0, 1, 2, 3, 4, 5, 6,
+ 24, 69, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 88, 55, 26, 27, 28, 29, 30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 40, 0, 0, 0,
+ 1, 2, 0, 4, 5, 6, 7, 8, 0, 53, 12, 3, 56, 0, 0, 7, 8, 0, 1, 2, 3,
+ 4, 5, 6, 22, 69, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 0, 0, 26, 27, 28, 29, 30, 0, 0, 9, 10, 11, 40, 40, 0, 54,
+ 40, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 0, 53, 22, 3, 56,
+ 0, 0, 7, 8, 0, 1, 2, 3, 4, 5, 6, 30, 69, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 0, 0, 26, 27, 28, 29, 30, 0, 0, 69,
+ 3, 4, 5, 6, 7, 8, 40, 0, 1, 2, 12, 0, 22, 0, 7, 8, 25, 55, 0, 53,
+ 30, 0, 56, 25, 3, 4, 5, 6, 7, 8, 12, 24, 25, 12, 0, 69, 25, 24, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48,
+ 49, 50, 51, 52, 0, 1, 2, 29, 0, 0, 0, 7, 8, 0, 0, 24, 3, 3, 67, 68,
+ 7, 8, 0, 0, 0, 12, 12, 0, 24, 25, 22, 9, 10, 11, 24, 31, 32, 33,
+ 34, 35, 36, 37, 38, 39, 20, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
+ 51, 52, 0, 1, 2, 0, 0, 0, 3, 7, 8, 0, 0, 0, 3, 3, 67, 68, 7, 8, 7,
+ 8, 0, 12, 12, 53, 24, 25, 22, 22, 25, 0, 0, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 0, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0,
+ 1, 2, 90, 0, 0, 0, 7, 8, 0, 0, 0, 3, 3, 67, 68, 7, 8, 7, 8, 0, 12,
+ 12, 0, 24, 25, 22, 7, 8, 24, 24, 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 0, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 69,
+ 0, 0, 0, 7, 8, 0, 0, 0, 3, 3, 67, 68, 7, 8, 7, 8, 0, 12, 12, 53,
+ 24, 25, 22, 7, 8, 24, 24, 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
+ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 0, 0, 0,
+ 0, 7, 8, 0, 0, 0, 3, 3, 67, 68, 7, 8, 12, 0, 0, 12, 12, 12, 24, 25,
+ 23, 40, 0, 25, 25, 31, 32, 33, 34, 35, 36, 37, 38, 39, 12, 41, 42,
+ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 0, 0, 0, 40, 7, 8,
+ 0, 0, 0, 3, 3, 67, 68, 7, 8, 0, 0, 53, 12, 12, 12, 24, 25, 0, 0,
+ 25, 25, 25, 31, 32, 33, 34, 35, 36, 37, 38, 39, 0, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 0, 0, 0, 40, 7, 8, 0, 0,
+ 24, 3, 3, 67, 68, 7, 8, 0, 0, 55, 12, 12, 0, 24, 25, 22, 0, 25, 24,
+ 0, 31, 32, 33, 34, 35, 36, 37, 38, 39, 0, 41, 42, 43, 44, 45, 46,
+ 47, 48, 49, 50, 51, 52, 0, 1, 2, 29, 0, 0, 29, 7, 8, 0, 0, 0, 3, 3,
+ 67, 68, 7, 8, 0, 0, 0, 12, 12, 3, 24, 25, 0, 40, 0, 25, 25, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 29, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ 50, 51, 52, 0, 1, 2, 0, 0, 40, 0, 7, 8, 0, 0, 0, 3, 3, 67, 68, 7,
+ 8, 0, 0, 0, 12, 12, 3, 24, 25, 0, 0, 25, 25, 24, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 29, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ 52, 0, 1, 2, 29, 0, 40, 0, 7, 8, 0, 0, 0, 3, 3, 67, 68, 7, 8, 0, 0,
+ 0, 12, 12, 3, 24, 25, 0, 0, 0, 25, 24, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 29, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 1,
+ 2, 30, 29, 0, 0, 7, 8, 0, 0, 0, 3, 3, 67, 68, 7, 8, 12, 0, 0, 12,
+ 12, 12, 24, 25, 0, 0, 0, 3, 25, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 0, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 29, 0,
+ 30, 0, 7, 8, 0, 0, 0, 3, 0, 67, 68, 7, 8, 0, 0, 0, 12, 12, 3, 24,
+ 25, 22, 0, 22, 0, 0, 31, 32, 33, 34, 35, 36, 37, 38, 39, 22, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 89, 30, 29,
+ 29, 7, 8, 0, 0, 0, 3, 3, 67, 68, 7, 8, 0, 0, 0, 12, 88, 0, 24, 25,
+ 0, 0, 0, 0, 0, 31, 32, 33, 34, 35, 36, 37, 38, 39, 29, 41, 42, 43,
+ 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 29, 29, 29, 0, 7, 8,
+ 0, 0, 0, 3, 0, 67, 68, 7, 8, 0, 0, 0, 12, 0, 0, 24, 25, 0, 0, 22,
+ 0, 0, 31, 32, 33, 34, 35, 36, 37, 38, 39, 0, 41, 42, 43, 44, 45,
+ 46, 47, 48, 49, 50, 51, 52, 0, 1, 2, 0, 0, 29, 29, 7, 8, 0, 0, 0,
+ 25, 0, 67, 68, 0, 0, 0, 0, 0, 0, 0, 0, 24, 25, 0, 0, 25, 25, 0, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 29, 41, 42, 43, 44, 45, 46, 47, 48,
+ 49, 50, 51, 52, 30, 88, 29, 29, 0, 0, 29, 0, 1, 2, 3, 4, 5, 6, 67,
+ 68, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0,
+ 0, 26, 27, 28, 29, 30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, 20, 21, 53, 23, 30, 56, 26, 27, 28, 0,
+ 0, 1, 2, 3, 4, 5, 6, 0, 69, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
+ 19, 20, 21, 22, 23, 0, 0, 26, 27, 28, 29, 30, 0, 1, 2, 3, 4, 5, 6,
+ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 53, 23, 0,
+ 56, 26, 27, 28, 0, 0, 1, 2, 3, 4, 5, 6, 0, 69, 9, 10, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 0, 26, 27, 28, 29, 30,
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
+ 19, 20, 21, 53, 23, 0, 56, 26, 27, 28, 0, 0, 1, 2, 3, 4, 5, 6, 0,
+ 69, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0,
+ 0, 26, 27, 28, 29, 30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, 20, 21, 53, 23, 0, 56, 26, 27, 28, 0,
+ 0, 1, 2, 3, 4, 5, 6, 0, 69, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
+ 19, 20, 21, 22, 23, 0, 0, 26, 27, 28, 29, 30, 0, 1, 2, 3, 4, 5, 6,
+ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 53, 23, 0,
+ 56, 0, 1, 2, 3, 4, 5, 6, 0, 0, 9, 10, 11, 69, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 0, 0, 26, 27, 28, 29, 30, 24, 0, 1, 2, 0,
+ 4, 5, 6, 0, 40, 9, 10, 11, 0, 13, 14, 15, 16, 17, 0, 0, 0, 53, 29,
+ 0, 56, 0, 1, 2, 3, 4, 5, 6, 29, 0, 9, 10, 11, 69, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 29, 0, 26, 27, 28, 29, 30, 0, 1, 2, 3,
+ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 53, 23, 0, 56, 0, 1, 2, 0, 4, 5, 6, 0, 0, 9, 10, 11, 69, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 22, 26, 27, 28, 29, 30, 0,
+ 24, 0, 3, 4, 5, 6, 7, 8, 40, 0, 0, 12, 0, 0, 22, 0, 0, 0, 42, 43,
+ 0, 53, 0, 22, 56, 0, 1, 2, 0, 4, 5, 6, 22, 24, 9, 10, 11, 69, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 29, 40, 26, 27, 28, 29, 30,
+ 0, 81, 0, 0, 0, 0, 0, 0, 54, 40, 0, 57, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 0, 53, 0, 22, 56, 0, 1, 2, 22, 4, 5, 6, 29, 24, 9, 10, 11,
+ 69, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 0, 26, 27, 28,
+ 29, 30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 53, 23, 0, 56, 0, 1, 2, 0, 4, 5, 6, 0, 0, 9,
+ 10, 11, 69, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 22, 26,
+ 27, 28, 29, 30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 53, 23, 0, 56, 26, 27, 28, 0, 0, 1, 2,
+ 3, 4, 5, 6, 0, 69, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 0, 0, 26, 27, 28, 22, 30, 0, 0, 1, 2, 3, 4, 5, 6, 0,
+ 40, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0,
+ 0, 26, 27, 28, 0, 30, 0, 0, 1, 2, 3, 4, 5, 6, 0, 40, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 0, 26, 27, 28, 0,
+ 30, 0, 0, 1, 2, 3, 4, 5, 6, 0, 40, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 0, 0, 26, 27, 28, 0, 30, 0, 0, 1, 2, 3,
+ 4, 5, 6, 0, 40, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 0, 0, 26, 27, 28, 0, 30, 0, 3, 4, 5, 6, 7, 8, 0, 0, 40, 12,
+ 3, 4, 5, 6, 7, 8, 24, 25, 0,};
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test060/Parser_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test060/Parser_in.js
new file mode 100644
index 0000000..0b66703
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test060/Parser_in.js
@@ -0,0 +1,135 @@
+package org.eclipse.wst.jsdt.internal.compiler.parser;
+
+
+
+import java.io.*;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.core.compiler.InvalidInputException;
+import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
+import org.eclipse.wst.jsdt.internal.compiler.ast.*;
+import org.eclipse.wst.jsdt.internal.compiler.env.ICompilationUnit;
+import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.wst.jsdt.internal.compiler.impl.ReferenceContext;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BindingIds;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.CompilerModifiers;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeIds;
+import org.eclipse.wst.jsdt.internal.compiler.parser.diagnose.DiagnoseParser;
+import org.eclipse.wst.jsdt.internal.compiler.problem.AbortCompilation;
+import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemReporter;
+import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemSeverities;
+import org.eclipse.wst.jsdt.internal.compiler.util.Util;
+
+
+public class Parser
+ implements BindingIds, ParserBasicInformation, TerminalTokens,
+ CompilerModifiers, OperatorIds, TypeIds {
+
+ protected ProblemReporter problemReporter;
+ public int firstToken; // handle for multiple parsing goals
+ public int lastAct; //handle for multiple parsing goals
+ protected ReferenceContext referenceContext;
+ public int currentToken;
+ private int synchronizedBlockSourceStart;
+
+ //error recovery management
+ protected int lastCheckPoint;
+ protected RecoveredElement currentElement;
+ public static boolean VERBOSE_RECOVERY = false;
+ protected boolean restartRecovery;
+ protected int listLength; // for recovering some incomplete list (interfaces, throws or parameters)
+ protected boolean hasError;
+ protected boolean hasReportedError;
+ public static boolean fineErrorDiagnose = true; //TODO remove the static modifier when new diagnose is ready
+ public boolean reportSyntaxErrorIsRequired = true;
+ public boolean reportOnlyOneSyntaxError = false;
+ protected int recoveredStaticInitializerStart;
+ protected int lastIgnoredToken, nextIgnoredToken;
+ protected int lastErrorEndPosition;
+ protected boolean ignoreNextOpeningBrace;
+
+ // assert is 1.4 feature only
+ protected long sourceLevel;
+
+ //internal data for the automat
+ protected final static int StackIncrement = 255;
+ protected int stateStackTop;
+ protected int[] stack = new int[StackIncrement];
+
+ //scanner token
+ public Scanner scanner;
+
+ //ast stack
+ final static int AstStackIncrement = 100;
+ protected int astPtr;
+ protected AstNode[] astStack =
+ new AstNode[AstStackIncrement];
+ protected int astLengthPtr;
+ protected int[] astLengthStack;
+ public CompilationUnitDeclaration compilationUnit; /*the result from parse()*/
+ AstNode[] noAstNodes =
+ new AstNode[AstStackIncrement];
+
+ //expression stack
+ final static int ExpressionStackIncrement = 100;
+ protected int expressionPtr;
+ protected Expression[] expressionStack =
+ new Expression[ExpressionStackIncrement];
+ protected int expressionLengthPtr;
+ protected int[] expressionLengthStack;
+ Expression[] noExpressions =
+ new Expression[ExpressionStackIncrement];
+
+ //identifiers stacks
+ protected int identifierPtr;
+ protected char[][] identifierStack;
+ protected int identifierLengthPtr;
+ protected int[] identifierLengthStack;
+ protected long[] identifierPositionStack;
+
+ //positions , dimensions , .... (what ever is int) ..... stack
+ protected int intPtr;
+ protected int[] intStack;
+ protected int endPosition; //accurate only when used ! (the start position is pushed into intStack while the end the current one)
+ protected int endStatementPosition;
+ protected int lParenPos, rParenPos; //accurate only when used !
+
+ //modifiers dimensions nestedType etc.......
+ protected boolean optimizeStringLiterals = true;
+ protected int modifiers;
+ protected int modifiersSourceStart;
+ protected int nestedType, dimensions;
+ protected int[] nestedMethod; //the ptr is nestedType
+ protected int[] realBlockStack;
+ protected int realBlockPtr;
+ protected boolean diet = false; //tells the scanner to jump over some parts of the code/expressions like method bodies
+ protected int dietInt = 0; // if > 0 force the none-diet-parsing mode (even if diet if requested) [field parsing with anonymous inner classes...]
+ protected int[] variablesCounter;
+
+ public void foo() {
+
+ byte rhs[] = {
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 2, 2, 1, 1, 1, 1, 3, 4, 0, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 5, 1, 2, 1, 2, 2, 2, 1, 1, 2, 2, 2, 4, 1, 1, 1, 1, 2, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 2, 2, 1, 3, 1, 3, 1, 2, 1, 1, 1,
+ 3, 0, 3, 1, 1, 1, 1, 1, 1, 1, 4, 1, 3, 3, 7, 0, 0, 0, 0, 0, 2, 1,
+ 1, 1, 2, 2, 4, 4, 5, 4, 4, 2, 1, 2, 3, 3, 1, 3, 3, 1, 3, 1, 4, 0,
+ 2, 1, 2, 2, 4, 1, 1, 2, 5, 5, 7, 7, 7, 7, 2, 2, 3, 2, 2, 3, 1, 2,
+ 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 3, 3, 4, 1, 3, 4, 0, 1, 2, 1, 1,
+ 1, 1, 2, 3, 4, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 2, 1, 1, 1, 1, 1, 1, 1, 5, 7, 7, 6,
+ 2, 3, 3, 4, 1, 2, 2, 1, 2, 3, 2, 5, 5, 7, 9, 9, 1, 1, 1, 1, 3, 3,
+ 5, 2, 3, 2, 3, 3, 3, 5, 1, 3, 4, 1, 2, 5, 2, 1, 1, 1, 1, 1, 1, 1,
+ 3, 1, 1, 3, 3, 3, 3, 3, 1, 1, 5, 6, 8, 7, 2, 0, 2, 0, 1, 3, 3, 3,
+ 3, 4, 3, 4, 1, 2, 3, 2, 1, 1, 2, 2, 3, 3, 4, 6, 6, 4, 4, 4, 1, 1,
+ 1, 1, 2, 2, 0, 1, 1, 3, 3, 1, 3, 3, 1, 3, 3, 1, 6, 6, 5, 0, 0, 1,
+ 3, 3, 3, 1, 3, 3, 1, 3, 3, 3, 1, 3, 3, 3, 3, 3, 1, 3, 3, 1, 3, 1,
+ 3, 1, 3, 1, 3, 1, 3, 1, 5, 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 0, 1, 0, 1, 0, 1, 0,
+ 1
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test060/Parser_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test060/Parser_out.js
new file mode 100644
index 0000000..c7447d4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test060/Parser_out.js
@@ -0,0 +1,117 @@
+package org.eclipse.wst.jsdt.internal.compiler.parser;
+import java.io.*;
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.core.compiler.InvalidInputException;
+import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
+import org.eclipse.wst.jsdt.internal.compiler.ast.*;
+import org.eclipse.wst.jsdt.internal.compiler.env.ICompilationUnit;
+import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.wst.jsdt.internal.compiler.impl.ReferenceContext;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BindingIds;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.CompilerModifiers;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeIds;
+import org.eclipse.wst.jsdt.internal.compiler.parser.diagnose.DiagnoseParser;
+import org.eclipse.wst.jsdt.internal.compiler.problem.AbortCompilation;
+import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemReporter;
+import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemSeverities;
+import org.eclipse.wst.jsdt.internal.compiler.util.Util;
+public class Parser
+ implements
+ BindingIds,
+ ParserBasicInformation,
+ TerminalTokens,
+ CompilerModifiers,
+ OperatorIds,
+ TypeIds {
+ protected ProblemReporter problemReporter;
+ public int firstToken; // handle for multiple parsing goals
+ public int lastAct; //handle for multiple parsing goals
+ protected ReferenceContext referenceContext;
+ public int currentToken;
+ private int synchronizedBlockSourceStart;
+ //error recovery management
+ protected int lastCheckPoint;
+ protected RecoveredElement currentElement;
+ public static boolean VERBOSE_RECOVERY = false;
+ protected boolean restartRecovery;
+ protected int listLength; // for recovering some incomplete list (interfaces, throws or parameters)
+ protected boolean hasError;
+ protected boolean hasReportedError;
+ public static boolean fineErrorDiagnose = true; //TODO remove the static modifier when new diagnose is ready
+ public boolean reportSyntaxErrorIsRequired = true;
+ public boolean reportOnlyOneSyntaxError = false;
+ protected int recoveredStaticInitializerStart;
+ protected int lastIgnoredToken, nextIgnoredToken;
+ protected int lastErrorEndPosition;
+ protected boolean ignoreNextOpeningBrace;
+ // assert is 1.4 feature only
+ protected long sourceLevel;
+ //internal data for the automat
+ protected final static int StackIncrement = 255;
+ protected int stateStackTop;
+ protected int[] stack = new int[StackIncrement];
+ //scanner token
+ public Scanner scanner;
+ //ast stack
+ final static int AstStackIncrement = 100;
+ protected int astPtr;
+ protected AstNode[] astStack = new AstNode[AstStackIncrement];
+ protected int astLengthPtr;
+ protected int[] astLengthStack;
+ public CompilationUnitDeclaration compilationUnit; /*the result from parse()*/
+ AstNode[] noAstNodes = new AstNode[AstStackIncrement];
+ //expression stack
+ final static int ExpressionStackIncrement = 100;
+ protected int expressionPtr;
+ protected Expression[] expressionStack = new Expression[ExpressionStackIncrement];
+ protected int expressionLengthPtr;
+ protected int[] expressionLengthStack;
+ Expression[] noExpressions = new Expression[ExpressionStackIncrement];
+ //identifiers stacks
+ protected int identifierPtr;
+ protected char[][] identifierStack;
+ protected int identifierLengthPtr;
+ protected int[] identifierLengthStack;
+ protected long[] identifierPositionStack;
+ //positions , dimensions , .... (what ever is int) ..... stack
+ protected int intPtr;
+ protected int[] intStack;
+ protected int endPosition; //accurate only when used ! (the start position is pushed into intStack while the end the current one)
+ protected int endStatementPosition;
+ protected int lParenPos, rParenPos; //accurate only when used !
+ //modifiers dimensions nestedType etc.......
+ protected boolean optimizeStringLiterals = true;
+ protected int modifiers;
+ protected int modifiersSourceStart;
+ protected int nestedType, dimensions;
+ protected int[] nestedMethod; //the ptr is nestedType
+ protected int[] realBlockStack;
+ protected int realBlockPtr;
+ protected boolean diet = false; //tells the scanner to jump over some parts of the code/expressions like method bodies
+ protected int dietInt = 0; // if > 0 force the none-diet-parsing mode (even if diet if requested) [field parsing with anonymous inner classes...]
+ protected int[] variablesCounter;
+ public void foo() {
+ byte rhs[] = {0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 3, 4, 0, 1, 2, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 5, 1, 2, 1, 2, 2, 2, 1, 1, 2, 2, 2, 4, 1, 1,
+ 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 2, 2, 1, 3,
+ 1, 3, 1, 2, 1, 1, 1, 3, 0, 3, 1, 1, 1, 1, 1, 1, 1, 4, 1, 3, 3,
+ 7, 0, 0, 0, 0, 0, 2, 1, 1, 1, 2, 2, 4, 4, 5, 4, 4, 2, 1, 2, 3,
+ 3, 1, 3, 3, 1, 3, 1, 4, 0, 2, 1, 2, 2, 4, 1, 1, 2, 5, 5, 7, 7,
+ 7, 7, 2, 2, 3, 2, 2, 3, 1, 2, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1,
+ 3, 3, 4, 1, 3, 4, 0, 1, 2, 1, 1, 1, 1, 2, 3, 4, 0, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
+ 3, 2, 1, 1, 1, 1, 1, 1, 1, 5, 7, 7, 6, 2, 3, 3, 4, 1, 2, 2, 1,
+ 2, 3, 2, 5, 5, 7, 9, 9, 1, 1, 1, 1, 3, 3, 5, 2, 3, 2, 3, 3, 3,
+ 5, 1, 3, 4, 1, 2, 5, 2, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 3, 3, 3,
+ 3, 3, 1, 1, 5, 6, 8, 7, 2, 0, 2, 0, 1, 3, 3, 3, 3, 4, 3, 4, 1,
+ 2, 3, 2, 1, 1, 2, 2, 3, 3, 4, 6, 6, 4, 4, 4, 1, 1, 1, 1, 2, 2,
+ 0, 1, 1, 3, 3, 1, 3, 3, 1, 3, 3, 1, 6, 6, 5, 0, 0, 1, 3, 3, 3,
+ 1, 3, 3, 1, 3, 3, 3, 1, 3, 3, 3, 3, 3, 1, 3, 3, 1, 3, 1, 3, 1,
+ 3, 1, 3, 1, 3, 1, 5, 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 0, 1, 0, 1, 0, 1,
+ 0, 1};
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test061/Parser_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test061/Parser_in.js
new file mode 100644
index 0000000..189318a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test061/Parser_in.js
@@ -0,0 +1,135 @@
+package org.eclipse.wst.jsdt.internal.compiler.parser;
+
+
+
+import java.io.*;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.core.compiler.InvalidInputException;
+import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
+import org.eclipse.wst.jsdt.internal.compiler.ast.*;
+import org.eclipse.wst.jsdt.internal.compiler.env.ICompilationUnit;
+import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.wst.jsdt.internal.compiler.impl.ReferenceContext;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BindingIds;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.CompilerModifiers;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeIds;
+import org.eclipse.wst.jsdt.internal.compiler.parser.diagnose.DiagnoseParser;
+import org.eclipse.wst.jsdt.internal.compiler.problem.AbortCompilation;
+import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemReporter;
+import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemSeverities;
+import org.eclipse.wst.jsdt.internal.compiler.util.Util;
+
+
+public class Parser
+ implements BindingIds, ParserBasicInformation, TerminalTokens,
+ CompilerModifiers, OperatorIds, TypeIds {
+
+ protected ProblemReporter problemReporter;
+ public int firstToken; // handle for multiple parsing goals
+ public int lastAct; //handle for multiple parsing goals
+ protected ReferenceContext referenceContext;
+ public int currentToken;
+ private int synchronizedBlockSourceStart;
+
+ //error recovery management
+ protected int lastCheckPoint;
+ protected RecoveredElement currentElement;
+ public static boolean VERBOSE_RECOVERY = false;
+ protected boolean restartRecovery;
+ protected int listLength; // for recovering some incomplete list (interfaces, throws or parameters)
+ protected boolean hasError;
+ protected boolean hasReportedError;
+ public static boolean fineErrorDiagnose = true; //TODO remove the static modifier when new diagnose is ready
+ public boolean reportSyntaxErrorIsRequired = true;
+ public boolean reportOnlyOneSyntaxError = false;
+ protected int recoveredStaticInitializerStart;
+ protected int lastIgnoredToken, nextIgnoredToken;
+ protected int lastErrorEndPosition;
+ protected boolean ignoreNextOpeningBrace;
+
+ // assert is 1.4 feature only
+ protected long sourceLevel;
+
+ //internal data for the automat
+ protected final static int StackIncrement = 255;
+ protected int stateStackTop;
+ protected int[] stack = new int[StackIncrement];
+
+ //scanner token
+ public Scanner scanner;
+
+ //ast stack
+ final static int AstStackIncrement = 100;
+ protected int astPtr;
+ protected AstNode[] astStack =
+ new AstNode[AstStackIncrement];
+ protected int astLengthPtr;
+ protected int[] astLengthStack;
+ public CompilationUnitDeclaration compilationUnit; /*the result from parse()*/
+ AstNode[] noAstNodes =
+ new AstNode[AstStackIncrement];
+
+ //expression stack
+ final static int ExpressionStackIncrement = 100;
+ protected int expressionPtr;
+ protected Expression[] expressionStack =
+ new Expression[ExpressionStackIncrement];
+ protected int expressionLengthPtr;
+ protected int[] expressionLengthStack;
+ Expression[] noExpressions =
+ new Expression[ExpressionStackIncrement];
+
+ //identifiers stacks
+ protected int identifierPtr;
+ protected char[][] identifierStack;
+ protected int identifierLengthPtr;
+ protected int[] identifierLengthStack;
+ protected long[] identifierPositionStack;
+
+ //positions , dimensions , .... (what ever is int) ..... stack
+ protected int intPtr;
+ protected int[] intStack;
+ protected int endPosition; //accurate only when used ! (the start position is pushed into intStack while the end the current one)
+ protected int endStatementPosition;
+ protected int lParenPos, rParenPos; //accurate only when used !
+
+ //modifiers dimensions nestedType etc.......
+ protected boolean optimizeStringLiterals = true;
+ protected int modifiers;
+ protected int modifiersSourceStart;
+ protected int nestedType, dimensions;
+ protected int[] nestedMethod; //the ptr is nestedType
+ protected int[] realBlockStack;
+ protected int realBlockPtr;
+ protected boolean diet = false; //tells the scanner to jump over some parts of the code/expressions like method bodies
+ protected int dietInt = 0; // if > 0 force the none-diet-parsing mode (even if diet if requested) [field parsing with anonymous inner classes...]
+ protected int[] variablesCounter;
+
+ public void foo() {
+
+ byte rhs[] = {
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 2, 2, 1, 1, 1, 1, 3, 4, 0, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 5, 1, 2, 1, 2, 2, 2, 1, 1, 2, 2, 2, 4, 1, 1, 1, 1, 2, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 2, 2, 1, 3, 1, 3, 1, 2, 1, 1, 1,
+ 3, 0, 3, 1, 1, 1, 1, 1, 1, 1, 4, 1, 3, 3, 7, 0, 0, 0, 0, 0, 2, 1,
+ 1, 1, 2, 2, 4, 4, 5, 4, 4, 2, 1, 2, 3, 3, 1, 3, 3, 1, 3, 1, 4, 0,
+ 2, 1, 2, 2, 4, 1, 1, 2, 5, 5, 7, 7, 7, 7, 2, 2, 3, 2, 2, 3, 1, 2,
+ 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 3, 3, 4, 1, 3, 4, 0, 1, 2, 1, 1,
+ 1, 1, 2, 3, 4, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 2, 1, 1, 1, 1, 1, 1, 1, 5, 7, 7, 6,
+ 2, 3, 3, 4, 1, 2, 2, 1, 2, 3, 2, 5, 5, 7, 9, 9, 1, 1, 1, 1, 3, 3,
+ 5, 2, 3, 2, 3, 3, 3, 5, 1, 3, 4, 1, 2, 5, 2, 1, 1, 1, 1, 1, 1, 1,
+ 3, 1, 1, 3, 3, 3, 3, 3, 1, 1, 5, 6, 8, 7, 2, 0, 2, 0, 1, 3, 3, 3,
+ 3, 4, 3, 4, 1, 2, 3, 2, 1, 1, 2, 2, 3, 3, 4, 6, 6, 4, 4, 4, 1, 1,
+ 1, 1, 2, 2, 0, 1, 1, 3, 3, 1, 3, 3, 1, 3, 3, 1, 6, 6, 5, 0, 0, 1,
+ 3, 3, 3, 1, 3, 3, 1, 3, 3, 3, 1, 3, 3, 3, 3, 3, 1, 3, 3, 1, 3, 1,
+ 3, 1, 3, 1, 3, 1, 3, 1, 5, 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 0, 1, 0, 1, 0, 1, 0,
+ 1
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test061/Parser_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test061/Parser_out.js
new file mode 100644
index 0000000..c33e11f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test061/Parser_out.js
@@ -0,0 +1,117 @@
+package org.eclipse.wst.jsdt.internal.compiler.parser;
+import java.io.*;
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+import org.eclipse.wst.jsdt.core.compiler.InvalidInputException;
+import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
+import org.eclipse.wst.jsdt.internal.compiler.ast.*;
+import org.eclipse.wst.jsdt.internal.compiler.env.ICompilationUnit;
+import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.wst.jsdt.internal.compiler.impl.ReferenceContext;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.BindingIds;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.CompilerModifiers;
+import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeIds;
+import org.eclipse.wst.jsdt.internal.compiler.parser.diagnose.DiagnoseParser;
+import org.eclipse.wst.jsdt.internal.compiler.problem.AbortCompilation;
+import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemReporter;
+import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemSeverities;
+import org.eclipse.wst.jsdt.internal.compiler.util.Util;
+public class Parser
+ implements
+ BindingIds,
+ ParserBasicInformation,
+ TerminalTokens,
+ CompilerModifiers,
+ OperatorIds,
+ TypeIds {
+ protected ProblemReporter problemReporter;
+ public int firstToken; // handle for multiple parsing goals
+ public int lastAct; //handle for multiple parsing goals
+ protected ReferenceContext referenceContext;
+ public int currentToken;
+ private int synchronizedBlockSourceStart;
+ //error recovery management
+ protected int lastCheckPoint;
+ protected RecoveredElement currentElement;
+ public static boolean VERBOSE_RECOVERY = false;
+ protected boolean restartRecovery;
+ protected int listLength; // for recovering some incomplete list (interfaces, throws or parameters)
+ protected boolean hasError;
+ protected boolean hasReportedError;
+ public static boolean fineErrorDiagnose = true; //TODO remove the static modifier when new diagnose is ready
+ public boolean reportSyntaxErrorIsRequired = true;
+ public boolean reportOnlyOneSyntaxError = false;
+ protected int recoveredStaticInitializerStart;
+ protected int lastIgnoredToken, nextIgnoredToken;
+ protected int lastErrorEndPosition;
+ protected boolean ignoreNextOpeningBrace;
+ // assert is 1.4 feature only
+ protected long sourceLevel;
+ //internal data for the automat
+ protected final static int StackIncrement = 255;
+ protected int stateStackTop;
+ protected int[] stack = new int[StackIncrement];
+ //scanner token
+ public Scanner scanner;
+ //ast stack
+ final static int AstStackIncrement = 100;
+ protected int astPtr;
+ protected AstNode[] astStack = new AstNode[AstStackIncrement];
+ protected int astLengthPtr;
+ protected int[] astLengthStack;
+ public CompilationUnitDeclaration compilationUnit; /*the result from parse()*/
+ AstNode[] noAstNodes = new AstNode[AstStackIncrement];
+ //expression stack
+ final static int ExpressionStackIncrement = 100;
+ protected int expressionPtr;
+ protected Expression[] expressionStack = new Expression[ExpressionStackIncrement];
+ protected int expressionLengthPtr;
+ protected int[] expressionLengthStack;
+ Expression[] noExpressions = new Expression[ExpressionStackIncrement];
+ //identifiers stacks
+ protected int identifierPtr;
+ protected char[][] identifierStack;
+ protected int identifierLengthPtr;
+ protected int[] identifierLengthStack;
+ protected long[] identifierPositionStack;
+ //positions , dimensions , .... (what ever is int) ..... stack
+ protected int intPtr;
+ protected int[] intStack;
+ protected int endPosition; //accurate only when used ! (the start position is pushed into intStack while the end the current one)
+ protected int endStatementPosition;
+ protected int lParenPos, rParenPos; //accurate only when used !
+ //modifiers dimensions nestedType etc.......
+ protected boolean optimizeStringLiterals = true;
+ protected int modifiers;
+ protected int modifiersSourceStart;
+ protected int nestedType, dimensions;
+ protected int[] nestedMethod; //the ptr is nestedType
+ protected int[] realBlockStack;
+ protected int realBlockPtr;
+ protected boolean diet = false; //tells the scanner to jump over some parts of the code/expressions like method bodies
+ protected int dietInt = 0; // if > 0 force the none-diet-parsing mode (even if diet if requested) [field parsing with anonymous inner classes...]
+ protected int[] variablesCounter;
+ public void foo() {
+ byte rhs[] = {0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 3, 4, 0, 1, 2, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 5, 1, 2, 1, 2, 2, 2, 1, 1, 2, 2, 2, 4, 1, 1,
+ 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 2, 2, 1, 3,
+ 1, 3, 1, 2, 1, 1, 1, 3, 0, 3, 1, 1, 1, 1, 1, 1, 1, 4, 1, 3, 3,
+ 7, 0, 0, 0, 0, 0, 2, 1, 1, 1, 2, 2, 4, 4, 5, 4, 4, 2, 1, 2, 3,
+ 3, 1, 3, 3, 1, 3, 1, 4, 0, 2, 1, 2, 2, 4, 1, 1, 2, 5, 5, 7, 7,
+ 7, 7, 2, 2, 3, 2, 2, 3, 1, 2, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1,
+ 3, 3, 4, 1, 3, 4, 0, 1, 2, 1, 1, 1, 1, 2, 3, 4, 0, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
+ 3, 2, 1, 1, 1, 1, 1, 1, 1, 5, 7, 7, 6, 2, 3, 3, 4, 1, 2, 2, 1,
+ 2, 3, 2, 5, 5, 7, 9, 9, 1, 1, 1, 1, 3, 3, 5, 2, 3, 2, 3, 3, 3,
+ 5, 1, 3, 4, 1, 2, 5, 2, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 3, 3, 3,
+ 3, 3, 1, 1, 5, 6, 8, 7, 2, 0, 2, 0, 1, 3, 3, 3, 3, 4, 3, 4, 1,
+ 2, 3, 2, 1, 1, 2, 2, 3, 3, 4, 6, 6, 4, 4, 4, 1, 1, 1, 1, 2, 2,
+ 0, 1, 1, 3, 3, 1, 3, 3, 1, 3, 3, 1, 6, 6, 5, 0, 0, 1, 3, 3, 3,
+ 1, 3, 3, 1, 3, 3, 3, 1, 3, 3, 3, 3, 3, 1, 3, 3, 1, 3, 1, 3, 1,
+ 3, 1, 3, 1, 3, 1, 5, 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 0, 1, 0, 1, 0, 1,
+ 0, 1};
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test062/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test062/A_in.js
new file mode 100644
index 0000000..f3b4cdc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test062/A_in.js
@@ -0,0 +1 @@
+{ i=4; }System.out.println();j = 5; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test062/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test062/A_out.js
new file mode 100644
index 0000000..42045fb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test062/A_out.js
@@ -0,0 +1,5 @@
+{
+ i= 4;
+}
+System.out.println();
+j= 5; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test063/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test063/A_in.js
new file mode 100644
index 0000000..2e201b1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test063/A_in.js
@@ -0,0 +1,5 @@
+package test1;
+public class E {
+ public void foo() {goo();System.out.println();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test063/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test063/A_out.js
new file mode 100644
index 0000000..a4d9d35
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test063/A_out.js
@@ -0,0 +1,7 @@
+package test1;
+public class E {
+ public void foo() {
+ goo();
+ System.out.println();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test064/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test064/A_in.js
new file mode 100644
index 0000000..3445800
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test064/A_in.js
@@ -0,0 +1,10 @@
+package test1;
+import java.util.Vector;
+public class E {
+ private int fField1;
+ private int fField2;
+ public void foo1() {fField1 = fField2;
+ }
+ public int foo1(int i) {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test064/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test064/A_out.js
new file mode 100644
index 0000000..21ba23e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test064/A_out.js
@@ -0,0 +1,11 @@
+package test1;
+import java.util.Vector;
+public class E {
+ private int fField1;
+ private int fField2;
+ public void foo1() {
+ fField1 = fField2;
+ }
+ public int foo1(int i) {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test065/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test065/A_in.js
new file mode 100644
index 0000000..86b316c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test065/A_in.js
@@ -0,0 +1,14 @@
+public class E {
+ private int fField1;private String[] fField2;
+ public void foo1() {
+ fField2 = new String[] {"first stringssssssssssssssssssssssssssssssssssssssssssssss", //$NON-NLS-1$
+"second string", //$NON-NLS-1$
+"third string", //$NON-NLS-1$
+"fourth string", //$NON-NLS-1$
+"fifth string" //$NON-NLS-1$
+};
+ }
+ public int foo1(int i) {
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test065/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test065/A_out.js
new file mode 100644
index 0000000..b325161
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test065/A_out.js
@@ -0,0 +1,16 @@
+public class E {
+ private int fField1;
+ private String[] fField2;
+ public void foo1() {
+ fField2 = new String[]{
+ "first stringssssssssssssssssssssssssssssssssssssssssssssss", //$NON-NLS-1$
+ "second string", //$NON-NLS-1$
+ "third string", //$NON-NLS-1$
+ "fourth string", //$NON-NLS-1$
+ "fifth string" //$NON-NLS-1$
+ };
+ }
+ public int foo1(int i) {
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test066/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test066/A_in.js
new file mode 100644
index 0000000..7f8615e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test066/A_in.js
@@ -0,0 +1,14 @@
+public class E {
+ private int fField1;private String[] fField2;
+ public void foo1() {
+ fField2 = new String[] {"first string",
+"second string",
+"third string",
+"fourth string",
+"fifth string"
+};
+ }
+ public int foo1(int i) {
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test066/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test066/A_out.js
new file mode 100644
index 0000000..63b1208
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test066/A_out.js
@@ -0,0 +1,11 @@
+public class E {
+ private int fField1;
+ private String[] fField2;
+ public void foo1() {
+ fField2 = new String[]{"first string", "second string", "third string",
+ "fourth string", "fifth string"};
+ }
+ public int foo1(int i) {
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test067/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test067/A_in.js
new file mode 100644
index 0000000..c914c70
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test067/A_in.js
@@ -0,0 +1,14 @@
+public class E {
+ private int fField1;private String[] fField2;
+ public void foo1() {
+ fField2 = new String[] {"first string", //$NON-NLS-1$
+"second string", //$NON-NLS-1$
+"third string", //$NON-NLS-1$
+"fourth string", //$NON-NLS-1$
+"fifth string" //$NON-NLS-1$
+};
+ }
+ public int foo1(int i) {
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test067/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test067/A_out.js
new file mode 100644
index 0000000..27ad4fb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test067/A_out.js
@@ -0,0 +1,15 @@
+public class E {
+ private int fField1;
+ private String[] fField2;
+ public void foo1() {
+ fField2 = new String[]{"first string", //$NON-NLS-1$
+ "second string", //$NON-NLS-1$
+ "third string", //$NON-NLS-1$
+ "fourth string", //$NON-NLS-1$
+ "fifth string" //$NON-NLS-1$
+ };
+ }
+ public int foo1(int i) {
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test068/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test068/A_in.js
new file mode 100644
index 0000000..9730b0f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test068/A_in.js
@@ -0,0 +1,23 @@
+public static Compiler getCompiler() {
+ if (compiler == null) {
+ CompilerOptions options = new CompilerOptions();
+ options.handleImportProblemAsError(false);
+
+ compiler =
+ new Compiler(
+ null,
+ DefaultErrorHandlingPolicies.proceedWithAllProblems(),
+ options.getConfigurableOptions(Locale.getDefault()),
+ new ICompilerRequestor() {
+ private CompilationResult compilationResult; // toto
+ public void acceptResult(CompilationResult compilationResult) {
+ this.compilationResult = compilationResult;
+ }
+ public CompilationResult retrieveCompilationResult() {
+ return compilationResult;
+ }
+ },
+ compilerProblemFactory);
+ }
+ return compiler;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test068/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test068/A_out.js
new file mode 100644
index 0000000..620e8cf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test068/A_out.js
@@ -0,0 +1,21 @@
+public static Compiler getCompiler() {
+ if (compiler == null) {
+ CompilerOptions options = new CompilerOptions();
+ options.handleImportProblemAsError(false);
+ compiler = new Compiler(
+ null,
+ DefaultErrorHandlingPolicies.proceedWithAllProblems(),
+ options.getConfigurableOptions(Locale.getDefault()),
+ new ICompilerRequestor() {
+ private CompilationResult compilationResult; // toto
+ public void acceptResult(CompilationResult compilationResult) {
+ this.compilationResult = compilationResult;
+ }
+ public CompilationResult retrieveCompilationResult() {
+ return compilationResult;
+ }
+ },
+ compilerProblemFactory);
+ }
+ return compiler;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test069/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test069/A_in.js
new file mode 100644
index 0000000..fffe303
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test069/A_in.js
@@ -0,0 +1,6 @@
+class X {
+ void foo(){}
+ // comment
+
+ void bar(){}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test069/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test069/A_out.js
new file mode 100644
index 0000000..daf8e54
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test069/A_out.js
@@ -0,0 +1,9 @@
+class X {
+
+ void foo() {
+ }
+
+ // comment
+ void bar() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test070/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test070/A_in.js
new file mode 100644
index 0000000..ddb9f18
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test070/A_in.js
@@ -0,0 +1,2 @@
+// Some comment
+int someVar ; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test070/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test070/A_out.js
new file mode 100644
index 0000000..0d427fe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test070/A_out.js
@@ -0,0 +1,2 @@
+// Some comment
+int someVar; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test071/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test071/A_in.js
new file mode 100644
index 0000000..0c99cf1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test071/A_in.js
@@ -0,0 +1,5 @@
+interface StuffInterface
+{
+Integer getStuff (int someValue);
+int sendStuff (int otherValues);
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test071/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test071/A_out.js
new file mode 100644
index 0000000..5ca0525
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test071/A_out.js
@@ -0,0 +1,5 @@
+interface StuffInterface
+{
+Integer getStuff(int someValue);
+int sendStuff(int otherValues);
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test072/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test072/A_in.js
new file mode 100644
index 0000000..9a0c597
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test072/A_in.js
@@ -0,0 +1,3 @@
+import a.very.longlong.package_.name.which.exceeds.the.format.length;
+
+public class A {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test072/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test072/A_out.js
new file mode 100644
index 0000000..29d6dcf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test072/A_out.js
@@ -0,0 +1,4 @@
+import a.very.longlong.package_.name.which.exceeds.the.format.length;
+
+public class A {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test073/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test073/A_in.js
new file mode 100644
index 0000000..bd8f228
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test073/A_in.js
@@ -0,0 +1,38 @@
+package grant;
+
+import org.eclipse.swt.widgets.*;
+import org.eclipse.swt.*;
+import org.eclipse.swt.events.*;
+import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.layout.*;
+import org.eclipse.swt.custom.*;
+
+public class FormatterProblem {
+
+public static void main(String args[]) {
+new FormatterProblem().buildGUI();
+}
+
+private void buildGUI() {
+Shell shell = new Shell();
+final Display d = shell.getDisplay();
+shell.setBounds(100, 100, 300, 100);
+shell.setLayout(new GridLayout());
+Composite buttonGroup = new Composite(shell, SWT.BORDER);
+buttonGroup.setLayout(new GridLayout());
+buttonGroup.setLayoutData(new GridData());
+final Button addButton = new Button(buttonGroup, SWT.PUSH);
+addButton.setLayoutData(new GridData());
+SelectionAdapter buttonSelection = new SelectionAdapter() {
+//....
+};
+addButton.addSelectionListener(buttonSelection);
+
+shell.open();
+
+while (!shell.isDisposed()) {
+if (!d.readAndDispatch())
+d.sleep();
+}
+}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test073/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test073/A_out.js
new file mode 100644
index 0000000..f1f5930
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test073/A_out.js
@@ -0,0 +1,31 @@
+package grant;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.swt.*;
+import org.eclipse.swt.events.*;
+import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.layout.*;
+import org.eclipse.swt.custom.*;
+public class FormatterProblem {
+ public static void main(String args[]) {
+ new FormatterProblem().buildGUI();
+ }
+ private void buildGUI() {
+ Shell shell = new Shell();
+ final Display d = shell.getDisplay();
+ shell.setBounds(100, 100, 300, 100);
+ shell.setLayout(new GridLayout());
+ Composite buttonGroup = new Composite(shell, SWT.BORDER);
+ buttonGroup.setLayout(new GridLayout());
+ buttonGroup.setLayoutData(new GridData());
+ final Button addButton = new Button(buttonGroup, SWT.PUSH);
+ addButton.setLayoutData(new GridData());
+ SelectionAdapter buttonSelection = new SelectionAdapter() {
+ //....
+ };
+ addButton.addSelectionListener(buttonSelection);
+ shell.open();
+ while (!shell.isDisposed()) {
+ if (!d.readAndDispatch()) d.sleep();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test074/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test074/A_in.js
new file mode 100644
index 0000000..7798c23
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test074/A_in.js
@@ -0,0 +1,8 @@
+public class ttt {
+
+ public static void main() {
+ if (true) if (false) System.out.println("meuh"); /* comment */
+ else System.out.println("coucou");
+ else {System.out.println("bar");}
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test074/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test074/A_out.js
new file mode 100644
index 0000000..ded4665
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test074/A_out.js
@@ -0,0 +1,12 @@
+public class ttt {
+ public static void main() {
+ if (true)
+ if (false)
+ System.out.println("meuh"); /* comment */
+ else
+ System.out.println("coucou");
+ else {
+ System.out.println("bar");
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test075/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test075/A_in.js
new file mode 100644
index 0000000..a6a26fb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test075/A_in.js
@@ -0,0 +1,4 @@
+/**
+ * Some method.
+ */
+public void someMethod(String argument1, String argument2,String argument3) {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test075/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test075/A_out.js
new file mode 100644
index 0000000..8c85c5a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test075/A_out.js
@@ -0,0 +1,7 @@
+/**
+ * Some method.
+ */
+public void someMethod( String argument1,
+ String argument2,
+ String argument3) {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test076/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test076/A_in.js
new file mode 100644
index 0000000..d24aa50
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test076/A_in.js
@@ -0,0 +1,7 @@
+ Object[][] testData =
+ { { "3/4/2002", "Foo"}, {
+ "2/4/2002", "Bar"
+ }, {
+ "1/4/2002", "Qux"
+ }
+ }; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test076/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test076/A_out.js
new file mode 100644
index 0000000..79b1b70
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test076/A_out.js
@@ -0,0 +1,4 @@
+Object[][] testData = {
+ {"3/4/2002", "Foo"},
+ {"2/4/2002", "Bar"},
+ {"1/4/2002", "Qux"}}; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test077/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test077/A_in.js
new file mode 100644
index 0000000..c9a3ad1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test077/A_in.js
@@ -0,0 +1,15 @@
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ if (getClass().equals(ClassDiagram.class)) {
+ ComboBoxPropertyDescriptor cbd =
+ new ComboBoxPropertyDescriptor(
+ ID_ROUTER,
+ OdinMessages.getString("..."), //$NON-NLS-1$
+ new String[] {
+ OdinMessages.getString("..."),
+ OdinMessages.getString("...")
+ });
+ cbd.setLabelProvider(new ConnectionRouterLabelProvider());
+ return new IPropertyDescriptor[] { cbd };
+ }
+ return super.getPropertyDescriptors();
+ } \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test077/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test077/A_out.js
new file mode 100644
index 0000000..00bd6c1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test077/A_out.js
@@ -0,0 +1,11 @@
+public IPropertyDescriptor[] getPropertyDescriptors() {
+ if (getClass().equals(ClassDiagram.class)) {
+ ComboBoxPropertyDescriptor cbd = new ComboBoxPropertyDescriptor(
+ ID_ROUTER, OdinMessages.getString("..."), //$NON-NLS-1$
+ new String[]{OdinMessages.getString("..."),
+ OdinMessages.getString("...")});
+ cbd.setLabelProvider(new ConnectionRouterLabelProvider());
+ return new IPropertyDescriptor[]{cbd};
+ }
+ return super.getPropertyDescriptors();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test078/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test078/A_in.js
new file mode 100644
index 0000000..b079b63
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test078/A_in.js
@@ -0,0 +1 @@
+class Foo { static { } } \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test078/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test078/A_out.js
new file mode 100644
index 0000000..ad7ea81
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test078/A_out.js
@@ -0,0 +1,6 @@
+class Foo
+{
+ static
+ {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test079/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test079/A_in.js
new file mode 100644
index 0000000..9697e78
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test079/A_in.js
@@ -0,0 +1,8 @@
+System.out.println(
+ "Server Name: "
+ + serverName_
+ + ", port="
+ + serverPort_
+ + ", numOrbs="
+ + numOrbs_);
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test079/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test079/A_out.js
new file mode 100644
index 0000000..0e95449
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test079/A_out.js
@@ -0,0 +1,2 @@
+System.out.println("Server Name: " + serverName_ + ", port=" + serverPort_
+ + ", numOrbs=" + numOrbs_); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test080/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test080/A_in.js
new file mode 100644
index 0000000..5d1f066
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test080/A_in.js
@@ -0,0 +1 @@
+protected void processRequest(long parameter1, long parameter2,long parameter3, long parameter4) {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test080/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test080/A_out.js
new file mode 100644
index 0000000..e9127fb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test080/A_out.js
@@ -0,0 +1,3 @@
+protected void processRequest(long parameter1, long parameter2,
+ long parameter3, long parameter4) {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test081/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test081/A_in.js
new file mode 100644
index 0000000..f869795
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test081/A_in.js
@@ -0,0 +1 @@
+String[][] doubleList = {{ "alfa", "beta" },{ "alfa", "beta" },{ "alfa", "beta" },{ "alfa", "beta" },}; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test081/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test081/A_out.js
new file mode 100644
index 0000000..eb32370
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test081/A_out.js
@@ -0,0 +1,5 @@
+String[][] doubleList = {
+ {"alfa", "beta"},
+ {"alfa", "beta"},
+ {"alfa", "beta"},
+ {"alfa", "beta"},}; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test082/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test082/A_in.js
new file mode 100644
index 0000000..d8cc144
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test082/A_in.js
@@ -0,0 +1,13 @@
+ public void testDivideByZero() {
+
+
+
+ int zero = 0;
+
+
+
+ int result = 8 / zero;
+
+
+
+ int result = 8 / zero;}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test082/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test082/A_out.js
new file mode 100644
index 0000000..a491d83
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test082/A_out.js
@@ -0,0 +1,11 @@
+public void testDivideByZero() {
+
+
+ int zero = 0;
+
+
+ int result = 8 / zero;
+
+
+ int result = 8 / zero;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test083/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test083/A_in.js
new file mode 100644
index 0000000..8976c78
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test083/A_in.js
@@ -0,0 +1,28 @@
+/**
+ * This is a sample class, to demonstrate the problems
+ * with the Eclipse formatter.
+ * @author Adalbert Homa
+ * @version 1.0
+ */
+public class FormatTest2 {
+
+ public void testMethod() {
+ for (int i = 0; i < 10; i++) {
+ // Next line show the problem
+ AccountAccessGroupBean aags = new AccountAccessGroupBean(//
+ "a", // groupId
+ "b", // groupName
+ "c", // lastModified
+ "d" // modifiedFlag
+ );
+ // The second line is without end of line comments
+ AccountAccessGroupBean b =
+ new AccountAccessGroupBean("a", "b", "c", "d");
+ }
+ }
+
+ private static class AccountAccessGroupBean {
+ AccountAccessGroupBean(String a, String b, String c, String d) {
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test083/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test083/A_out.js
new file mode 100644
index 0000000..9f6248f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test083/A_out.js
@@ -0,0 +1,26 @@
+/**
+ * This is a sample class, to demonstrate the problems
+ * with the Eclipse formatter.
+ * @author Adalbert Homa
+ * @version 1.0
+ */
+public class FormatTest2 {
+ public void testMethod() {
+ for (int i = 0; i < 10; i++) {
+ // Next line show the problem
+ AccountAccessGroupBean aags = new AccountAccessGroupBean(//
+ "a", // groupId
+ "b", // groupName
+ "c", // lastModified
+ "d" // modifiedFlag
+ );
+ // The second line is without end of line comments
+ AccountAccessGroupBean b = new AccountAccessGroupBean("a", "b",
+ "c", "d");
+ }
+ }
+ private static class AccountAccessGroupBean {
+ AccountAccessGroupBean(String a, String b, String c, String d) {
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test084/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test084/A_in.js
new file mode 100644
index 0000000..3284572
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test084/A_in.js
@@ -0,0 +1,9 @@
+public class A {
+
+ public void testMethod() {
+ for (int i = 0; i < 10; i++) {
+ }
+ if (true) System.out.println();
+ while(false) { }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test084/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test084/A_out.js
new file mode 100644
index 0000000..a7a064c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test084/A_out.js
@@ -0,0 +1,9 @@
+public class A {
+ public void testMethod() {
+ for(int i = 0; i < 10; i++) {
+ }
+ if(true) System.out.println();
+ while(false) {
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test085/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test085/A_in.js
new file mode 100644
index 0000000..3c38120
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test085/A_in.js
@@ -0,0 +1,9 @@
+public class A {
+
+ public void testMethod() {
+ for(int i = 0; i < 10; i++) {
+ }
+ if(true) System.out.println();
+ while(false) { }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test085/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test085/A_out.js
new file mode 100644
index 0000000..7b8eaf2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test085/A_out.js
@@ -0,0 +1,9 @@
+public class A {
+ public void testMethod() {
+ for (int i = 0; i < 10; i++) {
+ }
+ if (true) System.out.println();
+ while (false) {
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test086/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test086/A_in.js
new file mode 100644
index 0000000..bfa6524
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test086/A_in.js
@@ -0,0 +1,9 @@
+public class FormatterProblem
+{
+ public static boolean isZero(int x)
+ {
+ if (x==0) { return true; } // toto
+ else // here is the comment that the formatter doesn't like
+ { return false; }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test086/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test086/A_out.js
new file mode 100644
index 0000000..caf1581
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test086/A_out.js
@@ -0,0 +1,15 @@
+public class FormatterProblem
+{
+ public static boolean isZero(int x)
+ {
+ if (x==0)
+ {
+ return true;
+ } // toto
+ else
+ // here is the comment that the formatter doesn't like
+ {
+ return false;
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test087/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test087/A_in.js
new file mode 100644
index 0000000..077b0c5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test087/A_in.js
@@ -0,0 +1,3 @@
+if (too_big) return max;
+if (too_small) return min;
+return just_right; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test087/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test087/A_out.js
new file mode 100644
index 0000000..f4a065e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test087/A_out.js
@@ -0,0 +1,3 @@
+if (too_big) return max;
+if (too_small) return min;
+return just_right; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test088/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test088/A_in.js
new file mode 100644
index 0000000..077b0c5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test088/A_in.js
@@ -0,0 +1,3 @@
+if (too_big) return max;
+if (too_small) return min;
+return just_right; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test088/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test088/A_out.js
new file mode 100644
index 0000000..c740b5a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test088/A_out.js
@@ -0,0 +1,5 @@
+if (too_big)
+ return max;
+if (too_small)
+ return min;
+return just_right; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test089/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test089/A_in.js
new file mode 100644
index 0000000..4131ae6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test089/A_in.js
@@ -0,0 +1 @@
+foo = (9 + 1) * 5; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test089/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test089/A_out.js
new file mode 100644
index 0000000..b7eb806
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test089/A_out.js
@@ -0,0 +1 @@
+foo = ( 9 + 1 ) * 5; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test090/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test090/A_in.js
new file mode 100644
index 0000000..8e014d7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test090/A_in.js
@@ -0,0 +1 @@
+foo = array[5]; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test090/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test090/A_out.js
new file mode 100644
index 0000000..f427205
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test090/A_out.js
@@ -0,0 +1 @@
+foo = array[ 5 ]; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test091/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test091/A_in.js
new file mode 100644
index 0000000..e55685c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test091/A_in.js
@@ -0,0 +1 @@
+int x = 1; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test091/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test091/A_out.js
new file mode 100644
index 0000000..dbefad1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test091/A_out.js
@@ -0,0 +1 @@
+int x=1; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test092/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test092/A_in.js
new file mode 100644
index 0000000..e07f1c6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test092/A_in.js
@@ -0,0 +1 @@
+if ( x == 1 ) {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test092/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test092/A_out.js
new file mode 100644
index 0000000..e932008
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test092/A_out.js
@@ -0,0 +1,2 @@
+if (x==1) {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test093/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test093/A_in.js
new file mode 100644
index 0000000..ba89104
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test093/A_in.js
@@ -0,0 +1,2 @@
+Element x = (Element)
+object; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test093/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test093/A_out.js
new file mode 100644
index 0000000..d36ba9c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test093/A_out.js
@@ -0,0 +1 @@
+Element x = (Element)object; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test094/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test094/A_in.js
new file mode 100644
index 0000000..8152647
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test094/A_in.js
@@ -0,0 +1 @@
+Element x = foo(x, y); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test094/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test094/A_out.js
new file mode 100644
index 0000000..38dd13e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test094/A_out.js
@@ -0,0 +1 @@
+Element x=foo(x,y); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test095/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test095/A_in.js
new file mode 100644
index 0000000..00652df
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test095/A_in.js
@@ -0,0 +1 @@
+if (foo){bar();} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test095/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test095/A_out.js
new file mode 100644
index 0000000..325337f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test095/A_out.js
@@ -0,0 +1,4 @@
+if (foo)
+ {
+ bar();
+ } \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test096/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test096/A_in.js
new file mode 100644
index 0000000..e30ba6d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test096/A_in.js
@@ -0,0 +1,5 @@
+/**
+ * ssdfsd f
+ * sd fsd fd
+ */
+void foo() {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test096/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test096/A_out.js
new file mode 100644
index 0000000..9757e08
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test096/A_out.js
@@ -0,0 +1,6 @@
+/**
+ * ssdfsd f
+ * sd fsd fd
+ */
+void foo() {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test097/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test097/A_in.js
new file mode 100644
index 0000000..7dd057a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test097/A_in.js
@@ -0,0 +1,11 @@
+StringBuffer sql = new StringBuffer( ConstTypes.SOME_TYPE ) ;
+sql
+ .append( " WHERE " )
+ .append( ConstAttrs.SOME_ATTR1 )
+ .append( " = '" )
+ .append( someValue1 )
+ .append( "' AND" )
+ .append( ConstAttrs.SOME_ATTR2 )
+ .append( " = '" )
+ .append( someValue2 )
+ .append( "' AND " ) ; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test097/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test097/A_out.js
new file mode 100644
index 0000000..9e59886
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test097/A_out.js
@@ -0,0 +1,4 @@
+StringBuffer sql = new StringBuffer( ConstTypes.SOME_TYPE );
+sql.append( " WHERE " ).append( ConstAttrs.SOME_ATTR1 ).append( " = '" )
+ .append( someValue1 ).append( "' AND" ).append( ConstAttrs.SOME_ATTR2 )
+ .append( " = '" ).append( someValue2 ).append( "' AND " ); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test098/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test098/A_in.js
new file mode 100644
index 0000000..c22bbde
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test098/A_in.js
@@ -0,0 +1,6 @@
+publishAction = new Action() { public void run() {
+ //
+ System.out.println("");
+ // TODO implement;
+ // publishContent();
+ }}; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test098/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test098/A_out.js
new file mode 100644
index 0000000..d95e2bb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test098/A_out.js
@@ -0,0 +1,10 @@
+publishAction = new Action()
+{
+ public void run()
+ {
+ //
+ System.out.println("");
+ // TODO implement;
+ // publishContent();
+ }
+}; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test099/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test099/A_in.js
new file mode 100644
index 0000000..426a389
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test099/A_in.js
@@ -0,0 +1,3 @@
+void functionName(int params) {
+ for(;;);
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test099/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test099/A_out.js
new file mode 100644
index 0000000..883a98a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test099/A_out.js
@@ -0,0 +1,3 @@
+void functionName (int params) {
+ for (;;);
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test100/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test100/A_in.js
new file mode 100644
index 0000000..b760044
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test100/A_in.js
@@ -0,0 +1,11 @@
+public class Q {
+
+ public Q() {
+
+ // code formatter formats as expected
+ String a1[] = new String[] {"s"};
+
+ // missing space before end brace
+ String a2[] = new String[] {new String("s")};
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test100/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test100/A_out.js
new file mode 100644
index 0000000..f7f6a2d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test100/A_out.js
@@ -0,0 +1,11 @@
+public class Q {
+
+ public Q() {
+
+ // code formatter formats as expected
+ String a1[] = new String[] { "s" };
+
+ // missing space before end brace
+ String a2[] = new String[] { new String("s") };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test101/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test101/A_in.js
new file mode 100644
index 0000000..607cb66
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test101/A_in.js
@@ -0,0 +1,6 @@
+public class A {
+ public static void main(String[] args) {
+ ActionListener al = new ActionListener() {
+ public void actionPerformed(ActionEvent arg0) {
+ // do something
+ }};}} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test101/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test101/A_out.js
new file mode 100644
index 0000000..8ffb8f3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test101/A_out.js
@@ -0,0 +1,9 @@
+public class A {
+ public static void main(String[] args) {
+ ActionListener al = new ActionListener() {
+ public void actionPerformed(ActionEvent arg0) {
+ // do something
+ }
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test102/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test102/A_in.js
new file mode 100644
index 0000000..1fc7a57
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test102/A_in.js
@@ -0,0 +1,6 @@
+public class A {
+
+
+
+ void foo(){}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test102/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test102/A_out.js
new file mode 100644
index 0000000..58c0b17
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test102/A_out.js
@@ -0,0 +1,5 @@
+public class A {
+
+ void foo() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test103/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test103/A_in.js
new file mode 100644
index 0000000..41f7914
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test103/A_in.js
@@ -0,0 +1,5 @@
+if ((condition1 && condition2)
+ || (condition3 && condition4)
+ ||!(condition5 && condition6)) {
+ doSomethingAboutIt();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test103/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test103/A_out.js
new file mode 100644
index 0000000..f467c45
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test103/A_out.js
@@ -0,0 +1,4 @@
+if ((condition1 && condition2) || (condition3 && condition4)
+ || !(condition5 && condition6)) {
+ doSomethingAboutIt();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test104/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test104/A_in.js
new file mode 100644
index 0000000..d7e6215
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test104/A_in.js
@@ -0,0 +1 @@
+if ( foo ){ }else { } \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test104/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test104/A_out.js
new file mode 100644
index 0000000..35b5198
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test104/A_out.js
@@ -0,0 +1,6 @@
+if ( foo )
+ {
+ }
+else
+ {
+ } \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test105/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test105/A_in.js
new file mode 100644
index 0000000..473c0f1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test105/A_in.js
@@ -0,0 +1,7 @@
+abstract class Foo {
+ void foo1() {
+ }
+ abstract void foo2() throws Exception;
+ void foo3() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test105/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test105/A_out.js
new file mode 100644
index 0000000..42ef78e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test105/A_out.js
@@ -0,0 +1,10 @@
+abstract class Foo
+{
+ void foo1()
+ {
+ }
+ abstract void foo2() throws Exception;
+ void foo3()
+ {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test106/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test106/A_in.js
new file mode 100644
index 0000000..14e638f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test106/A_in.js
@@ -0,0 +1 @@
+for(int i=1;((i<10)&&(i<10));i++){} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test106/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test106/A_out.js
new file mode 100644
index 0000000..0913280
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test106/A_out.js
@@ -0,0 +1,2 @@
+for (int i = 1; ((i < 10) && (i < 10)); i++) {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test107/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test107/A_in.js
new file mode 100644
index 0000000..808d333
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test107/A_in.js
@@ -0,0 +1,6 @@
+if (!lockListener.isUIWaiting())
+ asyncExec(new Runnable() {
+ public void run() {
+ lockListener.doPendingWork();
+ }
+}); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test107/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test107/A_out.js
new file mode 100644
index 0000000..51d3b83
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test107/A_out.js
@@ -0,0 +1,6 @@
+if (!lockListener.isUIWaiting())
+ asyncExec(new Runnable() {
+ public void run() {
+ lockListener.doPendingWork();
+ }
+ }); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test108/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test108/A_in.js
new file mode 100644
index 0000000..d767c7d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test108/A_in.js
@@ -0,0 +1,10 @@
+public class A {
+ A(String s) {
+ }
+ protected void foo() {
+ A a = new A("") {//$NON-NLS-1$
+ public void run() {
+ }
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test108/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test108/A_out.js
new file mode 100644
index 0000000..af38cba
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test108/A_out.js
@@ -0,0 +1,10 @@
+public class A {
+ A(String s) {
+ }
+ protected void foo() {
+ A a = new A("") {//$NON-NLS-1$
+ public void run() {
+ }
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test109/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test109/A_in.js
new file mode 100644
index 0000000..2768bec
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test109/A_in.js
@@ -0,0 +1,2 @@
+package p;
+public class A{} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test109/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test109/A_out.js
new file mode 100644
index 0000000..84cceae
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test109/A_out.js
@@ -0,0 +1,5 @@
+
+
+package p;
+public class A {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test110/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test110/A_in.js
new file mode 100644
index 0000000..2768bec
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test110/A_in.js
@@ -0,0 +1,2 @@
+package p;
+public class A{} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test110/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test110/A_out.js
new file mode 100644
index 0000000..c073c04
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test110/A_out.js
@@ -0,0 +1,4 @@
+
+package p;
+public class A {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test111/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test111/A_in.js
new file mode 100644
index 0000000..cd3c650
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test111/A_in.js
@@ -0,0 +1,4 @@
+package p;
+public class A{
+public void foo() {}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test111/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test111/A_out.js
new file mode 100644
index 0000000..ed29094
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test111/A_out.js
@@ -0,0 +1,7 @@
+package p;
+
+public class A {
+
+ public void foo() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test112/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test112/A_in.js
new file mode 100644
index 0000000..468a61d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test112/A_in.js
@@ -0,0 +1,4 @@
+package p; // comment
+public class A{
+public void foo() {}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test112/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test112/A_out.js
new file mode 100644
index 0000000..96f549f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test112/A_out.js
@@ -0,0 +1,7 @@
+package p; // comment
+
+public class A {
+
+ public void foo() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test113/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test113/A_in.js
new file mode 100644
index 0000000..eb0a018
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test113/A_in.js
@@ -0,0 +1,5 @@
+// test019: use TAB
+public class A {
+protected synchronized void foo(final java.lang.String s1, long l) throws IOException,Exception{
+foo("Helloddddddddddddddddddddddddddddddddddddd", 121212121221212121212121);f("Helloddddddddddddddddddddddddddddddddddddd", 121212121221212121212121);fooooooobaaaaaaar("Helloddddddddddddddddddddddddddddddddddddd", 121212121221212121212121);
+}} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test113/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test113/A_out.js
new file mode 100644
index 0000000..3aaa9d4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test113/A_out.js
@@ -0,0 +1,12 @@
+// test019: use TAB
+public class A {
+ protected synchronized void foo(final java.lang.String s1, long l)
+ throws IOException, Exception {
+ foo("Helloddddddddddddddddddddddddddddddddddddd",
+ 121212121221212121212121);
+ f( "Helloddddddddddddddddddddddddddddddddddddd",
+ 121212121221212121212121);
+ fooooooobaaaaaaar( "Helloddddddddddddddddddddddddddddddddddddd",
+ 121212121221212121212121);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test114/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test114/A_in.js
new file mode 100644
index 0000000..a6a26fb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test114/A_in.js
@@ -0,0 +1,4 @@
+/**
+ * Some method.
+ */
+public void someMethod(String argument1, String argument2,String argument3) {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test114/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test114/A_out.js
new file mode 100644
index 0000000..3a0cc3f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test114/A_out.js
@@ -0,0 +1,7 @@
+/**
+ * Some method.
+ */
+public void someMethod(String argument1,
+ String argument2,
+ String argument3) {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test115/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test115/A_in.js
new file mode 100644
index 0000000..27f3d47
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test115/A_in.js
@@ -0,0 +1,4 @@
+/**
+ * Some method.
+ */
+public void someMhd(String argument1, String argument2,String argument3) {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test115/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test115/A_out.js
new file mode 100644
index 0000000..97cf054
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test115/A_out.js
@@ -0,0 +1,7 @@
+/**
+ * Some method.
+ */
+public void someMhd(String argument1,
+ String argument2,
+ String argument3) {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test116/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test116/A_in.js
new file mode 100644
index 0000000..85da16a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test116/A_in.js
@@ -0,0 +1,4 @@
+/**
+ * Some method.
+ */
+public void somehd(String argument1, String argument2,String argument3) {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test116/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test116/A_out.js
new file mode 100644
index 0000000..8d2cd1d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test116/A_out.js
@@ -0,0 +1,7 @@
+/**
+ * Some method.
+ */
+public void somehd( String argument1,
+ String argument2,
+ String argument3) {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test117/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test117/A_in.js
new file mode 100644
index 0000000..80d94f6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test117/A_in.js
@@ -0,0 +1,5 @@
+package test1;
+public class A {
+ public void foo() {for(int i= 0; i < 8; i++) {foo();}
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test117/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test117/A_out.js
new file mode 100644
index 0000000..bd36a63
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test117/A_out.js
@@ -0,0 +1,8 @@
+package test1;
+public class A {
+ public void foo() {
+ for (int i = 0; i < 8; i++) {
+ foo();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test118/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test118/A_in.js
new file mode 100644
index 0000000..17b4c4f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test118/A_in.js
@@ -0,0 +1,5 @@
+package test1;
+public class A { public void foo() { do { hoo(11);
+ }while (true);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test118/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test118/A_out.js
new file mode 100644
index 0000000..ada4e11
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test118/A_out.js
@@ -0,0 +1,8 @@
+package test1;
+public class A {
+ public void foo() {
+ do {
+ hoo(11);
+ } while (true);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test119/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test119/A_in.js
new file mode 100644
index 0000000..3c2a92f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test119/A_in.js
@@ -0,0 +1 @@
+do try {return;} catch (Exception e){}while (true); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test119/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test119/A_out.js
new file mode 100644
index 0000000..fa1c471
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test119/A_out.js
@@ -0,0 +1,6 @@
+do
+ try {
+ return;
+ } catch (Exception e) {
+ }
+while (true); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test120/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test120/A_in.js
new file mode 100644
index 0000000..d6b9f44
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test120/A_in.js
@@ -0,0 +1,22 @@
+package test1;
+public class E {
+ public void foo() {
+ if (i == 0) {
+ System.beep();
+ } else if (true) {
+ return;
+ }
+
+ if (i == 0) {
+ System.beep();
+ }
+ if (i == 0) {
+ System.beep();
+ } else if (true)
+ return;
+
+ if (i == 0) {
+ System.beep();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test120/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test120/A_out.js
new file mode 100644
index 0000000..589ce9d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test120/A_out.js
@@ -0,0 +1,20 @@
+package test1;
+public class E {
+ public void foo() {
+ if (i == 0) {
+ System.beep();
+ } else if (true) {
+ return;
+ }
+ if (i == 0) {
+ System.beep();
+ }
+ if (i == 0) {
+ System.beep();
+ } else if (true)
+ return;
+ if (i == 0) {
+ System.beep();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test121/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test121/A_in.js
new file mode 100644
index 0000000..8cfb20b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test121/A_in.js
@@ -0,0 +1,3 @@
+ if (i == 0) {
+ System.beep();
+ } else if (true) {return;} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test121/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test121/A_out.js
new file mode 100644
index 0000000..a320337
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test121/A_out.js
@@ -0,0 +1,5 @@
+if (i == 0) {
+ System.beep();
+} else if (true) {
+ return;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test122/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test122/A_in.js
new file mode 100644
index 0000000..8cfb20b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test122/A_in.js
@@ -0,0 +1,3 @@
+ if (i == 0) {
+ System.beep();
+ } else if (true) {return;} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test122/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test122/A_out.js
new file mode 100644
index 0000000..a320337
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test122/A_out.js
@@ -0,0 +1,5 @@
+if (i == 0) {
+ System.beep();
+} else if (true) {
+ return;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test123/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test123/A_in.js
new file mode 100644
index 0000000..80d94f6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test123/A_in.js
@@ -0,0 +1,5 @@
+package test1;
+public class A {
+ public void foo() {for(int i= 0; i < 8; i++) {foo();}
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test123/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test123/A_out.js
new file mode 100644
index 0000000..bd36a63
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test123/A_out.js
@@ -0,0 +1,8 @@
+package test1;
+public class A {
+ public void foo() {
+ for (int i = 0; i < 8; i++) {
+ foo();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test124/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test124/A_in.js
new file mode 100644
index 0000000..27f3d47
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test124/A_in.js
@@ -0,0 +1,4 @@
+/**
+ * Some method.
+ */
+public void someMhd(String argument1, String argument2,String argument3) {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test124/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test124/A_out.js
new file mode 100644
index 0000000..97cf054
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test124/A_out.js
@@ -0,0 +1,7 @@
+/**
+ * Some method.
+ */
+public void someMhd(String argument1,
+ String argument2,
+ String argument3) {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test125/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test125/A_in.js
new file mode 100644
index 0000000..9532e2d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test125/A_in.js
@@ -0,0 +1 @@
+3- -3 \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test125/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test125/A_out.js
new file mode 100644
index 0000000..319b745
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test125/A_out.js
@@ -0,0 +1 @@
+3 - -3 \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test126/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test126/A_in.js
new file mode 100644
index 0000000..80d94f6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test126/A_in.js
@@ -0,0 +1,5 @@
+package test1;
+public class A {
+ public void foo() {for(int i= 0; i < 8; i++) {foo();}
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test126/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test126/A_out.js
new file mode 100644
index 0000000..bd36a63
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test126/A_out.js
@@ -0,0 +1,8 @@
+package test1;
+public class A {
+ public void foo() {
+ for (int i = 0; i < 8; i++) {
+ foo();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test127/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test127/A_in.js
new file mode 100644
index 0000000..47a5ec4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test127/A_in.js
@@ -0,0 +1,5 @@
+pckage test1;
+public class A {
+ public void foo() {for(int i= 0; i < 8; i++) {foo();}
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test127/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test127/A_out.js
new file mode 100644
index 0000000..f1d638b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test127/A_out.js
@@ -0,0 +1,8 @@
+pckage test1;
+public class A {
+ public void foo() {
+ for (int i = 0; i < 8; i++) {
+ foo();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test128/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test128/A_in.js
new file mode 100644
index 0000000..b33698e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test128/A_in.js
@@ -0,0 +1,5 @@
+pckage test1;
+public cass A {
+ public void foo() {for(int i= 0; i < 8; i++) {foo();}
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test128/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test128/A_out.js
new file mode 100644
index 0000000..b33698e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test128/A_out.js
@@ -0,0 +1,5 @@
+pckage test1;
+public cass A {
+ public void foo() {for(int i= 0; i < 8; i++) {foo();}
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test129/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test129/A_in.js
new file mode 100644
index 0000000..214ba4e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test129/A_in.js
@@ -0,0 +1,4 @@
+String qualifiedPackageName = qualifiedTypeName.length() == typeName.length
+ ? "" //$NON-NLS-1$
+ : qualifiedBinaryFileName.substring(0,
+ qualifiedTypeName.length() - typeName.length - 1);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test129/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test129/A_out.js
new file mode 100644
index 0000000..88db9db
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test129/A_out.js
@@ -0,0 +1,4 @@
+String qualifiedPackageName = qualifiedTypeName.length() == typeName.length
+ ? "" //$NON-NLS-1$
+ : qualifiedBinaryFileName.substring(0, qualifiedTypeName.length()
+ - typeName.length - 1); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test130/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test130/A_in.js
new file mode 100644
index 0000000..94b6323
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test130/A_in.js
@@ -0,0 +1,19 @@
+/**
+ * Test
+ *
+ */
+package /* test2 */ p1.p2./* */test;
+
+import java.io.Serializable;
+import java.io.IOException;
+
+/**
+ * Class javadoc comment
+ */
+/* */ class A extends java.lang.Object implements Runnable, Cloneable, Serializable {
+ public void run() {
+ }
+
+ public static void foo() throws IOException {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test130/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test130/A_out.js
new file mode 100644
index 0000000..fb32693
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test130/A_out.js
@@ -0,0 +1,20 @@
+/**
+ * Test
+ *
+ */
+package /* test2 */p1.p2./* */test;
+import java.io.Serializable;
+import java.io.IOException;
+/**
+ * Class javadoc comment
+ */
+/* */class A extends java.lang.Object
+ implements
+ Runnable,
+ Cloneable,
+ Serializable {
+ public void run() {
+ }
+ public static void foo() throws IOException {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test131/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test131/A_in.js
new file mode 100644
index 0000000..e2a8aa2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test131/A_in.js
@@ -0,0 +1,16 @@
+/**
+ * Test
+ *
+ */
+package /* test2 */ p1.p2./* */test;
+
+import java.io.Serializable;
+import java.io.IOException;
+
+/* */ class A extends java.lang.Object implements Runnable, Cloneable, Serializable {
+ public void run() {
+ }
+
+ public static void foo() throws IOException {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test131/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test131/A_out.js
new file mode 100644
index 0000000..12f2833
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test131/A_out.js
@@ -0,0 +1,17 @@
+/**
+ * Test
+ *
+ */
+package /* test2 */p1.p2./* */test;
+import java.io.Serializable;
+import java.io.IOException;
+/* */class A extends java.lang.Object
+ implements
+ Runnable,
+ Cloneable,
+ Serializable {
+ public void run() {
+ }
+ public static void foo() throws IOException {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test132/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test132/A_in.js
new file mode 100644
index 0000000..70ac816
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test132/A_in.js
@@ -0,0 +1,94 @@
+ public AssistOptions(Map settings) {
+ if (settings == null)
+ return;
+ // filter options which are related to the assist component
+ Iterator entries = settings.entrySet().iterator();
+ while (entries.hasNext()) {
+ Map.Entry entry = (Map.Entry) entries.next();
+ if (!(entry.getKey() instanceof String))
+ continue;
+ if (!(entry.getValue() instanceof String))
+ continue;
+ String optionID = (String) entry.getKey();
+ String optionValue = (String) entry.getValue();
+ if (optionID.equals(OPTION_PerformVisibilityCheck)) {
+ if (optionValue.equals(ENABLED)) {
+ this.checkVisibility = true;
+ } else if (optionValue.equals(DISABLED)) {
+ this.checkVisibility = false;
+ }
+ continue;
+ } else if (optionID.equals(OPTION_ForceImplicitQualification)) {
+ if (optionValue.equals(ENABLED)) {
+ this.forceImplicitQualification = true;
+ } else if (optionValue.equals(DISABLED)) {
+ this.forceImplicitQualification = false;
+ }
+ continue;
+ } else if (optionID.equals(OPTION_FieldPrefixes)) {
+ if (optionValue.length() == 0) {
+ this.fieldPrefixes = null;
+ } else {
+ this.fieldPrefixes = CharOperation.splitAndTrimOn(',',
+ optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_StaticFieldPrefixes)) {
+ if (optionValue.length() == 0) {
+ this.staticFieldPrefixes = null;
+ } else {
+ this.staticFieldPrefixes = CharOperation.splitAndTrimOn(
+ ',', optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_LocalPrefixes)) {
+ if (optionValue.length() == 0) {
+ this.localPrefixes = null;
+ } else {
+ this.localPrefixes = CharOperation.splitAndTrimOn(',',
+ optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_ArgumentPrefixes)) {
+ if (optionValue.length() == 0) {
+ this.argumentPrefixes = null;
+ } else {
+ this.argumentPrefixes = CharOperation.splitAndTrimOn(',',
+ optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_FieldSuffixes)) {
+ if (optionValue.length() == 0) {
+ this.fieldSuffixes = null;
+ } else {
+ this.fieldSuffixes = CharOperation.splitAndTrimOn(',',
+ optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_StaticFieldSuffixes)) {
+ if (optionValue.length() == 0) {
+ this.staticFieldSuffixes = null;
+ } else {
+ this.staticFieldSuffixes = CharOperation.splitAndTrimOn(
+ ',', optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_LocalSuffixes)) {
+ if (optionValue.length() == 0) {
+ this.localSuffixes = null;
+ } else {
+ this.localSuffixes = CharOperation.splitAndTrimOn(',',
+ optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_ArgumentSuffixes)) {
+ if (optionValue.length() == 0) {
+ this.argumentSuffixes = null;
+ } else {
+ this.argumentSuffixes = CharOperation.splitAndTrimOn(',',
+ optionValue.toCharArray());
+ }
+ continue;
+ }
+ }
+ } \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test132/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test132/A_out.js
new file mode 100644
index 0000000..10351a9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test132/A_out.js
@@ -0,0 +1,94 @@
+public AssistOptions(Map settings) {
+ if (settings == null)
+ return;
+ // filter options which are related to the assist component
+ Iterator entries = settings.entrySet().iterator();
+ while (entries.hasNext()) {
+ Map.Entry entry = (Map.Entry) entries.next();
+ if (!(entry.getKey() instanceof String))
+ continue;
+ if (!(entry.getValue() instanceof String))
+ continue;
+ String optionID = (String) entry.getKey();
+ String optionValue = (String) entry.getValue();
+ if (optionID.equals(OPTION_PerformVisibilityCheck)) {
+ if (optionValue.equals(ENABLED)) {
+ this.checkVisibility = true;
+ } else if (optionValue.equals(DISABLED)) {
+ this.checkVisibility = false;
+ }
+ continue;
+ } else if (optionID.equals(OPTION_ForceImplicitQualification)) {
+ if (optionValue.equals(ENABLED)) {
+ this.forceImplicitQualification = true;
+ } else if (optionValue.equals(DISABLED)) {
+ this.forceImplicitQualification = false;
+ }
+ continue;
+ } else if (optionID.equals(OPTION_FieldPrefixes)) {
+ if (optionValue.length() == 0) {
+ this.fieldPrefixes = null;
+ } else {
+ this.fieldPrefixes = CharOperation.splitAndTrimOn(',',
+ optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_StaticFieldPrefixes)) {
+ if (optionValue.length() == 0) {
+ this.staticFieldPrefixes = null;
+ } else {
+ this.staticFieldPrefixes = CharOperation.splitAndTrimOn(',',
+ optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_LocalPrefixes)) {
+ if (optionValue.length() == 0) {
+ this.localPrefixes = null;
+ } else {
+ this.localPrefixes = CharOperation.splitAndTrimOn(',',
+ optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_ArgumentPrefixes)) {
+ if (optionValue.length() == 0) {
+ this.argumentPrefixes = null;
+ } else {
+ this.argumentPrefixes = CharOperation.splitAndTrimOn(',',
+ optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_FieldSuffixes)) {
+ if (optionValue.length() == 0) {
+ this.fieldSuffixes = null;
+ } else {
+ this.fieldSuffixes = CharOperation.splitAndTrimOn(',',
+ optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_StaticFieldSuffixes)) {
+ if (optionValue.length() == 0) {
+ this.staticFieldSuffixes = null;
+ } else {
+ this.staticFieldSuffixes = CharOperation.splitAndTrimOn(',',
+ optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_LocalSuffixes)) {
+ if (optionValue.length() == 0) {
+ this.localSuffixes = null;
+ } else {
+ this.localSuffixes = CharOperation.splitAndTrimOn(',',
+ optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_ArgumentSuffixes)) {
+ if (optionValue.length() == 0) {
+ this.argumentSuffixes = null;
+ } else {
+ this.argumentSuffixes = CharOperation.splitAndTrimOn(',',
+ optionValue.toCharArray());
+ }
+ continue;
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test133/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test133/A_in.js
new file mode 100644
index 0000000..d63b862
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test133/A_in.js
@@ -0,0 +1,156 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.codeassist.impl;
+
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+
+public class AssistOptions {
+ /**
+ * Option IDs
+ */
+ public static final String OPTION_PerformVisibilityCheck =
+ "org.eclipse.wst.jsdt.core.codeComplete.visibilityCheck"; //$NON-NLS-1$
+ public static final String OPTION_ForceImplicitQualification =
+ "org.eclipse.wst.jsdt.core.codeComplete.forceImplicitQualification"; //$NON-NLS-1$
+ public static final String OPTION_FieldPrefixes =
+ "org.eclipse.wst.jsdt.core.codeComplete.fieldPrefixes"; //$NON-NLS-1$
+ public static final String OPTION_StaticFieldPrefixes =
+ "org.eclipse.wst.jsdt.core.codeComplete.staticFieldPrefixes"; //$NON-NLS-1$
+ public static final String OPTION_LocalPrefixes =
+ "org.eclipse.wst.jsdt.core.codeComplete.localPrefixes"; //$NON-NLS-1$
+ public static final String OPTION_ArgumentPrefixes =
+ "org.eclipse.wst.jsdt.core.codeComplete.argumentPrefixes"; //$NON-NLS-1$
+ public static final String OPTION_FieldSuffixes =
+ "org.eclipse.wst.jsdt.core.codeComplete.fieldSuffixes"; //$NON-NLS-1$
+ public static final String OPTION_StaticFieldSuffixes =
+ "org.eclipse.wst.jsdt.core.codeComplete.staticFieldSuffixes"; //$NON-NLS-1$
+ public static final String OPTION_LocalSuffixes =
+ "org.eclipse.wst.jsdt.core.codeComplete.localSuffixes"; //$NON-NLS-1$
+ public static final String OPTION_ArgumentSuffixes =
+ "org.eclipse.wst.jsdt.core.codeComplete.argumentSuffixes"; //$NON-NLS-1$
+ public static final String ENABLED = "enabled"; //$NON-NLS-1$
+ public static final String DISABLED = "disabled"; //$NON-NLS-1$
+
+ public boolean checkVisibility = false;
+ public boolean forceImplicitQualification = false;
+ public char[][] fieldPrefixes = null;
+ public char[][] staticFieldPrefixes = null;
+ public char[][] localPrefixes = null;
+ public char[][] argumentPrefixes = null;
+ public char[][] fieldSuffixes = null;
+ public char[][] staticFieldSuffixes = null;
+ public char[][] localSuffixes = null;
+ public char[][] argumentSuffixes = null;
+
+ /**
+ * Initializing the assist options with default settings
+ */
+ public AssistOptions() {
+ // Initializing the assist options with default settings
+ }
+
+ /**
+ * Initializing the assist options with external settings
+ */
+ public AssistOptions(Map settings) {
+ if (settings == null)
+ return;
+
+ // filter options which are related to the assist component
+ Iterator entries = settings.entrySet().iterator();
+ while (entries.hasNext()) {
+ Map.Entry entry = (Map.Entry)entries.next();
+ if (!(entry.getKey() instanceof String))
+ continue;
+ if (!(entry.getValue() instanceof String))
+ continue;
+ String optionID = (String) entry.getKey();
+ String optionValue = (String) entry.getValue();
+
+ if (optionID.equals(OPTION_PerformVisibilityCheck)) {
+ if (optionValue.equals(ENABLED)) {
+ this.checkVisibility = true;
+ } else
+ if (optionValue.equals(DISABLED)) {
+ this.checkVisibility = false;
+ }
+ continue;
+ } else if (optionID.equals(OPTION_ForceImplicitQualification)) {
+ if (optionValue.equals(ENABLED)) {
+ this.forceImplicitQualification = true;
+ } else
+ if (optionValue.equals(DISABLED)) {
+ this.forceImplicitQualification = false;
+ }
+ continue;
+ } else if(optionID.equals(OPTION_FieldPrefixes)){
+ if (optionValue.length() == 0) {
+ this.fieldPrefixes = null;
+ } else {
+ this.fieldPrefixes = CharOperation.splitAndTrimOn(',', optionValue.toCharArray());
+ }
+ continue;
+ } else if(optionID.equals(OPTION_StaticFieldPrefixes)){
+ if (optionValue.length() == 0) {
+ this.staticFieldPrefixes = null;
+ } else {
+ this.staticFieldPrefixes = CharOperation.splitAndTrimOn(',', optionValue.toCharArray());
+ }
+ continue;
+ } else if(optionID.equals(OPTION_LocalPrefixes)){
+ if (optionValue.length() == 0) {
+ this.localPrefixes = null;
+ } else {
+ this.localPrefixes = CharOperation.splitAndTrimOn(',', optionValue.toCharArray());
+ }
+ continue;
+ } else if(optionID.equals(OPTION_ArgumentPrefixes)){
+ if (optionValue.length() == 0) {
+ this.argumentPrefixes = null;
+ } else {
+ this.argumentPrefixes = CharOperation.splitAndTrimOn(',', optionValue.toCharArray());
+ }
+ continue;
+ } else if(optionID.equals(OPTION_FieldSuffixes)){
+ if (optionValue.length() == 0) {
+ this.fieldSuffixes = null;
+ } else {
+ this.fieldSuffixes = CharOperation.splitAndTrimOn(',', optionValue.toCharArray());
+ }
+ continue;
+ } else if(optionID.equals(OPTION_StaticFieldSuffixes)){
+ if (optionValue.length() == 0) {
+ this.staticFieldSuffixes = null;
+ } else {
+ this.staticFieldSuffixes = CharOperation.splitAndTrimOn(',', optionValue.toCharArray());
+ }
+ continue;
+ } else if(optionID.equals(OPTION_LocalSuffixes)){
+ if (optionValue.length() == 0) {
+ this.localSuffixes = null;
+ } else {
+ this.localSuffixes = CharOperation.splitAndTrimOn(',', optionValue.toCharArray());
+ }
+ continue;
+ } else if(optionID.equals(OPTION_ArgumentSuffixes)){
+ if (optionValue.length() == 0) {
+ this.argumentSuffixes = null;
+ } else {
+ this.argumentSuffixes = CharOperation.splitAndTrimOn(',', optionValue.toCharArray());
+ }
+ continue;
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test133/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test133/A_out.js
new file mode 100644
index 0000000..c2c130b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test133/A_out.js
@@ -0,0 +1,144 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.codeassist.impl;
+import java.util.Iterator;
+import java.util.Map;
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+public class AssistOptions {
+ /**
+ * Option IDs
+ */
+ public static final String OPTION_PerformVisibilityCheck = "org.eclipse.wst.jsdt.core.codeComplete.visibilityCheck"; //$NON-NLS-1$
+ public static final String OPTION_ForceImplicitQualification = "org.eclipse.wst.jsdt.core.codeComplete.forceImplicitQualification"; //$NON-NLS-1$
+ public static final String OPTION_FieldPrefixes = "org.eclipse.wst.jsdt.core.codeComplete.fieldPrefixes"; //$NON-NLS-1$
+ public static final String OPTION_StaticFieldPrefixes = "org.eclipse.wst.jsdt.core.codeComplete.staticFieldPrefixes"; //$NON-NLS-1$
+ public static final String OPTION_LocalPrefixes = "org.eclipse.wst.jsdt.core.codeComplete.localPrefixes"; //$NON-NLS-1$
+ public static final String OPTION_ArgumentPrefixes = "org.eclipse.wst.jsdt.core.codeComplete.argumentPrefixes"; //$NON-NLS-1$
+ public static final String OPTION_FieldSuffixes = "org.eclipse.wst.jsdt.core.codeComplete.fieldSuffixes"; //$NON-NLS-1$
+ public static final String OPTION_StaticFieldSuffixes = "org.eclipse.wst.jsdt.core.codeComplete.staticFieldSuffixes"; //$NON-NLS-1$
+ public static final String OPTION_LocalSuffixes = "org.eclipse.wst.jsdt.core.codeComplete.localSuffixes"; //$NON-NLS-1$
+ public static final String OPTION_ArgumentSuffixes = "org.eclipse.wst.jsdt.core.codeComplete.argumentSuffixes"; //$NON-NLS-1$
+ public static final String ENABLED = "enabled"; //$NON-NLS-1$
+ public static final String DISABLED = "disabled"; //$NON-NLS-1$
+ public boolean checkVisibility = false;
+ public boolean forceImplicitQualification = false;
+ public char[][] fieldPrefixes = null;
+ public char[][] staticFieldPrefixes = null;
+ public char[][] localPrefixes = null;
+ public char[][] argumentPrefixes = null;
+ public char[][] fieldSuffixes = null;
+ public char[][] staticFieldSuffixes = null;
+ public char[][] localSuffixes = null;
+ public char[][] argumentSuffixes = null;
+ /**
+ * Initializing the assist options with default settings
+ */
+ public AssistOptions() {
+ // Initializing the assist options with default settings
+ }
+ /**
+ * Initializing the assist options with external settings
+ */
+ public AssistOptions(Map settings) {
+ if (settings == null)
+ return;
+ // filter options which are related to the assist component
+ Iterator entries = settings.entrySet().iterator();
+ while (entries.hasNext()) {
+ Map.Entry entry = (Map.Entry) entries.next();
+ if (!(entry.getKey() instanceof String))
+ continue;
+ if (!(entry.getValue() instanceof String))
+ continue;
+ String optionID = (String) entry.getKey();
+ String optionValue = (String) entry.getValue();
+ if (optionID.equals(OPTION_PerformVisibilityCheck)) {
+ if (optionValue.equals(ENABLED)) {
+ this.checkVisibility = true;
+ } else if (optionValue.equals(DISABLED)) {
+ this.checkVisibility = false;
+ }
+ continue;
+ } else if (optionID.equals(OPTION_ForceImplicitQualification)) {
+ if (optionValue.equals(ENABLED)) {
+ this.forceImplicitQualification = true;
+ } else if (optionValue.equals(DISABLED)) {
+ this.forceImplicitQualification = false;
+ }
+ continue;
+ } else if (optionID.equals(OPTION_FieldPrefixes)) {
+ if (optionValue.length() == 0) {
+ this.fieldPrefixes = null;
+ } else {
+ this.fieldPrefixes = CharOperation.splitAndTrimOn(',',
+ optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_StaticFieldPrefixes)) {
+ if (optionValue.length() == 0) {
+ this.staticFieldPrefixes = null;
+ } else {
+ this.staticFieldPrefixes = CharOperation.splitAndTrimOn(
+ ',', optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_LocalPrefixes)) {
+ if (optionValue.length() == 0) {
+ this.localPrefixes = null;
+ } else {
+ this.localPrefixes = CharOperation.splitAndTrimOn(',',
+ optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_ArgumentPrefixes)) {
+ if (optionValue.length() == 0) {
+ this.argumentPrefixes = null;
+ } else {
+ this.argumentPrefixes = CharOperation.splitAndTrimOn(',',
+ optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_FieldSuffixes)) {
+ if (optionValue.length() == 0) {
+ this.fieldSuffixes = null;
+ } else {
+ this.fieldSuffixes = CharOperation.splitAndTrimOn(',',
+ optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_StaticFieldSuffixes)) {
+ if (optionValue.length() == 0) {
+ this.staticFieldSuffixes = null;
+ } else {
+ this.staticFieldSuffixes = CharOperation.splitAndTrimOn(
+ ',', optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_LocalSuffixes)) {
+ if (optionValue.length() == 0) {
+ this.localSuffixes = null;
+ } else {
+ this.localSuffixes = CharOperation.splitAndTrimOn(',',
+ optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_ArgumentSuffixes)) {
+ if (optionValue.length() == 0) {
+ this.argumentSuffixes = null;
+ } else {
+ this.argumentSuffixes = CharOperation.splitAndTrimOn(',',
+ optionValue.toCharArray());
+ }
+ continue;
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test134/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test134/A_in.js
new file mode 100644
index 0000000..f666461
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test134/A_in.js
@@ -0,0 +1,142 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.codeassist.impl;
+import java.util.Iterator;
+import java.util.Map;
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+public class AssistOptions {
+ /**
+ * Option IDs
+ */
+ public static final String OPTION_PerformVisibilityCheck = "org.eclipse.wst.jsdt.core.codeComplete.visibilityCheck"; //$NON-NLS-1$
+ public static final String OPTION_ForceImplicitQualification = "org.eclipse.wst.jsdt.core.codeComplete.forceImplicitQualification"; //$NON-NLS-1$
+ public static final String OPTION_FieldPrefixes = "org.eclipse.wst.jsdt.core.codeComplete.fieldPrefixes"; //$NON-NLS-1$
+ public static final String OPTION_StaticFieldPrefixes = "org.eclipse.wst.jsdt.core.codeComplete.staticFieldPrefixes"; //$NON-NLS-1$
+ public static final String OPTION_LocalPrefixes = "org.eclipse.wst.jsdt.core.codeComplete.localPrefixes"; //$NON-NLS-1$
+ public static final String OPTION_ArgumentPrefixes = "org.eclipse.wst.jsdt.core.codeComplete.argumentPrefixes"; //$NON-NLS-1$
+ public static final String OPTION_FieldSuffixes = "org.eclipse.wst.jsdt.core.codeComplete.fieldSuffixes"; //$NON-NLS-1$
+ public static final String OPTION_StaticFieldSuffixes = "org.eclipse.wst.jsdt.core.codeComplete.staticFieldSuffixes"; //$NON-NLS-1$
+ public static final String OPTION_LocalSuffixes = "org.eclipse.wst.jsdt.core.codeComplete.localSuffixes"; //$NON-NLS-1$
+ public static final String OPTION_ArgumentSuffixes = "org.eclipse.wst.jsdt.core.codeComplete.argumentSuffixes"; //$NON-NLS-1$
+ public static final String ENABLED = "enabled"; //$NON-NLS-1$
+ public static final String DISABLED = "disabled"; //$NON-NLS-1$
+ public boolean checkVisibility = false;
+ public boolean forceImplicitQualification = false;
+ public char[][] fieldPrefixes = null;
+ public char[][] staticFieldPrefixes = null;
+ public char[][] localPrefixes = null;
+ public char[][] argumentPrefixes = null;
+ public char[][] fieldSuffixes = null;
+ public char[][] staticFieldSuffixes = null;
+ public char[][] localSuffixes = null;
+ public char[][] argumentSuffixes = null;
+ /**
+ * Initializing the assist options with default settings
+ */
+ public AssistOptions() {
+ // Initializing the assist options with default settings
+ }
+ /**
+ * Initializing the assist options with external settings
+ */
+ public AssistOptions(Map settings) {
+ if (settings == null)
+ return;
+ // filter options which are related to the assist component
+ Iterator entries = settings.entrySet().iterator();
+ while (entries.hasNext()) {
+ Map.Entry entry = (Map.Entry) entries.next();
+ if (!(entry.getKey() instanceof String))
+ continue;
+ if (!(entry.getValue() instanceof String))
+ continue;
+ String optionID = (String) entry.getKey();
+ String optionValue = (String) entry.getValue();
+ if (optionID.equals(OPTION_PerformVisibilityCheck)) {
+ if (optionValue.equals(ENABLED)) {
+ this.checkVisibility = true;
+ } else if (optionValue.equals(DISABLED)) {
+ this.checkVisibility = false;
+ }
+ continue;
+ } else if (optionID.equals(OPTION_ForceImplicitQualification)) {
+ if (optionValue.equals(ENABLED)) {
+ this.forceImplicitQualification = true;
+ } else if (optionValue.equals(DISABLED)) {
+ this.forceImplicitQualification = false;
+ }
+ continue;
+ } else if (optionID.equals(OPTION_FieldPrefixes)) {
+ if (optionValue.length() == 0) {
+ this.fieldPrefixes = null;
+ } else {
+ this.fieldPrefixes = CharOperation.splitAndTrimOn(',',
+ optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_StaticFieldPrefixes)) {
+ if (optionValue.length() == 0) {
+ this.staticFieldPrefixes = null;
+ } else {
+ this.staticFieldPrefixes = CharOperation.splitAndTrimOn(
+ ',', optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_LocalPrefixes)) {
+ if (optionValue.length() == 0) {
+ this.localPrefixes = null;
+ } else {
+ this.localPrefixes = CharOperation.splitAndTrimOn(',',
+ optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_ArgumentPrefixes)) {
+ if (optionValue.length() == 0) {
+ this.argumentPrefixes = null;
+ } else {
+ this.argumentPrefixes = CharOperation.splitAndTrimOn(',',
+ optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_FieldSuffixes)) {
+ if (optionValue.length() == 0) {
+ this.fieldSuffixes = null;
+ } else {
+ this.fieldSuffixes = CharOperation.splitAndTrimOn(',',
+ optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_StaticFieldSuffixes)) {
+ if (optionValue.length() == 0) {
+ this.staticFieldSuffixes = null;
+ } else {
+ this.staticFieldSuffixes = CharOperation.splitAndTrimOn(
+ ',', optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_LocalSuffixes)) {
+ if (optionValue.length() == 0) {
+ this.localSuffixes = null;
+ } else {
+ this.localSuffixes = CharOperation.splitAndTrimOn(',',
+ optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_ArgumentSuffixes)) {
+ if (optionValue.length() == 0) {
+ this.argumentSuffixes = null;
+ } else {
+ this.argumentSuffixes = CharOperation.splitAndTrimOn(',',
+ optionValue.toCharArray());
+ }
+ continue;}}
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test134/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test134/A_out.js
new file mode 100644
index 0000000..c2c130b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test134/A_out.js
@@ -0,0 +1,144 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.internal.codeassist.impl;
+import java.util.Iterator;
+import java.util.Map;
+import org.eclipse.wst.jsdt.core.compiler.CharOperation;
+public class AssistOptions {
+ /**
+ * Option IDs
+ */
+ public static final String OPTION_PerformVisibilityCheck = "org.eclipse.wst.jsdt.core.codeComplete.visibilityCheck"; //$NON-NLS-1$
+ public static final String OPTION_ForceImplicitQualification = "org.eclipse.wst.jsdt.core.codeComplete.forceImplicitQualification"; //$NON-NLS-1$
+ public static final String OPTION_FieldPrefixes = "org.eclipse.wst.jsdt.core.codeComplete.fieldPrefixes"; //$NON-NLS-1$
+ public static final String OPTION_StaticFieldPrefixes = "org.eclipse.wst.jsdt.core.codeComplete.staticFieldPrefixes"; //$NON-NLS-1$
+ public static final String OPTION_LocalPrefixes = "org.eclipse.wst.jsdt.core.codeComplete.localPrefixes"; //$NON-NLS-1$
+ public static final String OPTION_ArgumentPrefixes = "org.eclipse.wst.jsdt.core.codeComplete.argumentPrefixes"; //$NON-NLS-1$
+ public static final String OPTION_FieldSuffixes = "org.eclipse.wst.jsdt.core.codeComplete.fieldSuffixes"; //$NON-NLS-1$
+ public static final String OPTION_StaticFieldSuffixes = "org.eclipse.wst.jsdt.core.codeComplete.staticFieldSuffixes"; //$NON-NLS-1$
+ public static final String OPTION_LocalSuffixes = "org.eclipse.wst.jsdt.core.codeComplete.localSuffixes"; //$NON-NLS-1$
+ public static final String OPTION_ArgumentSuffixes = "org.eclipse.wst.jsdt.core.codeComplete.argumentSuffixes"; //$NON-NLS-1$
+ public static final String ENABLED = "enabled"; //$NON-NLS-1$
+ public static final String DISABLED = "disabled"; //$NON-NLS-1$
+ public boolean checkVisibility = false;
+ public boolean forceImplicitQualification = false;
+ public char[][] fieldPrefixes = null;
+ public char[][] staticFieldPrefixes = null;
+ public char[][] localPrefixes = null;
+ public char[][] argumentPrefixes = null;
+ public char[][] fieldSuffixes = null;
+ public char[][] staticFieldSuffixes = null;
+ public char[][] localSuffixes = null;
+ public char[][] argumentSuffixes = null;
+ /**
+ * Initializing the assist options with default settings
+ */
+ public AssistOptions() {
+ // Initializing the assist options with default settings
+ }
+ /**
+ * Initializing the assist options with external settings
+ */
+ public AssistOptions(Map settings) {
+ if (settings == null)
+ return;
+ // filter options which are related to the assist component
+ Iterator entries = settings.entrySet().iterator();
+ while (entries.hasNext()) {
+ Map.Entry entry = (Map.Entry) entries.next();
+ if (!(entry.getKey() instanceof String))
+ continue;
+ if (!(entry.getValue() instanceof String))
+ continue;
+ String optionID = (String) entry.getKey();
+ String optionValue = (String) entry.getValue();
+ if (optionID.equals(OPTION_PerformVisibilityCheck)) {
+ if (optionValue.equals(ENABLED)) {
+ this.checkVisibility = true;
+ } else if (optionValue.equals(DISABLED)) {
+ this.checkVisibility = false;
+ }
+ continue;
+ } else if (optionID.equals(OPTION_ForceImplicitQualification)) {
+ if (optionValue.equals(ENABLED)) {
+ this.forceImplicitQualification = true;
+ } else if (optionValue.equals(DISABLED)) {
+ this.forceImplicitQualification = false;
+ }
+ continue;
+ } else if (optionID.equals(OPTION_FieldPrefixes)) {
+ if (optionValue.length() == 0) {
+ this.fieldPrefixes = null;
+ } else {
+ this.fieldPrefixes = CharOperation.splitAndTrimOn(',',
+ optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_StaticFieldPrefixes)) {
+ if (optionValue.length() == 0) {
+ this.staticFieldPrefixes = null;
+ } else {
+ this.staticFieldPrefixes = CharOperation.splitAndTrimOn(
+ ',', optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_LocalPrefixes)) {
+ if (optionValue.length() == 0) {
+ this.localPrefixes = null;
+ } else {
+ this.localPrefixes = CharOperation.splitAndTrimOn(',',
+ optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_ArgumentPrefixes)) {
+ if (optionValue.length() == 0) {
+ this.argumentPrefixes = null;
+ } else {
+ this.argumentPrefixes = CharOperation.splitAndTrimOn(',',
+ optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_FieldSuffixes)) {
+ if (optionValue.length() == 0) {
+ this.fieldSuffixes = null;
+ } else {
+ this.fieldSuffixes = CharOperation.splitAndTrimOn(',',
+ optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_StaticFieldSuffixes)) {
+ if (optionValue.length() == 0) {
+ this.staticFieldSuffixes = null;
+ } else {
+ this.staticFieldSuffixes = CharOperation.splitAndTrimOn(
+ ',', optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_LocalSuffixes)) {
+ if (optionValue.length() == 0) {
+ this.localSuffixes = null;
+ } else {
+ this.localSuffixes = CharOperation.splitAndTrimOn(',',
+ optionValue.toCharArray());
+ }
+ continue;
+ } else if (optionID.equals(OPTION_ArgumentSuffixes)) {
+ if (optionValue.length() == 0) {
+ this.argumentSuffixes = null;
+ } else {
+ this.argumentSuffixes = CharOperation.splitAndTrimOn(',',
+ optionValue.toCharArray());
+ }
+ continue;
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test135/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test135/A_in.js
new file mode 100644
index 0000000..b7bca36
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test135/A_in.js
@@ -0,0 +1,5 @@
+cancel.addActionListener(new ActionListener() {
+public void actionPerformed(ActionEvent e) {
+CancelPressed(); }
+}
+); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test135/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test135/A_out.js
new file mode 100644
index 0000000..8832191
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test135/A_out.js
@@ -0,0 +1,7 @@
+cancel.addActionListener(new ActionListener()
+{
+ public void actionPerformed(ActionEvent e)
+ {
+ CancelPressed();
+ }
+}); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test136/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test136/A_in.js
new file mode 100644
index 0000000..4d41ca9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test136/A_in.js
@@ -0,0 +1,8 @@
+public class A {
+ public TypeBinding getOtherFieldBindings(BlockScope scope) {
+ while (true) {
+ if (isFieldUseDeprecated(fieldBinding, scope, (this.bits & IsStrictlyAssignedMASK) != 0
+ && indexOfFirstFieldBinding == length));
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test136/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test136/A_out.js
new file mode 100644
index 0000000..7229368
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test136/A_out.js
@@ -0,0 +1,10 @@
+public class A {
+ public TypeBinding getOtherFieldBindings(BlockScope scope) {
+ while (true) {
+ if (isFieldUseDeprecated(fieldBinding, scope,
+ (this.bits & IsStrictlyAssignedMASK) != 0
+ && indexOfFirstFieldBinding == length))
+ ;
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test137/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test137/A_in.js
new file mode 100644
index 0000000..b311304
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test137/A_in.js
@@ -0,0 +1,129 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.wst.jsdt.core.dom;
+
+/**
+ * Abstract base class of all type AST node types. A type node represents a
+ * reference to a primitive type (including void), to a named class or
+ * interface type, or to an array type.
+ * <p>
+ * <pre>
+ * Type:
+ * PrimitiveType
+ * SimpleType
+ * ArrayType
+ * PrimitiveType:
+ * <b>byte</b>
+ * <b>short</b>
+ * <b>char</b>
+ * <b>int</b>
+ * <b>long</b>
+ * <b>float</b>
+ * <b>double</b>
+ * <b>boolean</b>
+ * <b>void</b>
+ * SimpleType:
+ * TypeName
+ * ArrayType:
+ * Type <b>[</b> <b>]</b>
+ * </pre>
+ * </p>
+ *
+ * @since 2.0
+ */
+public abstract class Type extends ASTNode {
+
+ /**
+ * Creates a new AST node for a type owned by the given AST.
+ * <p>
+ * N.B. This constructor is package-private.
+ * </p>
+ *
+ * @param ast the AST that is to own this node
+ */
+ Type(AST ast) {
+ super(ast);
+ }
+
+ /**
+ * Returns whether this type is a primitive type
+ * (<code>PrimitiveType</code>).
+ *
+ * @return <code>true</code> if this is a primitive type, and
+ * <code>false</code> otherwise
+ */
+ public final boolean isPrimitiveType() {
+ return (this instanceof PrimitiveType);
+ }
+
+ /**
+ * Returns whether this type is a simple type
+ * (<code>SimpleType</code>).
+ *
+ * @return <code>true</code> if this is a simple type, and
+ * <code>false</code> otherwise
+ */
+ public final boolean isSimpleType() {
+ return (this instanceof SimpleType);
+ }
+
+ /**
+ * Returns whether this type is an array type
+ * (<code>ArrayType</code>).
+ *
+ * @return <code>true</code> if this is an array type, and
+ * <code>false</code> otherwise
+ */
+ public final boolean isArrayType() {
+ return (this instanceof ArrayType);
+ }
+
+ /**
+ * Resolves and returns the binding for this type.
+ * <p>
+ * Note that bindings are generally unavailable unless requested when the
+ * AST is being built.
+ * </p>
+ *
+ * @return the type binding, or <code>null</code> if the binding cannot be
+ * resolved
+ */
+ public final ITypeBinding resolveBinding() {
+ return getAST().getBindingResolver().resolveType(this);
+ }
+
+// JSR-014
+// /**
+// * Returns whether this type is a parameterized type
+// * (<code>ParameterizedType</code>).
+// *
+// * @return <code>true</code> if this is a parameterized type, and
+// * <code>false</code> otherwise
+// */
+// public final boolean isParameterizedType() {
+// return (this instanceof ParameterizedType);
+// }
+
+// public IBinding resolvedType();
+}
+
+//// JSR-014
+//public class ParameterizedType extends Type {
+// public ParameterizedType(AST ast) {
+// super(ast);
+// }
+//
+// public Type getGenericType();
+// public void setGenericType(Type genericType);
+//
+// public NodeList<Type> parameters();
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test137/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test137/A_out.js
new file mode 100644
index 0000000..6feca94
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test137/A_out.js
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.jsdt.core.dom;
+/**
+ * Abstract base class of all type AST node types. A type node represents a
+ * reference to a primitive type (including void), to a named class or
+ * interface type, or to an array type.
+ * <p>
+ * <pre>
+ * Type:
+ * PrimitiveType
+ * SimpleType
+ * ArrayType
+ * PrimitiveType:
+ * <b>byte</b>
+ * <b>short</b>
+ * <b>char</b>
+ * <b>int</b>
+ * <b>long</b>
+ * <b>float</b>
+ * <b>double</b>
+ * <b>boolean</b>
+ * <b>void</b>
+ * SimpleType:
+ * TypeName
+ * ArrayType:
+ * Type <b>[</b> <b>]</b>
+ * </pre>
+ * </p>
+ *
+ * @since 2.0
+ */
+public abstract class Type extends ASTNode {
+ /**
+ * Creates a new AST node for a type owned by the given AST.
+ * <p>
+ * N.B. This constructor is package-private.
+ * </p>
+ *
+ * @param ast the AST that is to own this node
+ */
+ Type(AST ast) {
+ super(ast);
+ }
+ /**
+ * Returns whether this type is a primitive type
+ * (<code>PrimitiveType</code>).
+ *
+ * @return <code>true</code> if this is a primitive type, and
+ * <code>false</code> otherwise
+ */
+ public final boolean isPrimitiveType() {
+ return (this instanceof PrimitiveType);
+ }
+ /**
+ * Returns whether this type is a simple type
+ * (<code>SimpleType</code>).
+ *
+ * @return <code>true</code> if this is a simple type, and
+ * <code>false</code> otherwise
+ */
+ public final boolean isSimpleType() {
+ return (this instanceof SimpleType);
+ }
+ /**
+ * Returns whether this type is an array type
+ * (<code>ArrayType</code>).
+ *
+ * @return <code>true</code> if this is an array type, and
+ * <code>false</code> otherwise
+ */
+ public final boolean isArrayType() {
+ return (this instanceof ArrayType);
+ }
+ /**
+ * Resolves and returns the binding for this type.
+ * <p>
+ * Note that bindings are generally unavailable unless requested when the
+ * AST is being built.
+ * </p>
+ *
+ * @return the type binding, or <code>null</code> if the binding cannot be
+ * resolved
+ */
+ public final ITypeBinding resolveBinding() {
+ return getAST().getBindingResolver().resolveType(this);
+ }
+ // JSR-014
+ // /**
+ // * Returns whether this type is a parameterized type
+ // * (<code>ParameterizedType</code>).
+ // *
+ // * @return <code>true</code> if this is a parameterized type, and
+ // * <code>false</code> otherwise
+ // */
+ // public final boolean isParameterizedType() {
+ // return (this instanceof ParameterizedType);
+ // }
+ // public IBinding resolvedType();
+}
+//// JSR-014
+//public class ParameterizedType extends Type {
+// public ParameterizedType(AST ast) {
+// super(ast);
+// }
+//
+// public Type getGenericType();
+// public void setGenericType(Type genericType);
+//
+// public NodeList<Type> parameters();
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test138/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test138/A_in.js
new file mode 100644
index 0000000..9cd5835
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test138/A_in.js
@@ -0,0 +1 @@
+new A(){private void newMethod(String str){}}; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test138/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test138/A_out.js
new file mode 100644
index 0000000..3169286
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test138/A_out.js
@@ -0,0 +1,4 @@
+new A(){
+ private void newMethod(String str) {
+ }
+ }; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test139/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test139/A_in.js
new file mode 100644
index 0000000..9628711
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test139/A_in.js
@@ -0,0 +1 @@
+float x; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test139/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test139/A_out.js
new file mode 100644
index 0000000..9628711
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test139/A_out.js
@@ -0,0 +1 @@
+float x; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test140/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test140/A_in.js
new file mode 100644
index 0000000..3cb495e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test140/A_in.js
@@ -0,0 +1,9 @@
+package test1;
+public class A {
+ public void foo(int i) {
+ switch (x) {
+ case 1 : return;
+ default :
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test140/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test140/A_out.js
new file mode 100644
index 0000000..d0d3538
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test140/A_out.js
@@ -0,0 +1,10 @@
+package test1;
+public class A {
+ public void foo(int i) {
+ switch (x) {
+ case 1 :
+ return;
+ default :
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test141/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test141/A_in.js
new file mode 100644
index 0000000..d0d3538
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test141/A_in.js
@@ -0,0 +1,10 @@
+package test1;
+public class A {
+ public void foo(int i) {
+ switch (x) {
+ case 1 :
+ return;
+ default :
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test141/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test141/A_out.js
new file mode 100644
index 0000000..c5495a6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test141/A_out.js
@@ -0,0 +1,10 @@
+package test1;
+public class A {
+ public void foo(int i) {
+ switch (x) {
+ case 1 :
+ return;
+ default :
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test142/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test142/A_in.js
new file mode 100644
index 0000000..f27d7c1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test142/A_in.js
@@ -0,0 +1,4 @@
+/* (non-Javadoc)
+ * @see p.A#m()
+ */
+public int[] m() {return null;} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test142/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test142/A_out.js
new file mode 100644
index 0000000..7755e8e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test142/A_out.js
@@ -0,0 +1,6 @@
+ /* (non-Javadoc)
+ * @see p.A#m()
+ */
+ public int[] m() {
+ return null;
+ } \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test143/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test143/A_in.js
new file mode 100644
index 0000000..4bd0106
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test143/A_in.js
@@ -0,0 +1,4 @@
+/* (non-Javadoc)
+ * @see p.A#m()
+ */
+int[] m() {return null;} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test143/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test143/A_out.js
new file mode 100644
index 0000000..c5baa12
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test143/A_out.js
@@ -0,0 +1,6 @@
+ /* (non-Javadoc)
+ * @see p.A#m()
+ */
+ int[] m() {
+ return null;
+ } \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test144/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test144/A_in.js
new file mode 100644
index 0000000..a14c715
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test144/A_in.js
@@ -0,0 +1,5 @@
+public final void addDefinitelyAssignedVariables(Scope scope, int initStateIndex) {
+/*
+
+*/
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test144/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test144/A_out.js
new file mode 100644
index 0000000..2625b66
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test144/A_out.js
@@ -0,0 +1,5 @@
+public final void addDefinitelyAssignedVariables(Scope scope, int initStateIndex) {
+ /*
+
+ */
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test145/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test145/A_in.js
new file mode 100644
index 0000000..0b4e1a8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test145/A_in.js
@@ -0,0 +1,4 @@
+public final void addDefinitelyAssignedVariables(Scope scope, int initStateIndex) {
+/* test
+*/
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test145/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test145/A_out.js
new file mode 100644
index 0000000..f368d92
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test145/A_out.js
@@ -0,0 +1,4 @@
+public final void addDefinitelyAssignedVariables(Scope scope, int initStateIndex) {
+ /* test
+ */
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test146/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test146/A_in.js
new file mode 100644
index 0000000..8f4a19b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test146/A_in.js
@@ -0,0 +1,12 @@
+public final void addDefinitelyAssignedVariables(Scope scope, int initStateIndex) {
+ marker.setAttributes(
+ new String[] {
+ IMarker.MESSAGE,
+ IMarker.SEVERITY,
+ IMarker.LOCATION,
+ IJavaModelMarker.CYCLE_DETECTED,
+ IJavaModelMarker.CLASSPATH_FILE_FORMAT,
+ IJavaModelMarker.ID,
+ IJavaModelMarker.ARGUMENTS ,
+ });
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test146/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test146/A_out.js
new file mode 100644
index 0000000..9bbe2f9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test146/A_out.js
@@ -0,0 +1,6 @@
+public final void addDefinitelyAssignedVariables(Scope scope, int initStateIndex) {
+ marker.setAttributes(new String[]{IMarker.MESSAGE, IMarker.SEVERITY,
+ IMarker.LOCATION, IJavaModelMarker.CYCLE_DETECTED,
+ IJavaModelMarker.CLASSPATH_FILE_FORMAT, IJavaModelMarker.ID,
+ IJavaModelMarker.ARGUMENTS,});
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test147/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test147/A_in.js
new file mode 100644
index 0000000..111bacb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test147/A_in.js
@@ -0,0 +1,40 @@
+package p;
+/** typecomment template*/
+public interface I {
+/**
+ * comment f
+ */public abstract void f();
+/** comment fz*/public abstract void fz();
+/*
+ * comment f1
+ */public abstract void f1();
+/* comment f1z*/public abstract void f1z();
+//comment f11
+public abstract void f11();
+public abstract void f2();
+ /**
+ * jdoc I1
+ */
+ public static final int I1= 0;
+
+
+ /** jdoc I1z*/
+ public static final int I1z= 0;
+
+
+ /*
+ * comI2
+ */
+ public static final int I2= 0;
+
+
+ /* com I2z*/
+ public static final int I2z= 0;
+
+
+ //comment I3
+ public static final int I3= 0;
+
+
+ public static final int I4= 0;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test147/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test147/A_out.js
new file mode 100644
index 0000000..3793142
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test147/A_out.js
@@ -0,0 +1,37 @@
+package p;
+/** typecomment template*/
+public interface I {
+ /**
+ * comment f
+ */
+ public abstract void f();
+ /** comment fz*/
+ public abstract void fz();
+ /*
+ * comment f1
+ */public abstract void f1();
+ /* comment f1z*/public abstract void f1z();
+ //comment f11
+ public abstract void f11();
+ public abstract void f2();
+ /**
+ * jdoc I1
+ */
+ public static final int I1= 0;
+
+ /** jdoc I1z*/
+ public static final int I1z= 0;
+
+ /*
+ * comI2
+ */
+ public static final int I2= 0;
+
+ /* com I2z*/
+ public static final int I2z= 0;
+
+ //comment I3
+ public static final int I3= 0;
+
+ public static final int I4= 0;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test148/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test148/A_in.js
new file mode 100644
index 0000000..9f3047a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test148/A_in.js
@@ -0,0 +1,2 @@
+ if (!doesFileExist(qualifiedPackageName, "")) //$NON-NLS-1$
+ break notFound; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test148/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test148/A_out.js
new file mode 100644
index 0000000..e871dbe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test148/A_out.js
@@ -0,0 +1,2 @@
+if (!doesFileExist(qualifiedPackageName, "")) //$NON-NLS-1$
+ break notFound; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test149/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test149/A_in.js
new file mode 100644
index 0000000..2ca3f4b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test149/A_in.js
@@ -0,0 +1,5 @@
+ if (scope.isJavaLangCloneable(expressionType) || scope.isJavaIoSerializable(expressionType))
+ //potential runtime error
+ {
+ return true;
+ } \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test149/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test149/A_out.js
new file mode 100644
index 0000000..e1769d9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test149/A_out.js
@@ -0,0 +1,6 @@
+if (scope.isJavaLangCloneable(expressionType)
+ || scope.isJavaIoSerializable(expressionType))
+//potential runtime error
+{
+ return true;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test150/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test150/A_in.js
new file mode 100644
index 0000000..730b4ae
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test150/A_in.js
@@ -0,0 +1,4 @@
+ if (scope.isJavaLangCloneable(expressionType) || scope.isJavaIoSerializable(expressionType)) //potential runtime error
+ {
+ return true;
+ } \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test150/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test150/A_out.js
new file mode 100644
index 0000000..117b59d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test150/A_out.js
@@ -0,0 +1,5 @@
+if (scope.isJavaLangCloneable(expressionType)
+ || scope.isJavaIoSerializable(expressionType)) //potential runtime error
+{
+ return true;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test151/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test151/A_in.js
new file mode 100644
index 0000000..2ef8815
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test151/A_in.js
@@ -0,0 +1,13 @@
+public boolean execute(IProgressMonitor progressMonitor) {
+ if (this.isCancelled
+ || progressMonitor != null
+ && progressMonitor.isCanceled())
+ return true;
+ IIndex index = manager.getIndex(this.indexPath, true,
+ /*reuse index file*/true /*create if none*/);
+ if (index == null)
+ return true;
+ ReadWriteMonitor monitor = manager.getMonitorFor(index);
+ if (monitor == null)
+ return true;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test151/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test151/A_out.js
new file mode 100644
index 0000000..d4a7846
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test151/A_out.js
@@ -0,0 +1,12 @@
+public boolean execute(IProgressMonitor progressMonitor) {
+ if (this.isCancelled || progressMonitor != null
+ && progressMonitor.isCanceled())
+ return true;
+ IIndex index = manager.getIndex(this.indexPath, true,
+ /*reuse index file*/true /*create if none*/);
+ if (index == null)
+ return true;
+ ReadWriteMonitor monitor = manager.getMonitorFor(index);
+ if (monitor == null)
+ return true;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test152/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test152/A_in.js
new file mode 100644
index 0000000..3058df5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test152/A_in.js
@@ -0,0 +1,5 @@
+ if (scope.isJavaLangCloneable(expressionType) || scope.isJavaIoSerializable(expressionType))
+ /*potential runtime error*/
+ {
+ return true;
+ } \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test152/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test152/A_out.js
new file mode 100644
index 0000000..f5a6636
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test152/A_out.js
@@ -0,0 +1,6 @@
+if (scope.isJavaLangCloneable(expressionType)
+ || scope.isJavaIoSerializable(expressionType))
+/*potential runtime error*/
+{
+ return true;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test153/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test153/A_in.js
new file mode 100644
index 0000000..4e13ace
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test153/A_in.js
@@ -0,0 +1,6 @@
+public class Parser {
+ protected int astLengthPtr;
+ protected int[] astLengthStack;
+ public CompilationUnitDeclaration compilationUnit; /*the result from parse()*/
+ AstNode[] noAstNodes = new AstNode[AstStackIncrement];
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test153/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test153/A_out.js
new file mode 100644
index 0000000..59a8ea5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test153/A_out.js
@@ -0,0 +1,6 @@
+public class Parser {
+ protected int astLengthPtr;
+ protected int[] astLengthStack;
+ public CompilationUnitDeclaration compilationUnit; /*the result from parse()*/
+ AstNode[] noAstNodes = new AstNode[AstStackIncrement];
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test154/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test154/A_in.js
new file mode 100644
index 0000000..3d716c3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test154/A_in.js
@@ -0,0 +1,19 @@
+package test1;
+import java.util.Vector;
+public class E {
+ private class EInner {
+ public int inner(int i) {
+ }
+ }
+ private int fField1;
+ private int fField2;
+ public void foo1() {
+ fField1 = fField2;
+ if (fField1 == 0) {
+ fField2++;
+ }
+ EInner inner = new EInner();
+ }
+ public int foo1(int i) {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test154/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test154/A_out.js
new file mode 100644
index 0000000..fdfd99b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test154/A_out.js
@@ -0,0 +1,19 @@
+package test1;
+import java.util.Vector;
+public class E {
+ private class EInner {
+ public int inner(int i) {
+ }
+ }
+ private int fField1;
+ private int fField2;
+ public void foo1() {
+ fField1 = fField2;
+ if (fField1 == 0) {
+ fField2++;
+ }
+ EInner inner = new EInner();
+ }
+ public int foo1(int i) {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test155/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test155/A_in.js
new file mode 100644
index 0000000..c6ede02
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test155/A_in.js
@@ -0,0 +1,9 @@
+String s =
+ "alfa"
+ + "beta"
+ + "gamma"
+ + "delta"
+ + "alfa"
+ + "beta"
+ + "alfa"
+ + "beta"; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test155/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test155/A_out.js
new file mode 100644
index 0000000..a98faf0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test155/A_out.js
@@ -0,0 +1,2 @@
+String s = "alfa" + "beta" + "gamma" + "delta" + "alfa" + "beta" + "alfa"
+ + "beta"; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test156/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test156/A_in.js
new file mode 100644
index 0000000..a4bff74
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test156/A_in.js
@@ -0,0 +1,2 @@
+if (JobManager.VERBOSE) { JobManager.verbose("-> execution time: " + executionTime + "ms - " + this);//$NON-NLS-1$//$NON-NLS-2$
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test156/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test156/A_out.js
new file mode 100644
index 0000000..3f4583f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test156/A_out.js
@@ -0,0 +1,3 @@
+if (JobManager.VERBOSE) {
+ JobManager.verbose("-> execution time: " + executionTime + "ms - " + this);//$NON-NLS-1$//$NON-NLS-2$
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test157/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test157/A_in.js
new file mode 100644
index 0000000..a9f3cea
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test157/A_in.js
@@ -0,0 +1 @@
+switch(i) {case 1:} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test157/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test157/A_out.js
new file mode 100644
index 0000000..0c45553
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test157/A_out.js
@@ -0,0 +1,2 @@
+switch(i) {
+ case 1 :} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test158/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test158/A_in.js
new file mode 100644
index 0000000..a9f3cea
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test158/A_in.js
@@ -0,0 +1 @@
+switch(i) {case 1:} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test158/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test158/A_out.js
new file mode 100644
index 0000000..2d5bd47
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test158/A_out.js
@@ -0,0 +1,3 @@
+switch(i) {
+ case 1 :
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test159/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test159/A_in.js
new file mode 100644
index 0000000..13cc3db
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test159/A_in.js
@@ -0,0 +1,44 @@
+/**
+ * This header comment may be left unformatted.
+ */
+
+package org.eclipse.formatter.example;
+
+/**
+ * Example class displaying the effects of various code formatting preferences.
+ * <p> See also {@link org.eclipse.editor.syntax}. </p>
+ *
+ * The blank line above may be cleared.
+ * @version 3.0
+ */
+public class Example extends Object {
+ /* This comment may be wrapped to multiple lines depending on the maximal line length. */
+ private int integer= 0;
+ // This single-line comment may be wrapped too...
+ private String string= "zero";
+
+ /**
+ * This comment shows the formatting of code snippets.
+ * <pre>
+ * while ((size = foo(size, max)) > 0) { System.out.println("bar"); }
+ * </pre>
+ * After this comment a blank line may be inserted.
+ * @param size The size
+ * @param max The maximum
+ */
+ public int foo(int size, int max) {
+
+ if (size < max) {
+ try {
+ size=(long)stream.available();
+ } catch (IOException e) {
+
+ }
+ } else if (size == max) {
+ ++size;
+ } else {
+ --size;
+ }
+ return size;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test159/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test159/A_out.js
new file mode 100644
index 0000000..d86c863
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test159/A_out.js
@@ -0,0 +1,44 @@
+/**
+ * This header comment may be left unformatted.
+ */
+
+package org.eclipse.formatter.example;
+
+/**
+ * Example class displaying the effects of various code formatting preferences.
+ * <p> See also {@link org.eclipse.editor.syntax}. </p>
+ *
+ * The blank line above may be cleared.
+ * @version 3.0
+ */
+public class Example extends Object {
+ /* This comment may be wrapped to multiple lines depending on the maximal line length. */
+ private int integer = 0;
+ // This single-line comment may be wrapped too...
+ private String string = "zero";
+
+ /**
+ * This comment shows the formatting of code snippets.
+ * <pre>
+ * while ((size = foo(size, max)) > 0) { System.out.println("bar"); }
+ * </pre>
+ * After this comment a blank line may be inserted.
+ * @param size The size
+ * @param max The maximum
+ */
+ public int foo(int size, int max) {
+
+ if (size < max) {
+ try {
+ size = (long) stream.available();
+ } catch (IOException e) {
+
+ }
+ } else if (size == max) {
+ ++size;
+ } else {
+ --size;
+ }
+ return size;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test160/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test160/A_in.js
new file mode 100644
index 0000000..b969cae
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test160/A_in.js
@@ -0,0 +1,15 @@
+ public int foo(int size, int max) {
+
+ if (size < max) {
+ try {
+ size=(long)stream.available();
+ } catch (IOException e) {
+
+ }
+ } else if (size == max) {
+ ++size;
+ } else {
+ --size;
+ }
+ return size;
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test160/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test160/A_out.js
new file mode 100644
index 0000000..3f041da
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test160/A_out.js
@@ -0,0 +1,13 @@
+public int foo(int size, int max) {
+ if (size < max) {
+ try {
+ size = (long) stream.available();
+ } catch (IOException e) {
+ }
+ } else if (size == max) {
+ ++size;
+ } else {
+ --size;
+ }
+ return size;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test161/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test161/A_in.js
new file mode 100644
index 0000000..b969cae
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test161/A_in.js
@@ -0,0 +1,15 @@
+ public int foo(int size, int max) {
+
+ if (size < max) {
+ try {
+ size=(long)stream.available();
+ } catch (IOException e) {
+
+ }
+ } else if (size == max) {
+ ++size;
+ } else {
+ --size;
+ }
+ return size;
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test161/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test161/A_out.js
new file mode 100644
index 0000000..2f3957b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test161/A_out.js
@@ -0,0 +1,14 @@
+public int foo(int size, int max) {
+ if (size < max) {
+ try {
+ size = (long) stream.available();
+ } catch (IOException e) {
+ }
+ } else
+ if (size == max) {
+ ++size;
+ } else {
+ --size;
+ }
+ return size;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test162/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test162/A_in.js
new file mode 100644
index 0000000..b969cae
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test162/A_in.js
@@ -0,0 +1,15 @@
+ public int foo(int size, int max) {
+
+ if (size < max) {
+ try {
+ size=(long)stream.available();
+ } catch (IOException e) {
+
+ }
+ } else if (size == max) {
+ ++size;
+ } else {
+ --size;
+ }
+ return size;
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test162/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test162/A_out.js
new file mode 100644
index 0000000..78bdd54
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test162/A_out.js
@@ -0,0 +1,17 @@
+public int foo(int size, int max) {
+ if (size < max) {
+ try {
+ size = (long) stream.available();
+ }
+ catch (IOException e) {
+ }
+ }
+ else
+ if (size == max) {
+ ++size;
+ }
+ else {
+ --size;
+ }
+ return size;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test163/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test163/A_in.js
new file mode 100644
index 0000000..b969cae
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test163/A_in.js
@@ -0,0 +1,15 @@
+ public int foo(int size, int max) {
+
+ if (size < max) {
+ try {
+ size=(long)stream.available();
+ } catch (IOException e) {
+
+ }
+ } else if (size == max) {
+ ++size;
+ } else {
+ --size;
+ }
+ return size;
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test163/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test163/A_out.js
new file mode 100644
index 0000000..2a0e80d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test163/A_out.js
@@ -0,0 +1,16 @@
+public int foo(int size, int max) {
+ if (size < max) {
+ try {
+ size = (long) stream.available();
+ }
+ catch (IOException e) {
+ }
+ }
+ else if (size == max) {
+ ++size;
+ }
+ else {
+ --size;
+ }
+ return size;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test164/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test164/A_in.js
new file mode 100644
index 0000000..148f7d3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test164/A_in.js
@@ -0,0 +1,4 @@
+public class X {
+ void foo() throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.NullPointerException {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test164/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test164/A_out.js
new file mode 100644
index 0000000..9dee16b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test164/A_out.js
@@ -0,0 +1,5 @@
+public class X {
+ void foo() throws java.io.IOException, java.lang.IllegalArgumentException,
+ java.lang.NullPointerException {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test165/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test165/A_in.js
new file mode 100644
index 0000000..d767c7d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test165/A_in.js
@@ -0,0 +1,10 @@
+public class A {
+ A(String s) {
+ }
+ protected void foo() {
+ A a = new A("") {//$NON-NLS-1$
+ public void run() {
+ }
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test165/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test165/A_out.js
new file mode 100644
index 0000000..af38cba
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test165/A_out.js
@@ -0,0 +1,10 @@
+public class A {
+ A(String s) {
+ }
+ protected void foo() {
+ A a = new A("") {//$NON-NLS-1$
+ public void run() {
+ }
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test166/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test166/A_in.js
new file mode 100644
index 0000000..f200fd3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test166/A_in.js
@@ -0,0 +1,17 @@
+public class X {
+ public static void main(String[] args) {
+ new X().bar();
+ }
+ public void bar() {
+ class C extends X {
+ public void foo() {
+ System.out.println("SUCCESS");
+
+ }
+ }
+ class D extends C {
+ D(){X.this.super();}
+ }
+ new D().foo();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test166/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test166/A_out.js
new file mode 100644
index 0000000..c3125a7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test166/A_out.js
@@ -0,0 +1,18 @@
+public class X {
+ public static void main(String[] args) {
+ new X().bar();
+ }
+ public void bar() {
+ class C extends X {
+ public void foo() {
+ System.out.println("SUCCESS");
+ }
+ }
+ class D extends C {
+ D() {
+ X.this.super();
+ }
+ }
+ new D().foo();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test167/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test167/A_in.js
new file mode 100644
index 0000000..d45c20f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test167/A_in.js
@@ -0,0 +1,14 @@
+public class X {
+ X(String s) {
+ }
+ protected void foo() {
+ X a = new X(new StringBuffer("this").append("is").append
+("a").append(
+ "long")
+ .append("argument")
+ .toString()) {
+ public void run() {
+ }
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test167/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test167/A_out.js
new file mode 100644
index 0000000..4abc291
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test167/A_out.js
@@ -0,0 +1,11 @@
+public class X {
+ X(String s) {
+ }
+ protected void foo() {
+ X a = new X(new StringBuffer("this").append("is").append("a").append(
+ "long").append("argument").toString()) {
+ public void run() {
+ }
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test168/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test168/A_in.js
new file mode 100644
index 0000000..fe9dfdb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test168/A_in.js
@@ -0,0 +1,7 @@
+public class X {
+ X(String s) {
+ }
+ protected void foo() {
+ append("argument");
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test168/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test168/A_out.js
new file mode 100644
index 0000000..fe9dfdb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test168/A_out.js
@@ -0,0 +1,7 @@
+public class X {
+ X(String s) {
+ }
+ protected void foo() {
+ append("argument");
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test169/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test169/A_in.js
new file mode 100644
index 0000000..27f248a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test169/A_in.js
@@ -0,0 +1,7 @@
+public class X {
+ X(String s) {
+ }
+ protected void foo() {
+ cmd.createArgument().foo().test().error().setFile(destDir.getAbsoluteFile());
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test169/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test169/A_out.js
new file mode 100644
index 0000000..06fc3db
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test169/A_out.js
@@ -0,0 +1,8 @@
+public class X {
+ X(String s) {
+ }
+ protected void foo() {
+ cmd.createArgument().foo().test().error().setFile(
+ destDir.getAbsoluteFile());
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test170/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test170/A_in.js
new file mode 100644
index 0000000..d1072b4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test170/A_in.js
@@ -0,0 +1,7 @@
+public class X {
+ X(String s) {
+ }
+ protected void foo() {
+ cmd.createArgument().foo().test().error().setFile((Name) (destDir()).getAbsoluteFile());
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test170/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test170/A_out.js
new file mode 100644
index 0000000..949cef7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test170/A_out.js
@@ -0,0 +1,8 @@
+public class X {
+ X(String s) {
+ }
+ protected void foo() {
+ cmd.createArgument().foo().test().error().setFile(
+ (Name) (destDir()).getAbsoluteFile());
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test171/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test171/A_in.js
new file mode 100644
index 0000000..d54dec9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test171/A_in.js
@@ -0,0 +1,15 @@
+public int foo(int size, int max) {
+
+ if (size < max) {
+ try {
+ size=(long)stream.available();
+ } catch (IOException e) {
+
+ }
+ } else if (size == max) {
+ ++size;
+ } else {
+ --size;
+ }
+ return size;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test171/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test171/A_out.js
new file mode 100644
index 0000000..78bdd54
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test171/A_out.js
@@ -0,0 +1,17 @@
+public int foo(int size, int max) {
+ if (size < max) {
+ try {
+ size = (long) stream.available();
+ }
+ catch (IOException e) {
+ }
+ }
+ else
+ if (size == max) {
+ ++size;
+ }
+ else {
+ --size;
+ }
+ return size;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test172/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test172/A_in.js
new file mode 100644
index 0000000..f623eff
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test172/A_in.js
@@ -0,0 +1,14 @@
+public int foo(int size, int max) {
+
+ if (size < max) {
+ try {
+ size=(long)stream.available();
+ } catch (IOException e) {
+ }
+ } else if (size == max) {
+ ++size;
+ } else {
+ --size;
+ }
+ return size;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test172/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test172/A_out.js
new file mode 100644
index 0000000..78bdd54
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test172/A_out.js
@@ -0,0 +1,17 @@
+public int foo(int size, int max) {
+ if (size < max) {
+ try {
+ size = (long) stream.available();
+ }
+ catch (IOException e) {
+ }
+ }
+ else
+ if (size == max) {
+ ++size;
+ }
+ else {
+ --size;
+ }
+ return size;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test173/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test173/A_in.js
new file mode 100644
index 0000000..95fa274
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test173/A_in.js
@@ -0,0 +1,8 @@
+public int foo(int size, int max) {
+
+ try {
+ size=(long)stream.available();
+ } catch (IOException e) {
+ }
+ return size;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test173/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test173/A_out.js
new file mode 100644
index 0000000..a90a86d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test173/A_out.js
@@ -0,0 +1,6 @@
+public int foo(int size, int max) {
+ try {
+ size = (long) stream.available();
+ } catch (IOException e) {}
+ return size;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test174/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test174/A_in.js
new file mode 100644
index 0000000..c87176a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test174/A_in.js
@@ -0,0 +1,2 @@
+public int foo(int size, int max) {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test174/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test174/A_out.js
new file mode 100644
index 0000000..67dc770
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test174/A_out.js
@@ -0,0 +1 @@
+public int foo(int size, int max) {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test175/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test175/A_in.js
new file mode 100644
index 0000000..95fa274
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test175/A_in.js
@@ -0,0 +1,8 @@
+public int foo(int size, int max) {
+
+ try {
+ size=(long)stream.available();
+ } catch (IOException e) {
+ }
+ return size;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test175/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test175/A_out.js
new file mode 100644
index 0000000..cc9fc5e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test175/A_out.js
@@ -0,0 +1,7 @@
+public int foo(int size, int max) {
+ try {
+ size = (long) stream.available();
+ } catch (IOException e) {
+ }
+ return size;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test176/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test176/A_in.js
new file mode 100644
index 0000000..67dc770
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test176/A_in.js
@@ -0,0 +1 @@
+public int foo(int size, int max) {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test176/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test176/A_out.js
new file mode 100644
index 0000000..c87176a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test176/A_out.js
@@ -0,0 +1,2 @@
+public int foo(int size, int max) {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test177/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test177/A_in.js
new file mode 100644
index 0000000..60e5072
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test177/A_in.js
@@ -0,0 +1,2 @@
+public class A {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test177/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test177/A_out.js
new file mode 100644
index 0000000..efd7fa3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test177/A_out.js
@@ -0,0 +1 @@
+public class A {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test178/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test178/A_in.js
new file mode 100644
index 0000000..efd7fa3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test178/A_in.js
@@ -0,0 +1 @@
+public class A {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test178/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test178/A_out.js
new file mode 100644
index 0000000..60e5072
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test178/A_out.js
@@ -0,0 +1,2 @@
+public class A {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test179/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test179/A_in.js
new file mode 100644
index 0000000..db31bd1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test179/A_in.js
@@ -0,0 +1,5 @@
+public class A {
+ A foo() {
+ return new A() {};
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test179/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test179/A_out.js
new file mode 100644
index 0000000..2dbee0b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test179/A_out.js
@@ -0,0 +1,6 @@
+public class A {
+ A foo() {
+ return new A() {
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test180/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test180/A_in.js
new file mode 100644
index 0000000..e178bb8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test180/A_in.js
@@ -0,0 +1,4 @@
+public class A {
+ A foo() {return new A() {};
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test180/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test180/A_out.js
new file mode 100644
index 0000000..db31bd1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test180/A_out.js
@@ -0,0 +1,5 @@
+public class A {
+ A foo() {
+ return new A() {};
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test181/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test181/A_in.js
new file mode 100644
index 0000000..6215a82
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test181/A_in.js
@@ -0,0 +1,7 @@
+public class X {
+ String str1 = "xxxxxxxxxx", str2 = "xxxxxxxxxx", str3 = "xxxxxxxxxx", str4 = "xxxxxxxxxx", str5 = "xxxxxxxxxx", str6 = "xxxxxxxxxx",
+ str7 = "xxxxxxxxxx",
+ str8 = "xxxxxxxxxx",
+ str9 = "xxxxxxxxxx",
+ str10 = "xxxxxxxxxx";
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test181/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test181/A_out.js
new file mode 100644
index 0000000..cb56773
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test181/A_out.js
@@ -0,0 +1,6 @@
+public class X {
+ String str1 = "xxxxxxxxxx", str2 = "xxxxxxxxxx", str3 = "xxxxxxxxxx",
+ str4 = "xxxxxxxxxx", str5 = "xxxxxxxxxx", str6 = "xxxxxxxxxx",
+ str7 = "xxxxxxxxxx", str8 = "xxxxxxxxxx", str9 = "xxxxxxxxxx",
+ str10 = "xxxxxxxxxx";
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test182/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test182/A_in.js
new file mode 100644
index 0000000..a25e714
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test182/A_in.js
@@ -0,0 +1,7 @@
+public class X {
+ String str1 = "toto", str2 = "titi", str3 = "tata";
+
+ void foo() {
+ String str1 = "toto", str2 = "titi", str3 = "tata";
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test182/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test182/A_out.js
new file mode 100644
index 0000000..be2ff97
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test182/A_out.js
@@ -0,0 +1,7 @@
+public class X {
+ String str1 = "toto", str2 = "titi", str3 = "tata";
+
+ void foo() {
+ String str1 = "toto", str2 = "titi", str3 = "tata";
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test183/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test183/A_in.js
new file mode 100644
index 0000000..580c51c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test183/A_in.js
@@ -0,0 +1,17 @@
+public class X {
+ void foo() {
+ if (JavaModelManager.CP_RESOLVE_VERBOSE){
+ System.out.println("CPContainer SET - setting container: ["+containerPath+"] for projects: {" //$NON-NLS-1$ //$NON-NLS-2$
+ + (org.eclipse.wst.jsdt.internal.compiler.util.Util.toString(affectedProjects,
+ new org.eclipse.wst.jsdt.internal.compiler.util.Util.Displayable(){
+ public String displayString(Object o) { return ((IJavaProject) o).getElementName(); }
+ }))
+ + "} with values: " //$NON-NLS-1$
+ + (org.eclipse.wst.jsdt.internal.compiler.util.Util.toString(respectiveContainers,
+ new org.eclipse.wst.jsdt.internal.compiler.util.Util.Displayable(){
+ public String displayString(Object o) { return ((IClasspathContainer) o).getDescription(); }
+ }))
+ );
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test183/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test183/A_out.js
new file mode 100644
index 0000000..e43707e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test183/A_out.js
@@ -0,0 +1,29 @@
+public class X {
+ void foo() {
+ if (JavaModelManager.CP_RESOLVE_VERBOSE) {
+ System.out
+ .println("CPContainer SET - setting container: [" + containerPath + "] for projects: {" //$NON-NLS-1$ //$NON-NLS-2$
+ + (org.eclipse.wst.jsdt.internal.compiler.util.Util
+ .toString(
+ affectedProjects,
+ new org.eclipse.wst.jsdt.internal.compiler.util.Util.Displayable() {
+ public String displayString(
+ Object o) {
+ return ((IJavaProject) o)
+ .getElementName();
+ }
+ }))
+ + "} with values: " //$NON-NLS-1$
+ + (org.eclipse.wst.jsdt.internal.compiler.util.Util
+ .toString(
+ respectiveContainers,
+ new org.eclipse.wst.jsdt.internal.compiler.util.Util.Displayable() {
+ public String displayString(
+ Object o) {
+ return ((IClasspathContainer) o)
+ .getDescription();
+ }
+ })));
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test184/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test184/A_in.js
new file mode 100644
index 0000000..fcfa73b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test184/A_in.js
@@ -0,0 +1,9 @@
+public class X {
+ X(String s) {
+ }
+ protected void foo() {
+ Main
+ .bind("compile.instantTime", //$NON-NLS-1$
+ new String[]{String.valueOf(this.lineCount), String.valueOf(this.time), String.valueOf(((int) (this.lineCount * 10000.0 / this.time)) / 10.0)});
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test184/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test184/A_out.js
new file mode 100644
index 0000000..8e582e8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test184/A_out.js
@@ -0,0 +1,14 @@
+public class X {
+ X(String s) {
+ }
+ protected void foo() {
+ Main
+ .bind(
+ "compile.instantTime", //$NON-NLS-1$
+ new String[]{
+ String.valueOf(this.lineCount),
+ String.valueOf(this.time),
+ String
+ .valueOf(((int) (this.lineCount * 10000.0 / this.time)) / 10.0)});
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test185/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test185/A_in.js
new file mode 100644
index 0000000..f257156
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test185/A_in.js
@@ -0,0 +1,31 @@
+public class X {
+ void foo() {
+ if (JavaModelManager.CP_RESOLVE_VERBOSE) {
+ System.out
+ .println(
+ "CPContainer SET - setting container: ["//$NON-NLS-1$
+ + containerPath
+ + "] for projects: {" //$NON-NLS-1$
+ + (org.eclipse.wst.jsdt.internal.compiler.util.Util
+ .toString(affectedProjects,
+ new org.eclipse.wst.jsdt.internal.compiler.util.Util.Displayable() {
+ public String displayString(
+ Object o) {
+ return ((IJavaProject) o)
+ .getElementName();
+ }
+ }))
+ + "} with values: " //$NON-NLS-1$
+ + (org.eclipse.wst.jsdt.internal.compiler.util.Util
+ .toString(
+ respectiveContainers,
+ new org.eclipse.wst.jsdt.internal.compiler.util.Util.Displayable() {
+ public String displayString(
+ Object o) {
+ return ((IClasspathContainer) o)
+ .getDescription();
+ }
+ })));
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test185/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test185/A_out.js
new file mode 100644
index 0000000..5766d56
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test185/A_out.js
@@ -0,0 +1,31 @@
+public class X {
+ void foo() {
+ if (JavaModelManager.CP_RESOLVE_VERBOSE) {
+ System.out
+ .println("CPContainer SET - setting container: ["//$NON-NLS-1$
+ + containerPath
+ + "] for projects: {" //$NON-NLS-1$
+ + (org.eclipse.wst.jsdt.internal.compiler.util.Util
+ .toString(
+ affectedProjects,
+ new org.eclipse.wst.jsdt.internal.compiler.util.Util.Displayable() {
+ public String displayString(
+ Object o) {
+ return ((IJavaProject) o)
+ .getElementName();
+ }
+ }))
+ + "} with values: " //$NON-NLS-1$
+ + (org.eclipse.wst.jsdt.internal.compiler.util.Util
+ .toString(
+ respectiveContainers,
+ new org.eclipse.wst.jsdt.internal.compiler.util.Util.Displayable() {
+ public String displayString(
+ Object o) {
+ return ((IClasspathContainer) o)
+ .getDescription();
+ }
+ })));
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test186/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test186/A_in.js
new file mode 100644
index 0000000..d7dfc81
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test186/A_in.js
@@ -0,0 +1,14 @@
+public class X {
+ void foo() {
+ FlowInfo mergedInfo = FlowInfo.conditional(// merging two true initInfos for such a negative case: if ((t && (b = t)) || f) r = b; // b may not have been initialized
+ leftInfo
+ .initsWhenTrue()
+ .copy()
+ .unconditionalInits()
+ .mergedWith(rightInfo.initsWhenTrue().copy()
+ .unconditionalInits()), falseMergedInfo);
+ mergedInitStateIndex = currentScope.methodScope()
+ .recordInitializationStates(mergedInfo);
+ return mergedInfo;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test186/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test186/A_out.js
new file mode 100644
index 0000000..f7cd7d4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test186/A_out.js
@@ -0,0 +1,11 @@
+public class X {
+ void foo() {
+ FlowInfo mergedInfo = FlowInfo.conditional( // merging two true initInfos for such a negative case: if ((t && (b = t)) || f) r = b; // b may not have been initialized
+ leftInfo.initsWhenTrue().copy().unconditionalInits()
+ .mergedWith(rightInfo.initsWhenTrue().copy()
+ .unconditionalInits()), falseMergedInfo);
+ mergedInitStateIndex = currentScope.methodScope()
+ .recordInitializationStates(mergedInfo);
+ return mergedInfo;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test187/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test187/A_in.js
new file mode 100644
index 0000000..485082f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test187/A_in.js
@@ -0,0 +1,380 @@
+import gov.noaa.ncdc.publications.exception.ConvertException;
+import gov.noaa.ncdc.publications.exception.CreatePDFFileException;
+import gov.noaa.ncdc.publications.exception.CreateTempWorkingDirException;
+import gov.noaa.ncdc.publications.exception.FTPServerException;
+import gov.noaa.ncdc.publications.exception.FTPServerTimeoutException;
+import gov.noaa.ncdc.publications.exception.createListFileException;
+import gov.noaa.ncdc.util.FileUtils;
+import gov.noaa.ncdc.util.Registry;
+import gov.noaa.ncdc.util.WssrdFileComparator;
+import gov.noaa.ncdc.util.ftpServer.FtpServer;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import java.util.Arrays;
+
+
+/**
+ * <p>
+ * <CODE>RemotePublication</CODE> RemotePublication is a publication
+ * stored as TIF files in the WSSRD database.
+ * </p>
+ * <pre>
+ * Revision 1.1 2003/10/15 13:11:18 othomann
+ * Fix for 44839
+ *
+ * Revision 1.6 2003/10/09 22:07:28 jduska
+ * Merged Chaged from 1.3 Branch into Head
+ *
+ * Revision 1.5.2.2 2003/10/01 22:48:03 jduska
+ * Added support, so that the publication can be retrieved by WSSRD cabinet
+ * and WSSRD docID
+ *
+ * Revision 1.5.2.1 2003/09/17 18:20:48 jduska
+ * Change FTP Errors to Warnings
+ *
+ * Revision 1.5 2003/07/25 20:49:52 jduska
+ * - Updated the Publication Library to use a new renameFile method
+ * - Created the new FileUtils class by moving the copyFile and adding the renameFile
+ * methods
+ *
+ * Revision 1.4 2003/07/17 23:56:58 jduska
+ * - Updated to support new support files in the command line tool
+ * - Update the properties to support the dynamic changing the FTP library
+ * - Cleaned up the exceptions and few other files with outdate or unneed imports and etc
+ *
+ * Revision 1.3 2003/07/07 15:42:48 jduska
+ * - Corrected bugs in new changes to support the Publication Library
+ *
+ * Revision 1.2 2003/07/02 17:33:14 jduska
+ * - bug fix to correct the Temporary Directory
+ * issue when using the library within a web application
+ *
+ * Revision 1.1 2003/06/26 23:54:10 jduska
+ * - Command Line version of the Publication Library
+ *
+ * Revision 1.3 2003/06/26 23:43:21 jduska
+ * - Changes to support using the PDF Library on the command line
+ *
+ * Revision 1.1 2003/06/09 21:27:29 jduska
+ * - Updated the library, so works on Windows
+ *
+ * Revision 1.1 2003/01/24 18:43:58 jduska
+ * More refactoring of the SerialPublications to
+ * support the local documents
+ *
+ * Revision 1.3 2002/10/11 21:03:50 jduska
+ * keyword substitution change ***
+ *
+ * </pre>
+ */
+public class RemotePublication extends Publication {
+ private static final String PDF_FILETYPE = "PDF";
+ private static Log log =
+ LogFactory.getLog(RemotePublication.class.getName());
+ private String _fileList;
+ private String _fileType;
+ protected String _pages[];
+
+ protected RemotePublication(String id, String year, String month,
+ String stateCode,
+ String serverDirectory, String cabinet) {
+ super(id, year, month, stateCode, serverDirectory, cabinet);
+ _fileList = _cabinet + '~' + id + ".txt";
+ }
+
+ public boolean getDocument() {
+ int attempt = 0;
+
+ while (attempt < _maxAttempts) {
+ try {
+ attempt++;
+ log.info("*** Downloading " + _localFilename +
+ EXTENTION + " attempt " + attempt +
+ " out of " + _maxAttempts);
+
+ if (getRemoteDocument()) {
+ log.info("Success document published " +
+ _localFilename + EXTENTION);
+
+ return true;
+ }
+ } catch (ConvertException e) {
+
+ log.warn(e);
+ }
+ }
+
+ return false;
+ }
+
+ protected boolean getRemoteDocument() throws ConvertException {
+ boolean successful = false;
+
+ try {
+ createTempWorkingDir();
+ getPages();
+
+ if (_fileType != PDF_FILETYPE) {
+ createListFile();
+ createPDFFile();
+ } else {
+ renamePDFFile();
+ }
+
+ successful = true;
+ } catch (FTPServerTimeoutException e) {
+ String msg =
+ "Convert process timed out retriving TIFF page" +
+ e.getFileName();
+ log.warn(msg);
+ throw new ConvertException(msg);
+ } catch (FTPServerException e) {
+ String msg =
+ "Convert process encounter an " + e.getMessage();
+ log.warn(msg);
+ throw new ConvertException(msg);
+ } catch (CreateTempWorkingDirException e) {
+ String msg =
+ "Error: Covert could not create a Working Directory!";
+ log.warn(msg);
+ throw new ConvertException(msg);
+ } catch (CreatePDFFileException e) {
+ String msg =
+ "Could not create the PDF file " + e.getMessage();
+ log.warn(msg);
+ throw new ConvertException(msg);
+ } catch (createListFileException e) {
+ String msg =
+ "Could not create the c42pdf List File" +
+ e.getMessage();
+ throw new ConvertException(msg);
+ } catch (NoFTPServiceException e) {
+ String msg =
+ "Could not create the FTP Service " + e.getMessage();
+ log.warn(msg);
+ throw new ConvertException(msg);
+ }
+
+ return successful;
+ }
+
+ protected void getPages()
+ throws FTPServerTimeoutException,
+ FTPServerException, NoFTPServiceException {
+ // Setup the ftp server
+ FtpServer ftp;
+
+ try {
+ ftp = (FtpServer) Class.forName(Registry.getFTPService())
+ .newInstance();
+ ftp.setServer(Registry.getUrl());
+ ftp.setPassword(Registry.getFtpPassword());
+ ftp.setUserName(Registry.getFtpUserName());
+ ftp.setPassive(Registry.usePassive());
+ ftp.setTimeout(Registry.getFtpTimeout());
+
+ // get the pages and store them in the _workingDir
+ _pages =
+ ftp.getFiles(getWssrdDocumentName(), _workingDir);
+
+ if ((_pages.length == 1) && _pages[0].endsWith(".PDF")) {
+ _fileType = PDF_FILETYPE;
+ }
+ } catch (InstantiationException e) {
+ log.warn(e.getMessage());
+ throw new NoFTPServiceException();
+ } catch (IllegalAccessException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (ClassNotFoundException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+ protected void createPDFFile() throws CreatePDFFileException {
+ String cmdLine = null;
+
+ try {
+ File newPdfFile =
+ new File(_workingDir + File.separator +
+ _localFilename + EXTENTION);
+
+ if (Registry.isCommandLineMode()) {
+ handleMultipleDocuments(newPdfFile);
+ }
+
+ cmdLine = createC42PDFCommandLine(newPdfFile.getName());
+
+ if (log.isDebugEnabled()) {
+ log.debug("Running " + cmdLine);
+ }
+
+ // run C42PDF to create the file & wait till it finishes.
+ Process p = Runtime.getRuntime().exec(cmdLine);
+ p.waitFor();
+
+ // check to see if it worked
+ if (!newPdfFile.exists()) {
+ log.warn("PDF File was not created!");
+ throw new CreatePDFFileException("PDF File was not created!");
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ throw new CreatePDFFileException(e.toString());
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ throw new CreatePDFFileException(e.toString());
+ }
+
+ return;
+ }
+
+ /**
+ * generates the command line need to execute the C42PDF tool in
+ * a shell. This requires that the
+ * <code>Registry.getConvertToolPath()</code> and
+ * <code>Registry.getConvertToolName()</code> are valid.
+ *
+ * @param documentName the name of the document you wish to
+ * create
+ *
+ * @return
+ */
+ private String createC42PDFCommandLine(String documentName) {
+ return (Registry.getConvertToolPath() + File.separator +
+ Registry.getConvertToolName() +
+ (" -o " + _workingDir + File.separator + documentName +
+ " -l " + _workingDir + File.separator + _fileList));
+ }
+
+ /**
+ * there a special cases within WSSRD where there may be more
+ * than one PDF that makes up the document. For example River
+ * Basin documents. Thus, it is possible for the same document
+ * already exist when using this libarary via a command line
+ * mode. <code>handleMultipleDocuments</code> will add a index
+ * counter to end of each duplicate filename. Thus, if there are
+ * three files for this document the files would be name
+ * filename1, filename2 and filename3
+ *
+ * @param newPdfFile name of the document we are making sure does
+ * already exist
+ */
+ private void handleMultipleDocuments(File newPdfFile) {
+ int documentCount = 0;
+ String newFilename;
+
+ if (log.isDebugEnabled()) {
+ log.debug("Checking to see if " + newPdfFile.getName() +
+ "already exists");
+ }
+
+ while (newPdfFile.exists()) {
+ documentCount++;
+ newFilename =
+ (new StringBuffer(_workingDir).append(File.separator)
+ .append(_localFilename)
+ .append(documentCount)
+ .append(EXTENTION)).toString();
+
+ if (log.isDebugEnabled()) {
+ log.debug("File already exists. Check to see if we need rename existing file");
+ }
+
+ if (documentCount == 1) {
+ File backupPdfFile = new File(newFilename);
+ newPdfFile.renameTo(backupPdfFile);
+ }
+
+ newPdfFile = new File(newFilename);
+ }
+
+ return;
+ }
+
+ protected void createListFile() throws createListFileException {
+ PrintWriter tiffFileListFile = null;
+
+ String s;
+
+ // Must have pages to sort!
+ if (_pages.length == 0) {
+ log.error("Internal Error: _tiffPage == null!");
+ throw new createListFileException("No pages found in the document!");
+ }
+
+ // Sort TIFF files into the correct page order
+ WssrdFileComparator fileComparator =
+ new WssrdFileComparator();
+ Arrays.sort(_pages, fileComparator);
+
+ if (log.isDebugEnabled()) {
+ log.debug("Creating list file for C42PDF");
+ }
+
+ try {
+ File tiffFileList =
+ new File(_workingDir + File.separator + _fileList);
+
+ if (tiffFileList.exists()) {
+ tiffFileList.delete();
+ }
+
+ tiffFileListFile =
+ new PrintWriter(new BufferedWriter(new FileWriter(_workingDir +
+ File.separator +
+ _fileList)));
+
+ for (int i = 0; i < _pages.length; i++) {
+ s = _workingDir + File.separator + _pages[i];
+
+ if (log.isDebugEnabled()) {
+ log.debug(s);
+ }
+
+ tiffFileListFile.println(s);
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ throw new createListFileException(e.toString());
+ } finally {
+ if (tiffFileListFile != null) {
+ tiffFileListFile.close();
+ }
+
+ if (log.isDebugEnabled()) {
+ log.debug("Finished Creating list file for C42PDF");
+ }
+
+ return;
+ }
+ }
+
+ protected void renamePDFFile() throws CreatePDFFileException {
+ String newFileName =
+ _workingDir + File.separator + _localFilename +
+ EXTENTION;
+ String oldWssrdFile =
+ _workingDir + File.separator + _pages[0];
+
+ try {
+ FileUtils.renameFile(oldWssrdFile, newFileName);
+ } catch (IOException e) {
+
+ String msg = "The following error occurred " + e.getMessage();
+ log.warn(msg);
+ throw new CreatePDFFileException("Could not rename PDF File");
+ }
+
+
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test187/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test187/A_out.js
new file mode 100644
index 0000000..4c6aa00
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test187/A_out.js
@@ -0,0 +1,308 @@
+import gov.noaa.ncdc.publications.exception.ConvertException;
+import gov.noaa.ncdc.publications.exception.CreatePDFFileException;
+import gov.noaa.ncdc.publications.exception.CreateTempWorkingDirException;
+import gov.noaa.ncdc.publications.exception.FTPServerException;
+import gov.noaa.ncdc.publications.exception.FTPServerTimeoutException;
+import gov.noaa.ncdc.publications.exception.createListFileException;
+import gov.noaa.ncdc.util.FileUtils;
+import gov.noaa.ncdc.util.Registry;
+import gov.noaa.ncdc.util.WssrdFileComparator;
+import gov.noaa.ncdc.util.ftpServer.FtpServer;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Arrays;
+/**
+ * <p>
+ * <CODE>RemotePublication</CODE> RemotePublication is a publication
+ * stored as TIF files in the WSSRD database.
+ * </p>
+ * <pre>
+ * Revision 1.1 2003/10/15 13:11:18 othomann
+ * Fix for 44839
+ *
+ * Revision 1.6 2003/10/09 22:07:28 jduska
+ * Merged Chaged from 1.3 Branch into Head
+ *
+ * Revision 1.5.2.2 2003/10/01 22:48:03 jduska
+ * Added support, so that the publication can be retrieved by WSSRD cabinet
+ * and WSSRD docID
+ *
+ * Revision 1.5.2.1 2003/09/17 18:20:48 jduska
+ * Change FTP Errors to Warnings
+ *
+ * Revision 1.5 2003/07/25 20:49:52 jduska
+ * - Updated the Publication Library to use a new renameFile method
+ * - Created the new FileUtils class by moving the copyFile and adding the renameFile
+ * methods
+ *
+ * Revision 1.4 2003/07/17 23:56:58 jduska
+ * - Updated to support new support files in the command line tool
+ * - Update the properties to support the dynamic changing the FTP library
+ * - Cleaned up the exceptions and few other files with outdate or unneed imports and etc
+ *
+ * Revision 1.3 2003/07/07 15:42:48 jduska
+ * - Corrected bugs in new changes to support the Publication Library
+ *
+ * Revision 1.2 2003/07/02 17:33:14 jduska
+ * - bug fix to correct the Temporary Directory
+ * issue when using the library within a web application
+ *
+ * Revision 1.1 2003/06/26 23:54:10 jduska
+ * - Command Line version of the Publication Library
+ *
+ * Revision 1.3 2003/06/26 23:43:21 jduska
+ * - Changes to support using the PDF Library on the command line
+ *
+ * Revision 1.1 2003/06/09 21:27:29 jduska
+ * - Updated the library, so works on Windows
+ *
+ * Revision 1.1 2003/01/24 18:43:58 jduska
+ * More refactoring of the SerialPublications to
+ * support the local documents
+ *
+ * Revision 1.3 2002/10/11 21:03:50 jduska
+ * keyword substitution change ***
+ *
+ * </pre>
+ */
+public class RemotePublication extends Publication {
+ private static final String PDF_FILETYPE = "PDF";
+ private static Log log = LogFactory.getLog(RemotePublication.class
+ .getName());
+ private String _fileList;
+ private String _fileType;
+ protected String _pages[];
+ protected RemotePublication(String id, String year, String month,
+ String stateCode, String serverDirectory, String cabinet) {
+ super(id, year, month, stateCode, serverDirectory, cabinet);
+ _fileList = _cabinet + '~' + id + ".txt";
+ }
+ public boolean getDocument() {
+ int attempt = 0;
+ while (attempt < _maxAttempts) {
+ try {
+ attempt++;
+ log.info("*** Downloading " + _localFilename + EXTENTION
+ + " attempt " + attempt + " out of " + _maxAttempts);
+ if (getRemoteDocument()) {
+ log.info("Success document published " + _localFilename
+ + EXTENTION);
+ return true;
+ }
+ } catch (ConvertException e) {
+ log.warn(e);
+ }
+ }
+ return false;
+ }
+ protected boolean getRemoteDocument() throws ConvertException {
+ boolean successful = false;
+ try {
+ createTempWorkingDir();
+ getPages();
+ if (_fileType != PDF_FILETYPE) {
+ createListFile();
+ createPDFFile();
+ } else {
+ renamePDFFile();
+ }
+ successful = true;
+ } catch (FTPServerTimeoutException e) {
+ String msg = "Convert process timed out retriving TIFF page"
+ + e.getFileName();
+ log.warn(msg);
+ throw new ConvertException(msg);
+ } catch (FTPServerException e) {
+ String msg = "Convert process encounter an " + e.getMessage();
+ log.warn(msg);
+ throw new ConvertException(msg);
+ } catch (CreateTempWorkingDirException e) {
+ String msg = "Error: Covert could not create a Working Directory!";
+ log.warn(msg);
+ throw new ConvertException(msg);
+ } catch (CreatePDFFileException e) {
+ String msg = "Could not create the PDF file " + e.getMessage();
+ log.warn(msg);
+ throw new ConvertException(msg);
+ } catch (createListFileException e) {
+ String msg = "Could not create the c42pdf List File"
+ + e.getMessage();
+ throw new ConvertException(msg);
+ } catch (NoFTPServiceException e) {
+ String msg = "Could not create the FTP Service " + e.getMessage();
+ log.warn(msg);
+ throw new ConvertException(msg);
+ }
+ return successful;
+ }
+ protected void getPages() throws FTPServerTimeoutException,
+ FTPServerException, NoFTPServiceException {
+ // Setup the ftp server
+ FtpServer ftp;
+ try {
+ ftp = (FtpServer) Class.forName(Registry.getFTPService())
+ .newInstance();
+ ftp.setServer(Registry.getUrl());
+ ftp.setPassword(Registry.getFtpPassword());
+ ftp.setUserName(Registry.getFtpUserName());
+ ftp.setPassive(Registry.usePassive());
+ ftp.setTimeout(Registry.getFtpTimeout());
+ // get the pages and store them in the _workingDir
+ _pages = ftp.getFiles(getWssrdDocumentName(), _workingDir);
+ if ((_pages.length == 1) && _pages[0].endsWith(".PDF")) {
+ _fileType = PDF_FILETYPE;
+ }
+ } catch (InstantiationException e) {
+ log.warn(e.getMessage());
+ throw new NoFTPServiceException();
+ } catch (IllegalAccessException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (ClassNotFoundException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+ protected void createPDFFile() throws CreatePDFFileException {
+ String cmdLine = null;
+ try {
+ File newPdfFile = new File(_workingDir + File.separator
+ + _localFilename + EXTENTION);
+ if (Registry.isCommandLineMode()) {
+ handleMultipleDocuments(newPdfFile);
+ }
+ cmdLine = createC42PDFCommandLine(newPdfFile.getName());
+ if (log.isDebugEnabled()) {
+ log.debug("Running " + cmdLine);
+ }
+ // run C42PDF to create the file & wait till it finishes.
+ Process p = Runtime.getRuntime().exec(cmdLine);
+ p.waitFor();
+ // check to see if it worked
+ if (!newPdfFile.exists()) {
+ log.warn("PDF File was not created!");
+ throw new CreatePDFFileException("PDF File was not created!");
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ throw new CreatePDFFileException(e.toString());
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ throw new CreatePDFFileException(e.toString());
+ }
+ return;
+ }
+ /**
+ * generates the command line need to execute the C42PDF tool in
+ * a shell. This requires that the
+ * <code>Registry.getConvertToolPath()</code> and
+ * <code>Registry.getConvertToolName()</code> are valid.
+ *
+ * @param documentName the name of the document you wish to
+ * create
+ *
+ * @return
+ */
+ private String createC42PDFCommandLine(String documentName) {
+ return (Registry.getConvertToolPath() + File.separator
+ + Registry.getConvertToolName() + (" -o " + _workingDir
+ + File.separator + documentName + " -l " + _workingDir
+ + File.separator + _fileList));
+ }
+ /**
+ * there a special cases within WSSRD where there may be more
+ * than one PDF that makes up the document. For example River
+ * Basin documents. Thus, it is possible for the same document
+ * already exist when using this libarary via a command line
+ * mode. <code>handleMultipleDocuments</code> will add a index
+ * counter to end of each duplicate filename. Thus, if there are
+ * three files for this document the files would be name
+ * filename1, filename2 and filename3
+ *
+ * @param newPdfFile name of the document we are making sure does
+ * already exist
+ */
+ private void handleMultipleDocuments(File newPdfFile) {
+ int documentCount = 0;
+ String newFilename;
+ if (log.isDebugEnabled()) {
+ log.debug("Checking to see if " + newPdfFile.getName()
+ + "already exists");
+ }
+ while (newPdfFile.exists()) {
+ documentCount++;
+ newFilename = (new StringBuffer(_workingDir).append(File.separator)
+ .append(_localFilename).append(documentCount)
+ .append(EXTENTION)).toString();
+ if (log.isDebugEnabled()) {
+ log
+ .debug("File already exists. Check to see if we need rename existing file");
+ }
+ if (documentCount == 1) {
+ File backupPdfFile = new File(newFilename);
+ newPdfFile.renameTo(backupPdfFile);
+ }
+ newPdfFile = new File(newFilename);
+ }
+ return;
+ }
+ protected void createListFile() throws createListFileException {
+ PrintWriter tiffFileListFile = null;
+ String s;
+ // Must have pages to sort!
+ if (_pages.length == 0) {
+ log.error("Internal Error: _tiffPage == null!");
+ throw new createListFileException("No pages found in the document!");
+ }
+ // Sort TIFF files into the correct page order
+ WssrdFileComparator fileComparator = new WssrdFileComparator();
+ Arrays.sort(_pages, fileComparator);
+ if (log.isDebugEnabled()) {
+ log.debug("Creating list file for C42PDF");
+ }
+ try {
+ File tiffFileList = new File(_workingDir + File.separator
+ + _fileList);
+ if (tiffFileList.exists()) {
+ tiffFileList.delete();
+ }
+ tiffFileListFile = new PrintWriter(new BufferedWriter(
+ new FileWriter(_workingDir + File.separator + _fileList)));
+ for (int i = 0; i < _pages.length; i++) {
+ s = _workingDir + File.separator + _pages[i];
+ if (log.isDebugEnabled()) {
+ log.debug(s);
+ }
+ tiffFileListFile.println(s);
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ throw new createListFileException(e.toString());
+ } finally {
+ if (tiffFileListFile != null) {
+ tiffFileListFile.close();
+ }
+ if (log.isDebugEnabled()) {
+ log.debug("Finished Creating list file for C42PDF");
+ }
+ return;
+ }
+ }
+ protected void renamePDFFile() throws CreatePDFFileException {
+ String newFileName = _workingDir + File.separator + _localFilename
+ + EXTENTION;
+ String oldWssrdFile = _workingDir + File.separator + _pages[0];
+ try {
+ FileUtils.renameFile(oldWssrdFile, newFileName);
+ } catch (IOException e) {
+ String msg = "The following error occurred " + e.getMessage();
+ log.warn(msg);
+ throw new CreatePDFFileException("Could not rename PDF File");
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test188/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test188/A_in.js
new file mode 100644
index 0000000..ed990e6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test188/A_in.js
@@ -0,0 +1,11 @@
+public class A {
+ public void getDocument() {
+ while (true) {
+ newFilename =
+ (new StringBuffer(_workingDir).append(File.separator)
+ .append(_localFilename)
+ .append(documentCount)
+ .append(EXTENTION)).toString();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test188/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test188/A_out.js
new file mode 100644
index 0000000..668aa68
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test188/A_out.js
@@ -0,0 +1,9 @@
+public class A {
+ public void getDocument() {
+ while (true) {
+ newFilename = (new StringBuffer(_workingDir).append(File.separator)
+ .append(_localFilename).append(documentCount)
+ .append(EXTENTION)).toString();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test189/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test189/A_in.js
new file mode 100644
index 0000000..93da9d4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test189/A_in.js
@@ -0,0 +1,11 @@
+public class A {
+ public void getDocument() {
+ while (true) {
+ newFilename =
+ (((new StringBuffer(_workingDir)).append(File.separator))
+ .append(_localFilename)
+ .append(documentCount)
+ .append(EXTENTION)).toString();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test189/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test189/A_out.js
new file mode 100644
index 0000000..8a78a10
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test189/A_out.js
@@ -0,0 +1,9 @@
+public class A {
+ public void getDocument() {
+ while (true) {
+ newFilename = (((new StringBuffer(_workingDir))
+ .append(File.separator)).append(_localFilename).append(
+ documentCount).append(EXTENTION)).toString();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test190/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test190/A_in.js
new file mode 100644
index 0000000..2a9db5e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test190/A_in.js
@@ -0,0 +1,50 @@
+public class A {
+ private void updateAnnotation() {
+ while (this.astLengthPtr >= 0) {
+ // Starting with the stack top, so get references (eg. Expression) coming from @see declarations
+ if (this.astLengthPtr == 2) {
+ int size = this.astLengthStack[this.astLengthPtr--];
+ if (size > 0) {
+ this.annotation.references = new Expression[size];
+ for (int i=(size-1); i>=0; i--) {
+ this.annotation.references[i] = (Expression) this.astStack[astPtr--];
+ }
+ }
+ }
+
+ // Then continuing with class names (eg. TypeReference) coming from @throw/@exception declarations
+ else if (this.astLengthPtr == 1) {
+ int size = this.astLengthStack[this.astLengthPtr--];
+ if (size > 0) {
+ this.annotation.thrownExceptions = new TypeReference[size];
+ for (int i=(size-1); i>=0; i--) {
+ this.annotation.thrownExceptions[i] = (TypeReference) this.astStack[astPtr--];
+ }
+ }
+ }
+
+ // Finally, finishing with parameters nales (ie. Argument) coming from @param declaration
+ else if (this.astLengthPtr == 0) {
+ int size = this.astLengthStack[this.astLengthPtr--];
+ if (size > 0) {
+ this.annotation.parameters = new AnnotationArgument[size];
+ for (int i=(size-1); i>=0; i--) {
+ this.annotation.parameters[i] = (AnnotationArgument) this.astStack[astPtr--];
+ }
+ }
+ }
+
+ // Flag all nodes got from other ast length stack pointer values as invalid....
+ // TODO: (frederic) To be changed when mixed tags declaration will be accepted
+ else {
+ int size = this.astLengthStack[this.astLengthPtr--];
+ if (size > 0) {
+ for (int i=0; i<size; i++) {
+ AstNode node = this.astStack[astPtr--];
+ this.sourceParser.problemReporter().annotationUnexpectedTag(node.sourceStart, node.sourceEnd);
+ }
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test190/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test190/A_out.js
new file mode 100644
index 0000000..d7e92b2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test190/A_out.js
@@ -0,0 +1,52 @@
+public class A {
+ private void updateAnnotation() {
+ while (this.astLengthPtr >= 0) {
+ // Starting with the stack top, so get references (eg. Expression) coming from @see declarations
+ if (this.astLengthPtr == 2) {
+ int size = this.astLengthStack[this.astLengthPtr--];
+ if (size > 0) {
+ this.annotation.references = new Expression[size];
+ for (int i = (size - 1); i >= 0; i--) {
+ this.annotation.references[i] = (Expression) this.astStack[astPtr--];
+ }
+ }
+ }
+
+ // Then continuing with class names (eg. TypeReference) coming from @throw/@exception declarations
+ else if (this.astLengthPtr == 1) {
+ int size = this.astLengthStack[this.astLengthPtr--];
+ if (size > 0) {
+ this.annotation.thrownExceptions = new TypeReference[size];
+ for (int i = (size - 1); i >= 0; i--) {
+ this.annotation.thrownExceptions[i] = (TypeReference) this.astStack[astPtr--];
+ }
+ }
+ }
+
+ // Finally, finishing with parameters nales (ie. Argument) coming from @param declaration
+ else if (this.astLengthPtr == 0) {
+ int size = this.astLengthStack[this.astLengthPtr--];
+ if (size > 0) {
+ this.annotation.parameters = new AnnotationArgument[size];
+ for (int i = (size - 1); i >= 0; i--) {
+ this.annotation.parameters[i] = (AnnotationArgument) this.astStack[astPtr--];
+ }
+ }
+ }
+
+ // Flag all nodes got from other ast length stack pointer values as invalid....
+ // TODO: (frederic) To be changed when mixed tags declaration will be accepted
+ else {
+ int size = this.astLengthStack[this.astLengthPtr--];
+ if (size > 0) {
+ for (int i = 0; i < size; i++) {
+ AstNode node = this.astStack[astPtr--];
+ this.sourceParser.problemReporter()
+ .annotationUnexpectedTag(node.sourceStart,
+ node.sourceEnd);
+ }
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test191/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test191/A_in.js
new file mode 100644
index 0000000..e336a3a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test191/A_in.js
@@ -0,0 +1,44 @@
+public class A {
+ private void updateAnnotation() {
+ while (this.astLengthPtr >= 0) {
+ // Starting with the stack top, so get references (eg. Expression) coming from @see declarations
+ if (this.astLengthPtr == 2) {
+ int size = this.astLengthStack[this.astLengthPtr--];
+ }
+
+ // Then continuing with class names (eg. TypeReference) coming from @throw/@exception declarations
+ else if (this.astLengthPtr == 1) {
+ int size = this.astLengthStack[this.astLengthPtr--];
+ if (size > 0) {
+ this.annotation.thrownExceptions = new TypeReference[size];
+ for (int i=(size-1); i>=0; i--) {
+ this.annotation.thrownExceptions[i] = (TypeReference) this.astStack[astPtr--];
+ }
+ }
+ }
+
+ // Finally, finishing with parameters nales (ie. Argument) coming from @param declaration
+ else if (this.astLengthPtr == 0) {
+ int size = this.astLengthStack[this.astLengthPtr--];
+ if (size > 0) {
+ this.annotation.parameters = new AnnotationArgument[size];
+ for (int i=(size-1); i>=0; i--) {
+ this.annotation.parameters[i] = (AnnotationArgument) this.astStack[astPtr--];
+ }
+ }
+ }
+
+ // Flag all nodes got from other ast length stack pointer values as invalid....
+ // TODO: (frederic) To be changed when mixed tags declaration will be accepted
+ else {
+ int size = this.astLengthStack[this.astLengthPtr--];
+ if (size > 0) {
+ for (int i=0; i<size; i++) {
+ AstNode node = this.astStack[astPtr--];
+ this.sourceParser.problemReporter().annotationUnexpectedTag(node.sourceStart, node.sourceEnd);
+ }
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test191/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test191/A_out.js
new file mode 100644
index 0000000..34ca495
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test191/A_out.js
@@ -0,0 +1,43 @@
+public class A {
+ private void updateAnnotation() {
+ while (this.astLengthPtr >= 0) {
+ // Starting with the stack top, so get references (eg. Expression) coming from @see declarations
+ if (this.astLengthPtr == 2) {
+ int size = this.astLengthStack[this.astLengthPtr--];
+ }
+ // Then continuing with class names (eg. TypeReference) coming from @throw/@exception declarations
+ else if (this.astLengthPtr == 1) {
+ int size = this.astLengthStack[this.astLengthPtr--];
+ if (size > 0) {
+ this.annotation.thrownExceptions = new TypeReference[size];
+ for (int i = (size - 1); i >= 0; i--) {
+ this.annotation.thrownExceptions[i] = (TypeReference) this.astStack[astPtr--];
+ }
+ }
+ }
+ // Finally, finishing with parameters nales (ie. Argument) coming from @param declaration
+ else if (this.astLengthPtr == 0) {
+ int size = this.astLengthStack[this.astLengthPtr--];
+ if (size > 0) {
+ this.annotation.parameters = new AnnotationArgument[size];
+ for (int i = (size - 1); i >= 0; i--) {
+ this.annotation.parameters[i] = (AnnotationArgument) this.astStack[astPtr--];
+ }
+ }
+ }
+ // Flag all nodes got from other ast length stack pointer values as invalid....
+ // TODO: (frederic) To be changed when mixed tags declaration will be accepted
+ else {
+ int size = this.astLengthStack[this.astLengthPtr--];
+ if (size > 0) {
+ for (int i = 0; i < size; i++) {
+ AstNode node = this.astStack[astPtr--];
+ this.sourceParser.problemReporter()
+ .annotationUnexpectedTag(node.sourceStart,
+ node.sourceEnd);
+ }
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test192/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test192/A_in.js
new file mode 100644
index 0000000..877ee06
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test192/A_in.js
@@ -0,0 +1,6 @@
+public class A {
+ protected int lParenPos, rParenPos; //accurate only when used !
+
+ //modifiers dimensions nestedType etc.......
+ protected int l;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test192/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test192/A_out.js
new file mode 100644
index 0000000..6ae676a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test192/A_out.js
@@ -0,0 +1,5 @@
+public class A {
+ protected int lParenPos, rParenPos; //accurate only when used !
+ //modifiers dimensions nestedType etc.......
+ protected int l;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test193/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test193/A_in.js
new file mode 100644
index 0000000..b7bca36
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test193/A_in.js
@@ -0,0 +1,5 @@
+cancel.addActionListener(new ActionListener() {
+public void actionPerformed(ActionEvent e) {
+CancelPressed(); }
+}
+); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test193/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test193/A_out.js
new file mode 100644
index 0000000..3f73142
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test193/A_out.js
@@ -0,0 +1,5 @@
+cancel.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ CancelPressed();
+ }
+}); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test194/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test194/A_in.js
new file mode 100644
index 0000000..4309ae3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test194/A_in.js
@@ -0,0 +1,6 @@
+public void setFieldObject (Object anObject,PreparedStatement aStatement,int anIndex) throws SQLException{
+if (getSQLType() == Types.BINARY || getSQLType() == Types.VARBINARY)
+aStatement.setBytes(anIndex,(byte[])anObject);
+else
+aStatement.setObject(anIndex, anObject, getSQLType());
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test194/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test194/A_out.js
new file mode 100644
index 0000000..1b543de
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test194/A_out.js
@@ -0,0 +1,8 @@
+public void setFieldObject(Object anObject, PreparedStatement aStatement,
+ int anIndex) throws SQLException
+{
+ if (getSQLType() == Types.BINARY || getSQLType() == Types.VARBINARY)
+ aStatement.setBytes(anIndex, (byte[]) anObject);
+ else
+ aStatement.setObject(anIndex, anObject, getSQLType());
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test195/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test195/A_in.js
new file mode 100644
index 0000000..4309ae3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test195/A_in.js
@@ -0,0 +1,6 @@
+public void setFieldObject (Object anObject,PreparedStatement aStatement,int anIndex) throws SQLException{
+if (getSQLType() == Types.BINARY || getSQLType() == Types.VARBINARY)
+aStatement.setBytes(anIndex,(byte[])anObject);
+else
+aStatement.setObject(anIndex, anObject, getSQLType());
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test195/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test195/A_out.js
new file mode 100644
index 0000000..ad50b0d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test195/A_out.js
@@ -0,0 +1,7 @@
+public void setFieldObject(Object anObject, PreparedStatement aStatement,
+ int anIndex) throws SQLException {
+ if (getSQLType() == Types.BINARY || getSQLType() == Types.VARBINARY)
+ aStatement.setBytes(anIndex, (byte[]) anObject);
+ else
+ aStatement.setObject(anIndex, anObject, getSQLType());
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test196/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test196/A_in.js
new file mode 100644
index 0000000..328555e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test196/A_in.js
@@ -0,0 +1 @@
+public void newMethod() {int a = 1;a += 1;a -= 1;a *= 1;a /= 1;} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test196/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test196/A_out.js
new file mode 100644
index 0000000..02df092
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test196/A_out.js
@@ -0,0 +1,8 @@
+public void newMethod()
+{
+ int a = 1;
+ a += 1;
+ a -= 1;
+ a *= 1;
+ a /= 1;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test197/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test197/A_in.js
new file mode 100644
index 0000000..328555e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test197/A_in.js
@@ -0,0 +1 @@
+public void newMethod() {int a = 1;a += 1;a -= 1;a *= 1;a /= 1;} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test197/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test197/A_out.js
new file mode 100644
index 0000000..f4f9972
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test197/A_out.js
@@ -0,0 +1,7 @@
+public void newMethod() {
+ int a = 1;
+ a += 1;
+ a -= 1;
+ a *= 1;
+ a /= 1;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test198/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test198/A_in.js
new file mode 100644
index 0000000..0a8770b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test198/A_in.js
@@ -0,0 +1,13 @@
+public String individualToString() {
+ StringBuffer buffer = new StringBuffer("Exception flow context");
+ int length = handledExceptions.length;
+ for (int i = 0; i < length; i++) {
+ buffer.append('[').append(handledExceptions[i].readableName());
+ if (isReached[i]) {
+ buffer.append("-reached");
+ } else {if (isMasked[i])
+ buffer.append("-masked");
+ else buffer.append("-not reached");
+ } buffer.append('-').append(initsOnExceptions[i].toString()).append(']');
+} return buffer.toString();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test198/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test198/A_out.js
new file mode 100644
index 0000000..8a10aab
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test198/A_out.js
@@ -0,0 +1,17 @@
+public String individualToString() {
+ StringBuffer buffer = new StringBuffer("Exception flow context");
+ int length = handledExceptions.length;
+ for (int i = 0; i < length; i++) {
+ buffer.append('[').append(handledExceptions[i].readableName());
+ if (isReached[i]) {
+ buffer.append("-reached");
+ } else {
+ if (isMasked[i])
+ buffer.append("-masked");
+ else
+ buffer.append("-not reached");
+ }
+ buffer.append('-').append(initsOnExceptions[i].toString()).append(']');
+ }
+ return buffer.toString();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test199/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test199/A_in.js
new file mode 100644
index 0000000..0a8770b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test199/A_in.js
@@ -0,0 +1,13 @@
+public String individualToString() {
+ StringBuffer buffer = new StringBuffer("Exception flow context");
+ int length = handledExceptions.length;
+ for (int i = 0; i < length; i++) {
+ buffer.append('[').append(handledExceptions[i].readableName());
+ if (isReached[i]) {
+ buffer.append("-reached");
+ } else {if (isMasked[i])
+ buffer.append("-masked");
+ else buffer.append("-not reached");
+ } buffer.append('-').append(initsOnExceptions[i].toString()).append(']');
+} return buffer.toString();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test199/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test199/A_out.js
new file mode 100644
index 0000000..eb5fbd9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test199/A_out.js
@@ -0,0 +1,22 @@
+public String individualToString()
+{
+ StringBuffer buffer = new StringBuffer("Exception flow context");
+ int length = handledExceptions.length;
+ for (int i = 0; i < length; i++)
+ {
+ buffer.append('[').append(handledExceptions[i].readableName());
+ if (isReached[i])
+ {
+ buffer.append("-reached");
+ }
+ else
+ {
+ if (isMasked[i])
+ buffer.append("-masked");
+ else
+ buffer.append("-not reached");
+ }
+ buffer.append('-').append(initsOnExceptions[i].toString()).append(']');
+ }
+ return buffer.toString();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test200/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test200/A_in.js
new file mode 100644
index 0000000..1e47cb0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test200/A_in.js
@@ -0,0 +1,7 @@
+if (((c1 = Character.getNumericValue(source[currentPosition++])) > 15 || c1 < 0)
+|| ((c2 = Character.getNumericValue(source[currentPosition++])) > 15 || c2 < 0)
+|| ((c3 = Character.getNumericValue(source[currentPosition++])) > 15 || c3 < 0)
+|| ((c4 = Character.getNumericValue(source[currentPosition++])) > 15 || c4 < 0)) {
+currentPosition = temp;
+return 2;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test200/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test200/A_out.js
new file mode 100644
index 0000000..f6d8ccf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test200/A_out.js
@@ -0,0 +1,8 @@
+if (((c1 = Character.getNumericValue(source[currentPosition++])) > 15 || c1 < 0)
+ || ((c2 = Character.getNumericValue(source[currentPosition++])) > 15 || c2 < 0)
+ || ((c3 = Character.getNumericValue(source[currentPosition++])) > 15 || c3 < 0)
+ || ((c4 = Character.getNumericValue(source[currentPosition++])) > 15 || c4 < 0))
+{
+ currentPosition = temp;
+ return 2;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test201/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test201/A_in.js
new file mode 100644
index 0000000..1e47cb0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test201/A_in.js
@@ -0,0 +1,7 @@
+if (((c1 = Character.getNumericValue(source[currentPosition++])) > 15 || c1 < 0)
+|| ((c2 = Character.getNumericValue(source[currentPosition++])) > 15 || c2 < 0)
+|| ((c3 = Character.getNumericValue(source[currentPosition++])) > 15 || c3 < 0)
+|| ((c4 = Character.getNumericValue(source[currentPosition++])) > 15 || c4 < 0)) {
+currentPosition = temp;
+return 2;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test201/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test201/A_out.js
new file mode 100644
index 0000000..06bb5d9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test201/A_out.js
@@ -0,0 +1,7 @@
+if (((c1 = Character.getNumericValue(source[currentPosition++])) > 15 || c1 < 0)
+ || ((c2 = Character.getNumericValue(source[currentPosition++])) > 15 || c2 < 0)
+ || ((c3 = Character.getNumericValue(source[currentPosition++])) > 15 || c3 < 0)
+ || ((c4 = Character.getNumericValue(source[currentPosition++])) > 15 || c4 < 0)) {
+ currentPosition = temp;
+ return 2;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test202/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test202/A_in.js
new file mode 100644
index 0000000..99af06a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test202/A_in.js
@@ -0,0 +1,6 @@
+{static final char[]
+charArray_a = new char[]{'a'} ,
+charArray_b = new char[]{'b'} ,
+charArray_c = new char[]{'c'} ,
+charArray_d = new char[]{'d'} ;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test202/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test202/A_out.js
new file mode 100644
index 0000000..c9d3b7d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test202/A_out.js
@@ -0,0 +1,3 @@
+{
+ static final char[] charArray_a = new char[]{'a'}, charArray_b = new char[]{'b'}, charArray_c = new char[]{'c'}, charArray_d = new char[]{'d'};
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test203/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test203/A_in.js
new file mode 100644
index 0000000..99af06a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test203/A_in.js
@@ -0,0 +1,6 @@
+{static final char[]
+charArray_a = new char[]{'a'} ,
+charArray_b = new char[]{'b'} ,
+charArray_c = new char[]{'c'} ,
+charArray_d = new char[]{'d'} ;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test203/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test203/A_out.js
new file mode 100644
index 0000000..99af06a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test203/A_out.js
@@ -0,0 +1,6 @@
+{static final char[]
+charArray_a = new char[]{'a'} ,
+charArray_b = new char[]{'b'} ,
+charArray_c = new char[]{'c'} ,
+charArray_d = new char[]{'d'} ;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test204/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test204/A_in.js
new file mode 100644
index 0000000..234062e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test204/A_in.js
@@ -0,0 +1,7 @@
+completionKind =
+COMPLETION_LOCAL_TYPES
+| COMPLETION_PRIMITIVE_TYPES
+| COMPLETION_TYPES
+| COMPLETION_FIELDS
+| COMPLETION_METHODS
+| COMPLETION_LOCALS; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test204/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test204/A_out.js
new file mode 100644
index 0000000..e37cedf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test204/A_out.js
@@ -0,0 +1,3 @@
+completionKind = COMPLETION_LOCAL_TYPES | COMPLETION_PRIMITIVE_TYPES
+ | COMPLETION_TYPES | COMPLETION_FIELDS | COMPLETION_METHODS
+ | COMPLETION_LOCALS; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test205/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test205/A_in.js
new file mode 100644
index 0000000..27c33e0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test205/A_in.js
@@ -0,0 +1,8 @@
+// Do something
+fElement = element;
+fFilter = filter;
+fWorkspace = ((LFBaseElement) fElement).getWorkspace();
+
+// Do something else
+setPackageStatus();
+if (fIsResourceFolderFields) setResourceFolderStatus(); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test205/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test205/A_out.js
new file mode 100644
index 0000000..fa8d85d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test205/A_out.js
@@ -0,0 +1,9 @@
+// Do something
+fElement = element;
+fFilter = filter;
+fWorkspace = ((LFBaseElement) fElement).getWorkspace();
+
+// Do something else
+setPackageStatus();
+if (fIsResourceFolderFields)
+ setResourceFolderStatus(); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test206/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test206/A_in.js
new file mode 100644
index 0000000..9f55a0e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test206/A_in.js
@@ -0,0 +1 @@
+if (true) try {throw new Exception();} catch(Exception e) {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test206/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test206/A_out.js
new file mode 100644
index 0000000..c7dd39c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test206/A_out.js
@@ -0,0 +1,8 @@
+if (true)
+ try
+ {
+ throw new Exception();
+ }
+ catch (Exception e)
+ {
+ } \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test207/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test207/A_in.js
new file mode 100644
index 0000000..9f55a0e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test207/A_in.js
@@ -0,0 +1 @@
+if (true) try {throw new Exception();} catch(Exception e) {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test207/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test207/A_out.js
new file mode 100644
index 0000000..da9beb8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test207/A_out.js
@@ -0,0 +1,5 @@
+if (true)
+ try {
+ throw new Exception();
+ } catch (Exception e) {
+ } \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test208/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test208/A_in.js
new file mode 100644
index 0000000..c68b5eb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test208/A_in.js
@@ -0,0 +1,4 @@
+/*
+* // another comment
+*/
+int i; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test208/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test208/A_out.js
new file mode 100644
index 0000000..512c216
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test208/A_out.js
@@ -0,0 +1,4 @@
+/*
+ * // another comment
+ */
+int i; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test209/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test209/A_in.js
new file mode 100644
index 0000000..108524c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test209/A_in.js
@@ -0,0 +1,9 @@
+public class MikeClassTest2 {
+
+ //mike test 2342323
+
+ public static int bob = 3;
+ public static int mike = 3;
+
+ /*my comments tabbed*/
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test209/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test209/A_out.js
new file mode 100644
index 0000000..108524c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test209/A_out.js
@@ -0,0 +1,9 @@
+public class MikeClassTest2 {
+
+ //mike test 2342323
+
+ public static int bob = 3;
+ public static int mike = 3;
+
+ /*my comments tabbed*/
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test210/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test210/A_in.js
new file mode 100644
index 0000000..e2d62d1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test210/A_in.js
@@ -0,0 +1,8 @@
+public class MikeClassTest2 {
+
+ //mike test 2342323
+
+ public static int bob = 3;public static int mike = 3;
+
+ /*my comments tabbed*/
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test210/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test210/A_out.js
new file mode 100644
index 0000000..1196f1d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test210/A_out.js
@@ -0,0 +1,10 @@
+public class MikeClassTest2
+{
+
+ //mike test 2342323
+
+ public static int bob = 3;
+ public static int mike = 3;
+
+ /*my comments tabbed*/
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test211/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test211/A_in.js
new file mode 100644
index 0000000..e2d62d1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test211/A_in.js
@@ -0,0 +1,8 @@
+public class MikeClassTest2 {
+
+ //mike test 2342323
+
+ public static int bob = 3;public static int mike = 3;
+
+ /*my comments tabbed*/
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test211/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test211/A_out.js
new file mode 100644
index 0000000..ccc05e5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test211/A_out.js
@@ -0,0 +1,10 @@
+ public class MikeClassTest2
+ {
+
+ //mike test 2342323
+
+ public static int bob = 3;
+ public static int mike = 3;
+
+ /*my comments tabbed*/
+ } \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test212/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test212/A_in.js
new file mode 100644
index 0000000..96c866e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test212/A_in.js
@@ -0,0 +1,8 @@
+ /**
+ * This hook is called if the window's close button was pressed, the close menu was selected,
+ * or the ESCAPE key pressed.
+ * The default implementation calls <code>close()</code>.
+ */
+ public void closeBoxPressed() {
+ close();
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test212/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test212/A_out.js
new file mode 100644
index 0000000..ca23296
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test212/A_out.js
@@ -0,0 +1,9 @@
+/**
+ * This hook is called if the window's close button was pressed, the close menu was selected,
+ * or the ESCAPE key pressed.
+ * The default implementation calls <code>close()</code>.
+ */
+public void closeBoxPressed()
+{
+ close();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test213/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test213/A_in.js
new file mode 100644
index 0000000..96c866e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test213/A_in.js
@@ -0,0 +1,8 @@
+ /**
+ * This hook is called if the window's close button was pressed, the close menu was selected,
+ * or the ESCAPE key pressed.
+ * The default implementation calls <code>close()</code>.
+ */
+ public void closeBoxPressed() {
+ close();
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test213/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test213/A_out.js
new file mode 100644
index 0000000..44974cf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test213/A_out.js
@@ -0,0 +1,8 @@
+/**
+ * This hook is called if the window's close button was pressed, the close menu was selected,
+ * or the ESCAPE key pressed.
+ * The default implementation calls <code>close()</code>.
+ */
+public void closeBoxPressed() {
+ close();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test214/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test214/A_in.js
new file mode 100644
index 0000000..d9fbb16
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test214/A_in.js
@@ -0,0 +1,5 @@
+String command = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +
+"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +
+"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +
+// comment
+"a";
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test214/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test214/A_out.js
new file mode 100644
index 0000000..a41eed8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test214/A_out.js
@@ -0,0 +1,5 @@
+String command = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +
+ // comment
+ "a"; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test215/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test215/A_in.js
new file mode 100644
index 0000000..e45ca70
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test215/A_in.js
@@ -0,0 +1,7 @@
+public class TestFormatCode { class InnerClass {
+public void innerMethod() {}}
+public void outerMethod() throws Exception {
+ Object anonymousClass = new Object() {
+ public void anonymousMethod() {}};
+ synchronized(this){}}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test215/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test215/A_out.js
new file mode 100644
index 0000000..ac1c0ba
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test215/A_out.js
@@ -0,0 +1,14 @@
+public class TestFormatCode {
+ class InnerClass {
+ public void innerMethod() {
+ }
+ }
+ public void outerMethod() throws Exception {
+ Object anonymousClass = new Object() {
+ public void anonymousMethod() {
+ }
+ };
+ synchronized (this) {
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test216/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test216/A_in.js
new file mode 100644
index 0000000..e45ca70
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test216/A_in.js
@@ -0,0 +1,7 @@
+public class TestFormatCode { class InnerClass {
+public void innerMethod() {}}
+public void outerMethod() throws Exception {
+ Object anonymousClass = new Object() {
+ public void anonymousMethod() {}};
+ synchronized(this){}}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test216/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test216/A_out.js
new file mode 100644
index 0000000..9f23a71
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test216/A_out.js
@@ -0,0 +1,21 @@
+public class TestFormatCode
+{
+ class InnerClass
+ {
+ public void innerMethod()
+ {
+ }
+ }
+ public void outerMethod() throws Exception
+ {
+ Object anonymousClass = new Object()
+ {
+ public void anonymousMethod()
+ {
+ }
+ };
+ synchronized (this)
+ {
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test217/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test217/A_in.js
new file mode 100644
index 0000000..17eb7ec
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test217/A_in.js
@@ -0,0 +1,3 @@
+public void foo()
+{B b = new B();b.bar();for(int i = 0, max = b.length(); i < max; i++){
+System.out.println(i);}}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test217/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test217/A_out.js
new file mode 100644
index 0000000..168fd9e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test217/A_out.js
@@ -0,0 +1,9 @@
+public void foo()
+{
+ B b = new B();
+ b.bar();
+ for (int i = 0, max = b.length(); i < max; i++)
+ {
+ System.out.println(i);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test218/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test218/A_in.js
new file mode 100644
index 0000000..17eb7ec
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test218/A_in.js
@@ -0,0 +1,3 @@
+public void foo()
+{B b = new B();b.bar();for(int i = 0, max = b.length(); i < max; i++){
+System.out.println(i);}}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test218/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test218/A_out.js
new file mode 100644
index 0000000..1d6df07
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test218/A_out.js
@@ -0,0 +1,7 @@
+ public void foo() {
+ B b = new B();
+ b.bar();
+ for (int i = 0, max = b.length(); i < max; i++) {
+ System.out.println(i);
+ }
+ } \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test219/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test219/A_in.js
new file mode 100644
index 0000000..17eb7ec
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test219/A_in.js
@@ -0,0 +1,3 @@
+public void foo()
+{B b = new B();b.bar();for(int i = 0, max = b.length(); i < max; i++){
+System.out.println(i);}}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test219/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test219/A_out.js
new file mode 100644
index 0000000..1d6df07
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test219/A_out.js
@@ -0,0 +1,7 @@
+ public void foo() {
+ B b = new B();
+ b.bar();
+ for (int i = 0, max = b.length(); i < max; i++) {
+ System.out.println(i);
+ }
+ } \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test220/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test220/A_in.js
new file mode 100644
index 0000000..17eb7ec
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test220/A_in.js
@@ -0,0 +1,3 @@
+public void foo()
+{B b = new B();b.bar();for(int i = 0, max = b.length(); i < max; i++){
+System.out.println(i);}}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test220/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test220/A_out.js
new file mode 100644
index 0000000..12f256e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test220/A_out.js
@@ -0,0 +1,9 @@
+ public void foo()
+ {
+ B b = new B();
+ b.bar();
+ for (int i = 0, max = b.length(); i < max; i++)
+ {
+ System.out.println(i);
+ }
+ } \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test221/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test221/A_in.js
new file mode 100644
index 0000000..aa259c4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test221/A_in.js
@@ -0,0 +1,17 @@
+private int getDivColumnNum(TableData t, String divId)
+{
+Vector v = t.getColNames();
+for (int i = 0; i < v.size(); i++)
+{
+Object o = v.elementAt(i);
+if (o instanceof Division)
+{
+Division div = (Division) o;
+if (div.getId().equals(divId))
+{
+return i;
+}
+}
+}
+return -1;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test221/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test221/A_out.js
new file mode 100644
index 0000000..af8b9cf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test221/A_out.js
@@ -0,0 +1,17 @@
+private int getDivColumnNum(TableData t, String divId)
+{
+ Vector v = t.getColNames();
+ for (int i = 0; i < v.size(); i++)
+ {
+ Object o = v.elementAt(i);
+ if (o instanceof Division)
+ {
+ Division div = (Division) o;
+ if (div.getId().equals(divId))
+ {
+ return i;
+ }
+ }
+ }
+ return -1;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test222/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test222/A_in.js
new file mode 100644
index 0000000..aa259c4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test222/A_in.js
@@ -0,0 +1,17 @@
+private int getDivColumnNum(TableData t, String divId)
+{
+Vector v = t.getColNames();
+for (int i = 0; i < v.size(); i++)
+{
+Object o = v.elementAt(i);
+if (o instanceof Division)
+{
+Division div = (Division) o;
+if (div.getId().equals(divId))
+{
+return i;
+}
+}
+}
+return -1;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test222/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test222/A_out.js
new file mode 100644
index 0000000..985efa6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test222/A_out.js
@@ -0,0 +1,13 @@
+private int getDivColumnNum(TableData t, String divId) {
+ Vector v = t.getColNames();
+ for (int i = 0; i < v.size(); i++) {
+ Object o = v.elementAt(i);
+ if (o instanceof Division) {
+ Division div = (Division) o;
+ if (div.getId().equals(divId)) {
+ return i;
+ }
+ }
+ }
+ return -1;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test223/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test223/A_in.js
new file mode 100644
index 0000000..7602cd8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test223/A_in.js
@@ -0,0 +1 @@
+return new Runnable() {public void run() {System.out.println();}}; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test223/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test223/A_out.js
new file mode 100644
index 0000000..3de6128
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test223/A_out.js
@@ -0,0 +1,5 @@
+return new Runnable() {
+ public void run() {
+ System.out.println();
+ }
+}; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test224/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test224/A_in.js
new file mode 100644
index 0000000..7602cd8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test224/A_in.js
@@ -0,0 +1 @@
+return new Runnable() {public void run() {System.out.println();}}; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test224/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test224/A_out.js
new file mode 100644
index 0000000..3d41ce9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test224/A_out.js
@@ -0,0 +1,7 @@
+return new Runnable()
+{
+ public void run()
+ {
+ System.out.println();
+ }
+}; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test225/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test225/A_in.js
new file mode 100644
index 0000000..80c8d05
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test225/A_in.js
@@ -0,0 +1 @@
+System.out.println(); int i = 0;return new Runnable() {public void run() {System.out.println();}}; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test225/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test225/A_out.js
new file mode 100644
index 0000000..e64ebb6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test225/A_out.js
@@ -0,0 +1,7 @@
+System.out.println();
+int i = 0;
+return new Runnable() {
+ public void run() {
+ System.out.println();
+ }
+}; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test226/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test226/A_in.js
new file mode 100644
index 0000000..80c8d05
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test226/A_in.js
@@ -0,0 +1 @@
+System.out.println(); int i = 0;return new Runnable() {public void run() {System.out.println();}}; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test226/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test226/A_out.js
new file mode 100644
index 0000000..e861a31
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test226/A_out.js
@@ -0,0 +1,9 @@
+System.out.println();
+int i = 0;
+return new Runnable()
+{
+ public void run()
+ {
+ System.out.println();
+ }
+}; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test227/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test227/A_in.js
new file mode 100644
index 0000000..254a30e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test227/A_in.js
@@ -0,0 +1 @@
+try {System.out.println(); int i = 0;return new Runnable() {public void run() {System.out.println();}};}catch(Exception e){} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test227/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test227/A_out.js
new file mode 100644
index 0000000..04718cc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test227/A_out.js
@@ -0,0 +1,10 @@
+try {
+ System.out.println();
+ int i = 0;
+ return new Runnable() {
+ public void run() {
+ System.out.println();
+ }
+ };
+} catch (Exception e) {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test228/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test228/A_in.js
new file mode 100644
index 0000000..254a30e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test228/A_in.js
@@ -0,0 +1 @@
+try {System.out.println(); int i = 0;return new Runnable() {public void run() {System.out.println();}};}catch(Exception e){} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test228/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test228/A_out.js
new file mode 100644
index 0000000..3374d76
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test228/A_out.js
@@ -0,0 +1,15 @@
+try
+{
+ System.out.println();
+ int i = 0;
+ return new Runnable()
+ {
+ public void run()
+ {
+ System.out.println();
+ }
+ };
+}
+catch (Exception e)
+{
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test229/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test229/A_in.js
new file mode 100644
index 0000000..254a30e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test229/A_in.js
@@ -0,0 +1 @@
+try {System.out.println(); int i = 0;return new Runnable() {public void run() {System.out.println();}};}catch(Exception e){} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test229/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test229/A_out.js
new file mode 100644
index 0000000..04718cc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test229/A_out.js
@@ -0,0 +1,10 @@
+try {
+ System.out.println();
+ int i = 0;
+ return new Runnable() {
+ public void run() {
+ System.out.println();
+ }
+ };
+} catch (Exception e) {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test230/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test230/A_in.js
new file mode 100644
index 0000000..254a30e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test230/A_in.js
@@ -0,0 +1 @@
+try {System.out.println(); int i = 0;return new Runnable() {public void run() {System.out.println();}};}catch(Exception e){} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test230/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test230/A_out.js
new file mode 100644
index 0000000..3374d76
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test230/A_out.js
@@ -0,0 +1,15 @@
+try
+{
+ System.out.println();
+ int i = 0;
+ return new Runnable()
+ {
+ public void run()
+ {
+ System.out.println();
+ }
+ };
+}
+catch (Exception e)
+{
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test231/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test231/A_in.js
new file mode 100644
index 0000000..aa8ebb2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test231/A_in.js
@@ -0,0 +1 @@
+public void foo(String s) {int i=4, k=45,l,p=3;return i+k+(l=2)+p;} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test231/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test231/A_out.js
new file mode 100644
index 0000000..bde21ea
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test231/A_out.js
@@ -0,0 +1,5 @@
+public void foo(String s)
+{
+ int i = 4, k = 45, l, p = 3;
+ return i + k + (l = 2) + p;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test232/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test232/A_in.js
new file mode 100644
index 0000000..aa8ebb2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test232/A_in.js
@@ -0,0 +1 @@
+public void foo(String s) {int i=4, k=45,l,p=3;return i+k+(l=2)+p;} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test232/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test232/A_out.js
new file mode 100644
index 0000000..f2855df
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test232/A_out.js
@@ -0,0 +1,4 @@
+public void foo(String s) {
+ int i = 4, k = 45, l, p = 3;
+ return i + k + (l = 2) + p;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test233/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test233/A_in.js
new file mode 100644
index 0000000..aa8ebb2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test233/A_in.js
@@ -0,0 +1 @@
+public void foo(String s) {int i=4, k=45,l,p=3;return i+k+(l=2)+p;} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test233/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test233/A_out.js
new file mode 100644
index 0000000..582a95e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test233/A_out.js
@@ -0,0 +1,4 @@
+ public void foo(String s) {
+ int i = 4, k = 45, l, p = 3;
+ return i + k + (l = 2) + p;
+ } \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test234/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test234/A_in.js
new file mode 100644
index 0000000..73f9f7b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test234/A_in.js
@@ -0,0 +1,4 @@
+public class firstClass {
+int a = 0;
+Object o = new Object();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test234/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test234/A_out.js
new file mode 100644
index 0000000..5a3f4ec
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test234/A_out.js
@@ -0,0 +1,4 @@
+public class firstClass {
+ int a = 0;
+ Object o = new Object();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test235/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test235/A_in.js
new file mode 100644
index 0000000..73f9f7b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test235/A_in.js
@@ -0,0 +1,4 @@
+public class firstClass {
+int a = 0;
+Object o = new Object();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test235/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test235/A_out.js
new file mode 100644
index 0000000..1898afd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test235/A_out.js
@@ -0,0 +1,5 @@
+public class firstClass
+{
+ int a = 0;
+ Object o = new Object();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test236/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test236/A_in.js
new file mode 100644
index 0000000..65007e4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test236/A_in.js
@@ -0,0 +1,8 @@
+public class firstClass {
+int a;
+Object o;
+firstClass() {
+a = 0;
+ o = new Object();
+}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test236/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test236/A_out.js
new file mode 100644
index 0000000..98827f9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test236/A_out.js
@@ -0,0 +1,8 @@
+public class firstClass {
+ int a;
+ Object o;
+ firstClass() {
+ a = 0;
+ o = new Object();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test237/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test237/A_in.js
new file mode 100644
index 0000000..65007e4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test237/A_in.js
@@ -0,0 +1,8 @@
+public class firstClass {
+int a;
+Object o;
+firstClass() {
+a = 0;
+ o = new Object();
+}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test237/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test237/A_out.js
new file mode 100644
index 0000000..465aedd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test237/A_out.js
@@ -0,0 +1,10 @@
+public class firstClass
+{
+ int a;
+ Object o;
+ firstClass()
+ {
+ a = 0;
+ o = new Object();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test238/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test238/A_in.js
new file mode 100644
index 0000000..8c32605
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test238/A_in.js
@@ -0,0 +1,7 @@
+public static String getLine() {
+try {
+return textIn.readLine();} catch (IOException e) {
+//Should never happen, isReady() tests for errors
+doSomething();
+}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test238/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test238/A_out.js
new file mode 100644
index 0000000..b0b1076
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test238/A_out.js
@@ -0,0 +1,8 @@
+public static String getLine() {
+ try {
+ return textIn.readLine();
+ } catch (IOException e) {
+ //Should never happen, isReady() tests for errors
+ doSomething();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test239/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test239/A_in.js
new file mode 100644
index 0000000..8c32605
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test239/A_in.js
@@ -0,0 +1,7 @@
+public static String getLine() {
+try {
+return textIn.readLine();} catch (IOException e) {
+//Should never happen, isReady() tests for errors
+doSomething();
+}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test239/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test239/A_out.js
new file mode 100644
index 0000000..d735af5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test239/A_out.js
@@ -0,0 +1,12 @@
+public static String getLine()
+{
+ try
+ {
+ return textIn.readLine();
+ }
+ catch (IOException e)
+ {
+ //Should never happen, isReady() tests for errors
+ doSomething();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test240/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test240/A_in.js
new file mode 100644
index 0000000..c1ccb3a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test240/A_in.js
@@ -0,0 +1,4 @@
+/* Tests if no extra indentation is inserted before
+ the 2nd method call on progressBar
+ */
+int i; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test240/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test240/A_out.js
new file mode 100644
index 0000000..2191017
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test240/A_out.js
@@ -0,0 +1,4 @@
+/* Tests if no extra indentation is inserted before
+ the 2nd method call on progressBar
+ */
+int i; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test241/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test241/A_in.js
new file mode 100644
index 0000000..c1ccb3a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test241/A_in.js
@@ -0,0 +1,4 @@
+/* Tests if no extra indentation is inserted before
+ the 2nd method call on progressBar
+ */
+int i; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test241/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test241/A_out.js
new file mode 100644
index 0000000..2191017
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test241/A_out.js
@@ -0,0 +1,4 @@
+/* Tests if no extra indentation is inserted before
+ the 2nd method call on progressBar
+ */
+int i; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test242/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test242/A_in.js
new file mode 100644
index 0000000..394bd55
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test242/A_in.js
@@ -0,0 +1,4 @@
+/* Tests if no extra indentation is inserted before
+* the 2nd method call on progressBar
+ */
+int i; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test242/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test242/A_out.js
new file mode 100644
index 0000000..3d2791e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test242/A_out.js
@@ -0,0 +1,4 @@
+/* Tests if no extra indentation is inserted before
+ * the 2nd method call on progressBar
+ */
+int i; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test243/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test243/A_in.js
new file mode 100644
index 0000000..394bd55
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test243/A_in.js
@@ -0,0 +1,4 @@
+/* Tests if no extra indentation is inserted before
+* the 2nd method call on progressBar
+ */
+int i; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test243/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test243/A_out.js
new file mode 100644
index 0000000..3d2791e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test243/A_out.js
@@ -0,0 +1,4 @@
+/* Tests if no extra indentation is inserted before
+ * the 2nd method call on progressBar
+ */
+int i; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test244/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test244/A_in.js
new file mode 100644
index 0000000..cb08b76
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test244/A_in.js
@@ -0,0 +1,8 @@
+/* Tests if no extra indentation is inserted before
+ if (n > 0) {
+ return n * fact(n-1)
+ } else {
+ return 1;
+ }
+ */
+int i; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test244/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test244/A_out.js
new file mode 100644
index 0000000..63cbbac
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test244/A_out.js
@@ -0,0 +1,8 @@
+/* Tests if no extra indentation is inserted before
+ if (n > 0) {
+ return n * fact(n-1)
+ } else {
+ return 1;
+ }
+ */
+int i; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test245/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test245/A_in.js
new file mode 100644
index 0000000..cb08b76
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test245/A_in.js
@@ -0,0 +1,8 @@
+/* Tests if no extra indentation is inserted before
+ if (n > 0) {
+ return n * fact(n-1)
+ } else {
+ return 1;
+ }
+ */
+int i; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test245/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test245/A_out.js
new file mode 100644
index 0000000..63cbbac
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test245/A_out.js
@@ -0,0 +1,8 @@
+/* Tests if no extra indentation is inserted before
+ if (n > 0) {
+ return n * fact(n-1)
+ } else {
+ return 1;
+ }
+ */
+int i; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test246/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test246/A_in.js
new file mode 100644
index 0000000..4c1d8ed
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test246/A_in.js
@@ -0,0 +1,8 @@
+ /* Tests if no extra indentation is inserted before
+ * if (n > 0) {
+ * return n * fact(n-1)
+ * } else {
+ * return 1;
+ * }
+ */
+int i; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test246/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test246/A_out.js
new file mode 100644
index 0000000..d4da6fe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test246/A_out.js
@@ -0,0 +1,8 @@
+/* Tests if no extra indentation is inserted before
+ * if (n > 0) {
+ * return n * fact(n-1)
+ * } else {
+ * return 1;
+ * }
+ */
+int i; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test247/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test247/A_in.js
new file mode 100644
index 0000000..4c1d8ed
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test247/A_in.js
@@ -0,0 +1,8 @@
+ /* Tests if no extra indentation is inserted before
+ * if (n > 0) {
+ * return n * fact(n-1)
+ * } else {
+ * return 1;
+ * }
+ */
+int i; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test247/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test247/A_out.js
new file mode 100644
index 0000000..d4da6fe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test247/A_out.js
@@ -0,0 +1,8 @@
+/* Tests if no extra indentation is inserted before
+ * if (n > 0) {
+ * return n * fact(n-1)
+ * } else {
+ * return 1;
+ * }
+ */
+int i; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test248/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test248/A_in.js
new file mode 100644
index 0000000..1d13939
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test248/A_in.js
@@ -0,0 +1,8 @@
+ /* Tests if no extra indentation is inserted before
+ * if (n > 0) {
+ * return n * fact(n-1)
+ * } else {
+ * return 1;
+ * }
+ */
+int i; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test248/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test248/A_out.js
new file mode 100644
index 0000000..d4b336d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test248/A_out.js
@@ -0,0 +1,8 @@
+/* Tests if no extra indentation is inserted before
+ * if (n > 0) {
+ * return n * fact(n-1)
+ * } else {
+ * return 1;
+ * }
+ */
+int i; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test249/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test249/A_in.js
new file mode 100644
index 0000000..bbdf9dc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test249/A_in.js
@@ -0,0 +1,8 @@
+ /* Tests if no extra indentation is inserted before
+ * if (n > 0) {
+ * return n * fact(n-1)
+ * } else {
+ * return 1;
+ * }
+ */
+int i; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test249/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test249/A_out.js
new file mode 100644
index 0000000..d4b336d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test249/A_out.js
@@ -0,0 +1,8 @@
+/* Tests if no extra indentation is inserted before
+ * if (n > 0) {
+ * return n * fact(n-1)
+ * } else {
+ * return 1;
+ * }
+ */
+int i; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test250/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test250/A_in.js
new file mode 100644
index 0000000..1b15010
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test250/A_in.js
@@ -0,0 +1,8 @@
+ /* Tests if no extra indentation is inserted before
+ * if (n > 0) {
+ * return n * fact(n-1)
+ * } else {
+ * return 1;
+ * }
+ */
+int i; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test250/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test250/A_out.js
new file mode 100644
index 0000000..1d04711
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test250/A_out.js
@@ -0,0 +1,8 @@
+/* Tests if no extra indentation is inserted before
+ * if (n > 0) {
+ * return n * fact(n-1)
+ * } else {
+ * return 1;
+ * }
+ */
+int i; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test251/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test251/A_in.js
new file mode 100644
index 0000000..0771c80
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test251/A_in.js
@@ -0,0 +1,8 @@
+ /* Tests if no extra indentation is inserted before
+ * if (n > 0) {
+ * return n * fact(n-1)
+ * } else {
+ * return 1;
+ * }
+ */
+int i; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test251/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test251/A_out.js
new file mode 100644
index 0000000..d4b336d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test251/A_out.js
@@ -0,0 +1,8 @@
+/* Tests if no extra indentation is inserted before
+ * if (n > 0) {
+ * return n * fact(n-1)
+ * } else {
+ * return 1;
+ * }
+ */
+int i; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test252/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test252/A_in.js
new file mode 100644
index 0000000..01be3ad
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test252/A_in.js
@@ -0,0 +1,6 @@
+/* Tests if no extra indentation is inserted before
+* the 2nd method call on progressBar
+ */
+public ProgressPanel(SwingSet swing) {
+progressBar.getAccessibleContext().setAccessibleName("Text loading progress");
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test252/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test252/A_out.js
new file mode 100644
index 0000000..a5986a4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test252/A_out.js
@@ -0,0 +1,7 @@
+/* Tests if no extra indentation is inserted before
+ * the 2nd method call on progressBar
+ */
+public ProgressPanel(SwingSet swing) {
+ progressBar.getAccessibleContext().setAccessibleName(
+ "Text loading progress");
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test253/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test253/A_in.js
new file mode 100644
index 0000000..01be3ad
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test253/A_in.js
@@ -0,0 +1,6 @@
+/* Tests if no extra indentation is inserted before
+* the 2nd method call on progressBar
+ */
+public ProgressPanel(SwingSet swing) {
+progressBar.getAccessibleContext().setAccessibleName("Text loading progress");
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test253/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test253/A_out.js
new file mode 100644
index 0000000..d198054
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test253/A_out.js
@@ -0,0 +1,8 @@
+/* Tests if no extra indentation is inserted before
+ * the 2nd method call on progressBar
+ */
+public ProgressPanel(SwingSet swing)
+{
+ progressBar.getAccessibleContext().setAccessibleName(
+ "Text loading progress");
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test254/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test254/A_in.js
new file mode 100644
index 0000000..3bfd365
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test254/A_in.js
@@ -0,0 +1,6 @@
+/* Tests if no extra indentation is inserted before
+ * the 2nd method call on progressBar
+ */
+public ProgressPanel(SwingSet swing) {
+progressBar.getAccessibleContext().setAccessibleName("Text loading progress");
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test254/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test254/A_out.js
new file mode 100644
index 0000000..a5986a4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test254/A_out.js
@@ -0,0 +1,7 @@
+/* Tests if no extra indentation is inserted before
+ * the 2nd method call on progressBar
+ */
+public ProgressPanel(SwingSet swing) {
+ progressBar.getAccessibleContext().setAccessibleName(
+ "Text loading progress");
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test255/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test255/A_in.js
new file mode 100644
index 0000000..3bfd365
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test255/A_in.js
@@ -0,0 +1,6 @@
+/* Tests if no extra indentation is inserted before
+ * the 2nd method call on progressBar
+ */
+public ProgressPanel(SwingSet swing) {
+progressBar.getAccessibleContext().setAccessibleName("Text loading progress");
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test255/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test255/A_out.js
new file mode 100644
index 0000000..d198054
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test255/A_out.js
@@ -0,0 +1,8 @@
+/* Tests if no extra indentation is inserted before
+ * the 2nd method call on progressBar
+ */
+public ProgressPanel(SwingSet swing)
+{
+ progressBar.getAccessibleContext().setAccessibleName(
+ "Text loading progress");
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test256/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test256/A_in.js
new file mode 100644
index 0000000..33aee4c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test256/A_in.js
@@ -0,0 +1 @@
+do {i++; } while(i < 30); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test256/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test256/A_out.js
new file mode 100644
index 0000000..352bf60
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test256/A_out.js
@@ -0,0 +1,3 @@
+do {
+ i++;
+} while (i < 30); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test257/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test257/A_in.js
new file mode 100644
index 0000000..bb6acb7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test257/A_in.js
@@ -0,0 +1 @@
+do{i++;}while(i < 30); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test257/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test257/A_out.js
new file mode 100644
index 0000000..e912ac9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test257/A_out.js
@@ -0,0 +1,5 @@
+do
+{
+ i++;
+}
+while (i < 30); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test258/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test258/A_in.js
new file mode 100644
index 0000000..6a0cc14
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test258/A_in.js
@@ -0,0 +1 @@
+public class firstClass {int a;Object o;void myMethod() {if (i == 0) {doSomething();doSomethingElse();} else {doThisFinally();}}} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test258/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test258/A_out.js
new file mode 100644
index 0000000..df40c20
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test258/A_out.js
@@ -0,0 +1,12 @@
+public class firstClass {
+ int a;
+ Object o;
+ void myMethod() {
+ if (i == 0) {
+ doSomething();
+ doSomethingElse();
+ } else {
+ doThisFinally();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test259/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test259/A_in.js
new file mode 100644
index 0000000..6a0cc14
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test259/A_in.js
@@ -0,0 +1 @@
+public class firstClass {int a;Object o;void myMethod() {if (i == 0) {doSomething();doSomethingElse();} else {doThisFinally();}}} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test259/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test259/A_out.js
new file mode 100644
index 0000000..d8204a3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test259/A_out.js
@@ -0,0 +1,17 @@
+public class firstClass
+{
+ int a;
+ Object o;
+ void myMethod()
+ {
+ if (i == 0)
+ {
+ doSomething();
+ doSomethingElse();
+ }
+ else
+ {
+ doThisFinally();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test260/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test260/A_in.js
new file mode 100644
index 0000000..325328e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test260/A_in.js
@@ -0,0 +1 @@
+public class firstClass {int a;Object o;void myMethod() {if (a < 2){doSomething();doSomethingElse();} else {doThisFinally();}}} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test260/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test260/A_out.js
new file mode 100644
index 0000000..728b183
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test260/A_out.js
@@ -0,0 +1,12 @@
+public class firstClass {
+ int a;
+ Object o;
+ void myMethod() {
+ if (a < 2) {
+ doSomething();
+ doSomethingElse();
+ } else {
+ doThisFinally();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test261/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test261/A_in.js
new file mode 100644
index 0000000..325328e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test261/A_in.js
@@ -0,0 +1 @@
+public class firstClass {int a;Object o;void myMethod() {if (a < 2){doSomething();doSomethingElse();} else {doThisFinally();}}} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test261/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test261/A_out.js
new file mode 100644
index 0000000..e5a5b45
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test261/A_out.js
@@ -0,0 +1,17 @@
+public class firstClass
+{
+ int a;
+ Object o;
+ void myMethod()
+ {
+ if (a < 2)
+ {
+ doSomething();
+ doSomethingElse();
+ }
+ else
+ {
+ doThisFinally();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test262/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test262/A_in.js
new file mode 100644
index 0000000..a5f97ec
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test262/A_in.js
@@ -0,0 +1 @@
+public class firstClass {int a;Object o;void myMethod() {for (int i = 0; i < 2; i++) {doSomething();doSomethingElse();}}} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test262/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test262/A_out.js
new file mode 100644
index 0000000..96d4996
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test262/A_out.js
@@ -0,0 +1,10 @@
+public class firstClass {
+ int a;
+ Object o;
+ void myMethod() {
+ for (int i = 0; i < 2; i++) {
+ doSomething();
+ doSomethingElse();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test263/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test263/A_in.js
new file mode 100644
index 0000000..a5f97ec
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test263/A_in.js
@@ -0,0 +1 @@
+public class firstClass {int a;Object o;void myMethod() {for (int i = 0; i < 2; i++) {doSomething();doSomethingElse();}}} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test263/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test263/A_out.js
new file mode 100644
index 0000000..0084bc8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test263/A_out.js
@@ -0,0 +1,13 @@
+public class firstClass
+{
+ int a;
+ Object o;
+ void myMethod()
+ {
+ for (int i = 0; i < 2; i++)
+ {
+ doSomething();
+ doSomethingElse();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test264/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test264/A_in.js
new file mode 100644
index 0000000..2fe5049
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test264/A_in.js
@@ -0,0 +1 @@
+public class firstClass {int a;Object o;void myMethod() {for (int i = 0; i < 2; i++) doSomething();}} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test264/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test264/A_out.js
new file mode 100644
index 0000000..8fb3c26
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test264/A_out.js
@@ -0,0 +1,8 @@
+public class firstClass {
+ int a;
+ Object o;
+ void myMethod() {
+ for (int i = 0; i < 2; i++)
+ doSomething();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test265/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test265/A_in.js
new file mode 100644
index 0000000..2fe5049
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test265/A_in.js
@@ -0,0 +1 @@
+public class firstClass {int a;Object o;void myMethod() {for (int i = 0; i < 2; i++) doSomething();}} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test265/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test265/A_out.js
new file mode 100644
index 0000000..e71ee11
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test265/A_out.js
@@ -0,0 +1,10 @@
+public class firstClass
+{
+ int a;
+ Object o;
+ void myMethod()
+ {
+ for (int i = 0; i < 2; i++)
+ doSomething();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test266/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test266/A_in.js
new file mode 100644
index 0000000..14165c2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test266/A_in.js
@@ -0,0 +1 @@
+currentObject =new MethodDeclaration(flags & getModifiers,modifiersEndPosition,typeName,aName,identifierStartPosition,parameterList,parametersPositions,throwList,throwsPositions,scanner.deprecatedPtr > -1); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test266/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test266/A_out.js
new file mode 100644
index 0000000..4564552
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test266/A_out.js
@@ -0,0 +1,4 @@
+currentObject = new MethodDeclaration(flags & getModifiers,
+ modifiersEndPosition, typeName, aName, identifierStartPosition,
+ parameterList, parametersPositions, throwList, throwsPositions,
+ scanner.deprecatedPtr > -1); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test267/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test267/A_in.js
new file mode 100644
index 0000000..14165c2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test267/A_in.js
@@ -0,0 +1 @@
+currentObject =new MethodDeclaration(flags & getModifiers,modifiersEndPosition,typeName,aName,identifierStartPosition,parameterList,parametersPositions,throwList,throwsPositions,scanner.deprecatedPtr > -1); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test267/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test267/A_out.js
new file mode 100644
index 0000000..4564552
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test267/A_out.js
@@ -0,0 +1,4 @@
+currentObject = new MethodDeclaration(flags & getModifiers,
+ modifiersEndPosition, typeName, aName, identifierStartPosition,
+ parameterList, parametersPositions, throwList, throwsPositions,
+ scanner.deprecatedPtr > -1); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test268/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test268/A_in.js
new file mode 100644
index 0000000..be62511
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test268/A_in.js
@@ -0,0 +1 @@
+public ProgressPanel(SwingSet swing) {progressBar = new JProgressBar() {public Dimension getPreferredSize() {return new Dimension(300, super.getPreferredSize().height); }}; progressBar.getAccessibleContext().setAccessibleName("Text loading progress");} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test268/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test268/A_out.js
new file mode 100644
index 0000000..5fd43c7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test268/A_out.js
@@ -0,0 +1,9 @@
+public ProgressPanel(SwingSet swing) {
+ progressBar = new JProgressBar() {
+ public Dimension getPreferredSize() {
+ return new Dimension(300, super.getPreferredSize().height);
+ }
+ };
+ progressBar.getAccessibleContext().setAccessibleName(
+ "Text loading progress");
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test269/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test269/A_in.js
new file mode 100644
index 0000000..be62511
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test269/A_in.js
@@ -0,0 +1 @@
+public ProgressPanel(SwingSet swing) {progressBar = new JProgressBar() {public Dimension getPreferredSize() {return new Dimension(300, super.getPreferredSize().height); }}; progressBar.getAccessibleContext().setAccessibleName("Text loading progress");} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test269/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test269/A_out.js
new file mode 100644
index 0000000..2c126b2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test269/A_out.js
@@ -0,0 +1,12 @@
+public ProgressPanel(SwingSet swing)
+{
+ progressBar = new JProgressBar()
+ {
+ public Dimension getPreferredSize()
+ {
+ return new Dimension(300, super.getPreferredSize().height);
+ }
+ };
+ progressBar.getAccessibleContext().setAccessibleName(
+ "Text loading progress");
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test270/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test270/A_in.js
new file mode 100644
index 0000000..9cd8425
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test270/A_in.js
@@ -0,0 +1,23 @@
+public class firstClass {
+int a;
+ Object o;
+ void myMethod() {
+if (i == 0) { doSomething();
+ doSomethingElse();
+ } else {
+if (right()) doThis();
+else
+ if (left()) {
+ doThis();
+doThat();
+ } else
+if (up())
+ doThis();
+else {
+doThat();
+ doThat();
+}
+lastThing();
+}
+}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test270/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test270/A_out.js
new file mode 100644
index 0000000..5bb4235
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test270/A_out.js
@@ -0,0 +1,23 @@
+public class firstClass {
+ int a;
+ Object o;
+ void myMethod() {
+ if (i == 0) {
+ doSomething();
+ doSomethingElse();
+ } else {
+ if (right())
+ doThis();
+ else if (left()) {
+ doThis();
+ doThat();
+ } else if (up())
+ doThis();
+ else {
+ doThat();
+ doThat();
+ }
+ lastThing();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test271/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test271/A_in.js
new file mode 100644
index 0000000..9cd8425
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test271/A_in.js
@@ -0,0 +1,23 @@
+public class firstClass {
+int a;
+ Object o;
+ void myMethod() {
+if (i == 0) { doSomething();
+ doSomethingElse();
+ } else {
+if (right()) doThis();
+else
+ if (left()) {
+ doThis();
+doThat();
+ } else
+if (up())
+ doThis();
+else {
+doThat();
+ doThat();
+}
+lastThing();
+}
+}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test271/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test271/A_out.js
new file mode 100644
index 0000000..34f8172
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test271/A_out.js
@@ -0,0 +1,31 @@
+public class firstClass
+{
+ int a;
+ Object o;
+ void myMethod()
+ {
+ if (i == 0)
+ {
+ doSomething();
+ doSomethingElse();
+ }
+ else
+ {
+ if (right())
+ doThis();
+ else if (left())
+ {
+ doThis();
+ doThat();
+ }
+ else if (up())
+ doThis();
+ else
+ {
+ doThat();
+ doThat();
+ }
+ lastThing();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test272/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test272/A_in.js
new file mode 100644
index 0000000..48329f8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test272/A_in.js
@@ -0,0 +1 @@
+public class firstClass {int a;Object o;void myMethod() {if (i == 0) { doSomething(); doSomethingElse(); } else {if (right()) doThis();else if (left()) { doThis();doThat(); } else if (up()) doThis();else {doThat(); doThat();switch(a) {case 1: break;case 2: return;case 3:case 4: {}default:System.out.println();}}lastThing();}}} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test272/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test272/A_out.js
new file mode 100644
index 0000000..9d9af7a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test272/A_out.js
@@ -0,0 +1,35 @@
+public class firstClass {
+ int a;
+ Object o;
+ void myMethod() {
+ if (i == 0) {
+ doSomething();
+ doSomethingElse();
+ } else {
+ if (right())
+ doThis();
+ else if (left()) {
+ doThis();
+ doThat();
+ } else if (up())
+ doThis();
+ else {
+ doThat();
+ doThat();
+ switch (a) {
+ case 1 :
+ break;
+ case 2 :
+ return;
+ case 3 :
+ case 4 :
+ {
+ }
+ default :
+ System.out.println();
+ }
+ }
+ lastThing();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test273/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test273/A_in.js
new file mode 100644
index 0000000..48329f8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test273/A_in.js
@@ -0,0 +1 @@
+public class firstClass {int a;Object o;void myMethod() {if (i == 0) { doSomething(); doSomethingElse(); } else {if (right()) doThis();else if (left()) { doThis();doThat(); } else if (up()) doThis();else {doThat(); doThat();switch(a) {case 1: break;case 2: return;case 3:case 4: {}default:System.out.println();}}lastThing();}}} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test273/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test273/A_out.js
new file mode 100644
index 0000000..090b458
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test273/A_out.js
@@ -0,0 +1,44 @@
+public class firstClass
+{
+ int a;
+ Object o;
+ void myMethod()
+ {
+ if (i == 0)
+ {
+ doSomething();
+ doSomethingElse();
+ }
+ else
+ {
+ if (right())
+ doThis();
+ else if (left())
+ {
+ doThis();
+ doThat();
+ }
+ else if (up())
+ doThis();
+ else
+ {
+ doThat();
+ doThat();
+ switch (a)
+ {
+ case 1 :
+ break;
+ case 2 :
+ return;
+ case 3 :
+ case 4 :
+ {
+ }
+ default :
+ System.out.println();
+ }
+ }
+ lastThing();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test274/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test274/A_in.js
new file mode 100644
index 0000000..6e821e5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test274/A_in.js
@@ -0,0 +1 @@
+public void foo(String s) {synchronized(this) {System.out.println(s.length());}} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test274/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test274/A_out.js
new file mode 100644
index 0000000..1fbe60a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test274/A_out.js
@@ -0,0 +1,5 @@
+public void foo(String s) {
+ synchronized (this) {
+ System.out.println(s.length());
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test275/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test275/A_in.js
new file mode 100644
index 0000000..6e821e5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test275/A_in.js
@@ -0,0 +1 @@
+public void foo(String s) {synchronized(this) {System.out.println(s.length());}} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test275/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test275/A_out.js
new file mode 100644
index 0000000..43b8879
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test275/A_out.js
@@ -0,0 +1,7 @@
+public void foo(String s)
+{
+ synchronized (this)
+ {
+ System.out.println(s.length());
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test276/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test276/A_in.js
new file mode 100644
index 0000000..3b4eaff
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test276/A_in.js
@@ -0,0 +1 @@
+if (bool) synchronized (this) {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test276/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test276/A_out.js
new file mode 100644
index 0000000..724f751
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test276/A_out.js
@@ -0,0 +1,4 @@
+if (bool)
+ synchronized (this)
+ {
+ } \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test277/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test277/A_in.js
new file mode 100644
index 0000000..6178d1a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test277/A_in.js
@@ -0,0 +1 @@
+if (bool) synchronized (this) {System.out.println();} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test277/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test277/A_out.js
new file mode 100644
index 0000000..64245a3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test277/A_out.js
@@ -0,0 +1,4 @@
+if (bool)
+ synchronized (this) {
+ System.out.println();
+ } \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test278/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test278/A_in.js
new file mode 100644
index 0000000..351b330
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test278/A_in.js
@@ -0,0 +1 @@
+synchronized void foo() {System.out.println();} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test278/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test278/A_out.js
new file mode 100644
index 0000000..348889e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test278/A_out.js
@@ -0,0 +1,3 @@
+synchronized void foo() {
+ System.out.println();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test279/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test279/A_in.js
new file mode 100644
index 0000000..0b2eae2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test279/A_in.js
@@ -0,0 +1 @@
+if (bool) {synchronized (this) {System.out.println();}} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test279/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test279/A_out.js
new file mode 100644
index 0000000..d04a4a9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test279/A_out.js
@@ -0,0 +1,7 @@
+if (bool)
+{
+ synchronized (this)
+ {
+ System.out.println();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test280/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test280/A_in.js
new file mode 100644
index 0000000..fc58fe9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test280/A_in.js
@@ -0,0 +1 @@
+public class FormaterBug { public static void main(String[] args) { } public synchronized void method1() { } public synchronized void method2() { } public synchronized void method3() { } public synchronized void method4() { } public synchronized void method5() { } public synchronized void method6() { } public synchronized void method7() { } } \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test280/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test280/A_out.js
new file mode 100644
index 0000000..ff06b67
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test280/A_out.js
@@ -0,0 +1,27 @@
+public class FormaterBug
+{
+ public static void main(String[] args)
+ {
+ }
+ public synchronized void method1()
+ {
+ }
+ public synchronized void method2()
+ {
+ }
+ public synchronized void method3()
+ {
+ }
+ public synchronized void method4()
+ {
+ }
+ public synchronized void method5()
+ {
+ }
+ public synchronized void method6()
+ {
+ }
+ public synchronized void method7()
+ {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test281/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test281/A_in.js
new file mode 100644
index 0000000..39a22d8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test281/A_in.js
@@ -0,0 +1 @@
+public class FormaterBug {public static void main(String[] args){}public synchronized void method1() {} public synchronized void method2(){} public synchronized void method3() {} public synchronized voidmethod4() {} public synchronized void method5() {}public synchronized void method6() {} public synchronized void method7(){}} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test281/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test281/A_out.js
new file mode 100644
index 0000000..e834701
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test281/A_out.js
@@ -0,0 +1,18 @@
+public class FormaterBug {
+ public static void main(String[] args) {
+ }
+ public synchronized void method1() {
+ }
+ public synchronized void method2() {
+ }
+ public synchronized void method3() {
+ }
+ public synchronized voidmethod4() {
+ }
+ public synchronized void method5() {
+ }
+ public synchronized void method6() {
+ }
+ public synchronized void method7() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test282/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test282/A_in.js
new file mode 100644
index 0000000..903d7b8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test282/A_in.js
@@ -0,0 +1,13 @@
+public class FormaterBug {
+public static void main(String[] args) {
+Object o = null;
+synchronized (o) {
+// DO something
+}
+// Why does the code formater indent that lines?
+o = o;
+o = null;
+o = o;
+o = null;
+}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test282/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test282/A_out.js
new file mode 100644
index 0000000..0866ffc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test282/A_out.js
@@ -0,0 +1,13 @@
+public class FormaterBug {
+ public static void main(String[] args) {
+ Object o = null;
+ synchronized (o) {
+ // DO something
+ }
+ // Why does the code formater indent that lines?
+ o = o;
+ o = null;
+ o = o;
+ o = null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test283/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test283/A_in.js
new file mode 100644
index 0000000..116be1f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test283/A_in.js
@@ -0,0 +1,16 @@
+public class FormaterBug {
+public static void main(String[] args) {
+Object o = null;
+ o = null;
+ o = o;
+ o = null;
+synchronized (o) {
+// DO something
+}
+// Why does the code formater indent that lines?
+o = o;
+o = null;
+o = o;
+o = null;
+}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test283/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test283/A_out.js
new file mode 100644
index 0000000..ff402e4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test283/A_out.js
@@ -0,0 +1,16 @@
+public class FormaterBug {
+ public static void main(String[] args) {
+ Object o = null;
+ o = null;
+ o = o;
+ o = null;
+ synchronized (o) {
+ // DO something
+ }
+ // Why does the code formater indent that lines?
+ o = o;
+ o = null;
+ o = o;
+ o = null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test284/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test284/A_in.js
new file mode 100644
index 0000000..116be1f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test284/A_in.js
@@ -0,0 +1,16 @@
+public class FormaterBug {
+public static void main(String[] args) {
+Object o = null;
+ o = null;
+ o = o;
+ o = null;
+synchronized (o) {
+// DO something
+}
+// Why does the code formater indent that lines?
+o = o;
+o = null;
+o = o;
+o = null;
+}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test284/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test284/A_out.js
new file mode 100644
index 0000000..57f70dd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test284/A_out.js
@@ -0,0 +1,19 @@
+public class FormaterBug
+{
+ public static void main(String[] args)
+ {
+ Object o = null;
+ o = null;
+ o = o;
+ o = null;
+ synchronized (o)
+ {
+ // DO something
+ }
+ // Why does the code formater indent that lines?
+ o = o;
+ o = null;
+ o = o;
+ o = null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test285/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test285/A_in.js
new file mode 100644
index 0000000..b0afbab
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test285/A_in.js
@@ -0,0 +1 @@
+try{do{i++;}while(i < 30);if (bool) {synchronized (this) {System.out.println();}}}catch(Exception e) {} finally {i++;} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test285/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test285/A_out.js
new file mode 100644
index 0000000..7c4ed5f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test285/A_out.js
@@ -0,0 +1,22 @@
+try
+{
+ do
+ {
+ i++;
+ }
+ while (i < 30);
+ if (bool)
+ {
+ synchronized (this)
+ {
+ System.out.println();
+ }
+ }
+}
+catch (Exception e)
+{
+}
+finally
+{
+ i++;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test286/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test286/A_in.js
new file mode 100644
index 0000000..c1bf977
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test286/A_in.js
@@ -0,0 +1 @@
+try{do{i++;}while(i < 30);}catch(Exception e) {} finally {i++;} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test286/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test286/A_out.js
new file mode 100644
index 0000000..75dd036
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test286/A_out.js
@@ -0,0 +1,15 @@
+try
+{
+ do
+ {
+ i++;
+ }
+ while (i < 30);
+}
+catch (Exception e)
+{
+}
+finally
+{
+ i++;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test287/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test287/A_in.js
new file mode 100644
index 0000000..c1bf977
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test287/A_in.js
@@ -0,0 +1 @@
+try{do{i++;}while(i < 30);}catch(Exception e) {} finally {i++;} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test287/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test287/A_out.js
new file mode 100644
index 0000000..7a62bb0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test287/A_out.js
@@ -0,0 +1,8 @@
+try {
+ do {
+ i++;
+ } while (i < 30);
+} catch (Exception e) {
+} finally {
+ i++;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test288/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test288/A_in.js
new file mode 100644
index 0000000..c1bf977
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test288/A_in.js
@@ -0,0 +1 @@
+try{do{i++;}while(i < 30);}catch(Exception e) {} finally {i++;} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test288/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test288/A_out.js
new file mode 100644
index 0000000..1cf87f9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test288/A_out.js
@@ -0,0 +1,8 @@
+ try {
+ do {
+ i++;
+ } while (i < 30);
+ } catch (Exception e) {
+ } finally {
+ i++;
+ } \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test289/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test289/A_in.js
new file mode 100644
index 0000000..8f6812e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test289/A_in.js
@@ -0,0 +1,10 @@
+ // OrderedList<BiLetter>
+ OrderedList l = new OrderedList(new Comparator() {
+ /**
+ * This implementation of the <code>Comparator</code> method
+ * compares two <code>BiLetterRecord</code> objects using only
+ * their positions.
+ */
+ public int compare(Object obj1, Object obj2) {
+ }
+ }); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test289/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test289/A_out.js
new file mode 100644
index 0000000..597a461
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test289/A_out.js
@@ -0,0 +1,10 @@
+ // OrderedList<BiLetter>
+ OrderedList l = new OrderedList(new Comparator() {
+ /**
+ * This implementation of the <code>Comparator</code> method
+ * compares two <code>BiLetterRecord</code> objects using only
+ * their positions.
+ */
+ public int compare(Object obj1, Object obj2) {
+ }
+ }); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test290/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test290/A_in.js
new file mode 100644
index 0000000..430f744
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test290/A_in.js
@@ -0,0 +1,5 @@
+public void foo(String s)
+{
+ while (i < 13 && i != 4 && i > 0)
+ { i += s.length();}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test290/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test290/A_out.js
new file mode 100644
index 0000000..78ae76a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test290/A_out.js
@@ -0,0 +1,7 @@
+public void foo(String s)
+{
+ while (i < 13 && i != 4 && i > 0)
+ {
+ i += s.length();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test291/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test291/A_in.js
new file mode 100644
index 0000000..7ffd8ba
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test291/A_in.js
@@ -0,0 +1 @@
+public void foo(String s) {while(i < 13 && i != 4 && i >0) {i+=s.length();}} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test291/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test291/A_out.js
new file mode 100644
index 0000000..206b39f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test291/A_out.js
@@ -0,0 +1,5 @@
+public void foo(String s) {
+ while (i < 13 && i != 4 && i > 0) {
+ i += s.length();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test292/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test292/A_in.js
new file mode 100644
index 0000000..045c1a0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test292/A_in.js
@@ -0,0 +1 @@
+static char[] charArray_a = new char[] {'a'}, charArray_b = new char[] {'b'}, charArray_c = new char[] {'c'}, charArray_d = new char[] {'d'}; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test292/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test292/A_out.js
new file mode 100644
index 0000000..93a1a2a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test292/A_out.js
@@ -0,0 +1,2 @@
+static char[] charArray_a = new char[]{'a'}, charArray_b = new char[]{'b'},
+ charArray_c = new char[]{'c'}, charArray_d = new char[]{'d'}; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test293/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test293/A_in.js
new file mode 100644
index 0000000..a14c010
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test293/A_in.js
@@ -0,0 +1,4 @@
+ public String toStringExpression(int tab) {
+return "<CompleteOnType:" /*nonNLS*/
++ new String(token) + ">" /*nonNLS*/;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test293/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test293/A_out.js
new file mode 100644
index 0000000..7c74635
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test293/A_out.js
@@ -0,0 +1,5 @@
+public String toStringExpression(int tab)
+{
+ return "<CompleteOnType:" /*nonNLS*/
+ + new String(token) + ">" /*nonNLS*/;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test294/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test294/A_in.js
new file mode 100644
index 0000000..f19cfe7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test294/A_in.js
@@ -0,0 +1,3 @@
+ public String toStringExpression(int tab) {
+return new String(token) + ">" /*nonNLS*/;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test294/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test294/A_out.js
new file mode 100644
index 0000000..82a1259
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test294/A_out.js
@@ -0,0 +1,4 @@
+public String toStringExpression(int tab)
+{
+ return new String(token) + ">" /*nonNLS*/;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test295/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test295/A_in.js
new file mode 100644
index 0000000..becd9cf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test295/A_in.js
@@ -0,0 +1,3 @@
+ public String toStringExpression(int tab) {
+return tab - 4;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test295/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test295/A_out.js
new file mode 100644
index 0000000..528ecbe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test295/A_out.js
@@ -0,0 +1,3 @@
+public String toStringExpression(int tab) {
+ return tab - 4;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test296/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test296/A_in.js
new file mode 100644
index 0000000..e1a3491
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test296/A_in.js
@@ -0,0 +1,6 @@
+public String getMessage() { Document document; String message;
+ try { document = m_config.getDocument();
+ }
+ catch(Throwable t) {
+ t.printStackTrace(); message = t.getMessage(); }
+ return (message);}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test296/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test296/A_out.js
new file mode 100644
index 0000000..e66eec5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test296/A_out.js
@@ -0,0 +1,15 @@
+public String getMessage()
+{
+ Document document;
+ String message;
+ try
+ {
+ document = m_config.getDocument();
+ }
+ catch (Throwable t)
+ {
+ t.printStackTrace();
+ message = t.getMessage();
+ }
+ return (message);
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test297/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test297/A_in.js
new file mode 100644
index 0000000..7e891c5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test297/A_in.js
@@ -0,0 +1,14 @@
+{
+
+ if (size < currentSize) {
+ try {
+ size = inStream.available();
+ } catch (IOException e) {
+ }
+ } else if (size == currentSize) {
+ ++size;
+ } else {
+ --size;
+ }
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test297/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test297/A_out.js
new file mode 100644
index 0000000..00e7f4b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test297/A_out.js
@@ -0,0 +1,20 @@
+{
+ if (size < currentSize)
+ {
+ try
+ {
+ size = inStream.available();
+ }
+ catch (IOException e)
+ {
+ }
+ }
+ else if (size == currentSize)
+ {
+ ++size;
+ }
+ else
+ {
+ --size;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test298/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test298/A_in.js
new file mode 100644
index 0000000..64f1720
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test298/A_in.js
@@ -0,0 +1,4 @@
+public class Test {
+public void mth1(String s1, String s2, String s3, String s4) throws Exception {
+}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test298/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test298/A_out.js
new file mode 100644
index 0000000..b13c9b0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test298/A_out.js
@@ -0,0 +1,5 @@
+public class Test {
+ public void mth1(String s1, String s2, String s3, String s4)
+ throws Exception {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test299/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test299/A_in.js
new file mode 100644
index 0000000..2027178
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test299/A_in.js
@@ -0,0 +1,4 @@
+public class Test {
+public void m(String s, String s2, String s3, String s4) throws Exception {
+}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test299/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test299/A_out.js
new file mode 100644
index 0000000..33e5fe2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test299/A_out.js
@@ -0,0 +1,6 @@
+public class Test
+{
+ public void m(String s, String s2, String s3, String s4) throws Exception
+ {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test300/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test300/A_in.js
new file mode 100644
index 0000000..6a62ade
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test300/A_in.js
@@ -0,0 +1 @@
+ee() \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test300/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test300/A_out.js
new file mode 100644
index 0000000..c9db0f4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test300/A_out.js
@@ -0,0 +1 @@
+ ee() \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test301/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test301/A_in.js
new file mode 100644
index 0000000..4896a7d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test301/A_in.js
@@ -0,0 +1 @@
+int i = (int) 0.0; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test301/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test301/A_out.js
new file mode 100644
index 0000000..eb4d7dd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test301/A_out.js
@@ -0,0 +1 @@
+int i = (int)0.0; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test302/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test302/A_in.js
new file mode 100644
index 0000000..edc9b4e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test302/A_in.js
@@ -0,0 +1,14 @@
+switch (VARIABLE)
+{
+ case CASE_1 :
+ _foo= false;
+ doSomething1();
+ doSomething2();
+ doSomething3();
+ break;
+
+ case CASE_2 :
+ _foo= true;
+ doSomething4();
+ break;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test302/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test302/A_out.js
new file mode 100644
index 0000000..a18f9c1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test302/A_out.js
@@ -0,0 +1,12 @@
+switch (VARIABLE) {
+ case CASE_1 :
+ _foo = false;
+ doSomething1();
+ doSomething2();
+ doSomething3();
+ break;
+ case CASE_2 :
+ _foo = true;
+ doSomething4();
+ break;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test303/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test303/A_in.js
new file mode 100644
index 0000000..edc9b4e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test303/A_in.js
@@ -0,0 +1,14 @@
+switch (VARIABLE)
+{
+ case CASE_1 :
+ _foo= false;
+ doSomething1();
+ doSomething2();
+ doSomething3();
+ break;
+
+ case CASE_2 :
+ _foo= true;
+ doSomething4();
+ break;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test303/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test303/A_out.js
new file mode 100644
index 0000000..a18f9c1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test303/A_out.js
@@ -0,0 +1,12 @@
+switch (VARIABLE) {
+ case CASE_1 :
+ _foo = false;
+ doSomething1();
+ doSomething2();
+ doSomething3();
+ break;
+ case CASE_2 :
+ _foo = true;
+ doSomething4();
+ break;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test304/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test304/A_in.js
new file mode 100644
index 0000000..edc9b4e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test304/A_in.js
@@ -0,0 +1,14 @@
+switch (VARIABLE)
+{
+ case CASE_1 :
+ _foo= false;
+ doSomething1();
+ doSomething2();
+ doSomething3();
+ break;
+
+ case CASE_2 :
+ _foo= true;
+ doSomething4();
+ break;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test304/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test304/A_out.js
new file mode 100644
index 0000000..c93f436
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test304/A_out.js
@@ -0,0 +1,12 @@
+switch (VARIABLE) {
+ case CASE_1 :
+ _foo = false;
+ doSomething1();
+ doSomething2();
+ doSomething3();
+ break;
+ case CASE_2 :
+ _foo = true;
+ doSomething4();
+ break;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test305/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test305/A_in.js
new file mode 100644
index 0000000..4004116
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test305/A_in.js
@@ -0,0 +1,15 @@
+switch (VARIABLE)
+{
+ case CASE_1 :
+ case CASE_3 :
+ _foo= false;
+ doSomething1();
+ doSomething2();
+ doSomething3();
+ break;
+
+ case CASE_2 :
+ _foo= true;
+ doSomething4();
+ break;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test305/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test305/A_out.js
new file mode 100644
index 0000000..a539b2d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test305/A_out.js
@@ -0,0 +1,13 @@
+switch (VARIABLE) {
+ case CASE_1 :
+ case CASE_3 :
+ _foo = false;
+ doSomething1();
+ doSomething2();
+ doSomething3();
+ break;
+ case CASE_2 :
+ _foo = true;
+ doSomething4();
+ break;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test306/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test306/A_in.js
new file mode 100644
index 0000000..ece4a2b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test306/A_in.js
@@ -0,0 +1,13 @@
+switch (VARIABLE)
+{
+ case CASE_1 :
+ case CASE_3 :
+ _foo= false;
+ doSomething1();
+ doSomething2();
+ doSomething3();
+ default :
+ _foo= true;
+ doSomething4();
+ break;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test306/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test306/A_out.js
new file mode 100644
index 0000000..a647f69
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test306/A_out.js
@@ -0,0 +1,12 @@
+switch (VARIABLE) {
+ case CASE_1 :
+ case CASE_3 :
+ _foo = false;
+ doSomething1();
+ doSomething2();
+ doSomething3();
+ default :
+ _foo = true;
+ doSomething4();
+ break;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test307/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test307/A_in.js
new file mode 100644
index 0000000..0ba53e9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test307/A_in.js
@@ -0,0 +1,5 @@
+switch (x) {
+ case 1 :
+ return;
+ default :
+ } \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test307/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test307/A_out.js
new file mode 100644
index 0000000..e7e3812
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test307/A_out.js
@@ -0,0 +1,5 @@
+switch (x) {
+ case 1 :
+ return;
+ default :
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test308/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test308/A_in.js
new file mode 100644
index 0000000..edc9b4e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test308/A_in.js
@@ -0,0 +1,14 @@
+switch (VARIABLE)
+{
+ case CASE_1 :
+ _foo= false;
+ doSomething1();
+ doSomething2();
+ doSomething3();
+ break;
+
+ case CASE_2 :
+ _foo= true;
+ doSomething4();
+ break;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test308/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test308/A_out.js
new file mode 100644
index 0000000..78c196e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test308/A_out.js
@@ -0,0 +1,12 @@
+switch (VARIABLE) {
+case CASE_1 :
+_foo = false;
+doSomething1();
+doSomething2();
+doSomething3();
+break;
+case CASE_2 :
+_foo = true;
+doSomething4();
+break;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test309/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test309/A_in.js
new file mode 100644
index 0000000..283740f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test309/A_in.js
@@ -0,0 +1,15 @@
+switch (VARIABLE)
+{
+ case CASE_1 :
+ _foo= false;
+ doSomething1();
+ doSomething2();
+ doSomething3();
+ break;
+
+ case CASE_2 :
+ _foo= true;
+ doSomething4();
+ break;
+ default:
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test309/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test309/A_out.js
new file mode 100644
index 0000000..b059d75
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test309/A_out.js
@@ -0,0 +1,13 @@
+switch (VARIABLE) {
+case CASE_1 :
+_foo = false;
+doSomething1();
+doSomething2();
+doSomething3();
+ break;
+case CASE_2 :
+_foo = true;
+doSomething4();
+ break;
+default :
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test310/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test310/A_in.js
new file mode 100644
index 0000000..7e7bdb6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test310/A_in.js
@@ -0,0 +1,9 @@
+public class A {
+
+ public void actionPerformed(ActionEvent e) {
+ this.getParentTiledContainer()
+ .dockPaneAt(Integer.parseInt(e.getActionCommand()), pane,
+RTabbedDocumentPane.this,
+ 0.5) ;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test310/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test310/A_out.js
new file mode 100644
index 0000000..05880d1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test310/A_out.js
@@ -0,0 +1,7 @@
+public class A {
+ public void actionPerformed(ActionEvent e) {
+ this.getParentTiledContainer().dockPaneAt(
+ Integer.parseInt(e.getActionCommand()), pane,
+ RTabbedDocumentPane.this, 0.5);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test311/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test311/A_in.js
new file mode 100644
index 0000000..5f74435
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test311/A_in.js
@@ -0,0 +1,5 @@
+public class A {
+ public void actionPerformed(ActionEvent e) {
+ getParentTiledContainertoooooooooooooooooooooolonnnnnnnnnnnnnnnnnnnnng().dockPaneAt();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test311/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test311/A_out.js
new file mode 100644
index 0000000..dc24f90
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test311/A_out.js
@@ -0,0 +1,6 @@
+public class A {
+ public void actionPerformed(ActionEvent e) {
+ getParentTiledContainertoooooooooooooooooooooolonnnnnnnnnnnnnnnnnnnnng()
+ .dockPaneAt();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test312/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test312/A_in.js
new file mode 100644
index 0000000..f6028d0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test312/A_in.js
@@ -0,0 +1,9 @@
+public class A {
+
+ public void actionPerformed(ActionEvent e) {
+ getParentTiledContainer()
+ .dockPaneAt(Integer.parseInt(e.getActionCommand()), pane,
+RTabbedDocumentPane.this,
+ 0.5) ;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test312/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test312/A_out.js
new file mode 100644
index 0000000..dbe786c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test312/A_out.js
@@ -0,0 +1,7 @@
+public class A {
+ public void actionPerformed(ActionEvent e) {
+ getParentTiledContainer().dockPaneAt(
+ Integer.parseInt(e.getActionCommand()), pane,
+ RTabbedDocumentPane.this, 0.5);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test313/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test313/A_in.js
new file mode 100644
index 0000000..93b4459
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test313/A_in.js
@@ -0,0 +1,6 @@
+public void foo() {
+}
+static char[] charArray_a = new char[] {'a'};
+public void bar(){}
+char[] charArray_b = new char[] {'b'}, charArray_c = new char[] {'c'}, charArray_d = new char[] {'d'};
+public void bar2(){} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test313/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test313/A_out.js
new file mode 100644
index 0000000..c4d61ac
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test313/A_out.js
@@ -0,0 +1,9 @@
+public void foo() {
+}
+static char[] charArray_a = new char[]{'a'};
+public void bar() {
+}
+char[] charArray_b = new char[]{'b'}, charArray_c = new char[]{'c'},
+ charArray_d = new char[]{'d'};
+public void bar2() {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test314/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test314/A_in.js
new file mode 100644
index 0000000..89f76d9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test314/A_in.js
@@ -0,0 +1 @@
+if (token != TokenNameLBRACE && !isComment(token) /* to avoid */ && token != TokenNameDOT && goo && gmfgkfmgfdmggggggggggggggggggggggggggggggggggg) {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test314/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test314/A_out.js
new file mode 100644
index 0000000..da8a743
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test314/A_out.js
@@ -0,0 +1,4 @@
+if (token != TokenNameLBRACE && !isComment(token) /* to avoid */
+ && token != TokenNameDOT && goo
+ && gmfgkfmgfdmggggggggggggggggggggggggggggggggggg) {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test319/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test319/A_in.js
new file mode 100644
index 0000000..798ff0b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test319/A_in.js
@@ -0,0 +1,9 @@
+public int foo(int size, int max) {
+
+ try {
+ size=(long)stream.available();
+ } catch (IOException e) {
+ // empty block
+ }
+ return size;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test319/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test319/A_out.js
new file mode 100644
index 0000000..c1ec0a0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test319/A_out.js
@@ -0,0 +1,8 @@
+public int foo(int size, int max) {
+ try {
+ size = (long) stream.available();
+ } catch (IOException e) {
+ // empty block
+ }
+ return size;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test320/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test320/A_in.js
new file mode 100644
index 0000000..f28a5d8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test320/A_in.js
@@ -0,0 +1,9 @@
+public int foo(int size, int max) {
+
+ try {
+ size=(long)stream.available();
+ } catch (IOException e) {
+ /* empty block */
+ }
+ return size;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test320/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test320/A_out.js
new file mode 100644
index 0000000..12d045b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test320/A_out.js
@@ -0,0 +1,8 @@
+public int foo(int size, int max) {
+ try {
+ size = (long) stream.available();
+ } catch (IOException e) {
+ /* empty block */
+ }
+ return size;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test321/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test321/A_in.js
new file mode 100644
index 0000000..cc5b278
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test321/A_in.js
@@ -0,0 +1,8 @@
+public int foo(int size, int max) {
+
+ try {
+ size=(long)stream.available();
+ } catch (IOException e) {
+ /* empty block */}
+ return size;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test321/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test321/A_out.js
new file mode 100644
index 0000000..471cc57
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test321/A_out.js
@@ -0,0 +1,7 @@
+public int foo(int size, int max) {
+ try {
+ size = (long) stream.available();
+ } catch (IOException e) {
+ /* empty block */}
+ return size;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test322/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test322/A_in.js
new file mode 100644
index 0000000..84a8f51
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test322/A_in.js
@@ -0,0 +1,9 @@
+public int foo(int size, int max) {
+
+ try {
+ size=(long)stream.available();
+ } catch (IOException e) {// toto
+ /* empty block */
+ }
+ return size;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test322/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test322/A_out.js
new file mode 100644
index 0000000..855c985
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test322/A_out.js
@@ -0,0 +1,8 @@
+public int foo(int size, int max) {
+ try {
+ size = (long) stream.available();
+ } catch (IOException e) {// toto
+ /* empty block */
+ }
+ return size;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test323/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test323/A_in.js
new file mode 100644
index 0000000..55ca969
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test323/A_in.js
@@ -0,0 +1,7 @@
+public int foo(int size, int max) {
+
+ try {
+ size=(long)stream.available();
+ } catch (IOException e) {/* empty block */}
+ return size;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test323/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test323/A_out.js
new file mode 100644
index 0000000..127865f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test323/A_out.js
@@ -0,0 +1,6 @@
+public int foo(int size, int max) {
+ try {
+ size = (long) stream.available();
+ } catch (IOException e) {/* empty block */}
+ return size;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test324/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test324/A_in.js
new file mode 100644
index 0000000..c34e6ab
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test324/A_in.js
@@ -0,0 +1,25 @@
+package test;
+
+import java.util.Hashtable;
+
+public class Test {
+
+ public Test() {
+ Hashtable fields;
+
+ // TODO some todo text
+ // direct field names
+
+ // ==== Dictionaries
+ //CountryDictInfo
+ fields = new Hashtable();
+
+ fields.put("name", "Name");
+ fields.put("numericCode", "NumericCode");
+
+ getSqls().put("finmon.domain.dictionary", new SomeFieldSQLDescriptor(
+ this, "SELECT * FROM CountryDict WHERE ",
+ " ORDER BY Name", fields)) ;
+
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test324/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test324/A_out.js
new file mode 100644
index 0000000..f40e2bf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test324/A_out.js
@@ -0,0 +1,19 @@
+package test;
+import java.util.Hashtable;
+public class Test {
+ public Test() {
+ Hashtable fields;
+ // TODO some todo text
+ // direct field names
+ // ==== Dictionaries
+ //CountryDictInfo
+ fields = new Hashtable();
+ fields.put("name", "Name");
+ fields.put("numericCode", "NumericCode");
+ getSqls().put(
+ "finmon.domain.dictionary",
+ new SomeFieldSQLDescriptor(this,
+ "SELECT * FROM CountryDict WHERE ", " ORDER BY Name",
+ fields));
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test325/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test325/A_in.js
new file mode 100644
index 0000000..3c2a038
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test325/A_in.js
@@ -0,0 +1,25 @@
+package test;
+
+import java.util.Hashtable;
+
+public class Test {
+
+ public boolean combineScriptsExist() {
+ File solvematchshift =
+ new File(System.getProperty("user.dir"), "solvematchshift.com");
+ File solvematchmod =
+ new File(System.getProperty("user.dir"), "solvematchmod.com");
+ File matchvol1 =
+ new File(System.getProperty("user.dir"), "matchvol1.com");
+ File matchorwarp =
+ new File(System.getProperty("user.dir"), "matchorwarp.com");
+ File patchcorr =
+ new File(System.getProperty("user.dir"), "patchcorr.com");
+ File volcombine =
+ new File(System.getProperty("user.dir"), "volcombine.com");
+ File warpvol =
+ new File(System.getProperty("user.dir"), "warpvol.com");
+ return solvematchshift.exists() && solvematchmod.exists() && atchvol1.exists()
+&& matchorwarp.exists() && patchcorr.exists() && volcombine.exists() &&
+warpvol.exists();
+ }} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test325/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test325/A_out.js
new file mode 100644
index 0000000..72a7231
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test325/A_out.js
@@ -0,0 +1,23 @@
+package test;
+import java.util.Hashtable;
+public class Test {
+ public boolean combineScriptsExist() {
+ File solvematchshift = new File(System.getProperty("user.dir"),
+ "solvematchshift.com");
+ File solvematchmod = new File(System.getProperty("user.dir"),
+ "solvematchmod.com");
+ File matchvol1 = new File(System.getProperty("user.dir"),
+ "matchvol1.com");
+ File matchorwarp = new File(System.getProperty("user.dir"),
+ "matchorwarp.com");
+ File patchcorr = new File(System.getProperty("user.dir"),
+ "patchcorr.com");
+ File volcombine = new File(System.getProperty("user.dir"),
+ "volcombine.com");
+ File warpvol = new File(System.getProperty("user.dir"), "warpvol.com");
+ return solvematchshift.exists() && solvematchmod.exists()
+ && atchvol1.exists() && matchorwarp.exists()
+ && patchcorr.exists() && volcombine.exists()
+ && warpvol.exists();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test326/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test326/A_in.js
new file mode 100644
index 0000000..740cee7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test326/A_in.js
@@ -0,0 +1,18 @@
+public class A {
+ /**
+ * @hibernate.set
+ * lazy="true"
+ * table="GUJArticleCategorization"
+ * cascade="save-update"
+ * @hibernate.collection-key
+ * column="articleId"
+ * @hibernate.collection-many-to-many
+ * class="br.com.guj.model.Category"
+ * column="categoryId"
+ *
+ * @return categorias deste artigo
+ */
+ public Category getCategory() {
+ return this.category;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test326/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test326/A_out.js
new file mode 100644
index 0000000..740cee7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test326/A_out.js
@@ -0,0 +1,18 @@
+public class A {
+ /**
+ * @hibernate.set
+ * lazy="true"
+ * table="GUJArticleCategorization"
+ * cascade="save-update"
+ * @hibernate.collection-key
+ * column="articleId"
+ * @hibernate.collection-many-to-many
+ * class="br.com.guj.model.Category"
+ * column="categoryId"
+ *
+ * @return categorias deste artigo
+ */
+ public Category getCategory() {
+ return this.category;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test327/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test327/A_in.js
new file mode 100644
index 0000000..959f801
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test327/A_in.js
@@ -0,0 +1,10 @@
+public class A {
+void foo() {
+boolean b = true;
+if (b)
+ for (int i = 0; i < 10; i++) {
+ System.out.println(i);
+ }
+else
+ System.out.println("nothing to do");}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test327/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test327/A_out.js
new file mode 100644
index 0000000..5e0ee63
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test327/A_out.js
@@ -0,0 +1,11 @@
+public class A {
+ void foo() {
+ boolean b = true;
+ if (b)
+ for (int i = 0; i < 10; i++) {
+ System.out.println(i);
+ }
+ else
+ System.out.println("nothing to do");
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test328/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test328/A_in.js
new file mode 100644
index 0000000..774510f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test328/A_in.js
@@ -0,0 +1,12 @@
+public class AlwaysMoreIndentation {
+ int x = 0;/**
+ * Returns the x.
+ * @return int
+ */
+ public int getX() {return x;
+ }/**
+ * Sets the x.
+ * @param x The x to set
+ */
+ public void setX(int x) {this.x = x;}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test328/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test328/A_out.js
new file mode 100644
index 0000000..92654a8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test328/A_out.js
@@ -0,0 +1,17 @@
+public class AlwaysMoreIndentation {
+ int x = 0;
+ /**
+ * Returns the x.
+ * @return int
+ */
+ public int getX() {
+ return x;
+ }
+ /**
+ * Sets the x.
+ * @param x The x to set
+ */
+ public void setX(int x) {
+ this.x = x;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test329/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test329/A_in.js
new file mode 100644
index 0000000..c849d63
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test329/A_in.js
@@ -0,0 +1,7 @@
+int bogus(int a) {
+ if (a > 1)
+ try {a = 1;} finally {
+ } else
+ a = 0;
+ return a;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test329/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test329/A_out.js
new file mode 100644
index 0000000..346b522
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test329/A_out.js
@@ -0,0 +1,10 @@
+int bogus(int a) {
+ if (a > 1)
+ try {
+ a = 1;
+ } finally {
+ }
+ else
+ a = 0;
+ return a;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test330/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test330/A_in.js
new file mode 100644
index 0000000..014222b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test330/A_in.js
@@ -0,0 +1,5 @@
+public class X {
+ public X() {
+ Object[] objects = new Object[] {};
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test330/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test330/A_out.js
new file mode 100644
index 0000000..a618fec
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test330/A_out.js
@@ -0,0 +1,5 @@
+public class X {
+ public X() {
+ Object[] objects = new Object[]{};
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test331/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test331/A_in.js
new file mode 100644
index 0000000..468b28c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test331/A_in.js
@@ -0,0 +1,3 @@
+int indx = 7;
+ for (/*indx is already initialized*/; indx < 20; ++indx) {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test331/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test331/A_out.js
new file mode 100644
index 0000000..40a6675
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test331/A_out.js
@@ -0,0 +1,3 @@
+int indx = 7;
+for (/*indx is already initialized*/; indx < 20; ++indx) {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test332/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test332/A_in.js
new file mode 100644
index 0000000..e7f365f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test332/A_in.js
@@ -0,0 +1,2 @@
+int indx = 7;
+ for (; indx < 20; ++indx) {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test332/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test332/A_out.js
new file mode 100644
index 0000000..acdf3f6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test332/A_out.js
@@ -0,0 +1,3 @@
+int indx = 7;
+for (; indx < 20; ++indx) {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test333/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test333/A_in.js
new file mode 100644
index 0000000..41c5ad4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test333/A_in.js
@@ -0,0 +1,53 @@
+public class X {void bar() {for (final int i; 0 < (i = 1); i = i + 1) {
+ }
+ }
+
+}
+
+//public class X {
+// public static void main(String[] args) {
+// final int i;
+// for ( ; ; i = 1)
+// break;
+// i = 1;
+// }
+//}
+
+//public class X {
+// final int blank;
+// {
+// while ((null == null || true)) {
+// blank = 1;
+// break;
+// }
+// }
+// X(){
+// }
+// public static void main(String[] argv){
+// System.out.println("SUCCESS");
+// }
+//}
+
+// should fail
+//class X {
+//
+// public static void main(String[] args) {
+// final boolean b;
+// do
+// break;
+// while ((b = true) && false);
+// b = true;
+// }
+//}
+
+// ?
+//class X {
+//
+// public static void main(String[] args) {
+// final boolean b;
+// do
+// break;
+// while ((b = true) && false);
+// b = true;
+// }
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test333/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test333/A_out.js
new file mode 100644
index 0000000..686612b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test333/A_out.js
@@ -0,0 +1,55 @@
+public class X {
+ void bar() {
+ for (final int i; 0 < (i = 1); i = i + 1) {
+ }
+ }
+
+}
+
+//public class X {
+// public static void main(String[] args) {
+// final int i;
+// for ( ; ; i = 1)
+// break;
+// i = 1;
+// }
+//}
+
+//public class X {
+// final int blank;
+// {
+// while ((null == null || true)) {
+// blank = 1;
+// break;
+// }
+// }
+// X(){
+// }
+// public static void main(String[] argv){
+// System.out.println("SUCCESS");
+// }
+//}
+
+// should fail
+//class X {
+//
+// public static void main(String[] args) {
+// final boolean b;
+// do
+// break;
+// while ((b = true) && false);
+// b = true;
+// }
+//}
+
+// ?
+//class X {
+//
+// public static void main(String[] args) {
+// final boolean b;
+// do
+// break;
+// while ((b = true) && false);
+// b = true;
+// }
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test334/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test334/A_in.js
new file mode 100644
index 0000000..42d4012
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test334/A_in.js
@@ -0,0 +1,3 @@
+public class A {
+ int i;; // empty class body declaration
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test334/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test334/A_out.js
new file mode 100644
index 0000000..42d4012
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test334/A_out.js
@@ -0,0 +1,3 @@
+public class A {
+ int i;; // empty class body declaration
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test335/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test335/A_in.js
new file mode 100644
index 0000000..cd2c107
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test335/A_in.js
@@ -0,0 +1,18 @@
+public class Test {
+
+ protected void doSomeStuff() {
+ /*
+ * Comment
+ */
+ doSomething(Expression.class, "Sting value for something",
+ new Object() {
+ public Something buildSomething() {
+ // Comment
+ Expression s = getBuilder().get("name")
+ .equal(getArgument("name", String.class, 0));
+ return s;
+ }
+
+ });
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test335/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test335/A_out.js
new file mode 100644
index 0000000..5296b07
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test335/A_out.js
@@ -0,0 +1,16 @@
+public class Test {
+ protected void doSomeStuff() {
+ /*
+ * Comment
+ */
+ doSomething(Expression.class, "Sting value for something",
+ new Object() {
+ public Something buildSomething() {
+ // Comment
+ Expression s = getBuilder().get("name").equal(
+ getArgument("name", String.class, 0));
+ return s;
+ }
+ });
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test336/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test336/A_in.js
new file mode 100644
index 0000000..e88afd5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test336/A_in.js
@@ -0,0 +1,31 @@
+ Image tmp = new Image(display, rect.width, rect.height);
+ try
+ {
+ ImageData tmpData = tmp.getImageData();
+
+ for (int y = 0; y < rect.height; y++)
+ {
+ for (int x = 0; x < rect.width; x++)
+ {
+ int val;
+ val = (x<<TestImage.WIDTH_BITS);
+ val |= y;
+
+// tmpData.setPixels(x, y, val);
+ tmpData.setPixels(x, y, 0);
+ }
+ }
+ GC dc = new GC(testImage);
+ try
+ {
+ dc.drawImage(tmp, 0 ,0);
+ }
+ finally
+ {
+ dc.dispose();
+ }
+ }
+ finally
+ {
+ tmp.dispose();
+ } \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test336/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test336/A_out.js
new file mode 100644
index 0000000..f05f523
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test336/A_out.js
@@ -0,0 +1,30 @@
+ Image tmp = new Image(display, rect.width,
+ rect.height);
+ try
+ {
+ ImageData tmpData = tmp.getImageData();
+ for (int y = 0; y < rect.height; y++)
+ {
+ for (int x = 0; x < rect.width; x++)
+ {
+ int val;
+ val = (x << TestImage.WIDTH_BITS);
+ val |= y;
+ // tmpData.setPixels(x, y, val);
+ tmpData.setPixels(x, y, 0);
+ }
+ }
+ GC dc = new GC(testImage);
+ try
+ {
+ dc.drawImage(tmp, 0, 0);
+ }
+ finally
+ {
+ dc.dispose();
+ }
+ }
+ finally
+ {
+ tmp.dispose();
+ } \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test337/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test337/A_in.js
new file mode 100644
index 0000000..960cfcd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test337/A_in.js
@@ -0,0 +1,339 @@
+package org.eclipse.update.configurator;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.osgi.service.environment.DebugOptions;
+import org.eclipse.osgi.service.environment.EnvironmentInfo;
+import org.osgi.framework.*;
+import org.osgi.service.packageadmin.PackageAdmin;
+import org.osgi.service.startlevel.StartLevel;
+import org.osgi.util.tracker.ServiceTracker;
+
+public class ConfigurationActivator implements BundleActivator {
+ private final static String DEFAULT_CONVERTER = "org.eclipse.update.configurator.migration.PluginConverter"; //$NON-NLS-1$
+
+ public static String PI_CONFIGURATOR = "org.eclipse.update.configurator";
+ // debug options
+ public static String OPTION_DEBUG = PI_CONFIGURATOR + "/debug";
+ public static String OPTION_DEBUG_CONVERTER = PI_CONFIGURATOR + "/converter/debug";
+ // debug values
+ public static boolean DEBUG = false;
+ public static boolean DEBUG_CONVERTER = false;
+
+ private static BundleContext context;
+ private ServiceTracker platformTracker;
+ private ServiceRegistration configurationFactorySR;
+ private String[] allArgs;
+
+ // location used to put the generated manfests
+ private String cacheLocation = (String) System.getProperties().get("osgi.manifest.cache"); //PASCAL Need to set this value somewhere (probably from boot)
+ private IPluginConverter converter;
+ private Set ignore;
+ private BundleListener reconcilerListener;
+
+ public void start(BundleContext ctx) throws Exception {
+ context = ctx;loadOptions();if (DEBUG)
+ System.out.println("Starting update configurator...");
+ computeIgnoredBundles();
+ loadConverter();
+ obtainArgs();
+ installBundles();
+ }
+ private void computeIgnoredBundles() {
+ String ignoreList = System.getProperty("eclipse.ignore","org.eclipse.osgi,org.eclipse.core.boot,org.eclipse.core.runtime.adaptor");
+ ignore = new HashSet();
+ StringTokenizer tokenizer = new StringTokenizer(ignoreList,",");
+ while(tokenizer.hasMoreTokens())
+ ignore.add(tokenizer.nextToken().trim());
+ }
+ private boolean shouldIgnore(String bundleName) {
+ if (ignore == null)
+ return false;
+ StringTokenizer tokenizer = new StringTokenizer(bundleName,"._");
+ String partialName = "";
+ while(tokenizer.hasMoreTokens()) {
+ partialName += tokenizer.nextToken();
+ if (ignore.contains(partialName))
+ return true;
+ partialName += ".";
+ }
+ return false;
+ }
+ private void loadConverter() {
+ // TODO look at making this an extension
+ String converterClassName = System.getProperty("eclipse.manifestconverter", DEFAULT_CONVERTER);
+ if (converterClassName == null)
+ return;
+ Class converterClass;
+ try {
+ converterClass = Class.forName(converterClassName);
+ } catch (ClassNotFoundException e) {
+ return;
+ }
+ try {
+ converter = (IPluginConverter) converterClass.newInstance();
+ } catch (InstantiationException e1) {
+ return;
+ } catch (IllegalAccessException e1) {
+ return;
+ } catch (ClassCastException cce) {
+ return;
+ }
+ }
+ private void obtainArgs() {
+ // all this is only to get the application args
+ EnvironmentInfo envInfo = null;
+ ServiceReference envInfoSR = context.getServiceReference(EnvironmentInfo.class.getName());
+ if (envInfoSR != null)
+ envInfo = (EnvironmentInfo) context.getService(envInfoSR);
+ if (envInfo == null)
+ throw new IllegalStateException();
+ this.allArgs = envInfo.getAllArgs();
+ // we have what we want - release the service
+ context.ungetService(envInfoSR);
+ }
+
+ public void stop(BundleContext ctx) throws Exception {
+ releasePlatform();
+ configurationFactorySR.unregister();
+ }
+
+ private void releasePlatform() {
+ if (platformTracker == null)
+ return;
+ platformTracker.close();
+ platformTracker = null;
+ }
+ private IPlatform acquirePlatform() {
+ if (platformTracker == null) {
+ platformTracker = new ServiceTracker(context, IPlatform.class.getName(), null);
+ platformTracker.open();
+ }
+ IPlatform result = (IPlatform) platformTracker.getService();
+ while (result == null) {
+ try {
+ platformTracker.waitForService(1000);
+ result = (IPlatform) platformTracker.getService();
+ } catch (InterruptedException ie) {
+ }
+ }
+ return result;
+ }
+
+ private void installBundles() {
+ IPlatform platform = acquirePlatform();
+
+ String metaPath = platform.getLocation().append(".metadata").toOSString();
+ URL installURL = platform.getInstallURL();
+ ServiceReference reference = context.getServiceReference(StartLevel.class.getName());
+ StartLevel start = null;
+ if (reference != null)
+ start = (StartLevel) context.getService(reference);
+ try {
+ configurationFactorySR = context.registerService(IPlatformConfigurationFactory.class.getName(), new PlatformConfigurationFactory(), null);
+ PlatformConfiguration config = getPlatformConfiguration(allArgs, metaPath, installURL);
+ URL[] plugins = config.getPluginPath();
+ ArrayList installed = new ArrayList(plugins.length);
+ for (int i = 0; i < plugins.length; i++) {
+ try {
+ String location = plugins[i].toExternalForm();
+ checkOrGenerateManifest(location);
+ location = "reference:" + location.substring(0, location.lastIndexOf('/'));
+ if (!isInstalled(location)) {
+ try {
+ Bundle target = context.installBundle(location);
+ installed.add(target);
+ if (start != null)
+ start.setBundleStartLevel(target, 4);
+ } catch (Exception e) {
+ System.err.println("Ignoring bundle at: " + location);
+ System.err.println(e.getMessage());
+ }
+ }
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ context.ungetService(reference);
+ refreshPackages((Bundle[]) installed.toArray(new Bundle[installed.size()]));
+ if (System.getProperty("eclipse.application") == null || System.getProperty("eclipse.application").equals(PlatformConfiguration.RECONCILER_APP))
+ System.setProperty("eclipse.application", config.getApplicationIdentifier());
+// if (config.getApplicationIdentifier().equals(PlatformConfiguration.RECONCILER_APP) ) {
+// reconcilerListener = reconcilerListener();
+// context.addBundleListener(reconcilerListener);
+// }
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } finally {
+ releasePlatform();
+ }
+ }
+
+ private BundleListener reconcilerListener() {
+ return new BundleListener() {
+ public void bundleChanged(BundleEvent event) {
+ String buid = event.getBundle().getUniqueId();
+ if (event.getType() == BundleEvent.STOPPED && buid!=null && buid.equals("org.eclipse.update.core"))
+ runPostReconciler();
+ }
+ };
+ }
+
+ private void runPostReconciler() {
+ Runnable postReconciler = new Runnable() {
+ public void run() {
+ try {
+ Bundle apprunner = context.getBundle("org.eclipse.core.applicationrunner");
+ apprunner.stop();
+ context.removeBundleListener(reconcilerListener);
+ try {
+ PlatformConfiguration.shutdown();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ installBundles();
+ apprunner.start();
+ } catch (BundleException be) {
+ be.printStackTrace();
+ }
+ }
+ };
+ new Thread(postReconciler, "Post reconciler").start();
+ }
+ /**
+ * @param location
+ */
+ private void checkOrGenerateManifest(String pluginManifestLocationURL) {
+ if (converter == null)
+ return;
+ String pluginManifestLocation = null;
+ try {
+ pluginManifestLocation = new URL(pluginManifestLocationURL).getPath();
+ } catch (MalformedURLException e) {
+ return;
+ }
+ File pluginDir = new File(pluginManifestLocation).getParentFile();
+ if (shouldIgnore(pluginDir.getName()))
+ return;
+ File manifest = new File(pluginDir, "META-INF/MANIFEST.MF");
+ if (manifest.exists())
+ return;
+ // bail if the install location is not writable and we don't know where else to write to
+ if (cacheLocation == null)
+ return;
+ File generationLocation = new File(cacheLocation, computeFileName(pluginDir.getPath()) + ".MF");
+ if (generationLocation.exists())
+ return;
+ if (!converter.convertManifest(pluginDir, generationLocation))
+ System.out.println(pluginDir + " manifest generation failed");
+ }
+ /*
+ * Derives a file name corresponding to a path:
+ * c:\autoexec.bat -> c__autoexec.bat
+ */
+ private String computeFileName(String filePath) {
+ StringBuffer newName = new StringBuffer(filePath);
+ for (int i = 0; i < filePath.length(); i++) {
+ char c = newName.charAt(i);
+ if (c == ':' || c == '/' || c == '\\')
+ newName.setCharAt(i,'_');
+ }
+ return newName.toString();
+ }
+ /**
+ * This is a major hack to try to get the reconciler application running. However we should find a way to not run it.
+ * @param args
+ * @param metaPath
+ * @return
+ */
+ private PlatformConfiguration getPlatformConfiguration(String[] args, String metaPath, URL installURL) {
+ try {
+ PlatformConfiguration.startup(args, null, null, metaPath, installURL);
+ } catch (Exception e) {
+ if (platformTracker != null) {
+ String message = e.getMessage();
+ if (message == null)
+ message = "";
+ IStatus status = new Status(IStatus.ERROR,IPlatform.PI_RUNTIME,IStatus.OK,message,e);
+ ((IPlatform)platformTracker.getService()).getLog(context.getBundle()).log(status);
+ }
+ }
+ return PlatformConfiguration.getCurrent();
+
+ }
+
+ /**
+ * Do PackageAdmin.refreshPackages() in a synchronous way. After installing
+ * all the requested bundles we need to do a refresh and want to ensure that
+ * everything is done before returning.
+ * @param bundles
+ */
+ private void refreshPackages(Bundle[] bundles) {
+ if (bundles.length == 0)
+ return;
+ ServiceReference packageAdminRef = context.getServiceReference(PackageAdmin.class.getName());
+ PackageAdmin packageAdmin = null;
+ if (packageAdminRef != null) {
+ packageAdmin = (PackageAdmin) context.getService(packageAdminRef);
+ if (packageAdmin == null)
+ return;
+ }
+ // TODO this is such a hack it is silly. There are still cases for race conditions etc
+ // but this should allow for some progress...
+ final Object semaphore = new Object();
+ FrameworkListener listener = new FrameworkListener() {
+ public void frameworkEvent(FrameworkEvent event) {
+ if (event.getType() == FrameworkEvent.PACKAGES_REFRESHED)
+ synchronized (semaphore) {
+ semaphore.notifyAll();
+ }
+ }
+ };
+ context.addFrameworkListener(listener);
+ packageAdmin.refreshPackages(bundles);
+ synchronized (semaphore) {
+ try {
+ semaphore.wait();
+ } catch (InterruptedException e) {
+ }
+ }
+ context.removeFrameworkListener(listener);
+ context.ungetService(packageAdminRef);
+ }
+
+ private boolean isInstalled(String location) {
+ Bundle[] installed = context.getBundles();
+ for (int i = 0; i < installed.length; i++) {
+ Bundle bundle = installed[i];
+ if (location.equalsIgnoreCase(bundle.getLocation()))
+ return true;
+ }
+ return false;
+ }
+
+ private void loadOptions() {
+ // all this is only to get the application args
+ DebugOptions service = null;ServiceReference reference = context.getServiceReference(DebugOptions.class.getName());
+ if (reference != null)
+ service = (DebugOptions) context.getService(reference);
+ if (service == null)
+ return;
+ try {
+ DEBUG = service.getBooleanOption(OPTION_DEBUG, false);
+ if (!DEBUG)
+ return;
+ DEBUG_CONVERTER = service.getBooleanOption(OPTION_DEBUG_CONVERTER, false);
+ } finally {
+ // we have what we want - release the service
+ context.ungetService(reference);
+ }
+ }
+ public static BundleContext getBundleContext() {return context;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test337/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test337/A_out.js
new file mode 100644
index 0000000..74ab5a0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test337/A_out.js
@@ -0,0 +1,346 @@
+package org.eclipse.update.configurator;
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.osgi.service.environment.DebugOptions;
+import org.eclipse.osgi.service.environment.EnvironmentInfo;
+import org.osgi.framework.*;
+import org.osgi.service.packageadmin.PackageAdmin;
+import org.osgi.service.startlevel.StartLevel;
+import org.osgi.util.tracker.ServiceTracker;
+public class ConfigurationActivator implements BundleActivator {
+ private final static String DEFAULT_CONVERTER = "org.eclipse.update.configurator.migration.PluginConverter"; //$NON-NLS-1$
+ public static String PI_CONFIGURATOR = "org.eclipse.update.configurator";
+ // debug options
+ public static String OPTION_DEBUG = PI_CONFIGURATOR + "/debug";
+ public static String OPTION_DEBUG_CONVERTER = PI_CONFIGURATOR
+ + "/converter/debug";
+ // debug values
+ public static boolean DEBUG = false;
+ public static boolean DEBUG_CONVERTER = false;
+ private static BundleContext context;
+ private ServiceTracker platformTracker;
+ private ServiceRegistration configurationFactorySR;
+ private String[] allArgs;
+ // location used to put the generated manfests
+ private String cacheLocation = (String) System.getProperties().get(
+ "osgi.manifest.cache"); //PASCAL Need to set this value somewhere (probably from boot)
+ private IPluginConverter converter;
+ private Set ignore;
+ private BundleListener reconcilerListener;
+ public void start(BundleContext ctx) throws Exception {
+ context = ctx;
+ loadOptions();
+ if (DEBUG)
+ System.out.println("Starting update configurator...");
+ computeIgnoredBundles();
+ loadConverter();
+ obtainArgs();
+ installBundles();
+ }
+ private void computeIgnoredBundles() {
+ String ignoreList = System
+ .getProperty("eclipse.ignore",
+ "org.eclipse.osgi,org.eclipse.core.boot,org.eclipse.core.runtime.adaptor");
+ ignore = new HashSet();
+ StringTokenizer tokenizer = new StringTokenizer(ignoreList, ",");
+ while (tokenizer.hasMoreTokens())
+ ignore.add(tokenizer.nextToken().trim());
+ }
+ private boolean shouldIgnore(String bundleName) {
+ if (ignore == null)
+ return false;
+ StringTokenizer tokenizer = new StringTokenizer(bundleName, "._");
+ String partialName = "";
+ while (tokenizer.hasMoreTokens()) {
+ partialName += tokenizer.nextToken();
+ if (ignore.contains(partialName))
+ return true;
+ partialName += ".";
+ }
+ return false;
+ }
+ private void loadConverter() {
+ // TODO look at making this an extension
+ String converterClassName = System.getProperty(
+ "eclipse.manifestconverter", DEFAULT_CONVERTER);
+ if (converterClassName == null)
+ return;
+ Class converterClass;
+ try {
+ converterClass = Class.forName(converterClassName);
+ } catch (ClassNotFoundException e) {
+ return;
+ }
+ try {
+ converter = (IPluginConverter) converterClass.newInstance();
+ } catch (InstantiationException e1) {
+ return;
+ } catch (IllegalAccessException e1) {
+ return;
+ } catch (ClassCastException cce) {
+ return;
+ }
+ }
+ private void obtainArgs() {
+ // all this is only to get the application args
+ EnvironmentInfo envInfo = null;
+ ServiceReference envInfoSR = context
+ .getServiceReference(EnvironmentInfo.class.getName());
+ if (envInfoSR != null)
+ envInfo = (EnvironmentInfo) context.getService(envInfoSR);
+ if (envInfo == null)
+ throw new IllegalStateException();
+ this.allArgs = envInfo.getAllArgs();
+ // we have what we want - release the service
+ context.ungetService(envInfoSR);
+ }
+ public void stop(BundleContext ctx) throws Exception {
+ releasePlatform();
+ configurationFactorySR.unregister();
+ }
+ private void releasePlatform() {
+ if (platformTracker == null)
+ return;
+ platformTracker.close();
+ platformTracker = null;
+ }
+ private IPlatform acquirePlatform() {
+ if (platformTracker == null) {
+ platformTracker = new ServiceTracker(context, IPlatform.class
+ .getName(), null);
+ platformTracker.open();
+ }
+ IPlatform result = (IPlatform) platformTracker.getService();
+ while (result == null) {
+ try {
+ platformTracker.waitForService(1000);
+ result = (IPlatform) platformTracker.getService();
+ } catch (InterruptedException ie) {
+ }
+ }
+ return result;
+ }
+ private void installBundles() {
+ IPlatform platform = acquirePlatform();
+
+ String metaPath = platform.getLocation().append(".metadata").toOSString();
+ URL installURL = platform.getInstallURL();
+ ServiceReference reference = context.getServiceReference(StartLevel.class.getName());
+ StartLevel start = null;
+ if (reference != null)
+ start = (StartLevel) context.getService(reference);
+ try {
+ configurationFactorySR = context.registerService(IPlatformConfigurationFactory.class.getName(), new PlatformConfigurationFactory(), null);
+ PlatformConfiguration config = getPlatformConfiguration(allArgs, metaPath, installURL);
+ URL[] plugins = config.getPluginPath();
+ ArrayList installed = new ArrayList(plugins.length);
+ for (int i = 0; i < plugins.length; i++) {
+ try {
+ String location = plugins[i].toExternalForm();
+ checkOrGenerateManifest(location);
+ location = "reference:" + location.substring(0, location.lastIndexOf('/'));
+ if (!isInstalled(location)) {
+ try {
+ Bundle target = context.installBundle(location);
+ installed.add(target);
+ if (start != null)
+ start.setBundleStartLevel(target, 4);
+ } catch (Exception e) {
+ System.err.println("Ignoring bundle at: " + location);
+ System.err.println(e.getMessage());
+ }
+ }
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ context.ungetService(reference);
+ refreshPackages((Bundle[]) installed.toArray(new Bundle[installed.size()]));
+ if (System.getProperty("eclipse.application") == null || System.getProperty("eclipse.application").equals(PlatformConfiguration.RECONCILER_APP))
+ System.setProperty("eclipse.application", config.getApplicationIdentifier());
+// if (config.getApplicationIdentifier().equals(PlatformConfiguration.RECONCILER_APP) ) {
+// reconcilerListener = reconcilerListener();
+// context.addBundleListener(reconcilerListener);
+// }
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } finally {
+ releasePlatform();
+ }
+ }
+ private BundleListener reconcilerListener() {
+ return new BundleListener() {
+ public void bundleChanged(BundleEvent event) {
+ String buid = event.getBundle().getUniqueId();
+ if (event.getType() == BundleEvent.STOPPED && buid != null
+ && buid.equals("org.eclipse.update.core"))
+ runPostReconciler();
+ }
+ };
+ }
+ private void runPostReconciler() {
+ Runnable postReconciler = new Runnable() {
+ public void run() {
+ try {
+ Bundle apprunner = context
+ .getBundle("org.eclipse.core.applicationrunner");
+ apprunner.stop();
+ context.removeBundleListener(reconcilerListener);
+ try {
+ PlatformConfiguration.shutdown();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ installBundles();
+ apprunner.start();
+ } catch (BundleException be) {
+ be.printStackTrace();
+ }
+ }
+ };
+ new Thread(postReconciler, "Post reconciler").start();
+ }
+ /**
+ * @param location
+ */
+ private void checkOrGenerateManifest(String pluginManifestLocationURL) {
+ if (converter == null)
+ return;
+ String pluginManifestLocation = null;
+ try {
+ pluginManifestLocation = new URL(pluginManifestLocationURL)
+ .getPath();
+ } catch (MalformedURLException e) {
+ return;
+ }
+ File pluginDir = new File(pluginManifestLocation).getParentFile();
+ if (shouldIgnore(pluginDir.getName()))
+ return;
+ File manifest = new File(pluginDir, "META-INF/MANIFEST.MF");
+ if (manifest.exists())
+ return;
+ // bail if the install location is not writable and we don't know where else to write to
+ if (cacheLocation == null)
+ return;
+ File generationLocation = new File(cacheLocation,
+ computeFileName(pluginDir.getPath()) + ".MF");
+ if (generationLocation.exists())
+ return;
+ if (!converter.convertManifest(pluginDir, generationLocation))
+ System.out.println(pluginDir + " manifest generation failed");
+ }
+ /*
+ * Derives a file name corresponding to a path:
+ * c:\autoexec.bat -> c__autoexec.bat
+ */
+ private String computeFileName(String filePath) {
+ StringBuffer newName = new StringBuffer(filePath);
+ for (int i = 0; i < filePath.length(); i++) {
+ char c = newName.charAt(i);
+ if (c == ':' || c == '/' || c == '\\')
+ newName.setCharAt(i, '_');
+ }
+ return newName.toString();
+ }
+ /**
+ * This is a major hack to try to get the reconciler application running. However we should find a way to not run it.
+ * @param args
+ * @param metaPath
+ * @return
+ */
+ private PlatformConfiguration getPlatformConfiguration(String[] args,
+ String metaPath, URL installURL) {
+ try {
+ PlatformConfiguration.startup(args, null, null, metaPath,
+ installURL);
+ } catch (Exception e) {
+ if (platformTracker != null) {
+ String message = e.getMessage();
+ if (message == null)
+ message = "";
+ IStatus status = new Status(IStatus.ERROR,
+ IPlatform.PI_RUNTIME, IStatus.OK, message, e);
+ ((IPlatform) platformTracker.getService()).getLog(
+ context.getBundle()).log(status);
+ }
+ }
+ return PlatformConfiguration.getCurrent();
+ }
+ /**
+ * Do PackageAdmin.refreshPackages() in a synchronous way. After installing
+ * all the requested bundles we need to do a refresh and want to ensure that
+ * everything is done before returning.
+ * @param bundles
+ */
+ private void refreshPackages(Bundle[] bundles) {
+ if (bundles.length == 0)
+ return;
+ ServiceReference packageAdminRef = context
+ .getServiceReference(PackageAdmin.class.getName());
+ PackageAdmin packageAdmin = null;
+ if (packageAdminRef != null) {
+ packageAdmin = (PackageAdmin) context.getService(packageAdminRef);
+ if (packageAdmin == null)
+ return;
+ }
+ // TODO this is such a hack it is silly. There are still cases for race conditions etc
+ // but this should allow for some progress...
+ final Object semaphore = new Object();
+ FrameworkListener listener = new FrameworkListener() {
+ public void frameworkEvent(FrameworkEvent event) {
+ if (event.getType() == FrameworkEvent.PACKAGES_REFRESHED)
+ synchronized (semaphore) {
+ semaphore.notifyAll();
+ }
+ }
+ };
+ context.addFrameworkListener(listener);
+ packageAdmin.refreshPackages(bundles);
+ synchronized (semaphore) {
+ try {
+ semaphore.wait();
+ } catch (InterruptedException e) {
+ }
+ }
+ context.removeFrameworkListener(listener);
+ context.ungetService(packageAdminRef);
+ }
+ private boolean isInstalled(String location) {
+ Bundle[] installed = context.getBundles();
+ for (int i = 0; i < installed.length; i++) {
+ Bundle bundle = installed[i];
+ if (location.equalsIgnoreCase(bundle.getLocation()))
+ return true;
+ }
+ return false;
+ }
+ private void loadOptions() {
+ // all this is only to get the application args
+ DebugOptions service = null;
+ ServiceReference reference = context
+ .getServiceReference(DebugOptions.class.getName());
+ if (reference != null)
+ service = (DebugOptions) context.getService(reference);
+ if (service == null)
+ return;
+ try {
+ DEBUG = service.getBooleanOption(OPTION_DEBUG, false);
+ if (!DEBUG)
+ return;
+ DEBUG_CONVERTER = service.getBooleanOption(OPTION_DEBUG_CONVERTER,
+ false);
+ } finally {
+ // we have what we want - release the service
+ context.ungetService(reference);
+ }
+ }
+ public static BundleContext getBundleContext() {
+ return context;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test338/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test338/A_in.js
new file mode 100644
index 0000000..fc70618
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test338/A_in.js
@@ -0,0 +1,20 @@
+/**
+ * Braces
+ */
+class Example {
+ SomeClass fField = new SomeClass() {
+ public int value;
+ };
+ void bar(int p) {
+ for (int i = 0; i < 10; i++) {
+ fField.add(i);
+ }
+ switch (p) {
+ case 0 :
+ fField.set(0);
+ break;
+ default :
+ fField.reset();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test338/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test338/A_out.js
new file mode 100644
index 0000000..3f0208f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test338/A_out.js
@@ -0,0 +1,20 @@
+/**
+ * Braces
+ */
+class Example {
+ SomeClass fField = new SomeClass() {
+ public int value;
+ };
+ void bar(int p) {
+ for (int i = 0; i < 10; i++) {
+ fField.add(i);
+ }
+ switch (p) {
+ case 0 :
+ fField.set(0);
+ break;
+ default :
+ fField.reset();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test339/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test339/A_in.js
new file mode 100644
index 0000000..50a8623
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test339/A_in.js
@@ -0,0 +1,19 @@
+/**
+ * Braces
+ */
+class Example {
+ SomeClass fField = new SomeClass() {
+ public int value;
+ };
+ void bar(int p) {
+ for (int i = 0; i < 10; i++) {
+ fField.add(i);
+ }
+ switch (p) {
+ case 0 :
+ fField.set(0);
+ break;
+ default :
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test339/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test339/A_out.js
new file mode 100644
index 0000000..285210f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test339/A_out.js
@@ -0,0 +1,19 @@
+/**
+ * Braces
+ */
+class Example {
+ SomeClass fField = new SomeClass() {
+ public int value;
+ };
+ void bar(int p) {
+ for (int i = 0; i < 10; i++) {
+ fField.add(i);
+ }
+ switch (p) {
+ case 0 :
+ fField.set(0);
+ break;
+ default :
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test340/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test340/A_in.js
new file mode 100644
index 0000000..323ae28
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test340/A_in.js
@@ -0,0 +1,18 @@
+/**
+ * Braces
+ */
+class Example {
+ SomeClass fField = new SomeClass() {
+ public int value;
+ };
+ void bar(int p) {
+ for (int i = 0; i < 10; i++) {
+ fField.add(i);
+ }
+ switch (p) {
+ case 0 :
+ fField.set(0);
+ break;
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test340/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test340/A_out.js
new file mode 100644
index 0000000..0956738
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test340/A_out.js
@@ -0,0 +1,18 @@
+/**
+ * Braces
+ */
+class Example {
+ SomeClass fField = new SomeClass() {
+ public int value;
+ };
+ void bar(int p) {
+ for (int i = 0; i < 10; i++) {
+ fField.add(i);
+ }
+ switch (p) {
+ case 0 :
+ fField.set(0);
+ break;
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test341/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test341/A_in.js
new file mode 100644
index 0000000..1fa7b2d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test341/A_in.js
@@ -0,0 +1,7 @@
+class Example {
+ void foo() {
+ int a = 1 - -4;
+ int b =-a;
+ Other.check(-a);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test341/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test341/A_out.js
new file mode 100644
index 0000000..d1cf618
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test341/A_out.js
@@ -0,0 +1,7 @@
+class Example {
+ void foo() {
+ int a =1 - -4;
+ int b =-a;
+ Other.check(-a);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test342/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test342/A_in.js
new file mode 100644
index 0000000..5e8b1b3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test342/A_in.js
@@ -0,0 +1,6 @@
+class Example {
+ void foo() {
+ int c = 2;
+ int a =1, b =2, d;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test342/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test342/A_out.js
new file mode 100644
index 0000000..4292371
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test342/A_out.js
@@ -0,0 +1,6 @@
+class Example {
+ void foo() {
+ int c = 2;
+ int a = 1,b = 2,d;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test343/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test343/A_in.js
new file mode 100644
index 0000000..8ba616e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test343/A_in.js
@@ -0,0 +1,4 @@
+class Example {
+ int c = 2;
+ int a =1, b =2, d;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test343/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test343/A_out.js
new file mode 100644
index 0000000..646f6b5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test343/A_out.js
@@ -0,0 +1,4 @@
+class Example {
+ int c = 2;
+ int a = 1,b = 2,d;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test344/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test344/A_in.js
new file mode 100644
index 0000000..8ba616e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test344/A_in.js
@@ -0,0 +1,4 @@
+class Example {
+ int c = 2;
+ int a =1, b =2, d;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test344/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test344/A_out.js
new file mode 100644
index 0000000..6c46c2e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test344/A_out.js
@@ -0,0 +1,4 @@
+class Example {
+ int c = 2;
+ int a = 1, b = 2, d;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test345/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test345/A_in.js
new file mode 100644
index 0000000..5e8b1b3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test345/A_in.js
@@ -0,0 +1,6 @@
+class Example {
+ void foo() {
+ int c = 2;
+ int a =1, b =2, d;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test345/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test345/A_out.js
new file mode 100644
index 0000000..f4e05a3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test345/A_out.js
@@ -0,0 +1,6 @@
+class Example {
+ void foo() {
+ int c = 2;
+ int a = 1, b = 2, d;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test346/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test346/A_in.js
new file mode 100644
index 0000000..91abb3c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test346/A_in.js
@@ -0,0 +1,15 @@
+public void setErrorQOptions(int errorQOptions) {
+ this.errorQOptions = errorQOptions;
+ } /** Sets the MQSeries error queue. */
+ public void setErrorQueue(MQQueue errorQueue) {
+ this.errorQueue = errorQueue;
+ } /** Sets the MQSeries error queue name to use on open. */
+ public void setErrorQueueName(String errorQueueName) {
+ this.errorQueueName = errorQueueName;
+ } /** Sets the MQ option flags to use for the input queue on open. */
+ public void setInputQOptions(int inputQOptions) {
+ this.inputQOptions = inputQOptions;
+ } /** Sets the MQSeries input queue. */
+ public void setInputQueue(MQQueue inputQueue) {
+ this.inputQueue = inputQueue;
+ } /** Sets the MQSeries input queue name to use on open. */ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test346/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test346/A_out.js
new file mode 100644
index 0000000..13ae0bb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test346/A_out.js
@@ -0,0 +1,20 @@
+public void setErrorQOptions(int errorQOptions) {
+ this.errorQOptions = errorQOptions;
+}
+/** Sets the MQSeries error queue. */
+public void setErrorQueue(MQQueue errorQueue) {
+ this.errorQueue = errorQueue;
+}
+/** Sets the MQSeries error queue name to use on open. */
+public void setErrorQueueName(String errorQueueName) {
+ this.errorQueueName = errorQueueName;
+}
+/** Sets the MQ option flags to use for the input queue on open. */
+public void setInputQOptions(int inputQOptions) {
+ this.inputQOptions = inputQOptions;
+}
+/** Sets the MQSeries input queue. */
+public void setInputQueue(MQQueue inputQueue) {
+ this.inputQueue = inputQueue;
+}
+/** Sets the MQSeries input queue name to use on open. */ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test347/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test347/A_in.js
new file mode 100644
index 0000000..251d587
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test347/A_in.js
@@ -0,0 +1,4 @@
+public class A {
+ void foo() throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.NullPointerException {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test347/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test347/A_out.js
new file mode 100644
index 0000000..4501edf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test347/A_out.js
@@ -0,0 +1,6 @@
+public class A {
+
+ void foo() throws java.io.IOException,
+ java.lang.IllegalArgumentException,
+ java.lang.NullPointerException {}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test348/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test348/A_in.js
new file mode 100644
index 0000000..251d587
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test348/A_in.js
@@ -0,0 +1,4 @@
+public class A {
+ void foo() throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.NullPointerException {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test348/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test348/A_out.js
new file mode 100644
index 0000000..12b5aa5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test348/A_out.js
@@ -0,0 +1,5 @@
+public class A {
+
+ void foo() throws java.io.IOException, java.lang.IllegalArgumentException,
+ java.lang.NullPointerException {}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test349/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test349/A_in.js
new file mode 100644
index 0000000..148f7d3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test349/A_in.js
@@ -0,0 +1,4 @@
+public class X {
+ void foo() throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.NullPointerException {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test349/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test349/A_out.js
new file mode 100644
index 0000000..e502955
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test349/A_out.js
@@ -0,0 +1,6 @@
+public class X {
+
+ void foo() throws java.io.IOException, java.lang.IllegalArgumentException,
+ java.lang.NullPointerException {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test350/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test350/A_in.js
new file mode 100644
index 0000000..18f9dd5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test350/A_in.js
@@ -0,0 +1,13 @@
+if (JavaModelManager.CP_RESOLVE_VERBOSE){
+ System.out.println("CPContainer SET - setting container: ["+containerPath+"] for projects: {" //$NON-NLS-1$ //$NON-NLS-2$
+ + (org.eclipse.wst.jsdt.internal.compiler.util.Util.toString(affectedProjects,
+ new org.eclipse.wst.jsdt.internal.compiler.util.Util.Displayable(){
+ public String displayString(Object o) { return ((IJavaProject) o).getElementName(); }
+ }))
+ + "} with values: " //$NON-NLS-1$
+ + (org.eclipse.wst.jsdt.internal.compiler.util.Util.toString(respectiveContainers,
+ new org.eclipse.wst.jsdt.internal.compiler.util.Util.Displayable(){
+ public String displayString(Object o) { return ((IClasspathContainer) o).getDescription(); }
+ }))
+ );
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test350/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test350/A_out.js
new file mode 100644
index 0000000..bc2d3e4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test350/A_out.js
@@ -0,0 +1,23 @@
+if (JavaModelManager.CP_RESOLVE_VERBOSE) {
+ System.out
+ .println("CPContainer SET - setting container: [" + containerPath + "] for projects: {" //$NON-NLS-1$ //$NON-NLS-2$
+ + (org.eclipse.wst.jsdt.internal.compiler.util.Util
+ .toString(
+ affectedProjects,
+ new org.eclipse.wst.jsdt.internal.compiler.util.Util.Displayable() {
+ public String displayString(Object o) {
+ return ((IJavaProject) o)
+ .getElementName();
+ }
+ }))
+ + "} with values: " //$NON-NLS-1$
+ + (org.eclipse.wst.jsdt.internal.compiler.util.Util
+ .toString(
+ respectiveContainers,
+ new org.eclipse.wst.jsdt.internal.compiler.util.Util.Displayable() {
+ public String displayString(Object o) {
+ return ((IClasspathContainer) o)
+ .getDescription();
+ }
+ })));
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test351/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test351/A_in.js
new file mode 100644
index 0000000..c251b44
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test351/A_in.js
@@ -0,0 +1,4 @@
+TestClass.testMethod(foo, "My Application", "This is a test This is a test This is a test " + "This is a test This is a test This is a test "
+ + "This is a test This is a test This is a test " + "This is a test This is a test This is a test "
+ + "This is a test This is a test This is a test "
+ + "This is a test This is a test This is a test", "This is an another string", new Object()); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test351/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test351/A_out.js
new file mode 100644
index 0000000..2381e84
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test351/A_out.js
@@ -0,0 +1,8 @@
+TestClass.testMethod(foo, "My Application",
+ "This is a test This is a test This is a test "
+ + "This is a test This is a test This is a test "
+ + "This is a test This is a test This is a test "
+ + "This is a test This is a test This is a test "
+ + "This is a test This is a test This is a test "
+ + "This is a test This is a test This is a test",
+ "This is an another string", new Object()); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test352/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test352/A_in.js
new file mode 100644
index 0000000..c251b44
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test352/A_in.js
@@ -0,0 +1,4 @@
+TestClass.testMethod(foo, "My Application", "This is a test This is a test This is a test " + "This is a test This is a test This is a test "
+ + "This is a test This is a test This is a test " + "This is a test This is a test This is a test "
+ + "This is a test This is a test This is a test "
+ + "This is a test This is a test This is a test", "This is an another string", new Object()); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test352/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test352/A_out.js
new file mode 100644
index 0000000..47c2b6e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test352/A_out.js
@@ -0,0 +1,8 @@
+TestClass.testMethod(foo, "My Application",
+ "This is a test This is a test This is a test "
+ + "This is a test This is a test This is a test "
+ + "This is a test This is a test This is a test "
+ + "This is a test This is a test This is a test "
+ + "This is a test This is a test This is a test "
+ + "This is a test This is a test This is a test",
+ "This is an another string", new Object()); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test353/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test353/A_in.js
new file mode 100644
index 0000000..c4d2be2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test353/A_in.js
@@ -0,0 +1 @@
+scope.problemReporter().typeMismatchErrorActualTypeExpectedType(enclosingInstance, enclosingInstanceType, inheritedBinding.declaringClass.enclosingType()); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test353/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test353/A_out.js
new file mode 100644
index 0000000..5413d22
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test353/A_out.js
@@ -0,0 +1,3 @@
+scope.problemReporter().typeMismatchErrorActualTypeExpectedType(
+ enclosingInstance, enclosingInstanceType,
+ inheritedBinding.declaringClass.enclosingType()); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test354/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test354/A_in.js
new file mode 100644
index 0000000..77b6093
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test354/A_in.js
@@ -0,0 +1,3 @@
+public class A {
+ public void foo() {;;;}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test354/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test354/A_out.js
new file mode 100644
index 0000000..ba318a2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test354/A_out.js
@@ -0,0 +1,5 @@
+public class A {
+ public void foo() {
+ ;;;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test355/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test355/A_in.js
new file mode 100644
index 0000000..77b6093
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test355/A_in.js
@@ -0,0 +1,3 @@
+public class A {
+ public void foo() {;;;}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test355/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test355/A_out.js
new file mode 100644
index 0000000..d947bcc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test355/A_out.js
@@ -0,0 +1,7 @@
+public class A {
+ public void foo() {
+ ;
+ ;
+ ;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test356/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test356/A_in.js
new file mode 100644
index 0000000..7df0905
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test356/A_in.js
@@ -0,0 +1,5 @@
+public class A {
+ public void foo() {
+ int ii = 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 * 11 * 12 * 13 * 14 * 15 * 16;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test356/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test356/A_out.js
new file mode 100644
index 0000000..2c58741
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test356/A_out.js
@@ -0,0 +1,6 @@
+public class A {
+ public void foo() {
+ int ii = 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 * 11 * 12 * 13 * 14
+ * 15 * 16;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test357/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test357/A_in.js
new file mode 100644
index 0000000..2fb3b1d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test357/A_in.js
@@ -0,0 +1 @@
+(++a) \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test357/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test357/A_out.js
new file mode 100644
index 0000000..95126b2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test357/A_out.js
@@ -0,0 +1 @@
+(++ a) \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test358/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test358/A_in.js
new file mode 100644
index 0000000..2fb3b1d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test358/A_in.js
@@ -0,0 +1 @@
+(++a) \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test358/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test358/A_out.js
new file mode 100644
index 0000000..2fb3b1d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test358/A_out.js
@@ -0,0 +1 @@
+(++a) \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test359/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test359/A_in.js
new file mode 100644
index 0000000..e2e5e74
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test359/A_in.js
@@ -0,0 +1,2 @@
+class One {}
+class Two {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test359/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test359/A_out.js
new file mode 100644
index 0000000..ec5b505
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test359/A_out.js
@@ -0,0 +1,4 @@
+class One {
+}
+class Two {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test360/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test360/A_in.js
new file mode 100644
index 0000000..d36249a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test360/A_in.js
@@ -0,0 +1,4 @@
+class One {}
+
+
+class Two {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test360/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test360/A_out.js
new file mode 100644
index 0000000..24b6b31
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test360/A_out.js
@@ -0,0 +1,6 @@
+class One {
+}
+
+
+class Two {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test361/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test361/A_in.js
new file mode 100644
index 0000000..d36249a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test361/A_in.js
@@ -0,0 +1,4 @@
+class One {}
+
+
+class Two {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test361/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test361/A_out.js
new file mode 100644
index 0000000..a52dcf1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test361/A_out.js
@@ -0,0 +1,5 @@
+class One {
+}
+
+class Two {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test362/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test362/A_in.js
new file mode 100644
index 0000000..a6a26fb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test362/A_in.js
@@ -0,0 +1,4 @@
+/**
+ * Some method.
+ */
+public void someMethod(String argument1, String argument2,String argument3) {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test362/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test362/A_out.js
new file mode 100644
index 0000000..71fe2e9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test362/A_out.js
@@ -0,0 +1,7 @@
+/**
+ * Some method.
+ */
+public void someMethod(String argument1,
+ String argument2,
+ String argument3) {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test363/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test363/A_in.js
new file mode 100644
index 0000000..4560b8b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test363/A_in.js
@@ -0,0 +1,3 @@
+public void someMethod() {
+ int size = HEADERS + 2 * 4 + HEADERS + 2 * escapedValue.length() + HEADERS * HEADERS;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test363/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test363/A_out.js
new file mode 100644
index 0000000..953ab4d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test363/A_out.js
@@ -0,0 +1,4 @@
+public void someMethod() {
+ int size = HEADERS + 2 * 4 + HEADERS + 2 * escapedValue.length() + HEADERS
+ * HEADERS;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test364/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test364/A_in.js
new file mode 100644
index 0000000..27c01e2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test364/A_in.js
@@ -0,0 +1,4 @@
+class Example {
+ void foo() {for ( int i = 0,j = 100; i < 10; i++, j-- ) {}
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test364/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test364/A_out.js
new file mode 100644
index 0000000..ec74c6d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test364/A_out.js
@@ -0,0 +1,6 @@
+class Example {
+ void foo() {
+ for (int i = 0,j = 100; i < 10; i++, j--) {
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test365/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test365/A_in.js
new file mode 100644
index 0000000..16692a0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test365/A_in.js
@@ -0,0 +1,5 @@
+class Example {
+ void bar() {}
+ void foo() {for ( bar(), bar(); i < 10; i++, j-- ) {}
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test365/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test365/A_out.js
new file mode 100644
index 0000000..afb445e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test365/A_out.js
@@ -0,0 +1,8 @@
+class Example {
+ void bar() {
+ }
+ void foo() {
+ for (bar(),bar(); i < 10; i++, j--) {
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test366/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test366/A_in.js
new file mode 100644
index 0000000..27c01e2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test366/A_in.js
@@ -0,0 +1,4 @@
+class Example {
+ void foo() {for ( int i = 0,j = 100; i < 10; i++, j-- ) {}
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test366/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test366/A_out.js
new file mode 100644
index 0000000..0b577be
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test366/A_out.js
@@ -0,0 +1,6 @@
+class Example {
+ void foo() {
+ for (int i = 0 , j = 100; i < 10; i++, j--) {
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test367/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test367/A_in.js
new file mode 100644
index 0000000..52c6b69
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test367/A_in.js
@@ -0,0 +1,5 @@
+class Example {
+ void foo() { int k,n;
+for ( int i = 0,j = 100; i < 10; i++, j-- ) {}
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test367/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test367/A_out.js
new file mode 100644
index 0000000..c2dc874
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test367/A_out.js
@@ -0,0 +1,7 @@
+class Example {
+ void foo() {
+ int k,n;
+ for (int i = 0 , j = 100; i < 10; i++, j--) {
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test368/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test368/A_in.js
new file mode 100644
index 0000000..e285f34
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test368/A_in.js
@@ -0,0 +1,7 @@
+class Example {
+ void foo() {}
+
+ void foo2() {} // end of foo2
+
+ void bar() {}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test368/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test368/A_out.js
new file mode 100644
index 0000000..356ffa9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test368/A_out.js
@@ -0,0 +1,10 @@
+class Example {
+ void foo() {
+ }
+
+ void foo2() {
+ } // end of foo2
+
+ void bar() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test369/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test369/A_in.js
new file mode 100644
index 0000000..e285f34
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test369/A_in.js
@@ -0,0 +1,7 @@
+class Example {
+ void foo() {}
+
+ void foo2() {} // end of foo2
+
+ void bar() {}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test369/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test369/A_out.js
new file mode 100644
index 0000000..df2016a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test369/A_out.js
@@ -0,0 +1,12 @@
+
+class Example {
+
+ void foo() {
+ }
+
+ void foo2() {
+ } // end of foo2
+
+ void bar() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test370/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test370/A_in.js
new file mode 100644
index 0000000..e285f34
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test370/A_in.js
@@ -0,0 +1,7 @@
+class Example {
+ void foo() {}
+
+ void foo2() {} // end of foo2
+
+ void bar() {}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test370/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test370/A_out.js
new file mode 100644
index 0000000..df2016a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test370/A_out.js
@@ -0,0 +1,12 @@
+
+class Example {
+
+ void foo() {
+ }
+
+ void foo2() {
+ } // end of foo2
+
+ void bar() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test371/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test371/A_in.js
new file mode 100644
index 0000000..766ae24
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test371/A_in.js
@@ -0,0 +1,8 @@
+class Example {
+
+ void foo() {}
+
+ void foo2() {} // end of foo2
+
+ void bar() {}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test371/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test371/A_out.js
new file mode 100644
index 0000000..39104c0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test371/A_out.js
@@ -0,0 +1,11 @@
+class Example {
+
+ void foo() {
+ }
+
+ void foo2() {
+ } // end of foo2
+
+ void bar() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test372/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test372/A_in.js
new file mode 100644
index 0000000..6e8ed38
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test372/A_in.js
@@ -0,0 +1,9 @@
+class Example {
+
+
+ void foo() {}
+
+ void foo2() {} // end of foo2
+
+ void bar() {}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test372/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test372/A_out.js
new file mode 100644
index 0000000..39104c0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test372/A_out.js
@@ -0,0 +1,11 @@
+class Example {
+
+ void foo() {
+ }
+
+ void foo2() {
+ } // end of foo2
+
+ void bar() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test373/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test373/A_in.js
new file mode 100644
index 0000000..6e8ed38
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test373/A_in.js
@@ -0,0 +1,9 @@
+class Example {
+
+
+ void foo() {}
+
+ void foo2() {} // end of foo2
+
+ void bar() {}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test373/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test373/A_out.js
new file mode 100644
index 0000000..df2016a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test373/A_out.js
@@ -0,0 +1,12 @@
+
+class Example {
+
+ void foo() {
+ }
+
+ void foo2() {
+ } // end of foo2
+
+ void bar() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test374/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test374/A_in.js
new file mode 100644
index 0000000..5d58fa4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test374/A_in.js
@@ -0,0 +1,6 @@
+class Example {
+ void foo() {
+ int[] tab = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24};
+ System.out.println();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test374/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test374/A_out.js
new file mode 100644
index 0000000..1b4f327
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test374/A_out.js
@@ -0,0 +1,10 @@
+class Example {
+ void foo() {
+ int[] tab =
+ {
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24
+ };
+ System.out.println();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test375/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test375/A_in.js
new file mode 100644
index 0000000..5d58fa4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test375/A_in.js
@@ -0,0 +1,6 @@
+class Example {
+ void foo() {
+ int[] tab = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24};
+ System.out.println();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test375/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test375/A_out.js
new file mode 100644
index 0000000..4400e31
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test375/A_out.js
@@ -0,0 +1,9 @@
+class Example {
+ void foo() {
+ int[] tab = {
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24
+ };
+ System.out.println();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test376/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test376/A_in.js
new file mode 100644
index 0000000..5d58fa4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test376/A_in.js
@@ -0,0 +1,6 @@
+class Example {
+ void foo() {
+ int[] tab = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24};
+ System.out.println();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test376/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test376/A_out.js
new file mode 100644
index 0000000..e0670c4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test376/A_out.js
@@ -0,0 +1,7 @@
+class Example {
+ void foo() {
+ int[] tab = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 24};
+ System.out.println();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test377/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test377/A_in.js
new file mode 100644
index 0000000..5d58fa4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test377/A_in.js
@@ -0,0 +1,6 @@
+class Example {
+ void foo() {
+ int[] tab = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24};
+ System.out.println();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test377/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test377/A_out.js
new file mode 100644
index 0000000..8e347d1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test377/A_out.js
@@ -0,0 +1,8 @@
+class Example {
+ void foo() {
+ int[] tab = {
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24};
+ System.out.println();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test378/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test378/A_in.js
new file mode 100644
index 0000000..5d58fa4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test378/A_in.js
@@ -0,0 +1,6 @@
+class Example {
+ void foo() {
+ int[] tab = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24};
+ System.out.println();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test378/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test378/A_out.js
new file mode 100644
index 0000000..4400e31
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test378/A_out.js
@@ -0,0 +1,9 @@
+class Example {
+ void foo() {
+ int[] tab = {
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24
+ };
+ System.out.println();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test379/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test379/A_in.js
new file mode 100644
index 0000000..5d58fa4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test379/A_in.js
@@ -0,0 +1,6 @@
+class Example {
+ void foo() {
+ int[] tab = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24};
+ System.out.println();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test379/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test379/A_out.js
new file mode 100644
index 0000000..beb5237
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test379/A_out.js
@@ -0,0 +1,10 @@
+class Example {
+ void foo() {
+ int[] tab =
+ {
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
+ 19, 20, 21, 22, 23, 24
+ };
+ System.out.println();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test380/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test380/A_in.js
new file mode 100644
index 0000000..7e891c5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test380/A_in.js
@@ -0,0 +1,14 @@
+{
+
+ if (size < currentSize) {
+ try {
+ size = inStream.available();
+ } catch (IOException e) {
+ }
+ } else if (size == currentSize) {
+ ++size;
+ } else {
+ --size;
+ }
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test380/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test380/A_out.js
new file mode 100644
index 0000000..f66ed75
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test380/A_out.js
@@ -0,0 +1,21 @@
+
+{
+ if (size < currentSize)
+ {
+ try
+ {
+ size = inStream.available();
+ }
+ catch (IOException e)
+ {
+ }
+ }
+ else if (size == currentSize)
+ {
+ ++size;
+ }
+ else
+ {
+ --size;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test381/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test381/A_in.js
new file mode 100644
index 0000000..e285f34
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test381/A_in.js
@@ -0,0 +1,7 @@
+class Example {
+ void foo() {}
+
+ void foo2() {} // end of foo2
+
+ void bar() {}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test381/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test381/A_out.js
new file mode 100644
index 0000000..356ffa9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test381/A_out.js
@@ -0,0 +1,10 @@
+class Example {
+ void foo() {
+ }
+
+ void foo2() {
+ } // end of foo2
+
+ void bar() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test382/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test382/A_in.js
new file mode 100644
index 0000000..b7ebb4b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test382/A_in.js
@@ -0,0 +1,80 @@
+package de.neze.bugreport.eclipse;
+//Code generator imported: import de.neze.bugreport.eclipse.GeneralConcept.Item;
+//Code generator imported: import de.neze.bugreport.eclipse.GeneralConcept.Problem;
+/**
+ * Feature Missing in Eclispe M5:
+ *
+ * I like to write code like as noted below, and it seams that eclispe
+ * handling of ambigouse inner class names is suboptimal during codeassistance.
+ * And the code formater has problems with disambigouated names.
+ * Note: The exampe below is optimzed for shortness and that make it look a
+ * little bit stupid, but "real world" exmples are much longer .. .
+ */
+public abstract class AssistMyStyle {
+ public static final class Problem extends Exception {
+ }
+ public static final class Item {
+ }
+ public static interface Factory {
+ AssistMyStyle newAssistMyStyle() throws Problem;
+ }
+ abstract Item someMethod() throws Problem;
+}
+/**
+ * and
+ */
+interface GeneralConcept {
+ public static final class Problem extends Exception {
+ }
+ public static final class Item {
+ }
+ abstract Item anotherMethodWithLongNameToForceCodeformaterToBreakTheLine() throws Problem;
+}
+/**
+ * ... and as a result I have many inner classes with the names
+ * "Problem", "Factory" or "Item".
+ * Now I Use code completation to procduce method stubs and got errors
+ * as note in the method comments below.
+ * I use "Automatically add import instead of qualified name" in
+ * Window > Preferences > Java > Editor > Code Assist:
+ */
+class AssistMyStyleImpl extends AssistMyStyle implements GeneralConcept {
+ public static final class Factory implements AssistMyStyle.Factory {
+ public AssistMyStyle newAssistMyStyle() {
+ return new AssistMyStyleImpl();
+ }
+ }
+ /**
+ * <pre>
+ * Item someMethod() throws Problem {
+ * return null;
+ * }
+ * </pre>
+ * Implies errors:
+ * [1] The exception type Problem is ambiguous for the method someMethod
+ * [2] The return type Item is ambiguous for the method someMethod
+ * I fix this:
+ */
+ AssistMyStyle.Item someMethod() throws AssistMyStyle.Problem {
+ return null;
+ }
+ /**
+ * anotherMethodWithLongNameToForceCodeformaterToBreakTheLine()
+ * <pre>
+ * public Item anotherMethodWithLongNameToForceCodeformaterToBreakTheLine()
+ * throws Problem {
+ * // XXX Auto-generated method stub
+ * return null;
+ * }
+ * </pre>
+ * Implies error:
+ * [1] The exception type Problem is ambiguous for the method
+ * anotherMethodWithLongNameToForceCodeformaterToBreakTheLine()
+ * [2] The return type Item is ambiguous for the method
+ * anotherMethodWithLongNameToForceCodeformaterToBreakTheLine
+ * I fix this and used code format (looks ugly!!!!):
+ */
+ public GeneralConcept.Item anotherMethodWithLongNameToForceCodeformaterToBreakTheLine() throws GeneralConcept.Problem {
+ return null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test382/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test382/A_out.js
new file mode 100644
index 0000000..e1d4afd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test382/A_out.js
@@ -0,0 +1,82 @@
+package de.neze.bugreport.eclipse;
+//Code generator imported: import de.neze.bugreport.eclipse.GeneralConcept.Item;
+//Code generator imported: import de.neze.bugreport.eclipse.GeneralConcept.Problem;
+/**
+ * Feature Missing in Eclispe M5:
+ *
+ * I like to write code like as noted below, and it seams that eclispe
+ * handling of ambigouse inner class names is suboptimal during codeassistance.
+ * And the code formater has problems with disambigouated names.
+ * Note: The exampe below is optimzed for shortness and that make it look a
+ * little bit stupid, but "real world" exmples are much longer .. .
+ */
+public abstract class AssistMyStyle {
+ public static final class Problem extends Exception {
+ }
+ public static final class Item {
+ }
+ public static interface Factory {
+ AssistMyStyle newAssistMyStyle() throws Problem;
+ }
+ abstract Item someMethod() throws Problem;
+}
+/**
+ * and
+ */
+interface GeneralConcept {
+ public static final class Problem extends Exception {
+ }
+ public static final class Item {
+ }
+ abstract Item anotherMethodWithLongNameToForceCodeformaterToBreakTheLine()
+ throws Problem;
+}
+/**
+ * ... and as a result I have many inner classes with the names
+ * "Problem", "Factory" or "Item".
+ * Now I Use code completation to procduce method stubs and got errors
+ * as note in the method comments below.
+ * I use "Automatically add import instead of qualified name" in
+ * Window > Preferences > Java > Editor > Code Assist:
+ */
+class AssistMyStyleImpl extends AssistMyStyle implements GeneralConcept {
+ public static final class Factory implements AssistMyStyle.Factory {
+ public AssistMyStyle newAssistMyStyle() {
+ return new AssistMyStyleImpl();
+ }
+ }
+ /**
+ * <pre>
+ * Item someMethod() throws Problem {
+ * return null;
+ * }
+ * </pre>
+ * Implies errors:
+ * [1] The exception type Problem is ambiguous for the method someMethod
+ * [2] The return type Item is ambiguous for the method someMethod
+ * I fix this:
+ */
+ AssistMyStyle.Item someMethod() throws AssistMyStyle.Problem {
+ return null;
+ }
+ /**
+ * anotherMethodWithLongNameToForceCodeformaterToBreakTheLine()
+ * <pre>
+ * public Item anotherMethodWithLongNameToForceCodeformaterToBreakTheLine()
+ * throws Problem {
+ * // XXX Auto-generated method stub
+ * return null;
+ * }
+ * </pre>
+ * Implies error:
+ * [1] The exception type Problem is ambiguous for the method
+ * anotherMethodWithLongNameToForceCodeformaterToBreakTheLine()
+ * [2] The return type Item is ambiguous for the method
+ * anotherMethodWithLongNameToForceCodeformaterToBreakTheLine
+ * I fix this and used code format (looks ugly!!!!):
+ */
+ public GeneralConcept.Item anotherMethodWithLongNameToForceCodeformaterToBreakTheLine()
+ throws GeneralConcept.Problem {
+ return null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test383/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test383/A_in.js
new file mode 100644
index 0000000..93384fa
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test383/A_in.js
@@ -0,0 +1,5 @@
+public class A {
+ public void foo(int i) {
+ System.out.println(++i);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test383/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test383/A_out.js
new file mode 100644
index 0000000..1ee3c45
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test383/A_out.js
@@ -0,0 +1,5 @@
+public class A {
+ public void foo(int i) {
+ System.out.println(++i);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test384/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test384/A_in.js
new file mode 100644
index 0000000..a039638
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test384/A_in.js
@@ -0,0 +1,7 @@
+public class A {
+ int Example(
+ boolean Argument) {
+ return argument ? 100000
+ : 200000;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test384/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test384/A_out.js
new file mode 100644
index 0000000..2621025
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test384/A_out.js
@@ -0,0 +1,6 @@
+public class A {
+ int Example(boolean Argument) {
+ return argument ? 100000
+ : 200000;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test385/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test385/A_in.js
new file mode 100644
index 0000000..a039638
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test385/A_in.js
@@ -0,0 +1,7 @@
+public class A {
+ int Example(
+ boolean Argument) {
+ return argument ? 100000
+ : 200000;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test385/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test385/A_out.js
new file mode 100644
index 0000000..6cb02d1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test385/A_out.js
@@ -0,0 +1,7 @@
+public class A {
+ int Example(boolean Argument) {
+ return argument
+ ? 100000
+ : 200000;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test386/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test386/A_in.js
new file mode 100644
index 0000000..a039638
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test386/A_in.js
@@ -0,0 +1,7 @@
+public class A {
+ int Example(
+ boolean Argument) {
+ return argument ? 100000
+ : 200000;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test386/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test386/A_out.js
new file mode 100644
index 0000000..fb7ea98
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test386/A_out.js
@@ -0,0 +1,7 @@
+public class A {
+ int Example(boolean Argument) {
+ return argument
+ ? 100000
+ : 200000;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test387/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test387/A_in.js
new file mode 100644
index 0000000..a12db92
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test387/A_in.js
@@ -0,0 +1,8 @@
+/**
+ * Conditional Expressions
+ */
+class Example extends AnotherClass {
+ int Example(boolean Argument) {
+ return argument ? 100000 : 200000;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test387/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test387/A_out.js
new file mode 100644
index 0000000..a12db92
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test387/A_out.js
@@ -0,0 +1,8 @@
+/**
+ * Conditional Expressions
+ */
+class Example extends AnotherClass {
+ int Example(boolean Argument) {
+ return argument ? 100000 : 200000;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test388/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test388/A_in.js
new file mode 100644
index 0000000..abfd02d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test388/A_in.js
@@ -0,0 +1,3 @@
+class Example {
+ int[] fArray = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test388/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test388/A_out.js
new file mode 100644
index 0000000..89fec1d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test388/A_out.js
@@ -0,0 +1,17 @@
+class Example {
+ int[] fArray =
+ {
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12
+ };
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test389/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test389/A_in.js
new file mode 100644
index 0000000..abfd02d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test389/A_in.js
@@ -0,0 +1,3 @@
+class Example {
+ int[] fArray = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test389/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test389/A_out.js
new file mode 100644
index 0000000..705dfef
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test389/A_out.js
@@ -0,0 +1,17 @@
+class Example {
+ int[] fArray =
+ {
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11,
+ 12
+ };
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test390/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test390/A_in.js
new file mode 100644
index 0000000..abfd02d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test390/A_in.js
@@ -0,0 +1,3 @@
+class Example {
+ int[] fArray = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test390/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test390/A_out.js
new file mode 100644
index 0000000..4ff4b2c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test390/A_out.js
@@ -0,0 +1,7 @@
+class Example {
+ int[] fArray =
+ {
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
+ 11, 12
+ };
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test391/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test391/A_in.js
new file mode 100644
index 0000000..abfd02d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test391/A_in.js
@@ -0,0 +1,3 @@
+class Example {
+ int[] fArray = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test391/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test391/A_out.js
new file mode 100644
index 0000000..4ff4b2c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test391/A_out.js
@@ -0,0 +1,7 @@
+class Example {
+ int[] fArray =
+ {
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
+ 11, 12
+ };
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test392/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test392/A_in.js
new file mode 100644
index 0000000..abfd02d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test392/A_in.js
@@ -0,0 +1,3 @@
+class Example {
+ int[] fArray = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test392/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test392/A_out.js
new file mode 100644
index 0000000..4cae34f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test392/A_out.js
@@ -0,0 +1,7 @@
+class Example {
+ int[] fArray =
+ {
+ 1, 2, 3, 4, 5, 6, 7, 8, 9,
+ 10, 11, 12
+ };
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test393/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test393/A_in.js
new file mode 100644
index 0000000..abfd02d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test393/A_in.js
@@ -0,0 +1,3 @@
+class Example {
+ int[] fArray = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test393/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test393/A_out.js
new file mode 100644
index 0000000..4cae34f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test393/A_out.js
@@ -0,0 +1,7 @@
+class Example {
+ int[] fArray =
+ {
+ 1, 2, 3, 4, 5, 6, 7, 8, 9,
+ 10, 11, 12
+ };
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test394/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test394/A_in.js
new file mode 100644
index 0000000..71eecaf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test394/A_in.js
@@ -0,0 +1,7 @@
+public class Foo {
+
+ void bar() {
+ if (true && false || false || true && false)
+ return;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test394/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test394/A_out.js
new file mode 100644
index 0000000..ac9fa09
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test394/A_out.js
@@ -0,0 +1,6 @@
+public class Foo {
+ void bar() {
+ if (true && false || false || true && false)
+ return;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test395/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test395/A_in.js
new file mode 100644
index 0000000..53f49bc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test395/A_in.js
@@ -0,0 +1,4 @@
+public class A {
+
+ void foo(int a) {}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test395/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test395/A_out.js
new file mode 100644
index 0000000..088c509
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test395/A_out.js
@@ -0,0 +1,4 @@
+public class A {
+ void foo (int a) {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test396/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test396/A_in.js
new file mode 100644
index 0000000..6bff884
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test396/A_in.js
@@ -0,0 +1,6 @@
+public class A {
+
+ void foo(int a) {
+ for (int i=1; i<10; i++) {}
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test396/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test396/A_out.js
new file mode 100644
index 0000000..b434f88
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test396/A_out.js
@@ -0,0 +1,6 @@
+public class A {
+ void foo(int a) {
+ for (int i = 1 ; i < 10 ; i++) {
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test397/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test397/A_in.js
new file mode 100644
index 0000000..bb502fd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test397/A_in.js
@@ -0,0 +1,3 @@
+package p;
+
+public class A {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test397/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test397/A_out.js
new file mode 100644
index 0000000..84cceae
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test397/A_out.js
@@ -0,0 +1,5 @@
+
+
+package p;
+public class A {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test398/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test398/A_in.js
new file mode 100644
index 0000000..bb502fd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test398/A_in.js
@@ -0,0 +1,3 @@
+package p;
+
+public class A {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test398/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test398/A_out.js
new file mode 100644
index 0000000..d8c8d79
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test398/A_out.js
@@ -0,0 +1,3 @@
+package p;
+public class A {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test399/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test399/A_in.js
new file mode 100644
index 0000000..bb502fd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test399/A_in.js
@@ -0,0 +1,3 @@
+package p;
+
+public class A {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test399/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test399/A_out.js
new file mode 100644
index 0000000..22c0337
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test399/A_out.js
@@ -0,0 +1,5 @@
+
+package p;
+
+public class A {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test400/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test400/A_in.js
new file mode 100644
index 0000000..bb502fd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test400/A_in.js
@@ -0,0 +1,3 @@
+package p;
+
+public class A {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test400/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test400/A_out.js
new file mode 100644
index 0000000..5ee26a4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test400/A_out.js
@@ -0,0 +1,7 @@
+
+
+package p;
+
+
+public class A {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test401/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test401/A_in.js
new file mode 100644
index 0000000..5b1201d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test401/A_in.js
@@ -0,0 +1,4 @@
+package p;
+public class A {
+ int[] tab = new int[] {};
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test401/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test401/A_out.js
new file mode 100644
index 0000000..a926518
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test401/A_out.js
@@ -0,0 +1,4 @@
+package p;
+public class A {
+ int[] tab = new int[]{ };
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test402/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test402/A_in.js
new file mode 100644
index 0000000..5b1201d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test402/A_in.js
@@ -0,0 +1,4 @@
+package p;
+public class A {
+ int[] tab = new int[] {};
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test402/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test402/A_out.js
new file mode 100644
index 0000000..13a471b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test402/A_out.js
@@ -0,0 +1,4 @@
+package p;
+public class A {
+ int[] tab = new int[]{};
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test403/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test403/A_in.js
new file mode 100644
index 0000000..1244f3b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test403/A_in.js
@@ -0,0 +1,6 @@
+public class A {
+ void foo(String title, Object test) {
+ System.out.println(title + " world"); //$NON-NLS-1$
+ System.out.println(test.toString());
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test403/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test403/A_out.js
new file mode 100644
index 0000000..b100cbf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test403/A_out.js
@@ -0,0 +1,6 @@
+public class A {
+ void foo(String title, Object test) {
+ System.out.println( title + " world" ); //$NON-NLS-1$
+ System.out.println( test.toString() );
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test404/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test404/A_in.js
new file mode 100644
index 0000000..1244f3b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test404/A_in.js
@@ -0,0 +1,6 @@
+public class A {
+ void foo(String title, Object test) {
+ System.out.println(title + " world"); //$NON-NLS-1$
+ System.out.println(test.toString());
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test404/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test404/A_out.js
new file mode 100644
index 0000000..6ec96a6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test404/A_out.js
@@ -0,0 +1,6 @@
+public class A {
+ void foo(String title, Object test) {
+ System.out.println( title + " world" ); //$NON-NLS-1$
+ System.out.println( test.toString( ) );
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test405/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test405/A_in.js
new file mode 100644
index 0000000..ec6daea
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test405/A_in.js
@@ -0,0 +1 @@
+package test; public class Hello {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test405/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test405/A_out.js
new file mode 100644
index 0000000..b808752
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test405/A_out.js
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+package test;
+
+public class Hello {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test406/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test406/A_in.js
new file mode 100644
index 0000000..0bd3465
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test406/A_in.js
@@ -0,0 +1,8 @@
+public class A {
+ void bar() {
+ }
+ void foo(String title, Object test) {
+ System.out.println(title + " world"); //$NON-NLS-1$
+ System.out.println(test.toString());
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test406/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test406/A_out.js
new file mode 100644
index 0000000..1e2d34c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test406/A_out.js
@@ -0,0 +1,8 @@
+public class A {
+ void bar( ) {
+ }
+ void foo(String title, Object test) {
+ System.out.println( title + " world" ); //$NON-NLS-1$
+ System.out.println( test.toString() );
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test407/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test407/A_in.js
new file mode 100644
index 0000000..9afecb6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test407/A_in.js
@@ -0,0 +1,6 @@
+void a() {
+ if (true)
+ System.out.println("a");
+ else
+ System.out.println("b");
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test407/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test407/A_out.js
new file mode 100644
index 0000000..9afecb6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test407/A_out.js
@@ -0,0 +1,6 @@
+void a() {
+ if (true)
+ System.out.println("a");
+ else
+ System.out.println("b");
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test408/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test408/A_in.js
new file mode 100644
index 0000000..37f571a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test408/A_in.js
@@ -0,0 +1,7 @@
+void a() {
+ String s = "a";
+ if (s.equals("")) //$NON-NLS-1$
+ System.out.println("a");
+ else
+ System.out.println("b");
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test408/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test408/A_out.js
new file mode 100644
index 0000000..37f571a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test408/A_out.js
@@ -0,0 +1,7 @@
+void a() {
+ String s = "a";
+ if (s.equals("")) //$NON-NLS-1$
+ System.out.println("a");
+ else
+ System.out.println("b");
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test409/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test409/A_in.js
new file mode 100644
index 0000000..52f91d2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test409/A_in.js
@@ -0,0 +1,12 @@
+switch(3)
+{
+ case 1: {
+ break;
+ }
+ case 2:{
+ break;
+ }
+ default:{
+ break;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test409/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test409/A_out.js
new file mode 100644
index 0000000..c842337
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test409/A_out.js
@@ -0,0 +1,15 @@
+switch (3)
+{
+ case 1 :
+ {
+ break;
+ }
+ case 2 :
+ {
+ break;
+ }
+ default :
+ {
+ break;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test410/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test410/A_in.js
new file mode 100644
index 0000000..9a0d30d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test410/A_in.js
@@ -0,0 +1,4 @@
+class A {
+}
+class B {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test410/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test410/A_out.js
new file mode 100644
index 0000000..a249917
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test410/A_out.js
@@ -0,0 +1,5 @@
+class A {
+}
+
+class B {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test411/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test411/A_in.js
new file mode 100644
index 0000000..9a0d30d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test411/A_in.js
@@ -0,0 +1,4 @@
+class A {
+}
+class B {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test411/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test411/A_out.js
new file mode 100644
index 0000000..53fa1f2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test411/A_out.js
@@ -0,0 +1,6 @@
+class A {
+}
+
+
+class B {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test412/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test412/A_in.js
new file mode 100644
index 0000000..69da27f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test412/A_in.js
@@ -0,0 +1,5 @@
+package p;
+;
+class A
+{
+}; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test412/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test412/A_out.js
new file mode 100644
index 0000000..dfbe041
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test412/A_out.js
@@ -0,0 +1,4 @@
+package p;
+;
+class A {
+}; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test413/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test413/A_in.js
new file mode 100644
index 0000000..fa3c915
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test413/A_in.js
@@ -0,0 +1,6 @@
+package p;
+;;;
+class A
+{
+};
+class B {};; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test413/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test413/A_out.js
new file mode 100644
index 0000000..541038d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test413/A_out.js
@@ -0,0 +1,7 @@
+package p;
+;;;
+class A {
+};
+
+class B {
+};; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test414/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test414/A_in.js
new file mode 100644
index 0000000..69da27f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test414/A_in.js
@@ -0,0 +1,5 @@
+package p;
+;
+class A
+{
+}; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test414/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test414/A_out.js
new file mode 100644
index 0000000..dfbe041
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test414/A_out.js
@@ -0,0 +1,4 @@
+package p;
+;
+class A {
+}; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test415/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test415/A_in.js
new file mode 100644
index 0000000..fa3c915
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test415/A_in.js
@@ -0,0 +1,6 @@
+package p;
+;;;
+class A
+{
+};
+class B {};; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test415/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test415/A_out.js
new file mode 100644
index 0000000..541038d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test415/A_out.js
@@ -0,0 +1,7 @@
+package p;
+;;;
+class A {
+};
+
+class B {
+};; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test416/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test416/A_in.js
new file mode 100644
index 0000000..10a19b9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test416/A_in.js
@@ -0,0 +1,6 @@
+package p;
+;;; // comment
+class A
+{
+}; // comment 2
+class B {};; /* comment3 */ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test416/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test416/A_out.js
new file mode 100644
index 0000000..a533512
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test416/A_out.js
@@ -0,0 +1,7 @@
+package p;
+;;; // comment
+class A {
+}; // comment 2
+
+class B {
+};; /* comment3 */ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test417/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test417/A_in.js
new file mode 100644
index 0000000..af46723
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test417/A_in.js
@@ -0,0 +1,6 @@
+public class A {
+ A() {
+ }
+ void foo() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test417/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test417/A_out.js
new file mode 100644
index 0000000..aecfb47
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test417/A_out.js
@@ -0,0 +1,6 @@
+public class A {
+ A () {
+ }
+ void foo() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test418/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test418/A_in.js
new file mode 100644
index 0000000..af46723
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test418/A_in.js
@@ -0,0 +1,6 @@
+public class A {
+ A() {
+ }
+ void foo() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test418/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test418/A_out.js
new file mode 100644
index 0000000..79fc3df
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test418/A_out.js
@@ -0,0 +1,6 @@
+public class A {
+ A () {
+ }
+ void foo () {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test419/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test419/A_in.js
new file mode 100644
index 0000000..1cdff48
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test419/A_in.js
@@ -0,0 +1,11 @@
+public class A {
+ private static final String EMPID_TEMPLATE =
+ "<?xml version =\"1.0\"?>\r\n" +
+ "<Request name=\"IAT.GetEmployee\">\r\n" +
+ " <Input>\r\n" +
+ " <DEMOREC1>\r\n" +
+ " <EMPID>0</EMPID>\r\n" +
+ " </DEMOREC1>\r\n" +
+ " </Input>\r\n" +
+ "</Request>";
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test419/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test419/A_out.js
new file mode 100644
index 0000000..0f0935f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test419/A_out.js
@@ -0,0 +1,11 @@
+public class A {
+ private static final String EMPID_TEMPLATE =
+ "<?xml version =\"1.0\"?>\r\n"
+ + "<Request name=\"IAT.GetEmployee\">\r\n"
+ + " <Input>\r\n"
+ + " <DEMOREC1>\r\n"
+ + " <EMPID>0</EMPID>\r\n"
+ + " </DEMOREC1>\r\n"
+ + " </Input>\r\n"
+ + "</Request>";
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test420/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test420/A_in.js
new file mode 100644
index 0000000..d28d7a4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test420/A_in.js
@@ -0,0 +1,5 @@
+public class A
+{
+ private static final UnsupportedOperationException exception = new UnsupportedOperationException();
+ protected Object m_snapshotDate = null; //null indicates that its not snapshot view
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test420/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test420/A_out.js
new file mode 100644
index 0000000..b7f67cf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test420/A_out.js
@@ -0,0 +1,4 @@
+public class A {
+ private static final UnsupportedOperationException exception = new UnsupportedOperationException();
+ protected Object m_snapshotDate = null; //null indicates that its not snapshot view
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test421/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test421/A_in.js
new file mode 100644
index 0000000..71896ed
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test421/A_in.js
@@ -0,0 +1,6 @@
+public class A {
+ void foo(String filename) {
+ Runtime.getRuntime().loadLibrary( filename );
+ System.loadLibrary( filename );
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test421/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test421/A_out.js
new file mode 100644
index 0000000..720ab91
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test421/A_out.js
@@ -0,0 +1,6 @@
+public class A {
+ void foo(String filename) {
+ Runtime.getRuntime().loadLibrary( filename );
+ System.loadLibrary( filename );
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test422/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test422/A_in.js
new file mode 100644
index 0000000..71896ed
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test422/A_in.js
@@ -0,0 +1,6 @@
+public class A {
+ void foo(String filename) {
+ Runtime.getRuntime().loadLibrary( filename );
+ System.loadLibrary( filename );
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test422/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test422/A_out.js
new file mode 100644
index 0000000..bb8b836
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test422/A_out.js
@@ -0,0 +1,7 @@
+public class A {
+
+ void foo(String filename) {
+ Runtime.getRuntime().loadLibrary( filename );
+ System.loadLibrary( filename );
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test423/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test423/A_in.js
new file mode 100644
index 0000000..1c405cd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test423/A_in.js
@@ -0,0 +1,2 @@
+public class ThisIsAClassWithALongName implements Interface1, Cloneable, Serializable {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test423/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test423/A_out.js
new file mode 100644
index 0000000..9d5c5db
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test423/A_out.js
@@ -0,0 +1,6 @@
+public class ThisIsAClassWithALongName
+ implements
+ Interface1,
+ Cloneable,
+ Serializable {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test424/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test424/A_in.js
new file mode 100644
index 0000000..1c405cd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test424/A_in.js
@@ -0,0 +1,2 @@
+public class ThisIsAClassWithALongName implements Interface1, Cloneable, Serializable {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test424/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test424/A_out.js
new file mode 100644
index 0000000..f6474d6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test424/A_out.js
@@ -0,0 +1,7 @@
+public class ThisIsAClassWithALongName
+ implements
+ Interface1,
+ Cloneable,
+ Serializable
+{
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test425/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test425/A_in.js
new file mode 100644
index 0000000..147100f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test425/A_in.js
@@ -0,0 +1,7 @@
+/**
+ *
+ *
+ *
+ */
+public class A implements Interface1, Cloneable, Serializable {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test425/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test425/A_out.js
new file mode 100644
index 0000000..147100f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test425/A_out.js
@@ -0,0 +1,7 @@
+/**
+ *
+ *
+ *
+ */
+public class A implements Interface1, Cloneable, Serializable {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test426/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test426/A_in.js
new file mode 100644
index 0000000..539d73c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test426/A_in.js
@@ -0,0 +1,5 @@
+public class A {
+
+ public void thisIsAMethodWithAVeryLongName(long l, int i, String s, Object o) throws IOException {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test426/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test426/A_out.js
new file mode 100644
index 0000000..d0d2a73
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test426/A_out.js
@@ -0,0 +1,6 @@
+public class A {
+ public void thisIsAMethodWithAVeryLongName(long l, int i, String s, Object o)
+ throws IOException
+ {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test427/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test427/A_in.js
new file mode 100644
index 0000000..5fcbb5a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test427/A_in.js
@@ -0,0 +1,5 @@
+public class A {
+
+ void thisIsAMethodWithAVeryLongName(long l, int i, String s, Object o) throws IOException {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test427/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test427/A_out.js
new file mode 100644
index 0000000..8a9617d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test427/A_out.js
@@ -0,0 +1,6 @@
+public class A {
+ void thisIsAMethodWithAVeryLongName(long l, int i, String s, Object o)
+ throws IOException
+ {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test428/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test428/A_in.js
new file mode 100644
index 0000000..46b87e6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test428/A_in.js
@@ -0,0 +1,9 @@
+public class A {
+
+ /**
+ *
+ *
+ */
+ void foo(long l, int i, String s, Object o) throws IOException {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test428/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test428/A_out.js
new file mode 100644
index 0000000..564aabd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test428/A_out.js
@@ -0,0 +1,8 @@
+public class A {
+ /**
+ *
+ *
+ */
+ void foo(long l, int i, String s, Object o) throws IOException {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test429/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test429/A_in.js
new file mode 100644
index 0000000..a64feee
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test429/A_in.js
@@ -0,0 +1,12 @@
+public class A {
+
+ /**
+ *
+ *
+ */
+ void foo(long l, int i, String s, Object o) throws IOException {
+ if (condition1 && condition2 && condition3 || condition4 && (condition5 && condition6)) {
+ System.out.println(4);
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test429/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test429/A_out.js
new file mode 100644
index 0000000..6855856
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test429/A_out.js
@@ -0,0 +1,13 @@
+public class A {
+ /**
+ *
+ *
+ */
+ void foo(long l, int i, String s, Object o) throws IOException {
+ if (condition1 && condition2 && condition3 || condition4
+ && (condition5 && condition6))
+ {
+ System.out.println(4);
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test430/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test430/A_in.js
new file mode 100644
index 0000000..d70163a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test430/A_in.js
@@ -0,0 +1,13 @@
+public class A {
+
+ /**
+ *
+ *
+ */
+ void foo(long l, int i, String s, Object o) throws IOException {
+ /* if condition */
+ if (condition1 && condition2) {
+ System.out.println(4);
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test430/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test430/A_out.js
new file mode 100644
index 0000000..df6e52d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test430/A_out.js
@@ -0,0 +1,12 @@
+public class A {
+ /**
+ *
+ *
+ */
+ void foo(long l, int i, String s, Object o) throws IOException {
+ /* if condition */
+ if (condition1 && condition2) {
+ System.out.println(4);
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test431/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test431/A_in.js
new file mode 100644
index 0000000..8771095
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test431/A_in.js
@@ -0,0 +1,6 @@
+public class A {
+
+ void foo() {
+ for (;;);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test431/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test431/A_out.js
new file mode 100644
index 0000000..40a2b56
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test431/A_out.js
@@ -0,0 +1,5 @@
+public class A {
+ void foo() {
+ for (;;);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test432/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test432/A_in.js
new file mode 100644
index 0000000..17c0332
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test432/A_in.js
@@ -0,0 +1,838 @@
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2002-2003 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ * any, must include the following acknowledgement:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgement may appear in the software itself,
+ * if and wherever such third-party acknowledgements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Commons", and "Apache Software
+ * Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ * nor may "Apache" appear in their names without prior written
+ * permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+package org.apache.commons.lang.builder;
+
+import java.lang.reflect.AccessibleObject;
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.util.HashSet;
+import java.util.Set;
+import org.apache.commons.lang.ClassUtils;
+
+/**
+ * <p>
+ * Assists in implementing {@link Object#toString()}methods using reflection.
+ * </p>
+ *
+ * <p>
+ * This class uses reflection to determine the fields to append. Because these
+ * fields are usually private, the class uses
+ * {@link java.lang.reflect.AccessibleObject#setAccessible(java.lang.reflect.AccessibleObject[], boolean)}
+ * to change the visibility of the fields. This will fail under a security
+ * manager, unless the appropriate permissions are set up correctly.
+ * </p>
+ *
+ * <p>
+ * A typical invocation for this method would look like:
+ * </p>
+ *
+ * <pre>
+ * public String toString() {
+ * return ReflectionToStringBuilder.toString(this);
+ * }</pre>
+ *
+ *
+ *
+ * <p>
+ * You can also use the builder to debug 3rd party objects:
+ * </p>
+ *
+ * <pre>
+ * System.out.println("An object: " + ReflectionToStringBuilder.toString(anObject));</pre>
+ *
+ *
+ *
+ * <p>
+ * A subclass can control field output by overriding the methods:
+ * <ul>
+ * <li>{@link #accept(java.lang.reflect.Field)}</li>
+ * <li>{@link #getValue(java.lang.reflect.Field)}</li>
+ * </ul>
+ * </p>
+ * <p>
+ * For example, this method does <i>not</i> include the <code>password</code>
+ * field in the returned <code>String</code>:
+ * </p>
+ *
+ * <pre>
+ * public String toString() {
+ * return (new ReflectionToStringBuilder(this) {
+ * protected boolean accept(Field f) {
+ * return super.accept(f) && !f.getName().equals("password");
+ * }
+ * }).toString();
+ * }</pre>
+ *
+ *
+ *
+ * <p>
+ * The exact format of the <code>toString</code> is determined by the
+ * {@link ToStringStyle}passed into the constructor.
+ * </p>
+ *
+ * @author Gary Gregory
+ * @author Stephen Colebourne
+ * @author Pete Gieser
+ * @since 2.0
+ * @version $Id: ReflectionToStringBuilder.java,v 1.15 2003/12/02 19:11:58
+ * ggregory Exp $
+ */
+public class ReflectionToStringBuilder extends ToStringBuilder {
+ /**
+ * <p>
+ * A registry of objects used by <code>reflectionToString</code> methods
+ * to detect cyclical object references and avoid infinite loops.
+ * </p>
+ */
+ private static ThreadLocal registry = new ThreadLocal() {
+ protected synchronized Object initialValue() {
+ // The HashSet implementation is not synchronized,
+ // which is just what we need here.
+ return new HashSet();
+ }
+ };
+
+ /**
+ * <p>
+ * Returns the registry of objects being traversed by the <code>reflectionToString</code>
+ * methods in the current thread.
+ * </p>
+ *
+ * @return Set the registry of objects being traversed
+ */
+ static Set getRegistry() {
+ return (Set) registry.get();
+ }
+
+ /**
+ * <p>
+ * Returns <code>true</code> if the registry contains the given object.
+ * Used by the reflection methods to avoid infinite loops.
+ * </p>
+ *
+ * @param value
+ * The object to lookup in the registry.
+ * @return boolean <code>true</code> if the registry contains the given
+ * object.
+ */
+ static boolean isRegistered(Object value) {
+ return getRegistry().contains(value);
+ }
+
+ /**
+ * <p>
+ * Registers the given object. Used by the reflection methods to avoid
+ * infinite loops.
+ * </p>
+ *
+ * @param value
+ * The object to register.
+ */
+ static void register(Object value) {
+ getRegistry().add(value);
+ }
+
+ /**
+ * <p>
+ * This method uses reflection to build a suitable <code>toString</code>
+ * using the default <code>ToStringStyle</code>.
+ *
+ * <p>
+ * It uses <code>AccessibleObject.setAccessible</code> to gain access to
+ * private fields. This means that it will throw a security exception if
+ * run under a security manager, if the permissions are not set up
+ * correctly. It is also not as efficient as testing explicitly.
+ * </p>
+ *
+ * <p>
+ * Transient members will be not be included, as they are likely derived.
+ * Static fields will not be included. Superclass fields will be appended.
+ * </p>
+ *
+ * @param object
+ * the Object to be output
+ * @return the String result
+ * @throws IllegalArgumentException
+ * if the Object is <code>null</code>
+ */
+ public static String toString(Object object) {
+ return toString(object, null, false, false, null);
+ }
+
+ /**
+ * <p>
+ * This method uses reflection to build a suitable <code>toString</code>.
+ * </p>
+ *
+ * <p>
+ * It uses <code>AccessibleObject.setAccessible</code> to gain access to
+ * private fields. This means that it will throw a security exception if
+ * run under a security manager, if the permissions are not set up
+ * correctly. It is also not as efficient as testing explicitly.
+ * </p>
+ *
+ * <p>
+ * Transient members will be not be included, as they are likely derived.
+ * Static fields will not be included. Superclass fields will be appended.
+ * </p>
+ *
+ * <p>
+ * If the style is <code>null</code>, the default <code>ToStringStyle</code>
+ * is used.
+ * </p>
+ *
+ * @param object
+ * the Object to be output
+ * @param style
+ * the style of the <code>toString</code> to create, may be
+ * <code>null</code>
+ * @return the String result
+ * @throws IllegalArgumentException
+ * if the Object or <code>ToStringStyle</code> is <code>null</code>
+ */
+ public static String toString(Object object, ToStringStyle style) {
+ return toString(object, style, false, false, null);
+ }
+
+ /**
+ * <p>
+ * This method uses reflection to build a suitable <code>toString</code>.
+ * </p>
+ *
+ * <p>
+ * It uses <code>AccessibleObject.setAccessible</code> to gain access to
+ * private fields. This means that it will throw a security exception if
+ * run under a security manager, if the permissions are not set up
+ * correctly. It is also not as efficient as testing explicitly.
+ * </p>
+ *
+ * <p>
+ * If the <code>outputTransients</code> is <code>true</code>,
+ * transient members will be output, otherwise they are ignored, as they
+ * are likely derived fields, and not part of the value of the Object.
+ * </p>
+ *
+ * <p>
+ * Static fields will not be included. Superclass fields will be appended.
+ * </p>
+ *
+ * <p>
+ * If the style is <code>null</code>, the default <code>ToStringStyle</code>
+ * is used.
+ * </p>
+ *
+ * @param object
+ * the Object to be output
+ * @param style
+ * the style of the <code>toString</code> to create, may be
+ * <code>null</code>
+ * @param outputTransients
+ * whether to include transient fields
+ * @return the String result
+ * @throws IllegalArgumentException
+ * if the Object is <code>null</code>
+ */
+ public static String toString(Object object, ToStringStyle style, boolean outputTransients) {
+ return toString(object, style, outputTransients, false, null);
+ }
+
+ /**
+ * <p>
+ * This method uses reflection to build a suitable <code>toString</code>.
+ * </p>
+ *
+ * <p>
+ * It uses <code>AccessibleObject.setAccessible</code> to gain access to
+ * private fields. This means that it will throw a security exception if
+ * run under a security manager, if the permissions are not set up
+ * correctly. It is also not as efficient as testing explicitly.
+ * </p>
+ *
+ * <p>
+ * If the <code>outputTransients</code> is <code>true</code>,
+ * transient fields will be output, otherwise they are ignored, as they are
+ * likely derived fields, and not part of the value of the Object.
+ * </p>
+ *
+ * <p>
+ * If the <code>outputStatics</code> is <code>true</code>, static
+ * fields will be output, otherwise they are ignored.
+ * </p>
+ *
+ * <p>
+ * Static fields will not be included. Superclass fields will be appended.
+ * </p>
+ *
+ * <p>
+ * If the style is <code>null</code>, the default <code>ToStringStyle</code>
+ * is used.
+ * </p>
+ *
+ * @param object
+ * the Object to be output
+ * @param style
+ * the style of the <code>toString</code> to create, may be
+ * <code>null</code>
+ * @param outputTransients
+ * whether to include transient fields
+ * @param outputStatics
+ * whether to include transient fields
+ * @return the String result
+ * @throws IllegalArgumentException
+ * if the Object is <code>null</code>
+ */
+ public static String toString(Object object, ToStringStyle style, boolean outputTransients, boolean outputStatics) {
+ return toString(object, style, outputTransients, outputStatics, null);
+ }
+
+ /**
+ * <p>
+ * This method uses reflection to build a suitable <code>toString</code>.
+ * </p>
+ *
+ * <p>
+ * It uses <code>AccessibleObject.setAccessible</code> to gain access to
+ * private fields. This means that it will throw a security exception if
+ * run under a security manager, if the permissions are not set up
+ * correctly. It is also not as efficient as testing explicitly.
+ * </p>
+ *
+ * <p>
+ * If the <code>outputTransients</code> is <code>true</code>,
+ * transient fields will be output, otherwise they are ignored, as they are
+ * likely derived fields, and not part of the value of the Object.
+ * </p>
+ *
+ * <p>
+ * If the <code>outputStatics</code> is <code>true</code>, static
+ * fields will be output, otherwise they are ignored.
+ * </p>
+ *
+ * <p>
+ * Superclass fields will be appended up to and including the specified
+ * superclass. A null superclass is treated as <code>java.lang.Object</code>.
+ * </p>
+ *
+ * <p>
+ * If the style is <code>null</code>, the default <code>ToStringStyle</code>
+ * is used.
+ * </p>
+ *
+ * @param object
+ * the Object to be output
+ * @param style
+ * the style of the <code>toString</code> to create, may be
+ * <code>null</code>
+ * @param outputTransients
+ * whether to include transient fields
+ * @param outputStatics
+ * whether to include static fields
+ * @param reflectUpToClass
+ * the superclass to reflect up to (inclusive), may be <code>null</code>
+ * @return the String result
+ * @throws IllegalArgumentException
+ * if the Object is <code>null</code>
+ */
+ public static String toString(Object object, ToStringStyle style, boolean outputTransients, boolean outputStatics,
+ Class reflectUpToClass) {
+ return new ReflectionToStringBuilder(object, style, null, reflectUpToClass, outputTransients, outputStatics)
+ .toString();
+ }
+
+ /**
+ * <p>
+ * This method uses reflection to build a suitable <code>toString</code>.
+ * </p>
+ *
+ * <p>
+ * It uses <code>AccessibleObject.setAccessible</code> to gain access to
+ * private fields. This means that it will throw a security exception if
+ * run under a security manager, if the permissions are not set up
+ * correctly. It is also not as efficient as testing explicitly.
+ * </p>
+ *
+ * <p>
+ * If the <code>outputTransients</code> is <code>true</code>,
+ * transient members will be output, otherwise they are ignored, as they
+ * are likely derived fields, and not part of the value of the Object.
+ * </p>
+ *
+ * <p>
+ * Static fields will not be included. Superclass fields will be appended
+ * up to and including the specified superclass. A null superclass is
+ * treated as <code>java.lang.Object</code>.
+ * </p>
+ *
+ * <p>
+ * If the style is <code>null</code>, the default <code>ToStringStyle</code>
+ * is used.
+ * </p>
+ *
+ * @deprecated Use
+ * {@link #toString(Object,ToStringStyle,boolean,boolean,Class)}
+ *
+ * @param object
+ * the Object to be output
+ * @param style
+ * the style of the <code>toString</code> to create, may be
+ * <code>null</code>
+ * @param outputTransients
+ * whether to include transient fields
+ * @param reflectUpToClass
+ * the superclass to reflect up to (inclusive), may be <code>null</code>
+ * @return the String result
+ * @throws IllegalArgumentException
+ * if the Object is <code>null</code>
+ */
+ public static String toString(Object object, ToStringStyle style, boolean outputTransients, Class reflectUpToClass) {
+ return new ReflectionToStringBuilder(object, style, null, reflectUpToClass, outputTransients).toString();
+ }
+
+ /**
+ * <p>
+ * Unregisters the given object.
+ * </p>
+ *
+ * <p>
+ * Used by the reflection methods to avoid infinite loops.
+ * </p>
+ *
+ * @param value
+ * The object to unregister.
+ */
+ static void unregister(Object value) {
+ getRegistry().remove(value);
+ }
+
+ /**
+ * Whether or not to append static fields.
+ */
+ private boolean appendStatics = false;
+
+ /**
+ * Whether or not to append transient fields.
+ */
+ private boolean appendTransients = false;
+
+ /**
+ * The last super class to stop appending fields for.
+ */
+ private Class upToClass = null;
+
+ /**
+ * <p>
+ * Constructor.
+ * </p>
+ *
+ * <p>
+ * This constructor outputs using the default style set with <code>setDefaultStyle</code>.
+ * </p>
+ *
+ * @param object
+ * the Object to build a <code>toString</code> for, must not
+ * be <code>null</code>
+ * @throws IllegalArgumentException
+ * if the Object passed in is <code>null</code>
+ */
+ public ReflectionToStringBuilder(Object object) {
+ super(object);
+ }
+
+ /**
+ * <p>
+ * Constructor.
+ * </p>
+ *
+ * <p>
+ * If the style is <code>null</code>, the default style is used.
+ * </p>
+ *
+ * @param object
+ * the Object to build a <code>toString</code> for, must not
+ * be <code>null</code>
+ * @param style
+ * the style of the <code>toString</code> to create, may be
+ * <code>null</code>
+ * @throws IllegalArgumentException
+ * if the Object passed in is <code>null</code>
+ */
+ public ReflectionToStringBuilder(Object object, ToStringStyle style) {
+ super(object, style);
+ }
+
+ /**
+ * <p>
+ * Constructor.
+ * </p>
+ *
+ * <p>
+ * If the style is <code>null</code>, the default style is used.
+ * </p>
+ *
+ * <p>
+ * If the buffer is <code>null</code>, a new one is created.
+ * </p>
+ *
+ * @param object
+ * the Object to build a <code>toString</code> for, must not
+ * be <code>null</code>
+ * @param style
+ * the style of the <code>toString</code> to create, may be
+ * <code>null</code>
+ * @param buffer
+ * the <code>StringBuffer</code> to populate, may be <code>null</code>
+ * @throws IllegalArgumentException
+ * if the Object passed in is <code>null</code>
+ */
+ public ReflectionToStringBuilder(Object object, ToStringStyle style, StringBuffer buffer) {
+ super(object, style, buffer);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @deprecated Use
+ * {@link #ReflectionToStringBuilder(Object,ToStringStyle,StringBuffer,Class,boolean,boolean)}.
+ *
+ * @param object
+ * the Object to build a <code>toString</code> for, must not
+ * be <code>null</code>
+ * @param style
+ * the style of the <code>toString</code> to create, may be
+ * <code>null</code>
+ * @param buffer
+ * the <code>StringBuffer</code> to populate, may be <code>null</code>
+ * @param reflectUpToClass
+ * the superclass to reflect up to (inclusive), may be <code>null</code>
+ * @param outputTransients
+ * whether to include transient fields
+ */
+ public ReflectionToStringBuilder(Object object, ToStringStyle style, StringBuffer buffer, Class reflectUpToClass,
+ boolean outputTransients) {
+ super(object, style, buffer);
+ this.setUpToClass(reflectUpToClass);
+ this.setAppendTransients(outputTransients);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param object
+ * the Object to build a <code>toString</code> for, must not
+ * be <code>null</code>
+ * @param style
+ * the style of the <code>toString</code> to create, may be
+ * <code>null</code>
+ * @param buffer
+ * the <code>StringBuffer</code> to populate, may be <code>null</code>
+ * @param reflectUpToClass
+ * the superclass to reflect up to (inclusive), may be <code>null</code>
+ * @param outputTransients
+ * whether to include transient fields
+ * @param outputStatics
+ * whether to include static fields
+ */
+ public ReflectionToStringBuilder(Object object, ToStringStyle style, StringBuffer buffer, Class reflectUpToClass,
+ boolean outputTransients, boolean outputStatics) {
+ super(object, style, buffer);
+ this.setUpToClass(reflectUpToClass);
+ this.setAppendTransients(outputTransients);
+ this.setAppendStatics(outputStatics);
+ }
+
+ /**
+ * Returns whether or not to append the given <code>Field</code>.
+ * <ul>
+ * <li>Transient fields are appended only if {@link #isAppendTransients()}
+ * returns <code>true</code>.
+ * <li>Static fields are appended only if {@link #isAppendStatics()}
+ * returns <code>true</code>.
+ * <li>Inner class fields are not appened.</li>
+ * </ul>
+ *
+ * @param field
+ * The Field to test.
+ * @return Whether or not to append the given <code>Field</code>.
+ */
+ protected boolean accept(Field field) {
+ if (field.getName().indexOf(ClassUtils.INNER_CLASS_SEPARATOR_CHAR) != -1) {
+ // Reject field from inner class.
+ return false;
+ }
+ if (Modifier.isTransient(field.getModifiers()) && !this.isAppendTransients()) {
+ // transients.
+ return false;
+ }
+ if (Modifier.isStatic(field.getModifiers()) && !this.isAppendStatics()) {
+ // transients.
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * <p>
+ * Appends the fields and values defined by the given object of the given
+ * Class.
+ * </p>
+ *
+ * <p>
+ * If a cycle is detected as an object is &quot;toString()'ed&quot;, such
+ * an object is rendered as if <code>Object.toString()</code> had been
+ * called and not implemented by the object.
+ * </p>
+ *
+ * @param clazz
+ * The class of object parameter
+ */
+ protected void appendFieldsIn(Class clazz) {
+ if (isRegistered(this.getObject())) {
+ // The object has already been appended, therefore we have an
+ // object cycle.
+ // Append a simple Object.toString style string. The field name is
+ // already appended at this point.
+ this.appendAsObjectToString(this.getObject());
+ return;
+ }
+ try {
+ this.registerObject();
+ if (clazz.isArray()) {
+ this.reflectionAppendArray(this.getObject());
+ return;
+ }
+ Field[] fields = clazz.getDeclaredFields();
+ AccessibleObject.setAccessible(fields, true);
+ for (int i = 0; i < fields.length; i++) {
+ Field field = fields[i];
+ String fieldName = field.getName();
+ if (this.accept(field)) {
+ try {
+ // Warning: Field.get(Object) creates wrappers objects
+ // for primitive types.
+ Object fieldValue = this.getValue(field);
+ if (isRegistered(fieldValue) && !field.getType().isPrimitive()) {
+ // A known field value has already been appended,
+ // therefore we have an object cycle,
+ // append a simple Object.toString style string.
+ this.getStyle().appendFieldStart(this.getStringBuffer(), fieldName);
+ this.appendAsObjectToString(fieldValue);
+ // The recursion out of
+ // builder.append(fieldName, fieldValue);
+ // below will append the field
+ // end marker.
+ } else {
+ try {
+ this.registerObject();
+ this.append(fieldName, fieldValue);
+ } finally {
+ this.unregisterObject();
+ }
+ }
+ } catch (IllegalAccessException ex) {
+ //this can't happen. Would get a Security exception
+ // instead
+ //throw a runtime exception in case the impossible
+ // happens.
+ throw new InternalError("Unexpected IllegalAccessException: " + ex.getMessage());
+ }
+ }
+ }
+ } finally {
+ this.unregisterObject();
+ }
+ }
+
+ /**
+ * <p>
+ * Gets the last super class to stop appending fields for.
+ * </p>
+ *
+ * @return The last super class to stop appending fields for.
+ */
+ public Class getUpToClass() {
+ return this.upToClass;
+ }
+
+ /**
+ * <p>
+ * Calls <code>java.lang.reflect.Field.get(Object)</code>.
+ * </p>
+ *
+ * @param field
+ * The Field to query.
+ * @return The Object from the given Field.
+ *
+ * @throws IllegalArgumentException
+ * see {@link java.lang.reflect.Field#get(Object)}
+ * @throws IllegalAccessException
+ * see {@link java.lang.reflect.Field#get(Object)}
+ *
+ * @see java.lang.reflect.Field#get(Object)
+ */
+ protected Object getValue(Field field) throws IllegalArgumentException, IllegalAccessException {
+ return field.get(this.getObject());
+ }
+
+ /**
+ * <p>
+ * Gets whether or not to append static fields.
+ * </p>
+ *
+ * @return Whether or not to append static fields.
+ */
+ public boolean isAppendStatics() {
+ return this.appendStatics;
+ }
+
+ /**
+ * <p>
+ * Gets whether or not to append transient fields.
+ * </p>
+ *
+ * @return Whether or not to append transient fields.
+ */
+ public boolean isAppendTransients() {
+ return this.appendTransients;
+ }
+
+ /**
+ * <p>
+ * Append to the <code>toString</code> an <code>Object</code> array.
+ * </p>
+ *
+ * @param array
+ * the array to add to the <code>toString</code>
+ * @return this
+ */
+ public ToStringBuilder reflectionAppendArray(Object array) {
+ this.getStyle().reflectionAppendArrayDetail(this.getStringBuffer(), null, array);
+ return this;
+ }
+
+ /**
+ * <p>
+ * Registers this builder's source object to avoid infinite loops when
+ * processing circular object references.
+ * </p>
+ */
+ void registerObject() {
+ register(this.getObject());
+ }
+
+ /**
+ * <p>
+ * Sets whether or not to append static fields.
+ * </p>
+ *
+ * @param appendStatics
+ * Whether or not to append static fields.
+ */
+ public void setAppendStatics(boolean appendStatics) {
+ this.appendStatics = appendStatics;
+ }
+
+ /**
+ * <p>
+ * Sets whether or not to append transient fields.
+ * </p>
+ *
+ * @param appendTransients
+ * Whether or not to append transient fields.
+ */
+ public void setAppendTransients(boolean appendTransients) {
+ this.appendTransients = appendTransients;
+ }
+
+ /**
+ * <p>
+ * Sets the last super class to stop appending fields for.
+ * </p>
+ *
+ * @param clazz
+ * The last super class to stop appending fields for.
+ */
+ public void setUpToClass(Class clazz) {
+ this.upToClass = clazz;
+ }
+
+ /**
+ * <p>
+ * Gets the String built by this builder.
+ * </p>
+ *
+ * @return the built string
+ */
+ public String toString() {
+ if (this.getObject() == null) {
+ return this.getStyle().getNullText();
+ }
+ Class clazz = this.getObject().getClass();
+ this.appendFieldsIn(clazz);
+ while (clazz.getSuperclass() != null && clazz != this.getUpToClass()) {
+ clazz = clazz.getSuperclass();
+ this.appendFieldsIn(clazz);
+ }
+ return super.toString();
+ }
+
+ /**
+ * <p>
+ * Unregisters this builder's source object to avoid infinite loops when
+ * processing circular object references.
+ * </p>
+ */
+ void unregisterObject() {
+ unregister(this.getObject());
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test432/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test432/A_out.js
new file mode 100644
index 0000000..7123d11
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test432/A_out.js
@@ -0,0 +1,839 @@
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2002-2003 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ * any, must include the following acknowledgement:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgement may appear in the software itself,
+ * if and wherever such third-party acknowledgements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Commons", and "Apache Software
+ * Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ * nor may "Apache" appear in their names without prior written
+ * permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+
+package org.apache.commons.lang.builder;
+
+import java.lang.reflect.AccessibleObject;
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.util.HashSet;
+import java.util.Set;
+import org.apache.commons.lang.ClassUtils;
+
+/**
+ * <p>
+ * Assists in implementing {@link Object#toString()}methods using reflection.
+ * </p>
+ *
+ * <p>
+ * This class uses reflection to determine the fields to append. Because these
+ * fields are usually private, the class uses
+ * {@link java.lang.reflect.AccessibleObject#setAccessible(java.lang.reflect.AccessibleObject[], boolean)}
+ * to change the visibility of the fields. This will fail under a security
+ * manager, unless the appropriate permissions are set up correctly.
+ * </p>
+ *
+ * <p>
+ * A typical invocation for this method would look like:
+ * </p>
+ *
+ * <pre>
+ * public String toString() {
+ * return ReflectionToStringBuilder.toString(this);
+ * }</pre>
+ *
+ *
+ *
+ * <p>
+ * You can also use the builder to debug 3rd party objects:
+ * </p>
+ *
+ * <pre>
+ * System.out.println("An object: " + ReflectionToStringBuilder.toString(anObject));</pre>
+ *
+ *
+ *
+ * <p>
+ * A subclass can control field output by overriding the methods:
+ * <ul>
+ * <li>{@link #accept(java.lang.reflect.Field)}</li>
+ * <li>{@link #getValue(java.lang.reflect.Field)}</li>
+ * </ul>
+ * </p>
+ * <p>
+ * For example, this method does <i>not</i> include the <code>password</code>
+ * field in the returned <code>String</code>:
+ * </p>
+ *
+ * <pre>
+ * public String toString() {
+ * return (new ReflectionToStringBuilder(this) {
+ * protected boolean accept(Field f) {
+ * return super.accept(f) && !f.getName().equals("password");
+ * }
+ * }).toString();
+ * }</pre>
+ *
+ *
+ *
+ * <p>
+ * The exact format of the <code>toString</code> is determined by the
+ * {@link ToStringStyle}passed into the constructor.
+ * </p>
+ *
+ * @author Gary Gregory
+ * @author Stephen Colebourne
+ * @author Pete Gieser
+ * @since 2.0
+ * @version $Id: ReflectionToStringBuilder.java,v 1.15 2003/12/02 19:11:58
+ * ggregory Exp $
+ */
+public class ReflectionToStringBuilder extends ToStringBuilder {
+ /**
+ * <p>
+ * A registry of objects used by <code>reflectionToString</code> methods
+ * to detect cyclical object references and avoid infinite loops.
+ * </p>
+ */
+ private static ThreadLocal registry = new ThreadLocal() {
+ protected synchronized Object initialValue() {
+ // The HashSet implementation is not synchronized,
+ // which is just what we need here.
+ return new HashSet();
+ }
+ };
+
+ /**
+ * <p>
+ * Returns the registry of objects being traversed by the <code>reflectionToString</code>
+ * methods in the current thread.
+ * </p>
+ *
+ * @return Set the registry of objects being traversed
+ */
+ static Set getRegistry() {
+ return (Set) registry.get();
+ }
+
+ /**
+ * <p>
+ * Returns <code>true</code> if the registry contains the given object.
+ * Used by the reflection methods to avoid infinite loops.
+ * </p>
+ *
+ * @param value
+ * The object to lookup in the registry.
+ * @return boolean <code>true</code> if the registry contains the given
+ * object.
+ */
+ static boolean isRegistered(Object value) {
+ return getRegistry().contains(value);
+ }
+
+ /**
+ * <p>
+ * Registers the given object. Used by the reflection methods to avoid
+ * infinite loops.
+ * </p>
+ *
+ * @param value
+ * The object to register.
+ */
+ static void register(Object value) {
+ getRegistry().add(value);
+ }
+
+ /**
+ * <p>
+ * This method uses reflection to build a suitable <code>toString</code>
+ * using the default <code>ToStringStyle</code>.
+ *
+ * <p>
+ * It uses <code>AccessibleObject.setAccessible</code> to gain access to
+ * private fields. This means that it will throw a security exception if
+ * run under a security manager, if the permissions are not set up
+ * correctly. It is also not as efficient as testing explicitly.
+ * </p>
+ *
+ * <p>
+ * Transient members will be not be included, as they are likely derived.
+ * Static fields will not be included. Superclass fields will be appended.
+ * </p>
+ *
+ * @param object
+ * the Object to be output
+ * @return the String result
+ * @throws IllegalArgumentException
+ * if the Object is <code>null</code>
+ */
+ public static String toString(Object object) {
+ return toString(object, null, false, false, null);
+ }
+
+ /**
+ * <p>
+ * This method uses reflection to build a suitable <code>toString</code>.
+ * </p>
+ *
+ * <p>
+ * It uses <code>AccessibleObject.setAccessible</code> to gain access to
+ * private fields. This means that it will throw a security exception if
+ * run under a security manager, if the permissions are not set up
+ * correctly. It is also not as efficient as testing explicitly.
+ * </p>
+ *
+ * <p>
+ * Transient members will be not be included, as they are likely derived.
+ * Static fields will not be included. Superclass fields will be appended.
+ * </p>
+ *
+ * <p>
+ * If the style is <code>null</code>, the default <code>ToStringStyle</code>
+ * is used.
+ * </p>
+ *
+ * @param object
+ * the Object to be output
+ * @param style
+ * the style of the <code>toString</code> to create, may be
+ * <code>null</code>
+ * @return the String result
+ * @throws IllegalArgumentException
+ * if the Object or <code>ToStringStyle</code> is <code>null</code>
+ */
+ public static String toString(Object object, ToStringStyle style) {
+ return toString(object, style, false, false, null);
+ }
+
+ /**
+ * <p>
+ * This method uses reflection to build a suitable <code>toString</code>.
+ * </p>
+ *
+ * <p>
+ * It uses <code>AccessibleObject.setAccessible</code> to gain access to
+ * private fields. This means that it will throw a security exception if
+ * run under a security manager, if the permissions are not set up
+ * correctly. It is also not as efficient as testing explicitly.
+ * </p>
+ *
+ * <p>
+ * If the <code>outputTransients</code> is <code>true</code>,
+ * transient members will be output, otherwise they are ignored, as they
+ * are likely derived fields, and not part of the value of the Object.
+ * </p>
+ *
+ * <p>
+ * Static fields will not be included. Superclass fields will be appended.
+ * </p>
+ *
+ * <p>
+ * If the style is <code>null</code>, the default <code>ToStringStyle</code>
+ * is used.
+ * </p>
+ *
+ * @param object
+ * the Object to be output
+ * @param style
+ * the style of the <code>toString</code> to create, may be
+ * <code>null</code>
+ * @param outputTransients
+ * whether to include transient fields
+ * @return the String result
+ * @throws IllegalArgumentException
+ * if the Object is <code>null</code>
+ */
+ public static String toString(Object object, ToStringStyle style, boolean outputTransients) {
+ return toString(object, style, outputTransients, false, null);
+ }
+
+ /**
+ * <p>
+ * This method uses reflection to build a suitable <code>toString</code>.
+ * </p>
+ *
+ * <p>
+ * It uses <code>AccessibleObject.setAccessible</code> to gain access to
+ * private fields. This means that it will throw a security exception if
+ * run under a security manager, if the permissions are not set up
+ * correctly. It is also not as efficient as testing explicitly.
+ * </p>
+ *
+ * <p>
+ * If the <code>outputTransients</code> is <code>true</code>,
+ * transient fields will be output, otherwise they are ignored, as they are
+ * likely derived fields, and not part of the value of the Object.
+ * </p>
+ *
+ * <p>
+ * If the <code>outputStatics</code> is <code>true</code>, static
+ * fields will be output, otherwise they are ignored.
+ * </p>
+ *
+ * <p>
+ * Static fields will not be included. Superclass fields will be appended.
+ * </p>
+ *
+ * <p>
+ * If the style is <code>null</code>, the default <code>ToStringStyle</code>
+ * is used.
+ * </p>
+ *
+ * @param object
+ * the Object to be output
+ * @param style
+ * the style of the <code>toString</code> to create, may be
+ * <code>null</code>
+ * @param outputTransients
+ * whether to include transient fields
+ * @param outputStatics
+ * whether to include transient fields
+ * @return the String result
+ * @throws IllegalArgumentException
+ * if the Object is <code>null</code>
+ */
+ public static String toString(Object object, ToStringStyle style, boolean outputTransients, boolean outputStatics) {
+ return toString(object, style, outputTransients, outputStatics, null);
+ }
+
+ /**
+ * <p>
+ * This method uses reflection to build a suitable <code>toString</code>.
+ * </p>
+ *
+ * <p>
+ * It uses <code>AccessibleObject.setAccessible</code> to gain access to
+ * private fields. This means that it will throw a security exception if
+ * run under a security manager, if the permissions are not set up
+ * correctly. It is also not as efficient as testing explicitly.
+ * </p>
+ *
+ * <p>
+ * If the <code>outputTransients</code> is <code>true</code>,
+ * transient fields will be output, otherwise they are ignored, as they are
+ * likely derived fields, and not part of the value of the Object.
+ * </p>
+ *
+ * <p>
+ * If the <code>outputStatics</code> is <code>true</code>, static
+ * fields will be output, otherwise they are ignored.
+ * </p>
+ *
+ * <p>
+ * Superclass fields will be appended up to and including the specified
+ * superclass. A null superclass is treated as <code>java.lang.Object</code>.
+ * </p>
+ *
+ * <p>
+ * If the style is <code>null</code>, the default <code>ToStringStyle</code>
+ * is used.
+ * </p>
+ *
+ * @param object
+ * the Object to be output
+ * @param style
+ * the style of the <code>toString</code> to create, may be
+ * <code>null</code>
+ * @param outputTransients
+ * whether to include transient fields
+ * @param outputStatics
+ * whether to include static fields
+ * @param reflectUpToClass
+ * the superclass to reflect up to (inclusive), may be <code>null</code>
+ * @return the String result
+ * @throws IllegalArgumentException
+ * if the Object is <code>null</code>
+ */
+ public static String toString(Object object, ToStringStyle style, boolean outputTransients, boolean outputStatics,
+ Class reflectUpToClass) {
+ return new ReflectionToStringBuilder(object, style, null, reflectUpToClass, outputTransients, outputStatics)
+ .toString();
+ }
+
+ /**
+ * <p>
+ * This method uses reflection to build a suitable <code>toString</code>.
+ * </p>
+ *
+ * <p>
+ * It uses <code>AccessibleObject.setAccessible</code> to gain access to
+ * private fields. This means that it will throw a security exception if
+ * run under a security manager, if the permissions are not set up
+ * correctly. It is also not as efficient as testing explicitly.
+ * </p>
+ *
+ * <p>
+ * If the <code>outputTransients</code> is <code>true</code>,
+ * transient members will be output, otherwise they are ignored, as they
+ * are likely derived fields, and not part of the value of the Object.
+ * </p>
+ *
+ * <p>
+ * Static fields will not be included. Superclass fields will be appended
+ * up to and including the specified superclass. A null superclass is
+ * treated as <code>java.lang.Object</code>.
+ * </p>
+ *
+ * <p>
+ * If the style is <code>null</code>, the default <code>ToStringStyle</code>
+ * is used.
+ * </p>
+ *
+ * @deprecated Use
+ * {@link #toString(Object,ToStringStyle,boolean,boolean,Class)}
+ *
+ * @param object
+ * the Object to be output
+ * @param style
+ * the style of the <code>toString</code> to create, may be
+ * <code>null</code>
+ * @param outputTransients
+ * whether to include transient fields
+ * @param reflectUpToClass
+ * the superclass to reflect up to (inclusive), may be <code>null</code>
+ * @return the String result
+ * @throws IllegalArgumentException
+ * if the Object is <code>null</code>
+ */
+ public static String toString(Object object, ToStringStyle style, boolean outputTransients, Class reflectUpToClass) {
+ return new ReflectionToStringBuilder(object, style, null, reflectUpToClass, outputTransients).toString();
+ }
+
+ /**
+ * <p>
+ * Unregisters the given object.
+ * </p>
+ *
+ * <p>
+ * Used by the reflection methods to avoid infinite loops.
+ * </p>
+ *
+ * @param value
+ * The object to unregister.
+ */
+ static void unregister(Object value) {
+ getRegistry().remove(value);
+ }
+
+ /**
+ * Whether or not to append static fields.
+ */
+ private boolean appendStatics = false;
+
+ /**
+ * Whether or not to append transient fields.
+ */
+ private boolean appendTransients = false;
+
+ /**
+ * The last super class to stop appending fields for.
+ */
+ private Class upToClass = null;
+
+ /**
+ * <p>
+ * Constructor.
+ * </p>
+ *
+ * <p>
+ * This constructor outputs using the default style set with <code>setDefaultStyle</code>.
+ * </p>
+ *
+ * @param object
+ * the Object to build a <code>toString</code> for, must not
+ * be <code>null</code>
+ * @throws IllegalArgumentException
+ * if the Object passed in is <code>null</code>
+ */
+ public ReflectionToStringBuilder(Object object) {
+ super(object);
+ }
+
+ /**
+ * <p>
+ * Constructor.
+ * </p>
+ *
+ * <p>
+ * If the style is <code>null</code>, the default style is used.
+ * </p>
+ *
+ * @param object
+ * the Object to build a <code>toString</code> for, must not
+ * be <code>null</code>
+ * @param style
+ * the style of the <code>toString</code> to create, may be
+ * <code>null</code>
+ * @throws IllegalArgumentException
+ * if the Object passed in is <code>null</code>
+ */
+ public ReflectionToStringBuilder(Object object, ToStringStyle style) {
+ super(object, style);
+ }
+
+ /**
+ * <p>
+ * Constructor.
+ * </p>
+ *
+ * <p>
+ * If the style is <code>null</code>, the default style is used.
+ * </p>
+ *
+ * <p>
+ * If the buffer is <code>null</code>, a new one is created.
+ * </p>
+ *
+ * @param object
+ * the Object to build a <code>toString</code> for, must not
+ * be <code>null</code>
+ * @param style
+ * the style of the <code>toString</code> to create, may be
+ * <code>null</code>
+ * @param buffer
+ * the <code>StringBuffer</code> to populate, may be <code>null</code>
+ * @throws IllegalArgumentException
+ * if the Object passed in is <code>null</code>
+ */
+ public ReflectionToStringBuilder(Object object, ToStringStyle style, StringBuffer buffer) {
+ super(object, style, buffer);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @deprecated Use
+ * {@link #ReflectionToStringBuilder(Object,ToStringStyle,StringBuffer,Class,boolean,boolean)}.
+ *
+ * @param object
+ * the Object to build a <code>toString</code> for, must not
+ * be <code>null</code>
+ * @param style
+ * the style of the <code>toString</code> to create, may be
+ * <code>null</code>
+ * @param buffer
+ * the <code>StringBuffer</code> to populate, may be <code>null</code>
+ * @param reflectUpToClass
+ * the superclass to reflect up to (inclusive), may be <code>null</code>
+ * @param outputTransients
+ * whether to include transient fields
+ */
+ public ReflectionToStringBuilder(Object object, ToStringStyle style, StringBuffer buffer, Class reflectUpToClass,
+ boolean outputTransients) {
+ super(object, style, buffer);
+ this.setUpToClass(reflectUpToClass);
+ this.setAppendTransients(outputTransients);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param object
+ * the Object to build a <code>toString</code> for, must not
+ * be <code>null</code>
+ * @param style
+ * the style of the <code>toString</code> to create, may be
+ * <code>null</code>
+ * @param buffer
+ * the <code>StringBuffer</code> to populate, may be <code>null</code>
+ * @param reflectUpToClass
+ * the superclass to reflect up to (inclusive), may be <code>null</code>
+ * @param outputTransients
+ * whether to include transient fields
+ * @param outputStatics
+ * whether to include static fields
+ */
+ public ReflectionToStringBuilder(Object object, ToStringStyle style, StringBuffer buffer, Class reflectUpToClass,
+ boolean outputTransients, boolean outputStatics) {
+ super(object, style, buffer);
+ this.setUpToClass(reflectUpToClass);
+ this.setAppendTransients(outputTransients);
+ this.setAppendStatics(outputStatics);
+ }
+
+ /**
+ * Returns whether or not to append the given <code>Field</code>.
+ * <ul>
+ * <li>Transient fields are appended only if {@link #isAppendTransients()}
+ * returns <code>true</code>.
+ * <li>Static fields are appended only if {@link #isAppendStatics()}
+ * returns <code>true</code>.
+ * <li>Inner class fields are not appened.</li>
+ * </ul>
+ *
+ * @param field
+ * The Field to test.
+ * @return Whether or not to append the given <code>Field</code>.
+ */
+ protected boolean accept(Field field) {
+ if (field.getName().indexOf(ClassUtils.INNER_CLASS_SEPARATOR_CHAR) != -1) {
+ // Reject field from inner class.
+ return false;
+ }
+ if (Modifier.isTransient(field.getModifiers()) && !this.isAppendTransients()) {
+ // transients.
+ return false;
+ }
+ if (Modifier.isStatic(field.getModifiers()) && !this.isAppendStatics()) {
+ // transients.
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * <p>
+ * Appends the fields and values defined by the given object of the given
+ * Class.
+ * </p>
+ *
+ * <p>
+ * If a cycle is detected as an object is &quot;toString()'ed&quot;, such
+ * an object is rendered as if <code>Object.toString()</code> had been
+ * called and not implemented by the object.
+ * </p>
+ *
+ * @param clazz
+ * The class of object parameter
+ */
+ protected void appendFieldsIn(Class clazz) {
+ if (isRegistered(this.getObject())) {
+ // The object has already been appended, therefore we have an
+ // object cycle.
+ // Append a simple Object.toString style string. The field name is
+ // already appended at this point.
+ this.appendAsObjectToString(this.getObject());
+ return;
+ }
+ try {
+ this.registerObject();
+ if (clazz.isArray()) {
+ this.reflectionAppendArray(this.getObject());
+ return;
+ }
+ Field[] fields = clazz.getDeclaredFields();
+ AccessibleObject.setAccessible(fields, true);
+ for (int i = 0; i < fields.length; i++) {
+ Field field = fields[i];
+ String fieldName = field.getName();
+ if (this.accept(field)) {
+ try {
+ // Warning: Field.get(Object) creates wrappers objects
+ // for primitive types.
+ Object fieldValue = this.getValue(field);
+ if (isRegistered(fieldValue) && !field.getType().isPrimitive()) {
+ // A known field value has already been appended,
+ // therefore we have an object cycle,
+ // append a simple Object.toString style string.
+ this.getStyle().appendFieldStart(this.getStringBuffer(), fieldName);
+ this.appendAsObjectToString(fieldValue);
+ // The recursion out of
+ // builder.append(fieldName, fieldValue);
+ // below will append the field
+ // end marker.
+ } else {
+ try {
+ this.registerObject();
+ this.append(fieldName, fieldValue);
+ } finally {
+ this.unregisterObject();
+ }
+ }
+ } catch (IllegalAccessException ex) {
+ //this can't happen. Would get a Security exception
+ // instead
+ //throw a runtime exception in case the impossible
+ // happens.
+ throw new InternalError("Unexpected IllegalAccessException: " + ex.getMessage());
+ }
+ }
+ }
+ } finally {
+ this.unregisterObject();
+ }
+ }
+
+ /**
+ * <p>
+ * Gets the last super class to stop appending fields for.
+ * </p>
+ *
+ * @return The last super class to stop appending fields for.
+ */
+ public Class getUpToClass() {
+ return this.upToClass;
+ }
+
+ /**
+ * <p>
+ * Calls <code>java.lang.reflect.Field.get(Object)</code>.
+ * </p>
+ *
+ * @param field
+ * The Field to query.
+ * @return The Object from the given Field.
+ *
+ * @throws IllegalArgumentException
+ * see {@link java.lang.reflect.Field#get(Object)}
+ * @throws IllegalAccessException
+ * see {@link java.lang.reflect.Field#get(Object)}
+ *
+ * @see java.lang.reflect.Field#get(Object)
+ */
+ protected Object getValue(Field field) throws IllegalArgumentException, IllegalAccessException {
+ return field.get(this.getObject());
+ }
+
+ /**
+ * <p>
+ * Gets whether or not to append static fields.
+ * </p>
+ *
+ * @return Whether or not to append static fields.
+ */
+ public boolean isAppendStatics() {
+ return this.appendStatics;
+ }
+
+ /**
+ * <p>
+ * Gets whether or not to append transient fields.
+ * </p>
+ *
+ * @return Whether or not to append transient fields.
+ */
+ public boolean isAppendTransients() {
+ return this.appendTransients;
+ }
+
+ /**
+ * <p>
+ * Append to the <code>toString</code> an <code>Object</code> array.
+ * </p>
+ *
+ * @param array
+ * the array to add to the <code>toString</code>
+ * @return this
+ */
+ public ToStringBuilder reflectionAppendArray(Object array) {
+ this.getStyle().reflectionAppendArrayDetail(this.getStringBuffer(), null, array);
+ return this;
+ }
+
+ /**
+ * <p>
+ * Registers this builder's source object to avoid infinite loops when
+ * processing circular object references.
+ * </p>
+ */
+ void registerObject() {
+ register(this.getObject());
+ }
+
+ /**
+ * <p>
+ * Sets whether or not to append static fields.
+ * </p>
+ *
+ * @param appendStatics
+ * Whether or not to append static fields.
+ */
+ public void setAppendStatics(boolean appendStatics) {
+ this.appendStatics = appendStatics;
+ }
+
+ /**
+ * <p>
+ * Sets whether or not to append transient fields.
+ * </p>
+ *
+ * @param appendTransients
+ * Whether or not to append transient fields.
+ */
+ public void setAppendTransients(boolean appendTransients) {
+ this.appendTransients = appendTransients;
+ }
+
+ /**
+ * <p>
+ * Sets the last super class to stop appending fields for.
+ * </p>
+ *
+ * @param clazz
+ * The last super class to stop appending fields for.
+ */
+ public void setUpToClass(Class clazz) {
+ this.upToClass = clazz;
+ }
+
+ /**
+ * <p>
+ * Gets the String built by this builder.
+ * </p>
+ *
+ * @return the built string
+ */
+ public String toString() {
+ if (this.getObject() == null) {
+ return this.getStyle().getNullText();
+ }
+ Class clazz = this.getObject().getClass();
+ this.appendFieldsIn(clazz);
+ while (clazz.getSuperclass() != null && clazz != this.getUpToClass()) {
+ clazz = clazz.getSuperclass();
+ this.appendFieldsIn(clazz);
+ }
+ return super.toString();
+ }
+
+ /**
+ * <p>
+ * Unregisters this builder's source object to avoid infinite loops when
+ * processing circular object references.
+ * </p>
+ */
+ void unregisterObject() {
+ unregister(this.getObject());
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test432/formatter.xml b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test432/formatter.xml
new file mode 100644
index 0000000..bbb7cd1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test432/formatter.xml
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<profiles version="1">
+<profile name="AIS">
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_assignment_operators" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_in_if_condition" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.type_member_alignment" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_case" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_in_while_condition" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_after_imports" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.method_declaration_brace_position" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.anonymous_type_declaration_brace_position" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.number_of_empty_lines_to_preserve" value="0"/>
+<setting id="comment_format_html" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_method_open_brace" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_throws" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.qualified_allocation_expression_arguments_alignment" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.type_declaration_superclass_alignment" value="64"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.number_of_blank_lines_to_insert_at_beginning_of_method_body" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_anonymous_type_open_brace" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.block_brace_position" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_throws" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_for_paren" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.type_declaration_superinterfaces_alignment" value="64"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.tabulation.size" value="4"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.preserve_user_linebreaks" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_imports" value="1"/>
+<setting id="comment_indent_root_tags" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.compact_else_if" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation" value="2"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_while_condition" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_bracket_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_in_catch_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_member_type" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_in_synchronized_condition" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.type_declaration_brace_position" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.message_send_arguments_alignment" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.method_throws_clause_alignment" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.explicit_constructor_arguments_alignment" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_first_argument" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_messagesend_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_default" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_control_statements" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.allocation_expression_arguments_alignment" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.method_declaration_arguments_alignment" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.binary_expression_alignment" value="52"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.lineSplit" value="120"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_in_for_parens" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="insert"/>
+<setting id="comment_line_length" value="80"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_assignment_operators" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_throws" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.switch_brace_position" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_switch_condition" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.multiple_fields_alignment" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="comment_format_header" value="false"/>
+<setting id="comment_format_comments" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
+<setting id="comment_clear_blank_lines" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.array_initializer_expressions_alignment" value="52"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_block_open_brace" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_messagesend_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_block_statements" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_if_condition" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_message_send" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_block_close_brace" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_switch_open_brace" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_catch_expression" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_message_send" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_message_send" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_brackets_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.array_initializer_continuation_indentation" value="2"/>
+<setting id="comment_format_source_code" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_in_switch_condition" value="do not insert"/>
+<setting id="comment_separate_root_tags" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_open_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.message_send_selector_alignment" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.compact_if_alignment" value="52"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.array_initializer_brace_position" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.filling_space" value=" "/>
+<setting id="comment_indent_parameter_description" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_synchronized_condition" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma__in_superinterfaces" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_throws" value="insert"/>
+<setting id="comment_new_line_for_parameter" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_field" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.tabulation.char" value="space"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_package" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_method_declaration_open_paren" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_first_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_type_open_brace" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.conditional_expression_alignment" value="48"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.inset_space_between_empty_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_method" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_after_package" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma__in_superinterfaces" value="do not insert"/>
+</profile>
+</profiles>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test433/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test433/A_in.js
new file mode 100644
index 0000000..6b5447f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test433/A_in.js
@@ -0,0 +1,8 @@
+/*
+ *
+ *
+ *
+ */
+package p;
+public class A {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test433/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test433/A_out.js
new file mode 100644
index 0000000..6b5447f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test433/A_out.js
@@ -0,0 +1,8 @@
+/*
+ *
+ *
+ *
+ */
+package p;
+public class A {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test434/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test434/A_in.js
new file mode 100644
index 0000000..85c5ad4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test434/A_in.js
@@ -0,0 +1,5 @@
+public class A {
+ void foo() {
+ obj.method( a, b, c, d, e, f );
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test434/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test434/A_out.js
new file mode 100644
index 0000000..767c2ca
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test434/A_out.js
@@ -0,0 +1,10 @@
+public class A {
+ void foo() {
+ obj.method( a,
+ b,
+ c,
+ d,
+ e,
+ f );
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test435/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test435/A_in.js
new file mode 100644
index 0000000..f3e8121
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test435/A_in.js
@@ -0,0 +1,21 @@
+public class A {
+ public void temp()
+ {
+ boolean minWidthOn = true;
+ if (minWidthOn)
+ {
+ // If a user - calls this method, turn off auto resize
+ this.setAutoResizeMode(AUTO_RESIZE_OFF);
+ // int columnCount = getColumnCount();
+ int columnCount = this.getColumnModel().getColumnCount();
+ for (int i = 0; i < columnCount; i++)
+ {
+ // Get the column
+ TableColumn col = this.getColumn(this.getColumnName(i));
+ int tempSize = widestCellColumn(col);
+ // Set the minimum width for a specific column
+ col.setMinWidth(tempSize);
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test435/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test435/A_out.js
new file mode 100644
index 0000000..0cf3567
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test435/A_out.js
@@ -0,0 +1,23 @@
+public class A
+{
+
+ public void temp()
+ {
+ boolean minWidthOn = true;
+ if (minWidthOn)
+ {
+ // If a user - calls this method, turn off auto resize
+ this.setAutoResizeMode(AUTO_RESIZE_OFF);
+ // int columnCount = getColumnCount();
+ int columnCount = this.getColumnModel().getColumnCount();
+ for (int i = 0; i < columnCount; i++)
+ {
+ // Get the column
+ TableColumn col = this.getColumn(this.getColumnName(i));
+ int tempSize = widestCellColumn(col);
+ // Set the minimum width for a specific column
+ col.setMinWidth(tempSize);
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test436/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test436/A_in.js
new file mode 100644
index 0000000..e5a2f23
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test436/A_in.js
@@ -0,0 +1,33 @@
+public class A {
+ public Object getColumnDataCell(int col)
+ {
+ Object obj = "";
+ switch (col)
+ {
+ case 0 :
+ obj = getId();
+ break;
+ case 1 :
+ obj = getDistrict();
+ break;
+ case 2 :
+ obj = getPack();
+ break;
+ case 3 :
+ obj = getDen();
+ break;
+ case 4 :
+ obj = getLastName();
+ break;
+ case 5 :
+ obj = getFirstName();
+ break;
+ case 6 :
+ obj = getVehicleNumber();
+ break;
+ default :
+ break;
+ }
+ return obj;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test436/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test436/A_out.js
new file mode 100644
index 0000000..e0616fb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test436/A_out.js
@@ -0,0 +1,34 @@
+public class A
+{
+
+ public Object getColumnDataCell(int col)
+ {
+ Object obj = "";
+ switch (col) {
+ case 0:
+ obj = getId();
+ break;
+ case 1:
+ obj = getDistrict();
+ break;
+ case 2:
+ obj = getPack();
+ break;
+ case 3:
+ obj = getDen();
+ break;
+ case 4:
+ obj = getLastName();
+ break;
+ case 5:
+ obj = getFirstName();
+ break;
+ case 6:
+ obj = getVehicleNumber();
+ break;
+ default:
+ break;
+ }
+ return obj;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test437/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test437/A_in.js
new file mode 100644
index 0000000..85c5ad4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test437/A_in.js
@@ -0,0 +1,5 @@
+public class A {
+ void foo() {
+ obj.method( a, b, c, d, e, f );
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test437/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test437/A_out.js
new file mode 100644
index 0000000..cce4fd0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test437/A_out.js
@@ -0,0 +1,12 @@
+public class A
+{
+ void foo()
+ {
+ obj.method( a,
+ b,
+ c,
+ d,
+ e,
+ f );
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test437/formatter.xml b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test437/formatter.xml
new file mode 100644
index 0000000..2094a1f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test437/formatter.xml
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<profiles version="1">
+<profile name="Felix">
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_assignment_operators" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_in_if_condition" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.type_member_alignment" value="256"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_in_while_condition" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_after_imports" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_method_declaration" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_anonymous_type_declaration" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
+<setting id="comment_format_html" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_method_open_brace" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_between_type_declarations" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_throws" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.qualified_allocation_expression_arguments_alignment" value="82"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.type_declaration_superclass_alignment" value="18"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.number_of_blank_lines_to_insert_at_beginning_of_method_body" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_anonymous_type_open_brace" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_prefix_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_block" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_throws" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_for_paren" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.type_declaration_superinterfaces_alignment" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.tabulation.size" value="3"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.preserve_user_linebreaks" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_imports" value="1"/>
+<setting id="comment_indent_root_tags" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.compact_else_if" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation" value="2"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_while_condition" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_bracket_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_in_catch_expression" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_member_type" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_in_synchronized_condition" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_type_declaration" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_method_invocation" value="83"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.method_throws_clause_alignment" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.explicit_constructor_arguments_alignment" value="80"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_first_argument" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_unary_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_postfix_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_control_statements" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.allocation_expression_arguments_alignment" value="80"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.method_declaration_arguments_alignment" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.binary_expression_alignment" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.lineSplit" value="120"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_in_for_parens" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="insert"/>
+<setting id="comment_line_length" value="80"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_assignment_operators" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_throws" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_switch" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_switch_condition" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.multiple_fields_alignment" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="insert"/>
+<setting id="comment_format_header" value="true"/>
+<setting id="comment_format_comments" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
+<setting id="comment_clear_blank_lines" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.array_initializer_expressions_alignment" value="52"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_block_open_brace" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_block_statements" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_if_condition" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_block_close_brace" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_switch_open_brace" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_catch_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_brackets_in_array_reference" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.array_initializer_continuation_indentation" value="2"/>
+<setting id="comment_format_source_code" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_in_switch_condition" value="insert"/>
+<setting id="comment_separate_root_tags" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.method_invocation_selector_alignment" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.compact_if_alignment" value="48"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_array_initializer" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.filling_space" value=" "/>
+<setting id="comment_indent_parameter_description" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_synchronized_condition" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma__in_superinterfaces" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_throws" value="insert"/>
+<setting id="comment_new_line_for_parameter" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_field" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.tabulation.char" value="space"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_package" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_constructor_declaration_open_paren" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_method_declaration_open_paren" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_first_initializer" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_type_open_brace" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.conditional_expression_alignment" value="32"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.inset_space_between_method_declaration_empty_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_method" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_after_package" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.remove_unnecessary_semicolon" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma__in_superinterfaces" value="do not insert"/>
+</profile>
+</profiles> \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test438/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test438/A_in.js
new file mode 100644
index 0000000..54aeae0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test438/A_in.js
@@ -0,0 +1,5 @@
+public class A {
+ void foo() {
+ obj.method1( a, b, c, d, e, f );
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test438/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test438/A_out.js
new file mode 100644
index 0000000..5fb5cb5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test438/A_out.js
@@ -0,0 +1,12 @@
+public class A
+{
+ void foo()
+ {
+ obj.method1( a,
+ b,
+ c,
+ d,
+ e,
+ f );
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test438/formatter.xml b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test438/formatter.xml
new file mode 100644
index 0000000..2094a1f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test438/formatter.xml
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<profiles version="1">
+<profile name="Felix">
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_assignment_operators" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_in_if_condition" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.type_member_alignment" value="256"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_in_while_condition" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_after_imports" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_method_declaration" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_anonymous_type_declaration" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
+<setting id="comment_format_html" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_method_open_brace" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_between_type_declarations" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_throws" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.qualified_allocation_expression_arguments_alignment" value="82"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.type_declaration_superclass_alignment" value="18"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.number_of_blank_lines_to_insert_at_beginning_of_method_body" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_anonymous_type_open_brace" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_prefix_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_block" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_throws" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_for_paren" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.type_declaration_superinterfaces_alignment" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.tabulation.size" value="3"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.preserve_user_linebreaks" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_imports" value="1"/>
+<setting id="comment_indent_root_tags" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.compact_else_if" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation" value="2"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_while_condition" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_bracket_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_in_catch_expression" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_member_type" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_in_synchronized_condition" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_type_declaration" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_method_invocation" value="83"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.method_throws_clause_alignment" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.explicit_constructor_arguments_alignment" value="80"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_first_argument" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_unary_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_postfix_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_control_statements" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.allocation_expression_arguments_alignment" value="80"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.method_declaration_arguments_alignment" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.binary_expression_alignment" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.lineSplit" value="120"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_in_for_parens" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="insert"/>
+<setting id="comment_line_length" value="80"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_assignment_operators" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_throws" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_switch" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_switch_condition" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.multiple_fields_alignment" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="insert"/>
+<setting id="comment_format_header" value="true"/>
+<setting id="comment_format_comments" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
+<setting id="comment_clear_blank_lines" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.array_initializer_expressions_alignment" value="52"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_block_open_brace" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_block_statements" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_if_condition" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_block_close_brace" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_switch_open_brace" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_catch_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_brackets_in_array_reference" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.array_initializer_continuation_indentation" value="2"/>
+<setting id="comment_format_source_code" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_in_switch_condition" value="insert"/>
+<setting id="comment_separate_root_tags" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.method_invocation_selector_alignment" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.compact_if_alignment" value="48"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_array_initializer" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.filling_space" value=" "/>
+<setting id="comment_indent_parameter_description" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_synchronized_condition" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma__in_superinterfaces" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_throws" value="insert"/>
+<setting id="comment_new_line_for_parameter" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_field" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.tabulation.char" value="space"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_package" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_constructor_declaration_open_paren" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_method_declaration_open_paren" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_first_initializer" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_type_open_brace" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.conditional_expression_alignment" value="32"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.inset_space_between_method_declaration_empty_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_method" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_after_package" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.remove_unnecessary_semicolon" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma__in_superinterfaces" value="do not insert"/>
+</profile>
+</profiles> \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test439/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test439/A_in.js
new file mode 100644
index 0000000..94c1722
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test439/A_in.js
@@ -0,0 +1,15 @@
+public class A {
+ void foo() {
+int[] x = new int[]{ 0,
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11 }; }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test439/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test439/A_out.js
new file mode 100644
index 0000000..92a9653
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test439/A_out.js
@@ -0,0 +1,21 @@
+public class A
+{
+ void foo()
+ {
+ int[] x = new int[]
+ {
+ 0,
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test439/formatter.xml b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test439/formatter.xml
new file mode 100644
index 0000000..4eb893e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test439/formatter.xml
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<profiles version="1">
+<profile name="Felix">
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_assignment_operators" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_in_if_condition" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.type_member_alignment" value="256"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_in_while_condition" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_after_imports" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_method_declaration" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_anonymous_type_declaration" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
+<setting id="comment_format_html" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_method_open_brace" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_between_type_declarations" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_throws" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.qualified_allocation_expression_arguments_alignment" value="82"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.type_declaration_superclass_alignment" value="18"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.number_of_blank_lines_to_insert_at_beginning_of_method_body" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_anonymous_type_open_brace" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_prefix_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_block" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_throws" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_for_paren" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.type_declaration_superinterfaces_alignment" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.tabulation.size" value="3"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.preserve_user_linebreaks" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_imports" value="1"/>
+<setting id="comment_indent_root_tags" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.compact_else_if" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation" value="2"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_while_condition" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_bracket_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_in_catch_expression" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_member_type" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_in_synchronized_condition" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_type_declaration" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_method_invocation" value="83"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.method_throws_clause_alignment" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.explicit_constructor_arguments_alignment" value="80"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_first_argument" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_unary_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_postfix_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_messagesend_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_control_statements" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.allocation_expression_arguments_alignment" value="80"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.method_declaration_arguments_alignment" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.binary_expression_alignment" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.lineSplit" value="120"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_in_for_parens" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_open_paren_in_parenthesized_expression" value="insert"/>
+<setting id="comment_line_length" value="80"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_assignment_operators" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_throws" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_switch" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_switch_condition" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.multiple_fields_alignment" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="insert"/>
+<setting id="comment_format_header" value="true"/>
+<setting id="comment_format_comments" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
+<setting id="comment_clear_blank_lines" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_expressions_in_array_initializer" value="53"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_block_open_brace" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_messagesend_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_block_statements" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_if_condition" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_message_send" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_block_close_brace" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_switch_open_brace" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_catch_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_within_message_send" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_brackets_in_array_reference" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.array_initializer_continuation_indentation" value="2"/>
+<setting id="comment_format_source_code" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_in_switch_condition" value="insert"/>
+<setting id="comment_separate_root_tags" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_open_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.message_send_selector_alignment" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.compact_if_alignment" value="48"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_array_initializer" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.filling_space" value=" "/>
+<setting id="comment_indent_parameter_description" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_synchronized_condition" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma__in_superinterfaces" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_throws" value="insert"/>
+<setting id="comment_new_line_for_parameter" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_field" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.tabulation.char" value="space"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_package" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_constructor_declaration_open_paren" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_method_declaration_open_paren" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_first_initializer" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_type_open_brace" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.conditional_expression_alignment" value="32"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.inset_space_between_empty_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_method" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_after_package" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.remove_unnecessary_semicolon" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma__in_superinterfaces" value="do not insert"/>
+</profile>
+</profiles> \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test440/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test440/A_in.js
new file mode 100644
index 0000000..ef57855
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test440/A_in.js
@@ -0,0 +1,5 @@
+public class A {
+ void foo() {
+ while(true);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test440/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test440/A_out.js
new file mode 100644
index 0000000..019f6f4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test440/A_out.js
@@ -0,0 +1,5 @@
+public class A {
+ void foo() {
+ while (true);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test441/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test441/A_in.js
new file mode 100644
index 0000000..40a2b56
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test441/A_in.js
@@ -0,0 +1,5 @@
+public class A {
+ void foo() {
+ for (;;);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test441/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test441/A_out.js
new file mode 100644
index 0000000..40a2b56
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test441/A_out.js
@@ -0,0 +1,5 @@
+public class A {
+ void foo() {
+ for (;;);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test442/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test442/A_in.js
new file mode 100644
index 0000000..7e8c26a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test442/A_in.js
@@ -0,0 +1,6 @@
+public class A {
+ void foo() {
+ do;
+ while (true);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test442/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test442/A_out.js
new file mode 100644
index 0000000..cb6e2b3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test442/A_out.js
@@ -0,0 +1,5 @@
+public class A {
+ void foo() {
+ do; while (true);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test443/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test443/A_in.js
new file mode 100644
index 0000000..7e8c26a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test443/A_in.js
@@ -0,0 +1,6 @@
+public class A {
+ void foo() {
+ do;
+ while (true);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test443/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test443/A_out.js
new file mode 100644
index 0000000..7e8c26a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test443/A_out.js
@@ -0,0 +1,6 @@
+public class A {
+ void foo() {
+ do;
+ while (true);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test444/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test444/A_in.js
new file mode 100644
index 0000000..ef57855
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test444/A_in.js
@@ -0,0 +1,5 @@
+public class A {
+ void foo() {
+ while(true);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test444/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test444/A_out.js
new file mode 100644
index 0000000..019f6f4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test444/A_out.js
@@ -0,0 +1,5 @@
+public class A {
+ void foo() {
+ while (true);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test445/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test445/A_in.js
new file mode 100644
index 0000000..6bee3e7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test445/A_in.js
@@ -0,0 +1,5 @@
+public class A {
+ void foo() {
+ while(true);;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test445/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test445/A_out.js
new file mode 100644
index 0000000..9b89d44
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test445/A_out.js
@@ -0,0 +1,5 @@
+public class A {
+ void foo() {
+ while (true);;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test446/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test446/A_in.js
new file mode 100644
index 0000000..c1f921b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test446/A_in.js
@@ -0,0 +1,11 @@
+class Foo
+{
+ public static final Foo KABOOM = new Foo();
+
+ private Foo() {
+ }
+
+ public Foo blowup() {
+ return(Foo.KABOOM);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test446/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test446/A_out.js
new file mode 100644
index 0000000..66d3f13
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test446/A_out.js
@@ -0,0 +1,8 @@
+class Foo {
+ public static final Foo KABOOM = new Foo();
+ private Foo() {
+ }
+ public Foo blowup() {
+ return (Foo.KABOOM);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test447/test447.zip b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test447/test447.zip
new file mode 100644
index 0000000..a86adf8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test447/test447.zip
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test448/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test448/A_in.js
new file mode 100644
index 0000000..0228ab2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test448/A_in.js
@@ -0,0 +1,6 @@
+public class Format {
+
+ public void temp() {
+ int[] tab = new int[3];
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test448/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test448/A_out.js
new file mode 100644
index 0000000..c994de2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test448/A_out.js
@@ -0,0 +1,5 @@
+public class Format {
+ public void temp() {
+ int[] tab = new int [ 3 ];
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test449/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test449/A_in.js
new file mode 100644
index 0000000..0228ab2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test449/A_in.js
@@ -0,0 +1,6 @@
+public class Format {
+
+ public void temp() {
+ int[] tab = new int[3];
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test449/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test449/A_out.js
new file mode 100644
index 0000000..78740df
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test449/A_out.js
@@ -0,0 +1,5 @@
+public class Format {
+ public void temp() {
+ int[] tab = new int[ 3 ];
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test450/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test450/A_in.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test450/A_in.js
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test450/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test450/A_out.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test450/A_out.js
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test451/test451.zip b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test451/test451.zip
new file mode 100644
index 0000000..0a40dba
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test451/test451.zip
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test452/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test452/A_in.js
new file mode 100644
index 0000000..8b9e6db
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test452/A_in.js
@@ -0,0 +1,6 @@
+/**
+ *
+ *
+ */
+package p;
+public class A {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test452/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test452/A_out.js
new file mode 100644
index 0000000..20e39eb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test452/A_out.js
@@ -0,0 +1,11 @@
+/**
+ *
+ *
+ */
+
+
+package p;
+
+
+public class A {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test453/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test453/A_in.js
new file mode 100644
index 0000000..654b1b5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test453/A_in.js
@@ -0,0 +1,7 @@
+public class A {
+ int[] tab = new int[4];
+
+ public void foo(int[] t) {
+ System.out.println(t[1]);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test453/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test453/A_out.js
new file mode 100644
index 0000000..7678e8e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test453/A_out.js
@@ -0,0 +1,8 @@
+public class A {
+
+ int[] tab = new int[4];
+
+ public void foo(int[] t) {
+ System.out.println(t[1]);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test454/test454.zip b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test454/test454.zip
new file mode 100644
index 0000000..73ca640
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test454/test454.zip
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test455/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test455/A_in.js
new file mode 100644
index 0000000..dcdfa5a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test455/A_in.js
@@ -0,0 +1,49 @@
+public class A {
+ public void launch(
+ ILaunchConfiguration configuration,
+ String mode,
+ ILaunch launch,
+ IProgressMonitor monitor)
+ throws CoreException {
+ try {
+ IJavaProject javaProject = getJavaProject(configuration);
+ if ((javaProject == null) || !javaProject.exists()) {
+ abort(PDEPlugin.getResourceString("JUnitLaunchConfiguration.error.invalidproject"), null, IJavaLaunchConfigurationConstants.ERR_NOT_A_JAVA_PROJECT); //$NON-NLS-1$
+ }
+ IType[] testTypes = getTestTypes(configuration, javaProject, new SubProgressMonitor(monitor, 1));
+ if (testTypes.length == 0) {
+ abort(PDEPlugin.getResourceString("JUnitLaunchConfiguration.error.notests"), null, IJavaLaunchConfigurationConstants.ERR_UNSPECIFIED_MAIN_TYPE); //$NON-NLS-1$
+ }
+ monitor.worked(1);
+
+ IVMInstall launcher = LauncherUtils.createLauncher(configuration);
+ monitor.worked(1);
+
+ int port = SocketUtil.findFreePort();
+ VMRunnerConfiguration runnerConfig =
+ createVMRunner(configuration, testTypes, port, mode);
+ if (runnerConfig == null) {
+ monitor.setCanceled(true);
+ return;
+ }
+ monitor.worked(1);
+
+ launch.setAttribute(
+ ILauncherSettings.CONFIG_LOCATION,
+ (configFile == null) ? null : configFile.getParent());
+
+ String workspace = configuration.getAttribute(LOCATION + "0", getDefaultWorkspace(configuration));
+ LauncherUtils.clearWorkspace(configuration,workspace);
+
+ setDefaultSourceLocator(launch, configuration);
+ launch.setAttribute(PORT_ATTR, Integer.toString(port));
+ launch.setAttribute(TESTTYPE_ATTR, testTypes[0].getHandleIdentifier());
+ PDEPlugin.getDefault().getLaunchesListener().manage(launch);
+ launcher.getVMRunner(mode).run(runnerConfig, launch, monitor);
+ monitor.worked(1);
+ } catch (CoreException e) {
+ monitor.setCanceled(true);
+ throw e;
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test455/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test455/A_out.js
new file mode 100644
index 0000000..00da379
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test455/A_out.js
@@ -0,0 +1,51 @@
+public class A {
+ public void launch(ILaunchConfiguration configuration, String mode,
+ ILaunch launch, IProgressMonitor monitor) throws CoreException {
+ try {
+ IJavaProject javaProject = getJavaProject(configuration);
+ if ((javaProject == null) || !javaProject.exists()) {
+ abort(
+ PDEPlugin
+ .getResourceString("JUnitLaunchConfiguration.error.invalidproject"), null, IJavaLaunchConfigurationConstants.ERR_NOT_A_JAVA_PROJECT); //$NON-NLS-1$
+ }
+ IType[] testTypes = getTestTypes(configuration, javaProject,
+ new SubProgressMonitor(monitor, 1));
+ if (testTypes.length == 0) {
+ abort(
+ PDEPlugin
+ .getResourceString("JUnitLaunchConfiguration.error.notests"), null, IJavaLaunchConfigurationConstants.ERR_UNSPECIFIED_MAIN_TYPE); //$NON-NLS-1$
+ }
+ monitor.worked(1);
+
+ IVMInstall launcher = LauncherUtils.createLauncher(configuration);
+ monitor.worked(1);
+
+ int port = SocketUtil.findFreePort();
+ VMRunnerConfiguration runnerConfig = createVMRunner(configuration,
+ testTypes, port, mode);
+ if (runnerConfig == null) {
+ monitor.setCanceled(true);
+ return;
+ }
+ monitor.worked(1);
+
+ launch.setAttribute(ILauncherSettings.CONFIG_LOCATION,
+ (configFile == null) ? null : configFile.getParent());
+
+ String workspace = configuration.getAttribute(LOCATION + "0",
+ getDefaultWorkspace(configuration));
+ LauncherUtils.clearWorkspace(configuration, workspace);
+
+ setDefaultSourceLocator(launch, configuration);
+ launch.setAttribute(PORT_ATTR, Integer.toString(port));
+ launch.setAttribute(TESTTYPE_ATTR, testTypes[0]
+ .getHandleIdentifier());
+ PDEPlugin.getDefault().getLaunchesListener().manage(launch);
+ launcher.getVMRunner(mode).run(runnerConfig, launch, monitor);
+ monitor.worked(1);
+ } catch (CoreException e) {
+ monitor.setCanceled(true);
+ throw e;
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test456/test456.zip b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test456/test456.zip
new file mode 100644
index 0000000..3354b63
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test456/test456.zip
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test457/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test457/A_in.js
new file mode 100644
index 0000000..9367fff
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test457/A_in.js
@@ -0,0 +1,5 @@
+public class A {
+ public void foo() {
+ final String happy = "string is a happy place" + "string is a happy place" + "string is a happy place"; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test457/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test457/A_out.js
new file mode 100644
index 0000000..9367fff
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test457/A_out.js
@@ -0,0 +1,5 @@
+public class A {
+ public void foo() {
+ final String happy = "string is a happy place" + "string is a happy place" + "string is a happy place"; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test458/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test458/A_in.js
new file mode 100644
index 0000000..d795420
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test458/A_in.js
@@ -0,0 +1 @@
+public class A {public void foo() {}} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test458/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test458/A_out.js
new file mode 100644
index 0000000..5440276
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test458/A_out.js
@@ -0,0 +1,4 @@
+public class A {
+ public void foo() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test459/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test459/A_in.js
new file mode 100644
index 0000000..e876504
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test459/A_in.js
@@ -0,0 +1,15 @@
+m_logger.info(
+ this,
+ "Subscription to ["
+ + subDetails.getGpi()
+ + "] ["
+ + subDetails.getCombinationType()
+ + "] sent to "
+ + m_exchange
+ + " OBS (subType="
+ + subDetails.getSubscriptionType()
+ + " subSubType="
+ + subDetails.getSubscriptionSubType()
+ + " subId="
+ + subDetails.getSubscriptionId()
+ + ")"); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test459/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test459/A_out.js
new file mode 100644
index 0000000..2cb32d8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test459/A_out.js
@@ -0,0 +1,15 @@
+m_logger.info(
+ this,
+ "Subscription to ["
+ + subDetails.getGpi()
+ + "] ["
+ + subDetails.getCombinationType()
+ + "] sent to "
+ + m_exchange
+ + " OBS (subType="
+ + subDetails.getSubscriptionType()
+ + " subSubType="
+ + subDetails.getSubscriptionSubType()
+ + " subId="
+ + subDetails.getSubscriptionId()
+ + ")"); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test460/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test460/A_in.js
new file mode 100644
index 0000000..121affc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test460/A_in.js
@@ -0,0 +1,31 @@
+class Example
+ extends
+ AnotherClass {
+ int foo()
+ {
+ int sum = 100
+ + 200
+ + 300
+ + 400
+ + 500
+ + 600
+ + 700
+ + 800;
+ int product = 1
+ * 2
+ * 3
+ * 4
+ * 5
+ * 6
+ * 7
+ * 8
+ * 9
+ * 10;
+ boolean val = true
+ && false
+ && true
+ && false
+ && true;
+ return product / sum;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test460/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test460/A_out.js
new file mode 100644
index 0000000..71c73ac
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test460/A_out.js
@@ -0,0 +1,8 @@
+class Example extends AnotherClass {
+ int foo() {
+ int sum = 100 + 200 + 300 + 400 + 500 + 600 + 700 + 800;
+ int product = 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10;
+ boolean val = true && false && true && false && true;
+ return product / sum;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test461/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test461/A_in.js
new file mode 100644
index 0000000..8746d36
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test461/A_in.js
@@ -0,0 +1,9 @@
+public class XXX {
+ public void foo() {
+ int x = 0, y = 0;
+ if (true)
+ x = 1;//XXX
+ else
+ y = 10;//YYY
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test461/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test461/A_out.js
new file mode 100644
index 0000000..a806324
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test461/A_out.js
@@ -0,0 +1,9 @@
+public class XXX {
+ public void foo() {
+ int x = 0, y = 0;
+ if (true)
+ x = 1;//XXX
+ else
+ y = 10;//YYY
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test462/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test462/A_in.js
new file mode 100644
index 0000000..ec96813
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test462/A_in.js
@@ -0,0 +1,15 @@
+ m_logger.info(
+ this,
+ "Subscription to ["
+ + subDetails.getGpi()
+ + "] ["
+ + subDetails.getCombinationType()
+ + "] sent to "
+ + m_exchange
+ + " OBS (subType="
+ + subDetails.getSubscriptionType()
+ + " subSubType="
+ + subDetails.getSubscriptionSubType()
+ + " subId="
+ + subDetails.getSubscriptionId()
+ + ")"); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test462/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test462/A_out.js
new file mode 100644
index 0000000..6dc1906
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test462/A_out.js
@@ -0,0 +1,15 @@
+m_logger.info(
+ this,
+ "Subscription to ["
+ + subDetails.getGpi()
+ + "] ["
+ + subDetails.getCombinationType()
+ + "] sent to "
+ + m_exchange
+ + " OBS (subType="
+ + subDetails.getSubscriptionType()
+ + " subSubType="
+ + subDetails.getSubscriptionSubType()
+ + " subId="
+ + subDetails.getSubscriptionId()
+ + ")"); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test462/formatter.xml b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test462/formatter.xml
new file mode 100644
index 0000000..d949ae5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test462/formatter.xml
@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<profiles version="4">
+<profile name="neils" version="4">
+<setting id="comment_clear_blank_lines" value="true"/>
+<setting id="comment_format_comments" value="true"/>
+<setting id="comment_format_header" value="true"/>
+<setting id="comment_format_html" value="true"/>
+<setting id="comment_format_source_code" value="true"/>
+<setting id="comment_indent_parameter_description" value="true"/>
+<setting id="comment_indent_root_tags" value="true"/>
+<setting id="comment_line_length" value="80"/>
+<setting id="comment_new_line_for_parameter" value="true"/>
+<setting id="comment_separate_root_tags" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.align_type_members_on_columns" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="48"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="48"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_method_invocation" value="48"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_binary_expression" value="48"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_compact_if" value="48"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_conditional_expression" value="48"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_expressions_in_array_initializer" value="48"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_multiple_fields" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="48"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_parameters_in_method_declaration" value="48"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_superclass_in_type_declaration" value="48"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="48"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="48"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="48"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_after_imports" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_after_package" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_field" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_imports" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_member_type" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_method" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_package" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_block" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_constructor_declaration" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_method_declaration" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_switch" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_type_declaration" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.compact_else_if" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation_for_array_initializer" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.filling_space" value=" "/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.format_guardian_clause_on_one_line" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_block_statements" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_control_statements" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_block" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_method_body" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_type_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_default" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_imple_if_on_one_line" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.lineSplit" value="80"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.preserve_user_linebreaks" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.put_empty_statement_on_new_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.remove_unnecessary_semicolon" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.tabulation.char" value="space"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.tabulation.size" value="2"/>
+</profile>
+</profiles>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test463/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test463/A_in.js
new file mode 100644
index 0000000..8d5bf85
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test463/A_in.js
@@ -0,0 +1,10 @@
+protected String createWhereClause() {
+ whereClause.append(getColumnSQL(FNS_NUMBER)).append(getColumnSQLWidthLikeOrEquals(MEAL_SERVICE_NAME))
+ .append(getColumnSQL(MEAL_SERVICE_STATUS)).append(getColumnSQL(MEAL_SERVICE_TYPE)).append(
+ getColumnSQLWithBetween(APPLICATION_REQUEST_BEGIN_DATE)).append(getColumnSQL(MAILING_ADDRESS_ID))
+ .append(getColumnSQL(MEAL_SITE_ENTITY_ID)).append(getColumnSQLWithInClause(FIELD_OFFICES))
+ .append(getColumnSQL(EIN)).append(getColumnSQL(PERSON_ROLE_PERSON_ID)).append(
+ getColumnSQL(PERSON_ROLE_ID)).append(getColumnSQL(REGION_ID));
+
+ return whereClause.toString();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test463/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test463/A_out.js
new file mode 100644
index 0000000..71e35c5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test463/A_out.js
@@ -0,0 +1,16 @@
+protected String createWhereClause() {
+ whereClause
+ .append(getColumnSQL(FNS_NUMBER))
+ .append(getColumnSQLWidthLikeOrEquals(MEAL_SERVICE_NAME))
+ .append(getColumnSQL(MEAL_SERVICE_STATUS))
+ .append(getColumnSQL(MEAL_SERVICE_TYPE))
+ .append(getColumnSQLWithBetween(APPLICATION_REQUEST_BEGIN_DATE))
+ .append(getColumnSQL(MAILING_ADDRESS_ID))
+ .append(getColumnSQL(MEAL_SITE_ENTITY_ID))
+ .append(getColumnSQLWithInClause(FIELD_OFFICES))
+ .append(getColumnSQL(EIN))
+ .append(getColumnSQL(PERSON_ROLE_PERSON_ID))
+ .append(getColumnSQL(PERSON_ROLE_ID))
+ .append(getColumnSQL(REGION_ID));
+ return whereClause.toString();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test464/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test464/A_in.js
new file mode 100644
index 0000000..6643f05
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test464/A_in.js
@@ -0,0 +1,5 @@
+void bar(List v) {
+ for(int i = 0; i < 10; i++ ) {
+ v.add(new Integer(i));
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test464/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test464/A_out.js
new file mode 100644
index 0000000..87af4f0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test464/A_out.js
@@ -0,0 +1,7 @@
+void bar( List v )
+{
+ for ( int i = 0; i < 10; i++ )
+ {
+ v.add( new Integer( i ) );
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test465/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test465/A_in.js
new file mode 100644
index 0000000..ebbcead
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test465/A_in.js
@@ -0,0 +1,4 @@
+scope.problemReporter().typeMismatchErrorActualTypeExpectedType(
+ enclosingInstance,
+ enclosingInstanceType,
+ inheritedBinding.declaringClass.enclosingType()); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test465/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test465/A_out.js
new file mode 100644
index 0000000..6c77810
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test465/A_out.js
@@ -0,0 +1,4 @@
+scope.problemReporter().typeMismatchErrorActualTypeExpectedType(
+ enclosingInstance,
+ enclosingInstanceType,
+ inheritedBinding.declaringClass.enclosingType()); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test466/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test466/A_in.js
new file mode 100644
index 0000000..80fbff1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test466/A_in.js
@@ -0,0 +1,5 @@
+scope.problemReporter(
+ enclosingInstance,
+ enclosingInstanceType,
+ inheritedBinding.declaringClass.enclosingType())
+ .typeMismatchErrorActualTypeExpectedType(); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test466/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test466/A_out.js
new file mode 100644
index 0000000..dd52775
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test466/A_out.js
@@ -0,0 +1,6 @@
+scope
+ .problemReporter(
+ enclosingInstance,
+ enclosingInstanceType,
+ inheritedBinding.declaringClass.enclosingType())
+ .typeMismatchErrorActualTypeExpectedType(); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test467/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test467/A_in.js
new file mode 100644
index 0000000..d188be1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test467/A_in.js
@@ -0,0 +1 @@
+protected static Logger log = Logger.getLogger(InsightManagerInitializer222.class); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test467/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test467/A_out.js
new file mode 100644
index 0000000..7c02b74
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test467/A_out.js
@@ -0,0 +1,2 @@
+protected static Logger log = Logger
+ .getLogger(InsightManagerInitializer222.class); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test468/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test468/A_in.js
new file mode 100644
index 0000000..7ff22eb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test468/A_in.js
@@ -0,0 +1,13 @@
+class Foo {
+ class Bar {
+ }
+
+ void foo() {
+ Bar obj = new Bar() {
+ public void bar() {
+ // Here is the problem.
+ return;
+ }
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test468/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test468/A_out.js
new file mode 100644
index 0000000..c8f03a5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test468/A_out.js
@@ -0,0 +1,18 @@
+class Foo
+{
+ class Bar
+ {
+ }
+
+ void foo()
+ {
+ Bar obj = new Bar()
+ {
+ public void bar()
+ {
+ // Here is the problem.
+ return;
+ }
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test469/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test469/A_in.js
new file mode 100644
index 0000000..cff4253
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test469/A_in.js
@@ -0,0 +1,6 @@
+class Foo {
+ void foo() {
+ int[] array1 = new int[] {};
+ int[] array2 = new int[3];
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test469/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test469/A_out.js
new file mode 100644
index 0000000..584a23d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test469/A_out.js
@@ -0,0 +1,6 @@
+class Foo {
+ void foo() {
+ int[] array1 = new int[] {};
+ int[] array2 = new int[ 3 ];
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test470/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test470/A_in.js
new file mode 100644
index 0000000..0724dd2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test470/A_in.js
@@ -0,0 +1,6 @@
+public class Test {
+
+ void test(String s) {
+ if (s == null) s = ""; //$NON-NLS-1$
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test470/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test470/A_out.js
new file mode 100644
index 0000000..0724dd2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test470/A_out.js
@@ -0,0 +1,6 @@
+public class Test {
+
+ void test(String s) {
+ if (s == null) s = ""; //$NON-NLS-1$
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test471/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test471/A_in.js
new file mode 100644
index 0000000..33510fe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test471/A_in.js
@@ -0,0 +1,6 @@
+public class Bug49361 {
+ public static void main(String [ ] args) {
+ int[] table = new int [] {1,2,3};
+ int[] empty = new int [] {};
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test471/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test471/A_out.js
new file mode 100644
index 0000000..b670f52
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test471/A_out.js
@@ -0,0 +1,6 @@
+public class Bug49361 {
+ public static void main(String[] args) {
+ int[] table = new int[] {1, 2, 3 };
+ int[] empty = new int[] {};
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test472/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test472/A_in.js
new file mode 100644
index 0000000..33510fe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test472/A_in.js
@@ -0,0 +1,6 @@
+public class Bug49361 {
+ public static void main(String [ ] args) {
+ int[] table = new int [] {1,2,3};
+ int[] empty = new int [] {};
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test472/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test472/A_out.js
new file mode 100644
index 0000000..4394ac3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test472/A_out.js
@@ -0,0 +1,6 @@
+public class Bug49361 {
+ public static void main(String[] args) {
+ int[] table = new int[] { 1, 2, 3 };
+ int[] empty = new int[] {};
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test473/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test473/A_in.js
new file mode 100644
index 0000000..33510fe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test473/A_in.js
@@ -0,0 +1,6 @@
+public class Bug49361 {
+ public static void main(String [ ] args) {
+ int[] table = new int [] {1,2,3};
+ int[] empty = new int [] {};
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test473/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test473/A_out.js
new file mode 100644
index 0000000..000d679
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test473/A_out.js
@@ -0,0 +1,6 @@
+public class Bug49361 {
+ public static void main(String[] args) {
+ int[] table = new int[] {1, 2, 3};
+ int[] empty = new int[] {};
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test474/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test474/A_in.js
new file mode 100644
index 0000000..33510fe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test474/A_in.js
@@ -0,0 +1,6 @@
+public class Bug49361 {
+ public static void main(String [ ] args) {
+ int[] table = new int [] {1,2,3};
+ int[] empty = new int [] {};
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test474/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test474/A_out.js
new file mode 100644
index 0000000..ad53178
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test474/A_out.js
@@ -0,0 +1,6 @@
+public class Bug49361 {
+ public static void main(String[] args) {
+ int[] table = new int[] { 1, 2, 3};
+ int[] empty = new int[] {};
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test475/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test475/A_in.js
new file mode 100644
index 0000000..33510fe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test475/A_in.js
@@ -0,0 +1,6 @@
+public class Bug49361 {
+ public static void main(String [ ] args) {
+ int[] table = new int [] {1,2,3};
+ int[] empty = new int [] {};
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test475/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test475/A_out.js
new file mode 100644
index 0000000..20bc662
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test475/A_out.js
@@ -0,0 +1,7 @@
+public class Bug49361 {
+ public static void main(String[] args) {
+ int[] table = new int[] {1, 2, 3
+ };
+ int[] empty = new int[] {};
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test476/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test476/A_in.js
new file mode 100644
index 0000000..6ee1004
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test476/A_in.js
@@ -0,0 +1,30 @@
+import java.awt.*;
+
+public class FormatTest
+ {
+
+ /************************************
+ * method_one
+ *
+ * nothing special.
+ ************************************/
+
+ public void method_one()
+ {
+ int i = 1;
+
+ int j = 2;
+
+ for ( i = 12; i < 100; i++ )
+ {
+ if ( i % 2 == 0 )
+ System.out.println( "xx" );
+ else
+ System.out.println( "yy" );
+
+ j = 0;
+ }
+
+ } // method_one
+
+ } // class FormatTest \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test476/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test476/A_out.js
new file mode 100644
index 0000000..1a95f1f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test476/A_out.js
@@ -0,0 +1,30 @@
+import java.awt.*;
+
+public class FormatTest
+ {
+
+ /************************************
+ * method_one
+ *
+ * nothing special.
+ ************************************/
+
+ public void method_one()
+ {
+ int i = 1;
+
+ int j = 2;
+
+ for ( i = 12; i < 100; i++ )
+ {
+ if ( i % 2 == 0 )
+ System.out.println( "xx" );
+ else
+ System.out.println( "yy" );
+
+ j = 0;
+ }
+
+ } // method_one
+
+ } // class FormatTest \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test478/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test478/A_in.js
new file mode 100644
index 0000000..3a099a9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test478/A_in.js
@@ -0,0 +1,5 @@
+public class A {
+ private void foo() {
+ assert true : "Hello;";int i = 9;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test478/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test478/A_out.js
new file mode 100644
index 0000000..7490822
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test478/A_out.js
@@ -0,0 +1,6 @@
+public class A {
+ private void foo() {
+ assert true : "Hello;";
+ int i = 9;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test479/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test479/A_in.js
new file mode 100644
index 0000000..0e5ef47
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test479/A_in.js
@@ -0,0 +1,6 @@
+import com.ibm.rational.test.ct.A;
+public class Foo extends A {
+public Foo() {
+super();
+}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test479/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test479/A_out.js
new file mode 100644
index 0000000..af9c504
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test479/A_out.js
@@ -0,0 +1,6 @@
+import com.ibm.rational.test.ct.A;
+public class Foo extends A {
+ public Foo() {
+ super();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test480/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test480/A_in.js
new file mode 100644
index 0000000..ca90186
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test480/A_in.js
@@ -0,0 +1,12 @@
+package stdjavatest;
+
+import junit.framework.*;
+import mypackage.MyClass;
+
+public class TestingMyClass extends TestCase {
+public void test_method() {
+MyClass objA = null;
+objA = new MyClass();
+objA.method();
+}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test480/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test480/A_out.js
new file mode 100644
index 0000000..a5633f8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test480/A_out.js
@@ -0,0 +1,10 @@
+package stdjavatest;
+import junit.framework.*;
+import mypackage.MyClass;
+public class TestingMyClass extends TestCase {
+ public void test_method() {
+ MyClass objA = null;
+ objA = new MyClass();
+ objA.method();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test481/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test481/A_in.js
new file mode 100644
index 0000000..878e334
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test481/A_in.js
@@ -0,0 +1,7 @@
+class Foo {
+ void m1() {
+ int x;
+ do
+ x = 1; while (true);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test481/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test481/A_out.js
new file mode 100644
index 0000000..b810058
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test481/A_out.js
@@ -0,0 +1,8 @@
+class Foo {
+ void m1() {
+ int x;
+ do
+ x = 1;
+ while (true);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test482/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test482/A_in.js
new file mode 100644
index 0000000..6f4af97
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test482/A_in.js
@@ -0,0 +1,8 @@
+class Foo {
+ void m1() {
+ int x;
+ do {
+ x = 1;
+ } while (true);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test482/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test482/A_out.js
new file mode 100644
index 0000000..325b6c2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test482/A_out.js
@@ -0,0 +1,8 @@
+class Foo {
+ void m1() {
+ int x;
+ do {
+ x = 1;
+ }while (true);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test483/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test483/A_in.js
new file mode 100644
index 0000000..fc6a736
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test483/A_in.js
@@ -0,0 +1,9 @@
+class Foo {
+ void m1(boolean b) {
+ if (b) {
+ System.out.println();
+ } else {
+ System.out.println();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test483/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test483/A_out.js
new file mode 100644
index 0000000..e1d045d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test483/A_out.js
@@ -0,0 +1,9 @@
+class Foo {
+ void m1(boolean b) {
+ if (b) {
+ System.out.println();
+ }else {
+ System.out.println();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test484/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test484/A_in.js
new file mode 100644
index 0000000..e364555
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test484/A_in.js
@@ -0,0 +1,4 @@
+public class A {public void launch(){try {if ((javaProject == null) || !javaProject.exists()) {abort(PDEPlugin.getResourceString("JUnitLaunchConfiguration.error.invalidproject"), null, IJavaLaunchConfigurationConstants.ERR_NOT_A_JAVA_PROJECT); //$NON-NLS-1$
+ }
+ } catch (CoreException e) {}}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test484/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test484/A_out.js
new file mode 100644
index 0000000..3cf52e1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test484/A_out.js
@@ -0,0 +1,12 @@
+public class A {
+ public void launch() {
+ try {
+ if ((javaProject == null) || !javaProject.exists()) {
+ abort(
+ PDEPlugin
+ .getResourceString("JUnitLaunchConfiguration.error.invalidproject"), null, IJavaLaunchConfigurationConstants.ERR_NOT_A_JAVA_PROJECT); //$NON-NLS-1$
+ }
+ } catch (CoreException e) {
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test485/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test485/A_in.js
new file mode 100644
index 0000000..fbd7af8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test485/A_in.js
@@ -0,0 +1,3 @@
+public class A { public void launch(){ try { if ((javaProject == null) || !javaProject.exists()) { abort(PDEPlugin.getResourceString("JUnitLaunchConfiguration.error.invalidproject"), null, IJavaLaunchConfigurationConstants.ERR_NOT_A_JAVA_PROJECT);
+ }
+ } catch (CoreException e) { } }} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test485/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test485/A_out.js
new file mode 100644
index 0000000..5ff856d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test485/A_out.js
@@ -0,0 +1,14 @@
+public class A {
+ public void launch() {
+ try {
+ if ((javaProject == null) || !javaProject.exists()) {
+ abort(
+ PDEPlugin
+ .getResourceString("JUnitLaunchConfiguration.error.invalidproject"),
+ null,
+ IJavaLaunchConfigurationConstants.ERR_NOT_A_JAVA_PROJECT);
+ }
+ } catch (CoreException e) {
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test486/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test486/A_in.js
new file mode 100644
index 0000000..b6a02df
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test486/A_in.js
@@ -0,0 +1,6 @@
+public class A {
+ public void launch() {
+ if ("/b".equals(html)) { //$NON-NLS-1$
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test486/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test486/A_out.js
new file mode 100644
index 0000000..93ef433
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test486/A_out.js
@@ -0,0 +1,8 @@
+public class A
+{
+ public void launch()
+ {
+ if ("/b".equals(html)) { //$NON-NLS-1$
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test487/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test487/A_in.js
new file mode 100644
index 0000000..cf1df2f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test487/A_in.js
@@ -0,0 +1,21 @@
+public class A {
+ public void launch() {
+ switch (key) {
+ case VALUE0 :
+ doCase0();
+ break;
+ case VALUE1 :
+ {
+ doCase1();
+ break;
+ }
+ case VALUE2 :
+ doCase2();
+ break;
+ default :
+ {
+ doDefault();
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test487/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test487/A_out.js
new file mode 100644
index 0000000..980ab49
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test487/A_out.js
@@ -0,0 +1,19 @@
+public class A {
+ public void launch() {
+ switch (key) {
+ case VALUE0 :
+ doCase0();
+ break;
+ case VALUE1 : {
+ doCase1();
+ break;
+ }
+ case VALUE2 :
+ doCase2();
+ break;
+ default : {
+ doDefault();
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test488/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test488/A_in.js
new file mode 100644
index 0000000..cf1df2f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test488/A_in.js
@@ -0,0 +1,21 @@
+public class A {
+ public void launch() {
+ switch (key) {
+ case VALUE0 :
+ doCase0();
+ break;
+ case VALUE1 :
+ {
+ doCase1();
+ break;
+ }
+ case VALUE2 :
+ doCase2();
+ break;
+ default :
+ {
+ doDefault();
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test488/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test488/A_out.js
new file mode 100644
index 0000000..def4eef
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test488/A_out.js
@@ -0,0 +1,19 @@
+public class A {
+ public void launch() {
+ switch (key) {
+ case VALUE0 :
+ doCase0();
+ break;
+ case VALUE1 :{
+ doCase1();
+ break;
+ }
+ case VALUE2 :
+ doCase2();
+ break;
+ default :{
+ doDefault();
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test489/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test489/A_in.js
new file mode 100644
index 0000000..0f81e8c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test489/A_in.js
@@ -0,0 +1,8 @@
+public class A {
+ int[] x =
+ {1, //a
+ 2, //b
+ 3, //c
+ 4,//d
+ };
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test489/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test489/A_out.js
new file mode 100644
index 0000000..b2a5ffb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test489/A_out.js
@@ -0,0 +1,8 @@
+public class A {
+ int[] x = {
+ 1, //a
+ 2, //b
+ 3, //c
+ 4,//d
+ };
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test490/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test490/A_in.js
new file mode 100644
index 0000000..33f71a4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test490/A_in.js
@@ -0,0 +1,3 @@
+public class A {
+ Object result = (foo == null)? new Object[]{} : foo.toArray();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test490/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test490/A_out.js
new file mode 100644
index 0000000..25c202b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test490/A_out.js
@@ -0,0 +1,3 @@
+public class A {
+ Object result = (foo == null) ? new Object[]{} : foo.toArray();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test491/BundleChain_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test491/BundleChain_in.js
new file mode 100644
index 0000000..625da80
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test491/BundleChain_in.js
@@ -0,0 +1,3 @@
+class BundleChain extends ResourceBundle {
+ BundleChain(ResourceBundle previousChain, ClassLoader loader, Locale locale, String filename) {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test491/BundleChain_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test491/BundleChain_out.js
new file mode 100644
index 0000000..2d928a1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test491/BundleChain_out.js
@@ -0,0 +1,4 @@
+class BundleChain extends ResourceBundle {
+ BundleChain(ResourceBundle previousChain, ClassLoader loader, Locale locale, String filename) {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test491/formatter.xml b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test491/formatter.xml
new file mode 100644
index 0000000..05e1f90
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test491/formatter.xml
@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<profiles version="5">
+<profile name="DOI" version="5">
+<setting id="comment_clear_blank_lines" value="false"/>
+<setting id="comment_format_comments" value="true"/>
+<setting id="comment_format_header" value="true"/>
+<setting id="comment_format_html" value="true"/>
+<setting id="comment_format_source_code" value="true"/>
+<setting id="comment_indent_parameter_description" value="false"/>
+<setting id="comment_indent_root_tags" value="true"/>
+<setting id="comment_line_length" value="80"/>
+<setting id="comment_new_line_for_parameter" value="false"/>
+<setting id="comment_separate_root_tags" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.align_type_members_on_columns" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_binary_expression" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_compact_if" value="52"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_conditional_expression" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_expressions_in_array_initializer" value="20"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_multiple_fields" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="20"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_parameters_in_method_declaration" value="20"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="20"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="20"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_after_imports" value="2"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_after_package" value="2"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_field" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_imports" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_member_type" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_method" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_new_chunk" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_package" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_block" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.compact_else_if" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation" value="2"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_statements_compare_to_block" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_statements_compare_to_body" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_control_statements" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_block" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_case" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_default" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.lineSplit" value="80"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.number_of_empty_lines_to_preserve" value="3"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.put_empty_statement_on_new_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.remove_unnecessary_semicolon" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.tabulation.char" value="space"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.tabulation.size" value="4"/>
+</profile>
+</profiles>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test492/Main_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test492/Main_in.js
new file mode 100644
index 0000000..f67227c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test492/Main_in.js
@@ -0,0 +1,1574 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.core.launcher;
+
+import java.io.*;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.net.*;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+/**
+ * The framework to run. This is used if the bootLocation (-boot) is not specified.
+ * The value can be specified on the command line as -framework.
+ * Startup class for Eclipse. Creates a class loader using
+ * supplied URL of platform installation, loads and calls
+ * the Eclipse Boot Loader. The startup arguments are as follows:
+ * <dl>
+ * <dd>
+ * -application &lt;id&gt;: the identifier of the application to run
+ * </dd>
+ * <dd>
+ * -arch &lt;architecture&gt;: sets the processor architecture value
+ * </dd>
+ * <dd>
+ * -boot &lt;location&gt;: the location, expressed as a URL, of the platform's boot.jar.
+ * <i>Deprecated: replaced by -configuration</i>
+ * </dd>
+ * <dd>
+ * -classloaderproperties [properties file]: activates platform class loader enhancements using
+ * the class loader properties file at the given location, if specified. The (optional) file argument
+ * can be either a file path or an absolute URL.
+ * </dd>
+ * <dd>
+ * -configuration &lt;location&gt;: the location, expressed as a URL, for the Eclipse platform
+ * configuration file. The configuration file determines the location of the Eclipse platform, the set
+ * of available plug-ins, and the primary feature.
+ * </dd>
+ * <dd>
+ * -consolelog : enables log to the console. Handy when combined with -debug
+ * </dd>
+ * <dd>
+ * -data &lt;location&gt;: sets the workspace location and the default location for projects
+ * </dd>
+ * <dd>
+ * -debug [options file]: turns on debug mode for the platform and optionally specifies a location
+ * for the .options file. This file indicates what debug points are available for a
+ * plug-in and whether or not they are enabled. If a location is not specified, the platform searches
+ * for the .options file under the install directory.
+ * </dd>
+ * <dd>
+ * -dev [entries]: turns on dev mode and optionally specifies comma-separated class path entries
+ * which are added to the class path of each plug-in
+ * </dd>
+ * <dd>
+ * -feature &lt;id&gt;: the identifier of the primary feature. The primary feature gives the launched
+ * instance of Eclipse its product personality, and determines the product customization
+ * information.
+ * </dd>
+ * <dd>
+ * -keyring &lt;location&gt;: the location of the authorization database on disk. This argument
+ * has to be used together with the -password argument.
+ * </dd>
+ * <dd>
+ * -nl &lt;locale&gt;: sets the name of the locale on which Eclipse platform will run
+ * </dd>
+ * <dd>
+ * -nolazyregistrycacheloading : deactivates platform plug-in registry cache loading optimization.
+ * By default, extensions' configuration elements will be loaded from the registry cache (when
+ * available) only on demand, reducing memory footprint. This option will force the registry cache
+ * to be fully loaded at startup.
+ * </dd>
+ * <dd>
+ * -nopackageprefixes: deactivates classloader package prefixes optimization
+ * </dd>
+ * <dd>
+ * -noregistrycache: bypasses the reading and writing of an internal plug-in registry cache file
+ * </dd>
+ * <dd>
+ * -os &lt;operating system&gt;: sets the operating system value
+ * </dd>
+ * <dd>
+ * -password &lt;passwd&gt;: the password for the authorization database
+ * </dd>
+ * <dd>
+ * -plugins &lt;location&gt;: the arg is a URL pointing to a file which specs the plugin
+ * path for the platform. The file is in property file format where the keys are user-defined
+ * names and the values are comma separated lists of either explicit paths to plugin.xml
+ * files or directories containing plugins (e.g., .../eclipse/plugins).
+ * <i>Deprecated: replaced by -configuration</i>
+ * </dd>
+ * <dd>
+ * -plugincustomization &lt;properties file&gt;: the location of a properties file containing default
+ * settings for plug-in preferences. These default settings override default settings specified in the
+ * primary feature. Relative paths are interpreted relative to the directory that eclipse was started
+ * from.
+ * </dd>
+ * <dd>
+ * -ws &lt;window system&gt;: sets the window system value
+ * </dd>
+ * </dl>
+ */
+public class Main {
+ /**
+ * Indicates whether this instance is running in debug mode.
+ */
+ protected boolean debug = false;
+
+ /**
+ * The location of the launcher to run.
+ */
+ protected String bootLocation = null;
+
+ /**
+ * The location of the install root
+ */
+ protected String installLocation = null;
+
+ /**
+ * The location of the configuration information for this instance
+ */
+ protected String configurationLocation = null;
+
+ /**
+ * The location of the configuration information in the install root
+ */
+ protected String parentConfigurationLocation = null;
+
+ /**
+ * The id of the bundle that will contain the framework to run. Defaults to org.eclipse.osgi.
+ */
+ protected String framework = OSGI;
+
+ /**
+ * The extra development time class path entries.
+ */
+ protected String devClassPath = null;
+
+ /**
+ * Indicates whether this instance is running in development mode.
+ */
+ protected boolean inDevelopmentMode = false;
+
+ private String exitData = null;
+ private String vm = null;
+ private String[] vmargs = null;
+ private String[] commands = null;
+
+ // splash handling
+ private String showSplash = null;
+ private String endSplash = null;
+ private boolean initialize = false;
+ private Process showProcess = null;
+ private boolean splashDown = false;
+ private final Runnable endSplashHandler = new Runnable() {
+ public void run() {
+ takeDownSplash();
+ }
+ };
+
+ // command line args
+ private static final String FRAMEWORK = "-framework"; //$NON-NLS-1$
+ private static final String INSTALL = "-install"; //$NON-NLS-1$
+ private static final String INITIALIZE = "-initialize"; //$NON-NLS-1$
+ private static final String VM = "-vm"; //$NON-NLS-1$
+ private static final String VMARGS = "-vmargs"; //$NON-NLS-1$
+ private static final String DEBUG = "-debug"; //$NON-NLS-1$
+ private static final String DEV = "-dev"; //$NON-NLS-1$
+ private static final String CONFIGURATION = "-configuration"; //$NON-NLS-1$
+ private static final String EXITDATA = "-exitdata"; //$NON-NLS-1$
+ private static final String NOSPLASH = "-nosplash"; //$NON-NLS-1$
+ private static final String SHOWSPLASH = "-showsplash"; //$NON-NLS-1$
+ private static final String ENDSPLASH = "-endsplash"; //$NON-NLS-1$
+ private static final String SPLASH_IMAGE = "splash.bmp"; //$NON-NLS-1$
+
+ private static final String OSGI = "org.eclipse.osgi"; //$NON-NLS-1$
+ private static final String STARTER = "org.eclipse.core.runtime.adaptor.EclipseStarter"; //$NON-NLS-1$
+ private static final String PLATFORM_URL = "platform:/base/"; //$NON-NLS-1$
+
+ // constants: configuration file location
+ private static final String CONFIG_DIR = "configuration/"; //$NON-NLS-1$
+ private static final String CONFIG_FILE = "config.ini"; //$NON-NLS-1$
+ private static final String CONFIG_FILE_TEMP_SUFFIX = ".tmp"; //$NON-NLS-1$
+ private static final String CONFIG_FILE_BAK_SUFFIX = ".bak"; //$NON-NLS-1$
+ private static final String ECLIPSE = "eclipse"; //$NON-NLS-1$
+ private static final String PRODUCT_SITE_MARKER = ".eclipseproduct"; //$NON-NLS-1$
+ private static final String PRODUCT_SITE_ID = "id"; //$NON-NLS-1$
+ private static final String PRODUCT_SITE_VERSION = "version"; //$NON-NLS-1$
+
+ // constants: System property keys and/or configuration file elements
+ private static final String PROP_USER_HOME = "user.home"; //$NON-NLS-1$
+ private static final String PROP_USER_DIR = "user.dir"; //$NON-NLS-1$
+ private static final String PROP_INSTALL_AREA = "osgi.install.area"; //$NON-NLS-1$
+ private static final String PROP_CONFIG_AREA = "osgi.configuration.area"; //$NON-NLS-1$
+ private static final String PROP_BASE_CONFIG_AREA = "osgi.baseConfiguration.area"; //$NON-NLS-1$
+ private static final String PROP_SHARED_CONFIG_AREA = "osgi.sharedConfiguration.area"; //$NON-NLS-1$
+ private static final String PROP_CONFIG_CASCADED = "osgi.configuration.cascaded"; //$NON-NLS-1$
+ private static final String PROP_FRAMEWORK = "osgi.framework"; //$NON-NLS-1$
+ private static final String PROP_SPLASHPATH = "osgi.splashPath"; //$NON-NLS-1$
+ private static final String PROP_SPLASHLOCATION = "osgi.splashLocation"; //$NON-NLS-1$
+ private static final String PROP_CLASSPATH = "osgi.frameworkClassPath"; //$NON-NLS-1$
+ private static final String PROP_LOGFILE = "osgi.logfile"; //$NON-NLS-1$
+ private static final String PROP_EOF = "eof"; //$NON-NLS-1$
+
+ private static final String PROP_EXITCODE = "eclipse.exitcode"; //$NON-NLS-1$
+ private static final String PROP_EXITDATA = "eclipse.exitdata"; //$NON-NLS-1$
+ private static final String PROP_VM = "eclipse.vm"; //$NON-NLS-1$
+ private static final String PROP_VMARGS = "eclipse.vmargs"; //$NON-NLS-1$
+ private static final String PROP_COMMANDS = "eclipse.commands"; //$NON-NLS-1$
+
+ // Data mode constants for user, configuration and data locations.
+ private static final String NONE = "@none"; //$NON-NLS-1$
+ private static final String NO_DEFAULT = "@noDefault"; //$NON-NLS-1$
+ private static final String USER_HOME = "@user.home"; //$NON-NLS-1$
+ private static final String USER_DIR = "@user.dir"; //$NON-NLS-1$
+
+ // log file handling
+ protected static final String SESSION = "!SESSION"; //$NON-NLS-1$
+ protected static final String ENTRY = "!ENTRY"; //$NON-NLS-1$
+ protected static final String MESSAGE = "!MESSAGE"; //$NON-NLS-1$
+ protected static final String STACK = "!STACK"; //$NON-NLS-1$
+ protected static final int ERROR = 4;
+ protected static final String PLUGIN_ID = "org.eclipse.core.launcher"; //$NON-NLS-1$
+ protected File logFile = null;
+ protected BufferedWriter log = null;
+ protected boolean newSession = true;
+
+ /**
+ * Executes the launch.
+ *
+ * @return the result of performing the launch
+ * @param args command-line arguments
+ * @exception Exception thrown if a problem occurs during the launch
+ */
+ protected Object basicRun(String[] args) throws Exception {
+ System.getProperties().setProperty("eclipse.debug.startupTime", Long.toString(System.currentTimeMillis())); //$NON-NLS-1$
+ commands = args;
+ String[] passThruArgs = processCommandLine(args);
+ setupVMProperties();
+ processConfiguration();
+ // need to ensure that getInstallLocation is called at least once to initialize the value.
+ // Do this AFTER processing the configuration to allow the configuration to set
+ // the install location.
+ getInstallLocation();
+
+ // locate boot plugin (may return -dev mode variations)
+ URL[] bootPath = getBootPath(bootLocation);
+
+ // splash handling is done here, because the default case needs to know
+ // the location of the boot plugin we are going to use
+ handleSplash(bootPath);
+
+ // load the BootLoader and startup the platform
+ URLClassLoader loader = new URLClassLoader(bootPath, null);
+ Class clazz = loader.loadClass(STARTER);
+ Method method = clazz.getDeclaredMethod("run", new Class[] {String[].class, Runnable.class}); //$NON-NLS-1$
+ try {
+ return method.invoke(clazz, new Object[] {passThruArgs, endSplashHandler});
+ } catch (InvocationTargetException e) {
+ if (e.getTargetException() instanceof Error)
+ throw (Error) e.getTargetException();
+ else if (e.getTargetException() instanceof Exception)
+ throw (Exception) e.getTargetException();
+ else
+ //could be a subclass of Throwable!
+ throw e;
+ }
+ }
+
+ /**
+ * Returns a string representation of the given URL String. This converts
+ * escaped sequences (%..) in the URL into the appropriate characters.
+ * NOTE: due to class visibility there is a copy of this method
+ * in InternalBootLoader
+ */
+ private String decode(String urlString) {
+ //try to use Java 1.4 method if available
+ try {
+ Class clazz = URLDecoder.class;
+ Method method = clazz.getDeclaredMethod("decode", new Class[] {String.class, String.class}); //$NON-NLS-1$
+ //first encode '+' characters, because URLDecoder incorrectly converts
+ //them to spaces on certain class library implementations.
+ if (urlString.indexOf('+') >= 0) {
+ int len = urlString.length();
+ StringBuffer buf = new StringBuffer(len);
+ for (int i = 0; i < len; i++) {
+ char c = urlString.charAt(i);
+ if (c == '+')
+ buf.append("%2B");
+ //$NON-NLS-1$
+ else
+ buf.append(c);
+ }
+ urlString = buf.toString();
+ }
+ Object result = method.invoke(null, new Object[] {urlString, "UTF-8"}); //$NON-NLS-1$
+ if (result != null)
+ return (String) result;
+ } catch (Exception e) {
+ //JDK 1.4 method not found -- fall through and decode by hand
+ }
+ //decode URL by hand
+ boolean replaced = false;
+ byte[] encodedBytes = urlString.getBytes();
+ int encodedLength = encodedBytes.length;
+ byte[] decodedBytes = new byte[encodedLength];
+ int decodedLength = 0;
+ for (int i = 0; i < encodedLength; i++) {
+ byte b = encodedBytes[i];
+ if (b == '%') {
+ byte enc1 = encodedBytes[++i];
+ byte enc2 = encodedBytes[++i];
+ b = (byte) ((hexToByte(enc1) << 4) + hexToByte(enc2));
+ replaced = true;
+ }
+ decodedBytes[decodedLength++] = b;
+ }
+ if (!replaced)
+ return urlString;
+ try {
+ return new String(decodedBytes, 0, decodedLength, "UTF-8"); //$NON-NLS-1$
+ } catch (UnsupportedEncodingException e) {
+ //use default encoding
+ return new String(decodedBytes, 0, decodedLength);
+ }
+ }
+
+ /**
+ * Returns the result of converting a list of comma-separated tokens into an array
+ *
+ * @return the array of string tokens
+ * @param prop the initial comma-separated string
+ */
+ private String[] getArrayFromList(String prop) {
+ if (prop == null || prop.trim().equals("")) //$NON-NLS-1$
+ return new String[0];
+ Vector list = new Vector();
+ StringTokenizer tokens = new StringTokenizer(prop, ","); //$NON-NLS-1$
+ while (tokens.hasMoreTokens()) {
+ String token = tokens.nextToken().trim();
+ if (!token.equals("")) //$NON-NLS-1$
+ list.addElement(token);
+ }
+ return list.isEmpty() ? new String[0] : (String[]) list.toArray(new String[list.size()]);
+ }
+
+ /**
+ * Returns the <code>URL</code>-based class path describing where the boot classes
+ * are located when running in development mode.
+ *
+ * @return the url-based class path
+ * @param base the base location
+ * @exception MalformedURLException if a problem occurs computing the class path
+ */
+ private URL[] getDevPath(URL base) throws IOException {
+ String devBase = base.toExternalForm();
+ ArrayList result = new ArrayList(5);
+ if (inDevelopmentMode)
+ addDevEntries(devBase, result); //$NON-NLS-1$
+ //The jars from the base always need to be added, even when running in dev mode (bug 46772)
+ addBaseJars(devBase, result);
+ return (URL[]) result.toArray(new URL[result.size()]);
+ }
+
+ private void addBaseJars(String devBase, ArrayList result) throws IOException {
+ String baseJarList = System.getProperty(PROP_CLASSPATH);
+ if (baseJarList == null) {
+ Properties defaults = loadProperties(devBase + "eclipse.properties");
+ baseJarList = defaults.getProperty(PROP_CLASSPATH);
+ if (baseJarList == null)
+ throw new IOException("Unable to initialize " + PROP_CLASSPATH);
+ System.getProperties().put(PROP_CLASSPATH, baseJarList);
+ }
+ String[] baseJars = getArrayFromList(baseJarList);
+ for (int i = 0; i < baseJars.length; i++) {
+ String string = baseJars[i];
+ try {
+ URL url = new URL(string);
+ addEntry(url, result);
+ } catch (MalformedURLException e) {
+ addEntry(new URL(devBase + string), result);
+ }
+ }
+ }
+
+ private void addEntry(URL url, List result) {
+ if (new File(url.getFile()).exists())
+ result.add(url);
+ }
+
+ private void addDevEntries(String devBase, List result) throws MalformedURLException {
+ String[] locations = getArrayFromList(devClassPath);
+ for (int i = 0; i < locations.length; i++) {
+ String spec = devBase + locations[i];
+ char lastChar = spec.charAt(spec.length() - 1);
+ URL url;
+ if ((spec.endsWith(".jar") || (lastChar == '/' || lastChar == '\\'))) //$NON-NLS-1$
+ url = new URL(spec);
+ else
+ url = new URL(spec + "/"); //$NON-NLS-1$
+ addEntry(url, result);
+ }
+ }
+
+ /**
+ * Returns the <code>URL</code>-based class path describing where the boot classes are located.
+ *
+ * @return the url-based class path
+ * @param base the base location
+ * @exception MalformedURLException if a problem occurs computing the class path
+ */
+ private URL[] getBootPath(String base) throws IOException {
+ URL url = null;
+ if (base != null) {
+ url = new URL(base);
+ } else {
+ // search in the root location
+ url = new URL(getInstallLocation());
+ String path = url.getFile() + "plugins"; //$NON-NLS-1$
+ path = searchFor(framework, path);
+ if (path == null)
+ throw new RuntimeException("Could not find framework"); //$NON-NLS-1$
+ // add on any dev path elements
+ url = new URL(url.getProtocol(), url.getHost(), url.getPort(), path);
+ }
+ if (System.getProperty(PROP_FRAMEWORK) == null)
+ System.getProperties().put(PROP_FRAMEWORK, url.toExternalForm());
+ if (debug)
+ System.out.println("Framework located:\n " + url.toExternalForm());
+ URL[] result = getDevPath(url);
+ if (debug) {
+ System.out.println("Framework classpath:"); //$NON-NLS-1$
+ for (int i = 0; i < result.length; i++)
+ System.out.println(" " + result[i].toExternalForm()); //$NON-NLS-1$
+ }
+ return result;
+ }
+
+ /**
+ * Searches for the given target directory starting in the "plugins" subdirectory
+ * of the given location. If one is found then this location is returned;
+ * otherwise an exception is thrown.
+ *
+ * @return the location where target directory was found
+ * @param start the location to begin searching
+ */
+ private String searchFor(final String target, String start) {
+ FileFilter filter = new FileFilter() {
+ public boolean accept(File candidate) {
+ return candidate.isDirectory() && (candidate.getName().equals(target) || candidate.getName().startsWith(target + "_")); //$NON-NLS-1$
+ }
+ };
+ File[] candidates = new File(start).listFiles(filter); //$NON-NLS-1$
+ if (candidates == null)
+ return null;
+ String result = null;
+ Object maxVersion = null;
+ for (int i = 0; i < candidates.length; i++) {
+ String name = candidates[i].getName();
+ String version = ""; //$NON-NLS-1$ // Note: directory with version suffix is always > than directory without version suffix
+ int index = name.indexOf('_');
+ if (index != -1)
+ version = name.substring(index + 1);
+ Object currentVersion = getVersionElements(version);
+ if (maxVersion == null) {
+ result = candidates[i].getAbsolutePath();
+ maxVersion = currentVersion;
+ } else {
+ if (compareVersion((Object[]) maxVersion, (Object[]) currentVersion) < 0) {
+ result = candidates[i].getAbsolutePath();
+ maxVersion = currentVersion;
+ }
+ }
+ }
+ if (result == null)
+ return null;
+ return result.replace(File.separatorChar, '/') + "/"; //$NON-NLS-1$
+ }
+
+ /**
+ * Compares version strings.
+ * @return result of comparison, as integer;
+ * <code><0</code> if left < right;
+ * <code>0</code> if left == right;
+ * <code>>0</code> if left > right;
+ */
+ private int compareVersion(Object[] left, Object[] right) {
+
+ int result = ((Integer) left[0]).compareTo((Integer) right[0]); // compare major
+ if (result != 0)
+ return result;
+
+ result = ((Integer) left[1]).compareTo((Integer) right[1]); // compare minor
+ if (result != 0)
+ return result;
+
+ result = ((Integer) left[2]).compareTo((Integer) right[2]); // compare service
+ if (result != 0)
+ return result;
+
+ return ((String) left[3]).compareTo((String) right[3]); // compare qualifier
+ }
+
+ /**
+ * Do a quick parse of version identifier so its elements can be correctly compared.
+ * If we are unable to parse the full version, remaining elements are initialized
+ * with suitable defaults.
+ * @return an array of size 4; first three elements are of type Integer (representing
+ * major, minor and service) and the fourth element is of type String (representing
+ * qualifier). Note, that returning anything else will cause exceptions in the caller.
+ */
+ private Object[] getVersionElements(String version) {
+ Object[] result = {new Integer(0), new Integer(0), new Integer(0), ""}; //$NON-NLS-1$
+ StringTokenizer t = new StringTokenizer(version, "."); //$NON-NLS-1$
+ String token;
+ int i = 0;
+ while (t.hasMoreTokens() && i < 4) {
+ token = t.nextToken();
+ if (i < 3) {
+ // major, minor or service ... numeric values
+ try {
+ result[i++] = new Integer(token);
+ } catch (Exception e) {
+ // invalid number format - use default numbers (0) for the rest
+ break;
+ }
+ } else {
+ // qualifier ... string value
+ result[i++] = token;
+ }
+ }
+ return result;
+ }
+
+ private URL buildURL(String spec, boolean trailingSlash) {
+ if (spec == null)
+ return null;
+ // if the spec is a file: url then see if it is absolute. If not, break it up
+ // and make it absolute.
+ if (spec.startsWith("file:")) {
+ File file = new File(spec.substring(5));
+ if (!file.isAbsolute())
+ spec = "file:" + file.getAbsolutePath();
+ }
+ try {
+ spec = adjustTrailingSlash(spec, true);
+ return new URL(spec);
+ } catch (MalformedURLException e) {
+ if (spec.startsWith("file:"))
+ return null;
+ return buildURL("file:" + spec, trailingSlash);
+ }
+ }
+
+ private URL buildLocation(String property, URL defaultLocation, String userDefaultAppendage) {
+ URL result = null;
+ String location = System.getProperty(property);
+ System.getProperties().remove(property);
+ // if the instance location is not set, predict where the workspace will be and
+ // put the instance area inside the workspace meta area.
+ try {
+ if (location == null)
+ result = defaultLocation;
+ else if (location.equalsIgnoreCase(NONE))
+ return null;
+ else if (location.equalsIgnoreCase(NO_DEFAULT))
+ result = buildURL(location, true);
+ else {
+ if (location.equalsIgnoreCase(USER_HOME))
+ location = computeDefaultUserAreaLocation(userDefaultAppendage);
+ if (location.equalsIgnoreCase(USER_DIR))
+ location = new File(System.getProperty(PROP_USER_DIR), userDefaultAppendage).getAbsolutePath();
+ result = buildURL(location, true);
+ }
+ } finally {
+ if (result != null)
+ System.getProperties().put(property, result.toExternalForm());
+ }
+ return result;
+ }
+
+ /**
+ * Retuns the default file system path for the configuration location.
+ * By default the configuration information is in the installation directory
+ * if this is writeable. Otherwise it is located somewhere in the user.home
+ * area relative to the current product.
+ * @return the default file system path for the configuration information
+ */
+ private String computeDefaultConfigurationLocation() {
+ // 1) We store the config state relative to the 'eclipse' directory if possible
+ // 2) If this directory is read-only
+ // we store the state in <user.home>/.eclipse/<application-id>_<version> where <user.home>
+ // is unique for each local user, and <application-id> is the one
+ // defined in .eclipseproduct marker file. If .eclipseproduct does not
+ // exist, use "eclipse" as the application-id.
+
+ String install = getInstallLocation();
+ // TODO a little dangerous here. Basically we have to assume that it is a file URL.
+ if (install.startsWith("file:")) {
+ File installDir = new File(install.substring(5));
+ if (installDir.canWrite())
+ return installDir.getAbsolutePath() + File.separator + CONFIG_DIR;
+ }
+ // We can't write in the eclipse install dir so try for some place in the user's home dir
+ return computeDefaultUserAreaLocation(CONFIG_DIR);
+ }
+
+ /**
+ * Returns a files system path for an area in the user.home region related to the
+ * current product. The given appendage is added to this base location
+ * @param pathAppendage the path segments to add to computed base
+ * @return a file system location in the user.home area related the the current
+ * product and the given appendage
+ */
+ private String computeDefaultUserAreaLocation(String pathAppendage) {
+ // we store the state in <user.home>/.eclipse/<application-id>_<version> where <user.home>
+ // is unique for each local user, and <application-id> is the one
+ // defined in .eclipseproduct marker file. If .eclipseproduct does not
+ // exist, use "eclipse" as the application-id.
+ URL installURL = buildURL(getInstallLocation(), true);
+ if (installURL == null)
+ return null;
+ File installDir = new File(installURL.getPath());
+ String appName = "." + ECLIPSE; //$NON-NLS-1$
+ File eclipseProduct = new File(installDir, PRODUCT_SITE_MARKER);
+ if (eclipseProduct.exists()) {
+ Properties props = new Properties();
+ try {
+ props.load(new FileInputStream(eclipseProduct));
+ String appId = props.getProperty(PRODUCT_SITE_ID);
+ if (appId == null || appId.trim().length() == 0)
+ appId = ECLIPSE;
+ String appVersion = props.getProperty(PRODUCT_SITE_VERSION);
+ if (appVersion == null || appVersion.trim().length() == 0)
+ appVersion = ""; //$NON-NLS-1$
+ appName += File.separator + appId + "_" + appVersion; //$NON-NLS-1$
+ } catch (IOException e) {
+ // Do nothing if we get an exception. We will default to a standard location
+ // in the user's home dir.
+ }
+ }
+ String userHome = System.getProperty(PROP_USER_HOME);
+ return new File(userHome, appName + "/" + pathAppendage).getAbsolutePath(); //$NON-NLS-1$
+ }
+
+ /**
+ * Runs this launcher with the arguments specified in the given string.
+ *
+ * @param argString the arguments string
+ * @exception Exception thrown if a problem occurs during launching
+ */
+ public static void main(String argString) {
+ Vector list = new Vector(5);
+ for (StringTokenizer tokens = new StringTokenizer(argString, " "); tokens.hasMoreElements();)
+ //$NON-NLS-1$
+ list.addElement(tokens.nextElement());
+ main((String[]) list.toArray(new String[list.size()]));
+ }
+
+ /**
+ * Runs the platform with the given arguments. The arguments must identify
+ * an application to run (e.g., <code>-application com.example.application</code>).
+ * After running the application <code>System.exit(N)</code> is executed.
+ * The value of N is derived from the value returned from running the application.
+ * If the application's return value is an <code>Integer</code>, N is this value.
+ * In all other cases, N = 0.
+ * <p>
+ * Clients wishing to run the platform without a following <code>System.exit</code>
+ * call should use <code>run()</code>.
+ * </p>
+ *
+ * @param args the command line arguments
+ * @see #run
+ */
+ public static void main(String[] args) {
+ int result = new Main().run(args);
+ System.exit(result);
+ }
+
+ /**
+ * Runs the platform with the given arguments. The arguments must identify
+ * an application to run (e.g., <code>-application com.example.application</code>).
+ * Returns the value returned from running the application.
+ * If the application's return value is an <code>Integer</code>, N is this value.
+ * In all other cases, N = 0.
+ *
+ * @param args the command line arguments
+ */
+ public int run(String[] args) {
+ int result = 0;
+ try {
+ basicRun(args);
+ String exitCode = System.getProperty(PROP_EXITCODE);
+ try {
+ result = exitCode == null ? 0 : Integer.parseInt(exitCode);
+ } catch (NumberFormatException e) {
+ result = 17;
+ }
+ } catch (Throwable e) {
+ // try and take down the splash screen.
+ takeDownSplash();
+ // only log the exceptions if they have not been caught by the
+ // EclipseStarter (i.e., if the exitCode is not 13)
+ if (!"13".equals(System.getProperty(PROP_EXITCODE))) {
+ log("Exception launching the Eclipse Platform:"); //$NON-NLS-1$
+ log(e);
+ String message = "An error has occurred"; //$NON-NLS-1$
+ if (logFile == null)
+ message += " and could not be logged: \n" + e.getMessage(); //$NON-NLS-1$
+ else
+ message += ". See the log file\n" + logFile.getAbsolutePath(); //$NON-NLS-1$
+ System.getProperties().put(PROP_EXITDATA, message);
+ }
+ // Return "unlucky" 13 as the exit code. The executable will recognize
+ // this constant and display a message to the user telling them that
+ // there is information in their log file.
+ result = 13;
+ }
+ // Return an int exit code and ensure the system property is set.
+ System.getProperties().put(PROP_EXITCODE, Integer.toString(result));
+ setExitData();
+ return result;
+ }
+
+ private void setExitData() {
+ String data = System.getProperty(PROP_EXITDATA);
+ if (exitData == null || data == null)
+ return;
+ runCommand(exitData, data, " " + EXITDATA);
+ }
+
+ /**
+ * Processes the command line arguments. The general principle is to NOT
+ * consume the arguments and leave them to be processed by Eclipse proper.
+ * There are a few args which are directed towards main() and a few others which
+ * we need to know about. Very few should actually be consumed here.
+ *
+ * @return the arguments to pass through to the launched application
+ * @param args the command line arguments
+ */
+ protected String[] processCommandLine(String[] args) {
+ // TODO temporarily handle the fact that PDE appends the -showsplash <timeout> onto
+ // the *end* of the command line. This interferes with the -vmargs arg. Process
+ // -showsplash now and remove it from the end. This code should be removed soon.
+ int end = args.length;
+ if (args.length > 1 && args[end - 2].equalsIgnoreCase(SHOWSPLASH)) {
+ showSplash = args[end - 1];
+ end -= 2;
+ }
+ String[] arguments = new String[end];
+ System.arraycopy(args, 0, arguments, 0, end);
+ int[] configArgs = new int[arguments.length];
+ configArgs[0] = -1; // need to initialize the first element to something that could not be an index.
+ int configArgIndex = 0;
+ for (int i = 0; i < arguments.length; i++) {
+ boolean found = false;
+ // check for args without parameters (i.e., a flag arg)
+ // check if debug should be enabled for the entire platform
+ if (arguments[i].equalsIgnoreCase(DEBUG)) {
+ debug = true;
+ // passed thru this arg (i.e., do not set found = true)
+ continue;
+ }
+
+ // look for and consume the nosplash directive. This supercedes any
+ // -showsplash command that might be present.
+ if (arguments[i].equalsIgnoreCase(NOSPLASH)) {
+ splashDown = true;
+ found = true;
+ }
+
+ // check if this is initialization pass
+ if (arguments[i].equalsIgnoreCase(INITIALIZE)) {
+ initialize = true;
+ // passed thru this arg (i.e., do not set found = true)
+ continue;
+ }
+
+ // check if development mode should be enabled for the entire platform
+ // If this is the last arg or there is a following arg (i.e., arg+1 has a leading -),
+ // simply enable development mode. Otherwise, assume that that the following arg is
+ // actually some additional development time class path entries. This will be processed below.
+ if (arguments[i].equalsIgnoreCase(DEV) && ((i + 1 == arguments.length) || ((i + 1 < arguments.length) && (arguments[i + 1].startsWith("-"))))) { //$NON-NLS-1$
+ inDevelopmentMode = true;
+ // do not mark the arg as found so it will be passed through
+ continue;
+ }
+
+ // done checking for args. Remember where an arg was found
+ if (found) {
+ configArgs[configArgIndex++] = i;
+ continue;
+ }
+
+ // look for the VM args arg. We have to do that before looking to see
+ // if the next element is a -arg as the thing following -vmargs may in
+ // fact be another -arg.
+ if (arguments[i].equalsIgnoreCase(VMARGS)) {
+ // consume the -vmargs arg itself
+ arguments[i] = null;
+ i++;
+ vmargs = new String[arguments.length - i];
+ for (int j = 0; i < arguments.length; i++) {
+ vmargs[j++] = arguments[i];
+ arguments[i] = null;
+ }
+ continue;
+ }
+
+ // check for args with parameters. If we are at the last argument or if the next one
+ // has a '-' as the first character, then we can't have an arg with a parm so continue.
+ if (i == arguments.length - 1 || arguments[i + 1].startsWith("-")) //$NON-NLS-1$
+ continue;
+ String arg = arguments[++i];
+
+ // look for the development mode and class path entries.
+ if (arguments[i - 1].equalsIgnoreCase(DEV)) {
+ inDevelopmentMode = true;
+ devClassPath = processDevArg(arg);
+ continue;
+ }
+
+ // look for the framework to run
+ if (arguments[i - 1].equalsIgnoreCase(FRAMEWORK)) {
+ framework = arg;
+ found = true;
+ }
+
+ // look for explicitly set install root
+ // Consume the arg here to ensure that the launcher and Eclipse get the
+ // same value as each other.
+ if (arguments[i - 1].equalsIgnoreCase(INSTALL)) {
+ System.getProperties().put(PROP_INSTALL_AREA, arg);
+ found = true;
+ }
+
+ // look for the configuration to use.
+ // Consume the arg here to ensure that the launcher and Eclipse get the
+ // same value as each other.
+ if (arguments[i - 1].equalsIgnoreCase(CONFIGURATION)) {
+ System.getProperties().put(PROP_CONFIG_AREA, arg);
+ found = true;
+ }
+
+ // look for the command to use to set exit data in the launcher
+ if (arguments[i - 1].equalsIgnoreCase(EXITDATA)) {
+ exitData = arg;
+ found = true;
+ }
+
+ // look for the command to use to show the splash screen
+ if (arguments[i - 1].equalsIgnoreCase(SHOWSPLASH)) {
+ showSplash = arg;
+ found = true;
+ }
+
+ // look for the command to use to end the splash screen
+ if (arguments[i - 1].equalsIgnoreCase(ENDSPLASH)) {
+ endSplash = arg;
+ found = true;
+ }
+
+ // look for the VM location arg
+ if (arguments[i - 1].equalsIgnoreCase(VM)) {
+ vm = arg;
+ found = true;
+ }
+
+ // done checking for args. Remember where an arg was found
+ if (found) {
+ configArgs[configArgIndex++] = i - 1;
+ configArgs[configArgIndex++] = i;
+ }
+ }
+ // remove all the arguments consumed by this argument parsing
+ if (configArgIndex == 0)
+ return arguments;
+ String[] passThruArgs = new String[arguments.length - configArgIndex - (vmargs == null ? 0 : vmargs.length + 1)];
+ configArgIndex = 0;
+ int j = 0;
+ for (int i = 0; i < arguments.length; i++) {
+ if (i == configArgs[configArgIndex])
+ configArgIndex++;
+ else if (arguments[i] != null)
+ passThruArgs[j++] = arguments[i];
+ }
+ return passThruArgs;
+ }
+
+ private String processDevArg(String arg) {
+ if (arg == null)
+ return null;
+ try {
+ URL location = new URL(arg);
+ Properties props = load(location, null);
+ String result = props.getProperty("org.eclipse.osgi");
+ return result == null ? props.getProperty("*") : result;
+ } catch (MalformedURLException e) {
+ // the arg was not a URL so use it as is.
+ return arg;
+ } catch (IOException e) {
+ // TODO consider logging here
+ return null;
+ }
+ }
+
+ private String getConfigurationLocation() {
+ if (configurationLocation != null)
+ return configurationLocation;
+ URL result = buildLocation(PROP_CONFIG_AREA, null, CONFIG_DIR);
+ if (result == null)
+ result = buildURL(computeDefaultConfigurationLocation(), true);
+ if (result == null)
+ return null;
+ configurationLocation = adjustTrailingSlash(result.toExternalForm(), true);
+ System.getProperties().put(PROP_CONFIG_AREA, configurationLocation);
+ if (debug)
+ System.out.println("Configuration location:\n " + configurationLocation);
+ return configurationLocation;
+ }
+
+ private void processConfiguration() {
+ // if the configuration area is not already defined, discover the config area by
+ // trying to find a base config area. This is either defined in a system property or
+ // is computed relative to the install location.
+ // Note that the config info read here is only used to determine a value
+ // for the user configuration area
+ URL baseConfigurationLocation = null;
+ Properties baseConfiguration = null;
+ if (System.getProperty(PROP_CONFIG_AREA) == null) {
+ String baseLocation = System.getProperty(PROP_BASE_CONFIG_AREA);
+ if (baseLocation != null)
+ // here the base config cannot have any symbolic (e..g, @xxx) entries. It must just
+ // point to the config file.
+ baseConfigurationLocation = buildURL(baseLocation, true);
+ if (baseConfigurationLocation == null)
+ // here we access the install location but this is very early. This case will only happen if
+ // the config area is not set and the base config area is not set (or is bogus).
+ // In this case we compute based on the install location.
+ baseConfigurationLocation = buildURL(getInstallLocation() + CONFIG_DIR, true);
+ baseConfiguration = loadConfiguration(baseConfigurationLocation.toExternalForm());
+ if (baseConfiguration != null) {
+ // if the base sets the install area then use that value if the property. We know the
+ // property is not already set.
+ String location = baseConfiguration.getProperty(PROP_CONFIG_AREA);
+ if (location != null)
+ System.getProperties().put(PROP_CONFIG_AREA, location);
+ // if the base sets the install area then use that value if the property is not already set.
+ // This helps in selfhosting cases where you cannot easily compute the install location
+ // from the code base.
+ location = baseConfiguration.getProperty(PROP_INSTALL_AREA);
+ if (location != null && System.getProperty(PROP_INSTALL_AREA) == null)
+ System.getProperties().put(PROP_INSTALL_AREA, location);
+ }
+ }
+
+ // Now we know where the base configuration is supposed to be. Go ahead and load
+ // it and merge into the System properties. Then, if cascaded, read the parent configuration
+ // Note that the parent may or may not be the same parent as we read above since the
+ // base can define its parent. The first parent we read was either defined by the user
+ // on the command line or was the one in the install dir.
+ // if the config or parent we are about to read is the same as the base config we read above,
+ // just reuse the base
+ Properties configuration = baseConfiguration;
+ if (configuration == null || !getConfigurationLocation().equals(baseConfigurationLocation.toExternalForm()))
+ configuration = loadConfiguration(getConfigurationLocation());
+ mergeProperties(System.getProperties(), configuration);
+ if ("false".equalsIgnoreCase(System.getProperty(PROP_CONFIG_CASCADED)))
+ // if we are not cascaded then remvoe the parent property even if it was set.
+ System.getProperties().remove(PROP_SHARED_CONFIG_AREA);
+ else {
+ URL sharedConfigURL = buildLocation(PROP_SHARED_CONFIG_AREA, null, CONFIG_DIR);
+ if (sharedConfigURL == null)
+ // here we access the install location but this is very early. This case will only happen if
+ // the config is cascaded and the parent config area is not set (or is bogus).
+ // In this case we compute based on the install location. Note that we should not
+ // precompute this value and use it as the default in the call to buildLocation as it will
+ // unnecessarily bind the install location.
+ sharedConfigURL = buildURL(getInstallLocation() + CONFIG_DIR, true);
+
+ // if the parent location is different from the config location, read it too.
+ if (sharedConfigURL != null) {
+ String location = sharedConfigURL.toExternalForm();
+ if (location.equals(getConfigurationLocation()))
+ // remove the property to show that we do not have a parent.
+ System.getProperties().remove(PROP_SHARED_CONFIG_AREA);
+ else {
+ // if the parent we are about to read is the same as the base config we read above,
+ // just reuse the base
+ configuration = baseConfiguration;
+ if (!sharedConfigURL.equals(baseConfigurationLocation))
+ configuration = loadConfiguration(location);
+ mergeProperties(System.getProperties(), configuration);
+ System.getProperties().put(PROP_SHARED_CONFIG_AREA, location);
+ if (debug)
+ System.out.println("Shared configuration location:\n " + location);
+ }
+ }
+ }
+ // setup the path to the framework
+ String urlString = System.getProperty(PROP_FRAMEWORK, null);
+ if (urlString != null) {
+ urlString = adjustTrailingSlash(urlString, true);
+ System.getProperties().put(PROP_FRAMEWORK, urlString);
+ bootLocation = resolve(urlString);
+ }
+ }
+
+ /**
+ * Returns url of the location this class was loaded from
+ */
+ private String getInstallLocation() {
+ if (installLocation != null)
+ return installLocation;
+
+ // value is not set so compute the default and set the value
+ installLocation = System.getProperty(PROP_INSTALL_AREA);
+ if (installLocation != null) {
+ URL location = buildURL(installLocation, true);
+ if (location == null)
+ throw new IllegalStateException("Install location is invalid: " + installLocation);
+ installLocation = location.toExternalForm();
+ System.getProperties().put(PROP_INSTALL_AREA, installLocation);
+ if (debug)
+ System.out.println("Install location:\n " + installLocation);
+ return installLocation;
+ }
+
+ URL result = Main.class.getProtectionDomain().getCodeSource().getLocation();
+ String path = decode(result.getFile());
+ path = new File(path).getAbsolutePath().replace(File.separatorChar, '/');
+ // TODO need a better test for windows
+ // If on Windows then canonicalize the drive letter to be lowercase.
+ if (File.separatorChar == '\\')
+ if (Character.isUpperCase(path.charAt(0))) {
+ char[] chars = path.toCharArray();
+ chars[0] = Character.toLowerCase(chars[0]);
+ path = new String(chars);
+ }
+ if (path.endsWith(".jar")) //$NON-NLS-1$
+ path = path.substring(0, path.lastIndexOf("/") + 1); //$NON-NLS-1$
+ try {
+ installLocation = new URL(result.getProtocol(), result.getHost(), result.getPort(), path).toExternalForm();
+ System.getProperties().put(PROP_INSTALL_AREA, installLocation);
+ } catch (MalformedURLException e) {
+ // TODO Very unlikely case. log here.
+ }
+ if (debug)
+ System.out.println("Install location:\n " + installLocation);
+ return installLocation;
+ }
+
+ /*
+ * Load the given configuration file
+ */
+ private Properties loadConfiguration(String url) {
+ Properties result = null;
+ url += CONFIG_FILE;
+ try {
+ if (debug)
+ System.out.print("Configuration file:\n " + url.toString()); //$NON-NLS-1$
+ result = loadProperties(url);
+ if (debug)
+ System.out.println(" loaded"); //$NON-NLS-1$
+ } catch (IOException e) {
+ if (debug)
+ System.out.println(" not found or not read"); //$NON-NLS-1$
+ }
+ return result;
+ }
+
+ private Properties loadProperties(String location) throws IOException {
+ // try to load saved configuration file (watch for failed prior save())
+ URL url = buildURL(location, false);
+ if (url == null)
+ return null;
+ Properties result = null;
+ IOException originalException = null;
+ try {
+ result = load(url, null); // try to load config file
+ } catch (IOException e1) {
+ originalException = e1;
+ try {
+ result = load(url, CONFIG_FILE_TEMP_SUFFIX); // check for failures on save
+ } catch (IOException e2) {
+ try {
+ result = load(url, CONFIG_FILE_BAK_SUFFIX); // check for failures on save
+ } catch (IOException e3) {
+ throw originalException; // we tried, but no config here ...
+ }
+ }
+ }
+ return result;
+ }
+
+ /*
+ * Load the configuration
+ */
+ private Properties load(URL url, String suffix) throws IOException {
+ // figure out what we will be loading
+ if (suffix != null && !suffix.equals("")) //$NON-NLS-1$
+ url = new URL(url.getProtocol(), url.getHost(), url.getPort(), url.getFile() + suffix);
+
+ // try to load saved configuration file
+ Properties props = new Properties();
+ InputStream is = null;
+ try {
+ is = url.openStream();
+ props.load(is);
+ // check to see if we have complete config file
+ if (!PROP_EOF.equals(props.getProperty(PROP_EOF)))
+ throw new IOException("Incomplete configuration file: " + url.toExternalForm()); //$NON-NLS-1$
+ } finally {
+ if (is != null)
+ try {
+ is.close();
+ } catch (IOException e) {
+ //ignore failure to close
+ }
+ }
+ return props;
+ }
+
+ /*
+ * Handle splash screen.
+ * We support 2 startup scenarios:
+ *
+ * (1) the executable launcher put up the splash screen. In that
+ * scenario we are invoked with -endsplash command which is
+ * fully formed to take down the splash screen
+ *
+ * (2) the executable launcher did not put up the splash screen,
+ * but invokes Eclipse with partially formed -showsplash command.
+ * In this scenario we determine which splash to display (based on
+ * feature information) and then call -showsplash command.
+ *
+ * In both scenarios we pass a handler (Runnable) to the platform.
+ * The handler is called as a result of the launched application calling
+ * Platform.endSplash(). In the first scenario this results in the
+ * -endsplash command being executed. In the second scenarios this
+ * results in the process created as a result of the -showsplash command
+ * being destroyed.
+ *
+ * @param bootPath search path for the boot plugin
+ */
+ private void handleSplash(URL[] defaultPath) {
+ // run without splash if we are initializing or nosplash
+ // was specified (splashdown = true)
+ if (initialize || splashDown) {
+ showSplash = null;
+ endSplash = null;
+ return;
+ }
+
+ // if -endsplash is specified, use it and ignore any -showsplash command
+ if (endSplash != null) {
+ showSplash = null;
+ return;
+ }
+
+ // check if we are running without a splash screen
+ if (showSplash == null)
+ return;
+
+ // determine the splash location
+ String location = getSplashLocation(defaultPath);
+ if (debug)
+ System.out.println("Splash location:\n " + location); //$NON-NLS-1$
+ if (location == null)
+ return;
+ showProcess = runCommand(showSplash, location, " " + SHOWSPLASH); //$NON-NLS-1$
+ }
+
+ private Process runCommand(String command, String data, String separator) {
+ // Parse the showsplash command into its separate arguments.
+ // The command format is:
+ // <executable> -show <magicArg> [<splashPath>]
+ // If either the <executable> or the <splashPath> arguments contain a
+ // space, Runtime.getRuntime().exec( String ) will not work, even
+ // if both arguments are enclosed in double-quotes. The solution is to
+ // use the Runtime.getRuntime().exec( String[] ) method.
+ String[] args = new String[(data != null ? 4 : 3)];
+ // get the executable part
+ int sIndex = 0;
+ int eIndex = command.indexOf(separator);
+ if (eIndex == -1)
+ return null; // invalid command
+ args[0] = command.substring(sIndex, eIndex);
+ // get the command part
+ sIndex = eIndex + 1;
+ eIndex = command.indexOf(" ", sIndex); //$NON-NLS-1$
+ if (eIndex == -1)
+ return null; // invalid command
+ args[1] = command.substring(sIndex, eIndex);
+
+ // get the magic arg part
+ args[2] = command.substring(eIndex + 1);
+
+ // add on our data
+ if (data != null)
+ args[3] = data;
+
+ Process result = null;
+ try {
+ result = Runtime.getRuntime().exec(args);
+ } catch (Exception e) {
+ log("Exception running command: " + command); //$NON-NLS-1$
+ log(e);
+ }
+ return result;
+ }
+
+ /*
+ * take down the splash screen. Try both take-down methods just in case
+ * (only one should ever be set)
+ */
+ protected void takeDownSplash() {
+ if (splashDown) // splash is already down
+ return;
+
+ // check if -endsplash was specified
+ if (endSplash != null) {
+ try {
+ Runtime.getRuntime().exec(endSplash);
+ } catch (Exception e) {
+ //ignore failure to end splash
+ }
+ }
+
+ // check if -showsplash was specified and executed
+ if (showProcess != null) {
+ showProcess.destroy();
+ showProcess = null;
+ }
+ splashDown = true;
+ }
+
+ /*
+ * Return path of the splash image to use. First search the defined splash path.
+ * If that does not work, look for a default splash. Currently the splash must be in the file system
+ * so the return value here is the file system path.
+ */
+ private String getSplashLocation(URL[] bootPath) {
+ String result = System.getProperty(PROP_SPLASHLOCATION);
+ if (result != null)
+ return result;
+ String splashPath = System.getProperty(PROP_SPLASHPATH);
+ if (splashPath != null) {
+ String[] entries = getArrayFromList(splashPath);
+ ArrayList path = new ArrayList(entries.length);
+ for (int i = 0; i < entries.length; i++) {
+ String entry = resolve(entries[i]);
+ if (entry == null || entry.startsWith("file:")) {
+ File entryFile = new File(entry.substring(5).replace('/', File.separatorChar));
+ entry = searchFor(entryFile.getName(), entryFile.getParent());
+ if (entry != null)
+ path.add(entry);
+ } else
+ log("Invalid splash path entry: " + entries[i]);
+ }
+ // see if we can get a splash given the splash path
+ result = searchForSplash((String[]) path.toArray(new String[path.size()]));
+ if (result != null) {
+ System.getProperties().put(PROP_SPLASHLOCATION, result);
+ return result;
+ }
+ }
+
+ // can't find it on the splashPath so look for a default splash
+ String temp = bootPath[0].getFile(); // take the first path element
+ temp = temp.replace('/', File.separatorChar);
+ int ix = temp.lastIndexOf("plugins" + File.separator); //$NON-NLS-1$
+ if (ix != -1) {
+ int pix = temp.indexOf(File.separator, ix + 8);
+ if (pix != -1) {
+ temp = temp.substring(0, pix);
+ result = searchForSplash(new String[] {temp});
+ if (result != null)
+ System.getProperties().put(PROP_SPLASHLOCATION, result);
+ }
+ }
+ return result;
+ }
+
+ /*
+ * Do a locale-sensitive lookup of splash image
+ */
+ private String searchForSplash(String[] searchPath) {
+ if (searchPath == null)
+ return null;
+
+ // get current locale information
+ String localePath = Locale.getDefault().toString().replace('_', File.separatorChar);
+
+ // search the specified path
+ while (localePath != null) {
+ String suffix;
+ if (localePath.equals("")) { //$NON-NLS-1$
+ // look for nl'ed splash image
+ suffix = SPLASH_IMAGE;
+ } else {
+ // look for default splash image
+ suffix = "nl" + File.separator + localePath + File.separator + SPLASH_IMAGE; //$NON-NLS-1$
+ }
+
+ // check for file in searchPath
+ for (int i = 0; i < searchPath.length; i++) {
+ String path = searchPath[i];
+ if (!path.endsWith(File.separator))
+ path += File.separator;
+ path += suffix;
+ File result = new File(path);
+ if (result.exists())
+ return result.getAbsolutePath(); // return the first match found [20063]
+ }
+
+ // try the next variant
+ if (localePath.equals("")) //$NON-NLS-1$
+ localePath = null;
+ else {
+ int ix = localePath.lastIndexOf(File.separator);
+ if (ix == -1)
+ localePath = ""; //$NON-NLS-1$
+ else
+ localePath = localePath.substring(0, ix);
+ }
+ }
+
+ // sorry, could not find splash image
+ return null;
+ }
+
+ /*
+ * resolve platform:/base/ URLs
+ */
+ private String resolve(String urlString) {
+ // handle the case where people mistakenly spec a refererence: url.
+ if (urlString.startsWith("reference:")) {
+ urlString = urlString.substring(10);
+ System.getProperties().put(PROP_FRAMEWORK, urlString);
+ }
+ if (urlString.startsWith(PLATFORM_URL)) {
+ String path = urlString.substring(PLATFORM_URL.length());
+ return getInstallLocation() + path;
+ } else
+ return urlString;
+ }
+
+ /*
+ * Entry point for logging.
+ */
+ private synchronized void log(Object obj) {
+ if (obj == null)
+ return;
+ try {
+ openLogFile();
+ try {
+ if (newSession) {
+ log.write(SESSION);
+ log.write(' ');
+ String timestamp = new Date().toString();
+ log.write(timestamp);
+ log.write(' ');
+ for (int i = SESSION.length() + timestamp.length(); i < 78; i++)
+ log.write('-');
+ log.newLine();
+ newSession = false;
+ }
+ write(obj);
+ } finally {
+ if (logFile == null) {
+ if (log != null)
+ log.flush();
+ } else
+ closeLogFile();
+ }
+ } catch (Exception e) {
+ System.err.println("An exception occurred while writing to the platform log:"); //$NON-NLS-1$
+ e.printStackTrace(System.err);
+ System.err.println("Logging to the console instead."); //$NON-NLS-1$
+ //we failed to write, so dump log entry to console instead
+ try {
+ log = logForStream(System.err);
+ write(obj);
+ log.flush();
+ } catch (Exception e2) {
+ System.err.println("An exception occurred while logging to the console:"); //$NON-NLS-1$
+ e2.printStackTrace(System.err);
+ }
+ } finally {
+ log = null;
+ }
+ }
+
+ /*
+ * This should only be called from #log()
+ */
+ private void write(Object obj) throws IOException {
+ if (obj == null)
+ return;
+ if (obj instanceof Throwable) {
+ log.write(STACK);
+ log.newLine();
+ ((Throwable) obj).printStackTrace(new PrintWriter(log));
+ } else {
+ log.write(ENTRY);
+ log.write(' ');
+ log.write(PLUGIN_ID);
+ log.write(' ');
+ log.write(String.valueOf(ERROR));
+ log.write(' ');
+ log.write(String.valueOf(0));
+ log.write(' ');
+ try {
+ DateFormat formatter = new SimpleDateFormat("MMM dd, yyyy kk:mm:ss.SS"); //$NON-NLS-1$
+ log.write(formatter.format(new Date()));
+ } catch (Exception e) {
+ // continue if we can't write out the date
+ log.write(Long.toString(System.currentTimeMillis()));
+ }
+ log.newLine();
+ log.write(MESSAGE);
+ log.write(' ');
+ log.write(String.valueOf(obj));
+ }
+ log.newLine();
+ }
+
+ private void computeLogFileLocation() {
+ String logFileProp = System.getProperty(PROP_LOGFILE);
+ if (logFileProp != null) {
+ if (logFile == null || !logFileProp.equals(logFile.getAbsolutePath())) {
+ logFile = new File(logFileProp);
+ logFile.getParentFile().mkdirs();
+ }
+ return;
+ }
+
+ // compute the base location and then append the name of the log file
+ URL base = buildURL(System.getProperty(PROP_CONFIG_AREA), false);
+ if (base == null)
+ return;
+ logFile = new File(base.getPath(), Long.toString(System.currentTimeMillis()) + ".log"); //$NON-NLS-1$
+ logFile.getParentFile().mkdirs();
+ System.setProperty(PROP_LOGFILE, logFile.getAbsolutePath());
+ }
+
+ /**
+ * Converts an ASCII character representing a hexadecimal
+ * value into its integer equivalent.
+ */
+ private int hexToByte(byte b) {
+ switch (b) {
+ case '0' :
+ return 0;
+ case '1' :
+ return 1;
+ case '2' :
+ return 2;
+ case '3' :
+ return 3;
+ case '4' :
+ return 4;
+ case '5' :
+ return 5;
+ case '6' :
+ return 6;
+ case '7' :
+ return 7;
+ case '8' :
+ return 8;
+ case '9' :
+ return 9;
+ case 'A' :
+ case 'a' :
+ return 10;
+ case 'B' :
+ case 'b' :
+ return 11;
+ case 'C' :
+ case 'c' :
+ return 12;
+ case 'D' :
+ case 'd' :
+ return 13;
+ case 'E' :
+ case 'e' :
+ return 14;
+ case 'F' :
+ case 'f' :
+ return 15;
+ default :
+ throw new IllegalArgumentException("Switch error decoding URL"); //$NON-NLS-1$
+ }
+ }
+
+ private void openLogFile() throws IOException {
+ computeLogFileLocation();
+ try {
+ log = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(logFile.getAbsolutePath(), true), "UTF-8")); //$NON-NLS-1$
+ } catch (IOException e) {
+ logFile = null;
+ throw e;
+ }
+ }
+
+ private BufferedWriter logForStream(OutputStream output) {
+ try {
+ return new BufferedWriter(new OutputStreamWriter(output, "UTF-8")); //$NON-NLS-1$
+ } catch (UnsupportedEncodingException e) {
+ return new BufferedWriter(new OutputStreamWriter(output));
+ }
+ }
+
+ private void closeLogFile() throws IOException {
+ try {
+ if (log != null) {
+ log.flush();
+ log.close();
+ }
+ } finally {
+ log = null;
+ }
+ }
+
+ private void mergeProperties(Properties destination, Properties source) {
+ if (destination == null || source == null)
+ return;
+ for (Enumeration e = source.keys(); e.hasMoreElements();) {
+ String key = (String) e.nextElement();
+ if (!key.equals(PROP_EOF)) {
+ String value = source.getProperty(key);
+ if (destination.getProperty(key) == null)
+ destination.put(key, value);
+ }
+ }
+ }
+
+ public void setupVMProperties() {
+ if (vm != null)
+ System.getProperties().put(PROP_VM, vm);
+ setMultiValueProperty(PROP_VMARGS, vmargs);
+ setMultiValueProperty(PROP_COMMANDS, commands);
+ }
+
+ private void setMultiValueProperty(String property, String[] value) {
+ if (value != null) {
+ StringBuffer result = new StringBuffer(300);
+ for (int i = 0; i < value.length; i++) {
+ result.append(value[i]);
+ result.append('\n');
+ }
+ System.getProperties().put(property, result.toString());
+ }
+ }
+
+ private String adjustTrailingSlash(String value, boolean slash) {
+ boolean hasSlash = value.endsWith("/") || value.endsWith(File.separator);
+ if (hasSlash == slash)
+ return value;
+ if (hasSlash)
+ return value.substring(0, value.length() - 1);
+ return value + "/";
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test492/Main_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test492/Main_out.js
new file mode 100644
index 0000000..f67227c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test492/Main_out.js
@@ -0,0 +1,1574 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.core.launcher;
+
+import java.io.*;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.net.*;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+/**
+ * The framework to run. This is used if the bootLocation (-boot) is not specified.
+ * The value can be specified on the command line as -framework.
+ * Startup class for Eclipse. Creates a class loader using
+ * supplied URL of platform installation, loads and calls
+ * the Eclipse Boot Loader. The startup arguments are as follows:
+ * <dl>
+ * <dd>
+ * -application &lt;id&gt;: the identifier of the application to run
+ * </dd>
+ * <dd>
+ * -arch &lt;architecture&gt;: sets the processor architecture value
+ * </dd>
+ * <dd>
+ * -boot &lt;location&gt;: the location, expressed as a URL, of the platform's boot.jar.
+ * <i>Deprecated: replaced by -configuration</i>
+ * </dd>
+ * <dd>
+ * -classloaderproperties [properties file]: activates platform class loader enhancements using
+ * the class loader properties file at the given location, if specified. The (optional) file argument
+ * can be either a file path or an absolute URL.
+ * </dd>
+ * <dd>
+ * -configuration &lt;location&gt;: the location, expressed as a URL, for the Eclipse platform
+ * configuration file. The configuration file determines the location of the Eclipse platform, the set
+ * of available plug-ins, and the primary feature.
+ * </dd>
+ * <dd>
+ * -consolelog : enables log to the console. Handy when combined with -debug
+ * </dd>
+ * <dd>
+ * -data &lt;location&gt;: sets the workspace location and the default location for projects
+ * </dd>
+ * <dd>
+ * -debug [options file]: turns on debug mode for the platform and optionally specifies a location
+ * for the .options file. This file indicates what debug points are available for a
+ * plug-in and whether or not they are enabled. If a location is not specified, the platform searches
+ * for the .options file under the install directory.
+ * </dd>
+ * <dd>
+ * -dev [entries]: turns on dev mode and optionally specifies comma-separated class path entries
+ * which are added to the class path of each plug-in
+ * </dd>
+ * <dd>
+ * -feature &lt;id&gt;: the identifier of the primary feature. The primary feature gives the launched
+ * instance of Eclipse its product personality, and determines the product customization
+ * information.
+ * </dd>
+ * <dd>
+ * -keyring &lt;location&gt;: the location of the authorization database on disk. This argument
+ * has to be used together with the -password argument.
+ * </dd>
+ * <dd>
+ * -nl &lt;locale&gt;: sets the name of the locale on which Eclipse platform will run
+ * </dd>
+ * <dd>
+ * -nolazyregistrycacheloading : deactivates platform plug-in registry cache loading optimization.
+ * By default, extensions' configuration elements will be loaded from the registry cache (when
+ * available) only on demand, reducing memory footprint. This option will force the registry cache
+ * to be fully loaded at startup.
+ * </dd>
+ * <dd>
+ * -nopackageprefixes: deactivates classloader package prefixes optimization
+ * </dd>
+ * <dd>
+ * -noregistrycache: bypasses the reading and writing of an internal plug-in registry cache file
+ * </dd>
+ * <dd>
+ * -os &lt;operating system&gt;: sets the operating system value
+ * </dd>
+ * <dd>
+ * -password &lt;passwd&gt;: the password for the authorization database
+ * </dd>
+ * <dd>
+ * -plugins &lt;location&gt;: the arg is a URL pointing to a file which specs the plugin
+ * path for the platform. The file is in property file format where the keys are user-defined
+ * names and the values are comma separated lists of either explicit paths to plugin.xml
+ * files or directories containing plugins (e.g., .../eclipse/plugins).
+ * <i>Deprecated: replaced by -configuration</i>
+ * </dd>
+ * <dd>
+ * -plugincustomization &lt;properties file&gt;: the location of a properties file containing default
+ * settings for plug-in preferences. These default settings override default settings specified in the
+ * primary feature. Relative paths are interpreted relative to the directory that eclipse was started
+ * from.
+ * </dd>
+ * <dd>
+ * -ws &lt;window system&gt;: sets the window system value
+ * </dd>
+ * </dl>
+ */
+public class Main {
+ /**
+ * Indicates whether this instance is running in debug mode.
+ */
+ protected boolean debug = false;
+
+ /**
+ * The location of the launcher to run.
+ */
+ protected String bootLocation = null;
+
+ /**
+ * The location of the install root
+ */
+ protected String installLocation = null;
+
+ /**
+ * The location of the configuration information for this instance
+ */
+ protected String configurationLocation = null;
+
+ /**
+ * The location of the configuration information in the install root
+ */
+ protected String parentConfigurationLocation = null;
+
+ /**
+ * The id of the bundle that will contain the framework to run. Defaults to org.eclipse.osgi.
+ */
+ protected String framework = OSGI;
+
+ /**
+ * The extra development time class path entries.
+ */
+ protected String devClassPath = null;
+
+ /**
+ * Indicates whether this instance is running in development mode.
+ */
+ protected boolean inDevelopmentMode = false;
+
+ private String exitData = null;
+ private String vm = null;
+ private String[] vmargs = null;
+ private String[] commands = null;
+
+ // splash handling
+ private String showSplash = null;
+ private String endSplash = null;
+ private boolean initialize = false;
+ private Process showProcess = null;
+ private boolean splashDown = false;
+ private final Runnable endSplashHandler = new Runnable() {
+ public void run() {
+ takeDownSplash();
+ }
+ };
+
+ // command line args
+ private static final String FRAMEWORK = "-framework"; //$NON-NLS-1$
+ private static final String INSTALL = "-install"; //$NON-NLS-1$
+ private static final String INITIALIZE = "-initialize"; //$NON-NLS-1$
+ private static final String VM = "-vm"; //$NON-NLS-1$
+ private static final String VMARGS = "-vmargs"; //$NON-NLS-1$
+ private static final String DEBUG = "-debug"; //$NON-NLS-1$
+ private static final String DEV = "-dev"; //$NON-NLS-1$
+ private static final String CONFIGURATION = "-configuration"; //$NON-NLS-1$
+ private static final String EXITDATA = "-exitdata"; //$NON-NLS-1$
+ private static final String NOSPLASH = "-nosplash"; //$NON-NLS-1$
+ private static final String SHOWSPLASH = "-showsplash"; //$NON-NLS-1$
+ private static final String ENDSPLASH = "-endsplash"; //$NON-NLS-1$
+ private static final String SPLASH_IMAGE = "splash.bmp"; //$NON-NLS-1$
+
+ private static final String OSGI = "org.eclipse.osgi"; //$NON-NLS-1$
+ private static final String STARTER = "org.eclipse.core.runtime.adaptor.EclipseStarter"; //$NON-NLS-1$
+ private static final String PLATFORM_URL = "platform:/base/"; //$NON-NLS-1$
+
+ // constants: configuration file location
+ private static final String CONFIG_DIR = "configuration/"; //$NON-NLS-1$
+ private static final String CONFIG_FILE = "config.ini"; //$NON-NLS-1$
+ private static final String CONFIG_FILE_TEMP_SUFFIX = ".tmp"; //$NON-NLS-1$
+ private static final String CONFIG_FILE_BAK_SUFFIX = ".bak"; //$NON-NLS-1$
+ private static final String ECLIPSE = "eclipse"; //$NON-NLS-1$
+ private static final String PRODUCT_SITE_MARKER = ".eclipseproduct"; //$NON-NLS-1$
+ private static final String PRODUCT_SITE_ID = "id"; //$NON-NLS-1$
+ private static final String PRODUCT_SITE_VERSION = "version"; //$NON-NLS-1$
+
+ // constants: System property keys and/or configuration file elements
+ private static final String PROP_USER_HOME = "user.home"; //$NON-NLS-1$
+ private static final String PROP_USER_DIR = "user.dir"; //$NON-NLS-1$
+ private static final String PROP_INSTALL_AREA = "osgi.install.area"; //$NON-NLS-1$
+ private static final String PROP_CONFIG_AREA = "osgi.configuration.area"; //$NON-NLS-1$
+ private static final String PROP_BASE_CONFIG_AREA = "osgi.baseConfiguration.area"; //$NON-NLS-1$
+ private static final String PROP_SHARED_CONFIG_AREA = "osgi.sharedConfiguration.area"; //$NON-NLS-1$
+ private static final String PROP_CONFIG_CASCADED = "osgi.configuration.cascaded"; //$NON-NLS-1$
+ private static final String PROP_FRAMEWORK = "osgi.framework"; //$NON-NLS-1$
+ private static final String PROP_SPLASHPATH = "osgi.splashPath"; //$NON-NLS-1$
+ private static final String PROP_SPLASHLOCATION = "osgi.splashLocation"; //$NON-NLS-1$
+ private static final String PROP_CLASSPATH = "osgi.frameworkClassPath"; //$NON-NLS-1$
+ private static final String PROP_LOGFILE = "osgi.logfile"; //$NON-NLS-1$
+ private static final String PROP_EOF = "eof"; //$NON-NLS-1$
+
+ private static final String PROP_EXITCODE = "eclipse.exitcode"; //$NON-NLS-1$
+ private static final String PROP_EXITDATA = "eclipse.exitdata"; //$NON-NLS-1$
+ private static final String PROP_VM = "eclipse.vm"; //$NON-NLS-1$
+ private static final String PROP_VMARGS = "eclipse.vmargs"; //$NON-NLS-1$
+ private static final String PROP_COMMANDS = "eclipse.commands"; //$NON-NLS-1$
+
+ // Data mode constants for user, configuration and data locations.
+ private static final String NONE = "@none"; //$NON-NLS-1$
+ private static final String NO_DEFAULT = "@noDefault"; //$NON-NLS-1$
+ private static final String USER_HOME = "@user.home"; //$NON-NLS-1$
+ private static final String USER_DIR = "@user.dir"; //$NON-NLS-1$
+
+ // log file handling
+ protected static final String SESSION = "!SESSION"; //$NON-NLS-1$
+ protected static final String ENTRY = "!ENTRY"; //$NON-NLS-1$
+ protected static final String MESSAGE = "!MESSAGE"; //$NON-NLS-1$
+ protected static final String STACK = "!STACK"; //$NON-NLS-1$
+ protected static final int ERROR = 4;
+ protected static final String PLUGIN_ID = "org.eclipse.core.launcher"; //$NON-NLS-1$
+ protected File logFile = null;
+ protected BufferedWriter log = null;
+ protected boolean newSession = true;
+
+ /**
+ * Executes the launch.
+ *
+ * @return the result of performing the launch
+ * @param args command-line arguments
+ * @exception Exception thrown if a problem occurs during the launch
+ */
+ protected Object basicRun(String[] args) throws Exception {
+ System.getProperties().setProperty("eclipse.debug.startupTime", Long.toString(System.currentTimeMillis())); //$NON-NLS-1$
+ commands = args;
+ String[] passThruArgs = processCommandLine(args);
+ setupVMProperties();
+ processConfiguration();
+ // need to ensure that getInstallLocation is called at least once to initialize the value.
+ // Do this AFTER processing the configuration to allow the configuration to set
+ // the install location.
+ getInstallLocation();
+
+ // locate boot plugin (may return -dev mode variations)
+ URL[] bootPath = getBootPath(bootLocation);
+
+ // splash handling is done here, because the default case needs to know
+ // the location of the boot plugin we are going to use
+ handleSplash(bootPath);
+
+ // load the BootLoader and startup the platform
+ URLClassLoader loader = new URLClassLoader(bootPath, null);
+ Class clazz = loader.loadClass(STARTER);
+ Method method = clazz.getDeclaredMethod("run", new Class[] {String[].class, Runnable.class}); //$NON-NLS-1$
+ try {
+ return method.invoke(clazz, new Object[] {passThruArgs, endSplashHandler});
+ } catch (InvocationTargetException e) {
+ if (e.getTargetException() instanceof Error)
+ throw (Error) e.getTargetException();
+ else if (e.getTargetException() instanceof Exception)
+ throw (Exception) e.getTargetException();
+ else
+ //could be a subclass of Throwable!
+ throw e;
+ }
+ }
+
+ /**
+ * Returns a string representation of the given URL String. This converts
+ * escaped sequences (%..) in the URL into the appropriate characters.
+ * NOTE: due to class visibility there is a copy of this method
+ * in InternalBootLoader
+ */
+ private String decode(String urlString) {
+ //try to use Java 1.4 method if available
+ try {
+ Class clazz = URLDecoder.class;
+ Method method = clazz.getDeclaredMethod("decode", new Class[] {String.class, String.class}); //$NON-NLS-1$
+ //first encode '+' characters, because URLDecoder incorrectly converts
+ //them to spaces on certain class library implementations.
+ if (urlString.indexOf('+') >= 0) {
+ int len = urlString.length();
+ StringBuffer buf = new StringBuffer(len);
+ for (int i = 0; i < len; i++) {
+ char c = urlString.charAt(i);
+ if (c == '+')
+ buf.append("%2B");
+ //$NON-NLS-1$
+ else
+ buf.append(c);
+ }
+ urlString = buf.toString();
+ }
+ Object result = method.invoke(null, new Object[] {urlString, "UTF-8"}); //$NON-NLS-1$
+ if (result != null)
+ return (String) result;
+ } catch (Exception e) {
+ //JDK 1.4 method not found -- fall through and decode by hand
+ }
+ //decode URL by hand
+ boolean replaced = false;
+ byte[] encodedBytes = urlString.getBytes();
+ int encodedLength = encodedBytes.length;
+ byte[] decodedBytes = new byte[encodedLength];
+ int decodedLength = 0;
+ for (int i = 0; i < encodedLength; i++) {
+ byte b = encodedBytes[i];
+ if (b == '%') {
+ byte enc1 = encodedBytes[++i];
+ byte enc2 = encodedBytes[++i];
+ b = (byte) ((hexToByte(enc1) << 4) + hexToByte(enc2));
+ replaced = true;
+ }
+ decodedBytes[decodedLength++] = b;
+ }
+ if (!replaced)
+ return urlString;
+ try {
+ return new String(decodedBytes, 0, decodedLength, "UTF-8"); //$NON-NLS-1$
+ } catch (UnsupportedEncodingException e) {
+ //use default encoding
+ return new String(decodedBytes, 0, decodedLength);
+ }
+ }
+
+ /**
+ * Returns the result of converting a list of comma-separated tokens into an array
+ *
+ * @return the array of string tokens
+ * @param prop the initial comma-separated string
+ */
+ private String[] getArrayFromList(String prop) {
+ if (prop == null || prop.trim().equals("")) //$NON-NLS-1$
+ return new String[0];
+ Vector list = new Vector();
+ StringTokenizer tokens = new StringTokenizer(prop, ","); //$NON-NLS-1$
+ while (tokens.hasMoreTokens()) {
+ String token = tokens.nextToken().trim();
+ if (!token.equals("")) //$NON-NLS-1$
+ list.addElement(token);
+ }
+ return list.isEmpty() ? new String[0] : (String[]) list.toArray(new String[list.size()]);
+ }
+
+ /**
+ * Returns the <code>URL</code>-based class path describing where the boot classes
+ * are located when running in development mode.
+ *
+ * @return the url-based class path
+ * @param base the base location
+ * @exception MalformedURLException if a problem occurs computing the class path
+ */
+ private URL[] getDevPath(URL base) throws IOException {
+ String devBase = base.toExternalForm();
+ ArrayList result = new ArrayList(5);
+ if (inDevelopmentMode)
+ addDevEntries(devBase, result); //$NON-NLS-1$
+ //The jars from the base always need to be added, even when running in dev mode (bug 46772)
+ addBaseJars(devBase, result);
+ return (URL[]) result.toArray(new URL[result.size()]);
+ }
+
+ private void addBaseJars(String devBase, ArrayList result) throws IOException {
+ String baseJarList = System.getProperty(PROP_CLASSPATH);
+ if (baseJarList == null) {
+ Properties defaults = loadProperties(devBase + "eclipse.properties");
+ baseJarList = defaults.getProperty(PROP_CLASSPATH);
+ if (baseJarList == null)
+ throw new IOException("Unable to initialize " + PROP_CLASSPATH);
+ System.getProperties().put(PROP_CLASSPATH, baseJarList);
+ }
+ String[] baseJars = getArrayFromList(baseJarList);
+ for (int i = 0; i < baseJars.length; i++) {
+ String string = baseJars[i];
+ try {
+ URL url = new URL(string);
+ addEntry(url, result);
+ } catch (MalformedURLException e) {
+ addEntry(new URL(devBase + string), result);
+ }
+ }
+ }
+
+ private void addEntry(URL url, List result) {
+ if (new File(url.getFile()).exists())
+ result.add(url);
+ }
+
+ private void addDevEntries(String devBase, List result) throws MalformedURLException {
+ String[] locations = getArrayFromList(devClassPath);
+ for (int i = 0; i < locations.length; i++) {
+ String spec = devBase + locations[i];
+ char lastChar = spec.charAt(spec.length() - 1);
+ URL url;
+ if ((spec.endsWith(".jar") || (lastChar == '/' || lastChar == '\\'))) //$NON-NLS-1$
+ url = new URL(spec);
+ else
+ url = new URL(spec + "/"); //$NON-NLS-1$
+ addEntry(url, result);
+ }
+ }
+
+ /**
+ * Returns the <code>URL</code>-based class path describing where the boot classes are located.
+ *
+ * @return the url-based class path
+ * @param base the base location
+ * @exception MalformedURLException if a problem occurs computing the class path
+ */
+ private URL[] getBootPath(String base) throws IOException {
+ URL url = null;
+ if (base != null) {
+ url = new URL(base);
+ } else {
+ // search in the root location
+ url = new URL(getInstallLocation());
+ String path = url.getFile() + "plugins"; //$NON-NLS-1$
+ path = searchFor(framework, path);
+ if (path == null)
+ throw new RuntimeException("Could not find framework"); //$NON-NLS-1$
+ // add on any dev path elements
+ url = new URL(url.getProtocol(), url.getHost(), url.getPort(), path);
+ }
+ if (System.getProperty(PROP_FRAMEWORK) == null)
+ System.getProperties().put(PROP_FRAMEWORK, url.toExternalForm());
+ if (debug)
+ System.out.println("Framework located:\n " + url.toExternalForm());
+ URL[] result = getDevPath(url);
+ if (debug) {
+ System.out.println("Framework classpath:"); //$NON-NLS-1$
+ for (int i = 0; i < result.length; i++)
+ System.out.println(" " + result[i].toExternalForm()); //$NON-NLS-1$
+ }
+ return result;
+ }
+
+ /**
+ * Searches for the given target directory starting in the "plugins" subdirectory
+ * of the given location. If one is found then this location is returned;
+ * otherwise an exception is thrown.
+ *
+ * @return the location where target directory was found
+ * @param start the location to begin searching
+ */
+ private String searchFor(final String target, String start) {
+ FileFilter filter = new FileFilter() {
+ public boolean accept(File candidate) {
+ return candidate.isDirectory() && (candidate.getName().equals(target) || candidate.getName().startsWith(target + "_")); //$NON-NLS-1$
+ }
+ };
+ File[] candidates = new File(start).listFiles(filter); //$NON-NLS-1$
+ if (candidates == null)
+ return null;
+ String result = null;
+ Object maxVersion = null;
+ for (int i = 0; i < candidates.length; i++) {
+ String name = candidates[i].getName();
+ String version = ""; //$NON-NLS-1$ // Note: directory with version suffix is always > than directory without version suffix
+ int index = name.indexOf('_');
+ if (index != -1)
+ version = name.substring(index + 1);
+ Object currentVersion = getVersionElements(version);
+ if (maxVersion == null) {
+ result = candidates[i].getAbsolutePath();
+ maxVersion = currentVersion;
+ } else {
+ if (compareVersion((Object[]) maxVersion, (Object[]) currentVersion) < 0) {
+ result = candidates[i].getAbsolutePath();
+ maxVersion = currentVersion;
+ }
+ }
+ }
+ if (result == null)
+ return null;
+ return result.replace(File.separatorChar, '/') + "/"; //$NON-NLS-1$
+ }
+
+ /**
+ * Compares version strings.
+ * @return result of comparison, as integer;
+ * <code><0</code> if left < right;
+ * <code>0</code> if left == right;
+ * <code>>0</code> if left > right;
+ */
+ private int compareVersion(Object[] left, Object[] right) {
+
+ int result = ((Integer) left[0]).compareTo((Integer) right[0]); // compare major
+ if (result != 0)
+ return result;
+
+ result = ((Integer) left[1]).compareTo((Integer) right[1]); // compare minor
+ if (result != 0)
+ return result;
+
+ result = ((Integer) left[2]).compareTo((Integer) right[2]); // compare service
+ if (result != 0)
+ return result;
+
+ return ((String) left[3]).compareTo((String) right[3]); // compare qualifier
+ }
+
+ /**
+ * Do a quick parse of version identifier so its elements can be correctly compared.
+ * If we are unable to parse the full version, remaining elements are initialized
+ * with suitable defaults.
+ * @return an array of size 4; first three elements are of type Integer (representing
+ * major, minor and service) and the fourth element is of type String (representing
+ * qualifier). Note, that returning anything else will cause exceptions in the caller.
+ */
+ private Object[] getVersionElements(String version) {
+ Object[] result = {new Integer(0), new Integer(0), new Integer(0), ""}; //$NON-NLS-1$
+ StringTokenizer t = new StringTokenizer(version, "."); //$NON-NLS-1$
+ String token;
+ int i = 0;
+ while (t.hasMoreTokens() && i < 4) {
+ token = t.nextToken();
+ if (i < 3) {
+ // major, minor or service ... numeric values
+ try {
+ result[i++] = new Integer(token);
+ } catch (Exception e) {
+ // invalid number format - use default numbers (0) for the rest
+ break;
+ }
+ } else {
+ // qualifier ... string value
+ result[i++] = token;
+ }
+ }
+ return result;
+ }
+
+ private URL buildURL(String spec, boolean trailingSlash) {
+ if (spec == null)
+ return null;
+ // if the spec is a file: url then see if it is absolute. If not, break it up
+ // and make it absolute.
+ if (spec.startsWith("file:")) {
+ File file = new File(spec.substring(5));
+ if (!file.isAbsolute())
+ spec = "file:" + file.getAbsolutePath();
+ }
+ try {
+ spec = adjustTrailingSlash(spec, true);
+ return new URL(spec);
+ } catch (MalformedURLException e) {
+ if (spec.startsWith("file:"))
+ return null;
+ return buildURL("file:" + spec, trailingSlash);
+ }
+ }
+
+ private URL buildLocation(String property, URL defaultLocation, String userDefaultAppendage) {
+ URL result = null;
+ String location = System.getProperty(property);
+ System.getProperties().remove(property);
+ // if the instance location is not set, predict where the workspace will be and
+ // put the instance area inside the workspace meta area.
+ try {
+ if (location == null)
+ result = defaultLocation;
+ else if (location.equalsIgnoreCase(NONE))
+ return null;
+ else if (location.equalsIgnoreCase(NO_DEFAULT))
+ result = buildURL(location, true);
+ else {
+ if (location.equalsIgnoreCase(USER_HOME))
+ location = computeDefaultUserAreaLocation(userDefaultAppendage);
+ if (location.equalsIgnoreCase(USER_DIR))
+ location = new File(System.getProperty(PROP_USER_DIR), userDefaultAppendage).getAbsolutePath();
+ result = buildURL(location, true);
+ }
+ } finally {
+ if (result != null)
+ System.getProperties().put(property, result.toExternalForm());
+ }
+ return result;
+ }
+
+ /**
+ * Retuns the default file system path for the configuration location.
+ * By default the configuration information is in the installation directory
+ * if this is writeable. Otherwise it is located somewhere in the user.home
+ * area relative to the current product.
+ * @return the default file system path for the configuration information
+ */
+ private String computeDefaultConfigurationLocation() {
+ // 1) We store the config state relative to the 'eclipse' directory if possible
+ // 2) If this directory is read-only
+ // we store the state in <user.home>/.eclipse/<application-id>_<version> where <user.home>
+ // is unique for each local user, and <application-id> is the one
+ // defined in .eclipseproduct marker file. If .eclipseproduct does not
+ // exist, use "eclipse" as the application-id.
+
+ String install = getInstallLocation();
+ // TODO a little dangerous here. Basically we have to assume that it is a file URL.
+ if (install.startsWith("file:")) {
+ File installDir = new File(install.substring(5));
+ if (installDir.canWrite())
+ return installDir.getAbsolutePath() + File.separator + CONFIG_DIR;
+ }
+ // We can't write in the eclipse install dir so try for some place in the user's home dir
+ return computeDefaultUserAreaLocation(CONFIG_DIR);
+ }
+
+ /**
+ * Returns a files system path for an area in the user.home region related to the
+ * current product. The given appendage is added to this base location
+ * @param pathAppendage the path segments to add to computed base
+ * @return a file system location in the user.home area related the the current
+ * product and the given appendage
+ */
+ private String computeDefaultUserAreaLocation(String pathAppendage) {
+ // we store the state in <user.home>/.eclipse/<application-id>_<version> where <user.home>
+ // is unique for each local user, and <application-id> is the one
+ // defined in .eclipseproduct marker file. If .eclipseproduct does not
+ // exist, use "eclipse" as the application-id.
+ URL installURL = buildURL(getInstallLocation(), true);
+ if (installURL == null)
+ return null;
+ File installDir = new File(installURL.getPath());
+ String appName = "." + ECLIPSE; //$NON-NLS-1$
+ File eclipseProduct = new File(installDir, PRODUCT_SITE_MARKER);
+ if (eclipseProduct.exists()) {
+ Properties props = new Properties();
+ try {
+ props.load(new FileInputStream(eclipseProduct));
+ String appId = props.getProperty(PRODUCT_SITE_ID);
+ if (appId == null || appId.trim().length() == 0)
+ appId = ECLIPSE;
+ String appVersion = props.getProperty(PRODUCT_SITE_VERSION);
+ if (appVersion == null || appVersion.trim().length() == 0)
+ appVersion = ""; //$NON-NLS-1$
+ appName += File.separator + appId + "_" + appVersion; //$NON-NLS-1$
+ } catch (IOException e) {
+ // Do nothing if we get an exception. We will default to a standard location
+ // in the user's home dir.
+ }
+ }
+ String userHome = System.getProperty(PROP_USER_HOME);
+ return new File(userHome, appName + "/" + pathAppendage).getAbsolutePath(); //$NON-NLS-1$
+ }
+
+ /**
+ * Runs this launcher with the arguments specified in the given string.
+ *
+ * @param argString the arguments string
+ * @exception Exception thrown if a problem occurs during launching
+ */
+ public static void main(String argString) {
+ Vector list = new Vector(5);
+ for (StringTokenizer tokens = new StringTokenizer(argString, " "); tokens.hasMoreElements();)
+ //$NON-NLS-1$
+ list.addElement(tokens.nextElement());
+ main((String[]) list.toArray(new String[list.size()]));
+ }
+
+ /**
+ * Runs the platform with the given arguments. The arguments must identify
+ * an application to run (e.g., <code>-application com.example.application</code>).
+ * After running the application <code>System.exit(N)</code> is executed.
+ * The value of N is derived from the value returned from running the application.
+ * If the application's return value is an <code>Integer</code>, N is this value.
+ * In all other cases, N = 0.
+ * <p>
+ * Clients wishing to run the platform without a following <code>System.exit</code>
+ * call should use <code>run()</code>.
+ * </p>
+ *
+ * @param args the command line arguments
+ * @see #run
+ */
+ public static void main(String[] args) {
+ int result = new Main().run(args);
+ System.exit(result);
+ }
+
+ /**
+ * Runs the platform with the given arguments. The arguments must identify
+ * an application to run (e.g., <code>-application com.example.application</code>).
+ * Returns the value returned from running the application.
+ * If the application's return value is an <code>Integer</code>, N is this value.
+ * In all other cases, N = 0.
+ *
+ * @param args the command line arguments
+ */
+ public int run(String[] args) {
+ int result = 0;
+ try {
+ basicRun(args);
+ String exitCode = System.getProperty(PROP_EXITCODE);
+ try {
+ result = exitCode == null ? 0 : Integer.parseInt(exitCode);
+ } catch (NumberFormatException e) {
+ result = 17;
+ }
+ } catch (Throwable e) {
+ // try and take down the splash screen.
+ takeDownSplash();
+ // only log the exceptions if they have not been caught by the
+ // EclipseStarter (i.e., if the exitCode is not 13)
+ if (!"13".equals(System.getProperty(PROP_EXITCODE))) {
+ log("Exception launching the Eclipse Platform:"); //$NON-NLS-1$
+ log(e);
+ String message = "An error has occurred"; //$NON-NLS-1$
+ if (logFile == null)
+ message += " and could not be logged: \n" + e.getMessage(); //$NON-NLS-1$
+ else
+ message += ". See the log file\n" + logFile.getAbsolutePath(); //$NON-NLS-1$
+ System.getProperties().put(PROP_EXITDATA, message);
+ }
+ // Return "unlucky" 13 as the exit code. The executable will recognize
+ // this constant and display a message to the user telling them that
+ // there is information in their log file.
+ result = 13;
+ }
+ // Return an int exit code and ensure the system property is set.
+ System.getProperties().put(PROP_EXITCODE, Integer.toString(result));
+ setExitData();
+ return result;
+ }
+
+ private void setExitData() {
+ String data = System.getProperty(PROP_EXITDATA);
+ if (exitData == null || data == null)
+ return;
+ runCommand(exitData, data, " " + EXITDATA);
+ }
+
+ /**
+ * Processes the command line arguments. The general principle is to NOT
+ * consume the arguments and leave them to be processed by Eclipse proper.
+ * There are a few args which are directed towards main() and a few others which
+ * we need to know about. Very few should actually be consumed here.
+ *
+ * @return the arguments to pass through to the launched application
+ * @param args the command line arguments
+ */
+ protected String[] processCommandLine(String[] args) {
+ // TODO temporarily handle the fact that PDE appends the -showsplash <timeout> onto
+ // the *end* of the command line. This interferes with the -vmargs arg. Process
+ // -showsplash now and remove it from the end. This code should be removed soon.
+ int end = args.length;
+ if (args.length > 1 && args[end - 2].equalsIgnoreCase(SHOWSPLASH)) {
+ showSplash = args[end - 1];
+ end -= 2;
+ }
+ String[] arguments = new String[end];
+ System.arraycopy(args, 0, arguments, 0, end);
+ int[] configArgs = new int[arguments.length];
+ configArgs[0] = -1; // need to initialize the first element to something that could not be an index.
+ int configArgIndex = 0;
+ for (int i = 0; i < arguments.length; i++) {
+ boolean found = false;
+ // check for args without parameters (i.e., a flag arg)
+ // check if debug should be enabled for the entire platform
+ if (arguments[i].equalsIgnoreCase(DEBUG)) {
+ debug = true;
+ // passed thru this arg (i.e., do not set found = true)
+ continue;
+ }
+
+ // look for and consume the nosplash directive. This supercedes any
+ // -showsplash command that might be present.
+ if (arguments[i].equalsIgnoreCase(NOSPLASH)) {
+ splashDown = true;
+ found = true;
+ }
+
+ // check if this is initialization pass
+ if (arguments[i].equalsIgnoreCase(INITIALIZE)) {
+ initialize = true;
+ // passed thru this arg (i.e., do not set found = true)
+ continue;
+ }
+
+ // check if development mode should be enabled for the entire platform
+ // If this is the last arg or there is a following arg (i.e., arg+1 has a leading -),
+ // simply enable development mode. Otherwise, assume that that the following arg is
+ // actually some additional development time class path entries. This will be processed below.
+ if (arguments[i].equalsIgnoreCase(DEV) && ((i + 1 == arguments.length) || ((i + 1 < arguments.length) && (arguments[i + 1].startsWith("-"))))) { //$NON-NLS-1$
+ inDevelopmentMode = true;
+ // do not mark the arg as found so it will be passed through
+ continue;
+ }
+
+ // done checking for args. Remember where an arg was found
+ if (found) {
+ configArgs[configArgIndex++] = i;
+ continue;
+ }
+
+ // look for the VM args arg. We have to do that before looking to see
+ // if the next element is a -arg as the thing following -vmargs may in
+ // fact be another -arg.
+ if (arguments[i].equalsIgnoreCase(VMARGS)) {
+ // consume the -vmargs arg itself
+ arguments[i] = null;
+ i++;
+ vmargs = new String[arguments.length - i];
+ for (int j = 0; i < arguments.length; i++) {
+ vmargs[j++] = arguments[i];
+ arguments[i] = null;
+ }
+ continue;
+ }
+
+ // check for args with parameters. If we are at the last argument or if the next one
+ // has a '-' as the first character, then we can't have an arg with a parm so continue.
+ if (i == arguments.length - 1 || arguments[i + 1].startsWith("-")) //$NON-NLS-1$
+ continue;
+ String arg = arguments[++i];
+
+ // look for the development mode and class path entries.
+ if (arguments[i - 1].equalsIgnoreCase(DEV)) {
+ inDevelopmentMode = true;
+ devClassPath = processDevArg(arg);
+ continue;
+ }
+
+ // look for the framework to run
+ if (arguments[i - 1].equalsIgnoreCase(FRAMEWORK)) {
+ framework = arg;
+ found = true;
+ }
+
+ // look for explicitly set install root
+ // Consume the arg here to ensure that the launcher and Eclipse get the
+ // same value as each other.
+ if (arguments[i - 1].equalsIgnoreCase(INSTALL)) {
+ System.getProperties().put(PROP_INSTALL_AREA, arg);
+ found = true;
+ }
+
+ // look for the configuration to use.
+ // Consume the arg here to ensure that the launcher and Eclipse get the
+ // same value as each other.
+ if (arguments[i - 1].equalsIgnoreCase(CONFIGURATION)) {
+ System.getProperties().put(PROP_CONFIG_AREA, arg);
+ found = true;
+ }
+
+ // look for the command to use to set exit data in the launcher
+ if (arguments[i - 1].equalsIgnoreCase(EXITDATA)) {
+ exitData = arg;
+ found = true;
+ }
+
+ // look for the command to use to show the splash screen
+ if (arguments[i - 1].equalsIgnoreCase(SHOWSPLASH)) {
+ showSplash = arg;
+ found = true;
+ }
+
+ // look for the command to use to end the splash screen
+ if (arguments[i - 1].equalsIgnoreCase(ENDSPLASH)) {
+ endSplash = arg;
+ found = true;
+ }
+
+ // look for the VM location arg
+ if (arguments[i - 1].equalsIgnoreCase(VM)) {
+ vm = arg;
+ found = true;
+ }
+
+ // done checking for args. Remember where an arg was found
+ if (found) {
+ configArgs[configArgIndex++] = i - 1;
+ configArgs[configArgIndex++] = i;
+ }
+ }
+ // remove all the arguments consumed by this argument parsing
+ if (configArgIndex == 0)
+ return arguments;
+ String[] passThruArgs = new String[arguments.length - configArgIndex - (vmargs == null ? 0 : vmargs.length + 1)];
+ configArgIndex = 0;
+ int j = 0;
+ for (int i = 0; i < arguments.length; i++) {
+ if (i == configArgs[configArgIndex])
+ configArgIndex++;
+ else if (arguments[i] != null)
+ passThruArgs[j++] = arguments[i];
+ }
+ return passThruArgs;
+ }
+
+ private String processDevArg(String arg) {
+ if (arg == null)
+ return null;
+ try {
+ URL location = new URL(arg);
+ Properties props = load(location, null);
+ String result = props.getProperty("org.eclipse.osgi");
+ return result == null ? props.getProperty("*") : result;
+ } catch (MalformedURLException e) {
+ // the arg was not a URL so use it as is.
+ return arg;
+ } catch (IOException e) {
+ // TODO consider logging here
+ return null;
+ }
+ }
+
+ private String getConfigurationLocation() {
+ if (configurationLocation != null)
+ return configurationLocation;
+ URL result = buildLocation(PROP_CONFIG_AREA, null, CONFIG_DIR);
+ if (result == null)
+ result = buildURL(computeDefaultConfigurationLocation(), true);
+ if (result == null)
+ return null;
+ configurationLocation = adjustTrailingSlash(result.toExternalForm(), true);
+ System.getProperties().put(PROP_CONFIG_AREA, configurationLocation);
+ if (debug)
+ System.out.println("Configuration location:\n " + configurationLocation);
+ return configurationLocation;
+ }
+
+ private void processConfiguration() {
+ // if the configuration area is not already defined, discover the config area by
+ // trying to find a base config area. This is either defined in a system property or
+ // is computed relative to the install location.
+ // Note that the config info read here is only used to determine a value
+ // for the user configuration area
+ URL baseConfigurationLocation = null;
+ Properties baseConfiguration = null;
+ if (System.getProperty(PROP_CONFIG_AREA) == null) {
+ String baseLocation = System.getProperty(PROP_BASE_CONFIG_AREA);
+ if (baseLocation != null)
+ // here the base config cannot have any symbolic (e..g, @xxx) entries. It must just
+ // point to the config file.
+ baseConfigurationLocation = buildURL(baseLocation, true);
+ if (baseConfigurationLocation == null)
+ // here we access the install location but this is very early. This case will only happen if
+ // the config area is not set and the base config area is not set (or is bogus).
+ // In this case we compute based on the install location.
+ baseConfigurationLocation = buildURL(getInstallLocation() + CONFIG_DIR, true);
+ baseConfiguration = loadConfiguration(baseConfigurationLocation.toExternalForm());
+ if (baseConfiguration != null) {
+ // if the base sets the install area then use that value if the property. We know the
+ // property is not already set.
+ String location = baseConfiguration.getProperty(PROP_CONFIG_AREA);
+ if (location != null)
+ System.getProperties().put(PROP_CONFIG_AREA, location);
+ // if the base sets the install area then use that value if the property is not already set.
+ // This helps in selfhosting cases where you cannot easily compute the install location
+ // from the code base.
+ location = baseConfiguration.getProperty(PROP_INSTALL_AREA);
+ if (location != null && System.getProperty(PROP_INSTALL_AREA) == null)
+ System.getProperties().put(PROP_INSTALL_AREA, location);
+ }
+ }
+
+ // Now we know where the base configuration is supposed to be. Go ahead and load
+ // it and merge into the System properties. Then, if cascaded, read the parent configuration
+ // Note that the parent may or may not be the same parent as we read above since the
+ // base can define its parent. The first parent we read was either defined by the user
+ // on the command line or was the one in the install dir.
+ // if the config or parent we are about to read is the same as the base config we read above,
+ // just reuse the base
+ Properties configuration = baseConfiguration;
+ if (configuration == null || !getConfigurationLocation().equals(baseConfigurationLocation.toExternalForm()))
+ configuration = loadConfiguration(getConfigurationLocation());
+ mergeProperties(System.getProperties(), configuration);
+ if ("false".equalsIgnoreCase(System.getProperty(PROP_CONFIG_CASCADED)))
+ // if we are not cascaded then remvoe the parent property even if it was set.
+ System.getProperties().remove(PROP_SHARED_CONFIG_AREA);
+ else {
+ URL sharedConfigURL = buildLocation(PROP_SHARED_CONFIG_AREA, null, CONFIG_DIR);
+ if (sharedConfigURL == null)
+ // here we access the install location but this is very early. This case will only happen if
+ // the config is cascaded and the parent config area is not set (or is bogus).
+ // In this case we compute based on the install location. Note that we should not
+ // precompute this value and use it as the default in the call to buildLocation as it will
+ // unnecessarily bind the install location.
+ sharedConfigURL = buildURL(getInstallLocation() + CONFIG_DIR, true);
+
+ // if the parent location is different from the config location, read it too.
+ if (sharedConfigURL != null) {
+ String location = sharedConfigURL.toExternalForm();
+ if (location.equals(getConfigurationLocation()))
+ // remove the property to show that we do not have a parent.
+ System.getProperties().remove(PROP_SHARED_CONFIG_AREA);
+ else {
+ // if the parent we are about to read is the same as the base config we read above,
+ // just reuse the base
+ configuration = baseConfiguration;
+ if (!sharedConfigURL.equals(baseConfigurationLocation))
+ configuration = loadConfiguration(location);
+ mergeProperties(System.getProperties(), configuration);
+ System.getProperties().put(PROP_SHARED_CONFIG_AREA, location);
+ if (debug)
+ System.out.println("Shared configuration location:\n " + location);
+ }
+ }
+ }
+ // setup the path to the framework
+ String urlString = System.getProperty(PROP_FRAMEWORK, null);
+ if (urlString != null) {
+ urlString = adjustTrailingSlash(urlString, true);
+ System.getProperties().put(PROP_FRAMEWORK, urlString);
+ bootLocation = resolve(urlString);
+ }
+ }
+
+ /**
+ * Returns url of the location this class was loaded from
+ */
+ private String getInstallLocation() {
+ if (installLocation != null)
+ return installLocation;
+
+ // value is not set so compute the default and set the value
+ installLocation = System.getProperty(PROP_INSTALL_AREA);
+ if (installLocation != null) {
+ URL location = buildURL(installLocation, true);
+ if (location == null)
+ throw new IllegalStateException("Install location is invalid: " + installLocation);
+ installLocation = location.toExternalForm();
+ System.getProperties().put(PROP_INSTALL_AREA, installLocation);
+ if (debug)
+ System.out.println("Install location:\n " + installLocation);
+ return installLocation;
+ }
+
+ URL result = Main.class.getProtectionDomain().getCodeSource().getLocation();
+ String path = decode(result.getFile());
+ path = new File(path).getAbsolutePath().replace(File.separatorChar, '/');
+ // TODO need a better test for windows
+ // If on Windows then canonicalize the drive letter to be lowercase.
+ if (File.separatorChar == '\\')
+ if (Character.isUpperCase(path.charAt(0))) {
+ char[] chars = path.toCharArray();
+ chars[0] = Character.toLowerCase(chars[0]);
+ path = new String(chars);
+ }
+ if (path.endsWith(".jar")) //$NON-NLS-1$
+ path = path.substring(0, path.lastIndexOf("/") + 1); //$NON-NLS-1$
+ try {
+ installLocation = new URL(result.getProtocol(), result.getHost(), result.getPort(), path).toExternalForm();
+ System.getProperties().put(PROP_INSTALL_AREA, installLocation);
+ } catch (MalformedURLException e) {
+ // TODO Very unlikely case. log here.
+ }
+ if (debug)
+ System.out.println("Install location:\n " + installLocation);
+ return installLocation;
+ }
+
+ /*
+ * Load the given configuration file
+ */
+ private Properties loadConfiguration(String url) {
+ Properties result = null;
+ url += CONFIG_FILE;
+ try {
+ if (debug)
+ System.out.print("Configuration file:\n " + url.toString()); //$NON-NLS-1$
+ result = loadProperties(url);
+ if (debug)
+ System.out.println(" loaded"); //$NON-NLS-1$
+ } catch (IOException e) {
+ if (debug)
+ System.out.println(" not found or not read"); //$NON-NLS-1$
+ }
+ return result;
+ }
+
+ private Properties loadProperties(String location) throws IOException {
+ // try to load saved configuration file (watch for failed prior save())
+ URL url = buildURL(location, false);
+ if (url == null)
+ return null;
+ Properties result = null;
+ IOException originalException = null;
+ try {
+ result = load(url, null); // try to load config file
+ } catch (IOException e1) {
+ originalException = e1;
+ try {
+ result = load(url, CONFIG_FILE_TEMP_SUFFIX); // check for failures on save
+ } catch (IOException e2) {
+ try {
+ result = load(url, CONFIG_FILE_BAK_SUFFIX); // check for failures on save
+ } catch (IOException e3) {
+ throw originalException; // we tried, but no config here ...
+ }
+ }
+ }
+ return result;
+ }
+
+ /*
+ * Load the configuration
+ */
+ private Properties load(URL url, String suffix) throws IOException {
+ // figure out what we will be loading
+ if (suffix != null && !suffix.equals("")) //$NON-NLS-1$
+ url = new URL(url.getProtocol(), url.getHost(), url.getPort(), url.getFile() + suffix);
+
+ // try to load saved configuration file
+ Properties props = new Properties();
+ InputStream is = null;
+ try {
+ is = url.openStream();
+ props.load(is);
+ // check to see if we have complete config file
+ if (!PROP_EOF.equals(props.getProperty(PROP_EOF)))
+ throw new IOException("Incomplete configuration file: " + url.toExternalForm()); //$NON-NLS-1$
+ } finally {
+ if (is != null)
+ try {
+ is.close();
+ } catch (IOException e) {
+ //ignore failure to close
+ }
+ }
+ return props;
+ }
+
+ /*
+ * Handle splash screen.
+ * We support 2 startup scenarios:
+ *
+ * (1) the executable launcher put up the splash screen. In that
+ * scenario we are invoked with -endsplash command which is
+ * fully formed to take down the splash screen
+ *
+ * (2) the executable launcher did not put up the splash screen,
+ * but invokes Eclipse with partially formed -showsplash command.
+ * In this scenario we determine which splash to display (based on
+ * feature information) and then call -showsplash command.
+ *
+ * In both scenarios we pass a handler (Runnable) to the platform.
+ * The handler is called as a result of the launched application calling
+ * Platform.endSplash(). In the first scenario this results in the
+ * -endsplash command being executed. In the second scenarios this
+ * results in the process created as a result of the -showsplash command
+ * being destroyed.
+ *
+ * @param bootPath search path for the boot plugin
+ */
+ private void handleSplash(URL[] defaultPath) {
+ // run without splash if we are initializing or nosplash
+ // was specified (splashdown = true)
+ if (initialize || splashDown) {
+ showSplash = null;
+ endSplash = null;
+ return;
+ }
+
+ // if -endsplash is specified, use it and ignore any -showsplash command
+ if (endSplash != null) {
+ showSplash = null;
+ return;
+ }
+
+ // check if we are running without a splash screen
+ if (showSplash == null)
+ return;
+
+ // determine the splash location
+ String location = getSplashLocation(defaultPath);
+ if (debug)
+ System.out.println("Splash location:\n " + location); //$NON-NLS-1$
+ if (location == null)
+ return;
+ showProcess = runCommand(showSplash, location, " " + SHOWSPLASH); //$NON-NLS-1$
+ }
+
+ private Process runCommand(String command, String data, String separator) {
+ // Parse the showsplash command into its separate arguments.
+ // The command format is:
+ // <executable> -show <magicArg> [<splashPath>]
+ // If either the <executable> or the <splashPath> arguments contain a
+ // space, Runtime.getRuntime().exec( String ) will not work, even
+ // if both arguments are enclosed in double-quotes. The solution is to
+ // use the Runtime.getRuntime().exec( String[] ) method.
+ String[] args = new String[(data != null ? 4 : 3)];
+ // get the executable part
+ int sIndex = 0;
+ int eIndex = command.indexOf(separator);
+ if (eIndex == -1)
+ return null; // invalid command
+ args[0] = command.substring(sIndex, eIndex);
+ // get the command part
+ sIndex = eIndex + 1;
+ eIndex = command.indexOf(" ", sIndex); //$NON-NLS-1$
+ if (eIndex == -1)
+ return null; // invalid command
+ args[1] = command.substring(sIndex, eIndex);
+
+ // get the magic arg part
+ args[2] = command.substring(eIndex + 1);
+
+ // add on our data
+ if (data != null)
+ args[3] = data;
+
+ Process result = null;
+ try {
+ result = Runtime.getRuntime().exec(args);
+ } catch (Exception e) {
+ log("Exception running command: " + command); //$NON-NLS-1$
+ log(e);
+ }
+ return result;
+ }
+
+ /*
+ * take down the splash screen. Try both take-down methods just in case
+ * (only one should ever be set)
+ */
+ protected void takeDownSplash() {
+ if (splashDown) // splash is already down
+ return;
+
+ // check if -endsplash was specified
+ if (endSplash != null) {
+ try {
+ Runtime.getRuntime().exec(endSplash);
+ } catch (Exception e) {
+ //ignore failure to end splash
+ }
+ }
+
+ // check if -showsplash was specified and executed
+ if (showProcess != null) {
+ showProcess.destroy();
+ showProcess = null;
+ }
+ splashDown = true;
+ }
+
+ /*
+ * Return path of the splash image to use. First search the defined splash path.
+ * If that does not work, look for a default splash. Currently the splash must be in the file system
+ * so the return value here is the file system path.
+ */
+ private String getSplashLocation(URL[] bootPath) {
+ String result = System.getProperty(PROP_SPLASHLOCATION);
+ if (result != null)
+ return result;
+ String splashPath = System.getProperty(PROP_SPLASHPATH);
+ if (splashPath != null) {
+ String[] entries = getArrayFromList(splashPath);
+ ArrayList path = new ArrayList(entries.length);
+ for (int i = 0; i < entries.length; i++) {
+ String entry = resolve(entries[i]);
+ if (entry == null || entry.startsWith("file:")) {
+ File entryFile = new File(entry.substring(5).replace('/', File.separatorChar));
+ entry = searchFor(entryFile.getName(), entryFile.getParent());
+ if (entry != null)
+ path.add(entry);
+ } else
+ log("Invalid splash path entry: " + entries[i]);
+ }
+ // see if we can get a splash given the splash path
+ result = searchForSplash((String[]) path.toArray(new String[path.size()]));
+ if (result != null) {
+ System.getProperties().put(PROP_SPLASHLOCATION, result);
+ return result;
+ }
+ }
+
+ // can't find it on the splashPath so look for a default splash
+ String temp = bootPath[0].getFile(); // take the first path element
+ temp = temp.replace('/', File.separatorChar);
+ int ix = temp.lastIndexOf("plugins" + File.separator); //$NON-NLS-1$
+ if (ix != -1) {
+ int pix = temp.indexOf(File.separator, ix + 8);
+ if (pix != -1) {
+ temp = temp.substring(0, pix);
+ result = searchForSplash(new String[] {temp});
+ if (result != null)
+ System.getProperties().put(PROP_SPLASHLOCATION, result);
+ }
+ }
+ return result;
+ }
+
+ /*
+ * Do a locale-sensitive lookup of splash image
+ */
+ private String searchForSplash(String[] searchPath) {
+ if (searchPath == null)
+ return null;
+
+ // get current locale information
+ String localePath = Locale.getDefault().toString().replace('_', File.separatorChar);
+
+ // search the specified path
+ while (localePath != null) {
+ String suffix;
+ if (localePath.equals("")) { //$NON-NLS-1$
+ // look for nl'ed splash image
+ suffix = SPLASH_IMAGE;
+ } else {
+ // look for default splash image
+ suffix = "nl" + File.separator + localePath + File.separator + SPLASH_IMAGE; //$NON-NLS-1$
+ }
+
+ // check for file in searchPath
+ for (int i = 0; i < searchPath.length; i++) {
+ String path = searchPath[i];
+ if (!path.endsWith(File.separator))
+ path += File.separator;
+ path += suffix;
+ File result = new File(path);
+ if (result.exists())
+ return result.getAbsolutePath(); // return the first match found [20063]
+ }
+
+ // try the next variant
+ if (localePath.equals("")) //$NON-NLS-1$
+ localePath = null;
+ else {
+ int ix = localePath.lastIndexOf(File.separator);
+ if (ix == -1)
+ localePath = ""; //$NON-NLS-1$
+ else
+ localePath = localePath.substring(0, ix);
+ }
+ }
+
+ // sorry, could not find splash image
+ return null;
+ }
+
+ /*
+ * resolve platform:/base/ URLs
+ */
+ private String resolve(String urlString) {
+ // handle the case where people mistakenly spec a refererence: url.
+ if (urlString.startsWith("reference:")) {
+ urlString = urlString.substring(10);
+ System.getProperties().put(PROP_FRAMEWORK, urlString);
+ }
+ if (urlString.startsWith(PLATFORM_URL)) {
+ String path = urlString.substring(PLATFORM_URL.length());
+ return getInstallLocation() + path;
+ } else
+ return urlString;
+ }
+
+ /*
+ * Entry point for logging.
+ */
+ private synchronized void log(Object obj) {
+ if (obj == null)
+ return;
+ try {
+ openLogFile();
+ try {
+ if (newSession) {
+ log.write(SESSION);
+ log.write(' ');
+ String timestamp = new Date().toString();
+ log.write(timestamp);
+ log.write(' ');
+ for (int i = SESSION.length() + timestamp.length(); i < 78; i++)
+ log.write('-');
+ log.newLine();
+ newSession = false;
+ }
+ write(obj);
+ } finally {
+ if (logFile == null) {
+ if (log != null)
+ log.flush();
+ } else
+ closeLogFile();
+ }
+ } catch (Exception e) {
+ System.err.println("An exception occurred while writing to the platform log:"); //$NON-NLS-1$
+ e.printStackTrace(System.err);
+ System.err.println("Logging to the console instead."); //$NON-NLS-1$
+ //we failed to write, so dump log entry to console instead
+ try {
+ log = logForStream(System.err);
+ write(obj);
+ log.flush();
+ } catch (Exception e2) {
+ System.err.println("An exception occurred while logging to the console:"); //$NON-NLS-1$
+ e2.printStackTrace(System.err);
+ }
+ } finally {
+ log = null;
+ }
+ }
+
+ /*
+ * This should only be called from #log()
+ */
+ private void write(Object obj) throws IOException {
+ if (obj == null)
+ return;
+ if (obj instanceof Throwable) {
+ log.write(STACK);
+ log.newLine();
+ ((Throwable) obj).printStackTrace(new PrintWriter(log));
+ } else {
+ log.write(ENTRY);
+ log.write(' ');
+ log.write(PLUGIN_ID);
+ log.write(' ');
+ log.write(String.valueOf(ERROR));
+ log.write(' ');
+ log.write(String.valueOf(0));
+ log.write(' ');
+ try {
+ DateFormat formatter = new SimpleDateFormat("MMM dd, yyyy kk:mm:ss.SS"); //$NON-NLS-1$
+ log.write(formatter.format(new Date()));
+ } catch (Exception e) {
+ // continue if we can't write out the date
+ log.write(Long.toString(System.currentTimeMillis()));
+ }
+ log.newLine();
+ log.write(MESSAGE);
+ log.write(' ');
+ log.write(String.valueOf(obj));
+ }
+ log.newLine();
+ }
+
+ private void computeLogFileLocation() {
+ String logFileProp = System.getProperty(PROP_LOGFILE);
+ if (logFileProp != null) {
+ if (logFile == null || !logFileProp.equals(logFile.getAbsolutePath())) {
+ logFile = new File(logFileProp);
+ logFile.getParentFile().mkdirs();
+ }
+ return;
+ }
+
+ // compute the base location and then append the name of the log file
+ URL base = buildURL(System.getProperty(PROP_CONFIG_AREA), false);
+ if (base == null)
+ return;
+ logFile = new File(base.getPath(), Long.toString(System.currentTimeMillis()) + ".log"); //$NON-NLS-1$
+ logFile.getParentFile().mkdirs();
+ System.setProperty(PROP_LOGFILE, logFile.getAbsolutePath());
+ }
+
+ /**
+ * Converts an ASCII character representing a hexadecimal
+ * value into its integer equivalent.
+ */
+ private int hexToByte(byte b) {
+ switch (b) {
+ case '0' :
+ return 0;
+ case '1' :
+ return 1;
+ case '2' :
+ return 2;
+ case '3' :
+ return 3;
+ case '4' :
+ return 4;
+ case '5' :
+ return 5;
+ case '6' :
+ return 6;
+ case '7' :
+ return 7;
+ case '8' :
+ return 8;
+ case '9' :
+ return 9;
+ case 'A' :
+ case 'a' :
+ return 10;
+ case 'B' :
+ case 'b' :
+ return 11;
+ case 'C' :
+ case 'c' :
+ return 12;
+ case 'D' :
+ case 'd' :
+ return 13;
+ case 'E' :
+ case 'e' :
+ return 14;
+ case 'F' :
+ case 'f' :
+ return 15;
+ default :
+ throw new IllegalArgumentException("Switch error decoding URL"); //$NON-NLS-1$
+ }
+ }
+
+ private void openLogFile() throws IOException {
+ computeLogFileLocation();
+ try {
+ log = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(logFile.getAbsolutePath(), true), "UTF-8")); //$NON-NLS-1$
+ } catch (IOException e) {
+ logFile = null;
+ throw e;
+ }
+ }
+
+ private BufferedWriter logForStream(OutputStream output) {
+ try {
+ return new BufferedWriter(new OutputStreamWriter(output, "UTF-8")); //$NON-NLS-1$
+ } catch (UnsupportedEncodingException e) {
+ return new BufferedWriter(new OutputStreamWriter(output));
+ }
+ }
+
+ private void closeLogFile() throws IOException {
+ try {
+ if (log != null) {
+ log.flush();
+ log.close();
+ }
+ } finally {
+ log = null;
+ }
+ }
+
+ private void mergeProperties(Properties destination, Properties source) {
+ if (destination == null || source == null)
+ return;
+ for (Enumeration e = source.keys(); e.hasMoreElements();) {
+ String key = (String) e.nextElement();
+ if (!key.equals(PROP_EOF)) {
+ String value = source.getProperty(key);
+ if (destination.getProperty(key) == null)
+ destination.put(key, value);
+ }
+ }
+ }
+
+ public void setupVMProperties() {
+ if (vm != null)
+ System.getProperties().put(PROP_VM, vm);
+ setMultiValueProperty(PROP_VMARGS, vmargs);
+ setMultiValueProperty(PROP_COMMANDS, commands);
+ }
+
+ private void setMultiValueProperty(String property, String[] value) {
+ if (value != null) {
+ StringBuffer result = new StringBuffer(300);
+ for (int i = 0; i < value.length; i++) {
+ result.append(value[i]);
+ result.append('\n');
+ }
+ System.getProperties().put(property, result.toString());
+ }
+ }
+
+ private String adjustTrailingSlash(String value, boolean slash) {
+ boolean hasSlash = value.endsWith("/") || value.endsWith(File.separator);
+ if (hasSlash == slash)
+ return value;
+ if (hasSlash)
+ return value.substring(0, value.length() - 1);
+ return value + "/";
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test492/core_formatting.xml b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test492/core_formatting.xml
new file mode 100644
index 0000000..1938255
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test492/core_formatting.xml
@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<profiles version="5">
+<profile name="core" version="5">
+<setting id="comment_clear_blank_lines" value="false"/>
+<setting id="comment_format_comments" value="false"/>
+<setting id="comment_format_header" value="true"/>
+<setting id="comment_format_html" value="true"/>
+<setting id="comment_format_source_code" value="true"/>
+<setting id="comment_indent_parameter_description" value="false"/>
+<setting id="comment_indent_root_tags" value="true"/>
+<setting id="comment_line_length" value="80"/>
+<setting id="comment_new_line_for_parameter" value="false"/>
+<setting id="comment_separate_root_tags" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.align_type_members_on_columns" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_binary_expression" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_compact_if" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_conditional_expression" value="80"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_multiple_fields" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_after_imports" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_after_package" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_field" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_imports" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_member_type" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_method" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_package" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_block" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.compact_else_if" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation" value="2"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_statements_compare_to_block" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_statements_compare_to_body" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_control_statements" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_case" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_default" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.lineSplit" value="800"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.put_empty_statement_on_new_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.remove_unnecessary_semicolon" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.tabulation.char" value="tab"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.tabulation.size" value="4"/>
+</profile>
+</profiles>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test493/MyClass_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test493/MyClass_in.js
new file mode 100644
index 0000000..d06c024
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test493/MyClass_in.js
@@ -0,0 +1,6 @@
+import java.awt.Frame;
+import javax.swing.JFrame;
+
+public class MyClass {
+ JFrame frame;Frame ff;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test493/MyClass_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test493/MyClass_out.js
new file mode 100644
index 0000000..c779862
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test493/MyClass_out.js
@@ -0,0 +1,7 @@
+import java.awt.Frame;
+import javax.swing.JFrame;
+
+public class MyClass {
+ JFrame frame;
+ Frame ff;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test494/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test494/A_in.js
new file mode 100644
index 0000000..63dfd3f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test494/A_in.js
@@ -0,0 +1,26 @@
+public class A {
+ public void setBorderType(JComponent c, int borderType) {
+ myOtherData.setBorderType(borderType);
+ if (c != null) {
+ switch (borderType)
+ {
+ case 0 : // none
+ c.setBorder(null);
+ break;
+ case 1 : // line
+ c.setBorder(BorderFactory.createLineBorder(Color.black));
+ break;
+ case 3 : // bevel lowered
+ c.setBorder(BorderFactory.createLoweredBevelBorder());
+ break;
+ case 4 : // bevel raised
+ c.setBorder(BorderFactory.createRaisedBevelBorder());
+ break;
+ case 5 : // etched
+ c.setBorder(BorderFactory.createEtchedBorder());
+ break;
+ default :
+ } // end switch
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test494/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test494/A_out.js
new file mode 100644
index 0000000..7447a70
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test494/A_out.js
@@ -0,0 +1,25 @@
+public class A {
+ public void setBorderType( JComponent c, int borderType ) {
+ myOtherData.setBorderType( borderType );
+ if ( c != null ) {
+ switch ( borderType ) {
+ case 0 : // none
+ c.setBorder( null );
+ break;
+ case 1 : // line
+ c.setBorder( BorderFactory.createLineBorder( Color.black ) );
+ break;
+ case 3 : // bevel lowered
+ c.setBorder( BorderFactory.createLoweredBevelBorder() );
+ break;
+ case 4 : // bevel raised
+ c.setBorder( BorderFactory.createRaisedBevelBorder() );
+ break;
+ case 5 : // etched
+ c.setBorder( BorderFactory.createEtchedBorder() );
+ break;
+ default :
+ } // end switch
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test494/format.xml b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test494/format.xml
new file mode 100644
index 0000000..6d4390f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test494/format.xml
@@ -0,0 +1,180 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<profiles version="5">
+<profile name="AGPS default" version="5">
+<setting id="comment_clear_blank_lines" value="true"/>
+<setting id="comment_format_comments" value="true"/>
+<setting id="comment_format_header" value="true"/>
+<setting id="comment_format_html" value="true"/>
+<setting id="comment_format_source_code" value="true"/>
+<setting id="comment_indent_parameter_description" value="true"/>
+<setting id="comment_indent_root_tags" value="true"/>
+<setting id="comment_line_length" value="80"/>
+<setting id="comment_new_line_for_parameter" value="false"/>
+<setting id="comment_separate_root_tags" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.align_type_members_on_columns" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="18"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="18"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_method_invocation" value="18"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="18"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_binary_expression" value="18"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_compact_if" value="20"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_conditional_expression" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_expressions_in_array_initializer" value="18"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_multiple_fields" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="18"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_parameters_in_method_declaration" value="18"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_after_imports" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_after_package" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_field" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_imports" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_member_type" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_method" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_new_chunk" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_package" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_block" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.compact_else_if" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation" value="6"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_statements_compare_to_block" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_statements_compare_to_body" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_control_statements" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_catch" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_for" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_if" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_switch" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_while" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_postfix_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_catch" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_for" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_if" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_switch" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_while" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_case" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_default" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_else_statement_on_same_line" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_imple_if_on_one_line" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_then_statement_on_same_line" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.lineSplit" value="80"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.number_of_empty_lines_to_preserve" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.put_empty_statement_on_new_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.tabulation.char" value="space"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.tabulation.size" value="3"/>
+</profile>
+</profiles> \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test495/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test495/A_in.js
new file mode 100644
index 0000000..7f5df68
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test495/A_in.js
@@ -0,0 +1,8 @@
+public class A {
+ void doX() {
+ if (1 > 0) {//
+ return;
+ }
+ return;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test495/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test495/A_out.js
new file mode 100644
index 0000000..ae8458e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test495/A_out.js
@@ -0,0 +1,9 @@
+public class A {
+
+ void doX() {
+ if (1 > 0) {//
+ return;
+ }
+ return;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test496/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test496/A_in.js
new file mode 100644
index 0000000..6021229
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test496/A_in.js
@@ -0,0 +1,8 @@
+public class A {
+ void doX() {
+ if (1 > 0) {
+ return; //
+ }
+ return;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test496/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test496/A_out.js
new file mode 100644
index 0000000..7fbeb7d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test496/A_out.js
@@ -0,0 +1,8 @@
+public class A {
+
+ void doX() {
+ if (1 > 0) { return; //
+ }
+ return;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test497/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test497/A_in.js
new file mode 100644
index 0000000..2515cc6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test497/A_in.js
@@ -0,0 +1,11 @@
+public final class DirectoryComparator {
+ public void compare() {
+ File[] secondFiles = null;
+ if (secondFiles.length != files.length) {
+ final String errorMessage = "Different number of jars files:\n" +
+ "\t" + secondFiles.length + " in " + secondDirectoryAbsolutePath + "\n" +
+ "\t" + files.length + " in " + firstDirectoryAbsolutePath + "\n";
+ logError(errorMessage);
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test497/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test497/A_out.js
new file mode 100644
index 0000000..16a08bd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test497/A_out.js
@@ -0,0 +1,13 @@
+public final class DirectoryComparator {
+
+ public void compare() {
+ File[] secondFiles = null;
+ if (secondFiles.length != files.length) {
+ final String errorMessage = "Different number of jars files:\n"
+ + "\t" + secondFiles.length + " in "
+ + secondDirectoryAbsolutePath + "\n" + "\t" + files.length
+ + " in " + firstDirectoryAbsolutePath + "\n";
+ logError(errorMessage);
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test498/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test498/A_in.js
new file mode 100644
index 0000000..83c8f88
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test498/A_in.js
@@ -0,0 +1,207 @@
+package org.eclipse.wst.jsdt.core.tools.comparators;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Writer;
+import java.util.ArrayList;
+
+public final class DirectoryComparator {
+
+ private static void collectAllFiles(File root, ArrayList collector) {
+ File[] files = root.listFiles();for (int i = 0; i < files.length; i++) {
+ final File currentFile = files[i];if (currentFile.isDirectory()) {
+ collectAllFiles(currentFile, collector);
+ } else {
+ collector.add(currentFile);
+ }
+ }
+ }
+
+ private static File[] getAllFiles(File root) {
+ ArrayList files = new ArrayList();
+ if (root.isDirectory()) {
+ collectAllFiles(root, files);
+ File[] result = new File[files.size()];
+ files.toArray(result);
+ return result;
+ } else {
+ return null;
+ }
+ }
+ public static void main(String[] args) {
+ if (args.length != 3) {
+ System.out.println("Usage: firstDirectory secondDirectory logFile");
+ return;
+ }
+ new DirectoryComparator(args).compare();
+ }
+
+ private boolean abortComparison;
+
+ private File firstDirectory;
+
+ private File resultFile;
+
+ private File secondDirectory;
+
+ private Writer writer;
+
+ private static final int DEFAULT_READING_SIZE = 8192;
+
+ public DirectoryComparator(String[] args) {
+ this.firstDirectory = new File(args[0]);
+ this.secondDirectory = new File(args[1]);
+ this.resultFile = new File(args[2]);
+ this.abortComparison = false;
+ if (!firstDirectory.isDirectory()) {
+ System.out.println("The first argument has to be a directory");
+ this.abortComparison = true;
+ }
+ if (!secondDirectory.isDirectory()) {
+ System.out.println("The second argument has to be a directory");
+ this.abortComparison = true;
+ }
+ if (resultFile.isDirectory()) {
+ System.out.println("The third argument has to be a file");
+ this.abortComparison = true;
+ }
+ }
+
+ public void compare() {
+ if (this.abortComparison) {
+ return;
+ }
+ File[] files = getAllFiles(firstDirectory);
+ if (files == null) {
+ return;
+ }
+ File[] secondFiles = getAllFiles(secondDirectory);
+ if (secondFiles == null) {
+ return;
+ }
+ final String firstDirectoryAbsolutePath = firstDirectory.getAbsolutePath();
+ final String secondDirectoryAbsolutePath = secondDirectory.getAbsolutePath();
+ if (resultFile.exists()) {
+ if (!resultFile.delete()) {
+ System.out.println("Could not delete " + resultFile);
+ return;
+ }
+ }
+ if (secondFiles.length != files.length) {
+ final String errorMessage = "Different number of jars files:\n" +
+ "\t" + secondFiles.length + " in " + secondDirectoryAbsolutePath + "\n" +
+ "\t" + files.length + " in " + firstDirectoryAbsolutePath + "\n";
+ logError(errorMessage);
+ }
+ for (int i = 0, max = files.length; i < max; i++) {
+ String currentFile = files[i].getAbsolutePath();
+ String firstFileName = currentFile;
+ // extract the second file name
+ String secondFileName = secondDirectoryAbsolutePath + File.separator + currentFile.substring(firstDirectoryAbsolutePath.length() + 1);
+ if (new File(secondFileName).exists()) {
+ if (firstFileName.toLowerCase().endsWith(".jar")) {
+ new JarFileComparator(new String[]{firstFileName, secondFileName,
+ resultFile.getAbsolutePath()}).compare();
+ } else {
+ // do a binary compare byte per byte
+ File firstFile = new File(firstFileName);
+ File secondFile = new File(secondFileName);
+ byte[] contentsFile1 = getBytes(firstFile);
+ byte[] contentsFile2 = getBytes(secondFile);
+ if (!equals(contentsFile1, contentsFile2)) {
+ logError("DIFFERENT CONTENTS: " + firstFile.getName() + "\n");
+ }
+ }
+ } else {
+ logError(secondFileName + " doesn't exist");
+ }
+ }
+ System.out.println("DONE. Check the file "
+ + resultFile.getAbsolutePath() + " to see the result.");
+ if (this.writer != null) {
+ try {
+ writer.flush();
+ writer.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ private boolean equals(byte[] contentsFile1, byte[] contentsFile2) {
+ if (contentsFile1 == null) {
+ return contentsFile2 == null;
+ }
+ if (contentsFile2 == null) return false;
+ int contentsFile1Length = contentsFile1.length;
+ int contentsFile2Length = contentsFile2.length;
+ if (contentsFile1Length != contentsFile2Length) return false;
+ for (int i = 0; i < contentsFile1Length; i++) {
+ if (contentsFile1[i] != contentsFile2[i]) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public byte[] getBytes(File file) {
+ byte[] contents;
+ try {contents = new byte[0];
+ int contentsLength = 0;
+ int amountRead = -1;
+ FileInputStream stream = new FileInputStream(file);
+ do {
+ int amountRequested = Math.max(stream.available(), DEFAULT_READING_SIZE); // read at least 8K
+
+ // resize contents if needed
+ if (contentsLength + amountRequested > contents.length) {
+ System.arraycopy(
+ contents,
+ 0,
+ contents = new byte[contentsLength + amountRequested],
+ 0,
+ contentsLength);
+ }
+
+ // read as many bytes as possible
+ amountRead = stream.read(contents, contentsLength, amountRequested);
+
+ if (amountRead > 0) {
+ // remember length of contents
+ contentsLength += amountRead;
+ }
+ } while (amountRead != -1);
+
+ // resize contents if necessary
+ if (contentsLength < contents.length) {
+ System.arraycopy(
+ contents,
+ 0,
+ contents = new byte[contentsLength],
+ 0,
+ contentsLength);
+ }
+return contents;
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+}
+ return null;
+}
+
+ private void logError(String message) {
+ try {
+ if (this.writer == null) {
+ this.writer = new BufferedWriter(new FileWriter(this.resultFile, true));
+ }
+ writer.write(message);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test498/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test498/A_out.js
new file mode 100644
index 0000000..f8cc8ae
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test498/A_out.js
@@ -0,0 +1,205 @@
+package org.eclipse.wst.jsdt.core.tools.comparators;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Writer;
+import java.util.ArrayList;
+
+public final class DirectoryComparator {
+
+ private static void collectAllFiles(File root, ArrayList collector) {
+ File[] files = root.listFiles();
+ for (int i = 0; i < files.length; i++) {
+ final File currentFile = files[i];
+ if (currentFile.isDirectory()) {
+ collectAllFiles(currentFile, collector);
+ } else {
+ collector.add(currentFile);
+ }
+ }
+ }
+
+ private static File[] getAllFiles(File root) {
+ ArrayList files = new ArrayList();
+ if (root.isDirectory()) {
+ collectAllFiles(root, files);
+ File[] result = new File[files.size()];
+ files.toArray(result);
+ return result;
+ } else {
+ return null;
+ }
+ }
+
+ public static void main(String[] args) {
+ if (args.length != 3) {
+ System.out.println("Usage: firstDirectory secondDirectory logFile");
+ return;
+ }
+ new DirectoryComparator(args).compare();
+ }
+
+ private boolean abortComparison;
+
+ private File firstDirectory;
+
+ private File resultFile;
+
+ private File secondDirectory;
+
+ private Writer writer;
+
+ private static final int DEFAULT_READING_SIZE = 8192;
+
+ public DirectoryComparator(String[] args) {
+ this.firstDirectory = new File(args[0]);
+ this.secondDirectory = new File(args[1]);
+ this.resultFile = new File(args[2]);
+ this.abortComparison = false;
+ if (!firstDirectory.isDirectory()) {
+ System.out.println("The first argument has to be a directory");
+ this.abortComparison = true;
+ }
+ if (!secondDirectory.isDirectory()) {
+ System.out.println("The second argument has to be a directory");
+ this.abortComparison = true;
+ }
+ if (resultFile.isDirectory()) {
+ System.out.println("The third argument has to be a file");
+ this.abortComparison = true;
+ }
+ }
+
+ public void compare() {
+ if (this.abortComparison) { return; }
+ File[] files = getAllFiles(firstDirectory);
+ if (files == null) { return; }
+ File[] secondFiles = getAllFiles(secondDirectory);
+ if (secondFiles == null) { return; }
+ final String firstDirectoryAbsolutePath = firstDirectory
+ .getAbsolutePath();
+ final String secondDirectoryAbsolutePath = secondDirectory
+ .getAbsolutePath();
+ if (resultFile.exists()) {
+ if (!resultFile.delete()) {
+ System.out.println("Could not delete " + resultFile);
+ return;
+ }
+ }
+ if (secondFiles.length != files.length) {
+ final String errorMessage = "Different number of jars files:\n"
+ + "\t" + secondFiles.length + " in "
+ + secondDirectoryAbsolutePath + "\n" + "\t" + files.length
+ + " in " + firstDirectoryAbsolutePath + "\n";
+ logError(errorMessage);
+ }
+ for (int i = 0, max = files.length; i < max; i++) {
+ String currentFile = files[i].getAbsolutePath();
+ String firstFileName = currentFile;
+ // extract the second file name
+ String secondFileName = secondDirectoryAbsolutePath
+ + File.separator
+ + currentFile
+ .substring(firstDirectoryAbsolutePath.length() + 1);
+ if (new File(secondFileName).exists()) {
+ if (firstFileName.toLowerCase().endsWith(".jar")) {
+ new JarFileComparator(new String[] { firstFileName,
+ secondFileName, resultFile.getAbsolutePath() })
+ .compare();
+ } else {
+ // do a binary compare byte per byte
+ File firstFile = new File(firstFileName);
+ File secondFile = new File(secondFileName);
+ byte[] contentsFile1 = getBytes(firstFile);
+ byte[] contentsFile2 = getBytes(secondFile);
+ if (!equals(contentsFile1, contentsFile2)) {
+ logError("DIFFERENT CONTENTS: " + firstFile.getName()
+ + "\n");
+ }
+ }
+ } else {
+ logError(secondFileName + " doesn't exist");
+ }
+ }
+ System.out.println("DONE. Check the file "
+ + resultFile.getAbsolutePath() + " to see the result.");
+ if (this.writer != null) {
+ try {
+ writer.flush();
+ writer.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ private boolean equals(byte[] contentsFile1, byte[] contentsFile2) {
+ if (contentsFile1 == null) { return contentsFile2 == null; }
+ if (contentsFile2 == null) return false;
+ int contentsFile1Length = contentsFile1.length;
+ int contentsFile2Length = contentsFile2.length;
+ if (contentsFile1Length != contentsFile2Length) return false;
+ for (int i = 0; i < contentsFile1Length; i++) {
+ if (contentsFile1[i] != contentsFile2[i]) { return false; }
+ }
+ return true;
+ }
+
+ public byte[] getBytes(File file) {
+ byte[] contents;
+ try {
+ contents = new byte[0];
+ int contentsLength = 0;
+ int amountRead = -1;
+ FileInputStream stream = new FileInputStream(file);
+ do {
+ int amountRequested = Math.max(stream.available(),
+ DEFAULT_READING_SIZE); // read at least 8K
+
+ // resize contents if needed
+ if (contentsLength + amountRequested > contents.length) {
+ System.arraycopy(contents, 0,
+ contents = new byte[contentsLength
+ + amountRequested], 0, contentsLength);
+ }
+
+ // read as many bytes as possible
+ amountRead = stream.read(contents, contentsLength,
+ amountRequested);
+
+ if (amountRead > 0) {
+ // remember length of contents
+ contentsLength += amountRead;
+ }
+ } while (amountRead != -1);
+
+ // resize contents if necessary
+ if (contentsLength < contents.length) {
+ System.arraycopy(contents, 0,
+ contents = new byte[contentsLength], 0, contentsLength);
+ }
+ return contents;
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ private void logError(String message) {
+ try {
+ if (this.writer == null) {
+ this.writer = new BufferedWriter(new FileWriter(
+ this.resultFile, true));
+ }
+ writer.write(message);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test499/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test499/A_in.js
new file mode 100644
index 0000000..571b550
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test499/A_in.js
@@ -0,0 +1,11 @@
+public final class DirectoryComparator {
+ public void compare() {
+ File[] secondFiles = null;
+ if (secondFiles.length != files.length) {
+ final String errorMessage = "Different number of jars files:\n" +
+ "\t" - secondFiles.length + " in " + secondDirectoryAbsolutePath + "\n" +
+ "\t" + files.length + " in " + firstDirectoryAbsolutePath + "\n";
+ logError(errorMessage);
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test499/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test499/A_out.js
new file mode 100644
index 0000000..63b60ef
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test499/A_out.js
@@ -0,0 +1,13 @@
+public final class DirectoryComparator {
+
+ public void compare() {
+ File[] secondFiles = null;
+ if (secondFiles.length != files.length) {
+ final String errorMessage = "Different number of jars files:\n"
+ + "\t" - secondFiles.length + " in "
+ + secondDirectoryAbsolutePath + "\n" + "\t" + files.length
+ + " in " + firstDirectoryAbsolutePath + "\n";
+ logError(errorMessage);
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test500/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test500/A_in.js
new file mode 100644
index 0000000..c4d77ab
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test500/A_in.js
@@ -0,0 +1,13 @@
+import java.util.Vector;
+
+public class EclipseFormatTest
+{
+ public static void main(String[] args)
+ {
+ Vector v2 = new Vector();
+ {{{String a = ((String) v2.get(0)).trim(), b = (String)
+ v2.get(1), c = (String) v2
+ .get(2);}}
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test500/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test500/A_out.js
new file mode 100644
index 0000000..087ad0c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test500/A_out.js
@@ -0,0 +1,15 @@
+import java.util.Vector;
+
+public class EclipseFormatTest {
+ public static void main(String[] args) {
+ Vector v2 = new Vector();
+ {
+ {
+ {
+ String a = ((String) v2.get(0)).trim(), b = (String) v2
+ .get(1), c = (String) v2.get(2);
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test501/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test501/A_in.js
new file mode 100644
index 0000000..b20a249
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test501/A_in.js
@@ -0,0 +1,3 @@
+public class A {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test501/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test501/A_out.js
new file mode 100644
index 0000000..b4948c8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test501/A_out.js
@@ -0,0 +1,4 @@
+public class A
+{
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test501/formatter.xml b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test501/formatter.xml
new file mode 100644
index 0000000..9b8b9a9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test501/formatter.xml
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<profiles version="5">
+<profile name="GMTI" version="5">
+<setting id="comment_clear_blank_lines" value="false"/>
+<setting id="comment_format_comments" value="false"/>
+<setting id="comment_format_header" value="false"/>
+<setting id="comment_format_html" value="true"/>
+<setting id="comment_format_source_code" value="true"/>
+<setting id="comment_indent_parameter_description" value="false"/>
+<setting id="comment_indent_root_tags" value="true"/>
+<setting id="comment_line_length" value="80"/>
+<setting id="comment_new_line_for_parameter" value="false"/>
+<setting id="comment_separate_root_tags" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.align_type_members_on_columns" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_binary_expression" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_compact_if" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_conditional_expression" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_multiple_fields" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_after_imports" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_after_package" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_field" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_imports" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_member_type" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_method" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_package" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_between_type_declarations" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_anonymous_type_declaration" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_block" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_constructor_declaration" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_method_declaration" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_switch" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_type_declaration" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.compact_else_if" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.filling_space" value=" "/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_statements_compare_to_block" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_statements_compare_to_body" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_control_statements" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_imple_if_on_one_line" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.lineSplit" value="100"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.preserve_user_linebreaks" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.remove_unnecessary_semicolon" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.tabulation.char" value="tab"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.tabulation.size" value="4"/>
+</profile>
+</profiles>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test502/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test502/A_in.js
new file mode 100644
index 0000000..0f9492f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test502/A_in.js
@@ -0,0 +1,2 @@
+public class A {
+ strictfp void bar() {}} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test502/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test502/A_out.js
new file mode 100644
index 0000000..e2c05bf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test502/A_out.js
@@ -0,0 +1,4 @@
+public class A {
+ strictfp void bar() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test503/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test503/A_in.js
new file mode 100644
index 0000000..72033bb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test503/A_in.js
@@ -0,0 +1,5 @@
+public class A {
+ public static void main(String[] args) {
+ for (String s : args) {System.out.println(s);}
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test503/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test503/A_out.js
new file mode 100644
index 0000000..9e30854
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test503/A_out.js
@@ -0,0 +1,7 @@
+public class A {
+ public static void main(String[] args) {
+ for (String s : args) {
+ System.out.println(s);
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test504/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test504/A_in.js
new file mode 100644
index 0000000..740409b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test504/A_in.js
@@ -0,0 +1,5 @@
+interface Convertible<T> {
+ T convert();
+}
+
+public class ReprChange<A extends Convertible<B>, B extends Convertible<A>> {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test504/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test504/A_out.js
new file mode 100644
index 0000000..5ef5d3c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test504/A_out.js
@@ -0,0 +1,6 @@
+interface Convertible<T> {
+ T convert();
+}
+
+public class ReprChange<A extends Convertible<B>, B extends Convertible<A>> {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test505/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test505/A_in.js
new file mode 100644
index 0000000..53290ff
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test505/A_in.js
@@ -0,0 +1,5 @@
+interface Convertible<T> {
+ T convert();
+}
+
+public class X<A extends Convertible<Convertible<A>>> {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test505/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test505/A_out.js
new file mode 100644
index 0000000..3a3491a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test505/A_out.js
@@ -0,0 +1,6 @@
+interface Convertible<T> {
+ T convert();
+}
+
+public class X<A extends Convertible<Convertible<A>>> {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test506/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test506/A_in.js
new file mode 100644
index 0000000..af254bc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test506/A_in.js
@@ -0,0 +1,77 @@
+class Seq<E> {
+ E head;
+ Seq<E> tail;
+ Seq() {
+ this(null, null);
+ }
+ boolean isEmpty() {
+ return this.tail == null;
+ }
+ Seq(E head, Seq<E> tail) {
+ this.head = head;
+ this.tail = tail;
+ }
+ <T> Seq<Pair<E,T>> zip(Seq<T> that) {
+ if (this.isEmpty() || that.isEmpty())
+ return new Seq<Pair<E,T>>();
+ else
+ return new Seq<Pair<E,T>>(
+ new Pair<E,T>(this.head, that.head),
+ this.tail.zip(that.tail));
+ }
+ public String toString() {
+ StringBuffer buffer = new StringBuffer();
+ if (head != null) {
+ buffer.append(head);
+ }
+ if (tail != null) {
+ buffer.append(tail);
+ }
+ return String.valueOf(buffer);
+ }
+ public class Zipper<T> {
+ Seq<Pair<E,T>> zip(Seq<T> that) {
+ if (Seq.this.isEmpty() || that.isEmpty())
+ return new Seq<Pair<E,T>>();
+ else
+ return new Seq<Pair<E,T>>(
+ new Pair<E,T>(Seq.this.head, that.head),
+ Seq.this.tail.zip(that.tail));
+ }
+ }
+}
+class Pair<A, B> {
+ A fst;
+ B snd;
+
+ Pair(A a, B b) {
+ this.fst = a;
+ this.snd = b;
+ }
+ public String toString() {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("(");
+ buffer.append(fst);
+ buffer.append(", ");
+ buffer.append(snd);
+ buffer.append(")");
+ return String.valueOf(buffer);
+ }
+ public boolean equals(Object other) {
+ return other instanceof Pair &&
+ equals(fst, ((Pair)other).fst) &&
+ equals(snd, ((Pair)other).snd);
+ }
+ private boolean equals(Object x, Object y) {
+ return x == null && y == null || x != null && x.equals(y);
+ }
+}
+public class A {
+ public static void main(String[] args) {
+ Seq<String> strs = new Seq<String>("a", new Seq<String>("b", new Seq<String>()));
+ Seq<Number> nums = new Seq<Number>(new Integer(1), new Seq<Number>(new Double(1.5), new Seq<Number>()));
+ Seq<String>.Zipper<Number> zipper = strs.new Zipper<Number>();
+ Seq<Pair<String,Number>> combined = zipper.zip(nums);
+ System.out.println(combined);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test506/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test506/A_out.js
new file mode 100644
index 0000000..dbf2567
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test506/A_out.js
@@ -0,0 +1,87 @@
+class Seq<E> {
+ E head;
+ Seq<E> tail;
+
+ Seq() {
+ this(null, null);
+ }
+
+ boolean isEmpty() {
+ return this.tail == null;
+ }
+
+ Seq(E head, Seq<E> tail) {
+ this.head = head;
+ this.tail = tail;
+ }
+
+ <T> Seq<Pair<E, T>> zip(Seq<T> that) {
+ if (this.isEmpty() || that.isEmpty())
+ return new Seq<Pair<E, T>>();
+ else
+ return new Seq<Pair<E, T>>(new Pair<E, T>(this.head, that.head),
+ this.tail.zip(that.tail));
+ }
+
+ public String toString() {
+ StringBuffer buffer = new StringBuffer();
+ if (head != null) {
+ buffer.append(head);
+ }
+ if (tail != null) {
+ buffer.append(tail);
+ }
+ return String.valueOf(buffer);
+ }
+
+ public class Zipper<T> {
+ Seq<Pair<E, T>> zip(Seq<T> that) {
+ if (Seq.this.isEmpty() || that.isEmpty())
+ return new Seq<Pair<E, T>>();
+ else
+ return new Seq<Pair<E, T>>(new Pair<E, T>(Seq.this.head,
+ that.head), Seq.this.tail.zip(that.tail));
+ }
+ }
+}
+
+class Pair<A, B> {
+ A fst;
+ B snd;
+
+ Pair(A a, B b) {
+ this.fst = a;
+ this.snd = b;
+ }
+
+ public String toString() {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("(");
+ buffer.append(fst);
+ buffer.append(", ");
+ buffer.append(snd);
+ buffer.append(")");
+ return String.valueOf(buffer);
+ }
+
+ public boolean equals(Object other) {
+ return other instanceof Pair && equals(fst, ((Pair) other).fst)
+ && equals(snd, ((Pair) other).snd);
+ }
+
+ private boolean equals(Object x, Object y) {
+ return x == null && y == null || x != null && x.equals(y);
+ }
+}
+
+public class A {
+ public static void main(String[] args) {
+ Seq<String> strs = new Seq<String>("a", new Seq<String>("b",
+ new Seq<String>()));
+ Seq<Number> nums = new Seq<Number>(new Integer(1), new Seq<Number>(
+ new Double(1.5), new Seq<Number>()));
+ Seq<String>.Zipper<Number> zipper = strs.new Zipper<Number>();
+ Seq<Pair<String, Number>> combined = zipper.zip(nums);
+ System.out.println(combined);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test507/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test507/A_in.js
new file mode 100644
index 0000000..681309d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test507/A_in.js
@@ -0,0 +1,9 @@
+public enum Coin {
+ PENNY(1), NICKEL(5), DIME(10), QUARTER(25);
+
+ Coin(int value) { this.value = value; }
+
+ private final int value;
+
+ public int value() { return value; }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test507/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test507/A_out.js
new file mode 100644
index 0000000..fb458ca
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test507/A_out.js
@@ -0,0 +1,13 @@
+public enum Coin {
+ PENNY(1), NICKEL(5), DIME(10), QUARTER(25);
+
+ Coin(int value) {
+ this.value = value;
+ }
+
+ private final int value;
+
+ public int value() {
+ return value;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test508/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test508/A_in.js
new file mode 100644
index 0000000..95463d9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test508/A_in.js
@@ -0,0 +1,17 @@
+@Retention package test0006;
+
+@interface Name {
+ String first() default "Joe";
+ String last() default "Smith";
+ int age();
+}
+
+@interface Author {
+ Name value();
+}
+
+@interface Retention {
+}
+
+@Retention @Author(@Name(first="Joe", last="Hacker", age=32))
+class A {}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test508/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test508/A_out.js
new file mode 100644
index 0000000..91e180f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test508/A_out.js
@@ -0,0 +1,22 @@
+@Retention
+package test0006;
+
+@interface Name {
+ String first() default "Joe";
+
+ String last() default "Smith";
+
+ int age();
+}
+
+@interface Author {
+ Name value();
+}
+
+@interface Retention {
+}
+
+@Retention
+@Author(@Name(first = "Joe", last = "Hacker", age = 32))
+class A {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test509/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test509/A_in.js
new file mode 100644
index 0000000..b49fd23
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test509/A_in.js
@@ -0,0 +1,11 @@
+package test.test1.test2;
+import java.io.*;import java.util.Vector;
+public class Test {
+public int i;public void foo(int k) {if (k > 0) { i = 3;;;} else if (k == 0) { i = 2;}if (i == 2) return;
+if (k > 0) i = 3;}public void bar() {}
+public long l; // long field
+public String s = null;
+}
+
+
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test509/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test509/A_out.js
new file mode 100644
index 0000000..470a793
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test509/A_out.js
@@ -0,0 +1,19 @@
+package test.test1.test2;
+import java.io.*;
+import java.util.Vector;
+public class Test {
+ public int i;
+ public void foo(int k) {
+ if (k > 0) {
+ i = 3;;;
+ } else if (k == 0) {
+ i = 2;
+ }
+ if (i == 2) return;
+ if (k > 0) i = 3;
+ }
+ public void bar() {
+ }
+ public long l; // long field
+ public String s = null;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test510/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test510/A_in.js
new file mode 100644
index 0000000..b49fd23
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test510/A_in.js
@@ -0,0 +1,11 @@
+package test.test1.test2;
+import java.io.*;import java.util.Vector;
+public class Test {
+public int i;public void foo(int k) {if (k > 0) { i = 3;;;} else if (k == 0) { i = 2;}if (i == 2) return;
+if (k > 0) i = 3;}public void bar() {}
+public long l; // long field
+public String s = null;
+}
+
+
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test510/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test510/A_out.js
new file mode 100644
index 0000000..470a793
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test510/A_out.js
@@ -0,0 +1,19 @@
+package test.test1.test2;
+import java.io.*;
+import java.util.Vector;
+public class Test {
+ public int i;
+ public void foo(int k) {
+ if (k > 0) {
+ i = 3;;;
+ } else if (k == 0) {
+ i = 2;
+ }
+ if (i == 2) return;
+ if (k > 0) i = 3;
+ }
+ public void bar() {
+ }
+ public long l; // long field
+ public String s = null;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test511/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test511/A_in.js
new file mode 100644
index 0000000..c0f90e6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test511/A_in.js
@@ -0,0 +1,8 @@
+package test.test1.test2;
+import java.io.*;import java.util.Vector;
+public class Test {
+public int i;public void foo(int k) {if (k > 0) { i = 3;;;} else if (k == 0) { i = 2;}if (i == 2) return;
+if (k > 0) i = 3;}public void bar() {}
+public long l; // long field
+public String s = null;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test511/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test511/A_out.js
new file mode 100644
index 0000000..81f1bd4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test511/A_out.js
@@ -0,0 +1,19 @@
+package test.test1.test2;
+import java.io.*;
+import java.util.Vector;
+public class Test {
+ public int i;
+ public void foo(int k) {
+ if (k > 0) {
+ i = 3;;;
+ } else if (k == 0) {
+ i = 2;
+ }
+ if (i == 2) return;
+ if (k > 0) i = 3;
+ }
+ public void bar() {
+ }
+ public long l; // long field
+ public String s = null;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test512/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test512/A_in.js
new file mode 100644
index 0000000..c0f90e6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test512/A_in.js
@@ -0,0 +1,8 @@
+package test.test1.test2;
+import java.io.*;import java.util.Vector;
+public class Test {
+public int i;public void foo(int k) {if (k > 0) { i = 3;;;} else if (k == 0) { i = 2;}if (i == 2) return;
+if (k > 0) i = 3;}public void bar() {}
+public long l; // long field
+public String s = null;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test512/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test512/A_out.js
new file mode 100644
index 0000000..470a793
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test512/A_out.js
@@ -0,0 +1,19 @@
+package test.test1.test2;
+import java.io.*;
+import java.util.Vector;
+public class Test {
+ public int i;
+ public void foo(int k) {
+ if (k > 0) {
+ i = 3;;;
+ } else if (k == 0) {
+ i = 2;
+ }
+ if (i == 2) return;
+ if (k > 0) i = 3;
+ }
+ public void bar() {
+ }
+ public long l; // long field
+ public String s = null;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test513/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test513/A_in.js
new file mode 100644
index 0000000..537688a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test513/A_in.js
@@ -0,0 +1 @@
+enum XY {CANCELLED, RUNNING, WAITING, FINISHED } \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test513/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test513/A_out.js
new file mode 100644
index 0000000..b5178e7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test513/A_out.js
@@ -0,0 +1,3 @@
+enum XY {
+ CANCELLED, RUNNING, WAITING, FINISHED
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test514/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test514/A_in.js
new file mode 100644
index 0000000..9691083
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test514/A_in.js
@@ -0,0 +1,7 @@
+public class X {
+ public void foo() {
+ if (TextRequest.REQ_INSERT == request.getType() || TextRequest.REQ_BACKSPACE == request.getType()
+ || TextRequest.REQ_DELETE == request.getType() || TextRequest.REQ_REMOVE_RANGE == request.getType())
+ return getHost();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test514/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test514/A_out.js
new file mode 100644
index 0000000..7d13915
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test514/A_out.js
@@ -0,0 +1,9 @@
+public class X {
+public void foo() {
+ if (TextRequest.REQ_INSERT == request.getType()
+ || TextRequest.REQ_BACKSPACE == request.getType()
+ || TextRequest.REQ_DELETE == request.getType()
+ || TextRequest.REQ_REMOVE_RANGE == request.getType())
+ return getHost();
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test514/formatter.xml b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test514/formatter.xml
new file mode 100644
index 0000000..f48cd26
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test514/formatter.xml
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<profiles version="6">
+<profile name="core" version="6">
+<setting id="comment_clear_blank_lines" value="false"/>
+<setting id="comment_format_comments" value="true"/>
+<setting id="comment_format_header" value="true"/>
+<setting id="comment_format_html" value="true"/>
+<setting id="comment_format_source_code" value="true"/>
+<setting id="comment_indent_parameter_description" value="false"/>
+<setting id="comment_indent_root_tags" value="true"/>
+<setting id="comment_line_length" value="90"/>
+<setting id="comment_new_line_for_parameter" value="false"/>
+<setting id="comment_separate_root_tags" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.align_type_members_on_columns" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_binary_expression" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_compact_if" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_conditional_expression" value="80"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_multiple_fields" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_superclass_in_type_declaration" value="32"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="32"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_after_imports" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_after_package" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_field" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_imports" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_member_type" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_method" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_package" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_between_type_declarations" value="2"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_block" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.compact_else_if" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation" value="2"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_type_header" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_statements_compare_to_block" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_statements_compare_to_body" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_block" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_method_body" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_imple_if_on_one_line" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.lineSplit" value="80"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.number_of_empty_lines_to_preserve" value="2"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.tabulation.char" value="tab"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.tabulation.size" value="4"/>
+</profile>
+</profiles> \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test515/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test515/A_in.js
new file mode 100644
index 0000000..4f67417
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test515/A_in.js
@@ -0,0 +1,2 @@
+public class A { public void foo(Object o, A... i) { }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test515/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test515/A_out.js
new file mode 100644
index 0000000..48deb8e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test515/A_out.js
@@ -0,0 +1,4 @@
+public class A {
+ public void foo(Object o, A... i) {
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test516/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test516/A_in.js
new file mode 100644
index 0000000..4f67417
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test516/A_in.js
@@ -0,0 +1,2 @@
+public class A { public void foo(Object o, A... i) { }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test516/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test516/A_out.js
new file mode 100644
index 0000000..83ab086
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test516/A_out.js
@@ -0,0 +1,4 @@
+public class A {
+ public void foo(Object o, A...i) {
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test517/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test517/A_in.js
new file mode 100644
index 0000000..4f67417
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test517/A_in.js
@@ -0,0 +1,2 @@
+public class A { public void foo(Object o, A... i) { }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test517/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test517/A_out.js
new file mode 100644
index 0000000..e0189e1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test517/A_out.js
@@ -0,0 +1,4 @@
+public class A {
+ public void foo(Object o, A ... i) {
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test518/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test518/A_in.js
new file mode 100644
index 0000000..4f67417
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test518/A_in.js
@@ -0,0 +1,2 @@
+public class A { public void foo(Object o, A... i) { }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test518/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test518/A_out.js
new file mode 100644
index 0000000..7f91413
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test518/A_out.js
@@ -0,0 +1,4 @@
+public class A {
+ public void foo(Object o, A ...i) {
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test519/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test519/A_in.js
new file mode 100644
index 0000000..4f67417
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test519/A_in.js
@@ -0,0 +1,2 @@
+public class A { public void foo(Object o, A... i) { }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test519/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test519/A_out.js
new file mode 100644
index 0000000..48deb8e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test519/A_out.js
@@ -0,0 +1,4 @@
+public class A {
+ public void foo(Object o, A... i) {
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test520/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test520/A_in.js
new file mode 100644
index 0000000..4813e43
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test520/A_in.js
@@ -0,0 +1,2 @@
+package test;
+public enum A { D(){void foo(){}}, B } \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test520/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test520/A_out.js
new file mode 100644
index 0000000..7d39d13
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test520/A_out.js
@@ -0,0 +1,9 @@
+package test;
+
+public enum A {
+ D() {
+ void foo() {
+ }
+ },
+ B
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test521/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test521/A_in.js
new file mode 100644
index 0000000..d020ade
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test521/A_in.js
@@ -0,0 +1 @@
+public class Test {public enum MyInnerEnum {A, B}}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test521/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test521/A_out.js
new file mode 100644
index 0000000..bcdeb75
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test521/A_out.js
@@ -0,0 +1,5 @@
+public class Test {
+ public enum MyInnerEnum {
+ A, B
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test522/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test522/A_in.js
new file mode 100644
index 0000000..1b3274b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test522/A_in.js
@@ -0,0 +1,12 @@
+/**
+ * New Lines
+ */
+public class Empty {}
+class Example { static int [] fArray= {1, 2, 3, 4, 5 }; Listener fListener= new Listener() { };
+ // the following line contains line breaks
+// which can be preserved:
+ void
+bar
+()
+ {} void foo() { ;; do {} while (false); for (;;) {} }}
+enum MyEnum { UNDEFINED(0) { }}enum EmptyEnum { }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test522/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test522/A_out.js
new file mode 100644
index 0000000..5e1a954
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test522/A_out.js
@@ -0,0 +1,33 @@
+/**
+ * New Lines
+ */
+public class Empty {
+}
+
+class Example {
+ static int[] fArray = { 1, 2, 3, 4, 5 };
+ Listener fListener = new Listener() {
+ };
+
+ // the following line contains line breaks
+ // which can be preserved:
+ void bar() {
+ }
+
+ void foo() {
+ ;
+ ;
+ do {
+ } while (false);
+ for (;;) {
+ }
+ }
+}
+
+enum MyEnum {
+ UNDEFINED(0) {
+ }
+}
+
+enum EmptyEnum {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test523/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test523/A_in.js
new file mode 100644
index 0000000..5a68023
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test523/A_in.js
@@ -0,0 +1,10 @@
+class emptyClass {
+}
+
+enum MyEnum {
+ UNDEFINED(0) {
+ }
+}
+
+enum EmptyEnum {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test523/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test523/A_out.js
new file mode 100644
index 0000000..29853c5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test523/A_out.js
@@ -0,0 +1,8 @@
+class emptyClass {
+}
+
+enum MyEnum {
+ UNDEFINED(0) {}
+}
+
+enum EmptyEnum {}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test524/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test524/A_in.js
new file mode 100644
index 0000000..5a68023
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test524/A_in.js
@@ -0,0 +1,10 @@
+class emptyClass {
+}
+
+enum MyEnum {
+ UNDEFINED(0) {
+ }
+}
+
+enum EmptyEnum {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test524/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test524/A_out.js
new file mode 100644
index 0000000..c183a7c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test524/A_out.js
@@ -0,0 +1,9 @@
+class emptyClass {
+}
+
+enum MyEnum {
+ UNDEFINED(0) {}
+}
+
+enum EmptyEnum {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test525/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test525/A_in.js
new file mode 100644
index 0000000..5a68023
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test525/A_in.js
@@ -0,0 +1,10 @@
+class emptyClass {
+}
+
+enum MyEnum {
+ UNDEFINED(0) {
+ }
+}
+
+enum EmptyEnum {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test525/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test525/A_out.js
new file mode 100644
index 0000000..6a63a54
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test525/A_out.js
@@ -0,0 +1,9 @@
+class emptyClass {
+}
+
+enum MyEnum {
+ UNDEFINED(0) {
+ }
+}
+
+enum EmptyEnum {}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test526/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test526/A_in.js
new file mode 100644
index 0000000..5a68023
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test526/A_in.js
@@ -0,0 +1,10 @@
+class emptyClass {
+}
+
+enum MyEnum {
+ UNDEFINED(0) {
+ }
+}
+
+enum EmptyEnum {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test526/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test526/A_out.js
new file mode 100644
index 0000000..9347eec
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test526/A_out.js
@@ -0,0 +1,10 @@
+class emptyClass {
+}
+
+enum MyEnum {
+ UNDEFINED(0) {
+ }
+}
+
+enum EmptyEnum {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test527/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test527/A_in.js
new file mode 100644
index 0000000..bc5ddbc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test527/A_in.js
@@ -0,0 +1,9 @@
+package test527;
+
+@Jpf.Controller(
+ catches={
+ @Jpf.Catch(type=java.lang.Exception.class, method="handleException"),
+ @Jpf.Catch(type=PageFlowException.class, method="handlePageFlowException")
+ }
+ )
+ public class A {}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test527/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test527/A_out.js
new file mode 100644
index 0000000..faf11e4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test527/A_out.js
@@ -0,0 +1,7 @@
+package test527;
+
+@Jpf.Controller(catches = {
+ @Jpf.Catch(type = java.lang.Exception.class, method = "handleException"),
+ @Jpf.Catch(type = PageFlowException.class, method = "handlePageFlowException") })
+public class A {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test528/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test528/A_in.js
new file mode 100644
index 0000000..669d50a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test528/A_in.js
@@ -0,0 +1,15 @@
+package test528;
+
+import static test.TestConstants.*;
+
+public class A
+ {
+ public void someMethod()
+ {
+ int x = 0;
+ if(x == 0)
+ {
+ //Do something
+ }
+ }
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test528/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test528/A_out.js
new file mode 100644
index 0000000..abb6b9e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test528/A_out.js
@@ -0,0 +1,12 @@
+package test528;
+
+import static test.TestConstants.*;
+
+public class A {
+ public void someMethod() {
+ int x = 0;
+ if (x == 0) {
+ //Do something
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test529/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test529/A_in.js
new file mode 100644
index 0000000..559fdf6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test529/A_in.js
@@ -0,0 +1,15 @@
+package test528;
+
+import static test.TestConstants.A;
+
+public class A
+ {
+ public void someMethod()
+ {
+ int x = 0;
+ if(x == 0)
+ {
+ //Do something
+ }
+ }
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test529/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test529/A_out.js
new file mode 100644
index 0000000..1b0053a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test529/A_out.js
@@ -0,0 +1,12 @@
+package test528;
+
+import static test.TestConstants.A;
+
+public class A {
+ public void someMethod() {
+ int x = 0;
+ if (x == 0) {
+ //Do something
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test530/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test530/A_in.js
new file mode 100644
index 0000000..04a3570
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test530/A_in.js
@@ -0,0 +1,11 @@
+package test530;
+
+public enum A {
+ TEST
+ ;
+ public String field;
+
+ public void foo() {
+ String s = field;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test530/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test530/A_out.js
new file mode 100644
index 0000000..88a7aa8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test530/A_out.js
@@ -0,0 +1,10 @@
+package test530;
+
+public enum A {
+ TEST;
+ public String field;
+
+ public void foo() {
+ String s = field;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test531/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test531/A_in.js
new file mode 100644
index 0000000..8d6f9c6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test531/A_in.js
@@ -0,0 +1,12 @@
+package test531;
+enum A {
+ C {
+ void foo() {
+ }
+ },
+ D {
+ void foo() {
+ }
+ }
+ ;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test531/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test531/A_out.js
new file mode 100644
index 0000000..c699fcf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test531/A_out.js
@@ -0,0 +1,12 @@
+package test531;
+
+enum A {
+ C {
+ void foo() {
+ }
+ },
+ D {
+ void foo() {
+ }
+ };
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test532/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test532/A_in.js
new file mode 100644
index 0000000..6e42055
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test532/A_in.js
@@ -0,0 +1,5 @@
+package test532;
+enum A {
+ ;
+ A() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test532/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test532/A_out.js
new file mode 100644
index 0000000..fe2359d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test532/A_out.js
@@ -0,0 +1,7 @@
+package test532;
+
+enum A {
+ ;
+ A() {
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test533/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test533/A_in.js
new file mode 100644
index 0000000..5d6e71d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test533/A_in.js
@@ -0,0 +1,4 @@
+package test533;
+enum A {
+ ;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test533/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test533/A_out.js
new file mode 100644
index 0000000..7a196d6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test533/A_out.js
@@ -0,0 +1,5 @@
+package test533;
+
+enum A {
+ ;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test534/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test534/A_in.js
new file mode 100644
index 0000000..75b0274
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test534/A_in.js
@@ -0,0 +1,7 @@
+package test534;
+import java.util.List;
+class A {
+ List< ? extends Number> foo() {
+ return null;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test534/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test534/A_out.js
new file mode 100644
index 0000000..d2f15bd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test534/A_out.js
@@ -0,0 +1,9 @@
+package test534;
+
+import java.util.List;
+
+class A {
+ List<? extends Number> foo() {
+ return null;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test535/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test535/A_in.js
new file mode 100644
index 0000000..0ebb805
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test535/A_in.js
@@ -0,0 +1,7 @@
+package test535;
+import java.util.List;
+class A {
+ List< ? > foo() {
+ return null;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test535/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test535/A_out.js
new file mode 100644
index 0000000..55c076b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test535/A_out.js
@@ -0,0 +1,9 @@
+package test535;
+
+import java.util.List;
+
+class A {
+ List<?> foo() {
+ return null;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test536/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test536/A_in.js
new file mode 100644
index 0000000..75b0274
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test536/A_in.js
@@ -0,0 +1,7 @@
+package test534;
+import java.util.List;
+class A {
+ List< ? extends Number> foo() {
+ return null;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test536/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test536/A_out.js
new file mode 100644
index 0000000..734b581
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test536/A_out.js
@@ -0,0 +1,9 @@
+package test534;
+
+import java.util.List;
+
+class A {
+ List< ? extends Number> foo() {
+ return null;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test537/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test537/A_in.js
new file mode 100644
index 0000000..0ebb805
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test537/A_in.js
@@ -0,0 +1,7 @@
+package test535;
+import java.util.List;
+class A {
+ List< ? > foo() {
+ return null;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test537/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test537/A_out.js
new file mode 100644
index 0000000..878ae4a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test537/A_out.js
@@ -0,0 +1,9 @@
+package test535;
+
+import java.util.List;
+
+class A {
+ List< ? > foo() {
+ return null;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test538/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test538/A_in.js
new file mode 100644
index 0000000..d9a52c4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test538/A_in.js
@@ -0,0 +1,11 @@
+/**
+ * Class description.
+ */
+public class Test {
+}
+
+/**
+ * Class description.
+ */
+class Example {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test538/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test538/A_out.js
new file mode 100644
index 0000000..d9a52c4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test538/A_out.js
@@ -0,0 +1,11 @@
+/**
+ * Class description.
+ */
+public class Test {
+}
+
+/**
+ * Class description.
+ */
+class Example {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test539/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test539/A_in.js
new file mode 100644
index 0000000..c916a84
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test539/A_in.js
@@ -0,0 +1 @@
+public interface A extends Comparable<Class<?>> {}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test539/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test539/A_out.js
new file mode 100644
index 0000000..5d958f3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test539/A_out.js
@@ -0,0 +1,2 @@
+public interface A extends Comparable<Class<?>> {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test540/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test540/A_in.js
new file mode 100644
index 0000000..473a058
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test540/A_in.js
@@ -0,0 +1 @@
+public class A extends Comparable<Class<?>> {}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test540/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test540/A_out.js
new file mode 100644
index 0000000..95c9783
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test540/A_out.js
@@ -0,0 +1,2 @@
+public class A extends Comparable<Class<?>> {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test541/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test541/A_in.js
new file mode 100644
index 0000000..8391799
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test541/A_in.js
@@ -0,0 +1,6 @@
+interface A
+{ class AA<T> {} }
+
+class FieldArgumentsPC
+extends A.AA <Object>
+{}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test541/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test541/A_out.js
new file mode 100644
index 0000000..6ae82fe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test541/A_out.js
@@ -0,0 +1,7 @@
+interface A {
+ class AA<T> {
+ }
+}
+
+class FieldArgumentsPC extends A.AA<Object> {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test542/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test542/A_in.js
new file mode 100644
index 0000000..0572b9c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test542/A_in.js
@@ -0,0 +1,5 @@
+import java.util.List;
+
+public class X {
+ List l;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test542/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test542/A_out.js
new file mode 100644
index 0000000..0572b9c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test542/A_out.js
@@ -0,0 +1,5 @@
+import java.util.List;
+
+public class X {
+ List l;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test543/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test543/A_in.js
new file mode 100644
index 0000000..62f5846
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test543/A_in.js
@@ -0,0 +1,7 @@
+public class FormatterTest {
+ void doTest(
+ ) {
+ System.out.println("(" +
+ Object.class + ")");
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test543/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test543/A_out.js
new file mode 100644
index 0000000..7169317
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test543/A_out.js
@@ -0,0 +1,5 @@
+public class FormatterTest {
+ void doTest() {
+ System.out.println("(" + Object.class + ")");
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test544/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test544/A_in.js
new file mode 100644
index 0000000..62fc541
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test544/A_in.js
@@ -0,0 +1,2 @@
+public class BoxOfComponents<C extends Component> {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test544/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test544/A_out.js
new file mode 100644
index 0000000..c4c1bb9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test544/A_out.js
@@ -0,0 +1,3 @@
+public class BoxOfComponents<C extends Component>
+{
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test545/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test545/A_in.js
new file mode 100644
index 0000000..ae3d0f7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test545/A_in.js
@@ -0,0 +1,19 @@
+import java.util.List;
+
+public class Bug
+{
+void case1(List<Object>... lists)
+{ int notFormatted; }
+
+ void case2(List... lists)
+ {
+ int notFormatted;
+ }
+
+ void case3(List<Object> lists)
+ {
+ int notFormatted;
+ }
+void case4(java.lang.List<Object>... lists)
+{ int notFormatted; }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test545/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test545/A_out.js
new file mode 100644
index 0000000..f23cbdb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test545/A_out.js
@@ -0,0 +1,19 @@
+import java.util.List;
+
+public class Bug {
+ void case1(List<Object>... lists) {
+ int notFormatted;
+ }
+
+ void case2(List... lists) {
+ int notFormatted;
+ }
+
+ void case3(List<Object> lists) {
+ int notFormatted;
+ }
+
+ void case4(java.lang.List<Object>... lists) {
+ int notFormatted;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test546/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test546/A_in.js
new file mode 100644
index 0000000..d29fe71
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test546/A_in.js
@@ -0,0 +1,8 @@
+public class Bug
+{ private static String buildStartTag(String namespace, String serviceName)
+ {
+ return " <ns1:" + serviceName +
+ (" soapenv:encodingStyle=\"http://schemas.xmlsoap.org/" +
+ "soap/encoding/\" xmlns:ns1=\"") + namespace + "\">\n";
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test546/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test546/A_out.js
new file mode 100644
index 0000000..f3eef30
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test546/A_out.js
@@ -0,0 +1,9 @@
+public class Bug {
+ private static String buildStartTag(String namespace, String serviceName) {
+ return " <ns1:"
+ + serviceName
+ + (" soapenv:encodingStyle=\"http://schemas.xmlsoap.org/"
+ + "soap/encoding/\" xmlns:ns1=\"") + namespace
+ + "\">\n";
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test547/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test547/A_in.js
new file mode 100644
index 0000000..87b15cd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test547/A_in.js
@@ -0,0 +1,3 @@
+/*
+TOTO
+*/ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test547/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test547/A_out.js
new file mode 100644
index 0000000..4335e03
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test547/A_out.js
@@ -0,0 +1,3 @@
+/*
+ * TOTO
+ */ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test548/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test548/A_in.js
new file mode 100644
index 0000000..8c942ba
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test548/A_in.js
@@ -0,0 +1,3 @@
+/**
+TOTO
+*/ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test548/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test548/A_out.js
new file mode 100644
index 0000000..6340b95
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test548/A_out.js
@@ -0,0 +1,3 @@
+/**
+ * TOTO
+ */ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test549/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test549/A_in.js
new file mode 100644
index 0000000..6656384
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test549/A_in.js
@@ -0,0 +1,2 @@
+public class X { void foo() { System.out.println();
+} }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test549/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test549/A_out.js
new file mode 100644
index 0000000..5420b49
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test549/A_out.js
@@ -0,0 +1,5 @@
+public class X {
+ void foo() {
+ System.out.println();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test550/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test550/A_in.js
new file mode 100644
index 0000000..ea0cafa
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test550/A_in.js
@@ -0,0 +1,6 @@
+class A {
+void method() {
+if (true)
+return;
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test550/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test550/A_out.js
new file mode 100644
index 0000000..bdfa6d3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test550/A_out.js
@@ -0,0 +1,6 @@
+class A {
+ void method() {
+ if (true)
+ return;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test551/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test551/A_in.js
new file mode 100644
index 0000000..b5e2525
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test551/A_in.js
@@ -0,0 +1,4 @@
+/**
+ * Some method.
+ */
+public void someMethod(String argument1, String argument2,String argument3) {}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test551/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test551/A_out.js
new file mode 100644
index 0000000..14e51f7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test551/A_out.js
@@ -0,0 +1,7 @@
+/**
+ * Some method.
+ */
+public void someMethod(String argument1,
+ String argument2,
+ String argument3) {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test552/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test552/A_in.js
new file mode 100644
index 0000000..c0f7e9c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test552/A_in.js
@@ -0,0 +1,4 @@
+public class X {/**
+ * Some method.
+ */
+public void someMethod(String argument1, String argument2,String argument3) {}}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test552/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test552/A_out.js
new file mode 100644
index 0000000..be916f9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test552/A_out.js
@@ -0,0 +1,9 @@
+public class X {
+ /**
+ * Some method.
+ */
+ public void someMethod(String argument1,
+ String argument2,
+ String argument3) {
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test553/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test553/A_in.js
new file mode 100644
index 0000000..10a1d65
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test553/A_in.js
@@ -0,0 +1 @@
+// This is a really long single line comment that should be wrapped on two lines once it is formatted \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test553/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test553/A_out.js
new file mode 100644
index 0000000..19db7b2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test553/A_out.js
@@ -0,0 +1,2 @@
+// This is a really long single line comment that should be wrapped on two lines
+// once it is formatted
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test554/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test554/A_in.js
new file mode 100644
index 0000000..4891bc2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test554/A_in.js
@@ -0,0 +1 @@
+// This is a really long single line comment that should be wrapped on two lines once it is formatted
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test554/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test554/A_out.js
new file mode 100644
index 0000000..19db7b2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test554/A_out.js
@@ -0,0 +1,2 @@
+// This is a really long single line comment that should be wrapped on two lines
+// once it is formatted
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test555/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test555/A_in.js
new file mode 100644
index 0000000..20f0a92
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test555/A_in.js
@@ -0,0 +1,9 @@
+class A {
+void method() {
+boolean b = false;
+if (true)
+if (b) {
+return;
+}
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test555/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test555/A_out.js
new file mode 100644
index 0000000..b74f070
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test555/A_out.js
@@ -0,0 +1,9 @@
+class A {
+ void method() {
+ boolean b = false;
+ if (true)
+ if (b) {
+ return;
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test556/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test556/A_in.js
new file mode 100644
index 0000000..0f0c985
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test556/A_in.js
@@ -0,0 +1,3 @@
+class A {
+ int[] tab = new int[] {};
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test556/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test556/A_out.js
new file mode 100644
index 0000000..2179c8c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test556/A_out.js
@@ -0,0 +1,3 @@
+class A {
+ int[] tab = new int[] {};
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test557/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test557/A_in.js
new file mode 100644
index 0000000..0f0c985
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test557/A_in.js
@@ -0,0 +1,3 @@
+class A {
+ int[] tab = new int[] {};
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test557/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test557/A_out.js
new file mode 100644
index 0000000..643df91
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test557/A_out.js
@@ -0,0 +1,3 @@
+class A {
+ int[] tab = new int[] { };
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test558/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test558/A_in.js
new file mode 100644
index 0000000..63eb5b0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test558/A_in.js
@@ -0,0 +1,7 @@
+@interface Ann {}
+
+public enum X {
+ @Ann A,
+ B,
+ @Ann C
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test558/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test558/A_out.js
new file mode 100644
index 0000000..e4874b2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test558/A_out.js
@@ -0,0 +1,6 @@
+@interface Ann {
+}
+
+public enum X {
+ @Ann A,B,@Ann C
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test559/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test559/A_in.js
new file mode 100644
index 0000000..63eb5b0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test559/A_in.js
@@ -0,0 +1,7 @@
+@interface Ann {}
+
+public enum X {
+ @Ann A,
+ B,
+ @Ann C
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test559/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test559/A_out.js
new file mode 100644
index 0000000..dd2ed83
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test559/A_out.js
@@ -0,0 +1,6 @@
+@interface Ann {
+}
+
+public enum X {
+ @Ann A, B, @Ann C
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test560/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test560/A_in.js
new file mode 100644
index 0000000..3a96b59
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test560/A_in.js
@@ -0,0 +1,10 @@
+public class X {
+public String[] getStrings()
+{
+ if (b)
+ {
+ return new String[] {};
+} // << wrong feed
+return x;
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test560/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test560/A_out.js
new file mode 100644
index 0000000..f5b1990
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test560/A_out.js
@@ -0,0 +1,12 @@
+public class X
+{
+ public String[] getStrings()
+ {
+ if (b)
+ {
+ return new String[]
+ {};
+ } // << wrong feed
+ return x;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test561/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test561/A_in.js
new file mode 100644
index 0000000..3a96b59
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test561/A_in.js
@@ -0,0 +1,10 @@
+public class X {
+public String[] getStrings()
+{
+ if (b)
+ {
+ return new String[] {};
+} // << wrong feed
+return x;
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test561/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test561/A_out.js
new file mode 100644
index 0000000..de427d3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test561/A_out.js
@@ -0,0 +1,11 @@
+public class X
+{
+ public String[] getStrings()
+ {
+ if (b)
+ {
+ return new String[] {};
+ } // << wrong feed
+ return x;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test562/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test562/A_in.js
new file mode 100644
index 0000000..7794b8d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test562/A_in.js
@@ -0,0 +1 @@
+Map map= new<String, Element> HashMap(); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test562/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test562/A_out.js
new file mode 100644
index 0000000..e5b4ee4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test562/A_out.js
@@ -0,0 +1 @@
+Map map = new<String, Element>HashMap(); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test563/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test563/A_in.js
new file mode 100644
index 0000000..7794b8d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test563/A_in.js
@@ -0,0 +1 @@
+Map map= new<String, Element> HashMap(); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test563/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test563/A_out.js
new file mode 100644
index 0000000..4a83dc6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test563/A_out.js
@@ -0,0 +1 @@
+Map map = new<String, Element> HashMap(); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test564/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test564/A_in.js
new file mode 100644
index 0000000..3a96b59
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test564/A_in.js
@@ -0,0 +1,10 @@
+public class X {
+public String[] getStrings()
+{
+ if (b)
+ {
+ return new String[] {};
+} // << wrong feed
+return x;
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test564/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test564/A_out.js
new file mode 100644
index 0000000..23d3608
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test564/A_out.js
@@ -0,0 +1,12 @@
+public class X
+{
+ public String[] getStrings()
+ {
+ if (b)
+ {
+ return new String[]
+ {};
+ } // << wrong feed
+ return x;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test565/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test565/A_in.js
new file mode 100644
index 0000000..9692c7f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test565/A_in.js
@@ -0,0 +1,8 @@
+public class SomeClass {
+ public void foo() {
+ if ((x.getSomeLongValue == 100)
+ || (x.getSomeOtherValue == 200)) {
+ y = 5;
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test565/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test565/A_out.js
new file mode 100644
index 0000000..9692c7f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test565/A_out.js
@@ -0,0 +1,8 @@
+public class SomeClass {
+ public void foo() {
+ if ((x.getSomeLongValue == 100)
+ || (x.getSomeOtherValue == 200)) {
+ y = 5;
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test566/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test566/A_in.js
new file mode 100644
index 0000000..5c5d901
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test566/A_in.js
@@ -0,0 +1,8 @@
+public enum X {
+ C {
+ void foo()
+ {
+ }
+ },
+ Y, Z;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test566/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test566/A_out.js
new file mode 100644
index 0000000..609cf6a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test566/A_out.js
@@ -0,0 +1,9 @@
+public enum X
+{
+ C
+ {
+ void foo() {
+ }
+ },
+ Y, Z;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test567/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test567/A_in.js
new file mode 100644
index 0000000..b88d93c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test567/A_in.js
@@ -0,0 +1,5 @@
+class Example {
+ void foo(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6) {
+ return;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test567/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test567/A_out.js
new file mode 100644
index 0000000..91a5e94
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test567/A_out.js
@@ -0,0 +1,7 @@
+class Example {
+ void foo(int arg1, int arg2,
+ int arg3, int arg4,
+ int arg5, int arg6) {
+ return;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test568/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test568/A_in.js
new file mode 100644
index 0000000..b88d93c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test568/A_in.js
@@ -0,0 +1,5 @@
+class Example {
+ void foo(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6) {
+ return;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test568/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test568/A_out.js
new file mode 100644
index 0000000..91a5e94
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test568/A_out.js
@@ -0,0 +1,7 @@
+class Example {
+ void foo(int arg1, int arg2,
+ int arg3, int arg4,
+ int arg5, int arg6) {
+ return;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test569/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test569/A_in.js
new file mode 100644
index 0000000..b88d93c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test569/A_in.js
@@ -0,0 +1,5 @@
+class Example {
+ void foo(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6) {
+ return;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test569/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test569/A_out.js
new file mode 100644
index 0000000..51066cc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test569/A_out.js
@@ -0,0 +1,7 @@
+class Example {
+ void foo(int arg1, int arg2,
+ int arg3, int arg4,
+ int arg5, int arg6) {
+ return;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test570/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test570/A_in.js
new file mode 100644
index 0000000..4f9fab2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test570/A_in.js
@@ -0,0 +1,8 @@
+public enum X {
+ CONST1, CONST2, CONST3, CONST4, CONST5, CONST6, CONST7, CONST8;
+
+ int constant = 4;
+
+ public static void main(String[] args) {
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test570/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test570/A_out.js
new file mode 100644
index 0000000..4f9fab2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test570/A_out.js
@@ -0,0 +1,8 @@
+public enum X {
+ CONST1, CONST2, CONST3, CONST4, CONST5, CONST6, CONST7, CONST8;
+
+ int constant = 4;
+
+ public static void main(String[] args) {
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test571/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test571/A_in.js
new file mode 100644
index 0000000..4f9fab2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test571/A_in.js
@@ -0,0 +1,8 @@
+public enum X {
+ CONST1, CONST2, CONST3, CONST4, CONST5, CONST6, CONST7, CONST8;
+
+ int constant = 4;
+
+ public static void main(String[] args) {
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test571/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test571/A_out.js
new file mode 100644
index 0000000..d226446
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test571/A_out.js
@@ -0,0 +1,15 @@
+public enum X {
+ CONST1,
+ CONST2,
+ CONST3,
+ CONST4,
+ CONST5,
+ CONST6,
+ CONST7,
+ CONST8;
+
+ int constant = 4;
+
+ public static void main(String[] args) {
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test572/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test572/A_in.js
new file mode 100644
index 0000000..ba6d2e6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test572/A_in.js
@@ -0,0 +1 @@
+int[] a = new int[][] {{1}}; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test572/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test572/A_out.js
new file mode 100644
index 0000000..ba6d2e6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test572/A_out.js
@@ -0,0 +1 @@
+int[] a = new int[][] {{1}}; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test573/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test573/A_in.js
new file mode 100644
index 0000000..ba6d2e6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test573/A_in.js
@@ -0,0 +1 @@
+int[] a = new int[][] {{1}}; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test573/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test573/A_out.js
new file mode 100644
index 0000000..839802f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test573/A_out.js
@@ -0,0 +1 @@
+int[] a = new int[][] { { 1 } }; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test574/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test574/A_in.js
new file mode 100644
index 0000000..0f86e44
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test574/A_in.js
@@ -0,0 +1,6 @@
+/**
+ * @author Zhao
+ *
+ * TODO To change the template for this generated type comment go to Window -
+ * Preferences - Java - Code Style - Code Templates
+ */ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test574/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test574/A_out.js
new file mode 100644
index 0000000..42ad0df
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test574/A_out.js
@@ -0,0 +1,6 @@
+/**
+ * @author Zhao
+ *
+ * TODO To change the template for this generated type comment go to Window -
+ * Preferences - Java - Code Style - Code Templates
+ */ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test575/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test575/A_in.js
new file mode 100644
index 0000000..20c0dd9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test575/A_in.js
@@ -0,0 +1,5 @@
+public class A
+{ public Object foo( @Ann("parameter") Object parameter ) {
+ return parameter;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test575/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test575/A_out.js
new file mode 100644
index 0000000..9a8c388
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test575/A_out.js
@@ -0,0 +1,6 @@
+public class A {
+ public Object foo(@Ann("parameter")
+ Object parameter) {
+ return parameter;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test576/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test576/A_in.js
new file mode 100644
index 0000000..499ee4f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test576/A_in.js
@@ -0,0 +1,41 @@
+import java.util.Map;
+
+interface MethodProperty<ActualType extends MethodProperty<ActualType>> {
+ public void copyFrom(ActualType other);
+}
+
+class MethodPropertyDatabase<Property extends MethodProperty<Property>> {
+ Map<String, Property> propertyMap;
+
+ void read(String fileName) {
+ }
+}
+
+class FooProperty implements MethodProperty<FooProperty> {
+ String value;
+
+ public void copyFrom(FooProperty other) {
+ this.value = other.value;
+ }
+}
+
+class FooPropertyDatabase extends MethodPropertyDatabase<FooProperty> {
+}
+
+public class GenericsBug {
+ FooPropertyDatabase fooDatabase;
+
+ public void readDatabase() {FooPropertyDatabase database = new FooPropertyDatabase();
+
+ fooDatabase = readDatabase(database, "foodatabase.db");
+ }
+
+ private<
+ Property extends MethodProperty<Property>,
+ DatabaseType extends MethodPropertyDatabase<Property>
+ > DatabaseType readDatabase(DatabaseType database, String fileName) {
+ database.read(fileName);
+ return database;
+ }
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test576/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test576/A_out.js
new file mode 100644
index 0000000..ed40565
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test576/A_out.js
@@ -0,0 +1,40 @@
+import java.util.Map;
+
+interface MethodProperty<ActualType extends MethodProperty<ActualType>> {
+ public void copyFrom(ActualType other);
+}
+
+class MethodPropertyDatabase<Property extends MethodProperty<Property>> {
+ Map<String, Property> propertyMap;
+
+ void read(String fileName) {
+ }
+}
+
+class FooProperty implements MethodProperty<FooProperty> {
+ String value;
+
+ public void copyFrom(FooProperty other) {
+ this.value = other.value;
+ }
+}
+
+class FooPropertyDatabase extends MethodPropertyDatabase<FooProperty> {
+}
+
+public class GenericsBug {
+ FooPropertyDatabase fooDatabase;
+
+ public void readDatabase() {
+ FooPropertyDatabase database = new FooPropertyDatabase();
+
+ fooDatabase = readDatabase(database, "foodatabase.db");
+ }
+
+ private <Property extends MethodProperty<Property>, DatabaseType extends MethodPropertyDatabase<Property>> DatabaseType readDatabase(
+ DatabaseType database, String fileName) {
+ database.read(fileName);
+ return database;
+ }
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test577/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test577/A_in.js
new file mode 100644
index 0000000..736a72d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test577/A_in.js
@@ -0,0 +1 @@
+public Object obj=new Object();public Object obj2=new Object();void foo() {}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test577/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test577/A_out.js
new file mode 100644
index 0000000..cfec79d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test577/A_out.js
@@ -0,0 +1,5 @@
+public Object obj = new Object();
+public Object obj2 = new Object();
+
+void foo() {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test578/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test578/A_in.js
new file mode 100644
index 0000000..379820b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test578/A_in.js
@@ -0,0 +1 @@
+Object obj=new Object();Object obj2=new Object(); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test578/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test578/A_out.js
new file mode 100644
index 0000000..71441bc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test578/A_out.js
@@ -0,0 +1,2 @@
+Object obj = new Object();
+Object obj2 = new Object(); \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test579/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test579/A_in.js
new file mode 100644
index 0000000..89f8d59
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test579/A_in.js
@@ -0,0 +1,12 @@
+public class Foo {
+
+ static class Point {
+ static class Float{
+ float x;
+ float y;
+ }
+ }
+
+ void foo(Point.Float pts[]) {
+ int bar = 0;int jay = 1;for (int i = 0; i < 5;);}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test579/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test579/A_out.js
new file mode 100644
index 0000000..34937eb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test579/A_out.js
@@ -0,0 +1,16 @@
+public class Foo {
+
+ static class Point {
+ static class Float {
+ float x;
+ float y;
+ }
+ }
+
+ void foo(Point.Float pts[]) {
+ int bar = 0;
+ int jay = 1;
+ for (int i = 0; i < 5;)
+ ;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test580/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test580/A_in.js
new file mode 100644
index 0000000..e7fdc32
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test580/A_in.js
@@ -0,0 +1,12 @@
+public class Foo {
+
+ static class Point {
+ static class Float{
+ float x;
+ float y;
+ }
+ }
+
+ void foo(Point.Float[] pts) {
+ int bar = 0;int jay = 1;for (int i = 0; i < 5;);}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test580/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test580/A_out.js
new file mode 100644
index 0000000..85bbfe8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test580/A_out.js
@@ -0,0 +1,16 @@
+public class Foo {
+
+ static class Point {
+ static class Float {
+ float x;
+ float y;
+ }
+ }
+
+ void foo(Point.Float[] pts) {
+ int bar = 0;
+ int jay = 1;
+ for (int i = 0; i < 5;)
+ ;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test581/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test581/A_in.js
new file mode 100644
index 0000000..bdd84c2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test581/A_in.js
@@ -0,0 +1,10 @@
+import java.lang.reflect.Constructor;
+
+public class X {
+ public <T extends X> Constructor<T> ctor() {return null;}
+ static <T extends X> T f1() throws Exception{
+ return new X().<T>ctor().newInstance(new Object[0]);
+ }
+ static <T extends X> T f2() throws Exception {
+ return f1();}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test581/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test581/A_out.js
new file mode 100644
index 0000000..8827978
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test581/A_out.js
@@ -0,0 +1,15 @@
+import java.lang.reflect.Constructor;
+
+public class X {
+ public <T extends X> Constructor<T> ctor() {
+ return null;
+ }
+
+ static <T extends X> T f1() throws Exception {
+ return new X().<T> ctor().newInstance(new Object[0]);
+ }
+
+ static <T extends X> T f2() throws Exception {
+ return f1();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test582/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test582/A_in.js
new file mode 100644
index 0000000..bdd84c2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test582/A_in.js
@@ -0,0 +1,10 @@
+import java.lang.reflect.Constructor;
+
+public class X {
+ public <T extends X> Constructor<T> ctor() {return null;}
+ static <T extends X> T f1() throws Exception{
+ return new X().<T>ctor().newInstance(new Object[0]);
+ }
+ static <T extends X> T f2() throws Exception {
+ return f1();}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test582/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test582/A_out.js
new file mode 100644
index 0000000..ed215c7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test582/A_out.js
@@ -0,0 +1,15 @@
+import java.lang.reflect.Constructor;
+
+public class X {
+ public <T extends X> Constructor<T> ctor() {
+ return null;
+ }
+
+ static <T extends X> T f1() throws Exception {
+ return new X().<T>ctor().newInstance(new Object[0]);
+ }
+
+ static <T extends X> T f2() throws Exception {
+ return f1();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test583/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test583/A_in.js
new file mode 100644
index 0000000..fb4924f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test583/A_in.js
@@ -0,0 +1,7 @@
+package p;
+public class X<T> {
+ public class B {}
+ public static void main (String[] args) {
+ p.X<?>.B[] b = new p.X<?>.B[1];
+ }
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test583/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test583/A_out.js
new file mode 100644
index 0000000..39eb543
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test583/A_out.js
@@ -0,0 +1,10 @@
+package p;
+
+public class X<T> {
+ public class B {
+ }
+
+ public static void main(String[] args) {
+ p.X<?>.B[] b = new p.X<?>.B[1];
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test584/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test584/A_in.js
new file mode 100644
index 0000000..ce818a0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test584/A_in.js
@@ -0,0 +1,8 @@
+public class SomeClass {
+ public void foo() {
+ if ((x.getSomeLongValue == 100)
+|| (x.getSomeOtherValue == 200)) {
+y = 5;
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test584/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test584/A_out.js
new file mode 100644
index 0000000..dfcc902
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test584/A_out.js
@@ -0,0 +1,8 @@
+public class SomeClass {
+ public void foo() {
+ if ((x.getSomeLongValue == 100)
+ || (x.getSomeOtherValue == 200)) {
+ y = 5;
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test585/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test585/A_in.js
new file mode 100644
index 0000000..82789f8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test585/A_in.js
@@ -0,0 +1,9 @@
+public class SomeClass {
+ public void classifySetTwo(final Set<?> objects, final int value, final long
+ other,
+ final int device) {
+ for (final Object element : objects) {
+ System.out.println(element.getClass().getName());
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test585/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test585/A_out.js
new file mode 100644
index 0000000..f1d1bbe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test585/A_out.js
@@ -0,0 +1,8 @@
+public class SomeClass {
+ public void classifySetTwo(final Set<?> objects, final int value,
+ final long other, final int device) {
+ for (final Object element : objects) {
+ System.out.println(element.getClass().getName());
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test586/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test586/A_in.js
new file mode 100644
index 0000000..ce818a0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test586/A_in.js
@@ -0,0 +1,8 @@
+public class SomeClass {
+ public void foo() {
+ if ((x.getSomeLongValue == 100)
+|| (x.getSomeOtherValue == 200)) {
+y = 5;
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test586/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test586/A_out.js
new file mode 100644
index 0000000..dfcc902
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test586/A_out.js
@@ -0,0 +1,8 @@
+public class SomeClass {
+ public void foo() {
+ if ((x.getSomeLongValue == 100)
+ || (x.getSomeOtherValue == 200)) {
+ y = 5;
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test587/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test587/A_in.js
new file mode 100644
index 0000000..82789f8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test587/A_in.js
@@ -0,0 +1,9 @@
+public class SomeClass {
+ public void classifySetTwo(final Set<?> objects, final int value, final long
+ other,
+ final int device) {
+ for (final Object element : objects) {
+ System.out.println(element.getClass().getName());
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test587/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test587/A_out.js
new file mode 100644
index 0000000..f1d1bbe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test587/A_out.js
@@ -0,0 +1,8 @@
+public class SomeClass {
+ public void classifySetTwo(final Set<?> objects, final int value,
+ final long other, final int device) {
+ for (final Object element : objects) {
+ System.out.println(element.getClass().getName());
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test588/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test588/A_in.js
new file mode 100644
index 0000000..e2a4362
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test588/A_in.js
@@ -0,0 +1,6 @@
+public class X {
+ public static void main(String[] args) {
+ if(true) throw new RuntimeException("X");
+ loop: System.out.println("X");
+ }
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test588/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test588/A_out.js
new file mode 100644
index 0000000..ffe4bc3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test588/A_out.js
@@ -0,0 +1,7 @@
+public class X {
+ public static void main(String[] args) {
+ if (true)
+ throw new RuntimeException("X");
+ loop: System.out.println("X");
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test589/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test589/A_in.js
new file mode 100644
index 0000000..8328d73
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test589/A_in.js
@@ -0,0 +1,35 @@
+public class IndentationSwitchCaseBug {
+
+ public static void IBreakIndentation() {
+
+ // Runnable with correct indentation
+ new Runnable() {
+ public void run() {
+ // Do nothing
+ }
+ };
+
+ int i = 5;
+
+ switch (i) {
+
+ case 0:
+ // Indentation works right here
+ break;
+
+ case 1:
+ // Runnable with bugged indentation due to case
+ new Runnable() {
+ public void run() {
+ // Do nothing
+ }
+ };
+ // You can see the indentation gets bugged when a runnable
+ // is used inside a switch-case statemente
+ break;
+ }
+ i = 7;
+ System.out.println(i);
+ }
+}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test589/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test589/A_out.js
new file mode 100644
index 0000000..803a125
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test589/A_out.js
@@ -0,0 +1,34 @@
+public class IndentationSwitchCaseBug {
+
+ public static void IBreakIndentation() {
+
+ // Runnable with correct indentation
+ new Runnable() {
+ public void run() {
+ // Do nothing
+ }
+ };
+
+ int i = 5;
+
+ switch (i) {
+
+ case 0:
+ // Indentation works right here
+ break;
+
+ case 1:
+ // Runnable with bugged indentation due to case
+ new Runnable() {
+ public void run() {
+ // Do nothing
+ }
+ };
+ // You can see the indentation gets bugged when a runnable
+ // is used inside a switch-case statemente
+ break;
+ }
+ i = 7;
+ System.out.println(i);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test590/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test590/A_in.js
new file mode 100644
index 0000000..1f5d7e7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test590/A_in.js
@@ -0,0 +1,33 @@
+public class IndentationSwitchCaseBug {
+
+ public static void IBreakIndentation() {
+ // Runnable with correct indentation
+ new Runnable() {
+ public void run() {
+ // Do nothing
+ }
+ };
+
+ int i = 5;
+
+ switch (i) {
+ case 0:
+ // Indentation works right here
+ break;
+ case 1:
+ // Runnable with bugged indentation due to case
+ new Runnable() {
+ public void run() {
+ // Do nothing
+ }
+ };
+ // You can see the indentation gets bugged when a runnable
+ // is used inside a switch-case statemente
+
+ break;
+ }
+
+ i = 7;
+ System.out.println(i);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test590/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test590/A_out.js
new file mode 100644
index 0000000..a509cd7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test590/A_out.js
@@ -0,0 +1,33 @@
+public class IndentationSwitchCaseBug {
+
+ public static void IBreakIndentation() {
+ // Runnable with correct indentation
+ new Runnable() {
+ public void run() {
+ // Do nothing
+ }
+ };
+
+ int i = 5;
+
+ switch (i) {
+ case 0:
+ // Indentation works right here
+ break;
+ case 1:
+ // Runnable with bugged indentation due to case
+ new Runnable() {
+ public void run() {
+ // Do nothing
+ }
+ };
+ // You can see the indentation gets bugged when a runnable
+ // is used inside a switch-case statemente
+
+ break;
+ }
+
+ i = 7;
+ System.out.println(i);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test591/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test591/A_in.js
new file mode 100644
index 0000000..1f5d7e7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test591/A_in.js
@@ -0,0 +1,33 @@
+public class IndentationSwitchCaseBug {
+
+ public static void IBreakIndentation() {
+ // Runnable with correct indentation
+ new Runnable() {
+ public void run() {
+ // Do nothing
+ }
+ };
+
+ int i = 5;
+
+ switch (i) {
+ case 0:
+ // Indentation works right here
+ break;
+ case 1:
+ // Runnable with bugged indentation due to case
+ new Runnable() {
+ public void run() {
+ // Do nothing
+ }
+ };
+ // You can see the indentation gets bugged when a runnable
+ // is used inside a switch-case statemente
+
+ break;
+ }
+
+ i = 7;
+ System.out.println(i);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test591/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test591/A_out.js
new file mode 100644
index 0000000..73a28a2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test591/A_out.js
@@ -0,0 +1,33 @@
+public class IndentationSwitchCaseBug {
+
+ public static void IBreakIndentation() {
+ // Runnable with correct indentation
+ new Runnable() {
+ public void run() {
+ // Do nothing
+ }
+ };
+
+ int i = 5;
+
+ switch (i) {
+ case 0:
+ // Indentation works right here
+ break;
+ case 1:
+ // Runnable with bugged indentation due to case
+ new Runnable() {
+ public void run() {
+ // Do nothing
+ }
+ };
+ // You can see the indentation gets bugged when a runnable
+ // is used inside a switch-case statemente
+
+ break;
+ }
+
+ i = 7;
+ System.out.println(i);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test592/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test592/A_in.js
new file mode 100644
index 0000000..5fc30c5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test592/A_in.js
@@ -0,0 +1,5 @@
+public class A {
+ void foo(int arg1, int arg2,int arg3,int arg4,int arg5,int arg6, int arg7, int arg8, int arg9 ) {
+ foo(arg1, arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test592/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test592/A_out.js
new file mode 100644
index 0000000..3ffb2e0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test592/A_out.js
@@ -0,0 +1,21 @@
+public class A {
+ void foo ( int arg1,
+ int arg2,
+ int arg3,
+ int arg4,
+ int arg5,
+ int arg6,
+ int arg7,
+ int arg8,
+ int arg9) {
+ foo ( arg1,
+ arg2,
+ arg3,
+ arg4,
+ arg5,
+ arg6,
+ arg7,
+ arg8,
+ arg9);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test593/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test593/A_in.js
new file mode 100644
index 0000000..dbbfd82
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test593/A_in.js
@@ -0,0 +1,3 @@
+public class A {
+ public static final AliasLabelType ALLOWANCE_TAB_COMMAND_DELETE = new AliasLabelType("ALLOWANCE_TAB_COMMAND_DELETE");
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test593/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test593/A_out.js
new file mode 100644
index 0000000..6ee25c2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test593/A_out.js
@@ -0,0 +1,4 @@
+public class A {
+ public static final AliasLabelType ALLOWANCE_TAB_COMMAND_DELETE =
+ new AliasLabelType("ALLOWANCE_TAB_COMMAND_DELETE");
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test594/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test594/A_in.js
new file mode 100644
index 0000000..dbbfd82
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test594/A_in.js
@@ -0,0 +1,3 @@
+public class A {
+ public static final AliasLabelType ALLOWANCE_TAB_COMMAND_DELETE = new AliasLabelType("ALLOWANCE_TAB_COMMAND_DELETE");
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test594/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test594/A_out.js
new file mode 100644
index 0000000..6ee25c2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test594/A_out.js
@@ -0,0 +1,4 @@
+public class A {
+ public static final AliasLabelType ALLOWANCE_TAB_COMMAND_DELETE =
+ new AliasLabelType("ALLOWANCE_TAB_COMMAND_DELETE");
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test595/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test595/A_in.js
new file mode 100644
index 0000000..55de39e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test595/A_in.js
@@ -0,0 +1,6 @@
+public class A {
+ void foo() {
+ AliasLabelType ALLOWANCE_TAB_COMMAND_DELETE;
+ ALLOWANCE_TAB_COMMAND_DELETE = new AliasLabelType("ALLOWANCE_TAB_COMMAND_DELETE");
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test595/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test595/A_out.js
new file mode 100644
index 0000000..d916cfe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test595/A_out.js
@@ -0,0 +1,7 @@
+public class A {
+ void foo() {
+ AliasLabelType ALLOWANCE_TAB_COMMAND_DELETE;
+ ALLOWANCE_TAB_COMMAND_DELETE =
+ new AliasLabelType("ALLOWANCE_TAB_COMMAND_DELETE");
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test596/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test596/A_in.js
new file mode 100644
index 0000000..c6e877b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test596/A_in.js
@@ -0,0 +1,6 @@
+public class A {
+ void foo() {
+ String ALLOWANCE_TAB_COMMAND_DELETE;
+ ALLOWANCE_TAB_COMMAND_DELETE += new AliasLabelType("ALLOWANCE_TAB_COMMAND_DELETE");
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test596/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test596/A_out.js
new file mode 100644
index 0000000..8467656
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test596/A_out.js
@@ -0,0 +1,7 @@
+public class A {
+ void foo() {
+ String ALLOWANCE_TAB_COMMAND_DELETE;
+ ALLOWANCE_TAB_COMMAND_DELETE +=
+ new AliasLabelType("ALLOWANCE_TAB_COMMAND_DELETE");
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test597/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test597/A_in.js
new file mode 100644
index 0000000..abeb929
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test597/A_in.js
@@ -0,0 +1,3 @@
+public class A {
+ MyLongClassName myLongVariable = someOtherLongCode(param1,param2,param3);
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test597/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test597/A_out.js
new file mode 100644
index 0000000..22f1c8b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test597/A_out.js
@@ -0,0 +1,5 @@
+public class A {
+ MyLongClassName myLongVariable = someOtherLongCode(param1,
+ param2,
+ param3);
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test598/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test598/A_in.js
new file mode 100644
index 0000000..abeb929
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test598/A_in.js
@@ -0,0 +1,3 @@
+public class A {
+ MyLongClassName myLongVariable = someOtherLongCode(param1,param2,param3);
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test598/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test598/A_out.js
new file mode 100644
index 0000000..22f1c8b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test598/A_out.js
@@ -0,0 +1,5 @@
+public class A {
+ MyLongClassName myLongVariable = someOtherLongCode(param1,
+ param2,
+ param3);
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test599/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test599/A_in.js
new file mode 100644
index 0000000..abeb929
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test599/A_in.js
@@ -0,0 +1,3 @@
+public class A {
+ MyLongClassName myLongVariable = someOtherLongCode(param1,param2,param3);
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test599/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test599/A_out.js
new file mode 100644
index 0000000..02b7a02
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test599/A_out.js
@@ -0,0 +1,6 @@
+public class A {
+ MyLongClassName myLongVariable = someOtherLongCode(
+ param1,
+ param2,
+ param3);
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test600/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test600/A_in.js
new file mode 100644
index 0000000..d2c5a2f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test600/A_in.js
@@ -0,0 +1,7 @@
+/**
+ *
+ */
+public class A {
+ /* */
+ String s = "" /* toto */; //$NON-NLS-1$
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test600/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test600/A_out.js
new file mode 100644
index 0000000..d2c5a2f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test600/A_out.js
@@ -0,0 +1,7 @@
+/**
+ *
+ */
+public class A {
+ /* */
+ String s = "" /* toto */; //$NON-NLS-1$
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test601/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test601/A_in.js
new file mode 100644
index 0000000..ab7f9ba
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test601/A_in.js
@@ -0,0 +1,11 @@
+/**
+ * Binary expressions
+ */
+class Example extends AnotherClass {
+ int foo() {
+ int sum = 100 + 200 + 300 + 400 + 500 + 600 + 700 + 800;
+ int product = 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10;
+ boolean val = true && false && true && false && true;
+ return product / sum;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test601/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test601/A_out.js
new file mode 100644
index 0000000..46a7272
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test601/A_out.js
@@ -0,0 +1,36 @@
+/**
+ * Binary expressions
+ */
+class Example extends AnotherClass {
+ int foo() {
+ int sum =
+ 100
+ + 200
+ + 300
+ + 400
+ + 500
+ + 600
+ + 700
+ + 800;
+ int product =
+ 1
+ * 2
+ * 3
+ * 4
+ * 5
+ * 6
+ * 7
+ * 8
+ * 9
+ * 10;
+ boolean val =
+ true
+ && false
+ && true
+ && false
+ && true;
+ return
+ product
+ / sum;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test605/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test605/A_in.js
new file mode 100644
index 0000000..15ef46f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test605/A_in.js
@@ -0,0 +1,6 @@
+/**
+ * Constant arguments
+ */
+enum Example {
+ GREEN(0, 255, 0), RED(255, 0, 0)
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test605/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test605/A_out.js
new file mode 100644
index 0000000..dd97fda
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test605/A_out.js
@@ -0,0 +1,7 @@
+/**
+ * Constant arguments
+ */
+enum Example {
+ GREEN(0, 255, 0),
+ RED(255, 0, 0)
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test606/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test606/A_in.js
new file mode 100644
index 0000000..3b80799
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test606/A_in.js
@@ -0,0 +1,17 @@
+public class X {
+ int foo() {
+ return (1);
+ }
+ Object foo2() {
+ return (Object) bar();
+ }
+ StringBuffer bar() {
+ return null;
+ }
+ String foo3() {
+ return "";
+ }
+ int foo4(int i) {
+ return ++i;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test606/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test606/A_out.js
new file mode 100644
index 0000000..e1aed4d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test606/A_out.js
@@ -0,0 +1,21 @@
+public class X {
+ int foo() {
+ return(1);
+ }
+
+ Object foo2() {
+ return (Object) bar();
+ }
+
+ StringBuffer bar() {
+ return null;
+ }
+
+ String foo3() {
+ return "";
+ }
+
+ int foo4(int i) {
+ return ++i;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test607/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test607/A_in.js
new file mode 100644
index 0000000..d9c1bc7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test607/A_in.js
@@ -0,0 +1,70 @@
+package uol.proxy.parser;
+
+import java.nio.ByteBuffer;
+
+import uol.proxy.smtp.SmtpResponse;
+/**
+ * Mensagens SMTP tem o seguinte formato:
+ * <pre>
+ * resposta de uma linha só:
+ * nnn [SP] lalalal [CR] [LF]
+ * resposta de várias linhas:
+ * nnn [-] lalalalal [CR] [LF]
+ * nnn [-] lalalalal [CR] [LF]
+ * ...
+ * nnn [SP] lalalalal [CR] [LF]
+ *
+ *
+ *
+ * */
+public class SmtpServerParser {
+ private static final int DIGITS = 0;
+ private static final int LINE_MODE_CHAR = 1;
+ private static final int SKIP_TO_EOL_AND_FINISH = 2;
+ private static final int SKIP_TO_EOL = 3;
+
+ int state = DIGITS;
+ int code;
+ int pos;
+ boolean wellFormed = true;
+
+
+ public SmtpServerParser() {
+ }
+
+ //formato: xxx lalal
+ public SmtpResponse parse(ByteBuffer buffer) {
+ outer: while (buffer.remaining() > 0) {
+ char c = (char) buffer.get();
+ ++pos;
+ switch (state) {
+ case DIGITS: //get number
+ if(Character.isDigit(c)) {
+ code = code * 10 + (c - '0');
+ } else {
+ wellFormed = false;
+ state = SKIP_TO_EOL_AND_FINISH;
+ }
+ if(pos == 3)
+ state = LINE_MODE_CHAR;
+ break;
+ case LINE_MODE_CHAR:
+ if(c == ' ')
+ state = SKIP_TO_EOL_AND_FINISH;
+ else if(c == ' ')
+ state = SKIP_TO_EOL;
+ else {
+ wellFormed = false;
+ state = SKIP_TO_EOL_AND_FINISH;
+ }
+ break;
+ case SKIP_TO_EOL_AND_FINISH:
+
+
+ break;
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test607/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test607/A_out.js
new file mode 100644
index 0000000..4bb4f4d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test607/A_out.js
@@ -0,0 +1,69 @@
+package uol.proxy.parser;
+
+import java.nio.ByteBuffer;
+
+import uol.proxy.smtp.SmtpResponse;
+
+/**
+ * Mensagens SMTP tem o seguinte formato:
+ * <pre>
+ * resposta de uma linha só:
+ * nnn [SP] lalalal [CR] [LF]
+ * resposta de várias linhas:
+ * nnn [-] lalalalal [CR] [LF]
+ * nnn [-] lalalalal [CR] [LF]
+ * ...
+ * nnn [SP] lalalalal [CR] [LF]
+ *
+ *
+ *
+ * */
+public class SmtpServerParser {
+ private static final int DIGITS = 0;
+ private static final int LINE_MODE_CHAR = 1;
+ private static final int SKIP_TO_EOL_AND_FINISH = 2;
+ private static final int SKIP_TO_EOL = 3;
+
+ int state = DIGITS;
+ int code;
+ int pos;
+ boolean wellFormed = true;
+
+ public SmtpServerParser() {
+ }
+
+ //formato: xxx lalal
+ public SmtpResponse parse(ByteBuffer buffer) {
+ outer: while (buffer.remaining() > 0) {
+ char c = (char) buffer.get();
+ ++pos;
+ switch (state) {
+ case DIGITS: //get number
+ if (Character.isDigit(c)) {
+ code = code * 10 + (c - '0');
+ } else {
+ wellFormed = false;
+ state = SKIP_TO_EOL_AND_FINISH;
+ }
+ if (pos == 3)
+ state = LINE_MODE_CHAR;
+ break;
+ case LINE_MODE_CHAR:
+ if (c == ' ')
+ state = SKIP_TO_EOL_AND_FINISH;
+ else if (c == ' ')
+ state = SKIP_TO_EOL;
+ else {
+ wellFormed = false;
+ state = SKIP_TO_EOL_AND_FINISH;
+ }
+ break;
+ case SKIP_TO_EOL_AND_FINISH:
+
+ break;
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test608/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test608/A_in.js
new file mode 100644
index 0000000..4696256
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test608/A_in.js
@@ -0,0 +1,12 @@
+/**
+ * Mensagens SMTP tem o seguinte formato:
+ * <pre>
+ * resposta de uma linha só:
+ * nnn [SP] lalalal [CR] [LF]
+ * resposta de várias linhas:
+ * nnn [-] lalalalal [CR] [LF]
+ * nnn [-] lalalalal [CR] [LF]
+ * ...
+ * nnn [SP] lalalalal [CR] [LF]
+ * </pre>
+ * */ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test608/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test608/A_out.js
new file mode 100644
index 0000000..d2b668d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test608/A_out.js
@@ -0,0 +1,13 @@
+/**
+ * Mensagens SMTP tem o seguinte formato:
+ *
+ * <pre>
+ * resposta de uma linha só:
+ * nnn [SP] lalalal [CR] [LF]
+ * resposta de várias linhas:
+ * nnn [-] lalalalal [CR] [LF]
+ * nnn [-] lalalalal [CR] [LF]
+ * ...
+ * nnn [SP] lalalalal [CR] [LF]
+ * </pre>
+ */
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test609/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test609/A_in.js
new file mode 100644
index 0000000..268cdcc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test609/A_in.js
@@ -0,0 +1,21 @@
+class A {
+ public void foo() {
+ int i = 0;
+ switch (i) {
+ case 0:
+ // handling 0
+ System.out.println("Case was 0");
+ // fall through
+ case 1:
+ // handling 1.
+ // some additional remark (also handles 0).
+ System.out.println("Case was 0 or 1");
+ break;
+ case 2:
+ // fall through
+ default:
+ // some default action
+ System.out.println("Case was :" + i);
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test609/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test609/A_out.js
new file mode 100644
index 0000000..d527c38
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test609/A_out.js
@@ -0,0 +1,21 @@
+class A {
+ public void foo() {
+ int i = 0;
+ switch (i) {
+ case 0:
+ // handling 0
+ System.out.println("Case was 0");
+ // fall through
+ case 1:
+ // handling 1.
+ // some additional remark (also handles 0).
+ System.out.println("Case was 0 or 1");
+ break;
+ case 2:
+ // fall through
+ default:
+ // some default action
+ System.out.println("Case was :" + i);
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test610/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test610/A_in.js
new file mode 100644
index 0000000..855d493
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test610/A_in.js
@@ -0,0 +1,6 @@
+public class X {
+
+ public void foo() {
+ displayNamelbl.setText(SignalingMessages.getString("AitPropertiesCompositeControlProvider.0")); // Generated //$NON-NLS-1$
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test610/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test610/A_out.js
new file mode 100644
index 0000000..a7b5360
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test610/A_out.js
@@ -0,0 +1,6 @@
+public class X {
+
+ public void foo() {
+ displayNamelbl.setText(SignalingMessages.getString("AitPropertiesCompositeControlProvider.0")); // Generated //$NON-NLS-1$
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test610/formatter.xml b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test610/formatter.xml
new file mode 100644
index 0000000..7efbe43
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test610/formatter.xml
@@ -0,0 +1,246 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<profiles version="8">
+<profile name="mhdk" version="8">
+<setting id="org.eclipse.wst.jsdt.core.formatter.align_type_members_on_columns" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_binary_expression" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_compact_if" value="52"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_conditional_expression" value="48"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_enum_constants" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_multiple_fields" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="64"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_after_imports" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_after_package" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_field" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_imports" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_member_type" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_method" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_new_chunk" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_package" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_between_type_declarations" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_block" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.comment.clear_blank_lines" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.comment.format_comments" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.comment.format_header" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.comment.format_html" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.comment.format_source_code" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.comment.indent_parameter_description" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.comment.indent_root_tags" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.comment.insert_new_line_for_parameter" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.comment.line_length" value="80"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.compact_else_if" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation" value="2"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_statements_compare_to_block" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_statements_compare_to_body" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indentation.size" value="4"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_after_annotation" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_case" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_default" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.lineSplit" value="140"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.put_empty_statement_on_new_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.tabulation.char" value="tab"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.tabulation.size" value="4"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
+</profile>
+</profiles> \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test612/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test612/A_in.js
new file mode 100644
index 0000000..f78dd2e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test612/A_in.js
@@ -0,0 +1,13 @@
+package test612;
+
+@interface Annot {
+ String value() default "";
+}
+@interface Annot2 {
+}
+public class A {
+ A() {
+ }
+}
+class B {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test612/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test612/A_out.js
new file mode 100644
index 0000000..ce7ffcb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test612/A_out.js
@@ -0,0 +1,15 @@
+package test612;
+
+@interface Annot {
+String value() default "";
+}
+
+@interface Annot2 {}
+
+public class A {
+ A() {
+ }
+}
+
+class B {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test613/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test613/A_in.js
new file mode 100644
index 0000000..f78dd2e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test613/A_in.js
@@ -0,0 +1,13 @@
+package test612;
+
+@interface Annot {
+ String value() default "";
+}
+@interface Annot2 {
+}
+public class A {
+ A() {
+ }
+}
+class B {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test613/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test613/A_out.js
new file mode 100644
index 0000000..6379586
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test613/A_out.js
@@ -0,0 +1,15 @@
+package test612;
+
+@interface Annot {
+ String value() default "";
+}
+
+@interface Annot2 {
+}
+
+public class A {
+A() {
+}
+}
+
+class B {}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test614/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test614/A_in.js
new file mode 100644
index 0000000..f177b05
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test614/A_in.js
@@ -0,0 +1,5 @@
+public class A {
+ void m() {
+ bug()
+ } //end of last method
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test614/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test614/A_out.js
new file mode 100644
index 0000000..f35891b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test614/A_out.js
@@ -0,0 +1,5 @@
+public class A {
+ void m() {
+ bug()
+ } //end of last method
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test615/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test615/A_in.js
new file mode 100644
index 0000000..55e8ca3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test615/A_in.js
@@ -0,0 +1,13 @@
+public class A {
+ void m() {
+ bug()
+ } //end of last method
+
+ /**
+ * javadoc
+ * @param s
+ */
+ void foo(String s) {
+ System.out.println();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test615/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test615/A_out.js
new file mode 100644
index 0000000..7188f96
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test615/A_out.js
@@ -0,0 +1,13 @@
+public class A {
+ void m() {
+ bug()
+ } //end of last method
+
+ /**
+ * javadoc
+ * @param s
+ */
+ void foo(String s) {
+ System.out.println();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test616/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test616/A_in.js
new file mode 100644
index 0000000..0bfb5f1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test616/A_in.js
@@ -0,0 +1,15 @@
+public class A {
+ /**
+ * javadoc
+ * @param s
+ */
+ void foo(String s) {
+ System.out.println();
+ }
+ void m() {
+ bug()
+ } //end of last method
+ void bar(String s) {
+ System.out.println();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test616/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test616/A_out.js
new file mode 100644
index 0000000..05eba24
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test616/A_out.js
@@ -0,0 +1,17 @@
+public class A {
+ /**
+ * javadoc
+ * @param s
+ */
+ void foo(String s) {
+ System.out.println();
+ }
+
+ void m() {
+ bug()
+ } //end of last method
+
+ void bar(String s) {
+ System.out.println();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test617/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test617/A_in.js
new file mode 100644
index 0000000..4e2a296
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test617/A_in.js
@@ -0,0 +1,5 @@
+String sqlQuery = " update load_element_details set " +
+ " LOAD_STATUS = ?, " +
+ " start_ts = ? " +
+ " where load_id = ? " +
+ " and elem_xml_name = ? ";
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test617/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test617/A_out.js
new file mode 100644
index 0000000..a18f459
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test617/A_out.js
@@ -0,0 +1,5 @@
+String sqlQuery = " update load_element_details set "
+ + " LOAD_STATUS = ?, "
+ + " start_ts = ? "
+ + " where load_id = ? "
+ + " and elem_xml_name = ? "; \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test617/formatter.xml b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test617/formatter.xml
new file mode 100644
index 0000000..e6bc303
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test617/formatter.xml
@@ -0,0 +1,246 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<profiles version="8">
+<profile name="JRK" version="8">
+<setting id="org.eclipse.wst.jsdt.core.formatter.align_type_members_on_columns" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_binary_expression" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_compact_if" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_conditional_expression" value="80"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_enum_constants" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_multiple_fields" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_after_imports" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_after_package" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_field" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_imports" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_member_type" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_method" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_package" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_block" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.comment.clear_blank_lines" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.comment.format_comments" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.comment.format_header" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.comment.format_html" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.comment.format_source_code" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.comment.indent_parameter_description" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.comment.indent_root_tags" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.comment.line_length" value="800"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.compact_else_if" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation" value="2"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_statements_compare_to_block" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_statements_compare_to_body" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_switch" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indentation.size" value="3"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_after_annotation" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.lineSplit" value="800"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.tabulation.char" value="space"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.tabulation.size" value="3"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
+</profile>
+</profiles> \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test618/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test618/A_in.js
new file mode 100644
index 0000000..4d4c7c7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test618/A_in.js
@@ -0,0 +1,9 @@
+public class X {
+public static void run(String args[]) {
+ Runnable a = new Runnable() {
+ public void run() {
+ // The following line is a problem
+ }};
+ int b = 42;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test618/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test618/A_out.js
new file mode 100644
index 0000000..461f331
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test618/A_out.js
@@ -0,0 +1,10 @@
+public class X {
+ public static void run(String args[]) {
+ Runnable a = new Runnable() {
+ public void run() {
+ // The following line is a problem
+ }
+ };
+ int b = 42;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test619/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test619/A_in.js
new file mode 100644
index 0000000..bb04cd6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test619/A_in.js
@@ -0,0 +1,7 @@
+public static void run(String args[]) {
+ Runnable a = new Runnable() {
+ public void run() {
+ // The following line is a problem
+ }};
+ int b = 42;
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test619/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test619/A_out.js
new file mode 100644
index 0000000..277eb72
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test619/A_out.js
@@ -0,0 +1,8 @@
+public static void run(String args[]) {
+ Runnable a = new Runnable() {
+ public void run() {
+ // The following line is a problem
+ }
+ };
+ int b = 42;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test620/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test620/A_in.js
new file mode 100644
index 0000000..450d6aa
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test620/A_in.js
@@ -0,0 +1,8 @@
+public class Test {
+ public static <T> void service() {
+ }
+
+ public static void main( String[] args) {
+ Test.<String>service();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test620/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test620/A_out.js
new file mode 100644
index 0000000..189233a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test620/A_out.js
@@ -0,0 +1,8 @@
+public class Test {
+ public static <T> void service() {
+ }
+
+ public static void main(String[] args) {
+ Test.<String>service();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test621/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test621/A_in.js
new file mode 100644
index 0000000..54d6e7e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test621/A_in.js
@@ -0,0 +1,17 @@
+public class Test {
+
+ public static <T> void service() {}
+
+ public static void main(String[] args) {
+ Test.<String>service(); //XXX <<<<
+ Test t = new Test();
+ t.<String>service2(); //XXX <<<<
+ new Test().<String>service2(); //XXX <<<<
+ }
+
+ public <T> void service3() { }
+
+ public <T> void service2() {
+ this.<T>service3(); //XXX <<<<
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test621/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test621/A_out.js
new file mode 100644
index 0000000..76259a9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test621/A_out.js
@@ -0,0 +1,19 @@
+public class Test {
+
+ public static <T> void service() {
+ }
+
+ public static void main(String[] args) {
+ Test.<String>service(); //XXX <<<<
+ Test t = new Test();
+ t.<String>service2(); //XXX <<<<
+ new Test().<String>service2(); //XXX <<<<
+ }
+
+ public <T> void service3() {
+ }
+
+ public <T> void service2() {
+ this.<T>service3(); //XXX <<<<
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test622/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test622/A_in.js
new file mode 100644
index 0000000..4f8f0f4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test622/A_in.js
@@ -0,0 +1,5 @@
+class X
+{
+Object
+classes = new Class<?>[] {};
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test622/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test622/A_out.js
new file mode 100644
index 0000000..3062f41
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test622/A_out.js
@@ -0,0 +1,3 @@
+class X {
+ Object classes = new Class<?>[] {};
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test623/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test623/A_in.js
new file mode 100644
index 0000000..b472d94
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test623/A_in.js
@@ -0,0 +1,5 @@
+class X
+{
+Object
+classes = new Class<?>[0];
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test623/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test623/A_out.js
new file mode 100644
index 0000000..eb15532
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test623/A_out.js
@@ -0,0 +1,3 @@
+class X {
+ Object classes = new Class<?>[0];
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test624/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test624/A_in.js
new file mode 100644
index 0000000..73d95a7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test624/A_in.js
@@ -0,0 +1,5 @@
+class X
+{
+Object
+classes = new Class<?>[][0];
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test624/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test624/A_out.js
new file mode 100644
index 0000000..a470f5a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test624/A_out.js
@@ -0,0 +1,3 @@
+class X {
+ Object classes = new Class<?>[][0];
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test625/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test625/A_in.js
new file mode 100644
index 0000000..75f2655
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test625/A_in.js
@@ -0,0 +1,6 @@
+public class X {
+ void foo(String a, String b, String c, String d, String e) {
+ String s =
+""+a+"1481040350234786852"+a+"4221089161101009540"+a+"-6170427739377068715"+a+"-1177132190659449391"+a+"4131074700002200800"+a+"6677964992006511358"+a+"2306558609804623499"+a+"4948023180683471330"+a+"-2100145421766851358"+a+"-3001840236323503671"+a+"-3489306742320139361"+a+"3121650335531224184"+a+"-4358571516300782510"+a+"1556752567442603373"+a+"-6962032360535946947"+a+"-5868276881678120598"+a+"4184984287312247424"+a+"-6721997605202472396"+a+"6617636037855015285"+a+"7266783356079704728"+a+"-8754237933673085347"+a+"-5817839502530750802"+a+"1583847687494714427"+a+"8951519125923785825"+a+"-3432930123357231360"+a+"-5451954362874316754"+a+"-33060006164703257"+a+"-7231434859633259989"+a+"608146062873988130"+a+"-5011488686871015606"+a+"9139797121591847350"+a+"-1886181867981415714"+a+"8841800972511057570"+a+"-4383413442757032866"+a+"8361387373543642695"+a+"-2639476650066862743"+a+"-2849702699413546749"+a+"1277733543017481226"+a+"-8031505870898978274"+a+"3666898192956052796"+a+"-7039203610026055703"+a+"-4819565592688393296"+a+"3501929543225217572"+a+"-52690043125786931"+a+"-241495509142914400"+a+"809240826052859383"+a+"6800981487534314533"+a+"-6524324695224261613"+a+"-3147335742845363307"+a+"-7905248515165548725"+a+"-8857719419158251696"+a+"3770652464690190606"+a+"-1373399701638993702"+a+"183252801833892442"+a+"-2177955360518900549"+a+"-6160006701784504259"+a+"4975115447927973030"+a+"-4048044119354860392"+a+"-1206947692733954083"+a+"-7546675664265042138"+a+"4602271912901891539"+a+"7473173362172414652"+a+"-2246791729943980270"+a+"5531429909557226193"+a+"9195798735326951519"+a+"-7045483396415238847"+a+"-4617871455255630821"+a+"-8404894183972146099"+a+"7953598172877176299"+a+"-4591952086688426778"+a+"-1793987074707489637"+a+"2792037511578283306"+a+"-3232503736907637185"+a+"-2854401600067174610"+a+"7250590952512651931"+a+"-6408953690487983106"+a+"6019268937581606852"+a+"5145016224651586273"+a+"5021772288190407942"+a+"5855473695186221281"+a+"7943605958236028936"+a+"8078550154530610313"+a+"-1501079708541374418"+a+"6016115716904921584"+a+"5563211195567408190"+a+"1881040805637616374"+a+"5715702334303460933"+a+"801733894157086669"+a+"-3883590202690143813"+a+"-4234177843042587717"+a+"-7799657549332828187"+a+"8916671952396843549"+a+"2499753011961486970"+a+"2055336783165487022"+a+"5030113625695917193"+a+"1677218655183543305"+a+"2735563907130567065"+a+"1466095306597867372"+a+"-8727329011390864623"+a+"-1657516366396933954"+a+"1607374426341641178"+a+"381434977513699282"+a+"-5934861424042302910"+a+"1021231529862004717"+a+"1731055950998634531"+a+"4758233516485895813"+a+"281446737818329412"+a+"2916827720194406987"+a+"-4113172032847483906"+a+"4322747256400475755"+a+"-231687239923818462"+a+"2273547761800209938"+a+"8708414041987305498"+a+"5172351889376721968"+a+"-7109740500688484275"+a+"1747355987716301695"+a+"-4148205799751382840"+a+"8621843109299178178"+a+"-2758866116022225638"+a+"107986368467906898"+a+"3331225483452456574"+a+"-3503271926995929130"+a+"6327215864271752255"+a+"8633503676753918289"+a+"737738740279256664"+a+"5359749581609185377"+a+"6887986159860721242"+a+"709533211623369924"+a+"-7319039509776682350"+a+"-3893683866865853153"+a+"-4554118729276913814"+a+"1842089193842209018"+a+"-7306235956629056753"+a+"506064168863913743"+a+"2068229051978835796"+a+"-5843192101805646909"+a+"-5406539933102955051"+a+"1122403234845453300"+a+"5907913918924720735"+a+"-7923005704484651019"+a+"2740447218889389967"+a+"-5914387748691021098"+a+"-4606301648811218504"+a+"-1402461674467800600"+a+"1284294194480673802"+a+"6079052293509738623"+a+"-5305558616682058769"+a+"-9075078034265068551"+a+"6740435740643124920"+a+"-3620468974957409281"+a+"-6103977201243493000"+a+"5368487237343320842"+a+"6633626677208845104"+a+"22731020784882473"+a+"-4176021822967539412"+a+"-2840947198397506816"+a+"4536069560910605740"+a+"-8830348710729920749"+a+"-2484808592722030395"+a+"-9135645213656835260"+a+"645468150627326857"+a+"-5289577660716570470"+a+"5600795185832650085"+a+"-6233102104916270269"+a+"-5616058648703769654"+a+"1454407521439030492"+a+"-1388436161134796784"+a+"-448829651581235474"+a+"5228581645372843926"+a+"-7390755550853889605"+a+"-652993831235872211"+a+"8520564877188209467"+a+"2149850520389958326"+a+"-6598921222840378783"+a+"155434286759749129"+a+"-6463276537914228062"+a+"8697061974073234456"+a+"-7520264323459351625"+a+"-1878767623989246124"+a+"371434180225132960"+a+"-2702100704900116914"+a+"4546891744423706860"+a+"1072969202997083041"+a+"-1174246552945796297"+a+"-6958310238776559600"+a+"5809436737640419316"+a+"-2142071912190438678"+a+"2645715594693023084"+a+"-6512232937988344651"+a+"1429487728719130118"+a+"-5927254500284655605"+a+"-5358597567566518840"+a+"-5619570179618968386"+a+"6634856841420071965"+a+"2248249447063079234"+a+"-601650796422949416"+a+"9016586536771112524"+a+"-8990134722571734151"+a+"7442057801788219574"+a+"-7069696912435026002"+a+"-5965822922725810779"+a+"156012994370918939"+a+"-533334545036251923"+a+"-6428163249820294563"+a+"-8771354710879578701"+a+"-7474607303623235764"+a+"5552920467743308115"+a+"3463850839073631872"+a+"-4312138652056332156"+a+"-5668951482761994218"+a+"4160357046780118714"+a+"-7651487471925116236"+a+"-1904737379948122165"+a+"-2468995372736695351"+a+"2384954334609806293"+a+"8835010373198815257"+a+"3072665879620869470"+a+"-4708484196263690120"+a+"-4417768926177692229"+a+"8631330465661935317"+a+"-6005069660084716618"+a+"-4841849265321973894"+a+"9114271054544617578"+a+"4474715891292785297"+a+"4598426000596856434"+a+"4456642120330654185"+a+"-6811568388529193150"+a+"-2267510729992483078"+a+"4841297221909766868"+a+"-3341202061707655898"+a+"-5168523749277303418"+a+"-2597086147703835583"+a+"2189984040194367554"+a+"-163417043572594861"+a+"-875917009738735905"+a+"3449040927530609564"+a+"-1187542268316866362"+a+"-2086526303156399145"+a+"7170110557699721176"+a+"-8831808421158147134"+a+"-2934245923885012593"+a+"-693181876282269730"+a+"2801286762013136483"+a+"-893681230793990797"+a+"7244823961262144366"+a+"7661464547005099735"+a+"-4504020848703526318"+a+"7488365098065319918"+a+"-2617611221309623462"+a+"-5347117576177944844"+a+"7577407951576481247"+a+"2119607573247061369"+a+"8742365859276522220"+a+"-2878190955845298771"+a+"9170894970442468900"+a+"-3198099095730567203"+a+"6600662185925388516"+a+"-7481833413594991555"+a+"7259883778198475684"+a+"-6228247879160851225"+a+"8054150403399233954"+a+"220291732862417955"+a+"9170008991903320769"+a+"-7386177775713107223"+a+"-7067143718707886163"+a+"-2829159460833567837"+a+"-7650573416145777597"+a+"-7827174279991915210"+a+"8015033616728249392"+a+"7953520474367629891"+a+"-6763631084009130537"+a+"2134465028909734057"+a+"-7582421904070398088"+a+"-4021434106474594994"+a+"-3241797462076497267"+a+"3790367970897076255"+a+"1731158696763449719"+a+"6009130197176253524"+a+"-4330099148179311782"+a+"-2681893572588916488"+a+"4717529785599537732"+a+"-5355393305350863448"+a+"-2562931193903110252"+a+"7825500412654385050"+a+"6123135506603100825"+a+"-7135991812968836383"+a+"7075040822983804281"+a+"6085292636084411374"+a+"-9016517018808310700"+a+"6296680626540498265"+a+"466471971943076520"+a+"3194706547855404513"+a+"-3469234296613008650"+a+"4661562681731629745"+a+"-6869862919399727963"+a+"-5470269392986725915"+a+"-7408510499818361817"+a+"-4634700534304790197"+a+"6141253999365640538"+a+"4914795942574316909"+a+"-5923510425951684560"+a+"-6686698052467837745"+a+"-6860754215509481583"+a+"-8161199778461002892"+a+"6790420767590453887"+a+"3160962446495709863"+a+"-7086844264601577605"+a+"-8019277360711651081"+a+"8694094250492531239"+a+"-822512736791075198"+a+"7037467247885361964"+a+"-8068773511219242634"+a+"-2221622380638547363"+a+"4141721356317507284"+a+"-9120482348318183652"+a+"-2094945145080548489"+a+"6509511066194612988"+a+"-5631846957641451179"+a+"-7124789435189368153"+a+"530620392849491203"+a+"2063084158833109250"+a+"5705014193930379134"+a+"6523714474084616334"+a+"4744000852602101799"+a+"1085239330415640337"+a+"-5155417748224605425"+a+"6270555189236303732"+a+"-7737271311797543051"+a+"-3574839633885944337"+a+"5058890598150144652"+a+"7746403854998588002"+a+"7022856657575309952"+a+"3716738500463555846"+a+"-7421401014154125893"+a+"1421729999303688516"+a+"8144520783350364771"+a+"-5375150715246560540"+a+"-6811495605014783449"+a+"-1629085212768444054"+a+"7842872870387873339"+a+"-3144069724554953284"+a+"1578489136450795424"+a+"-1524962835898716664"+a+"1255628362210394024"+a+"-4945766756743361564"+a+"-2368749883429063495"+a+"-5443141608452157258"+a+"9211129063819614033"+a+"7114918026427046997"+a+"-348788006629170359"+a+"-1510339221551201808"+a+"2225031253386166621"+a+"-3555530065681793234"+a+"-5635090599347843861"+a+"-3131108975972138601"+a+"7906458026818974202"+a+"8426579347837902385"+a+"-4881890627049232515"+a+"-8916821826259001490"+a+"185948291026094553"+a+"8201360044857003333"+a+"3340205317187459493"+a+"1019013224452838302"+a+"-5640595948335979856"+a+"-707071934361179406"+a+"-8857596830200344761"+a+"-1375091965299661006"+a+"-9072009683459314761"+a+"5000988210264232168"+a+"4271317853521960464"+a+"2678753875442511004"+a+"-6470626338166122964"+a+"-6078726263448693640"+a+"-6126660456097596945"+a+"-5224548713170778066"+a+"2951275643838239183"+a+"1249793927341201177"+a+"-3560869420720178794"+a+"-6737236972610500446"+a+"6906382391763753318"+a+"3701285808445941477"+a+"-6137404772056077571"+a+"951068276649955219"+a+"8972614952190332730"+a+"1350001466189426457"+a+"-4081913571588491296"+a+"3537255041914161665"+a+"-3922351533529732712"+a+"-2145964578134968167"+a+"2394200010169686588"+a+"4820435476375140561"+a+"3980439875552079698"+a+"-7848606640652240279"+a+"8056889380412121302"+a+"-1735987219969504949"+a+"-2429262127212559301"+a+"2716470408164555317"+a+"7619986510078673844"+a+"-4810946803905692262"+a+"591257503510807983"+a+"1008145613734886602"+a+"-791769094042351455"+a+"1551415766926632272"+a+"2128049662514755336"+a+"5674375202248066714"+a+"-3294574351697152083"+a+"6409892386317067743"+a+"-7779995689030042070"+a+"7663455663253941309"+a+"6994870508259434411"+a+"7092158122453603104"+a+"-7504376776657473544"+a+"-1548660132363324694"+a+"-8111792772550137166"+a+"-3716421601494476848"+a+"-5471408931853636388"+a+"858470282848534786"+a+"-1944492615617314147"+a+"6842258904020299278"+a+"3465357212653391171"+a+"1010858684300746374"+a+"-2376621027797858933"+a+"-5234350247437932577"+a+"3527455355230723615"+a+"-4441639340996737636"+a+"9162770176271747679"+a+"-3307692074822023253"+a+"-1265560468988039837"+a+"4174084901504664334"+a+"408216311741101376"+a+"6179424481850599613"+a+"8464529436195546763"+a+"-2679225514021083446"+a+"5412693249303878683"+a+"6761016599191336902"+a+"-9053227710679826671"+a+"-4971616606140021661"+a+"1470984573745249052"+a+"794919692872301402"+a+"-666467506414374151"+a+"-2822698483079789682"+a+"601378322432915769"+a+"5638644728798047345"+a+"5789378409007337798"+a+"-5994164160329416538"+a+"-6667535132090352473"+a+"4204563008748740328"+a+"5678902566930339970"+a+"-7223445616360784599"+a+"-6607953497851883678"+a+"-6311838047415961090"+a+"-6309447620271201478"+a+"229050938505420857"+a+"-1225014043780951126"+a+"2390215148115329239"+a+"5072184776177919104"+a+"-744335414291888356"+a+"-3089609556691187584"+a+"-3618865863102092548"+a+"192388795641361512"+a+"4587735395282822589"+a+"217485062671670830"+a+"-6269736618400789287"+a+"5414980239431986315"+a+"-528064624972663000"+a+"1295964769301191356"+a+"5298404442990088254"+a+"6791548406998914183"+a+"-5186505763910713839"+a+"-2064823676363944325"+a+"7298397795617553631"+a+"1092691793025769084"+a+"9199008286310061390"+a+"8496944026982897790"+a+"-7175699054101917484"+a+"2351940215168480144"+a+"-7887520388437077927"+a+"-2547766195274466532"+a+"3651088260374341913"+a+"5677078378225324141"+a+"-5218271904647533617"+a+"6506102331379269744"+a+"2047580395586681359"+a+"1254456669244453310"+a+"-2493503447457657357"+a+"7748743143809150681"+a+"3187580147546249210"+a+"-447565130764562251"+a+"-5901868264771610836"+a+"-5344772102755168902"+a+"4399354202412978048"+a+"5761746177647931272"+a+"7346021349430542978"+a+"7407653297412847803"+a+"-1432082633278910928"+a+"4386781250096772591"+a+"3078677237004686885"+a+"-8270569093055494458"+a+"-3066819790639523079"+a+"6921413523262053800"+a+"3815857059671909350"+a+"6459842709565553675"+a+"5496182702002478767"+a+"2919041266384629492"+a+"6301254303467952572"+a+"167977270899707836"+a+"4107450151680801929"+a+"-6184483674271871721"+a+"-3113466523343527359"+a+"4255706773140144210"+a+"2045276824006752933"+a+"-1006056944868633893"+a+"-163374204176050893"+a+"-3536312633372723194"+a+"4030026566945749635"+a+"916143771948351245"+a+"-4137939988132726797"+a+"-1208503070443601575"+a+"-9073410561248509562"+a+"879225941445259519"+a+"6704588155652656649"+a+"4037880612097133452"+a+"6650953345091703159"+a+"6557621267180188933"+a+"-3799489167477556834"+a+"4616142957114179369"+a+"-555511666653343487"+a+"-7787414996794187528"+a+"-2320895672018981888"+a+"-4115116336922975624"+a+"-508083592730508234"+a+"-1790339700600684362"+a+"-1891368734208039390"+a+"4162487874602061322"+a+"2507934636732405000"+a+"-3569041016842825057"+a+"3727230352401811737"+a+"6081104416614609202"+a+"-2378349176311649327"+a+"8338625078774305818"+a+"4236364192447051424"+a+"1766223847372056199"+a+"-1509108249653323828"+a+"-5341684167359652338"+a+"-8444676169083518571"+a+"3761876718263359588"+a+"-3523680927151552615"+a+"3042749665226854761"+a+"3749113535163919993"+a+"3759366097795773800"+a+"-7270464562060963395"+a+"-3404645697486842979"+a+"684912297827615732"+a+"-8328573509093542665"+a+"-329547391816168161"+a+"8320915285235489566"+a+"-8439264109714576560"+a+"-7555539153012708426"+a+"-1455904067809789555"+a+"-3282840298752750619"+a+"-6372126815260401415"+a+"2793000487951069203"+a+"3407829716811135029"+a+"-3550687721123470352"+a+"2334961244010951939"+a+"3260897395698896570"+a+"4264152409350870060"+a+"-4581604198263834689"+a+"593651731243654052"+a+"5219278619370393377"+a+"8180789381611215595"+a+"335944578956738265"+a+"-4099322903435145803"+a+"-5208733150508251139"+a+"6921838573247464652"+a+"-7343860276513066939"+a+"1074796594127796533"+a+"6736037593502794699"+a+"3930958507434110353"+a+"5997417370432515857"+a+"7187262605211107782"+a+"-922608839179471544"+a+"-3471824513017619234"+a+"-4620638843369421105"+a+"3839702874104484142"+a+"-8879066745942443015"+a+"8583264167167467194"+a+"8017617442295035923"+a+"720409418337220568"+a+"-7137080051336955740"+a+"820362479923112978"+a+"-7587987020499938058"+a+"-1736856639032582832"+a+"5300485442178576853"+a+"4669115833793700662"+a+"8717027790748151190"+a+"-418059405227441973"+a+"4902234911110449242"+a+"-8615106177201876902"+a+"2642338947881553044"+a+"7939176766883596700"+a+"1697016693253389256"+a+"-7698790186559863273"+a+"4627520723163497364"+a+"-6562331579564087360"+a+"1409651656149384948"+a+"-8371366983499774489"+a+"-6611959236955224128"+a+"2517362013853074515"+a+"3939673655674821754"+a+"-6007531133325330260"+a+"8479159933661814342"+a+"1845989680250192409"+a+"225054535985556281"+a+"-6188100461697042647"+a+"5374211210369521877"+a+"163959847081807350"+a+"6580469580461298388"+a+"-1002731784954961273"+a+"-6503468674254937564"+a+"-8857927768785141898"+a+"1886814526626193459"+a+"-2054416122836792110"+a+"-4730857486151345556"+a+"-3314785731153835706"+a+"1745408277008263680"+a+"5485482250833588602"+a+"1901945721551946729"+a+"-6559784953015731783"+a+"-5502687098156415701"+a+"-8096097547161354797"+a+"-307294365139042468"+a+"7597534968367450948"+a+"-4693142428350838425"+a+"-8569821400048670315"+a+"51756053461047436"+a+"6145399184482338050"+a+"-1269825730684672598"+a+"-8136004504129724580"+a+"-6708170860115238208"+a+"-2467746284360258768"+a+"8902235073100629169"+a+"189609796856280361"+a+"8027665317964735814"+a+"-7153504149551054926"+a+"-5187209899599232647"+a+"8540839755479381215"+a+"-1319086816580691984"+a+"-7516852006138817907"+a+"-5051221376794367033"+a+"-3579739334939429689"+a+"3098919600942247826"+a+"-2519365444798061973"+a+"2204513501049642145"+a+"-6234925272255791092"+a+"-3914224114071635323"+a+"-7512919820331381478"+a+"2244229534103919315"+a+"1119622915521220416"+a+"4973425882801212711"+a+"888294988592812045"+a+"-2993218281966203028"+a+"-7416276224986099499"+a+"-3201845045715304871"+a+"7916061662832482521"+a+"-6429005121216132546"+a+"4638130389145698725"+a+"-948986391460678656"+a+"2040599255252723129"+a+"2389151452553418337"+a+"-7194285399888931477"+a+"3523430492558376836"+a+"-6231585169594436085"+a+"-5841617642246119760"+a+"-8785142203731382456"+a+"4139787392364890707"+a+"-824771567737812271"+a+"-9049356826976837046"+a+"1543457604506053183"+a+"-8855709180263493025"+a+"-4086029732019652815"+a+"90590069959604498"+a+"7374902126537519544"+a+"5412393938850166428"+a+"-6589069323077828363"+a+"-1136016124815333328"+a+"-2530288730062427647"+a+"9141260983043855235"+a+"-2243560951402688244"+a+"2697023448685250190"+a+"8223867111341762760"+a+"-5500453568140873838"+a+"-5551678114273627129"+a+"7711796121740538204"+a+"2416459930837400994"+a+"-4986134594990721078"+a+"-6594545860032484707"+a+"-8488892579407720307"+a+"-4950191686469776760"+a+"-5705045902392669136"+a+"-5870378255948101081"+a+"3085694771349171032"+a+"4045381385104452693"+a+"-537473159150314420"+a+"6405721852917755173"+a+"5909632865333497015"+a+"3023990489803862857"+a+"5997722854481417133"+a+"7368862447064249271"+a+"-3558359757113329685"+a+"886745892017187721"+a+"-2376768597770873246"+a+"-956660966571699164"+a+"-3438286909229699850"+a+"465585013972219292"+a+"4997419886346194306"+a+"7874632479463897943"+a+"4230767999778323743"+a+"2933416313595490031"+a+"-3661566128442997850"+a+"-9204100771314909860"+a+"297875109783269234"+a+"5554793942304582226"+a+"6138216312792961386"+a+"-3472526723345394200"+a+"1383344105427170622"+a+"-8390998045425633158"+a+"8361230649785801199"+a+"8128422357710829775"+a+"-7076636178968793451"+a+"-6879189373271244675"+a+"2149279496697403228"+a+"2163874995004306059"+a+"-37608952743346481"+a+"-4885142876404553640"+a+"3957092134099679064"+a+"8957662328709322940"+a+"6596532226374168839"+a+"-1153804182586454676"+a+"7915386076772517778"+a+"3597944315336510115"+a+"2586844712538139804"+a+"-2949556178161873667"+a+"-8127379747417804230"+a+"3506009531395375525"+a+"-3799767679885215310"+a+"2737451203785104562"+a+"5151555140583328389"+a+"6131176129975873998"+a+"9110902753217664431"+a+"-8890925772445109480"+a+"-1129142490829084372"+a+"7582080677413993035"+a+"-4789780502432213058"+a+"8426741383105462303"+a+"-7514443426873435923"+a+"-6096386960435665425"+a+"1403493976840512847"+a+"1200644717268219291"+a+"-1654479055663475959"+a+"3892352692045151151"+a+"-628374969525061995"+a+"1611638561673781188"+a+"75698269457877956"+a+"560196518908944166"+a+"1704180641177725702"+a+"1645123699159403958"+a+"9158917099811213033"+a+"-633837023015943918"+a+"-1216327101793702433"+a+"-7939715734589699598"+a+"6289958106814327876"+a+"-8084522417454129195"+a+"-8951157286790813026"+a+"8733634768783483612"+a+"164169779436237861"+a+"-5613076795169777676"+a+"-6691306822112669306"+a+"-2267089117411867845"+a+"-6267882092027247645"+a+"-3218696406030596964"+a+"-4620987111405818850"+a+"-7623635815148905797"+a+"-3199414663287922089"+a+"-1971270715359367144"+a+"-3146133425464229454"+a+"203048746228635246"+a+"-869382991009092515"+a+"4396580273807758428"+a+"5924374890894969809"+a+"-962029163140355769"+a+"-2447328698446720681"+a+"6648306985125948285"+a+"3792332857906789069"+a+"-2592849401678093154"+a+"-2229214953895616599"+a+"60121393842835511"+a+"-4644566344032056770"+a+"-3670852882719285073"+a+"-4795459485337427650"+a+"-3078872474700468634"+a+"6082446142445692287"+a+"7661890440999892250"+a+"2718377609076393985"+a+"-1329549452134874227"+a+"667147203567492144"+a+"5699077439330337124"+a+"-3395250238968386971"+a+"7468957273606729554"+a+"6681693604205340338"+a+"-5819455968905345675"+a+"7377517611865477086"+a+"-4171662381900114945"+a+"8558322651462810286"+a+"5927326833461217817"+a+"-5391460157352293018"+a+"456166417270507267"+a+"-2089775772693106802"+a+"-2473806311188227713"+a+"-5166358583590604295"+a+"577211619565310319"+a+"-7574180351348641021"+a+"-1384162338784655427"+a+"-1949917261552336103"+a+"-7646197583621832582"+a+"7157828596321324413"+a+"-6712065070950544567"+a+"2236061909679704394"+a+"4873628242313201150"+a+"-6464311572388006218"+a+"4304099916847392129"+a+"8848098664611212439"+a+"6898172476461689080"+a+"3345247779380902440"+a+"-6997871520454550747"+a+"-6721226268986105588"+a+"7746073604671358475"+a+"-4028896770080478318"+a+"2249919745243282647"+a+"5980588423799317305"+a+"-1821824395713650690"+a+"-2882046706545431689"+a+"7061967606227304354"+a+"-2573913225429695307"+a+"-4648857271845470150"+a+"-4795319601251648610"+a+"-2449406718613084816"+a+"676112606062692505"+a+"7077775243255965517"+a+"8279439461933769619"+a+"-8967593294134626925"+a+"1463924050027057153"+a+"4108746256100642153"+a+"671669840699843877"+a+"-1937390517977201347"+a+"-8026937897785993585"+a+"7254950325548462821"+a+"2857869494438805734"+a+"-6367096460053409785"+a+"5906509814179036904"+a+"-7118684737034387269"+a+"-5966644349827364178"+a+"1784340785351647342"+a+"6898187943583870772"+a+"8254792895615645961"+a+"-954677375447462376"+a+"-8607649526798219183"+a+"-682926799495397982"+a+"-7356576987957102704"+a+"-1441103736382094588"+a+"7744146107024206197"+a+"8298974751122681058"+a+"-8158073329334910408"+a+"-7541746284309130733"+a+"6396900582423006721"+a+"-4405495884594382679"+a+"-7870995558099949174"+a+"-4609593285056091858"+a+"-5738979543098896126"+a+"-7068293602902740431"+a+"118869759956105524"+a+"1415505245870596096"+a+"1358436106725431016"+a+"7188423186761477302"+a+"232476152356452489"+a+"-1083161878765589385"+a+"-2475947859666233849"+a+"-1723796127851316742"+a+"-2367624063964726530"+a+"2586319451174446919"+a+"-8372939562443165929"+a+"-2162489972833552703"+a+"-7318017362543869778"+a+"-648659211385937817"+a+"3773520909212276149"+a+"-585681434878711978"+a+"1278446472326031063"+a+"-6858913687097261167"+a+"6725941661693479136"+a+"-7835171098254580731"+a+"8517002855346448475"+a+"1727317643390553286"+a+"167454846277770108"+a+"-4484400628788161122"+a+"-1249045407222665664"+a+"-4125864658252067639"+a+"-232876471594021678"+a+"7566742549724119545"+a+"2431450474966577201"+a+"7758435135139184031"+a+"-926428227324858098"+a+"-210572359641175956"+a+"-7452750196656904966"+a+"-5599738118885185771"+a+"-7813953591554086464"+a+"-5047474818723058090"+a+"4439034982562431759"+a+"-5466270553032256710"+a+"2712169492000026204"+a+"1862737586753002392"+a+"-5353038579107901178"+a+"-6947450633948884256"+a+"7974444038241854650"+a+"-2049784300038248681"+a+"-768795663611722216"+a+"3970864286397878815"+a+"8814423706677119382"+a+"-5399130435676630212"+a+"4506091385324763812"+a+"-5107634537661317933"+a+"1839010175740881169"+a+"6936175302234839667"+a+"-6325912105782826835"+a+"393680543852720921"+a+"-3448458068233951442"+a+"-4019906657169970257"+a+"7620172460174228567"+a+"-8997998808030605866"+a+"8771659726844811350"+a+"3428423575986468581"+a+"7632781606969980013"+a+"6762091554535732016"+a+"2622604169364957653"+a+"1232024216574036364"+a+"-371534179473878306"+a+"3501875876588075794"+a+"-9187612436207592870"+a+"-5980761402510607581"+a+"4624164498132835644"+a+"1676395763050685357"+a+"-3827762186089381253"+a+"8006025736889493931"+a+"8649369890583457083"+a+"7984987985730213362"+a+"5095547086850321711"+a+"3654889101665666601"+a+"4772050352648720696"+a+"4673711977958914584"+a+"3690722882959687762"+a+"3652961941639885094"+a+"915177957041372336"+a+"8394835670723402780"+a+"-6283516835760048860"+a+"2682052802898306863"+a+"-39133921885058876"+a+"7182677795321372732"+a+"-1123137732347862838"+a+"-7187211477441315499"+a+"2107865782772483260"+a+"7029138672815376251"+a+"-5246589834603524916"+a+"4946578063768694189"+a+"-3327990999892404608"+a+"1410047753342829601"+a+"-607158855661428843"+a+"526205912768181200"+a+"-3353974441997849823"+a+"4345004848608271928"+a+"-8028878697252563721"+a+"6992865860785518941"+a+"89887283317978958"+a+"-4890367390986524656"+a+"5395246551033333412"+a+"9149027322776474227"+a+"1888231617770768351"+a+"1832173972123517627"+a+"8850607358448321718"+a+"-3573842940544988617"+a+"-2515993210354900402"+a+"-2970572681876409710"+a+"-8812829507312878041"+a+"-5126214287592177836"+a+"-593209255878052551"+a+"4279401441478329262"+a+"5735936342676945242"+a+"3857279221947912310"+a+"3485153424716732642"+a+"-662050485808185745"+a+"-72690764741550959"+a+"-5532883488824715058"+a+"393326004849090479"+a+"3923986657219931129"+a+"-7948340736432765324"+a+"-7006347688709669743"+a+"-5322266596584016214"+a+"6389240576921692850"+a+"8562031855739319952"+a+"8315930557757687161"+a+"-8086248775449979391"+a+"7373112891709936326"+a+"-4607557960451455531"+a+"-3205406892078035134"+a+"8263877443067298183"+a+"-2223029705465288029"+a+"-8925415624073416936"+a+"-6791064439277026258"+a+"-5042775155189130958"+a+"4776655052699757437"+a+"-4933088522838694001"+a+"8330184652392589698"+a+"1637070176593639835"+a+"-5059066217951619637"+a+"4014727029744109400"+a+"-22434511743124473"+a+"8666756317556173953"+a+"6703726588124124616"+a+"6076365483039687154"+a+"6591634391558659210"+a+"-3348044019496228538"+a+"-627454787052259341"+a+"-6243419827278238015"+a+"-776770814135022500"+a+"7132449682874312048"+a+"2085761559853657487"+a+"6058593733864972686"+a+"4050640859539192274"+a+"3970990063816635689"+a+"-647266916803895004"+a+"7221575838847750917"+a+"-5566112000340108090"+a+"-6280641768631632960"+a+"8795263388574407420"+a+"-7365448443375986378"+a+"7376974628227097364"+a+"2243540925361024038"+a+"6959654388375811495"+a+"-1771171730378641387"+a+"-6613010221741265634"+a+"-6613598152109663886"+a+"5659412131893682807"+a+"2038713578902245882"+a+"8696094200527592009"+a+"-6769680772788512930"+a+"-538388923584348667"+a+"-5779831060953309150"+a+"3643283202091378046"+a+"-2808307024288961849"+a+"488009925522109610"+a+"-1687403487093613780"+a+"253095126108852649"+a+"-7423002503273461200"+a+"-5689624720828647673"+a+"9212972063823063964"+a+"1186793416532289086"+a+"6918511817379999296"+a+"-4755159465512075650"+a+"8121227818115496539"+a+"-8485767623736951889"+a+"5020011809071985215"+a+"-6500273869653352010"+a+"-2663957737793529547"+a+"-8101377298829715465"+a+"326463995359446173"+a+"1484830176553892122"+a+"-4579692127371314343"+a+"-6097801910883493102"+a+"525734517143906156"+a+"-1165711456870362277"+a+"-1658430596698325539"+a+"-4983979316745651326"+a+"-7367822663026016031"+a+"5536666042452556266"+a+"7831167091211321400"+a+"-1686744937172643124"+a+"4709613367890590679"+a+"9117545435945354623"+a+"3908543326474915014"+a+"3700783554614032889"+a+"5500699049362208843"+a+"8883143644002779797"+a+"5940917221843046728"+a+"-6377243717063936490"+a+"-2781555112742499359"+a+"7113301072320947691"+a+"501910549267933025"+a+"899471793024038068"+a+"-751886605302181282"+a+"-2897960745928273660"+a+"8841990777988640026"+a+"5210290765280155752"+a+"-1099833625028932053"+a+"4086791554633655976"+a+"3527398908407917918"+a+"2609157552125744460"+a+"-5411717177956362023"+a+"8936638687147126625"+a+"-5201416203511998337"+a+"8020173228835757436"+a+"-4672525820805766249"+a+"-7017604422221214209"+a+"-5632657971529806673"+a+"-5406365676176679526"+a+"6125746927489206206"+a+"2061394030035502100"+a+"-3336616794732253560"+a+"-2440204974762145461"+a+"-5510695638491715770"+a+"-2052022113521973639"+a+"8535915275635347845"+a+"2141589138267928504"+a+"4704310198587792718"+a+"-8516883072754769465"+a+"6176162718928711814"+a+"8787949673700282382"+a+"4567063869848829592"+a+"6699214372328713951"+a+"614582040941377104"+a+"2114345272374019582"+a+"1205326714880158218"+a+"345855247272630115"+a+"6863791979252946443"+a+"6584140928474080830"+a+"-974652546421757650"+a+"1104047281126844986"+a+"1683950892429964226"+a+"-114975964243070203"+a+"-1486761048205680462"+a+"-5291415350861152240"+a+"-1295712165563917082"+a+"376680977854009491"+a+"-3801206170133606167"+a+"-7615543987751473197"+a+"1222029900712890572"+a+"8086849773582156199"+a+"5699471271553623625"+a+"-3076723626026790089"+a+"-6990312711296902870"+a+"2249309539351360519"+a+"-2213204999452304917"+a+"8837902888211847987"+a+"4621474258312999582"+a+"741401623629356284"+a+"-507184299727707634"+a+"5003522673131041922"+a+"-2512304557071432409"+a+"5860072657460323795"+a+"-3551939454713122155"+a+"7039243559025359908"+a+"2667090741430594730"+a+"-5263722189506025379"+a+"-582705400402113148"+a+"-4378370425568246822"+a+"-2392995877829144210"+a+"2097189650028165999"+a+"9044307751697998726"+a+"-4309773030097066323"+a+"-245082032325783392"+a+"-9041789317184909469"+a+"3315057182621451370"+a+"-2164132299950019225"+a+"343094821716735184"+a+"-3331909883100521834"+a+"4460313862086287266"+a+"1812608985018565400"+a+"-6008529437339156878"+a+"-8385297506366368280"+a+"-4247845283919211326"+a+"7900328945924389267"+a+"8078840910713306207"+a+"-570510759641380545"+a+"5367622739845813255"+a+"-6792063981953278482"+a+"-8609138015271881647"+a+"1294288896582281220"+a+"6609052239144832718"+a+"-263131261566575354"+a+"-2039905094280094870"+a+"-3228456423753777756"+a+"2274841285895911448"+a+"4845949212104423416"+a+"-6574745710094852434"+a+"-2285800804160361968"+a+"-1144764046272735988"+a+"-4887605558584506199"+a+"5064876672478755716"+a+"-3232208103790399939"+a+"5348678013006323061"+a+"2032227170072499776"+a+"-5970510642986571719"+a+"-8156922862002452315"+a+"-3691740174830523328"+a+"-3844250118619088474"+a+"6528094743374630013"+a+"1606598775838302661"+a+"-7747504328742060032"+a+"-4505193121087041011"+a+"8325698253309430243"+a+"6550206689455229085"+a+"-207710379570803862"+a+"-6711498507499959962"+a+"-9095050147687951259"+a+"6239177506672082739"+a+"-5523818040006060583"+a+"5804005037551216873"+a+"-6075325454732731681"+a+"-7988185768521296112"+a+"1039395532244708299"+a+"8001200725138275729"+a+"-7074698778794344561"+a+"-2336253547742487103"+a+"-2606238079972532383"+a+"-4339818077653300067"+a+"-8558914632631279460"+a+"-4135390505319655081"+a+"2460161030124935395"+a+"5391174676264245265"+a+"7530170745056800908"+a+"7664035282768827623"+a+"-2020351598233962694"+a+"3876340506192868147"+a+"3814540850933604043"+a+"6817954267349138699"+a+"-7584650305603780491"+a+"-4395070944949623026"+a+"-3158848660161048533"+a+"-269117567728546720"+a+"-3122953333596609979"+a+"71120503137756914"+a+"5637199835664820063"+a+"1852378117913282566"+a+"-3747245523281264000"+a+"2303890783248766194"+a+"5410987106499222910"+a+"2696649635447671843"+a+"1271620354708692897"+a+"-1729642602524780956"+a+"-1315069908501370233"+a+"-6125916372380604320"+a+"-4056353451015536314"+a+"5159017489559205989"+a+"-2113090891128734249"+a+"4333405829811801194"+a+"8954747781215647921"+a+"-5450373765985049517"+a+"-2432760969826335052"+a+"-8012766084822596494"+a+"-4619727234556333752"+a+"4884975169507664977"+a+"-2939311391033930554"+a+"8221234267001882030"+a+"3912615498840805654"+a+"-561848863929337914"+a+"43573555934369944"+a+"-5928313827199464746"+a+"-3501297165495359161"+a+"-4998610189516277794"+a+"-1913588868684190692"+a+"-2278084051797147481"+a+"-1610917622365620560"+a+"-2305710515290190841"+a+"1165273814480014116"+a+"6838312509618586212"+a+"6491150613554885188"+a+"-1944753561513611658"+a+"6255632190421079018"+a+"-1773213467900303792"+a+"-5038763434446212704"+a+"4715879262419648672"+a+"4333687086319921033"+a+"912014761633159733"+a+"-1930604833972234368"+a+"-3391198435941748799"+a+"-3071060629188926847"+a+"9184135797098467296"+a+"5032670905203823687"+a+"6078798282541869400"+a+"5423378219740816695"+a+"8252131508489648546"+a+"7607030361567934076"+a+"-262569328231047255"+a+"6663001055977811058"+a+"6298318905345480400"+a+"6506771260680588103"+a+"-4416115954408464838"+a+"4518035252801993183"+a+"1982554975493001284"+a+"7197635397909925624"+a+"-7668571444198740394"+a+"-2665198171639411569"+a+"-2456494556960430885"+a+"4715159423995014529"+a+"-237344622867592307"+a+"-6262109450197948044"+a+"-3474443242974353931"+a+"2934384186453480183"+a+"-1277187905886427086"+a+"6673422063586767847"+a+"-7880530014350474248"+a+"-3646763270037402604"+a+"-149292745994812965"+a+"3376372179984995877"+a+"-1111731767279408435"+a+"4671558057806984888"+a+"-1292228904119138843"+a+"-3583239139422111283"+a+"4342930889299439202"+a+"-8725402015736905116"+a+"-1109270466676439570"+a+"-1972518756159303581"+a+"-35230474872666330"+a+"-3244541790415322947"+a+"-7950578804922139559"+a+"-5486091848317228079"+a+"-2281298898378514801"+a+"-6646645720238471665"+a+"6623440358756065485"+a+"-9153856997766830367"+a+"-3585757771897050217"+a+"6930412469998148039"+a+"-4351635392967078730"+a+"7154169321563069892"+a+"-7358749838981554373"+a+"-6190958088870856968"+a+"-3862427748869640253"+a+"-7621041158611765618"+a+"1393838985767952635"+a+"6302374980696710359"+a+"1987923606930691174"+a+"-7327828962052736585"+a+"-6060103819590919330"+a+"-1893007658963996865"+a+"1542199167471334487"+a+"5310282313180215963"+a+"7036608913993422955"+a+"5043602524937529134"+a+"5859573804796910866"+a+"-8924021905603981317"+a+"7835087149345156656"+a+"1478259997538816838"+a+"-4419199077858089900"+a+"4379067511389396090"+a+"-4696287401987638466"+a+"-6289442156285941683"+a+"8071605714943028386"+a+"-8951996923309922526"+a+"-1790196851854134485"+a+"-1264412905408257619"+a+"2374886420318321090"+a+"-7092423419234991140"+a+"6218125741463927567"+a+"-6598568930604895755"+a+"1689449162299839807"+a+"6323892191946689531"+a+"5646678591452304903"+a+"7993106382290699094"+a+"1206223703498719977"+a+"-7812953645555505486"+a+"397555838289174966"+a+"2976010389220542502"+a+"6308013708131108179"+a+"7862773357976478105"+a+"-6789656998258171201"+a+"275448435954686817"+a+"-6484850033613884844"+a+"9044540601293429036"+a+"-4714255188356898484"+a+"5107200514627105059"+a+"-892844935287728250"+a+"8469981168123687244"+a+"2137088813854102922"+a+"548487406451152687"+a+"1161566390356831946"+a+"-5366587423885009476"+a+"-137674910105312214"+a+"-5369011151552101013"+a+"1881433315829048002"+a+"-7597495061786346843"+a+"6167296021565352674"+a+"3126346873707249250"+a+"8414581496191902550"+a+"-3431070974078274286"+a+"-3353898778032759574"+a+"-2726654910268244032"+a+"-2448795643678291408"+a+"-4158353334053633163"+a+"1565862036675850112"+a+"-5342984135704362278"+a+"-6124338599754330305"+a+"-8280725856435474912"+a+"3057386475416295012"+a+"-3896005975245615836"+a+"-90185462533567176"+a+"3093018829144434637"+a+"7490599664753053788"+a+"-4881014271207206728"+a+"237646390828291600"+a+"-1621517700991273449"+a+"9009036724350796722"+a+"1273336340673207510"+a+"-3769199860684286077"+a+"-7931514986849244674"+a+"6468389508770523825"+a+"-5020483768058569122"+a+"-8520505365041508463"+a+"1248378152959174759"+a+"-1964120239901863893"+a+"5138388422110294104"+a+"3479513344423596283"+a+"6047730220900958874"+a+"6924511811254590454"+a+"3318218834094603372"+a+"8024806712616818634"+a+"2031539881428295362"+a+"5629507007642070890"+a+"-6229588220001211542"+a+"3869936499024244169"+a+"4201625407413514353"+a+"8493899006002794981"+a+"2056217217492362692"+a+"-8694261806141907194"+a+"-3459846817409973991"+a+"7036384077172043079"+a+"5981148065908712463"+a+"-8712265711502573995"+a+"4287743740428781715"+a+"5942873816449620598"+a+"-6575543227187130490"+a+"397910908799842765"+a+"-2568040981584112228"+a+"3237988768615513563"+a+"-4191411378079550841"+a+"-4222601966375665847"+a+"2522403976399554131"+a+"6120926922071503844"+a+"375027522888513811"+a+"-1522882740446678808"+a+"4935255114151481533"+a+"-4086159388928651904"+a+"-3115343425808268974"+a+"-5203489536122476147"+a+"8795529815600651074"+a+"80286283873639590"+a+"-5068484706612970483"+a+"-3672967451330670241"+a+"-1442705906622520019"+a+"7968573705208549582"+a+"3360965067397160242"+a+"-6513273208088886710"+a+"5050721900444876591"+a+"3133412726794527606"+a+"-7659500995422659500"+a+"-1873481277373416323"+a+"8935362823082660828"+a+"-2778758476607531874"+a+"1251425370875299113"+a+"7420431773171575530"+a+"8199506692094230572"+a+"3529081376621410124"+a+"95676002737657866"+a+"-7433215714594080822"+a+"1560120442064157692"+a+"-4917925827649253879"+a+"-1633645829195564426"+a+"-511632361606516458"+a+"-724701335622380917"+a+"-2919212109012158621"+a+"-4866871173848680561"+a+"-2847321891723707121"+a+"-8758010767404897539"+a+"-5003144527513441687"+a+"-2141864159028670309"+a+"-6774089444468990282"+a+"1653132513488543963"+a+"-5455000731532098766"+a+"-3572531149673915004"+a+"2133384230918589012"+a+"-853660865858261871"+a+"5494488722556641110"+a+"-5862610005604565671"+a+"-808451173197690380"+a+"5477097553753168879"+a+"3838919399935625843"+a+"-8764371251366553909"+a+"-2839135848879115804"+a+"3790471151342951081"+a+"4755475314974292649"+a+"743304231064856753"+a+"4365356611584238904"+a+"-6548585131949438249"+a+"-6200874338176525025"+a+"-5644404220656850300"+a+"-8315082119007311289"+a+"5113602445539749238"+a+"-600681809417260420"+a+"-4763730284677038877"+a+"2445781733723819820"+a+"-4278609684717675804"+a+"-1631928600038343826"+a+"7870230093295086097"+a+"45653481548996166"+a+"-6698651163315451032"+a+"7418922739373700391"+a+"2834036305019532914"+a+"-7805479983895305544"+a+"-4498301813798211672"+a+"8198301112608777690"+a+"3946135380080558354"+a+"3729328735391874282"+a+"6039511859537991984"+a+"-7284061669470897853"+a+"-8278031970957020130"+a+"4718143193789236998"+a+"-8663517765137566990"+a+"2252185910208785692"+a+"2529003162250954088"+a+"98935220014582140"+a+"1315061819377404353"+a+"4663598838352530857"+a+"-4550571558489962777"+a+"3825904347230371710"+a+"-8468131412504877868"+a+"-3028672951573954003"+a+"6793888796330723125"+a+"-6731836204402594940"+a+"-3083086963709202870"+a+"5972055209543821682"+a+"-3007704021703785969"+a+"6276921094468975562"+a+"-2385667706792875104"+a+"-4798538726797851066"+a+"6542420907682848985"+a+"8760005704353021645"+a+"-8383174092167068100"+a+"1994267834917436408"+a+"-882988945015600361"+a+"-1421628514110625838"+a+"1386556981179212774"+a+"-1628451205522220321"+a+"6096215132756199157"+a+"-3157999682887015585"+a+"-720804536501956791"+a+"864311996094102739"+a+"-9129776398840895040"+a+"6371274784961788864"+a+"6317369305411645559"+a+"-8217006195540446798"+a+"953960764002310251"+a+"-7896083199860814461"+a+"-3195405771619052190"+a+"2554422386574752733"+a+"4245141863786747915"+a+"-5477415415121490948"+a+"-3619704843164087708"+a+"1944074131303980216"+a+"-1887968265449951653"+a+"-2435116698727098942"+a+"-2748007480497913160"+a+"-1812140038148607699"+a+"-1481232631074352583"+a+"77026493495056688"+a+"1427899818682618110"+a+"-2545050666705232342"+a+"-4907281526846362585"+a+"6992610960207825125"+a+"2927663913121050555"+a+"2449858278136761630"+a+"-3104582313646135605"+a+"943339250059010116"+a+"6972390479973112278"+a+"-143887053138790272"+a+"3356560001730432879"+a+"-6566764162681997323"+a+"3668838725603488541"+a+"-1023359833182599096"+a+"813165131040507522"+a+"5478699827093318242"+a+"-4189776217840205634"+a+"701589422406172276"+a+"3472756774896500757"+a+"-8290107053048657861"+a+"5694414199747604942"+a+"-3191169294615547003"+a+"5091500569779147870"+a+"4196571841396612339"+a+"7711777312917239750"+a+"5152881326409671423"+a+"734491937592074296"+a+"1431453077774631744"+a+"7219739284858384128"+a+"-5221091070613125140"+a+"-1011640063542528607"+a+"1283968889735350687"+a+"-2671634264101398722"+a+"-7954219858650838694"+a+"4029537184239459388"+a+"-4933138819600324915"+a+"7664875024126417956"+a+"5802164042560157400"+a+"8867033579115635149"+a+"-2262327063551902129"+a+"-5496413002288534087"+a+"-9177790286601677571"+a+"-4804121451895014721"+a+"6657552006397867243"+a+"-5676535376674264854"+a+"2504402911410518498"+a+"2977491730596934305"+a+"5454818912351900973"+a+"5876513810599383047"+a+"715611406429649314"+a+"-2402728559636829020"+a+"4650943519358976995"+a+"2544986244799828804"+a+"719478745574466273"+a+"-22820586461547489"+a+"-8242498312426535775"+a+"5166391322188818746"+a+"-1301099741166466238"+a+"6777183057769553164"+a+"-5180542485006512578"+a+"-393290239772002461"+a+"3939307281163922416"+a+"8005001261047788680"+a+"8930885310148079445"+a+"-4794693648338023775"+a+"-7832197853329142250"+a+"-6616876144074407594"+a+"-7815536134577831227"+a+"-7300592228259078217"+a+"-2420675692755400857"+a+"-2417030952500882339"+a+"-6797270974718479310"+a+"269771083840125902"+a+"3157091651274262167"+a+"8697615235028412710"+a+"3538320494628000898"+a+"-8700694277662501646"+a+"2066583791144923103"+a+"5551206296830695007"+a+"-4970728003721986464"+a+"-552197265275467117"+a+"4626145040974907773"+a+"3448612904884604506"+a+"748670883168176828"+a+"-6233979681553781243"+a+"-4544802847111792590"+a+"-7761655660005544050"+a+"2297369898425242952"+a+"857207484408519424"+a+"-17394699395150910"+a+"8201559379994584341"+a+"-1231944804806258435"+a+"6597224736215359520"+a+"500846020371422071"+a+"1018234138705237805"+a+"-1596011118585484140"+a+"-26138935862806682"+a+"-1097215572743228769"+a+"81351931136175031"+a+"6395439808563545870"+a+"-1297999266625483083"+a+"8548488327470157065"+a+"-6576036797330794821"+a+"-2104611578644794323"+a+"-5784421750563954602"+a+"-2392748360644615284"+a+"2669307174142835426"+a+"-8617162425929035528"+a+"-7185571120010208396"+a+"7494874214499485825"+a+"-8019549838914840070"+a+"-8572548389377808325"+a+"9177920409992928417"+a+"2574765948067107908"+a+"-7145546505022417546"+a+"6091877106353284868"+a+"2718564275332216399"+a+"-1682451754550845002"+a+"5383698813342645996"+a+"-5325275677998898905"+a+"4296256188514240856"+a+"-6284555223374144834"+a+"4686907914658969749"+a+"-2672433107634723396"+a+"9182976955244244343"+a+"-45834596498729789"+a+"8476474814586529232"+a+"-5400958819728596068"+a+"-8511321941667534387"+a+"4336907653045517620"+a+"-5210703458746995809"+a+"9179806757390753255"+a+"6094025559094213981"+a+"-8412598326260443648"+a+"-4172563096838061784"+a+"-3071328123176030080"+a+"3969788753850185615"+a+"1786729876414136862"+a+"-2275444241133449163"+a+"-1871384636507265905"+a+"5314766366902575281"+a+"4256843451351245319"+a+"3205232295236085173"+a+"-4071018234209233666"+a+"-241084583434390927"+a+"-4864009884957720521"+a+"-2474507206868372935"+a+"-3086257679926615299"+a+"4088550094298505316"+a+"6481859430300093871"+a+"-4149248147260089737"+a+"5751936103051737727"+a+"-8067819930398707581"+a+"7670386680304021110"+a+"-2332417447729735733"+a+"3221958145698506426"+a+"-2794978698076298327"+a+"7954395953204729363"+a+"6677772407808174257"+a+"2115558009373128363"+a+"1303266325210361366"+a+"-711058957100944363"+a+"1614912588004413772"+a+"6874669523411939728"+a+"-8369287306464935953"+a+"-1684416424857587573"+a+"8253440249378089955"+a+"-3388982263081362580"+a+"3678474358138101179"+a+"-5457310176028329844"+a+"8062499506372708702"+a+"1961126841586682246"+a+"4364856704628394215"+a+"6724515039510026929"+a+"3145915635689578957"+a+"-9068629039917709590"+a+"-6896889714673092541"+a+"-5872078154100411498"+a+"482677778014278881"+a+"994873927174850790"+a+"-8000765370282532732"+a+"690174924996651613"+a+"-8265299070933681551"+a+"5649507651661886351"+a+"-8019963432471327552"+a+"8576709714539609386"+a+"7428668195334390519"+a+"-1004200650521530822"+a+"-2886037052899604747"+a+"-7114770470000271960"+a+"-2300304907145140207"+a+"-4597066594806265853"+a+"-8873151084735737726"+a+"4096849419089976706"+a+"1065469964635630848"+a+"6032531643212966985"+a+"8042807203906726571"+a+"-8597691136135861525"+a+"3975309871459151660"+a+"1910269397441177392"+a+"-8082728109078253799"+a+"-2153134960423805673"+a+"-3694283007221332323"+a+"-5329554595744515555"+a+"-7616008112930064296"+a+"5374164716957274303"+a+"7055806471699822212"+a+"-3034416501726773186"+a+"-4777342028744844712"+a+"-8858900436739205983"+a+"-1883194253652283984"+a+"763857036569830144"+a+"-2604905813028082963"+a+"8896125689765848574"+a+"-3678672038381431014"+a+"-2580260397506994537"+a+"7842089863115348559"+a+"5540665111479827739"+a+"2579610618501036634"+a+"-6546623738212313479"+a+"-6338633021039551589"+a+"-7838115082028684864"+a+"1707181944826096686"+a+"5751970046862735843"+a+"-5852680709225685681"+a+"-6664378160967385156"+a+"3636371481441062650"+a+"1838037137099569235"+a+"-8411250525386747438"+a+"-6472330738327055521"+a+"7162476550072738627"+a+"-1470651201059158516"+a+"428366551799105514"+a+"7277995288887084542"+a+"-1029487524482586573"+a+"-5720661788324433771"+a+"5653818400270062403"+a+"-7615219267151273358"+a+"-6875499057096504295"+a+"5196088249313395514"+a+"1507760576708216047"+a+"4466003920374073753"+a+"-6927163147925885723"+a+"7030187541847112585"+a+"-643059337707244575"+a+"8500788707189878484"+a+"6912045776561875120"+a+"-7795124748209566249"+a+"1480521059261289841"+a+"-7942872165842049912"+a+"160228994416279090"+a+"8922510255051815353"+a+"3776806737798112731"+a+"1784830562638493853"+a+"-1468151429829558966"+a+"-8462833212897464693"+a+"2711466553961636031"+a+"-8832517111573585662"+a+"-1115551713759082630"+a+"8029886438954713068"+a+"-1506344344651609694"+a+"1147647689029089318"+a+"-5892481768727240599"+a+"-5066151872839652800"+a+"-3211303276721830804"+a+"902925049407736193"+a+"-1705529505313550753"+a+"6942813368093763373"+a+"-3189584254263886359"+a+"-8151789860636479991"+a+"3160358323515624140"+a+"6766313830725014046"+a+"6616574192994395208"+a+"1505043433831987389"+a+"-8254107266258386239"+a+"8201682746366942403"+a+"7049420348303847327"+a+"-779071050928049378"+a+"1367142373039368053"+a+"7453675130550899599"+a+"-7917711176173061532"+a+"3313398252775778737"+a+"4337717741330632385"+a+"-656911670097071559"+a+"7482645503299742197"+a+"-367598129941149570"+a+"2990187272887706533"+a+"8218597390609729596"+a+"8190839400284186386"+a+"5283093373464135572"+a+"1346661629957039809"+a+"-799282044425507498"+a+"3278126363957749342"+a+"-4895400981922404477"+a+"1979083824421142236"+a+"-4795668697430505972"+a+"-5395970322558385951"+a+"8109620177538792928"+a+"1589881313292818785"+a+"-6540646951889332187"+a+"-1350777919681323896"+a+"2357270747391562180"+a+"8076987350622509789"+a+"8309045708728545067"+a+"530055558885909668"+a+"-8183077235183204275"+a+"6388941139916578691"+a+"-2099445744549474067"+a+"-1293753809133546905"+a+"6781951102324793628"+a+"3047687602405084072"+a+"-4037298749186653696"+a+"-6685020615667120790"+a+"-6362750930968018218"+a+"5055566658581523526"+a+"-5671792057135769031"+a+"-5899031313464120278"+a+"-8188151456690710620"+a+"-2760499349444106371"+a+"-4426150260258002636"+a+"8565807875095182470"+a+"2347925124125718962"+a+"8836770360451529998"+a+"5282628269541305041"+a+"-3153353454794752957"+a+"-7257095076158279757"+a+"2378830048501618398"+a+"-5052934544264721487"+a+"2294026617251813768"+a+"-1415570073243535013"+a+"-3918356151852504711"+a+"6414529400340348349"+a+"-2606259282286505118"+a+"-454218702919111708"+a+"-647652547804552051"+a+"-3271722851719373664"+a+"6111983006311674433"+a+"-4354511461760213366"+a+"6491934357263299434"+a+"7191166931020341832"+a+"-5645675414313381767"+a+"-1011183135791847665"+a+"2795173187087355273"+a+"890216303210146665"+a+"-7912169349074963773"+a+"-4742180638700132808"+a+"-259088887663225086"+a+"8029334994095983610"+a+"-5374542070909783879"+a+"8281835760288916557"+a+"-3127270261288988396"+a+"-6183235249269165131"+a+"2174567067503160669"+a+"-1259213684934836835"+a+"2247172518861085345"+a+"7730193503548449435"+a+"-3046048989442302062"+a+"-6044149610030342408"+a+"870973208219058351"+a+"263182624751709550"+a+"-5064262206113338719"+a+"-2738036181733010893"+a+"590574988808658664"+a+"-105086946395041226"+a+"-4956626643504740682"+a+"-1419490083740558680"+a+"-7134184373942185957"+a+"826466482441411773"+a+"-7846545176314988191"+a+"-1386482905212722765"+a+"3899842152616849081"+a+"-6154468766884504813"+a+"4022359631212191254"+a+"-9123910919937723594"+a+"-3796696742954785448"+a+"1787119573712429578"+a+"5711418735283584685"+a+"4977033620972423701"+a+"1176824201489403700"+a+"7953379965576896954"+a+"8024486826677009378"+a+"-7593833097004061509"+a+"-7502240379893536599"+a+"-4607020169090577921"+a+"4520570961867228630"+a+"8330080160487545236"+a+"5302665185151061946"+a+"6335873427741359862"+a+"7942843793521747084"+a+"5631162455806133137"+a+"-6450425604371442547"+a+"-4010704877806920316"+a+"1399248098718732397"+a+"972469733242052263"+a+"-7298803554170955283"+a+"-5698194901053468721"+a+"2545963032814312133"+a+"-7862399973443453872"+a+"453451199524111815"+a+"-8477216232078151230"+a+"-6056741494627867069"+a+"3261908613835634696"+a+"-5031581820759604819"+a+"-5525101357093304947"+a+"-992112469424902275"+a+"6895709263621485521"+a+"7054726806246574934"+a+"5047241881050380323"+a+"-3904922186542766742"+a+"4579915186836399279"+a+"-5353937321024776932"+a+"-928075393056688709"+a+"5942878932738101734"+a+"8713841580842905389"+a+"6608875547270477436"+a+"4301343187721522768"+a+"-4095324054764236239"+a+"-5138250332818123817"+a+"1351937779264056474"+a+"-1576618855002232287"+a+"3540447542356909936"+a+"-3078741273218372674"+a+"2004486967449152186"+a+"-7663226671924277711"+a+"-6819176140304455893"+a+"-8065381572537158409"+a+"6561904230350781128"+a+"5968982111440892104"+a+"688535005304927181"+a+"3671146762822430492"+a+"6074946612835118545"+a+"8043972357531606512"+a+"-1357746997691964120"+a+"-7033153104090396727"+a+"-434627271818273656"+a+"4571881995274120185"+a+"-1563538570477750034"+a+"-7623771092889725152"+a+"4688991713505327042"+a+"-8604626094696448011"+a+"-8529809129456688327"+a+"4303329914390981702"+a+"-8079780687321061126"+a+"1861670108377883196"+a+"-2644415997330278652"+a+"-5897802207920412189"+a+"7495952426168779470"+a+"7793293741439116010"+a+"2796178858843037359"+a+"-5020394929558949210"+a+"2344703945676226943"+a+"-453773009627263396"+a+"6499859343787172991"+a+"6699134485389206975"+a+"2218525668340833141"+a+"2355733121583346103"+a+"-791325441084568805"+a+"-7246537864425084060"+a+"-4510848757778177607"+a+"-161128756252577951"+a+"-2166556087921641968"+a+"-2280493242052046516"+a+"1932496391683207290"+a+"-6421008687224691834"+a+"1290133728513942094"+a+"-7297634445335644361"+a+"-5997232904471695479"+a+"-7708529674621560684"+a+"-5588174406718247254"+a+"6294887950843562852"+a+"-7997118510844796196"+a+"-2885810922271028289"+a+"-8635762432530533286"+a+"-1317304606959364328"+a+"-2373159149951022322"+a+"-1936916772815322754"+a+"5599319884707688316"+a+"-6732913923000100066"+a+"-6213972918461393443"+a+"8024159330049419788"+a+"-651899612153972849"+a+"6049664271129214018"+a+"-6706689037037281621"+a+"-4989027840498412056"+a+"6832795885647890423"+a+"-2628481227451105323"+a+"5650274281754722047"+a+"5563965301533620821"+a+"3899471650830194813"+a+"-3097129239518275540"+a+"-5668778981688365311"+a+"-5675636006739130917"+a+"32486694633375181"+a+"-2262521173289991903"+a+"-7692135913691023871"+a+"4480225237126481092"+a+"-8363092793621689865"+a+"5287391673747106960"+a+"-3844953471224911120"+a+"9077450120460588448"+a+"-7541759920452713233"+a+"-5613734448761422117"+a+"5828717629727343845"+a+"-3031332337894560319"+a+"5313736621768512781"+a+"797352516281981799"+a+"-1325023898307200103"+a+"-8268807205481681472"+a+"-5324331743570264178"+a+"-7083639995384692451"+a+"-8637163951377958933"+a+"2975908686744585718"+a+"-2008404856766633711"+a+"7723387902706398954"+a+"-7973500423533177762"+a+"6692632760106560260"+a+"-4665610910118945254"+a+"8451621719365601343"+a+"-2645373212082623082"+a+"8421271369123846731"+a+"-2599494001784771694"+a+"-3946625605047561839"+a+"-8704217631780175137"+a+"4761619239478980213"+a+"4199445537668073285"+a+"5625985806773378266"+a+"2011135118429857446"+a+"-198733429078096918"+a+"926284042761947234"+a+"7584707738648251926"+a+"7614806611607011069"+a+"-8694136674804601508"+a+"1234259175475228671"+a+"-8862269440647405625"+a+"-7202860528132844005"+a+"-5343608329321007044"+a+"3955153865076457875"+a+"7340646789438500722"+a+"-4814101825287423270"+a+"1111096036970381634"+a+"3080041105664682874"+a+"402725684298177056"+a+"-442192729353998024"+a+"8885077571446724840"+a+"-2931904822146023563"+a+"6559344414154434782"+a+"2874385438277726934"+a+"-1558926763201497104"+a+"1719667747851828007"+a+"1148918550836530493"+a+"7842222988563611516"+a+"-1264979064834915366"+a+"-6449956785418592103"+a+"-6435052198093738542"+a+"7303314767276522899"+a+"-8525447647589129361"+a+"-4105683137247453514"+a+"-339581268788198729"+a+"-2792564634978555223"+a+"4381265229624255289"+a+"5716805244733524432"+a+"6651831766232613385"+a+"-2646266171513414671"+a+"-9184734908069189112"+a+"8411451797653218329"+a+"-5644815294965228440"+a+"3406219370354298560"+a+"7189061357352189294"+a+"3854704827508586027"+a+"5195183761365797242"+a+"-857975408992204527"+a+"-215081397961025980"+a+"5541172185389004673"+a+"-2158931240515443609"+a+"-2707030040377390590"+a+"-4951339429533825757"+a+"6860115872619611899"+a+"-6977159187553839010"+a+"-6588129350991115691"+a+"7460014721369155308"+a+"8244516680674177886"+a+"2718524895786720527"+a+"5083129452729634032"+a+"-3088884557649270463"+a+"-2890867246580149294"+a+"4144736866258125616"+a+"-4515220895037178019"+a+"-3081548925238092023"+a+"7059458545451479138"+a+"-7629100745456283399"+a+"-4677223535664272821"+a+"-160196749568088848"+a+"2335351286911662720"+a+"8269863132468702887"+a+"675696569525121547"+a+"4220297877278479844"+a+"-1941703945306008194"+a+"-8085555609744465156"+a+"3320638279003727635"+a+"-1454534490754134119"+a+"-9070853339029164267"+a+"1066514592317218749"+a+"754035260480022143"+a+"-8442330812214212858"+a+"733223385524053986"+a+"-6928812214869123533"+a+"9175782745023974027"+a+"7709129652756409574"+a+"6446771461470981092"+a+"-4669040159691830357"+a+"4940949800684628762"+a+"3596568245401674296"+a+"-2934469607945168128"+a+"-2832159018707221002"+a+"-5963608707147616718"+a+"1136173520603479232"+a+"-5948152900752711299"+a+"2776238780712347625"+a+"3545391441816397950"+a+"-7712627837337478268"+a+"-6100017580852682616"+a+"800507691066680798"+a+"-4905853621444866613"+a+"4650896174010534735"+a+"-6291383217484249423"+a+"8530758450418989618"+a+"1420593270340448651"+a+"-8695607674634208463"+a+"-8917496092665137043"+a+"-6875691519537749563"+a+"2877196668554762069"+a+"2403578486267609340"+a+"-3947791298286507886"+a+"388275381527242877"+a+"-5220091270772812957"+a+"-2278940210913219127"+a+"-7080887395332308771"+a+"1445237338423510467"+a+"-8261792903727334638"+a+"3403233544842424945"+a+"-2595302965412930961"+a+"8782074601683241220"+a+"-9116459070810315419"+a+"-6949872996379093995"+a+"2211552796472936012"+a+"5042322673897575985"+a+"-8335938585661637757"+a+"-7488365451307650921"+a+"1807439259410769371"+a+"7387376844333691455"+a+"8698689454771362101"+a+"5434385237440762654"+a+"-3923006091697187991"+a+"2928453024753164200"+a+"3465006396035071337"+a+"-7192016247724926826"+a+"-746984709422884186"+a+"8483037580095556329"+a+"3247327325691153073"+a+"8704618608551355438"+a+"-1948688537689292507"+a+"-9085664162222307582"+a+"6734570649656350661"+a+"-8770073734572497960"+a+"-9194731727659180320"+a+"-9160987442754332167"+a+"-6991099690895060995"+a+"-6411220257744657204"+a+"-3347728207653992781"+a+"-4666630998429640361"+a+"988627827426911191"+a+"517132412672358405"+a+"6780424254067588829"+a+"3484025531596887721"+a+"-8172604109698856585"+a+"-2434263978006321470"+a+"146206282000042370"+a+"1802241808220625920"+a+"6556915806108437794"+a+"139780490839209735"+a+"-5013022352242524885"+a+"109564557104052338"+a+"-2980042105416846910"+a+"-4850914409397469159"+a+"5364612497576897859"+a+"-9061350671329928041"+a+"-6694502193330216603"+a+"1568047468602969862"+a+"-4410706216611388772"+a+"-3504312536846858484"+a+"-5151996445415166530"+a+"-2279913604249920741"+a+"-4929800644857338903"+a+"2421285177127780595"+a+"5028242344376950947"+a+"8235055502228982379"+a+"9200641443671019073"+a+"4257670525276564081"+a+"4463718135204600973"+a+"-2782591591092238769"+a+"9196602820397399459"+a+"5815010940885079855"+a+"-4359421796989530853"+a+"-4354454442498564127"+a+"2440722763518477676"+a+"-7965784401936254246"+a+"1589047364720240527"+a+"1345659788105434239"+a+"7856291551886686434"+a+"6831829224225367460"+a+"4725110785524153167"+a+"4800747046490817102"+a+"1742363762860786605"+a+"722408345131520192"+a+"-7928892214208671131"+a+"6747954079596469429"+a+"4939374870942765656"+a+"-7793510012239185175"+a+"-5128456840029167104"+a+"3999741029130023134"+a+"-9003958273268397355"+a+"9020728301986288860"+a+"-6439212985914569999"+a+"1007144509809257016"+a+"-3492980418894752522"+a+"3506776460958432729"+a+"6030604355915164207"+a+"8792783479452649207"+a+"-2684601371150339339"+a+"-1296675361422454746"+a+"1767641169122703699"+a+"-3281682852775613293"+a+"6004863460452231661"+a+"7620904616562851212"+a+"-4558711566239662307"+a+"-4756950387810939835"+a+"-2497931619996157346"+a+"-8869072948826981416"+a+"3909138683430178797"+a+"-5193643777658890355"+a+"1084432834453924013"+a+"-7407336904518008485"+a+"9127734740127325770"+a+"-5184826564961811282"+a+"1822850980453127585"+a+"-2863856280020872853"+a+"-4096478657939760289"+a+"235009772142633776"+a+"-5165419990517586201"+a+"2663587645595195616"+a+"7408192754011596665"+a+"7504135869731143774"+a+"-6205578335667667056"+a+"-6946719039592539497"+a+"1360727412534317706"+a+"-3495358934924862522"+a+"3200599730943527054"+a+"-2986153131924886541"+a+"-364225976897164119"+a+"1619039194664479676"+a+"-421740377479575238"+a+"3381017218293891415"+a+"2803787595269482128"+a+"-7138278169131421226"+a+"-3851028397957722159"+a+"-6845731707997533523"+a+"4304247233651425821"+a+"-3453169481311494287"+a+"-6648899435196339726"+a+"6243068346988978146"+a+"-4687304487053815087"+a+"4500392581972691499"+a+"3194105698562551073"+a+"1302928061966663015"+a+"899861116730412628"+a+"8071794113442656359"+a+"-4736053881059782840"+a+"-8833778113132867406"+a+"8459559140024462575"+a+"-3331202166940103220"+a+"3559576239267745585"+a+"-1438823586080975685"+a+"7598377555370318352"+a+"-9073544075373002810"+a+"3791329947068574989"+a+"5244713667648536191"+a+"2355757732641305802"+a+"-5774713322130818556"+a+"-7825478554949913872"+a+"-6598527612334048895"+a+"-756930092356886446"+a+"-8351794287745316104"+a+"-819962835473789614"+a+"-8521881550004177852"+a+"-9034627345103084413"+a+"-9047810911031283622"+a+"8575019169603285903"+a+"-4216585731513549614"+a+"-6606318378154025381"+a+"-8442134414137607259"+a+"1063742281525256296"+a+"2444862909868862776"+a+"-5865660505052921732"+a+"-1477161071089416551"+a+"-5821089796972455295"+a+"7973943363313051655"+a+"-8788015932375833684"+a+"-5800724202257631305"+a+"1901020626499030241"+a+"-6420649857342151467"+a+"-3754478878428518571"+a+"7780134533194962632"+a+"-6349730169284317324"+a+"8185432331423452346"+a+"-483163739776409083"+a+"-6146548957177106089"+a+"8334243443022708620"+a+"-8647638936276375852"+a+"1787867012905935343"+a+"8531495137548914482"+a+"3196305294345619548"+a+"-4009224549994146621"+a+"-3981545981798777495"+a+"1308124786866222829"+a+"2903439537170119548"+a+"-2579953690819322067"+a+"6038349128654123884"+a+"-2684171378564087202"+a+"9182995811385104744"+a+"7065587761529508411"+a+"-498812826483483625"+a+"-5919464316541484254"+a+"-6350970464071964159"+a+"8989432486083340826"+a+"-1185044272771012307"+a+"-556467658138175721"+a+"8750970768269411594"+a+"-9027438176155103364"+a+"5507419764918531730"+a+"-5055610290122339104"+a+"-8292368412672038228"+a+"5304474258286748692"+a+"-5256497898472412463"+a+"7095026451041417317"+a+"-6807751467976201230"+a+"3717039143574626077"+a+"-4591247941372074087"+a+"7608271608948774736"+a+"1424496362220315470"+a+"-5423957027502409260"+a+"-4141017180658038213"+a+"-1870578015989455472"+a+"8587352705951710482"+a+"-9177081453403018247"+a+"-8445363706999997394"+a+"4173067159251534298"+a+"1437350657420775416"+a+"-1070000499192580013"+a+"-111939158234983540"+a+"1952427412828668451"+a+"6985639293418849691"+a+"-9183787890558711511"+a+"6673115431425147794"+a+"-2413052916560816089"+a+"-7968164544488828165"+a+"7133137662488255689"+a+"6150278420864343332"+a+"-1063157585506220570"+a+"-766650864987700995"+a+"7195254792685191684"+a+"-1435582581928370362"+a+"-2879523426919800287"+a+"4212969420069127401"+a+"3255446824860132528"+a+"-5925995542425069660"+a+"-2097003946182267679"+a+"-7852081866181859094"+a+"616624848325028389"+a+"1080075504201798411"+a+"-15762287547911183"+a+"7442243109459838098"+a+"-428612288525247039"+a+"1508772000781295085"+a+"-4857870162506741921"+a+"9005502861598836051"+a+"-3531083866111316636"+a+"-1750623028322659102"+a+"-7644402612402749953"+a+"8089772461982140167"+a+"6614561254907131380"+a+"-8094512546040756959"+a+"2692758151792462312"+a+"-1141724711746061208"+a+"-5976459569932427301"+a+"-1529656033969840885"+a+"-6966828380750242572"+a+"8073327820400846744"+a+"7039045055893670788"+a+"-2742325506132595551"+a+"6150331224641314116"+a+"-1787951516818644325"+a+"-4847277929262330399"+a+"-4469114800270543351"+a+"-6918217605381346886"+a+"-4170169488436643879"+a+"4552357957041798376"+a+"-4709066557073879539"+a+"-6396627091976196482"+a+"-9130722335546570083"+a+"-4398812371995243503"+a+"5899533274459802779"+a+"-69473498414118534"+a+"-1197357345743482984"+a+"2435770297013385434"+a+"-1429592922048557754"+a+"-1013233244699263266"+a+"4712067073798837598"+a+"7770668071291569987"+a+"7401986834930663363"+a+"-6830107552843383396"+a+"-8568011126097879833"+a+"-7859707543166153133"+a+"7704246285605406829"+a+"-2925914507483401235"+a+"-7312680556325273072"+a+"4120576209264301201"+a+"-3607011601435889470"+a+"-8712827169771424822"+a+"-7796887407736212456"+a+"164872087571561611"+a+"1941589419069581284"+a+"8451379006006945651"+a+"9098542511902588451"+a+"6941301505244463442"+a+"-2236870745682619623"+a+"8915992129216321004"+a+"5388925123168690106"+a+"6227343469909213948"+a+"-2498697716208701876"+a+"2663270930973456251"+a+"-2117851629199166135"+a+"1465928199326458657"+a+"-4140932863973360503"+a+"2382104909996808748"+a+"2691169764757156000"+a+"-6927783708096335521"+a+"5665227142251137157"+a+"3990639158350403149"+a+"8344037316052722035"+a+"-466088682998749225"+a+"-1184998401803242221"+a+"-1826973971920071950"+a+"-2978143448452379174"+a+"5489451572766734253"+a+"3982536154060365232"+a+"-2725897582008329614"+a+"-1763022655025997102"+a+"-4663879336851888757"+a+"-7763663985759369480"+a+"-5171814121380446488"+a+"7023992321466746041"+a+"8496338094272787998"+a+"1649982471059595054"+a+"-7874271973868958029"+a+"-6462289143988000810"+a+"2104206826225724056"+a+"3956743142620270265"+a+"8121240854592968950"+a+"-7756522014486882097"+a+"3329055383033924909"+a+"8043367292746471585"+a+"-259492411881471464"+a+"-4611399437472166608"+a+"-5715952258670801514"+a+"8139447008051858198"+a+"6828556815701928006"+a+"-8950316752207621141"+a+"-2494776080654799471"+a+"-5311611842114224151"+a+"-5274517370195306516"+a+"6957748572905774547"+a+"8619833938161401182"+a+"-8098969501978366703"+a+"7498403252053725248"+a+"-2962379495807183329"+a+"1679495359526004803"+a+"910952023144858920"+a+"-5683679598360504393"+a+"4180886423018064622"+a+"-1895749802147475190"+a+"-4261070201435052052"+a+"-7495472397254860658"+a+"-299958970563615299"+a+"-9181751118046314882"+a+"3063144621650993854"+a+"4581200622692318530"+a+"-7445330906132712462"+a+"-3407411028378675214"+a+"-1004304845850312410"+a+"2808995768722924824"+a+"-7419835825599250603"+a+"-6807925616761556551"+a+"1936216879258578253"+a+"-6348070543052994410"+a+"1614786878786713233"+a+"-5654559563900278353"+a+"5820129333800018049"+a+"5154364084337309192"+a+"-3464890808271116872"+a+"-4318936345310964818"+a+"-5626360026645142603"+a+"1293650924267343356"+a+"2471203500047040188"+a+"-712553739691690470"+a+"9167570520793817086"+a+"5013905130782787526"+a+"2777832819171815927"+a+"4135658959316588118"+a+"-2228943220984283369"+a+"674121904757229053"+a+"-3361067987947841884"+a+"7064783233989236045"+a+"-5391381845337433122"+a+"-4203419284375340292"+a+"3231478719940633443"+a+"-6595059738477077526"+a+"5613738046953226965"+a+"-197825565075612318"+a+"-5941132321697548615"+a+"-5022645559955105889"+a+"2753333873025761953"+a+"3497927560388209810"+a+"3640569866216107917"+a+"2764752341909112546"+a+"-3378489093995131761"+a+"7719703463309362484"+a+"8643252989717845421"+a+"4133119366303995308"+a+"-2991525574328818422"+a+"-7462382354512214606"+a+"-6717862793825856953"+a+"-8546283547873015304"+a+"-4444395436889676762"+a+"-6794705649725291844"+a+"1377850869896378480"+a+"-8597944961814495158"+a+"7420018464904971801"+a+"-6568048747782992956"+a+"-2694483410167439967"+a+"-4025939108850206683"+a+"3886103463501532092"+a+"5252778460490334083"+a+"772493505011565108"+a+"4355897471393001620"+a+"-7052733073642657010"+a+"5904487723960627314"+a+"-8146905456250566165"+a+"-8272241648972884830"+a+"-7934734311001305167"+a+"2010392804516600146"+a+"7874061753723159658"+a+"1059646048071497698"+a+"-5622128739721761941"+a+"-8033788182892224091"+a+"1681547684630988216"+a+"-8578467634091990297"+a+"2189697668985640615"+a+"-9057682179067006414"+a+"-1356089288923443518"+a+"6251560713478074317"+a+"-7440046837958393615"+a+"1407158692292155781"+a+"3638531630121371096"+a+"-5051222424910285137"+a+"8617692886982373758"+a+"-771846938902200212"+a+"9072050023807745838"+a+"8787982956208638510"+a+"-1956190184658266206"+a+"-2862239626779971973"+a+"1831224464858060125"+a+"363934811746518001"+a+"376467262166035287"+a+"6770131145159335561"+a+"-2135831974748139041"+a+"5965177247077212447"+a+"-1053074797557834307"+a+"3894274936040760113"+a+"-701226959499860586"+a+"-4971357087908581658"+a+"-2510796846816028268"+a+"-2763699793663141038"+a+"-2193985648512765627"+a+"-3800478500522195208"+a+"7210248384674878403"+a+"-9050763110164892016"+a+"1440746149807037973"+a+"-1805372186674750455"+a+"-5335339145116455979"+a+"-7968313964743603760"+a+"1610185178406045202"+a+"2860222084584494674"+a+"5303527859614604407"+a+"-7562546697716829248"+a+"6597943858596228268"+a+"-8907697576023998447"+a+"-3575500776925217796"+a+"-7958636610358587060"+a+"-8107266756400855241"+a+"-4700514041937280505"+a+"5877546935738010841"+a+"-4157679336113634774"+a+"-866169437012159125"+a+"-519149397509148680"+a+"-1239516179709190615"+a+"-3591275203580560048"+a+"-5416867314018121244"+a+"2011882474728252719"+a+"-1249066890309108695"+a+"795894744629523832"+a+"1870033377415365283"+a+"7931444137659674871"+a+"-1613624103293423427"+a+"-4477239753922589277"+a+"2789326393421386123"+a+"-3956705666753899741"+a+"6952758292831343594"+a+"-9124954842584228461"+a+"-8913383325917719323"+a+"-1530517842030475129"+a+"4580517046080662618"+a+"6020543604287522383"+a+"-8313848571134926884"+a+"4378514641236109180"+a+"-1461513090215862309"+a+"8409570101072434851"+a+"-1581636631324609790"+a+"4985058713276173408"+a+"-3666677716973341728"+a+"-1138120895461130339"+a+"-8647293314984524598"+a+"-6242226372265798124"+a+"-4195674850310824450"+a+"-8025745418184206063"+a+"9166961009801828875"+a+"5645574108510892668"+a+"-6513490803768630160"+a+"419860506409678358"+a+"4628472513534946947"+a+"-6125375997686482174"+a+"8713691847195168404"+a+"79233487798602119"+a+"9030439487046511954"+a+"-3335074557944176364"+a+"-9112536869351283348"+a+"5506739399048321668"+a+"4391535639955683707"+a+"1182096354322836130"+a+"-4189716190893374434"+a+"-8108075268671436562"+a+"907315093125629542"+a+"5099587814404079265"+a+"7255914369947154549"+a+"-8497772614830644754"+a+"-8980458147983441823"+a+"4355717191891370378"+a+"5163662158015050589"+a+"642450610174575726"+a+"2512022470863144218"+a+"5867768034875490779"+a+"7009699371371301226"+a+"-4678350211651627618"+a+"3171964376763313190"+a+"-2541677689483086699"+a+"6868929630897619794"+a+"8896393380856350065"+a+"3256413860684177278"+a+"7947404321164296636"+a+"-7136357900952191378"+a+"-1787874428808322275"+a+"-1909293774457715715"+a+"-962763231242985253"+a+"3144911297249975614"+a+"1635293553987010975"+a+"-7409000498997087773"+a+"7471404851632915837"+a+"-221788501736437790"+a+"-4834067343892173771"+a+"1843086477154155861"+a+"7762358378021411765"+a+"-7883987165262218079"+a+"-4832545032610927903"+a+"-7856151567747625254"+a+"8112294323392812183"+a+"2147457973446013030"+a+"3162605413913990893"+a+"-6241001175762465825"+a+"-4153935579094924612"+a+"-6836084797928767682"+a+"-7922740998765985950"+a+"-8286733228449099979"+a+"165474130709530306"+a+"8981835088952978651"+a+"6870670037465619855"+a+"8496640850198065550"+a+"9204058999899671498"+a+"-4141186845058550508"+a+"1500317335225211272"+a+"7376705741729030659"+a+"-2733827060712336392"+a+"-736100079787053981"+a+"-7374437899094417756"+a+"2998950665528577681"+a+"5206106823411946743"+a+"-5760503793238003611"+a+"-8077682605801914369"+a+"4974691974637362327"+a+"-5520822721479891854"+a+"-97385634439813026"+a+"4751027761590349046"+a+"-554734623826398887"+a+"4261232907331630236"+a+"-3877904463068326478"+a+"-1200761955800992339"+a+"8689324788599032448"+a+"-7186721122544475991"+a+"4581101067086820461"+a+"-3117700534889439348"+a+"5343477886491928216"+a+"-7604478837149955757"+a+"-6037273215371695172"+a+"5165744799859542462"+a+"-374447668056195695"+a+"16388724788412758"+a+"8253460125259419250"+a+"-6569214172912295503"+a+"-8717094298082195137"+a+"-5730233168237508109"+a+"-908590889278215292"+a+"-7226489171009378408"+a+"7125119707932286426"+a+"-4094070088707645583"+a+"-6063919202293485939"+a+"-7416198762070326548"+a+"8565586356009308799"+a+"2826160646987732376"+a+"5938653928721944651"+a+"-5936170242353617177"+a+"6944772947584989612"+a+"2674760137042854964"+a+"8198473816250439456"+a+"6075238477456639751"+a+"-1410177679316080184"+a+"-8679553113740033128"+a+"-2704524222108620910"+a+"-1662683524802684015"+a+"1358495828717983129"+a+"-603809051081115368"+a+"5201733909681005771"+a+"8385475040900806156"+a+"-5830383452713093941"+a+"-1699989529083694195"+a+"-4421200757131697895"+a+"-5629708279370816062"+a+"-3227544077375947664"+a+"-3587576668227512363"+a+"-7705344311177224593"+a+"-3084396123927745470"+a+"-2813967685312600197"+a+"3998873278639758673"+a+"3665225356353330915"+a+"-6382725419459673632"+a+"4881391723445800772"+a+"-393405380376257946"+a+"218287968678872366"+a+"357883437490793012"+a+"2169817681545352199"+a+"3761796379613896956"+a+"-2937543986411027153"+a+"-6568842530406442857"+a+"-4907325818318760604"+a+"4998687660767128322"+a+"-4122792092373408664"+a+"6223196777924568233"+a+"-5609721664606045472"+a+"6191840459786065640"+a+"4672152598398585471"+a+"-8081723278183199026"+a+"7257122800644000867"+a+"2696542281977394211"+a+"7821435047306895806"+a+"4458924087043593388"+a+"-4555258326668076359"+a+"1922071752751161260"+a+"6415041615191639956"+a+"4636581324506420654"+a+"-7278699817870051311"+a+"-7708360672347361150"+a+"1324828425148828946"+a+"-1785818096515512444"+a+"-5853032200056389503"+a+"8864019132592092195"+a+"7790064823061661551"+a+"1063300198569212577"+a+"7792106853609615999"+a+"-2045730603260331241"+a+"3788187586299179141"+a+"3441764699056418492"+a+"-7493825059720259735"+a+"-9197475196368341659"+a+"-8031729420558330031"+a+"-3035156294002477233"+a+"4810378928183933951"+a+"2307408210848947996"+a+"8129528756745183350"+a+"8297578512579342363"+a+"-4628336986701268764"+a+"4220639206593625292"+a+"8036151421763933883"+a+"8457782822542016930"+a+"1721635144200702752"+a+"-528532370838804470"+a+"-1907567658637800567"+a+"-2962749235290753620"+a+"-1709365963340874592"+a+"-7934050979015234576"+a+"-5467967731356776594"+a+"2436549407640329155"+a+"-4755487807525217099"+a+"3348895866742813082"+a+"1293186513277487772"+a+"147333763390209462"+a+"-4154994029739800431"+a+"-5606269404652356438"+a+"-6504788229966127766"+a+"1101930766158013466"+a+"1920037389890864077"+a+"-596760935114999868"+a+"6652161054891684050"+a+"7932997037661416132"+a+"451214340570898662"+a+"907504879033372947"+a+"-5540048174294495502"+a+"4874027944884790608"+a+"7194019250764315067"+a+"-1180340877722081598"+a+"-6705098494586119285"+a+"-4775840841600560227"+a+"-7568294098571282415"+a+"3194829375991497604"+a+"-949586488707947387"+a+"-7119156483783612849"+a+"-5321851869428093425"+a+"8057451224656603917"+a+"9025470315945902697"+a+"-4120953438790823092"+a+"3479675544630836930"+a+"-2588890758738643305"+a+"-2446135786479384347"+a+"6570933589019671104"+a+"-7460587847828646246"+a+"8117951627109794142"+a+"1278574761543419724"+a+"4355156144007731481"+a+"5294705619988460523"+a+"6370545119571223844"+a+"-3816975559796975341"+a+"-5431148533476913013"+a+"4792143332111679342"+a+"5569424248468850350"+a+"-6487577009744411051"+a+"2738118632653076620"+a+"-798328294195956547"+a+"-8299163629061180860"+a+"-1457564026416139184"+a+"5394256010933486809"+a+"-4973399890610300198"+a+"621271617561643061"+a+"5577570731625850342"+a+"-8044468161122764432"+a+"6200690179463580840"+a+"-7501453788118451887"+a+"-3000628561342215139"+a+"-8888329457271558380"+a+"2485958001112289649"+a+"-1147237103609785491"+a+"6652422839185385120"+a+"2748239554760845261"+a+"-6451037891984472738"+a+"1430238149445017059"+a+"-2621996537920703429"+a+"2222578011638657893"+a+"-4600079722998623742"+a+"-5101027077422971377"+a+"-8966445022847634590"+a+"-7203758692164246549"+a+"-52017057246791984"+a+"-2273361502515799085"+a+"-5673227018741665109"+a+"9196722197507445300"+a+"-6567949690213129824"+a+"8582264805422292500"+a+"-5020454389016530609"+a+"2176706303660388949"+a+"6598254869984499502"+a+"7726443684515370810"+a+"3788023174450597805"+a+"-7396279829682620374"+a+"-414566826835973221"+a+"334917670496684468"+a+"6545903246000230344"+a+"3159302915393375187"+a+"-8560960218944435478"+a+"-5548899126980842382"+a+"5356234276945339844"+a+"7633829593477582385"+a+"5945979013294920068"+a+"-4567723074575386775"+a+"1661520674219546732"+a+"-8239614336300995219"+a+"-240177115772242763"+a+"-8953869339872002029"+a+"2411018226134053295"+a+"7195376657135225202"+a+"-8233770635376837844"+a+"-5149016243774937620"+a+"-6179363232548880609"+a+"6092296202650265710"+a+"-4805133698057190017"+a+"-6354212838081638666"+a+"6694348192666591857"+a+"5598031767610571605"+a+"3024910246478227109"+a+"-6951710734827703242"+a+"7822716525244674559"+a+"963393641811653214"+a+"-2406318691508007814"+a+"826508348982591028"+a+"-1579142701085431479"+a+"7297929387480064388"+a+"1380792214707189822"+a+"3295031049744658815"+a+"3284810324689971567"+a+"-7588538314618161914"+a+"4301009527933011734"+a+"1130484873987861287"+a+"-8591297113101874759"+a+"-3210714133972683289"+a+"5154586943427152522"+a+"-4193463855189971647"+a+"-376431609407932400"+a+"5021110340265516655"+a+"7648328932517867781"+a+"-8546476864968721561"+a+"5288785613899671938"+a+"-4809049901156041048"+a+"-1880116244181877159"+a+"9015537485495535413"+a+"-5267014086548743487"+a+"5123518728962797793"+a+"1795472531198399544"+a+"3022599565131492557"+a+"-8730528497135525723"+a+"9220566957379280431"+a+"8833019111890700988"+a+"-2033397514229383340"+a+"-6381341138027165531"+a+"7588551433816593127"+a+"5799842542611454176"+a+"5619724887239697779"+a+"2353324000873662818"+a+"-1991375208699682010"+a+"-6919792924942791420"+a+"2994182147895903703"+a+"6692415087256339229"+a+"-4871355353972236471"+a+"5275179869443528045"+a+"8042280884158104496"+a+"-376420269953363908"+a+"6263088176396425333"+a+"5182172241015003330"+a+"8972966521669258038"+a+"-7276664514485426743"+a+"-5378180808162970352"+a+"-3685303685564653936"+a+"-5127852655386939872"+a+"548616584641283058"+a+"8164449020035601733"+a+"4810079842916321223"+a+"-4707693332204580821"+a+"2754027201511437962"+a+"-4509922984036153467"+a+"6370413349588604732"+a+"8320409773178053529"+a+"7039007976410883463"+a+"7106894676435275009"+a+"-2809438556549871067"+a+"-1211381355032103505"+a+"-7307298204907670142"+a+"8523677840776162865"+a+"8285725653280538784"+a+"5996593469111651125"+a+"4153670324452931642"+a+"229030452475666256"+a+"-8295788508630616532"+a+"-1965373018251653894"+a+"-5611593981401404143"+a+"-3695587189347699491"+a+"-1221969108939208147"+a+"-2939972657801657266"+a+"-7078096374241029747"+a+"-6861654231625701349"+a+"6363379236988393580"+a+"3845057394530936710"+a+"-7003878426734214695"+a+"1288488077274737553"+a+"771119377697186197"+a+"4591934766881650300"+a+"6913066875581196609"+a+"-3409117405525192820"+a+"-221371090258771016"+a+"7600311558228469517"+a+"6748268879508177593"+a+"9011322187420563096"+a+"-6603624039115619639"+a+"-3065654712670379623"+a+"-6989660198670243497"+a+"-3160517308974458357"+a+"4216552774322725152"+a+"-2996335011420467835"+a+"2863864253575772373"+a+"-7621293225327534470"+a+"-545538409911515142"+a+"9140583364836666812"+a+"-5140969305303368176"+a+"6656140948819540034"+a+"93544662858383350"+a+"-4755201878801920726"+a+"7361284953337231243"+a+"-2675344218305896448"+a+"-7108238313098643048"+a+"-2235754615074522304"+a+"-6286324348689275411"+a+"-4948971409936476391"+a+"-800968619982543415"+a+"-8079563792523913101"+a+"-3610968571897385858"+a+"5600745745679481907"+a+"-5566150746257613227"+a+"-8603813402708741443"+a+"1951713618413814190"+a+"-3615473705144668230"+a+"-3103394013239353749"+a+"7609441287170978331"+a+"-8595954663543476337"+a+"-2397033303076566948"+a+"8706877768214465313"+a+"-2833919119298505459"+a+"-5437716447901653930"+a+"3204018275194378125"+a+"-6881228659759674386"+a+"3655807233404763416"+a+"-8071166991944314146"+a+"-2882253571801104892"+a+"-4254916829421833426"+a+"-4966226050667361465"+a+"6400138949236237092"+a+"8065391540431081532"+a+"-8565217068574148958"+a+"-1039262401718743898"+a+"-7027115935055531316"+a+"-4839038525355799820"+a+"607283839032145901"+a+"5819199197390075590"+a+"8183342224186041755"+a+"-7638195753333090384"+a+"763230605389339928"+a+"3880164877363065917"+a+"6774168134657050106"+a+"5183571486536786229"+a+"-2412112714927998706"+a+"2170382415059976482"+a+"8928570569293051258"+a+"-3164633622520334319"+a+"-4874291569099455455"+a+"-5321689672409098347"+a+"-5318566050949026486"+a+"8467109878471673616"+a+"6243778283836892291"+a+"8129813969173457973"+a+"7026067937120947907"+a+"7230692457074218952"+a+"-5636207072045201714"+a+"9025616855807802024"+a+"6991347270039127005"+a+"-4134192908014033137"+a+"8052480968810038909"+a+"-298609796723154409"+a+"7063773791193231287"+a+"1903526289961421183"+a+"9078121936931350128"+a+"4919215797062406575"+a+"3062706279152348947"+a+"3069159987426254841"+a+"8785412768859969900"+a+"-1804937236104624863"+a+"-7919547674470913833"+a+"-3699510056810390498"+a+"3488422380608182937"+a+"-2987254178709073630"+a+"-9213463933924807027"+a+"4276958400750490840"+a+"5995923739289769474"+a+"-3578486352618504212"+a+"3793748595455569123"+a+"-2375328803450246449"+a+"-2368467245421371111"+a+"-7170151667937837637"+a+"3851161271436651564"+a+"-5040932034940683019"+a+"-5431617805185219792"+a+"8056902348189472081"+a+"8345438302799274206"+a+"8974378839299157243"+a+"-7795705370344518144"+a+"-6182887444190872461"+a+"-6744635907384095726"+a+"8688143914497602521"+a+"312301123947857446"+a+"153839440061591658"+a+"4481075050913262600"+a+"5493152155136443978"+a+"-5734316348038571103"+a+"-1237463632681147773"+a+"-9164417940517995360"+a+"2112577241684396365"+a+"7069977384985408086"+a+"8342004829581309071"+a+"5589441501667002337"+a+"-5851762190278682970"+a+"2349123061039463052"+a+"7057487017622652260"+a+"3294326484913833589"+a+"7917262643932877146"+a+"-2094061162517915280"+a+"1003752392099679578"+a+"-7192501163858833365"+a+"-3334727821303870921"+a+"-1384950698949877358"+a+"5445087923465358030"+a+"3719147868517768309"+a+"1000771643903128649"+a+"3516787711097740135"+a+"4105676075002773154"+a+"-3651552847191010585"+a+"2672778053191969126"+a+"285485396932943301"+a+"296620000461273275"+a+"4811535287028902846"+a+"-2379643207381041500"+a+"271481818151482985"+a+"6854618837286237314"+a+"5653593416179720279"+a+"62002831712282845"+a+"5853135014065169012"+a+"-3951484647610006172"+a+"-257362179695809613"+a+"7977439029994910002"+a+"2965871586653951722"+a+"3061775100769358674"+a+"3876220359403363066"+a+"-8734873363757811323"+a+"8210589182755985714"+a+"-8935096200912591038"+a+"3886239936245591540"+a+"2283494688500814077"+a+"1010721984573040537"+a+"-7245354850053978196"+a+"2542221557416216465"+a+"1000274955142240390"+a+"-6797492987035766321"+a+"-6984617498410261235"+a+"-7430749021601567133"+a+"-382287790784661682"+a+"126688746335494503"+a+"-5450785036780366233"+a+"-6262557503491400417"+a+"-6590263637308498102"+a+"-5710729975432547748"+a+"5129132715791132095"+a+"-4239743246379834592"+a+"6117849231379620271"+a+"-6490453226507920505"+a+"-5220787641275863906"+a+"37770212688319716"+a+"8511097093244097401"+a+"1921134795576723242"+a+"-5361574113624407919"+a+"6485812877315083405"+a+"-5173991477032582681"+a+"4635303733778455400"+a+"3798649405852839849"+a+"1181330636608158304"+a+"2389207354261632764"+a+"-7997803528543137078"+a+"6910199996450819324"+a+"-8434856108147276471"+a+"-5004471220842951168"+a+"-2001619584075815749"+a+"7103921392073379106"+a+"709184684415384406"+a+"5419968314411194366"+a+"-8052975715153740275"+a+"3080262723337237176"+a+"2717693202914529848"+a+"-5658009220703875004"+a+"-6356696196251465357"+a+"-9084955617602581791"+a+"2350510107389966277"+a+"-56493742978686747"+a+"-3235948282274805756"+a+"-259456143706900032"+a+"3328029298574307960"+a+"7969068043825100602"+a+"6539025660082780607"+a+"5106370333406861055"+a+"2581335450921275887"+a+"-6672857526609991588"+a+"-5066652041459919359"+a+"5483605257212992075"+a+"8441735440161894252"+a+"8228850532942701996"+a+"8305732054858339344"+a+"-8818868008826300459"+a+"-282885764699505067"+a+"-7792997597271080628"+a+"-476798431366675564"+a+"-8409934511333831470"+a+"-3520536162869449547"+a+"4683766191038939812"+a+"2735230483871692056"+a+"-6960428798943544324"+a+"6064369103064896440"+a+"-5862836756051784995"+a+"3048377571697603214"+a+"-8817670315059258864"+a+"-3448031242465560525"+a+"-3900155008609433239"+a+"-2436961665226831928"+a+"7843028895364926030"+a+"-1071910219054671079"+a+"6806460798781112441"+a+"545524036744485632"+a+"1504587669020371708"+a+"3554112186340809223"+a+"628102020023703941"+a+"-8396624437418437295"+a+"-6733341969134226973"+a+"9137671523974848441"+a+"-1085702134189209144"+a+"8591961235509762875"+a+"-4209972357817444144"+a+"5016820126477722770"+a+"6007620665778587330"+a+"8736230199649080611"+a+"-1357215413619140076"+a+"-3036455336440086759"+a+"5003131764641090228"+a+"-5840971401422059568"+a+"5299761606675594501"+a+"2479284086948775030"+a+"-169747718055302873"+a+"-6513577638796641041"+a+"4727002206625739387"+a+"11815200566638841"+a+"2414450272502428518"+a+"737732046466579345"+a+"-3078028411410513580"+a+"6989108583020941460"+a+"4710861758996393215"+a+"-3711166908562108248"+a+"2214719685325275888"+a+"-9168489986447261860"+a+"-5196529696442593211"+a+"7469613290795526029"+a+"-4245509300480970827"+a+"-7050208421107820020"+a+"-7521497792323050799"+a+"-7212250329377230211"+a+"-4802660503947805812"+a+"-6614648966347585919"+a+"3389716989987674621"+a+"2411396560958710551"+a+"2815259436105876066"+a+"2060795633551604799"+a+"-1162554289855525016"+a+"-4151205296736455969"+a+"7740556652714820776"+a+"-2424255571780643606"+a+"3773719908223681909"+a+"-642852958378017857"+a+"506546631674131412"+a+"3411343132685823182"+a+"8242176261806455755"+a+"-1677796581762359167"+a+"-8088487106477371682"+a+"8839352032934777688"+a+"-1664297978100182058"+a+"8954522650558186838"+a+"-7417626966935826748"+a+"5844470482620124059"+a+"-5001123985686870716"+a+"8630918871083620434"+a+"1361828739555435270"+a+"2586232242815655117"+a+"-5431290900140072310"+a+"-2089869348091893267"+a+"-6913226553364333014"+a+"982358703940022983"+a+"-5291211856488354467"+a+"3146802692737717635"+a+"3061042254470656569"+a+"593081081915838087"+a+"-3648293238944105671"+a+"3817895332992367061"+a+"-5977316325514420928"+a+"2445174291365627569"+a+"-7453194807437727266"+a+"-7135173348446715513"+a+"-4341245742350326319"+a+"-6990299696064866294"+a+"9099393862540895181"+a+"5906962556980591520"+a+"1463156951664887679"+a+"8685482748980954620"+a+"-8670616036689234737"+a+"668426796408964108"+a+"760821649250070373"+a+"6098571809297730326"+a+"8996934779491151471"+a+"5167580478289099805"+a+"-5379372579768555360"+a+"-1826855896863499895"+a+"-251724191324644229"+a+"8345304695203599110"+a+"-3921283866962585392"+a+"-6750195049995572309"+a+"-2839804251052455546"+a+"-2838169321476956577"+a+"-956982331721610085"+a+"-3509690395310119816"+a+"-647103879342140567"+a+"-7535121068312444252"+a+"-6849939433639848918"+a+"6188660516239622156"+a+"5919339453715746750"+a+"5053115779289394102"+a+"8548571500185153451"+a+"1253407665197945898"+a+"8816075272556462180"+a+"6819578958788515160"+a+"5771439029860895693"+a+"1099896890131308728"+a+"2822294418807232510"+a+"-5488141668219100237"+a+"-6814930941837472185"+a+"-1887449028126707647"+a+"-305262206501941645"+a+"-2957301348839879726"+a+"-8062343849720237487"+a+"4063931149976651890"+a+"-6945560963307518609"+a+"-5171358203014886361"+a+"-4696905411890596568"+a+"-7904166567572706659"+a+"-5642191283828687647"+a+"-3142095411129076476"+a+"4267259913372177039"+a+"-247567462335503303"+a+"-1606772255712405637"+a+"-1138796761196445405"+a+"6850063793273393481"+a+"1624415707017375583"+a+"-1164198493017002186"+a+"-5031881309379772897"+a+"-4704167066305044576"+a+"300552169175114575"+a+"1256542356793014731"+a+"-6183375231683934984"+a+"8132934491731918817"+a+"4029472251436479721"+a+"-192705793541948102"+a+"2135033751433659027"+a+"1455584266359522526"+a+"-431828297761765579"+a+"2355469958751654983"+a+"-133589407284588488"+a+"-493111747751240086"+a+"-7965544530020185125"+a+"1294769335141647096"+a+"4061979167437331474"+a+"-4674577793798441504"+a+"2229585697079227307"+a+"-5414242843034985703"+a+"-1796177256198233677"+a+"-8813835129363277155"+a+"-8316830614187561193"+a+"7467003029608100024"+a+"6813374084828983949"+a+"-8380540489992454526"+a+"8148069224161672884"+a+"-7554729934777737559"+a+"3699415912884948602"+a+"-5228105685932031373"+a+"7486295599635387325"+a+"-8315916849048610046"+a+"-1265934245220496332"+a+"869408855926444762"+a+"3124164783922938000"+a+"2622058283875392416"+a+"6966819816830554590"+a+"-9083519918290447324"+a+"-5702091036824848082"+a+"7213286784638864033"+a+"7931674308865727865"+a+"1217078156180791107"+a+"-6728535210190855233"+a+"-7969996239948903704"+a+"-5122150647143637648"+a+"-270273220242567638"+a+"-3061305542137677556"+a+"-9086820896664105827"+a+"-3725106682971891443"+a+"-7335602555283711916"+a+"-4241856931197537020"+a+"6414441892533219754"+a+"4923291868857182465"+a+"-2238034931126403266"+a+"-5548291588014287049"+a+"-3613397896346811841"+a+"-444831690879303712"+a+"-174090082062267671"+a+"-4502104439015034018"+a+"6966017876080357710"+a+"7406710172021949090"+a+"1860179558197352025"+a+"5059137267429724625"+a+"-7151826351928790769"+a+"5733657672065233188"+a+"4520810228567075864"+a+"-7333899404846243825"+a+"-6883092737419798658"+a+"4366096293893496485"+a+"-831211520620006733"+a+"-2070730996140986054"+a+"-6122918534230011176"+a+"8591014096129538633"+a+"-2932515908185347780"+a+"-6172465947165241704"+a+"6627779855106944546"+a+"860134131205302169"+a+"-2545779493082303546"+a+"-7421938253750134765"+a+"-6434442159326501470"+a+"-3820319822167988479"+a+"7713795869884446701"+a+"6987845812456879290"+a+"4067197575400098660"+a+"6929605052833795665"+a+"-5071225823069615797"+a+"-6528382877278039234"+a+"3841845750105881526"+a+"7024959044443033917"+a+"2694800765195953668"+a+"-5187774918085199242"+a+"-4774807374950964820"+a+"-6651516371223242275"+a+"5402324599728161595"+a+"2303362292061219291"+a+"-6703936456847176803"+a+"4251181594352644398"+a+"-4810153558637401702"+a+"3120785562651363852"+a+"1064230923889069987"+a+"5592117723558033294"+a+"2500967148379218383"+a+"4543293162164153676"+a+"-6382337212061286369"+a+"4950508513939762500"+a+"6639695632068391177"+a+"3852356517429469183"+a+"-1834993927947325388"+a+"-574469187780736266"+a+"1791511302785115519"+a+"-2510985863334721231"+a+"-1271182415669655481"+a+"2833131677966051888"+a+"-1888666409583758615"+a+"-7575768070255551729"+a+"2789451380098296453"+a+"-855761797827183132"+a+"6200333634774310661"+a+"2532787015795004267"+a+"5732788468327016285"+a+"1572576694474513125"+a+"6690274443971690003"+a+"-1416599760413078468"+a+"-8873558753980022270"+a+"3520034515647107178"+a+"5895387026777833306"+a+"8970487898880039964"+a+"-1994332234697898774"+a+"1256148449635750034"+a+"7068847807288363425"+a+"6497856795776861896"+a+"2533382161003325009"+a+"-8546900859753109286"+a+"7050920184133806006"+a+"4204241594405846436"+a+"7412992732973120695"+a+"6323176360460995240"+a+"788068822434628843"+a+"5809215686853242932"+a+"2435328253140599646"+a+"-3438172829650951228"+a+"-5260828684075255404"+a+"-8452227779893367644"+a+"-8583970913160499507"+a+"-1141806410215078183"+a+"-8347846439953324150"+a+"-5848845680367710143"+a+"8492146215224643919"+a+"3192550119083762681"+a+"-1940597170917955925"+a+"-6311085176920881154"+a+"3313976597559381877"+a+"-8261432839191637738"+a+"8508517589948285271"+a+"-3942417032281399056"+a+"-7868239781541141360"+a+"-7207936619714796918"+a+"5951216312047681781"+a+"7581930953926551762"+a+"-5218098199538452680"+a+"4046620809464009616"+a+"9156388253171518060"+a+"1775420769584324226"+a+"-5503602516028621368"+a+"-5417782825043706168"+a+"3259607017327889066"+a+"-8165578551036038526"+a+"-3571561465349852449"+a+"8682163221699536567"+a+"1820937297130664737"+a+"-7637037009265731720"+a+"-3430018756137657888"+a+"-912486006008721851"+a+"-4597466335087098299"+a+"9158803880090608302"+a+"6309689325780931443"+a+"-1043259274818805443"+a+"5818507431422309391"+a+"705581125799181459"+a+"-8243036360534097406"+a+"3506710962377813200"+a+"5283929545352660605"+a+"5433965584487276856"+a+"-9141396997152817603"+a+"-6478773767990106094"+a+"-5840973237079482865"+a+"-3328512888182984493"+a+"-5628441720597980266"+a+"1362509993150631036"+a+"-6186720857272451508"+a+"2806474292451381311"+a+"1472420199765605574"+a+"6504226866074435176"+a+"2336878939403643451"+a+"-2015466886114682501"+a+"-1190820901020960698"+a+"-8270478624074250856"+a+"-7954036542520749846"+a+"-5313855420375917529"+a+"8784094970832030935"+a+"-4096265019124345424"+a+"1877372637773629931"+a+"1345965335397117450"+a+"1017298834024801787"+a+"-4281347732403722569"+a+"-299499367626792494"+a+"-2752679177386898546"+a+"2039234325941596281"+a+"-7646426291870655078"+a+"8814611568318314168"+a+"-2968477228040763326"+a+"-4419558618188022052"+a+"-1279218774105815895"+a+"2630489381818213563"+a+"-2764095333472874665"+a+"1721324049525030389"+a+"6255319953520301080"+a+"-2002207623368113540"+a+"2760564714094670884"+a+"-4527083009644693163"+a+"-221316996272960896"+a+"5272147133459262879"+a+"1662442750623568547"+a+"7114576635075014612"+a+"-1592395570280065701"+a+"-8055360728481487026"+a+"1905364447584354289"+a+"-2982613330646927347"+a+"3579716359614024075"+a+"-2853235326282940233"+a+"-6255093129477813551"+a+"-2660856547893725985"+a+"962189559835700179"+a+"-3403904814775855223"+a+"7761786006706211882"+a+"1666469024181410285"+a+"-1912341427069089444"+a+"-1529985830943006085"+a+"-8541889599851837563"+a+"-1675345010039275489"+a+"532566178923438130"+a+"-4106346450321257018"+a+"598900968746965904"+a+"7922103854326614559"+a+"2337244455169431493"+a+"2490340063075084197"+a+"3830021001185755805"+a+"-7007934027523188515"+a+"-6897508927103841943"+a+"351471946072366300"+a+"5325622335760933667"+a+"1999537315104100364"+a+"-3174507437725673258"+a+"5725229761576174895"+a+"-1668434791850086340"+a+"-8518953713969632606"+a+"-2195724924957090648"+a+"1833142190359232486"+a+"-8071691875553813978"+a+"-1098776314952802468"+a+"-3732554868283517216"+a+"8281197878747701327"+a+"-2681793846913003838"+a+"-7423965503951514312"+a+"5715757995104550241"+a+"4949326775746718268"+a+"4867992385340508696"+a+"5710183806056540152"+a+"-5859943850115280268"+a+"182212408834907777"+a+"1818148288680146641"+a+"-3629129893088723802"+a+"-7989454558875562684"+a+"-3490491636040018057"+a+"-8546360654909202756"+a+"4884975390754858506"+a+"-7335006185981160861"+a+"-8863534872989633156"+a+"-1023968830742254775"+a+"-6984065759005173450"+a+"-4719440043907597244"+a+"-4226053935092114575"+a+"2857867506883982865"+a+"4609884073900339707"+a+"4451416470189798334"+a+"-1790877776461694150"+a+"478010840764229964"+a+"4577366484915324785"+a+"-4239516104547444593"+a+"822225014414504514"+a+"7207238466391339097"+a+"4951445340652425331"+a+"8865187376622680535"+a+"2714097382994507252"+a+"8555581644391577658"+a+"3395195158292748320"+a+"-7121855846819635559"+a+"1454609179663126595"+a+"-2363070738518048747"+a+"-8561489505556069796"+a+"-1623367676149883331"+a+"2930039982060989475"+a+"-4755382472985052748"+a+"-3892494289724415923"+a+"4637043986058348817"+a+"-6153579724097588723"+a+"-5546607401430173178"+a+"-1492220491073383202"+a+"-3503786864953810749"+a+"-1290487900048395137"+a+"3634542418448824732"+a+"-4729608041549018817"+a+"-7349905448557731608"+a+"-7872415943966872454"+a+"6328897134929241388"+a+"-5279495431135252126"+a+"7306152281150969721"+a+"6916430824966538754"+a+"4838879110959529490"+a+"-7503253719632240512"+a+"-2043554315794248367"+a+"-222316953353634654"+a+"1616782040888740554"+a+"-8096203459022180973"+a+"8781682587717369520"+a+"8324353734053349349"+a+"-2419660470439880841"+a+"-3691601252123449383"+a+"2601750435265700795"+a+"572261106233661406"+a+"828178224839624288"+a+"-8228342371067159721"+a+"-3973182455293867783"+a+"7921032521626788257"+a+"-6654921982150332307"+a+"-406383609697491628"+a+"-4195424171906992169"+a+"-3465676714700260409"+a+"94265070605211054"+a+"-3064896205951182631"+a+"-7072496700196212954"+a+"7794720126715939567"+a+"-4158983032514978348"+a+"4428076845375714104"+a+"8720339297002777496"+a+"-4170548367659581897"+a+"-6547860335574357834"+a+"4227777302599737474"+a+"-7769812357111840698"+a+"-8462691960494842937"+a+"-4126880118004338994"+a+"-3178556423612559345"+a+"-2893699215683698899"+a+"5728596538128194886"+a+"-2530819841322864198"+a+"-4881143718204761862"+a+"-8420287773053587028"+a+"5264312276687903843"+a+"7360172920728911035"+a+"8371029073758744227"+a+"9205148785879081223"+a+"-1859431348752003251"+a+"4779214870921360697"+a+"-2063013850550115029"+a+"2514214861790801639"+a+"688298976672994619"+a+"8808625389252426557"+a+"587348595105842683"+a+"-7581495858151965224"+a+"4295383171602092774"+a+"629679749050259957"+a+"6092738940327867453"+a+"6260135336894425546"+a+"-4262258001311703286"+a+"-8787881097085417421"+a+"-5202416122214735519"+a+"-1094098867178024815"+a+"1709204469615558377"+a+"-3316808189245409041"+a+"2267394113742131610"+a+"802800796592269925"+a+"6020346596949291719"+a+"4362371798306536385"+a+"8147690838823759967"+a+"5329989234928530019"+a+"-956912212156919185"+a+"4035164394108759399"+a+"-7340616756424887062"+a+"-6828152481843798263"+a+"-1748445625762825812"+a+"5935050953898588229"+a+"6471613704674711228"+a+"5426422518887852734"+a+"-8790361958224476975"+a+"1147984286589838560"+a+"-3115084918500945385"+a+"-1593393110477083576"+a+"-7746577747169796814"+a+"4855479966532713058"+a+"-2825966073810846589"+a+"5670921883372339027"+a+"-3351030363975248471"+a+"-6092554852842475750"+a+"-918784283786254007"+a+"597804758834183409"+a+"18896378189469458"+a+"-1063461360426292999"+a+"2503142469566864891"+a+"1649538650540360725"+a+"5925412010083294415"+a+"-7082343544609649131"+a+"-500286861472885014"+a+"2034306255648969239"+a+"-6989721939152109244"+a+"4602789961892980009"+a+"8689747571345005486"+a+"-1096909470010447053"+a+"7449484639121005148"+a+"-3983249628107405805"+a+"-3106467780176616541"+a+"-4052581199502978295"+a+"1238644263796516354"+a+"1511210825552075349"+a+"-8959283836232840602"+a+"-945526196915645153"+a+"2486934434776549033"+a+"-5179581557244449386"+a+"-5130230789857012645"+a+"-1895142657148494502"+a+"-8885930504481779771"+a+"6872214327519481374"+a+"9005968565140898602"+a+"5766450694901080201"+a+"15290732226421328"+a+"-8181491785068085923"+a+"861492339862927934"+a+"417000764276266202"+a+"3771665283774978374"+a+"824247452788125796"+a+"915050746900771653"+a+"-991268011348657565"+a+"5046823091485279785"+a+"714851461640937578"+a+"-9013898845762846029"+a+"-8969084512827133030"+a+"7172471193941949821"+a+"676000395376995144"+a+"1048894728609279038"+a+"-3254442066135634467"+a+"201729189762167629"+a+"7312182024186004478"+a+"3135803949473351523"+a+"5531867581893384684"+a+"8247817870075144100"+a+"-3853860775957597396"+a+"-6308950247999654944"+a+"-4274726932216138646"+a+"-1285957732812479723"+a+"1982895588695926681"+a+"8748824578821627448"+a+"-5983709949530218913"+a+"-1709967482004339916"+a+"-2702262020059146576"+a+"6920158278268474418"+a+"-6506553802338482760"+a+"-6589983316832561381"+a+"-3536094890319057666"+a+"-6915112845813208742"+a+"-5611867381828969018"+a+"-8066425788823614490"+a+"8754414329208983222"+a+"2052724808302422911"+a+"3214867679022081979"+a+"-254682339916322505"+a+"-2334236347464456147"+a+"-4089317706480064717"+a+"37563162890685232"+a+"407258492470255027"+a+"6651276108069654110"+a+"4700627022992276559"+a+"-4051813786109247838"+a+"8217401500665338754"+a+"8031632944018173798"+a+"-1760086780027911572"+a+"3030576104638562288"+a+"5710845799058769107"+a+"-614527972619889911"+a+"5682301044697611626"+a+"4776538540287909087"+a+"-1877447658871953322"+a+"-2533846628267513044"+a+"6552807816608129517"+a+"-2426525631037125738"+a+"6980954227435834816"+a+"-411591148764957608"+a+"-5258297969590195749"+a+"2619912957802173218"+a+"3218030450269655626"+a+"-619857944519317954"+a+"8002138058496669919"+a+"-8617705397551152141"+a+"-6437985726951369421"+a+"-2392199700291849170"+a+"-3421262753709518615"+a+"270156923239055453"+a+"3100544481691055161"+a+"8393385566088338846"+a+"-8766691689819679060"+a+"3411955047397791001"+a+"-942425660583552988"+a+"-5494089038893429079"+a+"1753298991032837663"+a+"4144485748098179521"+a+"9019756284128792892"+a+"7485522681383997581"+a+"-7749912962192279811"+a+"-5881896743911665321"+a+"7867326394818151373"+a+"-8828652256441447892"+a+"3231359801897619781"+a+"-5626130456934604098"+a+"-1965805744061946710"+a+"-4171903438904536948"+a+"242034066052370874"+a+"-7369023795040730816"+a+"6835741057618871719"+a+"774134065756964695"+a+"3465141288353005155"+a+"-3779358901714703098"+a+"-335320531677285858"+a+"3823006291557437788"+a+"5623219083725351692"+a+"7302740712840721315"+a+"-365458260827579541"+a+"8831535489520374028"+a+"9085006203827760580"+a+"8836704309237217418"+a+"-1823987370402081424"+a+"-5749446645166180099"+a+"-2471832494310546595"+a+"-6769001460762948205"+a+"9027118050139104018"+a+"-5768767759454835605"+a+"-2001078439708359696"+a+"2707266383359417210"+a+"758886391697560250"+a+"-4236177634611630158"+a+"-676183376821008554"+a+"7398874329266821728"+a+"4540944464450890452"+a+"42911468472215765"+a+"-4119021015193839185"+a+"-1177481591298844088"+a+"-693624857635527085"+a+"7921082210898178042"+a+"-4499721676330688545"+a+"4154259593529957275"+a+"-7166338548810268373"+a+"7753365296107548652"+a+"-2186225041970443252"+a+"7423701828375082917"+a+"812898257941157078"+a+"-3677169155188304232"+a+"-4703484088985861598"+a+"1187813145481451797"+a+"-3858671828440955696"+a+"361165121593087376"+a+"-8030026277547193265"+a+"-3836690016476314495"+a+"-7559410562141455589"+a+"5883887792631591563"+a+"3413382960269418375"+a+"4168686984580362464"+a+"-702820759068904260"+a+"-4363885676806133789"+a+"-3658075758606536703"+a+"6790627677296078862"+a+"7057596009493732924"+a+"607510813918713109"+a+"4819551316096669112"+a+"5145836395770980171"+a+"5761136386777137191"+a+"1481064066111110981"+a+"5693144445371285739"+a+"9129919572780718012"+a+"-1504083653860623472"+a+"2070890902742098359"+a+"1480565051121909405"+a+"5499577503853737705"+a+"-2776125582052960628"+a+"-2480684312588104105"+a+"8771589187068513557"+a+"8067467929933420349"+a+"-3295423683867813710"+a+"-3361578417678328270"+a+"-4121009223520157601"+a+"392997535814475914"+a+"1789296450207299490"+a+"-3697713259734978053"+a+"628631279980394186"+a+"1538142610757949570"+a+"3014708050390717307"+a+"8368027918365770375"+a+"5272761268686019945"+a+"-4588282506250667201"+a+"735613646452474722"+a+"2336131046108152145"+a+"-6713652582424902510"+a+"856426609358693308"+a+"-5764760478319988222"+a+"1317764034487519479"+a+"-7663689255410432927"+a+"1564984526161167449"+a+"-1237279123716355577"+a+"5332338165481348539"+a+"-4286101521344581322"+a+"-2692886887951257765"+a+"3081220136049308322"+a+"-1005407527749730814"+a+"8269155628421292083"+a+"-3673754564856205463"+a+"-3050564424808653816"+a+"1125071308475499224"+a+"-5974287850071950401"+a+"3330249117666619408"+a+"7240820503676705779"+a+"1642205853975580779"+a+"518033395482912773"+a+"9023735332483216960"+a+"-362521542291383777"+a+"1416200491926804108"+a+"4319349826267477878"+a+"6098681376734062798"+a+"-8811971102703039282"+a+"6099455912858083633"+a+"-3751004972830609597"+a+"-4558788276728518416"+a+"6603320167334266181"+a+"-1879326311614760715"+a+"-1518535272556061725"+a+"7939639866029472452"+a+"-3942568855900091315"+a+"-5149216631387827305"+a+"-6188272913878747757"+a+"1204133292757319113"+a+"1830936117936836274"+a+"270507518630958199"+a+"5964034136794191057"+a+"622086613391553891"+a+"-4044109720903427641"+a+"5309401104600816924"+a+"5854709978342127329"+a+"-7113119392306929317"+a+"-8296314090384807967"+a+"7792947881051106736"+a+"-1831540041133485496"+a+"1844404915791308381"+a+"-2900049116190081832"+a+"7604043466623112578"+a+"1385230110345476947"+a+"-5233101492963391879"+a+"2471267247780565641"+a+"-5995778305748913277"+a+"-3209698986461865839"+a+"-8279215312170063453"+a+"4462971907002684758"+a+"6281311314716264138"+a+"-3257960478385428651"+a+"-6828294302956554701"+a+"6799612423185477796"+a+"-8281268754176717040"+a+"3538859237519118389"+a+"-2495284552219494042"+a+"3289767735159024475"+a+"-7262666652027208395"+a+"-3342179262643369074"+a+"-2686393516999860261"+a+"-6369045581584952214"+a+"-4896397163081092167"+a+"-1106429552471910915"+a+"7550618187091230230"+a+"-3232241069305036991"+a+"6993448705049974595"+a+"7709134248993830119"+a+"4482583112596121856"+a+"-5635393839918231466"+a+"2762742040278609694"+a+"3916419401481784050"+a+"8868887623616044645"+a+"-1818632570137175647"+a+"193235487359260087"+a+"575074970976058506"+a+"-8985585339031454347"+a+"-6338853231125756129"+a+"-2809344250173212384"+a+"837100051196961885"+a+"4519444928612470595"+a+"-8831458533041890478"+a+"5466635346572995472"+a+"-2714544946149435425"+a+"-277477702503620791"+a+"8272532255686654911"+a+"-7610619522511862815"+a+"-7645326188242355257"+a+"827795157877760994"+a+"5437190065560014191"+a+"4167221504951586321"+a+"3082414627465816208"+a+"-6734643063912253745"+a+"-5276964537776660114"+a+"-9094362759722103871"+a+"4595818775753481977"+a+"-4087241889267933773"+a+"-1257608924355595952"+a+"4351732371950830777"+a+"5193138130860379269"+a+"-3916941014212287849"+a+"7594113146195159975"+a+"-8695075429018720414"+a+"-9144598542982799364"+a+"5626727214029601894"+a+"-3146570308898533234"+a+"4432451326092638538"+a+"7168622808530513384"+a+"684393440237651826"+a+"1760316058825137697"+a+"7243506489618044836"+a+"3685158225175864601"+a+"1600300354429193709"+a+"7067462904497261826"+a+"-839954699824199739"+a+"-1731844344041729246"+a+"4120365338300145777"+a+"4700617060120681686"+a+"8570705998246156200"+a+"-7062964399243872039"+a+"-8817049929142337927"+a+"201542101853499590"+a+"5238720077424184939"+a+"1788514135136726747"+a+"-8309715731125793051"+a+"6115412997633031167"+a+"-5346494036408308528"+a+"-6068025858118821371"+a+"-5932259412207441798"+a+"2351995352859508274"+a+"-3746484280315839043"+a+"360454599848620028"+a+"3132381951388494432"+a+"5049042146436485140"+a+"8898775546803910332"+a+"-1202919124881683546"+a+"7041178572098397346"+a+"-8166280725402746913"+a+"-8310610786421217156"+a+"2015340129615385007"+a+"-3112340769538256718"+a+"-4753441222255821360"+a+"293846787812835150"+a+"7664185921988945158"+a+"-2429261855800845854"+a+"2299891343418022055"+a+"-3968905011777301591"+a+"-1072388405629031587"+a+"7400575921342068203"+a+"6126585323173628458"+a+"-4199825813150659930"+a+"4717958064551551404"+a+"8447775056038382954"+a+"7550816180641092514"+a+"5053394191794161284"+a+"-374394710832856914"+a+"6673982621964317790"+a+"7769099750366112347"+a+"582083892204824357"+a+"-3924934516439453342"+a+"-853371098297634132"+a+"-1744211355889126359"+a+"5874904351329622672"+a+"6480257425044410763"+a+"-7287975933281248101"+a+"-9009208460900232226"+a+"6894996998655032685"+a+"-7166863071074039759"+a+"-5043653784276649128"+a+"1340755988030801365"+a+"-5805692447290684532"+a+"-639637588574950882"+a+"1992946243761046899"+a+"3236727614859775082"+a+"-992892522569080738"+a+"-6739338734913933726"+a+"-5698245368860006559"+a+"320432080719244416"+a+"-154166996144617606"+a+"-9045262093639175472"+a+"5979842622142929912"+a+"-584268127486379527"+a+"-6285866132203004646"+a+"4263905288286539902"+a+"-6827235910360165131"+a+"-3833636050304093119"+a+"5742151528782102171"+a+"2512406733069500489"+a+"6777198207780713337"+a+"-1392133474325269820"+a+"-5402246813652006143"+a+"-695336947609858225"+a+"-7869633046346805112"+a+"-8254465118773780108"+a+"372642895695868784"+a+"-2168967434964442253"+a+"6016733552586085769"+a+"9166421280254987588"+a+"1044428613109144500"+a+"-8744502771805909028"+a+"3543447616884352201"+a+"1070423814532890799"+a+"2808313361837951674"+a+"2402973008482417014"+a+"5283082923061875192"+a+"1005241756636803121"+a+"-3707900364373038315"+a+"-2537550726905607313"+a+"7535221891479136938"+a+"4745685907260503757"+a+"-3989952935921968262"+a+"-6396042900849329221"+a+"-1912658222926410025"+a+"5559729587433038470"+a+"-9042158123009519804"+a+"-7508469492255465583"+a+"-5802746913634379429"+a+"-1030766020219629339"+a+"3996466211969482480"+a+"971307730651647981"+a+"-8204818657440638857"+a+"4246419169617795961"+a+"197105093958543522"+a+"3987224458460585484"+a+"-5566995006900283826"+a+"-5090718343345925037"+a+"-362961194757726049"+a+"-6766655973311703054"+a+"-8152550618578079383"+a+"8727484798650946182"+a+"3277520600155189713"+a+"-4825917241716417305"+a+"6404577761645561139"+a+"-4088708628546203987"+a+"-1469454737835569594"+a+"360256153285427701"+a+"-4096673187546291586"+a+"3028455180906827621"+a+"-5697812617708302415"+a+"-6199077867733285268"+a+"5869119992708290557"+a+"3047200773521057230"+a+"-1935573449143760920"+a+"1181227474209347679"+a+"-5192436270056813880"+a+"-5981835572353713650"+a+"-2378640542305853084"+a+"-8845131644051969755"+a+"-6504576818889302309"+a+"-6549477532194232370"+a+"-2788711288451297340"+a+"-2832019670072094248"+a+"341748228777783190"+a+"-2903458835888903493"+a+"-129880745849696182"+a+"6381150392315725785"+a+"-30597152500213698"+a+"4960038852833483526"+a+"5189131457881111132"+a+"-3379666811891769014"+a+"-4795960766138987397"+a+"-8538291988532430363"+a+"-5011019319379369980"+a+"-3466784809454327406"+a+"-7244399554717482792"+a+"4037898002906123792"+a+"7063786579803962993"+a+"7035924209773118941"+a+"421385459932308295"+a+"-5379985667116707772"+a+"-7292085578809000332"+a+"-1634305536860165734"+a+"1928407863900382106"+a+"-6697146387006003261"+a+"6557690716054209796"+a+"8930733808836057851"+a+"-1158662967726257141"+a+"4585941391178004178"+a+"-6840073792724806726"+a+"7050725063443220344"+a+"-6111592916421269067"+a+"7974338844007528250"+a+"-5760358258195547818"+a+"-330810618067720116"+a+"-7082179771767356136"+a+"5552363012933789385"+a+"8688981596976075320"+a+"5500270448714413815"+a+"4068339518628719257"+a+"5622887313234789326"+a+"7476523530169391335"+a+"-2439863629179014726"+a+"1586160239952639"+a+"-2384342299521656417"+a+"-2832172495405922674"+a+"9186454350340599838"+a+"-7119506664283046921"+a+"8722237800224251158"+a+"-8028932238977825926"+a+"-6679633586158794899"+a+"-4128085193502769006"+a+"-2694889702010005232"+a+"28060721560266653"+a+"-4036396181941043401"+a+"573627557196513730"+a+"-2886825953052529939"+a+"-9021853037597226226"+a+"6639775871172040143"+a+"6325282655181082336"+a+"-2828784674020405485"+a+"8053228464922224263"+a+"835754613661258956"+a+"687616988668427817"+a+"-7115215555307553429"+a+"-6134585960732965914"+a+"4365544543977960840"+a+"-2153933826332711620"+a+"6426388724066702818"+a+"4934635694489665196"+a+"-3857729065161435740"+a+"103820663860486558"+a+"-8419482397683868438"+a+"-2219101567048493951"+a+"-5163267524901225598"+a+"-2240709922608058058"+a+"4095375526281218038"+a+"-2434822556161931858"+a+"-6097342827894248758"+a+"-2483085308495160623"+a+"6990649954638076417"+a+"-7748372183265049183"+a+"8769824456353646822"+a+"-6566599754748467553"+a+"-8767535561125982200"+a+"-5767847014813615251"+a+"16585727054975365"+a+"7061426797167339188"+a+"3342377856798498187"+a+"5424143702885061191"+a+"-4697912950102238436"+a+"-5183789779938242680"+a+"1332912957579573520"+a+"7162169011139090954"+a+"8029173537521838944"+a+"7949758510655971447"+a+"-8627477637634983776"+a+"4781328307785922484"+a+"-1547317671117136947"+a+"3562813702326426690"+a+"6464649078692052553"+a+"-5537771374198921753"+a+"3422296785291906594"+a+"-815183837930335859"+a+"-2469545167774288742"+a+"3183967805852812649"+a+"6195732569668481251"+a+"5560823059519075167"+a+"-6700605253108557015"+a+"-6845818076730311260"+a+"-9102092416485747754"+a+"-7466079552906411612"+a+"7552162934089048849"+a+"6274144703036091686"+a+"-5797395244716438394"+a+"-2410484764424650322"+a+"8218696676651047788"+a+"-1364874463406577118"+a+"6390770316670610115"+a+"2923279350716860080"+a+"8704806818765876702"+a+"-4708440064978677010"+a+"8392838990546337056"+a+"8120920544314427970"+a+"-6271220152228353270"+a+"-941748393170030973"+a+"6372744708489078132"+a+"7790274732062971104"+a+"1358384079472387866"+a+"-3608381090258920192"+a+"5917622351180168538"+a+"3095599168623588971"+a+"-653667630632311237"+a+"5891266588269467688"+a+"-7208969002187126095"+a+"-883548513504211290"+a+"2726760945793685790"+a+"-2982103471807609889"+a+"8914879214672593948"+a+"-3607349655557495366"+a+"8116698847766243705"+a+"308162547213815472"+a+"-1275284704403413630"+a+"-1778632605110201166"+a+"-3554963472166742396"+a+"-8997883784976997814"+a+"4735346424799974543"+a+"6795654028385140224"+a+"8043450937201975677"+a+"-3617029366231997442"+a+"7177497156531426610"+a+"242867771455100406"+a+"7622822328305617444"+a+"-4045393600264665789"+a+"8628123722466315805"+a+"5930021295582837582"+a+"1536042192894024511"+a+"2390698953619219507"+a+"9163375968628710728"+a+"4308476216190967715"+a+"8009358785036420887"+a+"1800348127777111051"+a+"8509601059683269743"+a+"6258915416005705718"+a+"1082077504080286714"+a+"-1826263866120346193"+a+"6025389024542848399"+a+"-5133626746882118359"+a+"6154119686706124983"+a+"-1605145526392461277"+a+"-4333303749316450451"+a+"114733945430287495"+a+"8622181414885296421"+a+"-4196544011026015981"+a+"5346853227809561103"+a+"2510537901621147706"+a+"-471289725201558884"+a+"-5041864661219029684"+a+"-5290882543828245696"+a+"310406345774434260"+a+"-836120429100169095"+a+"-2875972663477397184"+a+"9086016168367659792"+a+"8311431726304676039"+a+"5143129165001711775"+a+"4016919432949997959"+a+"-7749693328074760110"+a+"-5235410215971905811"+a+"7569569929589047281"+a+"-1581487344202597543"+a+"-2823291768960471779"+a+"-4769131022362688256"+a+"2419524602717574873"+a+"4050479565818895636"+a+"449800018403605324"+a+"1121413394434802979"+a+"-2209767303172600380"+a+"-5865159681775673668"+a+"6682993921838332158"+a+"-6357199263009504937"+a+"-4366856823012441692"+a+"-8119186401376499082"+a+"-1900663570264666858"+a+"6128737523260902407"+a+"-8361790953618845587"+a+"-8438846588423717620"+a+"5379136913256590268"+a+"-8959828995842764675"+a+"2013485321765713304"+a+"651946542299993708"+a+"-5391177516746868006"+a+"3425694396468759402"+a+"-1979882897317923166"+a+"-2388508052192282071"+a+"1107642281868904095"+a+"4894802375968232290"+a+"-2428702934885589106"+a+"748293452130295800"+a+"5691345231677294080"+a+"-2486174962298326691"+a+"7585678359546040159"+a+"-1165316407513877451"+a+"2776342058318376754"+a+"-4940343491937875656"+a+"4902665902804440223"+a+"-7004665724076013476"+a+"-7587472018453996495"+a+"-6128233963625541070"+a+"8765264654317689308"+a+"-2735507998347373681"+a+"6869498668177194813"+a+"-2309224666323771537"+a+"-4675659234126814683"+a+"-645016471268424937"+a+"4348650649368700760"+a+"-214874236310013831"+a+"4227405815643690385"+a+"3320061444282227419"+a+"3492145785275045065"+a+"280923641490784697"+a+"1729100804134378936"+a+"-7018883124081924630"+a+"-2553608611882476133"+a+"-8712100756899236606"+a+"-7047559964016225736"+a+"2257846751488374520"+a+"578572409173107231"+a+"4345843164919605767"+a+"-5388543504591522511"+a+"-1420156524092622632"+a+"827096772545466725"+a+"9137641896724442848"+a+"-1589360466733170743"+a+"7521623884226563847"+a+"-4279434455789503033"+a+"7492695699111981194"+a+"662856192142196394"+a+"8334988775092012577"+a+"1671344884230832479"+a+"-2044014017311657117"+a+"6583901209675742847"+a+"5354213495517942889"+a+"-4296590309239016820"+a+"-8299904015655199822"+a+"7163309498874579066"+a+"8906980711730899526"+a+"-8157592364450060175"+a+"3401949787303101981"+a+"-4223572875100557615"+a+"5474605156432827072"+a+"3981886448469888886"+a+"-9195922886710120400"+a+"-6781980014290589380"+a+"-4650095012203781113"+a+"-2670393501310972475"+a+"244857965431795933"+a+"4963832997474992505"+a+"-7039257533111255059"+a+"-6826075960450943026"+a+"1201368054799712503"+a+"-9222551770351120439"+a+"-22866653804370841"+a+"8437961880322577603"+a+"-6125560768563752011"+a+"7574367817931360112"+a+"5365028931303869455"+a+"-5058302939379092707"+a+"2455138729010151222"+a+"9203935591068668728"+a+"2796918361659563685"+a+"-8483360316871766763"+a+"-9067058866623859465"+a+"7843656574609474031"+a+"-8147765876542590583"+a+"1519804927585221932"+a+"8611916919506422366"+a+"-6198901302068952348"+a+"579403830270105667"+a+"1609687792509862563"+a+"-7231889928507289293"+a+"6732812887884149358"+a+"1204881394266834172"+a+"4951141969248441860"+a+"1863090715134214177"+a+"-6666109477540514203"+a+"-280648257592952574"+a+"-4250872315774251625"+a+"3996873936390056762"+a+"5520288376047446695"+a+"-4225712827009972920"+a+"6640668318007251438"+a+"-7822277872013652880"+a+"-3244108851453600363"+a+"-2181521917129762077"+a+"2686564367700992602"+a+"-2258981347631293411"+a+"-1571417078447055725"+a+"-4980342251464119410"+a+"469673291326368115"+a+"8423225432380111228"+a+"-7670022367894187893"+a+"5076231647728900647"+a+"-247665089260674669"+a+"5068764746662372141"+a+"2492346037887003242"+a+"2510738240134871856"+a+"-7334958788734858917"+a+"-2877153358493990987"+a+"-4716530858546503774"+a+"-4831160593616100017"+a+"-4158965795250821074"+a+"2725746077492180476"+a+"-6981354750764550489"+a+"4984677901836358094"+a+"-2897492827028626767"+a+"-3007807911349512755"+a+"-2335285518997281934"+a+"-6497222833057231589"+a+"-5969540629175099566"+a+"-2726402144599502759"+a+"4983488580263719937"+a+"4618068593733564233"+a+"4674808449266055869"+a+"2778048184895307956"+a+"1593959768661134549"+a+"-1168323625394891634"+a+"-8431953809781912472"+a+"7389772160540771415"+a+"1237587864098927986"+a+"-5053432970285126205"+a+"3754299562846812936"+a+"6445576852995318684"+a+"6565115049261397218"+a+"-7760314081139932953"+a+"-4896883839284862694"+a+"1182022690251590213"+a+"-1550248977507238349"+a+"-1609617831168212580"+a+"4264076591236890972"+a+"7395382158106054646"+a+"-7912578828193846028"+a+"-3041911089740977752"+a+"-3238549283056366768"+a+"-2443360979708866378"+a+"5544029753932960188"+a+"-7192309836319352458"+a+"4036598099433992128"+a+"-9082185255963159182"+a+"-3092063436637565277"+a+"-8927036557005928301"+a+"8844347650138588468"+a+"-8111125464252691334"+a+"-1918778248598993977"+a+"1831582801437623857"+a+"6771172937014131838"+a+"7830774901345473026"+a+"-5160919996654154807"+a+"-3697803209226155609"+a+"1291583943740499247"+a+"-1955003385519519581"+a+"9073059988413483085"+a+"1168543109901128430"+a+"2599186224882680351"+a+"-5203128507699019305"+a+"-8749829865884369282"+a+"6549061450013465382"+a+"-3512235379684577815"+a+"5354983726838560384"+a+"-2946006055244070009"+a+"-1375597554733738737"+a+"-7101682434478354580"+a+"-6001596329509810335"+a+"-5869662267426146021"+a+"-3599685847420338800"+a+"8754157200375258699"+a+"4234717604086300067"+a+"5397380997623945709"+a+"4599376998411336756"+a+"-1965261020938324114"+a+"-3385719177956760750"+a+"-2142781605826243015"+a+"-3905952351338245208"+a+"95143064812765567"+a+"-1039468486826062882"+a+"6223203864543739962"+a+"1787093017719824959"+a+"-8676033947351342738"+a+"4213743633756124315"+a+"-6709689043924662095"+a+"2733282328469795438"+a+"-8513384930568569106"+a+"4497638213147977025"+a+"7447736506608388965"+a+"8977452185526147920"+a+"2260626955068987637"+a+"2902975399257970796"+a+"3972828820308601757"+a+"195060761120092450"+a+"-6010009201321366976"+a+"-7997841208519183331"+a+"-8433656859080245080"+a+"6433481101909312968"+a+"-8956942505836208692"+a+"-7605763219271298505"+a+"5263604930838418005"+a+"-4138387242801350329"+a+"436263034223612766"+a+"-7964167185980745469"+a+"-2757956355998227077"+a+"-7013914980393985463"+a+"4920775969996911612"+a+"-4582086016477731924"+a+"-6339333432392050573"+a+"5358588603164071580"+a+"6335034181282715250"+a+"-2704890288056173884"+a+"-4698621662494535783"+a+"6880454043898100659"+a+"6253189057010332623"+a+"-4043699176241963842"+a+"-1425563574446132786"+a+"-5115979488304773341"+a+"-3618321007201522715"+a+"-6202461726546061711"+a+"8560786061659976953"+a+"2359788385103071015"+a+"2711419013815949772"+a+"-802706265648649317"+a+"-559100995080390015"+a+"-1762456854784718051"+a+"3568162812034725983"+a+"-7088544835602968740"+a+"7181191939156261844"+a+"-4907470742644562937"+a+"7862184013121427133"+a+"4889495530802425015"+a+"-7622081436878403868"+a+"3081791501595718923"+a+"2026591040025517258"+a+"-3433108361605185772"+a+"1303902686630382245"+a+"8717252537464132596"+a+"-7826352017071792213"+a+"3986558661259016897"+a+"-5969021043598609519"+a+"-1210424265454929490"+a+"8088806127965996622"+a+"-1381999595539233428"+a+"1016086461466957860"+a+"5027110879786730189"+a+"7541586340271209952"+a+"2399820556144787115"+a+"-3772769405077359265"+a+"-7453691879492239353"+a+"-6106216866350367148"+a+"811781994788345972"+a+"-2078854042860684471"+a+"3374140076271900341"+a+"8963113579475377891"+a+"6502993271279271845"+a+"348880398593501545"+a+"7903028158370050391"+a+"-2750487853317571962"+a+"7982831848166478973"+a+"-1926228812824511666"+a+"9189621107322060813"+a+"8401548749611295870"+a+"1878075903385072417"+a+"6694229297750189319"+a+"-7646662496352024290"+a+"4411002633420795085"+a+"8599003856471362584"+a+"-6922808322659934293"+a+"3317673841869146485"+a+"1459316535183914170"+a+"-1703167266964255537"+a+"4727044780602312147"+a+"7841100184412857631"+a+"-1295530100662922415"+a+"6734803838327379991"+a+"559506802001903643"+a+"8663271475052865486"+a+"-2468817170604045855"+a+"-2817063210052612446"+a+"-3720102142177214044"+a+"-5640450740202777255"+a+"690383845834852476"+a+"-8306427862592886903"+a+"-3736990181363936107"+a+"-2986866306441131462"+a+"9106463985653875322"+a+"665981939139107017"+a+"-3844940684705335659"+a+"6280861445436615694"+a+"3956722147803271926"+a+"-5634382710667391039"+a+"7313964839859504467"+a+"-6204547114658567655"+a+"8074487499212157263"+a+"1482811611195095477"+a+"-3928275414994781441"+a+"-560715991707120193"+a+"-8053382484339034711"+a+"-3360476595331163058"+a+"-4784060492033787186"+a+"5286331065042164492"+a+"9073220514388929898"+a+"8273762920533311000"+a+"-6799513291991536263"+a+"4043271263802949933"+a+"4475345522798952381"+a+"-248882133580030205"+a+"-8175034539526476354"+a+"6125045191655971573"+a+"1810810648639054354"+a+"-587585792723615517"+a+"4670222394891044062"+a+"-7975984184583733415"+a+"5842356717397744796"+a+"8663949881797689328"+a+"-3054207219808569570"+a+"8251016140953608692"+a+"-6142951917503406383"+a+"-1732984775710557369"+a+"-5955757954531237818"+a+"6418042867248350084"+a+"-6414726438342237202"+a+"7781465661939518822"+a+"-649581833388810203"+a+"-2820630725805002133"+a+"5738329793443063665"+a+"6234863363416904884"+a+"-9137621878907201782"+a+"-258166755246777553"+a+"-1675536541671380579"+a+"7902751979806641143"+a+"8016406561088123468"+a+"5759006811329456378"+a+"-6091398283406965767"+a+"-4328822724025519397"+a+"6427841452113168580"+a+"-4926996329371650534"+a+"-1306633257330962991"+a+"9137733012256900722"+a+"3440956034324334414"+a+"-8573756505272742782"+a+"-4624910331391176524"+a+"3425008439753968047"+a+"-734596251718242996"+a+"7572637956277040712"+a+"1322373237301316852"+a+"5810552390058909162"+a+"199503054485051682"+a+"-764517467273486811"+a+"-840679265868657111"+a+"1371535877482736479"+a+"715197949572424891"+a+"-1101467851466129416"+a+"5500149141406191534"+a+"-2029138182667282002"+a+"-7745762717888982525"+a+"9202194397017614659"+a+"-4830429299923406557"+a+"-294973683082700707"+a+"-770719946520934550"+a+"-6003149868751828564"+a+"1023115426992093929"+a+"-2808832362196207791"+a+"-148560890012459929"+a+"-3643464539407985794"+a+"-8410227596794760535"+a+"-5181799262618054823"+a+"-1793478725375805965"+a+"-3690717729206571995"+a+"4781512499416416206"+a+"493328761242909347"+a+"-1263618823915441398"+a+"-1352133272625255243"+a+"-584209334795952122"+a+"5394732652930194757"+a+"2730298801417611566"+a+"6127272148572058212"+a+"-1331780583464768572"+a+"3092705661319183797"+a+"-3358432702900621085"+a+"-7547881226162667764"+a+"5828399694397811393"+a+"2231431973296909649"+a+"8779788609758773812"+a+"8714704936049961386"+a+"4943063128132597879"+a+"-3867062250178002727"+a+"-8339810247374085843"+a+"7234933578578419426"+a+"-402527188847953755"+a+"3086955841106122992"+a+"-689626326941754786"+a+"6346321656427491704"+a+"4841461452866853838"+a+"-7570267338657285474"+a+"-5549769923408703649"+a+"-6802003668512654632"+a+"5643116227623318457"+a+"-276980324301277232"+a+"-6896145161449352378"+a+"7000112851564301199"+a+"1123739621890119666"+a+"-1273471234785794089"+a+"5678409026331514674"+a+"-6634675684686943281"+a+"-1742556170324272568"+a+"-2341677967153991707"+a+"-6013346906619287868"+a+"-2265904069113320465"+a+"-5082431775224591539"+a+"5150530461316553619"+a+"-7701169879475571551"+a+"-4413654608010492695"+a+"-8622509856706064679"+a+"-7401519088241343138"+a+"6220527027528988401"+a+"9176542381028493531"+a+"2305793753238814856"+a+"-6617674145447145691"+a+"3106567589671900131"+a+"6689161216257139590"+a+"168889743807948855"+a+"7264870661777140397"+a+"-8665889717474009561"+a+"-5211218139780470062"+a+"915946055255785099"+a+"6557470483819917853"+a+"-3230930794341326478"+a+"-8261383331801563320"+a+"-2933248498027527830"+a+"3362285046791131266"+a+"-3236602998387360002"+a+"-8958841079789863786"+a+"-3472701866284984193"+a+"-3511286732130567604"+a+"-6832401335718815225"+a+"8495013884793993743"+a+"8478585801967012282"+a+"4545872409451722191"+a+"8751458915670103119"+a+"-3763263867978786008"+a+"-1505329801046065714"+a+"-1487289463746694204"+a+"1347751514604296858"+a+"4784023666843971581"+a+"4903739282273211570"+a+"-3903776439577921595"+a+"8906566957544227123"+a+"6453203279956387273"+a+"-7452238920921298399"+a+"8285138967744368852"+a+"-6353495953655828378"+a+"5478630133774944113"+a+"-1848015806237578727"+a+"1726662551911588308"+a+"-993442115399966460"+a+"6049095848239074810"+a+"4136475939674117472"+a+"-9075783297092503025"+a+"-2739244532591253278"+a+"6336851307741455"+a+"7639089003606955514"+a+"4688713394058952110"+a+"3056645057829377881"+a+"-8506726966182516868"+a+"-383731751399324748"+a+"-3654274050295505340"+a+"-8247615502549622328"+a+"8051425367409412021"+a+"5070740236957071517"+a+"-6304043607850294460"+a+"4879326440171479053"+a+"1207827151958931536"+a+"4368497979050464647"+a+"8756179114525016710"+a+"6572802117590866192"+a+"-5922996303565406074"+a+"6778103995113936523"+a+"-5476940069258540858"+a+"5487657823671443257"+a+"-400926173735974729"+a+"-8540988823898343550"+a+"-7014060288497364443"+a+"5644928988464987381"+a+"6879543305099205347"+a+"7964655700571564172"+a+"8088691900248937126"+a+"1723219599198728500"+a+"3018536455974744881"+a+"2940291325452882573"+a+"-3786758981089890638"+a+"-797560390807012370"+a+"2663085406348533867"+a+"-7308829391124894805"+a+"1803629826901943189"+a+"5846440929888909977"+a+"-8542702904802823040"+a+"-7163216730812752942"+a+"2221034704463855614"+a+"-2405682157860023115"+a+"-4676395964625238782"+a+"-216963140376579792"+a+"-5103389651471831933"+a+"9017702006631036993"+a+"2938999348929657766"+a+"-7730679226114448199"+a+"-3743205304154717157"+a+"-1776479219937991102"+a+"1654078855927477958"+a+"8094809716232335012"+a+"6340983493686361250"+a+"-866493891022565565"+a+"531735533923973602"+a+"2747910080493628139"+a+"2200812898658983768"+a+"-1513950816115621936"+a+"-8337720631869198822"+a+"-525577754379940401"+a+"7551804934410883426"+a+"519746586022812922"+a+"-8045547892464635210"+a+"5951243721520801875"+a+"5934161767066905672"+a+"-4705079481574756138"+a+"3464716257976122783"+a+"8978831342572010684"+a+"8187941088102065781"+a+"-3084684641150941442"+a+"921477582871759843"+a+"3307658955544601367"+a+"-2996165763170645061"+a+"-8274541103042848498"+a+"-3463908933883305420"+a+"-5048691860297368141"+a+"2177078496606619084"+a+"-8827388744732292312"+a+"-7957446549730534038"+a+"3303941265807359394"+a+"-3640624108889803582"+a+"-963485886713923471"+a+"-617302574273490179"+a+"-6628433587492636867"+a+"3755304851471882136"+a+"-1455409516034175087"+a+"3281387006666817931"+a+"8187267763424429725"+a+"-2112757461247130450"+a+"8487163885819199287"+a+"5515268578675020120"+a+"-7516059575070424029"+a+"2096245470903398985"+a+"-3599383330369850733"+a+"6717668160055633097"+a+"997039288715036912"+a+"-4111524577411313904"+a+"4213859757422026202"+a+"-1454344243953370904"+a+"1338177838168081261"+a+"-242181692786070896"+a+"5399006252168649414"+a+"646614180822848995"+a+"-6184731866872587323"+a+"-1444188926767387207"+a+"810942930502440211"+a+"-6218682137716519027"+a+"-2720895870328575898"+a+"-8808292532570299552"+a+"2140505418194421507"+a+"-7888434952098884132"+a+"-178310388289817980"+a+"5905005163930882235"+a+"1635421671359890907"+a+"6750033111404860777"+a+"-4564576791357207914"+a+"426758066406202856"+a+"-4872081106509472156"+a+"-5254560181717342221"+a+"-734363642590401321"+a+"9013812156623195750"+a+"-170482851728801429"+a+"-7173862230840257316"+a+"8254259043201955270"+a+"6501276346832030105"+a+"-8273757015293296575"+a+"5387853821745750442"+a+"-7474855440619051354"+a+"-1753227913458519222"+a+"1092217748501059899"+a+"-8791276135678971256"+a+"-218877590915892737"+a+"-4340725654742199259"+a+"-5742289577091247053"+a+"1343358900061715138"+a+"-1772225708659554277"+a+"-8797614013992611270"+a+"-3497464196302835963"+a+"-8309105028352082612"+a+"-663094820895261814"+a+"-3444240896004163203"+a+"1957144248429107731"+a+"4757954753357798716"+a+"6593264534837630366"+a+"3497227202123306054"+a+"2776287487035884738"+a+"6501556871116799564"+a+"8899612329989751536"+a+"-3778659576142179374"+a+"124703871414090235"+a+"6948288598497539417"+a+"-4996449766025445415"+a+"793686075701987520"+a+"-3198002690460840789"+a+"4009422788160882918"+a+"7193014696603651322"+a+"8082998766648896404"+a+"-3788231277556968381"+a+"-7148495983093530214"+a+"6736890024758916021"+a+"4216940336435230007"+a+"188328503832869176"+a+"-7120102739398964547"+a+"7607953946534615729"+a+"-3899525495187175563"+a+"1166694345313931652"+a+"-3219263269800959297"+a+"3266634161081313882"+a+"-9037148961090722434"+a+"2318060343891873059"+a+"-3515133393575994446"+a+"2566508863198691678"+a+"-9121275522528117659"+a+"6552814346023252631"+a+"-3844267506042688565"+a+"-1653156565782005455"+a+"-7173322703490581596"+a+"5311129569825581925"+a+"-5981496794536948251"+a+"485799454892997258"+a+"358814548216823190"+a+"-5883996450830917482"+a+"7892070487849955837"+a+"9041219978475479524"+a+"6784193649663705084"+a+"-704406440822053065"+a+"1617597350703726007"+a+"-2824990004512410626"+a+"4830833946059156601"+a+"644059663093447897"+a+"427654689358798040"+a+"9099539326079885915"+a+"451266633755291926"+a+"-5408292146163444719"+a+"-8218729673873120822"+a+"4812059197525286851"+a+"-1417290372535981890"+a+"7317429815661408505"+a+"-4706671334516443621"+a+"910482975170331840"+a+"4711728128274846659"+a+"2218323880426214829"+a+"-367348826505176322"+a+"8003614727540982818"+a+"8216996872543133783"+a+"-788439557611798833"+a+"-1123607703495525944"+a+"-5169936645529424004"+a+"-4732836413189749996"+a+"6316451216750669828"+a+"-5586465654792010636"+a+"-2255003627213419612"+a+"3832664252804128629"+a+"-8179486934051614603"+a+"-66704645845932512"+a+"2891168224812430647"+a+"7343682511706734683"+a+"-4856741064043882673"+a+"3105181221952422798"+a+"-1099474774470322926"+a+"-7184541441405083512"+a+"-7896129042940196797"+a+"-3681692208118084700"+a+"-7509258819912375078"+a+"-8381523365664144601"+a+"-7225732013684948985"+a+"2678475084224492"+a+"-7010181734394821771"+a+"296311055436471362"+a+"-4702143638883053358"+a+"559908477673544980"+a+"8517217626632198543"+a+"-6048186379008685749"+a+"1369684436610985700"+a+"3019156035985140591"+a+"-6834648991262355946"+a+"-4562930321968735852"+a+"-5783944654661391108"+a+"-3024935798314909837"+a+"-5537008782762095937"+a+"-8256796962807994666"+a+"8280182536563837152"+a+"-7995629897164905927"+a+"-2077281075304869761"+a+"-6664775396054401618"+a+"823577603383936985"+a+"-6356046405898429951"+a+"-8623495862025298926"+a+"-2832501372323834341"+a+"-4481796606745599180"+a+"6843605553065863851"+a+"-2581428019573302665"+a+"-4898085659480564734"+a+"-7753556073828498238"+a+"3584727131727095358"+a+"-3832308975071072911"+a+"9140718478884669354"+a+"4412985822617555800"+a+"-5495456985889731227"+a+"7968697975111041032"+a+"5128251690040084032"+a+"-6862414414207627440"+a+"-3006234487295557652"+a+"1324045417801509638"+a+"9219605576569074261"+a+"-715417453106249977"+a+"-6617654008397873848"+a+"4229951799618365819"+a+"231813632375250011"+a+"-5576308538620286115"+a+"155792926466618637"+a+"4836500552335990074"+a+"-1663547996885277909"+a+"-1993180218372871112"+a+"-6473687783379261579"+a+"-7883704607391325351"+a+"6687986130491546753"+a+"3364635474781455617"+a+"4731053967944701408"+a+"5106931322115930293"+a+"2095420057364729214"+a+"1156896580537176357"+a+"-3465259520146717874"+a+"8942297204813033067"+a+"3040683329504834342"+a+"7960068558868562069"+a+"1374491342528201959"+a+"220770130923384416"+a+"-4584976438727763232"+a+"-6069230704051231674"+a+"-8140389424077462925"+a+"7919822713176100795"+a+"-1612055155113080071"+a+"-6162416958187795790"+a+"-4915054237654038814"+a+"-2866828504084776090"+a+"-2938976209207559391"+a+"4467247253829594198"+a+"-4850525891734929210"+a+"-5426296772220968816"+a+"-5186441394167538452"+a+"8794590532854589490"+a+"-6578705991441722668"+a+"4035357871963126061"+a+"-1070129802059123630"+a+"3921226994129637452"+a+"3722734392905978983"+a+"-5956139048691736972"+a+"8416144324331798575"+a+"-1923420510655314387"+a+"227615271206429181"+a+"2226209514116787552"+a+"8297056456961422020"+a+"-8359499256195569822"+a+"5576341039369051576"+a+"4702120714246748976"+a+"-4042574530811250124"+a+"5083076081415490044"+a+"-3219070452310786083"+a+"9106311493699607016"+a+"6241102595154319624"+a+"4669706243845736720"+a+"-1520829982172760232"+a+"5889904275233942734"+a+"-68294517832626517"+a+"8638744614373433656"+a+"7567202626162399799"+a+"-1964780367369499411"+a+"-999558730666848273"+a+"-1669144135230350063"+a+"-1242209923845724629"+a+"-39031062552363627"+a+"-633233388401520761"+a+"744323104049287611"+a+"2014860468464161034"+a+"-1193284554157526823"+a+"-6855964882992540021"+a+"-8036572965809837220"+a+"5547258320624838991"+a+"-361938219569996785"+a+"-8704235972253373193"+a+"-9003427919587620451"+a+"-3130703444561361256"+a+"6132231206933208148"+a+"6749398961654190635"+a+"-6925034059616949205"+a+"1571738287308720679"+a+"5431255372312963846"+a+"2347890316226708844"+a+"-2587017991946539209"+a+"9080522648955318115"+a+"-7782900851433774520"+a+"-6414286033878819230"+a+"-7471905833427183625"+a+"2344443512917666900"+a+"4030672884858720641"+a+"-7228311107668937320"+a+"-4225049585365454557"+a+"-6696854441560120790"+a+"-7915428687108202019"+a+"4633264419167771904"+a+"-4039899830387050632"+a+"4267398965683805622"+a+"4751252376443669194"+a+"7198205969788397676"+a+"7129010695954880057"+a+"-5046741236772984850"+a+"-4893430234027272579"+a+"-6455089705569729002"+a+"5902751572800271273"+a+"317847978001983086"+a+"6591677451518621291"+a+"8725653562600482585"+a+"-8811453516738818670"+a+"-1937983213300134926"+a+"8001111295566882768"+a+"5432568004739151861"+a+"2808858632003233217"+a+"-3187854607564760867"+a+"-4004527449867163605"+a+"-336181840705754865"+a+"-7246637421972455801"+a+"3241758430536346550"+a+"-4914749815050143296"+a+"-1212912223502301394"+a+"-3749450625260640454"+a+"6243151812487782821"+a+"6226970592369211413"+a+"3870468034484872191"+a+"-3248010484204365646"+a+"8695259523944941306"+a+"-3520121047936500619"+a+"-6202360059242836333"+a+"804974149902754252"+a+"-4201170229733288025"+a+"-2814614190330637712"+a+"6732531893826755548"+a+"3587696942827103210"+a+"-3914504395162054719"+a+"-8295349942655173543"+a+"9016555458455142195"+a+"-1330972165973762190"+a+"-2857642318211707901"+a+"1621441195752982471"+a+"8796740055346885333"+a+"-7469350179954618293"+a+"-9198507324056667574"+a+"3050171288568508948"+a+"-9202985112142352287"+a+"-7450147356246173085"+a+"-2650046968714225126"+a+"-7791493787770037023"+a+"3177967838851086684"+a+"-1087350519511644629"+a+"-5933630645292757737"+a+"-3057634277369326960"+a+"-117101563851313235"+a+"-1264847152478417639"+a+"-8169210788366092403"+a+"-1556957540384449847"+a+"5079856129131839009"+a+"537009568676640293"+a+"-5226270953762115350"+a+"-5324199301103706379"+a+"1804591847796379880"+a+"879735902087758412"+a+"-5630733783825054658"+a+"-7610082778137157946"+a+"8119553100633562646"+a+"-4142666375828182767"+a+"-3150914012657811262"+a+"-3152263088065891155"+a+"-4147965428223902173"+a+"336844704958883063"+a+"6955766203242207822"+a+"7683778390826560099"+a+"5014524116896306283"+a+"-2992139592508518392"+a+"2544694784394516960"+a+"-5480878629851767455"+a+"4522873847351478191"+a+"8326626511086571601"+a+"-6422801033021366756"+a+"1578678540985889639"+a+"-6559866042619753837"+a+"-2578877569999104925"+a+"7368303770053372871"+a+"-5747703212301246727"+a+"3357596325498795038"+a+"-4133533100284207148"+a+"-1015951027680129461"+a+"7467490110644909021"+a+"3158855981736880188"+a+"-3172906774568163396"+a+"-6828938093617592265"+a+"7233629791141415838"+a+"4812403726420496447"+a+"6467043740588425016"+a+"4659999192592765884"+a+"4652951018723752460"+a+"666208123998413658"+a+"5018988295449121771"+a+"2765215723643073329"+a+"-5805565308999822918"+a+"-2076549345780039899"+a+"-4426400335663121800"+a+"4275608708948464015"+a+"6675022547067205759"+a+"-6621196489948540900"+a+"5722802855070403337"+a+"-3327707032135994635"+a+"2262928498967088118"+a+"3530071204065036832"+a+"-1638714306566451765"+a+"-7690788209354558171"+a+"7113955705845913085"+a+"-4081197284015476492"+a+"-4353435977967011984"+a+"8870894978912968709"+a+"-3378124121881489095"+a+"-7072527214702087999"+a+"-3826738314876308053"+a+"6851749976613062176"+a+"-1750785357222691439"+a+"5276086865661363858"+a+"-2963967637668099145"+a+"-2226482578674911965"+a+"1262913202855543983"+a+"-5719872184568399655"+a+"200057904572055249"+a+"3289053279870908000"+a+"5864930648060653187"+a+"7113948028888391656"+a+"2015505708560011961"+a+"-7688130328085946546"+a+"5595350336910484927"+a+"-3684238588780478855"+a+"8613416584425920054"+a+"4249559202049962502"+a+"-4129474140910318501"+a+"3202291309460908583"+a+"-3928494809434341489"+a+"-6076283274923897400"+a+"2169394210116526098"+a+"1301281724191196147"+a+"-3958391744948119278"+a+"-1860291525879287948"+a+"-7367822264979394844"+a+"-766202970211237697"+a+"-8712119674703561328"+a+"3736413026361360914"+a+"8876590410660191123"+a+"-6382124384610352682"+a+"6651183499700364511"+a+"3984890132222164810"+a+"-2794025605547462106"+a+"7570641472538557794"+a+"4552556182522839127"+a+"-4548338499653656596"+a+"7388941229386075240"+a+"692547794703939317"+a+"2436692756551067478"+a+"5482475673724460138"+a+"-748428287238371735"+a+"-5046147474484082687"+a+"-5645192179964259396"+a+"-8910889623475454631"+a+"-7535738450330975492"+a+"3379953857191884896"+a+"8375308725109206639"+a+"-3259253628170470412"+a+"-6364776491423973320"+a+"4966967577296742092"+a+"-4235437682144171048"+a+"-4470283232421596519"+a+"-684373034549167112"+a+"-7544358005155380888"+a+"-6089672722052548507"+a+"-592422057867469495"+a+"-8870281455177471909"+a+"7127816281889312309"+a+"-3179360379771308795"+a+"-6866650128224703956"+a+"-698801804772675516"+a+"-7121841945155861602"+a+"4750365137868030895"+a+"7738153537752652299"+a+"-1216300091806872614"+a+"6771372917205053677"+a+"8056989338981147611"+a+"-7044136404236635947"+a+"1524250009079309577"+a+"-7230380836977314093"+a+"-6328397610668843257"+a+"7230102557130438170"+a+"5484760717538397184"+a+"-4732383013272760348"+a+"6744415428010607923"+a+"3022090164560283027"+a+"1568643906810575794"+a+"-4622791717852927720"+a+"2660468600538675557"+a+"-4294780086359953512"+a+"-5594348200211861931"+a+"7259557701039606348"+a+"-4560711143417983449"+a+"3190332956225415592"+a+"-4944263905951727131"+a+"-7385385614052438337"+a+"6733540044280164868"+a+"-4331161235831157019"+a+"8634623412407676066"+a+"2815941638062550421"+a+"-5232679099207881714"+a+"9202366913391292565"+a+"1619237350162891149"+a+"-4564477822700236200"+a+"7208442585339078747"+a+"-3950616628069894494"+a+"5754703381790672111"+a+"-2018876234266819215"+a+"-2103659793485769597"+a+"-6916752526519644133"+a+"-5834005017330986797"+a+"2648524451218973875"+a+"7580548958796221476"+a+"5839987782269727665"+a+"-1935092394547033721"+a+"4819296501593189329"+a+"-7449320539156769442"+a+"1515981491563393083"+a+"1837234754028675615"+a+"-2691299151050994461"+a+"7834035250536263000"+a+"947382469723180338"+a+"2070628618009620722"+a+"-7701999848196581146"+a+"-4989233495601617735"+a+"6771060135514012470"+a+"-4386300160537078757"+a+"9092560637994350648"+a+"-8393149325636269009"+a+"-7113205208559790969"+a+"8011664749276243449"+a+"-8266196281237589216"+a+"8259712846621683948"+a+"7059975912623943052"+a+"223293421261472175"+a+"8973572126931896900"+a+"-4078694841056319197"+a+"-8595306693898275504"+a+"340597839860111269"+a+"-4480614924930277584"+a+"5517819178252021904"+a+"-6096927906070665728"+a+"-4822198221110160891"+a+"-2577002508408181546"+a+"7315528082960323822"+a+"6657773545505244526"+a+"-9111063062018438849"+a+"3439200446592946185"+a+"8124115377302205054"+a+"-990430432747932271"+a+"2480444268192630917"+a+"6336395495152050177"+a+"4671803505031381126"+a+"1380595797077890307"+a+"-5823356456068914608"+a+"3643552808887949018"+a+"-705654815289741872"+a+"-4942555973230170239"+a+"6841175442962388185"+a+"-2247742565737854444"+a+"-5965872412923179737"+a+"3233876736034274927"+a+"8059548267812355744"+a+"-6442795951984446700"+a+"-8254441926716747299"+a+"1221578904699451729"+a+"4484393240198177513"+a+"-2470934872280561758"+a+"-4000515761544913848"+a+"1841312402397132371"+a+"-6266121333022015942"+a+"3036409269701812841"+a+"-59909522137328064"+a+"-7406201526142657853"+a+"1630047227661167327"+a+"-4897993438023877765"+a+"6219253283169460131"+a+"-2495741112802518127"+a+"1302756514188318054"+a+"-5533782832811642678"+a+"4354798003992578770"+a+"-7986677467980853803"+a+"-8744988257359396573"+a+"-6397501769218728272"+a+"-8947660384927553231"+a+"1346216959820138313"+a+"1425398524283165869"+a+"-1283087607147001752"+a+"-206913821141456982"+a+"8014851305433763531"+a+"-3306492978461841825"+a+"8939538755388149906"+a+"3470041899206769451"+a+"-5835062378542834467"+a+"2752364486063988952"+a+"1939934425938166195"+a+"3008044486201466147"+a+"3722009335165103141"+a+"-1454123726393059460"+a+"5521045270087722675"+a+"-7584468636879988727"+a+"3455604157334575597"+a+"6444214822533935856"+a+"6685753141598286685"+a+"-8249605279529950251"+a+"-6108157385140562268"+a+"8698570457891691937"+a+"712682936770346210"+a+"8683885651874370181"+a+"1511630497269458523"+a+"-681331991295002562"+a+"-5538407606653779370"+a+"-8225676124935582566"+a+"2992867944170172744"+a+"6467556416530619962"+a+"2894317729672299826"+a+"2367294768805338520"+a+"-3795911641430219706"+a+"7315593747565738571"+a+"1073925020137124304"+a+"-2009620617725341558"+a+"9192484969344016724"+a+"-8555372001436210450"+a+"5988230853661579250"+a+"-2058267483034575749"+a+"8122930851637461010"+a+"-4226809344373377312"+a+"4203514443098305340"+a+"-7584642885221900035"+a+"3741247320369290823"+a+"6409416416737382822"+a+"-8756241943904648267"+a+"-1162965036863622490"+a+"1309747872651362397"+a+"-2083806146045300730"+a+"-8644749146832603574"+a+"-5860595045064427633"+a+"4705270308983783907"+a+"6728325949665520780"+a+"2355167571219782987"+a+"-7485062256841845804"+a+"5444171101615347210"+a+"9018416163053665286"+a+"9087649652391753964"+a+"7355274780617434646"+a+"-2263053130520029143"+a+"-7771114517872233976"+a+"-4333605022901923898"+a+"7416196136755926012"+a+"7874945996172274746"+a+"-29647836685576855"+a+"-961434168856881325"+a+"-3639241545807632723"+a+"2546758658973642586"+a+"-7953791153076501308"+a+"1931422568598613109"+a+"-6717842740108986537"+a+"-8291630841266816948"+a+"2765890591673690873"+a+"5638615108868643823"+a+"2610285609096522668"+a+"7182053208700872695"+a+"-4387966805233548375"+a+"-2987355674746176789"+a+"1944114521650872928"+a+"2716385647022901732"+a+"3672937770299043773"+a+"-1596838794080989326"+a+"6994512773580910508"+a+"-3554310089091955519"+a+"1355466662459087327"+a+"8762632012749605111"+a+"6587327856302852558"+a+"3311118198598392544"+a+"-6793004875159213313"+a+"-4848547389526226739"+a+"-6311353038235974265"+a+"-8195505362848449864"+a+"8808125456239414991"+a+"-4177775909520246100"+a+"-6619635425075002725"+a+"-4132694774520176797"+a+"-8317158135140825016"+a+"-3478442824038580944"+a+"-6007598038909081516"+a+"6302404450442477855"+a+"5778955250949510691"+a+"-2089763170261427622"+a+"4741409635703394816"+a+"-1604648981138860594"+a+"2858368262704801633"+a+"3077936222317121549"+a+"3876636234691611503"+a+"7072310780592103797"+a+"6875717807996264388"+a+"-8119373122628671342"+a+"2592321197819846005"+a+"-4865044565472487744"+a+"370243778170973267"+a+"3538560122812949268"+a+"5604800454296726126"+a+"1099039521029719933"+a+"1347625018260219866"+a+"-760735066813486043"+a+"-3588040698066642251"+a+"7697720740645299484"+a+"932557864155975527"+a+"-6719149903083035080"+a+"-3632384404564322005"+a+"-4437288996570214090"+a+"4876681836482086607"+a+"-700013811510345180"+a+"68286250809712567"+a+"-5723038568786969085"+a+"6180096348459871527"+a+"-5336303492423424089"+a+"5268064677773382592"+a+"-5468221560993276190"+a+"8728616035972006219"+a+"-18735560580305439"+a+"-5237022430459186507"+a+"8477647565196617941"+a+"5477971880707102298"+a+"-25742072802303019"+a+"-7628253021115937147"+a+"-4527455294363884798"+a+"-6779159922670200777"+a+"-4332755792343947029"+a+"6246992222472870439"+a+"2466686335846188851"+a+"-3176660018221785078"+a+"2227603986683319665"+a+"7764675382631007764"+a+"8993875510396531287"+a+"-7390864096506767171"+a+"7337153217923216149"+a+"3248867097428978888"+a+"-8078994459496454913"+a+"6023362300574921600"+a+"6957790098961696109"+a+"-2951896231335096508"+a+"730304460660495330"+a+"192254390069636166"+a+"-1049566252317531537"+a+"-7248026460359122545"+a+"-4856240343559698343"+a+"-3288455520075047354"+a+"-3462385567291090183"+a+"-9076025559385888976"+a+"-9080194978079616797"+a+"5107397421493446778"+a+"3642195766291641162"+a+"-8607615188211212362"+a+"-6565851555561356894"+a+"-7348624522328956381"+a+"7643434229912546183"+a+"736968235053630257"+a+"-1558131958624533283"+a+"-4267365336994799805"+a+"4685285441925601335"+a+"-417452777611981130"+a+"-1612672569043764356"+a+"518118522100466977"+a+"7477758616731323079"+a+"-2084762027578400546"+a+"308555469435645327"+a+"9031665960208658121"+a+"6230664225124256264"+a+"-1102830740815288761"+a+"2817926313141144264"+a+"8490820541726712201"+a+"-3156215760262899028"+a+"-9071289492098116078"+a+"8425910717564713723"+a+"-3806622682195406474"+a+"-4420283133736675380"+a+"-2130571006470095261"+a+"2440746963483934373"+a+"8556899456135230949"+a+"-1985525364566697115"+a+"-3365400095873163035"+a+"1119910485872254819"+a+"-1046656997374317070"+a+"1415882540628621014"+a+"8383333511655382851"+a+"3352737800845652086"+a+"-4956645021080570628"+a+"-4221159765757641885"+a+"2639365141465593776"+a+"4935151287859683142"+a+"-8102019963811174617"+a+"-4133912392369401163"+a+"5480446863201440096"+a+"8759003265342329820"+a+"7180798877987804633"+a+"-3106517939429595304"+a+"3471288105411959053"+a+"-363148694271843994"+a+"5042344163278449725"+a+"1616698931072621884"+a+"1797865194247105907"+a+"1444037657274074806"+a+"-7029718486968835133"+a+"8844266795997125173"+a+"-4944651518545568813"+a+"6487964973590478532"+a+"1886109974317222046"+a+"-4842848483402883461"+a+"3531122380482669684"+a+"-1558709588580146904"+a+"-4342403627297550780"+a+"1689103941253311787"+a+"1061199116206243613"+a+"5061874826462778016"+a+"7334887834022786034"+a+"-4953914412460735293"+a+"6809021047861032861"+a+"711439222068774288"+a+"6586553718450977062"+a+"-4848541873011906646"+a+"6392546595089496644"+a+"-7454402105323812227"+a+"6808280476233343523"+a+"-9163248863081859930"+a+"-4935115052088543129"+a+"-2707173481561263983"+a+"-5040722886254228368"+a+"-6529198091145506973"+a+"-8707423069418058529"+a+"6038039841022866971"+a+"-8982004619693436071"+a+"99422527511009523"+a+"-5165864716533667702"+a+"3531760248632559884"+a+"2453964053489566829"+a+"-6810009552064415671"+a+"5897335478825586377"+a+"6746492442484332410"+a+"9002181253533066238"+a+"-7812070282260401475"+a+"-6234637736823676415"+a+"6931601391561453600"+a+"-7651946779799617116"+a+"-1476679763922561909"+a+"8319727058209931290"+a+"9211601851260334812"+a+"4380122268541574330"+a+"-6141835365182903981"+a+"8859095374016622339"+a+"-6080848116160933583"+a+"-4043345743566579489"+a+"2007464217689982107"+a+"5615227751077173548"+a+"-5247506120933105981"+a+"7613105194332406391"+a+"-4518167165425198520"+a+"7264351302739188234"+a+"-4369130358793113123"+a+"-2996862511695551704"+a+"3429626022551086889"+a+"8574417589664275094"+a+"1485655701114573806"+a+"7290363364964116061"+a+"633425129373641068"+a+"-4682720896109445682"+a+"3199403151033991687"+a+"-4725352862128009786"+a+"-2935010460126746329"+a+"-1571339865719136973"+a+"-5327135494658638497"+a+"8662308269909751254"+a+"-5408996137996185392"+a+"5822097627997115722"+a+"-4985750595042038833"+a+"-5449287288045688252"+a+"-9005565456474303035"+a+"-2513523367955029477"+a+"-7237889187143268265"+a+"-955049681514771829"+a+"-715290057971470138"+a+"-5112632449472312395"+a+"-8999368014349704297"+a+"-3553787458899280279"+a+"-2242033452520855946"+a+"8288454840875082408"+a+"6759946808749896791"+a+"5499698313251322468"+a+"-543042823206248483"+a+"-3716280375908332407"+a+"-1767850440715110401"+a+"-5812090670386736064"+a+"-4448772542800653592"+a+"-3691411356019826575"+a+"821418385527481119"+a+"-7917444741151119478"+a+"9025312584318696168"+a+"457131154694574975"+a+"-6494407505970093591"+a+"1848951345003203089"+a+"-7088652100860042993"+a+"3607909891740382545"+a+"-5678294653111490382"+a+"-5795543117613854617"+a+"-2151575121446292234"+a+"7620964843728469135"+a+"884290653714224245"+a+"-6843277283286932892"+a+"2408695048027763994"+a+"5842614161247609697"+a+"6010166672575060815"+a+"6812469602680659875"+a+"-5997140003653359782"+a+"7985395093919912947"+a+"-5213351642343076604"+a+"-2464006694883863548"+a+"-8272827464694685317"+a+"-3362460353719917320"+a+"6627775285154308985"+a+"-3736521844071744472"+a+"-1239142425696476764"+a+"-2717329470631008732"+a+"-9002493101279878344"+a+"-3081549338662512136"+a+"-4192120168253245726"+a+"-5262450888373666639"+a+"-4359619098442462225"+a+"4545309526212303135"+a+"1706751050568448421"+a+"-7215605223506374693"+a+"-8384613778406303503"+a+"-9115598915407494261"+a+"6493557840925709377"+a+"6002444260666557796"+a+"8757276082417258931"+a+"5517276445381297648"+a+"659854512378354543"+a+"1171949515664870929"+a+"7962665662827588176"+a+"-6428441354297408443"+a+"-1407303201060735287"+a+"-4630527955770637782"+a+"-3356564721964583930"+a+"7557293222167592516"+a+"-8976462499445679791"+a+"4913334300847132158"+a+"2715824074188316087"+a+"7098688088987829230"+a+"-5274733612517799445"+a+"2306144525447966301"+a+"-539171553148664727"+a+"-2276057022041114107"+a+"4472359697252482014"+a+"1517895533819116828"+a+"2952915317797409734"+a+"2416809354563825297"+a+"2136737984086357846"+a+"2932202033487269269"+a+"-4978515174981634403"+a+"-8763651883011539620"+a+"4799662088047448549"+a+"5524894362826545444"+a+"-5208901486068361377"+a+"-1547410064372038538"+a+"-8679851852185635074"+a+"-6401793263036105813"+a+"1985033060226478242"+a+"-6482220174980880207"+a+"6762019587712483449"+a+"1480525796015390734"+a+"8108723650031480226"+a+"2978843720351459877"+a+"-1336081875989930222"+a+"556688536962464952"+a+"-8872538052181681477"+a+"255278049706330286"+a+"-4841349086783434006"+a+"6790383796723089429"+a+"-7198580012715268624"+a+"7533854893267875945"+a+"-2767027533395577852"+a+"1674612631113288982"+a+"-7576984746517155992"+a+"-481457683325295045"+a+"758818546926160585"+a+"2117683637265311664"+a+"-3476219835082397205"+a+"-6484741587933492150"+a+"-3940875002536970107"+a+"9002040825213956445"+a+"-2917174987364332695"+a+"-66727676135893375"+a+"-6674337036793155609"+a+"8118072832569742745"+a+"-3664957541486359181"+a+"3419614972338034449"+a+"2824903256761154949"+a+"-6225521424818911642"+a+"-3824663404241060416"+a+"2835358670736706282"+a+"-5533635873640849322"+a+"1617737717408188617"+a+"-4342543362518212950"+a+"3769111142858305094"+a+"5945502355322974774"+a+"4120872397983584586"+a+"4003174987165865902"+a+"6964706800478134559"+a+"5993470215902535781"+a+"-3857502962439131016"+a+"6443524725591602672"+a+"8748264180145478580"+a+"7538036956928816136"+a+"257424971305193315"+a+"-7190236128509444940"+a+"-8704789362619223288"+a+"-270038105961354585"+a+"7574705795800529952"+a+"2228596148561184230"+a+"-2598750511091798685"+a+"-4195006584725201235"+a+"6470237484799739465"+a+"2042088550081344147"+a+"-7770224872565971249"+a+"-2058622155715559444"+a+"-738640071637619846"+a+"6143958792144726894"+a+"-8044362213379668580"+a+"8224887012855159830"+a+"3209854232446227413"+a+"7478149109097640268"+a+"8619347318797205212"+a+"1488851936360789829"+a+"-2257801310284603777"+a+"2961907687413792168"+a+"5367228619753286376"+a+"-1167042234202606476"+a+"1803394380188483105"+a+"7136307422837830432"+a+"7632179788793817561"+a+"7023944626199186947"+a+"3029221576998905191"+a+"-3954742339958497802"+a+"-4932533517651240945"+a+"2249675176414142007"+a+"-7414865112301845628"+a+"-7714577080262540145"+a+"-4483412957955698002"+a+"8669699406632040375"+a+"4510253243393872045"+a+"-270125992295806985"+a+"1400099911585106972"+a+"3368608011643162128"+a+"-3186327211102508391"+a+"-7004808457975131044"+a+"-7215067159615180667"+a+"-5075493924283306445"+a+"-6114237907724615416"+a+"2088154268915196303"+a+"8209387529276365399"+a+"-3861942433898838286"+a+"-3813120950568086983"+a+"4896163299838231430"+a+"-2234054304997173562"+a+"-6969473690113031802"+a+"287032981324281713"+a+"-7026687415196300579"+a+"8437788536412928585"+a+"59519871571995148"+a+"-2007111664379543173"+a+"-4187774861098453680"+a+"8637401319054574875"+a+"-3700805565304526845"+a+"-7131960406437337821"+a+"-9164692797770846654"+a+"5886254500269905851"+a+"-7894830705315346737"+a+"484964917021538234"+a+"-7374162993396474055"+a+"-5804543483427702932"+a+"1879617763117321785"+a+"-1162861953767998571"+a+"6410937909461127263"+a+"2496574133855806134"+a+"-6930597241031595282"+a+"-3385347474182226802"+a+"-4906421813540775677"+a+"3376509800070706659"+a+"3685761347281413883"+a+"-3703605717022933887"+a+"-3317209424191430634"+a+"6680165104107806595"+a+"-1421152020715589033"+a+"-7151394767920287792"+a+"2896824926148914351"+a+"-583404044349217560"+a+"-7275827201673200806"+a+"-5581728992629175840"+a+"-3759399463589837177"+a+"-7851071796689193301"+a+"2999247104082515774"+a+"5959438451429054874"+a+"4102208806599304830"+a+"5269187542287488293"+a+"3228944852182629029"+a+"-1321932716017535509"+a+"9047738068879013652"+a+"-430117592908725001"+a+"154431757781615122"+a+"5292625191058274884"+a+"-820879976800688912"+a+"7815829825921520514"+a+"7814626282908207726"+a+"6194047515562578714"+a+"4543712357461835613"+a+"6127919059662056304"+a+"-3041755880890705531"+a+"-6015922524640142745"+a+"-8240746661018900280"+a+"-4647074590211540695"+a+"4425056076926604935"+a+"-3628558101005679577"+a+"-2309605200216451261"+a+"4349438603816361823"+a+"6884968378719474311"+a+"2939625268139399900"+a+"-7384655158838745851"+a+"-9059163303551992957"+a+"-3168260877632134913"+a+"-2661349036927497205"+a+"-5732836207041285912"+a+"-1718443522567783859"+a+"-5184477095451803574"+a+"-2639779818877942595"+a+"-4285786699429851414"+a+"4153392600555453496"+a+"-677818638916169175"+a+"-318976644252115457"+a+"-6839771369066395476"+a+"-1331867802548483581"+a+"7662766576406914111"+a+"-4643717697303062174"+a+"491370442500697590"+a+"-5601731377105462991"+a+"-2083896333033158507"+a+"-8348647619744535173"+a+"2195403489667511601"+a+"-7304902791933157238"+a+"-8078804357956911593"+a+"1830019802461446756"+a+"-6914546352406074389"+a+"-1069372453373657960"+a+"7973324441431550228"+a+"7266296868894064186"+a+"-8218200041998108841"+a+"-2383548244358994901"+a+"2936358553872620482"+a+"-7394464481476738659"+a+"6796605663613232330"+a+"-7001716129222120235"+a+"3733905505178873527"+a+"-8924101992160005069"+a+"-8053245946307360193"+a+"-1410662425490071697"+a+"2667987898784000369"+a+"3930779870894342436"+a+"-737013868548327724"+a+"-5047711387310744430"+a+"-1995068133569824048"+a+"7428068289838785439"+a+"7998411348436431691"+a+"-66606868251602657"+a+"-3140963045029084778"+a+"-294529882224598188"+a+"7884304850523476618"+a+"-7015430383734539592"+a+"1417659741149471982"+a+"-1503958245384724231"+a+"6513146138809209371"+a+"-633829660049130428"+a+"-5690846708247479070"+a+"5057521049567048390"+a+"-1831459748130174291"+a+"-5811032821990866321"+a+"1118822902012234468"+a+"-2951084719946215176"+a+"6595747868165419153"+a+"-5474017136886613977"+a+"-5014173376270024122"+a+"3378038340528525905"+a+"4881313666473403454"+a+"3191601076967017248"+a+"-7308891140200636223"+a+"7456642015616743574"+a+"2377344551942001357"+a+"6578033781675835473"+a+"-3042794498162452750"+a+"2427071443633851664"+a+"8344198901104076413"+a+"462607879869700213"+a+"-6970961797048172328"+a+"8964377020396178700"+a+"730041378577385264"+a+"-369108319145229173"+a+"-1704480982549139880"+a+"-2795521892361361829"+a+"7410857119861369581"+a+"-4967026415955924393"+a+"3401654287294004153"+a+"4927182977102119891"+a+"1620336809248274012"+a+"3577184301995047135"+a+"-6841529815937467863"+a+"4613796452620724683"+a+"-1054934308018524851"+a+"-8855800260865241874"+a+"7225581178800302134"+a+"-9032442258141207901"+a+"-7057262694446386383"+a+"-3732442445224352364"+a+"2761141437113645653"+a+"-929430840722605254"+a+"2511509677650090911"+a+"8118132181366237347"+a+"-550026691256274082"+a+"-3668907501140258954"+a+"-606810055944795439"+a+"-9017650565356767436"+a+"2095198344342310157"+a+"7093363964773361344"+a+"-3099270771817404892"+a+"2198062659168522785"+a+"-6273665991256788861"+a+"6839118058276544645"+a+"8192709088232625308"+a+"5013863326431809160"+a+"-4754511127120331068"+a+"-3661877678366068554"+a+"8656183962683002717"+a+"4892501203466148430"+a+"-4958645542284711625"+a+"6723996370247953481"+a+"4911629062665388595"+a+"-4387819364150439783"+a+"-1296268218059531735"+a+"-7641850932378884683"+a+"7087270855110065163"+a+"3754708083359768149"+a+"3889586698096405834"+a+"-6137225015939556998"+a+"6768463333145358200"+a+"1733091583159252657"+a+"-8161421181385050066"+a+"-6013229318518658409"+a+"2733581142152004399"+a+"33219917982979999"+a+"-6452758044749045043"+a+"-6442695315870372078"+a+"3835780802518037131"+a+"-3231354270509736361"+a+"8973485937631645699"+a+"721138559962451060"+a+"-5459139089955258871"+a+"-289240518852777004"+a+"-8912467672113900015"+a+"8386886357144052810"+a+"-101643017034454067"+a+"-4929821758780909227"+a+"-1266807567558686950"+a+"8928737992684490917"+a+"5916636164747024412"+a+"-5791489627671790370"+a+"-8438709873793054297"+a+"-6154848405003374437"+a+"-1167593657140619808"+a+"454661938430770613"+a+"3268496715979850020"+a+"4330546121321481412"+a+"-6723452375653753049"+a+"-8355576695333144347"+a+"-7219392445688183200"+a+"-9021944183281656899"+a+"8347317120521098660"+a+"-1760524396084873794"+a+"-2904405441760595951"+a+"1273212335776452264"+a+"5599936571602637613"+a+"-1874789470910305709"+a+"33067597899967310"+a+"-1550773524926263894"+a+"8415787422238198331"+a+"-5951819633303154694"+a+"2723272766251525139"+a+"-553120179037176724"+a+"447473466542519917"+a+"737323123399346128"+a+"2239775540296940992"+a+"1174078146829196955"+a+"2350643859956391173"+a+"-3438882603276611789"+a+"-1951707287079412838"+a+"-8428630040889486231"+a+"-669351995787567767"+a+"8513892233989162054"+a+"-530937035598775991"+a+"5426726267843651337"+a+"-3602850646806113885"+a+"-6429721144703485328"+a+"2107955875578696536"+a+"-5835559291240127178"+a+"-2890715836766470430"+a+"-9094627687565959459"+a+"308725312537075641"+a+"8722393287822659501"+a+"-1871034873782069769"+a+"-6243665891020870405"+a+"-7479233619970828738"+a+"4330539874988922286"+a+"3935621836467028953"+a+"615168151969985279"+a+"4445060597391296801"+a+"3410383985931968895"+a+"-579589989416250847"+a+"8303194436290111070"+a+"-4912677608615539331"+a+"-6965655216202631959"+a+"-5867361958201239665"+a+"-2490037409986115500"+a+"8855406855933096914"+a+"6843928093911668153"+a+"6613066040083806339"+a+"-1348861990157247904"+a+"8105723480957128837"+a+"-5405166066063685056"+a+"2174568676370020228"+a+"1730792060395168454"+a+"6845585680059012189"+a+"4924409929101075924"+a+"639025024172742077"+a+"5768643796258308363"+a+"416533415844656392"+a+"6259184655283512653"+a+"1806723304538309499"+a+"-8742505610523700611"+a+"9115577441284285844"+a+"-4422903889562854520"+a+"-8824082423929691984"+a+"-1594761846184958295"+a+"5443094875525914358"+a+"6623287219725446632"+a+"2163366667453320563"+a+"-3191492609540029469"+a+"-8478768721203218298"+a+"-8714235035695423280"+a+"1479159013581916798"+a+"-3029731821111886911"+a+"6063285391300612225"+a+"448982299938190378"+a+"6144131538023295407"+a+"3019455323078528928"+a+"-7593851815836924794"+a+"-8000720159411662877"+a+"-8830770921055302009"+a+"1276533555023357214"+a+"-7709979517561914854"+a+"2039814596470784108"+a+"-2570052517613437266"+a+"7325409472787663518"+a+"-3306248715853973724"+a+"-324933084126805189"+a+"5564649630755734125"+a+"-7130842274844587065"+a+"6500429736061520497"+a+"3075990014772699976"+a+"-1996052343038159566"+a+"2287584536748611077"+a+"4857750267117388849"+a+"2762191378890433936"+a+"-3787216983113538032"+a+"-7876139956665979641"+a+"-4434682462834688392"+a+"-6132345995543411306"+a+"2846828934507063356"+a+"2205056035534892863"+a+"6971362409840063934"+a+"-7334379541155315235"+a+"-2185887118772341871"+a+"7336523966377208421"+a+"-5181518925588434593"+a+"916829953978579055"+a+"8916196074684429581"+a+"-343902964928479243"+a+"-7524291869292823524"+a+"5057971524866397017"+a+"4735037701324009298"+a+"-5661196528985499220"+a+"-7174476579407401831"+a+"-2390421549535361748"+a+"-8803774619671917786"+a+"479835471799791118"+a+"1792276559188966877"+a+"-950711340133083778"+a+"1720537911995611123"+a+"5126428118418085091"+a+"-7331637704121976875"+a+"-7806518246166233753"+a+"-3189681476890420153"+a+"-4827285738546271306"+a+"9155113814944475088"+a+"579631697133442053"+a+"-712791131848894891"+a+"7622278436622830165"+a+"-3136674195548280572"+a+"-6935310496940897544"+a+"-2154475007448707981"+a+"5987083393899431764"+a+"2499138839933402376"+a+"226999891005733606"+a+"2675814497804340634"+a+"7006121889419299978"+a+"-1869449977369693096"+a+"-1277694500406902792"+a+"-3300574855852490262"+a+"3142802020191812497"+a+"3663379312038602453"+a+"4125257994180814427"+a+"-4571845229523457245"+a+"-3150058857386876342"+a+"7503846977488272450"+a+"-1661115278146574655"+a+"-3071863653254613716"+a+"4683248393738534743"+a+"-1859465107663223608"+a+"-4337623990306671907"+a+"4817982326835451535"+a+"-7667508470929533280"+a+"8307945079328891250"+a+"-8045760216482737685"+a+"-7858631362692153093"+a+"-3410708982722832945"+a+"6470378289978424498"+a+"-5483906378085151451"+a+"7382740210062959041"+a+"-3409959318852138797"+a+"5842851101995209434"+a+"7017954023532784719"+a+"974934155492127320"+a+"-3094009056197747103"+a+"-969387622581744988"+a+"-1632563381387869652"+a+"-9183098983740663590"+a+"-4320397456882074514"+a+"-3261368460000879189"+a+"383963959335946502"+a+"-3684640452189005692"+a+"1952680973518464182"+a+"6226530231022358768"+a+"3072568317345091370"+a+"-4962716382738148806"+a+"8455687499001964857"+a+"150246332340927830"+a+"640861774309913449"+a+"5838050563792098560"+a+"20611114217615544"+a+"5929259895778420773"+a+"6537239832453755289"+a+"-3264102069205369214"+a+"912347645120744252"+a+"2425848868939426699"+a+"1723027032012111634"+a+"1449357166220209037"+a+"2766362939912705680"+a+"4727545052215865110"+a+"-1616490558707992782"+a+"4409644222525651092"+a+"-4337183804510752062"+a+"3535045438786400315"+a+"8803098582001817561"+a+"-6955431114397740500"+a+"-6219310959583541594"+a+"-3700064324151895341"+a+"-2549680515428708882"+a+"-2401883646008126064"+a+"-7582292756795829165"+a+"7667156026808070552"+a+"-3558059286124310056"+a+"8735793018250739997"+a+"-6427974810371007068"+a+"1334783141990516397"+a+"867020448668406789"+a+"-5691512855692184361"+a+"2463958787597883575"+a+"7935389093643043859"+a+"4752545886380456294"+a+"-1196508123657862429"+a+"2093750917497615474"+a+"-7791249716898626507"+a+"8198523205454538737"+a+"262561788122779659"+a+"6696297940506045689"+a+"1287784952697600605"+a+"-4796552398039489762"+a+"385046329657361469"+a+"8831073988511756345"+a+"8308323241869503292"+a+"-6375459006577280917"+a+"4041141025072401164"+a+"1852830842547147361"+a+"550492070617199974"+a+"-3810637208423908392"+a+"634939432473076781"+a+"6820683277163483747"+a+"-2272753417970275885"+a+"-1125025879686622100"+a+"2345080866577073148"+a+"9070140269618540152"+a+"-3306117376765807520"+a+"3197312849039628462"+a+"-7832747983125543947"+a+"6928232711304267929"+a+"-4404354247155346356"+a+"7746342250056874796"+a+"7310633729720542011"+a+"-2728063333465515258"+a+"-4955603802615225157"+a+"6898617935063123704"+a+"-220170639807146220"+a+"-2019827212939117373"+a+"-470310388988857033"+a+"5505618100440132645"+a+"-7571658264226059414"+a+"-7888356696237361642"+a+"-4477730354595352022"+a+"-7846732783657640881"+a+"-8801627451734936756"+a+"5872317002164430091"+a+"-4339767558518547100"+a+"3910203839741261584"+a+"-3519143931735275157"+a+"164939830321181168"+a+"-5488818195135015269"+a+"-4667473428940159348"+a+"-4981236168318181219"+a+"3560846926667666393"+a+"3014750347556533222"+a+"1651918403266366438"+a+"784187752316822622"+a+"-8577471103724493539"+a+"-1656192333892982206"+a+"-1617317898423166008"+a+"-2678885846361396918"+a+"302211955997870039"+a+"8638572990304208397"+a+"2218502254957595360"+a+"-7161423473740763740"+a+"3277635809268947558"+a+"6105474029898724238"+a+"-3933173974127482275"+a+"4697446393802435027"+a+"-2515976829170222099"+a+"2494490943498590059"+a+"-5583096342045076362"+a+"6917551925452206303"+a+"-8907420521351388972"+a+"-2143228459842603216"+a+"5584211206548670691"+a+"1963827294400159992"+a+"1062816828116449093"+a+"-6249888286799449649" + "abcdef" + a + b + c + d + e + " ghiABCDEFGHIJKLMNOPQRSTUVWXYZjklmnopqrstuvwxyzabcdefghiABCDEFGHIJKLMNOPQRSTUVWXYZjklmnopqrstuvwxyzabcdefghiABCDEFGHIJKLMNOPQRSTUVWXYZjklmnopqrstuvwxyzabcdefghiABCDEFGHIJKLMNOPQRSTUVWXYZjklmnopqrstuvwxy12";
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test625/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test625/A_out.js
new file mode 100644
index 0000000..82f4568
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test625/A_out.js
@@ -0,0 +1,13298 @@
+public class X {
+ void foo(String a, String b, String c, String d, String e) {
+ String s = ""
+ + a
+ + "1481040350234786852"
+ + a
+ + "4221089161101009540"
+ + a
+ + "-6170427739377068715"
+ + a
+ + "-1177132190659449391"
+ + a
+ + "4131074700002200800"
+ + a
+ + "6677964992006511358"
+ + a
+ + "2306558609804623499"
+ + a
+ + "4948023180683471330"
+ + a
+ + "-2100145421766851358"
+ + a
+ + "-3001840236323503671"
+ + a
+ + "-3489306742320139361"
+ + a
+ + "3121650335531224184"
+ + a
+ + "-4358571516300782510"
+ + a
+ + "1556752567442603373"
+ + a
+ + "-6962032360535946947"
+ + a
+ + "-5868276881678120598"
+ + a
+ + "4184984287312247424"
+ + a
+ + "-6721997605202472396"
+ + a
+ + "6617636037855015285"
+ + a
+ + "7266783356079704728"
+ + a
+ + "-8754237933673085347"
+ + a
+ + "-5817839502530750802"
+ + a
+ + "1583847687494714427"
+ + a
+ + "8951519125923785825"
+ + a
+ + "-3432930123357231360"
+ + a
+ + "-5451954362874316754"
+ + a
+ + "-33060006164703257"
+ + a
+ + "-7231434859633259989"
+ + a
+ + "608146062873988130"
+ + a
+ + "-5011488686871015606"
+ + a
+ + "9139797121591847350"
+ + a
+ + "-1886181867981415714"
+ + a
+ + "8841800972511057570"
+ + a
+ + "-4383413442757032866"
+ + a
+ + "8361387373543642695"
+ + a
+ + "-2639476650066862743"
+ + a
+ + "-2849702699413546749"
+ + a
+ + "1277733543017481226"
+ + a
+ + "-8031505870898978274"
+ + a
+ + "3666898192956052796"
+ + a
+ + "-7039203610026055703"
+ + a
+ + "-4819565592688393296"
+ + a
+ + "3501929543225217572"
+ + a
+ + "-52690043125786931"
+ + a
+ + "-241495509142914400"
+ + a
+ + "809240826052859383"
+ + a
+ + "6800981487534314533"
+ + a
+ + "-6524324695224261613"
+ + a
+ + "-3147335742845363307"
+ + a
+ + "-7905248515165548725"
+ + a
+ + "-8857719419158251696"
+ + a
+ + "3770652464690190606"
+ + a
+ + "-1373399701638993702"
+ + a
+ + "183252801833892442"
+ + a
+ + "-2177955360518900549"
+ + a
+ + "-6160006701784504259"
+ + a
+ + "4975115447927973030"
+ + a
+ + "-4048044119354860392"
+ + a
+ + "-1206947692733954083"
+ + a
+ + "-7546675664265042138"
+ + a
+ + "4602271912901891539"
+ + a
+ + "7473173362172414652"
+ + a
+ + "-2246791729943980270"
+ + a
+ + "5531429909557226193"
+ + a
+ + "9195798735326951519"
+ + a
+ + "-7045483396415238847"
+ + a
+ + "-4617871455255630821"
+ + a
+ + "-8404894183972146099"
+ + a
+ + "7953598172877176299"
+ + a
+ + "-4591952086688426778"
+ + a
+ + "-1793987074707489637"
+ + a
+ + "2792037511578283306"
+ + a
+ + "-3232503736907637185"
+ + a
+ + "-2854401600067174610"
+ + a
+ + "7250590952512651931"
+ + a
+ + "-6408953690487983106"
+ + a
+ + "6019268937581606852"
+ + a
+ + "5145016224651586273"
+ + a
+ + "5021772288190407942"
+ + a
+ + "5855473695186221281"
+ + a
+ + "7943605958236028936"
+ + a
+ + "8078550154530610313"
+ + a
+ + "-1501079708541374418"
+ + a
+ + "6016115716904921584"
+ + a
+ + "5563211195567408190"
+ + a
+ + "1881040805637616374"
+ + a
+ + "5715702334303460933"
+ + a
+ + "801733894157086669"
+ + a
+ + "-3883590202690143813"
+ + a
+ + "-4234177843042587717"
+ + a
+ + "-7799657549332828187"
+ + a
+ + "8916671952396843549"
+ + a
+ + "2499753011961486970"
+ + a
+ + "2055336783165487022"
+ + a
+ + "5030113625695917193"
+ + a
+ + "1677218655183543305"
+ + a
+ + "2735563907130567065"
+ + a
+ + "1466095306597867372"
+ + a
+ + "-8727329011390864623"
+ + a
+ + "-1657516366396933954"
+ + a
+ + "1607374426341641178"
+ + a
+ + "381434977513699282"
+ + a
+ + "-5934861424042302910"
+ + a
+ + "1021231529862004717"
+ + a
+ + "1731055950998634531"
+ + a
+ + "4758233516485895813"
+ + a
+ + "281446737818329412"
+ + a
+ + "2916827720194406987"
+ + a
+ + "-4113172032847483906"
+ + a
+ + "4322747256400475755"
+ + a
+ + "-231687239923818462"
+ + a
+ + "2273547761800209938"
+ + a
+ + "8708414041987305498"
+ + a
+ + "5172351889376721968"
+ + a
+ + "-7109740500688484275"
+ + a
+ + "1747355987716301695"
+ + a
+ + "-4148205799751382840"
+ + a
+ + "8621843109299178178"
+ + a
+ + "-2758866116022225638"
+ + a
+ + "107986368467906898"
+ + a
+ + "3331225483452456574"
+ + a
+ + "-3503271926995929130"
+ + a
+ + "6327215864271752255"
+ + a
+ + "8633503676753918289"
+ + a
+ + "737738740279256664"
+ + a
+ + "5359749581609185377"
+ + a
+ + "6887986159860721242"
+ + a
+ + "709533211623369924"
+ + a
+ + "-7319039509776682350"
+ + a
+ + "-3893683866865853153"
+ + a
+ + "-4554118729276913814"
+ + a
+ + "1842089193842209018"
+ + a
+ + "-7306235956629056753"
+ + a
+ + "506064168863913743"
+ + a
+ + "2068229051978835796"
+ + a
+ + "-5843192101805646909"
+ + a
+ + "-5406539933102955051"
+ + a
+ + "1122403234845453300"
+ + a
+ + "5907913918924720735"
+ + a
+ + "-7923005704484651019"
+ + a
+ + "2740447218889389967"
+ + a
+ + "-5914387748691021098"
+ + a
+ + "-4606301648811218504"
+ + a
+ + "-1402461674467800600"
+ + a
+ + "1284294194480673802"
+ + a
+ + "6079052293509738623"
+ + a
+ + "-5305558616682058769"
+ + a
+ + "-9075078034265068551"
+ + a
+ + "6740435740643124920"
+ + a
+ + "-3620468974957409281"
+ + a
+ + "-6103977201243493000"
+ + a
+ + "5368487237343320842"
+ + a
+ + "6633626677208845104"
+ + a
+ + "22731020784882473"
+ + a
+ + "-4176021822967539412"
+ + a
+ + "-2840947198397506816"
+ + a
+ + "4536069560910605740"
+ + a
+ + "-8830348710729920749"
+ + a
+ + "-2484808592722030395"
+ + a
+ + "-9135645213656835260"
+ + a
+ + "645468150627326857"
+ + a
+ + "-5289577660716570470"
+ + a
+ + "5600795185832650085"
+ + a
+ + "-6233102104916270269"
+ + a
+ + "-5616058648703769654"
+ + a
+ + "1454407521439030492"
+ + a
+ + "-1388436161134796784"
+ + a
+ + "-448829651581235474"
+ + a
+ + "5228581645372843926"
+ + a
+ + "-7390755550853889605"
+ + a
+ + "-652993831235872211"
+ + a
+ + "8520564877188209467"
+ + a
+ + "2149850520389958326"
+ + a
+ + "-6598921222840378783"
+ + a
+ + "155434286759749129"
+ + a
+ + "-6463276537914228062"
+ + a
+ + "8697061974073234456"
+ + a
+ + "-7520264323459351625"
+ + a
+ + "-1878767623989246124"
+ + a
+ + "371434180225132960"
+ + a
+ + "-2702100704900116914"
+ + a
+ + "4546891744423706860"
+ + a
+ + "1072969202997083041"
+ + a
+ + "-1174246552945796297"
+ + a
+ + "-6958310238776559600"
+ + a
+ + "5809436737640419316"
+ + a
+ + "-2142071912190438678"
+ + a
+ + "2645715594693023084"
+ + a
+ + "-6512232937988344651"
+ + a
+ + "1429487728719130118"
+ + a
+ + "-5927254500284655605"
+ + a
+ + "-5358597567566518840"
+ + a
+ + "-5619570179618968386"
+ + a
+ + "6634856841420071965"
+ + a
+ + "2248249447063079234"
+ + a
+ + "-601650796422949416"
+ + a
+ + "9016586536771112524"
+ + a
+ + "-8990134722571734151"
+ + a
+ + "7442057801788219574"
+ + a
+ + "-7069696912435026002"
+ + a
+ + "-5965822922725810779"
+ + a
+ + "156012994370918939"
+ + a
+ + "-533334545036251923"
+ + a
+ + "-6428163249820294563"
+ + a
+ + "-8771354710879578701"
+ + a
+ + "-7474607303623235764"
+ + a
+ + "5552920467743308115"
+ + a
+ + "3463850839073631872"
+ + a
+ + "-4312138652056332156"
+ + a
+ + "-5668951482761994218"
+ + a
+ + "4160357046780118714"
+ + a
+ + "-7651487471925116236"
+ + a
+ + "-1904737379948122165"
+ + a
+ + "-2468995372736695351"
+ + a
+ + "2384954334609806293"
+ + a
+ + "8835010373198815257"
+ + a
+ + "3072665879620869470"
+ + a
+ + "-4708484196263690120"
+ + a
+ + "-4417768926177692229"
+ + a
+ + "8631330465661935317"
+ + a
+ + "-6005069660084716618"
+ + a
+ + "-4841849265321973894"
+ + a
+ + "9114271054544617578"
+ + a
+ + "4474715891292785297"
+ + a
+ + "4598426000596856434"
+ + a
+ + "4456642120330654185"
+ + a
+ + "-6811568388529193150"
+ + a
+ + "-2267510729992483078"
+ + a
+ + "4841297221909766868"
+ + a
+ + "-3341202061707655898"
+ + a
+ + "-5168523749277303418"
+ + a
+ + "-2597086147703835583"
+ + a
+ + "2189984040194367554"
+ + a
+ + "-163417043572594861"
+ + a
+ + "-875917009738735905"
+ + a
+ + "3449040927530609564"
+ + a
+ + "-1187542268316866362"
+ + a
+ + "-2086526303156399145"
+ + a
+ + "7170110557699721176"
+ + a
+ + "-8831808421158147134"
+ + a
+ + "-2934245923885012593"
+ + a
+ + "-693181876282269730"
+ + a
+ + "2801286762013136483"
+ + a
+ + "-893681230793990797"
+ + a
+ + "7244823961262144366"
+ + a
+ + "7661464547005099735"
+ + a
+ + "-4504020848703526318"
+ + a
+ + "7488365098065319918"
+ + a
+ + "-2617611221309623462"
+ + a
+ + "-5347117576177944844"
+ + a
+ + "7577407951576481247"
+ + a
+ + "2119607573247061369"
+ + a
+ + "8742365859276522220"
+ + a
+ + "-2878190955845298771"
+ + a
+ + "9170894970442468900"
+ + a
+ + "-3198099095730567203"
+ + a
+ + "6600662185925388516"
+ + a
+ + "-7481833413594991555"
+ + a
+ + "7259883778198475684"
+ + a
+ + "-6228247879160851225"
+ + a
+ + "8054150403399233954"
+ + a
+ + "220291732862417955"
+ + a
+ + "9170008991903320769"
+ + a
+ + "-7386177775713107223"
+ + a
+ + "-7067143718707886163"
+ + a
+ + "-2829159460833567837"
+ + a
+ + "-7650573416145777597"
+ + a
+ + "-7827174279991915210"
+ + a
+ + "8015033616728249392"
+ + a
+ + "7953520474367629891"
+ + a
+ + "-6763631084009130537"
+ + a
+ + "2134465028909734057"
+ + a
+ + "-7582421904070398088"
+ + a
+ + "-4021434106474594994"
+ + a
+ + "-3241797462076497267"
+ + a
+ + "3790367970897076255"
+ + a
+ + "1731158696763449719"
+ + a
+ + "6009130197176253524"
+ + a
+ + "-4330099148179311782"
+ + a
+ + "-2681893572588916488"
+ + a
+ + "4717529785599537732"
+ + a
+ + "-5355393305350863448"
+ + a
+ + "-2562931193903110252"
+ + a
+ + "7825500412654385050"
+ + a
+ + "6123135506603100825"
+ + a
+ + "-7135991812968836383"
+ + a
+ + "7075040822983804281"
+ + a
+ + "6085292636084411374"
+ + a
+ + "-9016517018808310700"
+ + a
+ + "6296680626540498265"
+ + a
+ + "466471971943076520"
+ + a
+ + "3194706547855404513"
+ + a
+ + "-3469234296613008650"
+ + a
+ + "4661562681731629745"
+ + a
+ + "-6869862919399727963"
+ + a
+ + "-5470269392986725915"
+ + a
+ + "-7408510499818361817"
+ + a
+ + "-4634700534304790197"
+ + a
+ + "6141253999365640538"
+ + a
+ + "4914795942574316909"
+ + a
+ + "-5923510425951684560"
+ + a
+ + "-6686698052467837745"
+ + a
+ + "-6860754215509481583"
+ + a
+ + "-8161199778461002892"
+ + a
+ + "6790420767590453887"
+ + a
+ + "3160962446495709863"
+ + a
+ + "-7086844264601577605"
+ + a
+ + "-8019277360711651081"
+ + a
+ + "8694094250492531239"
+ + a
+ + "-822512736791075198"
+ + a
+ + "7037467247885361964"
+ + a
+ + "-8068773511219242634"
+ + a
+ + "-2221622380638547363"
+ + a
+ + "4141721356317507284"
+ + a
+ + "-9120482348318183652"
+ + a
+ + "-2094945145080548489"
+ + a
+ + "6509511066194612988"
+ + a
+ + "-5631846957641451179"
+ + a
+ + "-7124789435189368153"
+ + a
+ + "530620392849491203"
+ + a
+ + "2063084158833109250"
+ + a
+ + "5705014193930379134"
+ + a
+ + "6523714474084616334"
+ + a
+ + "4744000852602101799"
+ + a
+ + "1085239330415640337"
+ + a
+ + "-5155417748224605425"
+ + a
+ + "6270555189236303732"
+ + a
+ + "-7737271311797543051"
+ + a
+ + "-3574839633885944337"
+ + a
+ + "5058890598150144652"
+ + a
+ + "7746403854998588002"
+ + a
+ + "7022856657575309952"
+ + a
+ + "3716738500463555846"
+ + a
+ + "-7421401014154125893"
+ + a
+ + "1421729999303688516"
+ + a
+ + "8144520783350364771"
+ + a
+ + "-5375150715246560540"
+ + a
+ + "-6811495605014783449"
+ + a
+ + "-1629085212768444054"
+ + a
+ + "7842872870387873339"
+ + a
+ + "-3144069724554953284"
+ + a
+ + "1578489136450795424"
+ + a
+ + "-1524962835898716664"
+ + a
+ + "1255628362210394024"
+ + a
+ + "-4945766756743361564"
+ + a
+ + "-2368749883429063495"
+ + a
+ + "-5443141608452157258"
+ + a
+ + "9211129063819614033"
+ + a
+ + "7114918026427046997"
+ + a
+ + "-348788006629170359"
+ + a
+ + "-1510339221551201808"
+ + a
+ + "2225031253386166621"
+ + a
+ + "-3555530065681793234"
+ + a
+ + "-5635090599347843861"
+ + a
+ + "-3131108975972138601"
+ + a
+ + "7906458026818974202"
+ + a
+ + "8426579347837902385"
+ + a
+ + "-4881890627049232515"
+ + a
+ + "-8916821826259001490"
+ + a
+ + "185948291026094553"
+ + a
+ + "8201360044857003333"
+ + a
+ + "3340205317187459493"
+ + a
+ + "1019013224452838302"
+ + a
+ + "-5640595948335979856"
+ + a
+ + "-707071934361179406"
+ + a
+ + "-8857596830200344761"
+ + a
+ + "-1375091965299661006"
+ + a
+ + "-9072009683459314761"
+ + a
+ + "5000988210264232168"
+ + a
+ + "4271317853521960464"
+ + a
+ + "2678753875442511004"
+ + a
+ + "-6470626338166122964"
+ + a
+ + "-6078726263448693640"
+ + a
+ + "-6126660456097596945"
+ + a
+ + "-5224548713170778066"
+ + a
+ + "2951275643838239183"
+ + a
+ + "1249793927341201177"
+ + a
+ + "-3560869420720178794"
+ + a
+ + "-6737236972610500446"
+ + a
+ + "6906382391763753318"
+ + a
+ + "3701285808445941477"
+ + a
+ + "-6137404772056077571"
+ + a
+ + "951068276649955219"
+ + a
+ + "8972614952190332730"
+ + a
+ + "1350001466189426457"
+ + a
+ + "-4081913571588491296"
+ + a
+ + "3537255041914161665"
+ + a
+ + "-3922351533529732712"
+ + a
+ + "-2145964578134968167"
+ + a
+ + "2394200010169686588"
+ + a
+ + "4820435476375140561"
+ + a
+ + "3980439875552079698"
+ + a
+ + "-7848606640652240279"
+ + a
+ + "8056889380412121302"
+ + a
+ + "-1735987219969504949"
+ + a
+ + "-2429262127212559301"
+ + a
+ + "2716470408164555317"
+ + a
+ + "7619986510078673844"
+ + a
+ + "-4810946803905692262"
+ + a
+ + "591257503510807983"
+ + a
+ + "1008145613734886602"
+ + a
+ + "-791769094042351455"
+ + a
+ + "1551415766926632272"
+ + a
+ + "2128049662514755336"
+ + a
+ + "5674375202248066714"
+ + a
+ + "-3294574351697152083"
+ + a
+ + "6409892386317067743"
+ + a
+ + "-7779995689030042070"
+ + a
+ + "7663455663253941309"
+ + a
+ + "6994870508259434411"
+ + a
+ + "7092158122453603104"
+ + a
+ + "-7504376776657473544"
+ + a
+ + "-1548660132363324694"
+ + a
+ + "-8111792772550137166"
+ + a
+ + "-3716421601494476848"
+ + a
+ + "-5471408931853636388"
+ + a
+ + "858470282848534786"
+ + a
+ + "-1944492615617314147"
+ + a
+ + "6842258904020299278"
+ + a
+ + "3465357212653391171"
+ + a
+ + "1010858684300746374"
+ + a
+ + "-2376621027797858933"
+ + a
+ + "-5234350247437932577"
+ + a
+ + "3527455355230723615"
+ + a
+ + "-4441639340996737636"
+ + a
+ + "9162770176271747679"
+ + a
+ + "-3307692074822023253"
+ + a
+ + "-1265560468988039837"
+ + a
+ + "4174084901504664334"
+ + a
+ + "408216311741101376"
+ + a
+ + "6179424481850599613"
+ + a
+ + "8464529436195546763"
+ + a
+ + "-2679225514021083446"
+ + a
+ + "5412693249303878683"
+ + a
+ + "6761016599191336902"
+ + a
+ + "-9053227710679826671"
+ + a
+ + "-4971616606140021661"
+ + a
+ + "1470984573745249052"
+ + a
+ + "794919692872301402"
+ + a
+ + "-666467506414374151"
+ + a
+ + "-2822698483079789682"
+ + a
+ + "601378322432915769"
+ + a
+ + "5638644728798047345"
+ + a
+ + "5789378409007337798"
+ + a
+ + "-5994164160329416538"
+ + a
+ + "-6667535132090352473"
+ + a
+ + "4204563008748740328"
+ + a
+ + "5678902566930339970"
+ + a
+ + "-7223445616360784599"
+ + a
+ + "-6607953497851883678"
+ + a
+ + "-6311838047415961090"
+ + a
+ + "-6309447620271201478"
+ + a
+ + "229050938505420857"
+ + a
+ + "-1225014043780951126"
+ + a
+ + "2390215148115329239"
+ + a
+ + "5072184776177919104"
+ + a
+ + "-744335414291888356"
+ + a
+ + "-3089609556691187584"
+ + a
+ + "-3618865863102092548"
+ + a
+ + "192388795641361512"
+ + a
+ + "4587735395282822589"
+ + a
+ + "217485062671670830"
+ + a
+ + "-6269736618400789287"
+ + a
+ + "5414980239431986315"
+ + a
+ + "-528064624972663000"
+ + a
+ + "1295964769301191356"
+ + a
+ + "5298404442990088254"
+ + a
+ + "6791548406998914183"
+ + a
+ + "-5186505763910713839"
+ + a
+ + "-2064823676363944325"
+ + a
+ + "7298397795617553631"
+ + a
+ + "1092691793025769084"
+ + a
+ + "9199008286310061390"
+ + a
+ + "8496944026982897790"
+ + a
+ + "-7175699054101917484"
+ + a
+ + "2351940215168480144"
+ + a
+ + "-7887520388437077927"
+ + a
+ + "-2547766195274466532"
+ + a
+ + "3651088260374341913"
+ + a
+ + "5677078378225324141"
+ + a
+ + "-5218271904647533617"
+ + a
+ + "6506102331379269744"
+ + a
+ + "2047580395586681359"
+ + a
+ + "1254456669244453310"
+ + a
+ + "-2493503447457657357"
+ + a
+ + "7748743143809150681"
+ + a
+ + "3187580147546249210"
+ + a
+ + "-447565130764562251"
+ + a
+ + "-5901868264771610836"
+ + a
+ + "-5344772102755168902"
+ + a
+ + "4399354202412978048"
+ + a
+ + "5761746177647931272"
+ + a
+ + "7346021349430542978"
+ + a
+ + "7407653297412847803"
+ + a
+ + "-1432082633278910928"
+ + a
+ + "4386781250096772591"
+ + a
+ + "3078677237004686885"
+ + a
+ + "-8270569093055494458"
+ + a
+ + "-3066819790639523079"
+ + a
+ + "6921413523262053800"
+ + a
+ + "3815857059671909350"
+ + a
+ + "6459842709565553675"
+ + a
+ + "5496182702002478767"
+ + a
+ + "2919041266384629492"
+ + a
+ + "6301254303467952572"
+ + a
+ + "167977270899707836"
+ + a
+ + "4107450151680801929"
+ + a
+ + "-6184483674271871721"
+ + a
+ + "-3113466523343527359"
+ + a
+ + "4255706773140144210"
+ + a
+ + "2045276824006752933"
+ + a
+ + "-1006056944868633893"
+ + a
+ + "-163374204176050893"
+ + a
+ + "-3536312633372723194"
+ + a
+ + "4030026566945749635"
+ + a
+ + "916143771948351245"
+ + a
+ + "-4137939988132726797"
+ + a
+ + "-1208503070443601575"
+ + a
+ + "-9073410561248509562"
+ + a
+ + "879225941445259519"
+ + a
+ + "6704588155652656649"
+ + a
+ + "4037880612097133452"
+ + a
+ + "6650953345091703159"
+ + a
+ + "6557621267180188933"
+ + a
+ + "-3799489167477556834"
+ + a
+ + "4616142957114179369"
+ + a
+ + "-555511666653343487"
+ + a
+ + "-7787414996794187528"
+ + a
+ + "-2320895672018981888"
+ + a
+ + "-4115116336922975624"
+ + a
+ + "-508083592730508234"
+ + a
+ + "-1790339700600684362"
+ + a
+ + "-1891368734208039390"
+ + a
+ + "4162487874602061322"
+ + a
+ + "2507934636732405000"
+ + a
+ + "-3569041016842825057"
+ + a
+ + "3727230352401811737"
+ + a
+ + "6081104416614609202"
+ + a
+ + "-2378349176311649327"
+ + a
+ + "8338625078774305818"
+ + a
+ + "4236364192447051424"
+ + a
+ + "1766223847372056199"
+ + a
+ + "-1509108249653323828"
+ + a
+ + "-5341684167359652338"
+ + a
+ + "-8444676169083518571"
+ + a
+ + "3761876718263359588"
+ + a
+ + "-3523680927151552615"
+ + a
+ + "3042749665226854761"
+ + a
+ + "3749113535163919993"
+ + a
+ + "3759366097795773800"
+ + a
+ + "-7270464562060963395"
+ + a
+ + "-3404645697486842979"
+ + a
+ + "684912297827615732"
+ + a
+ + "-8328573509093542665"
+ + a
+ + "-329547391816168161"
+ + a
+ + "8320915285235489566"
+ + a
+ + "-8439264109714576560"
+ + a
+ + "-7555539153012708426"
+ + a
+ + "-1455904067809789555"
+ + a
+ + "-3282840298752750619"
+ + a
+ + "-6372126815260401415"
+ + a
+ + "2793000487951069203"
+ + a
+ + "3407829716811135029"
+ + a
+ + "-3550687721123470352"
+ + a
+ + "2334961244010951939"
+ + a
+ + "3260897395698896570"
+ + a
+ + "4264152409350870060"
+ + a
+ + "-4581604198263834689"
+ + a
+ + "593651731243654052"
+ + a
+ + "5219278619370393377"
+ + a
+ + "8180789381611215595"
+ + a
+ + "335944578956738265"
+ + a
+ + "-4099322903435145803"
+ + a
+ + "-5208733150508251139"
+ + a
+ + "6921838573247464652"
+ + a
+ + "-7343860276513066939"
+ + a
+ + "1074796594127796533"
+ + a
+ + "6736037593502794699"
+ + a
+ + "3930958507434110353"
+ + a
+ + "5997417370432515857"
+ + a
+ + "7187262605211107782"
+ + a
+ + "-922608839179471544"
+ + a
+ + "-3471824513017619234"
+ + a
+ + "-4620638843369421105"
+ + a
+ + "3839702874104484142"
+ + a
+ + "-8879066745942443015"
+ + a
+ + "8583264167167467194"
+ + a
+ + "8017617442295035923"
+ + a
+ + "720409418337220568"
+ + a
+ + "-7137080051336955740"
+ + a
+ + "820362479923112978"
+ + a
+ + "-7587987020499938058"
+ + a
+ + "-1736856639032582832"
+ + a
+ + "5300485442178576853"
+ + a
+ + "4669115833793700662"
+ + a
+ + "8717027790748151190"
+ + a
+ + "-418059405227441973"
+ + a
+ + "4902234911110449242"
+ + a
+ + "-8615106177201876902"
+ + a
+ + "2642338947881553044"
+ + a
+ + "7939176766883596700"
+ + a
+ + "1697016693253389256"
+ + a
+ + "-7698790186559863273"
+ + a
+ + "4627520723163497364"
+ + a
+ + "-6562331579564087360"
+ + a
+ + "1409651656149384948"
+ + a
+ + "-8371366983499774489"
+ + a
+ + "-6611959236955224128"
+ + a
+ + "2517362013853074515"
+ + a
+ + "3939673655674821754"
+ + a
+ + "-6007531133325330260"
+ + a
+ + "8479159933661814342"
+ + a
+ + "1845989680250192409"
+ + a
+ + "225054535985556281"
+ + a
+ + "-6188100461697042647"
+ + a
+ + "5374211210369521877"
+ + a
+ + "163959847081807350"
+ + a
+ + "6580469580461298388"
+ + a
+ + "-1002731784954961273"
+ + a
+ + "-6503468674254937564"
+ + a
+ + "-8857927768785141898"
+ + a
+ + "1886814526626193459"
+ + a
+ + "-2054416122836792110"
+ + a
+ + "-4730857486151345556"
+ + a
+ + "-3314785731153835706"
+ + a
+ + "1745408277008263680"
+ + a
+ + "5485482250833588602"
+ + a
+ + "1901945721551946729"
+ + a
+ + "-6559784953015731783"
+ + a
+ + "-5502687098156415701"
+ + a
+ + "-8096097547161354797"
+ + a
+ + "-307294365139042468"
+ + a
+ + "7597534968367450948"
+ + a
+ + "-4693142428350838425"
+ + a
+ + "-8569821400048670315"
+ + a
+ + "51756053461047436"
+ + a
+ + "6145399184482338050"
+ + a
+ + "-1269825730684672598"
+ + a
+ + "-8136004504129724580"
+ + a
+ + "-6708170860115238208"
+ + a
+ + "-2467746284360258768"
+ + a
+ + "8902235073100629169"
+ + a
+ + "189609796856280361"
+ + a
+ + "8027665317964735814"
+ + a
+ + "-7153504149551054926"
+ + a
+ + "-5187209899599232647"
+ + a
+ + "8540839755479381215"
+ + a
+ + "-1319086816580691984"
+ + a
+ + "-7516852006138817907"
+ + a
+ + "-5051221376794367033"
+ + a
+ + "-3579739334939429689"
+ + a
+ + "3098919600942247826"
+ + a
+ + "-2519365444798061973"
+ + a
+ + "2204513501049642145"
+ + a
+ + "-6234925272255791092"
+ + a
+ + "-3914224114071635323"
+ + a
+ + "-7512919820331381478"
+ + a
+ + "2244229534103919315"
+ + a
+ + "1119622915521220416"
+ + a
+ + "4973425882801212711"
+ + a
+ + "888294988592812045"
+ + a
+ + "-2993218281966203028"
+ + a
+ + "-7416276224986099499"
+ + a
+ + "-3201845045715304871"
+ + a
+ + "7916061662832482521"
+ + a
+ + "-6429005121216132546"
+ + a
+ + "4638130389145698725"
+ + a
+ + "-948986391460678656"
+ + a
+ + "2040599255252723129"
+ + a
+ + "2389151452553418337"
+ + a
+ + "-7194285399888931477"
+ + a
+ + "3523430492558376836"
+ + a
+ + "-6231585169594436085"
+ + a
+ + "-5841617642246119760"
+ + a
+ + "-8785142203731382456"
+ + a
+ + "4139787392364890707"
+ + a
+ + "-824771567737812271"
+ + a
+ + "-9049356826976837046"
+ + a
+ + "1543457604506053183"
+ + a
+ + "-8855709180263493025"
+ + a
+ + "-4086029732019652815"
+ + a
+ + "90590069959604498"
+ + a
+ + "7374902126537519544"
+ + a
+ + "5412393938850166428"
+ + a
+ + "-6589069323077828363"
+ + a
+ + "-1136016124815333328"
+ + a
+ + "-2530288730062427647"
+ + a
+ + "9141260983043855235"
+ + a
+ + "-2243560951402688244"
+ + a
+ + "2697023448685250190"
+ + a
+ + "8223867111341762760"
+ + a
+ + "-5500453568140873838"
+ + a
+ + "-5551678114273627129"
+ + a
+ + "7711796121740538204"
+ + a
+ + "2416459930837400994"
+ + a
+ + "-4986134594990721078"
+ + a
+ + "-6594545860032484707"
+ + a
+ + "-8488892579407720307"
+ + a
+ + "-4950191686469776760"
+ + a
+ + "-5705045902392669136"
+ + a
+ + "-5870378255948101081"
+ + a
+ + "3085694771349171032"
+ + a
+ + "4045381385104452693"
+ + a
+ + "-537473159150314420"
+ + a
+ + "6405721852917755173"
+ + a
+ + "5909632865333497015"
+ + a
+ + "3023990489803862857"
+ + a
+ + "5997722854481417133"
+ + a
+ + "7368862447064249271"
+ + a
+ + "-3558359757113329685"
+ + a
+ + "886745892017187721"
+ + a
+ + "-2376768597770873246"
+ + a
+ + "-956660966571699164"
+ + a
+ + "-3438286909229699850"
+ + a
+ + "465585013972219292"
+ + a
+ + "4997419886346194306"
+ + a
+ + "7874632479463897943"
+ + a
+ + "4230767999778323743"
+ + a
+ + "2933416313595490031"
+ + a
+ + "-3661566128442997850"
+ + a
+ + "-9204100771314909860"
+ + a
+ + "297875109783269234"
+ + a
+ + "5554793942304582226"
+ + a
+ + "6138216312792961386"
+ + a
+ + "-3472526723345394200"
+ + a
+ + "1383344105427170622"
+ + a
+ + "-8390998045425633158"
+ + a
+ + "8361230649785801199"
+ + a
+ + "8128422357710829775"
+ + a
+ + "-7076636178968793451"
+ + a
+ + "-6879189373271244675"
+ + a
+ + "2149279496697403228"
+ + a
+ + "2163874995004306059"
+ + a
+ + "-37608952743346481"
+ + a
+ + "-4885142876404553640"
+ + a
+ + "3957092134099679064"
+ + a
+ + "8957662328709322940"
+ + a
+ + "6596532226374168839"
+ + a
+ + "-1153804182586454676"
+ + a
+ + "7915386076772517778"
+ + a
+ + "3597944315336510115"
+ + a
+ + "2586844712538139804"
+ + a
+ + "-2949556178161873667"
+ + a
+ + "-8127379747417804230"
+ + a
+ + "3506009531395375525"
+ + a
+ + "-3799767679885215310"
+ + a
+ + "2737451203785104562"
+ + a
+ + "5151555140583328389"
+ + a
+ + "6131176129975873998"
+ + a
+ + "9110902753217664431"
+ + a
+ + "-8890925772445109480"
+ + a
+ + "-1129142490829084372"
+ + a
+ + "7582080677413993035"
+ + a
+ + "-4789780502432213058"
+ + a
+ + "8426741383105462303"
+ + a
+ + "-7514443426873435923"
+ + a
+ + "-6096386960435665425"
+ + a
+ + "1403493976840512847"
+ + a
+ + "1200644717268219291"
+ + a
+ + "-1654479055663475959"
+ + a
+ + "3892352692045151151"
+ + a
+ + "-628374969525061995"
+ + a
+ + "1611638561673781188"
+ + a
+ + "75698269457877956"
+ + a
+ + "560196518908944166"
+ + a
+ + "1704180641177725702"
+ + a
+ + "1645123699159403958"
+ + a
+ + "9158917099811213033"
+ + a
+ + "-633837023015943918"
+ + a
+ + "-1216327101793702433"
+ + a
+ + "-7939715734589699598"
+ + a
+ + "6289958106814327876"
+ + a
+ + "-8084522417454129195"
+ + a
+ + "-8951157286790813026"
+ + a
+ + "8733634768783483612"
+ + a
+ + "164169779436237861"
+ + a
+ + "-5613076795169777676"
+ + a
+ + "-6691306822112669306"
+ + a
+ + "-2267089117411867845"
+ + a
+ + "-6267882092027247645"
+ + a
+ + "-3218696406030596964"
+ + a
+ + "-4620987111405818850"
+ + a
+ + "-7623635815148905797"
+ + a
+ + "-3199414663287922089"
+ + a
+ + "-1971270715359367144"
+ + a
+ + "-3146133425464229454"
+ + a
+ + "203048746228635246"
+ + a
+ + "-869382991009092515"
+ + a
+ + "4396580273807758428"
+ + a
+ + "5924374890894969809"
+ + a
+ + "-962029163140355769"
+ + a
+ + "-2447328698446720681"
+ + a
+ + "6648306985125948285"
+ + a
+ + "3792332857906789069"
+ + a
+ + "-2592849401678093154"
+ + a
+ + "-2229214953895616599"
+ + a
+ + "60121393842835511"
+ + a
+ + "-4644566344032056770"
+ + a
+ + "-3670852882719285073"
+ + a
+ + "-4795459485337427650"
+ + a
+ + "-3078872474700468634"
+ + a
+ + "6082446142445692287"
+ + a
+ + "7661890440999892250"
+ + a
+ + "2718377609076393985"
+ + a
+ + "-1329549452134874227"
+ + a
+ + "667147203567492144"
+ + a
+ + "5699077439330337124"
+ + a
+ + "-3395250238968386971"
+ + a
+ + "7468957273606729554"
+ + a
+ + "6681693604205340338"
+ + a
+ + "-5819455968905345675"
+ + a
+ + "7377517611865477086"
+ + a
+ + "-4171662381900114945"
+ + a
+ + "8558322651462810286"
+ + a
+ + "5927326833461217817"
+ + a
+ + "-5391460157352293018"
+ + a
+ + "456166417270507267"
+ + a
+ + "-2089775772693106802"
+ + a
+ + "-2473806311188227713"
+ + a
+ + "-5166358583590604295"
+ + a
+ + "577211619565310319"
+ + a
+ + "-7574180351348641021"
+ + a
+ + "-1384162338784655427"
+ + a
+ + "-1949917261552336103"
+ + a
+ + "-7646197583621832582"
+ + a
+ + "7157828596321324413"
+ + a
+ + "-6712065070950544567"
+ + a
+ + "2236061909679704394"
+ + a
+ + "4873628242313201150"
+ + a
+ + "-6464311572388006218"
+ + a
+ + "4304099916847392129"
+ + a
+ + "8848098664611212439"
+ + a
+ + "6898172476461689080"
+ + a
+ + "3345247779380902440"
+ + a
+ + "-6997871520454550747"
+ + a
+ + "-6721226268986105588"
+ + a
+ + "7746073604671358475"
+ + a
+ + "-4028896770080478318"
+ + a
+ + "2249919745243282647"
+ + a
+ + "5980588423799317305"
+ + a
+ + "-1821824395713650690"
+ + a
+ + "-2882046706545431689"
+ + a
+ + "7061967606227304354"
+ + a
+ + "-2573913225429695307"
+ + a
+ + "-4648857271845470150"
+ + a
+ + "-4795319601251648610"
+ + a
+ + "-2449406718613084816"
+ + a
+ + "676112606062692505"
+ + a
+ + "7077775243255965517"
+ + a
+ + "8279439461933769619"
+ + a
+ + "-8967593294134626925"
+ + a
+ + "1463924050027057153"
+ + a
+ + "4108746256100642153"
+ + a
+ + "671669840699843877"
+ + a
+ + "-1937390517977201347"
+ + a
+ + "-8026937897785993585"
+ + a
+ + "7254950325548462821"
+ + a
+ + "2857869494438805734"
+ + a
+ + "-6367096460053409785"
+ + a
+ + "5906509814179036904"
+ + a
+ + "-7118684737034387269"
+ + a
+ + "-5966644349827364178"
+ + a
+ + "1784340785351647342"
+ + a
+ + "6898187943583870772"
+ + a
+ + "8254792895615645961"
+ + a
+ + "-954677375447462376"
+ + a
+ + "-8607649526798219183"
+ + a
+ + "-682926799495397982"
+ + a
+ + "-7356576987957102704"
+ + a
+ + "-1441103736382094588"
+ + a
+ + "7744146107024206197"
+ + a
+ + "8298974751122681058"
+ + a
+ + "-8158073329334910408"
+ + a
+ + "-7541746284309130733"
+ + a
+ + "6396900582423006721"
+ + a
+ + "-4405495884594382679"
+ + a
+ + "-7870995558099949174"
+ + a
+ + "-4609593285056091858"
+ + a
+ + "-5738979543098896126"
+ + a
+ + "-7068293602902740431"
+ + a
+ + "118869759956105524"
+ + a
+ + "1415505245870596096"
+ + a
+ + "1358436106725431016"
+ + a
+ + "7188423186761477302"
+ + a
+ + "232476152356452489"
+ + a
+ + "-1083161878765589385"
+ + a
+ + "-2475947859666233849"
+ + a
+ + "-1723796127851316742"
+ + a
+ + "-2367624063964726530"
+ + a
+ + "2586319451174446919"
+ + a
+ + "-8372939562443165929"
+ + a
+ + "-2162489972833552703"
+ + a
+ + "-7318017362543869778"
+ + a
+ + "-648659211385937817"
+ + a
+ + "3773520909212276149"
+ + a
+ + "-585681434878711978"
+ + a
+ + "1278446472326031063"
+ + a
+ + "-6858913687097261167"
+ + a
+ + "6725941661693479136"
+ + a
+ + "-7835171098254580731"
+ + a
+ + "8517002855346448475"
+ + a
+ + "1727317643390553286"
+ + a
+ + "167454846277770108"
+ + a
+ + "-4484400628788161122"
+ + a
+ + "-1249045407222665664"
+ + a
+ + "-4125864658252067639"
+ + a
+ + "-232876471594021678"
+ + a
+ + "7566742549724119545"
+ + a
+ + "2431450474966577201"
+ + a
+ + "7758435135139184031"
+ + a
+ + "-926428227324858098"
+ + a
+ + "-210572359641175956"
+ + a
+ + "-7452750196656904966"
+ + a
+ + "-5599738118885185771"
+ + a
+ + "-7813953591554086464"
+ + a
+ + "-5047474818723058090"
+ + a
+ + "4439034982562431759"
+ + a
+ + "-5466270553032256710"
+ + a
+ + "2712169492000026204"
+ + a
+ + "1862737586753002392"
+ + a
+ + "-5353038579107901178"
+ + a
+ + "-6947450633948884256"
+ + a
+ + "7974444038241854650"
+ + a
+ + "-2049784300038248681"
+ + a
+ + "-768795663611722216"
+ + a
+ + "3970864286397878815"
+ + a
+ + "8814423706677119382"
+ + a
+ + "-5399130435676630212"
+ + a
+ + "4506091385324763812"
+ + a
+ + "-5107634537661317933"
+ + a
+ + "1839010175740881169"
+ + a
+ + "6936175302234839667"
+ + a
+ + "-6325912105782826835"
+ + a
+ + "393680543852720921"
+ + a
+ + "-3448458068233951442"
+ + a
+ + "-4019906657169970257"
+ + a
+ + "7620172460174228567"
+ + a
+ + "-8997998808030605866"
+ + a
+ + "8771659726844811350"
+ + a
+ + "3428423575986468581"
+ + a
+ + "7632781606969980013"
+ + a
+ + "6762091554535732016"
+ + a
+ + "2622604169364957653"
+ + a
+ + "1232024216574036364"
+ + a
+ + "-371534179473878306"
+ + a
+ + "3501875876588075794"
+ + a
+ + "-9187612436207592870"
+ + a
+ + "-5980761402510607581"
+ + a
+ + "4624164498132835644"
+ + a
+ + "1676395763050685357"
+ + a
+ + "-3827762186089381253"
+ + a
+ + "8006025736889493931"
+ + a
+ + "8649369890583457083"
+ + a
+ + "7984987985730213362"
+ + a
+ + "5095547086850321711"
+ + a
+ + "3654889101665666601"
+ + a
+ + "4772050352648720696"
+ + a
+ + "4673711977958914584"
+ + a
+ + "3690722882959687762"
+ + a
+ + "3652961941639885094"
+ + a
+ + "915177957041372336"
+ + a
+ + "8394835670723402780"
+ + a
+ + "-6283516835760048860"
+ + a
+ + "2682052802898306863"
+ + a
+ + "-39133921885058876"
+ + a
+ + "7182677795321372732"
+ + a
+ + "-1123137732347862838"
+ + a
+ + "-7187211477441315499"
+ + a
+ + "2107865782772483260"
+ + a
+ + "7029138672815376251"
+ + a
+ + "-5246589834603524916"
+ + a
+ + "4946578063768694189"
+ + a
+ + "-3327990999892404608"
+ + a
+ + "1410047753342829601"
+ + a
+ + "-607158855661428843"
+ + a
+ + "526205912768181200"
+ + a
+ + "-3353974441997849823"
+ + a
+ + "4345004848608271928"
+ + a
+ + "-8028878697252563721"
+ + a
+ + "6992865860785518941"
+ + a
+ + "89887283317978958"
+ + a
+ + "-4890367390986524656"
+ + a
+ + "5395246551033333412"
+ + a
+ + "9149027322776474227"
+ + a
+ + "1888231617770768351"
+ + a
+ + "1832173972123517627"
+ + a
+ + "8850607358448321718"
+ + a
+ + "-3573842940544988617"
+ + a
+ + "-2515993210354900402"
+ + a
+ + "-2970572681876409710"
+ + a
+ + "-8812829507312878041"
+ + a
+ + "-5126214287592177836"
+ + a
+ + "-593209255878052551"
+ + a
+ + "4279401441478329262"
+ + a
+ + "5735936342676945242"
+ + a
+ + "3857279221947912310"
+ + a
+ + "3485153424716732642"
+ + a
+ + "-662050485808185745"
+ + a
+ + "-72690764741550959"
+ + a
+ + "-5532883488824715058"
+ + a
+ + "393326004849090479"
+ + a
+ + "3923986657219931129"
+ + a
+ + "-7948340736432765324"
+ + a
+ + "-7006347688709669743"
+ + a
+ + "-5322266596584016214"
+ + a
+ + "6389240576921692850"
+ + a
+ + "8562031855739319952"
+ + a
+ + "8315930557757687161"
+ + a
+ + "-8086248775449979391"
+ + a
+ + "7373112891709936326"
+ + a
+ + "-4607557960451455531"
+ + a
+ + "-3205406892078035134"
+ + a
+ + "8263877443067298183"
+ + a
+ + "-2223029705465288029"
+ + a
+ + "-8925415624073416936"
+ + a
+ + "-6791064439277026258"
+ + a
+ + "-5042775155189130958"
+ + a
+ + "4776655052699757437"
+ + a
+ + "-4933088522838694001"
+ + a
+ + "8330184652392589698"
+ + a
+ + "1637070176593639835"
+ + a
+ + "-5059066217951619637"
+ + a
+ + "4014727029744109400"
+ + a
+ + "-22434511743124473"
+ + a
+ + "8666756317556173953"
+ + a
+ + "6703726588124124616"
+ + a
+ + "6076365483039687154"
+ + a
+ + "6591634391558659210"
+ + a
+ + "-3348044019496228538"
+ + a
+ + "-627454787052259341"
+ + a
+ + "-6243419827278238015"
+ + a
+ + "-776770814135022500"
+ + a
+ + "7132449682874312048"
+ + a
+ + "2085761559853657487"
+ + a
+ + "6058593733864972686"
+ + a
+ + "4050640859539192274"
+ + a
+ + "3970990063816635689"
+ + a
+ + "-647266916803895004"
+ + a
+ + "7221575838847750917"
+ + a
+ + "-5566112000340108090"
+ + a
+ + "-6280641768631632960"
+ + a
+ + "8795263388574407420"
+ + a
+ + "-7365448443375986378"
+ + a
+ + "7376974628227097364"
+ + a
+ + "2243540925361024038"
+ + a
+ + "6959654388375811495"
+ + a
+ + "-1771171730378641387"
+ + a
+ + "-6613010221741265634"
+ + a
+ + "-6613598152109663886"
+ + a
+ + "5659412131893682807"
+ + a
+ + "2038713578902245882"
+ + a
+ + "8696094200527592009"
+ + a
+ + "-6769680772788512930"
+ + a
+ + "-538388923584348667"
+ + a
+ + "-5779831060953309150"
+ + a
+ + "3643283202091378046"
+ + a
+ + "-2808307024288961849"
+ + a
+ + "488009925522109610"
+ + a
+ + "-1687403487093613780"
+ + a
+ + "253095126108852649"
+ + a
+ + "-7423002503273461200"
+ + a
+ + "-5689624720828647673"
+ + a
+ + "9212972063823063964"
+ + a
+ + "1186793416532289086"
+ + a
+ + "6918511817379999296"
+ + a
+ + "-4755159465512075650"
+ + a
+ + "8121227818115496539"
+ + a
+ + "-8485767623736951889"
+ + a
+ + "5020011809071985215"
+ + a
+ + "-6500273869653352010"
+ + a
+ + "-2663957737793529547"
+ + a
+ + "-8101377298829715465"
+ + a
+ + "326463995359446173"
+ + a
+ + "1484830176553892122"
+ + a
+ + "-4579692127371314343"
+ + a
+ + "-6097801910883493102"
+ + a
+ + "525734517143906156"
+ + a
+ + "-1165711456870362277"
+ + a
+ + "-1658430596698325539"
+ + a
+ + "-4983979316745651326"
+ + a
+ + "-7367822663026016031"
+ + a
+ + "5536666042452556266"
+ + a
+ + "7831167091211321400"
+ + a
+ + "-1686744937172643124"
+ + a
+ + "4709613367890590679"
+ + a
+ + "9117545435945354623"
+ + a
+ + "3908543326474915014"
+ + a
+ + "3700783554614032889"
+ + a
+ + "5500699049362208843"
+ + a
+ + "8883143644002779797"
+ + a
+ + "5940917221843046728"
+ + a
+ + "-6377243717063936490"
+ + a
+ + "-2781555112742499359"
+ + a
+ + "7113301072320947691"
+ + a
+ + "501910549267933025"
+ + a
+ + "899471793024038068"
+ + a
+ + "-751886605302181282"
+ + a
+ + "-2897960745928273660"
+ + a
+ + "8841990777988640026"
+ + a
+ + "5210290765280155752"
+ + a
+ + "-1099833625028932053"
+ + a
+ + "4086791554633655976"
+ + a
+ + "3527398908407917918"
+ + a
+ + "2609157552125744460"
+ + a
+ + "-5411717177956362023"
+ + a
+ + "8936638687147126625"
+ + a
+ + "-5201416203511998337"
+ + a
+ + "8020173228835757436"
+ + a
+ + "-4672525820805766249"
+ + a
+ + "-7017604422221214209"
+ + a
+ + "-5632657971529806673"
+ + a
+ + "-5406365676176679526"
+ + a
+ + "6125746927489206206"
+ + a
+ + "2061394030035502100"
+ + a
+ + "-3336616794732253560"
+ + a
+ + "-2440204974762145461"
+ + a
+ + "-5510695638491715770"
+ + a
+ + "-2052022113521973639"
+ + a
+ + "8535915275635347845"
+ + a
+ + "2141589138267928504"
+ + a
+ + "4704310198587792718"
+ + a
+ + "-8516883072754769465"
+ + a
+ + "6176162718928711814"
+ + a
+ + "8787949673700282382"
+ + a
+ + "4567063869848829592"
+ + a
+ + "6699214372328713951"
+ + a
+ + "614582040941377104"
+ + a
+ + "2114345272374019582"
+ + a
+ + "1205326714880158218"
+ + a
+ + "345855247272630115"
+ + a
+ + "6863791979252946443"
+ + a
+ + "6584140928474080830"
+ + a
+ + "-974652546421757650"
+ + a
+ + "1104047281126844986"
+ + a
+ + "1683950892429964226"
+ + a
+ + "-114975964243070203"
+ + a
+ + "-1486761048205680462"
+ + a
+ + "-5291415350861152240"
+ + a
+ + "-1295712165563917082"
+ + a
+ + "376680977854009491"
+ + a
+ + "-3801206170133606167"
+ + a
+ + "-7615543987751473197"
+ + a
+ + "1222029900712890572"
+ + a
+ + "8086849773582156199"
+ + a
+ + "5699471271553623625"
+ + a
+ + "-3076723626026790089"
+ + a
+ + "-6990312711296902870"
+ + a
+ + "2249309539351360519"
+ + a
+ + "-2213204999452304917"
+ + a
+ + "8837902888211847987"
+ + a
+ + "4621474258312999582"
+ + a
+ + "741401623629356284"
+ + a
+ + "-507184299727707634"
+ + a
+ + "5003522673131041922"
+ + a
+ + "-2512304557071432409"
+ + a
+ + "5860072657460323795"
+ + a
+ + "-3551939454713122155"
+ + a
+ + "7039243559025359908"
+ + a
+ + "2667090741430594730"
+ + a
+ + "-5263722189506025379"
+ + a
+ + "-582705400402113148"
+ + a
+ + "-4378370425568246822"
+ + a
+ + "-2392995877829144210"
+ + a
+ + "2097189650028165999"
+ + a
+ + "9044307751697998726"
+ + a
+ + "-4309773030097066323"
+ + a
+ + "-245082032325783392"
+ + a
+ + "-9041789317184909469"
+ + a
+ + "3315057182621451370"
+ + a
+ + "-2164132299950019225"
+ + a
+ + "343094821716735184"
+ + a
+ + "-3331909883100521834"
+ + a
+ + "4460313862086287266"
+ + a
+ + "1812608985018565400"
+ + a
+ + "-6008529437339156878"
+ + a
+ + "-8385297506366368280"
+ + a
+ + "-4247845283919211326"
+ + a
+ + "7900328945924389267"
+ + a
+ + "8078840910713306207"
+ + a
+ + "-570510759641380545"
+ + a
+ + "5367622739845813255"
+ + a
+ + "-6792063981953278482"
+ + a
+ + "-8609138015271881647"
+ + a
+ + "1294288896582281220"
+ + a
+ + "6609052239144832718"
+ + a
+ + "-263131261566575354"
+ + a
+ + "-2039905094280094870"
+ + a
+ + "-3228456423753777756"
+ + a
+ + "2274841285895911448"
+ + a
+ + "4845949212104423416"
+ + a
+ + "-6574745710094852434"
+ + a
+ + "-2285800804160361968"
+ + a
+ + "-1144764046272735988"
+ + a
+ + "-4887605558584506199"
+ + a
+ + "5064876672478755716"
+ + a
+ + "-3232208103790399939"
+ + a
+ + "5348678013006323061"
+ + a
+ + "2032227170072499776"
+ + a
+ + "-5970510642986571719"
+ + a
+ + "-8156922862002452315"
+ + a
+ + "-3691740174830523328"
+ + a
+ + "-3844250118619088474"
+ + a
+ + "6528094743374630013"
+ + a
+ + "1606598775838302661"
+ + a
+ + "-7747504328742060032"
+ + a
+ + "-4505193121087041011"
+ + a
+ + "8325698253309430243"
+ + a
+ + "6550206689455229085"
+ + a
+ + "-207710379570803862"
+ + a
+ + "-6711498507499959962"
+ + a
+ + "-9095050147687951259"
+ + a
+ + "6239177506672082739"
+ + a
+ + "-5523818040006060583"
+ + a
+ + "5804005037551216873"
+ + a
+ + "-6075325454732731681"
+ + a
+ + "-7988185768521296112"
+ + a
+ + "1039395532244708299"
+ + a
+ + "8001200725138275729"
+ + a
+ + "-7074698778794344561"
+ + a
+ + "-2336253547742487103"
+ + a
+ + "-2606238079972532383"
+ + a
+ + "-4339818077653300067"
+ + a
+ + "-8558914632631279460"
+ + a
+ + "-4135390505319655081"
+ + a
+ + "2460161030124935395"
+ + a
+ + "5391174676264245265"
+ + a
+ + "7530170745056800908"
+ + a
+ + "7664035282768827623"
+ + a
+ + "-2020351598233962694"
+ + a
+ + "3876340506192868147"
+ + a
+ + "3814540850933604043"
+ + a
+ + "6817954267349138699"
+ + a
+ + "-7584650305603780491"
+ + a
+ + "-4395070944949623026"
+ + a
+ + "-3158848660161048533"
+ + a
+ + "-269117567728546720"
+ + a
+ + "-3122953333596609979"
+ + a
+ + "71120503137756914"
+ + a
+ + "5637199835664820063"
+ + a
+ + "1852378117913282566"
+ + a
+ + "-3747245523281264000"
+ + a
+ + "2303890783248766194"
+ + a
+ + "5410987106499222910"
+ + a
+ + "2696649635447671843"
+ + a
+ + "1271620354708692897"
+ + a
+ + "-1729642602524780956"
+ + a
+ + "-1315069908501370233"
+ + a
+ + "-6125916372380604320"
+ + a
+ + "-4056353451015536314"
+ + a
+ + "5159017489559205989"
+ + a
+ + "-2113090891128734249"
+ + a
+ + "4333405829811801194"
+ + a
+ + "8954747781215647921"
+ + a
+ + "-5450373765985049517"
+ + a
+ + "-2432760969826335052"
+ + a
+ + "-8012766084822596494"
+ + a
+ + "-4619727234556333752"
+ + a
+ + "4884975169507664977"
+ + a
+ + "-2939311391033930554"
+ + a
+ + "8221234267001882030"
+ + a
+ + "3912615498840805654"
+ + a
+ + "-561848863929337914"
+ + a
+ + "43573555934369944"
+ + a
+ + "-5928313827199464746"
+ + a
+ + "-3501297165495359161"
+ + a
+ + "-4998610189516277794"
+ + a
+ + "-1913588868684190692"
+ + a
+ + "-2278084051797147481"
+ + a
+ + "-1610917622365620560"
+ + a
+ + "-2305710515290190841"
+ + a
+ + "1165273814480014116"
+ + a
+ + "6838312509618586212"
+ + a
+ + "6491150613554885188"
+ + a
+ + "-1944753561513611658"
+ + a
+ + "6255632190421079018"
+ + a
+ + "-1773213467900303792"
+ + a
+ + "-5038763434446212704"
+ + a
+ + "4715879262419648672"
+ + a
+ + "4333687086319921033"
+ + a
+ + "912014761633159733"
+ + a
+ + "-1930604833972234368"
+ + a
+ + "-3391198435941748799"
+ + a
+ + "-3071060629188926847"
+ + a
+ + "9184135797098467296"
+ + a
+ + "5032670905203823687"
+ + a
+ + "6078798282541869400"
+ + a
+ + "5423378219740816695"
+ + a
+ + "8252131508489648546"
+ + a
+ + "7607030361567934076"
+ + a
+ + "-262569328231047255"
+ + a
+ + "6663001055977811058"
+ + a
+ + "6298318905345480400"
+ + a
+ + "6506771260680588103"
+ + a
+ + "-4416115954408464838"
+ + a
+ + "4518035252801993183"
+ + a
+ + "1982554975493001284"
+ + a
+ + "7197635397909925624"
+ + a
+ + "-7668571444198740394"
+ + a
+ + "-2665198171639411569"
+ + a
+ + "-2456494556960430885"
+ + a
+ + "4715159423995014529"
+ + a
+ + "-237344622867592307"
+ + a
+ + "-6262109450197948044"
+ + a
+ + "-3474443242974353931"
+ + a
+ + "2934384186453480183"
+ + a
+ + "-1277187905886427086"
+ + a
+ + "6673422063586767847"
+ + a
+ + "-7880530014350474248"
+ + a
+ + "-3646763270037402604"
+ + a
+ + "-149292745994812965"
+ + a
+ + "3376372179984995877"
+ + a
+ + "-1111731767279408435"
+ + a
+ + "4671558057806984888"
+ + a
+ + "-1292228904119138843"
+ + a
+ + "-3583239139422111283"
+ + a
+ + "4342930889299439202"
+ + a
+ + "-8725402015736905116"
+ + a
+ + "-1109270466676439570"
+ + a
+ + "-1972518756159303581"
+ + a
+ + "-35230474872666330"
+ + a
+ + "-3244541790415322947"
+ + a
+ + "-7950578804922139559"
+ + a
+ + "-5486091848317228079"
+ + a
+ + "-2281298898378514801"
+ + a
+ + "-6646645720238471665"
+ + a
+ + "6623440358756065485"
+ + a
+ + "-9153856997766830367"
+ + a
+ + "-3585757771897050217"
+ + a
+ + "6930412469998148039"
+ + a
+ + "-4351635392967078730"
+ + a
+ + "7154169321563069892"
+ + a
+ + "-7358749838981554373"
+ + a
+ + "-6190958088870856968"
+ + a
+ + "-3862427748869640253"
+ + a
+ + "-7621041158611765618"
+ + a
+ + "1393838985767952635"
+ + a
+ + "6302374980696710359"
+ + a
+ + "1987923606930691174"
+ + a
+ + "-7327828962052736585"
+ + a
+ + "-6060103819590919330"
+ + a
+ + "-1893007658963996865"
+ + a
+ + "1542199167471334487"
+ + a
+ + "5310282313180215963"
+ + a
+ + "7036608913993422955"
+ + a
+ + "5043602524937529134"
+ + a
+ + "5859573804796910866"
+ + a
+ + "-8924021905603981317"
+ + a
+ + "7835087149345156656"
+ + a
+ + "1478259997538816838"
+ + a
+ + "-4419199077858089900"
+ + a
+ + "4379067511389396090"
+ + a
+ + "-4696287401987638466"
+ + a
+ + "-6289442156285941683"
+ + a
+ + "8071605714943028386"
+ + a
+ + "-8951996923309922526"
+ + a
+ + "-1790196851854134485"
+ + a
+ + "-1264412905408257619"
+ + a
+ + "2374886420318321090"
+ + a
+ + "-7092423419234991140"
+ + a
+ + "6218125741463927567"
+ + a
+ + "-6598568930604895755"
+ + a
+ + "1689449162299839807"
+ + a
+ + "6323892191946689531"
+ + a
+ + "5646678591452304903"
+ + a
+ + "7993106382290699094"
+ + a
+ + "1206223703498719977"
+ + a
+ + "-7812953645555505486"
+ + a
+ + "397555838289174966"
+ + a
+ + "2976010389220542502"
+ + a
+ + "6308013708131108179"
+ + a
+ + "7862773357976478105"
+ + a
+ + "-6789656998258171201"
+ + a
+ + "275448435954686817"
+ + a
+ + "-6484850033613884844"
+ + a
+ + "9044540601293429036"
+ + a
+ + "-4714255188356898484"
+ + a
+ + "5107200514627105059"
+ + a
+ + "-892844935287728250"
+ + a
+ + "8469981168123687244"
+ + a
+ + "2137088813854102922"
+ + a
+ + "548487406451152687"
+ + a
+ + "1161566390356831946"
+ + a
+ + "-5366587423885009476"
+ + a
+ + "-137674910105312214"
+ + a
+ + "-5369011151552101013"
+ + a
+ + "1881433315829048002"
+ + a
+ + "-7597495061786346843"
+ + a
+ + "6167296021565352674"
+ + a
+ + "3126346873707249250"
+ + a
+ + "8414581496191902550"
+ + a
+ + "-3431070974078274286"
+ + a
+ + "-3353898778032759574"
+ + a
+ + "-2726654910268244032"
+ + a
+ + "-2448795643678291408"
+ + a
+ + "-4158353334053633163"
+ + a
+ + "1565862036675850112"
+ + a
+ + "-5342984135704362278"
+ + a
+ + "-6124338599754330305"
+ + a
+ + "-8280725856435474912"
+ + a
+ + "3057386475416295012"
+ + a
+ + "-3896005975245615836"
+ + a
+ + "-90185462533567176"
+ + a
+ + "3093018829144434637"
+ + a
+ + "7490599664753053788"
+ + a
+ + "-4881014271207206728"
+ + a
+ + "237646390828291600"
+ + a
+ + "-1621517700991273449"
+ + a
+ + "9009036724350796722"
+ + a
+ + "1273336340673207510"
+ + a
+ + "-3769199860684286077"
+ + a
+ + "-7931514986849244674"
+ + a
+ + "6468389508770523825"
+ + a
+ + "-5020483768058569122"
+ + a
+ + "-8520505365041508463"
+ + a
+ + "1248378152959174759"
+ + a
+ + "-1964120239901863893"
+ + a
+ + "5138388422110294104"
+ + a
+ + "3479513344423596283"
+ + a
+ + "6047730220900958874"
+ + a
+ + "6924511811254590454"
+ + a
+ + "3318218834094603372"
+ + a
+ + "8024806712616818634"
+ + a
+ + "2031539881428295362"
+ + a
+ + "5629507007642070890"
+ + a
+ + "-6229588220001211542"
+ + a
+ + "3869936499024244169"
+ + a
+ + "4201625407413514353"
+ + a
+ + "8493899006002794981"
+ + a
+ + "2056217217492362692"
+ + a
+ + "-8694261806141907194"
+ + a
+ + "-3459846817409973991"
+ + a
+ + "7036384077172043079"
+ + a
+ + "5981148065908712463"
+ + a
+ + "-8712265711502573995"
+ + a
+ + "4287743740428781715"
+ + a
+ + "5942873816449620598"
+ + a
+ + "-6575543227187130490"
+ + a
+ + "397910908799842765"
+ + a
+ + "-2568040981584112228"
+ + a
+ + "3237988768615513563"
+ + a
+ + "-4191411378079550841"
+ + a
+ + "-4222601966375665847"
+ + a
+ + "2522403976399554131"
+ + a
+ + "6120926922071503844"
+ + a
+ + "375027522888513811"
+ + a
+ + "-1522882740446678808"
+ + a
+ + "4935255114151481533"
+ + a
+ + "-4086159388928651904"
+ + a
+ + "-3115343425808268974"
+ + a
+ + "-5203489536122476147"
+ + a
+ + "8795529815600651074"
+ + a
+ + "80286283873639590"
+ + a
+ + "-5068484706612970483"
+ + a
+ + "-3672967451330670241"
+ + a
+ + "-1442705906622520019"
+ + a
+ + "7968573705208549582"
+ + a
+ + "3360965067397160242"
+ + a
+ + "-6513273208088886710"
+ + a
+ + "5050721900444876591"
+ + a
+ + "3133412726794527606"
+ + a
+ + "-7659500995422659500"
+ + a
+ + "-1873481277373416323"
+ + a
+ + "8935362823082660828"
+ + a
+ + "-2778758476607531874"
+ + a
+ + "1251425370875299113"
+ + a
+ + "7420431773171575530"
+ + a
+ + "8199506692094230572"
+ + a
+ + "3529081376621410124"
+ + a
+ + "95676002737657866"
+ + a
+ + "-7433215714594080822"
+ + a
+ + "1560120442064157692"
+ + a
+ + "-4917925827649253879"
+ + a
+ + "-1633645829195564426"
+ + a
+ + "-511632361606516458"
+ + a
+ + "-724701335622380917"
+ + a
+ + "-2919212109012158621"
+ + a
+ + "-4866871173848680561"
+ + a
+ + "-2847321891723707121"
+ + a
+ + "-8758010767404897539"
+ + a
+ + "-5003144527513441687"
+ + a
+ + "-2141864159028670309"
+ + a
+ + "-6774089444468990282"
+ + a
+ + "1653132513488543963"
+ + a
+ + "-5455000731532098766"
+ + a
+ + "-3572531149673915004"
+ + a
+ + "2133384230918589012"
+ + a
+ + "-853660865858261871"
+ + a
+ + "5494488722556641110"
+ + a
+ + "-5862610005604565671"
+ + a
+ + "-808451173197690380"
+ + a
+ + "5477097553753168879"
+ + a
+ + "3838919399935625843"
+ + a
+ + "-8764371251366553909"
+ + a
+ + "-2839135848879115804"
+ + a
+ + "3790471151342951081"
+ + a
+ + "4755475314974292649"
+ + a
+ + "743304231064856753"
+ + a
+ + "4365356611584238904"
+ + a
+ + "-6548585131949438249"
+ + a
+ + "-6200874338176525025"
+ + a
+ + "-5644404220656850300"
+ + a
+ + "-8315082119007311289"
+ + a
+ + "5113602445539749238"
+ + a
+ + "-600681809417260420"
+ + a
+ + "-4763730284677038877"
+ + a
+ + "2445781733723819820"
+ + a
+ + "-4278609684717675804"
+ + a
+ + "-1631928600038343826"
+ + a
+ + "7870230093295086097"
+ + a
+ + "45653481548996166"
+ + a
+ + "-6698651163315451032"
+ + a
+ + "7418922739373700391"
+ + a
+ + "2834036305019532914"
+ + a
+ + "-7805479983895305544"
+ + a
+ + "-4498301813798211672"
+ + a
+ + "8198301112608777690"
+ + a
+ + "3946135380080558354"
+ + a
+ + "3729328735391874282"
+ + a
+ + "6039511859537991984"
+ + a
+ + "-7284061669470897853"
+ + a
+ + "-8278031970957020130"
+ + a
+ + "4718143193789236998"
+ + a
+ + "-8663517765137566990"
+ + a
+ + "2252185910208785692"
+ + a
+ + "2529003162250954088"
+ + a
+ + "98935220014582140"
+ + a
+ + "1315061819377404353"
+ + a
+ + "4663598838352530857"
+ + a
+ + "-4550571558489962777"
+ + a
+ + "3825904347230371710"
+ + a
+ + "-8468131412504877868"
+ + a
+ + "-3028672951573954003"
+ + a
+ + "6793888796330723125"
+ + a
+ + "-6731836204402594940"
+ + a
+ + "-3083086963709202870"
+ + a
+ + "5972055209543821682"
+ + a
+ + "-3007704021703785969"
+ + a
+ + "6276921094468975562"
+ + a
+ + "-2385667706792875104"
+ + a
+ + "-4798538726797851066"
+ + a
+ + "6542420907682848985"
+ + a
+ + "8760005704353021645"
+ + a
+ + "-8383174092167068100"
+ + a
+ + "1994267834917436408"
+ + a
+ + "-882988945015600361"
+ + a
+ + "-1421628514110625838"
+ + a
+ + "1386556981179212774"
+ + a
+ + "-1628451205522220321"
+ + a
+ + "6096215132756199157"
+ + a
+ + "-3157999682887015585"
+ + a
+ + "-720804536501956791"
+ + a
+ + "864311996094102739"
+ + a
+ + "-9129776398840895040"
+ + a
+ + "6371274784961788864"
+ + a
+ + "6317369305411645559"
+ + a
+ + "-8217006195540446798"
+ + a
+ + "953960764002310251"
+ + a
+ + "-7896083199860814461"
+ + a
+ + "-3195405771619052190"
+ + a
+ + "2554422386574752733"
+ + a
+ + "4245141863786747915"
+ + a
+ + "-5477415415121490948"
+ + a
+ + "-3619704843164087708"
+ + a
+ + "1944074131303980216"
+ + a
+ + "-1887968265449951653"
+ + a
+ + "-2435116698727098942"
+ + a
+ + "-2748007480497913160"
+ + a
+ + "-1812140038148607699"
+ + a
+ + "-1481232631074352583"
+ + a
+ + "77026493495056688"
+ + a
+ + "1427899818682618110"
+ + a
+ + "-2545050666705232342"
+ + a
+ + "-4907281526846362585"
+ + a
+ + "6992610960207825125"
+ + a
+ + "2927663913121050555"
+ + a
+ + "2449858278136761630"
+ + a
+ + "-3104582313646135605"
+ + a
+ + "943339250059010116"
+ + a
+ + "6972390479973112278"
+ + a
+ + "-143887053138790272"
+ + a
+ + "3356560001730432879"
+ + a
+ + "-6566764162681997323"
+ + a
+ + "3668838725603488541"
+ + a
+ + "-1023359833182599096"
+ + a
+ + "813165131040507522"
+ + a
+ + "5478699827093318242"
+ + a
+ + "-4189776217840205634"
+ + a
+ + "701589422406172276"
+ + a
+ + "3472756774896500757"
+ + a
+ + "-8290107053048657861"
+ + a
+ + "5694414199747604942"
+ + a
+ + "-3191169294615547003"
+ + a
+ + "5091500569779147870"
+ + a
+ + "4196571841396612339"
+ + a
+ + "7711777312917239750"
+ + a
+ + "5152881326409671423"
+ + a
+ + "734491937592074296"
+ + a
+ + "1431453077774631744"
+ + a
+ + "7219739284858384128"
+ + a
+ + "-5221091070613125140"
+ + a
+ + "-1011640063542528607"
+ + a
+ + "1283968889735350687"
+ + a
+ + "-2671634264101398722"
+ + a
+ + "-7954219858650838694"
+ + a
+ + "4029537184239459388"
+ + a
+ + "-4933138819600324915"
+ + a
+ + "7664875024126417956"
+ + a
+ + "5802164042560157400"
+ + a
+ + "8867033579115635149"
+ + a
+ + "-2262327063551902129"
+ + a
+ + "-5496413002288534087"
+ + a
+ + "-9177790286601677571"
+ + a
+ + "-4804121451895014721"
+ + a
+ + "6657552006397867243"
+ + a
+ + "-5676535376674264854"
+ + a
+ + "2504402911410518498"
+ + a
+ + "2977491730596934305"
+ + a
+ + "5454818912351900973"
+ + a
+ + "5876513810599383047"
+ + a
+ + "715611406429649314"
+ + a
+ + "-2402728559636829020"
+ + a
+ + "4650943519358976995"
+ + a
+ + "2544986244799828804"
+ + a
+ + "719478745574466273"
+ + a
+ + "-22820586461547489"
+ + a
+ + "-8242498312426535775"
+ + a
+ + "5166391322188818746"
+ + a
+ + "-1301099741166466238"
+ + a
+ + "6777183057769553164"
+ + a
+ + "-5180542485006512578"
+ + a
+ + "-393290239772002461"
+ + a
+ + "3939307281163922416"
+ + a
+ + "8005001261047788680"
+ + a
+ + "8930885310148079445"
+ + a
+ + "-4794693648338023775"
+ + a
+ + "-7832197853329142250"
+ + a
+ + "-6616876144074407594"
+ + a
+ + "-7815536134577831227"
+ + a
+ + "-7300592228259078217"
+ + a
+ + "-2420675692755400857"
+ + a
+ + "-2417030952500882339"
+ + a
+ + "-6797270974718479310"
+ + a
+ + "269771083840125902"
+ + a
+ + "3157091651274262167"
+ + a
+ + "8697615235028412710"
+ + a
+ + "3538320494628000898"
+ + a
+ + "-8700694277662501646"
+ + a
+ + "2066583791144923103"
+ + a
+ + "5551206296830695007"
+ + a
+ + "-4970728003721986464"
+ + a
+ + "-552197265275467117"
+ + a
+ + "4626145040974907773"
+ + a
+ + "3448612904884604506"
+ + a
+ + "748670883168176828"
+ + a
+ + "-6233979681553781243"
+ + a
+ + "-4544802847111792590"
+ + a
+ + "-7761655660005544050"
+ + a
+ + "2297369898425242952"
+ + a
+ + "857207484408519424"
+ + a
+ + "-17394699395150910"
+ + a
+ + "8201559379994584341"
+ + a
+ + "-1231944804806258435"
+ + a
+ + "6597224736215359520"
+ + a
+ + "500846020371422071"
+ + a
+ + "1018234138705237805"
+ + a
+ + "-1596011118585484140"
+ + a
+ + "-26138935862806682"
+ + a
+ + "-1097215572743228769"
+ + a
+ + "81351931136175031"
+ + a
+ + "6395439808563545870"
+ + a
+ + "-1297999266625483083"
+ + a
+ + "8548488327470157065"
+ + a
+ + "-6576036797330794821"
+ + a
+ + "-2104611578644794323"
+ + a
+ + "-5784421750563954602"
+ + a
+ + "-2392748360644615284"
+ + a
+ + "2669307174142835426"
+ + a
+ + "-8617162425929035528"
+ + a
+ + "-7185571120010208396"
+ + a
+ + "7494874214499485825"
+ + a
+ + "-8019549838914840070"
+ + a
+ + "-8572548389377808325"
+ + a
+ + "9177920409992928417"
+ + a
+ + "2574765948067107908"
+ + a
+ + "-7145546505022417546"
+ + a
+ + "6091877106353284868"
+ + a
+ + "2718564275332216399"
+ + a
+ + "-1682451754550845002"
+ + a
+ + "5383698813342645996"
+ + a
+ + "-5325275677998898905"
+ + a
+ + "4296256188514240856"
+ + a
+ + "-6284555223374144834"
+ + a
+ + "4686907914658969749"
+ + a
+ + "-2672433107634723396"
+ + a
+ + "9182976955244244343"
+ + a
+ + "-45834596498729789"
+ + a
+ + "8476474814586529232"
+ + a
+ + "-5400958819728596068"
+ + a
+ + "-8511321941667534387"
+ + a
+ + "4336907653045517620"
+ + a
+ + "-5210703458746995809"
+ + a
+ + "9179806757390753255"
+ + a
+ + "6094025559094213981"
+ + a
+ + "-8412598326260443648"
+ + a
+ + "-4172563096838061784"
+ + a
+ + "-3071328123176030080"
+ + a
+ + "3969788753850185615"
+ + a
+ + "1786729876414136862"
+ + a
+ + "-2275444241133449163"
+ + a
+ + "-1871384636507265905"
+ + a
+ + "5314766366902575281"
+ + a
+ + "4256843451351245319"
+ + a
+ + "3205232295236085173"
+ + a
+ + "-4071018234209233666"
+ + a
+ + "-241084583434390927"
+ + a
+ + "-4864009884957720521"
+ + a
+ + "-2474507206868372935"
+ + a
+ + "-3086257679926615299"
+ + a
+ + "4088550094298505316"
+ + a
+ + "6481859430300093871"
+ + a
+ + "-4149248147260089737"
+ + a
+ + "5751936103051737727"
+ + a
+ + "-8067819930398707581"
+ + a
+ + "7670386680304021110"
+ + a
+ + "-2332417447729735733"
+ + a
+ + "3221958145698506426"
+ + a
+ + "-2794978698076298327"
+ + a
+ + "7954395953204729363"
+ + a
+ + "6677772407808174257"
+ + a
+ + "2115558009373128363"
+ + a
+ + "1303266325210361366"
+ + a
+ + "-711058957100944363"
+ + a
+ + "1614912588004413772"
+ + a
+ + "6874669523411939728"
+ + a
+ + "-8369287306464935953"
+ + a
+ + "-1684416424857587573"
+ + a
+ + "8253440249378089955"
+ + a
+ + "-3388982263081362580"
+ + a
+ + "3678474358138101179"
+ + a
+ + "-5457310176028329844"
+ + a
+ + "8062499506372708702"
+ + a
+ + "1961126841586682246"
+ + a
+ + "4364856704628394215"
+ + a
+ + "6724515039510026929"
+ + a
+ + "3145915635689578957"
+ + a
+ + "-9068629039917709590"
+ + a
+ + "-6896889714673092541"
+ + a
+ + "-5872078154100411498"
+ + a
+ + "482677778014278881"
+ + a
+ + "994873927174850790"
+ + a
+ + "-8000765370282532732"
+ + a
+ + "690174924996651613"
+ + a
+ + "-8265299070933681551"
+ + a
+ + "5649507651661886351"
+ + a
+ + "-8019963432471327552"
+ + a
+ + "8576709714539609386"
+ + a
+ + "7428668195334390519"
+ + a
+ + "-1004200650521530822"
+ + a
+ + "-2886037052899604747"
+ + a
+ + "-7114770470000271960"
+ + a
+ + "-2300304907145140207"
+ + a
+ + "-4597066594806265853"
+ + a
+ + "-8873151084735737726"
+ + a
+ + "4096849419089976706"
+ + a
+ + "1065469964635630848"
+ + a
+ + "6032531643212966985"
+ + a
+ + "8042807203906726571"
+ + a
+ + "-8597691136135861525"
+ + a
+ + "3975309871459151660"
+ + a
+ + "1910269397441177392"
+ + a
+ + "-8082728109078253799"
+ + a
+ + "-2153134960423805673"
+ + a
+ + "-3694283007221332323"
+ + a
+ + "-5329554595744515555"
+ + a
+ + "-7616008112930064296"
+ + a
+ + "5374164716957274303"
+ + a
+ + "7055806471699822212"
+ + a
+ + "-3034416501726773186"
+ + a
+ + "-4777342028744844712"
+ + a
+ + "-8858900436739205983"
+ + a
+ + "-1883194253652283984"
+ + a
+ + "763857036569830144"
+ + a
+ + "-2604905813028082963"
+ + a
+ + "8896125689765848574"
+ + a
+ + "-3678672038381431014"
+ + a
+ + "-2580260397506994537"
+ + a
+ + "7842089863115348559"
+ + a
+ + "5540665111479827739"
+ + a
+ + "2579610618501036634"
+ + a
+ + "-6546623738212313479"
+ + a
+ + "-6338633021039551589"
+ + a
+ + "-7838115082028684864"
+ + a
+ + "1707181944826096686"
+ + a
+ + "5751970046862735843"
+ + a
+ + "-5852680709225685681"
+ + a
+ + "-6664378160967385156"
+ + a
+ + "3636371481441062650"
+ + a
+ + "1838037137099569235"
+ + a
+ + "-8411250525386747438"
+ + a
+ + "-6472330738327055521"
+ + a
+ + "7162476550072738627"
+ + a
+ + "-1470651201059158516"
+ + a
+ + "428366551799105514"
+ + a
+ + "7277995288887084542"
+ + a
+ + "-1029487524482586573"
+ + a
+ + "-5720661788324433771"
+ + a
+ + "5653818400270062403"
+ + a
+ + "-7615219267151273358"
+ + a
+ + "-6875499057096504295"
+ + a
+ + "5196088249313395514"
+ + a
+ + "1507760576708216047"
+ + a
+ + "4466003920374073753"
+ + a
+ + "-6927163147925885723"
+ + a
+ + "7030187541847112585"
+ + a
+ + "-643059337707244575"
+ + a
+ + "8500788707189878484"
+ + a
+ + "6912045776561875120"
+ + a
+ + "-7795124748209566249"
+ + a
+ + "1480521059261289841"
+ + a
+ + "-7942872165842049912"
+ + a
+ + "160228994416279090"
+ + a
+ + "8922510255051815353"
+ + a
+ + "3776806737798112731"
+ + a
+ + "1784830562638493853"
+ + a
+ + "-1468151429829558966"
+ + a
+ + "-8462833212897464693"
+ + a
+ + "2711466553961636031"
+ + a
+ + "-8832517111573585662"
+ + a
+ + "-1115551713759082630"
+ + a
+ + "8029886438954713068"
+ + a
+ + "-1506344344651609694"
+ + a
+ + "1147647689029089318"
+ + a
+ + "-5892481768727240599"
+ + a
+ + "-5066151872839652800"
+ + a
+ + "-3211303276721830804"
+ + a
+ + "902925049407736193"
+ + a
+ + "-1705529505313550753"
+ + a
+ + "6942813368093763373"
+ + a
+ + "-3189584254263886359"
+ + a
+ + "-8151789860636479991"
+ + a
+ + "3160358323515624140"
+ + a
+ + "6766313830725014046"
+ + a
+ + "6616574192994395208"
+ + a
+ + "1505043433831987389"
+ + a
+ + "-8254107266258386239"
+ + a
+ + "8201682746366942403"
+ + a
+ + "7049420348303847327"
+ + a
+ + "-779071050928049378"
+ + a
+ + "1367142373039368053"
+ + a
+ + "7453675130550899599"
+ + a
+ + "-7917711176173061532"
+ + a
+ + "3313398252775778737"
+ + a
+ + "4337717741330632385"
+ + a
+ + "-656911670097071559"
+ + a
+ + "7482645503299742197"
+ + a
+ + "-367598129941149570"
+ + a
+ + "2990187272887706533"
+ + a
+ + "8218597390609729596"
+ + a
+ + "8190839400284186386"
+ + a
+ + "5283093373464135572"
+ + a
+ + "1346661629957039809"
+ + a
+ + "-799282044425507498"
+ + a
+ + "3278126363957749342"
+ + a
+ + "-4895400981922404477"
+ + a
+ + "1979083824421142236"
+ + a
+ + "-4795668697430505972"
+ + a
+ + "-5395970322558385951"
+ + a
+ + "8109620177538792928"
+ + a
+ + "1589881313292818785"
+ + a
+ + "-6540646951889332187"
+ + a
+ + "-1350777919681323896"
+ + a
+ + "2357270747391562180"
+ + a
+ + "8076987350622509789"
+ + a
+ + "8309045708728545067"
+ + a
+ + "530055558885909668"
+ + a
+ + "-8183077235183204275"
+ + a
+ + "6388941139916578691"
+ + a
+ + "-2099445744549474067"
+ + a
+ + "-1293753809133546905"
+ + a
+ + "6781951102324793628"
+ + a
+ + "3047687602405084072"
+ + a
+ + "-4037298749186653696"
+ + a
+ + "-6685020615667120790"
+ + a
+ + "-6362750930968018218"
+ + a
+ + "5055566658581523526"
+ + a
+ + "-5671792057135769031"
+ + a
+ + "-5899031313464120278"
+ + a
+ + "-8188151456690710620"
+ + a
+ + "-2760499349444106371"
+ + a
+ + "-4426150260258002636"
+ + a
+ + "8565807875095182470"
+ + a
+ + "2347925124125718962"
+ + a
+ + "8836770360451529998"
+ + a
+ + "5282628269541305041"
+ + a
+ + "-3153353454794752957"
+ + a
+ + "-7257095076158279757"
+ + a
+ + "2378830048501618398"
+ + a
+ + "-5052934544264721487"
+ + a
+ + "2294026617251813768"
+ + a
+ + "-1415570073243535013"
+ + a
+ + "-3918356151852504711"
+ + a
+ + "6414529400340348349"
+ + a
+ + "-2606259282286505118"
+ + a
+ + "-454218702919111708"
+ + a
+ + "-647652547804552051"
+ + a
+ + "-3271722851719373664"
+ + a
+ + "6111983006311674433"
+ + a
+ + "-4354511461760213366"
+ + a
+ + "6491934357263299434"
+ + a
+ + "7191166931020341832"
+ + a
+ + "-5645675414313381767"
+ + a
+ + "-1011183135791847665"
+ + a
+ + "2795173187087355273"
+ + a
+ + "890216303210146665"
+ + a
+ + "-7912169349074963773"
+ + a
+ + "-4742180638700132808"
+ + a
+ + "-259088887663225086"
+ + a
+ + "8029334994095983610"
+ + a
+ + "-5374542070909783879"
+ + a
+ + "8281835760288916557"
+ + a
+ + "-3127270261288988396"
+ + a
+ + "-6183235249269165131"
+ + a
+ + "2174567067503160669"
+ + a
+ + "-1259213684934836835"
+ + a
+ + "2247172518861085345"
+ + a
+ + "7730193503548449435"
+ + a
+ + "-3046048989442302062"
+ + a
+ + "-6044149610030342408"
+ + a
+ + "870973208219058351"
+ + a
+ + "263182624751709550"
+ + a
+ + "-5064262206113338719"
+ + a
+ + "-2738036181733010893"
+ + a
+ + "590574988808658664"
+ + a
+ + "-105086946395041226"
+ + a
+ + "-4956626643504740682"
+ + a
+ + "-1419490083740558680"
+ + a
+ + "-7134184373942185957"
+ + a
+ + "826466482441411773"
+ + a
+ + "-7846545176314988191"
+ + a
+ + "-1386482905212722765"
+ + a
+ + "3899842152616849081"
+ + a
+ + "-6154468766884504813"
+ + a
+ + "4022359631212191254"
+ + a
+ + "-9123910919937723594"
+ + a
+ + "-3796696742954785448"
+ + a
+ + "1787119573712429578"
+ + a
+ + "5711418735283584685"
+ + a
+ + "4977033620972423701"
+ + a
+ + "1176824201489403700"
+ + a
+ + "7953379965576896954"
+ + a
+ + "8024486826677009378"
+ + a
+ + "-7593833097004061509"
+ + a
+ + "-7502240379893536599"
+ + a
+ + "-4607020169090577921"
+ + a
+ + "4520570961867228630"
+ + a
+ + "8330080160487545236"
+ + a
+ + "5302665185151061946"
+ + a
+ + "6335873427741359862"
+ + a
+ + "7942843793521747084"
+ + a
+ + "5631162455806133137"
+ + a
+ + "-6450425604371442547"
+ + a
+ + "-4010704877806920316"
+ + a
+ + "1399248098718732397"
+ + a
+ + "972469733242052263"
+ + a
+ + "-7298803554170955283"
+ + a
+ + "-5698194901053468721"
+ + a
+ + "2545963032814312133"
+ + a
+ + "-7862399973443453872"
+ + a
+ + "453451199524111815"
+ + a
+ + "-8477216232078151230"
+ + a
+ + "-6056741494627867069"
+ + a
+ + "3261908613835634696"
+ + a
+ + "-5031581820759604819"
+ + a
+ + "-5525101357093304947"
+ + a
+ + "-992112469424902275"
+ + a
+ + "6895709263621485521"
+ + a
+ + "7054726806246574934"
+ + a
+ + "5047241881050380323"
+ + a
+ + "-3904922186542766742"
+ + a
+ + "4579915186836399279"
+ + a
+ + "-5353937321024776932"
+ + a
+ + "-928075393056688709"
+ + a
+ + "5942878932738101734"
+ + a
+ + "8713841580842905389"
+ + a
+ + "6608875547270477436"
+ + a
+ + "4301343187721522768"
+ + a
+ + "-4095324054764236239"
+ + a
+ + "-5138250332818123817"
+ + a
+ + "1351937779264056474"
+ + a
+ + "-1576618855002232287"
+ + a
+ + "3540447542356909936"
+ + a
+ + "-3078741273218372674"
+ + a
+ + "2004486967449152186"
+ + a
+ + "-7663226671924277711"
+ + a
+ + "-6819176140304455893"
+ + a
+ + "-8065381572537158409"
+ + a
+ + "6561904230350781128"
+ + a
+ + "5968982111440892104"
+ + a
+ + "688535005304927181"
+ + a
+ + "3671146762822430492"
+ + a
+ + "6074946612835118545"
+ + a
+ + "8043972357531606512"
+ + a
+ + "-1357746997691964120"
+ + a
+ + "-7033153104090396727"
+ + a
+ + "-434627271818273656"
+ + a
+ + "4571881995274120185"
+ + a
+ + "-1563538570477750034"
+ + a
+ + "-7623771092889725152"
+ + a
+ + "4688991713505327042"
+ + a
+ + "-8604626094696448011"
+ + a
+ + "-8529809129456688327"
+ + a
+ + "4303329914390981702"
+ + a
+ + "-8079780687321061126"
+ + a
+ + "1861670108377883196"
+ + a
+ + "-2644415997330278652"
+ + a
+ + "-5897802207920412189"
+ + a
+ + "7495952426168779470"
+ + a
+ + "7793293741439116010"
+ + a
+ + "2796178858843037359"
+ + a
+ + "-5020394929558949210"
+ + a
+ + "2344703945676226943"
+ + a
+ + "-453773009627263396"
+ + a
+ + "6499859343787172991"
+ + a
+ + "6699134485389206975"
+ + a
+ + "2218525668340833141"
+ + a
+ + "2355733121583346103"
+ + a
+ + "-791325441084568805"
+ + a
+ + "-7246537864425084060"
+ + a
+ + "-4510848757778177607"
+ + a
+ + "-161128756252577951"
+ + a
+ + "-2166556087921641968"
+ + a
+ + "-2280493242052046516"
+ + a
+ + "1932496391683207290"
+ + a
+ + "-6421008687224691834"
+ + a
+ + "1290133728513942094"
+ + a
+ + "-7297634445335644361"
+ + a
+ + "-5997232904471695479"
+ + a
+ + "-7708529674621560684"
+ + a
+ + "-5588174406718247254"
+ + a
+ + "6294887950843562852"
+ + a
+ + "-7997118510844796196"
+ + a
+ + "-2885810922271028289"
+ + a
+ + "-8635762432530533286"
+ + a
+ + "-1317304606959364328"
+ + a
+ + "-2373159149951022322"
+ + a
+ + "-1936916772815322754"
+ + a
+ + "5599319884707688316"
+ + a
+ + "-6732913923000100066"
+ + a
+ + "-6213972918461393443"
+ + a
+ + "8024159330049419788"
+ + a
+ + "-651899612153972849"
+ + a
+ + "6049664271129214018"
+ + a
+ + "-6706689037037281621"
+ + a
+ + "-4989027840498412056"
+ + a
+ + "6832795885647890423"
+ + a
+ + "-2628481227451105323"
+ + a
+ + "5650274281754722047"
+ + a
+ + "5563965301533620821"
+ + a
+ + "3899471650830194813"
+ + a
+ + "-3097129239518275540"
+ + a
+ + "-5668778981688365311"
+ + a
+ + "-5675636006739130917"
+ + a
+ + "32486694633375181"
+ + a
+ + "-2262521173289991903"
+ + a
+ + "-7692135913691023871"
+ + a
+ + "4480225237126481092"
+ + a
+ + "-8363092793621689865"
+ + a
+ + "5287391673747106960"
+ + a
+ + "-3844953471224911120"
+ + a
+ + "9077450120460588448"
+ + a
+ + "-7541759920452713233"
+ + a
+ + "-5613734448761422117"
+ + a
+ + "5828717629727343845"
+ + a
+ + "-3031332337894560319"
+ + a
+ + "5313736621768512781"
+ + a
+ + "797352516281981799"
+ + a
+ + "-1325023898307200103"
+ + a
+ + "-8268807205481681472"
+ + a
+ + "-5324331743570264178"
+ + a
+ + "-7083639995384692451"
+ + a
+ + "-8637163951377958933"
+ + a
+ + "2975908686744585718"
+ + a
+ + "-2008404856766633711"
+ + a
+ + "7723387902706398954"
+ + a
+ + "-7973500423533177762"
+ + a
+ + "6692632760106560260"
+ + a
+ + "-4665610910118945254"
+ + a
+ + "8451621719365601343"
+ + a
+ + "-2645373212082623082"
+ + a
+ + "8421271369123846731"
+ + a
+ + "-2599494001784771694"
+ + a
+ + "-3946625605047561839"
+ + a
+ + "-8704217631780175137"
+ + a
+ + "4761619239478980213"
+ + a
+ + "4199445537668073285"
+ + a
+ + "5625985806773378266"
+ + a
+ + "2011135118429857446"
+ + a
+ + "-198733429078096918"
+ + a
+ + "926284042761947234"
+ + a
+ + "7584707738648251926"
+ + a
+ + "7614806611607011069"
+ + a
+ + "-8694136674804601508"
+ + a
+ + "1234259175475228671"
+ + a
+ + "-8862269440647405625"
+ + a
+ + "-7202860528132844005"
+ + a
+ + "-5343608329321007044"
+ + a
+ + "3955153865076457875"
+ + a
+ + "7340646789438500722"
+ + a
+ + "-4814101825287423270"
+ + a
+ + "1111096036970381634"
+ + a
+ + "3080041105664682874"
+ + a
+ + "402725684298177056"
+ + a
+ + "-442192729353998024"
+ + a
+ + "8885077571446724840"
+ + a
+ + "-2931904822146023563"
+ + a
+ + "6559344414154434782"
+ + a
+ + "2874385438277726934"
+ + a
+ + "-1558926763201497104"
+ + a
+ + "1719667747851828007"
+ + a
+ + "1148918550836530493"
+ + a
+ + "7842222988563611516"
+ + a
+ + "-1264979064834915366"
+ + a
+ + "-6449956785418592103"
+ + a
+ + "-6435052198093738542"
+ + a
+ + "7303314767276522899"
+ + a
+ + "-8525447647589129361"
+ + a
+ + "-4105683137247453514"
+ + a
+ + "-339581268788198729"
+ + a
+ + "-2792564634978555223"
+ + a
+ + "4381265229624255289"
+ + a
+ + "5716805244733524432"
+ + a
+ + "6651831766232613385"
+ + a
+ + "-2646266171513414671"
+ + a
+ + "-9184734908069189112"
+ + a
+ + "8411451797653218329"
+ + a
+ + "-5644815294965228440"
+ + a
+ + "3406219370354298560"
+ + a
+ + "7189061357352189294"
+ + a
+ + "3854704827508586027"
+ + a
+ + "5195183761365797242"
+ + a
+ + "-857975408992204527"
+ + a
+ + "-215081397961025980"
+ + a
+ + "5541172185389004673"
+ + a
+ + "-2158931240515443609"
+ + a
+ + "-2707030040377390590"
+ + a
+ + "-4951339429533825757"
+ + a
+ + "6860115872619611899"
+ + a
+ + "-6977159187553839010"
+ + a
+ + "-6588129350991115691"
+ + a
+ + "7460014721369155308"
+ + a
+ + "8244516680674177886"
+ + a
+ + "2718524895786720527"
+ + a
+ + "5083129452729634032"
+ + a
+ + "-3088884557649270463"
+ + a
+ + "-2890867246580149294"
+ + a
+ + "4144736866258125616"
+ + a
+ + "-4515220895037178019"
+ + a
+ + "-3081548925238092023"
+ + a
+ + "7059458545451479138"
+ + a
+ + "-7629100745456283399"
+ + a
+ + "-4677223535664272821"
+ + a
+ + "-160196749568088848"
+ + a
+ + "2335351286911662720"
+ + a
+ + "8269863132468702887"
+ + a
+ + "675696569525121547"
+ + a
+ + "4220297877278479844"
+ + a
+ + "-1941703945306008194"
+ + a
+ + "-8085555609744465156"
+ + a
+ + "3320638279003727635"
+ + a
+ + "-1454534490754134119"
+ + a
+ + "-9070853339029164267"
+ + a
+ + "1066514592317218749"
+ + a
+ + "754035260480022143"
+ + a
+ + "-8442330812214212858"
+ + a
+ + "733223385524053986"
+ + a
+ + "-6928812214869123533"
+ + a
+ + "9175782745023974027"
+ + a
+ + "7709129652756409574"
+ + a
+ + "6446771461470981092"
+ + a
+ + "-4669040159691830357"
+ + a
+ + "4940949800684628762"
+ + a
+ + "3596568245401674296"
+ + a
+ + "-2934469607945168128"
+ + a
+ + "-2832159018707221002"
+ + a
+ + "-5963608707147616718"
+ + a
+ + "1136173520603479232"
+ + a
+ + "-5948152900752711299"
+ + a
+ + "2776238780712347625"
+ + a
+ + "3545391441816397950"
+ + a
+ + "-7712627837337478268"
+ + a
+ + "-6100017580852682616"
+ + a
+ + "800507691066680798"
+ + a
+ + "-4905853621444866613"
+ + a
+ + "4650896174010534735"
+ + a
+ + "-6291383217484249423"
+ + a
+ + "8530758450418989618"
+ + a
+ + "1420593270340448651"
+ + a
+ + "-8695607674634208463"
+ + a
+ + "-8917496092665137043"
+ + a
+ + "-6875691519537749563"
+ + a
+ + "2877196668554762069"
+ + a
+ + "2403578486267609340"
+ + a
+ + "-3947791298286507886"
+ + a
+ + "388275381527242877"
+ + a
+ + "-5220091270772812957"
+ + a
+ + "-2278940210913219127"
+ + a
+ + "-7080887395332308771"
+ + a
+ + "1445237338423510467"
+ + a
+ + "-8261792903727334638"
+ + a
+ + "3403233544842424945"
+ + a
+ + "-2595302965412930961"
+ + a
+ + "8782074601683241220"
+ + a
+ + "-9116459070810315419"
+ + a
+ + "-6949872996379093995"
+ + a
+ + "2211552796472936012"
+ + a
+ + "5042322673897575985"
+ + a
+ + "-8335938585661637757"
+ + a
+ + "-7488365451307650921"
+ + a
+ + "1807439259410769371"
+ + a
+ + "7387376844333691455"
+ + a
+ + "8698689454771362101"
+ + a
+ + "5434385237440762654"
+ + a
+ + "-3923006091697187991"
+ + a
+ + "2928453024753164200"
+ + a
+ + "3465006396035071337"
+ + a
+ + "-7192016247724926826"
+ + a
+ + "-746984709422884186"
+ + a
+ + "8483037580095556329"
+ + a
+ + "3247327325691153073"
+ + a
+ + "8704618608551355438"
+ + a
+ + "-1948688537689292507"
+ + a
+ + "-9085664162222307582"
+ + a
+ + "6734570649656350661"
+ + a
+ + "-8770073734572497960"
+ + a
+ + "-9194731727659180320"
+ + a
+ + "-9160987442754332167"
+ + a
+ + "-6991099690895060995"
+ + a
+ + "-6411220257744657204"
+ + a
+ + "-3347728207653992781"
+ + a
+ + "-4666630998429640361"
+ + a
+ + "988627827426911191"
+ + a
+ + "517132412672358405"
+ + a
+ + "6780424254067588829"
+ + a
+ + "3484025531596887721"
+ + a
+ + "-8172604109698856585"
+ + a
+ + "-2434263978006321470"
+ + a
+ + "146206282000042370"
+ + a
+ + "1802241808220625920"
+ + a
+ + "6556915806108437794"
+ + a
+ + "139780490839209735"
+ + a
+ + "-5013022352242524885"
+ + a
+ + "109564557104052338"
+ + a
+ + "-2980042105416846910"
+ + a
+ + "-4850914409397469159"
+ + a
+ + "5364612497576897859"
+ + a
+ + "-9061350671329928041"
+ + a
+ + "-6694502193330216603"
+ + a
+ + "1568047468602969862"
+ + a
+ + "-4410706216611388772"
+ + a
+ + "-3504312536846858484"
+ + a
+ + "-5151996445415166530"
+ + a
+ + "-2279913604249920741"
+ + a
+ + "-4929800644857338903"
+ + a
+ + "2421285177127780595"
+ + a
+ + "5028242344376950947"
+ + a
+ + "8235055502228982379"
+ + a
+ + "9200641443671019073"
+ + a
+ + "4257670525276564081"
+ + a
+ + "4463718135204600973"
+ + a
+ + "-2782591591092238769"
+ + a
+ + "9196602820397399459"
+ + a
+ + "5815010940885079855"
+ + a
+ + "-4359421796989530853"
+ + a
+ + "-4354454442498564127"
+ + a
+ + "2440722763518477676"
+ + a
+ + "-7965784401936254246"
+ + a
+ + "1589047364720240527"
+ + a
+ + "1345659788105434239"
+ + a
+ + "7856291551886686434"
+ + a
+ + "6831829224225367460"
+ + a
+ + "4725110785524153167"
+ + a
+ + "4800747046490817102"
+ + a
+ + "1742363762860786605"
+ + a
+ + "722408345131520192"
+ + a
+ + "-7928892214208671131"
+ + a
+ + "6747954079596469429"
+ + a
+ + "4939374870942765656"
+ + a
+ + "-7793510012239185175"
+ + a
+ + "-5128456840029167104"
+ + a
+ + "3999741029130023134"
+ + a
+ + "-9003958273268397355"
+ + a
+ + "9020728301986288860"
+ + a
+ + "-6439212985914569999"
+ + a
+ + "1007144509809257016"
+ + a
+ + "-3492980418894752522"
+ + a
+ + "3506776460958432729"
+ + a
+ + "6030604355915164207"
+ + a
+ + "8792783479452649207"
+ + a
+ + "-2684601371150339339"
+ + a
+ + "-1296675361422454746"
+ + a
+ + "1767641169122703699"
+ + a
+ + "-3281682852775613293"
+ + a
+ + "6004863460452231661"
+ + a
+ + "7620904616562851212"
+ + a
+ + "-4558711566239662307"
+ + a
+ + "-4756950387810939835"
+ + a
+ + "-2497931619996157346"
+ + a
+ + "-8869072948826981416"
+ + a
+ + "3909138683430178797"
+ + a
+ + "-5193643777658890355"
+ + a
+ + "1084432834453924013"
+ + a
+ + "-7407336904518008485"
+ + a
+ + "9127734740127325770"
+ + a
+ + "-5184826564961811282"
+ + a
+ + "1822850980453127585"
+ + a
+ + "-2863856280020872853"
+ + a
+ + "-4096478657939760289"
+ + a
+ + "235009772142633776"
+ + a
+ + "-5165419990517586201"
+ + a
+ + "2663587645595195616"
+ + a
+ + "7408192754011596665"
+ + a
+ + "7504135869731143774"
+ + a
+ + "-6205578335667667056"
+ + a
+ + "-6946719039592539497"
+ + a
+ + "1360727412534317706"
+ + a
+ + "-3495358934924862522"
+ + a
+ + "3200599730943527054"
+ + a
+ + "-2986153131924886541"
+ + a
+ + "-364225976897164119"
+ + a
+ + "1619039194664479676"
+ + a
+ + "-421740377479575238"
+ + a
+ + "3381017218293891415"
+ + a
+ + "2803787595269482128"
+ + a
+ + "-7138278169131421226"
+ + a
+ + "-3851028397957722159"
+ + a
+ + "-6845731707997533523"
+ + a
+ + "4304247233651425821"
+ + a
+ + "-3453169481311494287"
+ + a
+ + "-6648899435196339726"
+ + a
+ + "6243068346988978146"
+ + a
+ + "-4687304487053815087"
+ + a
+ + "4500392581972691499"
+ + a
+ + "3194105698562551073"
+ + a
+ + "1302928061966663015"
+ + a
+ + "899861116730412628"
+ + a
+ + "8071794113442656359"
+ + a
+ + "-4736053881059782840"
+ + a
+ + "-8833778113132867406"
+ + a
+ + "8459559140024462575"
+ + a
+ + "-3331202166940103220"
+ + a
+ + "3559576239267745585"
+ + a
+ + "-1438823586080975685"
+ + a
+ + "7598377555370318352"
+ + a
+ + "-9073544075373002810"
+ + a
+ + "3791329947068574989"
+ + a
+ + "5244713667648536191"
+ + a
+ + "2355757732641305802"
+ + a
+ + "-5774713322130818556"
+ + a
+ + "-7825478554949913872"
+ + a
+ + "-6598527612334048895"
+ + a
+ + "-756930092356886446"
+ + a
+ + "-8351794287745316104"
+ + a
+ + "-819962835473789614"
+ + a
+ + "-8521881550004177852"
+ + a
+ + "-9034627345103084413"
+ + a
+ + "-9047810911031283622"
+ + a
+ + "8575019169603285903"
+ + a
+ + "-4216585731513549614"
+ + a
+ + "-6606318378154025381"
+ + a
+ + "-8442134414137607259"
+ + a
+ + "1063742281525256296"
+ + a
+ + "2444862909868862776"
+ + a
+ + "-5865660505052921732"
+ + a
+ + "-1477161071089416551"
+ + a
+ + "-5821089796972455295"
+ + a
+ + "7973943363313051655"
+ + a
+ + "-8788015932375833684"
+ + a
+ + "-5800724202257631305"
+ + a
+ + "1901020626499030241"
+ + a
+ + "-6420649857342151467"
+ + a
+ + "-3754478878428518571"
+ + a
+ + "7780134533194962632"
+ + a
+ + "-6349730169284317324"
+ + a
+ + "8185432331423452346"
+ + a
+ + "-483163739776409083"
+ + a
+ + "-6146548957177106089"
+ + a
+ + "8334243443022708620"
+ + a
+ + "-8647638936276375852"
+ + a
+ + "1787867012905935343"
+ + a
+ + "8531495137548914482"
+ + a
+ + "3196305294345619548"
+ + a
+ + "-4009224549994146621"
+ + a
+ + "-3981545981798777495"
+ + a
+ + "1308124786866222829"
+ + a
+ + "2903439537170119548"
+ + a
+ + "-2579953690819322067"
+ + a
+ + "6038349128654123884"
+ + a
+ + "-2684171378564087202"
+ + a
+ + "9182995811385104744"
+ + a
+ + "7065587761529508411"
+ + a
+ + "-498812826483483625"
+ + a
+ + "-5919464316541484254"
+ + a
+ + "-6350970464071964159"
+ + a
+ + "8989432486083340826"
+ + a
+ + "-1185044272771012307"
+ + a
+ + "-556467658138175721"
+ + a
+ + "8750970768269411594"
+ + a
+ + "-9027438176155103364"
+ + a
+ + "5507419764918531730"
+ + a
+ + "-5055610290122339104"
+ + a
+ + "-8292368412672038228"
+ + a
+ + "5304474258286748692"
+ + a
+ + "-5256497898472412463"
+ + a
+ + "7095026451041417317"
+ + a
+ + "-6807751467976201230"
+ + a
+ + "3717039143574626077"
+ + a
+ + "-4591247941372074087"
+ + a
+ + "7608271608948774736"
+ + a
+ + "1424496362220315470"
+ + a
+ + "-5423957027502409260"
+ + a
+ + "-4141017180658038213"
+ + a
+ + "-1870578015989455472"
+ + a
+ + "8587352705951710482"
+ + a
+ + "-9177081453403018247"
+ + a
+ + "-8445363706999997394"
+ + a
+ + "4173067159251534298"
+ + a
+ + "1437350657420775416"
+ + a
+ + "-1070000499192580013"
+ + a
+ + "-111939158234983540"
+ + a
+ + "1952427412828668451"
+ + a
+ + "6985639293418849691"
+ + a
+ + "-9183787890558711511"
+ + a
+ + "6673115431425147794"
+ + a
+ + "-2413052916560816089"
+ + a
+ + "-7968164544488828165"
+ + a
+ + "7133137662488255689"
+ + a
+ + "6150278420864343332"
+ + a
+ + "-1063157585506220570"
+ + a
+ + "-766650864987700995"
+ + a
+ + "7195254792685191684"
+ + a
+ + "-1435582581928370362"
+ + a
+ + "-2879523426919800287"
+ + a
+ + "4212969420069127401"
+ + a
+ + "3255446824860132528"
+ + a
+ + "-5925995542425069660"
+ + a
+ + "-2097003946182267679"
+ + a
+ + "-7852081866181859094"
+ + a
+ + "616624848325028389"
+ + a
+ + "1080075504201798411"
+ + a
+ + "-15762287547911183"
+ + a
+ + "7442243109459838098"
+ + a
+ + "-428612288525247039"
+ + a
+ + "1508772000781295085"
+ + a
+ + "-4857870162506741921"
+ + a
+ + "9005502861598836051"
+ + a
+ + "-3531083866111316636"
+ + a
+ + "-1750623028322659102"
+ + a
+ + "-7644402612402749953"
+ + a
+ + "8089772461982140167"
+ + a
+ + "6614561254907131380"
+ + a
+ + "-8094512546040756959"
+ + a
+ + "2692758151792462312"
+ + a
+ + "-1141724711746061208"
+ + a
+ + "-5976459569932427301"
+ + a
+ + "-1529656033969840885"
+ + a
+ + "-6966828380750242572"
+ + a
+ + "8073327820400846744"
+ + a
+ + "7039045055893670788"
+ + a
+ + "-2742325506132595551"
+ + a
+ + "6150331224641314116"
+ + a
+ + "-1787951516818644325"
+ + a
+ + "-4847277929262330399"
+ + a
+ + "-4469114800270543351"
+ + a
+ + "-6918217605381346886"
+ + a
+ + "-4170169488436643879"
+ + a
+ + "4552357957041798376"
+ + a
+ + "-4709066557073879539"
+ + a
+ + "-6396627091976196482"
+ + a
+ + "-9130722335546570083"
+ + a
+ + "-4398812371995243503"
+ + a
+ + "5899533274459802779"
+ + a
+ + "-69473498414118534"
+ + a
+ + "-1197357345743482984"
+ + a
+ + "2435770297013385434"
+ + a
+ + "-1429592922048557754"
+ + a
+ + "-1013233244699263266"
+ + a
+ + "4712067073798837598"
+ + a
+ + "7770668071291569987"
+ + a
+ + "7401986834930663363"
+ + a
+ + "-6830107552843383396"
+ + a
+ + "-8568011126097879833"
+ + a
+ + "-7859707543166153133"
+ + a
+ + "7704246285605406829"
+ + a
+ + "-2925914507483401235"
+ + a
+ + "-7312680556325273072"
+ + a
+ + "4120576209264301201"
+ + a
+ + "-3607011601435889470"
+ + a
+ + "-8712827169771424822"
+ + a
+ + "-7796887407736212456"
+ + a
+ + "164872087571561611"
+ + a
+ + "1941589419069581284"
+ + a
+ + "8451379006006945651"
+ + a
+ + "9098542511902588451"
+ + a
+ + "6941301505244463442"
+ + a
+ + "-2236870745682619623"
+ + a
+ + "8915992129216321004"
+ + a
+ + "5388925123168690106"
+ + a
+ + "6227343469909213948"
+ + a
+ + "-2498697716208701876"
+ + a
+ + "2663270930973456251"
+ + a
+ + "-2117851629199166135"
+ + a
+ + "1465928199326458657"
+ + a
+ + "-4140932863973360503"
+ + a
+ + "2382104909996808748"
+ + a
+ + "2691169764757156000"
+ + a
+ + "-6927783708096335521"
+ + a
+ + "5665227142251137157"
+ + a
+ + "3990639158350403149"
+ + a
+ + "8344037316052722035"
+ + a
+ + "-466088682998749225"
+ + a
+ + "-1184998401803242221"
+ + a
+ + "-1826973971920071950"
+ + a
+ + "-2978143448452379174"
+ + a
+ + "5489451572766734253"
+ + a
+ + "3982536154060365232"
+ + a
+ + "-2725897582008329614"
+ + a
+ + "-1763022655025997102"
+ + a
+ + "-4663879336851888757"
+ + a
+ + "-7763663985759369480"
+ + a
+ + "-5171814121380446488"
+ + a
+ + "7023992321466746041"
+ + a
+ + "8496338094272787998"
+ + a
+ + "1649982471059595054"
+ + a
+ + "-7874271973868958029"
+ + a
+ + "-6462289143988000810"
+ + a
+ + "2104206826225724056"
+ + a
+ + "3956743142620270265"
+ + a
+ + "8121240854592968950"
+ + a
+ + "-7756522014486882097"
+ + a
+ + "3329055383033924909"
+ + a
+ + "8043367292746471585"
+ + a
+ + "-259492411881471464"
+ + a
+ + "-4611399437472166608"
+ + a
+ + "-5715952258670801514"
+ + a
+ + "8139447008051858198"
+ + a
+ + "6828556815701928006"
+ + a
+ + "-8950316752207621141"
+ + a
+ + "-2494776080654799471"
+ + a
+ + "-5311611842114224151"
+ + a
+ + "-5274517370195306516"
+ + a
+ + "6957748572905774547"
+ + a
+ + "8619833938161401182"
+ + a
+ + "-8098969501978366703"
+ + a
+ + "7498403252053725248"
+ + a
+ + "-2962379495807183329"
+ + a
+ + "1679495359526004803"
+ + a
+ + "910952023144858920"
+ + a
+ + "-5683679598360504393"
+ + a
+ + "4180886423018064622"
+ + a
+ + "-1895749802147475190"
+ + a
+ + "-4261070201435052052"
+ + a
+ + "-7495472397254860658"
+ + a
+ + "-299958970563615299"
+ + a
+ + "-9181751118046314882"
+ + a
+ + "3063144621650993854"
+ + a
+ + "4581200622692318530"
+ + a
+ + "-7445330906132712462"
+ + a
+ + "-3407411028378675214"
+ + a
+ + "-1004304845850312410"
+ + a
+ + "2808995768722924824"
+ + a
+ + "-7419835825599250603"
+ + a
+ + "-6807925616761556551"
+ + a
+ + "1936216879258578253"
+ + a
+ + "-6348070543052994410"
+ + a
+ + "1614786878786713233"
+ + a
+ + "-5654559563900278353"
+ + a
+ + "5820129333800018049"
+ + a
+ + "5154364084337309192"
+ + a
+ + "-3464890808271116872"
+ + a
+ + "-4318936345310964818"
+ + a
+ + "-5626360026645142603"
+ + a
+ + "1293650924267343356"
+ + a
+ + "2471203500047040188"
+ + a
+ + "-712553739691690470"
+ + a
+ + "9167570520793817086"
+ + a
+ + "5013905130782787526"
+ + a
+ + "2777832819171815927"
+ + a
+ + "4135658959316588118"
+ + a
+ + "-2228943220984283369"
+ + a
+ + "674121904757229053"
+ + a
+ + "-3361067987947841884"
+ + a
+ + "7064783233989236045"
+ + a
+ + "-5391381845337433122"
+ + a
+ + "-4203419284375340292"
+ + a
+ + "3231478719940633443"
+ + a
+ + "-6595059738477077526"
+ + a
+ + "5613738046953226965"
+ + a
+ + "-197825565075612318"
+ + a
+ + "-5941132321697548615"
+ + a
+ + "-5022645559955105889"
+ + a
+ + "2753333873025761953"
+ + a
+ + "3497927560388209810"
+ + a
+ + "3640569866216107917"
+ + a
+ + "2764752341909112546"
+ + a
+ + "-3378489093995131761"
+ + a
+ + "7719703463309362484"
+ + a
+ + "8643252989717845421"
+ + a
+ + "4133119366303995308"
+ + a
+ + "-2991525574328818422"
+ + a
+ + "-7462382354512214606"
+ + a
+ + "-6717862793825856953"
+ + a
+ + "-8546283547873015304"
+ + a
+ + "-4444395436889676762"
+ + a
+ + "-6794705649725291844"
+ + a
+ + "1377850869896378480"
+ + a
+ + "-8597944961814495158"
+ + a
+ + "7420018464904971801"
+ + a
+ + "-6568048747782992956"
+ + a
+ + "-2694483410167439967"
+ + a
+ + "-4025939108850206683"
+ + a
+ + "3886103463501532092"
+ + a
+ + "5252778460490334083"
+ + a
+ + "772493505011565108"
+ + a
+ + "4355897471393001620"
+ + a
+ + "-7052733073642657010"
+ + a
+ + "5904487723960627314"
+ + a
+ + "-8146905456250566165"
+ + a
+ + "-8272241648972884830"
+ + a
+ + "-7934734311001305167"
+ + a
+ + "2010392804516600146"
+ + a
+ + "7874061753723159658"
+ + a
+ + "1059646048071497698"
+ + a
+ + "-5622128739721761941"
+ + a
+ + "-8033788182892224091"
+ + a
+ + "1681547684630988216"
+ + a
+ + "-8578467634091990297"
+ + a
+ + "2189697668985640615"
+ + a
+ + "-9057682179067006414"
+ + a
+ + "-1356089288923443518"
+ + a
+ + "6251560713478074317"
+ + a
+ + "-7440046837958393615"
+ + a
+ + "1407158692292155781"
+ + a
+ + "3638531630121371096"
+ + a
+ + "-5051222424910285137"
+ + a
+ + "8617692886982373758"
+ + a
+ + "-771846938902200212"
+ + a
+ + "9072050023807745838"
+ + a
+ + "8787982956208638510"
+ + a
+ + "-1956190184658266206"
+ + a
+ + "-2862239626779971973"
+ + a
+ + "1831224464858060125"
+ + a
+ + "363934811746518001"
+ + a
+ + "376467262166035287"
+ + a
+ + "6770131145159335561"
+ + a
+ + "-2135831974748139041"
+ + a
+ + "5965177247077212447"
+ + a
+ + "-1053074797557834307"
+ + a
+ + "3894274936040760113"
+ + a
+ + "-701226959499860586"
+ + a
+ + "-4971357087908581658"
+ + a
+ + "-2510796846816028268"
+ + a
+ + "-2763699793663141038"
+ + a
+ + "-2193985648512765627"
+ + a
+ + "-3800478500522195208"
+ + a
+ + "7210248384674878403"
+ + a
+ + "-9050763110164892016"
+ + a
+ + "1440746149807037973"
+ + a
+ + "-1805372186674750455"
+ + a
+ + "-5335339145116455979"
+ + a
+ + "-7968313964743603760"
+ + a
+ + "1610185178406045202"
+ + a
+ + "2860222084584494674"
+ + a
+ + "5303527859614604407"
+ + a
+ + "-7562546697716829248"
+ + a
+ + "6597943858596228268"
+ + a
+ + "-8907697576023998447"
+ + a
+ + "-3575500776925217796"
+ + a
+ + "-7958636610358587060"
+ + a
+ + "-8107266756400855241"
+ + a
+ + "-4700514041937280505"
+ + a
+ + "5877546935738010841"
+ + a
+ + "-4157679336113634774"
+ + a
+ + "-866169437012159125"
+ + a
+ + "-519149397509148680"
+ + a
+ + "-1239516179709190615"
+ + a
+ + "-3591275203580560048"
+ + a
+ + "-5416867314018121244"
+ + a
+ + "2011882474728252719"
+ + a
+ + "-1249066890309108695"
+ + a
+ + "795894744629523832"
+ + a
+ + "1870033377415365283"
+ + a
+ + "7931444137659674871"
+ + a
+ + "-1613624103293423427"
+ + a
+ + "-4477239753922589277"
+ + a
+ + "2789326393421386123"
+ + a
+ + "-3956705666753899741"
+ + a
+ + "6952758292831343594"
+ + a
+ + "-9124954842584228461"
+ + a
+ + "-8913383325917719323"
+ + a
+ + "-1530517842030475129"
+ + a
+ + "4580517046080662618"
+ + a
+ + "6020543604287522383"
+ + a
+ + "-8313848571134926884"
+ + a
+ + "4378514641236109180"
+ + a
+ + "-1461513090215862309"
+ + a
+ + "8409570101072434851"
+ + a
+ + "-1581636631324609790"
+ + a
+ + "4985058713276173408"
+ + a
+ + "-3666677716973341728"
+ + a
+ + "-1138120895461130339"
+ + a
+ + "-8647293314984524598"
+ + a
+ + "-6242226372265798124"
+ + a
+ + "-4195674850310824450"
+ + a
+ + "-8025745418184206063"
+ + a
+ + "9166961009801828875"
+ + a
+ + "5645574108510892668"
+ + a
+ + "-6513490803768630160"
+ + a
+ + "419860506409678358"
+ + a
+ + "4628472513534946947"
+ + a
+ + "-6125375997686482174"
+ + a
+ + "8713691847195168404"
+ + a
+ + "79233487798602119"
+ + a
+ + "9030439487046511954"
+ + a
+ + "-3335074557944176364"
+ + a
+ + "-9112536869351283348"
+ + a
+ + "5506739399048321668"
+ + a
+ + "4391535639955683707"
+ + a
+ + "1182096354322836130"
+ + a
+ + "-4189716190893374434"
+ + a
+ + "-8108075268671436562"
+ + a
+ + "907315093125629542"
+ + a
+ + "5099587814404079265"
+ + a
+ + "7255914369947154549"
+ + a
+ + "-8497772614830644754"
+ + a
+ + "-8980458147983441823"
+ + a
+ + "4355717191891370378"
+ + a
+ + "5163662158015050589"
+ + a
+ + "642450610174575726"
+ + a
+ + "2512022470863144218"
+ + a
+ + "5867768034875490779"
+ + a
+ + "7009699371371301226"
+ + a
+ + "-4678350211651627618"
+ + a
+ + "3171964376763313190"
+ + a
+ + "-2541677689483086699"
+ + a
+ + "6868929630897619794"
+ + a
+ + "8896393380856350065"
+ + a
+ + "3256413860684177278"
+ + a
+ + "7947404321164296636"
+ + a
+ + "-7136357900952191378"
+ + a
+ + "-1787874428808322275"
+ + a
+ + "-1909293774457715715"
+ + a
+ + "-962763231242985253"
+ + a
+ + "3144911297249975614"
+ + a
+ + "1635293553987010975"
+ + a
+ + "-7409000498997087773"
+ + a
+ + "7471404851632915837"
+ + a
+ + "-221788501736437790"
+ + a
+ + "-4834067343892173771"
+ + a
+ + "1843086477154155861"
+ + a
+ + "7762358378021411765"
+ + a
+ + "-7883987165262218079"
+ + a
+ + "-4832545032610927903"
+ + a
+ + "-7856151567747625254"
+ + a
+ + "8112294323392812183"
+ + a
+ + "2147457973446013030"
+ + a
+ + "3162605413913990893"
+ + a
+ + "-6241001175762465825"
+ + a
+ + "-4153935579094924612"
+ + a
+ + "-6836084797928767682"
+ + a
+ + "-7922740998765985950"
+ + a
+ + "-8286733228449099979"
+ + a
+ + "165474130709530306"
+ + a
+ + "8981835088952978651"
+ + a
+ + "6870670037465619855"
+ + a
+ + "8496640850198065550"
+ + a
+ + "9204058999899671498"
+ + a
+ + "-4141186845058550508"
+ + a
+ + "1500317335225211272"
+ + a
+ + "7376705741729030659"
+ + a
+ + "-2733827060712336392"
+ + a
+ + "-736100079787053981"
+ + a
+ + "-7374437899094417756"
+ + a
+ + "2998950665528577681"
+ + a
+ + "5206106823411946743"
+ + a
+ + "-5760503793238003611"
+ + a
+ + "-8077682605801914369"
+ + a
+ + "4974691974637362327"
+ + a
+ + "-5520822721479891854"
+ + a
+ + "-97385634439813026"
+ + a
+ + "4751027761590349046"
+ + a
+ + "-554734623826398887"
+ + a
+ + "4261232907331630236"
+ + a
+ + "-3877904463068326478"
+ + a
+ + "-1200761955800992339"
+ + a
+ + "8689324788599032448"
+ + a
+ + "-7186721122544475991"
+ + a
+ + "4581101067086820461"
+ + a
+ + "-3117700534889439348"
+ + a
+ + "5343477886491928216"
+ + a
+ + "-7604478837149955757"
+ + a
+ + "-6037273215371695172"
+ + a
+ + "5165744799859542462"
+ + a
+ + "-374447668056195695"
+ + a
+ + "16388724788412758"
+ + a
+ + "8253460125259419250"
+ + a
+ + "-6569214172912295503"
+ + a
+ + "-8717094298082195137"
+ + a
+ + "-5730233168237508109"
+ + a
+ + "-908590889278215292"
+ + a
+ + "-7226489171009378408"
+ + a
+ + "7125119707932286426"
+ + a
+ + "-4094070088707645583"
+ + a
+ + "-6063919202293485939"
+ + a
+ + "-7416198762070326548"
+ + a
+ + "8565586356009308799"
+ + a
+ + "2826160646987732376"
+ + a
+ + "5938653928721944651"
+ + a
+ + "-5936170242353617177"
+ + a
+ + "6944772947584989612"
+ + a
+ + "2674760137042854964"
+ + a
+ + "8198473816250439456"
+ + a
+ + "6075238477456639751"
+ + a
+ + "-1410177679316080184"
+ + a
+ + "-8679553113740033128"
+ + a
+ + "-2704524222108620910"
+ + a
+ + "-1662683524802684015"
+ + a
+ + "1358495828717983129"
+ + a
+ + "-603809051081115368"
+ + a
+ + "5201733909681005771"
+ + a
+ + "8385475040900806156"
+ + a
+ + "-5830383452713093941"
+ + a
+ + "-1699989529083694195"
+ + a
+ + "-4421200757131697895"
+ + a
+ + "-5629708279370816062"
+ + a
+ + "-3227544077375947664"
+ + a
+ + "-3587576668227512363"
+ + a
+ + "-7705344311177224593"
+ + a
+ + "-3084396123927745470"
+ + a
+ + "-2813967685312600197"
+ + a
+ + "3998873278639758673"
+ + a
+ + "3665225356353330915"
+ + a
+ + "-6382725419459673632"
+ + a
+ + "4881391723445800772"
+ + a
+ + "-393405380376257946"
+ + a
+ + "218287968678872366"
+ + a
+ + "357883437490793012"
+ + a
+ + "2169817681545352199"
+ + a
+ + "3761796379613896956"
+ + a
+ + "-2937543986411027153"
+ + a
+ + "-6568842530406442857"
+ + a
+ + "-4907325818318760604"
+ + a
+ + "4998687660767128322"
+ + a
+ + "-4122792092373408664"
+ + a
+ + "6223196777924568233"
+ + a
+ + "-5609721664606045472"
+ + a
+ + "6191840459786065640"
+ + a
+ + "4672152598398585471"
+ + a
+ + "-8081723278183199026"
+ + a
+ + "7257122800644000867"
+ + a
+ + "2696542281977394211"
+ + a
+ + "7821435047306895806"
+ + a
+ + "4458924087043593388"
+ + a
+ + "-4555258326668076359"
+ + a
+ + "1922071752751161260"
+ + a
+ + "6415041615191639956"
+ + a
+ + "4636581324506420654"
+ + a
+ + "-7278699817870051311"
+ + a
+ + "-7708360672347361150"
+ + a
+ + "1324828425148828946"
+ + a
+ + "-1785818096515512444"
+ + a
+ + "-5853032200056389503"
+ + a
+ + "8864019132592092195"
+ + a
+ + "7790064823061661551"
+ + a
+ + "1063300198569212577"
+ + a
+ + "7792106853609615999"
+ + a
+ + "-2045730603260331241"
+ + a
+ + "3788187586299179141"
+ + a
+ + "3441764699056418492"
+ + a
+ + "-7493825059720259735"
+ + a
+ + "-9197475196368341659"
+ + a
+ + "-8031729420558330031"
+ + a
+ + "-3035156294002477233"
+ + a
+ + "4810378928183933951"
+ + a
+ + "2307408210848947996"
+ + a
+ + "8129528756745183350"
+ + a
+ + "8297578512579342363"
+ + a
+ + "-4628336986701268764"
+ + a
+ + "4220639206593625292"
+ + a
+ + "8036151421763933883"
+ + a
+ + "8457782822542016930"
+ + a
+ + "1721635144200702752"
+ + a
+ + "-528532370838804470"
+ + a
+ + "-1907567658637800567"
+ + a
+ + "-2962749235290753620"
+ + a
+ + "-1709365963340874592"
+ + a
+ + "-7934050979015234576"
+ + a
+ + "-5467967731356776594"
+ + a
+ + "2436549407640329155"
+ + a
+ + "-4755487807525217099"
+ + a
+ + "3348895866742813082"
+ + a
+ + "1293186513277487772"
+ + a
+ + "147333763390209462"
+ + a
+ + "-4154994029739800431"
+ + a
+ + "-5606269404652356438"
+ + a
+ + "-6504788229966127766"
+ + a
+ + "1101930766158013466"
+ + a
+ + "1920037389890864077"
+ + a
+ + "-596760935114999868"
+ + a
+ + "6652161054891684050"
+ + a
+ + "7932997037661416132"
+ + a
+ + "451214340570898662"
+ + a
+ + "907504879033372947"
+ + a
+ + "-5540048174294495502"
+ + a
+ + "4874027944884790608"
+ + a
+ + "7194019250764315067"
+ + a
+ + "-1180340877722081598"
+ + a
+ + "-6705098494586119285"
+ + a
+ + "-4775840841600560227"
+ + a
+ + "-7568294098571282415"
+ + a
+ + "3194829375991497604"
+ + a
+ + "-949586488707947387"
+ + a
+ + "-7119156483783612849"
+ + a
+ + "-5321851869428093425"
+ + a
+ + "8057451224656603917"
+ + a
+ + "9025470315945902697"
+ + a
+ + "-4120953438790823092"
+ + a
+ + "3479675544630836930"
+ + a
+ + "-2588890758738643305"
+ + a
+ + "-2446135786479384347"
+ + a
+ + "6570933589019671104"
+ + a
+ + "-7460587847828646246"
+ + a
+ + "8117951627109794142"
+ + a
+ + "1278574761543419724"
+ + a
+ + "4355156144007731481"
+ + a
+ + "5294705619988460523"
+ + a
+ + "6370545119571223844"
+ + a
+ + "-3816975559796975341"
+ + a
+ + "-5431148533476913013"
+ + a
+ + "4792143332111679342"
+ + a
+ + "5569424248468850350"
+ + a
+ + "-6487577009744411051"
+ + a
+ + "2738118632653076620"
+ + a
+ + "-798328294195956547"
+ + a
+ + "-8299163629061180860"
+ + a
+ + "-1457564026416139184"
+ + a
+ + "5394256010933486809"
+ + a
+ + "-4973399890610300198"
+ + a
+ + "621271617561643061"
+ + a
+ + "5577570731625850342"
+ + a
+ + "-8044468161122764432"
+ + a
+ + "6200690179463580840"
+ + a
+ + "-7501453788118451887"
+ + a
+ + "-3000628561342215139"
+ + a
+ + "-8888329457271558380"
+ + a
+ + "2485958001112289649"
+ + a
+ + "-1147237103609785491"
+ + a
+ + "6652422839185385120"
+ + a
+ + "2748239554760845261"
+ + a
+ + "-6451037891984472738"
+ + a
+ + "1430238149445017059"
+ + a
+ + "-2621996537920703429"
+ + a
+ + "2222578011638657893"
+ + a
+ + "-4600079722998623742"
+ + a
+ + "-5101027077422971377"
+ + a
+ + "-8966445022847634590"
+ + a
+ + "-7203758692164246549"
+ + a
+ + "-52017057246791984"
+ + a
+ + "-2273361502515799085"
+ + a
+ + "-5673227018741665109"
+ + a
+ + "9196722197507445300"
+ + a
+ + "-6567949690213129824"
+ + a
+ + "8582264805422292500"
+ + a
+ + "-5020454389016530609"
+ + a
+ + "2176706303660388949"
+ + a
+ + "6598254869984499502"
+ + a
+ + "7726443684515370810"
+ + a
+ + "3788023174450597805"
+ + a
+ + "-7396279829682620374"
+ + a
+ + "-414566826835973221"
+ + a
+ + "334917670496684468"
+ + a
+ + "6545903246000230344"
+ + a
+ + "3159302915393375187"
+ + a
+ + "-8560960218944435478"
+ + a
+ + "-5548899126980842382"
+ + a
+ + "5356234276945339844"
+ + a
+ + "7633829593477582385"
+ + a
+ + "5945979013294920068"
+ + a
+ + "-4567723074575386775"
+ + a
+ + "1661520674219546732"
+ + a
+ + "-8239614336300995219"
+ + a
+ + "-240177115772242763"
+ + a
+ + "-8953869339872002029"
+ + a
+ + "2411018226134053295"
+ + a
+ + "7195376657135225202"
+ + a
+ + "-8233770635376837844"
+ + a
+ + "-5149016243774937620"
+ + a
+ + "-6179363232548880609"
+ + a
+ + "6092296202650265710"
+ + a
+ + "-4805133698057190017"
+ + a
+ + "-6354212838081638666"
+ + a
+ + "6694348192666591857"
+ + a
+ + "5598031767610571605"
+ + a
+ + "3024910246478227109"
+ + a
+ + "-6951710734827703242"
+ + a
+ + "7822716525244674559"
+ + a
+ + "963393641811653214"
+ + a
+ + "-2406318691508007814"
+ + a
+ + "826508348982591028"
+ + a
+ + "-1579142701085431479"
+ + a
+ + "7297929387480064388"
+ + a
+ + "1380792214707189822"
+ + a
+ + "3295031049744658815"
+ + a
+ + "3284810324689971567"
+ + a
+ + "-7588538314618161914"
+ + a
+ + "4301009527933011734"
+ + a
+ + "1130484873987861287"
+ + a
+ + "-8591297113101874759"
+ + a
+ + "-3210714133972683289"
+ + a
+ + "5154586943427152522"
+ + a
+ + "-4193463855189971647"
+ + a
+ + "-376431609407932400"
+ + a
+ + "5021110340265516655"
+ + a
+ + "7648328932517867781"
+ + a
+ + "-8546476864968721561"
+ + a
+ + "5288785613899671938"
+ + a
+ + "-4809049901156041048"
+ + a
+ + "-1880116244181877159"
+ + a
+ + "9015537485495535413"
+ + a
+ + "-5267014086548743487"
+ + a
+ + "5123518728962797793"
+ + a
+ + "1795472531198399544"
+ + a
+ + "3022599565131492557"
+ + a
+ + "-8730528497135525723"
+ + a
+ + "9220566957379280431"
+ + a
+ + "8833019111890700988"
+ + a
+ + "-2033397514229383340"
+ + a
+ + "-6381341138027165531"
+ + a
+ + "7588551433816593127"
+ + a
+ + "5799842542611454176"
+ + a
+ + "5619724887239697779"
+ + a
+ + "2353324000873662818"
+ + a
+ + "-1991375208699682010"
+ + a
+ + "-6919792924942791420"
+ + a
+ + "2994182147895903703"
+ + a
+ + "6692415087256339229"
+ + a
+ + "-4871355353972236471"
+ + a
+ + "5275179869443528045"
+ + a
+ + "8042280884158104496"
+ + a
+ + "-376420269953363908"
+ + a
+ + "6263088176396425333"
+ + a
+ + "5182172241015003330"
+ + a
+ + "8972966521669258038"
+ + a
+ + "-7276664514485426743"
+ + a
+ + "-5378180808162970352"
+ + a
+ + "-3685303685564653936"
+ + a
+ + "-5127852655386939872"
+ + a
+ + "548616584641283058"
+ + a
+ + "8164449020035601733"
+ + a
+ + "4810079842916321223"
+ + a
+ + "-4707693332204580821"
+ + a
+ + "2754027201511437962"
+ + a
+ + "-4509922984036153467"
+ + a
+ + "6370413349588604732"
+ + a
+ + "8320409773178053529"
+ + a
+ + "7039007976410883463"
+ + a
+ + "7106894676435275009"
+ + a
+ + "-2809438556549871067"
+ + a
+ + "-1211381355032103505"
+ + a
+ + "-7307298204907670142"
+ + a
+ + "8523677840776162865"
+ + a
+ + "8285725653280538784"
+ + a
+ + "5996593469111651125"
+ + a
+ + "4153670324452931642"
+ + a
+ + "229030452475666256"
+ + a
+ + "-8295788508630616532"
+ + a
+ + "-1965373018251653894"
+ + a
+ + "-5611593981401404143"
+ + a
+ + "-3695587189347699491"
+ + a
+ + "-1221969108939208147"
+ + a
+ + "-2939972657801657266"
+ + a
+ + "-7078096374241029747"
+ + a
+ + "-6861654231625701349"
+ + a
+ + "6363379236988393580"
+ + a
+ + "3845057394530936710"
+ + a
+ + "-7003878426734214695"
+ + a
+ + "1288488077274737553"
+ + a
+ + "771119377697186197"
+ + a
+ + "4591934766881650300"
+ + a
+ + "6913066875581196609"
+ + a
+ + "-3409117405525192820"
+ + a
+ + "-221371090258771016"
+ + a
+ + "7600311558228469517"
+ + a
+ + "6748268879508177593"
+ + a
+ + "9011322187420563096"
+ + a
+ + "-6603624039115619639"
+ + a
+ + "-3065654712670379623"
+ + a
+ + "-6989660198670243497"
+ + a
+ + "-3160517308974458357"
+ + a
+ + "4216552774322725152"
+ + a
+ + "-2996335011420467835"
+ + a
+ + "2863864253575772373"
+ + a
+ + "-7621293225327534470"
+ + a
+ + "-545538409911515142"
+ + a
+ + "9140583364836666812"
+ + a
+ + "-5140969305303368176"
+ + a
+ + "6656140948819540034"
+ + a
+ + "93544662858383350"
+ + a
+ + "-4755201878801920726"
+ + a
+ + "7361284953337231243"
+ + a
+ + "-2675344218305896448"
+ + a
+ + "-7108238313098643048"
+ + a
+ + "-2235754615074522304"
+ + a
+ + "-6286324348689275411"
+ + a
+ + "-4948971409936476391"
+ + a
+ + "-800968619982543415"
+ + a
+ + "-8079563792523913101"
+ + a
+ + "-3610968571897385858"
+ + a
+ + "5600745745679481907"
+ + a
+ + "-5566150746257613227"
+ + a
+ + "-8603813402708741443"
+ + a
+ + "1951713618413814190"
+ + a
+ + "-3615473705144668230"
+ + a
+ + "-3103394013239353749"
+ + a
+ + "7609441287170978331"
+ + a
+ + "-8595954663543476337"
+ + a
+ + "-2397033303076566948"
+ + a
+ + "8706877768214465313"
+ + a
+ + "-2833919119298505459"
+ + a
+ + "-5437716447901653930"
+ + a
+ + "3204018275194378125"
+ + a
+ + "-6881228659759674386"
+ + a
+ + "3655807233404763416"
+ + a
+ + "-8071166991944314146"
+ + a
+ + "-2882253571801104892"
+ + a
+ + "-4254916829421833426"
+ + a
+ + "-4966226050667361465"
+ + a
+ + "6400138949236237092"
+ + a
+ + "8065391540431081532"
+ + a
+ + "-8565217068574148958"
+ + a
+ + "-1039262401718743898"
+ + a
+ + "-7027115935055531316"
+ + a
+ + "-4839038525355799820"
+ + a
+ + "607283839032145901"
+ + a
+ + "5819199197390075590"
+ + a
+ + "8183342224186041755"
+ + a
+ + "-7638195753333090384"
+ + a
+ + "763230605389339928"
+ + a
+ + "3880164877363065917"
+ + a
+ + "6774168134657050106"
+ + a
+ + "5183571486536786229"
+ + a
+ + "-2412112714927998706"
+ + a
+ + "2170382415059976482"
+ + a
+ + "8928570569293051258"
+ + a
+ + "-3164633622520334319"
+ + a
+ + "-4874291569099455455"
+ + a
+ + "-5321689672409098347"
+ + a
+ + "-5318566050949026486"
+ + a
+ + "8467109878471673616"
+ + a
+ + "6243778283836892291"
+ + a
+ + "8129813969173457973"
+ + a
+ + "7026067937120947907"
+ + a
+ + "7230692457074218952"
+ + a
+ + "-5636207072045201714"
+ + a
+ + "9025616855807802024"
+ + a
+ + "6991347270039127005"
+ + a
+ + "-4134192908014033137"
+ + a
+ + "8052480968810038909"
+ + a
+ + "-298609796723154409"
+ + a
+ + "7063773791193231287"
+ + a
+ + "1903526289961421183"
+ + a
+ + "9078121936931350128"
+ + a
+ + "4919215797062406575"
+ + a
+ + "3062706279152348947"
+ + a
+ + "3069159987426254841"
+ + a
+ + "8785412768859969900"
+ + a
+ + "-1804937236104624863"
+ + a
+ + "-7919547674470913833"
+ + a
+ + "-3699510056810390498"
+ + a
+ + "3488422380608182937"
+ + a
+ + "-2987254178709073630"
+ + a
+ + "-9213463933924807027"
+ + a
+ + "4276958400750490840"
+ + a
+ + "5995923739289769474"
+ + a
+ + "-3578486352618504212"
+ + a
+ + "3793748595455569123"
+ + a
+ + "-2375328803450246449"
+ + a
+ + "-2368467245421371111"
+ + a
+ + "-7170151667937837637"
+ + a
+ + "3851161271436651564"
+ + a
+ + "-5040932034940683019"
+ + a
+ + "-5431617805185219792"
+ + a
+ + "8056902348189472081"
+ + a
+ + "8345438302799274206"
+ + a
+ + "8974378839299157243"
+ + a
+ + "-7795705370344518144"
+ + a
+ + "-6182887444190872461"
+ + a
+ + "-6744635907384095726"
+ + a
+ + "8688143914497602521"
+ + a
+ + "312301123947857446"
+ + a
+ + "153839440061591658"
+ + a
+ + "4481075050913262600"
+ + a
+ + "5493152155136443978"
+ + a
+ + "-5734316348038571103"
+ + a
+ + "-1237463632681147773"
+ + a
+ + "-9164417940517995360"
+ + a
+ + "2112577241684396365"
+ + a
+ + "7069977384985408086"
+ + a
+ + "8342004829581309071"
+ + a
+ + "5589441501667002337"
+ + a
+ + "-5851762190278682970"
+ + a
+ + "2349123061039463052"
+ + a
+ + "7057487017622652260"
+ + a
+ + "3294326484913833589"
+ + a
+ + "7917262643932877146"
+ + a
+ + "-2094061162517915280"
+ + a
+ + "1003752392099679578"
+ + a
+ + "-7192501163858833365"
+ + a
+ + "-3334727821303870921"
+ + a
+ + "-1384950698949877358"
+ + a
+ + "5445087923465358030"
+ + a
+ + "3719147868517768309"
+ + a
+ + "1000771643903128649"
+ + a
+ + "3516787711097740135"
+ + a
+ + "4105676075002773154"
+ + a
+ + "-3651552847191010585"
+ + a
+ + "2672778053191969126"
+ + a
+ + "285485396932943301"
+ + a
+ + "296620000461273275"
+ + a
+ + "4811535287028902846"
+ + a
+ + "-2379643207381041500"
+ + a
+ + "271481818151482985"
+ + a
+ + "6854618837286237314"
+ + a
+ + "5653593416179720279"
+ + a
+ + "62002831712282845"
+ + a
+ + "5853135014065169012"
+ + a
+ + "-3951484647610006172"
+ + a
+ + "-257362179695809613"
+ + a
+ + "7977439029994910002"
+ + a
+ + "2965871586653951722"
+ + a
+ + "3061775100769358674"
+ + a
+ + "3876220359403363066"
+ + a
+ + "-8734873363757811323"
+ + a
+ + "8210589182755985714"
+ + a
+ + "-8935096200912591038"
+ + a
+ + "3886239936245591540"
+ + a
+ + "2283494688500814077"
+ + a
+ + "1010721984573040537"
+ + a
+ + "-7245354850053978196"
+ + a
+ + "2542221557416216465"
+ + a
+ + "1000274955142240390"
+ + a
+ + "-6797492987035766321"
+ + a
+ + "-6984617498410261235"
+ + a
+ + "-7430749021601567133"
+ + a
+ + "-382287790784661682"
+ + a
+ + "126688746335494503"
+ + a
+ + "-5450785036780366233"
+ + a
+ + "-6262557503491400417"
+ + a
+ + "-6590263637308498102"
+ + a
+ + "-5710729975432547748"
+ + a
+ + "5129132715791132095"
+ + a
+ + "-4239743246379834592"
+ + a
+ + "6117849231379620271"
+ + a
+ + "-6490453226507920505"
+ + a
+ + "-5220787641275863906"
+ + a
+ + "37770212688319716"
+ + a
+ + "8511097093244097401"
+ + a
+ + "1921134795576723242"
+ + a
+ + "-5361574113624407919"
+ + a
+ + "6485812877315083405"
+ + a
+ + "-5173991477032582681"
+ + a
+ + "4635303733778455400"
+ + a
+ + "3798649405852839849"
+ + a
+ + "1181330636608158304"
+ + a
+ + "2389207354261632764"
+ + a
+ + "-7997803528543137078"
+ + a
+ + "6910199996450819324"
+ + a
+ + "-8434856108147276471"
+ + a
+ + "-5004471220842951168"
+ + a
+ + "-2001619584075815749"
+ + a
+ + "7103921392073379106"
+ + a
+ + "709184684415384406"
+ + a
+ + "5419968314411194366"
+ + a
+ + "-8052975715153740275"
+ + a
+ + "3080262723337237176"
+ + a
+ + "2717693202914529848"
+ + a
+ + "-5658009220703875004"
+ + a
+ + "-6356696196251465357"
+ + a
+ + "-9084955617602581791"
+ + a
+ + "2350510107389966277"
+ + a
+ + "-56493742978686747"
+ + a
+ + "-3235948282274805756"
+ + a
+ + "-259456143706900032"
+ + a
+ + "3328029298574307960"
+ + a
+ + "7969068043825100602"
+ + a
+ + "6539025660082780607"
+ + a
+ + "5106370333406861055"
+ + a
+ + "2581335450921275887"
+ + a
+ + "-6672857526609991588"
+ + a
+ + "-5066652041459919359"
+ + a
+ + "5483605257212992075"
+ + a
+ + "8441735440161894252"
+ + a
+ + "8228850532942701996"
+ + a
+ + "8305732054858339344"
+ + a
+ + "-8818868008826300459"
+ + a
+ + "-282885764699505067"
+ + a
+ + "-7792997597271080628"
+ + a
+ + "-476798431366675564"
+ + a
+ + "-8409934511333831470"
+ + a
+ + "-3520536162869449547"
+ + a
+ + "4683766191038939812"
+ + a
+ + "2735230483871692056"
+ + a
+ + "-6960428798943544324"
+ + a
+ + "6064369103064896440"
+ + a
+ + "-5862836756051784995"
+ + a
+ + "3048377571697603214"
+ + a
+ + "-8817670315059258864"
+ + a
+ + "-3448031242465560525"
+ + a
+ + "-3900155008609433239"
+ + a
+ + "-2436961665226831928"
+ + a
+ + "7843028895364926030"
+ + a
+ + "-1071910219054671079"
+ + a
+ + "6806460798781112441"
+ + a
+ + "545524036744485632"
+ + a
+ + "1504587669020371708"
+ + a
+ + "3554112186340809223"
+ + a
+ + "628102020023703941"
+ + a
+ + "-8396624437418437295"
+ + a
+ + "-6733341969134226973"
+ + a
+ + "9137671523974848441"
+ + a
+ + "-1085702134189209144"
+ + a
+ + "8591961235509762875"
+ + a
+ + "-4209972357817444144"
+ + a
+ + "5016820126477722770"
+ + a
+ + "6007620665778587330"
+ + a
+ + "8736230199649080611"
+ + a
+ + "-1357215413619140076"
+ + a
+ + "-3036455336440086759"
+ + a
+ + "5003131764641090228"
+ + a
+ + "-5840971401422059568"
+ + a
+ + "5299761606675594501"
+ + a
+ + "2479284086948775030"
+ + a
+ + "-169747718055302873"
+ + a
+ + "-6513577638796641041"
+ + a
+ + "4727002206625739387"
+ + a
+ + "11815200566638841"
+ + a
+ + "2414450272502428518"
+ + a
+ + "737732046466579345"
+ + a
+ + "-3078028411410513580"
+ + a
+ + "6989108583020941460"
+ + a
+ + "4710861758996393215"
+ + a
+ + "-3711166908562108248"
+ + a
+ + "2214719685325275888"
+ + a
+ + "-9168489986447261860"
+ + a
+ + "-5196529696442593211"
+ + a
+ + "7469613290795526029"
+ + a
+ + "-4245509300480970827"
+ + a
+ + "-7050208421107820020"
+ + a
+ + "-7521497792323050799"
+ + a
+ + "-7212250329377230211"
+ + a
+ + "-4802660503947805812"
+ + a
+ + "-6614648966347585919"
+ + a
+ + "3389716989987674621"
+ + a
+ + "2411396560958710551"
+ + a
+ + "2815259436105876066"
+ + a
+ + "2060795633551604799"
+ + a
+ + "-1162554289855525016"
+ + a
+ + "-4151205296736455969"
+ + a
+ + "7740556652714820776"
+ + a
+ + "-2424255571780643606"
+ + a
+ + "3773719908223681909"
+ + a
+ + "-642852958378017857"
+ + a
+ + "506546631674131412"
+ + a
+ + "3411343132685823182"
+ + a
+ + "8242176261806455755"
+ + a
+ + "-1677796581762359167"
+ + a
+ + "-8088487106477371682"
+ + a
+ + "8839352032934777688"
+ + a
+ + "-1664297978100182058"
+ + a
+ + "8954522650558186838"
+ + a
+ + "-7417626966935826748"
+ + a
+ + "5844470482620124059"
+ + a
+ + "-5001123985686870716"
+ + a
+ + "8630918871083620434"
+ + a
+ + "1361828739555435270"
+ + a
+ + "2586232242815655117"
+ + a
+ + "-5431290900140072310"
+ + a
+ + "-2089869348091893267"
+ + a
+ + "-6913226553364333014"
+ + a
+ + "982358703940022983"
+ + a
+ + "-5291211856488354467"
+ + a
+ + "3146802692737717635"
+ + a
+ + "3061042254470656569"
+ + a
+ + "593081081915838087"
+ + a
+ + "-3648293238944105671"
+ + a
+ + "3817895332992367061"
+ + a
+ + "-5977316325514420928"
+ + a
+ + "2445174291365627569"
+ + a
+ + "-7453194807437727266"
+ + a
+ + "-7135173348446715513"
+ + a
+ + "-4341245742350326319"
+ + a
+ + "-6990299696064866294"
+ + a
+ + "9099393862540895181"
+ + a
+ + "5906962556980591520"
+ + a
+ + "1463156951664887679"
+ + a
+ + "8685482748980954620"
+ + a
+ + "-8670616036689234737"
+ + a
+ + "668426796408964108"
+ + a
+ + "760821649250070373"
+ + a
+ + "6098571809297730326"
+ + a
+ + "8996934779491151471"
+ + a
+ + "5167580478289099805"
+ + a
+ + "-5379372579768555360"
+ + a
+ + "-1826855896863499895"
+ + a
+ + "-251724191324644229"
+ + a
+ + "8345304695203599110"
+ + a
+ + "-3921283866962585392"
+ + a
+ + "-6750195049995572309"
+ + a
+ + "-2839804251052455546"
+ + a
+ + "-2838169321476956577"
+ + a
+ + "-956982331721610085"
+ + a
+ + "-3509690395310119816"
+ + a
+ + "-647103879342140567"
+ + a
+ + "-7535121068312444252"
+ + a
+ + "-6849939433639848918"
+ + a
+ + "6188660516239622156"
+ + a
+ + "5919339453715746750"
+ + a
+ + "5053115779289394102"
+ + a
+ + "8548571500185153451"
+ + a
+ + "1253407665197945898"
+ + a
+ + "8816075272556462180"
+ + a
+ + "6819578958788515160"
+ + a
+ + "5771439029860895693"
+ + a
+ + "1099896890131308728"
+ + a
+ + "2822294418807232510"
+ + a
+ + "-5488141668219100237"
+ + a
+ + "-6814930941837472185"
+ + a
+ + "-1887449028126707647"
+ + a
+ + "-305262206501941645"
+ + a
+ + "-2957301348839879726"
+ + a
+ + "-8062343849720237487"
+ + a
+ + "4063931149976651890"
+ + a
+ + "-6945560963307518609"
+ + a
+ + "-5171358203014886361"
+ + a
+ + "-4696905411890596568"
+ + a
+ + "-7904166567572706659"
+ + a
+ + "-5642191283828687647"
+ + a
+ + "-3142095411129076476"
+ + a
+ + "4267259913372177039"
+ + a
+ + "-247567462335503303"
+ + a
+ + "-1606772255712405637"
+ + a
+ + "-1138796761196445405"
+ + a
+ + "6850063793273393481"
+ + a
+ + "1624415707017375583"
+ + a
+ + "-1164198493017002186"
+ + a
+ + "-5031881309379772897"
+ + a
+ + "-4704167066305044576"
+ + a
+ + "300552169175114575"
+ + a
+ + "1256542356793014731"
+ + a
+ + "-6183375231683934984"
+ + a
+ + "8132934491731918817"
+ + a
+ + "4029472251436479721"
+ + a
+ + "-192705793541948102"
+ + a
+ + "2135033751433659027"
+ + a
+ + "1455584266359522526"
+ + a
+ + "-431828297761765579"
+ + a
+ + "2355469958751654983"
+ + a
+ + "-133589407284588488"
+ + a
+ + "-493111747751240086"
+ + a
+ + "-7965544530020185125"
+ + a
+ + "1294769335141647096"
+ + a
+ + "4061979167437331474"
+ + a
+ + "-4674577793798441504"
+ + a
+ + "2229585697079227307"
+ + a
+ + "-5414242843034985703"
+ + a
+ + "-1796177256198233677"
+ + a
+ + "-8813835129363277155"
+ + a
+ + "-8316830614187561193"
+ + a
+ + "7467003029608100024"
+ + a
+ + "6813374084828983949"
+ + a
+ + "-8380540489992454526"
+ + a
+ + "8148069224161672884"
+ + a
+ + "-7554729934777737559"
+ + a
+ + "3699415912884948602"
+ + a
+ + "-5228105685932031373"
+ + a
+ + "7486295599635387325"
+ + a
+ + "-8315916849048610046"
+ + a
+ + "-1265934245220496332"
+ + a
+ + "869408855926444762"
+ + a
+ + "3124164783922938000"
+ + a
+ + "2622058283875392416"
+ + a
+ + "6966819816830554590"
+ + a
+ + "-9083519918290447324"
+ + a
+ + "-5702091036824848082"
+ + a
+ + "7213286784638864033"
+ + a
+ + "7931674308865727865"
+ + a
+ + "1217078156180791107"
+ + a
+ + "-6728535210190855233"
+ + a
+ + "-7969996239948903704"
+ + a
+ + "-5122150647143637648"
+ + a
+ + "-270273220242567638"
+ + a
+ + "-3061305542137677556"
+ + a
+ + "-9086820896664105827"
+ + a
+ + "-3725106682971891443"
+ + a
+ + "-7335602555283711916"
+ + a
+ + "-4241856931197537020"
+ + a
+ + "6414441892533219754"
+ + a
+ + "4923291868857182465"
+ + a
+ + "-2238034931126403266"
+ + a
+ + "-5548291588014287049"
+ + a
+ + "-3613397896346811841"
+ + a
+ + "-444831690879303712"
+ + a
+ + "-174090082062267671"
+ + a
+ + "-4502104439015034018"
+ + a
+ + "6966017876080357710"
+ + a
+ + "7406710172021949090"
+ + a
+ + "1860179558197352025"
+ + a
+ + "5059137267429724625"
+ + a
+ + "-7151826351928790769"
+ + a
+ + "5733657672065233188"
+ + a
+ + "4520810228567075864"
+ + a
+ + "-7333899404846243825"
+ + a
+ + "-6883092737419798658"
+ + a
+ + "4366096293893496485"
+ + a
+ + "-831211520620006733"
+ + a
+ + "-2070730996140986054"
+ + a
+ + "-6122918534230011176"
+ + a
+ + "8591014096129538633"
+ + a
+ + "-2932515908185347780"
+ + a
+ + "-6172465947165241704"
+ + a
+ + "6627779855106944546"
+ + a
+ + "860134131205302169"
+ + a
+ + "-2545779493082303546"
+ + a
+ + "-7421938253750134765"
+ + a
+ + "-6434442159326501470"
+ + a
+ + "-3820319822167988479"
+ + a
+ + "7713795869884446701"
+ + a
+ + "6987845812456879290"
+ + a
+ + "4067197575400098660"
+ + a
+ + "6929605052833795665"
+ + a
+ + "-5071225823069615797"
+ + a
+ + "-6528382877278039234"
+ + a
+ + "3841845750105881526"
+ + a
+ + "7024959044443033917"
+ + a
+ + "2694800765195953668"
+ + a
+ + "-5187774918085199242"
+ + a
+ + "-4774807374950964820"
+ + a
+ + "-6651516371223242275"
+ + a
+ + "5402324599728161595"
+ + a
+ + "2303362292061219291"
+ + a
+ + "-6703936456847176803"
+ + a
+ + "4251181594352644398"
+ + a
+ + "-4810153558637401702"
+ + a
+ + "3120785562651363852"
+ + a
+ + "1064230923889069987"
+ + a
+ + "5592117723558033294"
+ + a
+ + "2500967148379218383"
+ + a
+ + "4543293162164153676"
+ + a
+ + "-6382337212061286369"
+ + a
+ + "4950508513939762500"
+ + a
+ + "6639695632068391177"
+ + a
+ + "3852356517429469183"
+ + a
+ + "-1834993927947325388"
+ + a
+ + "-574469187780736266"
+ + a
+ + "1791511302785115519"
+ + a
+ + "-2510985863334721231"
+ + a
+ + "-1271182415669655481"
+ + a
+ + "2833131677966051888"
+ + a
+ + "-1888666409583758615"
+ + a
+ + "-7575768070255551729"
+ + a
+ + "2789451380098296453"
+ + a
+ + "-855761797827183132"
+ + a
+ + "6200333634774310661"
+ + a
+ + "2532787015795004267"
+ + a
+ + "5732788468327016285"
+ + a
+ + "1572576694474513125"
+ + a
+ + "6690274443971690003"
+ + a
+ + "-1416599760413078468"
+ + a
+ + "-8873558753980022270"
+ + a
+ + "3520034515647107178"
+ + a
+ + "5895387026777833306"
+ + a
+ + "8970487898880039964"
+ + a
+ + "-1994332234697898774"
+ + a
+ + "1256148449635750034"
+ + a
+ + "7068847807288363425"
+ + a
+ + "6497856795776861896"
+ + a
+ + "2533382161003325009"
+ + a
+ + "-8546900859753109286"
+ + a
+ + "7050920184133806006"
+ + a
+ + "4204241594405846436"
+ + a
+ + "7412992732973120695"
+ + a
+ + "6323176360460995240"
+ + a
+ + "788068822434628843"
+ + a
+ + "5809215686853242932"
+ + a
+ + "2435328253140599646"
+ + a
+ + "-3438172829650951228"
+ + a
+ + "-5260828684075255404"
+ + a
+ + "-8452227779893367644"
+ + a
+ + "-8583970913160499507"
+ + a
+ + "-1141806410215078183"
+ + a
+ + "-8347846439953324150"
+ + a
+ + "-5848845680367710143"
+ + a
+ + "8492146215224643919"
+ + a
+ + "3192550119083762681"
+ + a
+ + "-1940597170917955925"
+ + a
+ + "-6311085176920881154"
+ + a
+ + "3313976597559381877"
+ + a
+ + "-8261432839191637738"
+ + a
+ + "8508517589948285271"
+ + a
+ + "-3942417032281399056"
+ + a
+ + "-7868239781541141360"
+ + a
+ + "-7207936619714796918"
+ + a
+ + "5951216312047681781"
+ + a
+ + "7581930953926551762"
+ + a
+ + "-5218098199538452680"
+ + a
+ + "4046620809464009616"
+ + a
+ + "9156388253171518060"
+ + a
+ + "1775420769584324226"
+ + a
+ + "-5503602516028621368"
+ + a
+ + "-5417782825043706168"
+ + a
+ + "3259607017327889066"
+ + a
+ + "-8165578551036038526"
+ + a
+ + "-3571561465349852449"
+ + a
+ + "8682163221699536567"
+ + a
+ + "1820937297130664737"
+ + a
+ + "-7637037009265731720"
+ + a
+ + "-3430018756137657888"
+ + a
+ + "-912486006008721851"
+ + a
+ + "-4597466335087098299"
+ + a
+ + "9158803880090608302"
+ + a
+ + "6309689325780931443"
+ + a
+ + "-1043259274818805443"
+ + a
+ + "5818507431422309391"
+ + a
+ + "705581125799181459"
+ + a
+ + "-8243036360534097406"
+ + a
+ + "3506710962377813200"
+ + a
+ + "5283929545352660605"
+ + a
+ + "5433965584487276856"
+ + a
+ + "-9141396997152817603"
+ + a
+ + "-6478773767990106094"
+ + a
+ + "-5840973237079482865"
+ + a
+ + "-3328512888182984493"
+ + a
+ + "-5628441720597980266"
+ + a
+ + "1362509993150631036"
+ + a
+ + "-6186720857272451508"
+ + a
+ + "2806474292451381311"
+ + a
+ + "1472420199765605574"
+ + a
+ + "6504226866074435176"
+ + a
+ + "2336878939403643451"
+ + a
+ + "-2015466886114682501"
+ + a
+ + "-1190820901020960698"
+ + a
+ + "-8270478624074250856"
+ + a
+ + "-7954036542520749846"
+ + a
+ + "-5313855420375917529"
+ + a
+ + "8784094970832030935"
+ + a
+ + "-4096265019124345424"
+ + a
+ + "1877372637773629931"
+ + a
+ + "1345965335397117450"
+ + a
+ + "1017298834024801787"
+ + a
+ + "-4281347732403722569"
+ + a
+ + "-299499367626792494"
+ + a
+ + "-2752679177386898546"
+ + a
+ + "2039234325941596281"
+ + a
+ + "-7646426291870655078"
+ + a
+ + "8814611568318314168"
+ + a
+ + "-2968477228040763326"
+ + a
+ + "-4419558618188022052"
+ + a
+ + "-1279218774105815895"
+ + a
+ + "2630489381818213563"
+ + a
+ + "-2764095333472874665"
+ + a
+ + "1721324049525030389"
+ + a
+ + "6255319953520301080"
+ + a
+ + "-2002207623368113540"
+ + a
+ + "2760564714094670884"
+ + a
+ + "-4527083009644693163"
+ + a
+ + "-221316996272960896"
+ + a
+ + "5272147133459262879"
+ + a
+ + "1662442750623568547"
+ + a
+ + "7114576635075014612"
+ + a
+ + "-1592395570280065701"
+ + a
+ + "-8055360728481487026"
+ + a
+ + "1905364447584354289"
+ + a
+ + "-2982613330646927347"
+ + a
+ + "3579716359614024075"
+ + a
+ + "-2853235326282940233"
+ + a
+ + "-6255093129477813551"
+ + a
+ + "-2660856547893725985"
+ + a
+ + "962189559835700179"
+ + a
+ + "-3403904814775855223"
+ + a
+ + "7761786006706211882"
+ + a
+ + "1666469024181410285"
+ + a
+ + "-1912341427069089444"
+ + a
+ + "-1529985830943006085"
+ + a
+ + "-8541889599851837563"
+ + a
+ + "-1675345010039275489"
+ + a
+ + "532566178923438130"
+ + a
+ + "-4106346450321257018"
+ + a
+ + "598900968746965904"
+ + a
+ + "7922103854326614559"
+ + a
+ + "2337244455169431493"
+ + a
+ + "2490340063075084197"
+ + a
+ + "3830021001185755805"
+ + a
+ + "-7007934027523188515"
+ + a
+ + "-6897508927103841943"
+ + a
+ + "351471946072366300"
+ + a
+ + "5325622335760933667"
+ + a
+ + "1999537315104100364"
+ + a
+ + "-3174507437725673258"
+ + a
+ + "5725229761576174895"
+ + a
+ + "-1668434791850086340"
+ + a
+ + "-8518953713969632606"
+ + a
+ + "-2195724924957090648"
+ + a
+ + "1833142190359232486"
+ + a
+ + "-8071691875553813978"
+ + a
+ + "-1098776314952802468"
+ + a
+ + "-3732554868283517216"
+ + a
+ + "8281197878747701327"
+ + a
+ + "-2681793846913003838"
+ + a
+ + "-7423965503951514312"
+ + a
+ + "5715757995104550241"
+ + a
+ + "4949326775746718268"
+ + a
+ + "4867992385340508696"
+ + a
+ + "5710183806056540152"
+ + a
+ + "-5859943850115280268"
+ + a
+ + "182212408834907777"
+ + a
+ + "1818148288680146641"
+ + a
+ + "-3629129893088723802"
+ + a
+ + "-7989454558875562684"
+ + a
+ + "-3490491636040018057"
+ + a
+ + "-8546360654909202756"
+ + a
+ + "4884975390754858506"
+ + a
+ + "-7335006185981160861"
+ + a
+ + "-8863534872989633156"
+ + a
+ + "-1023968830742254775"
+ + a
+ + "-6984065759005173450"
+ + a
+ + "-4719440043907597244"
+ + a
+ + "-4226053935092114575"
+ + a
+ + "2857867506883982865"
+ + a
+ + "4609884073900339707"
+ + a
+ + "4451416470189798334"
+ + a
+ + "-1790877776461694150"
+ + a
+ + "478010840764229964"
+ + a
+ + "4577366484915324785"
+ + a
+ + "-4239516104547444593"
+ + a
+ + "822225014414504514"
+ + a
+ + "7207238466391339097"
+ + a
+ + "4951445340652425331"
+ + a
+ + "8865187376622680535"
+ + a
+ + "2714097382994507252"
+ + a
+ + "8555581644391577658"
+ + a
+ + "3395195158292748320"
+ + a
+ + "-7121855846819635559"
+ + a
+ + "1454609179663126595"
+ + a
+ + "-2363070738518048747"
+ + a
+ + "-8561489505556069796"
+ + a
+ + "-1623367676149883331"
+ + a
+ + "2930039982060989475"
+ + a
+ + "-4755382472985052748"
+ + a
+ + "-3892494289724415923"
+ + a
+ + "4637043986058348817"
+ + a
+ + "-6153579724097588723"
+ + a
+ + "-5546607401430173178"
+ + a
+ + "-1492220491073383202"
+ + a
+ + "-3503786864953810749"
+ + a
+ + "-1290487900048395137"
+ + a
+ + "3634542418448824732"
+ + a
+ + "-4729608041549018817"
+ + a
+ + "-7349905448557731608"
+ + a
+ + "-7872415943966872454"
+ + a
+ + "6328897134929241388"
+ + a
+ + "-5279495431135252126"
+ + a
+ + "7306152281150969721"
+ + a
+ + "6916430824966538754"
+ + a
+ + "4838879110959529490"
+ + a
+ + "-7503253719632240512"
+ + a
+ + "-2043554315794248367"
+ + a
+ + "-222316953353634654"
+ + a
+ + "1616782040888740554"
+ + a
+ + "-8096203459022180973"
+ + a
+ + "8781682587717369520"
+ + a
+ + "8324353734053349349"
+ + a
+ + "-2419660470439880841"
+ + a
+ + "-3691601252123449383"
+ + a
+ + "2601750435265700795"
+ + a
+ + "572261106233661406"
+ + a
+ + "828178224839624288"
+ + a
+ + "-8228342371067159721"
+ + a
+ + "-3973182455293867783"
+ + a
+ + "7921032521626788257"
+ + a
+ + "-6654921982150332307"
+ + a
+ + "-406383609697491628"
+ + a
+ + "-4195424171906992169"
+ + a
+ + "-3465676714700260409"
+ + a
+ + "94265070605211054"
+ + a
+ + "-3064896205951182631"
+ + a
+ + "-7072496700196212954"
+ + a
+ + "7794720126715939567"
+ + a
+ + "-4158983032514978348"
+ + a
+ + "4428076845375714104"
+ + a
+ + "8720339297002777496"
+ + a
+ + "-4170548367659581897"
+ + a
+ + "-6547860335574357834"
+ + a
+ + "4227777302599737474"
+ + a
+ + "-7769812357111840698"
+ + a
+ + "-8462691960494842937"
+ + a
+ + "-4126880118004338994"
+ + a
+ + "-3178556423612559345"
+ + a
+ + "-2893699215683698899"
+ + a
+ + "5728596538128194886"
+ + a
+ + "-2530819841322864198"
+ + a
+ + "-4881143718204761862"
+ + a
+ + "-8420287773053587028"
+ + a
+ + "5264312276687903843"
+ + a
+ + "7360172920728911035"
+ + a
+ + "8371029073758744227"
+ + a
+ + "9205148785879081223"
+ + a
+ + "-1859431348752003251"
+ + a
+ + "4779214870921360697"
+ + a
+ + "-2063013850550115029"
+ + a
+ + "2514214861790801639"
+ + a
+ + "688298976672994619"
+ + a
+ + "8808625389252426557"
+ + a
+ + "587348595105842683"
+ + a
+ + "-7581495858151965224"
+ + a
+ + "4295383171602092774"
+ + a
+ + "629679749050259957"
+ + a
+ + "6092738940327867453"
+ + a
+ + "6260135336894425546"
+ + a
+ + "-4262258001311703286"
+ + a
+ + "-8787881097085417421"
+ + a
+ + "-5202416122214735519"
+ + a
+ + "-1094098867178024815"
+ + a
+ + "1709204469615558377"
+ + a
+ + "-3316808189245409041"
+ + a
+ + "2267394113742131610"
+ + a
+ + "802800796592269925"
+ + a
+ + "6020346596949291719"
+ + a
+ + "4362371798306536385"
+ + a
+ + "8147690838823759967"
+ + a
+ + "5329989234928530019"
+ + a
+ + "-956912212156919185"
+ + a
+ + "4035164394108759399"
+ + a
+ + "-7340616756424887062"
+ + a
+ + "-6828152481843798263"
+ + a
+ + "-1748445625762825812"
+ + a
+ + "5935050953898588229"
+ + a
+ + "6471613704674711228"
+ + a
+ + "5426422518887852734"
+ + a
+ + "-8790361958224476975"
+ + a
+ + "1147984286589838560"
+ + a
+ + "-3115084918500945385"
+ + a
+ + "-1593393110477083576"
+ + a
+ + "-7746577747169796814"
+ + a
+ + "4855479966532713058"
+ + a
+ + "-2825966073810846589"
+ + a
+ + "5670921883372339027"
+ + a
+ + "-3351030363975248471"
+ + a
+ + "-6092554852842475750"
+ + a
+ + "-918784283786254007"
+ + a
+ + "597804758834183409"
+ + a
+ + "18896378189469458"
+ + a
+ + "-1063461360426292999"
+ + a
+ + "2503142469566864891"
+ + a
+ + "1649538650540360725"
+ + a
+ + "5925412010083294415"
+ + a
+ + "-7082343544609649131"
+ + a
+ + "-500286861472885014"
+ + a
+ + "2034306255648969239"
+ + a
+ + "-6989721939152109244"
+ + a
+ + "4602789961892980009"
+ + a
+ + "8689747571345005486"
+ + a
+ + "-1096909470010447053"
+ + a
+ + "7449484639121005148"
+ + a
+ + "-3983249628107405805"
+ + a
+ + "-3106467780176616541"
+ + a
+ + "-4052581199502978295"
+ + a
+ + "1238644263796516354"
+ + a
+ + "1511210825552075349"
+ + a
+ + "-8959283836232840602"
+ + a
+ + "-945526196915645153"
+ + a
+ + "2486934434776549033"
+ + a
+ + "-5179581557244449386"
+ + a
+ + "-5130230789857012645"
+ + a
+ + "-1895142657148494502"
+ + a
+ + "-8885930504481779771"
+ + a
+ + "6872214327519481374"
+ + a
+ + "9005968565140898602"
+ + a
+ + "5766450694901080201"
+ + a
+ + "15290732226421328"
+ + a
+ + "-8181491785068085923"
+ + a
+ + "861492339862927934"
+ + a
+ + "417000764276266202"
+ + a
+ + "3771665283774978374"
+ + a
+ + "824247452788125796"
+ + a
+ + "915050746900771653"
+ + a
+ + "-991268011348657565"
+ + a
+ + "5046823091485279785"
+ + a
+ + "714851461640937578"
+ + a
+ + "-9013898845762846029"
+ + a
+ + "-8969084512827133030"
+ + a
+ + "7172471193941949821"
+ + a
+ + "676000395376995144"
+ + a
+ + "1048894728609279038"
+ + a
+ + "-3254442066135634467"
+ + a
+ + "201729189762167629"
+ + a
+ + "7312182024186004478"
+ + a
+ + "3135803949473351523"
+ + a
+ + "5531867581893384684"
+ + a
+ + "8247817870075144100"
+ + a
+ + "-3853860775957597396"
+ + a
+ + "-6308950247999654944"
+ + a
+ + "-4274726932216138646"
+ + a
+ + "-1285957732812479723"
+ + a
+ + "1982895588695926681"
+ + a
+ + "8748824578821627448"
+ + a
+ + "-5983709949530218913"
+ + a
+ + "-1709967482004339916"
+ + a
+ + "-2702262020059146576"
+ + a
+ + "6920158278268474418"
+ + a
+ + "-6506553802338482760"
+ + a
+ + "-6589983316832561381"
+ + a
+ + "-3536094890319057666"
+ + a
+ + "-6915112845813208742"
+ + a
+ + "-5611867381828969018"
+ + a
+ + "-8066425788823614490"
+ + a
+ + "8754414329208983222"
+ + a
+ + "2052724808302422911"
+ + a
+ + "3214867679022081979"
+ + a
+ + "-254682339916322505"
+ + a
+ + "-2334236347464456147"
+ + a
+ + "-4089317706480064717"
+ + a
+ + "37563162890685232"
+ + a
+ + "407258492470255027"
+ + a
+ + "6651276108069654110"
+ + a
+ + "4700627022992276559"
+ + a
+ + "-4051813786109247838"
+ + a
+ + "8217401500665338754"
+ + a
+ + "8031632944018173798"
+ + a
+ + "-1760086780027911572"
+ + a
+ + "3030576104638562288"
+ + a
+ + "5710845799058769107"
+ + a
+ + "-614527972619889911"
+ + a
+ + "5682301044697611626"
+ + a
+ + "4776538540287909087"
+ + a
+ + "-1877447658871953322"
+ + a
+ + "-2533846628267513044"
+ + a
+ + "6552807816608129517"
+ + a
+ + "-2426525631037125738"
+ + a
+ + "6980954227435834816"
+ + a
+ + "-411591148764957608"
+ + a
+ + "-5258297969590195749"
+ + a
+ + "2619912957802173218"
+ + a
+ + "3218030450269655626"
+ + a
+ + "-619857944519317954"
+ + a
+ + "8002138058496669919"
+ + a
+ + "-8617705397551152141"
+ + a
+ + "-6437985726951369421"
+ + a
+ + "-2392199700291849170"
+ + a
+ + "-3421262753709518615"
+ + a
+ + "270156923239055453"
+ + a
+ + "3100544481691055161"
+ + a
+ + "8393385566088338846"
+ + a
+ + "-8766691689819679060"
+ + a
+ + "3411955047397791001"
+ + a
+ + "-942425660583552988"
+ + a
+ + "-5494089038893429079"
+ + a
+ + "1753298991032837663"
+ + a
+ + "4144485748098179521"
+ + a
+ + "9019756284128792892"
+ + a
+ + "7485522681383997581"
+ + a
+ + "-7749912962192279811"
+ + a
+ + "-5881896743911665321"
+ + a
+ + "7867326394818151373"
+ + a
+ + "-8828652256441447892"
+ + a
+ + "3231359801897619781"
+ + a
+ + "-5626130456934604098"
+ + a
+ + "-1965805744061946710"
+ + a
+ + "-4171903438904536948"
+ + a
+ + "242034066052370874"
+ + a
+ + "-7369023795040730816"
+ + a
+ + "6835741057618871719"
+ + a
+ + "774134065756964695"
+ + a
+ + "3465141288353005155"
+ + a
+ + "-3779358901714703098"
+ + a
+ + "-335320531677285858"
+ + a
+ + "3823006291557437788"
+ + a
+ + "5623219083725351692"
+ + a
+ + "7302740712840721315"
+ + a
+ + "-365458260827579541"
+ + a
+ + "8831535489520374028"
+ + a
+ + "9085006203827760580"
+ + a
+ + "8836704309237217418"
+ + a
+ + "-1823987370402081424"
+ + a
+ + "-5749446645166180099"
+ + a
+ + "-2471832494310546595"
+ + a
+ + "-6769001460762948205"
+ + a
+ + "9027118050139104018"
+ + a
+ + "-5768767759454835605"
+ + a
+ + "-2001078439708359696"
+ + a
+ + "2707266383359417210"
+ + a
+ + "758886391697560250"
+ + a
+ + "-4236177634611630158"
+ + a
+ + "-676183376821008554"
+ + a
+ + "7398874329266821728"
+ + a
+ + "4540944464450890452"
+ + a
+ + "42911468472215765"
+ + a
+ + "-4119021015193839185"
+ + a
+ + "-1177481591298844088"
+ + a
+ + "-693624857635527085"
+ + a
+ + "7921082210898178042"
+ + a
+ + "-4499721676330688545"
+ + a
+ + "4154259593529957275"
+ + a
+ + "-7166338548810268373"
+ + a
+ + "7753365296107548652"
+ + a
+ + "-2186225041970443252"
+ + a
+ + "7423701828375082917"
+ + a
+ + "812898257941157078"
+ + a
+ + "-3677169155188304232"
+ + a
+ + "-4703484088985861598"
+ + a
+ + "1187813145481451797"
+ + a
+ + "-3858671828440955696"
+ + a
+ + "361165121593087376"
+ + a
+ + "-8030026277547193265"
+ + a
+ + "-3836690016476314495"
+ + a
+ + "-7559410562141455589"
+ + a
+ + "5883887792631591563"
+ + a
+ + "3413382960269418375"
+ + a
+ + "4168686984580362464"
+ + a
+ + "-702820759068904260"
+ + a
+ + "-4363885676806133789"
+ + a
+ + "-3658075758606536703"
+ + a
+ + "6790627677296078862"
+ + a
+ + "7057596009493732924"
+ + a
+ + "607510813918713109"
+ + a
+ + "4819551316096669112"
+ + a
+ + "5145836395770980171"
+ + a
+ + "5761136386777137191"
+ + a
+ + "1481064066111110981"
+ + a
+ + "5693144445371285739"
+ + a
+ + "9129919572780718012"
+ + a
+ + "-1504083653860623472"
+ + a
+ + "2070890902742098359"
+ + a
+ + "1480565051121909405"
+ + a
+ + "5499577503853737705"
+ + a
+ + "-2776125582052960628"
+ + a
+ + "-2480684312588104105"
+ + a
+ + "8771589187068513557"
+ + a
+ + "8067467929933420349"
+ + a
+ + "-3295423683867813710"
+ + a
+ + "-3361578417678328270"
+ + a
+ + "-4121009223520157601"
+ + a
+ + "392997535814475914"
+ + a
+ + "1789296450207299490"
+ + a
+ + "-3697713259734978053"
+ + a
+ + "628631279980394186"
+ + a
+ + "1538142610757949570"
+ + a
+ + "3014708050390717307"
+ + a
+ + "8368027918365770375"
+ + a
+ + "5272761268686019945"
+ + a
+ + "-4588282506250667201"
+ + a
+ + "735613646452474722"
+ + a
+ + "2336131046108152145"
+ + a
+ + "-6713652582424902510"
+ + a
+ + "856426609358693308"
+ + a
+ + "-5764760478319988222"
+ + a
+ + "1317764034487519479"
+ + a
+ + "-7663689255410432927"
+ + a
+ + "1564984526161167449"
+ + a
+ + "-1237279123716355577"
+ + a
+ + "5332338165481348539"
+ + a
+ + "-4286101521344581322"
+ + a
+ + "-2692886887951257765"
+ + a
+ + "3081220136049308322"
+ + a
+ + "-1005407527749730814"
+ + a
+ + "8269155628421292083"
+ + a
+ + "-3673754564856205463"
+ + a
+ + "-3050564424808653816"
+ + a
+ + "1125071308475499224"
+ + a
+ + "-5974287850071950401"
+ + a
+ + "3330249117666619408"
+ + a
+ + "7240820503676705779"
+ + a
+ + "1642205853975580779"
+ + a
+ + "518033395482912773"
+ + a
+ + "9023735332483216960"
+ + a
+ + "-362521542291383777"
+ + a
+ + "1416200491926804108"
+ + a
+ + "4319349826267477878"
+ + a
+ + "6098681376734062798"
+ + a
+ + "-8811971102703039282"
+ + a
+ + "6099455912858083633"
+ + a
+ + "-3751004972830609597"
+ + a
+ + "-4558788276728518416"
+ + a
+ + "6603320167334266181"
+ + a
+ + "-1879326311614760715"
+ + a
+ + "-1518535272556061725"
+ + a
+ + "7939639866029472452"
+ + a
+ + "-3942568855900091315"
+ + a
+ + "-5149216631387827305"
+ + a
+ + "-6188272913878747757"
+ + a
+ + "1204133292757319113"
+ + a
+ + "1830936117936836274"
+ + a
+ + "270507518630958199"
+ + a
+ + "5964034136794191057"
+ + a
+ + "622086613391553891"
+ + a
+ + "-4044109720903427641"
+ + a
+ + "5309401104600816924"
+ + a
+ + "5854709978342127329"
+ + a
+ + "-7113119392306929317"
+ + a
+ + "-8296314090384807967"
+ + a
+ + "7792947881051106736"
+ + a
+ + "-1831540041133485496"
+ + a
+ + "1844404915791308381"
+ + a
+ + "-2900049116190081832"
+ + a
+ + "7604043466623112578"
+ + a
+ + "1385230110345476947"
+ + a
+ + "-5233101492963391879"
+ + a
+ + "2471267247780565641"
+ + a
+ + "-5995778305748913277"
+ + a
+ + "-3209698986461865839"
+ + a
+ + "-8279215312170063453"
+ + a
+ + "4462971907002684758"
+ + a
+ + "6281311314716264138"
+ + a
+ + "-3257960478385428651"
+ + a
+ + "-6828294302956554701"
+ + a
+ + "6799612423185477796"
+ + a
+ + "-8281268754176717040"
+ + a
+ + "3538859237519118389"
+ + a
+ + "-2495284552219494042"
+ + a
+ + "3289767735159024475"
+ + a
+ + "-7262666652027208395"
+ + a
+ + "-3342179262643369074"
+ + a
+ + "-2686393516999860261"
+ + a
+ + "-6369045581584952214"
+ + a
+ + "-4896397163081092167"
+ + a
+ + "-1106429552471910915"
+ + a
+ + "7550618187091230230"
+ + a
+ + "-3232241069305036991"
+ + a
+ + "6993448705049974595"
+ + a
+ + "7709134248993830119"
+ + a
+ + "4482583112596121856"
+ + a
+ + "-5635393839918231466"
+ + a
+ + "2762742040278609694"
+ + a
+ + "3916419401481784050"
+ + a
+ + "8868887623616044645"
+ + a
+ + "-1818632570137175647"
+ + a
+ + "193235487359260087"
+ + a
+ + "575074970976058506"
+ + a
+ + "-8985585339031454347"
+ + a
+ + "-6338853231125756129"
+ + a
+ + "-2809344250173212384"
+ + a
+ + "837100051196961885"
+ + a
+ + "4519444928612470595"
+ + a
+ + "-8831458533041890478"
+ + a
+ + "5466635346572995472"
+ + a
+ + "-2714544946149435425"
+ + a
+ + "-277477702503620791"
+ + a
+ + "8272532255686654911"
+ + a
+ + "-7610619522511862815"
+ + a
+ + "-7645326188242355257"
+ + a
+ + "827795157877760994"
+ + a
+ + "5437190065560014191"
+ + a
+ + "4167221504951586321"
+ + a
+ + "3082414627465816208"
+ + a
+ + "-6734643063912253745"
+ + a
+ + "-5276964537776660114"
+ + a
+ + "-9094362759722103871"
+ + a
+ + "4595818775753481977"
+ + a
+ + "-4087241889267933773"
+ + a
+ + "-1257608924355595952"
+ + a
+ + "4351732371950830777"
+ + a
+ + "5193138130860379269"
+ + a
+ + "-3916941014212287849"
+ + a
+ + "7594113146195159975"
+ + a
+ + "-8695075429018720414"
+ + a
+ + "-9144598542982799364"
+ + a
+ + "5626727214029601894"
+ + a
+ + "-3146570308898533234"
+ + a
+ + "4432451326092638538"
+ + a
+ + "7168622808530513384"
+ + a
+ + "684393440237651826"
+ + a
+ + "1760316058825137697"
+ + a
+ + "7243506489618044836"
+ + a
+ + "3685158225175864601"
+ + a
+ + "1600300354429193709"
+ + a
+ + "7067462904497261826"
+ + a
+ + "-839954699824199739"
+ + a
+ + "-1731844344041729246"
+ + a
+ + "4120365338300145777"
+ + a
+ + "4700617060120681686"
+ + a
+ + "8570705998246156200"
+ + a
+ + "-7062964399243872039"
+ + a
+ + "-8817049929142337927"
+ + a
+ + "201542101853499590"
+ + a
+ + "5238720077424184939"
+ + a
+ + "1788514135136726747"
+ + a
+ + "-8309715731125793051"
+ + a
+ + "6115412997633031167"
+ + a
+ + "-5346494036408308528"
+ + a
+ + "-6068025858118821371"
+ + a
+ + "-5932259412207441798"
+ + a
+ + "2351995352859508274"
+ + a
+ + "-3746484280315839043"
+ + a
+ + "360454599848620028"
+ + a
+ + "3132381951388494432"
+ + a
+ + "5049042146436485140"
+ + a
+ + "8898775546803910332"
+ + a
+ + "-1202919124881683546"
+ + a
+ + "7041178572098397346"
+ + a
+ + "-8166280725402746913"
+ + a
+ + "-8310610786421217156"
+ + a
+ + "2015340129615385007"
+ + a
+ + "-3112340769538256718"
+ + a
+ + "-4753441222255821360"
+ + a
+ + "293846787812835150"
+ + a
+ + "7664185921988945158"
+ + a
+ + "-2429261855800845854"
+ + a
+ + "2299891343418022055"
+ + a
+ + "-3968905011777301591"
+ + a
+ + "-1072388405629031587"
+ + a
+ + "7400575921342068203"
+ + a
+ + "6126585323173628458"
+ + a
+ + "-4199825813150659930"
+ + a
+ + "4717958064551551404"
+ + a
+ + "8447775056038382954"
+ + a
+ + "7550816180641092514"
+ + a
+ + "5053394191794161284"
+ + a
+ + "-374394710832856914"
+ + a
+ + "6673982621964317790"
+ + a
+ + "7769099750366112347"
+ + a
+ + "582083892204824357"
+ + a
+ + "-3924934516439453342"
+ + a
+ + "-853371098297634132"
+ + a
+ + "-1744211355889126359"
+ + a
+ + "5874904351329622672"
+ + a
+ + "6480257425044410763"
+ + a
+ + "-7287975933281248101"
+ + a
+ + "-9009208460900232226"
+ + a
+ + "6894996998655032685"
+ + a
+ + "-7166863071074039759"
+ + a
+ + "-5043653784276649128"
+ + a
+ + "1340755988030801365"
+ + a
+ + "-5805692447290684532"
+ + a
+ + "-639637588574950882"
+ + a
+ + "1992946243761046899"
+ + a
+ + "3236727614859775082"
+ + a
+ + "-992892522569080738"
+ + a
+ + "-6739338734913933726"
+ + a
+ + "-5698245368860006559"
+ + a
+ + "320432080719244416"
+ + a
+ + "-154166996144617606"
+ + a
+ + "-9045262093639175472"
+ + a
+ + "5979842622142929912"
+ + a
+ + "-584268127486379527"
+ + a
+ + "-6285866132203004646"
+ + a
+ + "4263905288286539902"
+ + a
+ + "-6827235910360165131"
+ + a
+ + "-3833636050304093119"
+ + a
+ + "5742151528782102171"
+ + a
+ + "2512406733069500489"
+ + a
+ + "6777198207780713337"
+ + a
+ + "-1392133474325269820"
+ + a
+ + "-5402246813652006143"
+ + a
+ + "-695336947609858225"
+ + a
+ + "-7869633046346805112"
+ + a
+ + "-8254465118773780108"
+ + a
+ + "372642895695868784"
+ + a
+ + "-2168967434964442253"
+ + a
+ + "6016733552586085769"
+ + a
+ + "9166421280254987588"
+ + a
+ + "1044428613109144500"
+ + a
+ + "-8744502771805909028"
+ + a
+ + "3543447616884352201"
+ + a
+ + "1070423814532890799"
+ + a
+ + "2808313361837951674"
+ + a
+ + "2402973008482417014"
+ + a
+ + "5283082923061875192"
+ + a
+ + "1005241756636803121"
+ + a
+ + "-3707900364373038315"
+ + a
+ + "-2537550726905607313"
+ + a
+ + "7535221891479136938"
+ + a
+ + "4745685907260503757"
+ + a
+ + "-3989952935921968262"
+ + a
+ + "-6396042900849329221"
+ + a
+ + "-1912658222926410025"
+ + a
+ + "5559729587433038470"
+ + a
+ + "-9042158123009519804"
+ + a
+ + "-7508469492255465583"
+ + a
+ + "-5802746913634379429"
+ + a
+ + "-1030766020219629339"
+ + a
+ + "3996466211969482480"
+ + a
+ + "971307730651647981"
+ + a
+ + "-8204818657440638857"
+ + a
+ + "4246419169617795961"
+ + a
+ + "197105093958543522"
+ + a
+ + "3987224458460585484"
+ + a
+ + "-5566995006900283826"
+ + a
+ + "-5090718343345925037"
+ + a
+ + "-362961194757726049"
+ + a
+ + "-6766655973311703054"
+ + a
+ + "-8152550618578079383"
+ + a
+ + "8727484798650946182"
+ + a
+ + "3277520600155189713"
+ + a
+ + "-4825917241716417305"
+ + a
+ + "6404577761645561139"
+ + a
+ + "-4088708628546203987"
+ + a
+ + "-1469454737835569594"
+ + a
+ + "360256153285427701"
+ + a
+ + "-4096673187546291586"
+ + a
+ + "3028455180906827621"
+ + a
+ + "-5697812617708302415"
+ + a
+ + "-6199077867733285268"
+ + a
+ + "5869119992708290557"
+ + a
+ + "3047200773521057230"
+ + a
+ + "-1935573449143760920"
+ + a
+ + "1181227474209347679"
+ + a
+ + "-5192436270056813880"
+ + a
+ + "-5981835572353713650"
+ + a
+ + "-2378640542305853084"
+ + a
+ + "-8845131644051969755"
+ + a
+ + "-6504576818889302309"
+ + a
+ + "-6549477532194232370"
+ + a
+ + "-2788711288451297340"
+ + a
+ + "-2832019670072094248"
+ + a
+ + "341748228777783190"
+ + a
+ + "-2903458835888903493"
+ + a
+ + "-129880745849696182"
+ + a
+ + "6381150392315725785"
+ + a
+ + "-30597152500213698"
+ + a
+ + "4960038852833483526"
+ + a
+ + "5189131457881111132"
+ + a
+ + "-3379666811891769014"
+ + a
+ + "-4795960766138987397"
+ + a
+ + "-8538291988532430363"
+ + a
+ + "-5011019319379369980"
+ + a
+ + "-3466784809454327406"
+ + a
+ + "-7244399554717482792"
+ + a
+ + "4037898002906123792"
+ + a
+ + "7063786579803962993"
+ + a
+ + "7035924209773118941"
+ + a
+ + "421385459932308295"
+ + a
+ + "-5379985667116707772"
+ + a
+ + "-7292085578809000332"
+ + a
+ + "-1634305536860165734"
+ + a
+ + "1928407863900382106"
+ + a
+ + "-6697146387006003261"
+ + a
+ + "6557690716054209796"
+ + a
+ + "8930733808836057851"
+ + a
+ + "-1158662967726257141"
+ + a
+ + "4585941391178004178"
+ + a
+ + "-6840073792724806726"
+ + a
+ + "7050725063443220344"
+ + a
+ + "-6111592916421269067"
+ + a
+ + "7974338844007528250"
+ + a
+ + "-5760358258195547818"
+ + a
+ + "-330810618067720116"
+ + a
+ + "-7082179771767356136"
+ + a
+ + "5552363012933789385"
+ + a
+ + "8688981596976075320"
+ + a
+ + "5500270448714413815"
+ + a
+ + "4068339518628719257"
+ + a
+ + "5622887313234789326"
+ + a
+ + "7476523530169391335"
+ + a
+ + "-2439863629179014726"
+ + a
+ + "1586160239952639"
+ + a
+ + "-2384342299521656417"
+ + a
+ + "-2832172495405922674"
+ + a
+ + "9186454350340599838"
+ + a
+ + "-7119506664283046921"
+ + a
+ + "8722237800224251158"
+ + a
+ + "-8028932238977825926"
+ + a
+ + "-6679633586158794899"
+ + a
+ + "-4128085193502769006"
+ + a
+ + "-2694889702010005232"
+ + a
+ + "28060721560266653"
+ + a
+ + "-4036396181941043401"
+ + a
+ + "573627557196513730"
+ + a
+ + "-2886825953052529939"
+ + a
+ + "-9021853037597226226"
+ + a
+ + "6639775871172040143"
+ + a
+ + "6325282655181082336"
+ + a
+ + "-2828784674020405485"
+ + a
+ + "8053228464922224263"
+ + a
+ + "835754613661258956"
+ + a
+ + "687616988668427817"
+ + a
+ + "-7115215555307553429"
+ + a
+ + "-6134585960732965914"
+ + a
+ + "4365544543977960840"
+ + a
+ + "-2153933826332711620"
+ + a
+ + "6426388724066702818"
+ + a
+ + "4934635694489665196"
+ + a
+ + "-3857729065161435740"
+ + a
+ + "103820663860486558"
+ + a
+ + "-8419482397683868438"
+ + a
+ + "-2219101567048493951"
+ + a
+ + "-5163267524901225598"
+ + a
+ + "-2240709922608058058"
+ + a
+ + "4095375526281218038"
+ + a
+ + "-2434822556161931858"
+ + a
+ + "-6097342827894248758"
+ + a
+ + "-2483085308495160623"
+ + a
+ + "6990649954638076417"
+ + a
+ + "-7748372183265049183"
+ + a
+ + "8769824456353646822"
+ + a
+ + "-6566599754748467553"
+ + a
+ + "-8767535561125982200"
+ + a
+ + "-5767847014813615251"
+ + a
+ + "16585727054975365"
+ + a
+ + "7061426797167339188"
+ + a
+ + "3342377856798498187"
+ + a
+ + "5424143702885061191"
+ + a
+ + "-4697912950102238436"
+ + a
+ + "-5183789779938242680"
+ + a
+ + "1332912957579573520"
+ + a
+ + "7162169011139090954"
+ + a
+ + "8029173537521838944"
+ + a
+ + "7949758510655971447"
+ + a
+ + "-8627477637634983776"
+ + a
+ + "4781328307785922484"
+ + a
+ + "-1547317671117136947"
+ + a
+ + "3562813702326426690"
+ + a
+ + "6464649078692052553"
+ + a
+ + "-5537771374198921753"
+ + a
+ + "3422296785291906594"
+ + a
+ + "-815183837930335859"
+ + a
+ + "-2469545167774288742"
+ + a
+ + "3183967805852812649"
+ + a
+ + "6195732569668481251"
+ + a
+ + "5560823059519075167"
+ + a
+ + "-6700605253108557015"
+ + a
+ + "-6845818076730311260"
+ + a
+ + "-9102092416485747754"
+ + a
+ + "-7466079552906411612"
+ + a
+ + "7552162934089048849"
+ + a
+ + "6274144703036091686"
+ + a
+ + "-5797395244716438394"
+ + a
+ + "-2410484764424650322"
+ + a
+ + "8218696676651047788"
+ + a
+ + "-1364874463406577118"
+ + a
+ + "6390770316670610115"
+ + a
+ + "2923279350716860080"
+ + a
+ + "8704806818765876702"
+ + a
+ + "-4708440064978677010"
+ + a
+ + "8392838990546337056"
+ + a
+ + "8120920544314427970"
+ + a
+ + "-6271220152228353270"
+ + a
+ + "-941748393170030973"
+ + a
+ + "6372744708489078132"
+ + a
+ + "7790274732062971104"
+ + a
+ + "1358384079472387866"
+ + a
+ + "-3608381090258920192"
+ + a
+ + "5917622351180168538"
+ + a
+ + "3095599168623588971"
+ + a
+ + "-653667630632311237"
+ + a
+ + "5891266588269467688"
+ + a
+ + "-7208969002187126095"
+ + a
+ + "-883548513504211290"
+ + a
+ + "2726760945793685790"
+ + a
+ + "-2982103471807609889"
+ + a
+ + "8914879214672593948"
+ + a
+ + "-3607349655557495366"
+ + a
+ + "8116698847766243705"
+ + a
+ + "308162547213815472"
+ + a
+ + "-1275284704403413630"
+ + a
+ + "-1778632605110201166"
+ + a
+ + "-3554963472166742396"
+ + a
+ + "-8997883784976997814"
+ + a
+ + "4735346424799974543"
+ + a
+ + "6795654028385140224"
+ + a
+ + "8043450937201975677"
+ + a
+ + "-3617029366231997442"
+ + a
+ + "7177497156531426610"
+ + a
+ + "242867771455100406"
+ + a
+ + "7622822328305617444"
+ + a
+ + "-4045393600264665789"
+ + a
+ + "8628123722466315805"
+ + a
+ + "5930021295582837582"
+ + a
+ + "1536042192894024511"
+ + a
+ + "2390698953619219507"
+ + a
+ + "9163375968628710728"
+ + a
+ + "4308476216190967715"
+ + a
+ + "8009358785036420887"
+ + a
+ + "1800348127777111051"
+ + a
+ + "8509601059683269743"
+ + a
+ + "6258915416005705718"
+ + a
+ + "1082077504080286714"
+ + a
+ + "-1826263866120346193"
+ + a
+ + "6025389024542848399"
+ + a
+ + "-5133626746882118359"
+ + a
+ + "6154119686706124983"
+ + a
+ + "-1605145526392461277"
+ + a
+ + "-4333303749316450451"
+ + a
+ + "114733945430287495"
+ + a
+ + "8622181414885296421"
+ + a
+ + "-4196544011026015981"
+ + a
+ + "5346853227809561103"
+ + a
+ + "2510537901621147706"
+ + a
+ + "-471289725201558884"
+ + a
+ + "-5041864661219029684"
+ + a
+ + "-5290882543828245696"
+ + a
+ + "310406345774434260"
+ + a
+ + "-836120429100169095"
+ + a
+ + "-2875972663477397184"
+ + a
+ + "9086016168367659792"
+ + a
+ + "8311431726304676039"
+ + a
+ + "5143129165001711775"
+ + a
+ + "4016919432949997959"
+ + a
+ + "-7749693328074760110"
+ + a
+ + "-5235410215971905811"
+ + a
+ + "7569569929589047281"
+ + a
+ + "-1581487344202597543"
+ + a
+ + "-2823291768960471779"
+ + a
+ + "-4769131022362688256"
+ + a
+ + "2419524602717574873"
+ + a
+ + "4050479565818895636"
+ + a
+ + "449800018403605324"
+ + a
+ + "1121413394434802979"
+ + a
+ + "-2209767303172600380"
+ + a
+ + "-5865159681775673668"
+ + a
+ + "6682993921838332158"
+ + a
+ + "-6357199263009504937"
+ + a
+ + "-4366856823012441692"
+ + a
+ + "-8119186401376499082"
+ + a
+ + "-1900663570264666858"
+ + a
+ + "6128737523260902407"
+ + a
+ + "-8361790953618845587"
+ + a
+ + "-8438846588423717620"
+ + a
+ + "5379136913256590268"
+ + a
+ + "-8959828995842764675"
+ + a
+ + "2013485321765713304"
+ + a
+ + "651946542299993708"
+ + a
+ + "-5391177516746868006"
+ + a
+ + "3425694396468759402"
+ + a
+ + "-1979882897317923166"
+ + a
+ + "-2388508052192282071"
+ + a
+ + "1107642281868904095"
+ + a
+ + "4894802375968232290"
+ + a
+ + "-2428702934885589106"
+ + a
+ + "748293452130295800"
+ + a
+ + "5691345231677294080"
+ + a
+ + "-2486174962298326691"
+ + a
+ + "7585678359546040159"
+ + a
+ + "-1165316407513877451"
+ + a
+ + "2776342058318376754"
+ + a
+ + "-4940343491937875656"
+ + a
+ + "4902665902804440223"
+ + a
+ + "-7004665724076013476"
+ + a
+ + "-7587472018453996495"
+ + a
+ + "-6128233963625541070"
+ + a
+ + "8765264654317689308"
+ + a
+ + "-2735507998347373681"
+ + a
+ + "6869498668177194813"
+ + a
+ + "-2309224666323771537"
+ + a
+ + "-4675659234126814683"
+ + a
+ + "-645016471268424937"
+ + a
+ + "4348650649368700760"
+ + a
+ + "-214874236310013831"
+ + a
+ + "4227405815643690385"
+ + a
+ + "3320061444282227419"
+ + a
+ + "3492145785275045065"
+ + a
+ + "280923641490784697"
+ + a
+ + "1729100804134378936"
+ + a
+ + "-7018883124081924630"
+ + a
+ + "-2553608611882476133"
+ + a
+ + "-8712100756899236606"
+ + a
+ + "-7047559964016225736"
+ + a
+ + "2257846751488374520"
+ + a
+ + "578572409173107231"
+ + a
+ + "4345843164919605767"
+ + a
+ + "-5388543504591522511"
+ + a
+ + "-1420156524092622632"
+ + a
+ + "827096772545466725"
+ + a
+ + "9137641896724442848"
+ + a
+ + "-1589360466733170743"
+ + a
+ + "7521623884226563847"
+ + a
+ + "-4279434455789503033"
+ + a
+ + "7492695699111981194"
+ + a
+ + "662856192142196394"
+ + a
+ + "8334988775092012577"
+ + a
+ + "1671344884230832479"
+ + a
+ + "-2044014017311657117"
+ + a
+ + "6583901209675742847"
+ + a
+ + "5354213495517942889"
+ + a
+ + "-4296590309239016820"
+ + a
+ + "-8299904015655199822"
+ + a
+ + "7163309498874579066"
+ + a
+ + "8906980711730899526"
+ + a
+ + "-8157592364450060175"
+ + a
+ + "3401949787303101981"
+ + a
+ + "-4223572875100557615"
+ + a
+ + "5474605156432827072"
+ + a
+ + "3981886448469888886"
+ + a
+ + "-9195922886710120400"
+ + a
+ + "-6781980014290589380"
+ + a
+ + "-4650095012203781113"
+ + a
+ + "-2670393501310972475"
+ + a
+ + "244857965431795933"
+ + a
+ + "4963832997474992505"
+ + a
+ + "-7039257533111255059"
+ + a
+ + "-6826075960450943026"
+ + a
+ + "1201368054799712503"
+ + a
+ + "-9222551770351120439"
+ + a
+ + "-22866653804370841"
+ + a
+ + "8437961880322577603"
+ + a
+ + "-6125560768563752011"
+ + a
+ + "7574367817931360112"
+ + a
+ + "5365028931303869455"
+ + a
+ + "-5058302939379092707"
+ + a
+ + "2455138729010151222"
+ + a
+ + "9203935591068668728"
+ + a
+ + "2796918361659563685"
+ + a
+ + "-8483360316871766763"
+ + a
+ + "-9067058866623859465"
+ + a
+ + "7843656574609474031"
+ + a
+ + "-8147765876542590583"
+ + a
+ + "1519804927585221932"
+ + a
+ + "8611916919506422366"
+ + a
+ + "-6198901302068952348"
+ + a
+ + "579403830270105667"
+ + a
+ + "1609687792509862563"
+ + a
+ + "-7231889928507289293"
+ + a
+ + "6732812887884149358"
+ + a
+ + "1204881394266834172"
+ + a
+ + "4951141969248441860"
+ + a
+ + "1863090715134214177"
+ + a
+ + "-6666109477540514203"
+ + a
+ + "-280648257592952574"
+ + a
+ + "-4250872315774251625"
+ + a
+ + "3996873936390056762"
+ + a
+ + "5520288376047446695"
+ + a
+ + "-4225712827009972920"
+ + a
+ + "6640668318007251438"
+ + a
+ + "-7822277872013652880"
+ + a
+ + "-3244108851453600363"
+ + a
+ + "-2181521917129762077"
+ + a
+ + "2686564367700992602"
+ + a
+ + "-2258981347631293411"
+ + a
+ + "-1571417078447055725"
+ + a
+ + "-4980342251464119410"
+ + a
+ + "469673291326368115"
+ + a
+ + "8423225432380111228"
+ + a
+ + "-7670022367894187893"
+ + a
+ + "5076231647728900647"
+ + a
+ + "-247665089260674669"
+ + a
+ + "5068764746662372141"
+ + a
+ + "2492346037887003242"
+ + a
+ + "2510738240134871856"
+ + a
+ + "-7334958788734858917"
+ + a
+ + "-2877153358493990987"
+ + a
+ + "-4716530858546503774"
+ + a
+ + "-4831160593616100017"
+ + a
+ + "-4158965795250821074"
+ + a
+ + "2725746077492180476"
+ + a
+ + "-6981354750764550489"
+ + a
+ + "4984677901836358094"
+ + a
+ + "-2897492827028626767"
+ + a
+ + "-3007807911349512755"
+ + a
+ + "-2335285518997281934"
+ + a
+ + "-6497222833057231589"
+ + a
+ + "-5969540629175099566"
+ + a
+ + "-2726402144599502759"
+ + a
+ + "4983488580263719937"
+ + a
+ + "4618068593733564233"
+ + a
+ + "4674808449266055869"
+ + a
+ + "2778048184895307956"
+ + a
+ + "1593959768661134549"
+ + a
+ + "-1168323625394891634"
+ + a
+ + "-8431953809781912472"
+ + a
+ + "7389772160540771415"
+ + a
+ + "1237587864098927986"
+ + a
+ + "-5053432970285126205"
+ + a
+ + "3754299562846812936"
+ + a
+ + "6445576852995318684"
+ + a
+ + "6565115049261397218"
+ + a
+ + "-7760314081139932953"
+ + a
+ + "-4896883839284862694"
+ + a
+ + "1182022690251590213"
+ + a
+ + "-1550248977507238349"
+ + a
+ + "-1609617831168212580"
+ + a
+ + "4264076591236890972"
+ + a
+ + "7395382158106054646"
+ + a
+ + "-7912578828193846028"
+ + a
+ + "-3041911089740977752"
+ + a
+ + "-3238549283056366768"
+ + a
+ + "-2443360979708866378"
+ + a
+ + "5544029753932960188"
+ + a
+ + "-7192309836319352458"
+ + a
+ + "4036598099433992128"
+ + a
+ + "-9082185255963159182"
+ + a
+ + "-3092063436637565277"
+ + a
+ + "-8927036557005928301"
+ + a
+ + "8844347650138588468"
+ + a
+ + "-8111125464252691334"
+ + a
+ + "-1918778248598993977"
+ + a
+ + "1831582801437623857"
+ + a
+ + "6771172937014131838"
+ + a
+ + "7830774901345473026"
+ + a
+ + "-5160919996654154807"
+ + a
+ + "-3697803209226155609"
+ + a
+ + "1291583943740499247"
+ + a
+ + "-1955003385519519581"
+ + a
+ + "9073059988413483085"
+ + a
+ + "1168543109901128430"
+ + a
+ + "2599186224882680351"
+ + a
+ + "-5203128507699019305"
+ + a
+ + "-8749829865884369282"
+ + a
+ + "6549061450013465382"
+ + a
+ + "-3512235379684577815"
+ + a
+ + "5354983726838560384"
+ + a
+ + "-2946006055244070009"
+ + a
+ + "-1375597554733738737"
+ + a
+ + "-7101682434478354580"
+ + a
+ + "-6001596329509810335"
+ + a
+ + "-5869662267426146021"
+ + a
+ + "-3599685847420338800"
+ + a
+ + "8754157200375258699"
+ + a
+ + "4234717604086300067"
+ + a
+ + "5397380997623945709"
+ + a
+ + "4599376998411336756"
+ + a
+ + "-1965261020938324114"
+ + a
+ + "-3385719177956760750"
+ + a
+ + "-2142781605826243015"
+ + a
+ + "-3905952351338245208"
+ + a
+ + "95143064812765567"
+ + a
+ + "-1039468486826062882"
+ + a
+ + "6223203864543739962"
+ + a
+ + "1787093017719824959"
+ + a
+ + "-8676033947351342738"
+ + a
+ + "4213743633756124315"
+ + a
+ + "-6709689043924662095"
+ + a
+ + "2733282328469795438"
+ + a
+ + "-8513384930568569106"
+ + a
+ + "4497638213147977025"
+ + a
+ + "7447736506608388965"
+ + a
+ + "8977452185526147920"
+ + a
+ + "2260626955068987637"
+ + a
+ + "2902975399257970796"
+ + a
+ + "3972828820308601757"
+ + a
+ + "195060761120092450"
+ + a
+ + "-6010009201321366976"
+ + a
+ + "-7997841208519183331"
+ + a
+ + "-8433656859080245080"
+ + a
+ + "6433481101909312968"
+ + a
+ + "-8956942505836208692"
+ + a
+ + "-7605763219271298505"
+ + a
+ + "5263604930838418005"
+ + a
+ + "-4138387242801350329"
+ + a
+ + "436263034223612766"
+ + a
+ + "-7964167185980745469"
+ + a
+ + "-2757956355998227077"
+ + a
+ + "-7013914980393985463"
+ + a
+ + "4920775969996911612"
+ + a
+ + "-4582086016477731924"
+ + a
+ + "-6339333432392050573"
+ + a
+ + "5358588603164071580"
+ + a
+ + "6335034181282715250"
+ + a
+ + "-2704890288056173884"
+ + a
+ + "-4698621662494535783"
+ + a
+ + "6880454043898100659"
+ + a
+ + "6253189057010332623"
+ + a
+ + "-4043699176241963842"
+ + a
+ + "-1425563574446132786"
+ + a
+ + "-5115979488304773341"
+ + a
+ + "-3618321007201522715"
+ + a
+ + "-6202461726546061711"
+ + a
+ + "8560786061659976953"
+ + a
+ + "2359788385103071015"
+ + a
+ + "2711419013815949772"
+ + a
+ + "-802706265648649317"
+ + a
+ + "-559100995080390015"
+ + a
+ + "-1762456854784718051"
+ + a
+ + "3568162812034725983"
+ + a
+ + "-7088544835602968740"
+ + a
+ + "7181191939156261844"
+ + a
+ + "-4907470742644562937"
+ + a
+ + "7862184013121427133"
+ + a
+ + "4889495530802425015"
+ + a
+ + "-7622081436878403868"
+ + a
+ + "3081791501595718923"
+ + a
+ + "2026591040025517258"
+ + a
+ + "-3433108361605185772"
+ + a
+ + "1303902686630382245"
+ + a
+ + "8717252537464132596"
+ + a
+ + "-7826352017071792213"
+ + a
+ + "3986558661259016897"
+ + a
+ + "-5969021043598609519"
+ + a
+ + "-1210424265454929490"
+ + a
+ + "8088806127965996622"
+ + a
+ + "-1381999595539233428"
+ + a
+ + "1016086461466957860"
+ + a
+ + "5027110879786730189"
+ + a
+ + "7541586340271209952"
+ + a
+ + "2399820556144787115"
+ + a
+ + "-3772769405077359265"
+ + a
+ + "-7453691879492239353"
+ + a
+ + "-6106216866350367148"
+ + a
+ + "811781994788345972"
+ + a
+ + "-2078854042860684471"
+ + a
+ + "3374140076271900341"
+ + a
+ + "8963113579475377891"
+ + a
+ + "6502993271279271845"
+ + a
+ + "348880398593501545"
+ + a
+ + "7903028158370050391"
+ + a
+ + "-2750487853317571962"
+ + a
+ + "7982831848166478973"
+ + a
+ + "-1926228812824511666"
+ + a
+ + "9189621107322060813"
+ + a
+ + "8401548749611295870"
+ + a
+ + "1878075903385072417"
+ + a
+ + "6694229297750189319"
+ + a
+ + "-7646662496352024290"
+ + a
+ + "4411002633420795085"
+ + a
+ + "8599003856471362584"
+ + a
+ + "-6922808322659934293"
+ + a
+ + "3317673841869146485"
+ + a
+ + "1459316535183914170"
+ + a
+ + "-1703167266964255537"
+ + a
+ + "4727044780602312147"
+ + a
+ + "7841100184412857631"
+ + a
+ + "-1295530100662922415"
+ + a
+ + "6734803838327379991"
+ + a
+ + "559506802001903643"
+ + a
+ + "8663271475052865486"
+ + a
+ + "-2468817170604045855"
+ + a
+ + "-2817063210052612446"
+ + a
+ + "-3720102142177214044"
+ + a
+ + "-5640450740202777255"
+ + a
+ + "690383845834852476"
+ + a
+ + "-8306427862592886903"
+ + a
+ + "-3736990181363936107"
+ + a
+ + "-2986866306441131462"
+ + a
+ + "9106463985653875322"
+ + a
+ + "665981939139107017"
+ + a
+ + "-3844940684705335659"
+ + a
+ + "6280861445436615694"
+ + a
+ + "3956722147803271926"
+ + a
+ + "-5634382710667391039"
+ + a
+ + "7313964839859504467"
+ + a
+ + "-6204547114658567655"
+ + a
+ + "8074487499212157263"
+ + a
+ + "1482811611195095477"
+ + a
+ + "-3928275414994781441"
+ + a
+ + "-560715991707120193"
+ + a
+ + "-8053382484339034711"
+ + a
+ + "-3360476595331163058"
+ + a
+ + "-4784060492033787186"
+ + a
+ + "5286331065042164492"
+ + a
+ + "9073220514388929898"
+ + a
+ + "8273762920533311000"
+ + a
+ + "-6799513291991536263"
+ + a
+ + "4043271263802949933"
+ + a
+ + "4475345522798952381"
+ + a
+ + "-248882133580030205"
+ + a
+ + "-8175034539526476354"
+ + a
+ + "6125045191655971573"
+ + a
+ + "1810810648639054354"
+ + a
+ + "-587585792723615517"
+ + a
+ + "4670222394891044062"
+ + a
+ + "-7975984184583733415"
+ + a
+ + "5842356717397744796"
+ + a
+ + "8663949881797689328"
+ + a
+ + "-3054207219808569570"
+ + a
+ + "8251016140953608692"
+ + a
+ + "-6142951917503406383"
+ + a
+ + "-1732984775710557369"
+ + a
+ + "-5955757954531237818"
+ + a
+ + "6418042867248350084"
+ + a
+ + "-6414726438342237202"
+ + a
+ + "7781465661939518822"
+ + a
+ + "-649581833388810203"
+ + a
+ + "-2820630725805002133"
+ + a
+ + "5738329793443063665"
+ + a
+ + "6234863363416904884"
+ + a
+ + "-9137621878907201782"
+ + a
+ + "-258166755246777553"
+ + a
+ + "-1675536541671380579"
+ + a
+ + "7902751979806641143"
+ + a
+ + "8016406561088123468"
+ + a
+ + "5759006811329456378"
+ + a
+ + "-6091398283406965767"
+ + a
+ + "-4328822724025519397"
+ + a
+ + "6427841452113168580"
+ + a
+ + "-4926996329371650534"
+ + a
+ + "-1306633257330962991"
+ + a
+ + "9137733012256900722"
+ + a
+ + "3440956034324334414"
+ + a
+ + "-8573756505272742782"
+ + a
+ + "-4624910331391176524"
+ + a
+ + "3425008439753968047"
+ + a
+ + "-734596251718242996"
+ + a
+ + "7572637956277040712"
+ + a
+ + "1322373237301316852"
+ + a
+ + "5810552390058909162"
+ + a
+ + "199503054485051682"
+ + a
+ + "-764517467273486811"
+ + a
+ + "-840679265868657111"
+ + a
+ + "1371535877482736479"
+ + a
+ + "715197949572424891"
+ + a
+ + "-1101467851466129416"
+ + a
+ + "5500149141406191534"
+ + a
+ + "-2029138182667282002"
+ + a
+ + "-7745762717888982525"
+ + a
+ + "9202194397017614659"
+ + a
+ + "-4830429299923406557"
+ + a
+ + "-294973683082700707"
+ + a
+ + "-770719946520934550"
+ + a
+ + "-6003149868751828564"
+ + a
+ + "1023115426992093929"
+ + a
+ + "-2808832362196207791"
+ + a
+ + "-148560890012459929"
+ + a
+ + "-3643464539407985794"
+ + a
+ + "-8410227596794760535"
+ + a
+ + "-5181799262618054823"
+ + a
+ + "-1793478725375805965"
+ + a
+ + "-3690717729206571995"
+ + a
+ + "4781512499416416206"
+ + a
+ + "493328761242909347"
+ + a
+ + "-1263618823915441398"
+ + a
+ + "-1352133272625255243"
+ + a
+ + "-584209334795952122"
+ + a
+ + "5394732652930194757"
+ + a
+ + "2730298801417611566"
+ + a
+ + "6127272148572058212"
+ + a
+ + "-1331780583464768572"
+ + a
+ + "3092705661319183797"
+ + a
+ + "-3358432702900621085"
+ + a
+ + "-7547881226162667764"
+ + a
+ + "5828399694397811393"
+ + a
+ + "2231431973296909649"
+ + a
+ + "8779788609758773812"
+ + a
+ + "8714704936049961386"
+ + a
+ + "4943063128132597879"
+ + a
+ + "-3867062250178002727"
+ + a
+ + "-8339810247374085843"
+ + a
+ + "7234933578578419426"
+ + a
+ + "-402527188847953755"
+ + a
+ + "3086955841106122992"
+ + a
+ + "-689626326941754786"
+ + a
+ + "6346321656427491704"
+ + a
+ + "4841461452866853838"
+ + a
+ + "-7570267338657285474"
+ + a
+ + "-5549769923408703649"
+ + a
+ + "-6802003668512654632"
+ + a
+ + "5643116227623318457"
+ + a
+ + "-276980324301277232"
+ + a
+ + "-6896145161449352378"
+ + a
+ + "7000112851564301199"
+ + a
+ + "1123739621890119666"
+ + a
+ + "-1273471234785794089"
+ + a
+ + "5678409026331514674"
+ + a
+ + "-6634675684686943281"
+ + a
+ + "-1742556170324272568"
+ + a
+ + "-2341677967153991707"
+ + a
+ + "-6013346906619287868"
+ + a
+ + "-2265904069113320465"
+ + a
+ + "-5082431775224591539"
+ + a
+ + "5150530461316553619"
+ + a
+ + "-7701169879475571551"
+ + a
+ + "-4413654608010492695"
+ + a
+ + "-8622509856706064679"
+ + a
+ + "-7401519088241343138"
+ + a
+ + "6220527027528988401"
+ + a
+ + "9176542381028493531"
+ + a
+ + "2305793753238814856"
+ + a
+ + "-6617674145447145691"
+ + a
+ + "3106567589671900131"
+ + a
+ + "6689161216257139590"
+ + a
+ + "168889743807948855"
+ + a
+ + "7264870661777140397"
+ + a
+ + "-8665889717474009561"
+ + a
+ + "-5211218139780470062"
+ + a
+ + "915946055255785099"
+ + a
+ + "6557470483819917853"
+ + a
+ + "-3230930794341326478"
+ + a
+ + "-8261383331801563320"
+ + a
+ + "-2933248498027527830"
+ + a
+ + "3362285046791131266"
+ + a
+ + "-3236602998387360002"
+ + a
+ + "-8958841079789863786"
+ + a
+ + "-3472701866284984193"
+ + a
+ + "-3511286732130567604"
+ + a
+ + "-6832401335718815225"
+ + a
+ + "8495013884793993743"
+ + a
+ + "8478585801967012282"
+ + a
+ + "4545872409451722191"
+ + a
+ + "8751458915670103119"
+ + a
+ + "-3763263867978786008"
+ + a
+ + "-1505329801046065714"
+ + a
+ + "-1487289463746694204"
+ + a
+ + "1347751514604296858"
+ + a
+ + "4784023666843971581"
+ + a
+ + "4903739282273211570"
+ + a
+ + "-3903776439577921595"
+ + a
+ + "8906566957544227123"
+ + a
+ + "6453203279956387273"
+ + a
+ + "-7452238920921298399"
+ + a
+ + "8285138967744368852"
+ + a
+ + "-6353495953655828378"
+ + a
+ + "5478630133774944113"
+ + a
+ + "-1848015806237578727"
+ + a
+ + "1726662551911588308"
+ + a
+ + "-993442115399966460"
+ + a
+ + "6049095848239074810"
+ + a
+ + "4136475939674117472"
+ + a
+ + "-9075783297092503025"
+ + a
+ + "-2739244532591253278"
+ + a
+ + "6336851307741455"
+ + a
+ + "7639089003606955514"
+ + a
+ + "4688713394058952110"
+ + a
+ + "3056645057829377881"
+ + a
+ + "-8506726966182516868"
+ + a
+ + "-383731751399324748"
+ + a
+ + "-3654274050295505340"
+ + a
+ + "-8247615502549622328"
+ + a
+ + "8051425367409412021"
+ + a
+ + "5070740236957071517"
+ + a
+ + "-6304043607850294460"
+ + a
+ + "4879326440171479053"
+ + a
+ + "1207827151958931536"
+ + a
+ + "4368497979050464647"
+ + a
+ + "8756179114525016710"
+ + a
+ + "6572802117590866192"
+ + a
+ + "-5922996303565406074"
+ + a
+ + "6778103995113936523"
+ + a
+ + "-5476940069258540858"
+ + a
+ + "5487657823671443257"
+ + a
+ + "-400926173735974729"
+ + a
+ + "-8540988823898343550"
+ + a
+ + "-7014060288497364443"
+ + a
+ + "5644928988464987381"
+ + a
+ + "6879543305099205347"
+ + a
+ + "7964655700571564172"
+ + a
+ + "8088691900248937126"
+ + a
+ + "1723219599198728500"
+ + a
+ + "3018536455974744881"
+ + a
+ + "2940291325452882573"
+ + a
+ + "-3786758981089890638"
+ + a
+ + "-797560390807012370"
+ + a
+ + "2663085406348533867"
+ + a
+ + "-7308829391124894805"
+ + a
+ + "1803629826901943189"
+ + a
+ + "5846440929888909977"
+ + a
+ + "-8542702904802823040"
+ + a
+ + "-7163216730812752942"
+ + a
+ + "2221034704463855614"
+ + a
+ + "-2405682157860023115"
+ + a
+ + "-4676395964625238782"
+ + a
+ + "-216963140376579792"
+ + a
+ + "-5103389651471831933"
+ + a
+ + "9017702006631036993"
+ + a
+ + "2938999348929657766"
+ + a
+ + "-7730679226114448199"
+ + a
+ + "-3743205304154717157"
+ + a
+ + "-1776479219937991102"
+ + a
+ + "1654078855927477958"
+ + a
+ + "8094809716232335012"
+ + a
+ + "6340983493686361250"
+ + a
+ + "-866493891022565565"
+ + a
+ + "531735533923973602"
+ + a
+ + "2747910080493628139"
+ + a
+ + "2200812898658983768"
+ + a
+ + "-1513950816115621936"
+ + a
+ + "-8337720631869198822"
+ + a
+ + "-525577754379940401"
+ + a
+ + "7551804934410883426"
+ + a
+ + "519746586022812922"
+ + a
+ + "-8045547892464635210"
+ + a
+ + "5951243721520801875"
+ + a
+ + "5934161767066905672"
+ + a
+ + "-4705079481574756138"
+ + a
+ + "3464716257976122783"
+ + a
+ + "8978831342572010684"
+ + a
+ + "8187941088102065781"
+ + a
+ + "-3084684641150941442"
+ + a
+ + "921477582871759843"
+ + a
+ + "3307658955544601367"
+ + a
+ + "-2996165763170645061"
+ + a
+ + "-8274541103042848498"
+ + a
+ + "-3463908933883305420"
+ + a
+ + "-5048691860297368141"
+ + a
+ + "2177078496606619084"
+ + a
+ + "-8827388744732292312"
+ + a
+ + "-7957446549730534038"
+ + a
+ + "3303941265807359394"
+ + a
+ + "-3640624108889803582"
+ + a
+ + "-963485886713923471"
+ + a
+ + "-617302574273490179"
+ + a
+ + "-6628433587492636867"
+ + a
+ + "3755304851471882136"
+ + a
+ + "-1455409516034175087"
+ + a
+ + "3281387006666817931"
+ + a
+ + "8187267763424429725"
+ + a
+ + "-2112757461247130450"
+ + a
+ + "8487163885819199287"
+ + a
+ + "5515268578675020120"
+ + a
+ + "-7516059575070424029"
+ + a
+ + "2096245470903398985"
+ + a
+ + "-3599383330369850733"
+ + a
+ + "6717668160055633097"
+ + a
+ + "997039288715036912"
+ + a
+ + "-4111524577411313904"
+ + a
+ + "4213859757422026202"
+ + a
+ + "-1454344243953370904"
+ + a
+ + "1338177838168081261"
+ + a
+ + "-242181692786070896"
+ + a
+ + "5399006252168649414"
+ + a
+ + "646614180822848995"
+ + a
+ + "-6184731866872587323"
+ + a
+ + "-1444188926767387207"
+ + a
+ + "810942930502440211"
+ + a
+ + "-6218682137716519027"
+ + a
+ + "-2720895870328575898"
+ + a
+ + "-8808292532570299552"
+ + a
+ + "2140505418194421507"
+ + a
+ + "-7888434952098884132"
+ + a
+ + "-178310388289817980"
+ + a
+ + "5905005163930882235"
+ + a
+ + "1635421671359890907"
+ + a
+ + "6750033111404860777"
+ + a
+ + "-4564576791357207914"
+ + a
+ + "426758066406202856"
+ + a
+ + "-4872081106509472156"
+ + a
+ + "-5254560181717342221"
+ + a
+ + "-734363642590401321"
+ + a
+ + "9013812156623195750"
+ + a
+ + "-170482851728801429"
+ + a
+ + "-7173862230840257316"
+ + a
+ + "8254259043201955270"
+ + a
+ + "6501276346832030105"
+ + a
+ + "-8273757015293296575"
+ + a
+ + "5387853821745750442"
+ + a
+ + "-7474855440619051354"
+ + a
+ + "-1753227913458519222"
+ + a
+ + "1092217748501059899"
+ + a
+ + "-8791276135678971256"
+ + a
+ + "-218877590915892737"
+ + a
+ + "-4340725654742199259"
+ + a
+ + "-5742289577091247053"
+ + a
+ + "1343358900061715138"
+ + a
+ + "-1772225708659554277"
+ + a
+ + "-8797614013992611270"
+ + a
+ + "-3497464196302835963"
+ + a
+ + "-8309105028352082612"
+ + a
+ + "-663094820895261814"
+ + a
+ + "-3444240896004163203"
+ + a
+ + "1957144248429107731"
+ + a
+ + "4757954753357798716"
+ + a
+ + "6593264534837630366"
+ + a
+ + "3497227202123306054"
+ + a
+ + "2776287487035884738"
+ + a
+ + "6501556871116799564"
+ + a
+ + "8899612329989751536"
+ + a
+ + "-3778659576142179374"
+ + a
+ + "124703871414090235"
+ + a
+ + "6948288598497539417"
+ + a
+ + "-4996449766025445415"
+ + a
+ + "793686075701987520"
+ + a
+ + "-3198002690460840789"
+ + a
+ + "4009422788160882918"
+ + a
+ + "7193014696603651322"
+ + a
+ + "8082998766648896404"
+ + a
+ + "-3788231277556968381"
+ + a
+ + "-7148495983093530214"
+ + a
+ + "6736890024758916021"
+ + a
+ + "4216940336435230007"
+ + a
+ + "188328503832869176"
+ + a
+ + "-7120102739398964547"
+ + a
+ + "7607953946534615729"
+ + a
+ + "-3899525495187175563"
+ + a
+ + "1166694345313931652"
+ + a
+ + "-3219263269800959297"
+ + a
+ + "3266634161081313882"
+ + a
+ + "-9037148961090722434"
+ + a
+ + "2318060343891873059"
+ + a
+ + "-3515133393575994446"
+ + a
+ + "2566508863198691678"
+ + a
+ + "-9121275522528117659"
+ + a
+ + "6552814346023252631"
+ + a
+ + "-3844267506042688565"
+ + a
+ + "-1653156565782005455"
+ + a
+ + "-7173322703490581596"
+ + a
+ + "5311129569825581925"
+ + a
+ + "-5981496794536948251"
+ + a
+ + "485799454892997258"
+ + a
+ + "358814548216823190"
+ + a
+ + "-5883996450830917482"
+ + a
+ + "7892070487849955837"
+ + a
+ + "9041219978475479524"
+ + a
+ + "6784193649663705084"
+ + a
+ + "-704406440822053065"
+ + a
+ + "1617597350703726007"
+ + a
+ + "-2824990004512410626"
+ + a
+ + "4830833946059156601"
+ + a
+ + "644059663093447897"
+ + a
+ + "427654689358798040"
+ + a
+ + "9099539326079885915"
+ + a
+ + "451266633755291926"
+ + a
+ + "-5408292146163444719"
+ + a
+ + "-8218729673873120822"
+ + a
+ + "4812059197525286851"
+ + a
+ + "-1417290372535981890"
+ + a
+ + "7317429815661408505"
+ + a
+ + "-4706671334516443621"
+ + a
+ + "910482975170331840"
+ + a
+ + "4711728128274846659"
+ + a
+ + "2218323880426214829"
+ + a
+ + "-367348826505176322"
+ + a
+ + "8003614727540982818"
+ + a
+ + "8216996872543133783"
+ + a
+ + "-788439557611798833"
+ + a
+ + "-1123607703495525944"
+ + a
+ + "-5169936645529424004"
+ + a
+ + "-4732836413189749996"
+ + a
+ + "6316451216750669828"
+ + a
+ + "-5586465654792010636"
+ + a
+ + "-2255003627213419612"
+ + a
+ + "3832664252804128629"
+ + a
+ + "-8179486934051614603"
+ + a
+ + "-66704645845932512"
+ + a
+ + "2891168224812430647"
+ + a
+ + "7343682511706734683"
+ + a
+ + "-4856741064043882673"
+ + a
+ + "3105181221952422798"
+ + a
+ + "-1099474774470322926"
+ + a
+ + "-7184541441405083512"
+ + a
+ + "-7896129042940196797"
+ + a
+ + "-3681692208118084700"
+ + a
+ + "-7509258819912375078"
+ + a
+ + "-8381523365664144601"
+ + a
+ + "-7225732013684948985"
+ + a
+ + "2678475084224492"
+ + a
+ + "-7010181734394821771"
+ + a
+ + "296311055436471362"
+ + a
+ + "-4702143638883053358"
+ + a
+ + "559908477673544980"
+ + a
+ + "8517217626632198543"
+ + a
+ + "-6048186379008685749"
+ + a
+ + "1369684436610985700"
+ + a
+ + "3019156035985140591"
+ + a
+ + "-6834648991262355946"
+ + a
+ + "-4562930321968735852"
+ + a
+ + "-5783944654661391108"
+ + a
+ + "-3024935798314909837"
+ + a
+ + "-5537008782762095937"
+ + a
+ + "-8256796962807994666"
+ + a
+ + "8280182536563837152"
+ + a
+ + "-7995629897164905927"
+ + a
+ + "-2077281075304869761"
+ + a
+ + "-6664775396054401618"
+ + a
+ + "823577603383936985"
+ + a
+ + "-6356046405898429951"
+ + a
+ + "-8623495862025298926"
+ + a
+ + "-2832501372323834341"
+ + a
+ + "-4481796606745599180"
+ + a
+ + "6843605553065863851"
+ + a
+ + "-2581428019573302665"
+ + a
+ + "-4898085659480564734"
+ + a
+ + "-7753556073828498238"
+ + a
+ + "3584727131727095358"
+ + a
+ + "-3832308975071072911"
+ + a
+ + "9140718478884669354"
+ + a
+ + "4412985822617555800"
+ + a
+ + "-5495456985889731227"
+ + a
+ + "7968697975111041032"
+ + a
+ + "5128251690040084032"
+ + a
+ + "-6862414414207627440"
+ + a
+ + "-3006234487295557652"
+ + a
+ + "1324045417801509638"
+ + a
+ + "9219605576569074261"
+ + a
+ + "-715417453106249977"
+ + a
+ + "-6617654008397873848"
+ + a
+ + "4229951799618365819"
+ + a
+ + "231813632375250011"
+ + a
+ + "-5576308538620286115"
+ + a
+ + "155792926466618637"
+ + a
+ + "4836500552335990074"
+ + a
+ + "-1663547996885277909"
+ + a
+ + "-1993180218372871112"
+ + a
+ + "-6473687783379261579"
+ + a
+ + "-7883704607391325351"
+ + a
+ + "6687986130491546753"
+ + a
+ + "3364635474781455617"
+ + a
+ + "4731053967944701408"
+ + a
+ + "5106931322115930293"
+ + a
+ + "2095420057364729214"
+ + a
+ + "1156896580537176357"
+ + a
+ + "-3465259520146717874"
+ + a
+ + "8942297204813033067"
+ + a
+ + "3040683329504834342"
+ + a
+ + "7960068558868562069"
+ + a
+ + "1374491342528201959"
+ + a
+ + "220770130923384416"
+ + a
+ + "-4584976438727763232"
+ + a
+ + "-6069230704051231674"
+ + a
+ + "-8140389424077462925"
+ + a
+ + "7919822713176100795"
+ + a
+ + "-1612055155113080071"
+ + a
+ + "-6162416958187795790"
+ + a
+ + "-4915054237654038814"
+ + a
+ + "-2866828504084776090"
+ + a
+ + "-2938976209207559391"
+ + a
+ + "4467247253829594198"
+ + a
+ + "-4850525891734929210"
+ + a
+ + "-5426296772220968816"
+ + a
+ + "-5186441394167538452"
+ + a
+ + "8794590532854589490"
+ + a
+ + "-6578705991441722668"
+ + a
+ + "4035357871963126061"
+ + a
+ + "-1070129802059123630"
+ + a
+ + "3921226994129637452"
+ + a
+ + "3722734392905978983"
+ + a
+ + "-5956139048691736972"
+ + a
+ + "8416144324331798575"
+ + a
+ + "-1923420510655314387"
+ + a
+ + "227615271206429181"
+ + a
+ + "2226209514116787552"
+ + a
+ + "8297056456961422020"
+ + a
+ + "-8359499256195569822"
+ + a
+ + "5576341039369051576"
+ + a
+ + "4702120714246748976"
+ + a
+ + "-4042574530811250124"
+ + a
+ + "5083076081415490044"
+ + a
+ + "-3219070452310786083"
+ + a
+ + "9106311493699607016"
+ + a
+ + "6241102595154319624"
+ + a
+ + "4669706243845736720"
+ + a
+ + "-1520829982172760232"
+ + a
+ + "5889904275233942734"
+ + a
+ + "-68294517832626517"
+ + a
+ + "8638744614373433656"
+ + a
+ + "7567202626162399799"
+ + a
+ + "-1964780367369499411"
+ + a
+ + "-999558730666848273"
+ + a
+ + "-1669144135230350063"
+ + a
+ + "-1242209923845724629"
+ + a
+ + "-39031062552363627"
+ + a
+ + "-633233388401520761"
+ + a
+ + "744323104049287611"
+ + a
+ + "2014860468464161034"
+ + a
+ + "-1193284554157526823"
+ + a
+ + "-6855964882992540021"
+ + a
+ + "-8036572965809837220"
+ + a
+ + "5547258320624838991"
+ + a
+ + "-361938219569996785"
+ + a
+ + "-8704235972253373193"
+ + a
+ + "-9003427919587620451"
+ + a
+ + "-3130703444561361256"
+ + a
+ + "6132231206933208148"
+ + a
+ + "6749398961654190635"
+ + a
+ + "-6925034059616949205"
+ + a
+ + "1571738287308720679"
+ + a
+ + "5431255372312963846"
+ + a
+ + "2347890316226708844"
+ + a
+ + "-2587017991946539209"
+ + a
+ + "9080522648955318115"
+ + a
+ + "-7782900851433774520"
+ + a
+ + "-6414286033878819230"
+ + a
+ + "-7471905833427183625"
+ + a
+ + "2344443512917666900"
+ + a
+ + "4030672884858720641"
+ + a
+ + "-7228311107668937320"
+ + a
+ + "-4225049585365454557"
+ + a
+ + "-6696854441560120790"
+ + a
+ + "-7915428687108202019"
+ + a
+ + "4633264419167771904"
+ + a
+ + "-4039899830387050632"
+ + a
+ + "4267398965683805622"
+ + a
+ + "4751252376443669194"
+ + a
+ + "7198205969788397676"
+ + a
+ + "7129010695954880057"
+ + a
+ + "-5046741236772984850"
+ + a
+ + "-4893430234027272579"
+ + a
+ + "-6455089705569729002"
+ + a
+ + "5902751572800271273"
+ + a
+ + "317847978001983086"
+ + a
+ + "6591677451518621291"
+ + a
+ + "8725653562600482585"
+ + a
+ + "-8811453516738818670"
+ + a
+ + "-1937983213300134926"
+ + a
+ + "8001111295566882768"
+ + a
+ + "5432568004739151861"
+ + a
+ + "2808858632003233217"
+ + a
+ + "-3187854607564760867"
+ + a
+ + "-4004527449867163605"
+ + a
+ + "-336181840705754865"
+ + a
+ + "-7246637421972455801"
+ + a
+ + "3241758430536346550"
+ + a
+ + "-4914749815050143296"
+ + a
+ + "-1212912223502301394"
+ + a
+ + "-3749450625260640454"
+ + a
+ + "6243151812487782821"
+ + a
+ + "6226970592369211413"
+ + a
+ + "3870468034484872191"
+ + a
+ + "-3248010484204365646"
+ + a
+ + "8695259523944941306"
+ + a
+ + "-3520121047936500619"
+ + a
+ + "-6202360059242836333"
+ + a
+ + "804974149902754252"
+ + a
+ + "-4201170229733288025"
+ + a
+ + "-2814614190330637712"
+ + a
+ + "6732531893826755548"
+ + a
+ + "3587696942827103210"
+ + a
+ + "-3914504395162054719"
+ + a
+ + "-8295349942655173543"
+ + a
+ + "9016555458455142195"
+ + a
+ + "-1330972165973762190"
+ + a
+ + "-2857642318211707901"
+ + a
+ + "1621441195752982471"
+ + a
+ + "8796740055346885333"
+ + a
+ + "-7469350179954618293"
+ + a
+ + "-9198507324056667574"
+ + a
+ + "3050171288568508948"
+ + a
+ + "-9202985112142352287"
+ + a
+ + "-7450147356246173085"
+ + a
+ + "-2650046968714225126"
+ + a
+ + "-7791493787770037023"
+ + a
+ + "3177967838851086684"
+ + a
+ + "-1087350519511644629"
+ + a
+ + "-5933630645292757737"
+ + a
+ + "-3057634277369326960"
+ + a
+ + "-117101563851313235"
+ + a
+ + "-1264847152478417639"
+ + a
+ + "-8169210788366092403"
+ + a
+ + "-1556957540384449847"
+ + a
+ + "5079856129131839009"
+ + a
+ + "537009568676640293"
+ + a
+ + "-5226270953762115350"
+ + a
+ + "-5324199301103706379"
+ + a
+ + "1804591847796379880"
+ + a
+ + "879735902087758412"
+ + a
+ + "-5630733783825054658"
+ + a
+ + "-7610082778137157946"
+ + a
+ + "8119553100633562646"
+ + a
+ + "-4142666375828182767"
+ + a
+ + "-3150914012657811262"
+ + a
+ + "-3152263088065891155"
+ + a
+ + "-4147965428223902173"
+ + a
+ + "336844704958883063"
+ + a
+ + "6955766203242207822"
+ + a
+ + "7683778390826560099"
+ + a
+ + "5014524116896306283"
+ + a
+ + "-2992139592508518392"
+ + a
+ + "2544694784394516960"
+ + a
+ + "-5480878629851767455"
+ + a
+ + "4522873847351478191"
+ + a
+ + "8326626511086571601"
+ + a
+ + "-6422801033021366756"
+ + a
+ + "1578678540985889639"
+ + a
+ + "-6559866042619753837"
+ + a
+ + "-2578877569999104925"
+ + a
+ + "7368303770053372871"
+ + a
+ + "-5747703212301246727"
+ + a
+ + "3357596325498795038"
+ + a
+ + "-4133533100284207148"
+ + a
+ + "-1015951027680129461"
+ + a
+ + "7467490110644909021"
+ + a
+ + "3158855981736880188"
+ + a
+ + "-3172906774568163396"
+ + a
+ + "-6828938093617592265"
+ + a
+ + "7233629791141415838"
+ + a
+ + "4812403726420496447"
+ + a
+ + "6467043740588425016"
+ + a
+ + "4659999192592765884"
+ + a
+ + "4652951018723752460"
+ + a
+ + "666208123998413658"
+ + a
+ + "5018988295449121771"
+ + a
+ + "2765215723643073329"
+ + a
+ + "-5805565308999822918"
+ + a
+ + "-2076549345780039899"
+ + a
+ + "-4426400335663121800"
+ + a
+ + "4275608708948464015"
+ + a
+ + "6675022547067205759"
+ + a
+ + "-6621196489948540900"
+ + a
+ + "5722802855070403337"
+ + a
+ + "-3327707032135994635"
+ + a
+ + "2262928498967088118"
+ + a
+ + "3530071204065036832"
+ + a
+ + "-1638714306566451765"
+ + a
+ + "-7690788209354558171"
+ + a
+ + "7113955705845913085"
+ + a
+ + "-4081197284015476492"
+ + a
+ + "-4353435977967011984"
+ + a
+ + "8870894978912968709"
+ + a
+ + "-3378124121881489095"
+ + a
+ + "-7072527214702087999"
+ + a
+ + "-3826738314876308053"
+ + a
+ + "6851749976613062176"
+ + a
+ + "-1750785357222691439"
+ + a
+ + "5276086865661363858"
+ + a
+ + "-2963967637668099145"
+ + a
+ + "-2226482578674911965"
+ + a
+ + "1262913202855543983"
+ + a
+ + "-5719872184568399655"
+ + a
+ + "200057904572055249"
+ + a
+ + "3289053279870908000"
+ + a
+ + "5864930648060653187"
+ + a
+ + "7113948028888391656"
+ + a
+ + "2015505708560011961"
+ + a
+ + "-7688130328085946546"
+ + a
+ + "5595350336910484927"
+ + a
+ + "-3684238588780478855"
+ + a
+ + "8613416584425920054"
+ + a
+ + "4249559202049962502"
+ + a
+ + "-4129474140910318501"
+ + a
+ + "3202291309460908583"
+ + a
+ + "-3928494809434341489"
+ + a
+ + "-6076283274923897400"
+ + a
+ + "2169394210116526098"
+ + a
+ + "1301281724191196147"
+ + a
+ + "-3958391744948119278"
+ + a
+ + "-1860291525879287948"
+ + a
+ + "-7367822264979394844"
+ + a
+ + "-766202970211237697"
+ + a
+ + "-8712119674703561328"
+ + a
+ + "3736413026361360914"
+ + a
+ + "8876590410660191123"
+ + a
+ + "-6382124384610352682"
+ + a
+ + "6651183499700364511"
+ + a
+ + "3984890132222164810"
+ + a
+ + "-2794025605547462106"
+ + a
+ + "7570641472538557794"
+ + a
+ + "4552556182522839127"
+ + a
+ + "-4548338499653656596"
+ + a
+ + "7388941229386075240"
+ + a
+ + "692547794703939317"
+ + a
+ + "2436692756551067478"
+ + a
+ + "5482475673724460138"
+ + a
+ + "-748428287238371735"
+ + a
+ + "-5046147474484082687"
+ + a
+ + "-5645192179964259396"
+ + a
+ + "-8910889623475454631"
+ + a
+ + "-7535738450330975492"
+ + a
+ + "3379953857191884896"
+ + a
+ + "8375308725109206639"
+ + a
+ + "-3259253628170470412"
+ + a
+ + "-6364776491423973320"
+ + a
+ + "4966967577296742092"
+ + a
+ + "-4235437682144171048"
+ + a
+ + "-4470283232421596519"
+ + a
+ + "-684373034549167112"
+ + a
+ + "-7544358005155380888"
+ + a
+ + "-6089672722052548507"
+ + a
+ + "-592422057867469495"
+ + a
+ + "-8870281455177471909"
+ + a
+ + "7127816281889312309"
+ + a
+ + "-3179360379771308795"
+ + a
+ + "-6866650128224703956"
+ + a
+ + "-698801804772675516"
+ + a
+ + "-7121841945155861602"
+ + a
+ + "4750365137868030895"
+ + a
+ + "7738153537752652299"
+ + a
+ + "-1216300091806872614"
+ + a
+ + "6771372917205053677"
+ + a
+ + "8056989338981147611"
+ + a
+ + "-7044136404236635947"
+ + a
+ + "1524250009079309577"
+ + a
+ + "-7230380836977314093"
+ + a
+ + "-6328397610668843257"
+ + a
+ + "7230102557130438170"
+ + a
+ + "5484760717538397184"
+ + a
+ + "-4732383013272760348"
+ + a
+ + "6744415428010607923"
+ + a
+ + "3022090164560283027"
+ + a
+ + "1568643906810575794"
+ + a
+ + "-4622791717852927720"
+ + a
+ + "2660468600538675557"
+ + a
+ + "-4294780086359953512"
+ + a
+ + "-5594348200211861931"
+ + a
+ + "7259557701039606348"
+ + a
+ + "-4560711143417983449"
+ + a
+ + "3190332956225415592"
+ + a
+ + "-4944263905951727131"
+ + a
+ + "-7385385614052438337"
+ + a
+ + "6733540044280164868"
+ + a
+ + "-4331161235831157019"
+ + a
+ + "8634623412407676066"
+ + a
+ + "2815941638062550421"
+ + a
+ + "-5232679099207881714"
+ + a
+ + "9202366913391292565"
+ + a
+ + "1619237350162891149"
+ + a
+ + "-4564477822700236200"
+ + a
+ + "7208442585339078747"
+ + a
+ + "-3950616628069894494"
+ + a
+ + "5754703381790672111"
+ + a
+ + "-2018876234266819215"
+ + a
+ + "-2103659793485769597"
+ + a
+ + "-6916752526519644133"
+ + a
+ + "-5834005017330986797"
+ + a
+ + "2648524451218973875"
+ + a
+ + "7580548958796221476"
+ + a
+ + "5839987782269727665"
+ + a
+ + "-1935092394547033721"
+ + a
+ + "4819296501593189329"
+ + a
+ + "-7449320539156769442"
+ + a
+ + "1515981491563393083"
+ + a
+ + "1837234754028675615"
+ + a
+ + "-2691299151050994461"
+ + a
+ + "7834035250536263000"
+ + a
+ + "947382469723180338"
+ + a
+ + "2070628618009620722"
+ + a
+ + "-7701999848196581146"
+ + a
+ + "-4989233495601617735"
+ + a
+ + "6771060135514012470"
+ + a
+ + "-4386300160537078757"
+ + a
+ + "9092560637994350648"
+ + a
+ + "-8393149325636269009"
+ + a
+ + "-7113205208559790969"
+ + a
+ + "8011664749276243449"
+ + a
+ + "-8266196281237589216"
+ + a
+ + "8259712846621683948"
+ + a
+ + "7059975912623943052"
+ + a
+ + "223293421261472175"
+ + a
+ + "8973572126931896900"
+ + a
+ + "-4078694841056319197"
+ + a
+ + "-8595306693898275504"
+ + a
+ + "340597839860111269"
+ + a
+ + "-4480614924930277584"
+ + a
+ + "5517819178252021904"
+ + a
+ + "-6096927906070665728"
+ + a
+ + "-4822198221110160891"
+ + a
+ + "-2577002508408181546"
+ + a
+ + "7315528082960323822"
+ + a
+ + "6657773545505244526"
+ + a
+ + "-9111063062018438849"
+ + a
+ + "3439200446592946185"
+ + a
+ + "8124115377302205054"
+ + a
+ + "-990430432747932271"
+ + a
+ + "2480444268192630917"
+ + a
+ + "6336395495152050177"
+ + a
+ + "4671803505031381126"
+ + a
+ + "1380595797077890307"
+ + a
+ + "-5823356456068914608"
+ + a
+ + "3643552808887949018"
+ + a
+ + "-705654815289741872"
+ + a
+ + "-4942555973230170239"
+ + a
+ + "6841175442962388185"
+ + a
+ + "-2247742565737854444"
+ + a
+ + "-5965872412923179737"
+ + a
+ + "3233876736034274927"
+ + a
+ + "8059548267812355744"
+ + a
+ + "-6442795951984446700"
+ + a
+ + "-8254441926716747299"
+ + a
+ + "1221578904699451729"
+ + a
+ + "4484393240198177513"
+ + a
+ + "-2470934872280561758"
+ + a
+ + "-4000515761544913848"
+ + a
+ + "1841312402397132371"
+ + a
+ + "-6266121333022015942"
+ + a
+ + "3036409269701812841"
+ + a
+ + "-59909522137328064"
+ + a
+ + "-7406201526142657853"
+ + a
+ + "1630047227661167327"
+ + a
+ + "-4897993438023877765"
+ + a
+ + "6219253283169460131"
+ + a
+ + "-2495741112802518127"
+ + a
+ + "1302756514188318054"
+ + a
+ + "-5533782832811642678"
+ + a
+ + "4354798003992578770"
+ + a
+ + "-7986677467980853803"
+ + a
+ + "-8744988257359396573"
+ + a
+ + "-6397501769218728272"
+ + a
+ + "-8947660384927553231"
+ + a
+ + "1346216959820138313"
+ + a
+ + "1425398524283165869"
+ + a
+ + "-1283087607147001752"
+ + a
+ + "-206913821141456982"
+ + a
+ + "8014851305433763531"
+ + a
+ + "-3306492978461841825"
+ + a
+ + "8939538755388149906"
+ + a
+ + "3470041899206769451"
+ + a
+ + "-5835062378542834467"
+ + a
+ + "2752364486063988952"
+ + a
+ + "1939934425938166195"
+ + a
+ + "3008044486201466147"
+ + a
+ + "3722009335165103141"
+ + a
+ + "-1454123726393059460"
+ + a
+ + "5521045270087722675"
+ + a
+ + "-7584468636879988727"
+ + a
+ + "3455604157334575597"
+ + a
+ + "6444214822533935856"
+ + a
+ + "6685753141598286685"
+ + a
+ + "-8249605279529950251"
+ + a
+ + "-6108157385140562268"
+ + a
+ + "8698570457891691937"
+ + a
+ + "712682936770346210"
+ + a
+ + "8683885651874370181"
+ + a
+ + "1511630497269458523"
+ + a
+ + "-681331991295002562"
+ + a
+ + "-5538407606653779370"
+ + a
+ + "-8225676124935582566"
+ + a
+ + "2992867944170172744"
+ + a
+ + "6467556416530619962"
+ + a
+ + "2894317729672299826"
+ + a
+ + "2367294768805338520"
+ + a
+ + "-3795911641430219706"
+ + a
+ + "7315593747565738571"
+ + a
+ + "1073925020137124304"
+ + a
+ + "-2009620617725341558"
+ + a
+ + "9192484969344016724"
+ + a
+ + "-8555372001436210450"
+ + a
+ + "5988230853661579250"
+ + a
+ + "-2058267483034575749"
+ + a
+ + "8122930851637461010"
+ + a
+ + "-4226809344373377312"
+ + a
+ + "4203514443098305340"
+ + a
+ + "-7584642885221900035"
+ + a
+ + "3741247320369290823"
+ + a
+ + "6409416416737382822"
+ + a
+ + "-8756241943904648267"
+ + a
+ + "-1162965036863622490"
+ + a
+ + "1309747872651362397"
+ + a
+ + "-2083806146045300730"
+ + a
+ + "-8644749146832603574"
+ + a
+ + "-5860595045064427633"
+ + a
+ + "4705270308983783907"
+ + a
+ + "6728325949665520780"
+ + a
+ + "2355167571219782987"
+ + a
+ + "-7485062256841845804"
+ + a
+ + "5444171101615347210"
+ + a
+ + "9018416163053665286"
+ + a
+ + "9087649652391753964"
+ + a
+ + "7355274780617434646"
+ + a
+ + "-2263053130520029143"
+ + a
+ + "-7771114517872233976"
+ + a
+ + "-4333605022901923898"
+ + a
+ + "7416196136755926012"
+ + a
+ + "7874945996172274746"
+ + a
+ + "-29647836685576855"
+ + a
+ + "-961434168856881325"
+ + a
+ + "-3639241545807632723"
+ + a
+ + "2546758658973642586"
+ + a
+ + "-7953791153076501308"
+ + a
+ + "1931422568598613109"
+ + a
+ + "-6717842740108986537"
+ + a
+ + "-8291630841266816948"
+ + a
+ + "2765890591673690873"
+ + a
+ + "5638615108868643823"
+ + a
+ + "2610285609096522668"
+ + a
+ + "7182053208700872695"
+ + a
+ + "-4387966805233548375"
+ + a
+ + "-2987355674746176789"
+ + a
+ + "1944114521650872928"
+ + a
+ + "2716385647022901732"
+ + a
+ + "3672937770299043773"
+ + a
+ + "-1596838794080989326"
+ + a
+ + "6994512773580910508"
+ + a
+ + "-3554310089091955519"
+ + a
+ + "1355466662459087327"
+ + a
+ + "8762632012749605111"
+ + a
+ + "6587327856302852558"
+ + a
+ + "3311118198598392544"
+ + a
+ + "-6793004875159213313"
+ + a
+ + "-4848547389526226739"
+ + a
+ + "-6311353038235974265"
+ + a
+ + "-8195505362848449864"
+ + a
+ + "8808125456239414991"
+ + a
+ + "-4177775909520246100"
+ + a
+ + "-6619635425075002725"
+ + a
+ + "-4132694774520176797"
+ + a
+ + "-8317158135140825016"
+ + a
+ + "-3478442824038580944"
+ + a
+ + "-6007598038909081516"
+ + a
+ + "6302404450442477855"
+ + a
+ + "5778955250949510691"
+ + a
+ + "-2089763170261427622"
+ + a
+ + "4741409635703394816"
+ + a
+ + "-1604648981138860594"
+ + a
+ + "2858368262704801633"
+ + a
+ + "3077936222317121549"
+ + a
+ + "3876636234691611503"
+ + a
+ + "7072310780592103797"
+ + a
+ + "6875717807996264388"
+ + a
+ + "-8119373122628671342"
+ + a
+ + "2592321197819846005"
+ + a
+ + "-4865044565472487744"
+ + a
+ + "370243778170973267"
+ + a
+ + "3538560122812949268"
+ + a
+ + "5604800454296726126"
+ + a
+ + "1099039521029719933"
+ + a
+ + "1347625018260219866"
+ + a
+ + "-760735066813486043"
+ + a
+ + "-3588040698066642251"
+ + a
+ + "7697720740645299484"
+ + a
+ + "932557864155975527"
+ + a
+ + "-6719149903083035080"
+ + a
+ + "-3632384404564322005"
+ + a
+ + "-4437288996570214090"
+ + a
+ + "4876681836482086607"
+ + a
+ + "-700013811510345180"
+ + a
+ + "68286250809712567"
+ + a
+ + "-5723038568786969085"
+ + a
+ + "6180096348459871527"
+ + a
+ + "-5336303492423424089"
+ + a
+ + "5268064677773382592"
+ + a
+ + "-5468221560993276190"
+ + a
+ + "8728616035972006219"
+ + a
+ + "-18735560580305439"
+ + a
+ + "-5237022430459186507"
+ + a
+ + "8477647565196617941"
+ + a
+ + "5477971880707102298"
+ + a
+ + "-25742072802303019"
+ + a
+ + "-7628253021115937147"
+ + a
+ + "-4527455294363884798"
+ + a
+ + "-6779159922670200777"
+ + a
+ + "-4332755792343947029"
+ + a
+ + "6246992222472870439"
+ + a
+ + "2466686335846188851"
+ + a
+ + "-3176660018221785078"
+ + a
+ + "2227603986683319665"
+ + a
+ + "7764675382631007764"
+ + a
+ + "8993875510396531287"
+ + a
+ + "-7390864096506767171"
+ + a
+ + "7337153217923216149"
+ + a
+ + "3248867097428978888"
+ + a
+ + "-8078994459496454913"
+ + a
+ + "6023362300574921600"
+ + a
+ + "6957790098961696109"
+ + a
+ + "-2951896231335096508"
+ + a
+ + "730304460660495330"
+ + a
+ + "192254390069636166"
+ + a
+ + "-1049566252317531537"
+ + a
+ + "-7248026460359122545"
+ + a
+ + "-4856240343559698343"
+ + a
+ + "-3288455520075047354"
+ + a
+ + "-3462385567291090183"
+ + a
+ + "-9076025559385888976"
+ + a
+ + "-9080194978079616797"
+ + a
+ + "5107397421493446778"
+ + a
+ + "3642195766291641162"
+ + a
+ + "-8607615188211212362"
+ + a
+ + "-6565851555561356894"
+ + a
+ + "-7348624522328956381"
+ + a
+ + "7643434229912546183"
+ + a
+ + "736968235053630257"
+ + a
+ + "-1558131958624533283"
+ + a
+ + "-4267365336994799805"
+ + a
+ + "4685285441925601335"
+ + a
+ + "-417452777611981130"
+ + a
+ + "-1612672569043764356"
+ + a
+ + "518118522100466977"
+ + a
+ + "7477758616731323079"
+ + a
+ + "-2084762027578400546"
+ + a
+ + "308555469435645327"
+ + a
+ + "9031665960208658121"
+ + a
+ + "6230664225124256264"
+ + a
+ + "-1102830740815288761"
+ + a
+ + "2817926313141144264"
+ + a
+ + "8490820541726712201"
+ + a
+ + "-3156215760262899028"
+ + a
+ + "-9071289492098116078"
+ + a
+ + "8425910717564713723"
+ + a
+ + "-3806622682195406474"
+ + a
+ + "-4420283133736675380"
+ + a
+ + "-2130571006470095261"
+ + a
+ + "2440746963483934373"
+ + a
+ + "8556899456135230949"
+ + a
+ + "-1985525364566697115"
+ + a
+ + "-3365400095873163035"
+ + a
+ + "1119910485872254819"
+ + a
+ + "-1046656997374317070"
+ + a
+ + "1415882540628621014"
+ + a
+ + "8383333511655382851"
+ + a
+ + "3352737800845652086"
+ + a
+ + "-4956645021080570628"
+ + a
+ + "-4221159765757641885"
+ + a
+ + "2639365141465593776"
+ + a
+ + "4935151287859683142"
+ + a
+ + "-8102019963811174617"
+ + a
+ + "-4133912392369401163"
+ + a
+ + "5480446863201440096"
+ + a
+ + "8759003265342329820"
+ + a
+ + "7180798877987804633"
+ + a
+ + "-3106517939429595304"
+ + a
+ + "3471288105411959053"
+ + a
+ + "-363148694271843994"
+ + a
+ + "5042344163278449725"
+ + a
+ + "1616698931072621884"
+ + a
+ + "1797865194247105907"
+ + a
+ + "1444037657274074806"
+ + a
+ + "-7029718486968835133"
+ + a
+ + "8844266795997125173"
+ + a
+ + "-4944651518545568813"
+ + a
+ + "6487964973590478532"
+ + a
+ + "1886109974317222046"
+ + a
+ + "-4842848483402883461"
+ + a
+ + "3531122380482669684"
+ + a
+ + "-1558709588580146904"
+ + a
+ + "-4342403627297550780"
+ + a
+ + "1689103941253311787"
+ + a
+ + "1061199116206243613"
+ + a
+ + "5061874826462778016"
+ + a
+ + "7334887834022786034"
+ + a
+ + "-4953914412460735293"
+ + a
+ + "6809021047861032861"
+ + a
+ + "711439222068774288"
+ + a
+ + "6586553718450977062"
+ + a
+ + "-4848541873011906646"
+ + a
+ + "6392546595089496644"
+ + a
+ + "-7454402105323812227"
+ + a
+ + "6808280476233343523"
+ + a
+ + "-9163248863081859930"
+ + a
+ + "-4935115052088543129"
+ + a
+ + "-2707173481561263983"
+ + a
+ + "-5040722886254228368"
+ + a
+ + "-6529198091145506973"
+ + a
+ + "-8707423069418058529"
+ + a
+ + "6038039841022866971"
+ + a
+ + "-8982004619693436071"
+ + a
+ + "99422527511009523"
+ + a
+ + "-5165864716533667702"
+ + a
+ + "3531760248632559884"
+ + a
+ + "2453964053489566829"
+ + a
+ + "-6810009552064415671"
+ + a
+ + "5897335478825586377"
+ + a
+ + "6746492442484332410"
+ + a
+ + "9002181253533066238"
+ + a
+ + "-7812070282260401475"
+ + a
+ + "-6234637736823676415"
+ + a
+ + "6931601391561453600"
+ + a
+ + "-7651946779799617116"
+ + a
+ + "-1476679763922561909"
+ + a
+ + "8319727058209931290"
+ + a
+ + "9211601851260334812"
+ + a
+ + "4380122268541574330"
+ + a
+ + "-6141835365182903981"
+ + a
+ + "8859095374016622339"
+ + a
+ + "-6080848116160933583"
+ + a
+ + "-4043345743566579489"
+ + a
+ + "2007464217689982107"
+ + a
+ + "5615227751077173548"
+ + a
+ + "-5247506120933105981"
+ + a
+ + "7613105194332406391"
+ + a
+ + "-4518167165425198520"
+ + a
+ + "7264351302739188234"
+ + a
+ + "-4369130358793113123"
+ + a
+ + "-2996862511695551704"
+ + a
+ + "3429626022551086889"
+ + a
+ + "8574417589664275094"
+ + a
+ + "1485655701114573806"
+ + a
+ + "7290363364964116061"
+ + a
+ + "633425129373641068"
+ + a
+ + "-4682720896109445682"
+ + a
+ + "3199403151033991687"
+ + a
+ + "-4725352862128009786"
+ + a
+ + "-2935010460126746329"
+ + a
+ + "-1571339865719136973"
+ + a
+ + "-5327135494658638497"
+ + a
+ + "8662308269909751254"
+ + a
+ + "-5408996137996185392"
+ + a
+ + "5822097627997115722"
+ + a
+ + "-4985750595042038833"
+ + a
+ + "-5449287288045688252"
+ + a
+ + "-9005565456474303035"
+ + a
+ + "-2513523367955029477"
+ + a
+ + "-7237889187143268265"
+ + a
+ + "-955049681514771829"
+ + a
+ + "-715290057971470138"
+ + a
+ + "-5112632449472312395"
+ + a
+ + "-8999368014349704297"
+ + a
+ + "-3553787458899280279"
+ + a
+ + "-2242033452520855946"
+ + a
+ + "8288454840875082408"
+ + a
+ + "6759946808749896791"
+ + a
+ + "5499698313251322468"
+ + a
+ + "-543042823206248483"
+ + a
+ + "-3716280375908332407"
+ + a
+ + "-1767850440715110401"
+ + a
+ + "-5812090670386736064"
+ + a
+ + "-4448772542800653592"
+ + a
+ + "-3691411356019826575"
+ + a
+ + "821418385527481119"
+ + a
+ + "-7917444741151119478"
+ + a
+ + "9025312584318696168"
+ + a
+ + "457131154694574975"
+ + a
+ + "-6494407505970093591"
+ + a
+ + "1848951345003203089"
+ + a
+ + "-7088652100860042993"
+ + a
+ + "3607909891740382545"
+ + a
+ + "-5678294653111490382"
+ + a
+ + "-5795543117613854617"
+ + a
+ + "-2151575121446292234"
+ + a
+ + "7620964843728469135"
+ + a
+ + "884290653714224245"
+ + a
+ + "-6843277283286932892"
+ + a
+ + "2408695048027763994"
+ + a
+ + "5842614161247609697"
+ + a
+ + "6010166672575060815"
+ + a
+ + "6812469602680659875"
+ + a
+ + "-5997140003653359782"
+ + a
+ + "7985395093919912947"
+ + a
+ + "-5213351642343076604"
+ + a
+ + "-2464006694883863548"
+ + a
+ + "-8272827464694685317"
+ + a
+ + "-3362460353719917320"
+ + a
+ + "6627775285154308985"
+ + a
+ + "-3736521844071744472"
+ + a
+ + "-1239142425696476764"
+ + a
+ + "-2717329470631008732"
+ + a
+ + "-9002493101279878344"
+ + a
+ + "-3081549338662512136"
+ + a
+ + "-4192120168253245726"
+ + a
+ + "-5262450888373666639"
+ + a
+ + "-4359619098442462225"
+ + a
+ + "4545309526212303135"
+ + a
+ + "1706751050568448421"
+ + a
+ + "-7215605223506374693"
+ + a
+ + "-8384613778406303503"
+ + a
+ + "-9115598915407494261"
+ + a
+ + "6493557840925709377"
+ + a
+ + "6002444260666557796"
+ + a
+ + "8757276082417258931"
+ + a
+ + "5517276445381297648"
+ + a
+ + "659854512378354543"
+ + a
+ + "1171949515664870929"
+ + a
+ + "7962665662827588176"
+ + a
+ + "-6428441354297408443"
+ + a
+ + "-1407303201060735287"
+ + a
+ + "-4630527955770637782"
+ + a
+ + "-3356564721964583930"
+ + a
+ + "7557293222167592516"
+ + a
+ + "-8976462499445679791"
+ + a
+ + "4913334300847132158"
+ + a
+ + "2715824074188316087"
+ + a
+ + "7098688088987829230"
+ + a
+ + "-5274733612517799445"
+ + a
+ + "2306144525447966301"
+ + a
+ + "-539171553148664727"
+ + a
+ + "-2276057022041114107"
+ + a
+ + "4472359697252482014"
+ + a
+ + "1517895533819116828"
+ + a
+ + "2952915317797409734"
+ + a
+ + "2416809354563825297"
+ + a
+ + "2136737984086357846"
+ + a
+ + "2932202033487269269"
+ + a
+ + "-4978515174981634403"
+ + a
+ + "-8763651883011539620"
+ + a
+ + "4799662088047448549"
+ + a
+ + "5524894362826545444"
+ + a
+ + "-5208901486068361377"
+ + a
+ + "-1547410064372038538"
+ + a
+ + "-8679851852185635074"
+ + a
+ + "-6401793263036105813"
+ + a
+ + "1985033060226478242"
+ + a
+ + "-6482220174980880207"
+ + a
+ + "6762019587712483449"
+ + a
+ + "1480525796015390734"
+ + a
+ + "8108723650031480226"
+ + a
+ + "2978843720351459877"
+ + a
+ + "-1336081875989930222"
+ + a
+ + "556688536962464952"
+ + a
+ + "-8872538052181681477"
+ + a
+ + "255278049706330286"
+ + a
+ + "-4841349086783434006"
+ + a
+ + "6790383796723089429"
+ + a
+ + "-7198580012715268624"
+ + a
+ + "7533854893267875945"
+ + a
+ + "-2767027533395577852"
+ + a
+ + "1674612631113288982"
+ + a
+ + "-7576984746517155992"
+ + a
+ + "-481457683325295045"
+ + a
+ + "758818546926160585"
+ + a
+ + "2117683637265311664"
+ + a
+ + "-3476219835082397205"
+ + a
+ + "-6484741587933492150"
+ + a
+ + "-3940875002536970107"
+ + a
+ + "9002040825213956445"
+ + a
+ + "-2917174987364332695"
+ + a
+ + "-66727676135893375"
+ + a
+ + "-6674337036793155609"
+ + a
+ + "8118072832569742745"
+ + a
+ + "-3664957541486359181"
+ + a
+ + "3419614972338034449"
+ + a
+ + "2824903256761154949"
+ + a
+ + "-6225521424818911642"
+ + a
+ + "-3824663404241060416"
+ + a
+ + "2835358670736706282"
+ + a
+ + "-5533635873640849322"
+ + a
+ + "1617737717408188617"
+ + a
+ + "-4342543362518212950"
+ + a
+ + "3769111142858305094"
+ + a
+ + "5945502355322974774"
+ + a
+ + "4120872397983584586"
+ + a
+ + "4003174987165865902"
+ + a
+ + "6964706800478134559"
+ + a
+ + "5993470215902535781"
+ + a
+ + "-3857502962439131016"
+ + a
+ + "6443524725591602672"
+ + a
+ + "8748264180145478580"
+ + a
+ + "7538036956928816136"
+ + a
+ + "257424971305193315"
+ + a
+ + "-7190236128509444940"
+ + a
+ + "-8704789362619223288"
+ + a
+ + "-270038105961354585"
+ + a
+ + "7574705795800529952"
+ + a
+ + "2228596148561184230"
+ + a
+ + "-2598750511091798685"
+ + a
+ + "-4195006584725201235"
+ + a
+ + "6470237484799739465"
+ + a
+ + "2042088550081344147"
+ + a
+ + "-7770224872565971249"
+ + a
+ + "-2058622155715559444"
+ + a
+ + "-738640071637619846"
+ + a
+ + "6143958792144726894"
+ + a
+ + "-8044362213379668580"
+ + a
+ + "8224887012855159830"
+ + a
+ + "3209854232446227413"
+ + a
+ + "7478149109097640268"
+ + a
+ + "8619347318797205212"
+ + a
+ + "1488851936360789829"
+ + a
+ + "-2257801310284603777"
+ + a
+ + "2961907687413792168"
+ + a
+ + "5367228619753286376"
+ + a
+ + "-1167042234202606476"
+ + a
+ + "1803394380188483105"
+ + a
+ + "7136307422837830432"
+ + a
+ + "7632179788793817561"
+ + a
+ + "7023944626199186947"
+ + a
+ + "3029221576998905191"
+ + a
+ + "-3954742339958497802"
+ + a
+ + "-4932533517651240945"
+ + a
+ + "2249675176414142007"
+ + a
+ + "-7414865112301845628"
+ + a
+ + "-7714577080262540145"
+ + a
+ + "-4483412957955698002"
+ + a
+ + "8669699406632040375"
+ + a
+ + "4510253243393872045"
+ + a
+ + "-270125992295806985"
+ + a
+ + "1400099911585106972"
+ + a
+ + "3368608011643162128"
+ + a
+ + "-3186327211102508391"
+ + a
+ + "-7004808457975131044"
+ + a
+ + "-7215067159615180667"
+ + a
+ + "-5075493924283306445"
+ + a
+ + "-6114237907724615416"
+ + a
+ + "2088154268915196303"
+ + a
+ + "8209387529276365399"
+ + a
+ + "-3861942433898838286"
+ + a
+ + "-3813120950568086983"
+ + a
+ + "4896163299838231430"
+ + a
+ + "-2234054304997173562"
+ + a
+ + "-6969473690113031802"
+ + a
+ + "287032981324281713"
+ + a
+ + "-7026687415196300579"
+ + a
+ + "8437788536412928585"
+ + a
+ + "59519871571995148"
+ + a
+ + "-2007111664379543173"
+ + a
+ + "-4187774861098453680"
+ + a
+ + "8637401319054574875"
+ + a
+ + "-3700805565304526845"
+ + a
+ + "-7131960406437337821"
+ + a
+ + "-9164692797770846654"
+ + a
+ + "5886254500269905851"
+ + a
+ + "-7894830705315346737"
+ + a
+ + "484964917021538234"
+ + a
+ + "-7374162993396474055"
+ + a
+ + "-5804543483427702932"
+ + a
+ + "1879617763117321785"
+ + a
+ + "-1162861953767998571"
+ + a
+ + "6410937909461127263"
+ + a
+ + "2496574133855806134"
+ + a
+ + "-6930597241031595282"
+ + a
+ + "-3385347474182226802"
+ + a
+ + "-4906421813540775677"
+ + a
+ + "3376509800070706659"
+ + a
+ + "3685761347281413883"
+ + a
+ + "-3703605717022933887"
+ + a
+ + "-3317209424191430634"
+ + a
+ + "6680165104107806595"
+ + a
+ + "-1421152020715589033"
+ + a
+ + "-7151394767920287792"
+ + a
+ + "2896824926148914351"
+ + a
+ + "-583404044349217560"
+ + a
+ + "-7275827201673200806"
+ + a
+ + "-5581728992629175840"
+ + a
+ + "-3759399463589837177"
+ + a
+ + "-7851071796689193301"
+ + a
+ + "2999247104082515774"
+ + a
+ + "5959438451429054874"
+ + a
+ + "4102208806599304830"
+ + a
+ + "5269187542287488293"
+ + a
+ + "3228944852182629029"
+ + a
+ + "-1321932716017535509"
+ + a
+ + "9047738068879013652"
+ + a
+ + "-430117592908725001"
+ + a
+ + "154431757781615122"
+ + a
+ + "5292625191058274884"
+ + a
+ + "-820879976800688912"
+ + a
+ + "7815829825921520514"
+ + a
+ + "7814626282908207726"
+ + a
+ + "6194047515562578714"
+ + a
+ + "4543712357461835613"
+ + a
+ + "6127919059662056304"
+ + a
+ + "-3041755880890705531"
+ + a
+ + "-6015922524640142745"
+ + a
+ + "-8240746661018900280"
+ + a
+ + "-4647074590211540695"
+ + a
+ + "4425056076926604935"
+ + a
+ + "-3628558101005679577"
+ + a
+ + "-2309605200216451261"
+ + a
+ + "4349438603816361823"
+ + a
+ + "6884968378719474311"
+ + a
+ + "2939625268139399900"
+ + a
+ + "-7384655158838745851"
+ + a
+ + "-9059163303551992957"
+ + a
+ + "-3168260877632134913"
+ + a
+ + "-2661349036927497205"
+ + a
+ + "-5732836207041285912"
+ + a
+ + "-1718443522567783859"
+ + a
+ + "-5184477095451803574"
+ + a
+ + "-2639779818877942595"
+ + a
+ + "-4285786699429851414"
+ + a
+ + "4153392600555453496"
+ + a
+ + "-677818638916169175"
+ + a
+ + "-318976644252115457"
+ + a
+ + "-6839771369066395476"
+ + a
+ + "-1331867802548483581"
+ + a
+ + "7662766576406914111"
+ + a
+ + "-4643717697303062174"
+ + a
+ + "491370442500697590"
+ + a
+ + "-5601731377105462991"
+ + a
+ + "-2083896333033158507"
+ + a
+ + "-8348647619744535173"
+ + a
+ + "2195403489667511601"
+ + a
+ + "-7304902791933157238"
+ + a
+ + "-8078804357956911593"
+ + a
+ + "1830019802461446756"
+ + a
+ + "-6914546352406074389"
+ + a
+ + "-1069372453373657960"
+ + a
+ + "7973324441431550228"
+ + a
+ + "7266296868894064186"
+ + a
+ + "-8218200041998108841"
+ + a
+ + "-2383548244358994901"
+ + a
+ + "2936358553872620482"
+ + a
+ + "-7394464481476738659"
+ + a
+ + "6796605663613232330"
+ + a
+ + "-7001716129222120235"
+ + a
+ + "3733905505178873527"
+ + a
+ + "-8924101992160005069"
+ + a
+ + "-8053245946307360193"
+ + a
+ + "-1410662425490071697"
+ + a
+ + "2667987898784000369"
+ + a
+ + "3930779870894342436"
+ + a
+ + "-737013868548327724"
+ + a
+ + "-5047711387310744430"
+ + a
+ + "-1995068133569824048"
+ + a
+ + "7428068289838785439"
+ + a
+ + "7998411348436431691"
+ + a
+ + "-66606868251602657"
+ + a
+ + "-3140963045029084778"
+ + a
+ + "-294529882224598188"
+ + a
+ + "7884304850523476618"
+ + a
+ + "-7015430383734539592"
+ + a
+ + "1417659741149471982"
+ + a
+ + "-1503958245384724231"
+ + a
+ + "6513146138809209371"
+ + a
+ + "-633829660049130428"
+ + a
+ + "-5690846708247479070"
+ + a
+ + "5057521049567048390"
+ + a
+ + "-1831459748130174291"
+ + a
+ + "-5811032821990866321"
+ + a
+ + "1118822902012234468"
+ + a
+ + "-2951084719946215176"
+ + a
+ + "6595747868165419153"
+ + a
+ + "-5474017136886613977"
+ + a
+ + "-5014173376270024122"
+ + a
+ + "3378038340528525905"
+ + a
+ + "4881313666473403454"
+ + a
+ + "3191601076967017248"
+ + a
+ + "-7308891140200636223"
+ + a
+ + "7456642015616743574"
+ + a
+ + "2377344551942001357"
+ + a
+ + "6578033781675835473"
+ + a
+ + "-3042794498162452750"
+ + a
+ + "2427071443633851664"
+ + a
+ + "8344198901104076413"
+ + a
+ + "462607879869700213"
+ + a
+ + "-6970961797048172328"
+ + a
+ + "8964377020396178700"
+ + a
+ + "730041378577385264"
+ + a
+ + "-369108319145229173"
+ + a
+ + "-1704480982549139880"
+ + a
+ + "-2795521892361361829"
+ + a
+ + "7410857119861369581"
+ + a
+ + "-4967026415955924393"
+ + a
+ + "3401654287294004153"
+ + a
+ + "4927182977102119891"
+ + a
+ + "1620336809248274012"
+ + a
+ + "3577184301995047135"
+ + a
+ + "-6841529815937467863"
+ + a
+ + "4613796452620724683"
+ + a
+ + "-1054934308018524851"
+ + a
+ + "-8855800260865241874"
+ + a
+ + "7225581178800302134"
+ + a
+ + "-9032442258141207901"
+ + a
+ + "-7057262694446386383"
+ + a
+ + "-3732442445224352364"
+ + a
+ + "2761141437113645653"
+ + a
+ + "-929430840722605254"
+ + a
+ + "2511509677650090911"
+ + a
+ + "8118132181366237347"
+ + a
+ + "-550026691256274082"
+ + a
+ + "-3668907501140258954"
+ + a
+ + "-606810055944795439"
+ + a
+ + "-9017650565356767436"
+ + a
+ + "2095198344342310157"
+ + a
+ + "7093363964773361344"
+ + a
+ + "-3099270771817404892"
+ + a
+ + "2198062659168522785"
+ + a
+ + "-6273665991256788861"
+ + a
+ + "6839118058276544645"
+ + a
+ + "8192709088232625308"
+ + a
+ + "5013863326431809160"
+ + a
+ + "-4754511127120331068"
+ + a
+ + "-3661877678366068554"
+ + a
+ + "8656183962683002717"
+ + a
+ + "4892501203466148430"
+ + a
+ + "-4958645542284711625"
+ + a
+ + "6723996370247953481"
+ + a
+ + "4911629062665388595"
+ + a
+ + "-4387819364150439783"
+ + a
+ + "-1296268218059531735"
+ + a
+ + "-7641850932378884683"
+ + a
+ + "7087270855110065163"
+ + a
+ + "3754708083359768149"
+ + a
+ + "3889586698096405834"
+ + a
+ + "-6137225015939556998"
+ + a
+ + "6768463333145358200"
+ + a
+ + "1733091583159252657"
+ + a
+ + "-8161421181385050066"
+ + a
+ + "-6013229318518658409"
+ + a
+ + "2733581142152004399"
+ + a
+ + "33219917982979999"
+ + a
+ + "-6452758044749045043"
+ + a
+ + "-6442695315870372078"
+ + a
+ + "3835780802518037131"
+ + a
+ + "-3231354270509736361"
+ + a
+ + "8973485937631645699"
+ + a
+ + "721138559962451060"
+ + a
+ + "-5459139089955258871"
+ + a
+ + "-289240518852777004"
+ + a
+ + "-8912467672113900015"
+ + a
+ + "8386886357144052810"
+ + a
+ + "-101643017034454067"
+ + a
+ + "-4929821758780909227"
+ + a
+ + "-1266807567558686950"
+ + a
+ + "8928737992684490917"
+ + a
+ + "5916636164747024412"
+ + a
+ + "-5791489627671790370"
+ + a
+ + "-8438709873793054297"
+ + a
+ + "-6154848405003374437"
+ + a
+ + "-1167593657140619808"
+ + a
+ + "454661938430770613"
+ + a
+ + "3268496715979850020"
+ + a
+ + "4330546121321481412"
+ + a
+ + "-6723452375653753049"
+ + a
+ + "-8355576695333144347"
+ + a
+ + "-7219392445688183200"
+ + a
+ + "-9021944183281656899"
+ + a
+ + "8347317120521098660"
+ + a
+ + "-1760524396084873794"
+ + a
+ + "-2904405441760595951"
+ + a
+ + "1273212335776452264"
+ + a
+ + "5599936571602637613"
+ + a
+ + "-1874789470910305709"
+ + a
+ + "33067597899967310"
+ + a
+ + "-1550773524926263894"
+ + a
+ + "8415787422238198331"
+ + a
+ + "-5951819633303154694"
+ + a
+ + "2723272766251525139"
+ + a
+ + "-553120179037176724"
+ + a
+ + "447473466542519917"
+ + a
+ + "737323123399346128"
+ + a
+ + "2239775540296940992"
+ + a
+ + "1174078146829196955"
+ + a
+ + "2350643859956391173"
+ + a
+ + "-3438882603276611789"
+ + a
+ + "-1951707287079412838"
+ + a
+ + "-8428630040889486231"
+ + a
+ + "-669351995787567767"
+ + a
+ + "8513892233989162054"
+ + a
+ + "-530937035598775991"
+ + a
+ + "5426726267843651337"
+ + a
+ + "-3602850646806113885"
+ + a
+ + "-6429721144703485328"
+ + a
+ + "2107955875578696536"
+ + a
+ + "-5835559291240127178"
+ + a
+ + "-2890715836766470430"
+ + a
+ + "-9094627687565959459"
+ + a
+ + "308725312537075641"
+ + a
+ + "8722393287822659501"
+ + a
+ + "-1871034873782069769"
+ + a
+ + "-6243665891020870405"
+ + a
+ + "-7479233619970828738"
+ + a
+ + "4330539874988922286"
+ + a
+ + "3935621836467028953"
+ + a
+ + "615168151969985279"
+ + a
+ + "4445060597391296801"
+ + a
+ + "3410383985931968895"
+ + a
+ + "-579589989416250847"
+ + a
+ + "8303194436290111070"
+ + a
+ + "-4912677608615539331"
+ + a
+ + "-6965655216202631959"
+ + a
+ + "-5867361958201239665"
+ + a
+ + "-2490037409986115500"
+ + a
+ + "8855406855933096914"
+ + a
+ + "6843928093911668153"
+ + a
+ + "6613066040083806339"
+ + a
+ + "-1348861990157247904"
+ + a
+ + "8105723480957128837"
+ + a
+ + "-5405166066063685056"
+ + a
+ + "2174568676370020228"
+ + a
+ + "1730792060395168454"
+ + a
+ + "6845585680059012189"
+ + a
+ + "4924409929101075924"
+ + a
+ + "639025024172742077"
+ + a
+ + "5768643796258308363"
+ + a
+ + "416533415844656392"
+ + a
+ + "6259184655283512653"
+ + a
+ + "1806723304538309499"
+ + a
+ + "-8742505610523700611"
+ + a
+ + "9115577441284285844"
+ + a
+ + "-4422903889562854520"
+ + a
+ + "-8824082423929691984"
+ + a
+ + "-1594761846184958295"
+ + a
+ + "5443094875525914358"
+ + a
+ + "6623287219725446632"
+ + a
+ + "2163366667453320563"
+ + a
+ + "-3191492609540029469"
+ + a
+ + "-8478768721203218298"
+ + a
+ + "-8714235035695423280"
+ + a
+ + "1479159013581916798"
+ + a
+ + "-3029731821111886911"
+ + a
+ + "6063285391300612225"
+ + a
+ + "448982299938190378"
+ + a
+ + "6144131538023295407"
+ + a
+ + "3019455323078528928"
+ + a
+ + "-7593851815836924794"
+ + a
+ + "-8000720159411662877"
+ + a
+ + "-8830770921055302009"
+ + a
+ + "1276533555023357214"
+ + a
+ + "-7709979517561914854"
+ + a
+ + "2039814596470784108"
+ + a
+ + "-2570052517613437266"
+ + a
+ + "7325409472787663518"
+ + a
+ + "-3306248715853973724"
+ + a
+ + "-324933084126805189"
+ + a
+ + "5564649630755734125"
+ + a
+ + "-7130842274844587065"
+ + a
+ + "6500429736061520497"
+ + a
+ + "3075990014772699976"
+ + a
+ + "-1996052343038159566"
+ + a
+ + "2287584536748611077"
+ + a
+ + "4857750267117388849"
+ + a
+ + "2762191378890433936"
+ + a
+ + "-3787216983113538032"
+ + a
+ + "-7876139956665979641"
+ + a
+ + "-4434682462834688392"
+ + a
+ + "-6132345995543411306"
+ + a
+ + "2846828934507063356"
+ + a
+ + "2205056035534892863"
+ + a
+ + "6971362409840063934"
+ + a
+ + "-7334379541155315235"
+ + a
+ + "-2185887118772341871"
+ + a
+ + "7336523966377208421"
+ + a
+ + "-5181518925588434593"
+ + a
+ + "916829953978579055"
+ + a
+ + "8916196074684429581"
+ + a
+ + "-343902964928479243"
+ + a
+ + "-7524291869292823524"
+ + a
+ + "5057971524866397017"
+ + a
+ + "4735037701324009298"
+ + a
+ + "-5661196528985499220"
+ + a
+ + "-7174476579407401831"
+ + a
+ + "-2390421549535361748"
+ + a
+ + "-8803774619671917786"
+ + a
+ + "479835471799791118"
+ + a
+ + "1792276559188966877"
+ + a
+ + "-950711340133083778"
+ + a
+ + "1720537911995611123"
+ + a
+ + "5126428118418085091"
+ + a
+ + "-7331637704121976875"
+ + a
+ + "-7806518246166233753"
+ + a
+ + "-3189681476890420153"
+ + a
+ + "-4827285738546271306"
+ + a
+ + "9155113814944475088"
+ + a
+ + "579631697133442053"
+ + a
+ + "-712791131848894891"
+ + a
+ + "7622278436622830165"
+ + a
+ + "-3136674195548280572"
+ + a
+ + "-6935310496940897544"
+ + a
+ + "-2154475007448707981"
+ + a
+ + "5987083393899431764"
+ + a
+ + "2499138839933402376"
+ + a
+ + "226999891005733606"
+ + a
+ + "2675814497804340634"
+ + a
+ + "7006121889419299978"
+ + a
+ + "-1869449977369693096"
+ + a
+ + "-1277694500406902792"
+ + a
+ + "-3300574855852490262"
+ + a
+ + "3142802020191812497"
+ + a
+ + "3663379312038602453"
+ + a
+ + "4125257994180814427"
+ + a
+ + "-4571845229523457245"
+ + a
+ + "-3150058857386876342"
+ + a
+ + "7503846977488272450"
+ + a
+ + "-1661115278146574655"
+ + a
+ + "-3071863653254613716"
+ + a
+ + "4683248393738534743"
+ + a
+ + "-1859465107663223608"
+ + a
+ + "-4337623990306671907"
+ + a
+ + "4817982326835451535"
+ + a
+ + "-7667508470929533280"
+ + a
+ + "8307945079328891250"
+ + a
+ + "-8045760216482737685"
+ + a
+ + "-7858631362692153093"
+ + a
+ + "-3410708982722832945"
+ + a
+ + "6470378289978424498"
+ + a
+ + "-5483906378085151451"
+ + a
+ + "7382740210062959041"
+ + a
+ + "-3409959318852138797"
+ + a
+ + "5842851101995209434"
+ + a
+ + "7017954023532784719"
+ + a
+ + "974934155492127320"
+ + a
+ + "-3094009056197747103"
+ + a
+ + "-969387622581744988"
+ + a
+ + "-1632563381387869652"
+ + a
+ + "-9183098983740663590"
+ + a
+ + "-4320397456882074514"
+ + a
+ + "-3261368460000879189"
+ + a
+ + "383963959335946502"
+ + a
+ + "-3684640452189005692"
+ + a
+ + "1952680973518464182"
+ + a
+ + "6226530231022358768"
+ + a
+ + "3072568317345091370"
+ + a
+ + "-4962716382738148806"
+ + a
+ + "8455687499001964857"
+ + a
+ + "150246332340927830"
+ + a
+ + "640861774309913449"
+ + a
+ + "5838050563792098560"
+ + a
+ + "20611114217615544"
+ + a
+ + "5929259895778420773"
+ + a
+ + "6537239832453755289"
+ + a
+ + "-3264102069205369214"
+ + a
+ + "912347645120744252"
+ + a
+ + "2425848868939426699"
+ + a
+ + "1723027032012111634"
+ + a
+ + "1449357166220209037"
+ + a
+ + "2766362939912705680"
+ + a
+ + "4727545052215865110"
+ + a
+ + "-1616490558707992782"
+ + a
+ + "4409644222525651092"
+ + a
+ + "-4337183804510752062"
+ + a
+ + "3535045438786400315"
+ + a
+ + "8803098582001817561"
+ + a
+ + "-6955431114397740500"
+ + a
+ + "-6219310959583541594"
+ + a
+ + "-3700064324151895341"
+ + a
+ + "-2549680515428708882"
+ + a
+ + "-2401883646008126064"
+ + a
+ + "-7582292756795829165"
+ + a
+ + "7667156026808070552"
+ + a
+ + "-3558059286124310056"
+ + a
+ + "8735793018250739997"
+ + a
+ + "-6427974810371007068"
+ + a
+ + "1334783141990516397"
+ + a
+ + "867020448668406789"
+ + a
+ + "-5691512855692184361"
+ + a
+ + "2463958787597883575"
+ + a
+ + "7935389093643043859"
+ + a
+ + "4752545886380456294"
+ + a
+ + "-1196508123657862429"
+ + a
+ + "2093750917497615474"
+ + a
+ + "-7791249716898626507"
+ + a
+ + "8198523205454538737"
+ + a
+ + "262561788122779659"
+ + a
+ + "6696297940506045689"
+ + a
+ + "1287784952697600605"
+ + a
+ + "-4796552398039489762"
+ + a
+ + "385046329657361469"
+ + a
+ + "8831073988511756345"
+ + a
+ + "8308323241869503292"
+ + a
+ + "-6375459006577280917"
+ + a
+ + "4041141025072401164"
+ + a
+ + "1852830842547147361"
+ + a
+ + "550492070617199974"
+ + a
+ + "-3810637208423908392"
+ + a
+ + "634939432473076781"
+ + a
+ + "6820683277163483747"
+ + a
+ + "-2272753417970275885"
+ + a
+ + "-1125025879686622100"
+ + a
+ + "2345080866577073148"
+ + a
+ + "9070140269618540152"
+ + a
+ + "-3306117376765807520"
+ + a
+ + "3197312849039628462"
+ + a
+ + "-7832747983125543947"
+ + a
+ + "6928232711304267929"
+ + a
+ + "-4404354247155346356"
+ + a
+ + "7746342250056874796"
+ + a
+ + "7310633729720542011"
+ + a
+ + "-2728063333465515258"
+ + a
+ + "-4955603802615225157"
+ + a
+ + "6898617935063123704"
+ + a
+ + "-220170639807146220"
+ + a
+ + "-2019827212939117373"
+ + a
+ + "-470310388988857033"
+ + a
+ + "5505618100440132645"
+ + a
+ + "-7571658264226059414"
+ + a
+ + "-7888356696237361642"
+ + a
+ + "-4477730354595352022"
+ + a
+ + "-7846732783657640881"
+ + a
+ + "-8801627451734936756"
+ + a
+ + "5872317002164430091"
+ + a
+ + "-4339767558518547100"
+ + a
+ + "3910203839741261584"
+ + a
+ + "-3519143931735275157"
+ + a
+ + "164939830321181168"
+ + a
+ + "-5488818195135015269"
+ + a
+ + "-4667473428940159348"
+ + a
+ + "-4981236168318181219"
+ + a
+ + "3560846926667666393"
+ + a
+ + "3014750347556533222"
+ + a
+ + "1651918403266366438"
+ + a
+ + "784187752316822622"
+ + a
+ + "-8577471103724493539"
+ + a
+ + "-1656192333892982206"
+ + a
+ + "-1617317898423166008"
+ + a
+ + "-2678885846361396918"
+ + a
+ + "302211955997870039"
+ + a
+ + "8638572990304208397"
+ + a
+ + "2218502254957595360"
+ + a
+ + "-7161423473740763740"
+ + a
+ + "3277635809268947558"
+ + a
+ + "6105474029898724238"
+ + a
+ + "-3933173974127482275"
+ + a
+ + "4697446393802435027"
+ + a
+ + "-2515976829170222099"
+ + a
+ + "2494490943498590059"
+ + a
+ + "-5583096342045076362"
+ + a
+ + "6917551925452206303"
+ + a
+ + "-8907420521351388972"
+ + a
+ + "-2143228459842603216"
+ + a
+ + "5584211206548670691"
+ + a
+ + "1963827294400159992"
+ + a
+ + "1062816828116449093"
+ + a
+ + "-6249888286799449649"
+ + "abcdef"
+ + a
+ + b
+ + c
+ + d
+ + e
+ + " ghiABCDEFGHIJKLMNOPQRSTUVWXYZjklmnopqrstuvwxyzabcdefghiABCDEFGHIJKLMNOPQRSTUVWXYZjklmnopqrstuvwxyzabcdefghiABCDEFGHIJKLMNOPQRSTUVWXYZjklmnopqrstuvwxyzabcdefghiABCDEFGHIJKLMNOPQRSTUVWXYZjklmnopqrstuvwxy12";
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test626/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test626/A_in.js
new file mode 100644
index 0000000..033e61d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test626/A_in.js
@@ -0,0 +1,4 @@
+public enum Enum_16 {
+ONE,TWO,THREE;
+String foo(String str){return"";}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test626/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test626/A_out.js
new file mode 100644
index 0000000..e10fc02
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test626/A_out.js
@@ -0,0 +1,6 @@
+public enum Enum_16 {
+ ONE, TWO, THREE;
+ String foo(String str) {
+ return "";
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test627/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test627/A_in.js
new file mode 100644
index 0000000..0f3e53e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test627/A_in.js
@@ -0,0 +1 @@
+@Annot(x = 23, y = -3) public class A {} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test627/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test627/A_out.js
new file mode 100644
index 0000000..331411e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test627/A_out.js
@@ -0,0 +1,3 @@
+@Annot(x = 23, y = -3)
+public class A {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test628/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test628/A_in.js
new file mode 100644
index 0000000..54a59ad
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test628/A_in.js
@@ -0,0 +1,3 @@
+public class A {
+ @Annot(x = 23, y = -3) void foo() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test628/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test628/A_out.js
new file mode 100644
index 0000000..164303a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test628/A_out.js
@@ -0,0 +1,5 @@
+public class A {
+ @Annot(x = 23, y = -3)
+ void foo() {
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test629/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test629/A_in.js
new file mode 100644
index 0000000..fef715d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test629/A_in.js
@@ -0,0 +1,3 @@
+public class A {
+ @Annot(x = 23, y = -3) A() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test629/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test629/A_out.js
new file mode 100644
index 0000000..31acf39
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test629/A_out.js
@@ -0,0 +1,5 @@
+public class A {
+ @Annot(x = 23, y = -3)
+ A() {
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test630/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test630/A_in.js
new file mode 100644
index 0000000..fc81e95
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test630/A_in.js
@@ -0,0 +1,13 @@
+public class A {
+ public MyClass getMyObject()
+ {
+ MyClass o = new MyClass();
+
+ doSomehting( 1 );
+
+ if (somethingBad)
+ throw( new IllegalBlaException( "bad bla" ) );
+
+ return( o );
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test630/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test630/A_out.js
new file mode 100644
index 0000000..0a365cb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test630/A_out.js
@@ -0,0 +1,12 @@
+public class A {
+ public MyClass getMyObject() {
+ MyClass o = new MyClass();
+
+ doSomehting(1);
+
+ if (somethingBad)
+ throw ( new IllegalBlaException("bad bla") );
+
+ return ( o );
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test631/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test631/A_in.js
new file mode 100644
index 0000000..fc81e95
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test631/A_in.js
@@ -0,0 +1,13 @@
+public class A {
+ public MyClass getMyObject()
+ {
+ MyClass o = new MyClass();
+
+ doSomehting( 1 );
+
+ if (somethingBad)
+ throw( new IllegalBlaException( "bad bla" ) );
+
+ return( o );
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test631/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test631/A_out.js
new file mode 100644
index 0000000..0a365cb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test631/A_out.js
@@ -0,0 +1,12 @@
+public class A {
+ public MyClass getMyObject() {
+ MyClass o = new MyClass();
+
+ doSomehting(1);
+
+ if (somethingBad)
+ throw ( new IllegalBlaException("bad bla") );
+
+ return ( o );
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test632/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test632/A_in.js
new file mode 100644
index 0000000..fc81e95
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test632/A_in.js
@@ -0,0 +1,13 @@
+public class A {
+ public MyClass getMyObject()
+ {
+ MyClass o = new MyClass();
+
+ doSomehting( 1 );
+
+ if (somethingBad)
+ throw( new IllegalBlaException( "bad bla" ) );
+
+ return( o );
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test632/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test632/A_out.js
new file mode 100644
index 0000000..200d9c2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test632/A_out.js
@@ -0,0 +1,12 @@
+public class A {
+ public MyClass getMyObject() {
+ MyClass o = new MyClass();
+
+ doSomehting(1);
+
+ if (somethingBad)
+ throw( new IllegalBlaException("bad bla") );
+
+ return( o );
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test633/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test633/A_in.js
new file mode 100644
index 0000000..c2eadaa
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test633/A_in.js
@@ -0,0 +1,19 @@
+import java.util.List;
+
+
+
+import java.io.IOException;
+
+public class X {
+
+ List list;
+
+ void foo() throws IOException {
+ }
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test633/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test633/A_out.js
new file mode 100644
index 0000000..c2eadaa
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test633/A_out.js
@@ -0,0 +1,19 @@
+import java.util.List;
+
+
+
+import java.io.IOException;
+
+public class X {
+
+ List list;
+
+ void foo() throws IOException {
+ }
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test634/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test634/A_in.js
new file mode 100644
index 0000000..c2eadaa
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test634/A_in.js
@@ -0,0 +1,19 @@
+import java.util.List;
+
+
+
+import java.io.IOException;
+
+public class X {
+
+ List list;
+
+ void foo() throws IOException {
+ }
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test634/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test634/A_out.js
new file mode 100644
index 0000000..ba1827d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test634/A_out.js
@@ -0,0 +1,17 @@
+import java.util.List;
+
+import java.io.IOException;
+
+public class X {
+
+ List list;
+
+ void foo() throws IOException {
+ }
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test635/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test635/A_in.js
new file mode 100644
index 0000000..24f422e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test635/A_in.js
@@ -0,0 +1,18 @@
+import java.util.List;
+
+
+
+import java.io.IOException;
+public class X {
+
+ List list;
+
+ void foo() throws IOException {
+ }
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test635/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test635/A_out.js
new file mode 100644
index 0000000..f8af1f1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test635/A_out.js
@@ -0,0 +1,16 @@
+import java.util.List;
+
+import java.io.IOException;
+public class X {
+
+ List list;
+
+ void foo() throws IOException {
+ }
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test636/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test636/A_in.js
new file mode 100644
index 0000000..ba1827d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test636/A_in.js
@@ -0,0 +1,17 @@
+import java.util.List;
+
+import java.io.IOException;
+
+public class X {
+
+ List list;
+
+ void foo() throws IOException {
+ }
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test636/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test636/A_out.js
new file mode 100644
index 0000000..c2eadaa
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test636/A_out.js
@@ -0,0 +1,19 @@
+import java.util.List;
+
+
+
+import java.io.IOException;
+
+public class X {
+
+ List list;
+
+ void foo() throws IOException {
+ }
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test637/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test637/A_in.js
new file mode 100644
index 0000000..5c06d3a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test637/A_in.js
@@ -0,0 +1,21 @@
+import java.util.List;
+
+
+
+
+
+import java.io.IOException;
+
+public class X {
+
+ List list;
+
+ void foo() throws IOException {
+ }
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test637/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test637/A_out.js
new file mode 100644
index 0000000..7f08768
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test637/A_out.js
@@ -0,0 +1,18 @@
+import java.util.List;
+
+
+import java.io.IOException;
+
+public class X {
+
+ List list;
+
+ void foo() throws IOException {
+ }
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test638/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test638/A_in.js
new file mode 100644
index 0000000..ba1827d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test638/A_in.js
@@ -0,0 +1,17 @@
+import java.util.List;
+
+import java.io.IOException;
+
+public class X {
+
+ List list;
+
+ void foo() throws IOException {
+ }
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test638/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test638/A_out.js
new file mode 100644
index 0000000..ba1827d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test638/A_out.js
@@ -0,0 +1,17 @@
+import java.util.List;
+
+import java.io.IOException;
+
+public class X {
+
+ List list;
+
+ void foo() throws IOException {
+ }
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test639/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test639/A_in.js
new file mode 100644
index 0000000..b8d67a9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test639/A_in.js
@@ -0,0 +1,21 @@
+import java.util.List; // comment
+
+
+
+
+
+import java.io.IOException; // comment2
+
+public class X {
+
+ List list;
+
+ void foo() throws IOException {
+ }
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test639/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test639/A_out.js
new file mode 100644
index 0000000..0763d4a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test639/A_out.js
@@ -0,0 +1,18 @@
+import java.util.List; // comment
+
+
+import java.io.IOException; // comment2
+
+public class X {
+
+ List list;
+
+ void foo() throws IOException {
+ }
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test640/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test640/A_in.js
new file mode 100644
index 0000000..13b2b97
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test640/A_in.js
@@ -0,0 +1,17 @@
+import java.util.List; // comment
+
+import java.io.IOException; // comment2
+
+public class X {
+
+ List list;
+
+ void foo() throws IOException {
+ }
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test640/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test640/A_out.js
new file mode 100644
index 0000000..13b2b97
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test640/A_out.js
@@ -0,0 +1,17 @@
+import java.util.List; // comment
+
+import java.io.IOException; // comment2
+
+public class X {
+
+ List list;
+
+ void foo() throws IOException {
+ }
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test641/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test641/A_in.js
new file mode 100644
index 0000000..bdc5838
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test641/A_in.js
@@ -0,0 +1,7 @@
+class Bar {
+ void m() {
+ if (aaa && bbb && ccc && ddd && eee) {
+ return;
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test641/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test641/A_out.js
new file mode 100644
index 0000000..3e807c4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test641/A_out.js
@@ -0,0 +1,8 @@
+class Bar {
+ void m() {
+ if (aaa && bbb && ccc && ddd
+ && eee) {
+ return;
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test642/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test642/A_in.js
new file mode 100644
index 0000000..40e775b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test642/A_in.js
@@ -0,0 +1,11 @@
+package test;
+public class Test
+{
+ public static void main (String[] args)
+ {
+ if (1 == 1)
+ x = y;
+ else
+ y = x;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test642/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test642/A_out.js
new file mode 100644
index 0000000..13cf7c3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test642/A_out.js
@@ -0,0 +1,12 @@
+package test;
+
+public class Test
+{
+ public static void main (String[] args)
+ {
+ if (1 == 1)
+ x = y;
+ else
+ y = x;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test642/formatter.prefs b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test642/formatter.prefs
new file mode 100644
index 0000000..04e3203
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test642/formatter.prefs
@@ -0,0 +1,248 @@
+#Thu Dec 14 10:42:24 GMT-03:00 2006
+eclipse.preferences.version=1
+org.eclipse.wst.jsdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_allocation_expression=20
+org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=20
+org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_method_invocation=20
+org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=20
+org.eclipse.wst.jsdt.core.formatter.alignment_for_assignment=0
+org.eclipse.wst.jsdt.core.formatter.alignment_for_binary_expression=20
+org.eclipse.wst.jsdt.core.formatter.alignment_for_compact_if=52
+org.eclipse.wst.jsdt.core.formatter.alignment_for_conditional_expression=52
+org.eclipse.wst.jsdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.wst.jsdt.core.formatter.alignment_for_expressions_in_array_initializer=20
+org.eclipse.wst.jsdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.wst.jsdt.core.formatter.alignment_for_parameters_in_constructor_declaration=20
+org.eclipse.wst.jsdt.core.formatter.alignment_for_parameters_in_method_declaration=20
+org.eclipse.wst.jsdt.core.formatter.alignment_for_selector_in_method_invocation=20
+org.eclipse.wst.jsdt.core.formatter.alignment_for_superclass_in_type_declaration=21
+org.eclipse.wst.jsdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.wst.jsdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=21
+org.eclipse.wst.jsdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=20
+org.eclipse.wst.jsdt.core.formatter.alignment_for_throws_clause_in_method_declaration=20
+org.eclipse.wst.jsdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.wst.jsdt.core.formatter.blank_lines_after_package=1
+org.eclipse.wst.jsdt.core.formatter.blank_lines_before_field=0
+org.eclipse.wst.jsdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.wst.jsdt.core.formatter.blank_lines_before_imports=0
+org.eclipse.wst.jsdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.wst.jsdt.core.formatter.blank_lines_before_method=1
+org.eclipse.wst.jsdt.core.formatter.blank_lines_before_new_chunk=0
+org.eclipse.wst.jsdt.core.formatter.blank_lines_before_package=0
+org.eclipse.wst.jsdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_block=next_line
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_block_in_case=next_line
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_constructor_declaration=next_line
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_method_declaration=next_line
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_switch=next_line
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_type_declaration=next_line
+org.eclipse.wst.jsdt.core.formatter.comment.clear_blank_lines=true
+org.eclipse.wst.jsdt.core.formatter.comment.format_comments=true
+org.eclipse.wst.jsdt.core.formatter.comment.format_header=true
+org.eclipse.wst.jsdt.core.formatter.comment.format_html=true
+org.eclipse.wst.jsdt.core.formatter.comment.format_source_code=true
+org.eclipse.wst.jsdt.core.formatter.comment.indent_parameter_description=false
+org.eclipse.wst.jsdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.wst.jsdt.core.formatter.comment.insert_new_line_before_root_tags=do not insert
+org.eclipse.wst.jsdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.wst.jsdt.core.formatter.comment.line_length=80
+org.eclipse.wst.jsdt.core.formatter.compact_else_if=true
+org.eclipse.wst.jsdt.core.formatter.continuation_indentation=2
+org.eclipse.wst.jsdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.wst.jsdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.wst.jsdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.wst.jsdt.core.formatter.indent_empty_lines=false
+org.eclipse.wst.jsdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.wst.jsdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.wst.jsdt.core.formatter.indentation.size=4
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_after_annotation=insert
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_while_in_do_statement=insert
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_paren_in_cast=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_assert=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.wst.jsdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.wst.jsdt.core.formatter.keep_empty_array_initializer_on_one_line=true
+org.eclipse.wst.jsdt.core.formatter.keep_imple_if_on_one_line=true
+org.eclipse.wst.jsdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.wst.jsdt.core.formatter.lineSplit=100
+org.eclipse.wst.jsdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.wst.jsdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.wst.jsdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.wst.jsdt.core.formatter.tabulation.char=tab
+org.eclipse.wst.jsdt.core.formatter.tabulation.size=4
+org.eclipse.wst.jsdt.core.formatter.use_tabs_only_for_leading_indentations=true
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test642/formatter.xml b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test642/formatter.xml
new file mode 100644
index 0000000..c9c340a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test642/formatter.xml
@@ -0,0 +1,251 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<profiles version="10">
+<profile name="Visionnaire" version="10">
+<setting id="org.eclipse.wst.jsdt.core.formatter.align_type_members_on_columns" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="20"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="20"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_method_invocation" value="20"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="20"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_assignment" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_binary_expression" value="20"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_compact_if" value="52"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_conditional_expression" value="52"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_enum_constants" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_expressions_in_array_initializer" value="20"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_multiple_fields" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="20"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_parameters_in_method_declaration" value="20"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_selector_in_method_invocation" value="20"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_superclass_in_type_declaration" value="21"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="21"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="20"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="20"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_after_imports" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_after_package" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_field" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_imports" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_member_type" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_method" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_new_chunk" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_package" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_block" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_block_in_case" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_constructor_declaration" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_method_declaration" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_switch" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_type_declaration" value="next_line"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.comment.clear_blank_lines" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.comment.format_comments" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.comment.format_header" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.comment.format_html" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.comment.format_source_code" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.comment.indent_parameter_description" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.comment.indent_root_tags" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.comment.insert_new_line_before_root_tags" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.comment.line_length" value="80"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.compact_else_if" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation" value="2"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_empty_lines" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_statements_compare_to_block" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_statements_compare_to_body" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_switch" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.indentation.size" value="4"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_after_annotation" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_else_in_if_statement" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_while_in_do_statement" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_assert" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_empty_array_initializer_on_one_line" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_imple_if_on_one_line" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.lineSplit" value="100"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.tabulation.char" value="tab"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.tabulation.size" value="4"/>
+<setting id="org.eclipse.wst.jsdt.core.formatter.use_tabs_only_for_leading_indentations" value="true"/>
+</profile>
+</profiles>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test643/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test643/A_in.js
new file mode 100644
index 0000000..9c41bbd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test643/A_in.js
@@ -0,0 +1,3 @@
+public class Test
+{
+} // end of Test \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test643/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test643/A_out.js
new file mode 100644
index 0000000..93908b4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test643/A_out.js
@@ -0,0 +1,2 @@
+public class Test {
+} // end of Test
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test644/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test644/A_in.js
new file mode 100644
index 0000000..be2a11d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test644/A_in.js
@@ -0,0 +1,3 @@
+public class Test
+{
+} /* end of Test */ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test644/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test644/A_out.js
new file mode 100644
index 0000000..157fd82
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test644/A_out.js
@@ -0,0 +1,2 @@
+public class Test {
+} /* end of Test */
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test645/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test645/A_in.js
new file mode 100644
index 0000000..ce1db51
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test645/A_in.js
@@ -0,0 +1,3 @@
+public class Test
+{
+} // end of Test
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test645/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test645/A_out.js
new file mode 100644
index 0000000..93908b4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test645/A_out.js
@@ -0,0 +1,2 @@
+public class Test {
+} // end of Test
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test646/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test646/A_in.js
new file mode 100644
index 0000000..ce1db51
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test646/A_in.js
@@ -0,0 +1,3 @@
+public class Test
+{
+} // end of Test
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test646/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test646/A_out.js
new file mode 100644
index 0000000..93908b4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test646/A_out.js
@@ -0,0 +1,2 @@
+public class Test {
+} // end of Test
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test647/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test647/A_in.js
new file mode 100644
index 0000000..9c41bbd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test647/A_in.js
@@ -0,0 +1,3 @@
+public class Test
+{
+} // end of Test \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test647/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test647/A_out.js
new file mode 100644
index 0000000..abeaa98
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test647/A_out.js
@@ -0,0 +1,2 @@
+public class Test {
+} // end of Test \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test648/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test648/A_in.js
new file mode 100644
index 0000000..24d2c1c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test648/A_in.js
@@ -0,0 +1,4 @@
+public class Test
+{
+} // end of Test
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test648/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test648/A_out.js
new file mode 100644
index 0000000..93908b4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test648/A_out.js
@@ -0,0 +1,2 @@
+public class Test {
+} // end of Test
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test649/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test649/A_in.js
new file mode 100644
index 0000000..24d2c1c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test649/A_in.js
@@ -0,0 +1,4 @@
+public class Test
+{
+} // end of Test
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test649/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test649/A_out.js
new file mode 100644
index 0000000..93908b4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test649/A_out.js
@@ -0,0 +1,2 @@
+public class Test {
+} // end of Test
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test650/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test650/A_in.js
new file mode 100644
index 0000000..375d9cc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test650/A_in.js
@@ -0,0 +1,5 @@
+public class Test
+{
+ int i = 0;
+ int k = + ++i;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test650/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test650/A_out.js
new file mode 100644
index 0000000..b4284a8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test650/A_out.js
@@ -0,0 +1,4 @@
+public class Test {
+ int i = 0;
+ int k = + ++i;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test651/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test651/A_in.js
new file mode 100644
index 0000000..e08b14c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test651/A_in.js
@@ -0,0 +1,5 @@
+public class Test
+{
+ int i = 0;
+ int k = + --i;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test651/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test651/A_out.js
new file mode 100644
index 0000000..a2fa3d5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test651/A_out.js
@@ -0,0 +1,4 @@
+public class Test {
+ int i = 0;
+ int k = +--i;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test652/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test652/A_in.js
new file mode 100644
index 0000000..cbc6d04
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test652/A_in.js
@@ -0,0 +1,5 @@
+public class Test
+{
+ int i = 0;
+ int k = - --i;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test652/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test652/A_out.js
new file mode 100644
index 0000000..2107b9e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test652/A_out.js
@@ -0,0 +1,4 @@
+public class Test {
+ int i = 0;
+ int k = - --i;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test653/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test653/A_in.js
new file mode 100644
index 0000000..be5dd43
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test653/A_in.js
@@ -0,0 +1,5 @@
+public class Test
+{
+ int i = 0;
+ int k = - ++i;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test653/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test653/A_out.js
new file mode 100644
index 0000000..2965fa5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test653/A_out.js
@@ -0,0 +1,4 @@
+public class Test {
+ int i = 0;
+ int k = -++i;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test654/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test654/A_in.js
new file mode 100644
index 0000000..cb29687
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test654/A_in.js
@@ -0,0 +1,5 @@
+public class Test
+{
+ int i = 0;
+ int k = + (++i);
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test654/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test654/A_out.js
new file mode 100644
index 0000000..2db53b1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test654/A_out.js
@@ -0,0 +1,4 @@
+public class Test {
+ int i = 0;
+ int k = +(++i);
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test655/A_in.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test655/A_in.js
new file mode 100644
index 0000000..5429977
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test655/A_in.js
@@ -0,0 +1,5 @@
+public class Test
+{
+ int i = 0;
+ int k = - (--i);
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test655/A_out.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test655/A_out.js
new file mode 100644
index 0000000..f9524b7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test655/A_out.js
@@ -0,0 +1,4 @@
+public class Test {
+ int i = 0;
+ int k = -(--i);
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/NotInClasspath/p/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/NotInClasspath/p/Y.js
new file mode 100644
index 0000000..bb6f0e7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/NotInClasspath/p/Y.js
@@ -0,0 +1,10 @@
+ function Y() {
+ }
+ function Y( i) {
+// super(i);
+ }
+ function Y( b) {
+// super(1);
+ }
+ function bar() {
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/otherSrc()/X31997.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/otherSrc()/X31997.js
new file mode 100644
index 0000000..d1f0b97
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/otherSrc()/X31997.js
@@ -0,0 +1,4 @@
+/* Test case for bug 31997 Refactoring d.n. work for projects with brackets in name.
+public class X31997 {
+}
+*/ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/otherSrc()/X92210.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/otherSrc()/X92210.js
new file mode 100644
index 0000000..a3adffc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/otherSrc()/X92210.js
@@ -0,0 +1,3 @@
+//public class X92210 {
+// public void foo() {}
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/otherSrc()/Y31997.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/otherSrc()/Y31997.js
new file mode 100644
index 0000000..ee7d0bd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/otherSrc()/Y31997.js
@@ -0,0 +1,3 @@
+/* Test case for bug 31997 Refactoring d.n. work for projects with brackets in name. */
+//public class Y31997 extends X31997 {
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/CA.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/CA.js
new file mode 100644
index 0000000..b3c7886
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/CA.js
@@ -0,0 +1,16 @@
+///* Test case for 1GIIBC3: ITPJCORE:WINNT - search for method references - missing matches */
+//public class CA {
+// class CB {
+// void f() {
+// m();
+// }
+// class CC {
+// void f() {
+// m();
+// }
+// }
+// }
+// void m() {
+// System.out.println("a");
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/D.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/D.js
new file mode 100644
index 0000000..07a127e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/D.js
@@ -0,0 +1,12 @@
+///* Regression test for 1GL12XE: ITPJCORE:WIN2000 - search: missing field references in inner class */
+//public class D {
+// int h;
+// void g() {
+// new Object() {
+// public void run() {
+// int y = 0;
+// h = y;
+// }
+// };
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/E.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/E.js
new file mode 100644
index 0000000..05333aa
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/E.js
@@ -0,0 +1,7 @@
+///* Test case for 1GHDA2V: ITPJCORE:WINNT - ClassCastException when doing a search */
+//public class E {
+// public Object foo() {
+// int[] result = new int[0];
+// return result.clone();
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/O.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/O.js
new file mode 100644
index 0000000..36499d9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/O.js
@@ -0,0 +1,10 @@
+/* Regression test for 1GL11J6: ITPJCORE:WIN2000 - search: missing field references (nested types)
+public class O {
+ int y;
+ class I {
+ void y() {
+ y = 0;
+ }
+ }
+}
+*/
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/Test.js
new file mode 100644
index 0000000..cc4a375
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/Test.js
@@ -0,0 +1,29 @@
+function testMain()
+{
+ x = A1(1);
+}
+
+/*
+public class Test {
+
+static {
+ Test var = new Test();
+}
+
+{
+ Test t = null;
+}
+
+public static void main(String[] args) {
+ p.Y y = new p.Y();
+ y.foo(1, "a", y);
+ p.Y.bar();
+
+ p.Z z = new p.Z();
+ z.foo(1, "a", z);
+
+ p.A a = new p.A(y);
+ a.foo(1, "a", a.x);
+}
+}
+*/
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/TypeReferenceAsSingleNameReference.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/TypeReferenceAsSingleNameReference.js
new file mode 100644
index 0000000..c857ea3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/TypeReferenceAsSingleNameReference.js
@@ -0,0 +1,14 @@
+/*
+public class TypeReferenceAsSingleNameReference {
+
+void hasReference() {
+ TypeReferenceAsSingleNameReference x = null;
+ TypeReferenceAsSingleNameReference = new Object();
+}
+
+void hasNoReference() {
+ Object TypeReferenceAsSingleNameReference = null;
+}
+
+}
+*/ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/W.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/W.js
new file mode 100644
index 0000000..eef2d78
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/W.js
@@ -0,0 +1,9 @@
+/* Regression test for 1GL9UMH: ITPJCORE:WIN2000 - search: missing type occurrences
+public class W {
+ static int length = 17;
+ int m() {
+ int[] R = new int[1];
+ return W.length; /*1*/
+ }
+}
+*/
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/X.js
new file mode 100644
index 0000000..8b81530
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/X.js
@@ -0,0 +1,10 @@
+/* Test case for PR 1GK7K17: ITPJCORE:WIN2000 - search: missing type reference
+public class X{
+ static void s(){};
+}
+class AA{
+ AA(){
+ X.s(); //<<
+ };
+}
+*/
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a/A.js
new file mode 100644
index 0000000..f1eea7c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a/A.js
@@ -0,0 +1,13 @@
+/* Test case for 1GL0MN9: ITPJCORE:WIN2000 - search: not consistent results for nested types
+public class A {
+ class X {
+ }
+
+};
+class S extends A {
+}
+class B {
+ A.X ax;
+ S.X sx;
+}
+*/ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a2/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a2/X.js
new file mode 100644
index 0000000..92fbab9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a2/X.js
@@ -0,0 +1,11 @@
+//package a2;
+///* Test case for bug 5923 Search for "length" field refs finds [].length */
+//public class X {
+// int length = 1;
+// public void foo() {
+/// int[] array = new int[length];
+// for (int i = 0, length = array.length; i < length; i++) {
+// }
+// }
+//}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a3/References.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a3/References.js
new file mode 100644
index 0000000..11f9214
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a3/References.js
@@ -0,0 +1,11 @@
+//package a3;
+//import a3.b.B;
+//public class References {
+// public void foo() {
+// X x1 = new Z(); // single type references
+// a3.b.A a = null; // qualified type reference
+// a3.b.A.B.C inner = null; // qualified type references with inner type
+// Object o = a3.Y.field; // binary reference + qualified name reference
+// X x2 = (B)x1; // single name reference
+// }
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a3/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a3/X.js
new file mode 100644
index 0000000..1d94822
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a3/X.js
@@ -0,0 +1,3 @@
+//package a3;
+//public class X {
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a3/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a3/Y.js
new file mode 100644
index 0000000..a5c3e1e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a3/Y.js
@@ -0,0 +1,4 @@
+//package a3;
+//public class Y extends X {
+// public static Object field = null;
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a3/Z.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a3/Z.js
new file mode 100644
index 0000000..dfaed01
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a3/Z.js
@@ -0,0 +1,3 @@
+//package a3;
+//public class Z extends Y {
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a3/b/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a3/b/A.js
new file mode 100644
index 0000000..3374f34
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a3/b/A.js
@@ -0,0 +1,9 @@
+/*
+public class A {
+ public class B {
+ public class C {
+ }
+ }
+
+}
+*/ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a3/b/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a3/b/B.js
new file mode 100644
index 0000000..86516db
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a3/b/B.js
@@ -0,0 +1,3 @@
+//package a3.b;
+//public class B extends a3.X {
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a4/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a4/X.js
new file mode 100644
index 0000000..0ee785a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a4/X.js
@@ -0,0 +1,8 @@
+/* Test case for bug 6158 Search - Prefix and postfix expression not found as write reference
+public class X {
+ int field;
+ void foo() {
+ field++;
+ }
+}
+*/ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a5/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a5/B.js
new file mode 100644
index 0000000..7cd1d28
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a5/B.js
@@ -0,0 +1,25 @@
+/* Test case for bug 6538 searchDeclarationsOf* incorrect
+
+class A{
+ int i(){
+ return 0;
+ }
+}
+
+class B {
+ int f;
+ void i(){
+ y();
+ Object l= new byte[f];
+ }
+ private void y(){
+ }
+
+}
+
+class C extends A{
+ public int i(){
+ return 0;
+ }
+}
+*/
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a6/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a6/A.js
new file mode 100644
index 0000000..8c67e8a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a6/A.js
@@ -0,0 +1,26 @@
+P.prototype=new Object();
+P.prototype.f=1;
+function P(){}
+function a(){}
+function m() {
+ this.f++;
+ var p= new P();
+ a();
+}
+P.prototype.mm=m;
+/*
+
+class A {
+}
+
+class B extends A {
+ private int f;
+ private class P{}
+ private void a(){}
+ void m() {
+ f++;
+ P p= new P();
+ a();
+ }
+}
+*/ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a7/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a7/X.js
new file mode 100644
index 0000000..2dee611
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a7/X.js
@@ -0,0 +1,8 @@
+/* Test case for bug 6779 searchDeclarationsOfReferencedTyped - missing exception types
+public class X {
+ public void foo() throws MyException {
+ }
+}
+class MyException extends Exception {
+}
+*/ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a8/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a8/A.js
new file mode 100644
index 0000000..48a93ce
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a8/A.js
@@ -0,0 +1,9 @@
+/* Test case for bug 7344 Search - write acces give wrong result
+public class A {
+ public A a;
+ public int i;
+ public void foo(){
+ a.i = 25;
+ }
+}
+*/ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a9/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a9/A.js
new file mode 100644
index 0000000..aade62c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a9/A.js
@@ -0,0 +1,13 @@
+/*
+class B{
+ private void m(){
+ }
+}
+class A extends B{
+ void m(){
+ }
+}
+class C extends A{
+ void m(){
+ }
+*/
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/b1/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/b1/A.js
new file mode 100644
index 0000000..193b1b7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/b1/A.js
@@ -0,0 +1,5 @@
+/* Test case for bug 7987 Field reference search should do lookup in 1.4 mode
+public class A {
+ int x;
+}
+*/ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/b1/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/b1/B.js
new file mode 100644
index 0000000..9b99ae9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/b1/B.js
@@ -0,0 +1,7 @@
+/* Test case for bug 7987 Field reference search should do lookup in 1.4 mode
+public class B extends A {
+ void foo() {
+ this.x++;
+ }
+}
+*/ \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/p/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/p/A.js
new file mode 100644
index 0000000..b9eb5c1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/p/A.js
@@ -0,0 +1,15 @@
+ var DEBUG = false;
+ var x;
+ function A(xi) {
+ x = xi;
+ }
+ function foo() {
+ var jj;
+ DEBUG = true;
+ }
+ function foo2( i, s, x) {
+// x.new Inner().foo();
+ }
+ function main( args) {
+ A(0);
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/p/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/p/X.js
new file mode 100644
index 0000000..666df63
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/p/X.js
@@ -0,0 +1,17 @@
+// public static boolean DEBUG = false;
+// public I field;
+// public class Inner {
+// public String foo() {
+// return "foo";
+// }
+// }
+// public X() {
+// X.DEBUG = true;
+// }
+// public X(int i) {
+// }
+// public static void bar() {
+// }
+// public void foo(int i, String s, X x) {
+// Inner inner = new Inner();
+// }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/p/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/p/Y.js
new file mode 100644
index 0000000..f5e084a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/p/Y.js
@@ -0,0 +1,13 @@
+//package p;
+////public class Y extends X {
+// public Y() {
+// }
+// public Y(int i) {
+// super(i);
+// }
+// public Y(boolean b) {
+// super(1);
+// }
+// public static void bar() {
+// }
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/p/Z.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/p/Z.js
new file mode 100644
index 0000000..d764260
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/p/Z.js
@@ -0,0 +1,12 @@
+//package p;
+//public class Z extends Y {
+// public Z() {
+// }
+// public Z(int i) {
+// super(i);
+// }
+// public void foo(int i, String s, X x) {
+//// super.foo(i, s, new Y(true));
+// }
+//
+//}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/p/cls1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/p/cls1.js
new file mode 100644
index 0000000..91fb18b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/p/cls1.js
@@ -0,0 +1,9 @@
+MyClass.prototype.someMethod = MyClass_someMethod;
+function MyClass()
+{
+ this.field1=0;
+}
+
+function MyClass_someMethod()
+{
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/p/usecls1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/p/usecls1.js
new file mode 100644
index 0000000..f5af2d8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/p/usecls1.js
@@ -0,0 +1,6 @@
+function foo()
+{
+ var myClassObj = new MyClass();
+ myClassObj.someMethod();
+ myClassObj.field1=1;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectSrcTests/src/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectSrcTests/src/A.js
new file mode 100644
index 0000000..fbd84a1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectSrcTests/src/A.js
@@ -0,0 +1 @@
+function AFoo(){} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/B.js
new file mode 100644
index 0000000..0942784
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/B.js
@@ -0,0 +1 @@
+function B(){} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/lib.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/lib.jar
new file mode 100644
index 0000000..e2aadfd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/lib.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/lib142530.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/lib142530.jar
new file mode 100644
index 0000000..6c699ca
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/lib142530.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/lib148949.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/lib148949.jar
new file mode 100644
index 0000000..81c9c64
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/lib148949.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/q/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/q/A.js
new file mode 100644
index 0000000..2ae4ae2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/q/A.js
@@ -0,0 +1 @@
+function A(){} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/q/readme.txt b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/q/readme.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/q/readme.txt
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/x/readme.txt b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/x/readme.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/x/readme.txt
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/x/readme2.txt b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/x/readme2.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/x/readme2.txt
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/x/y/Main.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/x/y/Main.js
new file mode 100644
index 0000000..58ff2b7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/x/y/Main.js
@@ -0,0 +1 @@
+function main(){} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/AbortCompilation.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/AbortCompilation.jar
new file mode 100644
index 0000000..6597012
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/AbortCompilation.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/AbortCompilation.zip b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/AbortCompilation.zip
new file mode 100644
index 0000000..2d827f8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/AbortCompilation.zip
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/MyJar.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/MyJar.jar
new file mode 100644
index 0000000..ab37ac1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/MyJar.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/MyJar.zip b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/MyJar.zip
new file mode 100644
index 0000000..8be4a8e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/MyJar.zip
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/NotInClasspath/p/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/NotInClasspath/p/Y.js
new file mode 100644
index 0000000..cea5616
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/NotInClasspath/p/Y.js
@@ -0,0 +1,13 @@
+package p;
+public class Y extends X {
+ public Y() {
+ }
+ public Y(int i) {
+ super(i);
+ }
+ public Y(boolean b) {
+ super(1);
+ }
+ public static void bar() {
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/b111416.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/b111416.jar
new file mode 100644
index 0000000..a3989f3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/b111416.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/corrupt.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/corrupt.jar
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/corrupt.jar
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/otherSrc()/X31997.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/otherSrc()/X31997.js
new file mode 100644
index 0000000..5f53102
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/otherSrc()/X31997.js
@@ -0,0 +1,3 @@
+/* Test case for bug 31997 Refactoring d.n. work for projects with brackets in name. */
+public class X31997 {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/otherSrc()/X92210.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/otherSrc()/X92210.js
new file mode 100644
index 0000000..5fa491a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/otherSrc()/X92210.js
@@ -0,0 +1,3 @@
+public class X92210 {
+ public void foo() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/otherSrc()/Y31997.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/otherSrc()/Y31997.js
new file mode 100644
index 0000000..1c645f8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/otherSrc()/Y31997.js
@@ -0,0 +1,3 @@
+/* Test case for bug 31997 Refactoring d.n. work for projects with brackets in name. */
+public class Y31997 extends X31997 {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/A.js
new file mode 100644
index 0000000..f2c22b9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/A.js
@@ -0,0 +1,8 @@
+/* Test case for 1GKZ8VZ: ITPJCORE:WINNT - Search - did not find references to member constructor */
+public class A {
+ public class Inner {
+ public Inner(int i) {
+ }
+ }
+ Inner[] field = new Inner[] {new Inner(1), new Inner(2)};
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/B.js
new file mode 100644
index 0000000..0d4bb25
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/B.js
@@ -0,0 +1,4 @@
+/* Test case for PR 1GKEG73: ITPJCORE:WIN2000 - search (136): missing field declaration */
+public class B {
+ private Object[] open;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/CA.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/CA.js
new file mode 100644
index 0000000..184333d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/CA.js
@@ -0,0 +1,16 @@
+/* Test case for 1GIIBC3: ITPJCORE:WINNT - search for method references - missing matches */
+public class CA {
+ class CB {
+ void f() {
+ m();
+ }
+ class CC {
+ void f() {
+ m();
+ }
+ }
+ }
+ void m() {
+ System.out.println("a");
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/D.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/D.js
new file mode 100644
index 0000000..1e486d3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/D.js
@@ -0,0 +1,12 @@
+/* Regression test for 1GL12XE: ITPJCORE:WIN2000 - search: missing field references in inner class */
+public class D {
+ int h;
+ void g() {
+ new Object() {
+ public void run() {
+ int y = 0;
+ h = y;
+ }
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/E.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/E.js
new file mode 100644
index 0000000..ccbf2cb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/E.js
@@ -0,0 +1,7 @@
+/* Test case for 1GHDA2V: ITPJCORE:WINNT - ClassCastException when doing a search */
+public class E {
+ public Object foo() {
+ int[] result = new int[0];
+ return result.clone();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/InterfaceImplementors.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/InterfaceImplementors.js
new file mode 100644
index 0000000..1002b1e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/InterfaceImplementors.js
@@ -0,0 +1,5 @@
+public class InterfaceImplementors extends I implements p.I {
+}
+
+class I {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/MemberTypeReference/Azz.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/MemberTypeReference/Azz.js
new file mode 100644
index 0000000..6d2df05
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/MemberTypeReference/Azz.js
@@ -0,0 +1,19 @@
+package MemberTypeReference;
+public class Azz extends B {
+ class AzzMember extends BMember {
+ class BMember{
+ }
+ }
+ static int fHello;
+ void poo() {
+ B.BMember someVar;
+ super.poo();
+ fHello= 9;
+ }
+}
+
+class BMember extends B {}
+
+class X {
+ Azz.AzzMember.BMember val;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/MemberTypeReference/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/MemberTypeReference/B.js
new file mode 100644
index 0000000..c44a755
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/MemberTypeReference/B.js
@@ -0,0 +1,11 @@
+package MemberTypeReference;
+public class B {
+ protected class BMember{}
+
+ void foo() {
+ Azz.fHello= 1;
+ Object someVar = null;
+ Object o = (Azz.AzzMember.BMember) someVar;
+ }
+ void poo() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/NoReference/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/NoReference/A.js
new file mode 100644
index 0000000..dee58b5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/NoReference/A.js
@@ -0,0 +1,4 @@
+package NoReference;
+public class A {
+ // This class should not be referenced
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/O.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/O.js
new file mode 100644
index 0000000..6655ecd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/O.js
@@ -0,0 +1,9 @@
+/* Regression test for 1GL11J6: ITPJCORE:WIN2000 - search: missing field references (nested types) */
+public class O {
+ int y;
+ class I {
+ void y() {
+ y = 0;
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/ObjectMemberTypeReference/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/ObjectMemberTypeReference/A.js
new file mode 100644
index 0000000..711f9fa
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/ObjectMemberTypeReference/A.js
@@ -0,0 +1,8 @@
+package ObjectMemberTypeReference;
+public class A {
+ class Object {
+ }
+ public void foo() {
+ new Object();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PR_1GGNOTF.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PR_1GGNOTF.js
new file mode 100644
index 0000000..d9e4316
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PR_1GGNOTF.js
@@ -0,0 +1,12 @@
+/* Test case for PR 1GGNOTF: ITPJCORE:WINNT - Search doesn't find method referenced in anonymous inner class */
+public class PR_1GGNOTF {
+ void method() {
+ }
+ void method2() {
+ Runnable r = new Runnable() {
+ public void run() {
+ method();
+ }
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/A.js
new file mode 100644
index 0000000..33f4a3b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/A.js
@@ -0,0 +1,4 @@
+package PackageReference;
+import p3.p2.p.*;
+public class A {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/B.js
new file mode 100644
index 0000000..908890a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/B.js
@@ -0,0 +1,4 @@
+package PackageReference;
+import p3.p2.p.X;
+public class B extends X {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/C.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/C.js
new file mode 100644
index 0000000..a38524d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/C.js
@@ -0,0 +1,3 @@
+package PackageReference;
+public class C extends p3.p2.p.X {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/D.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/D.js
new file mode 100644
index 0000000..c731e0a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/D.js
@@ -0,0 +1,4 @@
+package PackageReference;
+public class D {
+ p3.p2.p.X x;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/E.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/E.js
new file mode 100644
index 0000000..6921c4e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/E.js
@@ -0,0 +1,4 @@
+package PackageReference;
+public class E {
+ Object x = new p3.p2.p.X();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/F.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/F.js
new file mode 100644
index 0000000..d6f96ae
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/F.js
@@ -0,0 +1,6 @@
+package PackageReference;
+public class F {
+ p3.p2.p.X foo() {
+ return null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/G.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/G.js
new file mode 100644
index 0000000..053e243
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/G.js
@@ -0,0 +1,5 @@
+package PackageReference;
+public class G {
+ void foo(p3.p2.p.X x) {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/H.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/H.js
new file mode 100644
index 0000000..5703415
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/H.js
@@ -0,0 +1,6 @@
+package PackageReference;
+public class H {
+ void foo() {
+ p3.p2.p.X x;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/I.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/I.js
new file mode 100644
index 0000000..0e4c152
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/I.js
@@ -0,0 +1,6 @@
+package PackageReference;
+public class I {
+ void foo() {
+ Object x = new p3.p2.p.X();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/J.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/J.js
new file mode 100644
index 0000000..670de80
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/J.js
@@ -0,0 +1,6 @@
+package PackageReference;
+public class J {
+ void foo() {
+ int i = p3.p2.p.X.count;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/K.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/K.js
new file mode 100644
index 0000000..c2cf4f5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/K.js
@@ -0,0 +1,4 @@
+package PackageReference;
+import p3.p2.*;
+public class K {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceA.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceA.js
new file mode 100644
index 0000000..2bc86df
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceA.js
@@ -0,0 +1,4 @@
+package PackageReference;
+import p3.*;
+public class NoReferenceA {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceB.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceB.js
new file mode 100644
index 0000000..9e5de56
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceB.js
@@ -0,0 +1,4 @@
+package PackageReference;
+import p3.X;
+public class NoReferenceB extends X {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceC.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceC.js
new file mode 100644
index 0000000..9d9ff2a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceC.js
@@ -0,0 +1,3 @@
+package PackageReference;
+public class NoReferenceC extends p3.X {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceD.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceD.js
new file mode 100644
index 0000000..6af4d4e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceD.js
@@ -0,0 +1,4 @@
+package PackageReference;
+public class NoReferenceD {
+ p3.X x;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceE.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceE.js
new file mode 100644
index 0000000..db45345
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceE.js
@@ -0,0 +1,4 @@
+package PackageReference;
+public class NoReferenceE {
+ Object x = new p3.X();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceF.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceF.js
new file mode 100644
index 0000000..7af83f2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceF.js
@@ -0,0 +1,6 @@
+package PackageReference;
+public class NoReferenceF {
+ p3.X foo() {
+ return null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceG.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceG.js
new file mode 100644
index 0000000..74fe78d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceG.js
@@ -0,0 +1,5 @@
+package PackageReference;
+public class NoReferenceG {
+ void foo(p3.X x) {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceH.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceH.js
new file mode 100644
index 0000000..405cfb7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceH.js
@@ -0,0 +1,6 @@
+package PackageReference;
+public class NoReferenceH {
+ void foo() {
+ p3.X x;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceI.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceI.js
new file mode 100644
index 0000000..316c3d9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceI.js
@@ -0,0 +1,6 @@
+package PackageReference;
+public class NoReferenceI {
+ void foo() {
+ Object x = new p3.X();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceJ.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceJ.js
new file mode 100644
index 0000000..50188f4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceJ.js
@@ -0,0 +1,6 @@
+package PackageReference;
+public class NoReferenceJ {
+ void foo() {
+ int i = p3.X.count;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/Test.js
new file mode 100644
index 0000000..ca1edbd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/Test.js
@@ -0,0 +1,22 @@
+public class Test {
+
+static {
+ Test var = new Test();
+}
+
+{
+ Test t = null;
+}
+
+public static void main(String[] args) {
+ p.Y y = new p.Y();
+ y.foo(1, "a", y);
+ p.Y.bar();
+
+ p.Z z = new p.Z();
+ z.foo(1, "a", z);
+
+ p.A a = new p.A(y);
+ a.foo(1, "a", a.x);
+}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/TypeReferenceAsSingleNameReference.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/TypeReferenceAsSingleNameReference.js
new file mode 100644
index 0000000..3cc11c5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/TypeReferenceAsSingleNameReference.js
@@ -0,0 +1,12 @@
+public class TypeReferenceAsSingleNameReference {
+
+void hasReference() {
+ TypeReferenceAsSingleNameReference x = null;
+ TypeReferenceAsSingleNameReference = new Object();
+}
+
+void hasNoReference() {
+ Object TypeReferenceAsSingleNameReference = null;
+}
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/TypeReferenceInArray/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/TypeReferenceInArray/A.js
new file mode 100644
index 0000000..c90b466
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/TypeReferenceInArray/A.js
@@ -0,0 +1,5 @@
+package TypeReferenceInArray;
+public class A {
+ A[] a;
+ TypeReferenceInArray.A[] b;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/TypeReferenceInImport/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/TypeReferenceInImport/X.js
new file mode 100644
index 0000000..e28d7fa
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/TypeReferenceInImport/X.js
@@ -0,0 +1,5 @@
+package TypeReferenceInImport;
+import p.Y;
+import p2.Z;
+public class X {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/VariousTypeReferences/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/VariousTypeReferences/A.js
new file mode 100644
index 0000000..46f59fe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/VariousTypeReferences/A.js
@@ -0,0 +1,3 @@
+package VariousTypeReferences;
+public class A {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/VariousTypeReferences/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/VariousTypeReferences/B.js
new file mode 100644
index 0000000..5989bc5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/VariousTypeReferences/B.js
@@ -0,0 +1,5 @@
+package VariousTypeReferences;
+public class B {
+ void foo(A a) {
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/VariousTypeReferences/C.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/VariousTypeReferences/C.js
new file mode 100644
index 0000000..76d8653
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/VariousTypeReferences/C.js
@@ -0,0 +1,6 @@
+package VariousTypeReferences;
+public class C {
+ A foo() {
+ return null;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/VariousTypeReferences/D.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/VariousTypeReferences/D.js
new file mode 100644
index 0000000..8eaea5e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/VariousTypeReferences/D.js
@@ -0,0 +1,4 @@
+package VariousTypeReferences;
+public class D {
+ A foo;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/W.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/W.js
new file mode 100644
index 0000000..251f2c1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/W.js
@@ -0,0 +1,8 @@
+/* Regression test for 1GL9UMH: ITPJCORE:WIN2000 - search: missing type occurrences */
+public class W {
+ static int length = 17;
+ int m() {
+ int[] R = new int[1];
+ return W.length; /*1*/
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/X.js
new file mode 100644
index 0000000..32590ae
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/X.js
@@ -0,0 +1,9 @@
+/* Test case for PR 1GK7K17: ITPJCORE:WIN2000 - search: missing type reference */
+public class X{
+ static void s(){};
+}
+class AA{
+ AA(){
+ X.s(); //<<
+ };
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a/A.js
new file mode 100644
index 0000000..547b21d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a/A.js
@@ -0,0 +1,13 @@
+package a;
+/* Test case for 1GL0MN9: ITPJCORE:WIN2000 - search: not consistent results for nested types */
+public class A {
+ class X {
+ }
+
+};
+class S extends A {
+}
+class B {
+ A.X ax; /*1*/
+ S.X sx; /*2*/
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a2/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a2/X.js
new file mode 100644
index 0000000..d5cb522
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a2/X.js
@@ -0,0 +1,11 @@
+package a2;
+/* Test case for bug 5923 Search for "length" field refs finds [].length */
+public class X {
+ int length = 1;
+ public void foo() {
+ int[] array = new int[length];
+ for (int i = 0, length = array.length; i < length; i++) {
+ }
+ }
+}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a3/References.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a3/References.js
new file mode 100644
index 0000000..a846c93
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a3/References.js
@@ -0,0 +1,11 @@
+package a3;
+import a3.b.B;
+public class References {
+ public void foo() {
+ X x1 = new Z(); // single type references
+ a3.b.A a = null; // qualified type reference
+ a3.b.A.B.C inner = null; // qualified type references with inner type
+ Object o = a3.Y.field; // binary reference + qualified name reference
+ X x2 = (B)x1; // single name reference
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a3/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a3/X.js
new file mode 100644
index 0000000..7f53591
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a3/X.js
@@ -0,0 +1,3 @@
+package a3;
+public class X {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a3/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a3/Y.js
new file mode 100644
index 0000000..58c3a3d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a3/Y.js
@@ -0,0 +1,4 @@
+package a3;
+public class Y extends X {
+ public static Object field = null;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a3/Z.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a3/Z.js
new file mode 100644
index 0000000..23a7d30
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a3/Z.js
@@ -0,0 +1,3 @@
+package a3;
+public class Z extends Y {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a3/b/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a3/b/A.js
new file mode 100644
index 0000000..d5cac96
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a3/b/A.js
@@ -0,0 +1,8 @@
+package a3.b;
+public class A {
+ public class B {
+ public class C {
+ }
+ }
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a3/b/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a3/b/B.js
new file mode 100644
index 0000000..cc1cb78
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a3/b/B.js
@@ -0,0 +1,3 @@
+package a3.b;
+public class B extends a3.X {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a4/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a4/X.js
new file mode 100644
index 0000000..41ac196
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a4/X.js
@@ -0,0 +1,8 @@
+package a4;
+/* Test case for bug 6158 Search - Prefix and postfix expression not found as write reference */
+public class X {
+ int field;
+ void foo() {
+ field++;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a5/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a5/B.js
new file mode 100644
index 0000000..8dcd6af
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a5/B.js
@@ -0,0 +1,25 @@
+package a5;
+/* Test case for bug 6538 searchDeclarationsOf* incorrect */
+
+class A{
+ int i(){
+ return 0;
+ }
+}
+
+class B {
+ int f;
+ void i(){
+ y();
+ Object l= new byte[f];
+ }
+ private void y(){
+ }
+
+}
+
+class C extends A{
+ public int i(){
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a6/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a6/A.js
new file mode 100644
index 0000000..a279325
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a6/A.js
@@ -0,0 +1,15 @@
+package a6;
+
+class A {
+}
+
+class B extends A {
+ private int f;
+ private class P{}
+ private void a(){}
+ void m() {
+ f++;
+ P p= new P();
+ a();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a7/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a7/X.js
new file mode 100644
index 0000000..589910d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a7/X.js
@@ -0,0 +1,8 @@
+package a7;
+/* Test case for bug 6779 searchDeclarationsOfReferencedTyped - missing exception types */
+public class X {
+ public void foo() throws MyException {
+ }
+}
+class MyException extends Exception {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a8/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a8/A.js
new file mode 100644
index 0000000..7b8c65c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a8/A.js
@@ -0,0 +1,9 @@
+package a8;
+/* Test case for bug 7344 Search - write acces give wrong result */
+public class A {
+ public A a;
+ public int i;
+ public void foo(){
+ a.i = 25;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a9/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a9/A.js
new file mode 100644
index 0000000..accd34d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a9/A.js
@@ -0,0 +1,13 @@
+package a9;
+class B{
+ private void m(){
+ }
+}
+class A extends B{
+ void m(){
+ }
+}
+class C extends A{
+ void m(){
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b1/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b1/A.js
new file mode 100644
index 0000000..bc5bf61
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b1/A.js
@@ -0,0 +1,5 @@
+package b1;
+/* Test case for bug 7987 Field reference search should do lookup in 1.4 mode */
+public class A {
+ int x;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b1/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b1/B.js
new file mode 100644
index 0000000..6c833e9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b1/B.js
@@ -0,0 +1,7 @@
+package b1;
+/* Test case for bug 7987 Field reference search should do lookup in 1.4 mode */
+public class B extends A {
+ void foo() {
+ this.x++;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b111416/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b111416/X.js
new file mode 100644
index 0000000..d0e328b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b111416/X.js
@@ -0,0 +1,8 @@
+package b111416;
+
+public class X {
+ static void open(String str) {}
+ void foo() {
+ open("");
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b2/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b2/X.js
new file mode 100644
index 0000000..b06e7cb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b2/X.js
@@ -0,0 +1,6 @@
+package b2;
+/* Test case for bug 8928 Unable to find references or declarations of methods that use static inner classes in the signature */
+public class X {
+ public static class Inner {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b2/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b2/Y.js
new file mode 100644
index 0000000..2f3428f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b2/Y.js
@@ -0,0 +1,6 @@
+package b2;
+/* Test case for bug 8928 Unable to find references or declarations of methods that use static inner classes in the signature */
+public class Y {
+ public void foo(X.Inner inner) {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b2/Z.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b2/Z.js
new file mode 100644
index 0000000..deba095
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b2/Z.js
@@ -0,0 +1,8 @@
+package b2;
+/* Test case for bug 8928 Unable to find references or declarations of methods that use static inner classes in the signature */
+public class Z {
+ void bar() {
+ X.Inner inner = new X.Inner();
+ new Y().foo(inner);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b3/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b3/X.js
new file mode 100644
index 0000000..bf4d69b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b3/X.js
@@ -0,0 +1,14 @@
+package b3;
+/* Test case for bug 9041 search: cannot create a sub-cu scope */
+public class X {
+ Object field = new X();
+ Object foo() {
+ return new X();
+ }
+ class Y {
+ Object field2 = new X();
+ Object foo2() {
+ return new X();
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b4/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b4/A.js
new file mode 100644
index 0000000..96a65d2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b4/A.js
@@ -0,0 +1,6 @@
+package b4;
+/* Test case for bug 9992 Member class declaration not found */
+public class A {
+ public class B {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b5/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b5/A.js
new file mode 100644
index 0000000..21df34a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b5/A.js
@@ -0,0 +1,10 @@
+package b5;
+/* Test case for bug 9642 Search - missing inaccurate type matches */
+import x.y.Zork;
+public class A {
+ {
+ Zork[] zork = new Zork[0];
+ int i = Zork.foo;
+ }
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b6/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b6/A.js
new file mode 100644
index 0000000..e150c12
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b6/A.js
@@ -0,0 +1,8 @@
+package b6;
+/* Test case for bug 10386 NPE in MatchLocator.lookupType */
+public class A {
+ int[] field;
+ int foo() {
+ return this.field.length;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b7/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b7/X.js
new file mode 100644
index 0000000..db72d6e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b7/X.js
@@ -0,0 +1,14 @@
+package b7;
+/* Test case for bug 16751 Renaming a class doesn't update all references */
+class SuperClass {
+ public static final String CONSTANT = "value";
+}
+
+class SubClass extends SuperClass {
+}
+
+class Test {
+ public static void main(String[] arguments) {
+ System.out.println(SubClass.CONSTANT);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b8/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b8/Test.js
new file mode 100644
index 0000000..0328f25
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b8/Test.js
@@ -0,0 +1,6 @@
+package b8;
+/* Test case for bug 17906 Rename package fails when inner classes are imported */
+public class Test {
+ public static class InnerTest {
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b9/Foo.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b9/Foo.js
new file mode 100644
index 0000000..47b8acf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b9/Foo.js
@@ -0,0 +1,5 @@
+package b9;
+/* Test case for bug 17906 Rename package fails when inner classes are imported */
+import b8.Test.InnerTest;
+public class Foo {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c1/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c1/A.js
new file mode 100644
index 0000000..341fab2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c1/A.js
@@ -0,0 +1,5 @@
+package c1;
+/* Test case for bug 12649 Missing import after move */
+class A{
+ int i= I.II;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c1/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c1/B.js
new file mode 100644
index 0000000..512b2fa
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c1/B.js
@@ -0,0 +1,5 @@
+package c1;
+/* Test case for bug 12649 Missing import after move */
+class B{
+ int i= I.i;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c1/I.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c1/I.js
new file mode 100644
index 0000000..4d6171d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c1/I.js
@@ -0,0 +1,5 @@
+package c1;
+/* Test case for bug 12649 Missing import after move */
+interface I{
+ int i= 0;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c10/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c10/X.js
new file mode 100644
index 0000000..4e0e988
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c10/X.js
@@ -0,0 +1,11 @@
+package c10;
+/* Test case for bug 43276 How to search for implicit constructors */
+class X {
+ class Inner {
+ }
+}
+class B extends X.Inner {
+ B() {
+ new X().super();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c11/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c11/A.js
new file mode 100644
index 0000000..39b7fc1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c11/A.js
@@ -0,0 +1,11 @@
+package c11;
+public class A {}
+class A1 extends A {}
+class A2 extends A {
+ public A2() {}
+}
+class A3 extends A {
+ public A3() {
+ super();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c2/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c2/A.js
new file mode 100644
index 0000000..35e5491
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c2/A.js
@@ -0,0 +1,7 @@
+package c2;
+/* Test case for bug 18418 search: searchDeclarationsOfReferencedTypes reports import declarations */
+import c3.C;
+public class A{
+ C c;
+ c3.C c3c;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c2/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c2/B.js
new file mode 100644
index 0000000..2086015
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c2/B.js
@@ -0,0 +1,9 @@
+package c2;
+/* Test case for bug 18418 search: searchDeclarationsOfReferencedTypes reports import declarations */
+import c3.C;
+public class B{
+ C c;
+ c3.C m(C C, A A){
+ return C;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c3/C.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c3/C.js
new file mode 100644
index 0000000..e997d5f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c3/C.js
@@ -0,0 +1,11 @@
+package c3;
+/* Test case for bug 18418 search: searchDeclarationsOfReferencedTypes reports import declarations */
+import c2.A;
+import c2.*;
+import c2.B;
+public class C{
+ A a;
+ c2.A c2a;
+ B b;
+ c2.B c2B;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c4/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c4/X.js
new file mode 100644
index 0000000..8e953e2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c4/X.js
@@ -0,0 +1,8 @@
+package c4;
+/* Test case for bug 20693 Finding references to variables does not find all occurances */
+public class X {
+ int x;
+ int foo() {
+ return (this.x);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c5/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c5/Test.js
new file mode 100644
index 0000000..8aec274
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c5/Test.js
@@ -0,0 +1,5 @@
+package c5;
+/* Test case for bug 21763 Problem in Java search [search] */
+public class Test {
+ public String class_path;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c6/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c6/X.js
new file mode 100644
index 0000000..562a016
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c6/X.js
@@ -0,0 +1,10 @@
+package c6;
+/* Test case for bug 24346 Method declaration not found in field initializer*/
+public class X {
+ public void bar() {
+ }
+ public Object x = new Object() {
+ public void foo24346() {
+ }
+ };
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c7/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c7/X.js
new file mode 100644
index 0000000..2d679c8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c7/X.js
@@ -0,0 +1,6 @@
+package c7;
+/* Test case for bug 23112 search: need a way to search for references to the implicit non-arg constructor */
+public class X {
+ public X() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c7/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c7/Y.js
new file mode 100644
index 0000000..d2b89de
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c7/Y.js
@@ -0,0 +1,6 @@
+package c7;
+/* Test case for bug 23112 search: need a way to search for references to the implicit non-arg constructor */
+public class Y extends X {
+ public Y() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c8/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c8/X.js
new file mode 100644
index 0000000..495abcc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c8/X.js
@@ -0,0 +1,4 @@
+package c8;
+/* Test case for bug 23112 search: need a way to search for references to the implicit non-arg constructor */
+public class X {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c8/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c8/Y.js
new file mode 100644
index 0000000..72830d8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c8/Y.js
@@ -0,0 +1,4 @@
+package c8;
+/* Test case for bug 23112 search: need a way to search for references to the implicit non-arg constructor */
+public class Y extends X {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c9/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c9/X.js
new file mode 100644
index 0000000..c73ed73
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c9/X.js
@@ -0,0 +1,6 @@
+package c9;
+/* Test case for bug 25859 Error doing Java Search */
+public class X {
+}
+class AbcdefghijklmnopqrstuvwxyzAbcdefghijklmnopqrstuvwxyzAbcdefghijklmnopqrstuvwxyzAbcdefghijklmnopqrstuvwxyzAbcdefghijklmnopqrstuvwxyzAbcdefghijklmnopqrstuvwxyzAbcdefghijklmnopqrstuvwxyzAbcdefghijklmnopqrstuvwxyzAbcdefghijklmnopqrstuvwxyzAbcdefghijklmnopqrstuvwxyzAbcdefghijklmnopqrstuvwxyz {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d1/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d1/X.js
new file mode 100644
index 0000000..13bc3f6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d1/X.js
@@ -0,0 +1,10 @@
+package d1;
+/* Test case for bug 24934 Move top level doesn't optimize the imports[refactoring] */
+import d2.Y;
+import d2.Z;
+public class X {
+ public class Inner {
+ Y y;
+ }
+ Z z;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d2/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d2/Y.js
new file mode 100644
index 0000000..6ba4ffc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d2/Y.js
@@ -0,0 +1,4 @@
+package d2;
+/* Test case for bug 24934 Move top level doesn't optimize the imports[refactoring] */
+public class Y {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d2/Z.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d2/Z.js
new file mode 100644
index 0000000..c1f9ff6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d2/Z.js
@@ -0,0 +1,4 @@
+package d2;
+/* Test case for bug 24934 Move top level doesn't optimize the imports[refactoring] */
+public class Z {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d3/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d3/A.js
new file mode 100644
index 0000000..1536a49
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d3/A.js
@@ -0,0 +1,7 @@
+package d3;
+public class A {
+}
+class B {
+ void foo() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d4/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d4/X.js
new file mode 100644
index 0000000..484b896
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d4/X.js
@@ -0,0 +1,6 @@
+package d4;
+public class X {
+ Object foo() {
+ return d4.Y.bar();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d4/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d4/Y.js
new file mode 100644
index 0000000..69d8f73
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d4/Y.js
@@ -0,0 +1,6 @@
+package d4;
+public class Y {
+ public static Object bar() {
+ return null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d5/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d5/X.js
new file mode 100644
index 0000000..153176b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d5/X.js
@@ -0,0 +1,4 @@
+package d5;
+class X { // non-public class
+ static String S;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d5/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d5/Y.js
new file mode 100644
index 0000000..1381f21
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d5/Y.js
@@ -0,0 +1,6 @@
+package d5;
+public class Y {
+ String T = d5.X.S;
+ Class c = d5.X.class;
+ Object o = (d5.X) null;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d6/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d6/X.js
new file mode 100644
index 0000000..d582455
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d6/X.js
@@ -0,0 +1,5 @@
+package d6;
+public class X {
+ private static String CONSTANT;
+ private int foo;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d6/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d6/Y.js
new file mode 100644
index 0000000..6abaf62
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d6/Y.js
@@ -0,0 +1,5 @@
+package d6;
+public class Y {
+ String T = X.CONSTANT;
+ int i = new X().foo;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d7/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d7/A.js
new file mode 100644
index 0000000..3599a95
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d7/A.js
@@ -0,0 +1,13 @@
+package d7;
+/* Test case for bug 29516 SearchEngine regressions in 20030114 */
+class A{
+ A A;
+ A A(A A){
+ A:
+ for (;;){
+ if (A.A(A)==A)
+ break A;
+ }
+ return A;
+ };
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d8/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d8/A.js
new file mode 100644
index 0000000..57c8932
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d8/A.js
@@ -0,0 +1,4 @@
+package d8;
+/* Test case for bug 29524 Search for declaration via patterns adds '"*" */
+public class A {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d8/AA.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d8/AA.js
new file mode 100644
index 0000000..f90907f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d8/AA.js
@@ -0,0 +1,4 @@
+package d8;
+/* Test case for bug 29524 Search for declaration via patterns adds '"*" */
+public class AA {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d9/p1/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d9/p1/A.js
new file mode 100644
index 0000000..9f5014c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d9/p1/A.js
@@ -0,0 +1,4 @@
+package d9.p1;
+/* Test case for bug 28236 Search for refs to class in hierarchy matches class outside hierarchy */
+public class A {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d9/p2/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d9/p2/B.js
new file mode 100644
index 0000000..2389cf9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d9/p2/B.js
@@ -0,0 +1,6 @@
+package d9.p2;
+/* Test case for bug 28236 Search for refs to class in hierarchy matches class outside hierarchy */
+import d9.p1.A;
+public class B {
+ A a;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e1/A29366.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e1/A29366.js
new file mode 100644
index 0000000..f7e5932
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e1/A29366.js
@@ -0,0 +1,10 @@
+package e1;
+/* Test case for bug 29366 Search reporting invalid inaccurate match */
+public class A29366 {
+ public void foo() {
+ A29366 a;
+ }
+ public void bar() {
+ new int[]{ 1
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e2/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e2/X.js
new file mode 100644
index 0000000..e76396e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e2/X.js
@@ -0,0 +1,12 @@
+package e2;
+/* Test case for bug 38568 Search for method declarations fooled by array types */
+public class X {
+ public void foo() {
+ }
+ public void foo(String arg1, String arg2) {
+ }
+ public void foo(String arg1, String[] arg2) {
+ }
+ public void foo(String arg1, Object arg2) {
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e3/X31985.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e3/X31985.js
new file mode 100644
index 0000000..69c6ef7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e3/X31985.js
@@ -0,0 +1,5 @@
+package e3;
+/* Test case for bug 31985 NPE searching non-qualified and case insensitive type ref */
+public class X31985 {
+ static X31985 CONSTANT;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e3/Y31985.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e3/Y31985.js
new file mode 100644
index 0000000..0b979b0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e3/Y31985.js
@@ -0,0 +1,7 @@
+package e3;
+/* Test case for bug 31985 NPE searching non-qualified and case insensitive type ref */
+public class Y31985 {
+ Object foo() {
+ return X31985.CONSTANT;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e4/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e4/A.js
new file mode 100644
index 0000000..4b4f84f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e4/A.js
@@ -0,0 +1,7 @@
+package e4;
+
+public class A{
+ public static class Inner{
+ public class InnerInner{}
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e5/A1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e5/A1.js
new file mode 100644
index 0000000..6d008a7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e5/A1.js
@@ -0,0 +1,10 @@
+package e5;
+
+import e4.A.Inner;
+
+public class A1{
+ e4.A.Inner a;
+ e4.A.Inner.InnerInner a1;
+ Inner a2;
+ Inner.InnerInner a3;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e6/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e6/A.js
new file mode 100644
index 0000000..50749fc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e6/A.js
@@ -0,0 +1,7 @@
+package e6;
+/* Test case for bug 36479 Rename operation during refactoring fails */
+public class A {
+ Object foo() {
+ return (B36479.C)this;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e7/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e7/A.js
new file mode 100644
index 0000000..174a101
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e7/A.js
@@ -0,0 +1,5 @@
+package e7;
+/* Test case for bug 39831 Search finds only "inexact" matches */
+public class A {
+ A a;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e8/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e8/A.js
new file mode 100644
index 0000000..18ac155
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e8/A.js
@@ -0,0 +1,6 @@
+package e8;
+/* Test case for bug 43080 NPE when searching in CU with incomplete method declaration */
+public class A {
+ native m() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e9/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e9/A.js
new file mode 100644
index 0000000..d19794a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e9/A.js
@@ -0,0 +1,13 @@
+package e9;
+/* Test case for bug 49120 search doesn't find references to anonymous inner methods*/
+public class A {
+ public void bar() {
+ }
+ public void foo() {
+ A a = new A() {
+ public void bar() {
+ }
+ };
+ a.bar();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/f1/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/f1/X.js
new file mode 100644
index 0000000..0b9abfa
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/f1/X.js
@@ -0,0 +1,12 @@
+package f1;
+public class X {
+ int field;
+ void foo1() {
+ int var1 = 1;
+ var1++;
+ }
+ void foo2() {
+ X var2 = new X();
+ var2.field++;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/f2/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/f2/X.js
new file mode 100644
index 0000000..1114dad
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/f2/X.js
@@ -0,0 +1,12 @@
+package f2;
+public class X {
+ Object foo1() {
+ class Y {
+ }
+ return new Y();
+ }
+ Object foo2() {
+ return new X() {
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/f3/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/f3/X.js
new file mode 100644
index 0000000..87f1a25
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/f3/X.js
@@ -0,0 +1,24 @@
+package f3;
+public class X {
+ void foo() {
+ new X() {
+ };
+ new X() {
+ void foobar() {
+ bar();
+ }
+ };
+ if (true) {
+ class Y {
+ }
+ } else {
+ class Y {
+ void foobar() {
+ bar();
+ }
+ }
+ }
+ }
+ void bar() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j1/JavadocHiddenRef.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j1/JavadocHiddenRef.js
new file mode 100644
index 0000000..0caba9b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j1/JavadocHiddenRef.js
@@ -0,0 +1,18 @@
+package j1;
+
+/**
+ * Class with valid references
+ */
+public class JavadocHiddenRef {
+ /**
+ * References are hidden in strings
+ * @see "JavadocSearched"
+ * @see "JavadocSearched#JavadocSearched()"
+ * @see "j1.JavadocSearched#JavadocSearched(String)"
+ * @see "JavadocSearched#javadocSearchedVar"
+ * @see "JavadocSearched#javadocSearchedMethod()"
+ * @see "JavadocSearched#javadocSearchedMethod(String)"
+ */
+ void hidden() {}
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j1/JavadocInvalidRef.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j1/JavadocInvalidRef.js
new file mode 100644
index 0000000..d712284
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j1/JavadocInvalidRef.js
@@ -0,0 +1,20 @@
+package j1;
+
+/**
+ * Class with invalid references
+ */
+public class JavadocInvalidRef {
+ /**
+ * @see #javadocSearchedVar
+ * @see Javadocsearched#JavadocSearched()
+ * @see j1.JavadocSearched#Javadocsearched(String)
+ * @see JavadocSearched#JavadocSearched(int)
+ * @see Javadocsearched#javadocSearchedVar
+ * @see JavadocSearched#javadocsearchedvar
+ * @see Javadocsearched#javadocSearchedMethod()
+ * @see JavadocSearched#javadocsearchedmethod()
+ * @see JavadocSearched#javadocSearchedMethod(int)
+ */
+ void invalid() {}
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j1/JavadocSearched.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j1/JavadocSearched.js
new file mode 100644
index 0000000..cf7729b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j1/JavadocSearched.js
@@ -0,0 +1,9 @@
+package j1;
+
+public class JavadocSearched {
+ public JavadocSearched() {}
+ public JavadocSearched(String str) {}
+ int javadocSearchedVar;
+ public void javadocSearchedMethod() {}
+ public void javadocSearchedMethod(String str) {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j1/JavadocValidRef.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j1/JavadocValidRef.js
new file mode 100644
index 0000000..5c3a6b7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j1/JavadocValidRef.js
@@ -0,0 +1,17 @@
+package j1;
+
+/**
+ * Class with valid references
+ */
+public class JavadocValidRef {
+ /**
+ * @see JavadocSearched
+ * @see JavadocSearched#JavadocSearched()
+ * @see j1.JavadocSearched#JavadocSearched(String)
+ * @see JavadocSearched#javadocSearchedVar
+ * @see JavadocSearched#javadocSearchedMethod()
+ * @see JavadocSearched#javadocSearchedMethod(String)
+ */
+ void valid() {}
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j2/Bug47968.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j2/Bug47968.js
new file mode 100644
index 0000000..0dedaf4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j2/Bug47968.js
@@ -0,0 +1,6 @@
+package j2;
+public class Bug47968 {
+ public int x;
+ public Bug47968(String str) {}
+ public void foo(int x) {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j2/Bug47968s.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j2/Bug47968s.js
new file mode 100644
index 0000000..f59c5e7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j2/Bug47968s.js
@@ -0,0 +1,30 @@
+package j2;
+/**
+ * @see Bug47968
+ * @see Bug47968#x
+ * @see Bug47968#Bug47968(String)
+ * @see Bug47968#foo(int)
+ */
+public class Bug47968s {
+ /**
+ * @see Bug47968
+ * @see Bug47968#x
+ * @see Bug47968#Bug47968(String)
+ * @see Bug47968#foo(int)
+ */
+ public int y;
+ /**
+ * @see Bug47968
+ * @see Bug47968#x
+ * @see Bug47968#Bug47968(String)
+ * @see Bug47968#foo(int)
+ */
+ public Bug47968s() {}
+ /**
+ * @see Bug47968
+ * @see Bug47968#x
+ * @see Bug47968#Bug47968(String)
+ * @see Bug47968#foo(int)
+ */
+ public void bar() {}
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j3/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j3/Y.js
new file mode 100644
index 0000000..561b13a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j3/Y.js
@@ -0,0 +1,5 @@
+package j3;
+public class Y {
+ public Y(int x) {}
+ public void foo() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/CC47209.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/CC47209.js
new file mode 100644
index 0000000..99ee97c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/CC47209.js
@@ -0,0 +1,9 @@
+package j4;
+public class CC47209 {
+ public int f47209;
+ /**
+ * @see CC47209#CC47209(String)
+ */
+ public CC47209(String str) {}
+ public void m47209(int x) {}
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/CF47209.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/CF47209.js
new file mode 100644
index 0000000..db006da
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/CF47209.js
@@ -0,0 +1,9 @@
+package j4;
+public class CF47209 {
+ /**
+ * @see CF47209#CF47209(String)
+ */
+ public int f47209;
+ public CF47209(String str) {}
+ public void m47209(int x) {}
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/CM47209.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/CM47209.js
new file mode 100644
index 0000000..b90d7ea
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/CM47209.js
@@ -0,0 +1,9 @@
+package j4;
+public class CM47209 {
+ public int f47209;
+ public CM47209(String str) {}
+ /**
+ * @see CM47209#CM47209(String)
+ */
+ public void m47209(int x) {}
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/CT47209.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/CT47209.js
new file mode 100644
index 0000000..b864b05
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/CT47209.js
@@ -0,0 +1,9 @@
+package j4;
+/**
+ * @see CT47209#CT47209(String)
+ */
+public class CT47209 {
+ public int f47209;
+ public CT47209(String str) {}
+ public void m47209(int x) {}
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/FC47209.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/FC47209.js
new file mode 100644
index 0000000..6a03206
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/FC47209.js
@@ -0,0 +1,9 @@
+package j4;
+public class FC47209 {
+ public int f47209;
+ /**
+ * @see FC47209#f47209
+ */
+ public FC47209(String str) {}
+ public void m47209(int x) {}
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/FF47209.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/FF47209.js
new file mode 100644
index 0000000..98c94e3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/FF47209.js
@@ -0,0 +1,9 @@
+package j4;
+public class FF47209 {
+ /**
+ * @see FF47209#f47209
+ */
+ public int f47209;
+ public FF47209(String str) {}
+ public void m47209(int x) {}
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/FM47209.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/FM47209.js
new file mode 100644
index 0000000..02a735d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/FM47209.js
@@ -0,0 +1,9 @@
+package j4;
+public class FM47209 {
+ public int f47209;
+ public FM47209(String str) {}
+ /**
+ * @see FM47209#f47209
+ */
+ public void m47209(int x) {}
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/FT47209.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/FT47209.js
new file mode 100644
index 0000000..7e4883f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/FT47209.js
@@ -0,0 +1,9 @@
+package j4;
+/**
+ * @see FT47209#f47209
+ */
+public class FT47209 {
+ public int f47209;
+ public FT47209(String str) {}
+ public void m47209(int x) {}
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/MC47209.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/MC47209.js
new file mode 100644
index 0000000..c090b93
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/MC47209.js
@@ -0,0 +1,9 @@
+package j4;
+public class MC47209 {
+ public int f47209;
+ /**
+ * @see MC47209#m47209(int)
+ */
+ public MC47209(String str) {}
+ public void m47209(int x) {}
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/MF47209.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/MF47209.js
new file mode 100644
index 0000000..662412c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/MF47209.js
@@ -0,0 +1,9 @@
+package j4;
+public class MF47209 {
+ /**
+ * @see MF47209#m47209(int)
+ */
+ public int f47209;
+ public MF47209(String str) {}
+ public void m47209(int x) {}
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/MM47209.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/MM47209.js
new file mode 100644
index 0000000..e24c391
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/MM47209.js
@@ -0,0 +1,9 @@
+package j4;
+public class MM47209 {
+ public int f47209;
+ public MM47209(String str) {}
+ /**
+ * @see MM47209#m47209(int)
+ */
+ public void m47209(int x) {}
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/MT47209.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/MT47209.js
new file mode 100644
index 0000000..6b963b7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/MT47209.js
@@ -0,0 +1,9 @@
+package j4;
+/**
+ * @see MT47209#m47209(int)
+ */
+public class MT47209 {
+ public int f47209;
+ public MT47209(String str) {}
+ public void m47209(int x) {}
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/TC47209.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/TC47209.js
new file mode 100644
index 0000000..cfa507e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/TC47209.js
@@ -0,0 +1,9 @@
+package j4;
+public class TC47209 {
+ public int f47209;
+ /**
+ * @see TC47209
+ */
+ public TC47209(String str) {}
+ public void m47209(int x) {}
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/TF47209.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/TF47209.js
new file mode 100644
index 0000000..dc2a390
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/TF47209.js
@@ -0,0 +1,9 @@
+package j4;
+public class TF47209 {
+ /**
+ * @see TF47209
+ */
+ public int f47209;
+ public TF47209(String str) {}
+ public void m47209(int x) {}
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/TM47209.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/TM47209.js
new file mode 100644
index 0000000..eb2a6bc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/TM47209.js
@@ -0,0 +1,9 @@
+package j4;
+public class TM47209 {
+ public int f47209;
+ public TM47209(String str) {}
+ /**
+ * @see TM47209
+ */
+ public void m47209(int x) {}
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/TT47209.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/TT47209.js
new file mode 100644
index 0000000..c60c3aa
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/TT47209.js
@@ -0,0 +1,9 @@
+package j4;
+/**
+ * @see TT47209
+ */
+public class TT47209 {
+ public int f47209;
+ public TT47209(String str) {}
+ public void m47209(int x) {}
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j5/Bug49994.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j5/Bug49994.js
new file mode 100644
index 0000000..44ad7b6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j5/Bug49994.js
@@ -0,0 +1,15 @@
+/**
+ * Need this header comment to have inexact matches occur.
+ */
+package j5;
+public class Bug49994 {
+ int field;
+ public Bug49994(String str) {}
+ void bar() {}
+ /**
+ * @see #field
+ * @see #bar()
+ * @see #Bug49994(String)
+ */
+ void foo() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j6/Bug54962.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j6/Bug54962.js
new file mode 100644
index 0000000..03b11fc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j6/Bug54962.js
@@ -0,0 +1,8 @@
+package j6;
+/**
+ * @see j6
+ * @see j6.BUG54962
+ * @see j6.Bug54962
+ */
+public class Bug54962 {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j7/qua/li/fied/Bug54962a.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j7/qua/li/fied/Bug54962a.js
new file mode 100644
index 0000000..9caab71
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j7/qua/li/fied/Bug54962a.js
@@ -0,0 +1,10 @@
+package j7.qua.li.fied;
+import j6.Bug54962;
+/**
+ * @see j7.qua.li.fied
+ * @see j7.qua.li.fied.BUG54962a
+ * @see j7.qua.li.fied.Bug54962a
+ */
+public class Bug54962a {
+ Bug54962 j6 = new Bug54962();
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/net/sf/saxon/om/Navigator.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/net/sf/saxon/om/Navigator.js
new file mode 100644
index 0000000..05498d7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/net/sf/saxon/om/Navigator.js
@@ -0,0 +1,637 @@
+package net.sf.saxon.om;
+
+public final class Navigator {
+
+ /**
+ * Determine if a string is all-whitespace
+ *
+ * @param content the string to be tested
+ * @return true if the supplied string contains no non-whitespace
+ * characters
+ */
+
+ public final static boolean isWhite(CharSequence content) {
+ for (int i=0; i<content.length();) {
+ // all valid XML whitespace characters, and only whitespace characters, are <= 0x20
+ if (content.charAt(i++) > 32) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Get the string value of an attribute of a given element, given the URI and
+ * local part of the attribute name.
+ * @return the attribute value, or null if the attribute is not present
+ */
+
+ public static String getAttributeValue(NodeInfo element, String uri, String localName) {
+ int fingerprint = element.getNamePool().allocate("", uri, localName);
+ return element.getAttributeValue(fingerprint);
+ }
+
+ /**
+ * Get an absolute XPath expression that identifies a given node within its document
+ *
+ * @param node the node whose path is required
+ * @return a path expression that can be used to retrieve the node
+ */
+
+ public static String getPath(NodeInfo node) {
+ String pre;
+ NodeInfo parent = node.getParent();
+ // System.err.println("node = " + node + " parent = " + parent);
+ // Handle parentless nodes of any kind
+ if (parent==null) return "/";
+ switch (node.getNodeKind()) {
+ case Type.DOCUMENT:
+ return "/";
+ case Type.ELEMENT:
+ pre = getPath(parent);
+ return (pre.equals("/") ? "" : pre) +
+ "/" + node.getDisplayName() + "[" + getNumberSimple(node) + "]";
+ case Type.ATTRIBUTE:
+ return getPath(parent) + "/@" + node.getDisplayName();
+ case Type.TEXT:
+ pre = getPath(parent);
+ return (pre.equals("/") ? "" : pre) +
+ "/text()[" + getNumberSimple(node) + "]";
+ case Type.COMMENT:
+ pre = getPath(parent);
+ return (pre.equals("/") ? "" : pre) +
+ "/comment()[" + getNumberSimple(node) + "]";
+ case Type.PROCESSING_INSTRUCTION:
+ pre = getPath(parent);
+ return (pre.equals("/") ? "" : pre) +
+ "/processing-instruction()[" + getNumberSimple(node) + "]";
+ default:
+ return "";
+ }
+ }
+
+ /**
+ * Get simple node number. This is defined as one plus the number of previous siblings of the
+ * same node type and name. It is not accessible directly in XSL.
+ *
+ * @param node The node whose number is required
+ * @param controller Used for remembering previous result, for
+ * performance
+ * @exception XPathException if any error occurs
+ * @return the node number, as defined above
+ */
+
+ public static int getNumberSimple(NodeInfo node, Controller controller) throws XPathException {
+
+ //checkNumberable(node);
+
+ int fingerprint = node.getFingerprint();
+ NodeTest same;
+
+ if (fingerprint==-1) {
+ same = NodeKindTest.makeNodeKindTest(node.getNodeKind());
+ } else {
+ same = new NameTest(node);
+ }
+
+ SequenceIterator preceding = node.iterateAxis(Axis.PRECEDING_SIBLING, same);
+
+ int i=1;
+ while (true) {
+ NodeInfo prev = (NodeInfo)preceding.next();
+ if (prev == null) {
+ break;
+ }
+
+ int memo = controller.getRememberedNumber(prev);
+ if (memo>0) {
+ memo += i;
+ controller.setRememberedNumber(node, memo);
+ return memo;
+ }
+
+ i++;
+ }
+
+ controller.setRememberedNumber(node, i);
+ return i;
+ }
+
+ /**
+ * Get simple node number. This is defined as one plus the number of previous siblings of the
+ * same node type and name. It is not accessible directly in XSL. This version doesn't require
+ * the controller, and therefore doesn't remember previous results. It is used only by getPath().
+ *
+ * @param node the node whose number is required
+ * @return the node number, as defined above
+ */
+
+ private static int getNumberSimple(NodeInfo node) {
+
+ int fingerprint = node.getFingerprint();
+ NodeTest same;
+
+ if (fingerprint==-1) {
+ same = NodeKindTest.makeNodeKindTest(node.getNodeKind());
+ } else {
+ same = new NameTest(node);
+ }
+
+ AxisIterator preceding = node.iterateAxis(Axis.PRECEDING_SIBLING, same);
+
+ int i=1;
+ while (preceding.next() != null) {
+ i++;
+ }
+
+ return i;
+ }
+
+ /**
+ * Get node number (level="single"). If the current node matches the supplied pattern, the returned
+ * number is one plus the number of previous siblings that match the pattern. Otherwise,
+ * return the element number of the nearest ancestor that matches the supplied pattern.
+ *
+ * @param node the current node, the one whose node number is required
+ * @param count Pattern that identifies which nodes should be
+ * counted. Default (null) is the element name if the current node is
+ * an element, or "node()" otherwise.
+ * @param from Pattern that specifies where counting starts from.
+ * Default (null) is the root node. (This parameter does not seem
+ * useful but is included for the sake of XSLT conformance.)
+ * @param controller the controller of the transformation, used if
+ * the patterns reference context values (e.g. variables)
+ * @exception XPathException when any error occurs in processing
+ * @return the node number established as follows: go to the nearest
+ * ancestor-or-self that matches the 'count' pattern and that is a
+ * descendant of the nearest ancestor that matches the 'from' pattern.
+ * Return one plus the nunber of preceding siblings of that ancestor
+ * that match the 'count' pattern. If there is no such ancestor,
+ * return 0.
+ */
+
+ public static int getNumberSingle(NodeInfo node, Pattern count,
+ Pattern from, Controller controller) throws XPathException {
+
+// checkNumberable(node);
+
+ if (count==null && from==null) {
+ return getNumberSimple(node, controller);
+ }
+
+ boolean knownToMatch = false;
+ if (count==null) {
+ if (node.getFingerprint()==-1) { // unnamed node
+ count = NodeKindTest.makeNodeKindTest(node.getNodeKind());
+ } else {
+ count = new NameTest(node);
+ }
+ knownToMatch = true;
+ }
+
+ NodeInfo target = node;
+ while (!(knownToMatch || count.matches(target, controller))) {
+ target = target.getParent();
+ if (target==null) {
+ return 0;
+ }
+ if (from!=null && from.matches(target, controller)) {
+ return 0;
+ }
+ }
+
+ // we've found the ancestor to count from
+
+ SequenceIterator preceding =
+ target.iterateAxis(Axis.PRECEDING_SIBLING, count.getNodeTest());
+ // pass the filter condition down to the axis enumeration where possible
+ boolean alreadyChecked = (count instanceof NodeTest);
+ int i = 1;
+ while (true) {
+ NodeInfo p = (NodeInfo)preceding.next();
+ if (p == null) {
+ return i;
+ }
+ if (alreadyChecked || count.matches(p, controller)) {
+ i++;
+ }
+ }
+ }
+
+ /**
+ * Get node number (level="any").
+ * Return one plus the number of previous nodes in the
+ * document that match the supplied pattern
+ *
+ * @exception XPathException
+ * @param inst Identifies the xsl:number instruction; this is relevant
+ * when the function is memoised to support repeated use of the same
+ * instruction to number modulple nodes
+ * @param node Identifies the xsl:number instruction; this is
+ * relevant when the function is memoised to support repeated use of
+ * the same instruction to number modulple nodes
+ * @param count Pattern that identifies which nodes should be
+ * counted. Default (null) is the element name if the current node is
+ * an element, or "node()" otherwise.
+ * @param from Pattern that specifies where counting starts from.
+ * Default (null) is the root node. Only nodes after the first (most
+ * recent) node that matches the 'from' pattern are counted.
+ * @param controller The controller
+ * @param hasVariablesInPatterns if the count or from patterns
+ * contain variables, then it's not safe to get the answer by adding
+ * one to the number of the most recent node that matches
+ * @return one plus the number of nodes that precede the current node,
+ * that match the count pattern, and that follow the first node that
+ * matches the from pattern if specified.
+ */
+
+ public static int getNumberAny(Instruction inst, NodeInfo node, Pattern count,
+ Pattern from, Controller controller, boolean hasVariablesInPatterns) throws XPathException {
+
+ NodeInfo memoNode = null;
+ int memoNumber = 0;
+ boolean memoise = (!hasVariablesInPatterns && count!=null);
+ if (memoise) {
+ Object[] memo = (Object[])controller.getUserData(inst, "xsl:number");
+ if (memo != null) {
+ memoNode = (NodeInfo)memo[0];
+ memoNumber = ((Integer)memo[1]).intValue();
+ }
+ }
+
+ int num = 0;
+ if (count==null) {
+ if (node.getFingerprint()==-1) { // unnamed node
+ count = NodeKindTest.makeNodeKindTest(node.getNodeKind());
+ } else {
+ count = new NameTest(node);
+ }
+ num = 1;
+ } else if (count.matches(node, controller)) {
+ num = 1;
+ }
+
+ // We use a special axis invented for the purpose: the union of the preceding and
+ // ancestor axes, but in reverse document order
+
+ // Pass part of the filtering down to the axis iterator if possible
+ NodeTest filter;
+ if (from==null) {
+ filter = count.getNodeTest();
+ } else if (from.getNodeKind()==Type.ELEMENT && count.getNodeKind()==Type.ELEMENT) {
+ filter = NodeKindTest.ELEMENT;
+ } else {
+ filter = AnyNodeTest.getInstance();
+ }
+
+ SequenceIterator preceding =
+ node.iterateAxis(Axis.PRECEDING_OR_ANCESTOR, filter);
+
+ while (true) {
+ NodeInfo prev = (NodeInfo)preceding.next();
+ if (prev == null) {
+ break;
+ }
+ if (from!=null && from.matches(prev, controller)) {
+ return num;
+ }
+ if (count.matches(prev, controller)) {
+ if (num==1 && memoNode!=null && prev.isSameNode(memoNode)) {
+ num = memoNumber + 1;
+ break;
+ }
+ num++;
+ }
+ }
+ if (memoise) {
+ Object[] memo = new Object[2];
+ memo[0] = node;
+ memo[1] = new Integer(num);
+ controller.setUserData(inst, "xsl:number", memo);
+ }
+ return num;
+ }
+
+ /**
+ * Get node number (level="multiple").
+ * Return a vector giving the hierarchic position of this node. See the XSLT spec for details.
+ *
+ * @exception XPathException
+ * @param node The node to be numbered
+ * @param count Pattern that identifies which nodes (ancestors and
+ * their previous siblings) should be counted. Default (null) is the
+ * element name if the current node is an element, or "node()"
+ * otherwise.
+ * @param from Pattern that specifies where counting starts from.
+ * Default (null) is the root node. Only nodes below the first (most
+ * recent) node that matches the 'from' pattern are counted.
+ * @param controller The controller for the transformation
+ * @return a vector containing for each ancestor-or-self that matches the
+ * count pattern and that is below the nearest node that matches the
+ * from pattern, an Integer which is one greater than the number of
+ * previous siblings that match the count pattern.
+ */
+
+ public static List getNumberMulti(NodeInfo node, Pattern count,
+ Pattern from, Controller controller) throws XPathException {
+
+ //checkNumberable(node);
+
+ ArrayList v = new ArrayList();
+
+ if (count==null) {
+ if (node.getFingerprint()==-1) { // unnamed node
+ count = NodeKindTest.makeNodeKindTest(node.getNodeKind());
+ } else {
+ count = new NameTest(node);
+ }
+ }
+
+ NodeInfo curr = node;
+
+ while(true) {
+ if (count.matches(curr, controller)) {
+ int num = getNumberSingle(curr, count, null, controller);
+ v.add(0, new Long(num));
+ }
+ curr = curr.getParent();
+ if (curr==null) break;
+ if (from!=null && from.matches(curr, controller)) break;
+ }
+
+ return v;
+ }
+
+ /**
+ * Generic (model-independent) implementation of deep copy algorithm for nodes.
+ * This is available for use by any node implementations that choose to use it.
+ * @param node The node to be copied
+ * @param out The receiver to which events will be sent
+ * @param namePool Namepool holding the name codes (used only to resolve namespace
+ * codes)
+ * @param whichNamespaces Indicates which namespace nodes for an element should
+ * be copied
+ * @param copyAnnotations Indicates whether type annotations should be copied
+ * @throws TransformerException on any failure reported by the Receiver
+ */
+
+ public static void copy(NodeInfo node,
+ Receiver out,
+ NamePool namePool,
+ int whichNamespaces,
+ boolean copyAnnotations) throws TransformerException {
+
+ switch (node.getNodeKind()) {
+ case Type.DOCUMENT:
+ AxisIterator children0 = node.iterateAxis(Axis.CHILD, new AnyNodeTest());
+ while (true) {
+ NodeInfo child = (NodeInfo)children0.next();
+ if (child == null) {
+ return;
+ }
+ child.copy(out, whichNamespaces, copyAnnotations);
+ }
+
+ case Type.ELEMENT:
+ out.startElement(node.getNameCode(), 0, 0);
+
+ // output the namespaces
+
+ if (whichNamespaces != NodeInfo.NO_NAMESPACES) {
+ node.outputNamespaceNodes(out, true);
+ }
+
+ // output the attributes
+
+ AxisIterator attributes = node.iterateAxis(Axis.ATTRIBUTE, new AnyNodeTest());
+ while (true) {
+ NodeInfo att = (NodeInfo)attributes.next();
+ if (att == null) {
+ break;
+ }
+ att.copy(out, whichNamespaces, copyAnnotations);
+ }
+
+ // output the children
+
+ AxisIterator children = node.iterateAxis(Axis.CHILD, new AnyNodeTest());
+ while (true) {
+ NodeInfo child = (NodeInfo)children.next();
+ if (child == null) {
+ break;
+ }
+ child.copy(out, whichNamespaces, copyAnnotations);
+ }
+
+ // finally the end tag
+
+ out.endElement();
+ return;
+
+ case Type.ATTRIBUTE:
+ out.attribute(node.getNameCode(), 0, node.getStringValue(), 0);
+ return;
+
+ case Type.TEXT:
+ out.characters(node.getStringValue(), 0);
+ return;
+
+ case Type.COMMENT:
+ out.comment(node.getStringValue(), 0);
+ return;
+
+ case Type.PROCESSING_INSTRUCTION:
+ out.processingInstruction(node.getLocalPart(), node.getStringValue(), 0);
+ return;
+
+ case Type.NAMESPACE:
+ out.namespace(namePool.allocateNamespaceCode(node.getLocalPart(), node.getStringValue()),0);
+ return;
+
+ default:
+
+ }
+ }
+
+ /**
+ * Generic (model-independent) method to determine the relative position of two
+ * node in document order. The nodes must be in the same tree.
+ * @param first The first node
+ * @param second The second node, whose position is to be compared with the first node
+ * @return -1 if this node precedes the other node, +1 if it follows the other
+ * node, or 0 if they are the same node. (In this case, isSameNode() will always
+ * return true, and the two nodes will produce the same result for generateId())
+ */
+
+ public static int compareOrder(SiblingCountingNode first, SiblingCountingNode second) {
+ NodeInfo ow = second;
+
+ // are they the same node?
+ if (first.isSameNode(second)) {
+ return 0;
+ }
+ // are they siblings (common case)
+ if (first.getParent().isSameNode(second.getParent())) {
+ return first.getSiblingPosition() - second.getSiblingPosition();
+ }
+ // find the depths of both nodes in the tree
+
+ int depth1 = 0;
+ int depth2 = 0;
+ NodeInfo p1 = first;
+ NodeInfo p2 = second;
+ while (p1 != null) {
+ depth1++;
+ p1 = p1.getParent();
+ }
+ while (p2 != null) {
+ depth2++;
+ p2 = p2.getParent();
+ }
+ // move up one branch of the tree so we have two nodes on the same level
+
+ p1 = first;
+ while (depth1>depth2) {
+ p1 = p1.getParent();
+ if (p1.isSameNode(second)) {
+ return +1;
+ }
+ depth1--;
+ }
+
+ p2 = ow;
+ while (depth2>depth1) {
+ p2 = p2.getParent();
+ if (p2.isSameNode(first)) {
+ return -1;
+ }
+ depth2--;
+ }
+
+ // now move up both branches in sync until we find a common parent
+ while (true) {
+ NodeInfo par1 = p1.getParent();
+ NodeInfo par2 = p2.getParent();
+ if (par1==null || par2==null) {
+ throw new NullPointerException("DOM tree compare - internal error");
+ }
+ if (par1.isSameNode(par2)) {
+ return ((SiblingCountingNode)p1).getSiblingPosition() -
+ ((SiblingCountingNode)p2).getSiblingPosition();
+ }
+ p1 = par1;
+ p2 = par2;
+ }
+ }
+
+ /**
+ * Get a character string that uniquely identifies this node and that collates nodes
+ * into document order
+ * @return a string. The string is always interned so keys can be compared using "==".
+ */
+
+ public static String getSequentialKey(SiblingCountingNode node) {
+ // TODO: this was designed so it could be used for sorting nodes into document
+ // order, but is not currently used that way.
+ StringBuffer key = new StringBuffer();
+ while(!(node instanceof DocumentInfo)) {
+ key.insert(0, alphaKey(node.getSiblingPosition()));
+ node = (SiblingCountingNode)node.getParent();
+ }
+ key.insert(0, "w" + node.getDocumentNumber());
+ return key.toString().intern();
+ }
+
+ /**
+ * Construct an alphabetic key from an positive integer; the key collates in the same sequence
+ * as the integer
+ * @param value The positive integer key value (negative values are treated as zero).
+ */
+
+ public static String alphaKey(int value) {
+ if (value<1) return "a";
+ if (value<10) return "b" + value;
+ if (value<100) return "c" + value;
+ if (value<1000) return "d" + value;
+ if (value<10000) return "e" + value;
+ if (value<100000) return "f" + value;
+ if (value<1000000) return "g" + value;
+ if (value<10000000) return "h" + value;
+ if (value<100000000) return "i" + value;
+ if (value<1000000000) return "j" + value;
+ return "k" + value;
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////////
+ // Helper classes to support axis iteration
+ ///////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * AxisFilter is an iterator that applies a NodeTest filter to
+ * the nodes returned by an underlying AxisIterator.
+ */
+
+ public static class AxisFilter extends AxisIteratorImpl {
+ private int last = -1;
+
+ /**
+ * Construct a AxisFilter
+ * @param base the underlying iterator that returns all the nodes on
+ * a required axis. This must not be an atomizing iterator!
+ * @param test a NodeTest that is applied to each node returned by the
+ * underlying AxisIterator; only those nodes that pass the NodeTest are
+ * returned by the AxisFilter
+ */
+
+ public AxisFilter(AxisIterator base, NodeTest test) {
+ this.base = base;
+ this.nodeTest = test;
+ position = 0;
+ }
+
+ public Item next() {
+ while (true) {
+ current = base.next();
+ if (current == null) {
+ return null;
+ }
+ NodeInfo n = (NodeInfo)current;
+ if (nodeTest.matches(n.getNodeKind(),
+ n.getFingerprint(),
+ n.getTypeAnnotation())) {
+ position++;
+ return current;
+ }
+ }
+ }
+
+ public int getLastPosition() {
+
+ // To find out how many nodes there are in the axis, we
+ // make a copy of the original node enumeration, and run through
+ // the whole thing again, counting how many nodes match the filter.
+
+ if (last>=0) {
+ return last;
+ }
+ last = 0;
+ AxisIterator b = (AxisIterator)base.getAnother();
+ while (true) {
+ NodeInfo n = (NodeInfo)b.next();
+ if (n == null) {
+ return last;
+ }
+ if (nodeTest.matches(n.getNodeKind(),
+ n.getFingerprint(),
+ n.getTypeAnnotation())) {
+ last++;
+ }
+ }
+ }
+
+ public SequenceIterator getAnother() {
+ return new AxisFilter((AxisIterator)base.getAnother(), nodeTest);
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p/A.js
new file mode 100644
index 0000000..e9185a5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p/A.js
@@ -0,0 +1,16 @@
+package p;
+public class A {
+ public static boolean DEBUG = false;
+ public X x;
+ public A(X x) {
+ this.x = x;
+ }
+ void foo() {
+ A.DEBUG = true;
+ }
+ public void foo(int i, String s, X x) {
+ x.new Inner().foo();
+ }
+ public static void main(String[] args) {
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p/I.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p/I.js
new file mode 100644
index 0000000..36b68da
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p/I.js
@@ -0,0 +1,3 @@
+package p;
+public interface I {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p/X.js
new file mode 100644
index 0000000..c186fa2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p/X.js
@@ -0,0 +1,20 @@
+package p;
+public class X implements I {
+ public static boolean DEBUG = false;
+ public I field;
+ public class Inner {
+ public String foo() {
+ return "foo";
+ }
+ }
+ public X() {
+ X.DEBUG = true;
+ }
+ public X(int i) {
+ }
+ public static void bar() {
+ }
+ public void foo(int i, String s, X x) {
+ Inner inner = new Inner();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p/Y.js
new file mode 100644
index 0000000..cea5616
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p/Y.js
@@ -0,0 +1,13 @@
+package p;
+public class Y extends X {
+ public Y() {
+ }
+ public Y(int i) {
+ super(i);
+ }
+ public Y(boolean b) {
+ super(1);
+ }
+ public static void bar() {
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p/Z.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p/Z.js
new file mode 100644
index 0000000..a2f61c5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p/Z.js
@@ -0,0 +1,12 @@
+package p;
+public class Z extends Y {
+ public Z() {
+ }
+ public Z(int i) {
+ super(i);
+ }
+ public void foo(int i, String s, X x) {
+ super.foo(i, s, new Y(true));
+ }
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p10/a/b/dom/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p10/a/b/dom/Y.js
new file mode 100644
index 0000000..eeb6c43
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p10/a/b/dom/Y.js
@@ -0,0 +1,4 @@
+package p10.a.b.dom;
+
+public class Y {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p10/a/b/om/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p10/a/b/om/X.js
new file mode 100644
index 0000000..85c2575
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p10/a/b/om/X.js
@@ -0,0 +1,7 @@
+package p10.a.b.om;
+
+import java.util.Vector;
+
+public class X {
+ final public static class AncestorEnumeration extends Vector {}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p2/Z.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p2/Z.js
new file mode 100644
index 0000000..1346ad3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p2/Z.js
@@ -0,0 +1,3 @@
+package p2;
+public class Z {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p3/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p3/X.js
new file mode 100644
index 0000000..3eea879
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p3/X.js
@@ -0,0 +1,4 @@
+package p3;
+public class X {
+ public static int count;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p3/p2/p/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p3/p2/p/X.js
new file mode 100644
index 0000000..ce4033e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p3/p2/p/X.js
@@ -0,0 +1,4 @@
+package p3.p2.p;
+public class X {
+ public static int count;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p4/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p4/A.js
new file mode 100644
index 0000000..7e0ea79
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p4/A.js
@@ -0,0 +1,10 @@
+package p4;
+/* Regression test for 1GLBP65: ITPJCORE:WIN2000 - search: type refs - incorrect match */
+public class A {
+ static A A;
+}
+class X extends p4.A{
+ void x(){
+ p4.A.A= A.A; /*1*/
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p5/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p5/A.js
new file mode 100644
index 0000000..07e251d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p5/A.js
@@ -0,0 +1,9 @@
+package p5;
+/* Regression test for 1GD79XM: ITPJCORE:WINNT - Search - search for field references - not all found */
+public class A{
+ int f;
+ A x;
+ void k(){
+ x.x.x.f= 0;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p6/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p6/A.js
new file mode 100644
index 0000000..dc0e5ca
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p6/A.js
@@ -0,0 +1,21 @@
+package p6;
+/* Test case for PR 1GKB9YH: ITPJCORE:WIN2000 - search for field refs - incorrect results */
+public class A {
+ protected int f;
+ void m() {
+ f++;
+ }
+}
+class AA extends A {
+ protected int f;
+}
+class B {
+ A a;
+ AA b;
+ A ab = new AA();
+ void m() {
+ a.f = 0; /*1*/
+ b.f = 0; /*2*/
+ ab.f = 0; /*3*/
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p7/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p7/A.js
new file mode 100644
index 0000000..59518a4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p7/A.js
@@ -0,0 +1,12 @@
+package p7;
+/* Test case for 1G52F7P: ITPJCORE:WINNT - Search - finds bogus references to class */
+public class A {
+}
+
+class C {
+ void m() {
+ class A {
+ }
+ new A();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p71267/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p71267/Test.js
new file mode 100644
index 0000000..5241300
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p71267/Test.js
@@ -0,0 +1,8 @@
+package p71267;
+
+/**
+ * @see p71267
+ * @see p71267.Test
+ */
+public class Test {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p71267/q71267/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p71267/q71267/Test.js
new file mode 100644
index 0000000..94cea9a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p71267/q71267/Test.js
@@ -0,0 +1,19 @@
+package p71267.q71267;
+
+/**
+ * @see p71267
+ * @see p71267.q71267
+ * @see p71267.q71267.Test
+ */
+public class Test {
+ /**
+ * @see p71267.q71267
+ * @see p71267.q71267.Test#field
+ */
+ int field;
+ /**
+ * @see p71267.q71267
+ * @see p71267.q71267.Test#method()
+ */
+ void method() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p8/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p8/A.js
new file mode 100644
index 0000000..3befa54
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p8/A.js
@@ -0,0 +1,13 @@
+package p8;
+/* Test case for bug #3433 search: missing field occurrecnces (1GKZ8J6) */
+public class A{
+ protected int g;
+ void m(){
+ g++;
+ }
+}
+class B extends A{
+ void m(){
+ g= 0;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p9/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p9/X.js
new file mode 100644
index 0000000..c0a593d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p9/X.js
@@ -0,0 +1,11 @@
+package p9;
+/* Test case for PR 1GK8TXE: ITPJCORE:WIN2000 - search: missing field reference */
+public class X {
+ public X f;
+ public int k;
+ void m() {
+ for (int g = 0; g < 10; g++) {
+ }
+ f.k = 0; //<<
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q1/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q1/B.js
new file mode 100644
index 0000000..4dd2c6c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q1/B.js
@@ -0,0 +1,10 @@
+package q1;
+/* Test case for PR 1GK90H4: ITPJCORE:WIN2000 - search: missing package reference */
+public class B{
+ void m(AA fred){
+ q2.A.length(); //<<<
+ }
+}
+class AA{
+ static String A;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q2/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q2/A.js
new file mode 100644
index 0000000..ff36fce
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q2/A.js
@@ -0,0 +1,5 @@
+package q2;
+/* Test case for 1GK90H4: ITPJCORE:WIN2000 - search: missing package reference */
+public class A{
+ public static int length(){return 42;};
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q3/A$B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q3/A$B.js
new file mode 100644
index 0000000..1ff72f9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q3/A$B.js
@@ -0,0 +1,4 @@
+package q3;
+/* Test case for bug 3310 Smoke 124: Compile errors introduced with rename refactoring (1GFBK2G) */
+public class A$B {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q4/C.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q4/C.js
new file mode 100644
index 0000000..bcc3299
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q4/C.js
@@ -0,0 +1,7 @@
+package q4;
+/* Test case for 3310 Smoke 124: Compile errors introduced with rename refactoring (1GFBK2G) */
+public class C {
+ Object foo() {
+ return new q3.A$B();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q5/AQ.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q5/AQ.js
new file mode 100644
index 0000000..c7490cf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q5/AQ.js
@@ -0,0 +1,14 @@
+package q5;
+/* Test case for bug 5068 search: missing method reference */
+interface I{
+void k();
+}
+class T{
+ void m(){
+ class X implements I{
+ public void k(){}
+ };
+ X x= new X();
+ x.k(); /**/
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q6/CD.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q6/CD.js
new file mode 100644
index 0000000..f0c3025
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q6/CD.js
@@ -0,0 +1,11 @@
+package q6;
+/* Test case for bug 5069 search: method reference in super missing */
+class AQ {
+ public void k(){}
+}
+
+class AQE extends AQ{
+ public void k(){
+ super.k();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q7/AQ.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q7/AQ.js
new file mode 100644
index 0000000..ba077bb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q7/AQ.js
@@ -0,0 +1,14 @@
+package q7;
+/* Test case for bug 5070 search: missing interface method reference */
+interface I {
+void k();
+}
+class C1 implements I{
+ public void k(){};
+}
+class D{
+ void h(){
+ I a= new C1();
+ a.k();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q8/EclipseTest.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q8/EclipseTest.js
new file mode 100644
index 0000000..17b4579
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q8/EclipseTest.js
@@ -0,0 +1,11 @@
+package q8;
+/* Test case for bug 5821 Refactor > Rename renames local variable instead of member in case of name clash */
+public class EclipseTest {
+ public int test = 0;
+
+ public static void main(String[] args) {
+ EclipseTest test = new EclipseTest();
+
+ test.test = 1;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q9/I.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q9/I.js
new file mode 100644
index 0000000..f15b0a1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q9/I.js
@@ -0,0 +1,12 @@
+package q9;
+/* Test case for bug 5862 search : too many matches on search with OrPattern */
+interface I{
+void m();
+}
+
+class A1 implements I{
+public void m(){}
+}
+interface I1{
+void m();
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r/A.js
new file mode 100644
index 0000000..c3e43ac
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r/A.js
@@ -0,0 +1,20 @@
+package r;
+/* Test case for PR 1GKAQJS: ITPJCORE:WIN2000 - search: incorrect results for nested types */
+public class A {
+ class X {
+ X(X X) {
+ new X(null);
+ }
+ }
+ A() {
+ }
+ A(A A) {
+ }
+ A m() {
+ new X(null);
+ return (A) new A();
+ }
+};
+class B {
+ A.X ax = new A().new X(null);
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r2/I.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r2/I.js
new file mode 100644
index 0000000..f1b2be6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r2/I.js
@@ -0,0 +1,4 @@
+package r2;
+/* Regression test for bug 22102 Not all implementors found for IPartListener */
+public interface I {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r2/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r2/X.js
new file mode 100644
index 0000000..cbb5d2e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r2/X.js
@@ -0,0 +1,6 @@
+package r2;
+/* Regression test for bug 22102 Not all implementors found for IPartListener */
+public class X {
+ I field = new I() {
+ };
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r3/A21485.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r3/A21485.js
new file mode 100644
index 0000000..9d6ab59
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r3/A21485.js
@@ -0,0 +1,4 @@
+package r3;
+/* Test case for bug 21485 NPE when doing a reference search to a package */
+class A21485 {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r4/B21485.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r4/B21485.js
new file mode 100644
index 0000000..003cb06
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r4/B21485.js
@@ -0,0 +1,5 @@
+package r4;
+/* Test case for bug 21485 NPE when doing a reference search to a package */
+import r3.A21485;
+public class B21485 extends A21485 {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r5/XYZ.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r5/XYZ.js
new file mode 100644
index 0000000..b6a9854
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r5/XYZ.js
@@ -0,0 +1,4 @@
+package r5;
+/* Test case for bug 17210 No match found when query contains '?' */
+public class XYZ {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r6/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r6/A.js
new file mode 100644
index 0000000..803d636
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r6/A.js
@@ -0,0 +1,8 @@
+package r6;
+/* Test case for bug 23077 search: does not find type references in some imports */
+public class A {
+ public class Inner{
+ public class InnerInner{
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r6/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r6/B.js
new file mode 100644
index 0000000..fcd5197
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r6/B.js
@@ -0,0 +1,10 @@
+package r6;
+/* Test case for bug 23077 search: does not find type references in some imports */
+import r6.A;
+import r6.A.Inner;
+import r6.A.Inner.InnerInner;
+import r6.A.*;
+import r6.A.Inner.*;
+import r6.A.Inner.InnerInner.*;
+public class B {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r7/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r7/A.js
new file mode 100644
index 0000000..42b6331
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r7/A.js
@@ -0,0 +1,4 @@
+package r7;
+/* Test case for bug 37438 searchenging NPE in searchDeclarationsOfReferencedTypes */
+public class A {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r7/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r7/B.js
new file mode 100644
index 0000000..f9eb206
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r7/B.js
@@ -0,0 +1,5 @@
+package r7;
+/* Test case for bug 37438 searchenging NPE in searchDeclarationsOfReferencedTypes */
+public class B {
+ A a;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r8/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r8/A.js
new file mode 100644
index 0000000..dfbd164
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r8/A.js
@@ -0,0 +1,6 @@
+package r8;
+/* Test case for bug 37166 NPE in SearchEngine when matching type against ProblemReferenceBinding */
+import r8.B;
+public class A {
+ A a;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r9/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r9/A.js
new file mode 100644
index 0000000..2792514
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r9/A.js
@@ -0,0 +1,3 @@
+package r9;
+public class A {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s1/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s1/X.js
new file mode 100644
index 0000000..8447783
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s1/X.js
@@ -0,0 +1,4 @@
+package s1;
+/* Test case for bug 3230 Search - Too many type references for query ending with * (1GAZVGI) */
+public class X {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s1/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s1/Y.js
new file mode 100644
index 0000000..f4804c7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s1/Y.js
@@ -0,0 +1,5 @@
+package s1;
+/* Test case for bug 3230 Search - Too many type references for query ending with * (1GAZVGI) */
+public class Y {
+ X f[];
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s2/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s2/X.js
new file mode 100644
index 0000000..820db2a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s2/X.js
@@ -0,0 +1,4 @@
+package s2;
+/* Test case for bug 3230 Search - Too many type references for query ending with * (1GAZVGI) */
+public class X {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s2/Z.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s2/Z.js
new file mode 100644
index 0000000..725fb86
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s2/Z.js
@@ -0,0 +1,5 @@
+package s2;
+/* Test case for bug 3230 Search - Too many type references for query ending with * (1GAZVGI) */
+public class Z {
+ X f[];
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s3/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s3/A.js
new file mode 100644
index 0000000..bbcab6f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s3/A.js
@@ -0,0 +1,13 @@
+package s3;
+/* Regression test for bug 23329 search: incorrect range for type references in brackets */
+public class A {
+ int field;
+ Object foo() {
+ return ( B )this;
+ }
+ int bar() {
+ return ( field );
+ }
+}
+class B {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s4/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s4/X.js
new file mode 100644
index 0000000..0ae9bb5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s4/X.js
@@ -0,0 +1,18 @@
+package s4;
+public class X {
+ int x;
+ int foo() {
+ return this.x;
+ }
+ /**
+ * @see X#x
+ * @see X#foo()
+ * @see X
+ */
+ void bar() {
+ }
+
+ void fred() {
+ new X().foo();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s5/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s5/A.js
new file mode 100644
index 0000000..53c3c54
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s5/A.js
@@ -0,0 +1,12 @@
+package s5;
+/* Test case for bug 61017 Refactoring - test case that results in uncompilable source*/
+public class A {
+ public B b; // <- rename this
+ public void method() {
+ B.b.a.b = null;
+ }
+}
+class B {
+ public static B b;
+ public A a;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/sd/AQ.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/sd/AQ.js
new file mode 100644
index 0000000..f281156
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/sd/AQ.js
@@ -0,0 +1,12 @@
+package sd;
+
+/* Test case for PR 1GKCH3N: ITPJCORE:WIN2000 - search: method refs - super call not found */
+public class AQ{
+ public void k(){}
+}
+
+class AQE extends AQ{
+ public void k(){
+ super.k();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/wc/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/wc/X.js
new file mode 100644
index 0000000..b7b7efa
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/wc/X.js
@@ -0,0 +1,3 @@
+package wc;
+public class X {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/wc1/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/wc1/X.js
new file mode 100644
index 0000000..202de2d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/wc1/X.js
@@ -0,0 +1,3 @@
+package wc1;
+public class X {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/wc2/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/wc2/Y.js
new file mode 100644
index 0000000..d3908a8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/wc2/Y.js
@@ -0,0 +1,3 @@
+package wc2;
+public class Y {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/wc3/X44884.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/wc3/X44884.js
new file mode 100644
index 0000000..bd42075
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/wc3/X44884.js
@@ -0,0 +1,4 @@
+package wc3;
+/* Test case for bug 44884 Wrong list displayed while code completion */
+public class X44884 {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test20631.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test20631.jar
new file mode 100644
index 0000000..743164e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test20631.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test20631.zip b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test20631.zip
new file mode 100644
index 0000000..a820f3d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test20631.zip
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test24741.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test24741.jar
new file mode 100644
index 0000000..b535fa0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test24741.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test47909.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test47909.jar
new file mode 100644
index 0000000..efd6a9a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test47909.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test47989.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test47989.jar
new file mode 100644
index 0000000..150ad2f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test47989.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test48261.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test48261.jar
new file mode 100644
index 0000000..6cbaed0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test48261.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test48725.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test48725.jar
new file mode 100644
index 0000000..a71f0de
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test48725.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/a1/Author.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/a1/Author.js
new file mode 100644
index 0000000..93a8544
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/a1/Author.js
@@ -0,0 +1,8 @@
+// packages a? stand for search annotations tests
+package a1;
+import e1.Team;
+import static e1.Team.FREDERIC;
+
+public @interface Author {
+ Team[] name() default FREDERIC;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/a1/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/a1/Test.js
new file mode 100644
index 0000000..d044f3c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/a1/Test.js
@@ -0,0 +1,8 @@
+package a1;
+import static e1.Team.*;
+
+@Author(name={FREDERIC, JEROME})
+public class Test {
+ @Author(name=PHILIPPE) void foo() {}
+ @Author int t;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/e1/Team.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/e1/Team.js
new file mode 100644
index 0000000..984c55f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/e1/Team.js
@@ -0,0 +1,29 @@
+// packages e? stand for search enumeration tests
+package e1;
+public enum Team {
+ PHILIPPE(37) {
+ public boolean isManager() {
+ return true;
+ }
+ },
+ DAVID(27),
+ JEROME(33),
+ OLIVIER(35),
+ KENT(40),
+ FREDERIC;
+
+ public enum Role { MANAGER, DEVELOPPER }
+
+ int age;
+ Role role;
+
+ Team() {}
+ Team(int age) {
+ this.age = age;
+ }
+ public int age() { return this.age; }
+ public boolean isManager() { return false; }
+ void setRole(boolean mgr) {
+ this.role = mgr ? Role.MANAGER : Role.DEVELOPPER;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/e1/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/e1/Test.js
new file mode 100644
index 0000000..b8abc8d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/e1/Test.js
@@ -0,0 +1,28 @@
+package e1;
+
+public class Test {
+ public static void main(String[] args) {
+ for (Team t : Team.values()) {
+ int age = t.age();
+ String location = location(t).toString();
+ t.setRole(t.isManager());
+ }
+ }
+
+ private enum Location { SNZ, OTT }
+
+ private static Location location(Team t) {
+ switch(t) {
+ case PHILIPPE:
+ case DAVID:
+ case JEROME:
+ case FREDERIC:
+ return Location.SNZ;
+ case OLIVIER:
+ case KENT:
+ return Location.OTT;
+ default:
+ return null;
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/m/def/Generic.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/m/def/Generic.js
new file mode 100644
index 0000000..2921977
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/m/def/Generic.js
@@ -0,0 +1,20 @@
+/*
+ * package g1.t.m.def is the package to define (def) generic (g1) types (t) (top level or
+ * members) with multiple (m) type parameters
+ *
+ * Generic type which also contains both generic and non-generic member types.
+ */
+package g1.t.m.def;
+public class Generic<T1, T2 extends Exception, T3 extends RuntimeException> {
+ public T1 t1;
+ public T2 t2;
+ public T3 t3;
+ public class Member {
+ public Object m;
+ }
+ public class MemberGeneric<U1, U2 extends Exception, U3 extends Throwable> {
+ public U1 u1;
+ public U2 u2;
+ public U3 u3;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/m/def/NonGeneric.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/m/def/NonGeneric.js
new file mode 100644
index 0000000..2dfba25
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/m/def/NonGeneric.js
@@ -0,0 +1,15 @@
+/*
+ * package g1.t.m.def is the package to define (def) generic (g1) types (t) (top level or
+ * members) with multiple (m) type parameters
+ *
+ * This type is a non-generic type which contains a generic member.
+ */
+package g1.t.m.def;
+
+public class NonGeneric {
+ public class GenericMember<T1, T2 extends Exception, T3 extends RuntimeException> {
+ public T1 t1;
+ public T2 t2;
+ public T3 t3;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/m/ref/R1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/m/ref/R1.js
new file mode 100644
index 0000000..a48e29d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/m/ref/R1.js
@@ -0,0 +1,26 @@
+/*
+ * package g1.t.m.ref is the package to define types which contain
+ * references (ref) to generic (g1) types (t) which have multiple (m) type parameters
+ */
+package g1.t.m.ref;
+import g1.t.m.def.Generic;
+
+/*
+ * This type is used to test references to generic type
+ */
+public class R1 {
+ // Simple name
+ public Generic gen;
+ public Generic<Object, Exception, RuntimeException> gen_obj;
+ public Generic<Exception, Exception, RuntimeException> gen_exc;
+ public Generic<?, ?, ?> gen_wld;
+ public Generic<? extends Throwable, ? extends Exception, ? extends RuntimeException> gen_thr;
+ public Generic<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException> gen_run;
+ // qualified name
+ public g1.t.m.def.Generic qgen;
+ public g1.t.m.def.Generic<Object, Exception, RuntimeException> qgen_obj;
+ public g1.t.m.def.Generic<Exception, Exception, RuntimeException> qgen_exc;
+ public g1.t.m.def.Generic<?, ?, ?> qgen_wld;
+ public g1.t.m.def.Generic<? extends Throwable, ? extends Exception, ? extends RuntimeException> qgen_thr;
+ public g1.t.m.def.Generic<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException> qgen_run;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/m/ref/R2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/m/ref/R2.js
new file mode 100644
index 0000000..855dbf5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/m/ref/R2.js
@@ -0,0 +1,26 @@
+/*
+ * package g1.t.m.ref is the package to define types which contain
+ * references (ref) to generic (g1) types (t) which have multiple (m) type parameters
+ */
+package g1.t.m.ref;
+import g1.t.m.def.NonGeneric;
+
+/*
+ * This type is used to test reference to generic member type defined in a non-generic type.
+ */
+public class R2 {
+ // Simple name
+ public NonGeneric.GenericMember gen;
+ public NonGeneric.GenericMember<Object, Exception, RuntimeException> gen_obj;
+ public NonGeneric.GenericMember<Exception, Exception, RuntimeException> gen_exc;
+ public NonGeneric.GenericMember<?, ?, ?> gen_wld;
+ public NonGeneric.GenericMember<? extends Throwable, ? extends Exception, ? extends RuntimeException> gen_thr;
+ public NonGeneric.GenericMember<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException> gen_run;
+ // Qualified name
+ public g1.t.m.def.NonGeneric.GenericMember qgen;
+ public g1.t.m.def.NonGeneric.GenericMember<Object, Exception, RuntimeException> qgen_obj;
+ public g1.t.m.def.NonGeneric.GenericMember<Exception, Exception, RuntimeException> qgen_exc;
+ public g1.t.m.def.NonGeneric.GenericMember<?, ?, ?> qgen_wld;
+ public g1.t.m.def.NonGeneric.GenericMember<? extends Throwable, ? extends Exception, ? extends RuntimeException> qgen_thr;
+ public g1.t.m.def.NonGeneric.GenericMember<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException> qgen_run;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/m/ref/R3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/m/ref/R3.js
new file mode 100644
index 0000000..ebd1131
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/m/ref/R3.js
@@ -0,0 +1,26 @@
+/*
+ * package g1.t.m.ref is the package to define types which contain
+ * references (ref) to generic (g1) types (t) which have multiple (m) type parameters
+ */
+package g1.t.m.ref;
+import g1.t.m.def.Generic;
+
+/*
+ * This type is used to test reference to generic member type defined in generic type.
+ */
+public class R3 {
+ // Simple name
+ public Generic.MemberGeneric gen;
+ public Generic<Object, Exception, RuntimeException>.MemberGeneric<Object, Exception, RuntimeException> gen_obj;
+ public Generic<Exception, Exception, RuntimeException>.MemberGeneric<Exception, Exception, RuntimeException> gen_exc;
+ public Generic<?, ?, ?>.MemberGeneric<?, ?, ?> gen_wld;
+ public Generic<? extends Throwable, ? extends Exception, ? extends RuntimeException>.MemberGeneric<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException> gen_thr;
+ public Generic<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException>.MemberGeneric<? extends Throwable, ? extends Exception, ? extends RuntimeException> gen_run;
+ // Qualified name
+ public g1.t.m.def.Generic.MemberGeneric qgen;
+ public g1.t.m.def.Generic<Object, Exception, RuntimeException>.MemberGeneric<Object, Exception, RuntimeException> qgen_obj;
+ public g1.t.m.def.Generic<Exception, Exception, RuntimeException>.MemberGeneric<Exception, Exception, RuntimeException> qgen_exc;
+ public g1.t.m.def.Generic<?, ?, ?>.MemberGeneric<?, ?, ?> qgen_wld;
+ public g1.t.m.def.Generic<? extends Throwable, ? extends Exception, ? extends RuntimeException>.MemberGeneric<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException> qgen_thr;
+ public g1.t.m.def.Generic<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException>.MemberGeneric<? extends Throwable, ? extends Exception, ? extends RuntimeException> qgen_run;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/m/ref/R4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/m/ref/R4.js
new file mode 100644
index 0000000..c458ce8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/m/ref/R4.js
@@ -0,0 +1,26 @@
+/*
+ * package g1.t.m.ref is the package to define types which contain
+ * references (ref) to generic (g1) types (t) which have multiple (m) type parameters
+ */
+package g1.t.m.ref;
+import g1.t.m.def.Generic;
+
+/*
+ * This type is used to test reference to member type defined in generic type.
+ */
+public class R4 {
+ // Simple name
+ public Generic.Member gen;
+ public Generic<Object, Exception, RuntimeException>.Member gen_obj;
+ public Generic<Exception, Exception, RuntimeException>.Member gen_exc;
+ public Generic<?, ?, ?>.Member gen_wld;
+ public Generic<? extends Throwable, ? extends Exception, ? extends RuntimeException>.Member gen_thr;
+ public Generic<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException>.Member gen_run;
+ // Qualified name
+ public g1.t.m.def.Generic.Member qgen;
+ public g1.t.m.def.Generic<Object, Exception, RuntimeException>.Member qgen_obj;
+ public g1.t.m.def.Generic<Exception, Exception, RuntimeException>.Member qgen_exc;
+ public g1.t.m.def.Generic<?, ?, ?>.Member qgen_wld;
+ public g1.t.m.def.Generic<? extends Throwable, ? extends Exception, ? extends RuntimeException>.Member qgen_thr;
+ public g1.t.m.def.Generic<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException>.Member qgen_run;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/s/def/Generic.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/s/def/Generic.js
new file mode 100644
index 0000000..9e10c00
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/s/def/Generic.js
@@ -0,0 +1,16 @@
+/*
+ * package g1.t.s.ref is the package to define types (t) which contain
+ * references (ref) to generic types (g1) which have only one single (s) type parameter
+ *
+ * Generic type which also contains both generic and non-generic member types.
+ */
+package g1.t.s.def;
+public class Generic<T> {
+ public T t;
+ public class Member {
+ public Object m;
+ }
+ public class MemberGeneric<V> {
+ public V v;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/s/def/NonGeneric.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/s/def/NonGeneric.js
new file mode 100644
index 0000000..0c2e4c2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/s/def/NonGeneric.js
@@ -0,0 +1,12 @@
+/*
+ * package g1.t.s.ref is the package to define types (t) which contain
+ * references (ref) to generic types (g1) which have only one single (s) type parameter
+ *
+ * This type is a non-generic type which contains a generic member.
+ */
+package g1.t.s.def;
+public class NonGeneric {
+ public class GenericMember<T> {
+ public T t;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/s/ref/R1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/s/ref/R1.js
new file mode 100644
index 0000000..1d919ed
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/s/ref/R1.js
@@ -0,0 +1,26 @@
+/*
+ * package g1.t.s.ref is the package to define types which contain
+ * references (ref) to generic (g1) types (t) which have only one single (s) type parameter
+ */
+package g1.t.s.ref;
+import g1.t.s.def.Generic;
+
+/*
+ * This type is used to test references to generic type
+ */
+public class R1 {
+ // Simple name
+ public Generic gen;
+ public Generic<Object> gen_obj;
+ public Generic<Exception> gen_exc;
+ public Generic<?> gen_wld;
+ public Generic<? extends Throwable> gen_thr;
+ public Generic<? super RuntimeException> gen_run;
+ // qualified name
+ public g1.t.s.def.Generic qgen;
+ public g1.t.s.def.Generic<Object> qgen_obj;
+ public g1.t.s.def.Generic<Exception> qgen_exc;
+ public g1.t.s.def.Generic<?> qgen_wld;
+ public g1.t.s.def.Generic<? extends Throwable> qgen_thr;
+ public g1.t.s.def.Generic<? super RuntimeException> qgen_run;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/s/ref/R2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/s/ref/R2.js
new file mode 100644
index 0000000..886ad00
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/s/ref/R2.js
@@ -0,0 +1,26 @@
+/*
+ * package g1.t.s.ref is the package to define types which contain
+ * references (ref) to generic (g1) types (t) which have only one single (s) type parameter
+ */
+package g1.t.s.ref;
+import g1.t.s.def.NonGeneric;
+
+/*
+ * This type is used to test reference to generic member type defined in a non-generic type.
+ */
+public class R2 {
+ // Simple name
+ public NonGeneric.GenericMember gen;
+ public NonGeneric.GenericMember<Object> gen_obj;
+ public NonGeneric.GenericMember<Exception> gen_exc;
+ public NonGeneric.GenericMember<?> gen_wld;
+ public NonGeneric.GenericMember<? extends Throwable> gen_thr;
+ public NonGeneric.GenericMember<? super RuntimeException> gen_run;
+ // Qualified name
+ public g1.t.s.def.NonGeneric.GenericMember qgen;
+ public g1.t.s.def.NonGeneric.GenericMember<Object> qgen_obj;
+ public g1.t.s.def.NonGeneric.GenericMember<Exception> qgen_exc;
+ public g1.t.s.def.NonGeneric.GenericMember<?> qgen_wld;
+ public g1.t.s.def.NonGeneric.GenericMember<? extends Throwable> qgen_thr;
+ public g1.t.s.def.NonGeneric.GenericMember<? super RuntimeException> qgen_run;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/s/ref/R3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/s/ref/R3.js
new file mode 100644
index 0000000..a3326de
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/s/ref/R3.js
@@ -0,0 +1,26 @@
+/*
+ * package g1.t.s.ref is the package to define types which contain
+ * references (ref) to generic (g1) types (t) which have only one single (s) type parameter
+ */
+package g1.t.s.ref;
+import g1.t.s.def.Generic;
+
+/*
+ * This type is used to test reference to generic member type defined in generic type.
+ */
+public class R3 {
+ // Simple name
+ public Generic.MemberGeneric gen;
+ public Generic<Object>.MemberGeneric<Object> gen_obj;
+ public Generic<Exception>.MemberGeneric<Exception> gen_exc;
+ public Generic<?>.MemberGeneric<?> gen_wld;
+ public Generic<? extends Throwable>.MemberGeneric<? super RuntimeException> gen_thr;
+ public Generic<? super RuntimeException>.MemberGeneric<? extends Throwable> gen_run;
+ // Qualified name
+ public g1.t.s.def.Generic.MemberGeneric qgen;
+ public g1.t.s.def.Generic<Object>.MemberGeneric<Object> qgen_obj;
+ public g1.t.s.def.Generic<Exception>.MemberGeneric<Exception> qgen_exc;
+ public g1.t.s.def.Generic<?>.MemberGeneric<?> qgen_wld;
+ public g1.t.s.def.Generic<? extends Throwable>.MemberGeneric<? super RuntimeException> qgen_thr;
+ public g1.t.s.def.Generic<? super RuntimeException>.MemberGeneric<? extends Throwable> qgen_run;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/s/ref/R4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/s/ref/R4.js
new file mode 100644
index 0000000..9156141
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/s/ref/R4.js
@@ -0,0 +1,26 @@
+/*
+ * package g1.t.s.ref is the package to define types which contain
+ * references (ref) to generic (g1) types (t) which have only one single (s) type parameter
+ */
+package g1.t.s.ref;
+import g1.t.s.def.Generic;
+
+/*
+ * This type is used to test reference to member type defined in generic type.
+ */
+public class R4 {
+ // Simple name
+ public Generic.Member gen;
+ public Generic<Object>.Member gen_obj;
+ public Generic<Exception>.Member gen_exc;
+ public Generic<?>.Member gen_wld;
+ public Generic<? extends Throwable>.Member gen_thr;
+ public Generic<? super RuntimeException>.Member gen_run;
+ // Qualified name
+ public g1.t.s.def.Generic.Member qgen;
+ public g1.t.s.def.Generic<Object>.Member qgen_obj;
+ public g1.t.s.def.Generic<Exception>.Member qgen_exc;
+ public g1.t.s.def.Generic<?>.Member qgen_wld;
+ public g1.t.s.def.Generic<? extends Throwable>.Member qgen_thr;
+ public g1.t.s.def.Generic<? super RuntimeException>.Member qgen_run;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/def/R1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/def/R1.js
new file mode 100644
index 0000000..1bec259
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/def/R1.js
@@ -0,0 +1,38 @@
+package g2.f.m.def;
+
+import g1.t.m.def.Generic;
+
+public class R1 {
+ {
+ Generic generic = new Generic();
+ generic.t1.toString();
+ }
+ {
+ Generic<Object, Exception, RuntimeException> generic = new Generic<Object, Exception, RuntimeException>();
+ generic.t1.toString();
+ }
+ {
+ Generic<Exception, Exception, RuntimeException> generic = new Generic<Exception, Exception, RuntimeException>();
+ generic.t1.toString();
+ }
+ {
+ Generic<?, ?, ?> generic = new Generic<?, ? ,?>();
+ generic.t1.toString();
+ }
+ {
+ Generic<? extends Throwable, ? extends Exception, ? extends RuntimeException> generic = new Generic<Exception, RuntimeException, IllegalMonitorStateException>();
+ generic.t1.toString();
+ }
+ {
+ Generic<? extends Throwable, ? extends Exception, ? extends RuntimeException> generic = new Generic<? extends Throwable, ? extends Exception, ? extends RuntimeException>();
+ generic.t1.toString();
+ }
+ {
+ Generic<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException> generic = new Generic<Exception, RuntimeException, RuntimeException>();
+ generic.t1.toString();
+ }
+ {
+ Generic<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException> generic = new Generic<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException>();
+ generic.t1.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/def/R2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/def/R2.js
new file mode 100644
index 0000000..473da1c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/def/R2.js
@@ -0,0 +1,38 @@
+package g2.f.m.def;
+
+import g1.t.m.def.Generic;
+
+public class R2 {
+ {
+ Generic.Member member = new Generic().new Member();
+ member.m.toString();
+ }
+ {
+ Generic<Object, Exception, RuntimeException>.Member member = new Generic<Object, Exception, RuntimeException>().new Member();
+ member.m.toString();
+ }
+ {
+ Generic<Exception, Exception, RuntimeException>.Member member = new Generic<Exception, Exception, RuntimeException>().new Member();
+ member.m.toString();
+ }
+ {
+ Generic<?, ?, ?>.Member member = new Generic<?, ?, ?>().new Member();
+ member.m.toString();
+ }
+ {
+ Generic<? extends Throwable, ? extends Exception, ? extends RuntimeException>.Member member = new Generic<Exception, RuntimeException, IllegalMonitorStateException>().new Member();
+ member.m.toString();
+ }
+ {
+ Generic<? extends Throwable, ? extends Exception, ? extends RuntimeException>.Member member = new Generic<? extends Throwable, ? extends Exception, ? extends RuntimeException>().new Member();
+ member.m.toString();
+ }
+ {
+ Generic<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException>.Member member = new Generic<Exception, RuntimeException, RuntimeException>().new Member();
+ member.m.toString();
+ }
+ {
+ Generic<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException>.Member member = new Generic<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException>().new Member();
+ member.m.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/def/R3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/def/R3.js
new file mode 100644
index 0000000..cf3b639
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/def/R3.js
@@ -0,0 +1,54 @@
+package g2.f.m.def;
+
+import g1.t.m.def.Generic;
+
+public class R3 {
+ {
+ Generic.MemberGeneric member = new Generic().new MemberGeneric();
+ member.u2.toString();
+ }
+ {
+ Generic<Object, Exception, RuntimeException>.MemberGeneric<Object, Exception, RuntimeException> member = new Generic<Object, Exception, RuntimeException>().new MemberGeneric<Object, Exception, RuntimeException>();
+ member.u2.toString();
+ }
+ {
+ Generic<Exception, Exception, RuntimeException>.MemberGeneric<Exception, Exception, RuntimeException> member = new Generic<Exception, Exception, RuntimeException>().new MemberGeneric<Exception, Exception, RuntimeException>();
+ member.u2.toString();
+ }
+ {
+ Generic<?, ?, ?>.MemberGeneric<?, ?, ?> member = new Generic<?, ?, ?>().new MemberGeneric<?, ?, ?>();
+ member.u2.toString();
+ }
+ {
+ Generic<? extends Throwable, ? extends Exception, ? extends RuntimeException>.MemberGeneric<? extends Throwable, ? extends Exception, ? extends RuntimeException> member = new Generic<Exception, Exception, RuntimeException>().new MemberGeneric<Exception, Exception, RuntimeException>();
+ member.u2.toString();
+ }
+ {
+ Generic<? extends Throwable, ? extends Exception, ? extends RuntimeException>.MemberGeneric<? extends Throwable, ? extends Exception, ? extends RuntimeException> member = new Generic<Exception, Exception, RuntimeException>().new MemberGeneric<? extends Throwable, ? extends Exception, ? extends RuntimeException>();
+ member.u2.toString();
+ }
+ {
+ Generic<? extends Throwable, ? extends Exception, ? extends RuntimeException>.MemberGeneric<? extends Throwable, ? extends Exception, ? extends RuntimeException> member = new Generic<? extends Throwable, ? extends Exception, ? extends RuntimeException>().new MemberGeneric<Exception, Exception, RuntimeException>();
+ member.u2.toString();
+ }
+ {
+ Generic<? extends Throwable, ? extends Exception, ? extends RuntimeException>.MemberGeneric<? extends Throwable, ? extends Exception, ? extends RuntimeException> member = new Generic<? extends Throwable, ? extends Exception, ? extends RuntimeException>().new MemberGeneric<? extends Throwable, ? extends Exception, ? extends RuntimeException>();
+ member.u2.toString();
+ }
+ {
+ Generic<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException>.MemberGeneric<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException> member = new Generic<Exception, Exception, RuntimeException>().new MemberGeneric<Exception, Exception, RuntimeException>();
+ member.u2.toString();
+ }
+ {
+ Generic<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException>.MemberGeneric<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException> member = new Generic<Exception, Exception, RuntimeException>().new MemberGeneric<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException>();
+ member.u2.toString();
+ }
+ {
+ Generic<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException>.MemberGeneric<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException> member = new Generic<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException>().new MemberGeneric<Exception, Exception, RuntimeException>();
+ member.u2.toString();
+ }
+ {
+ Generic<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException>.MemberGeneric<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException> member = new Generic<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException>().new MemberGeneric<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException>();
+ member.u2.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/def/R4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/def/R4.js
new file mode 100644
index 0000000..59f228a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/def/R4.js
@@ -0,0 +1,38 @@
+package g2.f.m.def;
+
+import g1.t.m.def.NonGeneric;
+
+public class R4 {
+ {
+ NonGeneric.GenericMember member = new NonGeneric().new GenericMember();
+ member.t3.toString();
+ }
+ {
+ NonGeneric.GenericMember<Object, Exception, RuntimeException> member = new NonGeneric().new GenericMember<Object, Exception, RuntimeException>();
+ member.t3.toString();
+ }
+ {
+ NonGeneric.GenericMember<Exception, Exception, RuntimeException> member = new NonGeneric().new GenericMember<Exception, Exception, RuntimeException>();
+ member.t3.toString();
+ }
+ {
+ NonGeneric.GenericMember<?, ?, ?> member = new NonGeneric().new GenericMember<?, ?, ?>();
+ member.t3.toString();
+ }
+ {
+ NonGeneric.GenericMember<? extends Throwable, ? extends Exception, ? extends RuntimeException> member = new NonGeneric().new GenericMember<Exception, Exception, RuntimeException>();
+ member.t3.toString();
+ }
+ {
+ NonGeneric.GenericMember<? extends Throwable, ? extends Exception, ? extends RuntimeException> member = new NonGeneric().new GenericMember<? extends Throwable, ? extends Exception, ? extends RuntimeException>();
+ member.t3.toString();
+ }
+ {
+ NonGeneric.GenericMember<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException> member = new NonGeneric().new GenericMember<Exception, Exception, RuntimeException>();
+ member.t3.toString();
+ }
+ {
+ NonGeneric.GenericMember<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException> member = new NonGeneric().new GenericMember<? super RuntimeException, ? super IllegalMonitorStateException, ? super IllegalMonitorStateException>();
+ member.t3.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/ref/RR1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/ref/RR1.js
new file mode 100644
index 0000000..1dd2b55
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/ref/RR1.js
@@ -0,0 +1,21 @@
+package g2.f.m.ref;
+
+import g1.t.m.ref.R1;
+
+public class RR1 {
+ {
+ R1 test = new R1();
+ test.gen.toString();
+ test.gen_obj.toString();
+ test.gen_exc.toString();
+ test.gen_wld.toString();
+ test.gen_thr.toString();
+ test.gen_run.toString();
+ test.qgen.toString();
+ test.qgen_obj.toString();
+ test.qgen_exc.toString();
+ test.qgen_wld.toString();
+ test.qgen_thr.toString();
+ test.qgen_run.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/ref/RR2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/ref/RR2.js
new file mode 100644
index 0000000..faf0042
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/ref/RR2.js
@@ -0,0 +1,21 @@
+package g2.f.m.ref;
+
+import g1.t.m.ref.R2;
+
+public class RR2 {
+ {
+ R2 test = new R2();
+ test.gen.toString();
+ test.gen_obj.toString();
+ test.gen_exc.toString();
+ test.gen_wld.toString();
+ test.gen_thr.toString();
+ test.gen_run.toString();
+ test.qgen.toString();
+ test.qgen_obj.toString();
+ test.qgen_exc.toString();
+ test.qgen_wld.toString();
+ test.qgen_thr.toString();
+ test.qgen_run.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/ref/RR3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/ref/RR3.js
new file mode 100644
index 0000000..1af0f5d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/ref/RR3.js
@@ -0,0 +1,21 @@
+package g2.f.m.ref;
+
+import g1.t.m.ref.R3;
+
+public class RR3 {
+ {
+ R3 test = new R3();
+ test.gen.toString();
+ test.gen_obj.toString();
+ test.gen_exc.toString();
+ test.gen_wld.toString();
+ test.gen_thr.toString();
+ test.gen_run.toString();
+ test.qgen.toString();
+ test.qgen_obj.toString();
+ test.qgen_exc.toString();
+ test.qgen_wld.toString();
+ test.qgen_thr.toString();
+ test.qgen_run.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/ref/RR4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/ref/RR4.js
new file mode 100644
index 0000000..73583f9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/ref/RR4.js
@@ -0,0 +1,21 @@
+package g2.f.m.ref;
+
+import g1.t.m.ref.R4;
+
+public class RR4 {
+ {
+ R4 test = new R4();
+ test.gen.toString();
+ test.gen_obj.toString();
+ test.gen_exc.toString();
+ test.gen_wld.toString();
+ test.gen_thr.toString();
+ test.gen_run.toString();
+ test.qgen.toString();
+ test.qgen_obj.toString();
+ test.qgen_exc.toString();
+ test.qgen_wld.toString();
+ test.qgen_thr.toString();
+ test.qgen_run.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/def/R1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/def/R1.js
new file mode 100644
index 0000000..2cbc264
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/def/R1.js
@@ -0,0 +1,38 @@
+package g2.f.s.def;
+
+import g1.t.s.def.Generic;
+
+public class R1 {
+ {
+ Generic generic = new Generic();
+ generic.t.toString();
+ }
+ {
+ Generic<Object> generic = new Generic<Object>();
+ generic.t.toString();
+ }
+ {
+ Generic<Exception> generic = new Generic<Exception>();
+ generic.t.toString();
+ }
+ {
+ Generic<?> generic = new Generic<?>();
+ generic.t.toString();
+ }
+ {
+ Generic<? extends Throwable> generic = new Generic<Exception>();
+ generic.t.toString();
+ }
+ {
+ Generic<? extends Throwable> generic = new Generic<? extends Throwable>();
+ generic.t.toString();
+ }
+ {
+ Generic<? super RuntimeException> generic = new Generic<Exception>();
+ generic.t.toString();
+ }
+ {
+ Generic<? super RuntimeException> generic = new Generic<? super RuntimeException>();
+ generic.t.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/def/R2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/def/R2.js
new file mode 100644
index 0000000..7803a14
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/def/R2.js
@@ -0,0 +1,38 @@
+package g2.f.s.def;
+
+import g1.t.s.def.Generic;
+
+public class R2 {
+ {
+ Generic.Member member = new Generic().new Member();
+ member.m.toString();
+ }
+ {
+ Generic<Object>.Member member = new Generic<Object>().new Member();
+ member.m.toString();
+ }
+ {
+ Generic<Exception>.Member member = new Generic<Exception>().new Member();
+ member.m.toString();
+ }
+ {
+ Generic<?>.Member member = new Generic<?>().new Member();
+ member.m.toString();
+ }
+ {
+ Generic<? extends Throwable>.Member member = new Generic<Exception>().new Member();
+ member.m.toString();
+ }
+ {
+ Generic<? extends Throwable>.Member member = new Generic<? extends Throwable>().new Member();
+ member.m.toString();
+ }
+ {
+ Generic<? super RuntimeException>.Member member = new Generic<Exception>().new Member();
+ member.m.toString();
+ }
+ {
+ Generic<? super RuntimeException>.Member member = new Generic<? super RuntimeException>().new Member();
+ member.m.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/def/R3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/def/R3.js
new file mode 100644
index 0000000..68c52fc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/def/R3.js
@@ -0,0 +1,54 @@
+package g2.f.s.def;
+
+import g1.t.s.def.Generic;
+
+public class R3 {
+ {
+ Generic.MemberGeneric member = new Generic().new MemberGeneric();
+ member.v.toString();
+ }
+ {
+ Generic<Object>.MemberGeneric<Object> member = new Generic<Object>().new MemberGeneric<Object>();
+ member.v.toString();
+ }
+ {
+ Generic<Exception>.MemberGeneric<Exception> member = new Generic<Exception>().new MemberGeneric<Exception>();
+ member.v.toString();
+ }
+ {
+ Generic<?>.MemberGeneric<?> member = new Generic<?>().new MemberGeneric<?>();
+ member.v.toString();
+ }
+ {
+ Generic<? extends Throwable>.MemberGeneric<? extends Throwable> member = new Generic<Exception>().new MemberGeneric<Exception>();
+ member.v.toString();
+ }
+ {
+ Generic<? extends Throwable>.MemberGeneric<? extends Throwable> member = new Generic<Exception>().new MemberGeneric<? extends Throwable>();
+ member.v.toString();
+ }
+ {
+ Generic<? extends Throwable>.MemberGeneric<? extends Throwable> member = new Generic<? extends Throwable>().new MemberGeneric<Exception>();
+ member.v.toString();
+ }
+ {
+ Generic<? extends Throwable>.MemberGeneric<? extends Throwable> member = new Generic<? extends Throwable>().new MemberGeneric<? extends Throwable>();
+ member.v.toString();
+ }
+ {
+ Generic<? super RuntimeException>.MemberGeneric<? super RuntimeException> member = new Generic<Exception>().new MemberGeneric<Exception>();
+ member.v.toString();
+ }
+ {
+ Generic<? super RuntimeException>.MemberGeneric<? super RuntimeException> member = new Generic<Exception>().new MemberGeneric<? super RuntimeException>();
+ member.v.toString();
+ }
+ {
+ Generic<? super RuntimeException>.MemberGeneric<? super RuntimeException> member = new Generic<? super RuntimeException>().new MemberGeneric<Exception>();
+ member.v.toString();
+ }
+ {
+ Generic<? super RuntimeException>.MemberGeneric<? super RuntimeException> member = new Generic<? super RuntimeException>().new MemberGeneric<? super RuntimeException>();
+ member.v.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/def/R4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/def/R4.js
new file mode 100644
index 0000000..f0bdbe7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/def/R4.js
@@ -0,0 +1,38 @@
+package g2.f.s.def;
+
+import g1.t.s.def.NonGeneric;
+
+public class R4 {
+ {
+ NonGeneric.GenericMember member = new NonGeneric().new GenericMember();
+ member.t.toString();
+ }
+ {
+ NonGeneric.GenericMember<Object> member = new NonGeneric().new GenericMember<Object>();
+ member.t.toString();
+ }
+ {
+ NonGeneric.GenericMember<Exception> member = new NonGeneric().new GenericMember<Exception>();
+ member.t.toString();
+ }
+ {
+ NonGeneric.GenericMember<?> member = new NonGeneric().new GenericMember<?>();
+ member.t.toString();
+ }
+ {
+ NonGeneric.GenericMember<? extends Throwable> member = new NonGeneric().new GenericMember<Exception>();
+ member.t.toString();
+ }
+ {
+ NonGeneric.GenericMember<? extends Throwable> member = new NonGeneric().new GenericMember<? extends Throwable>();
+ member.t.toString();
+ }
+ {
+ NonGeneric.GenericMember<? super RuntimeException> member = new NonGeneric().new GenericMember<Exception>();
+ member.t.toString();
+ }
+ {
+ NonGeneric.GenericMember<? super RuntimeException> member = new NonGeneric().new GenericMember<? super RuntimeException>();
+ member.t.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/ref/RR1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/ref/RR1.js
new file mode 100644
index 0000000..a749381
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/ref/RR1.js
@@ -0,0 +1,21 @@
+package g2.f.s.ref;
+
+import g1.t.s.ref.R1;
+
+public class RR1 {
+ {
+ R1 test = new R1();
+ test.gen.toString();
+ test.gen_obj.toString();
+ test.gen_exc.toString();
+ test.gen_wld.toString();
+ test.gen_thr.toString();
+ test.gen_run.toString();
+ test.qgen.toString();
+ test.qgen_obj.toString();
+ test.qgen_exc.toString();
+ test.qgen_wld.toString();
+ test.qgen_thr.toString();
+ test.qgen_run.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/ref/RR2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/ref/RR2.js
new file mode 100644
index 0000000..c1f76cf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/ref/RR2.js
@@ -0,0 +1,21 @@
+package g2.f.s.ref;
+
+import g1.t.s.ref.R2;
+
+public class RR2 {
+ {
+ R2 test = new R2();
+ test.gen.toString();
+ test.gen_obj.toString();
+ test.gen_exc.toString();
+ test.gen_wld.toString();
+ test.gen_thr.toString();
+ test.gen_run.toString();
+ test.qgen.toString();
+ test.qgen_obj.toString();
+ test.qgen_exc.toString();
+ test.qgen_wld.toString();
+ test.qgen_thr.toString();
+ test.qgen_run.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/ref/RR3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/ref/RR3.js
new file mode 100644
index 0000000..7fbb2e4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/ref/RR3.js
@@ -0,0 +1,21 @@
+package g2.f.s.ref;
+
+import g1.t.s.ref.R3;
+
+public class RR3 {
+ {
+ R3 test = new R3();
+ test.gen.toString();
+ test.gen_obj.toString();
+ test.gen_exc.toString();
+ test.gen_wld.toString();
+ test.gen_thr.toString();
+ test.gen_run.toString();
+ test.qgen.toString();
+ test.qgen_obj.toString();
+ test.qgen_exc.toString();
+ test.qgen_wld.toString();
+ test.qgen_thr.toString();
+ test.qgen_run.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/ref/RR4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/ref/RR4.js
new file mode 100644
index 0000000..71b1259
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/ref/RR4.js
@@ -0,0 +1,21 @@
+package g2.f.s.ref;
+
+import g1.t.s.ref.R4;
+
+public class RR4 {
+ {
+ R4 test = new R4();
+ test.gen.toString();
+ test.gen_obj.toString();
+ test.gen_exc.toString();
+ test.gen_wld.toString();
+ test.gen_thr.toString();
+ test.gen_run.toString();
+ test.qgen.toString();
+ test.qgen_obj.toString();
+ test.qgen_exc.toString();
+ test.qgen_wld.toString();
+ test.qgen_thr.toString();
+ test.qgen_run.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/def/GM.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/def/GM.js
new file mode 100644
index 0000000..7bf85e4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/def/GM.js
@@ -0,0 +1,20 @@
+/*
+ * package g1.t.m.def is the package to define (def) generic (g1) types (t) (top level or
+ * members) with multiple (m) type parameters
+ *
+ * Generic type which also contains both generic and non-generic member types.
+ */
+package g3.t.def;
+public class GM<T1, T2, T3> {
+ public T1 t1;
+ public T2 t2;
+ public T3 t3;
+ public class Member {
+ public Object m;
+ }
+ public class Generic<U1, U2, U3> {
+ public U1 u1;
+ public U2 u2;
+ public U3 u3;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/def/GS.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/def/GS.js
new file mode 100644
index 0000000..26a0817
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/def/GS.js
@@ -0,0 +1,16 @@
+/*
+ * package g1.t.s.ref is the package to define types (t) which contain
+ * references (ref) to generic types (g1) which have only one single (s) type parameter
+ *
+ * Generic type which also contains both generic and non-generic member types.
+ */
+package g3.t.def;
+public class GS<T> {
+ public T t;
+ public class Member {
+ public Object m;
+ }
+ public class Generic<V> {
+ public V v;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/def/NGM.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/def/NGM.js
new file mode 100644
index 0000000..641e631
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/def/NGM.js
@@ -0,0 +1,15 @@
+/*
+ * package g1.t.m.def is the package to define (def) generic (g1) types (t) (top level or
+ * members) with multiple (m) type parameters
+ *
+ * This type is a non-generic type which contains a generic member.
+ */
+package g3.t.def;
+
+public class NGM {
+ public class Generic<T1, T2, T3> {
+ public T1 t1;
+ public T2 t2;
+ public T3 t3;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/def/NGS.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/def/NGS.js
new file mode 100644
index 0000000..c51ac40
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/def/NGS.js
@@ -0,0 +1,12 @@
+/*
+ * package g1.t.s.ref is the package to define types (t) which contain
+ * references (ref) to generic types (g1) which have only one single (s) type parameter
+ *
+ * This type is a non-generic type which contains a generic member.
+ */
+package g3.t.def;
+public class NGS {
+ public class Generic<T> {
+ public T t;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/ref/R1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/ref/R1.js
new file mode 100644
index 0000000..387f791
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/ref/R1.js
@@ -0,0 +1,43 @@
+/*
+ * package g3.t.ref is second package to define types which contain
+ * references (ref) to generic (g1) types (t)
+ */
+package g3.t.ref;
+
+import g3.t.def.GM;
+import g3.t.def.GS;
+
+/*
+ * This type is used to test references to generic type with nested parameterized types
+ */
+public class R1 {
+ // simple name
+ public GS<GM<?, ?, ?>> sgsm_wld;
+ public GS<GM<GM<?, ?, ?>,GM<?, ?, ?>,GM<?, ?, ?>>> sgsm_www;
+ public GS<GM<Object, Exception, RuntimeException>> sgsm_obj;
+ public GM<GS<?>, GS<?>, GS<?>> sgms_wld;
+ public GM<GS<?>, GS<GS<?>>, GS<GS<GS<?>>>> sgms_www;
+ public GM<GS<Object>, GS<? extends Throwable>, GS<? super RuntimeException>> sgms_obj;
+ // qualified name
+ public g3.t.def.GS<g3.t.def.GM<?, ?, ?>> qgsm_wld;
+ public g3.t.def.GS<g3.t.def.GM<g3.t.def.GM<?, ?, ?>, g3.t.def.GM<?, ?, ?>, g3.t.def.GM<?, ?, ?>>> qgsm_www;
+ public g3.t.def.GS<g3.t.def.GM<java.lang.Object, java.lang.Exception, java.lang.RuntimeException>> qgsm_obj;
+ public g3.t.def.GM<g3.t.def.GS<?>, g3.t.def.GS<?>, g3.t.def.GS<?>> qgms_wld;
+ public g3.t.def.GM<g3.t.def.GS<?>, g3.t.def.GS<g3.t.def.GS<?>>, g3.t.def.GS<g3.t.def.GS<g3.t.def.GS<?>>>> qgms_www;
+ public g3.t.def.GM<g3.t.def.GS<java.lang.Object>, g3.t.def.GS<? extends java.lang.Throwable>, g3.t.def.GS<? super java.lang.RuntimeException>> qgms_obj;
+
+ {
+ sgsm_wld.toString();
+ sgsm_www.toString();
+ sgsm_obj.toString();
+ sgms_wld.toString();
+ sgms_www.toString();
+ sgms_obj.toString();
+ qgsm_wld.toString();
+ qgsm_www.toString();
+ qgsm_obj.toString();
+ qgms_wld.toString();
+ qgms_www.toString();
+ qgms_obj.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/ref/R2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/ref/R2.js
new file mode 100644
index 0000000..1909427
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/ref/R2.js
@@ -0,0 +1,43 @@
+/*
+ * package g3.t.ref is second package to define types which contain
+ * references (ref) to generic (g1) types (t)
+ */
+package g3.t.ref;
+
+import g3.t.def.GM;
+import g3.t.def.GS;
+
+/*
+ * This type is used to test references to generic type with nested parameterized types
+ */
+public class R2 {
+ // simple name
+ public GS<GM<?, ?, ?>.Member>.Member sgsm_wld;
+ public GS<GM<GM<?, ?, ?>.Member,GM<?, ?, ?>.Member,GM<?, ?, ?>.Member>.Member>.Member sgsm_www;
+ public GS<GM<Object, Exception, RuntimeException>.Member>.Member sgsm_obj;
+ public GM<GS<?>.Member, GS<?>.Member, GS<?>.Member>.Member sgms_wld;
+ public GM<GS<?>.Member, GS<GS<?>.Member>.Member, GS<GS<GS<?>.Member>.Member>.Member>.Member sgms_www;
+ public GM<GS<Object>.Member, GS<? extends Throwable>.Member, GS<? super RuntimeException>.Member>.Member sgms_obj;
+ // qualified name
+ public g3.t.def.GS<g3.t.def.GM<?, ?, ?>.Member>.Member qgsm_wld;
+ public g3.t.def.GS<g3.t.def.GM<g3.t.def.GM<?, ?, ?>.Member, g3.t.def.GM<?, ?, ?>.Member, g3.t.def.GM<?, ?, ?>.Member>.Member>.Member qgsm_www;
+ public g3.t.def.GS<g3.t.def.GM<java.lang.Object, java.lang.Exception, java.lang.RuntimeException>.Member>.Member qgsm_obj;
+ public g3.t.def.GM<g3.t.def.GS<?>.Member, g3.t.def.GS<?>.Member, g3.t.def.GS<?>.Member>.Member qgms_wld;
+ public g3.t.def.GM<g3.t.def.GS<?>.Member, g3.t.def.GS<g3.t.def.GS<?>.Member>.Member, g3.t.def.GS<g3.t.def.GS<g3.t.def.GS<?>.Member>.Member>.Member>.Member qgms_www;
+ public g3.t.def.GM<g3.t.def.GS<java.lang.Object>.Member, g3.t.def.GS<? extends java.lang.Throwable>.Member, g3.t.def.GS<? super java.lang.RuntimeException>.Member>.Member qgms_obj;
+
+ {
+ sgsm_wld.toString();
+ sgsm_www.toString();
+ sgsm_obj.toString();
+ sgms_wld.toString();
+ sgms_www.toString();
+ sgms_obj.toString();
+ qgsm_wld.toString();
+ qgsm_www.toString();
+ qgsm_obj.toString();
+ qgms_wld.toString();
+ qgms_www.toString();
+ qgms_obj.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/ref/R3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/ref/R3.js
new file mode 100644
index 0000000..702e224
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/ref/R3.js
@@ -0,0 +1,43 @@
+/*
+ * package g3.t.ref is second package to define types which contain
+ * references (ref) to generic (g1) types (t)
+ */
+package g3.t.ref;
+
+import g3.t.def.GM;
+import g3.t.def.GS;
+
+/*
+ * This type is used to test references to generic type with nested parameterized types
+ */
+public class R3 {
+ // simple name
+ public GS<GM<?, ?, ?>.Generic<?, ?, ?>>.Generic<?> sgsm_wld;
+ public GS<GM<GM<?, ?, ?>.Generic<?,?,?>,GM<?, ?, ?>.Generic<?,?,?>,GM<?, ?, ?>.Generic<?,?,?>>.Generic<?,?,?>>.Generic<?> sgsm_www;
+ public GS<GM<Object, Exception, RuntimeException>.Generic<Object, Exception, RuntimeException>>.Generic<Exception> sgsm_obj;
+ public GM<GS<?>.Generic<?>, GS<?>.Generic<?>, GS<?>.Generic<?>>.Generic<?,?,?> sgms_wld;
+ public GM<GS<?>.Generic<?>, GS<GS<?>.Generic<?>>.Generic<?>, GS<GS<GS<?>.Generic<?>>.Generic<?>>.Generic<?>>.Generic<?,?,?> sgms_www;
+ public GM<GS<Object>.Generic<?>, GS<? extends Throwable>.Generic<?>, GS<? super RuntimeException>.Generic<?>>.Generic<?,?,?> sgms_obj;
+ // qualified name
+ public g3.t.def.GS<g3.t.def.GM<?, ?, ?>.Generic<?, ?, ?>>.Generic<?> qgsm_wld;
+ public g3.t.def.GS<g3.t.def.GM<g3.t.def.GM<?, ?, ?>.Generic<?,?,?>,g3.t.def.GM<?, ?, ?>.Generic<?,?,?>,g3.t.def.GM<?, ?, ?>.Generic<?,?,?>>.Generic<?,?,?>>.Generic<?> qgsm_www;
+ public g3.t.def.GS<g3.t.def.GM<Object, Exception, RuntimeException>.Generic<Object, Exception, RuntimeException>>.Generic<Exception> qgsm_obj;
+ public g3.t.def.GM<g3.t.def.GS<?>.Generic<?>, g3.t.def.GS<?>.Generic<?>, g3.t.def.GS<?>.Generic<?>>.Generic<?,?,?> qgms_wld;
+ public g3.t.def.GM<g3.t.def.GS<?>.Generic<?>, g3.t.def.GS<g3.t.def.GS<?>.Generic<?>>.Generic<?>, g3.t.def.GS<g3.t.def.GS<g3.t.def.GS<?>.Generic<?>>.Generic<?>>.Generic<?>>.Generic<?,?,?> qgms_www;
+ public g3.t.def.GM<g3.t.def.GS<Object>.Generic<?>, g3.t.def.GS<? extends Throwable>.Generic<?>, g3.t.def.GS<? super RuntimeException>.Generic<?>>.Generic<?,?,?> qgms_obj;
+
+ {
+ sgsm_wld.toString();
+ sgsm_www.toString();
+ sgsm_obj.toString();
+ sgms_wld.toString();
+ sgms_www.toString();
+ sgms_obj.toString();
+ qgsm_wld.toString();
+ qgsm_www.toString();
+ qgsm_obj.toString();
+ qgms_wld.toString();
+ qgms_www.toString();
+ qgms_obj.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/ref/R4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/ref/R4.js
new file mode 100644
index 0000000..741f446
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/ref/R4.js
@@ -0,0 +1,43 @@
+/*
+ * package g3.t.ref is second package to define types which contain
+ * references (ref) to generic (g1) types (t)
+ */
+package g3.t.ref;
+
+import g3.t.def.NGM;
+import g3.t.def.NGS;
+
+/*
+ * This type is used to test references to generic type with nested parameterized types
+ */
+public class R4 {
+ // simple name
+ public NGS.Generic<NGM.Generic<?, ?, ?>> sgsm_wld;
+ public NGS.Generic<NGM.Generic<NGM.Generic<?, ?, ?>,NGM.Generic<?, ?, ?>,NGM.Generic<?, ?, ?>>> sgsm_www;
+ public NGS.Generic<NGM.Generic<Object, Exception, RuntimeException>> sgsm_obj;
+ public NGM.Generic<NGS.Generic<?>, NGS.Generic<?>, NGS.Generic<?>> sgms_wld;
+ public NGM.Generic<NGS.Generic<?>, NGS.Generic<NGS.Generic<?>>, NGS.Generic<NGS.Generic<NGS.Generic<?>>>> sgms_www;
+ public NGM.Generic<NGS.Generic<Object>, NGS.Generic<? extends Throwable>, NGS.Generic<? super RuntimeException>> sgms_obj;
+ // qualified name
+ public g3.t.def.NGS.Generic<g3.t.def.NGM.Generic<?, ?, ?>> qgsm_wld;
+ public g3.t.def.NGS.Generic<g3.t.def.NGM.Generic<g3.t.def.NGM.Generic<?, ?, ?>, g3.t.def.NGM.Generic<?, ?, ?>, g3.t.def.NGM.Generic<?, ?, ?>>> qgsm_www;
+ public g3.t.def.NGS.Generic<g3.t.def.NGM.Generic<java.lang.Object, java.lang.Exception, java.lang.RuntimeException>> qgsm_obj;
+ public g3.t.def.NGM.Generic<g3.t.def.NGS.Generic<?>, g3.t.def.NGS.Generic<?>, g3.t.def.NGS.Generic<?>> qgms_wld;
+ public g3.t.def.NGM.Generic<g3.t.def.NGS.Generic<?>, g3.t.def.NGS.Generic<g3.t.def.NGS.Generic<?>>, g3.t.def.NGS.Generic<g3.t.def.NGS.Generic<g3.t.def.NGS.Generic<?>>>> qgms_www;
+ public g3.t.def.NGM.Generic<g3.t.def.NGS.Generic<java.lang.Object>, g3.t.def.NGS.Generic<? extends java.lang.Throwable>, g3.t.def.NGS.Generic<? super java.lang.RuntimeException>> qgms_obj;
+
+ {
+ sgsm_wld.toString();
+ sgsm_www.toString();
+ sgsm_obj.toString();
+ sgms_wld.toString();
+ sgms_www.toString();
+ sgms_obj.toString();
+ qgsm_wld.toString();
+ qgsm_www.toString();
+ qgsm_obj.toString();
+ qgms_wld.toString();
+ qgms_www.toString();
+ qgms_obj.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g4/v/ref/R1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g4/v/ref/R1.js
new file mode 100644
index 0000000..886eea6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g4/v/ref/R1.js
@@ -0,0 +1,35 @@
+/*
+ * package g4.v.ref is a package to define method which define and contain
+ * references (ref) to local variables (v) based on parameterized types
+ */
+package g4.v.ref;
+
+import g1.t.s.def.Generic;
+
+/*
+ * This type is used to test declaration and references to local variables
+ */
+public class R1 {
+ void simple_name(
+ Generic<Object> gen_obj,
+ Generic<Exception> gen_exc,
+ Generic<? extends Throwable> gen_thr,
+ Generic<? super RuntimeException> gen_run)
+ {
+ gen_obj.toString();
+ gen_exc.toString();
+ gen_thr.toString();
+ gen_run.toString();
+ }
+ void qualified_name() {
+ g1.t.s.def.Generic<Object> gen_obj = new Generic<Object>();
+ g1.t.s.def.Generic<Exception> gen_exc = new Generic<Exception>();
+ g1.t.s.def.Generic<? extends Throwable> gen_thr = new Generic<? extends Throwable>();
+ g1.t.s.def.Generic<? super RuntimeException> gen_run = new Generic<? super RuntimeException>();
+
+ gen_obj.toString();
+ gen_exc.toString();
+ gen_thr.toString();
+ gen_run.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g4/v/ref/R2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g4/v/ref/R2.js
new file mode 100644
index 0000000..4d93056
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g4/v/ref/R2.js
@@ -0,0 +1,36 @@
+/*
+ * package g4.v.ref is a package to define method which define and contain
+ * references (ref) to local variables (v) based on parameterized types
+ */
+package g4.v.ref;
+
+import g1.t.s.def.NonGeneric;
+
+
+/*
+ * This type is used to test declaration and references to local variables
+ */
+public class R2 {
+ void simple_name() {
+ NonGeneric.GenericMember<Object> gen_obj = new NonGeneric().new GenericMember<Object>();
+ NonGeneric.GenericMember<Exception> gen_exc = new NonGeneric().new GenericMember<Exception>();
+ NonGeneric.GenericMember<? extends Throwable> gen_thr = new NonGeneric().new GenericMember<Exception>();
+ NonGeneric.GenericMember<? super RuntimeException> gen_run = new NonGeneric().new GenericMember<Exception>();
+
+ gen_obj.toString();
+ gen_exc.toString();
+ gen_thr.toString();
+ gen_run.toString();
+ }
+ void qualified_name(
+ g1.t.s.def.NonGeneric.GenericMember<Object> gen_obj,
+ g1.t.s.def.NonGeneric.GenericMember<Exception> gen_exc,
+ g1.t.s.def.NonGeneric.GenericMember<? extends Throwable> gen_thr,
+ g1.t.s.def.NonGeneric.GenericMember<? super RuntimeException> gen_run)
+ {
+ gen_obj.toString();
+ gen_exc.toString();
+ gen_thr.toString();
+ gen_run.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g4/v/ref/R3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g4/v/ref/R3.js
new file mode 100644
index 0000000..0887a3a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g4/v/ref/R3.js
@@ -0,0 +1,35 @@
+/*
+ * package g3.t.ref is second package to define types which contain
+ * references (ref) to generic (g1) types (t)
+ */
+package g4.v.ref;
+
+import g1.t.s.def.Generic;
+
+/*
+ * This type is used to test references to generic type with nested parameterized types
+ */
+public class R3 {
+ void simple_name(
+ Generic<Object>.MemberGeneric<Object> gen_obj,
+ Generic<Exception>.MemberGeneric<Exception> gen_exc,
+ Generic<? extends Throwable>.MemberGeneric<? extends Throwable> gen_thr,
+ Generic<? super RuntimeException>.MemberGeneric<? super RuntimeException> gen_run)
+ {
+ gen_obj.toString();
+ gen_exc.toString();
+ gen_thr.toString();
+ gen_run.toString();
+ }
+ void qualified_name() {
+ g1.t.s.def.Generic<Object>.MemberGeneric<Object> gen_obj = new Generic().new MemberGeneric<Object>();
+ g1.t.s.def.Generic<Exception>.MemberGeneric<Exception> gen_exc = new Generic().new MemberGeneric<Exception>();
+ g1.t.s.def.Generic<? extends Throwable>.MemberGeneric<? extends Throwable> gen_thr = new Generic().new MemberGeneric<Exception>();
+ g1.t.s.def.Generic<? super RuntimeException>.MemberGeneric<? super RuntimeException> gen_run = new Generic().new MemberGeneric<Exception>();
+
+ gen_obj.toString();
+ gen_exc.toString();
+ gen_thr.toString();
+ gen_run.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g4/v/ref/R4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g4/v/ref/R4.js
new file mode 100644
index 0000000..1edb7e5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g4/v/ref/R4.js
@@ -0,0 +1,35 @@
+/*
+ * package g3.t.ref is second package to define types which contain
+ * references (ref) to generic (g1) types (t)
+ */
+package g4.v.ref;
+
+import g1.t.s.def.Generic;
+
+/*
+ * This type is used to test references to generic type with nested parameterized types
+ */
+public class R4 {
+ void simple_name() {
+ Generic<Object>.Member gen_obj = new Generic<Object>().new Member();
+ Generic<Exception>.Member gen_exc = new Generic<Exception>().new Member();
+ Generic<? extends Throwable>.Member gen_thr = new Generic<? extends Throwable>().new Member();
+ Generic<? super RuntimeException>.Member gen_run = new Generic<? super RuntimeException>().new Member();
+
+ gen_obj.toString();
+ gen_exc.toString();
+ gen_thr.toString();
+ gen_run.toString();
+ }
+ void qualified_name(
+ g1.t.s.def.Generic<Object>.Member gen_obj,
+ g1.t.s.def.Generic<Exception>.Member gen_exc,
+ g1.t.s.def.Generic<? extends Throwable>.Member gen_thr,
+ g1.t.s.def.Generic<? super RuntimeException>.Member gen_run)
+ {
+ gen_obj.toString();
+ gen_exc.toString();
+ gen_thr.toString();
+ gen_run.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g4/v/ref/R5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g4/v/ref/R5.js
new file mode 100644
index 0000000..24348da
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g4/v/ref/R5.js
@@ -0,0 +1,48 @@
+/*
+ * package g4.v.ref is a package to define method which define and contain
+ * references (ref) to local variables (v) based on parameterized types
+ */
+package g4.v.ref;
+
+import g3.t.def.GM;
+import g3.t.def.GS;
+
+/*
+ * This type is used to test declaration and references to local variables
+ */
+public class R5 {
+ void simple_name() {
+ GS<GM<?, ?, ?>> gen_wld = new GS<GM<?, ?, ?>>();
+ GS<GM<GM<?, ?, ?>,GM<?, ?, ?>,GM<?, ?, ?>>> gen_www = new GS<GM<GM<?, ?, ?>,GM<?, ?, ?>,GM<?, ?, ?>>>();
+ GS<GM<Object, Exception, RuntimeException>> gen_obj = new GS<GM<Object, Exception, RuntimeException>>();
+ gen_wld.toString();
+ gen_www.toString();
+ gen_obj.toString();
+ }
+ void simple_name(
+ GM<GS<?>, GS<?>, GS<?>> gen_wld, // simple
+ GM<GS<?>, GS<GS<?>>, GS<GS<GS<?>>>> gen_www, // simple
+ GM<GS<Object>, GS<? extends Throwable>, GS<? super RuntimeException>> gen_obj) // simple
+ {
+ gen_wld.toString();
+ gen_www.toString();
+ gen_obj.toString();
+ }
+ void qualified_name (
+ g3.t.def.GS<g3.t.def.GM<?, ?, ?>> gen_wld, // qualified
+ g3.t.def.GS<g3.t.def.GM<g3.t.def.GM<?, ?, ?>, g3.t.def.GM<?, ?, ?>, g3.t.def.GM<?, ?, ?>>> gen_www, // qualified
+ g3.t.def.GS<g3.t.def.GM<java.lang.Object, java.lang.Exception, java.lang.RuntimeException>> gen_obj) // qualified
+ {
+ gen_wld.toString();
+ gen_www.toString();
+ gen_obj.toString();
+ }
+ void qualified_name () {
+ g3.t.def.GM<g3.t.def.GS<?>, g3.t.def.GS<?>, g3.t.def.GS<?>> gen_wld = new GM<GS<?>, GS<?>, GS<?>>();
+ g3.t.def.GM<g3.t.def.GS<?>, g3.t.def.GS<g3.t.def.GS<?>>, g3.t.def.GS<g3.t.def.GS<g3.t.def.GS<?>>>> gen_www = new GM<GS<?>, GS<GS<?>>, GS<GS<GS<?>>>>();
+ g3.t.def.GM<g3.t.def.GS<java.lang.Object>, g3.t.def.GS<? extends java.lang.Throwable>, g3.t.def.GS<? super java.lang.RuntimeException>> gen_obj = new GM<GS<Object>, GS<? extends Throwable>, GS<? super RuntimeException>>();
+ gen_wld.toString();
+ gen_www.toString();
+ gen_obj.toString();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/c/def/Multiple.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/c/def/Multiple.js
new file mode 100644
index 0000000..125e889
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/c/def/Multiple.js
@@ -0,0 +1,17 @@
+/*
+ * package g5.m.def is the package to define (def) generic (g5) methods (m)
+ *
+ * We have 5 typical methods:
+ * - standard: not generic, parameters is generic type parameter
+ * - generic: multiple method type parameters
+ * - return generic type with multiple type arguments
+ * - method parameter which is several parameterized types
+ * - mix of all previous ones
+ */
+package g5.c.def;
+public class Multiple<T1, T2, T3> {
+ public Multiple(T1 t1, T2 t2, T3 t3) {}
+ public <U1, U2, U3> Multiple(Multiple<T1, T2, T3> gst, U1 u1, U2 u2, U3 u3) {}
+ public Multiple(Multiple<T1, T2, T3> gst) {}
+ public <U1, U2, U3> Multiple(U1 u1, U2 u2, U3 u3, Multiple<T1, T2, T3> gst) {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/c/def/Single.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/c/def/Single.js
new file mode 100644
index 0000000..a4d591e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/c/def/Single.js
@@ -0,0 +1,16 @@
+/*
+ * package g5.m.def is the package to define (def) generic (g5) methods (m)
+ *
+ * We have 4 typical constructors:
+ * - standard: not generic, parameters is generic type parameter
+ * - generic: one single method type parameter
+ * - method parameter which is a parameterized type
+ * - mix of all previous ones
+ */
+package g5.c.def;
+public class Single<T> {
+ public Single(T t) {}
+ public <U> Single(T t, U u) {}
+ public Single(Single<T> gst) {}
+ public <U> Single(U u, Single<T> gst) {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/c/ref/RefMultiple.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/c/ref/RefMultiple.js
new file mode 100644
index 0000000..f307e60
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/c/ref/RefMultiple.js
@@ -0,0 +1,27 @@
+package g5.c.ref;
+
+import g5.c.def.*;
+
+public class RefMultiple {
+ // Test constructors calls to a generic parameterized with Object
+ void testObject() {
+ Multiple<Object, Object, Object> gm = new Multiple<Object, Object, Object>(new Object(), new Object(), new Object());
+ new <Object, Throwable, Exception>Multiple<Object, Object, Object>(gm, new Object(), new Throwable(), new Exception());
+ new Multiple<Object, Object, Object>(gm);
+ new <Object, Throwable, Exception>Multiple<Object, Object, Object>(new Object(), new Throwable(), new Exception(), gm);
+ }
+ // Test constructors calls to a generic parameterized with Exception
+ void testException() {
+ Multiple<Exception, Exception, Exception> gm = new Multiple<Exception, Exception, Exception>(new Exception(), new Exception(), new Exception());
+ new <Exception, Exception, Exception>Multiple<Exception, Exception, Exception>(gm, new Exception(),new Exception(),new Exception());
+ new Multiple<Exception, Exception, Exception>(gm);
+ new <Exception, Exception, Exception>Multiple<Exception, Exception, Exception>(new Exception(),new Exception(),new Exception(), gm);
+ }
+ // Test constructors calls to a generic parameterized with RuntimeException
+ void testRuntimeException() {
+ Multiple<RuntimeException, RuntimeException, RuntimeException> gm = new Multiple<RuntimeException, RuntimeException, RuntimeException>(new RuntimeException(), new RuntimeException(), new RuntimeException());
+ new <RuntimeException, RuntimeException, RuntimeException>Multiple<RuntimeException, RuntimeException, RuntimeException>(gm, new RuntimeException(),new RuntimeException(),new RuntimeException());
+ new Multiple<RuntimeException, RuntimeException, RuntimeException>(gm);
+ new <RuntimeException, RuntimeException, RuntimeException>Multiple<RuntimeException, RuntimeException, RuntimeException>(new RuntimeException(),new RuntimeException(),new RuntimeException(), gm);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/c/ref/RefRaw.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/c/ref/RefRaw.js
new file mode 100644
index 0000000..1304ce9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/c/ref/RefRaw.js
@@ -0,0 +1,22 @@
+package g5.c.ref;
+
+import g5.c.def.*;
+
+
+// Test methods calls to a raw types
+public class RefRaw {
+ // Single type parameter generic type
+ void testSingle() {
+ Single gs = new Single(new Object());
+ new Single(new Object(), new Throwable());
+ new Single(gs);
+ new Single(new Object(), gs);
+ }
+ // Multiple type parameters generic type
+ void testMultiple() {
+ Multiple gm = new Multiple(new Object(), new Object(), new Object());
+ new Multiple(gm, new Object(), new Throwable(), new Exception());
+ new Multiple(gm);
+ new Multiple(new Object(), new Throwable(), new Exception(), gm);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/c/ref/RefSingle.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/c/ref/RefSingle.js
new file mode 100644
index 0000000..930b99e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/c/ref/RefSingle.js
@@ -0,0 +1,27 @@
+package g5.c.ref;
+
+import g5.c.def.Single;
+
+public class RefSingle {
+ // Test constructors calls to a generic parameterized with Object
+ void testObject() {
+ Single<Object> gs = new Single<Object>(new Object());
+ new <Throwable>Single<Object>(new Object(), new Throwable());
+ new Single<Object>(gs);
+ new <Exception>Single<Object>(new Exception(), gs);
+ }
+ // Test constructors calls to a generic parameterized with Exception
+ void testException() {
+ Single<Exception> gs = new Single<Exception>(new Exception());
+ new <Exception>Single<Exception>(new Exception(), new Exception());
+ new Single<Exception>(gs);
+ new <Exception>Single<Exception>(new Exception(), gs);
+ }
+ // Test constructors calls to a generic parameterized with RuntimeException
+ void testRuntimeException() {
+ Single<RuntimeException> gs = new Single<RuntimeException>(new RuntimeException());
+ new <RuntimeException>Single<RuntimeException>(new RuntimeException(), new RuntimeException());
+ new Single<RuntimeException>(gs);
+ new <RuntimeException>Single<RuntimeException>(new RuntimeException(), gs);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/m/def/Multiple.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/m/def/Multiple.js
new file mode 100644
index 0000000..99e1313
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/m/def/Multiple.js
@@ -0,0 +1,32 @@
+/*
+ * package g5.m.def is the package to define (def) generic (g5) methods (m)
+ *
+ * We have 5 typical methods:
+ * - standard: not generic, parameters is generic type parameter
+ * - generic: multiple method type parameters
+ * - return generic type with multiple type arguments
+ * - method parameter which is several parameterized types
+ * - mix of all previous ones
+ */
+package g5.m.def;
+public class Multiple<T1, T2, T3> {
+ public void standard(T1 t1, T2 t2, T3 t3) {
+ }
+ public <U1, U2, U3> T1 generic(U1 u1, U2 u2, U3 u3) {
+ return null;
+ }
+ public Multiple<T1, T2, T3> returnParamType() {
+ return new Multiple<T1, T2, T3>();
+ }
+ public void paramTypesArgs(Single<T1> st1, Single<T2> st2, Single<T3> st3, Multiple<T1, T2, T3> gmt) {}
+ public <U1, U2 extends Exception, U3 extends RuntimeException> Multiple<T1, T2, T3> complete(U1 u1, U2 u2, U3 u3, Multiple<T1, T2, T3> g) {
+ if (u1 == null || u2==null || u3==null) {
+ if (g == null) {
+ return null;
+ }
+ return g;
+ } else {
+ return new Multiple<T1, T2, T3>().returnParamType();
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/m/def/Single.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/m/def/Single.js
new file mode 100644
index 0000000..8eddb21
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/m/def/Single.js
@@ -0,0 +1,32 @@
+/*
+ * package g5.m.def is the package to define (def) generic (g5) methods (m)
+ *
+ * We have 5 typical methods:
+ * - standard: not generic, parameters is generic type parameter
+ * - generic: one single method type parameter
+ * - return generic type
+ * - method parameter which is a parameterized type
+ * - mix of all previous ones
+ */
+package g5.m.def;
+public class Single<T> {
+ public void standard(T t) {
+ }
+ public <U> T generic(U u) {
+ return null;
+ }
+ public Single<T> returnParamType() {
+ return new Single<T>();
+ }
+ public void paramTypesArgs(Single<T> gst) {}
+ public <U> Single<T> complete(U u, Single<T> g) {
+ if (u == null) {
+ if (g == null) {
+ return null;
+ }
+ return g;
+ } else {
+ return new Single<T>().returnParamType();
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/m/ref/RefMultiple.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/m/ref/RefMultiple.js
new file mode 100644
index 0000000..b1c934b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/m/ref/RefMultiple.js
@@ -0,0 +1,42 @@
+package g5.m.ref;
+
+import g5.m.def.*;
+
+public class RefMultiple {
+ // Test methods calls
+ void test() {
+ Multiple<Object, Exception, RuntimeException> gm = new Multiple<Object, Exception, RuntimeException>();
+ // Test reference to a standard method
+ gm.standard(new Object(), new Exception(), new RuntimeException());
+ // Test reference to a generic method
+ gm.<Object, Exception, RuntimeException>generic(new Object(), new Exception(), new RuntimeException());
+ // Test reference to a method returning a parameterized type
+ gm = gm.returnParamType();
+ // Test reference to a method with parameterized type arguments
+ gm.paramTypesArgs(new Single<Object>(), new Single<Exception>(), new Single<RuntimeException>(), gm);
+ // Test reference to a generic method returning a param type with param type parameters (=full)
+ gm = gm.<Object, Exception, RuntimeException>complete(new Object(), new Exception(), new RuntimeException(), gm);
+ }
+ // Test methods calls to a generic parameterized with ?
+ void testUnbound() {
+ Multiple<?,?,?> gm = new Multiple();
+ gm.paramTypesArgs(new Single<Object>(), new Single<Object>(), new Single<Object>(), gm);
+ gm = gm.returnParamType();
+ }
+ // Test methods calls to a generic parameterized with ? extends Throwable
+ void testExtends() {
+ Multiple<Object, ? extends Throwable, ? extends Exception> gm = new Multiple<Object, Exception, RuntimeException>();
+ gm.<Object, RuntimeException, RuntimeException>generic(new Object(), new RuntimeException(), new RuntimeException());
+ gm.paramTypesArgs(new Single<Object>(), new Single<Throwable>(), new Single<Exception>(), gm);
+ gm = gm.returnParamType();
+ gm = gm.<Object, RuntimeException, RuntimeException>complete(new Object(), new RuntimeException(), new RuntimeException(), gm);
+ }
+ // Test methods calls to a generic parameterized with ? super RuntimeException
+ void testSuper() {
+ Multiple<Object, ? super RuntimeException, ? super IllegalMonitorStateException> gm = new Multiple<Object, Exception, RuntimeException>();
+ gm.<Object, RuntimeException, IllegalMonitorStateException>generic(new Object(), new RuntimeException(), new IllegalMonitorStateException());
+ gm.paramTypesArgs(new Single<Object>(), new Single<RuntimeException>(), new Single<RuntimeException>(), gm);
+ gm = gm.returnParamType();
+ gm = gm.<Object, RuntimeException, IllegalMonitorStateException>complete(new Object(), new RuntimeException(), new IllegalMonitorStateException(), gm);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/m/ref/RefRaw.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/m/ref/RefRaw.js
new file mode 100644
index 0000000..6bc84c5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/m/ref/RefRaw.js
@@ -0,0 +1,26 @@
+package g5.m.ref;
+
+import g5.m.def.*;
+
+
+// Test methods calls to a raw types
+public class RefRaw {
+ // Single type parameter generic type
+ void testSingle() {
+ Single gs = new Single();
+ gs.standard(new Exception());
+ gs.generic(new Exception());
+ gs = gs.returnParamType();
+ gs.paramTypesArgs(gs);
+ gs.complete(new Exception(), gs);
+ }
+ // Multiple type parameters generic type
+ void testMultiple() {
+ Multiple gm = new Multiple();
+ gm.standard(new Object(), new Exception(), new RuntimeException());
+ gm.generic(new Object(), new Exception(), new RuntimeException());
+ gm = gm.returnParamType();
+ gm.paramTypesArgs(new Single<Object>(), new Single<Exception>(), new Single<RuntimeException>(), gm);
+ gm = gm.complete(new Object(), new Exception(), new RuntimeException(), gm);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/m/ref/RefSingle.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/m/ref/RefSingle.js
new file mode 100644
index 0000000..7ba355b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/m/ref/RefSingle.js
@@ -0,0 +1,59 @@
+package g5.m.ref;
+
+import g5.m.def.Single;
+
+public class RefSingle {
+ // Test methods calls to a generic parameterized with Object
+ void testObject() {
+ Single<Object> gs = new Single<Object>();
+ // Test reference to a standard method
+ gs.standard(new Object());
+ // Test reference to a generic method
+ gs.<Object>generic(new Object());
+ // Test reference to a method returning a parameterized type
+ gs = gs.returnParamType();
+ // Test reference to a method with parameterized type arguments
+ gs.paramTypesArgs(gs);
+ // Test reference to a generic method returning a param type with param type parameters
+ gs.<Object>complete(new Object(), gs);
+ }
+ // Test methods calls to a generic parameterized with Exception
+ void testException() {
+ Single<Exception> gs = new Single<Exception>();
+ gs.standard(new Exception());
+ gs.<Exception>generic(new Exception());
+ gs = gs.returnParamType();
+ gs.paramTypesArgs(gs);
+ gs.<Exception>complete(new Exception(), gs);
+ }
+ // Test methods calls to a generic parameterized with RuntimeException
+ void testRuntimeException() {
+ Single<RuntimeException> gs = new Single<RuntimeException>();
+ gs.standard(new RuntimeException());
+ gs.<RuntimeException>generic(new RuntimeException());
+ gs = gs.returnParamType();
+ gs.paramTypesArgs(gs);
+ gs.<RuntimeException>complete(new RuntimeException(), gs);
+ }
+ // Test methods calls to a generic parameterized with ?
+ void testUnbound() {
+ Single<?> gs = new Single();
+ gs.paramTypesArgs(gs);
+ gs = gs.returnParamType();
+ gs.<String>complete(new String(), gs);
+ }
+ // Test methods calls to a generic parameterized with ? extends Throwable
+ void testExtends() {
+ Single<? extends Throwable> gs = new Single<Throwable>();
+ gs.paramTypesArgs(gs);
+ gs.returnParamType();
+ gs.<Throwable>complete(new Throwable(), gs);
+ }
+ // Test methods calls to a generic parameterized with ? super RuntimeException
+ void testSuper() {
+ Single<? super RuntimeException> gs = new Single<RuntimeException>();
+ gs.paramTypesArgs(gs);
+ gs = gs.returnParamType();
+ gs.<RuntimeException>complete(new RuntimeException(), gs);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g6/t/def/List.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g6/t/def/List.js
new file mode 100644
index 0000000..94c3475
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g6/t/def/List.js
@@ -0,0 +1,2 @@
+package g6.t.def;
+public class List<T> {}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g6/t/def/Table.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g6/t/def/Table.js
new file mode 100644
index 0000000..3dbd843
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g6/t/def/Table.js
@@ -0,0 +1,4 @@
+package g6.t.def;
+public class Table<T, U> {
+ public class Entry<T, U> {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g6/t/ref/Multiple.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g6/t/ref/Multiple.js
new file mode 100644
index 0000000..b71d741
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g6/t/ref/Multiple.js
@@ -0,0 +1,8 @@
+package g6.t.ref;
+import g6.t.def.Table;
+public class Multiple {
+ Table.Entry entry;
+ Table<String, Exception>.Entry<String, Exception> entryException;
+ Table<String, Exception>.Entry<String, Exception>[] entryExceptionArray;
+ Table<String, Table<String, Exception>.Entry<String, Exception>[]>.Entry<String, Table<String, Exception>.Entry<String, Exception>[]> tableOfEntryExceptionArray;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g6/t/ref/QualifMultiple.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g6/t/ref/QualifMultiple.js
new file mode 100644
index 0000000..e3e70b0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g6/t/ref/QualifMultiple.js
@@ -0,0 +1,6 @@
+package g6.t.ref;
+public class QualifMultiple {
+ g6.t.def.Table<String, Exception>.Entry<String, Exception> entryException;
+ g6.t.def.Table<String, Exception>.Entry<String, Exception>[] entryExceptionArray;
+ g6.t.def.Table<String, g6.t.def.Table<String, Exception>.Entry<String, Exception>[]>.Entry<String, g6.t.def.Table<String, Exception>.Entry<String, Exception>[]> tableOfEntryExceptionArray;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g6/t/ref/QualifSingle.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g6/t/ref/QualifSingle.js
new file mode 100644
index 0000000..9179ec2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g6/t/ref/QualifSingle.js
@@ -0,0 +1,7 @@
+package g6.t.ref;
+public class QualifSingle {
+ g6.t.def.List<Exception> exceptionList;
+ g6.t.def.List<Exception>[] exceptionListArray;
+ g6.t.def.List<g6.t.def.List<Exception>[]> exceptionListArrayList;
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g6/t/ref/Single.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g6/t/ref/Single.js
new file mode 100644
index 0000000..0771225
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g6/t/ref/Single.js
@@ -0,0 +1,8 @@
+package g6.t.ref;
+import g6.t.def.List;
+public class Single {
+ List list;
+ List<Exception> exceptionList;
+ List<Exception>[] exceptionListArray;
+ List<List<Exception>[]> exceptionListArrayList;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/p1/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/p1/X.js
new file mode 100644
index 0000000..0ec3703
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/p1/X.js
@@ -0,0 +1,3 @@
+package p1;
+public class X {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/p1/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/p1/Y.js
new file mode 100644
index 0000000..c896945
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/p1/Y.js
@@ -0,0 +1,6 @@
+package p1;
+public class Y<E> {
+ Object foo() {
+ return new Y<X>();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/p2/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/p2/X.js
new file mode 100644
index 0000000..5971170
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/p2/X.js
@@ -0,0 +1,9 @@
+package p2;
+public class X<E> {
+ public X() {
+ }
+ public X(E e) {
+ }
+ public void foo(E e) {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/p2/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/p2/Y.js
new file mode 100644
index 0000000..51ac5ff
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/p2/Y.js
@@ -0,0 +1,10 @@
+package p2;
+public class Y {
+ void bar() {
+ X<Object> x = new X<Object>();
+ x.foo(this);
+ }
+ Object foo() {
+ return new X<Object>(this);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/p3/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/p3/X.js
new file mode 100644
index 0000000..d107b10
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/p3/X.js
@@ -0,0 +1,6 @@
+package p3;
+public class X<T> {
+ T t;
+}
+class T {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s1/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s1/A.js
new file mode 100644
index 0000000..f0dcbf6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s1/A.js
@@ -0,0 +1,7 @@
+package s1;
+import static s1.pack.age.S.*;
+import static s1.pack.age.S.out;
+import static s1.pack.age.S.M.in;
+
+public class A {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s1/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s1/B.js
new file mode 100644
index 0000000..e6311b4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s1/B.js
@@ -0,0 +1,10 @@
+package s1;
+import static s1.pack.age.S.*;
+import static s1.pack.age.S.M.*;
+
+public class B {
+ public void foo() {
+ String so = out;
+ String si = in;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s1/C.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s1/C.js
new file mode 100644
index 0000000..10b6d17
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s1/C.js
@@ -0,0 +1,10 @@
+package s1;
+import static s1.pack.age.S.out;
+import static s1.pack.age.S.M.in;
+
+public class C {
+ public void foo() {
+ String so = out;
+ String si = in;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s1/D.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s1/D.js
new file mode 100644
index 0000000..9910dee
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s1/D.js
@@ -0,0 +1,9 @@
+package s1;
+import static s1.pack.age.S.M;
+
+public class D {
+ public void foo() {
+ M m = new M();
+ String si = m.in;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s1/pack/age/S.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s1/pack/age/S.js
new file mode 100644
index 0000000..d540a64
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s1/pack/age/S.js
@@ -0,0 +1,8 @@
+package s1.pack.age;
+
+public class S {
+ public final static String out = "out";
+ public static class M {
+ public final static String in = "in";
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s2/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s2/A.js
new file mode 100644
index 0000000..1d97da8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s2/A.js
@@ -0,0 +1,8 @@
+package s2;
+import static s2.pack.age.S.*;
+import static s2.pack.age.S.out;
+import static s2.pack.age.S.M.in;
+
+public class A {
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s2/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s2/B.js
new file mode 100644
index 0000000..3e29cb7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s2/B.js
@@ -0,0 +1,10 @@
+package s2;
+import static s2.pack.age.S.*;
+import static s2.pack.age.S.M.*;
+
+public class B {
+ public void foo() {
+ out();
+ in();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s2/C.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s2/C.js
new file mode 100644
index 0000000..fa560d2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s2/C.js
@@ -0,0 +1,10 @@
+package s2;
+import static s2.pack.age.S.out;
+import static s2.pack.age.S.M.in;
+
+public class C {
+ public void foo() {
+ out();
+ in();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s2/D.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s2/D.js
new file mode 100644
index 0000000..717da43
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s2/D.js
@@ -0,0 +1,9 @@
+package s2;
+import static s2.pack.age.S.M;
+
+public class D {
+ public void foo() {
+ M m = new M();
+ m.in();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s2/pack/age/S.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s2/pack/age/S.js
new file mode 100644
index 0000000..12cf0cc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s2/pack/age/S.js
@@ -0,0 +1,8 @@
+package s2.pack.age;
+
+public class S {
+ public final static String out() { return "out"; }
+ public static class M {
+ public final static String in() { return "in"; }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/v1/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/v1/X.js
new file mode 100644
index 0000000..1b52166
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/v1/X.js
@@ -0,0 +1,14 @@
+package v1;
+class X {
+ void vargs(int a, int b) {}
+ void vargs(int a, int... args) {}
+ void vargs(String... args) {}
+ void vargs(String str, boolean... args) {}
+ void bar() {
+ vargs(1, 2);
+ vargs(1, 2, 3);
+ vargs(1, 2, 3, 4, 5, 6);
+ vargs("x", "a","'b", "c");
+ vargs("x", false, true);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/JavaSearch15.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/JavaSearch15.jar
new file mode 100644
index 0000000..2ddfd2a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/JavaSearch15.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b110422.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b110422.jar
new file mode 100644
index 0000000..2554026
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b110422.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b123679.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b123679.jar
new file mode 100644
index 0000000..8da5f6b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b123679.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b124469.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b124469.jar
new file mode 100644
index 0000000..2f33d51
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b124469.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b124645.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b124645.jar
new file mode 100644
index 0000000..2fc2c47
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b124645.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b125178.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b125178.jar
new file mode 100644
index 0000000..1151a3e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b125178.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b126330.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b126330.jar
new file mode 100644
index 0000000..44a7f6c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b126330.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b128877.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b128877.jar
new file mode 100644
index 0000000..630d14b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b128877.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b137984.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b137984.jar
new file mode 100644
index 0000000..57d998c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b137984.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b140156.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b140156.jar
new file mode 100644
index 0000000..20a2060
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b140156.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b148215.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b148215.jar
new file mode 100644
index 0000000..393c663
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b148215.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b164791.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b164791.jar
new file mode 100644
index 0000000..1c7affd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b164791.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b166348.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b166348.jar
new file mode 100644
index 0000000..6bbd439
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b166348.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b86293.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b86293.jar
new file mode 100644
index 0000000..cf39059
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b86293.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b87627.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b87627.jar
new file mode 100644
index 0000000..426e679
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b87627.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b89848/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b89848/Test.js
new file mode 100644
index 0000000..1958c8e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b89848/Test.js
@@ -0,0 +1,7 @@
+package b89848;
+public class Test {
+ X x;
+ void foo() {
+ x.foo();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b89848/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b89848/X.js
new file mode 100644
index 0000000..0b7aab9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b89848/X.js
@@ -0,0 +1,11 @@
+package b89848;
+public class X {
+ String bar() { return ""; }
+ public void foo() {
+ new Object() {
+ public String toString() {
+ return bar();
+ }
+ };
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b95152.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b95152.jar
new file mode 100644
index 0000000..3c33ab0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b95152.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/test75816.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/test75816.jar
new file mode 100644
index 0000000..324548e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/test75816.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/test81556.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/test81556.jar
new file mode 100644
index 0000000..8a963c8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/test81556.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b108088/B108088.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b108088/B108088.js
new file mode 100644
index 0000000..5ba6d4b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b108088/B108088.js
@@ -0,0 +1,7 @@
+package b108088;
+class B108088 {
+ public void doit(A108088 pApp, String doitArg) {
+ pApp.subroutine(1.2f);
+ }
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b108088/Test108088.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b108088/Test108088.js
new file mode 100644
index 0000000..302ceaa
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b108088/Test108088.js
@@ -0,0 +1,12 @@
+package b108088;
+class A108088 {
+ B108088 fB;
+ public void subroutine(float subArg) {
+ subsub();
+ }
+ public void subsub() {
+ }
+
+}
+public class Test108088 {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b123679/pack/I123679.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b123679/pack/I123679.js
new file mode 100644
index 0000000..eb46cb3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b123679/pack/I123679.js
@@ -0,0 +1,3 @@
+package b123679.pack;
+public interface I123679 {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b123679/test/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b123679/test/Test.js
new file mode 100644
index 0000000..618b99d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b123679/test/Test.js
@@ -0,0 +1,19 @@
+package b123679.test;
+import b123679.pack.I123679;
+public class Test {
+ static class StaticClass {
+ class Member {
+ private I123679 parent;
+ Member(Object obj) {
+ if (obj instanceof I123679) {
+ parent = (I123679) obj;
+ } else {
+ parent = new I123679() {};
+ }
+ }
+ I123679 getParent() {
+ return parent;
+ }
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b124645/T_124645.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b124645/T_124645.js
new file mode 100644
index 0000000..da9c20c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b124645/T_124645.js
@@ -0,0 +1,10 @@
+package b124645;
+class C_124645 {}
+interface I_124645 {}
+
+public class T_124645 {
+ void m() {
+ new C_124645() {};
+ new I_124645() {};
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b124645/test/A_124645.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b124645/test/A_124645.js
new file mode 100644
index 0000000..da32492
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b124645/test/A_124645.js
@@ -0,0 +1,7 @@
+package b124645.test;
+import test.BE_124645;
+public class A_124645 extends BE_124645 {
+ void m() {
+ new BE_124645() { /* anonymous */ };
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b124645/test/X_124645.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b124645/test/X_124645.js
new file mode 100644
index 0000000..1486fc6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b124645/test/X_124645.js
@@ -0,0 +1,7 @@
+package b124645.test;
+import test.BE_124645;
+public class X_124645 extends BE_124645 {
+ void m() {
+ class Y_124645 extends BE_124645 {}
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b124645/xy/X_124645.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b124645/xy/X_124645.js
new file mode 100644
index 0000000..af74927
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b124645/xy/X_124645.js
@@ -0,0 +1,5 @@
+package b124645.xy;
+import xy.BE_124645;
+public class X_124645 {
+ class Y extends BE_124645 {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b124645/xy/Y_124645.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b124645/xy/Y_124645.js
new file mode 100644
index 0000000..faebe8e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b124645/xy/Y_124645.js
@@ -0,0 +1,4 @@
+package b124645.xy;
+import xy.BE_124645;
+public class Y_124645 extends BE_124645 {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b127628/Test127628.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b127628/Test127628.js
new file mode 100644
index 0000000..300bdfc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b127628/Test127628.js
@@ -0,0 +1,5 @@
+package b127628;
+/** @deprecated */
+public class Test127628 {
+ class Member127628 {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b137984/C.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b137984/C.js
new file mode 100644
index 0000000..b576dda
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b137984/C.js
@@ -0,0 +1,15 @@
+package b137984;
+public class C {
+ C2 c2;
+ C2.C3 c3;
+ C(int c) {
+ c2 = new C2(c);
+ c3 = c2.new C3(c);
+ }
+ class C2 {
+ C2(int x) {}
+ class C3 {
+ C3(int x) {}
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b163984/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b163984/A.js
new file mode 100644
index 0000000..cbebd57
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b163984/A.js
@@ -0,0 +1,4 @@
+package b163984;
+public class A {
+ public static void main(String[] args) {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b163984/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b163984/B.js
new file mode 100644
index 0000000..1357ff5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b163984/B.js
@@ -0,0 +1,4 @@
+package b163984;
+public class B {
+ public static void main(String[] args) {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b163984/C.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b163984/C.js
new file mode 100644
index 0000000..604a4fc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b163984/C.js
@@ -0,0 +1,4 @@
+package b163984;
+public class C {
+ public static void main(String[] args) {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b81556/a/A81556.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b81556/a/A81556.js
new file mode 100644
index 0000000..c77a28e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b81556/a/A81556.js
@@ -0,0 +1,9 @@
+package b81556.a;
+
+import b81556.b.XX81556;
+
+public class A81556 {
+ void bar(XX81556 a) {
+ a.foo();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b81556/a/B81556.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b81556/a/B81556.js
new file mode 100644
index 0000000..c513fe1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b81556/a/B81556.js
@@ -0,0 +1,7 @@
+package b81556.a;
+
+
+public class B81556 {
+ void foo() {}
+ void bar() { foo(); }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b81556/a/X81556.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b81556/a/X81556.js
new file mode 100644
index 0000000..3a15b65
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b81556/a/X81556.js
@@ -0,0 +1,4 @@
+package b81556.a;
+public class X81556 {
+ public void foo() {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b81556/b/XX81556.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b81556/b/XX81556.js
new file mode 100644
index 0000000..626ce8d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b81556/b/XX81556.js
@@ -0,0 +1,4 @@
+package b81556.b;
+public class XX81556 {
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b86380/Annot.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b86380/Annot.js
new file mode 100644
index 0000000..c409775
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b86380/Annot.js
@@ -0,0 +1,5 @@
+package b86380;
+public @interface Annot {
+ int field = 0;
+ int value();
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b95794/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b95794/Test.js
new file mode 100644
index 0000000..5d18346
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b95794/Test.js
@@ -0,0 +1,16 @@
+package b95794;
+import static b95794.Test.Color.WHITE;
+import static b95794.Test.Color.BLACK;
+public class Test {
+ enum Color {WHITE, BLACK}
+ Test there;
+ public static void main(String[] args) {
+ Color c = BLACK;
+ switch(c) {
+ case BLACK:
+ break;
+ case WHITE:
+ break;
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchMultipleProjects1/lib/p/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchMultipleProjects1/lib/p/X.js
new file mode 100644
index 0000000..84aaf4d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchMultipleProjects1/lib/p/X.js
@@ -0,0 +1,3 @@
+package p;
+public class X {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchMultipleProjects2/lib/p/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchMultipleProjects2/lib/p/Y.js
new file mode 100644
index 0000000..ec2ef9d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchMultipleProjects2/lib/p/Y.js
@@ -0,0 +1,3 @@
+package p;
+public class Y {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchMultipleProjects2/src/q/Z.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchMultipleProjects2/src/q/Z.js
new file mode 100644
index 0000000..dc345b9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchMultipleProjects2/src/q/Z.js
@@ -0,0 +1,11 @@
+package q;
+import p.X;
+import p.Y;
+public class Z {
+ X onlyHereForTheImport = null;
+ Y alsoOnlyHereForTheImport = null;
+ void foo(){
+ p.X x = (p.X)null;
+ p.Y y = (p.Y)null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/class-folder/ResolveConstructorCall.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/class-folder/ResolveConstructorCall.js
new file mode 100644
index 0000000..0362cfe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/class-folder/ResolveConstructorCall.js
@@ -0,0 +1,6 @@
+public class ResolveConstructorCall {
+ public ResolveConstructorCall(){}
+ void foo(){
+ new ResolveConstructorCall();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/class-folder/ResolveConstructorCallOfMemberType.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/class-folder/ResolveConstructorCallOfMemberType.js
new file mode 100644
index 0000000..745ba8d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/class-folder/ResolveConstructorCallOfMemberType.js
@@ -0,0 +1,6 @@
+public class ResolveConstructorCallOfMemberType {
+ class Inner {}
+ void foo(){
+ new Inner();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/class-folder/ResolveConstructorCallOfMemberType2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/class-folder/ResolveConstructorCallOfMemberType2.js
new file mode 100644
index 0000000..1867a1b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/class-folder/ResolveConstructorCallOfMemberType2.js
@@ -0,0 +1,8 @@
+public class ResolveConstructorCallOfMemberType2 {
+ class Inner {
+ public Inner() {}
+ }
+ void foo(){
+ new Inner();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/class-folder/test0101/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/class-folder/test0101/Test.js
new file mode 100644
index 0000000..17bc2c2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/class-folder/test0101/Test.js
@@ -0,0 +1,5 @@
+package test0101;
+
+public class Test<T> {
+ T field;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/jj.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/jj.jar
new file mode 100644
index 0000000..3bde51d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/jj.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/jjsrc.zip b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/jjsrc.zip
new file mode 100644
index 0000000..5408409
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/jjsrc.zip
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/p3.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/p3.jar
new file mode 100644
index 0000000..efd52bf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/p3.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/p3src.zip b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/p3src.zip
new file mode 100644
index 0000000..e87e2c7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/p3src.zip
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/p4.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/p4.jar
new file mode 100644
index 0000000..32f474a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/p4.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/p4src.zip b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/p4src.zip
new file mode 100644
index 0000000..2f112c0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/p4src.zip
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveAbstractMethod.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveAbstractMethod.js
new file mode 100644
index 0000000..067cc90
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveAbstractMethod.js
@@ -0,0 +1,7 @@
+public class ResolveAbstractMethod {
+ void test(AbstractClass a){
+ a.foo();
+ }
+}
+abstract class AbstractClass implements SuperInterface {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveArgumentName.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveArgumentName.js
new file mode 100644
index 0000000..2a3c113
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveArgumentName.js
@@ -0,0 +1,3 @@
+ function foo( var1, var2){
+
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveArrayLength.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveArrayLength.js
new file mode 100644
index 0000000..14f29b0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveArrayLength.js
@@ -0,0 +1,6 @@
+public class ResolveArrayLength {
+ public int foo() {
+ Object[] array = new Object[0];
+ return array.length;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveArrayParameterInsideParent1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveArrayParameterInsideParent1.js
new file mode 100644
index 0000000..cb06495
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveArrayParameterInsideParent1.js
@@ -0,0 +1,5 @@
+public class ResolveArrayParameterInsideParent1 {
+ void test(int[] arg) {
+ Object var = new Object();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveCatchArgumentName.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveCatchArgumentName.js
new file mode 100644
index 0000000..767c8b6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveCatchArgumentName.js
@@ -0,0 +1,6 @@
+ function foo(){
+ try{
+ } catch( var1){
+ } catch( var2){
+ }
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveCatchArgumentType1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveCatchArgumentType1.js
new file mode 100644
index 0000000..b5a75a8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveCatchArgumentType1.js
@@ -0,0 +1,7 @@
+public class ResolveCatchArgumentType1 {
+ void foo() {
+ try {
+ } catch (X1.Y1 e) {
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveCatchArgumentType2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveCatchArgumentType2.js
new file mode 100644
index 0000000..0655c89
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveCatchArgumentType2.js
@@ -0,0 +1,5 @@
+public class ResolveCatchArgumentType2 {
+ void foo() {
+ try {
+ } catch (X1.Y1 e) {
+ } \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveClass1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveClass1.js
new file mode 100644
index 0000000..71ea469
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveClass1.js
@@ -0,0 +1,5 @@
+import p1.*;
+
+public class ResolveClass1{
+ private X[] x;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveClass2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveClass2.js
new file mode 100644
index 0000000..14bcae7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveClass2.js
@@ -0,0 +1,7 @@
+import p1.*;
+
+public class ResolveClass2{
+ public void foo() {
+ X x = null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveClass3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveClass3.js
new file mode 100644
index 0000000..c34ce38
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveClass3.js
@@ -0,0 +1,5 @@
+import p1.*;
+
+public class ResolveClass3{
+ X[] x = new X[]{};
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveClass4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveClass4.js
new file mode 100644
index 0000000..2ab124b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveClass4.js
@@ -0,0 +1,7 @@
+import p1.*;
+
+public class ResolveClass4{
+ public X foo() {
+ return null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveClass5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveClass5.js
new file mode 100644
index 0000000..fc26b20
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveClass5.js
@@ -0,0 +1,6 @@
+import p1.*;
+
+public class ResolveClass5{
+ public void foo(X x) {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveClass6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveClass6.js
new file mode 100644
index 0000000..318d56c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveClass6.js
@@ -0,0 +1,3 @@
+public class ResolveClass6 extends p1.X {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveConstructor.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveConstructor.js
new file mode 100644
index 0000000..0ef370b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveConstructor.js
@@ -0,0 +1,9 @@
+public class ResolveConstructor {
+ public ResolveConstructor(int i) {
+ }
+ public ResolveConstructor(String s) {
+ }
+ public void foo() {
+ ResolveConstructor c = new ResolveConstructor("");
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveConstructorDeclaration.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveConstructorDeclaration.js
new file mode 100644
index 0000000..5002d8b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveConstructorDeclaration.js
@@ -0,0 +1,6 @@
+public class ResolveConstructorDeclaration {
+ public ResolveConstructorDeclaration(int i) {
+ }
+ public ResolveConstructorDeclaration(String s) {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDeepLocalVariable.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDeepLocalVariable.js
new file mode 100644
index 0000000..c2baa20
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDeepLocalVariable.js
@@ -0,0 +1,24 @@
+public class ResolveDeepLocalVariable {
+ class D1 {
+ class D2 {
+ class D3 {
+ class D4 {
+ class D5 {
+ class D6 {
+ class D7 {
+ class D8 {
+ class D9 {
+ public D9() {
+ String foo = "foo";
+ foo += "42";
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateFieldDeclaration.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateFieldDeclaration.js
new file mode 100644
index 0000000..cbf8cbe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateFieldDeclaration.js
@@ -0,0 +1,10 @@
+public class ResolveDuplicateFieldDeclaration {
+ class Inner {
+ int var;/*1*/
+ int var;/*1*/
+ }
+ class Inner {
+ int var;/*2*/
+ int var;/*2*/
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateFieldDeclaration3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateFieldDeclaration3.js
new file mode 100644
index 0000000..3856cd9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateFieldDeclaration3.js
@@ -0,0 +1,10 @@
+public class ResolveDuplicateFieldDeclaration3 {
+ class Inner {
+ int var;/*1*/
+ int var;/*1*/
+ }
+ class Inner {
+ int var;/*2*/
+ int var;/*2*/
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateMethodDeclaration.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateMethodDeclaration.js
new file mode 100644
index 0000000..a884df6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateMethodDeclaration.js
@@ -0,0 +1,2 @@
+ function foo() {}
+ function foo() {}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateMethodDeclaration11.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateMethodDeclaration11.js
new file mode 100644
index 0000000..adcc33f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateMethodDeclaration11.js
@@ -0,0 +1,10 @@
+public class ResolveDuplicateMethodDeclaration11 {
+ class Inner {
+ void foo(/*1*/Zork o) {}
+ void foo(/*1*/Zork o) {}
+ }
+ class Inner {
+ void foo(/*2*/Zork o) {}
+ void foo(/*2*/Zork o) {}
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateMethodDeclaration3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateMethodDeclaration3.js
new file mode 100644
index 0000000..6915397
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateMethodDeclaration3.js
@@ -0,0 +1,2 @@
+ function foo( o) {}
+ function foo( o) {}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateMethodDeclaration5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateMethodDeclaration5.js
new file mode 100644
index 0000000..82d18dd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateMethodDeclaration5.js
@@ -0,0 +1,4 @@
+public class ResolveDuplicateMethodDeclaration5 {
+ void foo(Zork o) {}
+ void foo(Zork o) {}
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateMethodDeclaration7.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateMethodDeclaration7.js
new file mode 100644
index 0000000..a95102a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateMethodDeclaration7.js
@@ -0,0 +1,6 @@
+public class ResolveDuplicateMethodDeclaration7 {
+ class Inner {
+ void foo(Zork o) {}
+ void foo(Zork o) {}
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateMethodDeclaration9.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateMethodDeclaration9.js
new file mode 100644
index 0000000..d0a0ae6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateMethodDeclaration9.js
@@ -0,0 +1,10 @@
+public class ResolveDuplicateMethodDeclaration9 {
+ class Inner {
+ void foo(/*1*/Zork o) {}
+ void foo(/*1*/Zork o) {}
+ }
+ class Inner {
+ void foo(/*2*/Zork o) {}
+ void foo(/*2*/Zork o) {}
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateTypeDeclaration.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateTypeDeclaration.js
new file mode 100644
index 0000000..08cf3a6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateTypeDeclaration.js
@@ -0,0 +1,6 @@
+public class ResolveDuplicateTypeDeclaration {
+ class Inner {
+ }
+ class Inner {
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateTypeDeclaration3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateTypeDeclaration3.js
new file mode 100644
index 0000000..0ac5245
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateTypeDeclaration3.js
@@ -0,0 +1,10 @@
+public class ResolveDuplicateTypeDeclaration3 {
+ class Inner {
+ class Inner2/*1*/ {}
+ class Inner2/*1*/ {}
+ }
+ class Inner {
+ class Inner2/*2*/ {}
+ class Inner2/*2*/ {}
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateTypeDeclaration5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateTypeDeclaration5.js
new file mode 100644
index 0000000..3a93b0f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateTypeDeclaration5.js
@@ -0,0 +1,10 @@
+public class ResolveDuplicateTypeDeclaration5 {
+ class Inner {
+ class Inner2/*1*/ {}
+ class Inner2/*1*/ {}
+ }
+ class Inner {
+ class Inner2/*2*/ {}
+ class Inner2/*2*/ {}
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveEmptySelectionOnMethod.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveEmptySelectionOnMethod.js
new file mode 100644
index 0000000..ce00d8f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveEmptySelectionOnMethod.js
@@ -0,0 +1,5 @@
+ function foo(){
+ }
+ function bar(){
+ foo();
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveEndOfFile.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveEndOfFile.js
new file mode 100644
index 0000000..5ec42ac
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveEndOfFile.js
@@ -0,0 +1,3 @@
+function ResolveEndOfFile(){
+
+}zzz \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveExplicitSuperConstructorCall.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveExplicitSuperConstructorCall.js
new file mode 100644
index 0000000..8d0d4fd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveExplicitSuperConstructorCall.js
@@ -0,0 +1,5 @@
+public class ResolveExplicitSuperConstructorCall extends SuperClass {
+ public ResolveExplicitSuperConstructorCall(int x){
+ super(x);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveExplicitThisConstructorCall.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveExplicitThisConstructorCall.js
new file mode 100644
index 0000000..8100d05
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveExplicitThisConstructorCall.js
@@ -0,0 +1,9 @@
+public class ResolveExplicitThisConstructorCall {
+ public ResolveExplicitThisConstructorCall(){
+
+ }
+
+ public ResolveExplicitThisConstructorCall(int x){
+ this();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveField.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveField.js
new file mode 100644
index 0000000..0622f26
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveField.js
@@ -0,0 +1,4 @@
+ var foo;
+ function bar() {
+ foo = 0;
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveField0.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveField0.js
new file mode 100644
index 0000000..15905be
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveField0.js
@@ -0,0 +1,6 @@
+public class ResolveField {
+ public int foo;
+ public void bar() {
+ this.foo = 0;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveFieldDeclaration.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveFieldDeclaration.js
new file mode 100644
index 0000000..a581b63
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveFieldDeclaration.js
@@ -0,0 +1 @@
+ var foo;
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveImport.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveImport.js
new file mode 100644
index 0000000..258c6b6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveImport.js
@@ -0,0 +1,5 @@
+import a.b.ImportedClass;
+
+public class ResolveImport {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveInnerClassAsParamater.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveInnerClassAsParamater.js
new file mode 100644
index 0000000..93bfcb3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveInnerClassAsParamater.js
@@ -0,0 +1,11 @@
+public class ResolveInnerClassAsParamater {
+ class Inner {
+ }
+ void foo(String s) {
+ }
+ void foo(Inner i) {
+ }
+ void bar(Inner i) {
+ foo(i);
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveInterface.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveInterface.js
new file mode 100644
index 0000000..c6d7492
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveInterface.js
@@ -0,0 +1,3 @@
+public class ResolveInterface implements p1.Y {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass1.js
new file mode 100644
index 0000000..f08b784
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass1.js
@@ -0,0 +1,11 @@
+import p1.*;
+
+public class ResolveLocalClass1{
+ void foo() {
+ class Y {
+ }
+ class Z {
+ private Y[] y;
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass2.js
new file mode 100644
index 0000000..f2daf30
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass2.js
@@ -0,0 +1,9 @@
+import p1.*;
+
+public class ResolveLocalClass2{
+ public void foo() {
+ class Y {
+ }
+ Y y = null;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass3.js
new file mode 100644
index 0000000..1cb7fd9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass3.js
@@ -0,0 +1,9 @@
+import p1.*;
+
+public class ResolveLocalClass3{
+ void foo() {
+ class Y {
+ }
+ Y[] y = new Y[]{};
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass4.js
new file mode 100644
index 0000000..e1bbcb7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass4.js
@@ -0,0 +1,13 @@
+import p1.*;
+
+public class ResolveLocalClass4{
+ void foo() {
+ class Y {
+ }
+ class Z {
+ Y bar() {
+ return null;
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass5.js
new file mode 100644
index 0000000..c717ca7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass5.js
@@ -0,0 +1,12 @@
+import p1.*;
+
+public class ResolveLocalClass5{
+ void foo() {
+ class Y {
+ }
+ class Z {
+ void foo(Y y) {
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass6.js
new file mode 100644
index 0000000..bcb57fe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass6.js
@@ -0,0 +1,8 @@
+public class ResolveLocalClass6 {
+ void foo() {
+ class Y {
+ }
+ class Z extends Y { // superclass
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass7.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass7.js
new file mode 100644
index 0000000..edf72df
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass7.js
@@ -0,0 +1,18 @@
+public class ResolveLocalClass7 {
+ void foo1() {
+
+ }
+ void foo2() {
+ new Object() {
+
+ };
+ new Object() {
+ class X {
+
+ }
+ void bar() {
+ X var;
+ }
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalConstructor.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalConstructor.js
new file mode 100644
index 0000000..4abd113
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalConstructor.js
@@ -0,0 +1,13 @@
+public class ResolveLocalConstructor {
+ void foo() {
+ class Y {
+ public Y(int i) {
+ }
+ public Y(String s) {
+ }
+ public void bar() {
+ Y c = new Y("");
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalConstructorDeclaration.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalConstructorDeclaration.js
new file mode 100644
index 0000000..5d5876f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalConstructorDeclaration.js
@@ -0,0 +1,10 @@
+public class ResolveLocalConstructorDeclaration {
+ void foo() {
+ class Y {
+ public Y(int i) {
+ }
+ public Y(String s) {
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalField.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalField.js
new file mode 100644
index 0000000..0002a9f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalField.js
@@ -0,0 +1,10 @@
+public class ResolveLocalField {
+ void foo() {
+ class Y {
+ public int fred;
+ public void bar() {
+ this.fred = 0;
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalField2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalField2.js
new file mode 100644
index 0000000..d4fdf9c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalField2.js
@@ -0,0 +1,16 @@
+public class ResolveLocalField2 {
+ void foo1() {
+
+ }
+ void foo2() {
+ new Object() {
+
+ };
+ new Object() {
+ Object var;
+ void bar() {
+ var = null;
+ }
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalFieldDeclaration.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalFieldDeclaration.js
new file mode 100644
index 0000000..5a8bdc8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalFieldDeclaration.js
@@ -0,0 +1,7 @@
+public class ResolveLocalFieldDeclaration {
+ void foo() {
+ class Y {
+ public int fred;
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalMemberTypeDeclaration1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalMemberTypeDeclaration1.js
new file mode 100644
index 0000000..48761d0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalMemberTypeDeclaration1.js
@@ -0,0 +1,8 @@
+public class ResolveLocalMemberTypeDeclaration1 {
+ void foo() {
+ class Y {
+ class Member {
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalMemberTypeDeclaration2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalMemberTypeDeclaration2.js
new file mode 100644
index 0000000..64a6b35
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalMemberTypeDeclaration2.js
@@ -0,0 +1,10 @@
+public class ResolveLocalMemberTypeDeclaration2 {
+ void foo() {
+ class Y {
+ class Member {
+ class MemberOfMember {
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalMethod.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalMethod.js
new file mode 100644
index 0000000..9f3d945
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalMethod.js
@@ -0,0 +1,13 @@
+public class ResolveLocalMethod {
+ void bar() {
+ class Y {
+ void foo(int i) {
+ }
+ void foo(String s) {
+ }
+ void bar() {
+ new Y().foo("");
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalMethod2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalMethod2.js
new file mode 100644
index 0000000..2dee670
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalMethod2.js
@@ -0,0 +1,17 @@
+public class ResolveLocalMethod2 {
+ void foo1() {
+
+ }
+ void foo2() {
+ new Object() {
+
+ };
+ new Object() {
+ void bar() {
+ }
+ void toto() {
+ bar();
+ }
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalMethodDeclaration.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalMethodDeclaration.js
new file mode 100644
index 0000000..0b1df91
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalMethodDeclaration.js
@@ -0,0 +1,10 @@
+public class ResolveLocalMethodDeclaration {
+ void bar() {
+ class Y {
+ void foo(int i) {
+ }
+ void foo(String s) {
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalName.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalName.js
new file mode 100644
index 0000000..0650e50
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalName.js
@@ -0,0 +1,15 @@
+ function foo(){
+ var var1 = new Object();
+ var var2 = 1;
+ var1.toString();
+ var2++;
+ if (var2 == 3) {
+ var var3 = var1;
+ var3.hashCode();
+ } else {
+ var var3 = new Object();
+ var3.toString();
+ }
+ var var4 = 1;
+
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalVariable.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalVariable.js
new file mode 100644
index 0000000..ec6f050
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalVariable.js
@@ -0,0 +1,18 @@
+public class ResolveLocalVariable {
+ void foo1() {
+
+ }
+ void foo2() {
+ new Object() {
+
+ };
+ new Object() {
+ void bar() {
+ }
+ void toto() {
+ Object var;
+ var = null;
+ }
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMemberTypeDeclaration1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMemberTypeDeclaration1.js
new file mode 100644
index 0000000..d78343a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMemberTypeDeclaration1.js
@@ -0,0 +1,4 @@
+public class ResolveMemberTypeDeclaration1 {
+ public interface MemberInterface {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMemberTypeDeclaration2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMemberTypeDeclaration2.js
new file mode 100644
index 0000000..efae291
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMemberTypeDeclaration2.js
@@ -0,0 +1,6 @@
+public class ResolveMemberTypeDeclaration2 {
+ class Member {
+ class MemberOfMember {
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMessageSendOnBaseType.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMessageSendOnBaseType.js
new file mode 100644
index 0000000..68d3ef3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMessageSendOnBaseType.js
@@ -0,0 +1,4 @@
+ var foo;
+ function boo() {
+ foo.hello();
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethod.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethod.js
new file mode 100644
index 0000000..7c455e4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethod.js
@@ -0,0 +1,7 @@
+ function foo( i) {
+ }
+ function foo2( s) {
+ }
+ function bar() {
+ new ResolveMethod().foo("");
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethodDeclaration.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethodDeclaration.js
new file mode 100644
index 0000000..34ce020
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethodDeclaration.js
@@ -0,0 +1,6 @@
+public class ResolveMethodDeclaration {
+ public void foo(int i) {
+ }
+ public void foo(String s) {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethodDeclarationInAnonymous.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethodDeclarationInAnonymous.js
new file mode 100644
index 0000000..9e2230a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethodDeclarationInAnonymous.js
@@ -0,0 +1,8 @@
+public class ResolveMethodDeclarationInAnonymous {
+ void foo() {
+ Object o = new Object() {
+ void bar() {
+ }
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethodDeclarationInAnonymous2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethodDeclarationInAnonymous2.js
new file mode 100644
index 0000000..e34a08f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethodDeclarationInAnonymous2.js
@@ -0,0 +1,6 @@
+public class ResolveMethodDeclarationInAnonymous2 {
+ Object field = new Object() {
+ void foo() {
+ }
+ };
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethodDeclarationInAnonymous3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethodDeclarationInAnonymous3.js
new file mode 100644
index 0000000..2162b39
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethodDeclarationInAnonymous3.js
@@ -0,0 +1,14 @@
+public class ResolveMethodDeclarationInAnonymous3 {
+ ResolveMethodDeclarationInAnonymous3(Object arg) {
+ }
+ void foo() {
+ new ResolveMethodDeclarationInAnonymous3("") {
+ void bar() {
+ new Object() {
+ void selectMe() {
+ }
+ };
+ }
+ };
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethodDeclarationInInterface.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethodDeclarationInInterface.js
new file mode 100644
index 0000000..7dd19c9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethodDeclarationInInterface.js
@@ -0,0 +1,6 @@
+public class ResolveMethodDeclarationInInterface {
+ public static void main(String[] args) {
+ QY y = new QY();
+ ((QX)y).foo();
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethodWithIncorrectParameter.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethodWithIncorrectParameter.js
new file mode 100644
index 0000000..1420186
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethodWithIncorrectParameter.js
@@ -0,0 +1,5 @@
+ function foo( x) {
+ }
+ function bar() {
+ foo("String");
+ }
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolvePackage.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolvePackage.js
new file mode 100644
index 0000000..8b19005
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolvePackage.js
@@ -0,0 +1,4 @@
+import java.lang.*;
+
+public class ResolvePackage {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolvePartiallyQualifiedType.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolvePartiallyQualifiedType.js
new file mode 100644
index 0000000..cb9f720
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolvePartiallyQualifiedType.js
@@ -0,0 +1,5 @@
+public class ResolvePartiallyQualifiedType {
+ void foo() {
+ java.lang.Object o;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveQualifiedName1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveQualifiedName1.js
new file mode 100644
index 0000000..4ffef01
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveQualifiedName1.js
@@ -0,0 +1,3 @@
+public class ResolveQualifiedName1 {
+ pp.qq.XX.YY.ZZ zz;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveQualifiedName2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveQualifiedName2.js
new file mode 100644
index 0000000..da86897
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveQualifiedName2.js
@@ -0,0 +1,3 @@
+public class ResolveQualifiedName2 {
+ pp.qq.XX.YY.ZZ zz;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveQualifiedName3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveQualifiedName3.js
new file mode 100644
index 0000000..5f08b1d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveQualifiedName3.js
@@ -0,0 +1,3 @@
+public class ResolveQualifiedName3 {
+ pp.qq.XX.YY.ZZ zz;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveQualifiedName4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveQualifiedName4.js
new file mode 100644
index 0000000..fee029c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveQualifiedName4.js
@@ -0,0 +1,3 @@
+public class ResolveQualifiedName4 {
+ pp.qq.XX.YY.ZZ zz;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveQualifiedName5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveQualifiedName5.js
new file mode 100644
index 0000000..32a8bda
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveQualifiedName5.js
@@ -0,0 +1,10 @@
+public class ResolveQualifiedName5 {
+ public class XX {
+ public class YY {
+ public class ZZ {
+
+ }
+ }
+ YY.ZZ zz;
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveQualifiedType.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveQualifiedType.js
new file mode 100644
index 0000000..18519ee
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveQualifiedType.js
@@ -0,0 +1,5 @@
+public class ResolveQualifiedType {
+ void foo() {
+ java.lang.Object o;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveTypeDeclaration.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveTypeDeclaration.js
new file mode 100644
index 0000000..9606633
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveTypeDeclaration.js
@@ -0,0 +1,5 @@
+public class ResolveTypeDeclaration {
+
+}
+class OtherType {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveTypeEmptySelection.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveTypeEmptySelection.js
new file mode 100644
index 0000000..f4bac76
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveTypeEmptySelection.js
@@ -0,0 +1,3 @@
+//public class ResolveTypeEmptySelection {
+ var o;
+//} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveTypeEmptySelection2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveTypeEmptySelection2.js
new file mode 100644
index 0000000..864e62a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveTypeEmptySelection2.js
@@ -0,0 +1,3 @@
+public class ResolveTypeEmptySelection2 {
+ Object o;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveTypeInComment.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveTypeInComment.js
new file mode 100644
index 0000000..b00a35c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveTypeInComment.js
@@ -0,0 +1,4 @@
+import p2.X;
+public class ResolveTypeInComment{
+ /* return X */
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveUnicode.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveUnicode.js
new file mode 100644
index 0000000..bb99f9a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveUnicode.js
@@ -0,0 +1,3 @@
+public class ResolveUnicode {
+ public java.lang.\u0053tring s;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/SuperClass.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/SuperClass.js
new file mode 100644
index 0000000..a7df332
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/SuperClass.js
@@ -0,0 +1,5 @@
+public class SuperClass {
+ public SuperClass(int x){
+
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/SuperInterface.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/SuperInterface.js
new file mode 100644
index 0000000..dcc34e5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/SuperInterface.js
@@ -0,0 +1,3 @@
+public interface SuperInterface {
+ void foo();
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/X1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/X1.js
new file mode 100644
index 0000000..83af56f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/X1.js
@@ -0,0 +1,4 @@
+public class X1 extends Exception {
+ public class Y1 extends Exception {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/a/b/ImportedClass.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/a/b/ImportedClass.js
new file mode 100644
index 0000000..eccb889
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/a/b/ImportedClass.js
@@ -0,0 +1,5 @@
+package a.b;
+
+public class ImportedClass {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/b120350/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/b120350/Test.js
new file mode 100644
index 0000000..a5e8f40
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/b120350/Test.js
@@ -0,0 +1,3 @@
+public class Test {
+}
+class Secondary {}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/b120350/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/b120350/X.js
new file mode 100644
index 0000000..7562db2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/b120350/X.js
@@ -0,0 +1 @@
+public class X extends Secondary {}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/p1/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/p1/X.js
new file mode 100644
index 0000000..67677e8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/p1/X.js
@@ -0,0 +1,3 @@
+function X() {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/p1/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/p1/Y.js
new file mode 100644
index 0000000..c46a624
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/p1/Y.js
@@ -0,0 +1,3 @@
+function Y() {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/p2/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/p2/X.js
new file mode 100644
index 0000000..2686c3c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/p2/X.js
@@ -0,0 +1,5 @@
+package p2;
+
+public class X {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/pp/qq/XX.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/pp/qq/XX.js
new file mode 100644
index 0000000..375bb58
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/pp/qq/XX.js
@@ -0,0 +1,8 @@
+package pp.qq;
+public class XX {
+ public class YY {
+ public class ZZ {
+
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0001/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0001/Test.js
new file mode 100644
index 0000000..b3d3753
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0001/Test.js
@@ -0,0 +1,8 @@
+package test0001;
+public class Test<T> {
+ public <U> Test<U> foo(Iterable iii){
+ for(Object o : iii){
+
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0002/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0002/Test.js
new file mode 100644
index 0000000..b7ec216
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0002/Test.js
@@ -0,0 +1,9 @@
+package test0002;
+public class Test {
+ test0002.Test.X<Object>.Y<Object> var;
+ public class X <TX> {
+ public class Y <TY> {
+
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0003/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0003/Test.js
new file mode 100644
index 0000000..d713778
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0003/Test.js
@@ -0,0 +1,9 @@
+package test0003;
+public class Test <T> {
+ test0003.Test.X<Object>.Y<Object> var;
+ public class X <TX> {
+ public class Y <TY> {
+
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0005/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0005/Test.js
new file mode 100644
index 0000000..4b2278b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0005/Test.js
@@ -0,0 +1,9 @@
+package test0005;
+public class Test <T> {
+ test0005.Test.X<Object>.Y<Object> var;
+ public class X <TX> {
+ public class Y <TY> {
+
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0006/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0006/Test.js
new file mode 100644
index 0000000..21838a4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0006/Test.js
@@ -0,0 +1,8 @@
+package test0006;
+
+class Test0006 {
+}
+
+public class Test<Test0006> {
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0007/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0007/Test.js
new file mode 100644
index 0000000..4f100a4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0007/Test.js
@@ -0,0 +1,8 @@
+package test0007;
+
+class Test0007 {
+}
+
+public class Test<Test0007> {
+ Test0007 var;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0008/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0008/Test.js
new file mode 100644
index 0000000..00a3ee1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0008/Test.js
@@ -0,0 +1,9 @@
+package test0008;
+
+class Test0008 {
+}
+
+public class Test {
+ class Inner <Test0008> {
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0009/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0009/Test.js
new file mode 100644
index 0000000..d09e47b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0009/Test.js
@@ -0,0 +1,10 @@
+package test0009;
+
+class Test0009 {
+}
+
+public class Test {
+ class Inner <Test0009> {
+ Test0009 var;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0010/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0010/Test.js
new file mode 100644
index 0000000..035eeb3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0010/Test.js
@@ -0,0 +1,10 @@
+package test0010;
+
+class Test0010 {
+}
+
+public class Test <Test0010> {
+ class Inner {
+ Test0010 var;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0011/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0011/Test.js
new file mode 100644
index 0000000..8f8d2d4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0011/Test.js
@@ -0,0 +1,9 @@
+package test0011;
+
+class Test0011 {
+}
+
+public class Test <Test0011> {
+ <Test0011> void foo() {
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0012/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0012/Test.js
new file mode 100644
index 0000000..17da73c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0012/Test.js
@@ -0,0 +1,10 @@
+package test0012;
+
+class Test0012 {
+}
+
+public class Test <Test0012> {
+ <Test0012> void foo() {
+ Test0012 var;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0013/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0013/Test.js
new file mode 100644
index 0000000..3bd6c4c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0013/Test.js
@@ -0,0 +1,11 @@
+package test0013;
+
+class Test0013 {
+}
+
+public class Test {
+ class Inner {
+ <Test0013> void foo() {
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0014/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0014/Test.js
new file mode 100644
index 0000000..dcccacf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0014/Test.js
@@ -0,0 +1,12 @@
+package test0014;
+
+class Test0014 {
+}
+
+public class Test {
+ class Inner {
+ <Test0014> void foo() {
+ Test0014 var;
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0015/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0015/Test.js
new file mode 100644
index 0000000..ad71c04
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0015/Test.js
@@ -0,0 +1,8 @@
+package test0015;
+
+public enum Test {;
+ void foo() {
+ int var;
+ var = 0;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0016/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0016/Test.js
new file mode 100644
index 0000000..803d851
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0016/Test.js
@@ -0,0 +1,7 @@
+package test0016;
+
+public class Test {
+ <T> void foo() {
+
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0017/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0017/Test.js
new file mode 100644
index 0000000..dad99ab
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0017/Test.js
@@ -0,0 +1,7 @@
+package test0017;
+
+public class Test {
+ <T> T foo() {
+ return null;
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0018/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0018/Test.js
new file mode 100644
index 0000000..ac6251d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0018/Test.js
@@ -0,0 +1,7 @@
+package test0018;
+
+public class Test {
+ <T> void foo(T t) {
+
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0019/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0019/Test.js
new file mode 100644
index 0000000..3ab651d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0019/Test.js
@@ -0,0 +1,7 @@
+package test0019;
+
+public class Test {
+ <T> void foo(Object o1, T t, Object o2) {
+
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0020/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0020/Test.js
new file mode 100644
index 0000000..74c7ca2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0020/Test.js
@@ -0,0 +1,10 @@
+package test0020;
+
+public class Test {
+ class X<T> {
+
+ }
+ <T> void foo(X<T> x) {
+
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0021/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0021/Test.js
new file mode 100644
index 0000000..8af3f8a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0021/Test.js
@@ -0,0 +1,7 @@
+package test0021;
+
+public class Test {
+ <T extends Exception> void foo() throws T {
+
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0022/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0022/A.js
new file mode 100644
index 0000000..93ff87f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0022/A.js
@@ -0,0 +1,10 @@
+package test0022;
+
+public class A<U> {
+ public class B {
+ public class D<V> {
+ }
+ }
+ public class C<W> {
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0022/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0022/Test.js
new file mode 100644
index 0000000..06a2f69
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0022/Test.js
@@ -0,0 +1,8 @@
+package test0022;
+
+public class Test {
+ X var;
+ void foo(Y t, A<Y> a, A<Y>.B b, A<Y>.C<Y> c, A<Y>.B.D<Y> d) {
+ var.add(t,a,b,c,d);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0022/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0022/X.js
new file mode 100644
index 0000000..9c73341
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0022/X.js
@@ -0,0 +1,7 @@
+package test0022;
+
+public class X {
+ public <T extends Y> void add(T t, A<T> a, A<T>.B b, A<T>.C<T> c, A<T>.B.D<T> d) {
+
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0022/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0022/Y.js
new file mode 100644
index 0000000..b43c11c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0022/Y.js
@@ -0,0 +1,5 @@
+package test0022;
+
+public class Y {
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0023/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0023/Test.js
new file mode 100644
index 0000000..f09e20a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0023/Test.js
@@ -0,0 +1,8 @@
+package test0023;
+
+public class Test {
+ X var;
+ void foo(Y t, A<Y> a, A<Y>.B b, A<Y>.C<Y> c, A<Y>.B.D<Y> d) {
+ var.add(t,a,b,c,d);
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0024/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0024/Test.js
new file mode 100644
index 0000000..38627bf
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0024/Test.js
@@ -0,0 +1,6 @@
+package test0024;
+
+public enum Test {
+ A,
+ B;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0025/Test.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0025/Test.js
new file mode 100644
index 0000000..51cc9a1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0025/Test.js
@@ -0,0 +1,5 @@
+package test0025;
+
+public @interface Test {
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test0023.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test0023.jar
new file mode 100644
index 0000000..47dbb54
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test0023.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test0023src.zip b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test0023src.zip
new file mode 100644
index 0000000..035400f
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test0023src.zip
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test25888.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test25888.jar
new file mode 100644
index 0000000..d45b07c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test25888.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test25888src.zip b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test25888src.zip
new file mode 100644
index 0000000..c96f604
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test25888src.zip
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test47177.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test47177.jar
new file mode 100644
index 0000000..7cf056b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test47177.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test47177src.zip b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test47177src.zip
new file mode 100644
index 0000000..dfb9a64
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test47177src.zip
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test47214.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test47214.jar
new file mode 100644
index 0000000..baae94b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test47214.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/zzz.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/zzz.jar
new file mode 100644
index 0000000..a2d6719
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/zzz.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/zzzsrc.zip b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/zzzsrc.zip
new file mode 100644
index 0000000..ed756e2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/zzzsrc.zip
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/SnippetCompletion/class-folder/aa/bb/cc/CClass.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/SnippetCompletion/class-folder/aa/bb/cc/CClass.js
new file mode 100644
index 0000000..984168a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/SnippetCompletion/class-folder/aa/bb/cc/CClass.js
@@ -0,0 +1,16 @@
+package aa.bb.cc;
+
+public class CClass extends SuperClass {
+ public class Inner extends SuperInnerClass {
+ public Inner() throws Exception {
+ }
+ }
+
+ public void foo(SuperClass varsc, final int var){
+ class Victory{}
+ }
+
+ public void bar(int x, int y){
+
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/SnippetCompletion/class-folder/bug132665/Bug132665.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/SnippetCompletion/class-folder/bug132665/Bug132665.js
new file mode 100644
index 0000000..5d7bd01
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/SnippetCompletion/class-folder/bug132665/Bug132665.js
@@ -0,0 +1,8 @@
+package bug132665;
+public class Bug132665<T> {
+ public void foo1() {}
+ public Bug132665<? extends java.lang.Object> foo2() {
+ return null;
+ }
+ public void foo3() {}
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/SnippetCompletion/src/aa/bb/cc/BClass.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/SnippetCompletion/src/aa/bb/cc/BClass.js
new file mode 100644
index 0000000..5eacc45
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/SnippetCompletion/src/aa/bb/cc/BClass.js
@@ -0,0 +1,16 @@
+package aa.bb.cc;
+
+public class BClass extends SuperClass {
+ public class Inner extends SuperInnerClass {
+ public Inner() throws Exception {
+ }
+ }
+
+ public void foo(SuperClass varsc, final int var){
+ class Victory{}
+ }
+
+ public void bar(int x, int y){
+
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/NotInClasspath/e/E.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/NotInClasspath/e/E.js
new file mode 100644
index 0000000..6784f53
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/NotInClasspath/e/E.js
@@ -0,0 +1,4 @@
+package e;
+import p1.*;
+public class E extends X {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/lib.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/lib.jar
new file mode 100644
index 0000000..1475446
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/lib.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/lib48459/p48459/p2/Y48459.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/lib48459/p48459/p2/Y48459.js
new file mode 100644
index 0000000..19a2ed4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/lib48459/p48459/p2/Y48459.js
@@ -0,0 +1,4 @@
+package p48459.p2;
+public class Y48459 extends p48459.p1.X48459 {
+ public int field;
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/lib53095/p53095/X53095.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/lib53095/p53095/X53095.js
new file mode 100644
index 0000000..da09837
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/lib53095/p53095/X53095.js
@@ -0,0 +1,3 @@
+package p53095;
+public class X53095 extends RuntimeException {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/cycle/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/cycle/X.js
new file mode 100644
index 0000000..d7ac879
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/cycle/X.js
@@ -0,0 +1,3 @@
+package cycle;
+public class X extends Y {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/cycle/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/cycle/Y.js
new file mode 100644
index 0000000..03e3f34
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/cycle/Y.js
@@ -0,0 +1,3 @@
+package cycle;
+public class Y extends X {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/A.js
new file mode 100644
index 0000000..ebee606
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/A.js
@@ -0,0 +1,5 @@
+package p1;
+public class A extends B {
+}
+class B {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/Deep.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/Deep.js
new file mode 100644
index 0000000..549b829
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/Deep.js
@@ -0,0 +1,3 @@
+package p1;
+public class Deep extends Z {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/I1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/I1.js
new file mode 100644
index 0000000..7196e73
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/I1.js
@@ -0,0 +1,3 @@
+package p1;
+public interface I1 {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/I2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/I2.js
new file mode 100644
index 0000000..3f4549d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/I2.js
@@ -0,0 +1,3 @@
+package p1;
+public interface I2 {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/X.js
new file mode 100644
index 0000000..0ec3703
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/X.js
@@ -0,0 +1,3 @@
+package p1;
+public class X {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/Y.js
new file mode 100644
index 0000000..69e38c9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/Y.js
@@ -0,0 +1,3 @@
+package p1;
+public class Y extends X implements I1, I2 {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/Z.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/Z.js
new file mode 100644
index 0000000..005ed9b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/Z.js
@@ -0,0 +1,3 @@
+package p1;
+public class Z extends Y {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p2/I.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p2/I.js
new file mode 100644
index 0000000..1fe3bf2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p2/I.js
@@ -0,0 +1,3 @@
+package p2;
+public interface I {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p2/I1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p2/I1.js
new file mode 100644
index 0000000..d3118b0
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p2/I1.js
@@ -0,0 +1,3 @@
+package p2;
+public interface I1 extends I {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p2/I2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p2/I2.js
new file mode 100644
index 0000000..4925fbc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p2/I2.js
@@ -0,0 +1,3 @@
+package p2;
+public interface I2 extends I {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p2/I3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p2/I3.js
new file mode 100644
index 0000000..18d13cc
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p2/I3.js
@@ -0,0 +1,3 @@
+package p2;
+public interface I3 extends I1 {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p2/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p2/X.js
new file mode 100644
index 0000000..2c5826d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p2/X.js
@@ -0,0 +1,3 @@
+package p2;
+public class X implements I {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p2/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p2/Y.js
new file mode 100644
index 0000000..76a84ad
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p2/Y.js
@@ -0,0 +1,3 @@
+package p2;
+public class Y extends X implements I3 {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p3/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p3/A.js
new file mode 100644
index 0000000..f7b81ab
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p3/A.js
@@ -0,0 +1,4 @@
+package p3;
+/* Test case for bug 23644 hierarchy: getAllSuperTypes does not include all superinterfaces? */
+public class A implements I {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p3/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p3/B.js
new file mode 100644
index 0000000..bd9b74d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p3/B.js
@@ -0,0 +1,4 @@
+package p3;
+/* Test case for bug 23644 hierarchy: getAllSuperTypes does not include all superinterfaces? */
+public class B extends A implements I1 {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p3/I.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p3/I.js
new file mode 100644
index 0000000..34471d4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p3/I.js
@@ -0,0 +1,4 @@
+package p3;
+/* Test case for bug 23644 hierarchy: getAllSuperTypes does not include all superinterfaces? */
+public interface I {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p3/I1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p3/I1.js
new file mode 100644
index 0000000..6d48c6b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p3/I1.js
@@ -0,0 +1,4 @@
+package p3;
+/* Test case for bug 23644 hierarchy: getAllSuperTypes does not include all superinterfaces? */
+public interface I1 {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p4/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p4/X.js
new file mode 100644
index 0000000..68415c3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p4/X.js
@@ -0,0 +1,4 @@
+package p4;
+/* Test case for bug 24691 Missing interface makes hierarchy incomplete */
+public class X implements Missing {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p48459/p1/X48459.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p48459/p1/X48459.js
new file mode 100644
index 0000000..6f39515
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p48459/p1/X48459.js
@@ -0,0 +1,5 @@
+package p48459.p1;
+
+public class X48459 {
+
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p48459/p1/Z48459.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p48459/p1/Z48459.js
new file mode 100644
index 0000000..43ff5e7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p48459/p1/Z48459.js
@@ -0,0 +1,8 @@
+package p48459.p1;
+public class Z48459 {
+ Object foo = new X48459() {
+ void bar(p48459.p2.Y48459 y) {
+ y.field++;
+ }
+ };
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p5/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p5/X.js
new file mode 100644
index 0000000..ecab3eb
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p5/X.js
@@ -0,0 +1,5 @@
+package p5;
+public class X {
+ public class Inner {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p6/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p6/A.js
new file mode 100644
index 0000000..22996c1
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p6/A.js
@@ -0,0 +1,12 @@
+package p6;
+/* Test case for bug 43274 Type hierarchy broken */
+class A{
+ class Inner{
+ }
+}
+class B extends A.Inner{
+ B(){
+ new A().super();
+ }
+}
+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p7/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p7/A.js
new file mode 100644
index 0000000..4b7e5e6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p7/A.js
@@ -0,0 +1,37 @@
+package p7;
+public class A {
+ {
+ new X() {
+ };
+ class Y1 extends X {
+ }
+ class Y2 extends Y1 {
+ }
+ }
+
+ static {
+ new X() {
+ };
+ class Y3 {
+ }
+ }
+
+ X field1 = new X() {
+ };
+
+ X[] field2 = new X[] {
+ new X() {
+ },
+ new X() {
+ }
+ };
+
+ void foo() {
+ new X() {
+ };
+ class Y1 extends X {
+ }
+ class Y2 extends Y1 {
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p7/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p7/X.js
new file mode 100644
index 0000000..bf85e79
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p7/X.js
@@ -0,0 +1,3 @@
+package p7;
+public class X {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p8/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p8/X.js
new file mode 100644
index 0000000..ea1529c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p8/X.js
@@ -0,0 +1,10 @@
+package p8;
+/* Regression test case for bug 44506 Type hierarchy is missing anonymous type*/
+public class X {
+ X(String s) {
+ }
+ protected void foo() {
+ new X("") {
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p9/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p9/X.js
new file mode 100644
index 0000000..79a22ec
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p9/X.js
@@ -0,0 +1,9 @@
+package p9;
+public class X {
+ void foo() {
+ new X() {
+ };
+ class Y extends X {
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q1/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q1/X.js
new file mode 100644
index 0000000..99c1363
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q1/X.js
@@ -0,0 +1,3 @@
+package q1;
+public class X {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q1/Z.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q1/Z.js
new file mode 100644
index 0000000..e8bd2a4
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q1/Z.js
@@ -0,0 +1,3 @@
+package q1;
+public class Z extends q2.Y {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q2/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q2/Y.js
new file mode 100644
index 0000000..3497974
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q2/Y.js
@@ -0,0 +1,3 @@
+package q2;
+public class Y extends q1.X {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q3/Z.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q3/Z.js
new file mode 100644
index 0000000..3682123
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q3/Z.js
@@ -0,0 +1,6 @@
+package q3;
+import p49809.Y49809;
+public class Z extends Y49809 {
+ public Z() {
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q4/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q4/X.js
new file mode 100644
index 0000000..3e26121
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q4/X.js
@@ -0,0 +1,3 @@
+package q4;
+public class X {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q4/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q4/Y.js
new file mode 100644
index 0000000..c9fb2a8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q4/Y.js
@@ -0,0 +1,3 @@
+package q4;
+public class Y extends X {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q5/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q5/X.js
new file mode 100644
index 0000000..72c592e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q5/X.js
@@ -0,0 +1,7 @@
+package q5;
+public class X {
+}
+class NonVisibleClass {
+}
+interface NonVisibleInterface {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q6/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q6/Y.js
new file mode 100644
index 0000000..05d2bd5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q6/Y.js
@@ -0,0 +1,3 @@
+package q6;
+public class Y extends q5.NonVisibleClass {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q6/Z.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q6/Z.js
new file mode 100644
index 0000000..bb06608
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q6/Z.js
@@ -0,0 +1,3 @@
+package q6;
+public class Z implements q5.NonVisibleInterface {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q7/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q7/X.js
new file mode 100644
index 0000000..62bf8af
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q7/X.js
@@ -0,0 +1,11 @@
+package q7;
+public class X {
+ public class Member {
+ }
+}
+class Y {
+ void foo(X arg) {
+ arg.new Member() {
+ };
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/wc/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/wc/X.js
new file mode 100644
index 0000000..b7b7efa
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/wc/X.js
@@ -0,0 +1,3 @@
+package wc;
+public class X {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/test144976.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/test144976.jar
new file mode 100644
index 0000000..5493e9e
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/test144976.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/test49809.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/test49809.jar
new file mode 100644
index 0000000..bd672dd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/test49809.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/test54043.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/test54043.jar
new file mode 100644
index 0000000..0af0f85
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/test54043.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/test58440.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/test58440.jar
new file mode 100644
index 0000000..9780559
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/test58440.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/test60365.jar b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/test60365.jar
new file mode 100644
index 0000000..7936068
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/test60365.jar
Binary files differ
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyDependent/Dependent.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyDependent/Dependent.js
new file mode 100644
index 0000000..fd8ca93
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyDependent/Dependent.js
@@ -0,0 +1,3 @@
+import a.*;
+public class Dependent extends A {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/a/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/a/A.js
new file mode 100644
index 0000000..4de833a
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/a/A.js
@@ -0,0 +1,3 @@
+package a;
+public class A {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/b/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/b/B.js
new file mode 100644
index 0000000..929d415
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/b/B.js
@@ -0,0 +1,5 @@
+package b;
+import a.*;
+public class B extends A {
+ public Object value;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/c/C.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/c/C.js
new file mode 100644
index 0000000..1d61657
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/c/C.js
@@ -0,0 +1,5 @@
+package c;
+import p.*;
+import i.*;
+public class C extends X implements I2 {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/d/D.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/d/D.js
new file mode 100644
index 0000000..17d0bea
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/d/D.js
@@ -0,0 +1,4 @@
+package d;
+import c.*;
+public class D extends C {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/e/E.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/e/E.js
new file mode 100644
index 0000000..0b194a7
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/e/E.js
@@ -0,0 +1,4 @@
+package e;
+import p.*;
+public class E extends X {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/i/I1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/i/I1.js
new file mode 100644
index 0000000..e342437
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/i/I1.js
@@ -0,0 +1,3 @@
+package i;
+public interface I1 {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/i/I2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/i/I2.js
new file mode 100644
index 0000000..3915816
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/i/I2.js
@@ -0,0 +1,3 @@
+package i;
+public interface I2 {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p/External.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p/External.js
new file mode 100644
index 0000000..5f5b44d
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p/External.js
@@ -0,0 +1,4 @@
+package p;
+public class External {
+ public Object field;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p/MyError.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p/MyError.js
new file mode 100644
index 0000000..9a55ed3
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p/MyError.js
@@ -0,0 +1,3 @@
+package p;
+public class MyError extends Error {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p/X.js
new file mode 100644
index 0000000..65ab829
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p/X.js
@@ -0,0 +1,6 @@
+package p;
+import b.*;
+import i.*;
+public class X extends B implements I1 {
+ public Object field;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p/other/External.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p/other/External.js
new file mode 100644
index 0000000..94b12c6
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p/other/External.js
@@ -0,0 +1,4 @@
+package p.other;
+public class External {
+ public Object field;
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p2/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p2/A.js
new file mode 100644
index 0000000..8afd03b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p2/A.js
@@ -0,0 +1,4 @@
+package p2;
+/* Test case for bug 4917 Latest build fails updating TypeHierarchy */
+public class A {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p2/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p2/B.js
new file mode 100644
index 0000000..4e4d090
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p2/B.js
@@ -0,0 +1,4 @@
+package p2;
+/* Test case for bug 4917 Latest build fails updating TypeHierarchy */
+public class B {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p3/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p3/A.js
new file mode 100644
index 0000000..70a47bd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p3/A.js
@@ -0,0 +1,4 @@
+package p3;
+/* Test case for bug 51867 An anonymous type is missing in type hierarchy when editor is modified */
+public class A {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p3/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p3/B.js
new file mode 100644
index 0000000..ebc22a5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p3/B.js
@@ -0,0 +1,4 @@
+package p3;
+/* Test case for bug 51867 An anonymous type is missing in type hierarchy when editor is modified */
+public class B {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/I1.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/I1.js
new file mode 100644
index 0000000..32a3fe9
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/I1.js
@@ -0,0 +1,4 @@
+package p1;
+public interface I1 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/I2.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/I2.js
new file mode 100644
index 0000000..1d5f61c
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/I2.js
@@ -0,0 +1,4 @@
+package p1;
+public interface I2 extends I6 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/I3.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/I3.js
new file mode 100644
index 0000000..96b1996
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/I3.js
@@ -0,0 +1,4 @@
+package p1;
+public interface I3 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/I4.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/I4.js
new file mode 100644
index 0000000..5a53f2b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/I4.js
@@ -0,0 +1,4 @@
+package p1;
+public interface I4 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/I5.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/I5.js
new file mode 100644
index 0000000..fd6d1a2
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/I5.js
@@ -0,0 +1,4 @@
+package p1;
+public interface I5 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/I6.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/I6.js
new file mode 100644
index 0000000..635c2cd
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/I6.js
@@ -0,0 +1,4 @@
+package p1;
+public interface I6 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/X.js
new file mode 100644
index 0000000..9e564e5
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/X.js
@@ -0,0 +1,4 @@
+package p1;
+public class X implements I5 {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/Y.js
new file mode 100644
index 0000000..963e926
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/Y.js
@@ -0,0 +1,4 @@
+package p1;
+public class Y extends X implements I1, I2, IA, IB {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/Z.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/Z.js
new file mode 100644
index 0000000..7aafa43
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/Z.js
@@ -0,0 +1,4 @@
+package p1;
+public class Z extends Y implements I3, I4, IC {
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p/TypeResolve.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p/TypeResolve.js
new file mode 100644
index 0000000..7bfb6ba
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p/TypeResolve.js
@@ -0,0 +1,13 @@
+package p;
+import p1.X;
+import p2.*;
+public class TypeResolve {
+ class A {
+ class B {
+ class D {
+ }
+ }
+ class C {
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p1/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p1/X.js
new file mode 100644
index 0000000..e5afd08
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p1/X.js
@@ -0,0 +1,3 @@
+package p1;
+public class X {
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p2/Y.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p2/Y.js
new file mode 100644
index 0000000..849c24b
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p2/Y.js
@@ -0,0 +1,3 @@
+package p2;
+public class Y {
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p3/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p3/B.js
new file mode 100644
index 0000000..3c31965
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p3/B.js
@@ -0,0 +1,14 @@
+package p3;
+/* Test case for bug 23829 IType::resolveType incorrectly returns null */
+public class B{}
+class A extends B{
+}
+
+class Test{
+ void f(){
+ A a= new A();
+ f(a);
+ }
+ void f(B b){
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p4/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p4/A.js
new file mode 100644
index 0000000..4bf68a8
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p4/A.js
@@ -0,0 +1,8 @@
+package p4;
+public class A {
+ class Inner {
+ public int amount() {
+ return 1;
+ }
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p4/B.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p4/B.js
new file mode 100644
index 0000000..81b0c09
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p4/B.js
@@ -0,0 +1,6 @@
+package p4;
+public class B {
+ B(int t, A.Inner a) {
+ a.amount();
+ }
+}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p5/A.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p5/A.js
new file mode 100644
index 0000000..306dafe
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p5/A.js
@@ -0,0 +1,10 @@
+package 5;
+/* Test case for bug 48350 IType#resolveType(String) fails on local types */
+public class A {
+ void foo() {
+ class Local {
+ void bar() {
+ }
+ }
+ }
+}

Back to the top